query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jcombocateg = new javax.swing.JComboBox(); txtcodigo = new javax.swing.JTextField(); txtproduto = new javax.swing.JTextField(); txtpreco = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); jPanel1 = new javax.swing.JPanel(); jRadioButton1 = new javax.swing.JRadioButton(); jRadioButton2 = new javax.swing.JRadioButton(); jLabel5 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Adicionar Produtos"); setResizable(false); jLabel1.setText("Codigo"); jLabel2.setText("Produto"); jLabel3.setText("Categoria"); jLabel4.setText("Preço"); jcombocateg.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Medicamento", "Perfumaria" })); jButton1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N jButton1.setText("Adicionar"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Status", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 13))); // NOI18N buttonGroup1.add(jRadioButton1); jRadioButton1.setText("Disponivel"); buttonGroup1.add(jRadioButton2); jRadioButton2.setText("Em Falta"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jRadioButton1) .addContainerGap()) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jRadioButton2) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jRadioButton1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 3, Short.MAX_VALUE) .addComponent(jRadioButton2)) ); jLabel5.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N jLabel5.setText("Adicionar Produtos"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(121, 121, 121) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(137, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(txtpreco, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jcombocateg, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(43, 43, 43) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(12, 12, 12) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(txtcodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtproduto, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(26, 26, 26)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtcodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(15, 15, 15) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtproduto, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(43, 43, 43) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jcombocateg, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(17, 17, 17) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtpreco, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(31, 31, 31))) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(22, 22, 22)) ); setSize(new java.awt.Dimension(416, 415)); setLocationRelativeTo(null); }
{ "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 quotaGUI() {\n initComponents();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public Oddeven() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Magasin() {\n initComponents();\n }", "public intrebarea() {\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 }", "public kunde() {\n initComponents();\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 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 Botonera() {\n initComponents();\n }", "public FrmMenu() {\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 MiFrame2() {\n initComponents();\n }", "public IssueBookForm() {\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 Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\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 POS1() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public Carrera() {\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.7319396", "0.7290941", "0.7290941", "0.7290941", "0.7285927", "0.7248002", "0.72139066", "0.72086275", "0.71958303", "0.718997", "0.7184516", "0.7159095", "0.71481097", "0.709288", "0.70806605", "0.70578784", "0.6986726", "0.6977067", "0.6955257", "0.6954392", "0.6945326", "0.69436216", "0.6935779", "0.69320637", "0.6928225", "0.6924907", "0.69248605", "0.6911609", "0.6911109", "0.6892906", "0.6892066", "0.68918383", "0.6891177", "0.6889087", "0.6883209", "0.6882372", "0.6880651", "0.68782973", "0.6876634", "0.6874696", "0.68711734", "0.6859314", "0.68565166", "0.6855607", "0.68552643", "0.6854565", "0.68534696", "0.68530536", "0.68530536", "0.6843682", "0.6836637", "0.6836613", "0.6829145", "0.68281287", "0.682634", "0.6824281", "0.68238854", "0.681735", "0.6816949", "0.6811127", "0.68091583", "0.6808792", "0.680855", "0.6808137", "0.6802665", "0.67954504", "0.67941535", "0.6793186", "0.6791855", "0.67899567", "0.67891306", "0.678766", "0.67817825", "0.67669976", "0.67660517", "0.6764966", "0.67571455", "0.6755968", "0.6752885", "0.6751322", "0.6742087", "0.6739845", "0.673701", "0.6736383", "0.67338026", "0.6727401", "0.67262983", "0.67209303", "0.67158926", "0.6715857", "0.67147917", "0.67091477", "0.6708007", "0.6704485", "0.6701657", "0.67003953", "0.6699588", "0.6698673", "0.66944015", "0.6690715", "0.6689867" ]
0.0
-1
todo fethc wholeday and put it here.
public void downloadDay(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "private FlyWithWings(){\n\t\t\n\t}", "protected void mo6255a() {\n }", "public void smell() {\n\t\t\n\t}", "@Override\n protected void prot() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\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}", "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 }", "protected void h() {}", "private Rekenhulp()\n\t{\n\t}", "private void strin() {\n\n\t}", "public void mo38117a() {\n }", "protected boolean func_70814_o() { return true; }", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "public void method_4270() {}", "public void mo55254a() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void mo70713b();", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n protected void getExras() {\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private CanonizeSource() {}", "protected Doodler() {\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo6081a() {\n }", "protected OpinionFinding() {/* intentionally empty block */}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public abstract void mo56925d();", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "public abstract void mo6549b();", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo12628c() {\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}", "public void referToSpecialist(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "private UsineJoueur() {}", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "private void logika_rozpocznij(){\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "public final void mo91715d() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "protected void init() {\n // to override and use this method\n }", "protected void onFirstUse() {}", "public void mo3376r() {\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 }", "@Override\n\t\t\t\t\t\t\tpublic void onIOException(IOException e, Object state) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public abstract void mo27386d();", "public void mo21877s() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "public void mo21825b() {\n }", "public void mo9848a() {\n }", "public contrustor(){\r\n\t}", "@Override\n public void feedingHerb() {\n\n }", "private void m50366E() {\n }", "zzafe mo29840Y() throws RemoteException;", "private void init() {\n\n\t}", "public void mo1531a() {\n }", "static void feladat7() {\n\t}", "@Override\n\tpublic void jugar() {}", "@Override\n public void preprocess() {\n }" ]
[ "0.6180373", "0.5981687", "0.5884446", "0.5788745", "0.5788456", "0.57278645", "0.5697032", "0.5691304", "0.56854695", "0.56739753", "0.5659082", "0.5631912", "0.5623448", "0.5602827", "0.55711234", "0.55711234", "0.55674696", "0.55674696", "0.55674696", "0.55674696", "0.55674696", "0.55674696", "0.55674696", "0.555905", "0.55585337", "0.5555367", "0.55268294", "0.55261254", "0.5518342", "0.55127144", "0.55049515", "0.54730046", "0.54715216", "0.54546213", "0.54504025", "0.5444732", "0.5423683", "0.54204404", "0.54193264", "0.5412416", "0.54090595", "0.54032874", "0.5401616", "0.53920317", "0.53885347", "0.538632", "0.53756344", "0.53631574", "0.53615874", "0.5358288", "0.53356695", "0.5332765", "0.5329697", "0.5323868", "0.53157747", "0.5301886", "0.5297461", "0.5289882", "0.528939", "0.52882344", "0.52882344", "0.5281923", "0.52798873", "0.5271225", "0.5268061", "0.5267822", "0.52651167", "0.52486336", "0.5246013", "0.5238121", "0.522986", "0.52058065", "0.5195175", "0.5188641", "0.51827276", "0.5179044", "0.5175238", "0.5174618", "0.5174618", "0.5174618", "0.5174618", "0.5174618", "0.5174618", "0.5162578", "0.5162548", "0.51562047", "0.51512736", "0.51501393", "0.5146253", "0.5146099", "0.514379", "0.5128916", "0.5124626", "0.51245123", "0.5122928", "0.51041585", "0.50985235", "0.50980455", "0.50975907", "0.50945574", "0.50922966" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main_menu, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd_HH:mm"); //TODO so far will add todays date. but I might add a button to add manually the user
public void createDate(){ SimpleDateFormat sdf = new SimpleDateFormat("yyyy_MM_dd"); //TODO -HHmm si dejo diagonales separa bonito en dia, pero para hacer un armado de excel creo que debo hacer un for mas currentDateandTime = sdf.format(new Date()); Log.e(TAG, "todays date is: "+currentDateandTime ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateDateTxtV()\n {\n String dateFormat =\"EEE, d MMM yyyy\";\n SimpleDateFormat sdf = new SimpleDateFormat(dateFormat, Locale.CANADA);\n dateStr = sdf.format(cal.getTime());\n dateTxtV.setText(dateStr);\n\n //unix datetime for saving in db\n dateTimeUnix = cal.getTimeInMillis() / 1000L;\n }", "private void updateLabel(EditText view) {\n String myFormat = \"MM/dd/yyyy\"; //In which you need put here\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);\n\n view.setText(sdf.format(myCalendar.getTime()));\n }", "public void updateDate(){\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy/MM/dd\");\n Date curDate=new Date(System.currentTimeMillis());\n String date=formatter.format(curDate);\n TextView TextTime=(TextView)this.findViewById(R.id.tv_date);\n TextTime.setText(date);\n }", "private void configDate(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd\");\n tvDateLost.setText(dateFormat.format(date));\n }", "public void Add_date(String d)\n {\n\n date = new String(d);\t\n }", "private void updateLabel() {\n String myFormat = \"dd-MM-YYYY\"; //In which you need put here\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);\n dateInput.setText(sdf.format(myCalendar.getTime()));\n }", "public void setSysDate()\r\n\t{\r\n\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"dd/MM/yyyy\");\r\n txtPDate.setText(sdf.format(new java.util.Date()));\r\n\t}", "private void setDate() {\n Date date = new Date();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n datetxt2.setText(sdf.format(date));\n }", "private void updateDatedeparture() {\n String myFormat = \"MM/dd/yy\";\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.FRANCE);\n\n departureDate.setText(sdf.format(myCalendar.getTime()));\n }", "@Override\n public void onClick(View v) {\n TextView txtDate = (TextView)findViewById(R.id.tvDate);\n TextView txtTime = (TextView)findViewById(R.id.tvTime);\n // Log.v(\"Vidushi:update\", userId);\n helper.insertVolunteerDuty(userId,txtDate.getText().toString(),txtTime.getText().toString());\n Toast.makeText(getApplicationContext(),\"Information Saved\", Toast.LENGTH_SHORT).show();\n\n\n }", "public void date_zone() {\n\n JLabel lbl_date = new JLabel(\"Date du Rapport :\");\n lbl_date.setBounds(40, 90, 119, 16);\n add(lbl_date);\n String date = rapport_visite.elementAt(DAO_Rapport.indice)[2];\n Date date_n = null;\n\n\n // *** note that it's \"yyyy-MM-dd hh:mm:ss\" not \"yyyy-mm-dd hh:mm:ss\"\n SimpleDateFormat dt = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\n try {\n date_n = dt.parse(date);\n } catch (ParseException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n // *** same for the format String below\n SimpleDateFormat dt1 = new SimpleDateFormat(\"dd-MM-yyyy\");\n\n JTextField date_rapport = new JTextField();\n date_rapport.setBounds(200, 90, 125, 22);\n date_rapport.setText(dt1.format(date_n));\n date_rapport.setEditable(false);\n add(date_rapport);\n\n\n\n\n }", "private void setDate() {\n java.util.Date d1 = new java.util.Date();\n SimpleDateFormat df = new SimpleDateFormat(\"YYYY-MM-dd\");\n String formateDate = df.format(d1);\n lblDate.setText(formateDate); \n }", "public static void main(String[] args) {\r\n\t\tDate now = new Date();\r\n\t\tSimpleDateFormat sdf = \r\n\t\tnew SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\tString str = sdf.format(now);\r\n\tSystem.out.println(str);\r\n\tlong time = now.getTime();\r\n\ttime += 48954644;\r\n\tnow.setTime(time);\r\n\tSystem.out.println(sdf.format(now));\r\n\tDate dat = null;\r\n\ttry {\r\n\t\tdat = sdf.parse(str);\r\n\t} catch (ParseException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t}\r\n\tSystem.out.println(dat);\r\n\t\r\n\r\n}", "private void updateTimeTxtV()\n {\n String timeFormat =\"hh:mm aaa\";//12:08 PM\n SimpleDateFormat stf = new SimpleDateFormat(timeFormat, Locale.CANADA);\n timeStr = stf.format(cal.getTime());\n timeTxtV.setText(timeStr);\n\n //unix datetime for saving in db\n dateTimeUnix = cal.getTimeInMillis() / 1000L;\n }", "private void updateLabel() {\n EditText dob = (EditText) findViewById(R.id.dateofbirth);\n\n String dateFormat = \"MM/dd/yyyy\";\n SimpleDateFormat sdf = new SimpleDateFormat(dateFormat,\n Locale.US);\n dob.setText(sdf.format(cal.getTime()));\n }", "public void addDateField(Date date) {\n\t\tput(\"BIRTHDAY\", Constants.TIME_FMT.format(date));\n\t}", "private void updateLabel() {\n String myFormat = \"yyyy-MM-dd\"; //In which you need put here\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.UK);\n\n serviceDate = sdf.format(myCalendar.getTime());\n callTimeSlotService();\n }", "public registration() {\n initComponents();\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd\");\n Date d = new Date();\n String dt = df.format(d);\n tdate.setText(dt);\n \n }", "public void updateText() {\n\n dateText = dateFormat.format(c.getTime());\n timeText = timeFormat.format(c.getTime());\n dateEt.setText(dateText + \" \"+ timeText);\n}", "private String getTodayDate(){\n // get current Date and Time for product_info table\n Date date = Calendar.getInstance().getTime();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd hh:MM\", Locale.getDefault());\n return dateFormat.format(date);\n }", "void showDate()\n {\n Date d=new Date();\n SimpleDateFormat s=new SimpleDateFormat(\"dd-MM-yyyy\");\n date.setText(s.format(d));\n }", "private String setDate() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(new Date());\n }", "private String createDate(){\n SimpleDateFormat date = new SimpleDateFormat(\"EEE, MMM d, yyyy\");\n String stringDate = date.format(new Date()); \n return stringDate;\n }", "public static void main(String[] args) throws Exception {\n Calendar cal = Calendar.getInstance();\n SimpleDateFormat simpleformat = new SimpleDateFormat(\"E, dd MMM yyyy HH:mm:ss Z\");\n System.out.println(\"Today's date and time = \"+simpleformat.format(cal.getTime()));\n // displaying date\n simpleformat = new SimpleDateFormat(\"dd/MMMM/yyyy\");\n String str = simpleformat.format(new Date());\n System.out.println(\"Current Date = \"+str);\n // current time\n simpleformat = new SimpleDateFormat(\"HH:mm:ss\");\n String strTime = simpleformat.format(new Date());\n System.out.println(\"Current Time = \"+strTime);\n // displaying hour in HH format\n simpleformat = new SimpleDateFormat(\"HH\");\n String strHour = simpleformat.format(new Date());\n System.out.println(\"Hour in HH format = \"+strHour);\n\n\n\n //formato ideal\n simpleformat = new SimpleDateFormat(\"dd/MM/yyyy - HH:mm:ss\");\n String strTimeDay = simpleformat.format(new Date());\n System.out.println(\"Dia e Hora = \" + strTimeDay);\n\n }", "private static void incrementDate() {\n\t\ttry {\r\n\t\t\tint days = Integer.valueOf(input(\"Enter number of days: \")).intValue();\r\n\t\t\tcalculator.incrementDate(days); // variable name changes CAL to calculator\r\n\t\t\tlibrary.checkCurrentLoans(); // variable name changes LIB to library\r\n\t\t\toutput(sdf.format(cal.date())); // variable name changes SDF to sdf , CAL to cal , method changes Date() to date()\r\n\t\t\t\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\t output(\"\\nInvalid number of days\\n\");\r\n\t\t}\r\n\t}", "private String formatDate(Date date){\n SimpleDateFormat format = new SimpleDateFormat(\"dd-MM-yyyy HH:mm\", Locale.getDefault());\n\n return format.format(date);\n }", "@Test\n\tpublic void systemDate_Get()\n\t{\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MM-dd-yyyy\");\n\t\t\n\t\t// Created object of Date, to get system current date\n\t\tDate date = new Date();\n\t\t\n\t\tString currDate = dateFormat.format(date);\n\t\t\n\t\tSystem.out.println(\"Today's date is : \"+currDate);\n\n\t}", "void showdate(){\n \n Date d = new Date();\n SimpleDateFormat s = new SimpleDateFormat(\"yyyy-MM-dd\");\n jLabel4.setText(s.format(d));\n}", "public void checkInTime() {\n Date recentDate = new Date();\n PreparedStatement stmt;\n\n SimpleDateFormat dateStamp = new SimpleDateFormat(\"dd/MM/yyyy\");\n SimpleDateFormat timeStamp = new SimpleDateFormat(\"h:mm:ss a\");\n String dateuser = dateStamp.format(recentDate);\n String timeuser = timeStamp.format(recentDate);\n\n String id = txtUsername.getText();\n\n try {\n String querysql = \"update employee set time_in='\" + timeuser + \"',date='\" + dateuser + \"'\" + \", parking_spot = '\" + parking + \"' where id_no='\" + id + \"' \";\n stmt = conn.prepareStatement(querysql);\n stmt.execute();\n\n conn.close();\n\n } catch (SQLException e) {\n\n System.out.println(\"Failed to update\");\n\n }\n\n }", "public void actionPerformed(ActionEvent ae){\n Date date = new Date();\n //instantiate new Date object\n\n DateFormat otherFormat = new SimpleDateFormat(\"E, MMM, d y K:mm:ss a\");\n //12 hour time\n\n String otherDateTime = otherFormat.format(date);\n\n clockLabelTwo.setText(otherDateTime);\n //setting clock text to formatted String\n }", "private String getDate()\r\n\t{\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\r\n\t\treturn sdf.format(cal.getTime());\r\n\t}", "protected void updateDate() {\r\n\t\tDate date = new Date();\r\n\t\tdate.setTime(mTime);\r\n\t\tDateFormat dateFormat = android.text.format.DateFormat.getDateFormat(getApplicationContext());\r\n\t\tString text = dateFormat.format(date);\r\n\t\tmDatePickerText.setText(text);\r\n\t}", "public void setUserDate(JFormattedTextField userInput) {\n\t\tString in = userInput.getText();\n\t\tif (in == null) {\n Date date = new Date();\n this.userDate[0] = String.valueOf(date.getYear());\n this.userDate[1] = String.valueOf(date.getMonth());\n this.userDate[2] = String.valueOf(date.getDay());\n }\n\t\telse {\n\t\t\tthis.userDate[0] = in.substring(0, 3);\n\t\t\tthis.userDate[1] = in.substring(6, 7);\n\t\t\tthis.userDate[2] = in.substring(8, 9);\n\t\t}\n\t}", "public void actionPerformed(ActionEvent ae){\n Date date = new Date();\n //instantiate new Date object\n\n DateFormat format = new SimpleDateFormat(\"E, MMM d y HH:mm:ss\");\n //set format of clock\n\n DateFormat otherFormat = new SimpleDateFormat(\"E, MMM, d y KK:mm:ss a\");\n //12 hour time\n\n String dateTime = format.format(date);\n //formatting date object using format template\n\n String otherDateTime = otherFormat.format(date);\n\n clockLabelOne.setText(dateTime);\n //setting clock text to formatted String\n }", "public String getMyDatePosted() {\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\", Locale.US);\n try {\n Date date = format.parse(myDatePosted);\n Calendar cal = Calendar.getInstance();\n cal.setTime(date);\n cal.add(Calendar.HOUR, -7);\n Date temp = cal.getTime();\n format.applyPattern(\"MMM dd, yyyy hh:mm a\");\n return format.format(temp);\n } catch (ParseException e) {\n return myDatePosted;\n }\n }", "public void promptDate(String date)\n {\n this.date = date;\n }", "public String getTimestamp() \n{\n Calendar now = Calendar.getInstance();\n return String.format(\"20%1$ty-%1$tm-%1$td_%1$tHh%1$tMm%1$tSs\", now);\n}", "@Override\n public void actionPerformed(ActionEvent e) {\n Date date = new Date();\n DateFormat timeFormat = new SimpleDateFormat(\"HH:mm:ss\");\n String time = timeFormat.format(date);\n relogio.setText(time);\n \n Date date2 = new Date();\n DateFormat timeFormat2 = new SimpleDateFormat(\"dd/MM/yyyy\");\n String time2 = timeFormat2.format(date2);\n data.setText(time2);\n }", "public void getCurrentDate(){\n Date now = new Date(); //get todays date \n \n SimpleDateFormat formatter = new SimpleDateFormat( \"MM/dd/yyyy\" ); \n System.out.println ( \"The current date is: \" + formatter.format( now ) ); \n \n month = (String) formatter.format( now ).subSequence(0, 2);\n day = (String) formatter.format( now ).subSequence(3, 5);\n year = (String) formatter.format( now ).subSequence(6, 10);\n \n System.out.println(\"month: \" + month);\n System.out.println(\"day: \" + day);\n System.out.println(\"year: \" + year);\n \n }", "public static String getDateString(){\n\t\t\tCalendar now = Calendar.getInstance();\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd__HH-mm-ss\");\n\t\t\treturn sdf.format(now.getTime());\n\t }", "private static String setDate() {\n mDate = new Date();\n DateFormat dateFormat = DateFormat.getDateInstance();\n String dateString = dateFormat.format(mDate);\n return dateString;\n }", "private void showCurrentDateTime(long ts) {\n String target = \"1904/01/01 12:00 AM\"; // Your given date string\n long millis = TimeUnit.MILLISECONDS.convert(ts, TimeUnit.NANOSECONDS);\n DateFormat formatter = new SimpleDateFormat(\"yyyy/MM/dd hh:mm aaa\");\n formatter.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n Date date = null;\n try {\n date = formatter.parse(target);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n long newTimeInmillis = date.getTime() + millis;\n Date date2 = new Date(newTimeInmillis);\n curT.setText(\"now: \" + date2);\n }", "private void getIntialCalender() {\n\n\t\ttry {\n\n\t\t\tc = Calendar.getInstance();\n\t\t\tString[] fields = Global_variable.str_booking_date.split(\"[-]\");\n\n\t\t\tString str_year = fields[0];\n\t\t\tString str_month = fields[1];\n\t\t\tString str_day = fields[2];\n\n\t\t\tSystem.out.println(\"!!!!\" + fields[0]);\n\t\t\tSystem.out.println(\"!!!!\" + fields[1]);\n\t\t\tSystem.out.println(\"!!!!!\" + fields[2]);\n\n\t\t\tif (str_year.length() != 0) {\n\t\t\t\tyear = Integer.parseInt(str_year);\n\t\t\t} else {\n\t\t\t\tyear = c.get(Calendar.YEAR);\n\t\t\t}\n\n\t\t\tif (str_month.length() != 0) {\n\t\t\t\tmonth = Integer.parseInt(str_month) - 1;\n\t\t\t} else {\n\t\t\t\tmonth = c.get(Calendar.MONTH);\n\t\t\t}\n\n\t\t\tif (str_year.length() != 0) {\n\t\t\t\tday = Integer.parseInt(str_day);\n\t\t\t} else {\n\t\t\t\tday = c.get(Calendar.DAY_OF_MONTH);\n\t\t\t}\n\n\t\t\tString[] fields1 = Global_variable.str_booking_time.split(\"[:]\");\n\n\t\t\tString str_hour = fields1[0];\n\t\t\tString str_minutes = fields1[1];\n\n\t\t\tSystem.out.println(\"!!!!!\" + fields1[0]);\n\t\t\tSystem.out.println(\"!!!!!\" + fields1[1]);\n\n\t\t\tif (str_hour.length() != 0) {\n\t\t\t\thour = Integer.parseInt(str_hour);\n\t\t\t} else {\n\t\t\t\thour = c.get(Calendar.HOUR_OF_DAY);\n\t\t\t}\n\n\t\t\tif (str_minutes.length() != 0) {\n\t\t\t\tminutes = Integer.parseInt(str_minutes);\n\t\t\t} else {\n\t\t\t\tminutes = c.get(Calendar.MINUTE);\n\t\t\t}\n\n\t\t\tcurrDate = new java.sql.Date(System.currentTimeMillis());\n\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\tCalendar c1 = Calendar.getInstance();\n\t\t\tc1.setTime(new Date()); // Now use today date.\n\t\t\tc1.add(Calendar.DATE, 30); // Adding 30 days\n\t\t\toutput = sdf.format(c1.getTime());\n\t\t\tSystem.out.println(\"!!!!!!!!!!!!!!!\" + output);\n\n\t\t} catch (NullPointerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private static String timeHandler(String date) {\n SimpleDateFormat dbFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\");\n SimpleDateFormat dayFormat = new SimpleDateFormat(\"MM-dd\");\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm\");\n dbFormat.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n String today = dayFormat.format(new Date());\n String day = \"\";\n String time = \"\";\n try {\n time = timeFormat.format(dbFormat.parse(date));\n day = dayFormat.format(dbFormat.parse(date));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if (day.equals(today)) {\n return \"Today \" + time;\n } else if (day.equals(dayFormat.format(yesterday()))) {\n return \"Yesterday \" + time;\n } else {\n return day + \" \" + time;\n }\n }", "public static void dateDue() {\n Date date = new Date();\r\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n String strDate = formatter.format(date);\r\n NewProject.due_date = getInput(\"Please enter the due date for this project(dd/mm/yyyy): \");\r\n\r\n UpdateData.updateDueDate();\r\n updateMenu();\t//Return back to previous menu.\r\n }", "public String getCurrentDate(String dateForm) {\n DateFormat dateFormat = new SimpleDateFormat(dateForm);\n\n //get current date time with Date()\n Date date = new Date();\n\n // Now format the date\n String date1= dateFormat.format(date);\n\n return date1;\n }", "public String dar_fecha(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n return dateFormat.format(date).toString();\n\n }", "@Override\n public void updateDate(int year, int month, int day) {\n calendar = new GregorianCalendar();\n calendar.set(year, month, day);\n // set the textview\n SimpleDateFormat sdf = new SimpleDateFormat(\"MMMM dd, yyyy\");\n sdf.setCalendar(calendar);\n expiration.setText(sdf.format(calendar.getTime()));\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tDate now = new Date();\n\t\t\t\tString ss = DateFormat.getDateTimeInstance().format(now);\n\t\t\t\tlblDate.setText(ss);\n\t\t\t}", "public void fechahoy(){\n Date fecha = new Date();\n \n Calendar c1 = Calendar.getInstance();\n Calendar c2 = new GregorianCalendar();\n \n String dia = Integer.toString(c1.get(Calendar.DATE));\n String mes = Integer.toString(c2.get(Calendar.MONTH));\n int mm = Integer.parseInt(mes);\n int nmes = mm +1;\n String memes = String.valueOf(nmes);\n if (nmes < 10) {\n memes = \"0\"+memes;\n }\n String anio = Integer.toString(c1.get(Calendar.YEAR));\n \n String fechoy = anio+\"-\"+memes+\"-\"+dia;\n \n txtFecha.setText(fechoy);\n \n }", "public static String generateDate()\r\n\t{\r\n\t\tDate d = new Date();\r\n\t\tSimpleDateFormat datef = new SimpleDateFormat(\"YYYY_MM_dd_ss\");\r\n\t\treturn datef.format(d);\r\n\r\n\r\n\t}", "public static String ShowDate(){\n Date date = new Date();\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss.SS a\");\n String HH_MM = sdf.format(date);\n return HH_MM;\n }", "public void departure_date()\r\n\t{\r\n\t\r\n\t\tDate date = new Date();\r\n\t\tdate.setDate(date.getDate() + 6);\r\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"MM/dd/YYYY\");\r\n\t\tformattedDate = df.format(date);\r\n\r\n\t\tif (departuredate.isDisplayed()) \r\n\t\t{\r\n\t\t\tdeparturedate.click();\r\n\t\t\tdeparturedate.clear();\r\n\t\t\tTypeInField(departuredate, formattedDate);\r\n\t\t\t//departuredate.sendKeys(formattedDate);\r\n\t\t\t//System.out.println(\"departuredate is entered successfully\");\r\n\t\t\tlogger.info(\"departuredate is entered successfully\");\r\n\t\t\ttest.log(Status.INFO, \"departuredate is entered successfully\");\r\n\r\n\t\t} else {\r\n\t\t\t//System.out.println(\"departuredate TextBox not found\");\r\n\t\t\tlogger.error(\"departuredate TextBox not found\");\r\n\t\t\ttest.log(Status.FAIL, \"departuredate TextBox not found\");\r\n\r\n\t\t}\r\n\t}", "public void saveCalenderDate() {\r\n\t\tdate = getDateToDisplay(null);\r\n\t}", "public static void addReminder(String username)\n {\n System.out.print(\"Event Number: \");\n String eventNo = CheckInput.getString();\n System.out.print(\"Reminder Date (YYYY-MM-DD): \");\n String reminderDate = CheckInput.getString();\n System.out.print(\"Reminder Time (HH:MM:SS): \");\n String reminderTime = CheckInput.getString();\n System.out.print(\"Frequency (daily,weekly,monthly): \");\n String frequency = CheckInput.getString();\n \n try\n {\n String sql = \"INSERT INTO REMINDER (USERNAME,EVENTNUMBER,REMINDERDATE,REMINDERTIME,FREQUENCY) \"\n + \"VALUES (?,?,?,?,?)\";\n PreparedStatement pstmt = conn.prepareStatement(sql);\n \n pstmt.setString(1,username);\n pstmt.setString(2,eventNo);\n pstmt.setString(3,reminderDate);\n pstmt.setString(4,reminderTime);\n pstmt.setString(5,frequency);\n \n pstmt.execute();\n }\n catch(Exception ex)\n {\n ex.printStackTrace();\n }\n }", "public String getDateCreationLibelle() {\n\t\tDateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd/MM/yyyy hh:mm:ss\");\n\t\treturn this.dateCreation.format(format);\n\t}", "public static void main(String[] args) {\n System.out.println(new Date().getTime());\n\n // 2016-12-16 11:48:08\n Calendar calendar = Calendar.getInstance();\n calendar.set(2016, 11, 16, 12, 0, 1);\n System.out.println(calendar.getTime());\n Date date=new Date();\n SimpleDateFormat simpleDateFormat=new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n System.out.println(simpleDateFormat.format(date));\n\n\n }", "private void setUpdatedDateAndTime() {\n // Calendar whose Date object will be converted to a readable date String and time String\n // initially set to the current date and time\n Calendar updatedCalendar = Calendar.getInstance();\n updatedCalendar.clear();\n // subtract 1 because Calendar month numbering is 0-based, ex. January is 0\n updatedCalendar.set(UPDATED_YEAR, UPDATED_MONTH-1, UPDATED_DAY, UPDATED_HOUR, UPDATED_MINUTE);\n\n Date updatedTime = updatedCalendar.getTime();\n time = DateFormat.getTimeInstance(DateFormat.SHORT).format(updatedTime);\n // format date to show day of week, month, day, year\n date = DateFormat.getDateInstance(DateFormat.FULL).format(updatedTime);\n }", "public void updateAttendance(Date date);", "public String formatDateAndTime(String date){\n\n return dateTimeFormatter.parse(date).toString();\n\n }", "public void setTodayDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\r\n\t\tmYear = c.get(Calendar.YEAR);\r\n\t\tmMonth = c.get(Calendar.MONTH);\r\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\r\n\r\n\t\tmaxYear = mYear - 10;\r\n\t\tmaxMonth = mMonth;\r\n\t\tmaxDay = mDay;\r\n\r\n\t\tminYear = mYear - 110;\r\n\t\tminMonth = mMonth;\r\n\t\tminDay = mDay;\r\n\t\t// display the current date (this method is below)\r\n\t\t// updateDisplay();\r\n\t\t updateDisplay(maxYear, maxMonth, maxDay);\r\n\t}", "private void updateDateButtonText() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT); \n String dateForButton = dateFormat.format(mCalendar.getTime()); \n mDateButton.setText(dateForButton);\n\t}", "private static String getDate() {\n return new SimpleDateFormat(\"yyyyMMddHHmmss\").format\n (new Date(System.currentTimeMillis()));\n }", "private void drawBookingDate() {\n try {\n bookingDate = bookingModel.getUserBookingDate(employeeID);\n labelBookingDate.setText(\"Booking Date: \" + bookingDate);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "Builder addDateCreated(String value);", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n String myFormat = \"yyyy-MM-dd\"; //In which you need put here\n\n\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);\n ed_date.setText(sdf.format(myCalendar.getTime()));\n sel_date=sdf.format(myCalendar.getTime());\n int dd=myCalendar.get(Calendar.DAY_OF_WEEK);\n switch (dd){\n case 1: sel_day=\"SUNDAY\";\n break;\n case 2: sel_day=\"MONDAY\";\n break;\n case 3: sel_day=\"TUESDAY\";\n break;\n case 4: sel_day=\"WEDNESDAY\";\n break;\n case 5: sel_day=\"THURSDAY\";\n break;\n case 6: sel_day=\"FRIDAY\";\n break;\n case 7: sel_day=\"SATURDAY\";\n break;\n }\n schedule_load();\n SharedPreferences sh=PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor ed=sh.edit();\n ed.putString(\"date\",ed_date.getText().toString());\n ed.commit();\n }", "private void updateDateDisplay() {\n\t\tStringBuilder date = new StringBuilder()\n\t\t\t\t// Month is 0 based so add 1\n\t\t\t\t.append(mMonth + 1).append(\"-\").append(mDay).append(\"-\")\n\t\t\t\t.append(mYear).append(\" \");\n\n\t\tchangeDateButton.setText(date);\t\n\t}", "private static String getDateStr() {\n\t\tDate date = Calendar.getInstance().getTime();\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMddyyy\");\n\t\tString dateStr = dateFormat.format(date);\n\t\treturn dateStr;\n\t}", "public void setDate(String dateInfo) {\n\n TextView dateTitle = (TextView) itemView.findViewById(R.id.event_date_title);\n\n if(dateInfo.equals(\"\")){\n dateTitle.setText(\"\");\n dateTitle.setTag(\"\");\n return;\n }\n\n DateFormat dfCorrect = new SimpleDateFormat(\"EEEE'\\r' MMM dd',' yyyy\", Locale.US);\n String[] dateArray = dateInfo.split(\"-\");\n java.util.Calendar calendar = java.util.Calendar.getInstance();\n calendar.set(Integer.parseInt(dateArray[0]), Integer.parseInt(dateArray[1]) - 1, Integer.parseInt(dateArray[2]));\n Date curDate = calendar.getTime();\n Log.d(\"date\", \"curDate: \"+curDate);\n dateTitle.setText(dfCorrect.format(curDate));\n dateTitle.setTag(dateInfo);\n }", "private String getFecha() {\n\t\tLocalDateTime myDateObj = LocalDateTime.now();\n\t\tDateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern(\"dd-MM-yyyy HH:mm:ss\");\n\t\tString formattedDate = myDateObj.format(myFormatObj);\n \n\t\treturn formattedDate;\n }", "private String getCurrentDate() {\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n Calendar cal = Calendar.getInstance();\n return dateFormat.format(cal.getTime());\n }", "public String getDate(){ return this.start_date;}", "@Override\n public void onClick(View v) {\n EditText editText_Name = (EditText) findViewById(R.id.editText_Name);\n EditText editText_Cnt = (EditText) findViewById(R.id.editText_Cnt);\n DatePicker datePick_dateBeg = (DatePicker) findViewById(R.id.datePick_dateBeg);\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\n if (editText_Cnt.getText().length() == 0) {\n Context context = getApplicationContext();\n CharSequence text = \"Необходимо задать количество людей в туре\";\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n return;\n }\n\n if (editText_Name.getText().length() == 0) {\n Context context = getApplicationContext();\n CharSequence text = \"Необходимо задать название тура\";\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n return;\n }\n\n\n\n /* = new Tour(editText_Name.getText().toString(), Integer.parseInt(editText_Cnt.getText().toString()),\n \"'\" + datePick_dateBeg.getYear() + \"-\" +\n String.format(\"%2s\", datePick_dateBeg.getMonth()+1).replace(\" \",\"0\") +\n \"-\" + String.format(\"%2s\", datePick_dateBeg.getDayOfMonth()).replace(\" \",\"0\") +\n \" 00:00:00'\"\n ); */\n\n\n Tour tour = db.getTour(tour_id);\n tour.setDate_begin(/*datePick_dateBeg.getYear() + \"-\" +\n String.format(\"%2s\", datePick_dateBeg.getMonth()+1).replace(\" \",\"0\") +\n \"-\" + String.format(\"%2s\", datePick_dateBeg.getDayOfMonth()).replace(\" \",\"0\") +\n \" 00:00:00\"*/\n dateFormat.parse(\n datePick_dateBeg.getYear() + \"-\" +\n (datePick_dateBeg.getMonth() + 1) +\n \"-\" + datePick_dateBeg.getDayOfMonth(), parsePosition)\n // + \" 00:00:00\"\n );\n tour.setTourist_cnt(Integer.parseInt(editText_Cnt.getText().toString()));\n tour.setName(editText_Name.getText().toString());\n\n db = new DatabaseHandler(getApplicationContext());\n // int tour_id = db.createTour(tour);\n db.updateTour(tour);\n db.closeDB();\n\n Log.e(LOG, \"tour.getDate_begin() \" + tour.getDate_begin());\n Log.e(LOG, \"tour.getDate_end()\" + tour.getDate_end());\n\n Log.e(LOG, \"dateFormat.parse: \" + \"'\" + datePick_dateBeg.getYear() + \"-\" +\n String.format(\"%2s\", datePick_dateBeg.getMonth() + 1).replace(\" \", \"0\") +\n \"-\" + String.format(\"%2s\", datePick_dateBeg.getDayOfMonth()).replace(\" \", \"0\") +\n \" 00:00:00'\");\n /* // Intent i = new Intent(CreateTourActivity.this, CreateCurrencyActivity.class);\n Intent i = new Intent(CreateTourActivity.this, SelectCurrenciesForTourActivity.class);\n i.putExtra(\"tour_id\", tour_id);\n startActivity(i); */\n finish(); // Завершить текущую активность.\n }", "public String DateFormatted(){\n\t\tSimpleDateFormat simDate = new SimpleDateFormat(\"E, dd/MM/yy hh:mm:ss a\");\n\t\treturn simDate.format(date.getTime());\n\t}", "public static String formatDate(Date date, String userId)\n\t{\n\t\tDateFormat format = new SimpleDateFormat(\"MMM dd, yyyy hh:mm a\", getPreferredLocale(userId));\n\t\tformat.setTimeZone(getPreferredTimeZone(userId));\n\t\tString rv = format.format(date);\n\t\treturn rv;\n\t}", "public void expiredate() {\n\t\tdr.findElement(By.xpath(\"//input[@id='expiryDate']\")).sendKeys(\"05/2028\");\r\n\t\t\r\n\t\t\r\n\t\t}", "@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tString st=stext.getText().toString();\n\t\t\tinitdate(st);\n\t\t}", "@Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n\n CharSequence strDate = null;\n Time chosenDate = new Time();\n chosenDate.set(dayOfMonth, monthOfYear, year);\n\n long dateAttendance = chosenDate.toMillis(true);\n strDate = DateFormat.format(\"dd-MM-yyyy\", dateAttendance);\n\n edt_std_leave_sDate.setText(strDate);\n currentDate = String.valueOf(strDate);\n }", "public void setDateStart_CouponsTab_Marketing() {\r\n\t\tthis.dateStart_CouponsTab_Marketing.clear();\r\n\t\tSimpleDateFormat formattedDate = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tString today1 = (String) (formattedDate.format(c.getTime()));\r\n\t\tthis.dateStart_CouponsTab_Marketing.sendKeys(today1);\r\n\t}", "@Override\n\tpublic void onCreate() {\n\t\t\n\t\t \n\t\tfinal Calendar ca = Calendar.getInstance();\n\t\tint mHour = ca.get(Calendar.HOUR_OF_DAY);\n\t\tint mMinute = ca.get(Calendar.MINUTE);\n\t\tStringBuilder s1=new StringBuilder().append(pad(mHour)).append(\":\").append(pad(mMinute));\n\t\t\n\t todaytime=(String)s1.toString();\n\t\t\n\t\tsuper.onCreate();\n\t}", "public void addToReminders(Date reminders);", "public static String incrementDateByOneDay() {\n\t\ttry {\n\t\t\tcalendar.setTime(sdf.parse(newDateStr));\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcalendar.add(Calendar.DATE, 1); // number of days to add\n\t\tnewDateForTable = sdf.format(calendar.getTime());\n\t\treturn newDateForTable;\n\t}", "public String retrieveDate() {\n // Check if there's a valid event date.\n String date = _dateET.getText().toString();\n if (date == null || date.equals(\"\")) {\n Toast.makeText(AddActivity.this, \"Please enter a valid date.\", Toast.LENGTH_LONG).show();\n return \"\";\n }\n Pattern p = Pattern.compile(\"^(0[1-9]|1[012])/(0[1-9]|[12][0-9]|3[01])/(19|20)\\\\d\\\\d$\");\n Matcher m = p.matcher(date);\n if (!m.find()) {\n Toast.makeText(AddActivity.this, \"Please input a valid date in mm/dd/yyyy format.\", Toast.LENGTH_LONG).show();\n return \"\";\n }\n return date;\n }", "public void saveDate() {\n\t\t//Get JDBC connection\n\t\tConnection connection = null;\n\t\tConnectDB conn = new ConnectDB();\n\t\tconnection = conn.getConnection();\n\n\t\ttry {\n\t\t\t//Parse the date and time from text field to save it into Database\n\t\t\tSimpleDateFormat dfFormat = new SimpleDateFormat(\"dd.MM.yyyy\");\n\n\t\t\tDate fromDate = dfFormat.parse(dateFromTf.getText());\n\t\t\tlong ftime = fromDate.getTime();\n\t\t\tjava.sql.Date fdate = new java.sql.Date(ftime);\n\n\t\t\tDate toDate = dfFormat.parse(dateToTf.getText());\n\t\t\tlong ttime = toDate.getTime();\n\t\t\tjava.sql.Date tdate = new java.sql.Date(ttime);\n\t\t\t\n\t\t\t//Calculate the number of days for which the system is active\n\t\t\tint numOfDays = (int) ((ttime - ftime) / (1000 * 60 * 60 * 24));\n\t\t\tSystem.out.println(\"Difference days b/w dates\" + numOfDays);\n\n\t\t\tString time1 = WDFromTf.getText(), time2 = WDToTf.getText(), time3 = WEndsFrom\n\t\t\t\t\t.getText(), time4 = WEndsTo.getText();\n\n\t\t\tDate date1 = null, date2 = null, date3 = null, date4 = null;\n\n\t\t\ttry {\n\t\t\t\tdate1 = new SimpleDateFormat(\"HH:mm:ss\").parse(time1);\n\t\t\t\tdate2 = new SimpleDateFormat(\"HH:mm:ss\").parse(time2);\n\t\t\t\tdate3 = new SimpleDateFormat(\"HH:mm:ss\").parse(time3);\n\t\t\t\tdate4 = new SimpleDateFormat(\"HH:mm:ss\").parse(time4);\n\t\t\t} catch (ParseException e) {\n\n\t\t\t}\n\n\t\t\tStatement selectStmt = connection.createStatement();\n\t\t\tString sql1 = \"SELECT * FROM systemConfig\";\n\t\t\tResultSet rs1 = selectStmt.executeQuery(sql1);\n\n\t\t\tif (rs1.next() == false) {\n\t\t\t\t\n\t\t\t\t//Insert the calculated values to database if the user is registered\n\t\t\t\tString query = \"INSERT INTO `systemConfig`(fromDate,toDate,wdfromTime,wdtoTime,wendsFromTime,wendsToTime) VALUES (?,?,?,?,?,?)\";\n\t\t\t\tPreparedStatement stmt = connection.prepareStatement(query);\n\n\t\t\t\tstmt.setDate(1, fdate);\n\t\t\t\tstmt.setDate(2, tdate);\n\t\t\t\tstmt.setTime(3, new Time(date1.getTime()));\n\t\t\t\tstmt.setTime(4, new Time(date2.getTime()));\n\t\t\t\tstmt.setTime(5, new Time(date3.getTime()));\n\t\t\t\tstmt.setTime(6, new Time(date4.getTime()));\n\t\t\t\tstmt.executeUpdate();\n\t\t\t} else {\n\t\t\t\t//Insert the calculated values to database if the user is new user\n\t\t\t\tString query = \"UPDATE systemConfig SET fromDate = ? , toDate = ? ,wdfromTime= ?, wdtoTime= ? , wendsFromTime= ?, wendsToTime= ?\";\n\t\t\t\tPreparedStatement stmt = connection.prepareStatement(query);\n\n\t\t\t\tstmt.setDate(1, fdate);\n\t\t\t\tstmt.setDate(2, tdate);\n\t\t\t\tstmt.setTime(3, new Time(date1.getTime()));\n\t\t\t\tstmt.setTime(4, new Time(date2.getTime()));\n\t\t\t\tstmt.setTime(5, new Time(date3.getTime()));\n\t\t\t\tstmt.setTime(6, new Time(date4.getTime()));\n\t\t\t\tstmt.executeUpdate();\n\t\t\t}\n\n\t\t} catch (SQLException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (ParseException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t}", "private void setDateButtonActionPerformed(java.awt.event.ActionEvent evt) {\n Date newDate = calendario.getDate();\n if(newDate != null) {\n java.sql.Date date = new java.sql.Date(newDate.getTime());\n control.setDate(date);\n control.crearAlerta(\"Informacion\", \"La fecha \" + date + \" ha sido agregada\" , this);\n } else {\n control.crearAlerta(\"Advertencia\", \"Debe escoger una fecha\", this);\n }\n }", "private static void formatDate(Date i) {\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yy\");\n\t\tformatter.setLenient(false);\n\t\tAnswer = formatter.format(i);\n\t}", "public static void main(String[] args) {\n DateFormat df=new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss a\");\n \n //Get the date today using calender object.\n Date today=Calendar.getInstance().getTime();\n //using DateFormat format method we can create a string\n //representation of a date with the defined format.\n String reportDate=df.format(today);\n //print what date is today!\n System.out.println(\"Current Date: \"+reportDate);\n }", "@Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n CharSequence strDate = null;\n Time chosenDate = new Time();\n chosenDate.set(dayOfMonth, monthOfYear, year);\n\n long dateAttendance = chosenDate.toMillis(true);\n strDate = DateFormat.format(\"dd-MM-yyyy\", dateAttendance);\n\n edt_std_leave_eDate.setText(strDate);\n currentDate = String.valueOf(strDate);\n }", "public static String getStrDate(Date date) {\n //TODO get date\n SimpleDateFormat formatter;\n if (DateUtils.isToday(date.getTime())) {\n formatter = new SimpleDateFormat(\"HH:mm\");\n return formatter.format(date);\n }\n formatter = new SimpleDateFormat(\"MMM dd\");\n return formatter.format(date);\n }", "private static String getDate() {\n Scanner input = new Scanner(System.in);\n\n String monthName = input.next();\n int month = monthNum(monthName);\n int day = input.nextInt();\n String date = \"'2010-\" + month + \"-\" + day + \"'\";\n return date;\n }", "private static String getStamp() {\n\t\t\t return new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\r\n\t\t}", "public String dateAddDaysToCurrentSystemDate(int addDays) throws NumberFormatException, IOException {\n\t\t\t\ttry{\n\t\t\t\t\tlong fingerprint = dateAddDaysToCurrentTimeMilliseconds(addDays);\t\t\t\t\n\t\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"M/dd/yyyy\");\n\t\t\t\t\tfileWriterPrinter(\"\\nCurrent System Date: \" + dateFormat.format(new Date()));\t\t\t\t\n\t\t\t\t\tString dateToSet = dateFormat.format(new Date(fingerprint));\t\t\t\t\t\n\t\t\t\t\tfileWriterPrinter(\"Changed System Date: \" + dateToSet + \"\\n\");\n\t\t\t\t\tRuntime.getRuntime().exec(\"cmd /C date \" + dateToSet); // M/dd/yyyy\n\t\t\t\t\treturn dateToSet;\n\t\t\t\t} catch(Exception e) { fileWriterPrinter(e); return null;}\t\t\t\t\n\t\t\t}", "private static String getDate()\n\t{\n\t\tString dateString = null;\n\t\tDate sysDate = new Date( System.currentTimeMillis() );\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yy HH:mm:ss\");\n\t\tdateString = sdf.format(sysDate);\n\t\treturn dateString;\n\t}", "static void addtoReminder(String j, String date) {\n if (j.equals(\"None\")) {\n } else if (j.equals(\"1 Day Before\")) {\n L.add(new Day(date, 1));\n } else if (j.equals(\"2 Day Before\")) {\n L.add(new Day(date, 2));\n } else if (j.equals(\"3 Day Before\")) {\n L.add(new Day(date, 3));\n } else if (j.equals(\"4 Day Before\")) {\n L.add(new Day(date, 4));\n } else if (j.equals(\"1 Week Before\")) {\n L.add(new Week(date, 1));\n } else if (j.equals(\"2 Week Before\")) {\n L.add(new Week(date, 2));\n } else {\n System.out.println(\"remindera ekleme yapılamadı....\");\n }\n }", "public static void date(int num) {\n String date = \"\";\n // Tests for what day of the week it is by using modulus to allign with a day.\n if (num%7==0) {\n date = \"Saturday\";\n } else if (num%7 == 1) {\n date = \"Sunday\";\n } else if (num%7 == 2) {\n date = \"Monday\";\n } else if (num%7 == 3) {\n date = \"Tuesday\";\n } else if (num%7 == 4) {\n date = \"Wednesday\";\n } else if (num%7 == 5) {\n date = \"Thursday\";\n } else if (num%7 == 6) {\n date = \"Friday\";\n }\n // Prints name of day inputted date falls on.\n System.out.println(\"That day is a \"+date);\n }", "public void setDate(String date){\n this.date = date;\n }", "public void verifyDate(){\n\n // currentDateandTime dataSingleton.getDay().getDate();\n\n }", "private void setCurrentDateOnButton() {\n\t\t\tfinal Calendar c = Calendar.getInstance();\n\t\t\tyear = c.get(Calendar.YEAR);\n\t\t\tmonth = c.get(Calendar.MONTH);\n\t\t\tday = c.get(Calendar.DAY_OF_MONTH);\n\t\t\t//set current date to registration button\n\t\t\tbtnRegDate.setText(new StringBuilder()\n\t\t\t// Month is 0 based, just add 1\n\t\t\t.append(day).append(\"-\").append(month + 1).append(\"-\")\n\t\t\t.append(year));\n\t\t\t//set current date to FCRA registration button\n\t\t\tbtnFcraDate.setText(new StringBuilder()\n\t\t\t// Month is 0 based, just add 1\n\t\t\t.append(day).append(\"-\").append(month + 1).append(\"-\")\n\t\t\t.append(year));\n\t\t}", "String updateDay(String userName, Day day);", "public String ConvertDate(){\r\n//\t\tDate date=JavaUtils.getSystemDate();\r\n//\t DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd\");\r\n\t String pattern = \"yyyy-MM-dd\";\r\n\t SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\r\n\r\n\t String date = simpleDateFormat.format(new Date());\r\n//\t System.out.println(date);\r\n\t \r\n//\t String s = df.format(date);\r\n//\t String result = s;\r\n//\t try {\r\n//\t date=df.parse(result);\r\n//\t } catch (ParseException e) {\r\n//\t // TODO Auto-generated catch block\r\n//\t e.printStackTrace();\r\n//\t }\r\n\t return date;\r\n\t }" ]
[ "0.6569985", "0.6561803", "0.6504817", "0.6485242", "0.64612633", "0.64317846", "0.63582224", "0.6355659", "0.63349277", "0.63272053", "0.6274422", "0.6266108", "0.6248114", "0.62108344", "0.62036955", "0.61810607", "0.61575824", "0.6151184", "0.6113827", "0.61022025", "0.6088474", "0.60682", "0.60577047", "0.6053981", "0.60520136", "0.60380393", "0.60282576", "0.6026792", "0.60197514", "0.6019217", "0.60106033", "0.5993325", "0.5987482", "0.59704447", "0.59674895", "0.59537166", "0.5951671", "0.5950161", "0.59486854", "0.59370345", "0.5928263", "0.591773", "0.5915675", "0.59050363", "0.590192", "0.58999676", "0.5866809", "0.5858631", "0.58510596", "0.58479935", "0.58407915", "0.58305115", "0.580692", "0.5806418", "0.5803213", "0.5785976", "0.5776873", "0.57751805", "0.57739234", "0.57568705", "0.5754934", "0.5729563", "0.5726511", "0.5726375", "0.57255757", "0.5721692", "0.5716315", "0.5708355", "0.56979835", "0.5697058", "0.5691827", "0.56911623", "0.5688406", "0.5686421", "0.56858206", "0.56797063", "0.5678406", "0.56757104", "0.56732273", "0.5673015", "0.5672883", "0.56716317", "0.56699014", "0.5666864", "0.56664735", "0.5665783", "0.56657517", "0.56614643", "0.56562555", "0.5654627", "0.5650719", "0.5650321", "0.56469953", "0.5632869", "0.56319207", "0.56309116", "0.5630901", "0.5629597", "0.56215906", "0.56209135" ]
0.7497931
0
if it is a different date, it will delete previous saved data. If it is the same day, then it will load everything that hs been done by the same user compare: user date
public void verifyDate(){ // currentDateandTime dataSingleton.getDay().getDate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deleteOldData() {\n Date today = SunshineDateUtils.getNormalizedUtcDateForToday();\n weatherDao.deleteOldWeather(today);\n }", "public synchronized static void cleanOldFiles() {\n\t\tGregorianCalendar yesterday = new GregorianCalendar();\n\t\tyesterday.roll(GregorianCalendar.HOUR_OF_DAY,-4);\n\t\tcleanOldFiles(yesterday.getTime());\n\t}", "@Test\n void testDeleteEntriesByDate() {\n jpaTm()\n .transact(\n () -> {\n Spec11ThreatMatchDao.deleteEntriesByDate(jpaTm(), TODAY);\n ImmutableList<Spec11ThreatMatch> persistedToday =\n Spec11ThreatMatchDao.loadEntriesByDate(jpaTm(), TODAY);\n assertThat(persistedToday).isEmpty();\n });\n\n // Verify that all other entries were not removed\n jpaTm()\n .transact(\n () -> {\n ImmutableList<Spec11ThreatMatch> persistedYesterday =\n Spec11ThreatMatchDao.loadEntriesByDate(jpaTm(), YESTERDAY);\n assertThat(persistedYesterday)\n .comparingElementsUsing(immutableObjectCorrespondence(\"id\"))\n .containsExactlyElementsIn(getThreatMatchesYesterday());\n });\n }", "protected void removeOldData() {\n if (!storage.isEmpty()) {\n long timeLowerbound = storage.lastKey() - maxStorageTime;\n while (!storage.isEmpty() && storage.firstKey() < timeLowerbound) {\n storage.pollFirstEntry();\n } \n }\n }", "public void wipeDateFromRealm() {\n nearByPlacesDAO.deleteFromDB();\n }", "@Override\n\tpublic boolean delete(Dates obj) {\n\t\treturn false;\n\t}", "public static void Delete() throws FileNotFoundException{\n System.out.println(\"[S]elected, [A]ll\");\n Scanner deleteEventScanner = new Scanner(System.in);\n String deleteOption = deleteEventScanner.next();\n if(deleteOption.equalsIgnoreCase(\"s\")){\n System.out.println(\"Enter the Date to delete all events scheduled on that date(MM/DD/YYYY\");\n String eventsToDelete = deleteEventScanner.next();\n int monthToDelete= Integer.parseInt(eventsToDelete.substring(0,2));\n int dateToDelete = Integer.parseInt(eventsToDelete.substring(3,5));\n int yearToDelete = Integer.parseInt(eventsToDelete.substring(6));\n delete.set(yearToDelete, monthToDelete-1, dateToDelete);\n for(int i=0;i<events.size();i++){\n if(events.get(i).getMonth()==delete.get(Calendar.MONTH)&&events.get(i).getDate()==delete.get(Calendar.DATE)&&events.get(i).getYear()==delete.get(Calendar.YEAR)){\n events.remove(i);\n }\n }\n \n \n }\n else if(deleteOption.equalsIgnoreCase(\"a\")){\n events.removeAll(events);\n }\n menu();\n }", "private void refreshDBDangerZone(){\n FirebaseDatabase.getInstance().getReference().child(\"Danger Zone Markers\")\n .addListenerForSingleValueEvent(new ValueEventListener() {\n Date currentDate = new Date();\n String currentDateString = currentDate.toString();\n String getCurrentDateSubString = currentDateString.substring(0,10);\n\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n int numberOfMarkers = 0;\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n numberOfMarkers++;\n String markerDate = snapshot.child(\"time\").getValue().toString();\n System.out.println(\"MARKER DATE: \" + markerDate);\n System.out.println(\"CURRENT DATE: \" + getCurrentDateSubString);\n if(numberOfMarkers>1){\n if(!(markerDate.contains(getCurrentDateSubString))) {\n snapshot.getRef().removeValue();\n }\n }\n\n\n }\n\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n }\n });\n }", "void unsetFoundingDate();", "public void removeAllDate() {\r\n\t\tBase.removeAll(this.model, this.getResource(), DATE);\r\n\t}", "public boolean deleteVacationDay(GregorianCalendar date) throws IOException {\r\n\t\t// checking input data\r\n\t\tif (!calendar.existsVacationDay(date))\r\n\t\t\tthrow new IOException(\"La fecha no corresponde a ningun dia vacacional \");\r\n\t\t// making changes\r\n\t\telse {\r\n\t\t\tcalendar.deleteVacationDay(date);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public void verifyData() {\n\n saveDay();\n\n }", "public void deleteFreezed (Timestamp dateCurrent){\r\n try (Connection connection = jdbcUtils.getConnection();){\r\n preparedStatement = connection.prepareStatement(DELETE_FOLLOWERS_BY_END_DATE_SQL);\r\n preparedStatement.setTimestamp(DATE_DELETE_FOLLOWERS_BY_END_DATE_SQL_NUMBER, dateCurrent);\r\n preparedStatement.executeUpdate();\r\n }catch (SQLException ex) {\r\n configLog.init();\r\n logger.info(LOG_SQL_EXCEPTION_MESSAGE + AdminDao.class.getName());\r\n Logger.getLogger(AdminDao.class.getName()).log(Level.SEVERE, null, ex);\r\n throw new RuntimeException();\r\n }\r\n }", "public void checkAndDeleteOldDownloadedFilesAndFolders(String newsPaperDistributorID)\n {\n File newspaperDateFolder = context.get().getFilesDir(); // Base directory\n\n // Check if it actually exist ... and is a directory\n if (newspaperDateFolder.exists() && newspaperDateFolder.isDirectory()) {\n\n // List all folders with date\n File[] localFolderList = newspaperDateFolder.listFiles(); // No sorting needed here, 20190521, 20190522, 20190523\n if(localFolderList != null)\n {\n Calendar oneWeekAgo = Calendar.getInstance();\n oneWeekAgo.add(Calendar.DAY_OF_MONTH, -8); // One week + 1 day (same as server)\n\n // Check all newspaper folders in list (the format is 20190521)\n for(File currentNewspaperFolder : localFolderList)\n {\n String newspaperFolderName = currentNewspaperFolder.getName();\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd\");\n ParsePosition pp = new ParsePosition(0);\n Date folderDate = sdf.parse(newspaperFolderName, pp);\n\n // Only delete newspapers more than one week old\n if (folderDate != null && folderDate.getTime() < oneWeekAgo.getTimeInMillis() )\n {\n String fullFolderPath = context.get().getFilesDir() + \"/\" + newspaperFolderName + \"/\" + newsPaperDistributorID;\n\n // Get the files from directory\n File dir = new File (fullFolderPath);\n\n // Extra check because the newspaper distributor doesn't have to exist here with new folder system\n if (dir.exists())\n {\n File[] filesInDir = dir.listFiles(); // No sorting needed here\n if (filesInDir != null)\n {\n // Loop through all files\n for(File currentFile : filesInDir)\n {\n // Delete the mp3 file in the folder\n deleteFileOrFolder(currentFile, \"/\" + newspaperFolderName + \"/\" + newsPaperDistributorID + \"/\" + currentFile.getName());\n }\n }\n\n // The folder must be empty to delete it, that's why we needed to loop through all files and delete them\n // This is the folder with date, for example \"20180328/01/\"\n if (deleteFileOrFolder(dir, \"/\" + newspaperFolderName + \"/\" + newsPaperDistributorID))\n LogDAO.getInstance().add(\"Deleted old newspaper ID: \" + newsPaperDistributorID + \" from: \" + newspaperFolderName);\n }\n\n // Extra check to see if date folder is empty\n // Get the files from directory\n String path = context.get().getFilesDir() + \"/\" + newspaperFolderName;\n File checkThisFolder = new File (path);\n if (checkThisFolder.exists())\n {\n File[] folders = checkThisFolder.listFiles(); // No sorting needed here\n if (folders != null && folders.length > 0)\n {\n // Do nothing\n // Other newspaper still exist in this date folder\n }\n else\n {\n // Delete the folder\n if (deleteFileOrFolder(checkThisFolder, \"/\" + newspaperFolderName))\n LogDAO.getInstance().add(\"Deleted old empty newspaper: \" + newspaperFolderName);\n }\n }\n }\n }\n }\n }\n }", "private boolean removeOlderThan(long days) {\n boolean action = false;\n long now = System.currentTimeMillis();\n for (LogFile lf : knownFiles) {\n if (olderThan(lf, days, now)) {\n lf.path.delete();\n log.info(\"Deleted: \"+lf.path);\n action = true;\n }\n }\n return action;\n }", "public synchronized static void cleanOldFiles(Date old){\n\t\tfor(File item:context.getCacheDir().listFiles()){\n\t\t\tDate last = new Date(item.lastModified());\n\t\t\tif(last.before(old))\n\t\t\t\titem.delete();\n\t\t}\n\t}", "private void getData(int day){\n try {\n String today = DateUtilities.getCurrentDateInString();\n DateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date currentDate = dateFormat.parse(today);\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(currentDate);\n calendar.add(Calendar.DAY_OF_YEAR,-day);\n Date datebefore = calendar.getTime();\n String dateBeforeStr = dateFormat.format(datebefore);\n\n stepsTakenModels = db.stepsTakenDao().getStepsTakenInrange(dateBeforeStr,today);\n// stepsTakenModels.addAll(db.stepsTakenDao().getStepsTakenInrange(\"01-10-2019\",today));\n\n for(int i = 0 ; i < 7 ; i++){\n stepsTakenModelsLastWeek.add(stepsTakenModels.get(i));\n }\n\n for(int i = 7 ; i<stepsTakenModels.size() ; i++){\n stepsTakenModelsThisWeek.add(stepsTakenModels.get(i));\n }\n// if(stepsTakenModelsThisWeek.size()==0){\n// StepsTakenModel stepsTakenModel = new StepsTakenModel();\n// stepsTakenModel.setSteps(659);\n// stepsTakenModel.setDate(today);\n// stepsTakenModelsThisWeek.add(stepsTakenModel);\n// }\n\n }catch (Exception e){\n Log.d(\"TAG\",e.getMessage());\n }\n }", "private ArrayList<Task> filterByDate(ArrayList<Task> toFilter, Date date) {\n ArrayList<Integer> toDelete = new ArrayList<Integer>();\n Calendar calAim = Calendar.getInstance();\n Calendar calTest = Calendar.getInstance();\n calAim.setTime(date);\n\n //remove all on different dates\n for (int i = 0; i < toFilter.size(); i++) {\n if (toFilter.get(i).getClass().equals(Deadline.class)) {\n Deadline temp = (Deadline) toFilter.get(i);\n calTest.setTime(temp.getTime());\n } else if (toFilter.get(i).getClass().equals(Event.class)) {\n Event temp = (Event) toFilter.get(i);\n calTest.setTime(temp.getTime());\n } else if (toFilter.get(i).getClass().equals(Period.class)) {\n Period temp = (Period) toFilter.get(i);\n calTest.setTime(temp.getStart());\n }\n boolean sameDay = calAim.get(Calendar.DAY_OF_YEAR) == calTest.get(Calendar.DAY_OF_YEAR)\n && calAim.get(Calendar.YEAR) == calTest.get(Calendar.YEAR);\n if (!sameDay) {\n toDelete.add(i);\n }\n }\n\n for (int i = toDelete.size() - 1; i >= 0; ) {\n toFilter.remove((int) toDelete.get(i));\n i--;\n }\n return toFilter;\n }", "private void removeExistingMeasurementsFromCurrentDate(Treatment treatment, Vital vitalToSync) {\n logger.info(String.format(CLEANING_EXISTING_MEASUREMENTS_FOR_TODAY_S, getCurrentDate()));\n final VitalsSynchronization vitalsSynchronization = getVitalsSynchronization(treatment);\n final VitalMeasurement vitalMeasurement = getVitalMeasurement(vitalToSync, vitalsSynchronization);\n if (vitalMeasurement.getMeasurements() != null && !vitalMeasurement.getMeasurements().isEmpty()) {\n final List<Measurement> measurementsFromCurrentDate = vitalMeasurement.getMeasurements().stream().filter(measurement -> measurement.getDate().compareTo(getCurrentDate()) == 0).collect(Collectors.toList());\n for (Measurement measurementToDelete : measurementsFromCurrentDate) {\n logger.info(String.format(REMOVING_MEASUREMENT_S, measurementToDelete.toString()));\n vitalMeasurement.getMeasurements().remove(measurementToDelete);\n }\n }\n }", "@Override\n public synchronized boolean clearExpired(Date date) {\n return false;\n }", "public static void delete() {\n\t\tSystem.out.println(\"Do you want to delete events on a [S]elected date or [A]ll events?\");\n\t\tScanner sc = new Scanner(System.in);\n\t\tString input = \"\";\n\t\tif (sc.hasNextLine()) {\n\t\t\tinput = sc.nextLine().toLowerCase();\n\t\t\tif (input.equals(\"s\")) {\n\t\t\t\tSystem.out.println(\"s\");\n\t\t\t\tSystem.out.println(\"What day do you want to delete the events on? In MM/DD/YYYY\");\n\t\t\t\tString date = sc.nextLine();\n\t\t\t\tint month = Integer.parseInt(date.substring(0, 2));\n\t\t\t\tint day = Integer.parseInt(date.substring(3, 5));\n\t\t\t\tint year = Integer.parseInt(date.substring(6, 10));\n\t\t\t\tGregorianCalendar toDelete = new GregorianCalendar(year, month, day);\n\t\t\t\tcalendarToEvent.remove(toDelete);\n\t\t\t\tquit(); //to save the new treemap to the events.txt\n\t\t\t\tSystem.out.println(\"Removed\");\n\t\t\t} else if (input.equals(\"a\")) {\n\t\t\t\tSystem.out.println(\"a\");\n\t\t\t\tSystem.out.println(\"Deleting all events\");\n\t\t\t\tcalendarToEvent = new TreeMap<Calendar, TreeSet<Event>>();\n\t\t\t}\n\t\t}\n\t}", "private void fillOldData() {\n String username = currUser.getEmail().split(\"@\")[0];\n mDatabase.child(\"users\").child(username).get()\n .addOnCompleteListener(new OnCompleteListener<DataSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DataSnapshot> task) {\n if (!task.isSuccessful()) {\n Toast.makeText(VaccineDetailsActivity.this, \"Error fetching data\" + task.getException()\n .getMessage(), Toast.LENGTH_SHORT)\n .show();\n Log.e(\"firebase\", \"Error getting data\", task.getException());\n } else {\n Log.d(\"firebase\", String.valueOf(task.getResult().getValue()));\n try {\n user = task.getResult().getValue(User.class);\n if (user.getVaccinationDate1() != null) {\n dosesArrayAdapter.remove(\"1\");\n dosesArrayAdapter.add(\"2\");\n doseDropdown.setAdapter(dosesArrayAdapter);\n }\n } catch (Exception e) {\n Toast.makeText(VaccineDetailsActivity.this, \"Fetching old data failed\" + e.getMessage(), Toast.LENGTH_SHORT)\n .show();\n }\n }\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 }", "public boolean DeleteDate(TimePeriod tp)\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\t\n\t\t\tString query = \"DELETE FROM Available WHERE available_hid = '\"+hid+\"' AND startDate = '\"+tp.stringStart+\"'\"\n\t\t\t\t\t+ \" AND endDate = '\"+tp.stringEnd+\"'\"; \n\t\t\tint result = con.stmt.executeUpdate(query); \t\n\t\t\t\n\t\t\tif(result > 0)\n\t\t\t{\n\t\t\t\tint index = -1; \n\t\t\t\tSystem.out.println(openDates.size()); \n\t\t\t\tfor(int k = 0; k < openDates.size(); k++)\n\t\t\t\t{\t\t\n\t\t\t\t\tif(openDates.get(k).stringStart.equals(tp.stringStart) && openDates.get(k).stringEnd.equals(tp.stringEnd))\n\t\t\t\t\t{\n\t\t\t\t\t\tindex = k; \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\topenDates.remove(index); \n\t\t\t\t\n\t\t\t\tcon.closeConnection();\n\t\t\t\treturn true; \n\t\t\t}\n\t\t\tcon.closeConnection(); \n\t\t\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn false; \n\t}", "public void updateResult(){\n String lastUpdateDate = User.getLastUpdateDate(getApplicationContext());\n CheckListResultDBHelper dbHelper = new CheckListResultDBHelper(this);\n dbHelper.getReadableDatabase();\n int cnt = User.getCurrentCheckListCount(getApplicationContext());\n Log.d(\"TEST\", \"start date : \" + User.getStartDate(getApplicationContext()));\n Log.d(\"TEST\", \"last update date : \" + lastUpdateDate + \", cnt : \" + cnt);\n dbHelper.close();\n\n if(!lastUpdateDate.equals(\"\") && cnt > 0 && !lastUpdateDate.equals(nowDate)){\n ArrayList<String> list = User.getBetweenDate(lastUpdateDate, nowDate);\n save(list, null, null);\n }\n }", "public void resetRepositoryDefaultData() {\n\t\trepository.deleteAll();\n\t\tList<Temper> tempers = new ArrayList<Temper>();\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-01T11:30:00\"), 25.4F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-07-31T04:13:00\"), 9.8F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-07-31T09:09:00\"), 16.8F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-03T05:15:00\"), 5.0F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-04T08:00:00\"), 15.0F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-13T12:00:00\"), 25.0F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-13T12:00:01\"), 25.01F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-15T13:20:00\"), 17F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-25T12:00:00\"), 17F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-27T11:30:00\"), 35F));\n\t\trepository.saveAll(tempers);\n\t}", "private void procurarData() {\n if (jDateIni.getDate() != null && jDateFim.getDate() != null) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n String data = sdf.format(jDateIni.getDate());\n String data2 = sdf.format(jDateFim.getDate());\n carregaTable(id, data, data2);\n JBreg.setEnabled(false);\n }\n }", "private void removeOutOfDateData(List<DetailedData> detailedDatas)\n {\n for (Iterator<DetailedData> it = detailedDatas.iterator(); it.hasNext();)\n {\n DetailedData data = it.next();\n if (TuvState.OUT_OF_DATE.getName().equalsIgnoreCase(data.getState()))\n {\n it.remove();\n }\n }\n }", "public void clean() {\n Long now = System.currentTimeMillis();\n for (Iterator<Long> iterator = this.deleted.iterator(); iterator.hasNext();) {\n Long l = iterator.next();\n if (l < now) {\n iterator.remove();\n }\n }\n }", "private void cleanSweep(){\n // Corrects the reminder dates for those reminders which will be repeating.\n refreshAllRepeatReminderDates();\n\n // Starts removing expired reminders.\n Calendar timeRightNow = Calendar.getInstance();\n boolean cleanList;\n for (int outerCounter=0; outerCounter<reminderItems.size();outerCounter++) {\n cleanList=true;\n for (int counter = 0; counter < reminderItems.size(); counter++) {\n int year = reminderItems.get(counter).getReminderYear();\n int month = reminderItems.get(counter).getReminderMonth();\n int day = reminderItems.get(counter).getReminderDay();\n int hour = reminderItems.get(counter).getReminderHour();\n int minute = reminderItems.get(counter).getReminderMinute();\n int second = 0;\n\n Calendar timeOfDeletion = Calendar.getInstance();\n timeOfDeletion.set(year, month, day, hour, minute, second);\n\n if (timeOfDeletion.before(timeRightNow)) {\n deleteReminderItem(counter);\n cleanList=false;\n break;\n }\n }\n if(cleanList){\n break;\n }\n }\n\n // Refreshes the reminder date descriptions (correcting \"Today\" and \"Tomorrow\" depending on the date).\n refreshAllDateDescriptions();\n }", "@SuppressWarnings(\"static-method\")\n protected int deleteEventsBefore(final SQLiteDatabase db, final String dayString) {\n final String whereClause = \"date < ?\";\n final String[] whereArgs = new String[] {dayString};\n int numEventsDeleted = 0;\n db.beginTransaction();\n try {\n numEventsDeleted += db.delete(\"events_integer\", whereClause, whereArgs);\n numEventsDeleted += db.delete(\"events_textual\", whereClause, whereArgs);\n db.setTransactionSuccessful();\n } finally {\n db.endTransaction();\n }\n return numEventsDeleted;\n }", "private void deleteSourceUserHistory(String userId, String month, boolean isPending, String tombolaId) {\n tombolaAerospikeDao.deleteUserTombola(userId, tombolaId);\n\n // delete source user history list\n if (isPending) {\n tombolaAerospikeDao.deleteUserTombolaHistoryItemFromPending(userId, tombolaId);\n } else {\n tombolaAerospikeDao.deleteUserTombolaHistoryItemFromMonth(userId, tombolaId, month);\n }\n }", "public void k() {\n List findAll = DataSupport.findAll(CateListCache.class, new long[0]);\n final String str = \"\";\n if (com.e23.ajn.d.e.b(findAll)) {\n str = ((CateListCache) findAll.get(0)).getUpdatetime();\n }\n DataSupport.deleteAllAsync(CateListCache.class, new String[0]).listen(new UpdateOrDeleteCallback() {\n public void onFinish(int i) {\n new Handler().postDelayed(new Runnable() {\n public void run() {\n CateListCache cateListCache = new CateListCache();\n cateListCache.setUpdatetime(str);\n for (CateBean cateBean : ProgramManagementFragment.this.n) {\n cateBean.clearSavedState();\n cateBean.save();\n cateListCache.getList().add(cateBean);\n }\n for (CateBean cateBean2 : ProgramManagementFragment.this.o) {\n cateBean2.clearSavedState();\n cateBean2.save();\n cateListCache.getList().add(cateBean2);\n }\n cateListCache.save();\n }\n }, 1000);\n }\n });\n }", "public static void deleteWaitlistEntry(String name, Date date) {\r\n con = DBConnection.getConnection();\r\n try {\r\n PreparedStatement delete = con.prepareStatement(\"DELETE from Waitlist where Faculty = ? and DATE = ?\");\r\n delete.setString(1, name);\r\n delete.setDate(2, date);\r\n delete.executeUpdate();\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void checkOutAttendance(Date d, String staffID) {\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date date = Calendar.getInstance().getTime();\n Timestamp ts = new Timestamp(date.getTime());\n AttendanceRecord ar = new AttendanceRecord();\n\n for(AttendanceRecord a:arDao.findByStaff(sDao.findByStaffId(staffID).get(0)) ){\n if(df.format(a.getDate()).equals(df.format(d)) ){\n ar = a;\n }\n }\n\n ar.setCheckOutTime(ts);\n arDao.save(ar);\n }", "public void removeDuplicates(){ //takes 1st thing, compares to rest, if id match, check date, swap if needed then delete second item\n Map<Long, Long> sensorIdToDateTime = new HashMap<>();\n for (int i = 0; i < sensorList.size(); i++) {\n long sensorId = sensorList.get(i).getSensor_ID();\n long dateTime = sensorList.get(i).getDate_Time();\n if (sensorIdToDateTime.containsKey(sensorId)) {\n if (dateTime > sensorIdToDateTime.get(sensorId)) {\n sensorIdToDateTime.put(sensorId, dateTime);\n }\n }\n else {\n sensorIdToDateTime.put(sensorId, dateTime);\n }\n }\n for (Iterator<SensorResponse> iterator = filteredList.iterator(); iterator.hasNext();) {\n SensorResponse x = iterator.next();\n long sensorId = x.getSensor_ID();\n long dateTime = x.getDate_Time();\n if (sensorIdToDateTime.containsKey(sensorId) && dateTime != sensorIdToDateTime.get(sensorId)) {\n iterator.remove();\n }\n }\n\n notifyDataSetChanged();\n }", "@Override\n\t\tpublic boolean clearExpired(Date date) {\n\t\t\treturn false;\n\t\t}", "public boolean deleteIfTooOld(Date today){\n if(today != null && today.after(Utils.dateFromString(timeoutDateString_))){\n DBUtility.get().deletePost(key_);\n return true;\n }\n return false;\n }", "int deleteByBefore(@Param(\"time\") Date time);", "public void clearDateALR() {\r\n\t\t//System.out.println(\"Clear= \" + counter);\r\n\t\twhile (historyDate.size() != counter) {\r\n\t\t\thistoryDate.removeLast();\r\n\t\t\thistoryAL.removeLast();\r\n\t\t}\r\n\t}", "@Override\n public void removeCheckInDates() {\n\n List<String> theDatesToRemove = new ArrayList<>(checkInTimeList.getSelectedValuesList());\n DefaultListModel theModel = (DefaultListModel)checkInTimeList.getModel();\n \n //Remote the dates\n for( String aStr : theDatesToRemove )\n theModel.removeElement(aStr); \n \n }", "public void deleteOldAlarms(){\r\n\t\tfor(int i = 0; i < alarmList.size(); i++){\r\n\t\t\tAlarmTime current = alarmList.get(i);\r\n\t\t\tif(current.getYear() == cal.get(Calendar.YEAR) && current.getMonth() == cal.get(Calendar.MONTH)\r\n\t\t\t\t\t&& current.getDay() == cal.get(Calendar.DAY_OF_MONTH) && current.getHour() < cal.get(Calendar.HOUR_OF_DAY)){\r\n\t\t\t\t//delete alarm from XML\r\n\t\t\t\txmanager.delete(current.toString());\r\n\t\t\t}\r\n\t\t\telse if(current.getYear() == cal.get(Calendar.YEAR) && current.getMonth() == cal.get(Calendar.MONTH)\r\n\t\t\t\t\t&& current.getDay() < cal.get(Calendar.DAY_OF_MONTH)){\r\n\t\t\t\t//delete alarm from XML\r\n\t\t\t\txmanager.delete(current.toString());\r\n\t\t\t}\r\n\t\t\telse if(current.getYear() == cal.get(Calendar.YEAR) && current.getMonth() < cal.get(Calendar.MONTH)){\r\n\t\t\t\t//delete alarm from XML\r\n\t\t\t\txmanager.delete(current.toString());\r\n\t\t\t}\r\n\t\t\telse if(current.getYear() < cal.get(Calendar.YEAR)){\r\n\t\t\t\t//delete alarm from XML\r\n\t\t\t\txmanager.delete(current.toString());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void deleteEntryFromCheckinsMinor3() throws PersistenceException, ParseException {\n\t\tDate date;\n\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tCalendar calendar;\n\t\tString[] dates = new String[]{\t\"2011-01-01\", \"2011-01-02\", \"2011-01-03\", \"2011-01-04\",\n\t\t \t\"2011-01-05\", \"2011-01-06\", \"2011-01-07\", \"2011-01-08\",\n\t\t \t\"2011-01-09\", \"2011-01-10\", \"2011-01-11\", \"2011-01-12\",\n\t\t \t\"2011-01-13\", \"2011-01-14\", \"2011-01-15\", \"2011-01-16\",\n\t\t \t\"2011-01-17\", \"2011-01-18\", \"2011-01-19\", \"2011-01-20\",\n\t\t\t \"2011-01-21\", \"2011-01-22\", \"2011-01-23\", \"2011-01-24\",\n\t\t\t \"2011-01-25\", \"2011-01-26\", \"2011-01-27\", \"2011-01-28\",\n\t\t\t \"2011-01-29\", \"2011-01-30\", \"2011-01-31\",\n\t\t\t \"2011-02-01\", \"2011-02-02\", \"2011-02-03\", \"2011-02-04\",\n\t\t\t \"2011-02-05\", \"2011-02-06\", \"2011-02-07\", \"2011-02-08\",\n\t\t\t \"2011-02-09\", \"2011-02-10\", \"2011-02-11\", \"2011-02-12\",\n\t\t\t \"2011-02-13\", \"2011-02-14\", \"2011-02-15\", \"2011-02-16\",\n\t\t\t \"2011-02-17\", \"2011-02-18\", \"2011-02-19\", \"2011-02-20\",\n\t\t\t \"2011-02-21\", \"2011-02-22\", \"2011-02-23\", \"2011-02-24\",\n\t\t\t \"2011-02-28\",\n\t\t\t \"2011-03-01\", \"2011-03-02\", \"2011-03-03\", \"2011-03-04\",\n\t\t\t \"2011-03-05\", \"2011-03-06\", \"2011-03-07\", \"2011-03-08\",\n\t\t\t \"2011-03-09\", \"2011-03-10\", \"2011-03-11\", \"2011-03-12\",\n\t\t\t \"2011-03-13\", \"2011-03-14\", \"2011-03-15\", \"2011-03-16\",\n\t\t\t \"2011-03-17\", \"2011-03-18\", \"2011-03-19\", \"2011-03-20\",\n\t\t\t \"2011-03-21\", \"2011-03-22\", \"2011-03-23\", \"2011-03-24\",\n\t\t\t \"2011-03-25\", \"2011-03-26\", \"2011-03-27\", \"2011-03-28\",\n\t\t\t \"2011-03-29\", \"2011-03-30\", \"2011-03-31\",\n\t\t\t \"2011-04-01\", \"2011-04-02\", \"2011-04-03\", \"2011-04-04\",\n\t\t\t \"2011-04-05\", \"2011-04-06\", \"2011-04-07\", \"2011-04-08\",\n\t\t\t \"2011-04-09\", \"2011-04-10\", \"2011-04-11\", \"2011-04-12\",\n\t\t\t \"2011-04-13\", \"2011-04-14\", \"2011-04-15\", \"2011-04-16\",\n\t\t\t \"2011-04-17\", \"2011-04-18\", \"2011-04-19\", \"2011-04-20\",\n\t\t\t \"2011-04-21\", \"2011-04-22\", \"2011-04-23\", \"2011-04-24\",\n\t\t\t \"2011-04-25\", \"2011-04-26\", \"2011-04-27\", \"2011-04-28\",\n\t\t\t \"2011-04-29\", \"2011-04-30\",\n\t\t\t \"2011-05-01\", \"2011-05-02\", \"2011-05-03\", \"2011-05-04\",\n\t\t\t \"2011-05-05\", \"2011-05-06\", \"2011-05-07\", \"2011-05-08\",\n\t\t\t \"2011-05-09\", \"2011-05-10\", \"2011-05-11\", \"2011-05-12\",\n\t\t\t \"2011-05-13\", \"2011-05-14\", \"2011-05-15\", \"2011-05-16\",\n\t\t\t \"2011-05-17\", \"2011-05-18\", \"2011-05-19\", \"2011-05-20\",\n\t\t\t \"2011-05-21\", \"2011-05-22\", \"2011-05-23\", \"2011-05-24\",\n\t\t\t \"2011-05-25\", \"2011-05-26\", \"2011-05-27\", \"2011-05-28\",\n\t\t\t \"2011-05-29\", \"2011-05-30\", \"2011-05-31\",\n\t\t\t \"2011-06-01\", \"2011-06-02\", \"2011-06-03\", \"2011-06-04\",\n\t\t\t \"2011-06-05\", \"2011-06-06\", \"2011-06-07\", \"2011-06-08\",\n\t\t\t \"2011-06-09\", \"2011-06-10\", \"2011-06-11\", \"2011-06-12\",\n\t\t\t \"2011-06-13\", \"2011-06-14\", \"2011-06-15\", \"2011-06-16\",\n\t\t\t \"2011-06-17\", \"2011-06-18\", \"2011-06-19\", \"2011-06-20\",\n\t\t\t \"2011-06-21\", \"2011-06-22\", \"2011-06-23\", \"2011-06-24\",\n\t\t\t \"2011-06-25\", \"2011-06-26\", \"2011-06-27\", \"2011-06-28\",\n\t\t\t \"2011-06-29\", \"2011-06-30\",\n\t\t\t \"2011-07-01\", \"2011-07-02\", \"2011-07-03\", \"2011-07-04\",\n\t\t\t \"2011-07-05\", \"2011-07-06\", \"2011-07-07\", \"2011-07-08\",\n\t\t\t \"2011-07-09\", \"2011-07-10\", \"2011-07-11\", \"2011-07-12\",\n\t\t\t \"2011-07-13\", \"2011-07-14\", \"2011-07-15\", \"2011-07-16\",\n\t\t\t \"2011-07-17\", \"2011-07-18\", \"2011-07-19\", \"2011-07-20\",\n\t\t\t \"2011-07-21\", \"2011-07-22\", \"2011-07-23\", \"2011-07-24\",\n\t\t\t \"2011-07-25\", \"2011-07-26\", \"2011-07-27\", \"2011-07-28\",\n\t\t\t \"2011-07-29\", \"2011-07-30\", \"2011-07-31\" };\n\t\tDataSource datasource = new DataSource();\n\t\tConnection connection = null;\n\t\tPreparedStatement statement = null;\t\t\n\t\tResultSet result = null;\n\t\ttry {\n\t\t\tconnection = datasource.getConnection();\n\t\t\tfor (String s: dates) {\n\t\t\t\tcalendar = new GregorianCalendar();\n\t\t\t\tSystem.out.print(\"Inizio: \" + calendar.get(Calendar.HOUR) + \":\" + calendar.get(Calendar.MINUTE) + \" -- s=\" + s);\n\t\t\t\tString query =\t\"select user_id \" +\n\t\t\t\t\t\t\t\t\"from \" +\n\t\t\t\t\t\t\t\t\t\"(select user_id, count(date) \" +\n\t\t\t\t\t\t\t\t\t\"from \" +\n\t\t\t\t\t\t\t\t\t\t\"(select user_id, date(date) \" +\n\t\t\t\t\t\t\t\t\t\t\"from checkins_filtered \" +\n\t\t\t\t\t\t\t\t\t\t\"where date(date) = ? \" +\n\t\t\t\t\t\t\t\t\t\t\"order by user_id) as A \" +\n\t\t\t\t\t\t\t\t\t\"group by user_id) as B \" +\n\t\t\t\t\t\t\t\t\"where count < 3\";\n\t\t\t\tstatement = connection.prepareStatement(query);\n\t\t\t\tdate = df.parse(s);\n\t\t\t\tstatement.setTimestamp(1, new java.sql.Timestamp(date.getTime()));\t\t\n\t\t\t\tresult = statement.executeQuery();\n\t\t\t\t\n\t\t\t\tString delete = \"delete from checkins_filtered where user_id = ? and date(date) = ?\";\n\t\t\t\twhile (result.next()) {\n\t\t\t\t\tstatement = connection.prepareStatement(delete);\n\t\t\t\t\tstatement.setInt(1, result.getInt(\"user_id\"));\n\t\t\t\t\tstatement.setTimestamp(2, new java.sql.Timestamp(date.getTime()));\n\t\t\t\t\tstatement.executeUpdate();\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcalendar = new GregorianCalendar();\n\t\t\t\tSystem.out.print(\" -- Fine: \" + calendar.get(Calendar.HOUR) + \":\" + calendar.get(Calendar.MINUTE));\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println();\n\t\t\t}\t\t\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t\tthrow new PersistenceException(e.getMessage());\n\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (result != null)\n\t\t\t\t\t\tresult.close();\n\t\t\t\t\tif (statement != null) \n\t\t\t\t\t\tstatement.close();\n\t\t\t\t\tif (connection!= null)\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tthrow new PersistenceException(e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t}", "public void removeByTodoDateTime(Date todoDateTime);", "public static void purgeExpired()\n {\n Date now = new Date();\n List<DealWatchRecord> allRecords = getAllRecords(null);\n for (int i = 0; i < allRecords.size(); i++)\n {\n DealWatchRecord record = allRecords.get(i);\n if (record != null && record.expiration != null)\n {\n if (record.expiration.getTime() < now.getTime())\n {\n record.delete();\n }\n }\n }\n }", "private void removeOlderGigs() {\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tint currentHr = cal.get(Calendar.HOUR_OF_DAY);\r\n\t\t\r\n\t\tif ((currentHr >= 0 && currentHr <= 7)) {\r\n\t\t\t//Log.d(TAG, \"deleting older gigs\");\r\n\t\t\tmGigsDbHelper.deleteOlderGigs();\r\n\t\t}\r\n\t\t\r\n\t}", "private void loadDays(){\n MyDBHandler db = new MyDBHandler(this);\n dayOfTheWeek.clear();\n dayOfTheWeek.addAll(db.getDaysOfTheWeek());\n }", "public Void doInBackground(Long... params) {\n if (InfoMainTestFragment.this.dateEnought) {\n if (InfoMainTestFragment.this.sportsInfos.size() > 60) {\n InfoMainTestFragment.this.dbUtil.deleteDate(((SportsInfo) InfoMainTestFragment.this.sportsInfos.get(0)).getId());\n long startTime = ((SportsInfo) InfoMainTestFragment.this.sportsInfos.get(0)).getStartTime();\n long getTime = ((SportsInfo) InfoMainTestFragment.this.sportsInfos.get(0)).getGetTime();\n InfoMainTestFragment.this.dbUtil.deleteHVSDate(startTime, getTime);\n InfoMainTestFragment.this.dbUtil.deletePaceDate(startTime, getTime);\n InfoMainTestFragment.this.dbUtil.deleteTraceDate(startTime, getTime);\n }\n InfoMainTestFragment.this.saveDate();\n } else {\n long currenttime = InfoMainTestFragment.this.getCurrentTime();\n if (InfoMainTestFragment.this.HVSStartTime != 0) {\n InfoMainTestFragment.this.dbUtil.deleteHVSDate(InfoMainTestFragment.this.HVSStartTime, currenttime);\n }\n if (InfoMainTestFragment.this.paceStartTime != 0) {\n InfoMainTestFragment.this.dbUtil.deletePaceDate(InfoMainTestFragment.this.paceStartTime, currenttime);\n }\n if (InfoMainTestFragment.this.locationStartTime != 0) {\n InfoMainTestFragment.this.dbUtil.deleteTraceDate(InfoMainTestFragment.this.locationStartTime, currenttime);\n }\n }\n return null;\n }", "private void fillUserDaily() throws Exception {\n Db db = getDb();\n try {\n db.enter();\n String sqlSelect = \"SELECT COUNT(*), SUM(volume_s_to_c), date(datetime), u.t_user_id, site_id, type, mime_type, auth, request_statuscode, COALESCE(a.t_http_agent_id, 0) FROM t_http_log_data l LEFT JOIN http.t_http_agent a ON (a.agent_name = l.user_agent AND ((a.version IS NULL AND l.agent_version IS NULL) OR a.version = l.agent_version)) INNER JOIN http.t_user u ON u.user_name = username WHERE NOT l.intranet GROUP BY date(datetime), u.t_user_id, site_id, type, mime_type, site_name, auth, request_statuscode, a.t_http_agent_id\";\n String sqlInsert = \"INSERT INTO http.t_user_daily (occurences, volume, calc_day, t_user_id, t_domain_site_id, trafic_type, mime_type_id, t_authorization_id, request_statuscode, t_http_agent_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n String sqlUpdate = \"UPDATE http.t_user_daily SET occurences = occurences + ?, volume = volume + ? WHERE calc_day = ? AND t_user_id = ? AND t_domain_site_id = ? AND trafic_type = ? AND mime_type_id = ? AND t_authorization_id = ? AND request_statuscode = ? AND t_http_agent_id = ?\";\n PreparedStatement pstSelect = db.prepareStatement(sqlSelect);\n PreparedStatement pstInsert = db.prepareStatement(sqlInsert);\n PreparedStatement pstUpdate = db.prepareStatement(sqlUpdate);\n ResultSet rs = db.executeQuery(pstSelect);\n if (rs.next()) {\n do {\n Integer mimeId = mime.getMimeTypeId(rs.getString(7));\n pstUpdate.setInt(1, rs.getInt(1));\n pstUpdate.setLong(2, rs.getLong(2));\n pstUpdate.setDate(3, rs.getDate(3));\n pstUpdate.setInt(4, rs.getInt(4));\n pstUpdate.setInt(5, rs.getInt(5));\n pstUpdate.setInt(6, rs.getInt(6));\n pstUpdate.setObject(7, mimeId);\n pstUpdate.setInt(8, rs.getInt(8));\n pstUpdate.setInt(9, rs.getInt(9));\n pstUpdate.setInt(10, rs.getInt(10));\n if (db.executeUpdate(pstUpdate) == 0) {\n pstInsert.setInt(1, rs.getInt(1));\n pstInsert.setLong(2, rs.getLong(2));\n pstInsert.setDate(3, rs.getDate(3));\n pstInsert.setInt(4, rs.getInt(4));\n pstInsert.setInt(5, rs.getInt(5));\n pstInsert.setInt(6, rs.getInt(6));\n pstInsert.setObject(7, mimeId);\n pstInsert.setInt(8, rs.getInt(8));\n pstInsert.setInt(9, rs.getInt(9));\n pstInsert.setInt(10, rs.getInt(10));\n db.executeUpdate(pstInsert);\n }\n } while (rs.next());\n } else {\n _logger.debug(\"No user daily to insert\");\n }\n } finally {\n db.exit();\n }\n }", "private void swapAndLoadData() {\n\n \tLog.d(Constants.TAG, \"EntryListActivity: swapAndLoadData: update last loaded data date\");\n \tSharedPreferences settings = getSharedPreferences(Preferences.PREFS_NAME, 0);\n\t\tSharedPreferences.Editor editor = settings.edit();\n\t editor.putLong(Preferences.PREF_KEY_LAST_LOADED_DATA_DATE, this.lastRefreshSuccessDate);\n\t editor.commit();\n\n\t\tLog.d(Constants.TAG, \"EntryListActivity: swapAndLoadData: swap data\");\n\t\t// TODO JGU #1: swap in background or UI thread\n\t\tLoadNewDataTask loadNewDataTask = new LoadNewDataTask(this);\n\t\tloadNewDataTask.execute();\n//\t\texecuteSwapping();\n\t\t///JGU #1\n\t}", "public synchronized void updateTransdailyData() {\n Instant startTime = Instant.now();\n log.debug(\"start updateTransdailyData startTime:{}\", startTime.toEpochMilli());\n try {\n\n // query all group statistical info\n List<StatisticalGroupTransInfo> groupStatisticalList = groupService\n .queryLatestStatisticalTrans();\n\n // traverse group list\n traverseNetList(groupStatisticalList);\n\n } catch (Exception ex) {\n log.error(\"fail updateTransdailyData\", ex);\n }\n log.debug(\"end updateTransdailyData useTime:{}\",\n Duration.between(startTime, Instant.now()).toMillis());\n }", "private void loadDataFromFile() {\n boolean isLoggedInNew = na.isLoggedIn();\n boolean isLoggedIn = uL.isLoggedIn();\n // load data for new users after sucsessful new account creation\n if (isLoggedInNew) {\n String username = na.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n Object[] lines = br.lines().toArray();\n for (int i = 0; i < lines.length; i++) {\n String[] row = lines[i].toString().split(\"\\t\");\n model.addRow(row);\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n // load data for existing users after sucsessful login\n if (isLoggedIn) {\n String username = uL.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n Object[] lines = br.lines().toArray();\n for (int i = 0; i < lines.length; i++) {\n String[] row = lines[i].toString().split(\"\\t\");\n model.addRow(row);\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public void trierListeCrudDateCroissante(){\r\n\t\tint i,j;\r\n\t\tObject [] tmp = new Object [6];\r\n\t\t\r\n\t\tif (listeRdvCrud.size()>1){\r\n\t\t\tfor (i = 0; i< listeRdvCrud.size(); i++){\r\n\t\t\t\tfor (j = 0; j< listeRdvCrud.size(); j++){\r\n\t\t\t\t\ttmp = listeRdvCrud.get(i);\r\n\t\t\t\t\tif(compareDate(listeRdvCrud.get(j)[0].toString(),listeRdvCrud.get(j)[1].toString(),\r\n\t\t\t\t\ttmp[0].toString(),tmp[1].toString()) > 0){\r\n\t\t\t\t\t\tlisteRdvCrud.set(i, listeRdvCrud.get(j));\r\n\t\t\t\t\t\tlisteRdvCrud.set(j, tmp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public final void removeUnCompletedDoanload() {\n if (mUpdateInfo != null && mUpdateInfo.downId != -1) {\n if (mUpdateInfo.downId != -1) {\n Cursor c = null;\n try {\n c = mJDownloadManager.queryTask(mUpdateInfo.downId);\n if (c != null && c.moveToFirst()) {\n int status = c.getInt(JDownloadTaskColumnIndex.STATUS);\n if (TvApplication.DEBUG_LOG) {\n JLog.d(TAG, \"check delete task or not status=\" + status);\n }\n if (status != JDownloadManager.STATUS_SUCCESSFUL) {\n if (TvApplication.DEBUG_LOG) {\n JLog.d(TAG, \"removeDoanload \" + mUpdateInfo.downId);\n }\n mJDownloadManager.remove(mUpdateInfo.downId);\n }\n }\n } finally {\n if (c != null) {\n c.close();\n }\n }\n }\n }\n }", "private boolean isSeedsInfoUpdated(String tDate){\n \treturn mSharedPref.getBoolean(tDate,false); \t\n }", "public void tempcheck(){\r\n \t//clear last data\r\n if(workplace!=null){\r\n \tFile temp = new File(workplace +\"/temp\");\r\n \tif(temp.exists()){\r\n \t\tFile[] dels = temp.listFiles();\r\n \t\tif(dels[0]!=null){\r\n \t\t\tfor(int i=0; i<dels.length; i++){\r\n \t\t\t\tif(dels[i].isFile()){\r\n \t\t\t\t\tdels[i].delete();\r\n \t\t\t\t}else{\r\n \t\t\t\t\tFile[] delss = dels[i].listFiles();\r\n \t\t\t\t\tif(delss[0]!=null){\r\n \t\t\t\t\t\tfor(int k=0; k<delss.length; k++){\r\n \t\t\t\t\t\t\tdelss[k].delete();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t\tdels[i].delete();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \ttemp.delete();\r\n }\r\n }", "public void setupDays() {\n\n //if(days.isEmpty()) {\n days.clear();\n int day_number = today.getActualMaximum(Calendar.DAY_OF_MONTH);\n SimpleDateFormat sdf = new SimpleDateFormat(\"EEEE\");\n SimpleDateFormat sdfMonth = new SimpleDateFormat(\"MMM\");\n today.set(Calendar.DATE, 1);\n for (int i = 1; i <= day_number; i++) {\n OrariAttivita data = new OrariAttivita();\n data.setId_utente(mActualUser.getID());\n\n //Trasformare in sql date\n java.sql.Date sqldate = new java.sql.Date(today.getTimeInMillis());\n data.setGiorno(sqldate.toString());\n\n data.setDay(i);\n data.setMonth(today.get(Calendar.MONTH) + 1);\n\n data.setDay_of_week(today.get(Calendar.DAY_OF_WEEK));\n Date date = today.getTime();\n String day_name = sdf.format(date);\n data.setDay_name(day_name);\n data.setMonth_name(sdfMonth.format(date));\n\n int indice;\n\n if (!attivitaMensili.isEmpty()) {\n if ((indice = attivitaMensili.indexOf(data)) > -1) {\n OrariAttivita temp = attivitaMensili.get(indice);\n if (temp.getOre_totali() == 0.5) {\n int occurence = Collections.frequency(attivitaMensili, temp);\n if (occurence == 2) {\n for (OrariAttivita other : attivitaMensili) {\n if (other.equals(temp) && other.getCommessa() != temp.getCommessa()) {\n data.setOtherHalf(other);\n data.getOtherHalf().setModifica(true);\n }\n }\n\n }\n }\n data.setFromOld(temp);\n data.setModifica(true);\n }\n }\n isFerie(data);\n\n\n //Aggiungi la data alla lista\n days.add(data);\n\n //Aggiugni un giorno alla data attuale\n today.add(Calendar.DATE, 1);\n }\n\n today.setTime(actualDate);\n\n mCalendarAdapter.notifyDataSetChanged();\n mCalendarList.setAdapter(mCalendarAdapter);\n showProgress(false);\n }", "public void clear() {\n this.dates = new HashSet<>();\n }", "public List<GlucoseData> getHistoryOfDay(Date day) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(fmt.format(day).equals(fmt.format(datadate))) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "@Override\r\n\tpublic void flushAll(Date date) {\n\t\t\r\n\t}", "@Scheduled(fixedDelay = 60000)\n @Transactional\n public void run() {\n try {\n List<ClientLoanDetails> oldDetails = clientLoanDetailsDao.findOldEntity();\n oldDetails.forEach(clientLoanDetailsDao::delete);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "private void eliminateDay() {\r\n\tdayElimTimer.cancel();\r\n\tdayElimTimer.purge();\r\n\r\n\t// playerIDs.remove(playerOnTrialID);\r\n\tplayers.remove(playerOnTrialID);\r\n\r\n\tif (mafia.contains(playerOnTrialID)) {\r\n\t int index = mafia.indexOf(playerOnTrialID);\r\n\t mafia.remove(index);\r\n\r\n\t} else {\r\n\t int index = innocentIDs.indexOf(playerOnTrialID);\r\n\t innocentIDs.remove(index);\r\n\t}\r\n\r\n\tserver.setPlayerMuted(playerOnTrialID, true);\r\n\r\n\tserver.publicMessage(server.getUsername(playerOnTrialID) + \" has been eliminated\");\r\n\r\n\tplayerOnTrialID = null;\r\n\telimDay.clear();\r\n\tsave.clear();\r\n\telimDayVoteInProgress = false;\r\n\r\n\tcheckWin();\r\n }", "public synchronized boolean removeLogsBefore(final long time) {\n if (time <= 0) {\n Logger.e(\"Cannot count data without proper time millis\");\n return false;\n }\n\n Object queryResult = queryExecutor(new QueryExecCallback<Boolean>() {\n @Override\n public Boolean execute(SQLiteDatabase db) {\n String whereClause = Columns.CREATED_AT + \" <= \" + time;\n long affectedRowCount = db.delete(TABLE_NAME, whereClause, null);\n\n return affectedRowCount > 0;\n }\n });\n\n return queryResult == null ? false : (Boolean) queryResult;\n }", "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 queryDataFromDatabase() {\n AppDatabase database = Room.databaseBuilder(this, AppDatabase.class, DB_NAME).allowMainThreadQueries().build();\n runningdao = database.getRunningdataDAO();\n List<Runningdata> runningdata_list = runningdao.getAllRuningdata();\n for (int i = 0; i < runningdata_list.size(); i++) {\n int oldId = runningdata_list.get(i).getId();\n String oldStarttime = runningdata_list.get(i).getStarttime();\n double oldDistance = runningdata_list.get(i).getDistance();\n double oldCalorie = runningdata_list.get(i).getCalorie();\n System.out.println(\"Database shows here: \"+\"i:\"+i+\"oldId:\"+oldId +\"oldStarttime\"+oldStarttime+\"oldDistance\"+oldDistance+\"oldCalorie\"+oldCalorie);\n }\n // delete data from database by ID\n //runningdao.deleteById(10);\n }", "public void removeAllRecordingDate() {\r\n\t\tBase.removeAll(this.model, this.getResource(), RECORDINGDATE);\r\n\t}", "public static void updateOverDueTask() {\n\t\tString prevDate = DateModifier.getPrevDate(DateModifier.getCurrDate());\r\n\r\n\t\tfor (int j = 0; j < 10; j++) { // Deletes files from 10 days ago\r\n\r\n\t\t\tString fileName = prevDate + \".txt\";\r\n\t\t\tfile_object = new File(fileName);\r\n\t\t\t\r\n\t\t\tif (file_object.exists()) {\r\n\t\t\t\t\r\n\t\t\t\t// read the content of the previous date file, put in the list\r\n\t\t\t\tprevDateTask = (new FileAccessor(fileName)).readContents();\r\n\r\n\t\t\t\tif (prevDateTask.size() != 0) {\r\n\t\t\t\t\tODTask = (new FileAccessor(OVERDUETXT)).readContents();\r\n\r\n\t\t\t\t\t// Transfer contents over\r\n\t\t\t\t\tfor (int i = 0; i < prevDateTask.size(); i++) {\r\n\t\t\t\t\t\tODTask.add(prevDate + \" \" + prevDateTask.get(i));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// write in file\r\n\t\t\t\t\t(new FileAccessor(OVERDUETXT, ODTask)).writeContents();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Delete the previous date text file to save space\r\n\t\t\t\tfile_object.delete();\r\n\t\t\t}\r\n\r\n\t\t\t// Get previous date from the previous date for the next loop\r\n\t\t\tprevDate = DateModifier.getPrevDate(prevDate);\r\n\t\t\t\r\n\t\t}\r\n\t}", "public static boolean deletePastEvents (Event event){\r\n\t int currentDate = getCurrentDate();\r\n\t int date = event.date;\r\n\t if (date<currentDate){\r\n\t\t masterEventsFile.remove(event.getEventLine());\r\n\t\t return true;\r\n\t }\r\n\t return false;\r\n }", "public void Filter(LocalDateTime filterDate)\r\n {\r\n Iterator<ServiceRecord> iterator = this.records.iterator();\r\n ServiceRecord current = null;\r\n \r\n //Service records are organized in chronological order, so we can simply traverse\r\n //and remove records while they are less than or equal to the filter date.\r\n while (iterator.hasNext() && (Utilities.IsWithinDate((current = iterator.next()).GetCurrentDateTime(), filterDate)))\r\n {\r\n iterator.remove(); //Remove the record from the main disk.\r\n \r\n ServiceRecordList member = this.GetServiceList(this.recordsByMemberNum, current.GetMemberNumber());\r\n ServiceRecordList provider = this.GetServiceList(this.recordsByProviderNum, current.GetProviderNumber());\r\n \r\n //Remove the record from the corresponding member's and provider's service records, if it exists\r\n member.RemoveServiceRecord(current);\r\n provider.RemoveServiceRecord(current);\r\n }\r\n }", "private void readCurrentData(){\n\n showProgressDialog();\n\n // app_title change listener\n mDatabase.child(\"UserNode\").child(mAuth.getCurrentUser().getUid()).child(\"Achivments_Info\").child(operationStatus).addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n if(!deletionProcess) {\n\n achivDetails = dataSnapshot.getValue(AchivmentsDetails.class);\n\n // display user details\n edtxt_achiv_title.setText(achivDetails.getAchv_titles());\n edtxt_achiv_date.setText(achivDetails.getAchv_date());\n edtxt_achiv_details.setText(achivDetails.getAchv_details());\n\n hideProgressDialog();\n }\n\n mDatabase.child(\"UserNode\").child(mAuth.getCurrentUser().getUid()).child(\"Achivments_Info\").child(operationStatus).removeEventListener(this);\n }\n\n @Override\n public void onCancelled(DatabaseError error) {\n // Failed to read value\n Log.e(\">> \", \"Failed to read value.\", error.toException());\n\n hideProgressDialog();\n }\n });\n\n\n\n }", "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}", "@Test\n public void getEmployeesForDate(){\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n //creating dummy employee\n employeeDAO.createEmployee(new Employee(\"dummy\", \"dummy\", \"dummy\", \"dummy\", \"dummy\", 1));\n\n assertNotNull(employeeResource.getEMployeesForDate(\"2017-01-01\"));\n\n //clean up\n employeeDAO.removeEmployee(\"dummy\");\n userDAO.removeUser(\"dummy\");\n }", "private synchronized void removeOld() {\r\n long days = settings.getLong(\"channelHistoryKeepDays\");\r\n Map<String, Long> h = settings.getMap(HISTORY_SETTING);\r\n long keepAfter = System.currentTimeMillis() - days * DAY;\r\n Iterator<String> it = h.keySet().iterator();\r\n while (it.hasNext()) {\r\n String channel = it.next();\r\n long time = h.get(channel);\r\n if (time < keepAfter) {\r\n it.remove();\r\n }\r\n }\r\n settings.putMap(HISTORY_SETTING, h);\r\n settings.setSettingChanged(\"channelHistory\");\r\n }", "public void confirmUpdateDeleteAction(final boolean isHistoryUpdate) {\n\t\tDate todayDateWithoutTime = Utils.removeTime(Calendar.getInstance().getTime());\n\n\t\tif (Utils.removeTime(animalShiftEditPanel.getDateFrom()).after(todayDateWithoutTime) || Utils.removeTime(animalShiftEditPanel.getDateTo()).after(todayDateWithoutTime)){\n\t\t\tshowDialog(ERROR_MESSAGE, \"You must choose today or past date.\");\n\t\t\treturn;\n\t\t}\n\t\tif (Utils.removeTime(animalShiftEditPanel.getDateFrom()).after(Utils.removeTime(animalShiftEditPanel.getDateTo()))){\n\t\t\tshowDialog(ERROR_MESSAGE, \"Date from must be earlier or equals to date to.\");\n\t\t\treturn;\n\t\t}\n\n\t\tnew AsyncTask() {\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground() throws Exception {\n\t\t\t\tif (isHistoryUpdate) {\n\t\t\t\t\treturn dataManager.updateAnimalShifts(selectedAnimalModel.getId(), animalShiftEditPanel.getDateFrom(), animalShiftEditPanel.getDateTo(), animalShiftEditPanel.getSelectedLocation(), animalShiftEditPanel.getWeightTextField());\n\t\t\t\t} else {\n\t\t\t\t\t// if it's not edit action, it's DELETE action\n\t\t\t\t\treturn dataManager.deleteAnimalRecords(selectedAnimalModel.getId(), animalShiftEditPanel.getDateFrom(), animalShiftEditPanel.getDateTo());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected void onDone(boolean success) {\n\t\t\t\teditAnimalDetail(selectedAnimalModel, AnimalDetailPanel.EDIT_ANIMAL);\n\t\t\t\tanimalDetailPanel.showHistoryShiftPane();\n\t\t\t}\n\t\t}.start();\n\t}", "public void resetData() {\n user = new User();\n saveData();\n }", "@Override\n public void clear() {\n date1 = Long.MIN_VALUE;\n date2 = Long.MIN_VALUE;\n }", "List<MongoDBEntry<K, V>> removeExpiredData(byte[] lastKey);", "public void deleteDataInUserTable() throws SQLException {\n\t\tdeleteData(\"login_register\",idCondition);\n\t\tdeleteData(\"user_period\",\"APPLICANT_\"+idCondition);\n\t\tdeleteData(\"user_period\",\"APPLICANT_\"+idCondition);\n\t\tdeleteData(\"message\",idCondition);\n\t\tdeleteData(\"jp_user\",\"CI != 123\");\n\t}", "public void deleteShowing(Screen screen, String date, String time) {\n filmEdit.deleteShowing(screen, date, time);\n }", "public synchronized void checkUsers() {\n\t\tHttpSession temp;\n\t\tDate now = new Date();\n\t\tString tempUser;\n\t\tEnumeration userList = userSessions.keys();\n\t\twhile (userList.hasMoreElements()) {\n\t\t\ttempUser = (String) userList.nextElement();\n\t\t\ttry {\n\t\t\t\ttemp = (HttpSession) userSessions.get(tempUser);\n\t\t\t\tif ((now.getTime() - temp.getLastAccessedTime()) > 60000)\n\t\t\t\t\tuserSessions.remove(tempUser);\n\t\t\t} catch (Exception e) {\n\t\t\t\tuserSessions.remove(tempUser);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void loadAllDates(LocalDate date) throws PersistenceException{\n try {\n loadOrder(date);\n } catch (PersistenceException ex) {\n throw new PersistenceException(\"ERROR! ERROR! CANNOT LOAD!\", ex);\n }\n }", "void unsetDate();", "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 renewTimes() {\n String time_morgens_new = time_prefs.getString(\"time_morgens\", getResources().getString(R.string.default_morgens));\n String time_mittags_new = time_prefs.getString(\"time_mittags\", getResources().getString(R.string.default_mittags));\n String time_abends_new = time_prefs.getString(\"time_abends\", getResources().getString(R.string.default_abends));\n String time_zur_nacht_new = time_prefs.getString(\"time_morgens\", getResources().getString(R.string.default_morgens));\n /*comparison of class local time variblaes with new Preferences\n deletes alarms affected medicines and creates new alarms for them\n */\n\n if (!time_morgens.equals(time_morgens_new)) {\n //list all affected Meds and iterate for each\n List<Meds> meds = Meds.find(Meds.class, \"time = ?\", \"Morgens\");\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n cancelAlarm(m.getId());\n }\n }\n\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n createAlarm(m.getDays(), m.getTime(), m.getId());\n }\n }\n }\n\n if (!time_mittags.equals(time_mittags_new)) {\n List<Meds> meds = Meds.find(Meds.class, \"time = ?\", \"Mittags\");\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n cancelAlarm(m.getId());\n }\n }\n\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n createAlarm(m.getDays(), m.getTime(), m.getId());\n }\n }\n }\n if (!time_abends.equals(time_abends_new)) {\n List<Meds> meds = Meds.find(Meds.class, \"time = ?\", \"Abends\");\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n cancelAlarm(m.getId());\n }\n }\n\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n createAlarm(m.getDays(), m.getTime(), m.getId());\n }\n }\n }\n if (!time_zur_nacht.equals(time_zur_nacht_new)) {\n List<Meds> meds = Meds.find(Meds.class, \"time = ?\", \"Morgens\");\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n cancelAlarm(m.getId());\n }\n }\n\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n createAlarm(m.getDays(), m.getTime(), m.getId());\n }\n }\n }\n }", "public interface UserFormDao extends BaseJpaRepository<UserForm> {\n\n List<UserForm> findUserFormsByUserIdEquals(Integer userId);\n\n UserForm findFirstByUserIdEqualsOrderById(Integer userId);\n\n void deleteAllByCreatedDateBefore(Date date);\n\n}", "@Override\r\n public boolean doUnloadTrackersData() {\n boolean result = true;\r\n\r\n TrackerManager tManager = TrackerManager.getInstance();\r\n ObjectTracker objectTracker = (ObjectTracker) tManager.getTracker(ObjectTracker.getClassType());\r\n if (objectTracker == null)\r\n return false;\r\n\r\n if (mCurrentDataset != null && mCurrentDataset.isActive()) {\r\n if (objectTracker.getActiveDataSet().equals(mCurrentDataset) && !objectTracker.deactivateDataSet(mCurrentDataset))\r\n result = false;\r\n else if (!objectTracker.destroyDataSet(mCurrentDataset))\r\n result = false;\r\n\r\n mCurrentDataset = null;\r\n }\r\n return result;\r\n }", "@Test\n public void getShiftListByDate(){\n userDAO.createUser(new User(\"dummy3\", \"dummy3\", 1));\n shiftListResource.createShiftlist(new ShiftList(\"dummy3\", 1, false, new Date(2017-01-01), 0, true));\n\n assertNotNull(shiftListResource.getShiftListsByDate(new Date(2017-01-01)));\n\n //clean up\n shiftListResource.removeShiftlist(new Date(2017-01-01),1,\"dummy3\");\n userDAO.removeUser((\"dummy3\"));\n\n }", "static void flushOldAlertsFromInternalStorage(Context context) {\n if (BYPASS_DB) {\n SharedPreferences prefs = getFiredAlertsTable(context);\n\n // Only flush if it hasn't been done in a while.\n long nowTime = System.currentTimeMillis();\n long lastFlushTimeMs = prefs.getLong(KEY_LAST_FLUSH_TIME_MS, 0);\n if (nowTime - lastFlushTimeMs > FLUSH_INTERVAL_MS) {\n if (DEBUG) {\n Log.d(TAG, \"Flushing old alerts from shared prefs table\");\n }\n\n // Scan through all fired alert entries, removing old ones.\n SharedPreferences.Editor editor = prefs.edit();\n Time timeObj = new Time();\n for (Map.Entry<String, ?> entry : prefs.getAll().entrySet()) {\n String key = entry.getKey();\n Object value = entry.getValue();\n if (key.startsWith(KEY_FIRED_ALERT_PREFIX)) {\n long alertTime;\n if (value instanceof Long) {\n alertTime = (Long) value;\n } else {\n // Should never occur.\n Log.e(TAG,\"SharedPrefs key \" + key + \" did not have Long value: \" +\n value);\n continue;\n }\n\n if (nowTime - alertTime >= FLUSH_INTERVAL_MS) {\n editor.remove(key);\n if (DEBUG) {\n int ageInDays = getIntervalInDays(alertTime, nowTime, timeObj);\n Log.d(TAG, \"SharedPrefs key \" + key + \": removed (\" + ageInDays +\n \" days old)\");\n }\n } else {\n if (DEBUG) {\n int ageInDays = getIntervalInDays(alertTime, nowTime, timeObj);\n Log.d(TAG, \"SharedPrefs key \" + key + \": keep (\" + ageInDays +\n \" days old)\");\n }\n }\n }\n }\n editor.putLong(KEY_LAST_FLUSH_TIME_MS, nowTime);\n editor.apply();\n }\n }\n }", "public void hoySeHaEntrenado(){\n\n SharedPreferences sharedPreferences = this.getSharedPreferences(\"usuarios\", Context.MODE_PRIVATE);\n String username = sharedPreferences.getString(\"username\",\"No existe un usuario con este username\");\n if(!username.equalsIgnoreCase(\"No existe un usuario con este username\")){\n String fechasJSON = sharedPreferences.getString(\"fechasJSON\",\"Ninguna\");\n String token = sharedPreferences.getString(\"token\",\"Ninguna\");\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n Log.e(\"test\",fechasJSON);\n Date date = new Date();\n if(!fechasJSON.contains(formatter.format(date))){\n String data = \"token=\"+token;\n String url = \"http://35.180.41.33/identity/user/fechas/nueva/\";\n PostData foo = new PostData(data, url);\n foo.postData();\n try{\n Log.e(\"test\",fechasJSON);\n JSONObject newDate = new JSONObject();\n newDate.put(\"date\", formatter.format(date));\n JSONArray jsonArrayDates = new JSONArray(fechasJSON);\n jsonArrayDates.put(newDate);\n\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"fechasJSON\", jsonArrayDates.toString());\n editor.commit();\n Log.e(\"test\",jsonArrayDates.toString());\n }catch(Exception ex){\n\n }\n }\n }\n }", "@Override\n public void deleteCase(int currentUserID) {\n Business.getInstance().getData().deleteCase(this);\n Business.getInstance().getData().saveToCaseLog(currentUserID,\n IDNum,\n Business.getInstance().getCalendar().getTodaysDateString(),\n Business.getInstance().getCalendar().getTodaysTimeString());\n }", "@VisibleForTesting\n void checkUserDeletions() {\n final String METHOD = \"checkUserDeletions\";\n LOGGER.entering(CLASS_NAME, METHOD);\n\n NotesView usersView = null;\n Statement stmt = null;\n ArrayList<Long> usersToDelete = new ArrayList<Long>();\n try {\n String userSelectionFormula = connectorSession.getUserSelectionFormula();\n\n // TODO: why do we have to use this view and an abbreviated\n // full name as opposed to just using the people/groups view\n // we use elsewhere?\n usersView = directoryDatabase.getView(NCCONST.DIRVIEW_VIMUSERS);\n usersView.refresh();\n stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n ResultSet.CONCUR_READ_ONLY);\n ResultSet rs = stmt.executeQuery(\"select userid,notesname from \"\n + userTableName);\n while (rs.next()) {\n long userId;\n String fullName;\n try {\n userId = rs.getLong(1);\n fullName = rs.getString(2);\n } catch (SQLException e) {\n LOGGER.log(Level.WARNING, \"Failure reading user table data\", e);\n continue;\n }\n try {\n String abbrevFormula = String.format(\"@Name([ABBREVIATE];\\\"%s\\\")\",\n fullName);\n String key = notesSession.evaluate(abbrevFormula).elementAt(0)\n .toString();\n NotesDocument notesUserDoc = usersView.getDocumentByKey(key);\n if (notesUserDoc == null) {\n // This person or group no longer exists. Remove them\n LOGGER.log(Level.INFO, \"User no longer exists in source directory\"\n + \" and will be deleted: {0}\", key);\n usersToDelete.add(userId);\n } else {\n // Do an additional check for Persons to make sure they\n // still meet the selection criteria\n if (!checkPersonSelectionFormula(userSelectionFormula,\n notesUserDoc)) {\n LOGGER.log(Level.INFO, \"User no longer meets selection criteria\"\n + \" and will be deleted: {0}\", key);\n usersToDelete.add(userId);\n }\n Util.recycle(notesUserDoc);\n }\n } catch (Exception e) {\n LOGGER.log(Level.WARNING,\n \"Failure checking user deletion: \" + fullName, e);\n }\n }\n } catch (Exception e) {\n LOGGER.log(Level.WARNING, \"Error checking deletions\", e);\n } finally {\n Util.recycle(usersView);\n Util.close(stmt);\n }\n\n for (Long userId : usersToDelete) {\n try {\n removeUser(userId);\n } catch (SQLException e) {\n LOGGER.log(Level.WARNING, \"Error removing user: \" + userId, e);\n }\n }\n LOGGER.exiting(CLASS_NAME, METHOD);\n }", "public void removeOldRecords();", "public void setDatasetLastAddedToNow() {\n this.datasetLastAdded = new Date();\n }", "public boolean deleteScore(String dateCheck)\n {\n Score[] temp = new Score[scores.length - 1];\n if(findScore(dateCheck) == -1)\n {\n return false;\n }\n else\n {\n for(int i = 0; i < findScore(dateCheck); i++)\n {\n temp[i] = scores[i];\n }\n for(i = findScore(dateCheck) + 1; i < scores.length; i++)\n {\n temp[i - 1] = scores[i];\n }\n scores = temp;\n return true;\n }\n }", "@Scheduled(cron = \"0 0 1 * * *\")\n\tpublic void removeExpiredPremiumUsers(){\n\t\tIterable <User> users = userDao.findAll();\n\t\tDate now = new Date();\n\t\t\n\t\tfor (User user : users){\n\t\t\tif (user.isPremium()){\n\t\t\t\ttry{\n\t\t\t\t\tif(user.getPremiumExpiryDate().before(now)){\n\t\t\t\t\t\tuser.removePremium();\n\t\t\t\t\t\tuserDao.save(user);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tcatch(Exception e){\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Delete({\n \"delete from A_SUIT_MEASUREMENT\",\n \"where user_id = #{userId,jdbcType=INTEGER}\",\n \"and measure_date = #{measureDate,jdbcType=TIMESTAMP}\"\n })\n int deleteByPrimaryKey(@Param(\"userId\") Integer userId, @Param(\"measureDate\") Date measureDate);", "private boolean deleteTrackingObject(String key) {\n SharedPreferences p = context.getSharedPreferences(TRACKING_EVENTS_STORAGE, Context.MODE_PRIVATE);\n SharedPreferences.Editor e = p.edit();\n e.remove(key);\n\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.GINGERBREAD) {\n return e.commit();\n } else {\n e.apply();\n return true;\n }\n }", "@Test\n public void getShiftsByDate(){\n userDAO.createUser(new User(\"dummy3\", \"dummy3\", 1));\n shiftListResource.createShiftlist(new ShiftList(\"dummy3\", 1, false, new Date(2017-01-01), 0, true));\n employeeResource.createEmployee(new Employee(\"dummy3\",\"dummy3\",\"dummy3\",\"dummy3\",\"dummy3\", 1));\n\n assertNotNull(shiftListFunctionResource.getShiftsByDate(\"2017-01-01\"));\n\n //clean up\n employeeResource.removeEmployee(\"dummy3\");\n shiftListResource.removeShiftlist(new Date(2017-01-01),1,\"dummy3\");\n userDAO.removeUser((\"dummy3\"));\n\n }", "private void clearRecords() {\n SQLiteDatabase db = mDbHelper.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(HabitEntry.COLUMN_SUNDAY, 0);\n values.put(HabitEntry.COLUMN_MONDAY, 0);\n values.put(HabitEntry.COLUMN_TUESDAY, 0);\n values.put(HabitEntry.COLUMN_WEDNESDAY, 0);\n values.put(HabitEntry.COLUMN_THURSDAY, 0);\n values.put(HabitEntry.COLUMN_FRIDAY, 0);\n values.put(HabitEntry.COLUMN_SATURDAY, 0);\n\n db.update(HabitEntry.TABLE_NAME, values, null, null);\n\n loaderManager.restartLoader(HABITS_LOADER_ID, null, this);\n }", "private void cleanUpConsumedEsnRecords() {\n\t\tesnInfoRepository.findAllByIsConsumed(true).removeIf(item -> (Days\n\t\t\t\t.daysBetween(new DateTime(item.getDateImported()), new DateTime()).isGreaterThan(Days.days(30))));\n\t}" ]
[ "0.7116562", "0.6211804", "0.5941053", "0.584964", "0.57222897", "0.56828415", "0.5609913", "0.55298793", "0.5522469", "0.5511776", "0.5498445", "0.5494932", "0.5477235", "0.544343", "0.54312205", "0.5427973", "0.5399818", "0.5385747", "0.5352996", "0.5351429", "0.53282243", "0.5316027", "0.5315344", "0.53056806", "0.52841336", "0.5273307", "0.5266678", "0.52617896", "0.5261435", "0.5258402", "0.5255337", "0.525122", "0.52502096", "0.5244015", "0.5230766", "0.52307355", "0.5222492", "0.5213884", "0.5209744", "0.52047384", "0.51956606", "0.51922417", "0.51859206", "0.51792055", "0.5172811", "0.5171872", "0.5167364", "0.51666194", "0.5157495", "0.5154022", "0.5150786", "0.51502043", "0.514368", "0.51356643", "0.51298386", "0.5127832", "0.5122189", "0.51055837", "0.5097093", "0.50962955", "0.5095523", "0.50850827", "0.50802493", "0.50798875", "0.5079877", "0.5077005", "0.50756496", "0.50643814", "0.5063362", "0.5047881", "0.50376946", "0.50276524", "0.502088", "0.5005927", "0.49992007", "0.4987734", "0.4986581", "0.49844986", "0.49808857", "0.49799618", "0.497782", "0.49771026", "0.4976056", "0.49759254", "0.4969609", "0.49654222", "0.49633425", "0.49614915", "0.49600223", "0.49568665", "0.49555376", "0.49546236", "0.49389103", "0.4926191", "0.49134612", "0.4907314", "0.49040753", "0.48986432", "0.48978424", "0.4891715" ]
0.504619
70
sincronizar con el user de firebase currentUser = new User(); currentUser.setFirstName("Ivan"); currentUser.setLastName("Zepeda");
public void setupUser() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createPersonFromUser(String fullname){\n String useruid=\"\";\n String useremail=\"\";\n\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n if (user != null) {\n // Name, email address, and profile photo Url\n String username = user.getDisplayName();\n useremail = user.getEmail();\n Uri photoUrl = user.getPhotoUrl();\n\n // The user's ID, unique to the Firebase project. Do NOT use this value to\n // authenticate with your backend server, if you have one. Use\n // FirebaseUser.getToken() instead.\n useruid = user.getUid();\n }\n\n Person person =new Person();\n person.setName(fullname);\n person.setEmail(useremail);\n person.setUid(useruid);\n person.setTime_to_stop(\"0\");\n\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference myRef= database.getReference(\"Person\");\n myRef.child(useruid).setValue(person);\n\n }", "public void setfUser(FirebaseUser f){\n fUser = f;\n }", "private void loadUserInformation(){\n FirebaseUser user = mAuth.getCurrentUser();\n\n String displayEmail = user.getEmail();\n email.setText(\"Velkommenn \" + displayEmail+\"!\");\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 }", "private void SaveUserToFirebase(FirebaseUser user)\n {\n\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 }", "void onUserCreated(FirebaseUser firebaseUser);", "private void createLocalStudentUserData(FirebaseUser user){\n\n String name = usernameTextView.getText().toString();\n StudentManager.createStudent(name, user.getUid(), newSchoolID);\n\n }", "private void fillYourInfo(){\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n if (user != null) {\n // Name, email address, and profile photo Url\n String user_name = user.getDisplayName();\n String email = user.getEmail();\n Uri photoUrl = user.getPhotoUrl();\n\n // Check if user's email is verified\n boolean emailVerified = user.isEmailVerified();\n\n // The user's ID, unique to the Firebase project. Do NOT use this value to\n // authenticate with your backend server, if you have one. Use\n // FirebaseUser.getToken() instead.\n TextView UserName = findViewById(R.id.playername1);\n ImageView ProfilePic = findViewById(R.id.playerimg1);\n UserName.setText(user_name);\n if (photoUrl != null) {\n Picasso.with(this).load(photoUrl).into(ProfilePic);\n }\n }\n if (user == null){\n TextView UserName = findViewById(R.id.playername1);\n ImageView ProfilePic = findViewById(R.id.playerimg1);\n UserName.setText(getText(R.string.def_user));\n ProfilePic.setImageResource(R.drawable.def_icon);\n }\n }", "void setCurrentUser(@Nullable User newCurrentUser) {\n currentUser = newCurrentUser;\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 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 writeNewUser(String userId, String name, String email) {\n User user = new User(name, email);\n\n mDatabase.child(\"users\")\n .child(userId)\n .child(\"Name\").setValue(name);\n\n mDatabase.child(\"users\")\n .child(userId)\n .child(\"Email\").setValue(email);\n\n\n }", "public void setUser(User user) { this.user = user; }", "private void loadCurrentUserInformation() {\n if(currentUser!=null){\n currentUserUid=currentUser.getUid();\n databaseReference.child(\"Users Data\").child(\"Sign Up Info\").child(\"UID \"+currentUserUid).addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n currentUserName=(String) dataSnapshot.child(\"Name\").getValue();\n currentUserPassword=(String)dataSnapshot.child(\"Password\").getValue();\n currentUserCity=(String)dataSnapshot.child(\"City\").getValue();\n currentProfileImage=(String)dataSnapshot.child(\"Profile Image Url\").getValue();\n displayUserProfile();\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }\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 }", "public void updateCurrentTrempitUser() {\n\n // create the trempituser object\n TrempitUser currentUser = new TrempitUser();\n currentUser.setFullName(Profile.getCurrentProfile().getName());\n currentUser.setId(Long.valueOf(Profile.getCurrentProfile().getId()));\n\n // update the global variable so all activities can access the user\n globalState.setCurrentUser(currentUser);\n\n // insert the user to the server\n insertTrempitUserToServer(currentUser);\n\n Toast.makeText(this, \"logged in to facebook:\" + globalState.getCurrentUser().getFullName(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n String fullname = dataSnapshot.child(\"fullname\").getValue(String.class);\n String username = dataSnapshot.child(\"username\").getValue(String.class);\n String password = dataSnapshot.child(\"password\").getValue(String.class);\n point = dataSnapshot.child(\"point\").getValue(int.class);\n txtPoint.setText(\"Yout point: \"+point);\n user = new User(username, fullname, password, point);\n }", "private void createUser(String username) {\n if (TextUtils.isEmpty(username)) {\n Toast.makeText(this, \"Username Field Required!\", Toast.LENGTH_SHORT).show();\n return;\n }else {\n FirebaseUser current_user = FirebaseAuth.getInstance().getCurrentUser();\n String userID = current_user.getUid();\n User user = new User(et_username.getText().toString(), et_gender.getText().toString(), \"Newbie\", \"Online\", \"Active\", userID, \"default_url\");\n mRef.child(mAuth.getCurrentUser().getUid()).setValue(user);\n }\n }", "private void registerUser(){\n mAuth.createUserWithEmailAndPassword(correo, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //mapa de valores\n Map<String, Object> map = new HashMap<>();\n map.put(\"name\",name);\n map.put(\"email\",correo);\n map.put(\"password\",password);\n map.put(\"birthday\",cumple);\n map.put(\"genre\",genre);\n map.put(\"size\",size);\n //obtenemos el id asignado por la firebase\n String id= mAuth.getCurrentUser().getUid();\n //pasamos el mapa de valores\n mDatabase.child(\"Users\").child(id).setValue(map).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task2) {\n //validams que la tarea sea exitosa\n if(task2.isSuccessful()){\n startActivity(new Intent(DatosIniciales.this, MainActivity.class));\n //evitamos que vuelva a la pantalla con finsh cuando ya se ha registrado\n finish();\n }else{\n Toast.makeText(DatosIniciales.this, \"Algo fallo ups!!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }else{\n Toast.makeText(DatosIniciales.this, \"No pudimos completar su registro\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "public User() {\n this.firstName = \"Lorenzo\";\n this.lastName = \"Malferrari\";\n this.username = \"[email protected]\";\n this.email = \"[email protected]\";\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 }", "@Override\n public void onSuccess(AuthResult authResult) {\n\n FirebaseDatabase.getInstance().getReference(Common.user_rider_btl)\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n Common.currentUser = dataSnapshot.getValue(User.class);\n Intent intent = new Intent(new Intent(LoginUser.this, HomeActivity.class));\n startActivity(intent);\n finish();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "public void addUserToFirestore() {\n if (isSignedIn()) {\n getUserTask().addOnCompleteListener(\n new OnCompleteListener<DocumentSnapshot>()\n {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if (task.isSuccessful() && !task.getResult().exists()) {\n setUser(userMap(false));\n setAnalysis(analysisMap(new ArrayList<String>()));\n setSlouches(slouchMap(new ArrayList<Date>(), new ArrayList<Double>()));\n }\n }\n });\n }\n }", "private void updateUI(FirebaseUser user) {\n\n HashMap<String, Object> data = new HashMap<>();\n data.put(\"FName\", user.getDisplayName());\n data.put(\"LName\", user.getDisplayName());\n data.put(\"email\", user.getEmail());\n data.put(\"password\", \"No need this\");\n data.put(\"uid\", mAuth.getCurrentUser().getUid());\n data.put(\"token\", user.getIdToken(true).toString());\n\n db.collection(\"users\").document(mAuth.getCurrentUser().getUid())\n .set(data).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n\n finish();\n startActivity(new Intent(Login.this, CollectingData.class));\n }\n });\n\n }", "public static void writeNewUser(User user) {\n DatabaseReference usersRef = FirebaseDatabase.getInstance().getReference();\n FirebaseAuth mAuth = FirebaseAuth.getInstance();\n usersRef.child(\"users\").child(mAuth.getUid()).setValue(user);\n }", "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 }", "public void setUserDetails(){\n name = firebaseUser.getDisplayName();\n username.setText(name);\n\n Glide.with(this).load(firebaseUser.getPhotoUrl()).into(profileIcon);\n }", "private void signUpNewUserToDB(){\n dbAuthentication.createUserWithEmailAndPassword(this.newUser.getEmail(), this.newUser.getPassword())\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n /**signUp success, will update realTime DB ant firebase Authentication*/\n FirebaseUser currentUser = dbAuthentication.getCurrentUser();\n addToRealDB(currentUser.getUid());\n /**will send verification email to the user from Firebase Authentication*/\n currentUser.sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n }\n });\n }else{isBadEmail = true;}\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 }", "@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 }", "@Override\n public void onSuccess(Map<String, Object> result) {\n Firebase newUserRef = ref.child(\"users\").child(\"username\");\n User newUser = new User();\n\n newUser.email = signUpEmail;\n newUser.fullName = fullName;\n newUser.password = password;\n\n newUserRef.setValue(newUser);\n\n Toast.makeText(SignupActivity.this, \"Successfully created new account\", Toast.LENGTH_LONG).show();\n finish();\n }", "@Transactional\n private static void updateOneUser(User currentUser, JsonNode currentNode) {\n String password = currentNode.path(\"password\").textValue();\n if (password != null) {\n currentUser.password = Utils.Hasher.hash(password);\n }\n String firstName = currentNode.path(\"first_name\").textValue();\n if (firstName != null)\n currentUser.firstName = firstName;\n String lastName = currentNode.path(\"last_name\").textValue();\n if (lastName != null)\n currentUser.lastName = lastName;\n Long dateTime = currentNode.path(\"birth_date\").asLong();\n if (currentNode.path(\"birth_date\").canConvertToLong()) {\n Date birthDate = new Date(dateTime);\n currentUser.birthDate = birthDate;\n }\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n for (DataSnapshot snapshot: dataSnapshot.getChildren()){\n if (snapshot.getKey().equals(currentUser)){\n Intent login = new Intent(getApplicationContext(), MainActivity.class);\n login.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(login);\n }\n }\n Map<String, Object> user = new HashMap<String, Object>();\n user.put(\"username\", mAuth.getCurrentUser().getDisplayName());\n user.put(\"kilometer\", 0);\n user.put(\"points\", 0);\n user.put(\"number\", \"\");\n user.put(\"firstName\", \"\");\n user.put(\"lastName\", \"\");\n user.put(\"dob\", \"\");\n user.put(\"reward\", null);\n\n DatabaseReference myRef = FirebaseDatabase.getInstance().getReference().child(\"users\").child(currentUser);\n myRef.setValue(user);\n\n\n Intent freshGoogleLogin = new Intent(getApplicationContext(), MainActivity.class);\n freshGoogleLogin.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(freshGoogleLogin);\n\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 }", "private void loadUserInformation() {\n FirebaseUser user = mAuth.getCurrentUser();\n\n if (user != null) {\n if (user.getPhotoUrl() != null) {\n Glide.with(this).load(user.getPhotoUrl().toString()).into(profilePic);\n }\n if (user.getDisplayName() != null) {\n name.setText(user.getDisplayName());\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 }", "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 User() {\n setName(\"\");\n setBirthdate(\"\");\n setCity(\"\");\n setIsSingle(true);\n setPartnerName(\"\");\n setPartnerGender(\"\");\n setMonthsUntilDeath(0);\n }", "private void saveUserInformation() {\n name.setText(nameInput.getText().toString());\n\n if (name.getText().toString().isEmpty()) {\n name.setError(\"Name required\");\n name.requestFocus();\n return;\n }\n\n FirebaseUser user = mAuth.getCurrentUser();\n if (user != null) {\n if (isBname()) {\n updateName(user);\n }\n if (isBtitle()) {\n updateTitle(user);\n }\n }\n }", "public void registerNewUser(final FirebaseFirestore db, final User user) {\n FirebaseUser FbUser = FirebaseAuth.getInstance().getCurrentUser();\n if (FbUser != null) {\n UserProfileChangeRequest request = new UserProfileChangeRequest.Builder()\n .setDisplayName(user.getName())\n .build();\n FbUser.updateProfile(request);\n }\n\n final DatabaseHelper localDB = new DatabaseHelper(getApplicationContext());\n db.collection(collection)\n .document(user.getEmail())\n .set(user)\n .addOnSuccessListener(avoid -> {\n Toast.makeText(getApplicationContext(), \"Registered\", Toast.LENGTH_SHORT).show();\n\n // Send to cache (local db)\n addToCache(user, localDB);\n\n // Send intent to dashboard\n Intent goToDashboard = new Intent(SignupActivity.this, Dashboard.class);\n Bundle myBundle = new Bundle();\n myBundle.putString(\"email\", user.getEmail());\n// myBundle.putString(\"name\", user.getName());\n// myBundle.putString(\"maxIncome\", String.valueOf(user.getMaxIncome()));\n myBundle.putBoolean(\"coming_from_login_signup\", true);\n goToDashboard.putExtras(myBundle);\n startActivity(goToDashboard);\n })\n .addOnFailureListener(e -> snackbar.showStatus(\"Not Registered\"));\n }", "public void newUser(User user);", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n\n FirebaseUser usuarioActual = FirebaseAuth.getInstance().getCurrentUser();\n UserProfileChangeRequest profileUpdates = new UserProfileChangeRequest.Builder()\n .setDisplayName(name.getText().toString() + \" \" + lastname.getText().toString()).build();\n usuarioActual.updateProfile(profileUpdates);\n\n ref.child(projectnameNew.getText().toString());\n\n Intent i = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(i);\n }\n if (!task.isSuccessful()) {\n Toast.makeText(RegisterActivity.this, \"Algo está mal :C\",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }", "User(String userID, String password, String firstName, String lastName) {\n this.userID = userID;\n this.password = password;\n this.firstName = firstName;\n this.lastName = lastName;\n }", "public void recogerUsuarioFirebase() {\n //if user is not valid\n FirebaseUser currentUser = FirebaseAuth.getInstance().getCurrentUser();\n if (currentUser == null) {\n startActivity(StartActivity.createIntent(this));\n finish();\n return;\n } else {\n uniqueID = currentUser.getUid();\n }\n }", "@Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser currentUser = firebaseAuth.getCurrentUser();\n if (currentUser != null) {\n Log.w(TAG, \"Usuario Logeado\" + currentUser.getEmail());\n } else {\n Log.w(TAG, \"Usuario NO Logeado\");\n }\n }", "public void createUserInFirebase(String name, String email, String Uid) {\n User user = new User();\n user.setName(name);\n user.setEmail(email);\n mDatabase.child(\"users\").child(Uid).setValue(user);\n }", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_login);\n initViews();\n buttonRegister.setOnClickListener(this);\n buttonlog1.setOnClickListener(this);\n\n firebaseAuth = FirebaseAuth.getInstance();\n\n progressDialog = new ProgressDialog(this);\n\n users = FirebaseDatabase.getInstance().getReference(\"users\");\n\n //usuario = firebaseAuth.getCurrentUser().getEmail();\n\n String email = editTextEmail.getText().toString();\n String password= editTextPassword.getText().toString();\n }", "@Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n user = firebaseAuth.getCurrentUser(); // con esto traemos el estado\n\n if(user!=null){\n Log.d(\"TAG\",\"Esta logueado: con el id: \" + user.getUid());\n\n Toast.makeText(MainActivity.this, \"esta logueado\", Toast.LENGTH_SHORT).show();\n\n finish();\n\n //and open profile activity\n startActivity(new Intent(getApplicationContext(), Ingreso.class));\n\n\n }else{\n Log.d(\"TAG\",\"NO Esta logueado\");\n\n }\n\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 registerUser() {\n String finalFullName = fullName.getText().toString().trim();\n String finalAge = age.getText().toString().trim();\n String finalEmail = email.getText().toString().trim();\n String finalPassword = password.getText().toString().trim();\n\n if(finalFullName.isEmpty()){\n fullName.setError(\"Full name is required.\");\n fullName.requestFocus();\n return;\n }\n\n if(finalAge.isEmpty()){\n age.setError(\"Age is required.\");\n age.requestFocus();\n return;\n }\n\n if(finalEmail.isEmpty()){\n email.setError(\"Email is required.\");\n email.requestFocus();\n return;\n }\n\n if(!Patterns.EMAIL_ADDRESS.matcher(finalEmail).matches()){\n email.setError(\"Please provide valid email!.\");\n email.requestFocus();\n return;\n }\n\n if(finalPassword.length() < 6){\n password.setError(\"Min. password length is 6 characters.\");\n password.requestFocus();\n return;\n }\n\n if(finalPassword.isEmpty()){\n password.setError(\"Password is required.\");\n password.requestFocus();\n return;\n }\n\n progressBar.setVisibility(View.VISIBLE);\n\n setEmail(finalEmail);\n setAge(finalAge);\n setFullName(finalFullName);\n\n //Using Firebase libraries, create the user data and send the info to Firebase\n mAuth.createUserWithEmailAndPassword(finalEmail, finalPassword)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //Create the User object\n User user = new User(getFullName(),getEmail(),getAge());\n\n //Now send that object to the Realtime Database\n FirebaseDatabase.getInstance().getReference(\"Users\")\n //Get registered user's ID and set it the the User object\n //so that they're connected\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n //pass the user object. OnCompleteListener is used to Check if\n //the data was added to the database.\n .setValue(user).addOnCompleteListener(new OnCompleteListener<Void>() {\n //Inside OnCompleteListener you must complete that\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if(task.isSuccessful()){\n Toast.makeText(RegistrationActivity.this, \"User has been registered successfully!\", Toast.LENGTH_LONG).show();\n progressBar.setVisibility(View.GONE);\n\n //Then redirect to login layout\n } else {\n Toast.makeText(RegistrationActivity.this,\"Failed to register. Try again.\", Toast.LENGTH_LONG).show();\n progressBar.setVisibility(View.GONE);\n }\n\n }\n });\n } else {\n Toast.makeText(RegistrationActivity.this,\"Failed to register. Try again.\", Toast.LENGTH_LONG).show();\n progressBar.setVisibility(View.GONE);\n }\n }\n });\n\n\n\n }", "public void addNewUser(String email) {\n String userName = email.split(\"@\")[0];\n mUsersRef.child(userName).setValue(userName);\n userRef = db.getReference(\"users/\" + getUsername());\n userRef.child(\"email\").setValue(email);\n userSigns = new HashMap<String, UserSign>();\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n Toast.makeText(LoginActivity.this,\n getResources().getString\n (R.string.login_wrong_combination_error)\n ,Toast.LENGTH_LONG).show();\n }\n\n else {\n // else check if a profile exists for the user, if not create one\n\n // get current user\n final FirebaseUser user = mFirebaseAuth.getCurrentUser();\n\n // Attach a listener to read the data\n databaseReference.child(user.getUid())\n .addListenerForSingleValueEvent(\n new ValueEventListener() {\n\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n User userInfo = dataSnapshot.getValue(User.class);\n\n // null make a new one\n if (userInfo == null)\n {\n userInfo = new User();\n\n // update database using user id\n databaseReference.child\n (user.getUid()).setValue(userInfo);\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Toast.makeText(LoginActivity.this,\n getResources().getString(R.string.db_error_text)\n + databaseError.getCode(),\n Toast.LENGTH_LONG).show();\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 }", "public User getUser(){\n\t\treturn currentUser;\n\t}", "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 }", "public IUser getCurrentUser() {\n return currentUser;\n }", "private void setFirebase() {\n auth = FirebaseAuth.getInstance();\n\n //get current user\n final FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n\n authListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n if (user == null) {\n // user auth state is changed - user is null\n // launch login activity\n startActivity(new Intent(MainActivity.this, LoginActivity.class));\n finish();\n }\n }\n };\n }", "private void onSignIn() {\n\n //get the signed in user's info from the db and\n //turn it into a user object.\n db.collection(\"users\").document(email).get()\n .addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {\n @Override\n public void onSuccess(DocumentSnapshot documentSnapshot) {\n user = documentSnapshot.toObject(User.class);\n goToDoctors();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(\"MainActivity\", \"Couldn't get user's data\", e);\n Toast.makeText(getApplicationContext(), \"Data retrieval failed.\",\n Toast.LENGTH_SHORT).show();\n }\n });\n\n }", "public User(String name, String email) {\n HashMap<String, Object> timeStamp = new HashMap<>();\n timeStamp.put(Constants.FIREBASE_PROPERTY_TIMESTAMP, ServerValue.TIMESTAMP);\n\n this.name = name;\n this.email = email;\n this.dateCreated = timeStamp;\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 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 }", "@Override\n\tpublic User getCurrentUser() {\n\t\treturn currentUser;\n\t}", "@Override\n public void performRegister(final String name, final String email, final String gender, final String password){\n\n mAuth.createUserWithEmailAndPassword(email.toLowerCase(),password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n User user = new User();\n user.setName(name);\n user.setEmail(email.toLowerCase());\n user.setGender(gender);\n user.setPassword(password);\n FirebaseDatabase.getInstance().getReference(\"Users\")\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .setValue(user).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(context, \"Authentication Success.\",\n Toast.LENGTH_LONG).show();\n view.redirectToLogin();\n } else {\n Toast.makeText(context, \"Authentication Failed.\",\n Toast.LENGTH_LONG).show();\n }\n }\n });\n } else {\n Log.w(TAG, \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(context, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n }", "public void registerUser(View view) {\n TextView emailAddressField = (TextView) findViewById(R.id.registerEmailAddress);\n final String emailAddress = emailAddressField.getText().toString();\n\n TextView passwordField = (TextView) findViewById(R.id.registerPassword);\n final String password = passwordField.getText().toString();\n\n TextView nameField = (TextView) findViewById(R.id.registerName);\n final String name = nameField.getText().toString();\n\n final String company = \"Purple Store\";\n\n if(emailAddress.isEmpty() || password.isEmpty() || name.isEmpty()) {\n Toast.makeText(this, \"Email Address, password or name cannot be blank\",Toast.LENGTH_SHORT).show();\n return;\n }\n\n mAuth.createUserWithEmailAndPassword(emailAddress, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(TAG, \"createUserWithEmail:success\");\n FirebaseUser currentUser = mAuth.getCurrentUser();\n String uid = currentUser.getUid();\n\n // Write credentials in Fire Store\n User newUser = new User();\n newUser.createUser(uid, emailAddress, name, company);\n newUser.writeData();\n\n // Save the details on shared preferences for future calls\n SharedPreferences sharedPreferences = getSharedPreferences(\"USER_DETAILS\", Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"userId\", uid);\n editor.putString(\"emailAddress\", emailAddress);\n editor.putString(\"name\", name);\n editor.putString(\"companyId\", company);\n editor.apply();\n\n // Redirect to Dashboard\n Intent intent = new Intent(RegisterActivity.this, MainActivity.class);\n startActivity(intent);\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(RegisterActivity.this, task.getException().getMessage(),Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void getUserInformation() {\n userReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()){\n if(dataSnapshot.hasChild(\"fullName\")){\n name = dataSnapshot.child(\"fullName\").getValue().toString();\n }\n if(dataSnapshot.hasChild(\"phoneNumber\")){\n num = dataSnapshot.child(\"phoneNumber\").getValue().toString();\n }\n\n emailAddress = mAuth.getCurrentUser().getEmail();\n\n } else {\n Toast.makeText(OrderProductActivity.this, \"Profile details not completed\", Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "public void SignUp2(View view){\n\n mFirebaseAuth.createUserWithEmailAndPassword(EditEmail.getText().toString(),EditPass.getText().toString())\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n saveUser(EditFirstName.getText().toString(),EditLastName.getText().toString(),EditEmail.getText().toString(),SelectSpinner.getSelectedItem().toString());\n mUserDatabaseReference.push().setValue(mClassUser);\n EditFirstName.setText(\"\");\n EditLastName.setText(\"\");\n EditEmail.setText(\"\");\n EditPass.setText(\"\");\n\n if (!task.isSuccessful()) {\n// Toast.makeText(ActivitySignup.this, \"failed to sign up\",\n// Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n\n }", "private void SaveUserInformation(FirebaseUser user)\n {\n General.SetStringData(getApplicationContext(), Constants.USER_EMAIL, user.getEmail());\n General.SetStringData(getApplicationContext(), Constants.USER_NAME, user.getDisplayName());\n General.SetStringData(getApplicationContext(), Constants.USER_ID, user.getUid());\n General.SetStringData(getApplicationContext(), Constants.USER_LOGINED, \"true\");\n General.SetStringData(getApplicationContext(), Constants.USER_PASSWORD, password);\n\n user.getToken(true).addOnCompleteListener(LogInActivity.this, new OnCompleteListener<GetTokenResult>() {\n @Override\n public void onComplete(@NonNull Task<GetTokenResult> task) {\n General.SetStringData(LogInActivity.this, Constants.USER_TOKEN, task.getResult().getToken());\n Log.d(\"TOKEN\", task.getResult().getToken());\n }\n });\n if (user.getPhotoUrl() != null)\n General.SetStringData(getApplicationContext(), Constants.USER_PHOTO, user.getPhotoUrl().toString());\n else\n General.SetStringData(getApplicationContext(), Constants.USER_PHOTO, \"a\");\n }", "public void setUser(String user)\n {\n _user = user;\n }", "private static void updateUser() {\n\t currentUser = Structure.User(currentUser);\n\t CRUDUsers.compareWithRemote(currentUser).subscribe(new SingleSubscriber<User>() {\n\t\t @Override\n\t\t public void onSuccess(User value) {\n\t\t\t\tConnection.logIn(value);\n\t\t }\n\t\t\n\t\t @Override\n\t\t public void onError(Throwable error) {\n\t\t\t logOff();\n\t\t\t App.showMessage(error.getMessage());\n\t\t }\n\t });\n }", "public void setUser(User user) {\r\n this.user = user;\r\n }", "public User() {\n uid= 0;\n username = \"\";\n password = \"\";\n role = \"user\";\n status = false;\n updatedTime = new Timestamp(0);\n }", "@Override\n public void onSuccess(AuthResult authResult) {\n userWAPFirebase.create(newUser, firebaseAuth.getCurrentUser().getUid()).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.d(TAG, \"User \" + newUser.getUsername() + \" has been successfully created\");\n Toast.makeText(SignUpActivity.this, \"Sign up successful!\", Toast.LENGTH_SHORT).show();\n\n //Go back to Login Activity\n Intent loginIntent = new Intent(SignUpActivity.this, LoginActivity.class);\n loginIntent.putExtra(PASSWORD_KEY, etPasswordSignup.getText().toString());\n loginIntent.putExtra(EMAIL_KEY, newUser.getEmail());\n startActivity(loginIntent);\n }\n });\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 }", "private void registerUser(){\n final String email = editTextEmail.getText().toString().trim();\n final String password = editTextPassword.getText().toString().trim();\n final String name=editTextName.getText().toString().trim();\n final String joiningdate=editTextJoiningDate.getText().toString().trim();\n //final String uid=firebaseAuth.getCurrentUser().getUid();\n //checking if email and passwords are empty\n if(TextUtils.isEmpty(email)){\n Toast.makeText(this,\"Please enter email\",Toast.LENGTH_LONG).show();\n return;\n }\n\n if(TextUtils.isEmpty(password)){\n Toast.makeText(this,\"Please enter password\",Toast.LENGTH_LONG).show();\n return;\n }\n if(TextUtils.isEmpty(name)){\n Toast.makeText(this,\"Please enter Name\",Toast.LENGTH_LONG).show();\n return;\n }\n\n if(TextUtils.isEmpty(joiningdate)){\n Toast.makeText(this,\"Please enter Joining Date\",Toast.LENGTH_LONG).show();\n return;\n }\n //if the email and password are not empty\n //displaying a progress dialog\n\n progressDialog.setMessage(\"Registering Please Wait...\");\n progressDialog.show();\n\n getLocation();\n\n //creating a new user\n firebaseAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n\n\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.i(\"Hey Entered OnComplete\",\"\");\n //checking if success\n if(task.isSuccessful()){\n Log.i(\"Hey Entered issuccess\",\"\");\n User user= new User(name,joiningdate,email,loc);\n// Map map=new HashMap();\n// map.put(\"name\",name);\n// map.put(\"joining date\",joiningdate);\n// map.put(\"email\",email);\n// map.put(\"uid\",uid);\n database=FirebaseDatabase.getInstance();\n\n myRef=database.getReference(\"Users\");\n\n myRef.child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .setValue(user).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n Toast.makeText(MainActivity.this,\"Registration Successful\",Toast.LENGTH_LONG).show();\n startActivity(new Intent(getApplicationContext(),MenuActivity.class));\n }\n else{\n Toast.makeText(MainActivity.this,\"Registration Error\",Toast.LENGTH_LONG).show();\n }\n }\n });\n\n// String id=myRef.push().getKey();\n// myRef.child(id).setValue(user);\n\n\n }\n else{\n //display some message here\n Toast.makeText(MainActivity.this,\"Registration Error\",Toast.LENGTH_LONG).show();\n }\n progressDialog.dismiss();\n }\n });\n\n }", "public User() {\n this.id = 0;\n this.username = \"gfisher\";\n this.password = \"password\";\n this.email = \"[email protected]\";\n this.firstname = \"Gene\";\n this.lastname = \"Fisher\";\n this.type = new UserPermission(true, true, true, true);\n }", "public UserMember() {\r\n //this.email = \"[email protected]\";\r\n this.email = \"\";\r\n this.firstName = \"\";\r\n this.lastName = \"\";\r\n this.username = \"\";\r\n this.password = \"\";\r\n this.memberId = 0;\r\n }", "private void initializeDatabase() {\n fbProfile = Profile.getCurrentProfile();\n String userId = fbProfile.getId();\n user = new User();\n user.name = fbProfile.getName();\n database.getReference(\"Users\").child(userId).setValue(user);\n userRef = database.getReference(\"Users\").child(userId);\n populateDatabase(database, userRef);\n listenForUpdates(database, userRef);\n }", "private void firebaseAuthWithGoogle(AuthCredential credential) {\n\n\n try {\n// showProgressDialog();\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Utility.logData(\"signInWithCredential:onComplete:\" + task.isSuccessful());\n if (!task.isSuccessful()) {\n Utility.logData(\"signInWithCredential\" + task.getException().getMessage());\n task.getException().printStackTrace();\n Toast.makeText(LoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n } else {\n// createUserInFirebaseHelper(mUser);\n\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\n\n\n mDatabase.child(AppStringConstants.USER_ENTITY).\n child(Utility.encodeEmail(mUser.getEmail())).child(AppStringConstants.PROFILE_ENTITY).\n addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n try {\n if (snapshot.getValue() != null) {\n try {\n\n mUser = snapshot.getValue(UserModel.class);\n SessionManager.getInstance().createUser(mUser);\n SessionManager.getInstance().setCurrentuserRole(mUser.getRole());\n\n\n Utility.logData(\"logging user \\n\" + Objects.requireNonNull(mUser).toString());\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n } else {\n UserModel model = new UserModel();\n model.setEmail(mUser.getEmail());\n model.setName(mUser.getName());\n model.setPhoto(mUser.getPhoto());\n model.setIdToken(mUser.getIdToken());\n model.setRole(UserRole.USER);\n model.setCity(mUser.getCity());\n model.setSpecialisation(mUser.getSpecialisation());\n mDatabase.child(AppStringConstants.USER_ENTITY).\n child(Utility.encodeEmail(model.getEmail())).child(AppStringConstants.PROFILE_ENTITY).\n setValue(model);\n SessionManager.getInstance().createUser(model);\n SessionManager.getInstance().setCurrentuserRole(model.getRole());\n\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n\n });\n\n\n startMainActivity();\n\n\n Utility.showLongToast(\"Login successful\");\n\n\n }\n// hideProgressDialog();\n }\n });\n }catch (Exception e){\n Utility.logExceptionData(e);\n Utility.hideLoader(this);\n }\n }", "void addUser(User user) {\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_utilizador, user.getUser()); // Contact Name\n values.put(KEY_pass, user.getPass()); // Contact Phone\n values.put(KEY_Escola, user.getEscola());\n db.insert(tabela, null, values);\n db.close(); // Closing database connection\n }", "private void createUser(String Address, String Phone_number,String needy) {\n // TODO\n // In real apps this userId should be fetched\n // by implementing firebase auth\n if (TextUtils.isEmpty(userId)) {\n userId = mFirebaseDatabase.push().getKey();\n }\n\n com.glitch.annapurna.needy user = new needy(Address,Phone_number,needy);\n\n mFirebaseDatabase.child(userId).setValue(user);\n\n addUserChangeListener();\n }", "public User getCurrentUser() {\n return currentUser;\n }", "private void loadCurrentUser() {\n\n // Confirm the user is logged in\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n\n if (user == null) {\n finish();\n return;\n }\n\n mUserListener = new ModelChangeListener<Author>(AUTHOR, user.getUid()) {\n @Override\n public void onModelReady(Author model) {\n mUser = model;\n }\n\n @Override\n public void onModelChanged() {\n\n // Update the Adapter with the changes in the logged in user\n removeExistingFromResults(mResultList, mUser.getFriends());\n\n if (mSearchType == FOLLOW) {\n removeExistingFromResults(mResultList, mUser.getFollowing());\n } else {\n removeExistingFromResults(mResultList, mUser.getSentRequests());\n }\n\n mAdapter.setFriendList(mResultList);\n }\n };\n\n mService.registerModelChangeListener(mUserListener);\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 registerUser(String email, String password){\n fbAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(TAG, \"createUserWithEmail:success\");\n FirebaseUser user = fbAuth.getCurrentUser();\n updateUI(user);\n Toast.makeText(Signup.this, \"Registration success.\",\n Toast.LENGTH_SHORT).show();\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(Signup.this, \"Registration failed.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n }", "public void setCurrentUser(AVUser aVUser) {\n this.currentUser = aVUser;\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 }", "private void register() {\r\n if (mName.getText().length() == 0) {\r\n mName.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mEmail.getText().length() == 0) {\r\n mEmail.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mPassword.getText().length() == 0) {\r\n mPassword.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mPassword.getText().length() < 6) {\r\n mPassword.setError(\"password must have at least 6 characters\");\r\n return;\r\n }\r\n\r\n\r\n final String email = mEmail.getText().toString();\r\n final String password = mPassword.getText().toString();\r\n final String name = mName.getText().toString();\r\n\r\n FirebaseAuth.getInstance().createUserWithEmailAndPassword(email, password).addOnCompleteListener(getActivity(), new OnCompleteListener<AuthResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\r\n if (!task.isSuccessful()) {\r\n Snackbar.make(view.findViewById(R.id.layout), \"sign up error\", Snackbar.LENGTH_SHORT).show();\r\n } else {\r\n String uid = FirebaseAuth.getInstance().getCurrentUser().getUid();\r\n\r\n //Saves the user's info in the database\r\n Map<String, Object> mNewUserMap = new HashMap<>();\r\n mNewUserMap.put(\"email\", email);\r\n mNewUserMap.put(\"name\", name);\r\n\r\n FirebaseDatabase.getInstance().getReference().child(\"users\").child(uid).updateChildren(mNewUserMap);\r\n }\r\n }\r\n });\r\n\r\n }", "private void registerUserToFirebaseAuth() {\n Utils.showProgressDialog(this);\n Task<AuthResult> task = mAuth.createUserWithEmailAndPassword(etEmail.getText().toString().trim(), etPassword.getText().toString().trim());\n task.addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Utils.dismissProgressDialog();\n if (task.isSuccessful()) {\n String firebaseId = task.getResult().getUser().getUid();\n\n // Storage Image to Firebase Storage.\n addProfileImageToFirebaseStorage(firebaseId);\n\n } else {\n Utils.toast(context, \"Some Error Occurs\");\n }\n }\n });\n }", "@Override\n public User get(User user) {\n user.setName(\"zyq\");\n return user;\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser firebaseUser = firebaseOps.getCurrentFirebaseUser();\n if (firebaseUser.isEmailVerified()) {\n createUserObjectInDatabase(firebaseUser.getUid());\n\n } else {\n Toast.makeText(MainActivity.this, \"Please verify your email first\", Toast.LENGTH_SHORT).show();\n }\n }\n }", "private void writeNewUser(String name,String email,String password) {\n mDatabase.child(\"User\").child(name).child(\"Email\").setValue(email);\n mDatabase.child(\"User\").child(name).child(\"Password\").setValue(password);\n }", "private void initializeCurrentUser() {\n if (enableLoginActivity && mAuth.getCurrentUser() != null) {\n try {\n initializeUser();\n refreshGoogleCalendarToken();\n } catch (PetRepeatException e) {\n Toast toast = Toast.makeText(this, getString(R.string.error_pet_already_existing),\n Toast.LENGTH_LONG);\n toast.show();\n }\n\n if (mAuth.getCurrentUser() != null) {\n mAuth.getCurrentUser().getIdToken(false).addOnCompleteListener(task -> {\n user.setToken(Objects.requireNonNull(task.getResult()).getToken());\n });\n }\n }\n }", "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "public void setUser(User theUser) {\n\t\tmyUser = theUser;\n\t}", "public void setUser(User user) {\n this.user = user;\n }", "public void setUser(User user) {\n this.user = user;\n }", "public void setUser(User user) {\n this.user = user;\n }", "void registerUser(User newUser);", "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 }", "private void registerUser(final String email, final String password) {\n\n progressDialog.show();\n\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, dismiss dialog and start register activity\n progressDialog.dismiss();\n FirebaseUser user = mAuth.getCurrentUser();\n\n String email = user.getEmail();\n String uid = user.getUid();\n String username = mUserNameEdt.getText().toString().trim();\n int selectedId = radioGroup.getCheckedRadioButtonId();\n RadioButton radioSexButton = findViewById(selectedId);\n String gender = radioSexButton.getText().toString();\n\n //store the registered user info into firebase using Hashmap\n HashMap<Object, String> hashMap = new HashMap<>();\n\n hashMap.put(\"email\",email);\n hashMap.put(\"uid\",uid);\n hashMap.put(\"username\", username);\n hashMap.put(\"gender\", gender);\n\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference reference = database.getReference();\n\n reference.child(uid).setValue(hashMap);\n\n Toast.makeText(SignUpActivity.this, \"Registered...\\n\"+user.getEmail(), Toast.LENGTH_SHORT).show();\n startActivity(new Intent(SignUpActivity.this,UserProfileActivity.class));\n finish();\n\n } else {\n // If sign in fails, display a message to the user.\n progressDialog.dismiss();\n Toast.makeText(SignUpActivity.this, \"Authentication failed.\", Toast.LENGTH_SHORT).show();\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n //error, dismiss progress error, get and show the error message\n progressDialog.dismiss();\n Toast.makeText(SignUpActivity.this,\"\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void createUser(User user) {\n\n\t}" ]
[ "0.726678", "0.704623", "0.6978677", "0.69715834", "0.69145036", "0.68771714", "0.6857951", "0.68352485", "0.6789316", "0.6772101", "0.6766677", "0.6735389", "0.67007804", "0.66960275", "0.6645203", "0.66416246", "0.6641052", "0.6609239", "0.65804106", "0.655795", "0.6557407", "0.65457994", "0.65093005", "0.6507683", "0.65001386", "0.6486525", "0.6458445", "0.6446498", "0.64408934", "0.6439167", "0.6432544", "0.63893276", "0.63809633", "0.6379175", "0.63730973", "0.6371159", "0.6369199", "0.6356556", "0.63438344", "0.6341801", "0.633659", "0.6332862", "0.63305223", "0.6323921", "0.6311101", "0.63035613", "0.6303205", "0.62868315", "0.6277315", "0.6273762", "0.62729347", "0.6269073", "0.6268718", "0.62686783", "0.62667817", "0.62623966", "0.6261013", "0.6246981", "0.62415993", "0.62317204", "0.6227493", "0.6226481", "0.62204117", "0.6211561", "0.6210549", "0.6207724", "0.6207577", "0.62009573", "0.620064", "0.6196449", "0.6193482", "0.6192148", "0.6188362", "0.6184066", "0.6172845", "0.61697954", "0.6159727", "0.61520743", "0.61493075", "0.6144117", "0.6136693", "0.6135612", "0.6133938", "0.6124173", "0.6123066", "0.6116331", "0.61151284", "0.6112216", "0.6105183", "0.6100923", "0.6099442", "0.6095093", "0.6093865", "0.60884607", "0.6082931", "0.6082931", "0.6082931", "0.60801315", "0.6079561", "0.60694325", "0.60636413" ]
0.0
-1
checar que no esten nulos
public void verifyData() { saveDay(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }", "private int cantFantasmasRestantes() {\n // TODO implement here\n return 0;\n }", "private int verificarRemocao(No no){\n if(no.getDireita()==null && no.getEsquerda()==null)\n return 1;\n if((no.getDireita()==null && no.getEsquerda()!=null) || (no.getDireita()!=null && no.getEsquerda()==null))\n return 2;\n if(no.getDireita() != null && no.getEsquerda() != null)\n return 3;\n else return -1;\n }", "private boolean correcto() {\r\n return (casillas.size()>numCasillaCarcel); //&&tieneJuez\r\n }", "public static int cantNodosHojas(Nodo raiz)\r\n {\r\n if(raiz == null)\r\n {\r\n return 0;\r\n }\r\n else if(raiz.ramaDerecha == null && raiz.ramaIzquierda == null)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (cantNodosHojas(raiz.subArbolIzquierdo())) + (cantNodosHojas(raiz.subArbolDerecho()));\r\n }\r\n }", "public Boolean gorbiernoConPrestamos() {\n if (super.getMundo().getGobierno().getPrestamos().size() > 0)\n return true;\n return false;\n }", "public void ispisiSveNapomene() {\r\n\t\tint i = 0;// redni broj napomene\r\n\t\tint brojac = 0;\r\n\t\tfor (Podsjetnik podsjetnik : lista) {\r\n\r\n\t\t\ti++;\r\n\t\t\tSystem.out.println(i + \")\" + podsjetnik);\r\n\t\t\tbrojac = i;\r\n\t\t}\r\n\t\tif (brojac == 0) {\r\n\t\t\tSystem.out.println(\"Nema unesenih napomena!!\");\r\n\t\t}\r\n\r\n\t}", "@Test\n\tpublic void testNoNulos() {\n\t\tassertNotNull(\"Error: La bici es nula\", bicicleta);\n\t\tassertNotNull(\"Error: La velocidad es nula\", bicicleta.getVelocidad());\n\t\tassertNotNull(\"Error: El espacio es nulo\", bicicleta.getEspacioRecorrido());\n\t\tassertNotNull(\"Error: El piñon actual es nulo\", bicicleta.getPinhonactual());\n\t\tassertNotNull(\"Error: El plato actual es nulo\", bicicleta.getPlatoactual());\n\t\tassertNotNull(\"Error: El radio de la rueda es nulo\", bicicleta.getRadiorueda());\n\t}", "@Override\n public boolean IsEmpty() {\n if (tamano == 0) {\n return true;\n } else {\n return false;\n }//FIn del else\n }", "protected boolean colaVacia() {\r\n return ini == -1;\r\n }", "public int cantHijosIzquierdos() {\n if (NodoBinario.esNodoVacio(this.raiz)) {\n return 0;\n }\n int cantHijosIzq = 0;\n Queue<NodoBinario<T>> colaDeNodos = new LinkedList<>();\n colaDeNodos.offer(this.raiz);\n while (!colaDeNodos.isEmpty()) {\n NodoBinario<T> nodoActual = colaDeNodos.poll();\n if (!nodoActual.esHijoIzquiedoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoIzquierdo());\n cantHijosIzq++;\n }\n if (!nodoActual.esHijoDerechoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoDerecho());\n }\n }\n return cantHijosIzq;\n }", "public boolean tienePapel()\n {\n //COMPLETE\n return this.hojas > 0;\n }", "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "public boolean souvislost(){\n\t\t\n\t\tif(pole.size() != pocetVrcholu){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "public boolean restarUno(){\n\t\tif (numero>0){\n\t\t\tnumero--;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isEmpty() {\n\t\treturn tamano == 0;\n\t}", "public void verificar_que_se_halla_creado() {\n\t\t\n\t}", "public int puntoUno() {\n int contador = 0;\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i] != null && jugadores[i].getCantPartidosJugados() > 10) {\n contador++;\n }\n }\n return contador;\n }", "private boolean isGameOverAutomatico() {\n\t\tif(this.getEquipesAtivas().size() == 1)\n\t\t\treturn true;\n\t\t\n\t\tboolean temCosmo = false;\n\t\tfor(Equipe equipe : this.getEquipesAtivas()){\n\t\t\tif(equipe.getCosmo() > 0){\n\t\t\t\ttemCosmo = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn !temCosmo;\n\t}", "@Override\n public int size() {//por Niveles\n if (this.esArbolVacio()) {\n return 0; //Arbol Vacio\n }\n int cantidadDeNodos = 0;\n Queue<NodoBinario<T>> colaDeNodos = new LinkedList<>();\n colaDeNodos.offer(raiz);\n while (!colaDeNodos.isEmpty()) {\n NodoBinario<T> nodoActual = colaDeNodos.poll();\n cantidadDeNodos++;\n if (!nodoActual.esHijoIzquiedoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoIzquierdo());\n }\n if (!nodoActual.esHijoDerechoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoDerecho());\n }\n }\n return cantidadDeNodos; //Lista con los datos(En el orden de este recorrido)\n }", "public int checkforNull() {\r\n\t\t int notNull=0;\r\n\t\t for(int a=0; a<populationSize();a++) {\r\n\t\t\t if(getTour(a)!=null) {\r\n\t\t\t\t notNull++;\r\n\t\t\t }\r\n\t\t }\r\n\t\t return notNull;\r\n\t }", "private int obstaculos() {\n\t\treturn this.quadricula.length * this.quadricula[0].length - \n\t\t\t\tthis.ardiveis();\n\t}", "public int AmbosHijos() { //Hecho por mi\n if (this.esArbolVacio()) {\n return 0; //Arbol vacio\n }\n int ambos = 0;\n Queue<NodoBinario<T>> colaDeNodos = new LinkedList<>();\n colaDeNodos.offer(raiz);\n while (!colaDeNodos.isEmpty()) {\n NodoBinario<T> nodoActual = colaDeNodos.poll();\n if (!NodoBinario.esNodoVacio(nodoActual.getHijoIzquierdo())\n && !NodoBinario.esNodoVacio(nodoActual.getHijoDerecho())) {\n ambos++;\n }\n if (!nodoActual.esHijoIzquiedoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoIzquierdo());\n }\n if (!nodoActual.esHijoDerechoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoDerecho());\n }\n }\n return ambos;\n }", "public boolean vacio() {\r\n return (tamaño == 0);\r\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\tboolean respuesta = true;\n\t\tif(N > 0)\n\t\t{\n\t\t\trespuesta = false;\n\t\t}\n\t\treturn respuesta;\n\t}", "private int numeroCuentas() {\r\n\t\tint cuentasCreadas = 0;\r\n\t\tfor (Cuenta cuenta : this.cuentas) {\r\n\t\t\tif (cuenta != null) {\r\n\t\t\t\tcuentasCreadas++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cuentasCreadas;\r\n\t}", "public int cuantosCursos(){\n return inscripciones.size();\n }", "public int cantHijosIzquierdosR() {\n return this.cantHijosIzquierdosR(this.raiz);\n }", "private int size() {\n\t\treturn cerraduras.size();\n\t}", "@Override\r\n\tpublic boolean isempty() {\n\t\treturn count<=0;\r\n\t\t\r\n\t}", "public boolean prestamo(){\n boolean prestado = true;\n if (cantPres < cantLibro) {\n cantPres++;\n } else {\n prestado = false;\n }\n return prestado;\n }", "@Override\r\n\tpublic int contarPasajeros() {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic void verVehiculosDisponibles() {\n\t\tif(getCapacidad() > 0) {\n\t\t\tSystem.out.println(\"Plazas disponibles : \" + getCapacidad() + \" plazas, peso disponible : \" + getPeso() + \" kg, Carros disponibles: \" + \" 1 \" + \" Carro disponible, Capacidad de Personas : 4 personas, Peso maximo : 500 kg\");\n\t\t}else\n\t\t{\n\t\t\tSystem.out.println(\"Plazas disponibles : \" + getCapacidad() + \" plazas, peso disponible : \" + getPeso() + \" kg, Carros disponibles: \" + \" 0 \" + \" Carro disponibles, Capacidad de Personas : 4 personas, Peso maximo : 500 kg\");\n\t\t}\n\t\t\n\t}", "public boolean esCompuesto() {\n\t\treturn !this.atributos.isEmpty();\n\t}", "public boolean esConexo() {\n\t\tboolean result = true;\n\t\tint indice = 0;\n\t\tBusquedaEnProfundidad busqueda = new BusquedaEnProfundidad(this, 0);\n\n\t\twhile (result && indice < cantNodos) {\n\t\t\tif (!busqueda.estaVisitado(indice))\n\t\t\t\tresult = false;\n\t\t\tindice++;\n\t\t}\n\n\t\treturn result;\n\t}", "public int darCantidadHijos( )\r\n {\r\n return hijos != null ? hijos.darLongitud( ) : 0;\r\n }", "@Override\n\tpublic int contar() {\n\t\treturn comision.size();\n\t}", "public int darCantidadSalones()\n {\n return salones.size( );\n }", "public void verEstado(){\n for(int i = 0;i <NUMERO_AMARRES;i++) {\n System.out.println(\"Amarre nº\" + i);\n if(alquileres.get(i) == null) {\n System.out.println(\"Libre\");\n }\n else{\n System.out.println(\"ocupado\");\n System.out.println(alquileres.get(i));\n } \n }\n }", "public static int check() {\r\n\t\tint num = 0;\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tnum = input.nextInt();\t\t\t// unos \r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\t\t\t\t// hvatanje greske\r\n\t\t\t\tSystem.out.println(\"Pogresan unos, probajte ponovo\");\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t}\r\n\t\t} while (true);\r\n\t\treturn num;\r\n\t}", "public static void nomovecheck(){\n\t\tnomovecount=0;\n\t\tboardcheck(\"x\");\n\t\tboardcheck(\"o\");\n\t}", "public boolean isEmpty() {//check if empty\n return N == 0;\n }", "private boolean temMunicao() {\n\t\t\n\t\tif (round<1) {\n\t\t\tsetSemMunicao(true);\n\t\t\treturn false;\n\t\t\t\n\t\t}else \n\t\t\tsetSemMunicao(false);\n\t\t\n\t\t\n\t\treturn true;\n\t}", "public boolean getUsuarioSuscrito(){\n return !(suscribirClientBean.getUsuarioSuscrito(idOferta).length == 0);\r\n }", "private boolean noMessage() {\n\t\treturn nbmsg==0;\n\t}", "public boolean NoEnPantalla() {\n\t\treturn x + xmapa + anchura < 0 ||\n\t\t\t\tx + xmapa - anchura > PanelJuego.ANCHURA ||\n\t\t\t\ty + ymapa + altura < 0 ||\n\t\t\t\ty + ymapa - altura > PanelJuego.ALTURA;\n\t}", "@Override\n\tpublic boolean estVide() {\n\t\treturn getNbClients()==0;\n\t}", "protected boolean colaLlena() {\r\n return fin == datos.length - 1;\r\n }", "private void verificaVencedor(){\n\n // Metodo para verificar o vencedor da partida\n\n if(numJogadas > 4) {\n\n String vencedor = tabuleiro.verificaVencedor();\n\n vencedor = (numJogadas == tabuleiro.TAM_TABULEIRO && vencedor == null) ? \"Deu Velha!\" : vencedor;\n\n if (vencedor != null) {\n\n mostraVencedor(vencedor);\n temVencedor = true;\n\n }\n\n }\n\n }", "private static boolean nivelPasado() {\r\n\t\tint[] contPelotas = new int[ COLORES_POSIBLES.length ]; // Contadores por color\r\n\t\tfor (int i=0; i<tablero.size(); i++) {\r\n\t\t\tPelota pelota = tablero.getPelota(i);\r\n\t\t\tint contColor = Arrays.asList(COLORES_POSIBLES).indexOf( pelota.getColor() ); // Posición del color de la pelota en el array de contadores\r\n\t\t\tcontPelotas[contColor]++;\r\n\t\t}\r\n\t\tfor (int contador : contPelotas) if (contador>=tamanyoTablero-2) return false;\r\n\t\treturn true;\r\n\t}", "public void nouvelleQuestion() {\n getAll();\n Random random = new Random();\n do {\n questionObjet = listeQuestions.get(random.nextInt(listeQuestions.size()));\n niveauUtil = questionObjet.getNiveau();\n }\n while (niveauUtil != niveau);\n questionUtil = questionObjet.getQuestion();\n reponseUtil = questionObjet.getReponse();\n }", "public void verEstadoAmarres() {\n System.out.println(\"****************************************************\");\n for(int posicion = 0; posicion<NUMERO_AMARRES; posicion++) {\n int i = 0;\n boolean posicionEncontrada = false;\n while(!posicionEncontrada && i<alquileres.size()) {\n if(alquileres.get(i)!=null) {\n if(alquileres.get(i).getPosicion()==posicion) {\n System.out.println(\"Amarre [\"+posicion+\"] está ocupado\");\n System.out.println(\"Precio: \" + alquileres.get(i).getCosteAlquiler());\n posicionEncontrada = true;\n }\n }\n i++;\n }\n if(!posicionEncontrada) {\n System.out.println(\"Amarre [\"+posicion+\"] No está ocupado\");\n }\n }\n System.out.println(\"****************************************************\");\n }", "public boolean vacia()\n {\n return this.repositorio.isEmpty();\n \n }", "@Override\r\n\tpublic boolean cadastrar(Loja loja) {\n\t\treturn false;\r\n\t}", "public boolean esMorosa() {\r\n\t\tboolean esMorosa = false;\r\n\t\tfor (Cuenta c : cuentas) {\r\n\t\t\tif (c != null) {\r\n\t\t\t\tif (c.getSaldo() < 0) {\r\n\t\t\t\t\tesMorosa = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn esMorosa;\r\n\t}", "private boolean validarMezcla() {\n\t\tint grado = nodos.get(0).getGrado();\n\t\tboolean retorno = true;\n\t\tfor (Nodo n : nodos) {\n\t\t\tif (n.getGrado() != grado) {\n\t\t\t\tif (n.getGrado() < grado) {\n\t\t\t\t\tSystem.err.println(\"Error en la mezcla del grafo\");\n\t\t\t\t\tSystem.exit(4321);\n\t\t\t\t} else\n\t\t\t\t\tgrado = n.getGrado();\n\t\t\t}\n\t\t}\n\t\treturn retorno;\n\t}", "@Test\n\tpublic void testIncluye() {\n\t\tassertFalse(l.incluye(0));\n\t\t\n\t\t//Test de busqueda sobre el primer elemento\n\t\tl.agregar(0, 0);\n\t\tassertTrue(l.incluye(0));\n\t\tassertFalse(l.incluye(1));\n\t\t\n\t\t//Test con mas elementos\n\t\tl.agregar(1, 1);\n\t\tl.agregar(2, 2);\n\t\tassertTrue(l.incluye(1));\n\t\tassertFalse(l.incluye(4));\n\t\t\n\t}", "@Test\n\tpublic void testRicercaArticolo1() {\n\t\tString ricerca = \"No\";\n\t\tArrayList<Articolo> trovati = (ArrayList<Articolo>) \n\t\t\t\tb1.ricercaArticolo(ricerca);\n\t\tassertTrue(\"La lista deve essere vuota\", trovati.isEmpty());\n\t}", "public boolean Vacia (){\n return cima==-1;\n \n }", "public boolean perdeu() {\n\t\tif(tabuleiro.getAtiradores().length==0)\n\t\t{\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "@Test\n public void nelioMuodostuu() {\n ArrayList lista=this.tetrimino.palautaKuvio();\n assertEquals(lista.size(), 4);\n \n }", "@Override\n public int contarHojas(){\n return (super.contarHojas());\n }", "boolean hasN();", "boolean hasN();", "@Test\r\n public void CriterioUnidadNoCumple()\r\n {\r\n CriterioDeCorreccion criterio = new UnaDeCadaUnidadCriterioDeCorreccion();\r\n ExamenCorregido corregido = generarExamenCorregidoNoAprobado(criterio);\r\n \r\n assertFalse(criterio.cumple(corregido.getNotasPregunta()));\r\n assertEquals(corregido.getNota(), 0);\r\n }", "@Override\n\t\tpublic void afectarPorNebulosaDeAndromeda(int cantidadturnos) {\n\t\t}", "@Override\n\t\tpublic void afectarPorNebulosaDeAndromeda(int cantidadturnos) {\n\t\t}", "@Override\n\t\tpublic void afectarPorNebulosaDeAndromeda(int cantidadturnos) {\n\t\t}", "public void carroNoEncontrado(){\n System.out.println(\"Su carro no fue removido porque no fue encontrado en el registro\");\n }", "public void zeraEmpates() {\r\n contaEmpates = 0;\r\n }", "public int liczbaelnastosie() {\n\t\treturn 0;\n\t}", "public boolean isEmpty(){return n==0;}", "public boolean isEmpty(){\n\t\treturn (howMany==0);\n\t}", "int getMissingCount();", "public int getNombreNoeud()\t{\r\n \treturn this.noeuds.size();\r\n }", "public boolean perdu() {\r\n return this.robots.isEmpty();\r\n }", "@Override\n public boolean isEmpty(){\n return (count == 0);\n }", "public boolean estPlein() {\n return this.tapis.size() == capacite;\n }", "@SuppressWarnings(\"SuspiciousMethodCalls\")\n private int houve_estouro()\n {\n int retorno = 0;\n boolean checar = false;\n for (Map.Entry i: janela.entrySet())\n {\n if (janela.get(i.getKey()).isEstouro())\n {\n janela.get(i.getKey()).setEstouro(false);\n retorno =(int) i.getKey();\n checar = true;\n break;\n }\n }\n for(Map.Entry i2: janela.entrySet()) janela.get(i2.getKey()).setEstouro(false);\n if(checar) return retorno;\n else return -69;\n }", "private void afficheSuiv(){\n\t\ttry{ // Essayer ceci\n\t\t\tif(numCourant <= rep.taille()){\n\t\t\t\tnumCourant ++;\n\t\t\t\tPersonne e = rep.recherchePersonne(numCourant); // Rechercher la personne en fonction du numCourant\n\t\t\t\tafficherPersonne(e);\n\t\t\t}else{\n\t\t\t\tafficherMessageErreur();\n\t\t\t}\n\t\t}catch(Exception e){ // Permet de voir s'il y a cette exception\n\t\t\tafficherMessageErreur();\n\t\t\tnumCourant --;\n\t\t}\n\t}", "public boolean comprobarLibrosPrestados(Estudiante estudiante){\n try{\n return estudiante.getPrestamosActuales().size() == 3;\n }\n catch(NullPointerException e){\n return false;\n } \n }", "public boolean possuiMonopolioEmAlgumGrupoDeCores(){\r\n verificaMonopolioDePropriedades();\r\n return this.monopolioNoGrupoDeCor.size() > 0;\r\n }", "void negarAnalise();", "public boolean isEmpty(){return count==0;}", "public void pierdeUnaVida() {\n numeroDeVidas--;\n }", "public void diminuiInSitu(){\n if(quantidade_in_situ>0)\n quantidade_in_situ--;\n else\n return;\n }", "public boolean isEmpty(){\n return mPezCount == 0;\n }", "public boolean comprobarExistencias(Libro libro){\n return libro.getCantidadCopias() > 0;\n }", "public Integer cantidadCompras(){\n\t\t// Implementar\n\t\treturn this.compras.size();\n\t}", "private Boolean precond() {\r\n\t\tcalculoCantidadSacar(grupoPuestosController.getIdConcursoPuestoAgr());\r\n\t\t/**\r\n\t\t * fin incidencia 0001649\r\n\t\t */\r\n\t\tBoolean respuesta = validacionesIteracion();\r\n\t\treturn respuesta;\r\n\t}", "private void nullstillFordeling(){\n int i = indeks;\n politi = -1;\n mafiaer = -1;\n venner = -1;\n mafia.nullstillSpesialister();\n spillere.tømTommeRoller();\n for (indeks = 0; roller[indeks] == null; indeks++) ;\n fordeling = null;\n }", "private boolean isEmpty(){\n return (numInstances() == 0);\n }", "@Override\n\tpublic boolean estPleine() {\n\t\treturn getNbClients()==capacite;\n\t}", "@Test\n public void testExistenceTestuJedneOsoby() {\n osBeznyMuz = new Osoba(120, 150, Barva.MODRA);\n testJedneOsoby(osBeznyMuz, 120, 150, 70, 140, Barva.MODRA);\n }", "private boolean estPlein() {\n return (nbAssoc == associations.length);\n }", "public void disconnetti() {\n\t\tconnesso = false;\n\t}", "private void dieIfNoTreasures(){\n if(this.hiddenTreasures.isEmpty() && this.visibleTreasures.isEmpty()){\n this.die();\n }\n }", "public static int inputCheckI() {\r\n\t\tint unos = 0;\t// pocetna vrijednost\r\n\t\tboolean inputCheck = true;\t//kontrolna promjenljiva\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tunos = input.nextInt();\t//ucitavanje unosa i provjera da li je negativan broj\r\n\t\t\t\tif (unos <= 0) {\r\n\t\t\t\t\tSystem.out.println(\"Pogresan unos. Pokusajte ponovo: \");\t//ako jeste ispisi poruku\r\n\t\t\t\t\tinputCheck = true;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\telse inputCheck = false;\t//ako je sve ok, kontrolna promjenljiva false, vrati unos\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcatch (InputMismatchException ex) {\t//u slucaju pogresnog unosa\r\n\t\t\t\tSystem.out.println(\"Pogresan unos. Pokusajte ponovo: \");\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t}\r\n\t\t} while (inputCheck);\r\n\t\treturn unos;\r\n\t}", "public boolean gano() {\r\n\t\tboolean gano = false;\r\n\t\tint contador = 0;\r\n\t\tint c = (casillas.length * casillas[0].length) - cantidadMinas;\r\n\t\tfor(int i = 0; i< casillas.length && !gano; i++) {\r\n\t\t\tfor(int j = 0; j<casillas[i].length && !gano; j++) {\r\n\t\t\t\tif(casillas[i][j].esMina() == false) {\r\n\t\t\t\tif(casillas[i][j].darSeleccionada() == true) {// si no es mina\r\n\t\t\t\t\tcontador++;\r\n\t\t\t\t\tif(contador == c) {// no ha sido seleccionada\r\n\t\t\t\t\t\tgano = true;\r\n\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}\r\n\t\treturn gano;\r\n\t}", "public boolean allGone()\n {\n return pellets.isEmpty();\n }", "public boolean isEmpty()\r\n { return N == 0; }" ]
[ "0.7315156", "0.6673286", "0.6560864", "0.65496486", "0.6511134", "0.65002584", "0.64702076", "0.6454979", "0.6425718", "0.6378976", "0.6373899", "0.63409483", "0.63349605", "0.63325655", "0.6324648", "0.6290648", "0.6240914", "0.61825603", "0.6144651", "0.6128173", "0.6121702", "0.6097924", "0.60728675", "0.6066191", "0.6060241", "0.6053824", "0.6037513", "0.6021309", "0.59946996", "0.5994515", "0.59708065", "0.59705263", "0.5957393", "0.5950739", "0.5945948", "0.5943331", "0.5938765", "0.59385484", "0.5935375", "0.5934828", "0.5930682", "0.5927466", "0.5918943", "0.59021086", "0.59001505", "0.58993375", "0.5898498", "0.58960944", "0.58959013", "0.58817697", "0.58800834", "0.5868119", "0.58604234", "0.58560866", "0.5854883", "0.5854043", "0.5845496", "0.58452004", "0.5842103", "0.58409125", "0.58340544", "0.58337843", "0.58212715", "0.58212715", "0.58207756", "0.5811856", "0.5811856", "0.5811856", "0.58099914", "0.58044326", "0.58032197", "0.5802254", "0.58004665", "0.57882863", "0.5776102", "0.57698876", "0.5768976", "0.5763364", "0.5758393", "0.57561255", "0.57508045", "0.5741964", "0.5738845", "0.57385427", "0.5738332", "0.57373583", "0.57356113", "0.5735548", "0.57233506", "0.57231367", "0.57202035", "0.57147694", "0.57083976", "0.5708021", "0.5703284", "0.5701192", "0.57011056", "0.56993043", "0.56913215", "0.5687644", "0.5673804" ]
0.0
-1
databaseReference.push().setValue(day); UUID add objects on day, before will add them on firebase. else,
public void saveDay() { day.setServices(serviciosTotales); day.setTasks(tasksTotales); databaseReference.child(day.getDate() + "_" + day.getUserId()).setValue(day); Toast.makeText(context, "Creando archivo para enviar por correo.", Toast.LENGTH_LONG).show(); //todo, so far it will keep updating the day askPermissions(); createExcel(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 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 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 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 logHappeningClick(String happeningId, String userId){\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\n mDatabase.child(\"analytics\").child(\"happenings\").child(happeningId).child(\"clicks\").child(userId).push().setValue(System.currentTimeMillis(), new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n if (databaseError == null) {\n Log.i(\"AnalyticsService:\",\"logHappeningClick: success\");\n }\n }\n });\n\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 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 }", "private void addArticleInPersonalBoard(final Article article, final String boardName) {\n final DatabaseReference database;\n database = FirebaseDatabase.getInstance().getReference();\n\n database.child(\"PersonalBoard\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n DatabaseReference personalBoardDBRef = null;\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n if(snapshot.hasChild(email.split(\"@\")[0])){\n dataSnapshot = snapshot.child(email.split(\"@\")[0]);\n personalBoardDBRef = database.child(\"PersonalBoard\").child(snapshot.getKey()).child(email.split(\"@\")[0]);\n break;\n }\n }\n Map personalBoardArticle = new HashMap();\n personalBoardArticle.put(\"author\", article.getAuthor());\n personalBoardArticle.put(\"description\", article.getDescription());\n personalBoardArticle.put(\"link\", article.getLink());\n personalBoardArticle.put(\"publishedDate\", article.getPublishedDate());\n personalBoardArticle.put(\"thumbnailLink\", article.getThumbnailLink());\n personalBoardArticle.put(\"title\", article.getTitle());\n if(personalBoardDBRef == null) {\n Map personalBoardArticleKey = new HashMap();\n personalBoardArticleKey.put(\"1\",personalBoardArticle);\n\n Map personalBoard = new HashMap();\n personalBoard.put(boardName, personalBoardArticleKey);\n\n Map personalBoardKey = new HashMap();\n personalBoardKey.put(\"1\", personalBoard);\n\n Map myPersonalBoard = new HashMap();\n myPersonalBoard.put(email.split(\"@\")[0],personalBoardKey);\n\n database.child(\"PersonalBoard\").push().setValue(myPersonalBoard);\n } else {\n Boolean boardExists = false;\n for(DataSnapshot snapshot : dataSnapshot.getChildren()) {\n if(snapshot.child(boardName).exists()){\n boardExists = true;\n personalBoardDBRef = personalBoardDBRef.child(snapshot.getKey()).child(boardName);\n break;\n }\n }\n if(boardExists) {\n personalBoardDBRef.push().setValue(personalBoardArticle);\n } else {\n Map personalBoardArticleKey = new HashMap();\n personalBoardArticleKey.put(\"1\",personalBoardArticle);\n\n Map personalBoard = new HashMap();\n personalBoard.put(boardName, personalBoardArticleKey);\n\n personalBoardDBRef.push().setValue(personalBoard);\n }\n }\n }\n\n @Override\n public void onCancelled(DatabaseError d) {\n Log.d(\"Login DbError Msg ->\", d.getMessage());\n Log.d(\"Login DbError Detail ->\", d.getDetails());\n }\n });\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 }", "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 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 addItem(Days day)\n {\n // set a bunch of different values for different columes (list of values)\n ContentValues values = new ContentValues();\n values.put(Constants.DAY_NAME, day.getDays());\n values.put(Constants.Main_Assignment_NAME, day.getMainAssignment());\n SQLiteDatabase sqLiteDatabase = getWritableDatabase(); // database we writing too\n sqLiteDatabase.insert(Constants.TABLE_NAME,null,values);//Table,null,values (inserts new row)\n sqLiteDatabase.close();\n }", "@Insert\n long insertEggDaily(EggDaily eggDaily);", "private void pendingRecord() {\n\n String userId = FirebaseAuth.getInstance().getCurrentUser().getUid();\n\n DatabaseReference pendingRef = FirebaseDatabase.getInstance().getReference().child(\"Pending\");\n\n DatabaseReference providerPendingRef = FirebaseDatabase.getInstance().getReference().child(\"Users\").child(\"Providers\").child(userId).child(\"pending\");\n DatabaseReference consumerPendingRef = FirebaseDatabase.getInstance().getReference().child(\"Users\").child(\"Consumers\").child(consumerId).child(\"pending\");\n\n\n // DatabaseReference schedConRef = FirebaseDatabase.getInstance().getReference().child(\"Users\").child(\"Consumers\").child(consumerId).child(\"RequestServiceSchedule\").child(dateWork);\n // DatabaseReference schedProRef = FirebaseDatabase.getInstance().getReference().child(\"Users\").child(\"Providers\").child(userId).child(\"WorkSchedule\").child(dateWork);\n\n\n requestId = pendingRef.push().getKey(); ///////creating distinct Key\n\n providerPendingRef.child(requestId).setValue(true);\n consumerPendingRef.child(requestId).setValue(true);\n\n\n HashMap mapPendingSched = new HashMap();\n\n // mapProSched.put(\"serviceID\", serviceId);\n mapPendingSched.put(\"consumerId\", consumerId);\n mapPendingSched.put(\"providerId\", userId);\n mapPendingSched.put(\"consumerName\",schedConName );\n mapPendingSched.put(\"consumerPhone\", schedConPhone);\n mapPendingSched.put(\"consumerServiceRequest\", consumerRequest);\n mapPendingSched.put(\"houseLocation\", houseToWork);\n mapPendingSched.put(\"payment\", paymentTobe);\n mapPendingSched.put(\"dateSched\", dateWork);\n mapPendingSched.put(\"timeRequest\", timeWork);\n mapPendingSched.put(\"consumerNote\", consuNote);\n mapPendingSched.put(\"profileConImageUrl\", schedConProfileImage);\n mapPendingSched.put(\"providerName\",schedProName );\n mapPendingSched.put(\"providerAge\",schedProAge );\n mapPendingSched.put(\"providerPhone\", schedProPhone);\n mapPendingSched.put(\"profileProImageUrl\", schedProProfileImage);\n\n pendingRef.child(requestId).updateChildren(mapPendingSched);\n\n // HashMap mapConSched = new HashMap();\n\n // mapConSched.put(\"serviceID\", serviceId);\n // mapConSched.put(\"providerId\", providerFoundID);\n // mapConSched.put(\"consumerId\", userId);\n\n // mapConSched.put(\"consumerServiceRequest\", nRequestServiceType);\n // mapConSched.put(\"houseLocation\", nAddress);\n // mapConSched.put(\"charge\", nPayment);\n // mapConSched.put(\"serviceDateToWork\", nServiceDate);\n // mapConSched.put(\"aveRating\", ratingAverage);\n // mapConSched.put(\"consumerNote\", nConsumerNote);\n\n // schedConRef.updateChildren(mapConSched);\n\n\n\n // private String , , , , , , ;\n\n\n\n\n///////// consumerName, consumerPhone, , , , , , , , providerName, providerPhone;\n\n\n\n\n\n\n////////////////\n\n }", "private void subirLista(){\n DatabaseReference db_lista = db_reference.child(\"Asistencias\");\n HashMap<String, String> dataLista = new HashMap<String, String>();\n dataLista.put(\"evento\",etNombreCurso.getText().toString());\n dataLista.put(\"fecha\", etFecha.getText().toString());\n dataLista.put(\"lista\", \"-\");\n db_lista.push().setValue(dataLista);\n }", "@Override\n public void onClick(View view) {\n\n\n\n\n DatabaseReference2.push().setValue(weeklyInformation);\n\n Toast.makeText(Document.this, \"Your weekly record was sent successfully!\",\n Toast.LENGTH_LONG).show();\n\n\n weeklyInformation.result1 = \"\";\n weeklyInformation.result2 = \"\";\n weeklyInformation.result3 = \"\";\n weeklyInformation.result4 = \"\";\n weeklyInformation.result5 = \"\";\n weeklyInformation.result6 = \"\";\n weeklyInformation.result7 = \"\";\n weeklyInformation.result8 = \"\";\n weeklyInformation.result9 = \"\";\n weeklyInformation.result10 = \"\";\n weeklyInformation.result11 = \"\";\n weeklyInformation.result12 = \"\";\n weeklyInformation.result13 = \"\";\n weeklyInformation.result14 = \"\";\n\n\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n String dvalue = dataSnapshot.getValue(String.class);\n\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference upd = database.getReference(\"Info\").child(FirebaseAuth.getInstance().getCurrentUser().getUid()).child(\"olddate\");\n upd.setValue(dvalue);\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 }", "private void updateChatDetails(){\n Map<String,Object> chatAddMap = new HashMap<>();\n chatAddMap.put(\"seen\",false);\n chatAddMap.put(\"timestamp\", ServerValue.TIMESTAMP);\n\n DatabaseReference chatRef = rootRef.child(\"Chat\").child(current_user.getUid()).child(chatUserId).getRef();\n //Add to Chat\n chatRef.updateChildren(chatAddMap).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.i(\"Checkkkkk\",\"ssss\");\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 }", "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 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 }", "private void sendMessageFirebase(String name, String content, String image, String uid, String url){\n FirebaseDatabase firebaseDatabase; //Firebase Database 관리 객체참조변수\n DatabaseReference roodIdReference;\n Calendar calendar = Calendar.getInstance(); //현재 시간을 가지고 있는 객체\n String time = calendar.get(Calendar.HOUR_OF_DAY) + \":\" + calendar.get(Calendar.MINUTE);\n\n ChatMessageItem messageItem = new ChatMessageItem(name, content, time, image, uid, url);\n\n firebaseDatabase = FirebaseDatabase.getInstance();\n roodIdReference = firebaseDatabase.getReference(roomID);\n roodIdReference.push().setValue(messageItem);\n }", "@Override\n //this one is called when days are added and also the first time the database is called\n //therefore should bring all the workingdays from the database\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n Object object = dataSnapshot.getValue();\n if (dataSnapshot.getKey().equals(\"workInts\")) {\n List<Long> longList = (List) dataSnapshot.getValue();\n workingDays = ConvertHashToList(longList);\n }\n if (dataSnapshot.getKey().equals(\"holidays\")) {\n List<Long> longList = (List) dataSnapshot.getValue();\n holidays = ConvertHashToList(longList);\n }\n if (dataSnapshot.getKey().equals(\"requested_holidays\")) {\n List<Long> longList = (List) dataSnapshot.getValue();\n requestedHolidays = ConvertHashToList(longList);\n //because the worker only can modify his requested_holidays only here makes sense...\n requestedHolidaysaux = (HashSet) requestedHolidays.clone();\n int hola = 4;\n }\n // I will need the requestedHolidays in order to tell the admin and add them to holidays\n if (dataSnapshot.getKey().equals(\"requestedHolidays\")) {\n List<Long> longList = (List) dataSnapshot.getValue();\n requestedHolidays = ConvertHashToList(longList);\n }\n //drawMonth(workingDays, holidays, requestedHolidays);//here i should have the days from the database\n Worker worker = dataSnapshot.getValue(Worker.class);\n String laestring = dataSnapshot.getKey();//i think this is the id\n if (worker != null) {\n if (laestring.equals(mUserID)) {\n //if (worker.getNumber_id().equals(mUserID)) {\n List<Long> longList = worker.getWorkInts();\n List<Long> longListHolidays = worker.getHolidays();\n List<Long> longRequested = worker.getRequestedHolidays();\n if (longRequested.size() != 0 && isAdmin) {\n AlertDialog.Builder builder = new AlertDialog.Builder(CalendarActivity.this);\n builder.setMessage(R.string.dialog_message).setTitle(R.string.dialog_title);\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //List<Long> auxlis = new ArrayList<Long>();\n //auxlis = makeListOfDatesLong((requestedHolidays));\n //mDatabaseReferenceWorkers.child(mUserID).child(\"holidays\").setValue(auxlis);\n //mDatabaseReferenceWorkers.child(mUserID).child(\"requestedHolidays\").removeValue();\n Toast.makeText(getApplicationContext(), \"Holidays accepted\", Toast.LENGTH_SHORT).show();\n okButton.setText(ADMIN_BUTTON_ACCEPT_HOLIDAYS);\n }\n });\n AlertDialog dialog = builder.create();\n\n dialog.show();\n }\n workingDays = ConvertHashToList(longList);\n holidays = ConvertHashToList(longListHolidays);\n requestedHolidays = ConvertHashToList(longRequested);\n Log.i(\"***********\", \"DrawMonth called in attach...workers\");\n drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);//here i should have the daya from the database\n }\n }\n\n\n\n\n\n\n\n if (3==4) {//condition to show the alert dialog for when holidays have been requested\n\n // 1. Instantiate an AlertDialog.Builder with its constructor\n AlertDialog.Builder builder = new AlertDialog.Builder(CalendarActivity.this);\n // 2. Chain together various setter methods to set the dialog characteristics\n builder.setMessage(R.string.dialog_message).setTitle(R.string.dialog_title);\n\n // 3. Get the AlertDialog from create()\n //AlertDialog dialog = builder.create();\n // Add the buttons\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n List<Long> auxlis = new ArrayList<Long>();\n auxlis = makeListOfDatesLong((requestedHolidays));\n mDatabaseReferenceWorkers.child(mUserID).child(\"holidays\").setValue(auxlis);\n mDatabaseReferenceWorkers.child(mUserID).child(\"requestedHolidays\").removeValue();\n Toast.makeText(getApplicationContext(), \"Holidays accepted\", Toast.LENGTH_SHORT).show();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n// Set other dialog properties\n//...\n\n// Create the AlertDialog\n AlertDialog dialog = builder.create();\n\n dialog.show();\n }\n //drawMonth(workingDays,holidays, requestedHolidays);//here i should have the daya from the database\n }", "private void addButtonToDB(String day, String time, String isAvailable) {\n doctorTimeRef = doctorRef.child(\"rdvTimes\").child(day).child(time);\n HashMap<String, Object> map = new HashMap<>();\n map.put(\"time\", time);\n map.put(\"available\", isAvailable);\n\n doctorTimeRef.updateChildren(map);\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 }", "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 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 }", "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 }", "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 }", "public void addNewGroupToUser(String userId, String groupRef) {\n final List<String> currentEvents = new ArrayList<String>();\n\n final DocumentReference docRef = db.collection(\"users\").document(userId);\n docRef.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if (task.isSuccessful()) {\n DocumentSnapshot document = task.getResult();\n if (document.exists()) {\n Log.i(\"users current groups\", document.get(\"groups\").toString());\n String test = document.get(\"groups\").toString();\n String test2 = test.replaceAll(\"[^\\\\w\\\\s]\", \"\");\n String test3 = test2.trim();\n String[] groups = test3.split(\"\\\\s+\");\n\n for(String s: groups) {\n currentEvents.add(s);\n }\n }\n }\n }\n });\n\n\n //add group\n DocumentReference userRef = db.collection(\"users\").document(userId);\n\n currentEvents.add(groupRef);\n\n userRef\n .update(\"groups\", currentEvents)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.i(\"success\", \"DocumentSnapshot successfully updated!\");\n Toast.makeText(getApplicationContext(),\"Group Successfully Created!\",Toast.LENGTH_SHORT).show();\n startActivity(new Intent(CreateGroup.this, FindFriends.class));\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.i(\"fail\", \"Error updating document\", e);\n }\n });\n\n\n }", "public static void writeNewJob(Job job) {\n DatabaseReference database = FirebaseDatabase.getInstance().getReference();\n database.child(\"jobs\").push().setValue(job);\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if(firebaseMethods.checkIfUsernameExists(username, dataSnapshot)){\n append = myRef.push().getKey().substring(0,7);\n }\n username = username + append;\n\n //add new user to the database\n firebaseMethods.addNewUser(\"notdone\",username,\"emp\",userID);\n Toast.makeText(mContext, \"Signup successful. Admin Verification \" +\n \"Left.\", Toast.LENGTH_SHORT).show();\n Intent i = new Intent(Register.this, Login.class);\n startActivity(i);\n finish();\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 }", "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 void addUpcomingEvents(String day,String events,String details) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_DAY,day);\n values.put(KEY_EVENTS,events);\n values.put(KEY_DETAILS,details);\n // Inserting Row\n long id = db.insert(TABLE_UPCOMING_EVENTS, null, values);\n //db.close(); // Closing database connection\n\n Log.d(TAG, \"Upcoming events inserted into sqlite: \" + id);\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 }", "@Override\n public void crearQuedada(final Quedada quedada, final CrearQuedadaCallback callback) {\n user = mAuth.getCurrentUser();\n\n //optenemos el usuario actual para cargar el nombre al crear la quedada\n UsuariosRef.child(user.getUid()).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n String nombre = dataSnapshot.child(\"nombre\").getValue(String.class);\n String apellidos = dataSnapshot.child(\"apellidos\").getValue(String.class);\n String correo = dataSnapshot.child(\"correo\").getValue(String.class);\n String biografia = dataSnapshot.child(\"biografia\").getValue(String.class);\n String aficiones = dataSnapshot.child(\"aficiones\").getValue(String.class);\n usuarioActual = new Usuario(nombre, apellidos, correo, biografia, aficiones);\n\n Log.i(\"OBTENER USUARIO FIRE\", \"SUCCESFUL -- \" + usuarioActual);\n quedada.setAutor(\"\" + usuarioActual.getNombre() + \", \" + usuarioActual.getApellidos());\n quedada.setAutor_uid(\"\"+ user.getUid());\n\n //se sube la quedada la quedada\n UsuariosRef.child(user.getUid()).child(\"Quedadas\").push().setValue(quedada).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n\n Log.i(\"CREAR_QUEDADA_FIRE1\", \"EXITO\");\n QuedadasRef.push().setValue(quedada).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n\n Log.i(\"CREAR_QUEDADA_FIRE2\", \"EXITO\");\n callback.onQuedadaCreada();\n } else {\n Log.i(\"CREAR_QUEDADA_FIRE\", \"ERROR\");\n callback.onQuedadaCreadaError();\n }\n }\n });\n\n } else {\n Log.i(\"CREAR_QUEDADA_FIRE\", \"ERROR\");\n callback.onQuedadaCreadaError();\n }\n }\n });\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n callback.onQuedadaCreadaError();\n Log.i(\"OBTENER USUARIO FIRE\", \"ERROR -- \" + usuarioActual);\n }\n });\n\n }", "private void appendFriendToExistingFriendsTree(DatabaseReference friendsReference) {\n int number = 818181;\n String name = \"Vicky Victoria\";\n String key = friendsReference.push().getKey();\n Friend friend = new Friend(number, name);\n friendsReference.child(key).setValue(friend);\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 onClick(View v) {\n\n String date = et_date.getText().toString();\n String amountStr = et_amount.getText().toString();\n String description = et_description.getText().toString();\n //Toast.makeText(getActivity(), String.valueOf(dateLong(date)),Toast.LENGTH_LONG).show();\n String tid = UUID.randomUUID().toString();\n String category_name = et_category.getText().toString();\n String cid = et_category_id.getText().toString();\n int amount = Integer.parseInt(amountStr);\n\n String key = dbRefExpenses.push().getKey();\n //Expense(String eid, String category_name, String cid, String description, int amount, long date)\n Expense expense = new Expense(key,category_name,cid,description,amount,dateLong(date));\n dbRefExpenses.child(key).setValue(expense);\n dbRefExpenses.orderByChild(\"eid\").equalTo(key).addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n if (snapshot.exists()){\n\n startActivity(new Intent(getApplicationContext(), ExpenseActivity.class));\n }\n }\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n }\n });\n\n }", "private void createRequestDone() {\n final String providerId = FirebaseAuth.getInstance().getCurrentUser().getUid();\n providerReferen = FirebaseDatabase.getInstance().getReference().child(\"Users\").child(\"Providers\").child(providerId).child(\"requestDone\");\n providerReferen.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if(dataSnapshot.exists()){\n\n }else{\n HashMap donemap = new HashMap();\n donemap.put(\"consumerServiceRequest\", conSerReq);\n providerReferen.updateChildren(donemap);\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n\n /////////////////////////////////////////////////////////schedule control\n }", "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 }", "@Override\n public Uri insert(Uri uri, ContentValues values) {\n while(flag)\n {}\n Log.i(\"insert\",values.getAsString(\"key\"));\n insertKeysToNode(values.getAsString(\"key\"), values.getAsString(\"value\"));\n return null;\n }", "private void CreateNewGroup(String group, String current_uid, String push_id) {\n\n mDatabaseInfo = FirebaseDatabase.getInstance().getReference().child(\"Groups\").child(current_uid).child(push_id).child(\"groupinfo\");\n\n HashMap<String, String> userMap = new HashMap<>();\n userMap.put(\"name\", group);\n userMap.put(\"admin\", current_uid);\n userMap.put(\"groupid\", push_id);\n mDatabaseInfo.setValue(userMap);\n\n mDatabaseMember = FirebaseDatabase.getInstance().getReference().child(\"Groups\").child(current_uid).child(push_id).child(\"member\").child(current_uid);\n\n HashMap<String, String> adminMap = new HashMap<>();\n adminMap.put(\"seen\", \"false\");\n mDatabaseMember.setValue(adminMap);\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 onChildChanged(DataSnapshot dataSnapshot, String s) {\n String key = dataSnapshot.getKey();\n Object data = dataSnapshot.getValue();\n\n\n Worker worker = dataSnapshot.getValue(Worker.class);\n String laestring = dataSnapshot.getKey();//i think this is the id\n if (worker != null) {\n if (laestring.equals(mUserID)) {\n //if (worker.getNumber_id().equals(mUserID)) {\n List<Long> longList = worker.getWorkInts();\n List<Long> longListHolidays = worker.getHolidays();\n List<Long> longRequested = worker.getRequestedHolidays();\n if (longRequested.size() != 0 && isAdmin) {\n AlertDialog.Builder builder = new AlertDialog.Builder(CalendarActivity.this);\n builder.setMessage(R.string.dialog_message).setTitle(R.string.dialog_title);\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //List<Long> auxlis = new ArrayList<Long>();\n //auxlis = makeListOfDatesLong((requestedHolidays));\n //mDatabaseReferenceWorkers.child(mUserID).child(\"holidays\").setValue(auxlis);\n //mDatabaseReferenceWorkers.child(mUserID).child(\"requestedHolidays\").removeValue();\n Toast.makeText(getApplicationContext(), \"Holidays accepted\", Toast.LENGTH_SHORT).show();\n }\n });\n AlertDialog dialog = builder.create();\n\n dialog.show();\n }\n workingDays = ConvertHashToList(longList);\n holidays = ConvertHashToList(longListHolidays);\n requestedHolidays = ConvertHashToList(longRequested);\n drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);//here i should have the daya from the database\n }\n }\n\n\n if (dataSnapshot.getKey().equals(\"workInts\")) {\n List<Long> longList = (List) dataSnapshot.getValue();\n //workingDays = ConvertHashToList(longList);//i should ADD not convert\n workingDays.addAll(ConvertHashToList(longList));\n }\n //drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);\n Toast.makeText(getApplicationContext(), \"onChildChanged in Calendar Activity\", Toast.LENGTH_LONG).show();\n Log.i(\"**********\", \"childChanged \" + dataSnapshot.toString());\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 }", "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 }", "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 }", "private void ReservarCita(String horaini,String horafin)\n {\n progressDialog=new ProgressDialog(HorasCitasActivity.this);\n progressDialog.setTitle(\"Agregado horario\");\n progressDialog.setMessage(\"cargando...\");\n progressDialog.show();\n progressDialog.setCancelable(false);\n String key = referenceehoras.push().getKey();\n\n // para gaurar el nodo Citas\n // sadfsdfsdfsd1212sdss\n Horario objecita =new Horario(key,idespecialidad,horaini,horafin,nombreespecialidad );\n //HorarioAtencion\n // reference=FirebaseDatabase.getInstance().getReference(\"HorarioAtencion\");\n // referenceCitas= FirebaseDatabase.getInstance().getReference(\"CitasReservadas\").child(user_id);\n referenceehoras.child(key).setValue(objecita).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()){\n Toast.makeText(HorasCitasActivity.this, \"Agregado\", Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(HorasCitasActivity.this, \"Error :\" +e.getMessage(), Toast.LENGTH_SHORT).show();\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 }", "public void addData(){\n Room room = new Room(\"1234\", null,0);\n roomsRef.add(room)\n .addOnSuccessListener(new OnSuccessListener<DocumentReference>() {\n @Override\n public void onSuccess(DocumentReference documentReference) {\n Log.d(TAG, \"DocumentSnapshot added with ID: \" + documentReference.getId());\n Toast.makeText(MainActivity.this,\"Success\",Toast.LENGTH_LONG).show();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(TAG, \"Error adding document\", e);\n Toast.makeText(MainActivity.this,\"Failed\",Toast.LENGTH_LONG).show();\n }\n });\n\n Task<QuerySnapshot> sp = roomsRef.whereEqualTo(\"roomId\", \"1234\").get();\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 }", "void addDay(final Day day) {\n days.add(day);\n }", "int insert(UvStatDay record);", "private void saveEvent(){\n String eventName = eventNameView.getText().toString().trim();\n String dateString = eventDateView.getText().toString();\n String timeString = eventTimeView.getText().toString();\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd hh:mm a\");\n Calendar cal = Calendar.getInstance();\n try{\n Date date = sdf.parse(dateString+ \" \" + timeString);\n cal.setTime(date);\n }\n catch (Exception e){\n Log.d(\">>>\",e.toString());\n }\n\n if(eventName.length()>=1){\n final Event event = new Event(eventName, dateString, timeString, memberStatus, chat.getChatKey());\n String reminderPreferenceKeyTemp = \"\";\n if(this.event!=null){\n event.setEventKey(this.event.getEventKey());\n final DatabaseReference database = FirebaseDatabase.getInstance().getReference(\"events\");\n database.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for(DataSnapshot e : dataSnapshot.getChildren()){\n if(e.child(\"eventKey\").getValue().toString().equals(event.getEventKey())){\n database.child(e.getKey()).setValue(event);\n Calendar cal = Calendar.getInstance();\n SimpleDateFormat sdf = new SimpleDateFormat(patternDate);\n try {\n Date date = sdf.parse(eventDateView.getText().toString());\n cal.setTime(date);\n ActivityEventCalendar.dateLong = cal.getTimeInMillis();\n if(ActivityEventCalendar.dateLong == cal.getTimeInMillis()){\n ActivityEventCalendar.displayEventList();\n finish();\n }\n }\n catch(Exception exception){\n\n }\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n reminderPreferenceKeyTemp = event.getEventKey() + \"reminders\";\n }\n else{\n //creating event for the first time\n DatabaseReference database = FirebaseDatabase.getInstance().getReference(\"events\");\n eventFirebase = database.push();\n event.setEventKey(eventFirebase.getKey());\n database.push().setValue(event);\n reminderPreferenceKeyTemp = eventFirebase.getKey() + \"reminders\";\n }\n //write sharedpreferences for reminder\n final String reminderPreferenceKey = reminderPreferenceKeyTemp;\n Spinner spinner = (Spinner) findViewById(R.id.reminder_spinner);\n final SharedPreferences pref = getApplicationContext().getSharedPreferences(\"MyPref\", 0);\n final SharedPreferences.Editor editor = pref.edit();\n spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) {\n if(position==0){\n //turn on\n editor.putBoolean(reminderPreferenceKey, true);\n editor.commit();\n }\n else if(position == 1){\n //turn off\n editor.putBoolean(reminderPreferenceKey, false);\n editor.commit();\n }\n }\n @Override\n public void onNothingSelected(AdapterView<?> parentView) { }\n });\n\n //create reminders\n boolean notify = pref.getBoolean(reminderPreferenceKey, false);\n\n if(notify){\n Intent intent = new Intent(Intent.ACTION_EDIT);\n intent.setType(\"vnd.android.cursor.item/event\");\n intent.putExtra(\"beginTime\", cal.getTimeInMillis());\n intent.putExtra(\"allDay\", false);\n intent.putExtra(\"title\", event.getEventName());\n startActivity(intent);\n }\n if(!creatingNewChat){\n statusAdapter.updateFirebase();\n }\n ActivityEventCalendar.dateLong = cal.getTimeInMillis();\n if(ActivityEventCalendar.dateLong == cal.getTimeInMillis()){\n ActivityEventCalendar.displayEventList();\n finish();\n }\n }\n else{\n Toast.makeText(this, \"Event name is invalid\", Toast.LENGTH_SHORT).show();\n }\n }", "private void writeNewPost(String userId, String username, String title, String body) {\n String key = mDatabase.child(\"posts\").push().getKey();\n Post post = new Post(userId, username, title, body);\n Map<String, Object> postValues = post.toMap();\n\n Map<String, Object> childUpdates = new HashMap<>();\n childUpdates.put(\"/posts/\" + key, postValues);\n childUpdates.put(\"/user-posts/\" + userId + \"/\" + key, postValues);\n\n mDatabase.updateChildren(childUpdates);\n }", "@Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n long getTotal = (long) dataSnapshot.child(\"Days\").getValue();\n long setTotal = getTotal + 1;\n total.child(\"Days\").setValue(setTotal);\n total.child(\"Last Updated\").setValue(date);\n updateAttendance();\n\n } else {\n //in case the attendance is getting registered first time , confirm and proceed with alert\n alertBuild();\n }\n }", "private void booking(){\n usersOrderReference = mFirebaseInstance.getReference(\"UsersOrder\");\n\n // get reference to 'order'\n orderReference = mFirebaseInstance.getReference(\"Order\");\n\n String idOrder = orderReference.push().getKey();\n String idBarbershop = Common.barbershopSelected;\n String status = \"Waiting for approval\";\n\n Order orderdata = new Order(idOrder, userId, atasnama, idBarbershop, barbershop, barberman,\n service, totalharga, jadwal, status, phoneBarbershop, phoneUser);\n\n orderReference.child(Common.barbershopSelected).child(idOrder).setValue(orderdata);\n usersOrderReference.child(userId).child(idOrder).setValue(orderdata);\n\n// sendNotificationOrder(userId);\n\n sendOrderStatusToUser(Common.barbershopSelected,orderdata);\n\n }", "int insert(AoD5e466WorkingDay record);", "public void insertNewDay(User user, long time, float distance) {\n TrackingRecord updateRecord = user.getRecords().newDayRecord(time, distance);\n Map<String, Object> data = new HashMap<>();\n data.put(\"records\", updateRecord);\n\n fStore.collection(DB_NAME).document(getID()).set(data, SetOptions.merge());\n }", "private void attachDatabaseReference_requested_holidays() {\n if (mChildEventListenerDaysRequested == null) {\n mChildEventListenerDaysRequested = new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n Log.v(\"***********\", \"There has beem an addition in daysRequested\");\n //List<Long> longList = (List) dataSnapshot.getValue();\n if (dataSnapshot.getKey().equals(mUserID)) {//check if it's the current user branch\n RequestedHolidays reques = new RequestedHolidays();\n //reques = dataSnapshot.getValue(RequestedHolidays.class);\n GenericTypeIndicator<List<Long>> t =\n new GenericTypeIndicator<List<Long>>() {\n };\n\n Object objecto = dataSnapshot.getValue();\n //List<Long> messages = dataSnapshot.getValue(t);\n //makeMapHash(objecto);\n //HashMap<String, Long> map = new HashMap<String, Long>();\n //map.put (1, \"Mark\");\n //map.put (2, \"Tarryn\");\n //map = (HashMap) dataSnapshot.getValue();\n //List<Long> list = new ArrayList<Long>(map.values());\n\n //List<Long> longList = (List) dataSnapshot.getValue();\n List<Long> longList = (List<Long>) dataSnapshot.getValue();\n requestedHolidays = ConvertHashToList(longList);\n Log.i(\"***********\", \"DrawMonth called in attach...requested\");\n drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);\n }\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n Log.i(\"***********\", \"There has beem a change in daysRequested\");\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n Log.i(\"***********\", \"There has beem a removed in daysRequested\");\n\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n Log.i(\"***********\", \"There has beem a moved in daysRequested\");\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Toast.makeText(getApplicationContext(), \"ONCANCELLED in /requested_holidays\", Toast.LENGTH_LONG).show();\n Log.i(\"***********\", \"ONCANCELLED IN /requested_holidays\");\n }\n };\n //when days are added to the requestedHolidays in the DB this will trigger\n //mDatabaseReferenceHolidays.addChildEventListener(mChildEventListenerDaysRequested);\n mDatabaseReferenceRequestedHolidays.addChildEventListener(mChildEventListenerDaysRequested);\n //mDatabaseReference.addChildEventListener(mChildEventListenerDaysRequested);\n }\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 }", "@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 addStartUp() {\n DatabaseReference firebaseDatabase = FirebaseDatabase.getInstance().getReference(STARTUP_FIREBASE_DATABASE_REFERENCE);\n String id = firebaseDatabase.push().getKey();\n StartUpField startUpField = new StartUpField(id, startupName.getText().toString().trim(),\n startupDescription.getText().toString().trim(), startupFounder.getText().toString().trim(),\n startupCoFounder.getText().toString().trim(), startupWebsite.getText().toString().trim(),\n facebookUrl.getText().toString().trim(), twitterUrl.getText().toString().trim(), imageUrl,\n telephone.getText().toString().trim(), email.getText().toString().trim());\n firebaseDatabase.child(id).setValue(startUpField).addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n if (getView() != null) {\n Navigation.findNavController(requireView()).navigate(R.id.action_addStartUpFragment_to_navigation_startup);\n }\n showButton(saveStartupButton);\n stopProgressBar(progressBar);\n Toast.makeText(getParentFragment().getContext(), \"Startup added\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getParentFragment().getContext(), \"Unable to add Startup\", Toast.LENGTH_SHORT).show();\n Timber.d(\"database Write Error: %s\", task.getException().getLocalizedMessage());\n showButton(saveStartupButton);\n stopProgressBar(progressBar);\n }\n });\n }", "@Override\n public void onChildAdded(DataSnapshot snapshot, String previousChildKey) {\n DataBaseUsers user = snapshot.getValue(DataBaseUsers.class);\n //System.out.println(user.getEmail());\n userList.add(user);\n }", "@Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n long lastMessageTime = sharedPref.getLong(\"last_announcement\", System.currentTimeMillis());\n\n /*get announcementItem from database*/\n AnnouncementItem announcementItem = dataSnapshot.getValue(AnnouncementItem.class);\n\n /*compare time of last read announcementItem and announcementItem from database*/\n if (announcementItem.getTime() > lastMessageTime) {\n /*builder for push notification*/\n Notification.Builder builder = new Notification.Builder(AnnouncementService.this)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(\"Announcement\")\n .setContentText(\"There is a new announcement\");\n\n /*intent for push notification*/\n Intent resultIntent = new Intent(AnnouncementService.this, AnnouncementsActivity.class);\n\n /*build stack for intent calls*/\n TaskStackBuilder stackBuilder = TaskStackBuilder.create(AnnouncementService.this);\n stackBuilder.addParentStack(Sahaya.class);\n stackBuilder.addNextIntent(resultIntent);\n PendingIntent resultPendingIntent =\n stackBuilder.getPendingIntent(\n 0,\n PendingIntent.FLAG_UPDATE_CURRENT\n );\n\n /*add resultPendingIndent to builder*/\n builder.setContentIntent(resultPendingIntent);\n\n /*build push notification*/\n Notification notification = builder.build();\n notification.defaults |= Notification.DEFAULT_SOUND;\n notification.defaults |= Notification.DEFAULT_VIBRATE;\n\n /*get notification manager*/\n NotificationManager notificationManager = (NotificationManager) getSystemService(Service.NOTIFICATION_SERVICE);\n\n /*show notification*/\n notificationManager.notify(0, notification);\n }\n\n /*set last read message time as current time*/\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putLong(\"last_announcement\", System.currentTimeMillis());\n editor.apply();\n\n }", "private void saveData(){\n databaseReference.setValue(new Teacher(0, \"\", 0.0));\n }", "public void addUser(User u){\n\r\n userRef.child(u.getUuid()).setValue(u);\r\n\r\n DatabaseReference zipUserReference;\r\n DatabaseReference zipNotifTokenReference;\r\n List<String> zipList = u.getZipCodes();\r\n\r\n for (String zipCode : zipList) {\r\n zipUserReference = baseRef.child(zipCode).child(ZIPCODE_USERID_REFERENCE_LIST);\r\n // Add uuid to zipcode user list\r\n zipUserReference.child(u.getUuid()).setValue(u.getUuid());\r\n\r\n // Add notifToken to list\r\n zipNotifTokenReference = baseRef.child(zipCode).child(ZIPCODE_NOTIFICATION_TOKENS_LIST);\r\n zipNotifTokenReference.child(u.getNotificationToken()).setValue(u.getNotificationToken());\r\n\r\n }\r\n }", "public static void addNewToDataBase(String name, String bio) {\n FirebaseAuth mAuth = FirebaseAuth.getInstance();\n String uid = mAuth.getUid();\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference();\n\n // Initialize the new user with a fridge, a list of friends, a list of allergies, and preferred units\n ref.child(\"users\").child(uid).child(\"fridge\").setValue(\"null\");\n ref.child(\"users\").child(uid).child(\"followers\").child(uid).setValue(uid);\n ref.child(\"users\").child(uid).child(\"following\").setValue(\"null\");\n ref.child(\"users\").child(uid).child(\"allergies\").setValue(\"null\");\n ref.child(\"users\").child(uid).child(\"units\").setValue(\"imperial\");\n ref.child(\"users\").child(uid).child(\"feed\").setValue(\"null\");\n ref.child(\"users\").child(uid).child(\"name\").setValue(name);\n ref.child(\"displayNames\").child(name).setValue(name);\n ref.child(\"users\").child(uid).child(\"bio\").setValue(bio);\n ref.child(\"users\").child(uid).child(\"posts\").setValue(\"null\");\n }", "private void iniciarFirebase(){\n FirebaseApp.initializeApp(getApplicationContext());\n firebaseDatabase = FirebaseDatabase.getInstance();\n databaseReference = firebaseDatabase.getReference();\n }", "void insertPerson(final PersonModel person) {\n DatabaseReference postRef = mDBRef.push();\n postRef.setValue(person);\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n String[] colorNames = {\"red\", \"yellow\", \"green\", \"blue\", \"magenta\"};\n\n if(!dataSnapshot.hasChild(\"color\"))\n {\n int selection = (int) (Math.random() * colorNames.length);\n ref.child(\"users\").child(uid).child(\"color\").push();\n ref.child(\"users\").child(uid).child(\"color\").setValue(colorNames[selection]);\n Log.i(\"GenColor\",\"Generated color successfully.\");\n } else Log.i(\"GenColor\",\"Loaded color successfully.\");\n }", "private void sendGuideRegDataToFireBase(){\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 }", "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 }", "public void checkRoomExist(final String id)\n {\n final String cartRef = \"chatRoom\";\n mChat= database.getReference(cartRef);\n mChat.addListenerForSingleValueEvent(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\n for(DataSnapshot ds: dataSnapshot.getChildren())\n {\n if(ds.child(\"sender1\").getValue().equals(id)&& ds.child(\"sender2\").getValue().equals(uid))\n {\n roomexist=true;\n goToChat(ds.getKey());\n return;\n }\n else if(ds.child(\"sender2\").getValue().equals(id)&& ds.child(\"sender1\").getValue().equals(uid))\n {\n roomexist=true;\n goToChat(ds.getKey());\n return;\n }\n }\n if(!roomexist)\n {\n String key = mChat.push().getKey();\n makeRoom(key);\n }\n Log.d(TAG, \"Value is: \" + cartRef);\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 }", "private void onlinecheack(String online) {\r\n\r\n Calendar calendar_time = Calendar.getInstance();\r\n SimpleDateFormat simpleDateFormat_time = new SimpleDateFormat(DataManager.TimePattern);\r\n String CurrentTime = simpleDateFormat_time.format(calendar_time.getTime());\r\n\r\n\r\n Calendar calendar_date = Calendar.getInstance();\r\n SimpleDateFormat simpleDateFormat_date = new SimpleDateFormat(DataManager.DatePattern);\r\n String CurrentDate = simpleDateFormat_date.format(calendar_date.getTime());\r\n\r\n\r\n Map<String, Object> onlinemap = new HashMap<String, Object>();\r\n onlinemap.put(DataManager.UserCardActive, online);\r\n onlinemap.put(DataManager.UserActiveTime, CurrentTime);\r\n onlinemap.put(DataManager.UserActiveDate, CurrentDate);\r\n\r\n\r\n OnlineRoot.child(CurrentUserID).child(DataManager.UserOnlineRoot).updateChildren(onlinemap)\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 } else {\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 Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n\r\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n temp = (dataSnapshot.getValue(ValueCounter.class));\n temp.increment();\n mRef.setValue(temp);\n }", "@RequiresApi(api = Build.VERSION_CODES.O)\n private void storeHistory(OrderData obj)\n {\n LocalDate currentdate = LocalDate.now();\n Month currentMonth = currentdate.getMonth();\n int currentYear = currentdate.getYear();\n\n// Date date=new Date();\n// int month=date.getMonth();\n// int year=date.getYear();\n\n //this part is to store order\n final String yea=String.valueOf(currentYear);\n final String mon=currentMonth.toString();\n final String day=String.valueOf(currentdate.getDayOfMonth());\n final String dat=yea+\"-\"+mon+\"-\"+day;\n\n\n db.collection(\"shop\")\n .document(new Auth().getUId())\n .collection(\"orders\")\n .document(new Auth().getUId())\n .collection(dat)\n .add(obj)\n .addOnSuccessListener(new OnSuccessListener<DocumentReference>() {\n @Override\n public void onSuccess(DocumentReference documentReference) {\n //Log.d(TAG, \"DocumentSnapshot added with ID: \" + documentReference.getId());\n //Toast.makeText(getContext(),\"DocumentSnapshot added with ID: \" + documentReference.getId(), Toast.LENGTH_SHORT).show();\n //orderList.remove(position);\n\n\n\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n //Log.w(TAG, \"Error adding document\", e);\n //Toast.makeText(getContext(),\"Erroe adding doc\", Toast.LENGTH_SHORT).show();\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 }", "public void push(Object value) {\n this.collection.add(value);\n }", "int insert(FeedsUsersKey record);", "public void pushData(String storyTitle, float measure) {\n mDatabase = FirebaseDatabase.getInstance().getReference();\n if(interestMap.containsKey(null)){\n interestMap.remove(null);\n }\n if(interestMap.containsKey(storyTitle)){\n if(measure>interestMap.get(storyTitle)) {\n mDatabase.child(\"users\").child(getUid()).child(\"interests\").child(storyTitle).setValue(measure);\n Log.d(TAG, \"Interest \" +storyTitle+ \" added with a score of \" + measure);\n interestMap.put(storyTitle, measure);\n }\n }else{\n mDatabase.child(\"users\").child(getUid()).child(\"interests\").child(storyTitle).setValue(measure);\n Log.d(TAG, \"Interest \" +storyTitle+ \" added with a score of \" + measure);\n interestMap.put(storyTitle, measure);\n }\n }", "private void addItem()\n {\n Category category = new Category();\n category.setItemCategory(\"apple\");\n category.setItemDetail(\"iMessage\");\n //int randomNum = ThreadLocalRandom.current().nextInt(0, 500 + 1); weird interaction\n int randomNum = (int)(Math.random() * ((900 - 1) + 1)) + 1;\n category.setUid(randomNum);\n AppDatabase db = Room.databaseBuilder(getApplicationContext(),\n AppDatabase.class, \"database-name\").allowMainThreadQueries().build();\n Log.d(\"addItem\",\"\"+category);\n db.categoryDao().addCategory(category);\n testDatabase();\n\n\n }", "private void addNewGroupToFireBase(Bundle guideData) {\n }", "int insert(FinMonthlySnapModel record);", "int insert(PineAlarm record);", "public void addPatientForLocalUser(final String patientTz, final Context context){\n db.collection(Constants.PATIENTS_COLLECTION_FIELD).whereEqualTo(Constants.TZ_FIELD, patientTz).get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n boolean patientExists = false;\n for (QueryDocumentSnapshot myDoc : task.getResult()) {\n patientExists = true;\n final Patient patient = myDoc.toObject(Patient.class);\n // return if user already treats/follows this patient\n if (localUser.getPatientIds().contains(patient.getId())){\n Toast.makeText(context, context.getString(R.string.already_following_patient_message), Toast.LENGTH_LONG).show();\n return;\n }\n // add as caregiver iff user is patient's caregiver\n if (patient.hasCaregiverWithId(localUser.getId()) && !localUser.getPatientIds().contains(patient.getId())){\n Toast.makeText(context, context.getString(R.string.added_patient_as_caregiver_message), Toast.LENGTH_LONG).show();\n localUser.addPatientId(patient.getId());\n updateUserInDatabase(localUser);\n }\n // add as friend iff user is patient's friend\n if (patient.hasFriendWithId(localUser.getId()) && !localUser.getPatientIds().contains(patient.getId())){\n Toast.makeText(context, context.getString(R.string.added_patient_as_friend_message), Toast.LENGTH_LONG).show();\n localUser.addPatientId(patient.getId());\n updateUserInDatabase(localUser);\n }\n // display error message if user isn't treating/following this patient\n else {\n String message = context.getString(R.string.friend_unable_to_add_patient_message);\n if (localUser.isCareGiver()){\n message = context.getString(R.string.caregiver_unable_to_add_patient_message);\n }\n Toast.makeText(context, message, Toast.LENGTH_LONG).show();\n }\n }\n if (!patientExists){\n // caregivers can create new patients\n if (localUser.isCareGiver()){\n ((PatientsListActivity)context).openActivityAddPatient(patientTz);\n }\n }\n }\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 view) {\n if(!lastIntent.getBooleanExtra(\"isNew\", true)) {\n if (isValidPost(editTitle.getText().toString(), editDescription.getText().toString(), editBody.getText().toString(), editDeadline.getText().toString(), editPayment.getText().toString())) {\n String key = lastIntent.getBundleExtra(\"post\").getString(\"id\");\n Post post = new Post(editTitle.getText().toString(), editDeadline.getText().toString(), editPayment.getText().toString(), editDescription.getText().toString(), editBody.getText().toString(), mUser.getUid(), key);\n Map<String, Object> postValues = post.toMap();\n Map<String, Object> childUpdates = new HashMap<>();\n Map<String, Object> userUpdates = new HashMap<>();\n\n childUpdates.put(\"/posts/\" + key, postValues);\n userUpdates.put(\"/users/\" + FirebaseAuth.getInstance().getCurrentUser().getUid() + \"/posts/\" + key, postValues);\n\n mDatabase.updateChildren(childUpdates);\n mDatabase.updateChildren(userUpdates);\n\n startActivity(new Intent(getApplicationContext(), HomeWithDrawer.class));\n }\n }\n\n //Otherwise we will create a a new post. Find a way to simplify these two blocks!!\n else {\n if (isValidPost(editTitle.getText().toString(), editDescription.getText().toString(), editBody.getText().toString(), editDeadline.getText().toString(), editPayment.getText().toString())) {\n\n String key = mDatabase.child(\"posts\").push().getKey();\n //System.out.println(\"Make Post Description: \" + editDescription.getText().toString());\n Post post = new Post(editTitle.getText().toString(), editDeadline.getText().toString(), editPayment.getText().toString(), editDescription.getText().toString(), editBody.getText().toString(), mUser.getUid(), key);\n Map<String, Object> postValues = post.toMap();\n Map<String, Object> childUpdates = new HashMap<>();\n Map<String, Object> userUpdates = new HashMap<>();\n childUpdates.put(\"/posts/\" + key, postValues);\n userUpdates.put(\"/users/\" + FirebaseAuth.getInstance().getCurrentUser().getUid() + \"/posts/\" + key, postValues);\n\n mDatabase.updateChildren(childUpdates);\n mDatabase.updateChildren(userUpdates);\n\n Intent listenerIntent = new Intent(getApplicationContext(), NotificationListener.class);\n\n postBundle = new Bundle();\n postBundle.putString(\"postId\", key);\n postBundle.putString(\"postTitle\", editTitle.getText().toString());\n listenerIntent.putExtra(\"requestInfo\", postBundle);\n\n //Starts the NotificationListener for the post described by the postBundle.\n startService(listenerIntent);\n startActivity(new Intent(getApplicationContext(), HomeWithDrawer.class));\n }\n }\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 }", "@Override\n public void onClick(View v) {\n\n\n final String messageStr = getCurrentMessage();\n TimeStamp timeStamp = new TimeStamp();\n final String currentTime = timeStamp.getCurrentTime();\n Log.i(Constants.Log.TAG_CHAT_FRAGMENT, \"In onStart(), current time is: \" + currentTime + \"and project push id is: \" + getArguments().getString(Constants.Fragment.PROJECT_PUSH_ID));\n\n DatabaseReference referenceWithChatId = mDatabaseReference.child(Constants.Firebase.PROJECT + \"/\" + getArguments().getString(Constants.Fragment.PROJECT_PUSH_ID) + \"/\" + Constants.Firebase.PROJECT_CHAT);\n referenceWithChatId.addListenerForSingleValueEvent(new ValueEventListener() {\n // private String chatId;\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n String chatId = dataSnapshot.getValue(String.class);\n Log.i(Constants.Log.TAG_CHAT_FRAGMENT, \"In onDataChange(), chat id is: \" + chatId);\n\n Message message = new Message(mFirebaseAuth.getCurrentUser().getEmail(), messageStr, currentTime);\n DatabaseReference newMessageReference = mDatabaseReference.child(Constants.Firebase.MESSAGE).push();\n String newMessagePushKey = newMessageReference.getKey();\n newMessageReference.setValue(message);\n\n ChatMessage chatMessage = new ChatMessage(mFirebaseAuth.getCurrentUser().getEmail(), messageStr, currentTime);\n DatabaseReference newChatMessageReferense = mDatabaseReference.child(Constants.Firebase.CHAT_MESSAGES + \"/\" + chatId + \"/\" + newMessagePushKey);\n newChatMessageReferense.setValue(chatMessage);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "@Override\n // once adding an entry\n public void onDataChange(DataSnapshot dataSnapshot) {\n Set<String> chatRoomsSet = new HashSet<String>();\n Iterator i = dataSnapshot.getChildren().iterator();\n\n // go through the whole database and add the new\n while (i.hasNext()){\n chatRoomsSet.add(((DataSnapshot)i.next()).getKey());\n }\n // clear the old list and add the new ones\n chatRoomsList.clear();\n chatRoomsList.addAll(chatRoomsSet);\n arrayAdapter.notifyDataSetChanged();\n }", "void pushToFirebase(Task task) {\n un_FirebaseRef_tasks.push().setValue(task);\n }", "@Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n mPlants.clear();\n\n //aici baga key value din real time database\n for(DataSnapshot postSnapshot : snapshot.getChildren()){\n Plants plant = postSnapshot.getValue(Plants.class);\n plant.setKey(postSnapshot.getKey());\n\n Log.d(\"TAG\", \"plant.key \" + plant.getKey() );\n mPlants.add(plant);\n }\n\n mAdapter.notifyDataSetChanged();\n }", "protected UUID add(E entry) {\n\t\treturn add(entry, true);\n\t}", "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 iniciarBaseDeDatos(){\n db_reference = FirebaseDatabase.getInstance().getReference();\n\n }" ]
[ "0.66183335", "0.63062143", "0.6238612", "0.6216551", "0.6210296", "0.6119464", "0.6115832", "0.60795987", "0.6055945", "0.59275365", "0.5757829", "0.5747427", "0.5743701", "0.5740402", "0.5721635", "0.5720825", "0.5712591", "0.5707028", "0.5702349", "0.5691463", "0.56669235", "0.5662598", "0.56290835", "0.562895", "0.5586128", "0.55858296", "0.5551262", "0.5548048", "0.55477625", "0.5535167", "0.5513619", "0.55080336", "0.5481818", "0.5476653", "0.5474968", "0.54606974", "0.54428756", "0.5438328", "0.54298115", "0.5427726", "0.5412521", "0.5411991", "0.54039973", "0.5394195", "0.53877914", "0.53817797", "0.5381111", "0.536902", "0.5354512", "0.5353233", "0.53484815", "0.53391474", "0.533787", "0.5336151", "0.5333883", "0.53254396", "0.5321898", "0.5308781", "0.5293926", "0.52925617", "0.5289515", "0.528324", "0.52656037", "0.5264201", "0.5261758", "0.52554995", "0.5249584", "0.5244026", "0.52359384", "0.52342755", "0.5231845", "0.5219253", "0.52106345", "0.52017915", "0.5200255", "0.51930434", "0.51923764", "0.51896125", "0.51890033", "0.51881874", "0.51822174", "0.5164842", "0.515596", "0.51531863", "0.5148832", "0.5148405", "0.51463103", "0.51370925", "0.5131998", "0.5128213", "0.5125855", "0.5123411", "0.5118792", "0.5111188", "0.5103719", "0.5085989", "0.5078051", "0.507193", "0.50713855", "0.5071134" ]
0.6472503
1
Need to clear list before fetching serviciosTotales=new ArrayList(); fetch services from FB add them to arraylist
public void fetchServices() { serviciosTotales.clear(); for (String serviceId : serviceList) { databaseServiceReference.child(serviceId).addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { Servicio servicioTemp = dataSnapshot.getValue(Servicio.class); serviciosTotales.add(servicioTemp); servicesAdapter.notifyDataSetChanged(); } @Override public void onCancelled(@NonNull DatabaseError databaseError) { } }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Servicio> cargarServicios() throws CaException {\n try {\n String strSQL = \"SELECT k_idservicio, f_fycentrada, f_fycsalida, q_valorapagar, k_idvehiculo FROM servicio\";\n Connection conexion = ServiceLocator.getInstance().tomarConexion();\n PreparedStatement prepStmt = conexion.prepareStatement(strSQL);\n ResultSet rs = prepStmt.executeQuery();\n while (rs.next()) {\n Servicio servicio1 = new Servicio();\n servicio1.setK_idservicio(rs.getInt(1));\n servicio1.setF_fycentrada(rs.getString(2));\n servicio1.setF_fycsalida(rs.getString(3));\n servicio1.setQ_valorapagar(rs.getInt(4));\n servicio1.setK_idvehiculo(rs.getInt(5));\n\n servicios.add(servicio1);\n }\n } catch (SQLException e) {\n throw new CaException(\"ServicioDAO\", \"No pudo recuperar el servicio\" + e.getMessage());\n }finally {\n ServiceLocator.getInstance().liberarConexion();\n }\n return servicios;\n }", "public ArrayList<FormularioServ> listaFServActivos(){\n\t\tArrayList<FormularioServ> listFServ = new ArrayList<FormularioServ>();\n\t\ttry{\n\t\t\tc = PoolConexion.getConnection();\n\t\t\tps = c.prepareStatement(\"select * from public.\\\"formularioServ\\\" where estado<>3\", ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE, ResultSet.HOLD_CURSORS_OVER_COMMIT);\n\t\t\trs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tFormularioServ Fserv = new FormularioServ();\n\t\t\t\tFserv.setIdFormulario(rs.getInt(\"idFormulario\"));\n\t\t\t\tFserv.setIdServ(rs.getInt(\"idServ\"));\n\t\t\t\tFserv.setNombreUsuario(rs.getString(\"nombreUsuario\"));\n\t\t\t\tFserv.setEmail(rs.getString(\"email\"));\n\t\t\t\tFserv.setCuerpoEmail(rs.getString(\"cuerpoEmail\"));\n\t\t\t\tFserv.setNumerotelefono(rs.getString(\"numerotelefono\"));\n\t\t\t\tFserv.setfCreacion(rs.getTimestamp(\"fcreacion\"));\n\t\t\t\tFserv.setEstado(rs.getInt(\"estado\"));\n\t\t\t\t\n\t\t\t\tlistFServ.add(Fserv);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tSystem.out.println(\"DATOS: ERROR EN LISTAR Formularios \"+ e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\tif(rs != null){\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t\tif(ps != null){\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t\tif(c != null){\n\t\t\t\t\tPoolConexion.closeConnection(c);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (SQLException 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\treturn listFServ;\n\t}", "private void listadoEstados() {\r\n sessionProyecto.getEstados().clear();\r\n sessionProyecto.setEstados(itemService.buscarPorCatalogo(CatalogoEnum.ESTADOPROYECTO.getTipo()));\r\n }", "private void loadData() {\n this.financeDataList = new ArrayList<>();\n }", "public ArrayList<clsPago> consultaDataPagosCuotaInicial(int codigoCli)\n { \n ArrayList<clsPago> data = new ArrayList<clsPago>(); \n try{\n bd.conectarBaseDeDatos();\n sql = \" SELECT a.id_pagos_recibo idPago, a.id_usuario, b.name name_usuario, \"\n + \" a.referencia referencia, \"\n + \" a.fecha_pago fecha_pago, a.estado, \"\n + \" a.valor valor_pago, a.id_caja_operacion, e.name_completo nombre_cliente, \"\n + \" a.fecha_pago fecha_registro\"\n + \" FROM ck_pagos_recibo AS a\"\n + \" JOIN ck_usuario AS b ON a.id_usuario = b.id_usuario\"\n + \" JOIN ck_cliente AS e ON a.codigo = e.codigo\"\n + \" WHERE a.estado = 'A'\"\n + \" AND a.cuota_inicial = 'S'\"\n + \" AND a.estado_asignado = 'N'\"\n + \" AND a.codigo = \" + codigoCli; \n \n System.out.println(sql);\n bd.resultado = bd.sentencia.executeQuery(sql);\n \n if(bd.resultado.next())\n { \n do \n { \n clsPago oListaTemporal = new clsPago();\n \n oListaTemporal.setReferencia(bd.resultado.getString(\"referencia\"));\n oListaTemporal.setFechaPago(bd.resultado.getString(\"fecha_pago\"));\n oListaTemporal.setNombreUsuario(bd.resultado.getString(\"name_usuario\"));\n oListaTemporal.setNombreCliente(bd.resultado.getString(\"nombre_cliente\"));\n oListaTemporal.setValor(bd.resultado.getDouble(\"valor_pago\"));\n oListaTemporal.setFechaRegistro(bd.resultado.getString(\"fecha_registro\"));\n oListaTemporal.setIdPago(bd.resultado.getInt(\"idPago\"));\n data.add(oListaTemporal);\n }\n while(bd.resultado.next()); \n //return data;\n }\n else\n { \n data = null;\n } \n }\n catch(Exception ex)\n {\n System.out.print(ex);\n data = null;\n } \n bd.desconectarBaseDeDatos();\n return data;\n }", "private void cargaComentarios() {\n\t\ttry{\n\t\t\t String Sjson= Utils.doHttpConnection(\"http://codigo.labplc.mx/~mikesaurio/taxi.php?act=pasajero&type=getcomentario&placa=\"+placa);\n\t\t JSONObject json= (JSONObject) new JSONTokener(Sjson).nextValue();\n\t\t JSONObject json2 = json.getJSONObject(\"message\");\n\t\t JSONObject jsonResponse = new JSONObject(json2.toString());\n\t\t JSONArray cast2 = jsonResponse.getJSONArray(\"calificacion\");\n\t\t\t ArrayList<ComentarioBean> arrayComenario= new ArrayList<ComentarioBean>();\n\t\t\t for (int i=0; i<cast2.length(); i++) {\n\t\t\t \tJSONObject oneObject = cast2.getJSONObject(i);\n\t\t\t\t\t\t try {\n\t\t\t\t\t\t\t ComentarioBean\t comentarioBean = new ComentarioBean();\n\t\t\t\t\t\t\t comentarioBean.setComentario((String) oneObject.getString(\"comentario\"));\n\t\t\t\t\t\t\t Float calif =Float.parseFloat((String) oneObject.getString(\"calificacion\"));\n\t\t\t\t\t\t\t comentarioBean.setCalificacion(calif);\n\t\t\t\t\t\t\t comentarioBean.setId_facebook((String) oneObject.getString(\"id_face\"));\n\t\t\t\t\t\t\t comentarioBean.setFecha_comentario((String) oneObject.getString(\"hora_fin\"));\n\t\t\t\t\t\t\t arrayComenario.add(comentarioBean);\n\t\t\t\t\t\t\t sumaCalificacion+=calif;\n\t\t\t\t\t\t } catch (JSONException e) { \n\t\t\t\t\t\t\t DatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t\t\t\t }\n\t\t\t }\n\t\t\t autoBean.setArrayComentarioBean(arrayComenario);\n\t\t\t if(cast2.length()>0){\n\t\t\t \t float califParcial = (sumaCalificacion/cast2.length());\n\t\t\t \t PUNTOS_USUARIO =usuarioCalifica(califParcial); //(int) (califParcial * 20 /5);\n\t\t\t \t autoBean.setCalificacion_usuarios(califParcial);\n\t\t\t }else{\n\t\t\t \t autoBean.setCalificacion_usuarios(0);\n\t\t\t }\n\t\t\t}catch(JSONException e){\n\t\t\t\tDatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t}\n\t}", "private ArrayList<Integer> GetAllServiceQuantity(List<Services> services){\n // Create new empty arrayList of service quantity\n ArrayList<Integer> tmp = new ArrayList<Integer>();\n\n // Loop though services list and add service quantity to tmp arraylist\n for(Services service : services){\n tmp.add(service.getServiceQuantity());\n }\n\n return tmp;\n }", "public static ArrayList cargarEstudiantes() {\r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.printf(\"conexion establesida\");\r\n Statement sentencia = conexion.createStatement();\r\n ResultSet necesario = sentencia.executeQuery(\"select * from estudiante\");\r\n\r\n Estudiante estudiante;\r\n\r\n listaEstudiantes = new ArrayList<>();\r\n while (necesario.next()) {\r\n\r\n String Nro_de_ID = necesario.getString(\"Nro_de_ID\");\r\n String nombres = necesario.getString(\"Nombres\");\r\n String apellidos = necesario.getString(\"Apellidos\");\r\n String laboratorio = necesario.getString(\"Laboratorio\");\r\n String carrera = necesario.getString(\"Carrera\");\r\n String modulo = necesario.getString(\"Modulo\");\r\n String materia = necesario.getString(\"Materia\");\r\n String fecha = necesario.getString(\"Fecha\");\r\n String horaIngreso = necesario.getString(\"Hora_Ingreso\");\r\n String horaSalida = necesario.getString(\"Hora_Salida\");\r\n\r\n estudiante = new Estudiante();\r\n\r\n estudiante.setNro_de_ID(Nro_de_ID);\r\n estudiante.setNombres(nombres);\r\n estudiante.setLaboratorio(laboratorio);\r\n estudiante.setCarrera(carrera);\r\n estudiante.setModulo(modulo);\r\n estudiante.setMateria(materia);\r\n estudiante.setFecha(fecha);\r\n estudiante.setHora_Ingreso(horaIngreso);\r\n estudiante.setHora_Salida(horaSalida);\r\n\r\n listaEstudiantes.add(estudiante);\r\n\r\n }\r\n sentencia.close();\r\n conexion.close();\r\n } catch (Exception ex) {\r\n System.out.println(\"Error en la conexion\" + ex);\r\n }\r\n return listaEstudiantes;\r\n }", "public ArrayList<Comobox> fontesRendimentos()\n {\n @SuppressWarnings(\"MismatchedQueryAndUpdateOfCollection\")\n ArrayList<Comobox> al= new ArrayList<>();\n @SuppressWarnings(\"UnusedAssignment\")\n ResultSet rs = null;\n sql=\"select * FROM VER_FONTEPAGAMENTO\";\n Conexao conexao = new Conexao();\n if(conexao.getCon()!=null)\n {\n try \n {\n cs = conexao.getCon().prepareCall(sql);\n cs.execute();\n rs=cs.executeQuery(); \n if (rs!=null) \n { \n while (rs.next())\n { \n al.add(new Comobox(rs.getString(\"REALID\"), rs.getString(\"FONTE\")));\n } \n }\n rs.close();\n } \n catch (SQLException ex)\n {\n Logger.getLogger(CreditoDao.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Erro a obter fontes rendimentos \"+ex.getMessage());\n }\n }\n return al;\n }", "public ArrayList<EstacionServicio> getListadoEstacionServicio() throws Exception {\n\t\t\t\n\t\t\t\tConnection conn = ds.getConnection();\n\t\t\t\tArrayList<EstacionServicio> lista = new ArrayList<EstacionServicio>();\n\t\t\t\tPreparedStatement stmt = conn.prepareStatement(\"SELECT * FROM ESTACION_SERVICIO\");\n\t\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tlista.add (new EstacionServicio(rs.getInt(1),rs.getString(2),rs.getDate(3),rs.getFloat(4),rs.getFloat(5),rs.getString(6)));\n\t\t\t\t}\n\t\t\t\tif (rs != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\trs.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (stmt != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tstmt.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\treturn lista;\n\t\t\t}", "private ArrayList<ServiceModel> getServiceModelJSON(JSONObject obj) {\n ArrayList<ServiceModel> servicesModel = new ArrayList<>();\n\n try {\n JSONArray servicesArray = obj.getJSONArray(\"services\");\n int limit = servicesArray.length();\n\n for (int i = 0; i < limit; i++) {\n JSONObject service = servicesArray.getJSONObject(i);\n\n ServiceModel serviceModel = new ServiceModel();\n\n serviceModel.setId(service.getInt(\"ID_SERVICE\"));\n serviceModel.setName(Conexion.decode(service.getString(\"NAME_SERVICE\")));\n serviceModel.setReserved(service.getInt(\"RESERVED_SERVICE\"));\n serviceModel.setDescription(Conexion.decode(service.getString(\"DESCRIPTION_SERVICE\")));\n serviceModel.setImage(service.getString(\"IMAGE_SERVICE\"));\n serviceModel.setIdType(service.getInt(\"ID_TYPE_SERVICE\"));\n serviceModel.setNameType(Conexion.decode(service.getString(\"NAME_TYPE_SERVICE\")));\n serviceModel.setValueType(service.getInt(\"VALUE_TYPE_SERVICE\"));\n\n serviceModel.setServicePrice(serviceServicePrice.getServicePriceModelJSON(service, serviceModel.getId(), false));\n servicesModel.add(serviceModel);\n }\n\n } catch (JSONException e) {\n System.out.println(\"Error: Objeto no convertible, \" + e.toString());\n e.printStackTrace();\n }\n return servicesModel;\n }", "private void consultartiposincidentes() {\n\n db= con.getWritableDatabase();\n TipoIncidente clase_tipo_incidente= null;\n tipoincidentelist= new ArrayList<TipoIncidente>();\n //CONSULTA\n Cursor cursor=db.rawQuery(\"select codigo_incidente,tipo_incidente from \" +Utilitario.TABLE_TIPO_INCIDENTE,null);\n\n while (cursor.moveToNext()){\n clase_tipo_incidente=new TipoIncidente();\n clase_tipo_incidente.setCodigo(cursor.getInt(0));\n clase_tipo_incidente.setDescripcion(cursor.getString(1));\n\n Log.i(\"id\",clase_tipo_incidente.getCodigo().toString());\n Log.i(\"desc\",clase_tipo_incidente.getDescripcion());\n\n tipoincidentelist.add(clase_tipo_incidente);\n\n }\n llenarspinner();\n db.close();\n }", "public Vector listaAsignaturasTotal(String nombre_titulacion)\n {\n try\n { \n //Se obtiene una conexion\n Connection conexion = this.bbdd.getConexion();\n\n //Se prepara la query\n String query = \"SELECT * FROM asignaturatotal \";\n query += \"WHERE tit_nombre='\"+nombre_titulacion+\"' AND activa = 's'\";\n\n //Se crea un vector de asignaturas\n Vector vectorAsignaturas = new Vector();\n\n //Se ejecuta la query\n Statement st = conexion.createStatement();\n ResultSet resultado = st.executeQuery(query);\n\n //Para cada fila se creará un objeto y se rellenará\n //con los valores de las columnas.\n while(resultado.next())\n {\n asignatura asignatura = new asignatura();\n\n asignatura.setCodigo(resultado.getString(\"codigo\"));\n asignatura.setTitulo(resultado.getString(\"titulo\"));\n asignatura.setFechaInicio(resultado.getDate(\"fechainicio\"));\n asignatura.setFechaFin(resultado.getDate(\"fechafin\"));\n asignatura.setResponsable(resultado.getString(\"responsable\"));\n asignatura.setEmail(resultado.getString(\"email\"));\n asignatura.setTelefono(resultado.getString(\"telefono\"));\n\n //Se añade la asignatura al vector de asignaturas\n vectorAsignaturas.add(asignatura);\n }\n\n //Se cierra la conexión\n this.bbdd.cerrarConexion(conexion);\n\n return vectorAsignaturas;\n }\n catch(SQLException e)\n {\n System.out.println(\"Error al acceder a las asignaturas de la Base de Datos: \"+e.getMessage());\n return null;\n }\n }", "private void getObsequios(){\n mObsequios = estudioAdapter.getListaObsequiosSinEnviar();\n //ca.close();\n }", "private List getServicesHistory(String xmlResponse) {\r\n\r\n\t\tList serviceList = new ArrayList();\r\n\t\t\r\n\t\tServiceVO activeService;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tElement root;\r\n\t\t\troot = DOMUtils.openDocument(new ByteArrayInputStream(xmlResponse.getBytes()));\r\n\t\t\tElement element = DOMUtils.getElement(root, \"data\", true);\r\n\t\t\telement = DOMUtils.getElement(element, \"contract\", true);\r\n\t\t\t\r\n\t\t\tNodeList serviceNodeList = DOMUtils.getElements(element, \"service\");\r\n\t\t\tElement subElement;\r\n\t\t\tfor (int i = 0; i < serviceNodeList.getLength(); i++) {\r\n\t\t\t\telement = (Element) serviceNodeList.item(i);\r\n\t\t\t\tactiveService = new ServiceVO();\r\n\t\t\t\t//sets the sncode\r\n\t\t\t\tsubElement = DOMUtils.getElement(element, \"code\", true);\r\n\t\t\t\tactiveService.setSnCode(DOMUtils.getText(subElement).toString());\r\n\t\t\t\t//sets the description\r\n\t\t\t\tsubElement = DOMUtils.getElement(element, \"desc\", true);\r\n\t\t\t\tactiveService.setDescription(DOMUtils.getText(subElement).toString());\r\n\t\t\t\t//sets the service history\r\n\t\t\t\tsubElement = DOMUtils.getElement(element, \"contract-svc\", true);\r\n\t\t\t\tsubElement = DOMUtils.getElement(subElement, \"status-hist\", true);\r\n\t\t\t\tactiveService.setServiceHistory(getServiceHistory(DOMUtils.getText(subElement).toString()));\r\n\t\t\t\t//sets the service activation\r\n\t\t\t\tactiveService.setServiceActivation(getActivationDate(DOMUtils.getText(subElement).toString()));\r\n\t\t\t\t//sets the service status\r\n\t\t\t\tactiveService.setStatus(getServiceCurrentStatus(DOMUtils.getText(subElement).toString()));\r\n\t\t\t\t\r\n\t\t\t\tserviceList.add(activeService);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tlog.error(\"Erro encontrado no XML de resposta do Infobus.\", e);\r\n\t\t\tthrow new ErrorMessageException(\"Erro encontrado no XML de resposta do Infobus.\", e);\r\n\t\t}\r\n\t\t\r\n\t\treturn serviceList;\t\t\t\t\t\t\r\n\t\t\r\n\t}", "public ArrayList<VMSpDatosPuestosAlquilados> GetStallsPerRental(int idClient){\n ArrayList<VMSpDatosPuestosAlquilados> s = new ArrayList<VMSpDatosPuestosAlquilados>();\n try {\n Statement stmt = conn.createStatement();\n ResultSet query = stmt.executeQuery(\"sp_mostrar_datos_puestos_alquilados_por_cliente \" + idClient);\n while (query.next()) {\n VMSpDatosPuestosAlquilados vm = new VMSpDatosPuestosAlquilados();\n vm.setPiso(query.getInt(\"Piso\"));\n vm.setCantidad_de_computadoras(query.getInt(\"Cantidad de computadoras\"));\n vm.setCantidad_de_sillas(query.getString(\"Cantidad sillas\"));\n vm.setTiene_ventana(query.getString(\"Tiene ventana?\"));\n vm.setTiene_acesso_a_sala_de_reuniones(query.getString(\"Tiene acesso a sala de reuniones?\"));\n vm.setPrecio_mensual(query.getDouble(\"Precio mensual\"));\n vm.setFecha_de_alquiler(query.getString(\"Fecha de alquiler\"));\n s.add(vm);\n }\n query.close();\n stmt.close();\n conn.close();\n } catch (SQLException ex) {\n Logger.getLogger(ClientManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return s;\n }", "private void getVacunas(){\n mVacunas = estudioAdapter.getListaVacunasSinEnviar();\n //ca.close();\n }", "public List<Empresa> getData() {\n lista = new ArrayList<Empresa>();\n aux = new ArrayList<Empresa>();\n Empresa emp = new Empresa(1, \"restaurantes\", \"KFC\", \"Av. Canada 312\", \"tel:5050505\", \"[email protected]\", \"www.kfc.com\", \"https://upload.wikimedia.org/wikipedia/en/thumb/b/bf/KFC_logo.svg/1024px-KFC_logo.svg.png\", \"Restaurante de comida rapida.exe\");\n lista.add(emp);\n emp = new Empresa(2, \"restaurantes\", \"Pizza Hut\", \"Av. Aviación 352\", \"tel:1111111\", \"[email protected]\", \"www.pizzahut.com\", \"https://upload.wikimedia.org/wikipedia/en/thumb/d/d2/Pizza_Hut_logo.svg/1088px-Pizza_Hut_logo.svg.png\", \"Restaurante de comida rapida.exe\");\n lista.add(emp);\n emp = new Empresa(3, \"restaurantes\", \"Chifa XUNFAN\", \"Av. del Aire 122\", \"tel:1233121\", \"[email protected]\", \"www.chifaxunfan.com\", \"https://www.piscotrail.com/sf/media/2011/01/chifa.png\", \"Restaurante de comida oriental.exe\");\n lista.add(emp);\n emp = new Empresa(4, \"Restaurantes\", \"El buen sabor\", \"Av. Benavides 522\", \"tel:5366564\", \"[email protected]\", \"www.elbuensabor.com\", \"http://www.elbuensaborperu.com/images/imagen1.jpg\", \"Restaurante de comida peruana\");\n lista.add(emp);\n emp = new Empresa(5, \"Restaurantes\", \"La Romana\", \"Av. San borja norte 522\", \"tel:6462453\", \"[email protected]\", \"www.laromana.com\", \"https://3.bp.blogspot.com/-rAxbci6-cM4/WE7ZppGVe4I/AAAAAAAA3fY/TkiySUlQJTgR7xkOXViJ1IjFRjOulFWnwCLcB/s1600/pizzeria-la-romana2.jpg\", \"Restaurante de comida italiana\");\n lista.add(emp);\n emp = new Empresa(6, \"Ocio\", \"Cinemark\", \"Av. San borja norte 522\", \"tel:6462453\", \"[email protected]\", \"www.cinemark.com.pe\", \"https://s3.amazonaws.com/moviefone/images/theaters/icons/cienmark-logo.png\", \"El mejor cine XD\");\n lista.add(emp);\n emp = new Empresa(7, \"Educación\", \"TECSUP\", \"Av. cascanueces 233\", \"tel:6462453\", \"[email protected]\", \"www.tecsup.edu.pe\", \"http://www.miningpress.com/media/img/empresas/tecsup_1783.jpg\", \"Instituto tecnologico del Perú\");\n lista.add(emp);\n emp = new Empresa(8, \"Ocio\", \"CC. Arenales\", \"Av. arenales 233\", \"tel:6462453\", \"[email protected]\", \"www.arenales.com.pe\", \"http://4.bp.blogspot.com/-jzojuNRfh_s/UbYXFUsN9wI/AAAAAAAAFjU/ExT_GmT8kDc/s1600/35366235.jpg\", \"Centro comercial arenales ubicado en la avenida Arenales al costado del Metro Arenales\");\n lista.add(emp);\n emp = new Empresa(9, \"Ocio\", \"Jockey Plaza\", \"Av. Javier Prado 233\", \"tel:6462453\", \"[email protected]\", \"www.jockeyplaza.com.pe\", \"http://3.bp.blogspot.com/-a2DHRxS7R8k/T-m6gs9Zn7I/AAAAAAAAAFA/z_KeH2QTu18/s1600/logo+del+jockey.png\", \"Un Centro Comercial con los diversos mercados centrados en la moda y tendencia del mundo moderno\");\n lista.add(emp);\n emp = new Empresa(10, \"Educación\", \"UPC\", \"Av. Monterrico 233\", \"tel:6462453\", \"[email protected]\", \"www.upc.edu.pe\", \"https://upload.wikimedia.org/wikipedia/commons/f/fc/UPC_logo_transparente.png\", \"Universidad Peruana de Ciencias Aplicadas conocida como UPC se centra en la calidad de enseñanza a sus estudiantes\");\n lista.add(emp);\n int contador=0;\n String key = Busqueda.getInstance().getKey();\n for (int i = 0; i < lista.size(); i++) {\n if (lista.get(i).getRubro().equalsIgnoreCase(key)||lista.get(i).getRubro().toLowerCase().contains(key.toLowerCase())) {\n aux.add(lista.get(i));\n }else {\n if (lista.get(i).getNombre().equalsIgnoreCase(key)||lista.get(i).getNombre().toLowerCase().contains(key.toLowerCase())) {\n aux.add(lista.get(i));\n break;\n }else {\n\n }\n }\n\n }\n return aux;\n }", "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 static ArrayList<SuperAdminSalesmanRecoveriesBean> getSuperAdminSalesmansRecoveriesTotal(\r\n\t\t\tString dateSet) {\r\n\t\t// HashMap<String, String> map = null;\r\n\t\t// HashMap<String, String> map2 = null;\r\n\t\tSystem.out.println(\"Date : \" + dateSet);\r\n\t\tint paidCached;\r\n\t\tint remainCached;\r\n\t\tint paidAmountCached;\r\n\t\tint remainingAmountCached;\r\n\t\tString dateCached;\r\n\t\tArrayList<SuperAdminSalesmanRecoveriesBean> list = new ArrayList<>();\r\n\t\tArrayList<SuperAdminSalesmanRecoveriesBean> list2 = new ArrayList<>();\r\n\t\tCallableStatement call = null;\r\n\t\tResultSet rs = null;\r\n\r\n\t\ttry (Connection con = Connect.getConnection()) {\r\n\r\n\t\t\tcall = con\r\n\t\t\t\t\t.prepareCall(\"{CALL get_super_admin_salesmans_recoveries_dates(?)}\");\r\n\t\t\tcall.setString(1, dateSet);\r\n\t\t\trs = call.executeQuery();\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tSuperAdminSalesmanRecoveriesBean bean = new SuperAdminSalesmanRecoveriesBean();\r\n\t\t\t\tbean.setRemainingRecoveries(rs.getInt(2));\r\n\t\t\t\tbean.setPaidRecoveries(rs.getInt(3));\r\n\t\t\t\tbean.setDate(rs.getDate(1) + \"\");\r\n\t\t\t\tbean.setPaidAmount(rs.getInt(4));\r\n\t\t\t\tbean.setRemainingAmount(rs.getInt(5));\r\n\t\t\t\t// System.out.println(\"+++++++++++++++++++++\"+bean.getPaidRecoveries());\r\n\t\t\t\t// map2.put(\"remainingRecoveries\",\r\n\t\t\t\t// rs.getInt(\"remaining_recovery\")+\"\");\r\n\t\t\t\t// map2.put(\"getDate\", rs.getDate(\"Date\")+\"\");\r\n\t\t\t\t// map2.put(\"paidRecoveries\", rs.getInt(\"paid_recovery\")+\"\");\r\n\r\n\t\t\t\tlist2.add(bean);\r\n\t\t\t}\r\n\r\n\t\t\tcall = con\r\n\t\t\t\t\t.prepareCall(\"{CALL get_super_admin_salesmans_recoveries()}\");\r\n\t\t\trs = call.executeQuery();\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\t// map = new HashMap<>();\r\n\t\t\t\tSuperAdminSalesmanRecoveriesBean bean2 = new SuperAdminSalesmanRecoveriesBean();\r\n\t\t\t\tbean2.setRemainingRecoveries(rs.getInt(3));\r\n\t\t\t\tbean2.setPaidRecoveries(rs.getInt(2));\r\n\t\t\t\tbean2.setDate(rs.getDate(1) + \"\");\r\n\t\t\t\tbean2.setPaidAmount(rs.getInt(4));\r\n\t\t\t\tbean2.setRemainingAmount(rs.getInt(5));\r\n\t\t\t\t// map.put(\"remainingRecoveries\",\r\n\t\t\t\t// rs.getInt(\"remaining_recovery\")+\"\");\r\n\t\t\t\t// map.put(\"getDate\", rs.getDate(\"due_date\")+\"\");\r\n\t\t\t\t// map.put(\"paidRecoveries\", rs.getInt(\"paid_recovery\")+\"\");\r\n\r\n\t\t\t\tlist.add(bean2);\r\n\t\t\t}\r\n\r\n\t\t\tfor (int i = 0; i < list2.size(); i++) {\r\n\t\t\t\tdateCached = list2.get(i).getDate();\r\n\t\t\t\t// System.out.println(dateCached);\r\n\t\t\t\tfor (int j = 0; j < list.size(); j++) {\r\n\t\t\t\t\tif (list.get(j).getDate().equalsIgnoreCase(dateCached)) {\r\n\t\t\t\t\t\t// System.out.println(list.get(j).get(\"remainingRecoveries\"));\r\n\t\t\t\t\t\tpaidCached = list.get(j).getPaidRecoveries();\r\n\t\t\t\t\t\tremainCached = list.get(j).getRemainingRecoveries();\r\n\t\t\t\t\t\tpaidAmountCached = list.get(j).getPaidAmount();\r\n\t\t\t\t\t\tremainingAmountCached = list.get(j)\r\n\t\t\t\t\t\t\t\t.getRemainingAmount();\r\n\t\t\t\t\t\t// list2.get(i).put(\"remainingRecoveries\",\r\n\t\t\t\t\t\t// list.get(j).get(\"remainingRecoveries\"));\r\n\t\t\t\t\t\t// list2.get(i).put(\"paidRecoveries\",list.get(j).get(\"paidRecoveries\"));\r\n\t\t\t\t\t\tlist2.get(i).setPaidRecoveries(paidCached);\r\n\t\t\t\t\t\tlist2.get(i).setRemainingRecoveries(remainCached);\r\n\t\t\t\t\t\tlist2.get(i).setPaidAmount(paidAmountCached);\r\n\t\t\t\t\t\tlist2.get(i).setRemainingAmount(remainingAmountCached);\r\n\t\t\t\t\t\tbreak;\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 (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn list2;\r\n\t}", "private void limparPesquisasRecentes() {\n facade.deletarTodosTermos();\n pesquisas = facade.obterTermos();\n adapter.clear();\n adapter.notifyDataSetChanged();\n listViewPesquisas.refreshDrawableState();\n\n }", "private void refreshList() {\n\t\t\t\tlist.clear();\n\t\t\t\tGetChildrenBuilder childrenBuilder = client.getChildren();\n\t\t\t\ttry {\n\t\t\t\t\tList<String> listdir = childrenBuilder.forPath(servicezoopath);\n\t\t\t\t\tfor (String string : listdir) {\n\t\t\t\t\t\tbyte[] data = client.getData().forPath(servicezoopath + \"/\" + string);\n\t\t\t\t\t\tlist.add(new String(data));\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception 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\t\n\t\t\t}", "@Override\n protected void onResume() {\n super.onResume();\n if (adapter != null) {\n Log.e(\"resumed\", mList.size() + \"\");\n mList.clear();\n mList.addAll(table.getOrderedUncook());\n adapter.notifyDataSetChanged();\n }\n updateTotal();\n }", "public void fetchTasks() {\n tasksTotales.clear();\n for (String taskId : taskList) {\n databaseTaskReference.child(taskId).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n com.ijzepeda.armet.model.Task taskTemp = dataSnapshot.getValue(com.ijzepeda.armet.model.Task.class);\n tasksTotales.add(taskTemp);\n taskAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }\n\n\n }", "private void loadData() {\n progressBar.setVisibility(View.VISIBLE);\n feeService.GetInstallmentSummary(userData.getSchoolId(), userData.getAcademicyearId()).enqueue(new Callback<InstallmentSummaryBean>() {\n @Override\n public void onResponse(Call<InstallmentSummaryBean> call, Response<InstallmentSummaryBean> response) {\n InstallmentSummaryBean installmentSummaryBean = response.body();\n if (installmentSummaryBean != null) {\n\n if (installmentSummaryBean.rcode == Constants.Rcode.OK) {\n installmentSummaryModels.clear();\n long total = 0;\n for (InstallmentSummaryModel installment : installmentSummaryBean.data) {\n installmentSummaryModels.add(installment);\n try {\n total += Integer.parseInt(installment.Amount);\n } catch (NumberFormatException ex) {\n ex.printStackTrace();\n }\n }\n\n adapter.notifyDataSetChanged();\n totalAmount.setText(\" Installment Total(Rs): \" + String.valueOf(total));\n\n } else {\n Toast.makeText(context, \"Installment Summary could not be loaded. Please try again.\", Toast.LENGTH_LONG).show();\n }\n }\n// hideLoader();\n progressBar.setVisibility(View.GONE);\n }\n\n @Override\n public void onFailure(Call<InstallmentSummaryBean> call, Throwable t) {\n // hideLoader();\n progressBar.setVisibility(View.GONE);\n Toast.makeText(context, \"Installment Summary could not be loaded. Please try again.\", Toast.LENGTH_LONG).show();\n }\n });\n }", "public ArrayList<DTOValoracion> listaValoraciones() {\n ArrayList<DTOValoracion> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select valoracion, COUNT (valoracion) cantidad\\n\"\n + \"from Comentarios\\n\"\n + \"where valoracion is not null\\n\"\n + \"group by valoracion \");\n\n while (rs.next()) {\n\n int valoracion = rs.getInt(1);\n int cantidad = rs.getInt(2);\n\n DTOValoracion v = new DTOValoracion(valoracion, cantidad);\n\n lista.add(v);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "public void fetchGuestList() {\n mRowDataList.clear();\n int temp = 0;\n todayIncome = 0;\n guestCount = 0;\n for (int i = 0; i < 10; i++) {\n temp = 800 + i;\n String name = \"Guest No.\" + i;\n String timeSpanPlaceHolder = \"PlaceHolder\";\n todayIncome += temp;\n mRowDataList.add(new RecyclerListAdapter.rowData(\"\" + temp, name, \"\" + temp, timeSpanPlaceHolder));\n }\n guestCount = mRowDataList.size();\n\n }", "private void listarEntidades() {\r\n\t\tsetListEntidades(new ArrayList<EntidadDTO>());\r\n\t\tgetListEntidades().addAll(entidadController.encontrarTodos());\r\n\t\tif (!getListEntidades().isEmpty()) {\r\n\t\t\tfor (EntidadDTO entidadDTO : getListEntidades()) {\r\n\t\t\t\t// Conversión de decimales.\r\n\t\t\t\tDouble porcentaje = entidadDTO.getPorcentajeValorAsegurable() * 100;\r\n\t\t\t\tdouble por = Math.round(porcentaje * Math.pow(10, 2)) / Math.pow(10, 2);\r\n\t\t\t\tentidadDTO.setPorcentajeValorAsegurable(por);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setServicios(List<ServicioEntity> servicios) {\r\n this.servicios = servicios;\r\n }", "private void getPTs(){\n mPyTs = estudioAdapter.getListaPesoyTallasSinEnviar();\n //ca.close();\n }", "private ArrayList<String[]> getTodasOS() {\n ArrayList <OrdemServico> os = new OS_Controller(this).buscarTodasOrdemServicos();\n\n ArrayList<String[]> rows = new ArrayList<>();\n ArrayList<OrdemServico> ordemServicos=new ArrayList<>();\n\n for (OrdemServico ordemServico :os){\n String id = String.valueOf(ordemServico.getId());\n String numero = ordemServico.getNumero_ordem_servico();\n String cliente = ordemServico.getCliente().getNome();\n SimpleDateFormat formato = new SimpleDateFormat(\"dd-MM-yyyy\");\n String dataEntrada = formato.format(ordemServico.getData_entrada());\n String status = ordemServico.getStatus_celular();\n String tecnico = ordemServico.getTecnico_responsavel();\n String precoFinal = ordemServico.getValor_final();\n String marca = ordemServico.getMarca();\n String modelo = ordemServico.getModelo();\n\n rows.add(new String[]{id,numero,dataEntrada, marca, modelo,cliente,status,tecnico, precoFinal});\n ordemServicos.add(ordemServico);\n }\n //String cliente = String.valueOf(os.getCliente());\n return rows;\n\n }", "public ArrayList<Cuenta> verClientesConMasDinero() {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT sum(Credito) as Dinero, c.Codigo_Cliente as Codigo, l.Nombre as Nombre FROM Cuenta c join Cliente l on c.Codigo_Cliente = l.Codigo group by Codigo_Cliente order by sum(Credito) desc limit 10\";\n PrSt = conexion.prepareStatement(Query);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = new Cuenta();\n cuenta.setCredito(rs.getDouble(\"Dinero\"));\n cuenta.setCodigo_cliente(rs.getString(\"Codigo\"));\n cuenta.setCodigo(rs.getString(\"Nombre\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "private void updateList() {\n Model.instace.getAllArticles(new ArticleFirebase.GetAllArticlesAndObserveCallback() {\n @Override\n public void onComplete(List<Article> list) {\n data.clear();\n data = list;\n adapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancel() {\n\n }\n });\n }", "public ArrayList<Mascota> obtenerDatos(){\n\n BaseDatos db = new BaseDatos(context);\n\n ArrayList<Mascota> aux = db.obtenerTodoslosContactos();\n\n if(aux.size()==0){\n insertarMascotas(db);\n aux = db.obtenerTodoslosContactos();\n }\n\n return aux;\n }", "public void getCurrentInvoices() {\n Cursor res = db.getAllCurrentDayInvoices();\n if(res.getCount() < 0){\n Log.e(\"Error\",\"Not able to retrieve product data\");\n }\n else {\n list.clear();\n while (res.moveToNext()) {\n String invoiceNum = res.getString(3);\n String customerName = res.getString(9);\n String statusPost = res.getString(21);\n list.add(new SearchInvoiceClass(customerName+System.lineSeparator()+invoiceNum+System.lineSeparator()+statusPost, R.drawable.ic_baseline_print, R.drawable.ic_baseline_preview, R.drawable.ic_baseline_cancel));\n }\n }\n }", "public ArrayList<Consulta> recuperaAllServicios() {\r\n\t\treturn servicioConsulta.recuperaAllServicios();\r\n\t}", "private void getNewVacunas(){\n mNewVacunas = estudioAdapter.getListaNewVacunasSinEnviar();\n //ca.close();\n }", "private void LoadItems() {\n\n Call<NewsResponce> callNews = null;\n\n if (SourceId != null && DateTo != null && DateAt != null) {\n callNews = newsApiInterface.GetEverything(NewsClient.API_KEY, DateAt, DateTo, currentPage, SourceId);\n\n } else if (SourceId != null && DateAt != null) {\n callNews = newsApiInterface.GetEverything(NewsClient.API_KEY, DateAt, currentPage, SourceId);\n\n } else if (SourceId != null && DateTo != null) {\n callNews = newsApiInterface.GetEverythingDateTo(NewsClient.API_KEY, DateTo, currentPage, SourceId);\n\n } else {\n DialogAlert(R.string.dialog_title_no_criterias, R.string.dialog_message_no_criterias);\n }\n\n if (callNews != null)\n callNews.enqueue(new Callback<NewsResponce>() {\n @Override\n public void onResponse(Call<NewsResponce> call, final Response<NewsResponce> response) {\n if (response.body() != null) {\n if (response.body().getTotalResults() > articleList.size()) {\n articleList.addAll(response.body().getArticles());\n newsAdapter.notifyDataSetChanged();\n ++currentPage;\n }\n } else\n articleList.clear();\n\n Log.d(TAG, articleList.size() + \"\");\n }\n\n @Override\n public void onFailure(Call<NewsResponce> call, Throwable t) {\n Log.e(TAG, t.getMessage());\n }\n });\n }", "private void loaddata(){\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n FirebaseDatabase database =FirebaseDatabase.getInstance();\n\n //Obtengo la referencia a la lista de pares del usuario.\n final DatabaseReference myRef = database.getReference(FirebaseReferences.LIST_PAIRS_REFERENCE).child(user.getUid()).child(FirebaseReferences.PAIR_REFERENCE);\n\n myRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n pairs.removeAll(pairs);\n\n for(DataSnapshot snapshot :dataSnapshot.getChildren()){\n\n Pair pair = snapshot.getValue(Pair.class);\n pairs.add(pair);\n }\n groupbyPairs(pairs);\n pairsAdapter.setPairs2List(pairsOrdered);\n\n btcInfo=pairsAdapter.getBtcInfo();\n if(btcInfo != null){\n getBalance();\n Log.e(\"Balance\", \"Balance Cargado\");\n }else {\n Log.e(\"Balance\", \"Sin balance\");\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }", "public ArrayList<AnuncioDTO> ObtenerAnuncios(){\n ArrayList<AnuncioDTO> ret=new ArrayList<AnuncioDTO>();\n\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is);\n PreparedStatement ps = conect.prepareStatement(sqlProp.getProperty(\"getAll.Anuncio\"));\n ResultSet rs = ps.executeQuery();\n while(rs.next()){\n int id=rs.getInt(1);\n TipoAnuncio tipoAnuncio=TipoAnuncio.valueOf(rs.getString(2));\n String titulo = rs.getString(3);\n String cuerpo = rs.getString(4);\n Date fechaPublicacion = new Date(rs.getDate(5).getTime());\n Date fechaFin=null;\n if(tipoAnuncio.equals(TipoAnuncio.Flash)){\n fechaFin= new Date(rs.getDate(6).getTime());\n }\n String emailPropietario = rs.getString(7);\n EstadoAnuncio estadoAnuncio = EstadoAnuncio.valueOf(rs.getString(8));\n \n ArrayList<String>temas=null;\n if(tipoAnuncio.equals(TipoAnuncio.Tematico)){\n temas=new ArrayList<String>();\n ArrayList<String>temasId = null;\n temasId=new ArrayList<String>(Arrays.asList(rs.getString(9).split(\",\")));\n InteresesDAO interesesDAO = new InteresesDAO(sqlPropertiesPath);\n Hashtable<Integer,String> intereses = interesesDAO.DevolverIntereses();\n for(String interes : temasId){\n temas.add(intereses.get(Integer.parseInt(interes)));\n }\n\n }\n ArrayList<String>destinatarios = ObtenerDestinatariosAnuncio(id);\n AnuncioDTO anuncioDTO=new AnuncioDTO(id, tipoAnuncio, titulo, cuerpo, fechaPublicacion, fechaFin, emailPropietario, estadoAnuncio, temas,destinatarios);\n\n ret.add(anuncioDTO);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n return ret;\n }", "public Vector listaAsignaturas(String nombre_titulacion)\n {\n try\n {\n Date fechaActual = new Date();\n SimpleDateFormat formato = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n\n //Se obtiene una conexion\n Connection conexion = this.bbdd.getConexion();\n\n //Se prepara la query\n String query = \"SELECT * FROM asignaturatotal \";\n query += \"WHERE fechainicio <='\" + formato.format(fechaActual) +\"' \";\n query += \"AND fechafin >= '\"+formato.format(fechaActual)+\"' AND tit_nombre='\"+nombre_titulacion+\"' AND activa = 's'\";\n\n //Se crea un vector de asignaturas\n Vector vectorAsignaturas = new Vector();\n\n //Se ejecuta la query \n Statement st = conexion.createStatement();\n ResultSet resultado = st.executeQuery(query);\n \n //Para cada fila se creará un objeto y se rellenará\n //con los valores de las columnas.\n while(resultado.next())\n {\n asignatura asignatura = new asignatura();\n \n asignatura.setCodigo(resultado.getString(\"codigo\"));\n asignatura.setTitulo(resultado.getString(\"titulo\"));\n asignatura.setFechaInicio(resultado.getDate(\"fechainicio\"));\n asignatura.setFechaFin(resultado.getDate(\"fechafin\"));\n asignatura.setResponsable(resultado.getString(\"responsable\"));\n asignatura.setEmail(resultado.getString(\"email\"));\n asignatura.setTelefono(resultado.getString(\"telefono\"));\n \n //Se añade la asignatura al vector de asignaturas\n vectorAsignaturas.add(asignatura);\n }\n\n //Se cierra la conexión\n this.bbdd.cerrarConexion(conexion);\n\n return vectorAsignaturas;\n }\n catch(SQLException e)\n {\n System.out.println(\"Error al acceder a las asignaturas de la Base de Datos: \"+e.getMessage());\n return null;\n }\n }", "public ArrayList<Cre> get_all_cre() throws Exception {\n\n \t\t log.setLevel(Level.INFO);\n\t log.info(\" service operation started !\");\n\n\t\ttry{\n\t\t\tArrayList<Cre> Cre_list;\n\n\t\t\tCre_list = Cre_Default_Activity_dao.get_all_cre();\n\n \t\t\tlog.info(\" Object returned from service method !\");\n\t\t\treturn Cre_list;\n\n\t\t}catch(Exception e){\n\n\t\t\tSystem.out.println(\"ServiceException: \" + e.toString());\n\t\t\tlog.error(\" service throws exception : \"+ e.toString());\n\n\t\t}\n\t\treturn null;\n\n\n\n\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 }", "public void getTotalCompoff(String employeeId) {\n\n Map<String,String> WorkFlowdataapp=new HashMap<String,String>();\n WorkFlowdataapp.put(\"employeeId\",employeeId);\n arrayList = new ArrayList<CompoffPOJO>();\n\n\n retrofit2.Call<CompOffDetails> call = apiService.getAgainstCompoffApp(WorkFlowdataapp);\n call.enqueue(new Callback<CompOffDetails>() {\n @Override\n public void onResponse(retrofit2.Call<CompOffDetails> call, Response<CompOffDetails> response) {\n // pd.dismiss();\n // reason12.clear();\n // reasonId.clear();\n arrayList.clear();\n float sum=0;\n\n\n if (response.isSuccessful()) {\n\n if (response.body().getStatus().equals(\"1\")) {\n for(int i=0;i<response.body().getData().size();i++) {\n sum=sum+Float.parseFloat(response.body().getData().get(i).getAvailableUnit());\n }\n totalCompOff.setText(String.valueOf(sum));\n\n }else {\n EmpowerApplication.alertdialog(response.body().getMessage(), CompoffActivity.this);\n }\n }else {\n switch (response.code()) {\n case 404:\n //Toast.makeText(ErrorHandlingActivity.this, \"not found\", Toast.LENGTH_SHORT).show();\n EmpowerApplication.alertdialog(\"File or directory not found\", CompoffActivity.this);\n break;\n case 500:\n EmpowerApplication.alertdialog(\"server broken\", CompoffActivity.this);\n\n //Toast.makeText(ErrorHandlingActivity.this, \"server broken\", Toast.LENGTH_SHORT).show();\n break;\n default:\n EmpowerApplication.alertdialog(\"unknown error\", CompoffActivity.this);\n\n //Toast.makeText(ErrorHandlingActivity.this, \"unknown error\", Toast.LENGTH_SHORT).show();\n break;\n }\n\n }\n\n\n }\n\n @Override\n public void onFailure(retrofit2.Call<CompOffDetails> call, Throwable t) {\n // Log error here since request faile\n //pd.dismiss();\n Log.e(\"TAG\", t.toString());\n EmpowerApplication.alertdialog(t.getMessage(), CompoffActivity.this);\n\n\n }\n });\n }", "public List<ServicioEntity> getServicios() {\r\n return servicios;\r\n }", "public void accessWebService() {\n\r\n dataList.clear();\r\n\r\n GetCampaignSuppliersInventories getCampaignSuppliersInventories = new GetCampaignSuppliersInventories(getContext(), this);\r\n Log.d(TAG, \"Making api call\");\r\n getCampaignSuppliersInventories.execute(Constants.LIST_CAMPAIGN_SUPPLIERS_URL);\r\n\r\n }", "@Override\n\t\t\tpublic void onRefresh() {\n\t\t\t\tcurPage = 1;\n\t\t\t\tmList.clear();\n\t\t\t\tJiaoYiJiLuExec.getInstance().getTiXianJiLuList(mHandler,\n\t\t\t\t\t\tManagerUtils.getInstance().yjtc.getId(), curPage,\n\t\t\t\t\t\tpageSize, NetworkAsyncCommonDefines.GET_TXJL_LIST_S,\n\t\t\t\t\t\tNetworkAsyncCommonDefines.GET_TXJL_LIST_F);\n\t\t\t}", "private void refreshList() {\n List<PullRequest> storedPullRequests = mDataManager.getPullRequests();\n\n mPullRequests.clear();\n\n for (PullRequest pullRequest : storedPullRequests) {\n mPullRequests.add(pullRequest);\n }\n\n mAdapter.notifyDataSetChanged();\n\n mDialog.dismiss();\n }", "public ArrayList<Comobox> listaUserBancos(String valor)\n {\n @SuppressWarnings(\"MismatchedQueryAndUpdateOfCollection\")\n ArrayList<Comobox> al= new ArrayList<>();\n ResultSet rs = null;\n\n sql=\"select * FROM table(FUNCT_LOAD_BANCO_SIMULACAO(?,?,?))\";\n Conexao conexao = new Conexao();\n if(conexao.getCon()!=null)\n {\n try \n {\n cs = conexao.getCon().prepareCall(sql);\n cs.setInt(1, SessionUtil.getUserlogado().getIdAgencia());\n cs.setString(2, SessionUtil.getUserlogado().getNif());\n cs.setFloat(3, Float.valueOf(valor));\n cs.execute();\n rs=cs.executeQuery(); \n if (rs!=null) \n { \n al.add(new Comobox(\"Selecione\", \"Selecione\"));\n while (rs.next())\n { \n al.add(new Comobox(rs.getString(\"ID\"), rs.getString(\"SIGLA\"), rs.getString(\"QUANTIDADE DE CHEQUES VARIAVEL\")));\n } \n }\n rs.close();\n \n if(al.size() == 1){\n FacesContext context = FacesContext.getCurrentInstance();\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR,\"Cheque\", \"Nenhum Cheque disponivel para essa agencia!\") );\n }\n } \n catch (SQLException ex)\n {\n Logger.getLogger(CreditoDao.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Erro a obter bancos \"+ex.getMessage());\n }\n }\n return al;\n }", "public ArrayList getStatisticiTot(int id) {\n c = db.rawQuery(\"select st.procent, cr.id from statistici st join caroserii cr ON st.caroserie_id=cr.id where st.id=\" + id , new String[]{});\n ArrayList lista = new ArrayList();\n while (c.moveToNext()) {\n int procente=c.getInt(0);\n int caroserie=c.getInt(1);\n lista.add(procente);\n lista.add(caroserie);\n }\n return lista;\n }", "@Override\n\tpublic List<Servicio> listarServicioTQ() {\n\t\tservicioDao = new ServicioDaoImpl();\n\t\treturn servicioDao.listarServicioTQ();\n\t}", "@Override\n\tpublic void loadData(){\n\t\tsuper.loadData();\n\t\topenProgressDialog();\n\t\tBmobQuery<Goods> query = new BmobQuery<Goods>();\n\t\tpageSize = 5;\n\t\tquery.setLimit(pageSize);\n\t\tquery.setSkip((pageNum - 1) * pageSize);\n\t\tif(point == 1){\n\t\t\tquery.addWhereEqualTo(\"type\", type);\n\t\t}else if(point == 2){\n\t\t\tquery.addWhereEqualTo(\"tradeName\", type);\n\t\t}\n\t\tquery.findObjects(this, new FindListener<Goods>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<Goods> object){\n\t\t\t\t// TODO Auto-generated method st\n\t\t\t\tcloseProgressDialog();\n\t\t\t\tonRefreshComplete();\n\t\t\t\tlist.addAll(object);\n\t\t\t\tLog.v(\"AAA\", JSON.toJSONString(list));\n\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onError(int code,String msg){\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(mContext, \"查询失败\", Toast.LENGTH_SHORT).show();\n\t\t\t\tcloseProgressDialog();\n\t\t\t}\n\t\t});\n\n\t}", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tlistitem.clear();\n\t\t\t\tnew AsyncTask<Void, Void, Void>() {\n\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\t\tgetmessage_list(1);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\t\t\tif (count >= 19) {\n\t\t\t\t\t\t\txListView.startLoadMore();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\txListView.stopLoadMore();\n\t\t\t\t\t\t}\n\t\t\t\t\t\txListView.setRefreshSuccess();\n\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t\t\tLog.d(TAG, \"jieshu\");\n\t\t\t\t\t}\n\t\t\t\t}.execute(null, null, null);\n\t\t\t}", "@GET\r\n @Produces(MediaType.APPLICATION_JSON)\r\n @Path(\"ServicioCantidad/list\")\r\n public ArrayList<ServicioCantidad> getXmla() throws Exception {\n ArrayList<ServicioCantidad> lista=new ArrayList<ServicioCantidad>();\r\n lista=ServicioCantidad.servicio_cantidad();\r\n return lista;\r\n }", "public ArrayList<Service> selectAll(){\n return Database.servico;\n }", "private void caricaLista() {\n /** variabili e costanti locali di lavoro */\n ArrayList unaLista = null;\n CampoDati unCampoDati = null;\n CDBLinkato unCampoDBLinkato = null;\n //@todo da cancellare\n try { // prova ad eseguire il codice\n /* recupera il campo DB specializzato */\n unCampoDBLinkato = (CDBLinkato)unCampoParente.getCampoDB();\n\n /* recupera la lista dal campo DB */\n unaLista = unCampoDBLinkato.caricaLista();\n\n /* recupera il campo dati */\n unCampoDati = unCampoParente.getCampoDati();\n\n /* registra i valori nel modello dei dati del campo */\n if (unaLista != null) {\n unCampoDati.setValoriInterni(unaLista);\n// unCampoDatiElenco.regolaElementiAggiuntivi();\n } /* fine del blocco if */\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } /* fine del blocco try-catch */\n\n }", "public ArrayList<Comobox> listaTodosBanco()\n {\n @SuppressWarnings(\"MismatchedQueryAndUpdateOfCollection\")\n ArrayList<Comobox> al= new ArrayList<>();\n @SuppressWarnings(\"UnusedAssignment\")\n ResultSet rs = null;\n sql=\"select * FROM VER_BANCO\";\n Conexao conexao = new Conexao();\n if(conexao.getCon()!=null)\n {\n try \n {\n if(conexao.getCon()!=null)\n {\n cs = conexao.getCon().prepareCall(sql);\n cs.execute();\n rs=cs.executeQuery(); \n if (rs!=null) \n { \n while (rs.next())\n { \n al.add(new Comobox(rs.getString(\"ID\"), rs.getString(\"SIGLA\")));\n } \n }\n rs.close();\n }\n else\n {\n al.add(new Comobox(\"djdj\",\"ddj\"));\n al.add(new Comobox(\"1dj\",\"dmsmdj\"));\n }\n } \n catch (SQLException ex)\n {\n Logger.getLogger(CreditoDao.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Erro a obter fontes rendimentos \"+ex.getMessage());\n }\n }\n return al;\n }", "public ArrayList<Proposta> buscarPropostasSemFiltro() {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n System.out.println(\"Lista de propostas: \");\n\n while (rs.next()) {\n\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n System.out.println(\"Proposta = \" + propostaTemp.getPropostaRealizada());\n System.out.println(\"Valor da Proposta = \" + propostaTemp.getValorProposta());\n\n System.out.println(\"---------------------------------\");\n\n listaDePropostas.add(propostaTemp);\n\n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao buscar propostas = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public void Lista(){\n\t\tcabeza = null;\n\t\ttamanio = 0;\n\t}", "public static ArrayList<obj_dos_campos> carga_tipo_producto() {\n ArrayList<obj_dos_campos> lista = new ArrayList<obj_dos_campos>();\n Connection c=null;\n try {\n c = conexion_odbc.Connexion_datos();\n Statement s = c.createStatement();\n ResultSet rs = s.executeQuery(\"select tip_prod_idn as data, tip_prod_nombre as label from tipo_producto order by tip_prod_nombre desc\");\n lista.add(new obj_dos_campos(\"0\",\"-- Seleccione --\"));\n while (rs.next()){\n lista.add(new obj_dos_campos(rs.getString(\"data\"),rs.getString(\"label\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n c.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n return lista;\n }", "public List<SpasaCRN> obtenerSpasaFiltros() {\n\n if (conectado) {\n try {\n String bool = \"false\";\n List<SpasaCRN> filtrosCRNs = new ArrayList();\n\n String Query = \"SELECT * FROM `spasa_filtros` WHERE anio = YEAR(NOW()) AND ciclo = CURRENT_CICLO() ;\";\n Logy.mi(\"Query: \" + Query);\n Statement st = Conexion.createStatement();\n ResultSet resultSet;\n resultSet = st.executeQuery(Query);\n while (resultSet.next()) {\n\n SpasaCRN crn = new SpasaCRN();\n SpasaMateria mat = new SpasaMateria();\n crn.setCodigoProf(resultSet.getString(\"usuario\")); //modificado ahora que se cambio in a String\n crn.setCrnCpr(resultSet.getString(\"crn\"));\n String mc = resultSet.getString(\"materia_cod\");\n if (mc != null && !mc.isEmpty() && !mc.equals(\"null\")) {\n crn.setMateriaRuta(mc);\n mat.setMateriaRuta(mc);\n }\n String m = resultSet.getString(\"materia_nom\");\n if (m != null && !m.isEmpty() && !m.equals(\"null\")) {\n mat.setNombreMat(m);\n }\n String d = resultSet.getString(\"departamento_nom\");\n if (d != null && !d.isEmpty() && !d.equals(\"null\")) {\n mat.setNombreDepto(d);\n }\n String dia = resultSet.getString(\"dia\");\n if (dia != null && !dia.isEmpty() && !dia.equals(\"null\")) {\n crn.setDiaHr(dia);\n }\n String h = resultSet.getString(\"hora\");\n if (h != null && !h.isEmpty() && !h.equals(\"null\")) {\n crn.setHiniHr(h);\n }\n crn.setMateria(mat);\n filtrosCRNs.add(crn);\n }\n\n return filtrosCRNs;\n\n } catch (SQLException ex) {\n Logy.me(\"No se pudo consultar tabla spasa_filtros : \" + ex.getMessage());\n return null;\n }\n } else {\n Logy.me(\"No se ha establecido previamente una conexion a la DB\");\n return null;\n }\n }", "public ArrayList<Cliente> listarClientes(){\n ArrayList<Cliente> ls = new ArrayList<Cliente>();\n try{\n\t\tString seleccion = \"SELECT codigo, nit, email, pais, fecharegistro, razonsocial, idioma, categoria FROM clientes\";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n //para marca un punto de referencia en la transacción para hacer un ROLLBACK parcial.\n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n Cliente cl = new Cliente();\n cl.setCodigo(rs.getInt(\"codigo\"));\n cl.setNit(rs.getString(\"nit\"));\n cl.setRazonSocial(rs.getString(\"razonsocial\"));\n cl.setCategoria(rs.getString(\"categoria\"));\n cl.setEmail(rs.getString(\"email\"));\n Calendar cal = new GregorianCalendar();\n cal.setTime(rs.getDate(\"fecharegistro\")); \n cl.setFechaRegistro(cal.getTime());\n cl.setIdioma(rs.getString(\"idioma\"));\n cl.setPais(rs.getString(\"pais\"));\n\t\t\tls.add(cl);\n\t\t}\n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n } \n return ls;\n\t}", "public ArrayList<TicketDto> consultarVentasChance(String fecha, String moneda) {\n ArrayList<TicketDto> lista = new ArrayList();\n Connection con = null;\n try {\n con = Recurso.Conexion.getPool().getDataSource().getConnection();\n String sql = \"SELECT codigo,sum(vrl_apuesta) \"\n + \"FROM ticket\"\n + \" where \"\n + \" fecha='\" + fecha + \"' and moneda='\" + moneda + \"' group by codigo\";\n\n PreparedStatement str;\n str = con.prepareStatement(sql);\n ResultSet rs = str.executeQuery();\n\n while (rs.next()) {\n TicketDto dto = new TicketDto();\n dto.setCodigo(rs.getString(1));\n dto.setValor(rs.getInt(2));\n dto.setMoneda(moneda);\n lista.add(dto);\n }\n str.close();\n rs.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n } finally {\n if (con != null) {\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(GestorPremio.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return lista;\n }\n }", "private void cargarDatos() {\r\n txtRucDni.setText(objVentas.getObjCliente().getStr_rucdni());\r\n txtCliente.setText(objVentas.getObjCliente().getStr_razonSocial());\r\n txtDocumento.setText(objVentas.getStr_numeroDocumento());\r\n txtMonto.setText(String.valueOf(Util.redondeo(objVentas.getDbTotal(), 2) ));\r\n txtPaga.requestFocus();\r\n setLocationRelativeTo(null);\r\n\r\n String arr[] = objVentas.getStr_numeroDocumento().split(\"-\");\r\n \r\n \r\n \r\n \r\n List<Ventas> listaVentaDetalle = new ArrayList<>();\r\n listaVentaDetalle = PaqueteBusinessDelegate.getFlujoCajaService().\r\n listarVenta(String.valueOf(gui.getLocal().getInt_idLocal()), Util.SINPAGO, objVentas.getStr_numeroDocumento(), 2);\r\n cargarTabla(listaVentaDetalle);\r\n \r\n int cantidadDocumentos;\r\n if (!this.gui.getListaConfig().get(0).getTipoImpresion().equals(Config.TICKETERA)){\r\n //Determinar la cantidad de productos por documentos\r\n cantidadDocumentos=(listaVentaDetalle.size()/10);\r\n log.info(\"Cantidad: \"+cantidadDocumentos);\r\n\r\n if(listaVentaDetalle.size()%10!=0)\r\n cantidadDocumentos++;\r\n }else{\r\n cantidadDocumentos = 1;\r\n }\r\n \r\n \r\n log.info(\"Cantidad: \"+cantidadDocumentos);\r\n \r\n// System.out.println(\"local : \"+objVentas.getObjLocal().getInt_idLocal()+\" tD :\"+arr[2].trim());\r\n txtNroDocumento.setText(PaqueteBusinessDelegate.getVentasService().\r\n consultaSiguinteCorrelativo(objVentas.getObjLocal().getInt_idLocal(), arr[2].trim()));\r\n \r\n// System.out.println(\"consulta : \"+PaqueteBusinessDelegate.getVentasService().\r\n// consultaSiguinteCorrelativo(objVentas.getObjLocal().getInt_idLocal(), arr[2].trim()));\r\n String documento=txtNroDocumento.getText();\r\n String statico=txtNroDocumento.getText().split(\"/\")[0];\r\n// System.out.println(\"estatico : \"+statico);\r\n statico=statico.split(\"-\")[0].concat(\"-\").concat(statico.split(\"-\")[1]).concat(\"-\");\r\n \r\n\r\n if (cantidadDocumentos>1){\r\n for (int i=1;i<cantidadDocumentos;i++){\r\n \r\n if (i<cantidadDocumentos)\r\n documento+=\";\";\r\n \r\n documento+=statico.concat(String.valueOf( Util.stringTOint(\r\n txtNroDocumento.getText().split(\"/\")[0].split(\"-\")[2])+i)).\r\n concat(\"/\").concat(txtNroDocumento.getText().split(\"/\")[1]);\r\n\r\n \r\n log.info(\"NRO: \"+documento);\r\n }\r\n txtNroDocumento.setText(documento);\r\n }\r\n \r\n \r\n \r\n \r\n }", "private void carregarAgendamentos() {\n agendamentos.clear();\n\n // Carregar os agendamentos do banco de dados\n agendamentos = new AgendamentoDAO(this).select();\n\n // Atualizar a lista\n setupRecyclerView();\n }", "private void getMasechtotListFromServer() {\n\n\n RequestManager.getMasechtotList().subscribe(new Observer<Result<MasechetList>>() {\n @Override\n public void onSubscribe(Disposable d) {\n\n }\n\n @Override\n public void onNext(Result<MasechetList> masechetListResult) {\n\n saveMasechtotList(masechetListResult.getData());\n mMasechtotList = masechetListResult.getData();\n\n }\n\n @Override\n public void onError(Throwable e) {\n\n }\n\n @Override\n public void onComplete() {\n\n }\n });\n\n\n }", "public List<Produto> buscarProdutos(){\n return new ArrayList<>();\n }", "public Socio getSocioInfoAtualizar() {\n\n ArrayList<Socio> listaSocio = new ArrayList<Socio>();\n // iniciando a conexao\n connection = BancoDados.getInstance().getConnection();\n System.out.println(\"conectado e preparando listagem para pegar Socio\"); \n Statement stmt = null;\n\n\n try {\n stmt = connection.createStatement();\n ResultSet rs = stmt.executeQuery(\"SELECT * FROM alterados\");\n\n // Incluindo Socios na listaSocios que vai ser retornada\n while (rs.next()) {\n Socio socio = new Socio (rs.getString(\"nomeSocio\"),rs.getString(\"cpfSocio\"),rs.getString(\"rgSocio\"),\n rs.getString(\"matSocio\"),rs.getString(\"sexoSocio\"),rs.getString(\"diaNascSocio\"),\n rs.getString(\"mesNascSocio\"),rs.getString(\"anoNascSocio\"),rs.getString(\"enderecoSocio\"),\n rs.getString(\"numEndSocio\"),rs.getString(\"bairroSocio\"),rs.getString(\"cidadeSocio\"),\n rs.getString(\"estadoSocio\"),rs.getString(\"foneSocio\"),rs.getString(\"celSocio\"),\n rs.getString(\"emailSocio\"),rs.getString(\"blocoSocio\"), rs.getString(\"funcaoSocio\"),rs.getInt(\"idSocio\"), rs.getInt(\"idSocioPK\"));\n listaSocio.add(socio);\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n\n } finally {\n // este bloco finally sempre executa na instrução try para\n // fechar a conexão a cada conexão aberta\n try {\n stmt.close();\n connection.close();\n } catch (SQLException e) {\n System.out.println(\"Erro ao desconectar\" + e.getMessage());\n }\n }\n\n \n Socio socioMax = new Socio();\n\n socioMax = listaSocio.get(0);\n\n //Se houver mais de um socio na lista vai procurar o de maior ID\n if(listaSocio.size()-1 > 0){\n\n for(int i=0; i<= listaSocio.size()-1; i++){\n\n Socio socio = new Socio();\n socio = listaSocio.get(i);\n\n if(socio.getIdAlterado()>= socioMax.getIdAlterado() ){\n socioMax = socio;\n }\n\n }\n\n }\n //Se não pega o primeiro\n else {\n socioMax = listaSocio.get(0);\n \n }\n\n System.out.println(socioMax.getIdAlterado());\n\n //Retorna o socio de maior ID, logo o ultimo inserido.\n return socioMax;\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 }", "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 Collection cargarDeObjetivo(int codigoCiclo, int codigoPlan, int objetivo, int periodo, String estado) {\n/* 121 */ Collection resultados = new ArrayList();\n/* */ try {\n/* 123 */ String s = \"select m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion as Nombretipomedicion, Est.Descripcion as Nombreestado, Um.Descripcion as Nombre_Unidad_Medida, SUM(CASE WHEN ac.NUMERO IS NOT NULL THEN 1 ELSE 0 END) acciones from Cal_Plan_Metas m left join Am_Acciones Ac on( m.Codigo_Ciclo = Ac.Codigo_Ciclo and m.Codigo_Plan = Ac.Codigo_Plan and m.Codigo_Meta = Ac.Codigo_Meta and Ac.Asociado = 'P'), \\t\\t Sis_Multivalores Tm, \\t\\t Sis_Multivalores Est, \\t\\t Sis_Multivalores Um where m.Tipo_Medicion = Tm.Valor and Tm.Tabla = 'CAL_TIPO_MEDICION' and m.Estado = Est.Valor and Est.Tabla = 'CAL_ESTADO_META' and m.Unidad_Medida = Um.Valor and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META' and m.codigo_ciclo=\" + codigoCiclo + \" and m.codigo_plan=\" + codigoPlan + \" and m.codigo_objetivo=\" + objetivo;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 180 */ if (estado.length() > 0) {\n/* 181 */ s = s + \" and m.estado='A'\";\n/* */ }\n/* */ \n/* 184 */ if (periodo == 1) {\n/* 185 */ s = s + \" and m.mes01='S'\";\n/* */ }\n/* 187 */ else if (periodo == 2) {\n/* 188 */ s = s + \" and m.mes02='S'\";\n/* */ }\n/* 190 */ else if (periodo == 3) {\n/* 191 */ s = s + \" and m.mes03='S'\";\n/* */ }\n/* 193 */ else if (periodo == 4) {\n/* 194 */ s = s + \" and m.mes04='S'\";\n/* */ }\n/* 196 */ else if (periodo == 5) {\n/* 197 */ s = s + \" and m.mes05='S'\";\n/* */ }\n/* 199 */ else if (periodo == 6) {\n/* 200 */ s = s + \" and m.mes06='S'\";\n/* */ }\n/* 202 */ else if (periodo == 7) {\n/* 203 */ s = s + \" and m.mes07='S'\";\n/* */ }\n/* 205 */ else if (periodo == 8) {\n/* 206 */ s = s + \" and m.mes08='S'\";\n/* */ }\n/* 208 */ else if (periodo == 9) {\n/* 209 */ s = s + \" and m.mes09='S'\";\n/* */ }\n/* 211 */ else if (periodo == 10) {\n/* 212 */ s = s + \" and m.mes10='S'\";\n/* */ }\n/* 214 */ else if (periodo == 11) {\n/* 215 */ s = s + \" and m.mes11='S'\";\n/* */ }\n/* 217 */ else if (periodo == 12) {\n/* 218 */ s = s + \" and m.mes12='S'\";\n/* */ } \n/* */ \n/* 221 */ s = s + \" GROUP BY m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion, Est.Descripcion, Um.Descripcion order by m.descripcion\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 259 */ boolean rtaDB = this.dat.parseSql(s);\n/* 260 */ if (!rtaDB) {\n/* 261 */ return resultados;\n/* */ }\n/* */ \n/* 264 */ this.rs = this.dat.getResultSet();\n/* 265 */ while (this.rs.next()) {\n/* 266 */ resultados.add(leerRegistro());\n/* */ }\n/* */ }\n/* 269 */ catch (Exception e) {\n/* 270 */ e.printStackTrace();\n/* 271 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarTodos \", e);\n/* */ } \n/* 273 */ return resultados;\n/* */ }", "private void cargarMallas() {\n\tmallas.clear();\n\ttry {\n\t mallas = registroServicio.obtenerMallaCurricular(infoCarreraDto);\n\t} catch (Exception e) {\n\t e.printStackTrace();\n\t return;\n\t}\n }", "public List<Integer> getAllLocos(LocoDataFois unlocos) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\tSystem.out.println(\"getuncleasedlocos\");\n\t\t\tList<Integer> locos= new ArrayList<>();\n\t\t\tString shedid = unlocos.getLoco_Owningshed();\n//\t\t\tString traccode= unlocos.getLoco_Tractioncode();\n\t\t\tSystem.out.println(\"service\"+shedid);\n\t\t\tobj_uncleansedrepo.getLocono(shedid).forEach(locos::add);\n\t\t\tif(locos.isEmpty()) {\n\t\t\treturn locos ;\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"data\" +locos);\n\t\t\treturn locos;\n\t\t\n\t\n\t}", "public List<String> Mutfakkullanici(int masa_no) throws SQLException {\n ArrayList<Integer> kull = new ArrayList<>();\r\n ArrayList<String> kullad = new ArrayList<>();\r\n sqlsorgular.baglanti vb = new baglanti();\r\n vb.baglan();\r\n try {\r\n\r\n String sorgu = \"select kullanici_no from ilisk_masa where masa_no=\" + masa_no + \";\";\r\n ps = vb.con.prepareStatement(sorgu);\r\n rs = ps.executeQuery(sorgu);\r\n\r\n while (rs.next()) {\r\n kull.add(rs.getInt(1));\r\n }\r\n System.out.println(\"mutfak kullanici girdi\");\r\n System.out.println(kull);\r\n } catch (Exception e) {\r\n System.out.println(\"Mutfak kullanicisini alirken hata olustu\");\r\n return null;\r\n }\r\n\r\n for (Integer kullanici_no : kull) {\r\n boolean durum = false;\r\n String deger = \"\";\r\n String sorgu2 = \"select kullanici_adi from kullanicilar where kullanici_no=\" + kullanici_no + \" and durum='MUTFAK';\";\r\n try {\r\n ps = vb.con.prepareStatement(sorgu2);\r\n rs1 = ps.executeQuery(sorgu2);\r\n while (rs1.next()) {\r\n deger = rs1.getString(1);\r\n\r\n if (deger != null) {\r\n kullad.add(deger);\r\n System.out.println(\"null\");\r\n System.out.println(deger);\r\n }\r\n System.out.println(kullad);\r\n durum = true;\r\n }\r\n } catch (Exception e) {\r\n durum = false;\r\n }\r\n\r\n System.out.println(kullad);\r\n\r\n }\r\n vb.con.close();\r\n return kullad;\r\n\r\n }", "public void tofetchAllRecords(){\n\t\tsetPaymentAmountPanel(false);\n\t\tlstPlaceOrderPendingTransction.clear();\n\t\tList<RatePlaceOrder> lstRatePlaceOrder=placeOrderPendingTransctionService.toFetchAllRecordsFromDb(getCustomerId());\n\t\tif(lstRatePlaceOrder.size()>0){\n\t\t\tfor (RatePlaceOrder ratePlaceOrder : lstRatePlaceOrder) {\n\t\t\t\tPlaceOrderPendingTransctionDataTable placeOrderPendingDT=new PlaceOrderPendingTransctionDataTable();\n\t\t\t\tplaceOrderPendingDT.setRateOfferedPk(ratePlaceOrder.getRatePlaceOrderId());\n\t\t\t\tplaceOrderPendingDT.setCustomerId(ratePlaceOrder.getCustomerId());\n\t\t\t\tString custmerName=null;\n\t\t\t\tBigDecimal custrRef=null;\n\t\t\t\tString BeneName=null;\n\t\t\t\tString beneBankName=null;\n\t\t\t\tString curQtyName=null;\n\t\t\t\t//to Fetch Customer reference and Name\n\t\t\t\tcustrRef=gSMPlaceOrderRateFeedService.toFetchCustomerRef(ratePlaceOrder.getCustomerId());\n\t\t\t\tcustmerName=generalService.getCustomerNameCustomerId(ratePlaceOrder.getCustomerId());\n\t\t\t\tplaceOrderPendingDT.setCustomerName(custmerName);\n\t\t\t\tplaceOrderPendingDT.setCustomerRefNo(custrRef);\n\t\t\t\tplaceOrderPendingDT.setCustomerRefAndName(custrRef+ \"-\" +custmerName);\n\t\t\t\tplaceOrderPendingDT.setDocumentNumber(ratePlaceOrder.getDocumentNumber());\n\t\t\t\t//to bene name\n\t\t\t\tplaceOrderPendingDT.setBeneficiaryMasterId(ratePlaceOrder.getBeneficiaryMasterId().getBeneficaryMasterSeqId());\n\t\t\t\tBeneName=gSMPlaceOrderRateFeedService.toFetchBeneficiaryName(ratePlaceOrder.getBeneficiaryMasterId().getBeneficaryMasterSeqId());\n\t\t\t\tplaceOrderPendingDT.setBeneficiaryName(BeneName);\n\t\t\t\t//bene bank name\n\t\t\t\tplaceOrderPendingDT.setBeneficiaryBankId(ratePlaceOrder.getBeneficiaryBankId());\n\t\t\t\tbeneBankName=generalService.getBankName(ratePlaceOrder.getBeneficiaryBankId());\n\t\t\t\tplaceOrderPendingDT.setBeneficiaryBankName(beneBankName);\n\t\t\t\tplaceOrderPendingDT.setRateOffered(ratePlaceOrder.getRateOffered());\n\t\t\t\tplaceOrderPendingDT.setTransctionAmount(ratePlaceOrder.getTransactionAmount());\n\t\t\t\tplaceOrderPendingDT.setCurrencyId(ratePlaceOrder.getDestinationCurrenyId());\n\t\t\t\t//currency name qty code\n\t\t\t\t//ratePlaceOrder.getBeneficiaryMasterId().getBeneficaryMasterSeqId(),ratePlaceOrder.getAccountSeqquenceId().getBeneficaryAccountSeqId()\n\t\t\t\t/*curQtyName=gSMPlaceOrderRateFeedService.toFetchCurrencyQtyName(ratePlaceOrder.getCurrencyId());\n\t\t\t\tplaceOrderPendingDT.setCurrencyQtyName(\"[\"+curQtyName+\"]\");\n\t\t\t\tplaceOrderPendingDT.setAmountAndQtyName(ratePlaceOrder.getTransactionAmount()+ \"-\" +curQtyName);*/\n\t\t\t\t//remittance and service , delivery\n\t\t\t\tplaceOrderPendingDT.setRemitServiceId(ratePlaceOrder.getServiceMasterId());\n\t\t\t\tplaceOrderPendingDT.setRemitRemittanceId(ratePlaceOrder.getRemittanceModeId());\n\t\t\t\tplaceOrderPendingDT.setRemitDeliveryId(ratePlaceOrder.getDeliveryModeId());\n\t\t\t\tplaceOrderPendingDT.setCreatedBy(ratePlaceOrder.getCreatedBy());\n\t\t\t\tplaceOrderPendingDT.setCreatedDate(ratePlaceOrder.getCreatedDate());\n\t\t\t\tplaceOrderPendingDT.setModifiedBy(ratePlaceOrder.getModifiedBy());\n\t\t\t\tplaceOrderPendingDT.setModifiedDate(ratePlaceOrder.getModifiedDate());\n\t\t\t\tplaceOrderPendingDT.setApprovedBy(ratePlaceOrder.getApprovedBy());\n\t\t\t\tplaceOrderPendingDT.setApprovedDate(ratePlaceOrder.getApprovedDate());\n\t\t\t\tplaceOrderPendingDT.setIsActive(ratePlaceOrder.getIsActive());\n\t\t\t\tplaceOrderPendingDT.setRoutingCountry(ratePlaceOrder.getRoutingCountryId());\n\t\t\t\tplaceOrderPendingDT.setRoutingBank(ratePlaceOrder.getRoutingBankId());\n\t\t\t\tplaceOrderPendingDT.setRemitDocumentNumber(ratePlaceOrder.getApplDocumentNumber());\n\t\t\t\tplaceOrderPendingDT.setRemitDocumentFinanceYear(ratePlaceOrder.getApplDocumentFinanceYear());\n\t\t\t\tplaceOrderPendingDT.setPaymentCode(ratePlaceOrder.getCollectionMode());\n\t\t\t\tplaceOrderPendingDT.setBeneficiaryCountryId(ratePlaceOrder.getBeneficiaryCountryId());\n\n\t\t\t\tList<RemittanceApplication> lstRemittanceApplication= placeOrderPendingTransctionService.getTransactionDetails(ratePlaceOrder.getRatePlaceOrderId());\n\n\t\t\t\tif(lstRemittanceApplication!=null && lstRemittanceApplication.size()>0)\n\t\t\t\t{\n\t\t\t\t\tBigDecimal equivalentRemitAmount= lstRemittanceApplication.get(0).getLocalNetTranxAmount();\n\t\t\t\t\tBigDecimal equivalentCurrencyId=lstRemittanceApplication.get(0).getExCurrencyMasterByForeignCurrencyId().getCurrencyId();\n\t\t\t\t\tBigDecimal equivalentForeignTranxAmount= lstRemittanceApplication.get(0).getForeignTranxAmount();\n\n\t\t\t\t\tList<PopulateData> lstofCurrency = new ArrayList<PopulateData>();\n\n\t\t\t\t\tlstofCurrency= iPlaceOnOrderCreationService.getBasedOnCountyCurrency(ratePlaceOrder.getBeneficiaryCountryId());\n\t\t\t\t\tif(lstofCurrency!=null && lstofCurrency.size()>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(lstofCurrency.get(0).getPopulateId().compareTo(ratePlaceOrder.getDestinationCurrenyId())==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurQtyName=gSMPlaceOrderRateFeedService.toFetchCurrencyQtyName(ratePlaceOrder.getDestinationCurrenyId());\n\t\t\t\t\t\t\tplaceOrderPendingDT.setCurrencyQtyName(\"[\"+curQtyName+\"]\");\n\t\t\t\t\t\t\tplaceOrderPendingDT.setAmountAndQtyName(ratePlaceOrder.getTransactionAmount()+ \"-\" +\"[\"+curQtyName+\"]\");\n\n\t\t\t\t\t\t\tplaceOrderPendingDT.setRemitLocalAmount(equivalentRemitAmount);\n\n\n\t\t\t\t\t\t}else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurQtyName=gSMPlaceOrderRateFeedService.toFetchCurrencyQtyName(equivalentCurrencyId);\n\t\t\t\t\t\t\tplaceOrderPendingDT.setAmountAndQtyName(equivalentForeignTranxAmount+ \"-\" +\"[\"+curQtyName+\"]\");\n\t\t\t\t\t\t\tplaceOrderPendingDT.setRemitLocalAmount(equivalentRemitAmount);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlstPlaceOrderPendingTransction.add(placeOrderPendingDT);\n\t\t\t}\n\t\t\tif(lstPlaceOrderPendingTransction.size()>0)\n\t\t\t{\n\t\t\t\tsetPaymentAmountPanel(true);\n\t\t\t}\n\t\t}\n\t}", "private List<String[]> trovaPazienti(Long idMedico) {\r\n\r\n\t\t\tLog.i(\"trovaPazienti\", \"fase iniziale\");\r\n\r\n\t\t\tSoapObject request = new SoapObject(getString(R.string.NAMESPACE),\r\n\t\t\t\t\t\"trovaPazienti\");\r\n\t\t\trequest.addProperty(\"idMedico\", idMedico);\r\n\r\n\t\t\tSoapSerializationEnvelope envelope = new SoapSerializationEnvelope(\r\n\t\t\t\t\tSoapEnvelope.VER10);\r\n\t\t\tenvelope.setAddAdornments(false);\r\n\t\t\tenvelope.implicitTypes = true;\r\n\t\t\tenvelope.setOutputSoapObject(request);\r\n\r\n\t\t\tHttpTransportSE androidHttpTransport = new HttpTransportSE(\r\n\t\t\t\t\tgetString(R.string.URL));\r\n\r\n\t\t\tandroidHttpTransport.debug = true;\r\n\r\n\t\t\tList<String[]> pazienti = new ArrayList<String[]>();\r\n\r\n\t\t\ttry {\r\n\t\t\t\tString soapAction = \"\\\"\" + getString(R.string.NAMESPACE)\r\n\t\t\t\t\t\t+ \"trovaPazienti\" + \"\\\"\";\r\n\t\t\t\tandroidHttpTransport.call(soapAction, envelope);\r\n\r\n\t\t\t\tLog.i(\"trovaPazienti\", \"inviata richiesta\");\r\n\r\n\t\t\t\tSoapPrimitive response = (SoapPrimitive) envelope.getResponse();\r\n\r\n\t\t\t\tLog.i(\"trovaPazienti\", \"ricevuta risposta\");\r\n\r\n\t\t\t\tString responseData = response.toString();\r\n\r\n\t\t\t\tJSONObject obj = new JSONObject(responseData);\r\n\r\n\t\t\t\tLog.i(\"response\", obj.toString());\r\n\r\n\t\t\t\tJSONArray arr = obj.getJSONArray(\"mieiPazienti\");\r\n\r\n\t\t\t\tfor (int i = 0; i < arr.length(); i++) {\r\n\t\t\t\t\tString[] paziente = new String[2];\r\n\t\t\t\t\tJSONObject objPaz = new JSONObject(arr.getString(i));\r\n\t\t\t\t\tpaziente[0] = objPaz.get(\"idPaziente\").toString();\r\n\t\t\t\t\tpaziente[1] = objPaz.get(\"nome\").toString() + \" \"\r\n\t\t\t\t\t\t\t+ objPaz.get(\"cognome\").toString();\r\n\t\t\t\t\tpazienti.add(paziente);\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tLog.e(\"WS Error->\", e.toString());\r\n\t\t\t}\r\n\t\t\treturn pazienti;\r\n\t\t}", "public void cargarEstudiantesSitio() {\r\n\t\tList<ArrMatriculado> listado = mngRes.matriculadosEnSitioPorPeriodo(sitioId, periodo.getPrdId());\r\n\t\tgetReservasSitio().clear();\r\n\t\tif (listado != null && !listado.isEmpty())\r\n\t\t\tgetReservasSitio().addAll(listado);\r\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tAppofferUtil.getIntsance().getList().clear();\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 adicionarServicos() {\n int i;\n if (hospedesCadastrados.isEmpty()) {\n System.err.println(\"Não existem hospedes cadastrados!\\n\");\n } else {\n\n System.err.println(\"Digite o cpf do hospede que deseja adicionar servicos:\");\n listarHospedes();\n int cpf = verifica();\n for (i = 0; i < hospedesCadastrados.size(); i++) {\n if (hospedesCadastrados.get(i).getCpf() == cpf) {//pega o indice i do objeo pessoa, pega o id da pessoa e compara com o id da pessoa digitada\n if (hospedesCadastrados.get(i).getContrato().isSituacao()) {//verifica se a situaçao do contrato ainda está aberta para esse hospede\n\n System.err.println(\"O que deseja editar do contrato\\n\");\n //adicionar carro, trocar de quarto, adicionar conta de restaurante,\n //encerrar contrato\n\n System.err.println(\"Adicionar carro (1):\\nAdicionar restaurante (2):\\n\"\n + \"Adicionar horas de BabySitter (3):\\nAdicionar quarto(4):\\n\");\n int caso = verifica();\n switch (caso) {\n case 1://carro\n if (carrosCadastrados.isEmpty()) {\n System.err.println(\"Nao existem carros cadastrados!\\n\");\n } else {\n listarCarros();\n System.err.println(\"Digite o id do carro que deseja contratar:\\n\");\n int idCarro = verifica();\n\n for (int j = 0; j < carrosCadastrados.size(); j++) {\n if (carrosCadastrados.get(j).getId() == idCarro) {\n if (carrosCadastrados.get(j).isEstado()) {\n System.err.println(\"Esse carro já está cadastrado.\\n\");\n } else {\n hospedesCadastrados.get(i).getContrato().setCarros(carrosCadastrados.get(j));\n carrosCadastrados.get(j).setEstado(true);\n }\n }\n }\n }\n break;\n\n case 2://restaurante\n System.err.println(\"Digite o quanto deseja gastar no restaurente\\n\");\n double valorRestaurante = ler.nextDouble();\n// idd();\n// int idRestaurante = id;\n// Restaurante restaurante = new Restaurante(idRestaurante, valorRestaurante);\n hospedesCadastrados.get(i).getContrato().setValorRestaurante(valorRestaurante);\n break;\n case 3://babysitter\n System.err.println(\"Digite o tempo gasto no BabySytter em horas\\n\");\n double tempoBaby = ler.nextDouble();\n hospedesCadastrados.get(i).getContrato().setHorasBaby(tempoBaby);\n break;\n case 4://quartos\n\n if (quartosCadastrados.isEmpty()) {\n\n } else {\n System.err.println(\"Digite o numero do quarto que deseja contratar:\\n\");\n listarQuartos();\n int num = verifica();\n System.err.println(\"Digite a quantidade de dis que pretente alugar o quarto:\\n\");\n int dias = verifica();\n for (int j = 0; j < quartosCadastrados.size(); j++) {\n if (num == quartosCadastrados.get(j).getNumero()) {//verifica se o numero digitado é igual ao numero do quarto do laco\n if (quartosCadastrados.get(j).getEstado()) {//verifica se o estado do quarto está como true\n System.err.println(\"Este quarto já está cadastrado em um contrato\");\n } else {//se o estado tiver em true é porque o quarto ja está cadastrado\n\n hospedesCadastrados.get(i).getContrato().setQuartos(quartosCadastrados.get(j));\n hospedesCadastrados.get(i).getContrato().getQuartosCadastrados().get(j).setDias(dias);\n hospedesCadastrados.get(i).getContrato().getQuartosCadastrados().get(j).setEstado(true);//seta o estado do quarto como ocupado\n System.err.println(\"Quarto cadastrado!\\n\");\n }\n\n }\n\n }\n\n//remove all remove todas as pessoas com tal nome\t\n }\n break;\n\n }\n } else {\n System.err.println(\"O contrato deste Hospede encontra-se encerrado\");\n break;\n }\n }\n }\n }\n }", "private void consultarlistareportes() {\n db= con.getWritableDatabase();\n ReporteIncidente reporte= null;\n listarreportesinc =new ArrayList<ReporteIncidente>();\n Cursor cursor= db.rawQuery(\"select imagen1,asunto_reporte,estado_reporte,desc_reporte,cod_reporte from \"+ Utilitario.TABLE_REPORTE_INCIDENTE+\" where estado_reporte<>'Incompleto'\",null);\n\n while (cursor.moveToNext()){\n reporte= new ReporteIncidente();\n reporte.setImage1(cursor.getBlob(0));\n reporte.setAsunto(cursor.getString(1));\n reporte.setEstado(cursor.getString(2));\n reporte.setDescripcion(cursor.getString(3));\n reporte.setCodreporte(cursor.getInt(4));\n listarreportesinc.add(reporte);\n }\n //obtenerinformacion();\n db.close();\n }", "private List getActiveServiceList(List servicesList) {\r\n\r\n\t\tList activeServiceList = new ArrayList();\r\n\t\t\r\n\t\tServiceVO activeService;\t\t\r\n\t\t\r\n\t\tif (servicesList != null) {\r\n\t\t\tfor (Iterator iterator = servicesList.iterator(); iterator.hasNext();) {\r\n\t\t\t\tactiveService = (ServiceVO) iterator.next();\r\n\t\t\t\tif (activeService.getStatus() != null) {\r\n\t\t\t\t\tif (activeService.getStatus().trim().equalsIgnoreCase(\"Ativado\")) {\r\n\t\t\t\t\t\tactiveServiceList.add(activeService);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn activeServiceList;\r\n\t\t\r\n\t}", "public ArrayList<Socio> getListaSocio() {\n ArrayList<Socio> listaSocio = new ArrayList<Socio>();\n // iniciando a conexao\n connection = BancoDados.getInstance().getConnection();\n System.out.println(\"conectado e preparando listagem de socio\");\n Statement stmt = null;\n try {\n stmt = connection.createStatement();\n ResultSet rs = stmt.executeQuery(\"SELECT * FROM socio ORDER BY nomeSocio\");\n\n // Incluindo Socios na listaSocios que vai ser retornada\n while (rs.next()) {\n Socio socio = new Socio(rs.getString(\"nomeSocio\"), rs.getString(\"matSocio\"), rs.getString(\"blocoSocio\"), rs.getString(\"funcaoSocio\"),rs.getInt(\"idSocio\"));\n listaSocio.add(socio);\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n return null;\n } finally {\n // este bloco finally sempre executa na instrução try para\n // fechar a conexão a cada conexão aberta\n try {\n stmt.close();\n connection.close();\n } catch (SQLException e) {\n System.out.println(\"Erro ao desconectar\" + e.getMessage());\n }\n }\n return listaSocio;\n }", "@GET\r\n @Produces(MediaType.APPLICATION_JSON)\r\n @Path(\"ServicioMonto/list\")\r\n public ArrayList<ServicioMonto> getXmlc() throws Exception {\n ArrayList<ServicioMonto> lista=new ArrayList<ServicioMonto>();\r\n lista=ServicioMonto.servicio_monto();\r\n return lista;\r\n }", "public ArrayList<Poentity> get_all_poentity() throws Exception {\n\n \t\t log.setLevel(Level.INFO);\n\t log.info(\" service operation started !\");\n\n\t\ttry{\n\t\t\tArrayList<Poentity> Poentity_list;\n\n\t\t\tPoentity_list = Poentity_Activity_dao.get_all_poentity();\n\n \t\t\tlog.info(\" Object returned from service method !\");\n\t\t\treturn Poentity_list;\n\n\t\t}catch(Exception e){\n\n\t\t\tSystem.out.println(\"ServiceException: \" + e.toString());\n\t\t\tlog.error(\" service throws exception : \"+ e.toString());\n\n\t\t}\n\t\treturn null;\n\n\n\n\t}", "@Override\n\tpublic void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {\n\t\totherFee.clear();\n\t\tgetData(1, pageSize);\n\t}", "private void getFoodProcessingInpectionList() {\n ListView list = (ListView) getView().findViewById(R.id.foodprocessinglist);\n foodProcessingInpectionArrayList.clear();\n foodProcessingInpectionArrayList.removeAll(foodProcessingInpectionArrayList);\n List<FoodProcessingInpection> foodProcessingInpectionlist = db.getFoodProcessingInpectionList();\n\n List<CBPartner> cbPartnerList = db.getAllCPartners();\n String cbPartner = \"\";\n\n int listSize = foodProcessingInpectionlist.size();\n System.out.println(listSize + \"===============foodProcessingInpectionlist==========\");\n\n for (int i = 0; i < foodProcessingInpectionlist.size(); i++) {\n System.out.println(\"Document Number=== \" + foodProcessingInpectionlist.get(i).getDocumentNumber());\n\n String retreivedDocumentDate = foodProcessingInpectionlist.get(i).getDocumentDate();\n\n cbPartnerID = foodProcessingInpectionlist.get(i).getNameOfApplicant();\n\n for(CBPartner partner : cbPartnerList){\n if(null != cbPartnerID && cbPartnerID.equals(partner.getC_bpartner_id())){\n cbPartner = partner.getName();\n System.out.println(app + \" cbPartner : \" + cbPartner);\n } else{\n //System.out.println(app + \" cbPartner not found\");\n }\n }\n\n\n if (retreivedDocumentDate != null) {\n foodProcessingInpectionArrayList.add(new FoodProcessingInpection(\n foodProcessingInpectionlist.get(i).getDocumentNumber(),\n retreivedDocumentDate,\n cbPartner,\n foodProcessingInpectionlist.get(i).getFoodCropManufacturingPlanApproval()));\n }\n\n\n localhash.put(i, foodProcessingInpectionlist.get(i).getLocalID());\n adapter = new FoodProcessingListAdapter(getActivity(), foodProcessingInpectionArrayList);\n list.setAdapter(adapter);\n }\n\n\n list.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View viewClicked, int position, long id) {\n TextView textviewDocumentNumber = viewClicked.findViewById(R.id.textviewdocument_no_no);\n TextView textviewDocumentDate = viewClicked.findViewById(R.id.textviewdocument_date_date);\n TextView textviewsisalSpinningExportNumber = viewClicked.findViewById(R.id.textviewlicence_number);\n TextView textviewApplicantName = viewClicked.findViewById(R.id.textviewname_of_applicant);\n\n documentNumber = foodProcessingInpectionArrayList.get(position).getDocumentNumber();\n documentDate = foodProcessingInpectionArrayList.get(position).getDocumentDate();\n Licenceno = foodProcessingInpectionArrayList.get(position).getFoodCropManufacturingPlanApproval();\n nameOfApplicant = foodProcessingInpectionArrayList.get(position).getNameOfApplicant();\n\n localID = localhash.get(position);\n\n }\n });\n }", "private void getMuestras(){\n mMuestras = estudioAdapter.getListaMuestrasSinEnviar();\n //ca.close();\n }", "public void buscar() {\r\n sessionProyecto.getProyectos().clear();\r\n sessionProyecto.getFilterProyectos().clear();\r\n try {\r\n List<ProyectoCarreraOferta> proyectoCarreraOfertas = proyectoCarreraOfertaService.buscar(\r\n new ProyectoCarreraOferta(null, sessionProyecto.getCarreraSeleccionada().getId() != null\r\n ? sessionProyecto.getCarreraSeleccionada().getId() : null, null, Boolean.TRUE));\r\n \r\n if (proyectoCarreraOfertas == null) {\r\n return;\r\n }\r\n for (ProyectoCarreraOferta proyectoCarreraOferta : proyectoCarreraOfertas) {\r\n proyectoCarreraOferta.getProyectoId().setEstado(itemService.buscarPorId(proyectoCarreraOferta.getProyectoId().\r\n getEstadoProyectoId()).getNombre());\r\n proyectoCarreraOferta.getProyectoId().setCatalogo(itemService.buscarPorId(proyectoCarreraOferta.getProyectoId().\r\n getCatalogoProyectoId()).getNombre());\r\n proyectoCarreraOferta.getProyectoId().setTipo(itemService.buscarPorId(proyectoCarreraOferta.getProyectoId().\r\n getTipoProyectoId()).getNombre());\r\n proyectoCarreraOferta.getProyectoId().setAutores(autores(proyectoCarreraOferta.getProyectoId()));\r\n proyectoCarreraOferta.getProyectoId().setDirectores(directores(proyectoCarreraOferta.getProyectoId()));\r\n proyectoCarreraOferta.getProyectoId().setNombreOferta(ofertaAcademicaService.find(proyectoCarreraOferta.getOfertaAcademicaId()).getNombre());\r\n if (!this.sessionProyecto.getProyectos().contains(proyectoCarreraOferta.getProyectoId())) {\r\n proyectoCarreraOferta.getProyectoId().setCarrera(carreraService.find(proyectoCarreraOferta.getCarreraId()).getNombre());\r\n this.sessionProyecto.getProyectos().add(proyectoCarreraOferta.getProyectoId());\r\n }\r\n }\r\n sessionProyecto.setFilterProyectos(sessionProyecto.getProyectos());\r\n } catch (Exception e) {\r\n LOG.info(e.getMessage());\r\n }\r\n }", "protected ArrayList<Transaction> refreshTransactions() {\r\n\t\ttry {\r\n\t\t\tHttpResponse response = serverAccess.getAllTransactionsResponse();\r\n\t\t\tif (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {\r\n\t\t\t\tString transactionsJson = EntityUtils.toString(response.getEntity());\r\n\t\t\t\tGson gson = new GsonBuilder().create();\r\n\t\t\t\tTransaction[] transactionArray = gson.fromJson(transactionsJson, Transaction[].class);\r\n\t\t\t\tArrayList<Transaction> transactionList = new ArrayList<Transaction>(Arrays.asList(transactionArray));\r\n\t\t\t\ttxtError.setText(\"\");\r\n\t\t\t\treturn transactionList;\r\n\t\t\t} else {\r\n\t\t\t\ttxtError.setText(EntityUtils.toString(response.getEntity()) + \" (Fehler: \"\r\n\t\t\t\t\t\t+ response.getStatusLine().getStatusCode() + \")\");\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\ttxtError.setText(\"Server nicht verfügbar\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public void totalFacturaVenta(){\n BigDecimal totalVentaFactura = new BigDecimal(0);\n \n try{\n //Recorremos la lista de detalle y calculamos la Venta total de la factura\n for(Detallefactura det: listDetalle){\n //Sumamos a la variable 'totalVentaFactura'\n totalVentaFactura = totalVentaFactura.add(det.getTotal());\n } \n }catch(Exception e){\n e.printStackTrace();\n }\n \n //Setemos al objeto Factura el valor de la variable 'totalFacturaVenta'\n factura.setTotalVenta(totalVentaFactura);\n \n }", "public void createconvolist(){\n convo.clear();\n convo.addAll(sent);\n adapter.notifyDataSetChanged();\n convo.addAll(recieved);\n adapter.notifyDataSetChanged();\n Collections.reverse(convo);\n Collections.sort(convo, new Comparator<ConversationObject>() {\n @RequiresApi(api = Build.VERSION_CODES.KITKAT)\n @Override\n public int compare(ConversationObject o1, ConversationObject o2) {\n return Long.compare(o1.getTimeInMilliSeconds(), o2.getTimeInMilliSeconds());\n }\n });\n }", "private void refreshListView() {\n\t\t\tisEnd=false;\n\t\t\tlistView.setMode(Mode.PULL_FROM_START);\n\t\t\tjsonArray=new JSONArray();\n\t\t\tcurrentPage=0;\n\t\t\tgetSharePage(++currentPage);\n\t\t\t\n\t\t}", "private Iterable<Service> loadServiceData() {\n return services;\n }", "public ArrayList<Info_laboral> findAll(){\n ConexionBD con = new ConexionBD();\n Connection c = con.conOracle();\n\n ArrayList<Info_laboral> eeg = new ArrayList();\n\n try{\n ResultSet gs = con.ejecutaCon(\" Select * from Info_laboral\"); \n while(gs.next()){\n \n Estudios_Egresado ee=new Estudios_Egresado();\n Info_laboral i =new Info_laboral();\n Egresado eg = new Egresado();\n Estudios es = new Estudios();\n \n i.setId(gs.getInt(1));\n i.setJefe(gs.getString(2));\n i.setCargo(gs.getString(3));\n i.setFuncion(gs.getString(4));\n i.setFecha_ini(gs.getDate(5));\n i.setFecha_fin(gs.getDate(6));\n i.setMotivo_retiro(gs.getString(7));\n eg.setId(gs.getLong(8));\n i.setId_egresado(eg);\n i.setPerfil(gs.getString(9));\n \n eeg.add(i);\n }\n }catch(SQLException e){\n System.out.println(\"error \"+e);\n return null;\n }\n return eeg;\n }", "@Override\n\tpublic void initListData(final int page) {\n\t\tif (list == null) {\n\t\t\tlist = new ArrayList<FaultBean>();\n\t\t}\n\t\t\n\t\t// page值为1时,表明巡检状态可能发生了变化,所以数据需要进行初始化。当适配器mAapter非空时,表明有数据,所以需要通知列表刷新\n\t\tif (page == 1) {\n\t\t\tlist.clear();\n\t\t\tif (mAdapter != null) { // 一定要做通知刷新处理,否则可能会报错\n\t\t\t\tmAdapter.notifyDataSetChanged();\n\t\t\t}\n\t\t}\n\n\t\tmHandler.post(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tUserHttp.accidentHandlingHistoryQuery(page, num, \"defectTime\",\n\t\t\t\t\t\t\"desc\", MyApp.userInfo.getStaffId(), new HttpDataCallBack() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void HttpSuccess(String _result) {\n\t\t\t\t\t\t\t\tgetAccidentRepairListData(_result);\n\t\t\t\t\t\t\t\tmHandler.obtainMessage(MESSAGE_SUCCESS)\n\t\t\t\t\t\t\t\t\t\t.sendToTarget();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void HttpFail(int ErrCode) {\n\t\t\t\t\t\t\t\tmHandler.obtainMessage(MESSAGE_FAILED)\n\t\t\t\t\t\t\t\t\t\t.sendToTarget();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response)\n {\n super.onSuccess(statusCode, headers, response);\n LogUtil.i(TAG, \"getservBookResource\", response.toString());\n if (response.opt(\"code\").equals(\"00000\"))\n {\n JSONObject dataJsonObject = response.optJSONObject(\"data\");\n JSONArray trafficJSONList = dataJsonObject.optJSONArray(\"traffic\");\n if (trafficJSONList != null && trafficJSONList.length() > 0)\n {\n for (int j = 0; j < trafficJSONList.length(); j++)\n {\n JSONObject serviceJSON = trafficJSONList.optJSONObject(j);\n ServResrouce service = new ServResrouce();\n service.setServId(serviceJSON.optString(\"servId\"));\n service.setServName(serviceJSON.optString(\"servName\"));\n service.setServAlias(serviceJSON.optString(\"servAlias\"));\n service.setServType(serviceJSON.optString(\"servType\"));\n service.setRank(serviceJSON.optString(\"rank\"));\n service.setTitleImage(serviceJSON.optString(\"titleImg\"));\n service.setServDesc(serviceJSON.optString(\"servDesc\"));\n if (service.getServType().equals(\"airplane\") || service.getServType().equals(\"Iairplane\"))\n {\n airPlaneList.add(service);\n }\n else\n {\n carOrBoaticList.add(service);\n }\n }\n }\n JSONArray stayJSONList = dataJsonObject.optJSONArray(\"stay\");\n if (stayJSONList != null && stayJSONList.length() > 0)\n {\n for (int j = 0; j < stayJSONList.length(); j++)\n {\n JSONObject serviceJSON = stayJSONList.optJSONObject(j);\n ServResrouce service = new ServResrouce();\n service.setServId(serviceJSON.optString(\"servId\"));\n service.setServName(serviceJSON.optString(\"servName\"));\n service.setServAlias(serviceJSON.optString(\"servAlias\"));\n service.setServType(serviceJSON.optString(\"servType\"));\n service.setRank(serviceJSON.optString(\"rank\"));\n service.setTitleImage(serviceJSON.optString(\"titleImg\"));\n service.setServDesc(serviceJSON.optString(\"servDesc\"));\n stayList.add(service);\n }\n }\n mAirListViewAdapter.notifyDataSetChanged();\n mNoAirAdapter.notifyDataSetChanged();\n mHotelAdapter.notifyDataSetChanged();\n }\n }", "public List<String> Garsonkullanici(int masa_no) throws SQLException {\n ArrayList<Integer> kull = new ArrayList<>();\r\n ArrayList<String> kullad = new ArrayList<>();\r\n sqlsorgular.baglanti vb = new baglanti();\r\n vb.baglan();\r\n try {\r\n\r\n String sorgu = \"select kullanici_no from ilisk_masa where masa_no=\" + masa_no + \";\";\r\n ps = vb.con.prepareStatement(sorgu);\r\n rs = ps.executeQuery(sorgu);\r\n\r\n while (rs.next()) {\r\n kull.add(rs.getInt(1));\r\n }\r\n System.out.println(kull);\r\n } catch (Exception e) {\r\n System.out.println(\"Garson kullanicisini alirken hata olustu\");\r\n\r\n }\r\n\r\n for (Integer kullanici_no : kull) {\r\n String deger = \" \";\r\n String sorgu2 = \"select kullanici_adi from kullanicilar where kullanici_no=\" + kullanici_no + \" and durum='GARSON';\";\r\n try {\r\n ps = vb.con.prepareStatement(sorgu2);\r\n rs = ps.executeQuery(sorgu2);\r\n while (rs.next()) {\r\n deger = rs.getString(1);\r\n\r\n if (deger != null) {\r\n kullad.add(deger);\r\n }\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"Garson kullanici Alinirken hata oldu\");\r\n }\r\n\r\n System.out.println(kullad);\r\n\r\n }\r\n vb.con.close();\r\n return kullad;\r\n\r\n }", "public static List getAllPrices() {\n List polovniautomobili = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT cena FROM polovni\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ResultSet result = ps.executeQuery();\n while (result.next()) {\n int naziv = result.getInt(\"cena\");\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 }", "@Override\n protected List doInBackground(Void... params) {\n\n try {\n monedasFavoritas = new ArrayList<>();\n monedas = server.obtenerMonedas(valor);\n fav = server.ObtenerFav();\n System.out.println(\"obtenemos las monedas del json\");\n } catch (ServidorPHPException e) {\n System.out.println(\"Error obteniendo las monedas -> \" + e.toString());\n }\n\n // Simulación de la carga de items\n try {\n Thread.sleep(DURACION);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n for (int i = 0; i<monedas.size(); i++)\n {\n for (int f = 0; f<fav.size(); f++)\n {\n if(monedas.get(i).getSymbol().equals(fav.get(f).getCripto()))\n {\n moneda a = monedas.get(i);\n monedasFavoritas.add(a);\n }\n }\n }\n\n for (int i = 0; i<monedasFavoritas.size(); i++)\n {\n System.out.println(\"favoritas ->>>>>>>>\"+monedasFavoritas.get(i).getSymbol());\n }\n\n // Retornar en nuevos elementos para el adaptador\n return monedasFavoritas;\n }" ]
[ "0.6609492", "0.6246593", "0.62379247", "0.61956984", "0.6185027", "0.6094866", "0.60522085", "0.59188217", "0.59178776", "0.59156954", "0.58937746", "0.5887293", "0.5805305", "0.57896614", "0.57846576", "0.57750314", "0.57674384", "0.5757937", "0.57573074", "0.575432", "0.57294494", "0.5720423", "0.57155174", "0.5713126", "0.5707715", "0.5703874", "0.5694406", "0.5694097", "0.5685852", "0.56795764", "0.5673479", "0.5668793", "0.56673336", "0.56375325", "0.5637274", "0.5620798", "0.5607636", "0.5595392", "0.5581724", "0.55604357", "0.5552869", "0.5551569", "0.5549811", "0.55407196", "0.55402136", "0.5539633", "0.5525451", "0.55195427", "0.5518837", "0.5518358", "0.55129963", "0.5511629", "0.5502167", "0.54998416", "0.5492256", "0.5487489", "0.54867333", "0.54822063", "0.54793394", "0.54759485", "0.5463268", "0.5460233", "0.54543984", "0.54519457", "0.54474676", "0.5446741", "0.5443872", "0.543245", "0.5428287", "0.54111886", "0.5404924", "0.54039013", "0.5399339", "0.53993094", "0.53976744", "0.5395434", "0.53910536", "0.53898233", "0.5387902", "0.5383638", "0.538182", "0.53810483", "0.537473", "0.53724957", "0.53644615", "0.53623784", "0.5359684", "0.5356786", "0.5355821", "0.5353427", "0.53448725", "0.53440136", "0.5343849", "0.53436", "0.5342607", "0.53417313", "0.5339382", "0.5335821", "0.533209", "0.5330902" ]
0.76827234
0
todo trabajar aqui para mostrar los elementos en el adapter tasksTotales=new ArrayList();
public void fetchTasks() { tasksTotales.clear(); for (String taskId : taskList) { databaseTaskReference.child(taskId).addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { com.ijzepeda.armet.model.Task taskTemp = dataSnapshot.getValue(com.ijzepeda.armet.model.Task.class); tasksTotales.add(taskTemp); taskAdapter.notifyDataSetChanged(); } @Override public void onCancelled(@NonNull DatabaseError databaseError) { } }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int getCount() {\n return tasks.size();\n }", "@Override\n public int getItemCount() {\n return tasks.size();\n }", "@Override\n public int getItemCount() {\n return taskList.size();\n }", "public int getCount() {\n return this.tasks.size();\n }", "public int getCount() {\n\t return taskList.size();\n\t }", "@Override\n public int getItemCount(){\n return this.taskList.size();\n }", "@Override\n public int getItemCount() {\n if (mTaskukirjat != null)\n return mTaskukirjat.size();\n else return 0;\n }", "@Override\n public int getCount() {\n return NameTask.size();\n }", "public ArrayTaskList() {\n\t\tcount = 0;\n\t\tmassTask = new Task[10];\n\t}", "private void doViewAllTasks() {\n ArrayList<Task> t1 = todoList.getListOfTasks();\n if (t1.size() > 0) {\n for (Task task : t1) {\n System.out.println(task.getTime() + \" \" + task.getDescription() + \" \" + task.getDate());\n }\n } else {\n System.out.println(\"No tasks available.\");\n }\n }", "TaskList() {\r\n tasks = new ArrayList<>();\r\n }", "private void setList() {\n Log.i(LOG,\"+++ setList\");\n txtCount.setText(\"\" + projectTaskList.size());\n if (projectTaskList.isEmpty()) {\n return;\n }\n\n projectTaskAdapter = new ProjectTaskAdapter(projectTaskList, darkColor, getActivity(), new ProjectTaskAdapter.TaskListener() {\n @Override\n public void onTaskNameClicked(ProjectTaskDTO projTask, int position) {\n projectTask = projTask;\n mListener.onStatusUpdateRequested(projectTask,position);\n }\n\n\n });\n\n mRecyclerView.setAdapter(projectTaskAdapter);\n mRecyclerView.scrollToPosition(selectedIndex);\n\n }", "public TaskList (ArrayList<Task> tasks){ this.tasks = tasks;}", "@Override\n public int getItemCount() {\n if (mTaskEntries == null) {\n return 0;\n }\n return mTaskEntries.size();\n }", "private void getTasks(){\n\n currentFirebaseUser = FirebaseAuth.getInstance().getCurrentUser();\n if(currentFirebaseUser !=null){\n Log.e(\"Us\", \"onComplete: good\");\n } else {\n Log.e(\"Us\", \"onComplete: null\");\n }\n\n\n mDatabaseReference.child(currentFirebaseUser.getUid())\n .addValueEventListener(new ValueEventListener() {\n //если данные в БД меняются\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (mTasks.size() > 0) {\n mTasks.clear();\n }\n for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) {\n Task task = postSnapshot.getValue(Task.class);\n mTasks.add(task);\n if (mTasks.size()>2){\n\n }\n }\n setAdapter(taskId);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n\n });\n }", "public void listAllTasks() {\n System.out.println(LINEBAR);\n if (tasks.taskIndex == 0) {\n ui.printNoItemInList();\n System.out.println(LINEBAR);\n return;\n }\n\n int taskNumber = 1;\n for (Task t : tasks.TaskList) {\n System.out.println(taskNumber + \". \" + t);\n taskNumber++;\n }\n System.out.println(LINEBAR);\n }", "@Override\n public int getItemCount() {\n Log.i(\"TestingAdapter\", String.valueOf(taskList.getSize()));\n return taskList.getSize();\n }", "public XmlSerializableTaskList() {\n task = new ArrayList<>();\n tags = new ArrayList<>();\n }", "public void showAllTask(View v){\n Cursor res = taskManager.showAllTask();\n if(res.getCount()==0){\n //Toast.makeText(this,\"No Data Available\",Toast.LENGTH_LONG).show();\n showTaskMessage(\"Error\",\"No Data Found\");\n return;\n }else{\n StringBuffer buffer = new StringBuffer();\n while(res.moveToNext()){\n buffer.append(\"taskId : \"+res.getString(0)+\"\\n\");\n buffer.append(\"taskName : \"+res.getString(1)+\"\\n\");\n buffer.append(\"taskDescription : \"+res.getString(2)+\"\\n\");\n }\n showTaskMessage(\"Data\",buffer.toString());\n }\n }", "@Override\n public int getItemCount() {\n return titulos.length;\n }", "public List viewTotalInscritosBD();", "private void doViewAllCompletedTasks() {\n ArrayList<Task> t1 = todoList.getListOfCompletedTasks();\n if (t1.size() > 0) {\n for (Task task : t1) {\n System.out.println(task.getTime() + \" \" + task.getDescription() + \" \" + task.getDate());\n }\n } else {\n System.out.println(\"No completed tasks available.\");\n }\n }", "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 }", "private void displayTasks(List<Task> taskList) {\n\n adapter.setTaskList(taskList);\n adapter.notifyDataSetChanged();\n }", "private void iniAdapter(List<Task> tasks) {\n presAdapter = new TaskAdapter(tasks, this, 1);\n// recyclerView.setAdapter(presAdapter);\n }", "public TaskAdapter(Context context, ArrayList<Task> tasks) {\n\t taskList = tasks;\n\t mInflater = LayoutInflater.from(context);\n\t }", "public TaskList() {\n this.USER_TASKS = new ArrayList<>();\n }", "public List<TempWTask> getTaskList(){return taskList;}", "private void updateUI() {\n ArrayList<String> taskList = new ArrayList<>();\n SQLiteDatabase db = mHelper.getReadableDatabase();\n Cursor cursor = db.query(Task.TaskEntry.TABLE,new String[] {Task.TaskEntry.COL_TASK_TITLE},null,null,null,null,null);\n listItems.clear();\n\n while (cursor.moveToNext()){\n int index = cursor.getColumnIndex(Task.TaskEntry.COL_TASK_TITLE);\n taskList.add(cursor.getString(index));\n ListItems item = new ListItems(cursor.getString(index));\n listItems.add(item);\n }\n\n\n R_adapter = new RecyclerAdapterGoals(this.getContext(), listItems);\n mTaskListView.setAdapter(R_adapter);\n cursor.close();\n db.close();\n }", "public TaskList() {\n this.listItems = new ArrayList<>();\n }", "public TaskProgram() {\n initComponents();\n list=new ArrayList();\n li=list.listIterator();\n curtask=0;\n tottask=0;\n }", "public TaskAdapter(List<Task> taskList) {\n this.taskList = taskList;\n }", "public List<Task> getCesarTasksExpiringToday() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate date = DateUtils.truncate(new Date(), Calendar.DATE);\n\t\tcalendar.setTime(date);\n\t\tint dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);\n\t\tList<Task> tasks = taskRepository.getTaskByDateAndOwnerAndExpireAtTheEndOfTheDay(date,\n\t\t\t\tTVSchedulerConstants.CESAR, true);\n\t\tif (tasks.size() == 0) {\n\t\t\tTask task;\n\t\t\tswitch (dayOfWeek) {\n\t\t\tcase Calendar.SATURDAY:\n\t\t\t\ttask = new Task(\"Mettre la table\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Faire le piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Sortir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"jeu de Société\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Lecture\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.SUNDAY:\n\t\t\t\ttask = new Task(\"Faire du sport (piscine/footing)\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Sortir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Jouer tout seul\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Lecture\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Aider à faire le ménage\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Jeu de société\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"S'habiller\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.MONDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.TUESDAY:\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.WEDNESDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Aider à faire le ménage\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.THURSDAY:\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.FRIDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t\treturn tasks;\n\t}", "private void consultartiposincidentes() {\n\n db= con.getWritableDatabase();\n TipoIncidente clase_tipo_incidente= null;\n tipoincidentelist= new ArrayList<TipoIncidente>();\n //CONSULTA\n Cursor cursor=db.rawQuery(\"select codigo_incidente,tipo_incidente from \" +Utilitario.TABLE_TIPO_INCIDENTE,null);\n\n while (cursor.moveToNext()){\n clase_tipo_incidente=new TipoIncidente();\n clase_tipo_incidente.setCodigo(cursor.getInt(0));\n clase_tipo_incidente.setDescripcion(cursor.getString(1));\n\n Log.i(\"id\",clase_tipo_incidente.getCodigo().toString());\n Log.i(\"desc\",clase_tipo_incidente.getDescripcion());\n\n tipoincidentelist.add(clase_tipo_incidente);\n\n }\n llenarspinner();\n db.close();\n }", "public int getTasks() {\r\n return tasks;\r\n }", "public TaskList() {\n tasks = new ArrayList<>();\n }", "public TaskList() {\n tasks = new ArrayList<>();\n }", "public TaskList() {\n tasks = new ArrayList<>();\n }", "public ArrayList<Task> retrieveTaskList() {\r\n\r\n\r\n return taskList;\r\n }", "public int sizeOfList(){\n return tasks.size();\n }", "@Override\n public int getItemCount() {\n return datos.size();\n }", "private void initTaskViews(){\n for (Task t : taskManager.getTasksList()){\n submit(t.getName(), t.getIdInView(), t.getTimeForTask(), t.isFinished());\n }\n }", "@Override\n public int getItemCount() {\n return listaPuntuaciones.size();\n }", "public int countList() {\n return tasks.size();\n }", "public ArrayList<String> getAllTotalItems() {\n\n ArrayList<String> items = new ArrayList<>();\n Cursor cursor = db.query(DATABASE_TABLE_TOTAL, new String[] {\n KEY_ID, KEY_EXERCISE}, null, null, null, null, null);\n\n if (cursor.moveToFirst()) {\n do {\n String exercise = cursor.getString(COLUMN_EXERCISE_INDEX);\n\n items.add(exercise);\n } while (cursor.moveToNext());\n }\n\n cursor.close();\n return items;\n }", "public void setAdapter() {\n\t\tactivityAdapter = new ActivitiesAdapter(getActivity(), List,\n\t\t\t\ttotalmintxt);\n\t\tSystem.out.println(\"listsize=\" + List.size());\n\t\tif (List.size() > 0) {\n\t\t\tint totalmin = 0, totalcal = 0;\n\t\t\tfor (int i = 0; i < List.size(); i++) {\n\t\t\t\ttotalmin += Integer.parseInt(List.get(i).get(\n\t\t\t\t\t\tBaseActivity.total_time_minutes));\n\t\t\t\ttotalcal += Integer.parseInt(List.get(i).get(\n\t\t\t\t\t\tBaseActivity.calories_burned));\n\n\t\t\t}\n\t\t\ttotalmintxt.setText(\"\" + totalmin + \" min\");// calories_burned\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// calories_burned\n\t\t\ttotalcaltxt.setText(\"\" + totalcal + \" cal\");\n\t\t\tactivityListView.setAdapter(activityAdapter);\n\n\t\t\tcom.fitmi.utils.Constants.totalcal = totalcal;\n\n\t\t\tHomeFragment tosetCalory = new HomeFragment();\n\t\t\tNotificationCaloryBurn callBack = (NotificationCaloryBurn) tosetCalory;\n\n\t\t\tcallBack.setTotalCaloryBurn(com.fitmi.utils.Constants.totalcal);\n\t\t} else {\n\n\t\t\ttotalcaltxt.setText(\"0 cal\");\n\t\t\tactivityListView.setAdapter(activityAdapter);\n\t\t}\n\n\t\tsetActivitySpinner();\n\t}", "public List<Task> getAllTasks() {\n List<Task> tasks = new ArrayList<Task>();\n String selectQuery = \"SELECT * FROM \" + TABLE_TASKS+\" ORDER BY \"+KEY_DATE;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Task tk = new Task();\n tk.setId(c.getLong((c.getColumnIndex(KEY_ID))));\n tk.setTaskName((c.getString(c.getColumnIndex(KEY_TASKNAME))));\n tk.setDateAt(c.getString(c.getColumnIndex(KEY_DATE)));\n tk.setStatus(c.getInt(c.getColumnIndex(KEY_STATUS)));\n\n // adding to todo list\n tasks.add(tk);\n } while (c.moveToNext());\n }\n c.close();\n return tasks;\n }", "public ListaEtiquetas() {\n this.listaEtiquetas = new ArrayList<>();\n }", "@Override\n public int getCount() {\n return listaEmpleados.size();\n }", "List<Task> getTaskdetails();", "public void clearFinishedTasks(){\n todayLayout.removeAllViewsInLayout();\n tomorrowLayout.removeAllViewsInLayout();\n weekLayout.removeAllViewsInLayout();\n laterLayout.removeAllViewsInLayout();\n expiredLayout.removeAllViewsInLayout();\n tasksNumber = 0;\n taskManager.updateTasksTimeTag();\n for (Task t : taskManager.getTasksList()){\n t.setIdInView(tasksNumber);\n updateTaskInDatabase(t);\n submit(t.getName(), tasksNumber, t.getTimeForTask(), t.isFinished());\n tasksNumber++;\n }\n }", "public TaskList(ArrayList<Task> tasks) {\n this.tasks = tasks;\n }", "public TaskList(ArrayList<Task> tasks) {\n this.tasks = tasks;\n }", "int getTaskDetailsCount();", "TaskList getList();", "void setTodos(ArrayList<Task> tasks);", "public void loadTasks()\r\n\t{\n\t\ttable = loadTable(\"../data/tasks.csv\", \"header\");\r\n\t\t\r\n\t\t//gets amount of data rows in table\r\n\t\trow_count = table.getRowCount();\r\n\t\t//println(row_count);\r\n\t\t\r\n\t\t//put each row in table into Task class objects and initialise them\r\n\t\tfor(TableRow r : table.rows()){\r\n\t\t\ttasks.add(new Task(r));\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n public View getView(final int position, View convertView, ViewGroup parent) {\n View vi=convertView;\n if(convertView==null)\n vi = mInflater.inflate(R.layout.row_task_bytype, null);\n lblprecio= (TextView) vi.findViewById(R.id.title_row);\n lblfecha= (TextView) vi.findViewById(R.id.fecha);\n\n\n\n //Log.d(\"array \",names.toString());\n String title=NameTask.get(position);\n String status=StatusTask.get(position);\n\n\n\n\n\n\n\n\n String str_stado = \"\";\n\n if(status.equals(\"0\")){\n str_stado=\"Asignada\";\n lblfecha.setTextColor(Color.parseColor(\"#045FB4\"));\n }\n if(status.equals(\"1\")){\n str_stado=\"Con reporte\";\n lblfecha.setTextColor(Color.parseColor(\"#DF7401\"));\n }\n if(status.equals(\"2\")){\n str_stado=\"Finalizada\";\n lblfecha.setTextColor(Color.parseColor(\"#5FB404\"));\n }\n\n lblprecio.setText(String.valueOf(title));\n\n\n lblfecha.setText(String.valueOf(str_stado));\n\n\n\n return vi;\n }", "public LiveData<List<Task>> getAllTasks(){\n allTasks = dao.getAll();\n return allTasks;\n }", "public int size()\n {\n return tasks.size();\n }", "public void updateListViewAndCount() {\n \t\n \t//updating the currentTaskItems then getting a array of the list\n \tListView items = (ListView)findViewById(R.id.showAttachedItems);\n \t\n \tArrayList<ItemListElement> item = formatOutputForList();\n \tItemListElement[] elm = new ItemListElement[item.size()];\n \titem.toArray(elm);\n \t\n \t//updating the list view\n \tItemListAdapter adapter = \n \t new ItemListAdapter(this, R.layout.list_multi, elm);\n items.setAdapter(adapter);\n \t\n \t//update the item count\n \tEditText num = (EditText)findViewById(R.id.showCurrentItemNum);\n \tint value = currentTaskItems.size();\n \tString val = Integer.toString(value);\n \tnum.setText(val);\t\n }", "public List<Task> getAllTasks() {\n List<Task> taskList = new ArrayList<Task>();\n String queryCommand = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(queryCommand, null);\n if (cursor.moveToFirst()) {\n do {\n Task task = new Task();\n task.setId(cursor.getString(0));\n task.setLabel(cursor.getString(1));\n task.setTime(cursor.getString(2));\n taskList.add(task);\n } while (cursor.moveToNext());\n }\n return taskList;\n }", "void populate() {\n daftarNotifikasi.add(new DaftarNotifikasi(\"Ludfi Ika P\", \"Hari ini mau gathering dimana?\", 2, R.drawable.profil_2));\n daftarNotifikasi.add(new DaftarNotifikasi(\"Erinda\", \"Ada pagelaran di kota\", 6, R.drawable.profil_3));\n daftarNotifikasi.add(new DaftarNotifikasi(\"Aleq\", \"Saya punya solusi untuk itu\", 10, R.drawable.profil_1));\n }", "ObservableList<Task> getTaskList();", "private ArrayList<Tarea> getTareas(Date desde, Date hasta) {\n BDConsulter consulter = new BDConsulter(DATABASE_URL, DATABASE_USER, DATABASE_PASS);//genero la clase, que se conecta a la base postgresql\n consulter.connect();//establezco la conexion\n\n //Si no hay ningun integrante seleccionado, selecciono todos\n List<String> integrantesSeleccionados = jListIntegrantes.getSelectedValuesList();\n DefaultListModel<String> model = (DefaultListModel<String>) jListIntegrantes.getModel();\n List<String> integrantes = new ArrayList<String>();\n if (integrantesSeleccionados.size() == 0) {\n for (int i = 0; i < model.getSize(); i++) {\n System.out.println((model.getElementAt(i)));\n integrantes.add(model.getElementAt(i));\n }\n integrantesSeleccionados = integrantes;\n }\n\n ArrayList<Tarea> tareas = new ArrayList<>();\n for (String s : integrantesSeleccionados) {\n tareas.addAll(consulter.getTareas(desde, hasta, (String) jComboBoxProyecto.getSelectedItem(), (String) jComboBoxGrupos.getSelectedItem(), s));//obtengo las tareas creadas entre un rango de fecha dado\n }\n consulter.disconnect();//termino la conexion con la base//termino la conexion con la base\n return tareas;\n }", "public ArrayList<DTOValoracion> listaValoraciones() {\n ArrayList<DTOValoracion> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select valoracion, COUNT (valoracion) cantidad\\n\"\n + \"from Comentarios\\n\"\n + \"where valoracion is not null\\n\"\n + \"group by valoracion \");\n\n while (rs.next()) {\n\n int valoracion = rs.getInt(1);\n int cantidad = rs.getInt(2);\n\n DTOValoracion v = new DTOValoracion(valoracion, cantidad);\n\n lista.add(v);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "private void display()\n {\n tasksColumn.setCellValueFactory(new PropertyValueFactory<>(\"task\"));\n completionDateColumn.setCellValueFactory(new PropertyValueFactory<>(\"completionDate\"));\n completedColumn.setCellValueFactory(new PropertyValueFactory<>(\"completed\"));\n\n listView.getItems().add(Item.getToDoList().get(index));\n index++;\n }", "private void syncListFromTodo() {\r\n DefaultListModel<String> dlm = new DefaultListModel<>();\r\n for (Task task : myTodo.getTodo().values()) {\r\n if (!task.isComplete() || showCompleted) {\r\n String display = String.format(\"%1s DueDate: %10s %s %3s\", task.getName(), task.getDueDate(),\r\n task.isComplete() ? \" Completed!\" : \" Not Completed\", task.getPriority());\r\n dlm.addElement(display);\r\n list.setFont(new Font(\"TimesRoman\", Font.PLAIN, 15));\r\n }\r\n }\r\n list.setModel(dlm);\r\n }", "private void updateUI() {\n ArrayList<String> taskList = new ArrayList<>();\n\n //a read-only database object will be returned\n SQLiteDatabase db = dbHelper.getReadableDatabase();\n\n //query the table, returning a cursor over the set with all the columns\n Cursor cursor = db.query(TaskContract.TaskEntry.TABLE,\n new String[]{TaskContract.TaskEntry._ID, TaskContract.TaskEntry.COL_TASK_TITLE},\n null, null, null, null, null);\n\n //Place the items in an ArrayList of Strings\n while (cursor.moveToNext()) {\n int columnIndex = cursor.getColumnIndex(TaskContract.TaskEntry.COL_TASK_TITLE);\n taskList.add(cursor.getString(columnIndex));\n }\n\n //If the adapter is not created or null, then set it as the adapter of the ListView\n if (arrayAdapterToDo == null) {\n arrayAdapterToDo = new ArrayAdapter<String>(this,\n R.layout.item_todo, //what view to user for the items\n R.id.taskTitle, //where to put the String of data\n taskList); //where to get all the data\n listView.setAdapter(arrayAdapterToDo); //set it as the adapter of the ListView Instance\n } else {\n arrayAdapterToDo.clear(); //remove all the elements from the list\n arrayAdapterToDo.addAll(taskList); //add all the items from the database, came from the while loop populating taskList\n arrayAdapterToDo.notifyDataSetChanged(); //alert the ListView that the data changed and it should refresh itself\n }\n cursor.close(); //close the cursor object\n db.close(); //close the database object\n }", "@Override\npublic int getItemCount() {\n return mNoticiaData.size();\n }", "@Override\r\n public void onRefresh() {\r\n tasksubject1.clear();\r\n tasksubject.clear();\r\n tasksubject3.clear();\r\n tasksubject2.clear();\r\n tasksubject4.clear();\r\n tasksubject5.clear();\r\n\r\n String k = client.getClientInfo().userId;\r\n java.util.Calendar calendar = java.util.Calendar.getInstance();\r\n SimpleDateFormat mdformat = new SimpleDateFormat(\"yyyy-MM-dd \");\r\n String date = mdformat.format(calendar.getTime());\r\n\r\n try {\r\n sendRequest(\"SELECT Subject,status,WhoId,id FROM Task WHERE ActivityDate=\" + date + \" and status ='Not Started' and ownerid='\" + k + \"'\");\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n adapter.notifyDataSetChanged();\r\n pullToRefresh.setRefreshing(false);\r\n }", "@Override\n\tpublic List<DataTaxTask> getSumDataList(DataTaxTask entity) {\n\t\treturn taxTaskDao.getSumDataList(entity);\n\t}", "public void initiateValues(Task task)\r\n {\n int icon;\r\n switch (task.getType()) {\r\n case Task.TASK_DELIVERY:\r\n icon = R.drawable.ic_delivery;\r\n break;\r\n case Task.TASK_PICKUP:\r\n icon = R.drawable.ic_pickup;\r\n break;\r\n default:\r\n icon = R.drawable.ic_delivery;\r\n }\r\n ((Toolbar)findViewById(R.id.package_toolbar)).setNavigationIcon(icon);\r\n\r\n //task fields\r\n TextView number = (TextView)findViewById(R.id.route_id_field);\r\n TextView type = (TextView)findViewById(R.id.task_type_field);\r\n TextView address = (TextView)findViewById(R.id.task_address_field);\r\n TextView timeslot = (TextView)findViewById(R.id.task_timeslot_field);\r\n\r\n number.setText(task.getId()+\"\");\r\n type.setText(((task.getType()==0)?\"Levering\":\"Henting\")+ \" (\" + task.getSize() + \" kolli)\");\r\n address.setText(task.getAddress() + \", \" + task.getZip() + \" \" + task.getCity());\r\n long timeSlotStart = task.getTimeSlotStart();\r\n long timeSlotEnd = task.getTimeSlotEnd();\r\n //set timeslot for package if it exists\r\n if(timeSlotStart != 0 && timeSlotEnd != 0)\r\n timeslot.setText(task.getTimeSlotStartString() + \" - \" + task.getTimeSlotEndString());\r\n\r\n //sender fields\r\n TextView sender_name = (TextView)findViewById(R.id.sender_name_field);\r\n TextView sender_phone = (TextView)findViewById(R.id.sender_phone_field);\r\n TextView sender_address = (TextView)findViewById(R.id.sender_address_field);\r\n\r\n sender_name.setText(task.getSender().getName());\r\n sender_phone.setText(task.getSender().getPhone());\r\n sender_address.setText(task.getSender().getAddress());\r\n\r\n //receiver fields\r\n TextView receiver_name = (TextView)findViewById(R.id.receiver_name_field);\r\n TextView receiver_phone = (TextView)findViewById(R.id.receiver_phone_field);\r\n TextView receiver_address = (TextView)findViewById(R.id.receiver_address_field);\r\n\r\n receiver_name.setText(task.getReceiver().getName());\r\n receiver_phone.setText(task.getReceiver().getPhone());\r\n receiver_address.setText(task.getReceiver().getAddress());\r\n }", "private List<TaskObject> getAllTasks(){\n RealmQuery<TaskObject> query = realm.where(TaskObject.class);\n RealmResults<TaskObject> result = query.findAll();\n result.sort(\"completed\", RealmResults.SORT_ORDER_DESCENDING);\n\n tasks = new ArrayList<TaskObject>();\n\n for(TaskObject task : result)\n tasks.add(task);\n\n return tasks;\n }", "private void getPTs(){\n mPyTs = estudioAdapter.getListaPesoyTallasSinEnviar();\n //ca.close();\n }", "public ArrayList consultarTodo() {\n Cursor cursor = this.myDataBase.rawQuery(\"SELECT des_invfisico_tmp._id,des_invfisico_tmp.cod_ubicacion,des_invfisico_tmp.cod_referencia,des_invfisico_tmp.cod_plu,plu.descripcion FROM des_invfisico_tmp LEFT OUTER JOIN plu ON plu.cod_plu = des_invfisico_tmp.cod_plu \", null);\n ArrayList arrayList = new ArrayList();\n new ArrayList();\n if (cursor.moveToFirst()) {\n do {\n for (int i = 0; i <= 4; ++i) {\n if (cursor.isNull(i)) {\n arrayList.add(\"\");\n continue;\n }\n arrayList.add(cursor.getString(i));\n }\n } while (cursor.moveToNext());\n }\n\n return arrayList;\n }", "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 }", "@Override\n public String toString() {\n\treturn \"Primzahlen von Task \" + taskID + \" \" + primzahlenListe;\n }", "public void fetchGuestList() {\n mRowDataList.clear();\n int temp = 0;\n todayIncome = 0;\n guestCount = 0;\n for (int i = 0; i < 10; i++) {\n temp = 800 + i;\n String name = \"Guest No.\" + i;\n String timeSpanPlaceHolder = \"PlaceHolder\";\n todayIncome += temp;\n mRowDataList.add(new RecyclerListAdapter.rowData(\"\" + temp, name, \"\" + temp, timeSpanPlaceHolder));\n }\n guestCount = mRowDataList.size();\n\n }", "private void setRecyclerViewAdapter(List<Task> tasks){\n adapter = new DataAdapter(ViewTaskActivity.this, tasks);\n recyclerView.setAdapter(adapter);\n recyclerView.setLayoutManager(layoutManager);\n }", "public List<Empresa> getData() {\n lista = new ArrayList<Empresa>();\n aux = new ArrayList<Empresa>();\n Empresa emp = new Empresa(1, \"restaurantes\", \"KFC\", \"Av. Canada 312\", \"tel:5050505\", \"[email protected]\", \"www.kfc.com\", \"https://upload.wikimedia.org/wikipedia/en/thumb/b/bf/KFC_logo.svg/1024px-KFC_logo.svg.png\", \"Restaurante de comida rapida.exe\");\n lista.add(emp);\n emp = new Empresa(2, \"restaurantes\", \"Pizza Hut\", \"Av. Aviación 352\", \"tel:1111111\", \"[email protected]\", \"www.pizzahut.com\", \"https://upload.wikimedia.org/wikipedia/en/thumb/d/d2/Pizza_Hut_logo.svg/1088px-Pizza_Hut_logo.svg.png\", \"Restaurante de comida rapida.exe\");\n lista.add(emp);\n emp = new Empresa(3, \"restaurantes\", \"Chifa XUNFAN\", \"Av. del Aire 122\", \"tel:1233121\", \"[email protected]\", \"www.chifaxunfan.com\", \"https://www.piscotrail.com/sf/media/2011/01/chifa.png\", \"Restaurante de comida oriental.exe\");\n lista.add(emp);\n emp = new Empresa(4, \"Restaurantes\", \"El buen sabor\", \"Av. Benavides 522\", \"tel:5366564\", \"[email protected]\", \"www.elbuensabor.com\", \"http://www.elbuensaborperu.com/images/imagen1.jpg\", \"Restaurante de comida peruana\");\n lista.add(emp);\n emp = new Empresa(5, \"Restaurantes\", \"La Romana\", \"Av. San borja norte 522\", \"tel:6462453\", \"[email protected]\", \"www.laromana.com\", \"https://3.bp.blogspot.com/-rAxbci6-cM4/WE7ZppGVe4I/AAAAAAAA3fY/TkiySUlQJTgR7xkOXViJ1IjFRjOulFWnwCLcB/s1600/pizzeria-la-romana2.jpg\", \"Restaurante de comida italiana\");\n lista.add(emp);\n emp = new Empresa(6, \"Ocio\", \"Cinemark\", \"Av. San borja norte 522\", \"tel:6462453\", \"[email protected]\", \"www.cinemark.com.pe\", \"https://s3.amazonaws.com/moviefone/images/theaters/icons/cienmark-logo.png\", \"El mejor cine XD\");\n lista.add(emp);\n emp = new Empresa(7, \"Educación\", \"TECSUP\", \"Av. cascanueces 233\", \"tel:6462453\", \"[email protected]\", \"www.tecsup.edu.pe\", \"http://www.miningpress.com/media/img/empresas/tecsup_1783.jpg\", \"Instituto tecnologico del Perú\");\n lista.add(emp);\n emp = new Empresa(8, \"Ocio\", \"CC. Arenales\", \"Av. arenales 233\", \"tel:6462453\", \"[email protected]\", \"www.arenales.com.pe\", \"http://4.bp.blogspot.com/-jzojuNRfh_s/UbYXFUsN9wI/AAAAAAAAFjU/ExT_GmT8kDc/s1600/35366235.jpg\", \"Centro comercial arenales ubicado en la avenida Arenales al costado del Metro Arenales\");\n lista.add(emp);\n emp = new Empresa(9, \"Ocio\", \"Jockey Plaza\", \"Av. Javier Prado 233\", \"tel:6462453\", \"[email protected]\", \"www.jockeyplaza.com.pe\", \"http://3.bp.blogspot.com/-a2DHRxS7R8k/T-m6gs9Zn7I/AAAAAAAAAFA/z_KeH2QTu18/s1600/logo+del+jockey.png\", \"Un Centro Comercial con los diversos mercados centrados en la moda y tendencia del mundo moderno\");\n lista.add(emp);\n emp = new Empresa(10, \"Educación\", \"UPC\", \"Av. Monterrico 233\", \"tel:6462453\", \"[email protected]\", \"www.upc.edu.pe\", \"https://upload.wikimedia.org/wikipedia/commons/f/fc/UPC_logo_transparente.png\", \"Universidad Peruana de Ciencias Aplicadas conocida como UPC se centra en la calidad de enseñanza a sus estudiantes\");\n lista.add(emp);\n int contador=0;\n String key = Busqueda.getInstance().getKey();\n for (int i = 0; i < lista.size(); i++) {\n if (lista.get(i).getRubro().equalsIgnoreCase(key)||lista.get(i).getRubro().toLowerCase().contains(key.toLowerCase())) {\n aux.add(lista.get(i));\n }else {\n if (lista.get(i).getNombre().equalsIgnoreCase(key)||lista.get(i).getNombre().toLowerCase().contains(key.toLowerCase())) {\n aux.add(lista.get(i));\n break;\n }else {\n\n }\n }\n\n }\n return aux;\n }", "public ToDoList2AL()\n {\n\tcompleted = new ArrayList<Task>();\n\ttoDo = new ArrayList<Task>();\n }", "public ArrayList<Task> getTasks(Calendar cal) \n\t{\n ArrayList<Task> tasks = new ArrayList<Task>();\n\t\tStatement statement = dbConnect.createStatement();\n\t\t\n\t\tResultSet results = statement.executeQuery(\"SELECT * FROM tasks\");\n\n\t\twhile(results.next())\n\t\t{\n\t\t\tint id = result.getInt(1);\n\t\t\tint year = result.getInt(2);\n\t\t\tint month = result.getInt(3);\n\t\t\tint day = result.getInt(4);\n\t\t\tint hour = result.getInt(5);\n\t\t\tint minute = result.getInt(6);\n\t\t\tString descrip = result.getString(7);\n\t\t\tboolean recurs = result.getBoolean(8);\n\t\t\tint recursDay = result.getInt(9);\n\t\t\t\n\t\t\tCalendar cal = new Calendar();\n\t\t\tcal.set(year, month, day, hour, minute);\n\t\t\t\n\t\t\tTask task;\n\t\t\t\n\t\t\tif(recurs)\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip, recursDay));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip));\n\t\t\t}\n\t\t\t\n\t\t\ttask.setID(id);\n\t\t}\n\t\tstatement.close();\n\t\tresults.close();\n return tasks;\n }", "List<Task> getAllTasks();", "public void populateTaskList(String _task){\n\t\ttaskList.getItems().add(_task);\n\t}", "@Override\n public int getItemCount() {\n return mascotas.size();\n }", "public List<Tripulante> buscarTodosTripulantes();", "private void limparPesquisasRecentes() {\n facade.deletarTodosTermos();\n pesquisas = facade.obterTermos();\n adapter.clear();\n adapter.notifyDataSetChanged();\n listViewPesquisas.refreshDrawableState();\n\n }", "@Override\r\n\tpublic ArrayList<Task> getAllTasks() {\n\t\treturn null;\r\n\t}", "public ArrayList<TaskItem> getAllTasksByStatus(int status)\n {\n ArrayList<TaskItem> allTasksList = new ArrayList<>();\n\n //String allTasks = \"SELECT * FROM \" + TABLE_TASKS + \" WHERE \" + KEY_STATUS + \" = 0\" + \" ORDER BY \" + KEY_CATEGORY + \" DESC\";\n String allTasks = \"SELECT * FROM \" + TABLE_TASKS + \" WHERE \" + TASK_STATUS + \" = \" + \"'\" + status + \"'\" + \" ORDER BY \" + TASK_DATE + \" DESC, \" + TASK_ID + \" DESC, \" + TASK_CATEGORY + \" DESC\";\n\n SQLiteDatabase db = getReadableDatabase();\n\n Cursor allTasksCursor = db.rawQuery(allTasks, null);\n\n if(allTasksCursor.moveToFirst())\n {\n do {\n\n allTasksList.add(\n TaskItem.createTask(allTasksCursor.getString(1),\n allTasksCursor.getString(2),\n Integer.parseInt(allTasksCursor.getString(3)),\n Integer.parseInt(allTasksCursor.getString(0)),\n allTasksCursor.getString(4),\n allTasksCursor.getString(5)));\n }\n while (allTasksCursor.moveToNext());\n }\n\n allTasksCursor.close();\n db.close();\n\n return allTasksList;\n }", "public String numTasks() {\n return \"Now you have \" + USER_TASKS.size() + \" tasks in the list.\";\n }", "@Override\n protected void onPostExecute(List<Persona> personas) {\n if (personas != null) {\n adaptador = new AdaptadorDePersonas(getBaseContext(), personas);\n lista.setAdapter(adaptador);\n } else {\n Toast.makeText(getBaseContext(),\n \"Error del adaptador \", Toast.LENGTH_SHORT).show();\n }\n }", "private ArrayList<Entidad> GetArrayItems(){\n // ArrayList<Entidad> listItems = new ArrayList<>();\n listItems.add(new Entidad(\"Agree\", \"Disagree\", \"Level: \", \"Bajo\", 0,0,0,0, 0,0,0, \" Spotify\",\"\", 0, false, false, false, null, \"\", 1,0,0,0,0,\"\"));\n listItems.add(new Entidad(\"Agree\", \"Disagree\", \"Level: \", \"Bajo\", 0,0,0,0, 0,0,0, \" Spotify\",\"\", 0, false, false, false, null, \"\", 1,0,0,0,0,\"\"));\n listItems.add(new Entidad(\"Agree\", \"Disagree\", \"Level: \", \"Bajo\", 0,0,0,0, 0,0,0, \" Spotify\",\"\", 0, false, false, false, null, \"\", 1,0,0,0,0,\"\"));\n listItems.add(new Entidad(\"Agree\", \"Disagree\", \"Level: \", \"Bajo\", 0,0,0,0, 0,0,0, \" Spotify\",\"\", 0, false, false, false, null, \"\", 1,0,0,0,0,\"\"));\n listItems.add(new Entidad(\"Agree\", \"Disagree\", \"Level: \", \"Bajo\", 0,0,0,0, 0,0,0, \" Spotify\",\"\", 0, false, false, false, null, \"\", 1,0,0,0,0,\"\"));\n\n return listItems;\n }", "public ArrayList<PieEntry> getValues(){\n\n SQLiteDatabase db = this.getWritableDatabase();\n ArrayList<PieEntry> dataV = new ArrayList<>();\n String[] columns = {\"cost\", \"name\"};\n Cursor cursor = db.query(\"subscriptions\", columns, null, null, null, null, null);\n\n for(int i=0; i<cursor.getCount(); i++){\n\n cursor.moveToNext();\n dataV.add(new PieEntry(cursor.getFloat(0), cursor.getString(1)));\n }\n\n return dataV;\n\n }", "public void clearTaskListRecNums() { taskListRecNums.clear(); }", "private List<Task> tasks2Present(){\n List<Task> tasks = this.taskRepository.findAll();\n// de taken verwijderen waar user eerder op reageerde\n tasks2React(tasks);\n// taken op alfabetische volgorde zetten\n sortTasks(tasks);\n// opgeschoonde lijst aan handler geven\n return tasks;\n }", "private void genererListeView() {\n\n displayToast(\"Antall treff: \" + spisestedListe.size());\n\n //sorterer alfabetisk på navn\n Collections.sort(spisestedListe);\n\n spisestedAdapter = new SpisestedAdapter(this, spisestedListe);\n recyclerView.setAdapter(spisestedAdapter);\n\n //henter inn antall kolonner fra values, verdi 2 i landscape\n // https://stackoverflow.com/questions/29579811/changing-number-of-columns-with-gridlayoutmanager-and-recyclerview\n int columns = getResources().getInteger(R.integer.list_columns);\n recyclerView.setLayoutManager(new GridLayoutManager(this, columns));\n }", "private void prepararNoticias() {\n Noticia noticia = new Noticia(\n \"Novo Residencial perto de você!\",\n \"Venha conhecer nosso mais novo empreendimento.\"\n );\n noticias.add(noticia);\n\n noticia = new Noticia(\n \"As melhores condições para você adiquirir um imovel hoje mesmo\",\n \"Marque uma visita.\"\n );\n noticias.add(noticia);\n\n adapter.notifyDataSetChanged();\n }", "public int getTasksSize() {\n return tasks.size();\n }", "private void cargarAutos() {\n Auto autos[]={\n new Auto(\"Bocho\",\"1994\"),\n new Auto(\"Jetta\",\"1997\"),\n new Auto(\"Challenger\",\"2011\"),\n new Auto(\"Ferrari\",\"2003\")\n };\n for (Auto auto : autos) {\n cboAutos.addItem(auto);\n \n }\n spnIndice.setModel(new SpinnerNumberModel(0, 0, autos.length-1, 1));\n }" ]
[ "0.7000542", "0.6957798", "0.684231", "0.679706", "0.67802364", "0.67709005", "0.65096813", "0.6477878", "0.64471364", "0.64002496", "0.6310446", "0.63093024", "0.6295991", "0.62604946", "0.6255243", "0.6219172", "0.61897063", "0.6169776", "0.61472964", "0.61390364", "0.60817987", "0.60707843", "0.6028403", "0.6027705", "0.60274035", "0.6022289", "0.59968686", "0.5989409", "0.59797895", "0.5976184", "0.59735996", "0.59582114", "0.5935079", "0.59341764", "0.5926554", "0.5916755", "0.5916755", "0.5916755", "0.59163064", "0.5915823", "0.589507", "0.5880579", "0.58562803", "0.585341", "0.5843772", "0.5840028", "0.58295906", "0.58268297", "0.5814707", "0.58093", "0.57880807", "0.5782746", "0.5782746", "0.57796144", "0.5774356", "0.5763128", "0.573964", "0.5725719", "0.5723418", "0.5713256", "0.5709506", "0.57089555", "0.5704039", "0.57040286", "0.57003576", "0.5685709", "0.5683538", "0.5679347", "0.5679192", "0.56755406", "0.56739", "0.5669405", "0.56651664", "0.56595534", "0.565498", "0.5648615", "0.56462634", "0.56430143", "0.56398183", "0.5639746", "0.5630541", "0.56296504", "0.5623737", "0.562352", "0.5617071", "0.5603739", "0.56028855", "0.5602663", "0.56018716", "0.56002665", "0.5595936", "0.5584354", "0.55808693", "0.55745995", "0.55722266", "0.55720377", "0.55709845", "0.5569286", "0.5563818", "0.55637586" ]
0.7554467
0
changed this bit and the iteration in the contructor for now, you can change it later leo
public int search(String name){ for(Map.Entry<String, Integer> e : map.entrySet()){ if(e.getKey().equals(name)){ return e.getValue(); } } throw new NullPointerException(); /* while(pointer < locations.length){ if(locations[pointer].getName() == name){ map.put(locations[pointer].getName(), locations[pointer].getID()); pointer++; return locations[pointer - 1].getID(); } else { map.put(locations[pointer].getName(), locations[pointer].getID()); pointer++; } } throw new NullPointerException(); */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n protected void init() {\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}", "@Override\n\t\tpublic void init() {\n\t\t}", "public Constructor(){\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\tpublic void init() {\n\t\t\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}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "private void init() {\n\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\tpublic void init()\n\t{\n\n\t}", "public void init() {\r\n\t\t// to override\r\n\t}", "private ValueIterator()\n {\n currentIndex = 0;\n numberLeft = numberOfEntries;\n }", "@Override\n public void init() {\n }", "@Override\r\n\tpublic final void init() {\r\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\r\n\tpublic void init() {\n\r\n\t}", "@Override\n public void init() {\n }", "SingelIterator() {\n neste = listehode;\n forrige = listehode;\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t}", "private void init() {\n\n\n\n }", "@Override\n public void init() {}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override public void init()\n\t\t{\n\t\t}", "private static void iterator() {\n\t\t\r\n\t}", "@Override\n void init() {\n }", "public IterName(){\n }", "private TMCourse() {\n\t}", "public IterR(){\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "private void init() {\n }", "protected void init() {\n // to override and use this method\n }", "@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}", "@Override\n protected void initialize() \n {\n \n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\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 MyIterator(ExperimentList exp){ // experiment list constructor.\r\n this.exp = exp;\r\n }", "@Override\n protected void initData() {\n }", "@Override\n protected void initData() {\n }", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void init() {\n\t\t\n\t}", "public Pitonyak_09_02() {\r\n }", "@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}", "public MyListIter(int index) {\n super();\n //iter.current = index;\n current = index;\n }", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t\tpublic MyHashTableIterator ()\r\n\t\t{\r\n\t\t\tcurrentIndex =0;\r\n\t\t\tcurrentArray = (LinkedArrays<T>) table[currentIndex];\r\n\t\t\tcurrentArrayItr= currentArray.iterator();\r\n\t\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "public void init() {\n \n }", "private IteratorImpl() {\r\n\t\t\titeratorModificationCount = modificationCount;\r\n\r\n\t\t\tnextEntry = table[0] == null ? findNextNonNullTableRowEntry() : table[0];\r\n\t\t}", "public VSListIterator()\n {\n }", "@Override\n public void init() {\n\n super.init();\n\n }", "public void init() {\n\t\t}", "public void init() {\r\n\r\n\t}", "private UniqueChromosomeReconstructor() { }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\r\n public Iterator iterator(){\n return new MyIterator(this);\r\n }", "public IterI(){\n }", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "private DocumentOrderIterator() {}", "private THashIterator() {\n\t\t\t_expectedSize = TOrderedHashMap.this.size();\n\t\t\t_index = -1;\n\t\t}", "@Override\n\t\tprotected void initialise() {\n\n\t\t}", "private KeyIterator()\n {\n currentIndex = 0;\n numberLeft = numberOfEntries;\n }", "protected TreeIterator(Tree<T> tree) {\n\t\t\tsuper();\n\t\t\tthis.tree = tree;\n\t\t\tcursor = null;\n\t\t}", "public ChainedArraysIterator(){\r\n\t\t\tcurrentNode = beginMarker.next;\r\n\t\t\tcurrent = currentNode.getFirst();\r\n\t\t\tidx = 0;\r\n\t\t\texpectedModCount=modCount;\r\n\t\t}", "RandomizedIterator(String className, TypeTree tree) {\n\t super(init(className, tree));\n\t}" ]
[ "0.65996456", "0.6594109", "0.63844234", "0.63061297", "0.63061297", "0.63061297", "0.6287283", "0.6224451", "0.6188138", "0.6188138", "0.6188138", "0.6188138", "0.6188138", "0.61544055", "0.61544055", "0.61544", "0.61440814", "0.6133047", "0.6096434", "0.6096434", "0.6096434", "0.6094035", "0.6092179", "0.60849994", "0.6082404", "0.6070264", "0.60677534", "0.60677534", "0.60677534", "0.6064133", "0.6053515", "0.6046329", "0.60375404", "0.60238785", "0.6022353", "0.6019157", "0.60109735", "0.60057896", "0.60057896", "0.6005284", "0.5995489", "0.59944457", "0.59847015", "0.5981383", "0.59725714", "0.5956284", "0.59504855", "0.59504855", "0.59449434", "0.5942972", "0.5942081", "0.5942081", "0.5942081", "0.5942081", "0.5942081", "0.5942081", "0.59345573", "0.5923506", "0.5923506", "0.5923506", "0.5923506", "0.5914209", "0.5914209", "0.5914209", "0.5914209", "0.5914209", "0.5914209", "0.59058326", "0.5902765", "0.5902765", "0.5902449", "0.5902449", "0.58855444", "0.58793473", "0.5873822", "0.5873693", "0.5868347", "0.5856403", "0.5855223", "0.5854871", "0.5854671", "0.5845774", "0.583395", "0.5829547", "0.5826223", "0.5817809", "0.5815102", "0.5814665", "0.57975227", "0.5795267", "0.5792217", "0.5785401", "0.5785401", "0.5785401", "0.5783556", "0.57817155", "0.57664526", "0.5764751", "0.57556707", "0.5752411", "0.5751355" ]
0.0
-1
I changed it a bit for now cause the original code gave me java.lang.ArrayStoreException
public String[] locationNames(){ String[] s = new String[locations.length]; for(int i=0; i<locations.length; i++){ s[i] = locations[i].toString(); } return s; //return Arrays.copyOf(locations, locations.length, String[].class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Array createArray();", "ArrayValue createArrayValue();", "@Test\n public void testToArray_0args() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n Integer[] expResult = { 1, 2, 3, 4, 5, 6 };\n Object[] result = instance.toArray();\n assertArrayEquals(expResult, result);\n\n }", "public /* bridge */ /* synthetic */ java.lang.Object[] newArray(int r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.telephony.SmsCbCmasInfo.1.newArray(int):java.lang.Object[], dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.1.newArray(int):java.lang.Object[]\");\n }", "public /* bridge */ /* synthetic */ java.lang.Object[] newArray(int r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.location.GpsClock.1.newArray(int):java.lang.Object[], dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.1.newArray(int):java.lang.Object[]\");\n }", "public static void arrayDemo() {\n\t}", "@Test\n public void testIndirectArrayCreation() {\n final String[] array = toArrayPropagatingType(\"foo\", \"bar\");\n assertEquals(2, array.length);\n assertEquals(\"foo\", array[0]);\n assertEquals(\"bar\", array[1]);\n }", "@Test(expected = ArrayIndexOutOfBoundsException.class)\n public void getTestArrayIndexOutOfBoundsException() {\n SimpleArray<String> simpleArray = new SimpleArray<>(1);\n simpleArray.add(\"First\");\n simpleArray.get(1);\n }", "public interface IPrimitiveArray extends IArray {\n /**\n * Primitive signatures.\n */\n public static final byte[] SIGNATURES = {\n -1, -1, -1, -1, (byte) 'Z', (byte) 'C', (byte) 'F', (byte) 'D', (byte) 'B', (byte) 'S',\n (byte) 'I', (byte) 'J'\n };\n\n /**\n * Element sizes inside the array.\n */\n public static final int[] ELEMENT_SIZE = { -1, -1, -1, -1, 1, 2, 4, 8, 1, 2, 4, 8 };\n\n /**\n * Display string of the type.\n */\n @SuppressWarnings(\"nls\") public static final String[] TYPE = {\n null, null, null, null, \"boolean[]\", \"char[]\", \"float[]\", \"double[]\", \"byte[]\", \"short[]\",\n \"int[]\", \"long[]\"\n };\n\n /**\n * Java component type of the primitive array.\n */\n public static final Class<?>[] COMPONENT_TYPE = {\n null, null, null, null, boolean.class, char.class, float.class, double.class, byte.class,\n short.class, int.class, long.class\n };\n\n /**\n * Returns the {@link Type} of the primitive array.\n */\n public int getType();\n\n /**\n * Returns the component type of the array.\n */\n public Class<?> getComponentType();\n\n /**\n * Returns the Object at a given index.\n */\n public Object getValueAt(int index);\n\n /**\n * Get the primitive Java array. The return value can be casted into the\n * correct component type, e.g.\n *\n * <pre>\n * if (char.class == array.getComponentType())\n * {\n * char[] content = (char[]) array.getValueArray();\n * System.out.println(content.length);\n * }\n * </pre>\n *\n * The return value must not be modified because it is cached by the heap\n * dump adapter. This method does not return a copy of the array for\n * performance reasons.\n */\n public Object getValueArray();\n\n /**\n * Get the primitive Java array, beginning at <code>offset</code> and\n * <code>length</code> number of elements.\n * <p>\n * The return value must not be modified because it is cached by the heap\n * dump adapter. This method does not return a copy of the array for\n * performance reasons.\n */\n public Object getValueArray(int offset, int length);\n}", "@Test\r\n\tpublic void testToArrayType() {\r\n\t\tMunitions[] sample1 = new Munitions[5];\r\n\t\tsample1 = list.toArray(sample1);\r\n\t\tAssert.assertEquals(15, sample1.length);\r\n\t\tfor (int i = 0; i < sample1.length; i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t\tMunitions[] sample2 = new Munitions[20];\r\n\t\tsample2 = list.toArray(sample2);\r\n\t\tAssert.assertEquals(20, sample2.length);\r\n\t\tfor (int i = 0; i < sample2.length - list.size(); i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t}", "public DynamicArray(){\n\t \n\t array = (E[]) new Object[dim];\n }", "HRESULT SafeArrayRedim(SAFEARRAY psa, SAFEARRAYBOUND psaboundNew);", "public void testToArray2() {\n SynchronousQueue q = new SynchronousQueue();\n\tInteger[] ints = new Integer[1];\n assertNull(ints[0]);\n }", "@Override // java.util.Collection, java.util.Set\r\n public <T> T[] toArray(T[] array) {\r\n if (array.length < this.f513d) {\r\n array = (Object[]) Array.newInstance(array.getClass().getComponentType(), this.f513d);\r\n }\r\n System.arraycopy(this.f512c, 0, array, 0, this.f513d);\r\n int length = array.length;\r\n int i2 = this.f513d;\r\n if (length > i2) {\r\n array[i2] = null;\r\n }\r\n return array;\r\n }", "Exp getArrayExp();", "private void ensureCap(){\n T[] temp = (T[])new Object[arr.length * 2];\n for(int i = 0; i < numItems; i++){\n temp[i] = this.arr[i];\n }\n this.arr = temp;\n }", "@SuppressWarnings(\"unchecked\") // this will stop Java complaining about the cast\n private void ensureCapacity() {\n if (count == data.length) { //if count is equal to the length of data a new array is made doubling the initial size, it then makes the data collection == to the temp collection\n E[] temp = (E[]) new String[data.length * 2]; //effectivly increasing the size of the array\n for (int i = 0; i < data.length; i++) {\n temp[i] = data[i];\n }\n data = temp;\n }\n }", "@Test\r\n\tpublic void testToArray() {\r\n\t\tObject[] sample = list.toArray();\r\n\t\tAssert.assertEquals(15, sample.length);\r\n\t\tfor (int i = 0; i < sample.length; i++) {\r\n\t\t\tAssert.assertNotNull(sample[i]);\r\n\t\t}\r\n\t}", "@Test\r\n public void testGenericArray()\r\n {\r\n Type t0 = Types.create(List.class).withType(Number.class).build();\r\n Type arrayType = Types.createGenericArrayType(t0);\r\n test(arrayType);\r\n }", "JAVATYPE [] convertArray(JAVATYPE [] oldArray, final METATYPE meta);", "@Test\n public void test13() throws Throwable {\n // Undeclared exception!\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1333,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test13\");\n try {\n IteratorUtils.arrayListIterator((Object) \"\", 978);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Argument is not an array\n //\n }\n }", "@Override\n\t\tpublic <T> T[] toArray(T[] a) {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic void visit(ArrayExpression arrayExpression) {\n\r\n\t}", "public void fixmetestObjectToStringArray() {\n\n fail(\"Array conversions not implemented yet.\");\n final int[] intArray0 = {};\n final int[] intArray1 = { 123 };\n final int[] intArray2 = { 123, 456 };\n final String[] stringArray0 = {};\n final String[] stringArray1 = { \"abc\" };\n final String[] stringArray2 = { \"abc\", \"def\" };\n\n assertEquals(\"intArray0\", null, LocaleConvertUtils.convert(intArray0));\n assertEquals(\"intArray1\", \"123\", LocaleConvertUtils.convert(intArray1));\n assertEquals(\"intArray2\", \"123\", LocaleConvertUtils.convert(intArray2));\n\n assertEquals(\"stringArray0\", null, LocaleConvertUtils.convert(stringArray0));\n assertEquals(\"stringArray1\", \"abc\", LocaleConvertUtils.convert(stringArray1));\n assertEquals(\"stringArray2\", \"abc\", LocaleConvertUtils.convert(stringArray2));\n\n }", "public void fixmetestPositiveArray() {\n\n fail(\"Array conversions not implemented yet.\");\n\n final String[] values1 = { \"10\", \"20\", \"30\" };\n Object value = LocaleConvertUtils.convert(values1, Integer.TYPE);\n final int[] shape = {};\n assertEquals(shape.getClass(), value.getClass());\n final int[] results1 = (int[]) value;\n assertEquals(results1[0], 10);\n assertEquals(results1[1], 20);\n assertEquals(results1[2], 30);\n\n final String[] values2 = { \"100\", \"200\", \"300\" };\n value = LocaleConvertUtils.convert(values2, shape.getClass());\n assertEquals(shape.getClass(), value.getClass());\n final int[] results2 = (int[]) value;\n assertEquals(results2[0], 100);\n assertEquals(results2[1], 200);\n assertEquals(results2[2], 300);\n }", "@SuppressWarnings(\"unchecked\")\r\n \tprivate Entry<K,V>[] newArray(int length) {\r\n \treturn new Entry[length];\r\n }", "E[] toArray();", "@Test\n public void testArrayCreation() {\n final String[] array = ArrayUtils.toArray(\"foo\", \"bar\");\n assertEquals(2, array.length);\n assertEquals(\"foo\", array[0]);\n assertEquals(\"bar\", array[1]);\n }", "public String[] infoToArray()//changed\r\n\t {\r\n\t\t if(this.size() == 0)\r\n\t\t {\r\n\t\t\t return new String[0];\r\n\t\t }\r\n\t\t String[] arr = new String[this.size()];\r\n\t\t int[] count = new int[1];\r\n\t\t count[0] = 0;\r\n\t\t return this.root.infoToArray(arr, count); \r\n\t }", "@Override\r\n\tpublic void visit(Array array) {\n\r\n\t}", "@Test\n public void testToArray_GenericType() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n Integer[] expResult = { 1, 2, 3, 4, 5, 6 };\n Integer[] result = instance.toArray(new Integer[] {});\n assertArrayEquals(expResult, result);\n }", "void setArrayGeneric(int paramInt)\n/* */ {\n/* 1062 */ this.length = paramInt;\n/* 1063 */ this.datums = new Datum[paramInt];\n/* 1064 */ this.pickled = null;\n/* 1065 */ this.pickledCorrect = false;\n/* */ }", "void setNullArray()\n/* */ {\n/* 1051 */ this.length = -1;\n/* 1052 */ this.elements = null;\n/* 1053 */ this.datums = null;\n/* 1054 */ this.pickled = null;\n/* 1055 */ this.pickledCorrect = false;\n/* */ }", "protected long[] _getInternalLongArray() {\n\t\treturn _value;\n\t}", "@Test\n public void testReflectionArrayCycle() {\n final Object[] objects = new Object[1];\n objects[0] = objects;\n assertEquals(\n this.toBaseString(objects) + \"[{\" + this.toBaseString(objects) + \"}]\",\n ToStringBuilder.reflectionToString(objects));\n }", "@Override\n\t\tpublic Object[] toArray() {\n\t\t\treturn null;\n\t\t}", "protected Object[] getArray(){\r\n\t \treturn array;\r\n\t }", "protected Object[][] getContents() {\n/* 447 */ return contents;\n/* */ }", "@org.junit.jupiter.api.Test\r\n void toArray() {\n mll.add(\"A\");\r\n Object [] backDoor = mll.toArray();\r\n backDoor[0] = \"HAHHA\";\r\n\r\n assertEquals(\"A\", mll.get(0));\r\n }", "private ArrayOps() {\r\n }", "@Test\n public void testIndirectEmptyArrayCreation() {\n final String[] array = ArrayUtilsTest.<String>toArrayPropagatingType();\n assertEquals(0, array.length);\n }", "public void testGetArray() {\n System.out.println(\"getArray\"); // NOI18N\n \n TypeID type = new TypeID(TypeID.Kind.PRIMITIVE, \"javacode\");// NOI18N\n PropertyValue arrayPropertyValue = PropertyValue.createValue(primitveDescritor, type, DesignComponentTest.PROPERTY1_VALUE_STRING); // NOI18N\n List<PropertyValue> array = new ArrayList();\n \n array.add(arrayPropertyValue);\n \n PropertyValue result = PropertyValue.createArray(type,array);\n \n type = type.getArrayType();\n assertEquals(type,result.getType());\n assertNotNull(result.getArray());\n }", "protected Object getKeyArray()\n/* */ {\n/* 91 */ return this.m_keyTable;\n/* */ }", "@Test\n public void testReflectionFloatArrayArray() {\n float[][] array = { { 1.0f, 2.29686f }, null, { Float.NaN } };\n final String baseString = this.toBaseString(array);\n assertEquals(baseString + \"[{{1.0,2.29686},<null>,{NaN}}]\", ToStringBuilder.reflectionToString(array));\n array = null;\n assertReflectionArray(\"<null>\", array);\n }", "@Test(expected = TileDBError.class)\n public void testLoadingEncryptedArrayNoKeyErrors() throws Exception {\n Array.create(arrayURI, schemaCreate());\n new ArraySchema(new Context(), arrayURI).close();\n }", "@Test\n public void testArrayCreationWithDifferentTypes() {\n final Number[] array = ArrayUtils.<Number>toArray(Integer.valueOf(42), Double.valueOf(Math.PI));\n assertEquals(2, array.length);\n assertEquals(Integer.valueOf(42), array[0]);\n assertEquals(Double.valueOf(Math.PI), array[1]);\n }", "HRESULT SafeArrayAccessData(SAFEARRAY psa, PointerByReference ppvData);", "@Test\r\n public void testPrimitiveArray()\r\n {\r\n test(int[].class);\r\n }", "private Object copyArrayGrow1(Object array, Class newArrayComponentType) {\n if (array != null) {\n int arrayLength = Array.getLength(array);\n Object newArray = Array.newInstance(array.getClass().getComponentType(), arrayLength + 1);\n System.arraycopy(array, 0, newArray, 0, arrayLength);\n return newArray;\n } else {\n return Array.newInstance(newArrayComponentType, 1);\n }\n }", "@Test public void getArrayShouldReturnCorrectArray() throws SQLException {\n\t\tList<String> list = new ArrayList<>();\n\t\tArray array = new ListArray(list, Types.VARCHAR);\n\t\tassertTrue(array.getArray() instanceof String[]);\n\t\tlist.add(\"test\");\n\t\tarray = new ListArray(list, Types.VARCHAR);\n\t\tassertEquals(\"test\", ((String[])array.getArray())[0]);\n\t\tlist.add(\"test2\");\n\t\tarray = new ListArray(list, Types.VARCHAR);\n\t\tassertEquals(\"test2\", ((String[])array.getArray())[1]);\n\t}", "public Object[] getOracleArray()\n/* */ throws SQLException\n/* */ {\n/* 272 */ return getOracleArray(0L, Integer.MAX_VALUE);\n/* */ }", "private ArraySetHelper() {\n\t\t// nothing\n\t}", "@Test\n void testObjectArrayLoad() throws Exception {\n GeneratedBase testClass = genTestClass(\"\" +\n \"String[] myStrings = null;\" +\n \"myStrings[0];\");\n\n assertNpeMessage(testClass::run, \"Loading object from null array - local variable in slot 8\");\n }", "@Override\n\tpublic int[] toArray() {\n\t\treturn null;\n\t}", "@Override\n\tpublic <T> T[] toArray(T[] a) {\n\t\treturn null;\n\t}", "protected abstract Object[] getData();", "@Override\r\n\tpublic <T> T[] toArray(T[] a) {\n\t\treturn null;\r\n\t}", "private Object arrayToSPLArray(String name, JSONArray jarr, Type ptype) throws Exception {\n\t\tif(l.isLoggable(TraceLevel.DEBUG)) {\n\t\t\tl.log(TraceLevel.DEBUG, \"Creating Array: \" + name);\n\t\t}\n\t\tCollectionType ctype = (CollectionType) ptype;\n\t\tint cnt=0;\n\t\tString cname = \"List: \" + name;\n\n\t\tswitch(ctype.getElementType().getMetaType()) {\n\t\tcase INT8:\n\t\tcase UINT8: \n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tbyte[] arr= new byte[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Byte)val;\n\t\t\treturn arr;\n\t\t} \n\t\tcase INT16:\n\t\tcase UINT16:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tshort[] arr= new short[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Short)val;\n\t\t\treturn arr;\n\t\t} \n\t\tcase INT32:\n\t\tcase UINT32:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tint[] arr= new int[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Integer)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase INT64:\n\t\tcase UINT64:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tlong[] arr= new long[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Long)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase BOOLEAN:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tboolean[] arr= new boolean[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Boolean)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase FLOAT32:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tfloat[] arr= new float[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Float)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase FLOAT64:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tdouble[] arr= new double[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Double)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase USTRING:\n\t\t{\n\t\t\tList<String> lst = new ArrayList<String>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((String)obj);\n\t\t\t}\n\t\t\treturn lst.toArray(new String[lst.size()]);\n\t\t} \n\n\t\tcase BSTRING:\n\t\tcase RSTRING:\n\t\t{\n\t\t\tList<RString> lst = new ArrayList<RString>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((RString)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\t\tcase TUPLE:\n\t\t{\n\t\t\tList<Tuple> lst = new ArrayList<Tuple>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((Tuple)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\t\tcase LIST:\n\t\tcase BLIST:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add(obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase SET:\n\t\tcase BSET:\n\t\t{\n\t\t\tSet<Object> lst = new HashSet<Object>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add(obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase DECIMAL32:\n\t\tcase DECIMAL64:\n\t\tcase DECIMAL128:\n\t\t{\n\t\t\tList<BigDecimal> lst = new ArrayList<BigDecimal>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((BigDecimal)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase TIMESTAMP:\n\t\t{\n\t\t\tList<Timestamp> lst = new ArrayList<Timestamp>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((Timestamp)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\n\t\t//TODO -- not yet supported types\n\t\tcase BLOB:\n\t\tcase MAP:\n\t\tcase BMAP:\n\t\tcase COMPLEX32:\n\t\tcase COMPLEX64:\n\t\tdefault:\n\t\t\tthrow new Exception(\"Unhandled array type: \" + ctype.getElementType().getMetaType());\n\t\t}\n\n\t}", "@Test\n public void test7() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1353,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test7\");\n Locale locale0 = Locale.UK;\n locale0.getDisplayVariant(locale0);\n // Undeclared exception!\n try {\n IteratorUtils.arrayIterator((Object) \"\", (-6));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Argument is not an array\n //\n }\n }", "@Override\n\tpublic Object[] toArray() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "HRESULT SafeArrayGetElement(SAFEARRAY psa, LONG[] rgIndices, Pointer pv);", "void arrays_hierarchy_may_lead_to_unsafety() {\n\r\n Object[] objectArray = new Long[1];\r\n objectArray[0] = \"boom\"; // Throws ArrayStoreException\r\n\r\n // Generic Collections are invariant (don't preserve inheritance):\r\n // i.e. if Child extends Parent, then List<Child> isn't a subtype of List<Parent>.\r\n\r\n // Using Collections, it raises issue at compile time:\r\n\r\n /**\r\n * List<Object> numbers = new ArrayList<Number>();\r\n * numbers.add(\"boom\");\r\n */\r\n\r\n }", "@Test\n public void testArrayCreationWithGeneralReturnType() {\n final Object obj = ArrayUtils.toArray(\"foo\", \"bar\");\n assertTrue(obj instanceof String[]);\n }", "@Override\n\tpublic Object[] toArray() {\n\t\treturn null;\n\t}", "public byte[] array()\r\n/* 127: */ {\r\n/* 128:156 */ ensureAccessible();\r\n/* 129:157 */ return this.array;\r\n/* 130: */ }", "@Override\r\n\tpublic <T> T[] toArray(T[] a)\r\n\t{\n\t\tthrow new UnsupportedOperationException(\"Series collection doesn't support this operation.\");\r\n\t}", "public static void main(String[] args) {\n\n\n\n int[] myArray = new int[5];\n\n Array.set(myArray,0,100); // another way as shown above --> myArray[0] = 100;\n Array.set(myArray,1,81);\n Array.set(myArray,2,64);\n Array.set(myArray,3,49);\n Array.set(myArray,4, 36);\n\n// int getValue = Array.get(myArray,3); //--> Array onune int yazmadigimiz icin object\n // farzediyor. (int) yazarak tipini belirlemeliyiz\n // bu type casting ornegidir\n int getValue = (int)Array.get(myArray,3);\n System.out.println(\"The value at index 3 is : \" + getValue);\n\n// System.out.println(Arrays.toString(myArray));\n\n /**\n * java.lang.reflect.Array -->\n * The Array class provides static methods to dynamically create and access Java arrays.\n *\n * java.util.Arrays -->\n * This class contains various methods for manipulating arrays (such as sorting and searching).\n * This class also contains a static factory that allows arrays to be viewed as lists.\n * Utility class,which contains static methods to manipulate(sort,max,min etc.) the values stored in array.\n */\n\n /**\n * getArray METHOD\n * get Array Class method = Allows you to return the value at a specific index\n * Syntax = Array.get(Object [], int index)\n */\n\n// int[] myArray = {2,4,6,8};\n// for(int i = 0; i < myArray.length; i++){\n// int storageValue =(int) Array.get(myArray,i);\n// System.out.println(\"The value at \" + i + \" index is: \" + storageValue);\n// }\n\n // similar code\n// int[] myArray = {2,4,6,8};\n// for(int i = 0; i < myArray.length; i++){\n// int storeValue = myArray[i];\n// System.out.println(\"The value at \" + i + \" index is \" + storeValue);\n// }\n\n\n\n\n\n\n\n }", "private void doubleArray()\n\t{\n\t\tT[] oldList = list;\n\t\tint oldSize = oldList.length;\n\t\t\n\t\tlist = (T[]) new Object[2 * oldSize];\n\t\t\n\t\t// copy entries from old array to new, bigger array\n\t\tfor (int index = 0; index < oldSize; index++)\n\t\t\tlist[index] = oldList[index];\n\t}", "public void testCheckArray() {\n Object[] objects = new Object[] {\"one\"};\n Util.checkArray(objects, \"test\");\n }", "public void fixArray(){\n if (size == 0 || queue.length < 1){\n return;\n }\n E[] newer = ((E[])new Comparable[queue.length]);\n\n int x = 0;\n for(Object cur : queue){\n if (cur != null){\n newer[x++] = (E)cur;\n }\n }\n\n this.queue = newer;\n this.size = x;\n\n }", "public double[] getArray(){\n\t\t\treturn anArray; //FAIL\n\t\t}", "public long[] toArray() {\n/* 406 */ long[] array = new long[(int)(this.max - this.min + 1L)];\n/* 407 */ for (int i = 0; i < array.length; i++) {\n/* 408 */ array[i] = this.min + i;\n/* */ }\n/* 410 */ return array;\n/* */ }", "@Override\n\tpublic <T> T[] toArray(T[] a) {\n\t\tthrow new UnsupportedOperationException();\n\t}", "@Test\n public void testGetArray() {\n System.out.println(\"getArrayFromString\");\n\n AbstractMethod instance = new AbstractMethodImpl();\n instance.setAccountNumber(\"1234567\");\n int[] expResult = {1, 2, 3, 4, 5, 6, 7};\n int[] result = instance.getAccountNumberArray();\n assertArrayEquals(expResult, result);\n\n }", "public void fixmetestNegativeIntegerArray() {\n\n fail(\"Array conversions not implemented yet.\");\n\n Object value;\n final int[] intArray = {};\n\n value = LocaleConvertUtils.convert((String) null, intArray.getClass());\n checkIntegerArray(value, intArray);\n value = LocaleConvertUtils.convert(\"a\", intArray.getClass());\n checkIntegerArray(value, intArray);\n value = LocaleConvertUtils.convert(\"{ a }\", intArray.getClass());\n checkIntegerArray(value, intArray);\n value = LocaleConvertUtils.convert(\"1a3\", intArray.getClass());\n checkIntegerArray(value, intArray);\n value = LocaleConvertUtils.convert(\"{ 1a3 }\", intArray.getClass());\n checkIntegerArray(value, intArray);\n value = LocaleConvertUtils.convert(\"0,1a3\", intArray.getClass());\n checkIntegerArray(value, intArray);\n value = LocaleConvertUtils.convert(\"{ 0, 1a3 }\", intArray.getClass());\n checkIntegerArray(value, intArray);\n\n }", "@Override\r\n public boolean isArray() throws Exception\r\n {\n return false;\r\n }", "public SuperArray() { \n \t_data = new Comparable[10];\n \t_lastPos = -1; //flag to indicate no lastpos yet\n \t_size = 0;\t\n }", "@Test(expected = TileDBError.class)\n public void testLoadingEncryptedArrayWrongKeyErrors() throws Exception {\n Array.create(arrayURI, schemaCreate());\n String keyString = \"0123456789abcdeF0123456789abcdeZ\";\n Config config = new Config();\n config.set(\"sm.encryption_type\", \"AES_256_GCM\");\n config.set(\"sm.encryption_key\", keyString);\n Context ctx = new Context(config);\n new ArraySchema(ctx, arrayURI).close();\n }", "@Test(expected = PathMismatchException.class)\n public void testArrayAddUniqueInArrayWithNonPrimitives() {\n JsonObject root = JsonObject.create().put(\"array\", JsonArray.create().add(JsonArray.empty()));\n ctx.bucket().upsert(JsonDocument.create(key, root));\n\n //not a primitive only array => MISMATCH\n DocumentFragment<String> fragment = DocumentFragment.create(key, \"array\", \"arrayInsert\");\n DocumentFragment<String> result = ctx.bucket().addUniqueIn(fragment, false, PersistTo.NONE, ReplicateTo.NONE);\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "public static native long GetArray(long lpjFbxArrayVector2);", "HRESULT SafeArrayPutElement(SAFEARRAY psa, LONG[] idx, Pointer pv);", "private void readArray(TypeImpl type, Attributes attrs) throws SAXParseException {\n String attrName, attrVal;\n // No entries in indexRep means not indexed\n IntVector indexRep = new IntVector();\n int size = 0;\n int id = -1;\n for (int i = 0; i < attrs.getLength(); i++) {\n attrName = attrs.getQName(i);\n attrVal = attrs.getValue(i);\n if (attrName.equals(XCASSerializer.ID_ATTR_NAME)) {\n try {\n id = Integer.parseInt(attrVal);\n } catch (NumberFormatException e) {\n throw createException(XCASParsingException.ILLEGAL_ID, attrVal);\n }\n } else if (attrName.equals(XCASSerializer.ARRAY_SIZE_ATTR)) {\n try {\n size = Integer.parseInt(attrVal);\n if (size < 0) {\n throw createException(XCASParsingException.ILLEGAL_ARRAY_SIZE, attrVal);\n }\n } catch (NumberFormatException e) {\n throw createException(XCASParsingException.INTEGER_EXPECTED, attrVal);\n }\n } else if (attrName.equals(XCASSerializer.INDEXED_ATTR_NAME)) {\n String[] arrayvals = parseArray(attrVal);\n for (int s = 0; s < arrayvals.length; s++) {\n indexRep.add(Integer.parseInt(arrayvals[s]));\n }\n } else {\n throw createException(XCASParsingException.ILLEGAL_ARRAY_ATTR, attrName);\n }\n }\n final int finalSize = size;\n TOP fs = maybeCreateWithV2Id(fsId, () -> cas.createArray(type, finalSize));\n // TOP fs = cas.createArray(type, size);\n\n FSInfo fsInfo = new FSInfo(fs, indexRep);\n if (id >= 0) {\n fsTree.put(id, fsInfo);\n } else {\n idLess.add(fsInfo);\n }\n // Hang on to those for setting array values.\n this.currentFs = fs;\n this.arrayPos = 0;\n\n this.state = ARRAY_ELE_STATE;\n }", "@Test\n public void testSetAccountNumberArray() {\n System.out.println(\"setAccountNumberArray\");\n int[] accountNumberArray = {1, 2, 3, 4, 5, 6};\n AbstractMethod instance = new AbstractMethodImpl();\n instance.setAccountNumberArray(accountNumberArray);\n int[] result = instance.getAccountNumberArray();\n for (int r : result) {\n System.out.print(r);\n }\n assertArrayEquals(accountNumberArray, result);\n\n }", "public interface ExternalArrayData{\n /**\n * Return the element at the specified index. The result must be a type that is valid in JavaScript:\n * Number, String, or Scriptable. This method will not be called unless \"index\" is in\n * range.\n */\n Object getArrayElement(int index);\n\n /**\n * Set the element at the specified index. This method will not be called unless \"index\" is in\n * range. The method must check that \"value\" is a valid type, and convert it if necessary.\n */\n void setArrayElement(int index, Object value);\n\n /**\n * Return the length of the array.\n */\n int getArrayLength();\n}", "@Test\n public void testReadProperty() {\n DoubleArrayPropertyPersistenceHandler handler = new DoubleArrayPropertyPersistenceHandler();\n\n Element propertyTag = new Element(\"anyTag\"); //$NON-NLS-1$\n Element arrayTag = new Element(\n DoubleArrayPropertyPersistenceHandler.XML_ELEMENT_DOUBLE_ARRAY);\n propertyTag.addContent(arrayTag);\n\n arrayTag.addContent(new Element(\n DoubleArrayPropertyPersistenceHandler.XML_ELEMENT_DOUBLE)\n .setAttribute(XmlConstants.XML_ATTRIBUTE_VALUE, \"1.0\")); //$NON-NLS-1$\n arrayTag.addContent(new Element(\n DoubleArrayPropertyPersistenceHandler.XML_ELEMENT_DOUBLE)\n .setAttribute(XmlConstants.XML_ATTRIBUTE_VALUE, \"2.0\")); //$NON-NLS-1$\n arrayTag.addContent(new Element(\n DoubleArrayPropertyPersistenceHandler.XML_ELEMENT_DOUBLE)\n .setAttribute(XmlConstants.XML_ATTRIBUTE_VALUE, \"3.0\")); //$NON-NLS-1$\n arrayTag.addContent(new Element(\n DoubleArrayPropertyPersistenceHandler.XML_ELEMENT_DOUBLE)\n .setAttribute(XmlConstants.XML_ATTRIBUTE_VALUE, \"4.0\")); //$NON-NLS-1$\n\n Object propertyValue = handler.readProperty(propertyTag);\n\n assertTrue(propertyValue instanceof double[]);\n\n double[] doubleArray = (double[]) propertyValue;\n\n assertEquals(4, doubleArray.length);\n assertEquals(1.0, doubleArray[0], 0.001);\n assertEquals(2.0, doubleArray[1], 0.001);\n assertEquals(3.0, doubleArray[2], 0.001);\n assertEquals(4.0, doubleArray[3], 0.001);\n }", "private void makeArrays()\n\t{\n\t\tfor (String key : sub.keySet())\n\t\t\tsub.put(key, ((List<String>) sub.get(key)).toArray(s0));\n\t\tfor (String key : attrs.keySet())\n\t\t\tattrs.put(key, ((List<String>) attrs.get(key)).toArray(s0));\n\t\tfor (String key : defs.keySet())\n\t\t\tdefs.put(key, ((List<String>) defs.get(key)).toArray(s0));\n\t\tfor (String key : smodes.keySet())\n\t\t{\n\t\t\tList<Integer> list = (List<Integer>) smodes.get(key);\n\t\t\tint[] array = new int[list.size()];\n\t\t\tfor (int i = 0; i < list.size(); i++)\n\t\t\t\tarray[i] = list.get(i);\n\t\t\tsmodes.put(key, array);\n\t\t}\n\t\tfor (String key : amodes.keySet())\n\t\t{\n\t\t\tList<Integer> list = (List<Integer>) amodes.get(key);\n\t\t\tint[] array = new int[list.size()];\n\t\t\tfor (int i = 0; i < list.size(); i++)\n\t\t\t\tarray[i] = list.get(i);\n\t\t\tamodes.put(key, array);\n\t\t}\n\t}", "@Test(expected = PathMismatchException.class)\n public void testArrayAddUniqueInNonArray() {\n DocumentFragment<String> fragment = DocumentFragment.create(key, \"sub\", \"arrayInsert\");\n DocumentFragment<String> result = ctx.bucket().addUniqueIn(fragment, false, PersistTo.NONE, ReplicateTo.NONE);\n\n assertNotNull(result);\n assertNotEquals(fragment.cas(), result.cas());\n JsonArray storedArray = ctx.bucket().get(key).content().getArray(\"array\");\n assertEquals(1, storedArray.size());\n assertEquals(\"arrayInsert\", storedArray.getString(0));\n }", "public Object[] toArray() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "@Test(timeout=300000)\n public void test1() throws Throwable {\n Object[][] objectArray0 = new Object[0][6];\n ControllerLoadViewer controllerLoadViewer0 = new ControllerLoadViewer(objectArray0);\n String[] stringArray0 = new String[1];\n stringArray0[0] = \"\";\n Object[][] objectArray1 = new Object[3][5];\n objectArray1[0] = (Object[]) stringArray0;\n // Undeclared exception!\n try { \n controllerLoadViewer0.getDataTypes(objectArray1);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // [Ljava.lang.Object; cannot be cast to [Ljava.lang.String;\n //\n assertThrownBy(\"org.objectweb.cjdbc.console.views.ControllerLoadViewer\", e);\n }\n }", "private Function1<Seq<String>, String[]> arrayFunction() {\n return new AbstractFunction1<Seq<String>, String[]>() {\n @Override\n public String[] apply(Seq<String> v1) {\n String[] array = new String[v1.size()];\n v1.copyToArray(array);\n return array;\n }\n };\n }", "private RubyArray(Ruby runtime, long length) {\n super(runtime, runtime.getArray());\n checkLength(length);\n values = new IRubyObject[(int)length];\n }", "@Test\n public void testArray()\n throws Exception\n {\n initialize();\n genericTests();\n for (int i = 0; i < 10; i++)\n {\n permutateArrays();\n genericTests();\n }\n }", "ArrayProxyValue createArrayProxyValue();", "HRESULT SafeArrayUnaccessData(SAFEARRAY psa);", "@Override\n\tpublic void VisitArrayLiteralNode(BunArrayNode Node) {\n\n\t}", "public interface ExternalArrayData\n{\n /**\n * Return the element at the specified index. The result must be a type that is valid in JavaScript:\n * Number, String, or Scriptable. This method will not be called unless \"index\" is in\n * range.\n */\n Object getArrayElement(int index);\n\n /**\n * Set the element at the specified index. This method will not be called unless \"index\" is in\n * range. The method must check that \"value\" is a valid type, and convert it if necessary.\n */\n void setArrayElement(int index, Object value);\n\n /**\n * Return the length of the array.\n */\n int getArrayLength();\n}", "IArray getArrayCurrent() throws InvalidRangeException;", "@Override\r\n\tpublic Object[] toArray()\r\n\t{\n\t\tthrow new UnsupportedOperationException(\"Series collection doesn't support this operation.\");\r\n\t}", "public void fixmetestPositiveIntegerArray() {\n\n fail(\"Array conversions not implemented yet.\");\n\n Object value;\n final int[] intArray = {};\n final int[] intArray1 = { 0 };\n final int[] intArray2 = { 0, 10 };\n\n value = LocaleConvertUtils.convert(\"{ }\", intArray.getClass());\n checkIntegerArray(value, intArray);\n\n value = LocaleConvertUtils.convert(\"0\", intArray.getClass());\n checkIntegerArray(value, intArray1);\n value = LocaleConvertUtils.convert(\" 0 \", intArray.getClass());\n checkIntegerArray(value, intArray1);\n value = LocaleConvertUtils.convert(\"{ 0 }\", intArray.getClass());\n checkIntegerArray(value, intArray1);\n\n value = LocaleConvertUtils.convert(\"0,10\", intArray.getClass());\n checkIntegerArray(value, intArray2);\n value = LocaleConvertUtils.convert(\"0 10\", intArray.getClass());\n checkIntegerArray(value, intArray2);\n value = LocaleConvertUtils.convert(\"{0,10}\", intArray.getClass());\n checkIntegerArray(value, intArray2);\n value = LocaleConvertUtils.convert(\"{0 10}\", intArray.getClass());\n checkIntegerArray(value, intArray2);\n value = LocaleConvertUtils.convert(\"{ 0, 10 }\", intArray.getClass());\n checkIntegerArray(value, intArray2);\n value = LocaleConvertUtils.convert(\"{ 0 10 }\", intArray.getClass());\n checkIntegerArray(value, intArray2);\n }", "@Test\n public void testEmptyArrayCreation() {\n final String[] array = ArrayUtils.<String>toArray();\n assertEquals(0, array.length);\n }" ]
[ "0.6309324", "0.6212759", "0.6182397", "0.6129856", "0.6087595", "0.60659355", "0.606524", "0.60391515", "0.5935499", "0.5933985", "0.58911395", "0.58816284", "0.587448", "0.58739215", "0.5871235", "0.5870011", "0.58379775", "0.582018", "0.58078617", "0.5806898", "0.5802033", "0.58012575", "0.5791868", "0.57915264", "0.5789747", "0.5781325", "0.57810724", "0.5778936", "0.5776218", "0.5771624", "0.5769701", "0.5750551", "0.57463086", "0.5735522", "0.57119", "0.5710486", "0.57085747", "0.570855", "0.5707577", "0.5696196", "0.56942683", "0.56928414", "0.5691716", "0.56825924", "0.56628823", "0.56530607", "0.5648302", "0.5645948", "0.56402653", "0.56345624", "0.56266236", "0.56248695", "0.562452", "0.5622435", "0.5618017", "0.56173897", "0.56172556", "0.56163156", "0.5614089", "0.5611212", "0.5609153", "0.5608706", "0.56016433", "0.5576528", "0.5576219", "0.556471", "0.55565643", "0.5553769", "0.55493045", "0.55454564", "0.5533852", "0.55258", "0.55250984", "0.5512195", "0.55092955", "0.55064017", "0.54941386", "0.5493545", "0.5489076", "0.5484438", "0.54814816", "0.54796094", "0.54695594", "0.54671276", "0.54617375", "0.5456084", "0.54368895", "0.54368514", "0.5436373", "0.54281384", "0.54190046", "0.54145336", "0.5409595", "0.54065526", "0.540614", "0.54045135", "0.5401424", "0.54009414", "0.5400858", "0.5399211", "0.5398353" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { rootView = inflater.inflate(R.layout.fragment_dish_profile, container, false); initView(); getProfileDish(); return rootView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
Do view model stuff
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mealComponentsViewModel = ViewModelProviders.of(this).get(MealComponentsViewModel.class); View root = inflater.inflate(R.layout.fragment_meal_components, container, false); mealComponentsViewModel.getText().observe(this, new Observer<String>() { @Override public void onChanged(@Nullable String s) { } }); // Setup the action button FloatingActionButton fab = root.findViewById(R.id.fabAddComponent); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { DialogFragment mealMaker = new MakeMealComponentDialogFragment(adapter, thisFragment); mealMaker.show(getFragmentManager(), "TAG"); } }); // Tell the user if no components exist if (ItemStorage.getInstance().components.size() < 1) { Toast.makeText(getContext(), R.string.noComponents, Toast.LENGTH_LONG) .show(); } // set up the RecyclerView RecyclerView recyclerView = root.findViewById(R.id.componentsRecycler); recyclerView.setLayoutManager(new LinearLayoutManager(getContext())); adapter = new MealComponentRecyclerViewAdapter(getContext(), this.getActivity(), this); adapter.setClickListener(this); recyclerView.setAdapter(adapter); // Add lines in between each row recyclerView.addItemDecoration(new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL)); // Add the touch helper to enable swiping ItemTouchHelper itemTouchHelper = new ItemTouchHelper(new SwipeToDeleteEditCallback(adapter)); itemTouchHelper.attachToRecyclerView(recyclerView); return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updateViewFromModel();", "@Override\n protected void initViewModel() {\n }", "void updateModelFromView();", "protected abstract void populateView(View v, T model);", "public void initView() {\n\t\t view.initView(model);\t \n\t }", "public interface MainMvpView extends MvpView {\n\n void showSchoolModel(SchoolModel schoolModel);\n void showInfo(BabyModel babyModel, TCUserModel userModel,String babyId,String userId);\n void uploadHeadImgResult(boolean isSuccess,String name);\n void showTeacherInfo(AttendenceTeacherModel teacherModel,String qrCode,String teacherId, String schoolId);\n void onError(String msg);\n void toUpdate(AppVersionModel model);\n void inputUUIDClick(String uuid);\n void updateStateSuccess();\n void updateError();\n}", "private void observableViewModel() {\n }", "@Override\n\tpublic void execute() {\n\t\tSystem.out.println(\"View1Model execute() 호출\");\n\t}", "public abstract V getViewModel();", "public abstract V getViewModel();", "public abstract V getViewModel();", "public interface View\n{\n void refresh(ModelData modelData);\n\n void setController(Controller controller);\n}", "public RunMVC() {\n\n\t\t//cria o Modelo e a Visao\n\t\tModel myModel \t= new Model();\n\t\tView myView \t= new View();\n\t\t//View outraView \t= new View();\n\t\tOutraView outraView \t= new OutraView();\n\n\t\t//avisa o modelo que a visao existe \n\t\tmyModel.addPropertyChangeListener(myView);\n\t\tmyModel.addPropertyChangeListener(outraView);\n\n\t\tController myController = new Controller();\n\t\tmyController.addModel(myModel);\n\t\t//myController.addView(myView);\n\t\t//myController.addView(outraView);\n\t\tmyController.initModel(start_value);\n\n\t\t//tell View about Controller \n\t\tmyView.addController(myController);\n\t\toutraView.addController(myController);\n\t\t\n\n\t}", "public abstract void viewRun();", "public interface MainView extends BaseView{\n\n void addMoreMoviesToTheList(List<MovieInfoModel> movieInfoModelList);\n void showMovieList(List<MovieInfoModel> movieInfoModelList);\n void resetPageNumberToDefault();\n void showNoMovieInfo();\n\n}", "protected void prepareModel() {\n model();\n }", "private void viewInit() {\n }", "@Override\n\tpublic void view() {\n\t\t\n\t}", "private void populateViewCollections() {\n\n\t}", "void onModelChange();", "protected abstract void setupMvpView();", "@Override\r\n\tpublic void setModel() {\n\t\tnew UpUI(context).execute();\r\n\t}", "@Override\r\n\tpublic void setModel() {\n\t}", "@Override\n\tpublic void InitView() {\n\t\t\n\t}", "public interface MemberView extends MvpView {\n\n void onMemberIndexSuccess(MemberIndex data);\n\n void onFinancialRecordsSuccess(FinanceRecords data);\n\n void onWithdrawInfoSuccess(BaseBean<Withdraw> data);\n\n void onCouponNumSuccess(Coupon data);\n}", "public interface NewBookView extends BaseView{\n void initData(List<NewBookBean> data);\n void showLoading();\n void showLoaded();\n}", "public interface View {\n void setupViews();\n void onClickMonth();\n void onClickYear();\n void onSuccess(RevenueModel body);\n void onSuccessWithdrawl(BaseResponse body);\n void onFailure();\n void onFailureWithdrawl();\n }", "public interface CountryView extends MvpView {\n /**\n * show loading status\n * @param loading loading status should be visible or not\n */\n void showLoading(boolean loading);\n\n /**\n * if there is an error,show the related message about the error\n * @param errorMessage\n */\n void showError(String errorMessage);\n\n /**\n * show the facts of country\n * @param facts\n */\n void showFacts(List<Fact> facts);\n\n /**\n * show the title of the country\n * @param title\n */\n void showTitle(String title);\n\n}", "@Override\n public void propertyChange(PropertyChangeEvent evt) {\n modelToView(handle);\n }", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "void view();", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "void render(IViewModel model);", "@Override\r\n\tprotected void initViews() {\n\t\t\r\n\t}", "private void initViewModel() {\n viewmodel = new ViewModelProvider(getActivity()).get(ScannerViewModel.class);\n viewmodel.createList();\n }", "public interface IMainView extends MvpView {\n\n void setRecordStatus();\n\n void releaseRecordStatus();\n\n void updateMsgList(MsgBean msgBean);\n\n void showMsg(String msg);\n\n\n}", "protected void viewSetup() {\n\t\t// TODO Auto-generated method stub\n\n\t}", "@Override\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) {\n\t\tSystem.out.println(\"View1Model execute(HttpServletRequest request, HttpServletResponse response) 호출\");\n\t}", "DataModel getDataModel ();", "public interface ContractsView extends MvpView {\n void showContracts(LoadMoreWrapper wrapper,List<Contact> contacts);\n void showPayContactOrder(PayOrderContactDto payOrderContactDto);\n}", "public interface StockTransferByAllocationView extends MvpView {\n\n void initViewPage(List<StockTransferWithAllocationSnBo> stockTransferWithAllocationSnBoList,int originDataSize, boolean isRefresh,int position);\n\n void dealPosition(List<StockTransferWithAllocationSnBo> stockTransferWithAllocationSnBo, int position,int size);\n\n}", "public interface IOrderView extends MvpView {\n void showView(List<Order> orders);\n void addOrder();\n}", "public abstract void modelStructureChanged();", "public void buildModel() {\n }", "public interface MainView {\n void showProgress();\n void hideProgress();\n void setSuccess();\n void setErorrCustomerId();\n void setEmptyCustomerId();\n}", "public void run() {\n if (view.getPauseState() && model.getSelectedNote() != null) {\n this.model.removeNote(model.getSelectedNote());\n this.model.setSelectedNote(null);\n }\n\n view.setAllNotes(model.getMusic());\n view.setLength(model.getDuration());\n view.setTone(model.getTone(model.getNotes()));\n view.setTempo(model.getTempo());\n }", "protected void modelChanged() {\n // create a view hierarchy\n ViewFactory f = rootView.getViewFactory();\n Document doc = editor.getDocument();\n Element elem = doc.getDefaultRootElement();\n setView(f.create(elem));\n }", "public interface WorkListMvpView extends MvpView {\n void showSuccess();\n\n void showFailure();\n}", "public void initView(){}", "private void initViewModel() {\n ViewModelFactory viewModelFactoryGo4Lunch = DI.getViewModelFactory();\n appViewModel = ViewModelProviders.of(this, viewModelFactoryGo4Lunch).get(AppViewModel.class);\n getRestaurantList();\n }", "public interface InformationView extends BaseView {\n String getPage();\n String getPagecount();\n void getDoctorNoticeList(ResultModel<List<InfoUserNoticeListBean>> model);\n\n String getUserUuid();\n void getInformationList(ResultModel<InformationBean> model);\n\n\n}", "public interface MovieDetailView extends MvpView {\n void bindCastMembers(CreditsResponse movieResponse);\n\n void bindMovieDetails(MovieDetails movieResponse);\n\n void bindRecommendations(MovieResponse movieResponse);\n}", "private void configureViewModel(){\n viewModel = ViewModelProviders.of(this, viewModelFactory).get(SearchViewModel.class);\n\n //viewModel.init(binding.etSearchQuery.getText().toString());\n\n viewModel.getSearchResults().observe(this, searchResponse -> {\n\n // Update UI here\n\n if(searchResponse != null && searchResponse.getSearchResults() != null && searchResponse.getSearchResults().size() > 0) {\n\n SearchResultRvAdapter rvAdapter = new SearchResultRvAdapter(searchResponse.getSearchResults());\n binding.rvRepos.setAdapter(rvAdapter);\n }\n\n });\n }", "@Override\n\tprotected void initView()\n\t{\n\n\t}", "@Override\n \t\t\t\tpublic void doModelPerspective() {\n \n \t\t\t\t}", "@Override\n\tpublic void viewItem() {\n\t\t\n\t}", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "@Override\n protected void initView() {\n }", "@Override\n protected void initView() {\n }", "public interface ListFrgView extends BaseView {\n void getDpSuccess(List<Map<String, Object>> testModel);\n}", "@Override\n protected void initViewSetup() {\n }", "public interface OrdersMvpView extends MvpView {\n\n void showOrderEmptyView();\n\n void showOrderErrorView(String msg);\n\n void showNoMoreOrdersView();\n\n void onRefreshOrdersSuccess(List<Order> orders);\n\n void onLoadMoreOrdersSuccess(List<Order> orders);\n\n void onGetOrdersFailed(String msg);\n\n void hideLoading();\n\n}", "public interface ArticleView {\n void setArticleInfo(ArticleInfo articleInfo);\n void showLoading();\n void hideLoading();\n void showError();\n}", "public interface MainView extends BaseView{\n\n void updateLoadLocation(String result);\n}", "private void setUpViews() {\n\n updateFooterCarInfo();\n updateFooterUsrInfo();\n\n\n setResultActionListener(new ResultActionListener() {\n @Override\n public void onResultAction(AppService.ActionType actionType) {\n if (ModelManager.getInstance().getGlobalInfo() != null) {\n GlobalInfo globalInfo = ModelManager.getInstance().getGlobalInfo();\n\n switch (actionType) {\n case CarInfo:\n updateFooterCarInfo();\n break;\n case UsrInfo:\n updateFooterUsrInfo();\n break;\n case Charger:\n updateChargeStationList();\n break;\n }\n }\n }\n });\n }", "@Override\n public void Create() {\n initView();\n initData();\n }", "MainPresenter(MainContract.View view) {\n this.view = view;\n model = new AmicableModel();\n }", "@Override\n public void prepareView() {\n }", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void updateView(List<Pays> models) {\n\t}", "public void runModel(){\n\t\tcurrentView.getDynamicModelView().getModel().setProgressMonitor(progressMonitor);\r\n\t\tnew Thread(currentView.getDynamicModelView().getModel()).start();\r\n\r\n\t\tsetStatusBarText(\"Ready\");\r\n\t}", "public interface IParkingListMvpView extends MvpView {\n\n void onFetchDataCompleted(List<ParkingModel> parkingModels);\n}", "private void initView() {\n\n }", "public interface OwnEventsView extends BaseView {\n\n void adaptEventsList(List<EventModel> eventModelsList);\n\n void viewEvent(EventModel eventModel);\n\n void showViewRefreshing();\n\n void hideViewRefreshing();\n\n void hideViewEmpty();\n\n void showViewEmpty();\n\n}", "public abstract VT getItemViewModel(ViewDataBinding viewDataBinding);", "public void run( Model modelo, View vista){ // el controlador sirve para comunicarse con las interfaces\r\n \r\n //llama al metodo getGreeting del objeto modelo\r\n \r\n String saludo = modelo.getGreeting(); // con este metodo obtengo el saludo que tengo en la clase model implementation\r\n \r\n //llama al metodo showGreeting del objeton View para mostrar el saludo que recibe del metodo showGreeting de ModelImplementation\r\n \r\n vista.showGreeting(saludo); \r\n \r\n }", "interface PostsView extends BaseView {\n\n void setPosts(List<Post> posts);\n\n void showRetryMessage(Throwable throwable);\n\n void showError(Throwable throwable);\n\n void showProgress();\n\n void hideProgress();\n\n}", "public interface MainView extends BaseView {\n\n void showProgress();\n void hideProgress();\n void setUserInfo(User user);\n void error(String error);\n}", "private void observeViewModel() {\r\n mViewModel.setListener(this);\r\n mViewModel.getLoginFormVisibility().observe(this, visibility -> mLoginFormView.setVisibility(visibility));\r\n mViewModel.getLoginViewVisibility().observe(this, visibility -> mLoginView.setVisibility(visibility));\r\n mViewModel.getProfileVisibility().observe(this, visibility -> mProfileView.setVisibility(visibility));\r\n mViewModel.getProgressBarVisibility().observe(this, visibility -> mLoginProgressBar.setVisibility(visibility));\r\n mViewModel.getErrorMessage().observe(this, this::onErrorChanged);\r\n mViewModel.getUsernameError().observe(this, message -> mUsernameInput.setError(message));\r\n mViewModel.getTokenError().observe(this, message -> mTokenInput.setError(message));\r\n mViewModel.getUser().observe(this, this::onUserLoaded);\r\n }", "@Override\n\tpublic void initView() {\n\t\t\n\t}", "public interface MVP {\n interface ModelImpl{\n public void retrievePersonas();\n public void updateEsFavoritoPersona(Persona persona);\n }\n\n interface PresenterImpl{\n public void retrievePersona(Bundle savedInstanceState);\n public void updateEsFavoritoPersona(Persona persona);\n public void showToast(String mensaje);\n public void showProgressBar(boolean status);\n public void setView(MVP.ViewImpl view);\n public Context getContext();\n public void updateListaRecycler(ArrayList<Persona> personas);\n public void updateItemRecycler(Persona persona);\n public ArrayList<Persona> getPersonas();\n }\n\n interface ViewImpl{\n final String PERSONAS_KEY = \"personas\";\n\n public void showToast(String mensaje);\n public void showProgressBar(int visibilidad);\n public void updateListaRecycler();\n public void updateItemRecycler(int posicion);\n }\n}", "public interface AboutApplicationView extends MvpView {\n void getAboutActicationContent(List<AboutApplicationModel> aboutApplicationModel);\n void getAbountAplicationContentError(String error);\n}", "protected abstract void bindingView();", "private void initViews() {\n\n\t}", "@Override\n public void Create() {\n\n initView();\n }", "private View() {}", "public interface MainView extends View{\n\n void toggleLoading(boolean loading);\n\n void showProductNames(List<String> productNames);\n\n void showAppleNames(List<String> appleNames);\n\n void showCurrentProduct(Product product);\n\n void showCurrentAppleProduct(AppleProduct appleProduct);\n\n void showSpecs(List<ProductTechSpecs> specs);\n}", "private void initViewModel() {\n //Init viewModel\n stockDisplayViewModel = ViewModelProviders.of(getActivity()).get(StockDisplayViewModel.class);\n }", "@Override\n public void propertyChange(PropertyChangeEvent evt) {\n requestProcessor.post(new Runnable() {\n @Override\n public void run() {\n initModels();\n }\n });\n }", "@Override\n protected void initModel() {\n bannerModel = new BannerModel();\n// homeSousuoModel = new Home\n\n// bannerModel = new BannerModel();\n// homeSousuoModel = new HomeSousuoModel();\n// izxListModelBack = new\n }", "public void buildModel(){\r\n\t\t\r\n\t\tsuper.buildModel();\r\n\t\t\r\n\t}", "public void initViews(){\n }", "void showTodoView();", "@Override\n\tprotected void refreshView() {\n\t\t\n\t}", "public interface HomePageView extends BaseView{\n Context getContext();\n\n void getSummary(SummaryBean.Data repest);\n\n void getUserinfo(UserInfoBean.Data userInfo);\n\n}", "public void setUpViewModel() {\n final FavoriteViewModel viewModel = ViewModelProviders.of(this).get(FavoriteViewModel.class);\n viewModel.getFavorites().observe(this, new Observer<List<NoteEntry>>() {\n @Override\n public void onChanged(@Nullable List<NoteEntry> noteEntries) {\n mAdapter.setNotes(noteEntries);\n toggleEmptyView(noteEntries);\n }\n });\n }", "public interface DailyView {\n void onLoadDaily(List<DailyModel> daily);\n}" ]
[ "0.7108107", "0.7075142", "0.6962075", "0.67862034", "0.6596543", "0.657364", "0.65365565", "0.6435074", "0.6420781", "0.6420781", "0.6420781", "0.63674647", "0.6364288", "0.63175863", "0.62494195", "0.6246973", "0.621913", "0.6207299", "0.6149517", "0.6140969", "0.61366516", "0.6127794", "0.6119631", "0.609832", "0.6080045", "0.60718274", "0.6067747", "0.6056599", "0.60450333", "0.6041833", "0.6041833", "0.60376877", "0.60295373", "0.60295373", "0.6027195", "0.5993805", "0.5988478", "0.5974368", "0.59620744", "0.59614545", "0.5958648", "0.59539205", "0.5953239", "0.5946808", "0.5942206", "0.5941058", "0.59336513", "0.5931788", "0.5930876", "0.5925811", "0.59240776", "0.59228754", "0.59200543", "0.59187394", "0.5913262", "0.590909", "0.5904604", "0.59023666", "0.58893484", "0.58893484", "0.58853024", "0.58853024", "0.5882367", "0.5881208", "0.58786243", "0.58764553", "0.58753645", "0.5873247", "0.5873116", "0.5862522", "0.5855022", "0.5842458", "0.5842458", "0.58392113", "0.5822885", "0.5821533", "0.58177924", "0.5810362", "0.58102417", "0.58026135", "0.5800977", "0.5796742", "0.57919234", "0.5786343", "0.57823014", "0.57807523", "0.57784545", "0.5776522", "0.5776063", "0.5771318", "0.5762122", "0.57599175", "0.57583576", "0.5757362", "0.57546896", "0.5744509", "0.5743772", "0.5742234", "0.5741751", "0.5741248", "0.5740571" ]
0.0
-1
/ Callback for creating component modifying dialog
public void editComponent(int position){ DialogFragment mealMaker = new MakeMealComponentDialogFragment(adapter.getItem(position), position, this); mealMaker.show(getFragmentManager(), "TAG"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract JDialog createDialog();", "public abstract Dialog createDialog(DialogDescriptor descriptor);", "void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}", "public NewPropertyTypeDialog(JFrame parent) {\r\n super(parent, \"New Property Type\", true);\r\n\r\n JPanel border = new JPanel();\r\n border.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));\r\n this.getContentPane().setLayout(new BorderLayout(8, 8));\r\n this.getContentPane().add(border, BorderLayout.CENTER);\r\n\r\n this.cmbTypes = new JComboBox<String>(AnimationProperties.getAllPropertyTypes());\r\n this.cmbTypes.setPreferredSize(new Dimension(250, this.cmbTypes\r\n .getMinimumSize().height));\r\n this.cmbTypes.setMaximumSize(new Dimension(Integer.MAX_VALUE, this.cmbTypes\r\n .getMinimumSize().height));\r\n this.cmbTypes.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n this.cmbTypes.setActionCommand(\"cmbTypes\");\r\n this.cmbTypes.addActionListener(this);\r\n\r\n this.txtName = new JTextField();\r\n this.txtName.setText(\"\");\r\n this.name = \"\";\r\n this.txtName.setPreferredSize(new Dimension(250, this.txtName\r\n .getMinimumSize().height));\r\n this.txtName.setMaximumSize(new Dimension(Integer.MAX_VALUE, this.txtName\r\n .getMinimumSize().height));\r\n this.txtName.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n\r\n border.setLayout(new BoxLayout(border, BoxLayout.PAGE_AXIS));\r\n JLabel lblType = new JLabel(\"Chose a Property Type:\");\r\n border.add(lblType);\r\n border.add(Box.createRigidArea(new Dimension(0, 4)));\r\n border.add(this.cmbTypes);\r\n border.add(Box.createRigidArea(new Dimension(0, 10)));\r\n JLabel lblName = new JLabel(\"Enter a Name:\");\r\n border.add(lblName);\r\n border.add(Box.createRigidArea(new Dimension(0, 4)));\r\n border.add(this.txtName);\r\n border.add(Box.createRigidArea(new Dimension(0, 16)));\r\n\r\n JPanel pBut = new JPanel();\r\n pBut.setLayout(new BoxLayout(pBut, BoxLayout.LINE_AXIS));\r\n pBut.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n pBut.add(Box.createHorizontalGlue());\r\n\r\n JButton btnCancel = new JButton(\"Cancel\");\r\n btnCancel.setActionCommand(\"cancel\");\r\n btnCancel.addActionListener(this);\r\n pBut.add(btnCancel);\r\n pBut.add(Box.createRigidArea(new Dimension(8, 0)));\r\n\r\n JButton btnOK = new JButton(\"OK\");\r\n btnOK.setActionCommand(\"ok\");\r\n btnOK.addActionListener(this);\r\n pBut.add(btnOK);\r\n\r\n border.add(pBut, BorderLayout.SOUTH);\r\n this.getRootPane().setDefaultButton(btnOK);\r\n this.txtName.requestFocus();\r\n this.pack();\r\n }", "public static JDialog createDialog(JFrame owner) {\n PlatformInfoPanel panel = new PlatformInfoPanel();\n JDialog dialog = new JDialog(owner, ResourceManager.getResource(PlatformInfoPanel.class, \"Dialog_title\"));\n dialog.getContentPane().add(panel);\n dialog.setSize(panel.getWidth() + 10, panel.getHeight() + 30);\n return dialog;\n}", "public abstract void initDialog();", "@Override\r\n\tpublic void createControl(Composite parent) {\n\t\tinitializeDialogUnits(parent);\r\n\r\n\t\tint sectionStyle = Section.TITLE_BAR | Section.CLIENT_INDENT\r\n\t\t\t\t| Section.EXPANDED;\r\n\t\tSection section = toolkit.createSection(parent, sectionStyle);\r\n\t\tsection.setText(\"Bind all parameters to values\");\r\n\t\tsection.setLayout(new GridLayout());\r\n\t\tComposite comp = toolkit.createComposite(section);\r\n\t\tcomp.setLayout(new GridLayout(2, false));\r\n\r\n\t\tcomp.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL\r\n\t\t\t\t| GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));\r\n\t\tsection.setClient(comp);\r\n\t\tselectionLabel = toolkit.createLabel(comp, \"\");\r\n\t\tGridData gridData = new GridData(GridData.VERTICAL_ALIGN_FILL\r\n\t\t\t\t| GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);\r\n\t\tgridData.horizontalSpan = 2;\r\n\t\tselectionLabel.setLayoutData(gridData);\r\n\r\n\t\tmainComp = comp;\r\n\t\t// PatternToProtocolExportWizard wizard =\r\n\t\t// (PatternToProtocolExportWizard) this\r\n\t\t// .getWizard();\r\n\t\t// assume there are not more than 10 parameters\r\n\t\tint max = 10;\r\n\t\t/*\r\n\t\t * for(CoordinationPattern pattern : wizard.getPatternList()) { int\r\n\t\t * parametersize = pattern.getPatternParameters().size();\r\n\t\t * if(parametersize > max) { max = parametersize; } }\r\n\t\t */\r\n\r\n\t\tif (max > Integer.MIN_VALUE) {\r\n\t\t\tfor (int i = 0; i < max; i++) {\r\n\t\t\t\tLabel l = toolkit.createLabel(mainComp, \"\");\r\n\t\t\t\tl.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL\r\n\t\t\t\t\t\t| GridData.HORIZONTAL_ALIGN_FILL\r\n\t\t\t\t\t\t| GridData.GRAB_HORIZONTAL));\r\n\t\t\t\tText t = toolkit.createText(mainComp, \"\");\r\n\r\n\t\t\t\tt.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL\r\n\t\t\t\t\t\t| GridData.HORIZONTAL_ALIGN_FILL\r\n\t\t\t\t\t\t| GridData.GRAB_HORIZONTAL));\r\n\t\t\t\tl.setVisible(true);\r\n\t\t\t\tt.setVisible(true);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tthis.setControl(section);\r\n\r\n\t}", "@Override\r\n\tprotected Control createDialogArea(Composite parent) {\n\t\tComposite container = (Composite) super.createDialogArea(parent);\r\n\t\tGridData dGrid = new GridData();\r\n\t\tdGrid.horizontalSpan = 180;\r\n\t\tdGrid.horizontalAlignment = GridData.FILL;\r\n\t\tcontainer.setLayoutData(dGrid);\r\n\t\t\r\n\t\tnameLabel = new Label(container,SWT.LEFT);\r\n\t\tnameLabel = new Label(container,SWT.LEFT);\r\n\t\tString labelText = \"Most of the features for SimplifIDE require knowledge of the project structure.\\r\\n\";\r\n\t\tlabelText += \"Currently you are editting a file outside of the project where many features will not work properly.\\r\\n\";\r\n\t\tlabelText += \"Instructions for setting up your project can be found at http://simplifide.com/html2/project_structure/simplifide_structure.htm, or\\r\\n\";\r\n\t\tlabelText += \"for a simple project only containing rtl files at http://simplifide.com/html2/getting_started/simple_suite.htm.\\r\\n\";\r\n\t\tnameLabel.setText(labelText);\r\n\t\t\r\n\t\tthis.ONESHOT = true;\r\n\t\t\r\n\t\treturn container;\r\n\t}", "private void init() {\n \n dialog = new JDialog(this.owner, charField.getName() + \" Post Composition\");\n compFieldPanel = new FieldPanel(false,false, null, this.selectionManager, this.editManager, null); // (searchParams)?\n //compFieldPanel.setSearchParams(searchParams);\n \n // MAIN GENUS TERM\n genusField = CharFieldGui.makePostCompTermList(charField,\"Genus\",minCompChars);\n genusField.setSelectionManager(this.selectionManager); // ??\n //genusField.setListSelectionModel(this.selectionModel);\n compFieldPanel.addCharFieldGuiToPanel(genusField);\n\n // REL-DIFF - put in 1 differentia\n addRelDiffGui();\n\n setGuiFromSelectedModel();\n\n // override FieldPanel preferred size which will set window size\n compFieldPanel.setPreferredSize(null);//new Dimension(700,160));\n dialog.add(compFieldPanel);\n addButtons();\n dialog.pack();\n dialog.setLocationRelativeTo(owner);\n dialog.setVisible(true);\n\n compCharChangeListener = new CompCharChangeListener();\n this.editManager.addCharChangeListener(compCharChangeListener);\n compCharSelectListener = new CompCharSelectListener();\n this.selectionModel.addListSelectionListener(compCharSelectListener);\n }", "private void createFrame(){\n JPanel jPanelID = new JPanel();\n jPanelID.setLayout(new GridBagLayout());\n JLabel labelText = new JLabel(this.dialogName);\n labelText.setHorizontalAlignment(JLabel.CENTER);\n AddComponent.add(jPanelID,labelText, 0, 0, 2, 1);\n for (int field = 0; field < labelString.length; field++) {\n labelText = new JLabel(labelString[field]);\n AddComponent.add(jPanelID, labelText, 0, field + 1, 1, 1);\n AddComponent.add(jPanelID, fieldID.get(labelString[field]), 1, field + 1, 1, 1);\n }\n int offset = labelString.length + 1;\n labelText = new JLabel(DATE_OF_BIRTH);\n AddComponent.add(jPanelID, labelText, 0, offset, 1, 1);\n AddComponent.add(jPanelID, jDateChooser, 1, offset, 1, 1);\n offset++;\n labelText = new JLabel(GROUP);\n AddComponent.add(jPanelID, labelText, 0, offset, 1, 1);\n AddComponent.add(jPanelID, group, 1, offset, 1, 1);\n dialog.add(jPanelID, BorderLayout.NORTH);\n JButton okButton = new JButton(dialogName);\n okButton.addActionListener(actionEvent -> checkAndSave());\n dialog.add(okButton, BorderLayout.SOUTH);\n }", "private void initDialog() {\n }", "private void postInitComponents(){ \r\n dlgAwardUploadDoc = new CoeusDlgWindow(mdiForm);\r\n dlgAwardUploadDoc.setResizable(false);\r\n dlgAwardUploadDoc.setModal(true);\r\n dlgAwardUploadDoc.getContentPane().add(awardAddDocumentForm);\r\n dlgAwardUploadDoc.setTitle(\"Add Document\");\r\n if(this.functionType == 'M'){\r\n dlgAwardUploadDoc.setTitle(\"Modify Document\");\r\n }\r\n dlgAwardUploadDoc.setFont(CoeusFontFactory.getLabelFont());\r\n dlgAwardUploadDoc.setSize(470, 150);\r\n Dimension screenSize;\r\n Dimension dlgSize;\r\n screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n dlgSize = dlgAwardUploadDoc.getSize();\r\n dlgAwardUploadDoc.setLocation(screenSize.width / 2 - (dlgSize.width / 2),\r\n screenSize.height / 2 - (dlgSize.height / 2));\r\n \r\n dlgAwardUploadDoc.addComponentListener(\r\n new ComponentAdapter(){\r\n public void componentShown(ComponentEvent e){\r\n try{\r\n requestDefaultFocusToComp();\r\n }catch(CoeusException ce){\r\n ce.printStackTrace();\r\n }\r\n }\r\n });\r\n \r\n dlgAwardUploadDoc.setDefaultCloseOperation(CoeusDlgWindow.DO_NOTHING_ON_CLOSE);\r\n dlgAwardUploadDoc.addWindowListener(new WindowAdapter(){\r\n public void windowClosing(WindowEvent we){\r\n try{\r\n dataValuesChanged();\r\n if(dataChanged){\r\n performCloseAction();\r\n }else{\r\n dlgAwardUploadDoc.dispose();\r\n } \r\n }catch(Exception ce){\r\n ce.printStackTrace();\r\n }\r\n }\r\n });\r\n \r\n dlgAwardUploadDoc.addEscapeKeyListener(new AbstractAction(\"escPressed\"){\r\n public void actionPerformed(ActionEvent ae){\r\n try{\r\n dataValuesChanged(); \r\n if(dataChanged){\r\n performCloseAction();\r\n }else{\r\n dlgAwardUploadDoc.dispose();\r\n } \r\n }catch(Exception ce){\r\n ce.printStackTrace();\r\n }\r\n }\r\n });\r\n queryEngine = QueryEngine.getInstance();\r\n CoeusVector cvAwardDocTypes = null;\r\n CoeusVector newAwardDocTypes = new CoeusVector();\r\n try{\r\n cvAwardDocTypes = queryEngine.getDetails(queryKey, KeyConstants.AWARD_DOCUMENT_TYPES);\r\n if(this.functionType == TypeConstants.ADD_MODE ){\r\n newAwardDocTypes.add(\"\");\r\n }\r\n newAwardDocTypes.addAll(cvAwardDocTypes);\r\n awardAddDocumentForm.cmbDocumentType.setModel(new DefaultComboBoxModel(newAwardDocTypes));\r\n }catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n if(this.functionType == TypeConstants.MODIFY_MODE ){\r\n if (awardDocumentBean != null){\r\n awardAddDocumentForm.txtDescription.setText(awardDocumentBean.getDescription());\r\n awardAddDocumentForm.txtFileName.setText(awardDocumentBean.getFileName());\r\n awardAddDocumentForm.cmbDocumentType.setSelectedIndex(getDocumentTypeCodeIndex(cvAwardDocTypes));\r\n }\r\n }\r\n }", "public PropertyCustomEditorPanel(Component client, JDialog dialog)\n {\n initComponents();\n\n this.dialog = dialog;\n\n panel_clientArea.add(client, BorderLayout.CENTER);\n }", "private void initDialog() {\n Window subWindow = new Window(\"Sub-window\");\n \n FormLayout nameLayout = new FormLayout();\n TextField code = new TextField(\"Code\");\n code.setPlaceholder(\"Code\");\n \n TextField description = new TextField(\"Description\");\n description.setPlaceholder(\"Description\");\n \n Button confirm = new Button(\"Save\");\n confirm.addClickListener(listener -> insertRole(code.getValue(), description.getValue()));\n\n nameLayout.addComponent(code);\n nameLayout.addComponent(description);\n nameLayout.addComponent(confirm);\n \n subWindow.setContent(nameLayout);\n \n // Center it in the browser window\n subWindow.center();\n\n // Open it in the UI\n UI.getCurrent().addWindow(subWindow);\n\t}", "public JDialogParticleAnalysisNew() { }", "private void handleComponentOption(MouseEvent e) {\n System.out.println(\"pressed button!\");\n List<String> bothNames = Arrays.asList(componentOptions.getSelectedItem().toString().split(\" \"));\n String longName = bothNames.get(1);\n try {\n\n Class swingClass = Class.forName(longName.substring(1, longName.length() - 1));\n JComponent component;\n if (!modifyTextArea(swingClass)) {\n component = (JComponent) swingClass.newInstance();\n component.setBounds(0, 0, 400, 400);\n designPanel.add(component);\n } else {\n Constructor ctor = swingClass.getConstructor(String.class);\n component = (JComponent) ctor.newInstance(text.getText());\n component.setBounds(e.getX(), e.getY(), 200, 200);\n designPanel.add(component);\n }\n\n } catch (Exception ex) {\n System.err.println(\"Something went wrong!\");\n ex.printStackTrace();\n }\n }", "protected void createDialogSize ()\n {\n }", "@Override\r\n protected Control createDialogArea(Composite parent) {\r\n Composite area = (Composite) super.createDialogArea(parent);\r\n container = createContainer(area);\r\n createField(container);\r\n return area;\r\n }", "private AssignFSADialog() {\r\n super(Hub.getMainWindow(), Hub.string(\"TD_assignFSATitle\"));\r\n addWindowListener(new WindowAdapter() {\r\n @Override\r\n public void windowClosing(WindowEvent e) {\r\n onEscapeEvent();\r\n }\r\n });\r\n this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);\r\n this.setMinimumSize(new Dimension(300, 10));\r\n\r\n Box mainBox = Box.createHorizontalBox();\r\n mainBox.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));\r\n Box newBox = Box.createVerticalBox();\r\n newBox.add(new JLabel(\" \"));\r\n newBox.add(new JButton(new NewFSAAction()));\r\n mainBox.add(newBox);\r\n\r\n mainBox.add(Box.createRigidArea(new Dimension(5, 0)));\r\n\r\n openModelsCombo = new JComboBox();\r\n openModelsCombo.setRenderer(new JLabelListRenderer());\r\n Box modelsBox = Box.createVerticalBox();\r\n Box titleBox = Box.createHorizontalBox();\r\n titleBox.add(new JLabel(Hub.string(\"TD_openModels\")));\r\n titleBox.add(Box.createHorizontalGlue());\r\n modelsBox.add(titleBox);\r\n modelsBox.add(openModelsCombo);\r\n mainBox.add(modelsBox);\r\n\r\n mainBox.add(Box.createRigidArea(new Dimension(5, 0)));\r\n\r\n templatesCombo = new JComboBox();\r\n templatesCombo.setRenderer(new JLabelListRenderer());\r\n Box templatesBox = Box.createVerticalBox();\r\n titleBox = Box.createHorizontalBox();\r\n titleBox.add(new JLabel(Hub.string(\"TD_templates\")));\r\n titleBox.add(Box.createHorizontalGlue());\r\n templatesBox.add(titleBox);\r\n templatesBox.add(templatesCombo);\r\n mainBox.add(templatesBox);\r\n\r\n getContentPane().add(mainBox);\r\n\r\n }", "public PaletteFloatableDialog(java.awt.Frame parent, final Controller controller, boolean modal) {\n super(parent, modal);\n //setUndecorated(true);\n initComponents();\n \n \n this.resizeUndecoratedDecorator = new ResizeUndecoratedDecorator(this);\n this.controller = controller;\n \n \n dureePanel.addListener(new ActionListener() {\n\n public void actionPerformed(ActionEvent e) {\n controller.dureeEntreeTraiter(dureePanel.getDuree());\n \n }\n });\n \n \n \n \n alterationPanel.addListener(new ActionListener() {\n\n private void alterer(Hauteur.Alteration alteration)\n {\n Histoire histoire = controller.getHistoire();\n\n if(controller.isSelection())\n //s'il y a une sélection, on l'altère\n {\n histoire.executer(\n new PartitionActionSelectionAlterer(\n controller.getSelection(),\n alteration));\n controller.calculerModificationSelection();\n controller.repaint();\n }\n else if(controller.getCurseurSouris().isSurNote())\n //si le curseur est sous une note, on l'altère\n {\n histoire.executer(new PartitionActionNoteAlterer(\n controller.getCurseurSouris().getNote(), alteration));\n controller.getPartitionVue().miseEnPageCalculer(controller.getCurseurSouris().getNote().getDebutMoment());\n controller.repaint();\n }\n else\n controller.setAlterationCourante(alteration);\n\n }\n \n \n \n public void actionPerformed(ActionEvent e) {\n alterer(alterationPanel.getAlteration());\n }\n });\n\t\t\n\t\t\n\n \n \n selectionHampePanel.addListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n controller.selectionNotesHampesDirectionsSet(selectionHampePanel.getHampeDirection());\n }\n });\n \n \n \n \n \n panelBarreDeMesure.addListener(new ActionListener() {\n\n public void actionPerformed(ActionEvent e) {\n final BarreDeMesure barre = (BarreDeMesure) getPartitionPanel().getSelection().getElementMusicalUnique();\n final BarreDeMesure nouvelleBarre = new BarreDeMesure(barre.getDebutMoment(), panelBarreDeMesure.getBarreDeMesureType());\n getHistoire().executer(\n new PartitionActionElementMusicalRemplacer(\n barre,\n nouvelleBarre));\n getPartitionPanel().setSelection(new Selection(nouvelleBarre));\n getPartitionPanel().calculer(barre.getDebutMoment());\n \n }\n\n });\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n controller.addControllerListener(new ControllerListener() {\n\n public void whenUpdate(Controller partitionPanel) {\n panelNotes.setVisible(false); \n panelBarreDeMesure.setVisible(false);\n \n \n \n if(!partitionPanel.isSelection())\n {\n panelNotes.setVisible(true);\n return;\n }\n \n \n Selection selection = partitionPanel.getSelection();\n \n if(selection.isSingleton())\n {\n ElementMusical el = selection.getElementMusicalUnique();\n\n if(el instanceof ElementMusicalDuree)\n {\n if(el instanceof Silence)\n dureePanel.afficherSilence();\n else\n dureePanel.afficherNotes();\n \n dureePanel.setDuree(((ElementMusicalDuree) el).getDuree());\n if(selection.getNotes().iterator().hasNext())\n {\n Note note = selection.getNotes().iterator().next();\n menuNoteLieeALaSuivante.setSelected(note.isLieeALaSuivante());\n menuNoteLieeALaSuivante.setVisible(true);\n }\n else\n {\n menuNoteLieeALaSuivante.setVisible(false);\n }\n panelNotes.setVisible(true);\n }\n else if(el instanceof BarreDeMesure)\n {\n panelBarreDeMesure.setVisible(true);\n panelBarreDeMesure.setBarreDeMesureType(((BarreDeMesure) el).getBarreDeMesureType());\n }\n }\n else\n {\n dureePanel.afficherNotes();\n panelNotes.setVisible(true);\n dureePanel\n .setDuree(\n PartitionPanelModeEcriture.getCurseurNoteDureeEntree()\n );\n }\n \n if(selection.getNotes().iterator().hasNext())\n {\n selectionHampePanel.setHampeDirection(selection.getNotes().iterator().next().getHampeDirection());\n }\n \n }\n\n\n });\n \n \n \n setLocationRelativeTo(null);\n \n }", "private void createDisplayEditOverlay() {\n\t}", "public RelationshipDialog() {\n super(getRTParent(), \"Add Relationship...\", true);\n getContentPane().setLayout(new BorderLayout(5,5));\n JPanel center = new JPanel(new GridLayout(5,2,5,5));\n center.add(new JLabel(\"From\")); \n center.add(new JLabel(\"To\"));\n\n String blanks[] = KeyMaker.blanks(getRTParent().getRootBundles().getGlobals());\n center.add(from_cb = new JComboBox(blanks));\n center.add(to_cb = new JComboBox(blanks));\n\n center.add(from_symbol_cb = new JComboBox(Utils.SHAPE_STRS));\n center.add(to_symbol_cb = new JComboBox(Utils.SHAPE_STRS));\n center.add(from_typed_cb = new JCheckBox(\"Field Typed\", false));\n center.add(to_typed_cb = new JCheckBox(\"Field Typed\", false));\n center.add(ignore_ns_cb = new JCheckBox(\"Ignore Not Sets\", true));\n getContentPane().add(\"Center\", center);\n\n getContentPane().add(\"North\", style_cb = new JComboBox(STYLE_STRS));\n\n JPanel bottom = new JPanel(new FlowLayout());\n JButton add_bt, cancel_bt;\n bottom.add(add_bt = new JButton(\"Add\"));\n bottom.add(cancel_bt = new JButton(\"Cancel\"));\n getContentPane().add(\"South\", bottom);\n\n // Add listeners\n cancel_bt.addActionListener(new ActionListener() { \n public void actionPerformed(ActionEvent ae) { setVisible(false); dispose(); } } );\n add_bt.addActionListener(new ActionListener() { \n public void actionPerformed(ActionEvent ae) {\n setVisible(false); dispose();\n\t addRelationship((String) from_cb.getSelectedItem(), \n\t (String) from_symbol_cb.getSelectedItem(),\n\t \t\t from_typed_cb.isSelected(),\n\t (String) to_cb.getSelectedItem(), \n\t (String) to_symbol_cb.getSelectedItem(),\n\t\t \t to_typed_cb.isSelected(),\n (String) style_cb.getSelectedItem(), \n\t\t\t ignore_ns_cb.isSelected(), \n\t\t\t false);\n } } );\n pack(); setVisible(true);\n }", "public void createControl(Composite parent) {\r\n \t\tinitializeDialogUnits(parent);\r\n \r\n \t\tComposite root = new Composite(parent, SWT.NONE);\r\n \t\tGridData gd = new GridData();\r\n \r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tGridLayout gridLayout = new GridLayout(1, false);\r\n \t\troot.setLayout(gridLayout);\r\n \t\tGroup generalGroup = new Group(root, SWT.NONE);\r\n \t\tgeneralGroup.setLayoutData(gd);\r\n \t\tgeneralGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_GENERAL);\r\n \t\tgridLayout = new GridLayout(3, false);\r\n \r\n \t\tgeneralGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(jBossSeamHomeEditor, generalGroup, 3);\r\n \t\tregisterEditor(jBossAsDeployAsEditor, generalGroup, 3);\r\n \r\n \t\tgd = new GridData();\r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tGroup databaseGroup = new Group(root, SWT.NONE);\r\n \t\tdatabaseGroup.setLayoutData(gd);\r\n \t\tdatabaseGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_DATABASE);\r\n \t\tgridLayout = new GridLayout(4, false);\r\n \t\tdatabaseGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(jBossHibernateDbTypeEditor, databaseGroup, 4);\r\n \t\tregisterEditor(connProfileSelEditor, databaseGroup, 4);\r\n \t\tregisterEditor(dbSchemaName, databaseGroup, 4);\r\n \t\tregisterEditor(dbCatalogName, databaseGroup, 4);\r\n \t\tregisterEditor(dbTablesExists, databaseGroup, 4);\r\n \t\tregisterEditor(recreateTablesOnDeploy, databaseGroup, 4);\r\n \t\t// registerEditor(pathToJdbcDriverJar,databaseGroup, 4);\r\n \r\n \t\tGroup generationGroup = new Group(root, SWT.NONE);\r\n \t\tgd = new GridData();\r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tgenerationGroup.setLayoutData(gd);\r\n \t\tgenerationGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_CODE_GENERATION);\r\n \t\tgridLayout = new GridLayout(3, false);\r\n \t\tgenerationGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(sessionBeanPkgNameditor, generationGroup, 3);\r\n \t\tregisterEditor(entityBeanPkgNameditor, generationGroup, 3);\r\n \t\tregisterEditor(testsPkgNameditor, generationGroup, 3);\r\n \r\n \t\tsetControl(root);\r\n \t\tNewProjectDataModelFacetWizard wizard = (NewProjectDataModelFacetWizard) getWizard();\r\n \r\n \t\tIDataModel model = wizard.getDataModel();\r\n \r\n \t\tif (validatorDelegate == null) {\r\n \t\t\tvalidatorDelegate = new DataModelValidatorDelegate(this.model, this);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(jBossSeamHomeEditor\r\n \t\t\t\t\t.getName(),\r\n \t\t\t\t\tValidatorFactory.SEAM_RUNTIME_NAME_VALIDATOR);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(connProfileSelEditor\r\n \t\t\t\t\t.getName(),\r\n \t\t\t\t\tValidatorFactory.CONNECTION_PROFILE_VALIDATOR);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(testsPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(testsPkgNameditor\r\n \t\t\t\t\t.getName(), \"tests\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(entityBeanPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(entityBeanPkgNameditor\r\n \t\t\t\t\t.getName(), \"entity beans\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(sessionBeanPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(\r\n \t\t\t\t\tsessionBeanPkgNameditor.getName(), \"session beans\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(\r\n \t\t\t\t\tIFacetDataModelProperties.FACET_PROJECT_NAME, \r\n \t\t\t\t\tnew ProjectNamesDuplicationValidator(\r\n \t\t\t\t\t\t\tIFacetDataModelProperties.FACET_PROJECT_NAME));\r\n \t\t}\r\n \r\n \t\tjBossHibernateDbTypeEditor\r\n \t\t\t\t.addPropertyChangeListener(new PropertyChangeListener() {\r\n \t\t\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\r\n \t\t\t\t\t\tSeamInstallWizardPage.this.model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_DIALECT,\r\n \t\t\t\t\t\tHIBERNATE_HELPER.getDialectClass(evt.getNewValue().toString()));\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t);\r\n \r\n\r\n\r\n Dialog.applyDialogFont(parent);\r\n \t}", "private void addContainerButton(){\n ContainerAddDialogNameTextfield.setText(\"\");\n ContainerAddDialog.setVisible(true);\n }", "private void createdComponent() {\r\n\r\n\t\tloadImage();\r\n\t\tresizeImage();\r\n\t\ttry {\r\n\t\t\tif (customFont == null) {\r\n\t\t\t\tcustomFont = FontLoader.getInstance().getXenipa();\r\n\t\t\t\tif (customFont == null) {\r\n\t\t\t\t\tcustomFont = new FontLoader().importFont();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (FontFormatException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t} catch (IOException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (InstantiationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IllegalAccessException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (UnsupportedLookAndFeelException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tthis.init();\r\n\t\tthis.createpanel1();\r\n\t\tthis.createpanel2();\r\n\t\tthis.createpanel3();\r\n\t\tthis.createpanel4();\r\n\t\tthis.revalidate();\r\n\t}", "void createDialogComponents(Color color) {\r\n GridBagConstraints constr = new GridBagConstraints();\r\n constr.gridwidth = 1;\r\n constr.gridheight = 4;\r\n constr.insets = new Insets(0, 0, 0, 10);\r\n constr.fill = GridBagConstraints.NONE;\r\n constr.anchor = GridBagConstraints.CENTER;\r\n\r\n constr.gridx = 0;\r\n constr.gridy = 0;\r\n\r\n // Create color wheel canvas\r\n colorCanvas = new ColorCanvas(50, color);\r\n add(colorCanvas, constr);\r\n\r\n // Create input boxes to enter values\r\n Font font = new Font(\"DialogInput\", Font.PLAIN, 10);\r\n redInput = new TextField(3);\r\n redInput.addFocusListener(this);\r\n redInput.setFont(font);\r\n greenInput = new TextField(3);\r\n greenInput.addFocusListener(this);\r\n greenInput.setFont(font);\r\n blueInput = new TextField(3);\r\n blueInput.addFocusListener(this);\r\n blueInput.setFont(font);\r\n\r\n // Add the input boxes and labels to the component\r\n Label label;\r\n constr.gridheight = 1;\r\n constr.fill = GridBagConstraints.HORIZONTAL;\r\n constr.anchor = GridBagConstraints.SOUTH;\r\n constr.insets = new Insets(0, 0, 0, 0);\r\n constr.gridx = 1;\r\n constr.gridy = 0;\r\n label = new Label(\"Red:\", Label.RIGHT);\r\n add(label, constr);\r\n constr.gridy = 1;\r\n constr.anchor = GridBagConstraints.CENTER;\r\n label = new Label(\"Green:\", Label.RIGHT);\r\n add(label, constr);\r\n constr.gridy = 2;\r\n constr.anchor = GridBagConstraints.NORTH;\r\n label = new Label(\"Blue:\", Label.RIGHT);\r\n add(label, constr);\r\n\r\n constr.gridheight = 1;\r\n constr.fill = GridBagConstraints.NONE;\r\n constr.anchor = GridBagConstraints.SOUTHWEST;\r\n constr.insets = new Insets(0, 0, 0, 10);\r\n constr.gridx = 2;\r\n constr.gridy = 0;\r\n add(redInput, constr);\r\n constr.gridy = 1;\r\n constr.anchor = GridBagConstraints.WEST;\r\n add(greenInput, constr);\r\n constr.gridy = 2;\r\n constr.anchor = GridBagConstraints.NORTHWEST;\r\n add(blueInput, constr);\r\n\r\n // Add color swatches\r\n Panel panel = new Panel();\r\n panel.setLayout(new GridLayout(1, 2, 4, 4));\r\n oldSwatch = new ColorSwatch(false);\r\n oldSwatch.setForeground(color);\r\n panel.add(oldSwatch);\r\n newSwatch = new ColorSwatch(false);\r\n newSwatch.setForeground(color);\r\n panel.add(newSwatch);\r\n\r\n constr.fill = GridBagConstraints.HORIZONTAL;\r\n constr.anchor = GridBagConstraints.CENTER;\r\n constr.gridx = 1;\r\n constr.gridy = 3;\r\n constr.gridwidth = 2;\r\n add(panel, constr);\r\n\r\n // Add buttons\r\n panel = new Panel();\r\n panel.setLayout(new GridLayout(1, 2, 10, 2));\r\n Font buttonFont = new Font(\"SansSerif\", Font.BOLD, 12);\r\n okButton = new Button(\"Ok\");\r\n okButton.setFont(buttonFont);\r\n okButton.addActionListener(this);\r\n cancelButton = new Button(\"Cancel\");\r\n cancelButton.addActionListener(this);\r\n cancelButton.setFont(buttonFont);\r\n panel.add(okButton);\r\n panel.add(cancelButton);\r\n\r\n constr.fill = GridBagConstraints.NONE;\r\n constr.anchor = GridBagConstraints.CENTER;\r\n constr.gridx = 0;\r\n constr.gridy = 4;\r\n constr.gridwidth = 3;\r\n add(panel, constr);\r\n }", "private void createUIComponents() {\n editor = createEditor(project, document);\n splitter = new JBSplitter(0.4f);\n ((JBSplitter) splitter).setFirstComponent(editor.getComponent());\n// ((JBSplitter) splitter).setSecondComponent();\n }", "protected void handleCreateAsset(Optional<T> asset) {\n JFrame frame = new JFrame(assetName + \" Editor\");\n frame.add(getEditorPanel(asset, frame), BorderLayout.CENTER);\n \n // Display the window.\n frame.pack();\n frame.setVisible(true);\n\t}", "Component createComponent();", "Component createComponent();", "@SuppressWarnings(\"unchecked\")\n private void create() {\n components.clear();\n\n if (content != null) {\n content.clearChildren();\n }\n else {\n content = new Container();\n content.setInsets(INSETS);\n }\n\n GuiComponent guiComponent = (GuiComponent) getReflectedItem().getValue();\n\n // let the user choose which type of backgroundComponent they want.\n Label label = content.addChild(new Label(\"Type\"), 0, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n Container backgroundTypeContainer = content.addChild(new Container(), 0, 1);\n\n ColorRGBA oldColor = BackgroundUtils.getBackgroundColor(guiComponent);\n\n Button colorOnlyBgButton = backgroundTypeContainer.addChild(new Button(\"Color Only\"), 0, 0);\n colorOnlyBgButton.addClickCommands(source -> {\n if (!(guiComponent instanceof QuadBackgroundComponent)) {\n setValue(new QuadBackgroundComponent(oldColor));\n create();\n }\n });\n\n Button colorAndImageBgButton = backgroundTypeContainer.addChild(new Button(\"Color and Image\"), 0, 1);\n colorAndImageBgButton.addClickCommands(source -> {\n if (!(guiComponent instanceof TbtQuadBackgroundComponent)) {\n setValue(BackgroundComponents.gradient(oldColor));\n create();\n }\n });\n\n if (guiComponent instanceof QuadBackgroundComponent) {\n\n try {\n\n Method getter = QuadBackgroundComponent.class.getDeclaredMethod(\"getColor\");\n Method setter = QuadBackgroundComponent.class.getDeclaredMethod(\"setColor\", ColorRGBA.class);\n\n label = content.addChild(new Label(\"Color\"), 1, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(guiComponent, getter, setter);\n content.addChild(bgColorComponent.getPanel(), 1, 1);\n components.add(bgColorComponent);\n\n // margin\n getter = QuadBackgroundComponent.class.getDeclaredMethod(\"getMargin\");\n setter = QuadBackgroundComponent.class.getDeclaredMethod(\"setMargin\", Vector2f.class);\n\n label = content.addChild(new Label(\"Margin\"), 2, 0);\n Vector2fComponent marginComponent = new Vector2fComponent(guiComponent, getter, setter);\n content.addChild(marginComponent.getPanel(), 2, 1);\n components.add(marginComponent);\n\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n }\n else if (guiComponent instanceof TbtQuadBackgroundComponent) {\n\n TbtQuadBackgroundComponent backgroundComponent = (TbtQuadBackgroundComponent) guiComponent;\n\n try {\n Method getter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"getColor\");\n Method setter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"setColor\", ColorRGBA.class);\n\n label = content.addChild(new Label(\"Color\"), 1, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(guiComponent, getter, setter);\n content.addChild(bgColorComponent.getPanel(), 1, 1);\n components.add(bgColorComponent);\n\n label = content.addChild(new Label(\"Image\"), 2, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n Button browseImageButton = content.addChild(new Button(\"Select Background Image...\"), 2, 1);\n browseImageButton.setTextVAlignment(VAlignment.Center);\n browseImageButton.addClickCommands(source -> {\n\n JFileChooser jfc = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\n jfc.setDialogTitle(\"Select a Background Image...\");\n jfc.setMultiSelectionEnabled(false);\n jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\n jfc.setAcceptAllFileFilterUsed(false);\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"PNG Images\", \"png\");\n jfc.addChoosableFileFilter(filter);\n int returnValue = jfc.showOpenDialog(null);\n\n if (returnValue == JFileChooser.APPROVE_OPTION) {\n\n File file = jfc.getSelectedFile();\n\n\n try {\n\n byte[] imageData = Files.readAllBytes(file.toPath());\n byte[] stringData = Base64.getEncoder().encode(imageData);\n\n String imageString = new String(stringData);\n\n // PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n // panelBackground.setBase64Image(imageString);\n\n Texture texture = new TextureUtils().fromBase64(imageString);\n\n backgroundComponent.setTexture(texture);\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n });\n\n // margin\n getter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"getMargin\");\n setter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"setMargin\", Vector2f.class);\n\n label = content.addChild(new Label(\"Margin\"), 3, 0);\n Vector2fComponent marginComponent = new Vector2fComponent(guiComponent, getter, setter);\n content.addChild(marginComponent.getPanel(), 3, 1);\n components.add(marginComponent);\n\n\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n }\n\n//\n// this.content = new RollupPanel(\"\", contentContainer, null);\n// this.content.setOpen(false);\n//\n// // background Image\n// Container bgImageContainer = contentContainer.addChild(new Container(new SpringGridLayout(Axis.Y, Axis.X, FillMode.Last, FillMode.Last)), 0, 0);\n// Label bgImageLabel = bgImageContainer.addChild(new Label(\"Background Image\"), 0, 0);\n// bgImageLabel.setTextVAlignment(VAlignment.Center);\n// bgImageLabel.setInsets(new Insets3f(0.0F, 2.0F, 0.0F, 5.0F));\n// Button browseImageButton = bgImageContainer.addChild(new Button(\"Browse...\"), 0, 1);\n// Button removeImageButton = bgImageContainer.addChild(new Button(\"Remove\"), 0, 2);\n// bgImageContainer.addChild(new Container(), 0, 3);\n//\n// browseImageButton.addClickCommands(source -> {\n//\n// JFileChooser jfc = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\n// jfc.setDialogTitle(\"Select a Background Image...\");\n// jfc.setMultiSelectionEnabled(false);\n// jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\n// jfc.setAcceptAllFileFilterUsed(false);\n// FileNameExtensionFilter filter = new FileNameExtensionFilter(\"PNG Images\", \"png\");\n// jfc.addChoosableFileFilter(filter);\n// int returnValue = jfc.showOpenDialog(null);\n//\n// if (returnValue == JFileChooser.APPROVE_OPTION) {\n//\n// File file = jfc.getSelectedFile();\n//\n// try {\n// byte[] imageData = Files.readAllBytes(file.toPath());\n// byte[] stringData = Base64.getEncoder().encode(imageData);\n//\n// String imageString = new String(stringData);\n//\n// PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n// panelBackground.setBase64Image(imageString);\n//\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n// }\n//\n// });\n//\n// removeImageButton.addClickCommands(source -> {\n// PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n// panelBackground.setBase64Image(\"\");\n// });\n//\n//\n// try {\n//\n// // color\n// Method get = PanelBackground.class.getMethod(\"getColor\");\n// Method set = PanelBackground.class.getMethod(\"setColor\", ColorRGBA.class);\n//\n// ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(getReflectedProperty().getValue(), get, set);\n// bgColorComponent.setPropertyName(\"Color\");\n// contentContainer.addChild(bgColorComponent.getPanel());\n// components.add(bgColorComponent);\n//\n// // insetTop\n// get = PanelBackground.class.getMethod(\"getInsetTop\");\n// set = PanelBackground.class.getMethod(\"setInsetTop\", int.class);\n//\n// IntComponent insetTopComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetTopComponent.setPropertyName(\"Inset Top\");\n// contentContainer.addChild(insetTopComponent.getPanel());\n// components.add(insetTopComponent);\n//\n// // insetLeft\n// get = PanelBackground.class.getMethod(\"getInsetLeft\");\n// set = PanelBackground.class.getMethod(\"setInsetLeft\", int.class);\n//\n// IntComponent insetLeftComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetLeftComponent.setPropertyName(\"Inset Left\");\n// contentContainer.addChild(insetLeftComponent.getPanel());\n// components.add(insetLeftComponent);\n//\n// // insetBottom\n// get = PanelBackground.class.getMethod(\"getInsetBottom\");\n// set = PanelBackground.class.getMethod(\"setInsetBottom\", int.class);\n//\n// IntComponent insetBottomComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetBottomComponent.setPropertyName(\"Inset Bottom\");\n// contentContainer.addChild(insetBottomComponent.getPanel());\n// components.add(insetBottomComponent);\n//\n// // insetRight\n// get = PanelBackground.class.getMethod(\"getInsetRight\");\n// set = PanelBackground.class.getMethod(\"setInsetRight\", int.class);\n//\n// IntComponent insetRightComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetRightComponent.setPropertyName(\"Inset Right\");\n// contentContainer.addChild(insetRightComponent.getPanel());\n// components.add(insetRightComponent);\n//\n// // zOffset\n// get = PanelBackground.class.getMethod(\"getzOffset\");\n// set = PanelBackground.class.getMethod(\"setzOffset\", float.class);\n//\n// FloatComponent zOffsetComponent = new FloatComponent(getReflectedProperty().getValue(), get, set);\n// zOffsetComponent.setPropertyName(\"Z-Offset\");\n// contentContainer.addChild(zOffsetComponent.getPanel());\n// components.add(zOffsetComponent);\n//\n// } catch (NoSuchMethodException e) {\n// e.printStackTrace();\n// }\n\n\n }", "@Override\n\tprotected Control createDialogArea(Composite parent) {\n\t\tComposite container = (Composite) super.createDialogArea(parent);\n\n\t\tcreateContent(container);\n\n\t\treturn container;\n\t}", "private void setup(){\n\t\t\n\t\t//set the dialog title\n\t\tsetText(LocaleText.get(\"createSPSSFileDialog\"));\n\t\t//create the status text\n\t\tstatusLabel = new Label();\n\t\t\n\t\t//create the buttons\n\t\tButton btnCancel = new Button(LocaleText.get(\"close\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnCreate = new Button(LocaleText.get(\"createSPSSFileDialog\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tcreateSPSSFile();\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnSave = new Button(LocaleText.get(\"save\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tsave();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\t\t\n\t\t\n\t\t//update the languages in the form.\n\t\tFormHandler.updateLanguage(Context.getLocale(), Context.getLocale(), form);\n\t\t//add the languages to the language drop down\n\t\tfor(Locale l : form.getLocales())\n\t\t{\n\t\t\tlistBoxLanguages.addItem(l.getName());\n\t\t}\n\t\t\n\t\t//setup the text area\n\t\tspssText.setCharacterWidth(30);\n\t\tspssText.setPixelSize(300, 300);\n\t\t\n\t\t\n\t\tFlexCellFormatter formatter = table.getFlexCellFormatter();\n\t\t\n\t\t//now add stuff to the UI\n\t\tint row = 0;\n\t\ttable.setWidget(row, 0, new Label(LocaleText.get(\"language\")));\n\t\ttable.setWidget(row, 1, listBoxLanguages);\n\t\trow++;\n\t\ttable.setWidget(row, 0, spssText);\n\t\tformatter.setColSpan(row, 0, 2);\n\t\tformatter.setHeight(row, 0, \"300px\");\n\t\tformatter.setWidth(row, 0, \"300px\");\n\t\trow++;\n\t\ttable.setWidget(row, 0, statusLabel);\n\t\trow++;\n\t\ttable.setWidget(row, 0, btnCreate);\n\t\trow++;\n\t\ttable.setWidget(row, 0, btnSave);\n\t\ttable.setWidget(row, 1, btnCancel);\n\t\trow++;\n\t\ttable.setWidget(row, 0, appletHtml);\n\t\t\n\t\t\t\t\t\t\n\t\t//some random UI stuff to make everything nice and neat\n\t\tVerticalPanel panel = new VerticalPanel();\n\t\tFormUtil.maximizeWidget(panel);\n\t\tpanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);\n\t\tpanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);\n\t\tpanel.add(table);\n\t\t\n\t\tsetWidget(panel);\n\t\t\n\t\tsetWidth(\"200px\");\t\t\n\t}", "private Component createComponent(XmlNode node, String id) {\n\n Component comp = null;\n String tag = node.getTag();\n\n if (tag.equals(TAG_PANEL)) {\n comp = layoutContainer(new JPanel(), node, node.getChildren());\n } else if (tag.equals(TAG_BORDER)) {\n comp = layoutBorder(node, node.getChildren());\n } else if (tag.equals(TAG_TEXTINPUT)) {\n int cols = node.getAttribute(ATTR_COLS, -1);\n int rows = node.getAttribute(ATTR_ROWS, -1);\n String value = node.getAttribute(ATTR_VALUE, \"\");\n\n JTextComponent textComp;\n if (rows > 1) {\n if (cols < 0) {\n cols = 30;\n }\n textComp = new JTextArea(value, rows, cols);\n } else {\n if (cols == -1) {\n textComp = new JTextField(value);\n } else {\n textComp = new JTextField(value, cols);\n }\n ((JTextField) textComp).addActionListener(this);\n }\n comp = textComp;\n String action = node.getAttribute(ATTR_ACTION, (String) null);\n if (action != null) {\n componentToAction.put(textComp, action);\n }\n } else if (tag.equals(TAG_MENUITEM) || tag.equals(TAG_CBMENUITEM)) {\n String actionTemplate = null;\n JMenuItem mi;\n String label = node.getAttribute(ATTR_LABEL, \"\");\n String action = node.getAttribute(ATTR_ACTION);\n String value = node.getAttribute(ATTR_VALUE);\n String key = node.getAttribute(ATTR_KEY);\n if ((action == null) && (actionTemplate != null)\n && (value != null)) {\n action = GuiUtils.replace(actionTemplate, \"%value%\", value);\n }\n if ((key != null) && !key.startsWith(\"group:\")) {\n label = label + \" \" + key;\n }\n\n if (node.getTag().equals(TAG_CBMENUITEM)) {\n boolean initValue = node.getAttribute(ATTR_VALUE, true);\n JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(label,\n initValue);\n String group = node.getAttribute(ATTR_GROUP, (String) null);\n addToGroup(group, cbmi);\n mi = cbmi;\n if (action != null) {\n Hashtable actions = new Hashtable();\n actions.put(ATTR_ACTION, action);\n actions.put(ATTR_VALUE, new Boolean(initValue));\n componentToAction.put(cbmi, actions);\n cbmi.addItemListener(this);\n if ((group == null) || initValue) {\n itemStateChanged(new ItemEvent(cbmi, 0, cbmi,\n ItemEvent.ITEM_STATE_CHANGED));\n }\n }\n\n if (key != null) {\n if (key.startsWith(\"group:\")) {\n if (group != null) {\n key = key.substring(6);\n keyToComponent.put(key.toLowerCase(), group);\n }\n } else {\n keyToComponent.put(key.toLowerCase(), mi);\n }\n }\n } else {\n mi = new JMenuItem(label);\n if (action != null) {\n mi.setActionCommand(action);\n mi.addActionListener(this);\n if (key != null) {\n keyToComponent.put(key.toLowerCase(), mi);\n }\n }\n }\n if (id != null) {\n idToMenuItem.put(id, mi);\n }\n comp = mi;\n } else if (tag.equals(TAG_MENU)) {\n Vector children = node.getChildren();\n JMenu menu = new JMenu(node.getAttribute(ATTR_LABEL, \"\"));\n comp = menu;\n for (int i = 0; i < children.size(); i++) {\n XmlNode childElement = (XmlNode) children.get(i);\n if (childElement.getTag().equals(TAG_SEPARATOR)) {\n menu.addSeparator();\n\n continue;\n }\n Component childComponent = xmlToUi(childElement);\n if (childComponent == null) {\n continue;\n }\n menu.add(childComponent);\n }\n } else if (tag.equals(TAG_MENUBAR)) {\n Vector children = node.getChildren();\n JMenuBar menuBar = new JMenuBar();\n comp = menuBar;\n for (int i = 0; i < children.size(); i++) {\n XmlNode childElement = (XmlNode) children.get(i);\n Component childComponent = xmlToUi(childElement);\n if (childComponent == null) {\n continue;\n }\n menuBar.add(childComponent);\n }\n } else if (tag.equals(TAG_SPLITPANE)) {\n Vector xmlChildren = node.getChildren();\n if (xmlChildren.size() != 2) {\n throw new IllegalArgumentException(\n \"splitpane tag needs to have 2 children \" + node);\n }\n XmlNode leftNode = getReffedNode((XmlNode) xmlChildren.get(0));\n XmlNode rightNode = getReffedNode((XmlNode) xmlChildren.get(1));\n Component leftComponent = xmlToUi(leftNode);\n Component rightComponent = xmlToUi(rightNode);\n boolean continuous = node.getAttribute(ATTR_CONTINUOUS, true);\n int orientation = findValue(node.getAttribute(ATTR_ORIENTATION,\n (String) null), SPLITPANE_NAMES,\n SPLITPANE_VALUES);\n\n JSplitPane split = new JSplitPane(orientation, continuous,\n leftComponent, rightComponent);\n int divider = node.getAttribute(ATTR_DIVIDER, -1);\n if (divider != -1) {\n split.setDividerLocation(divider);\n }\n split.setOneTouchExpandable(\n node.getAttribute(ATTR_ONETOUCHEXPANDABLE, true));\n double resizeweight = node.getAttribute(ATTR_RESIZEWEIGHT, -1.0);\n if (resizeweight != -1.0) {\n split.setResizeWeight(resizeweight);\n }\n comp = split;\n } else if (tag.equals(TAG_LABEL)) {\n String label = node.getAttribute(ATTR_LABEL, \"\");\n comp = new JLabel(label, getAlign(node));\n } else if (tag.equals(TAG_IMAGE)) {\n comp = makeImageButton(node, null, null);\n } else if (tag.equals(TAG_SHAPEPANEL)) {\n comp = new ShapePanel(this, node);\n } else if (tag.equals(TAG_BUTTON)) {\n JButton b = new JButton(node.getAttribute(ATTR_LABEL, \"\"));\n b.setActionCommand(node.getAttribute(ATTR_ACTION, \"No action\"));\n b.addActionListener(this);\n comp = b;\n } else if (tag.equals(TAG_CHOICE)) {\n Choice b = new java.awt.Choice();\n String action = node.getAttribute(ATTR_ACTION,\n (String) null);\n int selected = node.getAttribute(ATTR_SELECTED, 0);\n Hashtable actions = new Hashtable();\n for (int i = 0; i < node.size(); i++) {\n XmlNode child = getReffedNode(node.get(i));\n if ( !child.getTag().equals(TAG_ITEM)) {\n throw new IllegalArgumentException(\"Bad choice item:\"\n + child);\n }\n b.add(child.getAttribute(ATTR_LABEL, \"\"));\n String value = child.getAttribute(ATTR_VALUE, (String) null);\n if (value != null) {\n actions.put(ATTR_VALUE + i, value);\n }\n String subAction = child.getAttribute(ATTR_ACTION,\n (String) null);\n if (subAction != null) {\n actions.put(ATTR_ACTION + i, subAction);\n }\n }\n comp = b;\n if (action != null) {\n actions.put(ATTR_ACTION, action);\n componentToAction.put(b, actions);\n b.select(selected);\n b.addItemListener(this);\n itemStateChanged(new ItemEvent(b, 0, b,\n ItemEvent.ITEM_STATE_CHANGED));\n }\n } else if (tag.equals(TAG_CHECKBOX)) {\n JCheckBox b = new JCheckBox(node.getAttribute(ATTR_LABEL, \"\"),\n node.getAttribute(ATTR_VALUE, false));\n String action = node.getAttribute(ATTR_ACTION, (String) null);\n comp = b;\n if (action != null) {\n componentToAction.put(comp, action);\n b.addItemListener(this);\n itemStateChanged(new ItemEvent(b, 0, b,\n ItemEvent.ITEM_STATE_CHANGED));\n }\n } else {\n comp = new JLabel(\"Unknown tag:\" + tag);\n System.err.println(\"Unknown tag:\" + node);\n }\n\n return comp;\n\n }", "protected abstract JTextComponent createPromptComponent();", "public PHConstDialog() {\n\t\tinitComponents();\n\t}", "ISModifyComponent createISModifyComponent();", "public Dialog<String> createDialog() {\n\t\t// Creating a dialog\n\t\tDialog<String> dialog = new Dialog<String>();\n\n\t\tButtonType type = new ButtonType(\"Ok\", ButtonData.OK_DONE);\n\t\tdialog.getDialogPane().getButtonTypes().add(type);\n\t\treturn dialog;\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tString [] params = {H_Panel.getName(),H_Panel.getDesc()};\n\t\t\t\tservDisp.add(params);\t\t\n\t\t\t\t_MGR.setHeader(H_Panel.getName());\n\t\t\t\t_MGR.setDescr(H_Panel.getDesc());\n\t\t\t\t_MGR.loadTagsToProject();\n\t\t\t\t//_MGR.updateTagsInProjectPanels();\n\t\t\t\tSP_PManager_Widget.this.setVisible(false);\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tAddNewMajorDialog addNewMajorDialog=new AddNewMajorDialog(userId);\n\t\t\t\t\n\t\t\t\taddNewMajorDialog.addWindowListener(new WindowAdapter() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\trefresh(jt);\n\t\t\t\t\t\t}\n\t\t\t\t});\t\n\t\t\t\t\n\t\t\t}", "private void jMenuItemAcercaDeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemAcercaDeActionPerformed\n LOG.trace(evt.paramString());\n\n java.awt.EventQueue.invokeLater(() -> {\n JDialogAcercaDe jdad = new JDialogAcercaDe(null, modal);\n jdad.setLocationRelativeTo(null);\n jdad.setVisible(true);\n });\n}", "public AddPlayerDialog(MainWindow frame, GameEngine gameEngine)\n\t{\n\t\t//create the labels and text fields\n\t\tJLabel heading = new JLabel(\"Add New Player\");\n\t\tJTextField name = new JTextField(30);\n\t\tJTextField credit = new JTextField(30);\n\t\tJLabel nameLabel = new JLabel(\"Player Name:\");\n\t\tJLabel creditLabel = new JLabel(\"Player Credit:\");\n\t\t//add player button and custom actionEventListnener\n\t\tJButton save = new JButton(\"Add Player\");\n\t\tsave.addActionListener(new SaveNewPlayer(gameEngine, frame, name, credit, this));\n\t\t//cancel button with custom actionEventListener\n\t\tJButton cancel = new JButton(\"Cancel\");\n\t\tcancel.addActionListener(new Cancel(this));\n\t\t//panel that holds all components\n\t\tJPanel panel = new JPanel();\n\t\tGroupLayout layout = new GroupLayout(panel);\n\t\tpanel.setLayout(layout);\n\t\t\n\t\t//set out components in a Group layout pattern\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n\t\t\t\t.addComponent(heading)\n\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t.addComponent(nameLabel, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t.addComponent(name, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t.addComponent(creditLabel, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t.addComponent(credit, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t.addComponent(cancel, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t.addComponent(save, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n\t\t);\n\t\tlayout.setVerticalGroup(layout.createSequentialGroup()\n\t\t\t\t.addComponent(heading)\n\t\t\t\t.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t.addComponent(nameLabel)\n\t\t\t\t\t.addComponent(name))\n\t\t\t\t.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t.addComponent(creditLabel)\n\t\t\t\t\t.addComponent(credit))\n\t\t\t\t.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t.addComponent(cancel)\n\t\t\t\t\t\t.addComponent(save))\n\t\t\t\t);\n\t\t//add panel to dialog\n\t\tadd(panel);\n\t\t//set dialog size and position\n\t\tsetBounds(400, 400, 500, 400);\n\t\tpack();\n\t\tsetVisible(true);\n\t}", "@Override\r\n\t\t\tpublic void buttonClick(ClickEvent event) {\r\n\t\t\t\tString strSelectedDataType = _strMarkerType.replace(\" \", \"\");\r\n\t\t\t\tUploadVariableFieldsDialog uploadVariableFieldsDialog = null;\r\n\t\t\t\tif (strSelectedDataType.equalsIgnoreCase(\"SNPGenotype\") || strSelectedDataType.equalsIgnoreCase(\"AllelicData\") || strSelectedDataType.equalsIgnoreCase(\"ABHData\") ){\r\n\t\t\t\t\tuploadVariableFieldsDialog = new UploadVariableFieldsDialog(_mainHomePage, \"Markers\", true);\r\n\t\t\t\t} else if (strSelectedDataType.equalsIgnoreCase(\"DArTGenotype\")){\r\n\t\t\t\t\tuploadVariableFieldsDialog = new UploadVariableFieldsDialog(_mainHomePage, \"Germplasm-Names\", true);\r\n\t\t\t\t} \r\n\r\n\t\t\t\tif (null != uploadVariableFieldsDialog) {\r\n\t\t\t\t\tWindow messageWindow = new Window(\"Upload Message\");\r\n\t\t\t\t\tmessageWindow.addComponent(uploadVariableFieldsDialog);\r\n\t\t\t\t\tmessageWindow.setWidth(\"500px\");\r\n\t\t\t\t\tmessageWindow.setBorder(Window.BORDER_NONE);\r\n\t\t\t\t\tmessageWindow.setClosable(true);\r\n\t\t\t\t\tmessageWindow.center();\r\n\t\t\t\t\tif (!_mainHomePage.getMainWindow().getChildWindows().contains(messageWindow)) {\r\n\t\t\t\t\t\t_mainHomePage.getMainWindow().addWindow(messageWindow);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmessageWindow.setModal(true);\r\n\t\t\t\t\tmessageWindow.setVisible(true);\r\n\r\n\r\n\t\t\t\t\tuploadVariableFieldsDialog.addListener(new UploadVariableFieldsListener() {\r\n\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void uploadVariableFields(ArrayList<String> theListOfVariableFields) {\r\n\t\t\t\t\t\t\tArrayList<String> listOfVariableColumns = theListOfVariableFields;\r\n\t\t\t\t\t\t\tlistOfVariableDataColumns = listOfVariableColumns;\r\n\t\t\t\t\t\t\tif (null != listOfVariableColumns && 0 != listOfVariableColumns.size()){\r\n\t\t\t\t\t\t\t\tLayout newTabbedComponentForTemplate = buildTabbedComponentForTemplate();\r\n\t\t\t\t\t\t\t\tverticalLayout.replaceComponent(layoutForMarkerTableComponent, newTabbedComponentForTemplate);\r\n\t\t\t\t\t\t\t\tverticalLayout.requestRepaint();\r\n\t\t\t\t\t\t\t\tlayoutForMarkerTableComponent = newTabbedComponentForTemplate;\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\r\n\t\t\t}", "@Override\r\n protected Control createDialogArea(final Composite parent) {\n Composite composite = new Composite(parent, SWT.NONE);\r\n GridLayout layout = new GridLayout();\r\n layout.numColumns = 2;\r\n\r\n composite.setLayout(layout);\r\n composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n\r\n Label idLab = new Label(composite, SWT.NONE);\r\n idLab.setText(\"Id: \");\r\n idLab.setToolTipText(\"\");\r\n\r\n idText = new Text(composite, SWT.BORDER);\r\n idText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n doSingleCheck(idText, ID_MIN);\r\n idText.addModifyListener(new TextBoxValidator(idText, Messages.getString(\r\n \"titleToShort\", ID_MIN)) {\r\n @Override\r\n public boolean check(final TypedEvent e) {\r\n return doCheck((Text) e.getSource(), ID_MIN);\r\n }\r\n });\r\n\r\n Label titleLab = new Label(composite, SWT.NONE);\r\n titleLab.setText(\"Title: \");\r\n titleLab.setToolTipText(\"\");\r\n\r\n titleText = new Text(composite, SWT.BORDER);\r\n titleText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n doSingleCheck(titleText, TITLE_MIN);\r\n titleText.addModifyListener(new TextBoxValidator(titleText, Messages\r\n .getString(\"titleToShort\", TITLE_MIN)) {\r\n @Override\r\n public boolean check(final TypedEvent e) {\r\n return doCheck((Text) e.getSource(), TITLE_MIN);\r\n }\r\n });\r\n\r\n // TODO browse field.\r\n Label iconLab = new Label(composite, SWT.NONE);\r\n iconLab.setText(\"Icon: \");\r\n iconLab.setToolTipText(\"\");\r\n iconPath = new Text(composite, SWT.BORDER);\r\n iconPath.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n\r\n Label parentCatLab = new Label(composite, SWT.NONE);\r\n parentCatLab.setText(\"Parent Category: \");\r\n parentCatCombo = new Combo(composite, SWT.BORDER);\r\n parentCatCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n parentCatCombo.add(NO_PARENT);\r\n parentCatCombo.select(0);\r\n // FIXME save performance, if loading categories only one time.\r\n List<Category> categories = ExampleManager.get().getCategories();\r\n for (Category cat : categories) {\r\n parentCatCombo.add(cat.getId());\r\n parentCatCombo.getText();\r\n }\r\n Label descLab = new Label(composite, SWT.NONE);\r\n descLab.setText(\"Description: \");\r\n\r\n descText = new Text(composite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL\r\n | SWT.H_SCROLL);\r\n GridData descData = new GridData(GridData.FILL_HORIZONTAL);\r\n descData.heightHint = CAT_DESC_HEIGHT;\r\n descData.minimumHeight = CAT_DESC_MINHEIGHT;\r\n descText.setLayoutData(descData);\r\n doSingleCheck(descText, DESCRIPTION_MIN);\r\n descText.addModifyListener(new TextBoxValidator(descText, Messages\r\n .getString(\"titleToShort\", DESCRIPTION_MIN)) {\r\n @Override\r\n public boolean check(final TypedEvent e) {\r\n return doCheck((Text) e.getSource(), DESCRIPTION_MIN);\r\n }\r\n });\r\n\r\n return parent;\r\n }", "void createComponent() {\n\t\t//Initialize all components\n\t\tsetLayout(new BorderLayout());\n\t\ttextEditor = new JTextArea();\n\t\terrorTextArea = new JTextArea();\n\t\topenButton = new JButton(\"Open\");\n\t\tsaveButton = new JButton(\"Save\");\n\t\tfindButton = new JButton(\"Find\");\n\t\treplaceButton = new JButton(\"Replace\");\n\t\tcompileButton = new JButton(\"Compile\");\n\t\trunButton = new JButton(\"Run\");\n\t\tfindField = new JTextField();\n\t\treplaceField = new JTextField();\n\t\tfontSizeItems = new Integer[17];\n\t\tfontStyle = new JComboBox<>(fontStyleItems);\n\t\tfinder = new ArrayList<>();\n\t\t\n\t\t//Assigns values to components\n\t\ttextEditor.setTabSize(2);\n\t\tint index = 0;\n\t\tfor(int i=8;i<=40;i+=2) {\n\t\t\tfontSizeItems[index] = i;\n\t\t\tindex++;\n\t\t}\n\t\tfontSize = new JComboBox<>(fontSizeItems);\n\t\tfontSize.setSelectedIndex(2);\n\t\terrorTextArea.setText(\"Error outputs here...\");\n\t\terrorTextArea.setEditable(false);\n\t\terrorTextArea.setFont(new Font(null, 0, 17));\n\t\terrorTextArea.setLineWrap(true);\n\t\terrorTextArea.setWrapStyleWord(true);\n\t\t\n\t\topenButton.setPreferredSize(optionSize);\n\t\tsaveButton.setPreferredSize(optionSize);\n\t\tfindButton.setPreferredSize(optionSize);\n\t\treplaceButton.setPreferredSize(optionSize);\n\t\t\n\t\thighlighter = textEditor.getHighlighter();\n\t\t\n\t\t//Add all components to panels\n\t\tJScrollPane scrollPane = new JScrollPane(textEditor);\n\t\tJPanel navigationPanel = new JPanel(new BorderLayout());\n\t\tJPanel optionsPanel = new JPanel(new GridLayout(2,5,5,5));\n\t\tJPanel executePanel = new JPanel(new GridLayout(2,1));\n\t\tJPanel errorPanel = new JPanel(new BorderLayout());\n\t\t\n\t\toptionsPanel.add(openButton);\n\t\toptionsPanel.add(fontSize);\n\t\toptionsPanel.add(findField);\n\t\toptionsPanel.add(findButton);\n\t\t\n\t\toptionsPanel.add(saveButton);\n\t\toptionsPanel.add(fontStyle);\n\t\toptionsPanel.add(replaceField);\n\t\toptionsPanel.add(replaceButton);\n\t\t\n\t\texecutePanel.add(compileButton);\n\t\texecutePanel.add(runButton);\n\t\t\n\t\terrorPanel.add(errorTextArea);\n\t\t\n\t\tnavigationPanel.add(optionsPanel,BorderLayout.CENTER);\n\t\tnavigationPanel.add(errorPanel, BorderLayout.SOUTH);\n\t\t\n\t\t//Add panels to the main frame\n\t\tthis.add(scrollPane,BorderLayout.CENTER);\n\t\tthis.add(navigationPanel, BorderLayout.SOUTH);\n\t\tthis.add(executePanel, BorderLayout.EAST);\n\t}", "public ReorganizeDialog() { }", "private void openCreateAccountDialog()\n {\n testDialog();\n\n }", "@Override\n public void componentOpened() {\n }", "@Override\r\n\tprotected Control createDialogArea(Composite parent) {\r\n\t\tComposite container = (Composite) super.createDialogArea(parent);\r\n\t\tcontainer.setLayout(new FormLayout());\r\n\t\t\r\n\t\tLabel lblNewLabel = new Label(container, SWT.NONE);\r\n\t\tFormData fd_lblNewLabel = new FormData();\r\n\t\tlblNewLabel.setLayoutData(fd_lblNewLabel);\r\n\t\tlblNewLabel.setText(\"Username :\");\r\n\t\t\r\n\t\ttext = new Text(container, SWT.BORDER);\r\n\t\tfd_lblNewLabel.top = new FormAttachment(text, 3, SWT.TOP);\r\n\t\tfd_lblNewLabel.right = new FormAttachment(text, -30);\r\n\t\tFormData fd_text = new FormData();\r\n\t\tfd_text.top = new FormAttachment(0, 92);\r\n\t\tfd_text.right = new FormAttachment(100, -107);\r\n\t\ttext.setLayoutData(fd_text);\r\n\t\t\r\n\t\tLabel lblPassword = new Label(container, SWT.NONE);\r\n\t\tfd_lblNewLabel.bottom = new FormAttachment(lblPassword, -20);\r\n\t\tfd_lblNewLabel.left = new FormAttachment(0, 151);\r\n\t\tlblPassword.setText(\"Password :\");\r\n\t\tlblPassword.setAlignment(SWT.CENTER);\r\n\t\tFormData fd_lblPassword = new FormData();\r\n\t\tfd_lblPassword.left = new FormAttachment(lblNewLabel, 0, SWT.LEFT);\r\n\t\tfd_lblPassword.bottom = new FormAttachment(100, -75);\r\n\t\tlblPassword.setLayoutData(fd_lblPassword);\r\n\t\t\r\n\t\ttext_1 = new Text(container, SWT.BORDER);\r\n\t\tFormData fd_text_1 = new FormData();\r\n\t\tfd_text_1.top = new FormAttachment(text, 14);\r\n\t\tfd_text_1.left = new FormAttachment(text, 0, SWT.LEFT);\r\n\t\ttext_1.setLayoutData(fd_text_1);\r\n\t\t\r\n\t\tCLabel lblNewLabel_1 = new CLabel(container, SWT.NONE);\r\n\t\tlblNewLabel_1.setImage(SWTResourceManager.getImage(LoginDialog.class, \"/com/acme/rcp/app/logo.png\"));\r\n\t\tFormData fd_lblNewLabel_1 = new FormData();\r\n\t\tfd_lblNewLabel_1.bottom = new FormAttachment(text, -14);\r\n\t\tfd_lblNewLabel_1.right = new FormAttachment(100, -140);\r\n\t\tlblNewLabel_1.setLayoutData(fd_lblNewLabel_1);\r\n\t\tlblNewLabel_1.setText(\"\");\r\n\r\n\t\treturn container;\r\n\t}", "public void openDialogCreateVisual(){\n DataHeader[] tabHeader = dataset.getListDataHeaderDouble(true);\n TypeVisualization[] tabVis = getListTypeVisualization(tabHeader.length);\n DataHeader[] tabHeaderLabel = dataset.getListDataHeaderDouble(false);\n CreateDataVisualDialog dialog = new CreateDataVisualDialog(this, tabVis, tabHeader, tabHeaderLabel);\n dialog.setVisible(true);\n }", "public void showInputCategoryCreateDialog() {\r\n FXMLLoader loader = fxmlLoaderService.getLoader(getClass().getResource(FXML_INPUT_CATEGORY_CREATE_DIALOG));\r\n\r\n Parent page;\r\n\r\n try {\r\n page = loader.load();\r\n } catch (IOException ex) {\r\n logger.warn(\"Failed to load: \" + FXML_INPUT_CATEGORY_CREATE_DIALOG, ex);\r\n\r\n return;\r\n }\r\n\r\n // set the stage\r\n Stage stage = new Stage();\r\n stage.setTitle(\"Create Input Category\");\r\n stage.initModality(Modality.APPLICATION_MODAL);\r\n stage.centerOnScreen();\r\n stage.initOwner(mainStage);\r\n\r\n Scene scene = new Scene(page);\r\n scene.getStylesheets().add(getClass().getResource(STYLESHEET_DEFAULT).toExternalForm());\r\n\r\n stage.setScene(scene);\r\n\r\n // Set the item into the controller.\r\n InputCategoryCreateDialogController controller = loader.getController();\r\n controller.setStage(stage);\r\n\r\n stage.showAndWait();\r\n }", "@Override\n\t protected Control createDialogArea(Composite parent) {\n\t container = (Composite) super.createDialogArea(parent);\n\t container.setLayout(new GridLayout(2, false));\n\t new Label(container, SWT.NONE);\n\t \n\t Label lblTo = new Label(container, SWT.NONE);\n\t lblTo.setText(\"Recipient:\");\n\t new Label(container, SWT.NONE);\n\t \n\t tfRecipient = new Text(container, SWT.BORDER);\n\t tfRecipient.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\t new Label(container, SWT.NONE);\n\t \n\t Label lblSubject = new Label(container, SWT.NONE);\n\t lblSubject.setText(\"Subject:\");\n\t new Label(container, SWT.NONE);\n\t \n\t tfSubject = new Text(container, SWT.BORDER);\n\t tfSubject.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\t new Label(container, SWT.NONE);\n\t \n\t lblMessage = new Label(container, SWT.NONE);\n\t lblMessage.setText(\"Message:\");\n\t new Label(container, SWT.NONE);\n\t \n\t tfMessage = new Text(container, SWT.BORDER | SWT.WRAP | SWT.MULTI);\n\t GridData gd_text_2 = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\n\t gd_text_2.heightHint = 292;\n\t tfMessage.setLayoutData(gd_text_2);\n\t getShell().setText(\"Write new Message\");\n\t return container;\n\t }", "private void initComponentsCustom() {\n SGuiUtils.setWindowBounds(this, 480, 300);\n\n moTextUnitSymbol.setTextSettings(jlUnitSymbol.getText(), 15, 1);\n moTextUnitName.setTextSettings(jlName.getText(), 150, 1);\n moTextShortName.setTextSettings(SGuiUtils.getLabelName(jlAnalysisShortName.getText()), 10, 1);\n moTextName.setTextSettings(SGuiUtils.getLabelName(jlName.getText()), 100, 1);\n moKeyAnalysisType.setKeySettings(miClient, SGuiUtils.getLabelName(jlAnalysisType), true);\n\n moFields.addField(moTextUnitSymbol);\n moFields.addField(moTextUnitName);\n \n moFields.addField(moTextShortName);\n moFields.addField(moTextName);\n \n moFields.addField(moKeyAnalysisType);\n\n moFields.setFormButton(jbSave);\n }", "@Override\n public void componentOpened() {\n }", "@Override\n public void componentOpened() {\n }", "@Override\n public void componentOpened() {\n }", "@Override\n public void componentOpened() {\n }", "public void showUserDefinedInputCreateDialog() {\r\n FXMLLoader loader = fxmlLoaderService.getLoader(getClass().getResource(FXML_USER_DEFINED_INPUT_CREATE_DIALOG));\r\n\r\n Parent page;\r\n\r\n try {\r\n page = loader.load();\r\n } catch (IOException ex) {\r\n logger.warn(\"Failed to load: \" + FXML_USER_DEFINED_INPUT_CREATE_DIALOG, ex);\r\n\r\n return;\r\n }\r\n\r\n // set the stage\r\n Stage stage = new Stage();\r\n stage.setTitle(\"Create Custom Input\");\r\n stage.initModality(Modality.APPLICATION_MODAL);\r\n stage.centerOnScreen();\r\n stage.initOwner(mainStage);\r\n\r\n Scene scene = new Scene(page);\r\n scene.getStylesheets().add(getClass().getResource(STYLESHEET_DEFAULT).toExternalForm());\r\n\r\n stage.setScene(scene);\r\n\r\n // Set the item into the controller.\r\n UserDefinedInputCreateDialogController controller = loader.getController();\r\n controller.setStage(stage);\r\n\r\n stage.showAndWait();\r\n }", "public NewProjectDialog(String pt) {\n\t\t\t\n\t\t\tsuper(frame, \"Add new project\");\n\t\t\tresetFields();\n\t\t\tpType = pt;\n\t\t\t\n\t\t\tfinal JDialog npd = this;\n\t\t\t\n\t\t\tpSDate.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpDeadline.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpEndDate.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpBudget.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpTotalCost.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpCompletion.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\t\n\t\t\tint x = frame.getLocation().x;\n\t\t\tint y = frame.getLocation().y;\n\t\t\t\n\t\t\tint pWidth = frame.getSize().width;\n\t\t\tint pHeight = frame.getSize().height;\n\t\t\t\n\t\t\tgetContentPane().setLayout(new BorderLayout());\n\t\t\t\n\t\t\tfinal JPanel fieldPanel = new JPanel();\n\t\t\t\n\t\t\tpCode.setText(portfolio.getNewCode());\n\t\t\tpCode.setEditable(false);\n\t\t\t\n\t\t\tif(pType.equals(\"o\")) {\n\t\t\t\tfieldPanel.setLayout(new GridLayout(7,3));\n\t\t\t\tSystem.out.println(\"ongoing\");\n\t\t\t\tthis.setPreferredSize(new Dimension(600,230));\n\t\t\t} else if(pType.equals(\"f\")) {\n\t\t\t\tfieldPanel.setLayout(new GridLayout(6,3));\n\t\t\t\tSystem.out.println(\"finished\");\n\t\t\t\tthis.setPreferredSize(new Dimension(600,200));\n\t\t\t}\n\t\t\tfieldPanel.add(new JLabel(\"Project Code :\"));\n\t\t\tfieldPanel.add(pCode);\n\t\t\tfieldPanel.add(msgCode);\t\t\n\t\t\tfieldPanel.add(new JLabel(\"Project Name :\"));\n\t\t\tfieldPanel.add(pName);\n\t\t\tfieldPanel.add(msgName);\n\t\t\tfieldPanel.add(new JLabel(\"Client :\"));\n\t\t\tfieldPanel.add(pClient);\n\t\t\tfieldPanel.add(msgClient);\n\t\t\tfieldPanel.add(new JLabel(\"Start date: \"));\n\t\t\tfieldPanel.add(pSDate);\n\t\t\tfieldPanel.add(msgSDate);\n\t\t\tmsgSDate.setText(DATE_FORMAT);\n\t\t\t\n\t\t\tif(pType.equals(\"o\")) {\n\t\t\t\tfieldPanel.add(new JLabel(\"Deadline :\"));\n\t\t\t\tfieldPanel.add(pDeadline);\n\t\t\t\tfieldPanel.add(msgDeadline);\n\t\t\t\tmsgDeadline.setText(DATE_FORMAT);\n\t\t\t\tfieldPanel.add(new JLabel(\"Budget :\"));\n\t\t\t\tfieldPanel.add(pBudget);\n\t\t\t\tfieldPanel.add(msgBudget);\n\t\t\t\tfieldPanel.add(new JLabel(\"Completion :\"));\n\t\t\t\tfieldPanel.add(pCompletion);\t\t\t\n\t\t\t\tfieldPanel.add(msgCompletion);\n\t\t\t\t\n\t\t\t} else if(pType.equals(\"f\")) {\n\t\t\t\tfieldPanel.add(new JLabel(\"End Date :\"));\n\t\t\t\tfieldPanel.add(pEndDate);\n\t\t\t\tfieldPanel.add(msgEndDate);\n\t\t\t\tmsgEndDate.setText(DATE_FORMAT);\n\t\t\t\tfieldPanel.add(new JLabel(\"Total Cost :\"));\n\t\t\t\tfieldPanel.add(pTotalCost);\n\t\t\t\tfieldPanel.add(msgTotalCost);\n\t\t\t}\n\t\t\t\n\t\t\tJPanel optionButtons = new JPanel();\n\t\t\toptionButtons.setLayout(new FlowLayout());\n\t\t\t\n\t\t\tJButton btnAdd = new JButton(\"Add\");\n\t\t\tbtnAdd.addActionListener(new ActionListener() {\n\n\t\t\t\t/**\n\t\t\t\t * Validates the information entered by the user and adds the project to the\n\t\t\t\t * Portfolio object if data is valid.\n\t\t\t\t */\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\n\t\t\t\t\tif(validateForm()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tProject prj = compileProject();\n\t\t\t\t\t\tportfolio.add(prj,config.isUpdateDB());\n\t\t\t\t\t\tif(prj instanceof OngoingProject) {\n\t\t\t\t\t\t\tProjectTableModel tm = (ProjectTableModel) opTable.getModel();\n\t\t\t\t\t\t\ttm.addRow(prj.toTable());\n\t\t\t\t\t\t\topTable.setModel(tm);\n\t\t\t\t\t\t\tupdateCounters();\n\t\t\t\t\t\t\ttoggleSaved(false);\n\t\t\t\t\t\t\tsel.add(pCode.getText());\n\t\t\t\t\t\t} else if (prj instanceof FinishedProject) {\n\t\t\t\t\t\t\tProjectTableModel tm = (ProjectTableModel) fpTable.getModel();\n\t\t\t\t\t\t\ttm.addRow(prj.toTable());\n\t\t\t\t\t\t\tfpTable.setModel(tm);\n\t\t\t\t\t\t\tupdateCounters();\n\t\t\t\t\t\t\ttoggleSaved(false);\n\t\t\t\t\t\t\tsel.add(pCode.getText());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnpd.dispose();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t\toptionButtons.add(btnAdd);\n\t\t\t\n\t\t\tJButton btnClose = new JButton(\"Close\");\n\t\t\tbtnClose.addActionListener(new ActionListener() {\n\n\t\t\t\t/* Closes the NewProjectDialog window. */\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tnpd.dispose();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\toptionButtons.add(btnClose);\n\t\t\tgetContentPane().add(new JLabel(\"Enter the data for your new \" + getPType(pType) + \" project:\"), BorderLayout.PAGE_START);\n\t\t\tthis.add(fieldPanel, BorderLayout.CENTER);\n\t\t\tthis.add(optionButtons, BorderLayout.PAGE_END);\n\n\t\t\tthis.pack();\n\t\t\t\t\t\n\t\t\tint width = this.getSize().width;\n\t\t\tint height = this.getSize().height;\n\t\t\t\n\t\t\tthis.setLocation(new Point((x+pWidth/2-width/2),(y+pHeight/2-height/2)));\n\t\t\tthis.setVisible(true);\n\t\t}", "public void menuFileNew() {\n\n JComboBox<GridType> types = new JComboBox<GridType>();\n final JSlider width;\n final JSlider height;\n\n for (GridType t : GridType.values()) {\n types.addItem(t);\n }\n\n types.setSelectedItem(env.gridType);\n\n //width = new JSlider(new DefaultBoundedRangeModel(30, 1, 2, 100));\n\n int w = gui.env.grid.width;\n int h = gui.env.grid.height;\n\n final JLabel widthLabel = new JLabel(\"Width: \" + w);\n width = new JSlider(0, 100, w);\n width.addChangeListener(new ChangeListener() {\n @Override\n public void stateChanged(ChangeEvent e) {\n widthLabel.setText(\"Width: \" + width.getValue());\n }\n });\n\n final JLabel heightLabel = new JLabel(\"Height: \" + h);\n height = new JSlider(0, 100, h);\n height.addChangeListener(new ChangeListener() {\n @Override\n public void stateChanged(ChangeEvent e) {\n heightLabel.setText(\"Height: \" + height.getValue());\n }\n });\n\n final JComponent[] inputs = new JComponent[]{\n new JLabel(\"Type\"), types,\n widthLabel, width,\n heightLabel, height\n };\n\n //JOptionPane.showMessageDialog(null, inputs, \"New logic...\", JOptionPane.PLAIN_MESSAGE);\n int result = JOptionPane.showConfirmDialog(this, inputs, \"New maze...\", JOptionPane.YES_NO_OPTION, JOptionPane.PLAIN_MESSAGE);\n\n if (result == JOptionPane.YES_OPTION) {\n NewGridEvent event = new NewGridEvent((GridType) types.getSelectedItem(), width.getValue(), height.getValue());\n //gui.env.events.sendEvent(event);\n gui.env.bus.post(event);\n }\n\n\n }", "@Override\n public List<UpdatableItem> createPopup() {\n final List<UpdatableItem> items = new ArrayList<UpdatableItem>();\n \n /* host wizard */\n final MyMenuItem newHostWizardItem =\n new MyMenuItem(Tools.getString(\"EmptyBrowser.NewHostWizard\"),\n HOST_ICON,\n null,\n new AccessMode(ConfigData.AccessType.RO, false),\n new AccessMode(ConfigData.AccessType.RO, false)) {\n private static final long serialVersionUID = 1L;\n \n @Override\n public String enablePredicate() {\n return null;\n }\n \n @Override\n public void action() {\n final AddHostDialog dialog = new AddHostDialog(new Host());\n dialog.showDialogs();\n }\n };\n items.add(newHostWizardItem);\n Tools.getGUIData().registerAddHostButton(newHostWizardItem);\n return items;\n }", "public void createNewSoundBoard() {\n\n dialogCreateSoundBoard = new Dialog(this);\n dialogCreateSoundBoard.setContentView(R.layout.soundboard_create);\n dialogCreateSoundBoard.setTitle(\"Create board\");\n dialogCreateSoundBoard.setCancelable(true);\n\n\n sbName = (EditText) dialogCreateSoundBoard.findViewById(R.id.textfieldcreatesoundboardname);\n sbName.setHint(\"Name\");\n Button createOkButton = (Button) dialogCreateSoundBoard.findViewById(R.id.createSoundBoardButton);\n createOkButton.setOnClickListener(createSoundBoardListener);\n\n Button createCancelButton = (Button) dialogCreateSoundBoard.findViewById(R.id.cancelSoundBoardButton);\n createCancelButton.setOnClickListener(cancelButtonCreateSoundBoardListener);\n\n dialogCreateSoundBoard.show();\n }", "public JComponent createContentPanel() {\n\t\t// Separating the component initialization and configuration\n\t\t// from the layout code makes both parts easier to read.\n\t\tinitControls();\n\t\t//TODO set minimum size\n\t\tFormLayout layout = new FormLayout(\"default, 3dlu, 120dlu:grow\", // cols //$NON-NLS-1$\n\t\t\t\t\"p, 3dlu,p,3dlu,p\"); // rows //$NON-NLS-1$\n\n\t\t// Create a builder that assists in adding components to the container.\n\t\t// Wrap the panel with a standardized border.\n\t\tDefaultFormBuilder builder = new DefaultFormBuilder(layout);\n\t\tbuilder.setDefaultDialogBorder();\n\t\tbuilder.append(Messages.getString(\"RenameDialog.CurrentName\"), oldName); //$NON-NLS-1$\n\t\tbuilder.nextLine(2);\n\t\tbuilder.append(Messages.getString(\"RenameDialog.NewName\"), newName); //$NON-NLS-1$\n\t\treturn builder.getPanel();\n\t}", "public Dialog_create_new_group(java.awt.Frame parent, boolean modal, String mode, String path) {\n\n super(parent, modal);\n\n this.mode = mode;\n\n this.path = path;\n\n this.mode = mode;\n setLookAndFeel();\n\n initComponents();\n\n jButton4.setVisible(false);\n jTextField1.setText(\"\");\n\n if (mode.equalsIgnoreCase(\"edit\")) {\n java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle(\"create_new_group/Dialog_create_new_group\"); // NOI18N \n jButton1.setText(bundle.getString(\"SPEICHERN\"));\n\n setTitle(bundle.getString(\"TITLE\"));\n }\n\n String type = getElementType();\n jLabel15.setText(type);\n\n image32 = new ImageComponent();\n\n //URL url = this.getClass().getClassLoader().getResource(\"create_new_group/std_lib_icon_32.png\");\n String icon32=new File(FrameMain.elementPath + \"/std_lib_icon_32.png\").getAbsolutePath();\n\n image32.setFilename(icon32);\n image32.setLocation(0, 0);\n image32.setPreferredSize(new Dimension(40, 40));\n\n jPanel1.add(image32, BorderLayout.CENTER);\n\n // Fenster mittig anzeigen!\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation(dim.width / 2 - this.getSize().width / 2, dim.height / 2 - this.getSize().height / 2);\n\n DateFormat dateFormat = new SimpleDateFormat(\"dd.MM.yyyy\");\n Date date = new Date();\n txtDate.setText(dateFormat.format(date));\n\n \n load(path);\n }", "@Override\r\n\t\tpublic void create() {\n\t\t\tsuper.create();\r\n\t\t\tsuper.getOKButton().setEnabled(false);\r\n\t\t\tsuper.setTitle(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t\tsuper.setMessage(Messages.MoveUnitsWizardPage1_Select_a_name_source_folder_and_a_);\r\n\t\t\tsuper.getShell().setText(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t}", "private void dialogChanged() {\n\t\tIResource container = ResourcesPlugin.getWorkspace().getRoot()\n\t\t\t\t.findMember(new Path(getContainerName().get(\"ProjectPath\")));\n\n\t\tif(!containerSourceText.getText().isEmpty() && !containerTargetText.getText().isEmpty())\n\t\t{\n\t\t\tokButton.setEnabled(true);\n\t\t}\n\n\t\tif (getContainerName().get(\"ProjectPath\").length() == 0) {\n\t\t\tupdateStatus(\"File container must be specified\");\n\t\t\treturn;\n\t\t}\n\t\tif (container == null\n\t\t\t\t|| (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {\n\t\t\tupdateStatus(\"File container must exist\");\n\t\t\treturn;\n\t\t}\n\t\tif (!container.isAccessible()) {\n\t\t\tupdateStatus(\"Project must be writable\");\n\t\t\treturn;\n\t\t}\n\t\tupdateStatus(null);\n\t}", "private void initializeComponent() throws Exception {\n System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(FormPerioEdit.class);\n this.butCancel = new OpenDental.UI.Button();\n this.butOK = new OpenDental.UI.Button();\n this.textDate = new OpenDental.ValidDate();\n this.label1 = new System.Windows.Forms.Label();\n this.listProv = new System.Windows.Forms.ListBox();\n this.label2 = new System.Windows.Forms.Label();\n this.SuspendLayout();\n //\n // butCancel\n //\n this.butCancel.setAdjustImageLocation(new System.Drawing.Point(0, 0));\n this.butCancel.setAutosize(true);\n this.butCancel.setBtnShape(OpenDental.UI.enumType.BtnShape.Rectangle);\n this.butCancel.setBtnStyle(OpenDental.UI.enumType.XPStyle.Silver);\n this.butCancel.setCornerRadius(4F);\n this.butCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;\n this.butCancel.Location = new System.Drawing.Point(347, 164);\n this.butCancel.Name = \"butCancel\";\n this.butCancel.Size = new System.Drawing.Size(75, 26);\n this.butCancel.TabIndex = 0;\n this.butCancel.Text = \"&Cancel\";\n this.butCancel.Click += new System.EventHandler(this.butCancel_Click);\n //\n // butOK\n //\n this.butOK.setAdjustImageLocation(new System.Drawing.Point(0, 0));\n this.butOK.setAutosize(true);\n this.butOK.setBtnShape(OpenDental.UI.enumType.BtnShape.Rectangle);\n this.butOK.setBtnStyle(OpenDental.UI.enumType.XPStyle.Silver);\n this.butOK.setCornerRadius(4F);\n this.butOK.Location = new System.Drawing.Point(347, 123);\n this.butOK.Name = \"butOK\";\n this.butOK.Size = new System.Drawing.Size(75, 26);\n this.butOK.TabIndex = 1;\n this.butOK.Text = \"&OK\";\n this.butOK.Click += new System.EventHandler(this.butOK_Click);\n //\n // textDate\n //\n this.textDate.Location = new System.Drawing.Point(151, 18);\n this.textDate.Name = \"textDate\";\n this.textDate.Size = new System.Drawing.Size(100, 20);\n this.textDate.TabIndex = 2;\n //\n // label1\n //\n this.label1.Location = new System.Drawing.Point(14, 16);\n this.label1.Name = \"label1\";\n this.label1.Size = new System.Drawing.Size(136, 23);\n this.label1.TabIndex = 3;\n this.label1.Text = \"Exam Date\";\n this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\n //\n // listProv\n //\n this.listProv.Location = new System.Drawing.Point(151, 55);\n this.listProv.Name = \"listProv\";\n this.listProv.Size = new System.Drawing.Size(120, 134);\n this.listProv.TabIndex = 4;\n //\n // label2\n //\n this.label2.Location = new System.Drawing.Point(13, 51);\n this.label2.Name = \"label2\";\n this.label2.Size = new System.Drawing.Size(136, 23);\n this.label2.TabIndex = 5;\n this.label2.Text = \"Provider\";\n this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\n //\n // FormPerioEdit\n //\n this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);\n this.ClientSize = new System.Drawing.Size(455, 215);\n this.Controls.Add(this.label2);\n this.Controls.Add(this.listProv);\n this.Controls.Add(this.label1);\n this.Controls.Add(this.textDate);\n this.Controls.Add(this.butOK);\n this.Controls.Add(this.butCancel);\n this.Icon = ((System.Drawing.Icon)(resources.GetObject(\"$this.Icon\")));\n this.MaximizeBox = false;\n this.MinimizeBox = false;\n this.Name = \"FormPerioEdit\";\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\n this.Text = \"Edit Perio Date\";\n this.Load += new System.EventHandler(this.FormPerioEdit_Load);\n this.ResumeLayout(false);\n this.PerformLayout();\n }", "public BaseDialog create()\n {\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n // instantiate the dialog with the custom Theme\n final BaseDialog dialog = new BaseDialog(context, R.style.Dialog);\n\n View layout = inflater.inflate(R.layout.view_shared_basedialog, null);\n\n //set the dialog's image\n this.icon = (ImageView) layout.findViewById(R.id.view_shared_basedialog_icon);\n\n if (this.imageResource > 0 || this.imageUrl != null)\n {\n this.icon.setVisibility(View.VISIBLE);\n if (this.imageResource > 0)\n {\n this.icon.setBackgroundResource(this.imageResource);\n }\n else\n {\n// TextureRender.getInstance().setBitmap(this.imageUrl, this.icon, R.drawable.no_data_error_image);\n }\n }\n else\n {\n this.icon.setVisibility(View.GONE);\n }\n\n // set check box's text and default value\n this.checkLayout = layout.findViewById(R.id.view_shared_basedialog_checkbox_layout);\n this.checkBox = (CheckBox) layout.findViewById(R.id.view_shared_basedialog_checkbox);\n this.checkBoxTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_checkbox_text);\n\n if (!TextUtils.isEmpty(this.checkBoxText))\n {\n this.checkLayout.setVisibility(View.VISIBLE);\n this.checkBoxTextView.setText(this.checkBoxText);\n this.checkBox.setChecked(checkBoxDefaultState);\n }\n else\n {\n this.checkLayout.setVisibility(View.GONE);\n }\n\n // set the dialog main title and sub title\n this.maintitleTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_maintitle_textview);\n this.subtitleTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_subtitle_textview);\n this.titleDivideTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_titledivide_textview);\n if (!TextUtils.isEmpty(title1))\n {\n this.maintitleTextView.setText(title1);\n if (this.title1BoldAndBig)\n {\n this.maintitleTextView.setTypeface(null, Typeface.BOLD);\n this.maintitleTextView.setTextSize(17);\n }\n\n this.maintitleTextView.setVisibility(View.VISIBLE);\n }\n else\n {\n this.maintitleTextView.setVisibility(View.GONE);\n }\n\n if (!TextUtils.isEmpty(title2))\n {\n this.subtitleTextView.setText(title2);\n this.subtitleTextView.setVisibility(View.VISIBLE);\n }\n else\n {\n this.subtitleTextView.setVisibility(View.GONE);\n }\n this.titleDivideTextView.setVisibility(View.GONE);\n\n // set the confirm button\n this.positiveButton = ((Button) layout.findViewById(R.id.view_shared_basedialog_positivebutton));\n if (!TextUtils.isEmpty(positiveButtonText))\n {\n this.positiveButton.setText(positiveButtonText);\n this.positiveButton.setVisibility(View.VISIBLE);\n if (positiveButtonClickListener != null)\n {\n this.positiveButton.setOnClickListener(new View.OnClickListener()\n {\n public void onClick(View v)\n {\n positiveButtonClickListener.onClick(dialog, DialogInterface.BUTTON_POSITIVE);\n if (checkBox.isChecked()&&onCheckBoxListener!=null)\n {\n onCheckBoxListener.checkedOperation();\n }\n }\n });\n }\n }\n else\n {\n // if no confirm button just set the visibility to GONE\n this.positiveButton.setVisibility(View.GONE);\n }\n\n // set the cancel button\n this.negativeButton = ((Button) layout.findViewById(R.id.view_shared_basedialog_negativebutton));\n if (!TextUtils.isEmpty(negativeButtonText))\n {\n this.negativeButton.setText(negativeButtonText);\n this.negativeButton.setVisibility(View.VISIBLE);\n if (negativeButtonClickListener != null)\n {\n this.negativeButton.setOnClickListener(new View.OnClickListener()\n {\n public void onClick(View v)\n {\n negativeButtonClickListener.onClick(dialog, DialogInterface.BUTTON_NEGATIVE);\n }\n });\n }\n }\n else\n {\n // if no confirm button just set the visibility to GONE\n this.negativeButton.setVisibility(View.GONE);\n }\n\n // set button's background\n this.buttonDivideTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_buttondivide_textview);\n if (!TextUtils.isEmpty(negativeButtonText) && !TextUtils.isEmpty(negativeButtonText))\n {\n this.buttonDivideTextView.setVisibility(View.VISIBLE);\n this.positiveButton.setBackgroundResource(R.drawable.view_shared_corner_round_rightbottom);\n this.negativeButton.setBackgroundResource(R.drawable.view_shared_corner_round_leftbottom);\n }\n else\n {\n this.buttonDivideTextView.setVisibility(View.GONE);\n this.positiveButton.setBackgroundResource(R.drawable.view_shared_corner_round_bottom);\n this.negativeButton.setBackgroundResource(R.drawable.view_shared_corner_round_bottom);\n }\n\n // set the content message\n this.contentLayout = layout.findViewById(R.id.view_shared_basedialog_content_layout);\n if (!TextUtils.isEmpty(message))\n {\n this.contentTextView = ((TextView) layout.findViewById(R.id.view_shared_basedialog_content_textview));\n this.contentTextView.setText(message);\n this.contentTextView.setMovementMethod(ScrollingMovementMethod.getInstance());\n }\n else if (contentView != null)\n {\n // if no message set\n // add the contentView to the dialog body\n ((ViewGroup) this.contentLayout).removeAllViews();\n ((ViewGroup) this.contentLayout).addView(contentView, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n }\n else\n {\n this.contentLayout.setVisibility(View.GONE);\n }\n\n int[] params = Utils.getLayoutParamsForHeroImage();\n dialog.setContentView(layout, new ViewGroup.LayoutParams(params[0]*4/5, ViewGroup.LayoutParams.MATCH_PARENT));\n return dialog;\n }", "@Override\n protected Control createDialogArea(Composite parent) {\n Composite container = (Composite) super.createDialogArea(parent);\n container.setLayout(new FormLayout());\n\n updateListener = new Listener() {\n\n public void handleEvent(Event e) {\n if (tblRoutes.getSelectionIndex() != -1) {\n TableItem item = tblRoutes.getItem(tblRoutes.getSelectionIndex());\n RouteWrapper wrapper = (RouteWrapper) item.getData();\n\n if (!updateLock) {\n updateLock = true;\n wrapper.setBreakAfterRoute(cmdSetBreakAfterRoute.getSelection());\n wrapper.setRoutePattern(txtRoutePattern.getText());\n wrapper.setDynamicSequence(CMB_CAPTION_REGISTRY_REFERENCE.equals(cmbSequenceType.getText()));\n updateLock = false;\n }\n\n }\n }\n };\n\n Label lblRouters = new Label(container, SWT.NONE);\n FormData fd_lblRouters = new FormData();\n fd_lblRouters.right = new FormAttachment(0, 75);\n fd_lblRouters.top = new FormAttachment(0, 10);\n fd_lblRouters.left = new FormAttachment(0, 10);\n lblRouters.setLayoutData(fd_lblRouters);\n lblRouters.setText(\"Routes\");\n\n tblRoutes = new Table(container, SWT.BORDER | SWT.FULL_SELECTION);\n FormData fd_tblRouters = new FormData();\n fd_tblRouters.top = new FormAttachment(lblRouters, 9);\n fd_tblRouters.left = new FormAttachment(0, 10);\n fd_tblRouters.bottom = new FormAttachment(0, 169);\n tblRoutes.setHeaderVisible(true);\n\n tblRoutes.setLayoutData(fd_tblRouters);\n tblRoutes.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n updateSelection();\n }\n });\n\n TableColumn tblclmnRoutes = new TableColumn(tblRoutes, SWT.NONE);\n tblclmnRoutes.setWidth(315);\n tblclmnRoutes.setText(\"Routes\");\n\n cmdRouteAdd = new Button(container, SWT.NONE);\n FormData fd_cmdRouteAdd = new FormData();\n fd_tblRouters.right = new FormAttachment(cmdRouteAdd, -6);\n\n fd_cmdRouteAdd.top = new FormAttachment(0, 36);\n fd_cmdRouteAdd.left = new FormAttachment(0, 334);\n cmdRouteAdd.setLayoutData(fd_cmdRouteAdd);\n cmdRouteAdd.setText(\"Add\");\n cmdRouteAdd.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n RouterTargetContainer routerTargetContainer = EsbFactory.eINSTANCE.createRouterTargetContainer();\n RouteWrapper wrapper = new RouteWrapper(routerTargetContainer);\n TableItem item = bindRoute(wrapper);\n tblRoutes.select(tblRoutes.indexOf(item));\n updateSelection();\n }\n });\n\n cmdRouteRemove = new Button(container, SWT.NONE);\n FormData fd_cmdRouteRemove = new FormData();\n fd_cmdRouteRemove.top = new FormAttachment(cmdRouteAdd, 6);\n fd_cmdRouteRemove.right = new FormAttachment(cmdRouteAdd, 0, SWT.RIGHT);\n fd_cmdRouteRemove.left = new FormAttachment(0, 334);\n cmdRouteRemove.setLayoutData(fd_cmdRouteRemove);\n cmdRouteRemove.setText(\"Remove\");\n cmdRouteRemove.setEnabled(false);\n cmdRouteRemove.addSelectionListener(new SelectionAdapter() {\n\n public void widgetSelected(SelectionEvent e) {\n int selectedIndex = tblRoutes.getSelectionIndex();\n if (-1 != selectedIndex) {\n unbindRoute(selectedIndex);\n // Select the next available candidate for deletion.\n if (selectedIndex < tblRoutes.getItemCount()) {\n tblRoutes.select(selectedIndex);\n } else {\n tblRoutes.select(selectedIndex - 1);\n }\n }\n }\n });\n Label label = new Label(container, SWT.SEPARATOR | SWT.HORIZONTAL);\n fd_cmdRouteAdd.right = new FormAttachment(label, 0, SWT.RIGHT);\n FormData fd_label = new FormData();\n fd_label.right = new FormAttachment(100, -22);\n fd_label.left = new FormAttachment(0, 10);\n fd_label.top = new FormAttachment(tblRoutes, 6);\n label.setLayoutData(fd_label);\n\n comConfig = new Composite(container, SWT.NONE);\n FormData fd_comConfig = new FormData();\n fd_comConfig.bottom = new FormAttachment(100, -10);\n fd_comConfig.left = new FormAttachment(0, 11);\n fd_comConfig.right = new FormAttachment(100, -22);\n fd_comConfig.top = new FormAttachment(0, 177);\n comConfig.setLayoutData(fd_comConfig);\n comConfig.setLayout(new GridLayout(3, false));\n comConfig.setEnabled(false);\n\n cmdSetBreakAfterRoute = new Button(comConfig, SWT.CHECK);\n cmdSetBreakAfterRoute.setText(\"Break After Route\");\n cmdSetBreakAfterRoute.addListener(SWT.Selection, updateListener);\n new Label(comConfig, SWT.NONE);\n new Label(comConfig, SWT.NONE);\n\n Label lblRouteExpression = new Label(comConfig, SWT.NONE);\n lblRouteExpression.setText(\"Route expression\");\n\n txtRouteExpression = new Text(comConfig, SWT.BORDER);\n txtRouteExpression.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n txtRouteExpression.addListener(SWT.Modify, updateListener);\n txtRouteExpression.setEditable(false);\n\n Button cmdSetRouteExpression = new Button(comConfig, SWT.NONE);\n cmdSetRouteExpression.setText(\"..\");\n cmdSetRouteExpression.addSelectionListener(new SelectionAdapter() {\n\n public void widgetSelected(SelectionEvent e) {\n if (tblRoutes.getSelectionIndex() != -1) {\n TableItem item = tblRoutes.getItem(tblRoutes.getSelectionIndex());\n RouteWrapper wrapper = (RouteWrapper) item.getData();\n NamespacedProperty routeExpression = EsbFactory.eINSTANCE\n .copyNamespacedProperty(wrapper.getRouteExpression());\n NamespacedPropertyEditorDialog propertyEditor = new NamespacedPropertyEditorDialog(getShell(),\n routeExpression);\n propertyEditor.open();\n wrapper.setRouteExpression(routeExpression);\n txtRouteExpression.setText(routeExpression.getPropertyValue());\n }\n\n super.widgetSelected(e);\n }\n });\n\n Label lblRoutePattern = new Label(comConfig, SWT.NONE);\n lblRoutePattern.setText(\"Route pattern\");\n\n txtRoutePattern = new Text(comConfig, SWT.BORDER);\n txtRoutePattern.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n txtRoutePattern.addListener(SWT.Modify, updateListener);\n new Label(comConfig, SWT.NONE);\n\n Label lblSequenceType = new Label(comConfig, SWT.NONE);\n lblSequenceType.setText(\"Sequence type\");\n\n cmbSequenceType = new Combo(comConfig, SWT.READ_ONLY);\n cmbSequenceType.setItems(new String[] { CMB_CAPTION_ANONYMOUS, CMB_CAPTION_REGISTRY_REFERENCE });\n cmbSequenceType.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n cmbSequenceType.select(0);\n cmbSequenceType.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n if (tblRoutes.getSelectionIndex() != -1) {\n TableItem item = tblRoutes.getItem(tblRoutes.getSelectionIndex());\n RouteWrapper wrapper = (RouteWrapper) item.getData();\n if (cmbSequenceType.getSelectionIndex() == 1) {\n lblSequenceKey.setEnabled(true);\n txtSequenceKey.setEnabled(true);\n cmdSetSequenceKey.setEnabled(true);\n wrapper.setDynamicSequence(true);\n } else {\n lblSequenceKey.setEnabled(false);\n txtSequenceKey.setEnabled(false);\n cmdSetSequenceKey.setEnabled(false);\n wrapper.setDynamicSequence(false);\n }\n }\n\n }\n });\n new Label(comConfig, SWT.NONE);\n\n lblSequenceKey = new Label(comConfig, SWT.NONE);\n lblSequenceKey.setText(\"Sequence key\");\n lblSequenceKey.setEnabled(false);\n\n txtSequenceKey = new Text(comConfig, SWT.BORDER);\n txtSequenceKey.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n txtSequenceKey.setEnabled(false);\n txtSequenceKey.setEditable(false);\n\n cmdSetSequenceKey = new Button(comConfig, SWT.NONE);\n cmdSetSequenceKey.setText(\"..\");\n cmdSetSequenceKey.setEnabled(false);\n cmdSetSequenceKey.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n if (tblRoutes.getSelectionIndex() != -1) {\n TableItem item = tblRoutes.getItem(tblRoutes.getSelectionIndex());\n RouteWrapper wrapper = (RouteWrapper) item.getData();\n RegistryKeyProperty sequenceKey = EsbFactory.eINSTANCE\n .copyRegistryKeyProperty(wrapper.getSequenceKey());\n RegistryKeyPropertyEditorDialog dialog = new RegistryKeyPropertyEditorDialog(getShell(), SWT.TITLE,\n sequenceKey,\n RegistryKeyPropertyUtil.findLocalNamedEntities(wrapper.getContainer().getTarget()));\n dialog.create();\n dialog.getShell().setSize(520, 180);\n dialog.getShell().setText(\"Resource Key Editor\");\n dialog.open();\n\n if (dialog.getReturnCode() == Window.OK) {\n wrapper.setSequenceKey(sequenceKey);\n txtSequenceKey.setText(wrapper.getSequenceKey().getKeyValue());\n }\n\n }\n super.widgetSelected(e);\n }\n });\n\n Label lblEndpointType = new Label(comConfig, SWT.NONE);\n lblEndpointType.setText(\"Endpoint type\");\n\n cmbEndpointType = new Combo(comConfig, SWT.READ_ONLY);\n cmbEndpointType\n .setItems(new String[] { CMB_CAPTION_NONE, CMB_CAPTION_ANONYMOUS, CMB_CAPTION_REGISTRY_REFERENCE });\n cmbEndpointType.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n cmbEndpointType.select(0);\n cmbEndpointType.setEnabled(false); // TODO: implement endpoint support\n cmbEndpointType.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n if (cmbEndpointType.getSelectionIndex() == 2) {\n lblEndpointKey.setEnabled(true);\n txtEndpointKey.setEnabled(true);\n cmdSetEndpointKey.setEnabled(true);\n } else {\n lblEndpointKey.setEnabled(false);\n txtEndpointKey.setEnabled(false);\n cmdSetEndpointKey.setEnabled(false);\n }\n }\n });\n new Label(comConfig, SWT.NONE);\n\n lblEndpointKey = new Label(comConfig, SWT.NONE);\n lblEndpointKey.setText(\"Endpoint key\");\n lblEndpointKey.setEnabled(false);\n\n txtEndpointKey = new Text(comConfig, SWT.BORDER);\n txtEndpointKey.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n txtEndpointKey.setEnabled(false);\n\n cmdSetEndpointKey = new Button(comConfig, SWT.NONE);\n cmdSetEndpointKey.setText(\"..\");\n cmdSetEndpointKey.setEnabled(false);\n\n populateRoutes();\n\n return container;\n }", "public NewDialog() {\n\t\t\t// super((java.awt.Frame)null, \"New Document\");\n\t\t\tsuper(\"JFLAP 7.0\");\n\t\t\tgetContentPane().setLayout(new GridLayout(0, 1));\n\t\t\tinitMenu();\n\t\t\tinitComponents();\n\t\t\tsetResizable(false);\n\t\t\tpack();\n\t\t\tthis.setLocation(50, 50);\n\n\t\t\taddWindowListener(new WindowAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void windowClosing(final WindowEvent event) {\n\t\t\t\t\tif (Universe.numberOfFrames() > 0) {\n\t\t\t\t\t\tNewDialog.this.setVisible(false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tQuitAction.beginQuit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}", "private void initializeComponent() throws Exception {\n System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(FormSigElementDefEdit.class);\n this.label1 = new System.Windows.Forms.Label();\n this.listType = new System.Windows.Forms.ListBox();\n this.label2 = new System.Windows.Forms.Label();\n this.textSigText = new System.Windows.Forms.TextBox();\n this.label3 = new System.Windows.Forms.Label();\n this.label5 = new System.Windows.Forms.Label();\n this.label6 = new System.Windows.Forms.Label();\n this.butColor = new System.Windows.Forms.Button();\n this.label7 = new System.Windows.Forms.Label();\n this.label8 = new System.Windows.Forms.Label();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.butDeleteSound = new OpenDental.UI.Button();\n this.butRecord = new OpenDental.UI.Button();\n this.butExport = new OpenDental.UI.Button();\n this.butImport = new OpenDental.UI.Button();\n this.butPlay = new OpenDental.UI.Button();\n this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();\n this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();\n this.butDelete = new OpenDental.UI.Button();\n this.textLightRow = new OpenDental.ValidNum();\n this.butOK = new OpenDental.UI.Button();\n this.butCancel = new OpenDental.UI.Button();\n this.groupBox1.SuspendLayout();\n this.SuspendLayout();\n //\n // label1\n //\n this.label1.ImageAlign = System.Drawing.ContentAlignment.TopRight;\n this.label1.Location = new System.Drawing.Point(63, 13);\n this.label1.Name = \"label1\";\n this.label1.Size = new System.Drawing.Size(100, 20);\n this.label1.TabIndex = 2;\n this.label1.Text = \"Type\";\n this.label1.TextAlign = System.Drawing.ContentAlignment.TopRight;\n //\n // listType\n //\n this.listType.FormattingEnabled = true;\n this.listType.Location = new System.Drawing.Point(168, 12);\n this.listType.Name = \"listType\";\n this.listType.Size = new System.Drawing.Size(106, 43);\n this.listType.TabIndex = 3;\n //\n // label2\n //\n this.label2.ImageAlign = System.Drawing.ContentAlignment.TopRight;\n this.label2.Location = new System.Drawing.Point(63, 70);\n this.label2.Name = \"label2\";\n this.label2.Size = new System.Drawing.Size(100, 20);\n this.label2.TabIndex = 4;\n this.label2.Text = \"Text\";\n this.label2.TextAlign = System.Drawing.ContentAlignment.TopRight;\n //\n // textSigText\n //\n this.textSigText.Location = new System.Drawing.Point(169, 67);\n this.textSigText.Name = \"textSigText\";\n this.textSigText.Size = new System.Drawing.Size(105, 20);\n this.textSigText.TabIndex = 0;\n //\n // label3\n //\n this.label3.ImageAlign = System.Drawing.ContentAlignment.TopRight;\n this.label3.Location = new System.Drawing.Point(281, 56);\n this.label3.Name = \"label3\";\n this.label3.Size = new System.Drawing.Size(304, 40);\n this.label3.TabIndex = 6;\n this.label3.Text = \"This is the text as it should show in the list or the username. Typed messages a\" + \"re handled separately.\";\n this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;\n //\n // label5\n //\n this.label5.ImageAlign = System.Drawing.ContentAlignment.TopRight;\n this.label5.Location = new System.Drawing.Point(63, 292);\n this.label5.Name = \"label5\";\n this.label5.Size = new System.Drawing.Size(100, 20);\n this.label5.TabIndex = 8;\n this.label5.Text = \"Light Row\";\n this.label5.TextAlign = System.Drawing.ContentAlignment.TopRight;\n //\n // label6\n //\n this.label6.ImageAlign = System.Drawing.ContentAlignment.TopRight;\n this.label6.Location = new System.Drawing.Point(63, 332);\n this.label6.Name = \"label6\";\n this.label6.Size = new System.Drawing.Size(100, 20);\n this.label6.TabIndex = 9;\n this.label6.Text = \"Light Color\";\n this.label6.TextAlign = System.Drawing.ContentAlignment.TopRight;\n //\n // butColor\n //\n this.butColor.FlatStyle = System.Windows.Forms.FlatStyle.Popup;\n this.butColor.Location = new System.Drawing.Point(169, 328);\n this.butColor.Name = \"butColor\";\n this.butColor.Size = new System.Drawing.Size(30, 20);\n this.butColor.TabIndex = 11;\n this.butColor.Click += new System.EventHandler(this.butColor_Click);\n //\n // label7\n //\n this.label7.ImageAlign = System.Drawing.ContentAlignment.TopRight;\n this.label7.Location = new System.Drawing.Point(283, 284);\n this.label7.Name = \"label7\";\n this.label7.Size = new System.Drawing.Size(278, 73);\n this.label7.TabIndex = 12;\n this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;\n //\n // label8\n //\n this.label8.ImageAlign = System.Drawing.ContentAlignment.TopRight;\n this.label8.Location = new System.Drawing.Point(160, 15);\n this.label8.Name = \"label8\";\n this.label8.Size = new System.Drawing.Size(267, 100);\n this.label8.TabIndex = 13;\n //\n // groupBox1\n //\n this.groupBox1.Controls.Add(this.butDeleteSound);\n this.groupBox1.Controls.Add(this.butRecord);\n this.groupBox1.Controls.Add(this.butExport);\n this.groupBox1.Controls.Add(this.label8);\n this.groupBox1.Controls.Add(this.butImport);\n this.groupBox1.Controls.Add(this.butPlay);\n this.groupBox1.Location = new System.Drawing.Point(121, 93);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(464, 173);\n this.groupBox1.TabIndex = 17;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"Sound\";\n //\n // butDeleteSound\n //\n this.butDeleteSound.setAdjustImageLocation(new System.Drawing.Point(0, 0));\n this.butDeleteSound.setAutosize(true);\n this.butDeleteSound.setBtnShape(OpenDental.UI.enumType.BtnShape.Rectangle);\n this.butDeleteSound.setBtnStyle(OpenDental.UI.enumType.XPStyle.Silver);\n this.butDeleteSound.setCornerRadius(4F);\n this.butDeleteSound.Location = new System.Drawing.Point(47, 49);\n this.butDeleteSound.Name = \"butDeleteSound\";\n this.butDeleteSound.Size = new System.Drawing.Size(55, 23);\n this.butDeleteSound.TabIndex = 19;\n this.butDeleteSound.Text = \"Delete\";\n this.butDeleteSound.Click += new System.EventHandler(this.butDeleteSound_Click);\n //\n // butRecord\n //\n this.butRecord.setAdjustImageLocation(new System.Drawing.Point(0, 0));\n this.butRecord.setAutosize(true);\n this.butRecord.setBtnShape(OpenDental.UI.enumType.BtnShape.Rectangle);\n this.butRecord.setBtnStyle(OpenDental.UI.enumType.XPStyle.Silver);\n this.butRecord.setCornerRadius(4F);\n this.butRecord.Location = new System.Drawing.Point(47, 78);\n this.butRecord.Name = \"butRecord\";\n this.butRecord.Size = new System.Drawing.Size(96, 23);\n this.butRecord.TabIndex = 18;\n this.butRecord.Text = \"Launch Recorder\";\n this.butRecord.Click += new System.EventHandler(this.butRecord_Click);\n //\n // butExport\n //\n this.butExport.setAdjustImageLocation(new System.Drawing.Point(0, 0));\n this.butExport.setAutosize(true);\n this.butExport.setBtnShape(OpenDental.UI.enumType.BtnShape.Rectangle);\n this.butExport.setBtnStyle(OpenDental.UI.enumType.XPStyle.Silver);\n this.butExport.setCornerRadius(4F);\n this.butExport.Location = new System.Drawing.Point(47, 136);\n this.butExport.Name = \"butExport\";\n this.butExport.Size = new System.Drawing.Size(55, 23);\n this.butExport.TabIndex = 17;\n this.butExport.Text = \"Export\";\n this.butExport.Click += new System.EventHandler(this.butExport_Click);\n //\n // butImport\n //\n this.butImport.setAdjustImageLocation(new System.Drawing.Point(0, 0));\n this.butImport.setAutosize(true);\n this.butImport.setBtnShape(OpenDental.UI.enumType.BtnShape.Rectangle);\n this.butImport.setBtnStyle(OpenDental.UI.enumType.XPStyle.Silver);\n this.butImport.setCornerRadius(4F);\n this.butImport.Location = new System.Drawing.Point(47, 107);\n this.butImport.Name = \"butImport\";\n this.butImport.Size = new System.Drawing.Size(55, 23);\n this.butImport.TabIndex = 16;\n this.butImport.Text = \"Import\";\n this.butImport.Click += new System.EventHandler(this.butImport_Click);\n //\n // butPlay\n //\n this.butPlay.setAdjustImageLocation(new System.Drawing.Point(0, 0));\n this.butPlay.setAutosize(true);\n this.butPlay.setBtnShape(OpenDental.UI.enumType.BtnShape.Rectangle);\n this.butPlay.setBtnStyle(OpenDental.UI.enumType.XPStyle.Silver);\n this.butPlay.setCornerRadius(4F);\n this.butPlay.Location = new System.Drawing.Point(47, 20);\n this.butPlay.Name = \"butPlay\";\n this.butPlay.Size = new System.Drawing.Size(55, 23);\n this.butPlay.TabIndex = 15;\n this.butPlay.Text = \"Play\";\n this.butPlay.Click += new System.EventHandler(this.butPlay_Click);\n //\n // openFileDialog1\n //\n this.openFileDialog1.FileName = \"openFileDialog1\";\n //\n // butDelete\n //\n this.butDelete.setAdjustImageLocation(new System.Drawing.Point(0, 0));\n this.butDelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));\n this.butDelete.setAutosize(true);\n this.butDelete.setBtnShape(OpenDental.UI.enumType.BtnShape.Rectangle);\n this.butDelete.setBtnStyle(OpenDental.UI.enumType.XPStyle.Silver);\n this.butDelete.setCornerRadius(4F);\n this.butDelete.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;\n this.butDelete.Location = new System.Drawing.Point(45, 400);\n this.butDelete.Name = \"butDelete\";\n this.butDelete.Size = new System.Drawing.Size(82, 26);\n this.butDelete.TabIndex = 14;\n this.butDelete.Text = \"&Delete\";\n this.butDelete.Click += new System.EventHandler(this.butDelete_Click);\n //\n // textLightRow\n //\n this.textLightRow.Location = new System.Drawing.Point(169, 289);\n this.textLightRow.setMaxVal(255);\n this.textLightRow.setMinVal(0);\n this.textLightRow.Name = \"textLightRow\";\n this.textLightRow.Size = new System.Drawing.Size(51, 20);\n this.textLightRow.TabIndex = 1;\n //\n // butOK\n //\n this.butOK.setAdjustImageLocation(new System.Drawing.Point(0, 0));\n this.butOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));\n this.butOK.setAutosize(true);\n this.butOK.setBtnShape(OpenDental.UI.enumType.BtnShape.Rectangle);\n this.butOK.setBtnStyle(OpenDental.UI.enumType.XPStyle.Silver);\n this.butOK.setCornerRadius(4F);\n this.butOK.Location = new System.Drawing.Point(442, 400);\n this.butOK.Name = \"butOK\";\n this.butOK.Size = new System.Drawing.Size(75, 26);\n this.butOK.TabIndex = 2;\n this.butOK.Text = \"&OK\";\n this.butOK.Click += new System.EventHandler(this.butOK_Click);\n //\n // butCancel\n //\n this.butCancel.setAdjustImageLocation(new System.Drawing.Point(0, 0));\n this.butCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));\n this.butCancel.setAutosize(true);\n this.butCancel.setBtnShape(OpenDental.UI.enumType.BtnShape.Rectangle);\n this.butCancel.setBtnStyle(OpenDental.UI.enumType.XPStyle.Silver);\n this.butCancel.setCornerRadius(4F);\n this.butCancel.Location = new System.Drawing.Point(544, 400);\n this.butCancel.Name = \"butCancel\";\n this.butCancel.Size = new System.Drawing.Size(75, 26);\n this.butCancel.TabIndex = 3;\n this.butCancel.Text = \"&Cancel\";\n this.butCancel.Click += new System.EventHandler(this.butCancel_Click);\n //\n // FormSigElementDefEdit\n //\n this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);\n this.ClientSize = new System.Drawing.Size(671, 451);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.butDelete);\n this.Controls.Add(this.label7);\n this.Controls.Add(this.butColor);\n this.Controls.Add(this.textLightRow);\n this.Controls.Add(this.label6);\n this.Controls.Add(this.label5);\n this.Controls.Add(this.label3);\n this.Controls.Add(this.textSigText);\n this.Controls.Add(this.label2);\n this.Controls.Add(this.listType);\n this.Controls.Add(this.label1);\n this.Controls.Add(this.butOK);\n this.Controls.Add(this.butCancel);\n this.Icon = ((System.Drawing.Icon)(resources.GetObject(\"$this.Icon\")));\n this.MaximizeBox = false;\n this.MinimizeBox = false;\n this.Name = \"FormSigElementDefEdit\";\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\n this.Text = \"Edit Message Element\";\n this.Load += new System.EventHandler(this.FormSigElementDefEdit_Load);\n this.groupBox1.ResumeLayout(false);\n this.ResumeLayout(false);\n this.PerformLayout();\n }", "private void setUpDialoguebox() {\n\t\tinput = new CTS_GUI_Dialoguebox();\n\t\tinput.setTitle(\"Settings\");\n\t\tBorderPane pane = new BorderPane();\n\t\tLocalTime t = LocalTime.now();\n\t\tLocalDate d = LocalDate.now();\n\t\tuicontrols = new VBox(10);\n\t\tHBox box0 = new HBox(5);\n\t\tbox0.getChildren().addAll(new Label(\"Latitude: \"),new TextField(\"0\"));\n\t\tHBox box1 = new HBox(5);\n\t\tbox1.getChildren().addAll(new Label(\"Longitude: \"),new TextField(\"0\"));\n\t\tHBox box2 = new HBox(5);\n\t\tbox2.getChildren().addAll(new Label(\"Date: \"),new TextField(d.toString()));\n\t\tTextField time = new TextField(t.getHour() + \":\" + t.getMinute() + \":\" + (int) floor(t.getSecond()));\n\t\tHBox box3 = new HBox(5);\n\t\tbox3.getChildren().addAll(new Label(\"Time: \"),time);\n\t\t// Check boxes\n\t\tHBox box5 = new HBox(5);\n\t\tCheckBox c1 = new CheckBox(\"Plot Stars\");\n\t\tc1.setSelected(true);\n\t\tCheckBox c2 = new CheckBox(\"Plot DSOs\");\n\t\tc2.setSelected(true);\n\t\tCheckBox c3 = new CheckBox(\"Plot Constellations\");\n\t\tc3.setSelected(true);\n\t\tCheckBox c4 = new CheckBox(\"Plot Planets\");\n\t\tc4.setSelected(true);\n\t\tbox5.getChildren().addAll(c1,c2,c3,c4);\n\t\t// Color Picker\n\t\t// 0 = Star color, 1 = Low mag star, 2 = Very low mag star.\n\t\t// 3 = DSO, 4 = Sky background, 5 = Circle around sky background\n\t\t// 6 = Overall background, 7 = Lat/long txt color, 8 = Constellation line color.\n\t\tHBox box6 = new HBox(5);\n\t\tTextField colorSet = new TextField(\"255,255,255,1\");\n\t\tButton setcolorbutton = new Button(\"Submit Color\");\n\t\tbox6.getChildren().addAll(new Label(\"Color to Set: \"),colorSet,setcolorbutton,new Label(\"[PREVIEW COLOR]\"));\n\t\tsetcolorbutton.setOnAction((event) -> { colorPickerHander(); });\n MenuBar mainmenu = new MenuBar();\n Menu colorpickermenu = new Menu(\"Set Custom Colors\");\n String[] colorstrs = {\"Star Color\",\"Low Magnituide Star Color\",\"Very Low Magnituide Star Color\", \"Deep Space Object Color\",\"Sky Background Color\",\n \t\t\"Circle Around Sky Background Color\",\"Overall Background Color\", \"Latitude/Longitude Text Color\",\"Constellation Line Color\"};\n for(int x = 0; x < colorstrs.length; x++) {\n \tMenuItem opt = new MenuItem(colorstrs[x]);\n \tint id = x;\n \topt.setOnAction((event) -> { colorSetterId = id; });\n \tcolorpickermenu.getItems().add(opt);\n }\n \n ComboBox<String> consts = new ComboBox<>();\n HashMap<String, String> cdbs = controller.getModelConstellationDBs();\n\n for (String name : cdbs.keySet()) {\n consts.getItems().add(name);\n }\n HBox box7 = new HBox(5);\n box7.getChildren().addAll(new Label(\"Select Constellation Set\"), consts);\n \n consts.getSelectionModel().select(\"Western\");\n mainmenu.getMenus().addAll(colorpickermenu);\n\t\tHBox box4 = new HBox(5);\n\t\tButton but = new Button(\"Cancel\");\n\t\tbut.setPadding(new Insets(5));\n\t\tButton but2 = new Button(\"Submit\");\n\t\tbut2.setPadding(new Insets(5));\n\t\tbox4.getChildren().addAll(but,but2);\n\t\tuicontrols.getChildren().addAll(box0,box1,box2,box3,box5,box6,box7,box4);\n\t\tbut.setOnAction((event) -> { input.close(); });\n\t\tbut2.setOnAction((event) -> {\n\t\t\tuserSelectedConstellationFileName = cdbs.get(consts.getValue());\n\t\t\tlong i = validateInput();\n\t\t\tif (i == 0) {\n\t\t\t\tchartTheStars();\n\t\t\t\tinput.close();\n\t\t\t} else {\n\t\t\t\tGUIerrorout = new Alert(AlertType.ERROR, getGUIErrorMsg(i));\n\t\t\t\tGUIerrorout.showAndWait();\n\t\t\t}\n });\n\t\tpane.setTop(mainmenu);\n\t\tpane.setCenter(uicontrols);\n\t\tpane.setPadding(new Insets(10));\n\t\tScene scene = new Scene(pane, 520, 310);\n\t\tinput.setScene(scene);\n\t}", "@Override\r\n\tpublic void createPartControl(final Composite parent) {\n\t\t\r\n\t\tComposite container = new Composite(parent, SWT.NONE);\r\n\t\tGridData data = new GridData(GridData.GRAB_HORIZONTAL);\r\n\t\tGridData dataBoth = new GridData(GridData.FILL_BOTH);\r\n\t\tGridLayout gridLayout = new GridLayout(); \r\n\t\tgridLayout.numColumns = 2; \r\n\t\tgridLayout.makeColumnsEqualWidth = true;\r\n\t\tcontainer.setLayout(gridLayout); \r\n\t\tcontainer.setLayoutData(dataBoth);\r\n\t\tGridLayout butLayout = new GridLayout();\r\n\t\tbutLayout.numColumns = 4;\r\n\t\tbutLayout.makeColumnsEqualWidth = true;\r\n\t\tComposite buttContainer = new Composite(container, SWT.NONE);\r\n\t\tbuttContainer.setLayout(butLayout);\r\n\t\tbuttContainer.setLayoutData(data); \r\n\t\t\r\n\t\t//Bottone per aprire un nuovo BM\r\n\t\tfinal Button buttonCreate = new Button(buttContainer, SWT.NONE);\r\n\t\tImage image = Activator.getImageDescriptor(\"icons/bmOpen.png\").createImage();\r\n\t\tif (image!=null)buttonCreate.setImage(image);\r\n\t\tbuttonCreate.setText(\"Open a BM\");\r\n\t\t\r\n\t\t//viewer per le connessioni attive\r\n\t\tfinal Table connTable = new Table(container, SWT.BORDER);\r\n\r\n\t connTable.setLayoutData(dataBoth);\r\n\t \r\n\r\n\t\tTableColumn tc1 = new TableColumn(connTable, SWT.CENTER);\r\n\t\tTableColumn tc2 = new TableColumn(connTable, SWT.CENTER);\r\n\t\tTableColumn tc4 = new TableColumn(connTable, SWT.CENTER);\r\n\t\tTableColumn tc5 = new TableColumn(connTable, SWT.CENTER);\r\n\t\t\t tc1.setText(\"Name\");\r\n\t\t tc2.setText(\"Path\");\r\n\t\t tc4.setText(\"BC #\");\r\n\t\t tc5.setText(\"CBC #\");\r\n\t\t\ttc1.setWidth(90);\r\n\t\t tc2.setWidth(130);\r\n\t\t tc4.setWidth(50);\r\n\t\t tc5.setWidth(50);\r\n\t\tconnTable.setHeaderVisible(true);\r\n\t\t\t\r\n\t\t\r\n\t\t//Creo un nuovo listener\r\n\t\tListener listenerCreate = new Listener() {\r\n\t\t public void handleEvent(Event event) {\r\n\t\t if (event.widget == buttonCreate) {\r\n\t\t \t\r\n\t\t \tFileDialog fileDialog = new FileDialog(new Shell());\r\n\t\t \t\t// Set the text\r\n\t\t \t\tfileDialog.setText(\"Select a Business Model\");\r\n\t\t \t\t// Set filter on .txt files\r\n\t\t \t\tfileDialog.setFilterExtensions(new String[] { \"*.bm\" });\r\n\t\t \t\t// Put in a readable name for the filter\r\n\t\t \t\tfileDialog.setFilterNames(new String[] { \"BusinessModel(*.bm)\" });\r\n\t\t \t\t// Open Dialog and save result of selection\r\n\t\t \t\tString selected = fileDialog.open();\r\n\t\t \t\t\r\n\r\n\t\t \t\t\r\n\t\t \t\ttry {\r\n\t\t \t\t\t\r\n\t\t \t\t\tString result = HunkIO.readEntireFile(selected,\r\n\t\t \t\t\t \"UTF-8\" );\r\n\t\t \t\t\tString defInfoFile = result.split(\"<DEFAULT_INFO_FILE>\")[1].split(\"</DEFAULT_INFO_FILE>\")[0];\r\n\t\t \t\t\t\r\n\t\t \t\t\tbmName = defInfoFile.split(\"#\")[0];\r\n\t\t \t\t\tbmPath = defInfoFile.split(\"#\")[1];\r\n\t\t \t\t\t\r\n\t\t \t\t\tHunkIO.writeEntireFile(HunkIO.DEFAULT_INFO_FILE, defInfoFile, \"UTF-8\");\r\n\t\t \t\t\t\r\n\t\t \t\t\t//MC: ricavo directory del progetto corrente\r\n\t\t \t\t\tURL url = getClass().getProtectionDomain().getCodeSource().getLocation();\r\n\t\t \t\t String path_project = url.toExternalForm().substring(6).replace(\"/\", \"//\");\r\n\t\t \t\t System.out.println(\"BMPoolsView path proj: \"+path_project);\r\n\t\t \t\t //MessageDialog.openInformation(new Shell(), \"BMPoolsView path proj\", path_project);\r\n\t\t \t\t \r\n\t\t \t\t\t//Workaround per export come RCP Application\r\n\t\t \t\t\t//String path_project = System.getProperty(\"user.dir\").replace(\"\\\\\", \"//\");\r\n\t\t \t\t\t//MessageDialog.openInformation(new Shell(), \"BMPoolsView\", path_project);\r\n\t\t \t\t\t//URL url = getClass().getProtectionDomain().getCodeSource().getLocation();\r\n\t\t \t\t\t//String file_name = url.toExternalForm().substring(6).replace(\"/\", \"//\");\r\n\t\t \t\t\t//MessageDialog.openInformation(new Shell(), \"Filename\", file_name);\r\n\t\t \t\t\t\r\n\t\t \t\t\t\r\n\t\t \t\t\t//Ottengo la vista\r\n\t\t \t\t\topenFile(result.split(\"<bmUniverse>\\n\")[1].split(\"</bmUniverse>\")[0]);\r\n\t\t \t\t\t\r\n\t\t \t\t\t//TODO: VERIFICARE LA CORRETTEZZA DELLA POSISZIONE\r\n\t\t \t\t\t//importo IL PERSISTENCE nella cartella d'installazione\r\n\t\t \t\t\tif (!bcList.isEmpty()){\r\n\t\t \t\t\t\tClassInfo ci =bcList.get(0);\r\n\t\t \t\t\t\tFile f = new File(ci.getRootPath()+\"src/META-INF/persistence.xml\");\r\n\t\t \t\t\t\tif (!f.exists()){\r\n\t\t \t\t\t\t\tSystem.err.println(\"IMPOSSIBILE TROVARE IL FILE DI PERSISTENZA\");\r\n\t\t \t\t\t\t\treturn;\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\t//LO SPOSTO NELLA CARTELLA META-INF DELL'INSTALLAZIONE\r\n\t\t \t\t\t\t//f = new File(ConstantString.BMM_INSTALL_PATH+\"/META-INF/\");\r\n\t\t \t\t\t\tf = new File(path_project+\"/META-INF/\");\r\n\t\t \t\t\t\tif(!f.exists()){\r\n\t\t \t\t\t\t\tf.mkdir();\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\tString buffer = HunkIO.readEntireFile(ci.getRootPath()+\"src/META-INF/persistence.xml\");\r\n\t\t \t\t\t\t//HunkIO.writeEntireFile(ConstantString.BMM_INSTALL_PATH+\"/META-INF/persistence.xml\", buffer);\r\n\t\t \t\t\t\tHunkIO.writeEntireFile(path_project+\"/META-INF/persistence.xml\", buffer);\r\n\t\t \t\t\t\t\r\n\r\n\t\t \t\t\t}\r\n\r\n\t\t \t\t\t//aggiorno i dati nella tabella\r\n\t\t \t\t\tTableItem ti = new TableItem(connTable, 0);\r\n\t\t \t\t\tImage imageBM = Activator.getImageDescriptor(\"icons/bm.png\").createImage();\r\n\t\t \t\t\t\r\n\t\t \t\t\tif (imageBM!=null)ti.setImage(imageBM);\r\n\t\t \t\t\t\r\n\t\t \t\t\tti.setText( new String[]{bmName,\r\n\t\t \t\t\t\t\t\tbmPath,\"\"+bcList.size(),\"\"+cbcList.size()});\r\n\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\t} catch (IOException e) {\r\n\t\t \t\t\t\te.printStackTrace();\r\n\t\t \t\t\t}\r\n\t\t }\r\n\t\t }\r\n\r\n\t\t\tprivate void openFile(String result) {\r\n\t\t\t\t\r\n\t\t\t\tString bcString = result.split(\"<bcList>\\n\")[1].split(\"</bcList>\\n\")[0];\r\n\t\t\t\tString[] bcBuffer = bcString.split(\"<bc>\\n\");\r\n\t\t\t\tString relString = result.split(\"<relList>\\n\")[1].split(\"</relList>\\n\")[0];\r\n\t\t\t\tString[] relBuffer = relString.split(\"<rel>\\n\");\r\n\t\t\t\tString cbcString = null;\r\n\t\t\t\tString[] cbcBuffer = null;\r\n\t\t\t\tif(result.contains(\"<cbcList>\\n<cbc>\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tcbcString = result.split(\"<cbcList>\\n\")[1].split(\"</cbcList>\\n\")[0];\r\n\t\t\t\t\tcbcBuffer = cbcString.split(\"<cbc>\\n\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbcList.clear();\r\n\t\t\t\trelList.clear();\r\n\t\t\t\tcbcList.clear();\r\n\t\t\t\t\r\n\t\t\t\tfor (int k=1;k<bcBuffer.length;k++){\r\n\t\t\t\t\tString bcPath = bcBuffer[k].split(\"<bcPath>\")[1].split(\"</bcPath>\")[0];\r\n\t\t\t\t\tClassInfo ci = new ClassInfo(bcPath, null);\r\n\t\t\t\t\tci.buildClassInfo();\r\n\t\t\t\t\tbcList.add(ci);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (int k=1;k<relBuffer.length;k++){\r\n\t\t\t\t\t\r\n\t\t\t\t\tString c1 = relBuffer[k].split(\"<c1>\")[1].split(\"</c1>\")[0];\r\n\t\t\t\t\tString c2 = relBuffer[k].split(\"<c2>\")[1].split(\"</c2>\")[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* PUO' SERVIRE IN FUTURO\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * \r\n\t\t\t\t\tClassInfo ci1 = null,ci2 = null;\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (int i = 0; i < bcList.size(); i++){\r\n\t\t\t\t\t\tif (bcList.get(i).getClassPathInfo().equals(c1)){\r\n\t\t\t\t\t\t\tci1 = bcList.get(i); \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\t\r\n\t\t\t\t\tfor (int i = 0; i < bcList.size(); i++){\r\n\t\t\t\t\t\tif (bcList.get(i).getClassPathInfo().equals(c2)){\r\n\t\t\t\t\t\t\tci2 = bcList.get(i); \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\t*/\r\n\t\t\t\t\t\r\n\t\t\t\t\tString type = relBuffer[k].split(\"<type>\")[1].split(\"</type>\")[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\trelList.add(new String[]{c1,c2,type});\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif(result.contains(\"<cbcList>\\n<cbc>\")){\r\n\t\t\t\t\tfor (int k=1;k<cbcBuffer.length;k++){\r\n\t\t\t\t\t\tString cbcPath = cbcBuffer[k].split(\"<cbcPath>\")[1].split(\"</cbcPath>\")[0];\r\n\t\t\t\t\t\tComplexClassInfo cci = new ComplexClassInfo(cbcPath, null, null, null);\r\n\t\t\t\t\t\tcci.buildClass(cbcPath);\r\n\t\t\t\t\t\tcbcList.add(cci);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t };\r\n\t\t \r\n\t\r\n\t\r\n\t\t \r\n\t//creo e associo un listener per ogni elemento della tabella delle connessioni\r\n\tconnTable.addListener(SWT.MouseDown, new Listener () {\r\n\t\tpublic void handleEvent (Event event) {\r\n\t\t\tPoint point = new Point (event.x, event.y);\r\n\t\t\tTableItem item = connTable.getItem(point);\r\n\t\t\tif (item != null) {\r\n\t\t\t\tShell shell = parent.getShell();\r\n\t\t\t\tMenu menu = new Menu (shell, SWT.POP_UP);\r\n\t\t\t\tcreateConnMenu(menu,item);\r\n\t\t\t\tmenu.setVisible(true);\r\n\t\t\t\tshell.setMenu (menu);\r\n\t\t\t\tshell.open();\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\t\r\n\t//associo il Listener\r\n\tbuttonCreate.addListener(SWT.Selection, listenerCreate);\r\n\t//buttonCreate.setLayoutData(data);\r\n\t//connTable.setLayoutData(data);\r\n\t\r\n\t\r\n\t}", "private void butNew_Click(Object sender, System.EventArgs e) throws Exception {\n FormProcCodeNew FormPCN = new FormProcCodeNew();\n FormPCN.ShowDialog();\n if (FormPCN.Changed)\n {\n changed = true;\n ProcedureCodes.refreshCache();\n fillGrid();\n }\n \n }", "protected ERMinerNodeDialog() {\nsuper();\n \n addDialogComponent(new DialogComponentColumnNameSelection(ERMinerNodeModel.createSeqColumnModel(),\n\t\t\t\t\t\t\"Column containing the sequences: \", 0, true, StringValue.class));\n addDialogComponent(new DialogComponentNumber(ERMinerNodeModel.createMinSupModel(), \"Choose minSup\", 0.05));\n addDialogComponent(new DialogComponentNumber(ERMinerNodeModel.createMinConfModel(), \"Choose minConf\", 0.05));\n }", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "protected JComponent createEditor() {\n return spinner.getEditor(); }", "public ConfigureDialog(java.awt.Frame frame) {\n\t\tsuper(frame);\n\t\tattributes=new Hashtable();\n\t\tattributesStructure=new Structure();\n\t\tchangedAttributes = new Hashtable();\n\t\teditors = new Vector();\n\t\t\n\t\tJComponent contentPane = (JComponent)getContentPane();\n\t\t((BorderLayout)contentPane.getLayout()).setHgap(30);\n\t\tcontentPane.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\t\t\n\t\tcenterPane = null;\n\t\n buttonPane = new JPanel();\n buttonPane.setBorder(new EmptyBorder(5, 0, 0, 0));\n\t\tconstraints = new GridBagConstraints();\n\t\tconstraints.fill = GridBagConstraints.HORIZONTAL;\n\t\tconstraints.insets = new Insets(2, 0, 2, 0);\n\t\tbuttonsLayout = new GridBagLayout();\n\t\tcontentPane.add(buttonPane, BorderLayout.SOUTH);\n\t\n\t\tok = new JButton(i18n.getString(\"OKButton\"));\n\t\tapply = new JButton(i18n.getString(\"ApplyButton\"));\n\t\tcancel = new JButton(i18n.getString(\"CancelButton\"));\n\n\t\tbuttonPane.add(ok);\t\n\t\tbuttonPane.add(apply); \n\t\tbuttonPane.add(cancel);\n\t\tresizeButtons();\n\t\t\n\t\tgetRootPane().setDefaultButton(ok);\n\t\tok.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed (ActionEvent e) {\n\t\t\t\tif (applyDialog())\n\t\t\t\t\tcancelDialog();\n\t\t\t}\n\t\t});\n\t\tapply.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed (ActionEvent e) {applyDialog();}\n\t\t});\n\t\tcancel.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed (ActionEvent e) {cancelDialog();}\n\t\t});\n }", "protected void createContents() {\n setText(BUNDLE.getString(\"TranslationManagerShell.Application.Name\"));\n setSize(599, 505);\n\n final Composite cmpMain = new Composite(this, SWT.NONE);\n cmpMain.setLayout(new FormLayout());\n\n final Composite cmpControls = new Composite(cmpMain, SWT.NONE);\n final FormData fd_cmpControls = new FormData();\n fd_cmpControls.right = new FormAttachment(100, -5);\n fd_cmpControls.top = new FormAttachment(0, 5);\n fd_cmpControls.left = new FormAttachment(0, 5);\n cmpControls.setLayoutData(fd_cmpControls);\n cmpControls.setLayout(new FormLayout());\n\n final ToolBar modifyToolBar = new ToolBar(cmpControls, SWT.FLAT);\n\n tiSave = new ToolItem(modifyToolBar, SWT.PUSH);\n tiSave.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Save\"));\n tiSave.setEnabled(false);\n tiSave.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_save.gif\"));\n tiSave.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_save.gif\"));\n\n tiUndo = new ToolItem(modifyToolBar, SWT.PUSH);\n tiUndo.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Undo\"));\n tiUndo.setEnabled(false);\n tiUndo.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_reset.gif\"));\n tiUndo.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_reset.gif\"));\n\n tiDeleteSelected = new ToolItem(modifyToolBar, SWT.PUSH);\n tiDeleteSelected.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_remove.gif\"));\n tiDeleteSelected.setEnabled(false);\n tiDeleteSelected.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Delete\"));\n tiDeleteSelected.setImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/e_remove.gif\"));\n\n txtFilter = new LVSText(cmpControls, SWT.BORDER);\n final FormData fd_txtFilter = new FormData();\n fd_txtFilter.right = new FormAttachment(25, 0);\n fd_txtFilter.top = new FormAttachment(modifyToolBar, 0, SWT.CENTER);\n fd_txtFilter.left = new FormAttachment(modifyToolBar, 25, SWT.RIGHT);\n txtFilter.setLayoutData(fd_txtFilter);\n\n final ToolBar filterToolBar = new ToolBar(cmpControls, SWT.FLAT);\n final FormData fd_filterToolBar = new FormData();\n fd_filterToolBar.top = new FormAttachment(modifyToolBar, 0, SWT.TOP);\n fd_filterToolBar.left = new FormAttachment(txtFilter, 5, SWT.RIGHT);\n filterToolBar.setLayoutData(fd_filterToolBar);\n\n tiFilter = new ToolItem(filterToolBar, SWT.NONE);\n tiFilter.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_find.gif\"));\n tiFilter.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Filter\"));\n\n tiLocale = new ToolItem(filterToolBar, SWT.DROP_DOWN);\n tiLocale.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Locale\"));\n tiLocale.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_globe.png\"));\n\n menuLocale = new Menu(filterToolBar);\n addDropDown(tiLocale, menuLocale);\n\n lblSearchResults = new Label(cmpControls, SWT.NONE);\n lblSearchResults.setVisible(false);\n final FormData fd_lblSearchResults = new FormData();\n fd_lblSearchResults.top = new FormAttachment(filterToolBar, 0, SWT.CENTER);\n fd_lblSearchResults.left = new FormAttachment(filterToolBar, 5, SWT.RIGHT);\n lblSearchResults.setLayoutData(fd_lblSearchResults);\n lblSearchResults.setText(BUNDLE.getString(\"TranslationManagerShell.Label.Results\"));\n\n final ToolBar translateToolBar = new ToolBar(cmpControls, SWT.NONE);\n final FormData fd_translateToolBar = new FormData();\n fd_translateToolBar.top = new FormAttachment(filterToolBar, 0, SWT.TOP);\n fd_translateToolBar.right = new FormAttachment(100, 0);\n translateToolBar.setLayoutData(fd_translateToolBar);\n\n tiDebug = new ToolItem(translateToolBar, SWT.PUSH);\n tiDebug.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Debug\"));\n tiDebug.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/debug.png\"));\n\n new ToolItem(translateToolBar, SWT.SEPARATOR);\n\n tiAddBase = new ToolItem(translateToolBar, SWT.PUSH);\n tiAddBase.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.AddBase\"));\n tiAddBase.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_add.gif\"));\n\n tiTranslate = new ToolItem(translateToolBar, SWT.CHECK);\n tiTranslate.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Translate\"));\n tiTranslate.setImage(SWTResourceManager\n .getImage(TranslationManagerShell.class, \"/images/tools16x16/target.png\"));\n\n cmpTable = new Composite(cmpMain, SWT.NONE);\n cmpTable.setLayout(new FillLayout());\n final FormData fd_cmpTable = new FormData();\n fd_cmpTable.bottom = new FormAttachment(100, -5);\n fd_cmpTable.right = new FormAttachment(cmpControls, 0, SWT.RIGHT);\n fd_cmpTable.left = new FormAttachment(cmpControls, 0, SWT.LEFT);\n fd_cmpTable.top = new FormAttachment(cmpControls, 5, SWT.BOTTOM);\n cmpTable.setLayoutData(fd_cmpTable);\n\n final Menu menu = new Menu(this, SWT.BAR);\n setMenuBar(menu);\n\n final MenuItem menuItemFile = new MenuItem(menu, SWT.CASCADE);\n menuItemFile.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File\"));\n\n final Menu menuFile = new Menu(menuItemFile);\n menuItemFile.setMenu(menuFile);\n\n menuItemExit = new MenuItem(menuFile, SWT.NONE);\n menuItemExit.setAccelerator(SWT.ALT | SWT.F4);\n menuItemExit.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File.Exit\"));\n\n final MenuItem menuItemHelp = new MenuItem(menu, SWT.CASCADE);\n menuItemHelp.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help\"));\n\n final Menu menuHelp = new Menu(menuItemHelp);\n menuItemHelp.setMenu(menuHelp);\n\n menuItemDebug = new MenuItem(menuHelp, SWT.NONE);\n menuItemDebug.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.Debug\"));\n\n new MenuItem(menuHelp, SWT.SEPARATOR);\n\n menuItemAbout = new MenuItem(menuHelp, SWT.NONE);\n menuItemAbout.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.About\"));\n //\n }", "private void setupOpnameImportDialog( ) {\n\t// Create modal dialog for editing opname record\n String title = \"Update Opname Import (\" + Integer.toString(opnameKeys.size()) + \" records)\";\n\tif ( parentObject instanceof JFrame ) {\n\t dialog = new JDialog( ( JFrame )parentObject, title, true );\n\t} else if ( parentObject instanceof JDialog ) {\n\t dialog = new JDialog( ( JDialog )parentObject, title, true );\n\t} else {\n\t logger.severe( \"Unexpected parent object class: \" +\n\t\t\t parentObject.getClass( ).getName( ) );\n\t return;\n\t}\n\n\t// Set grid bag layout manager\n\tContainer container = dialog.getContentPane( );\n\tcontainer.setLayout( new GridBagLayout( ) );\n GridBagConstraints constraints = new GridBagConstraints( );\n\n //////////////////////////////////////////\n // Import Type Combo Box, Import Datum\n //////////////////////////////////////////\n\n constraints.anchor = GridBagConstraints.EAST;\n constraints.insets = new Insets( 5, 20, 5, 5 );\n constraints.gridx = 0;\n constraints.gridy = 1;\n constraints.gridwidth = 1;\n container.add( new JLabel( \"Import:\" ), constraints );\n\n // Setup a JComboBox for ImportType\n importTypeComboBox = new ImportTypeComboBox( conn, defaultImportTypeId );\n importTypeComboBox.addActionListener( ( ActionEvent actionEvent ) -> {\n if (importTypeComboBox.getSelectedImportTypeId( ) == 0) {\n importDatumSpinner.setEnabled(false);\n }\n else {\n importDatumSpinner.setEnabled(true);\n }\n } );\n\n final JPanel importPanel = new JPanel();\n importPanel.add( importTypeComboBox );\n\n // Import datum\n GregorianCalendar calendar = new GregorianCalendar( );\n if (defaultImportDatum == null) {\n defaultImportDatum = calendar.getTime();\n }\n\n calendar.add( Calendar.YEAR, -50 );\n Date earliestDate = calendar.getTime( );\n calendar.add( Calendar.YEAR, 100 );\n Date latestDate = calendar.getTime( );\n SpinnerDateModel importDatumSpinnerDatemodel = new SpinnerDateModel(defaultImportDatum,\n earliestDate,\n latestDate,\n Calendar.DAY_OF_MONTH );\n importDatumSpinner = new JSpinner( importDatumSpinnerDatemodel );\n importDatumSpinner.setEditor( new JSpinner.DateEditor( importDatumSpinner, \"dd-MM-yyyy\" ) );\n importPanel.add( importDatumSpinner );\n\n // Set the import datum to enabled or disabled according to the selected medium type ID\n if (importTypeComboBox.getSelectedImportTypeId( ) == 0) {\n importDatumSpinner.setEnabled(false);\n }\n else {\n importDatumSpinner.setEnabled(true);\n }\n\n constraints.insets = new Insets( 5, 0, 5, 20 );\n constraints.anchor = GridBagConstraints.WEST;\n constraints.gridx = GridBagConstraints.RELATIVE;\n constraints.gridwidth = 2;\n container.add( importPanel, constraints );\n\n\n\t//////////////////////////////////////////\n\t// Update/Insert, Cancel buttons\n\t//////////////////////////////////////////\n\n\tJPanel buttonPanel = new JPanel( );\n\n\tActionListener buttonPanelActionListener = ( ActionEvent actionEvent ) -> {\n boolean result = true;\n\n if ( actionEvent.getActionCommand( ).equals( \"updateOpnameImport\" ) ) {\n result = updateOpnameImport( );\n }\n\n // Any other actionCommand, including cancel, has no action\n if ( result ) {\n dialog.setVisible( false );\n }\n };\n\n\tJButton editOpnameButton = new JButton( \"Update (\" + Integer.toString(opnameKeys.size()) + \" opname records)\");\n\teditOpnameButton.setActionCommand( \"updateOpnameImport\" );\n\teditOpnameButton.addActionListener( buttonPanelActionListener );\n\tbuttonPanel.add( editOpnameButton );\n\n\tJButton cancelOpnameButton = new JButton( \"Cancel\" );\n\tcancelOpnameButton.setActionCommand( \"cancelOpnameImport\" );\n\tcancelOpnameButton.addActionListener( buttonPanelActionListener );\n\tbuttonPanel.add( cancelOpnameButton );\n\n constraints.anchor = GridBagConstraints.CENTER;\n constraints.insets = new Insets( 5, 20, 20, 20 );\n\tconstraints.gridx = 0;\n\tconstraints.gridy = 14;\n\tconstraints.gridwidth = 3;\n\tcontainer.add( buttonPanel, constraints );\n\n // Default dialog size\n final Dimension dialogSize = new Dimension( 400, 150 );\n\tdialog.setSize( dialogSize );\n\tdialog.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );\n\tdialog.setVisible( true );\n }", "protected void prepareForEditing() {\n\teditingContainer.add(editingComponent);\n }", "private void initComponentsCustom() {\n SGuiUtils.setWindowBounds(this, 480, 300);\n\n moIntYear.setIntegerSettings(SGuiUtils.getLabelName(jlYear.getText()), SGuiConsts.GUI_TYPE_INT_CAL_YEAR, true);\n moDateDate.setDateSettings(miClient, SGuiUtils.getLabelName(jlDate.getText()), true);\n moTextCode.setTextSettings(SGuiUtils.getLabelName(jlCode.getText()), 10);\n moTextName.setTextSettings(SGuiUtils.getLabelName(jlName.getText()), 50);\n\n moFields.addField(moIntYear);\n moFields.addField(moDateDate);\n moFields.addField(moTextCode);\n moFields.addField(moTextName);\n\n moFields.setFormButton(jbSave);\n }", "public void createControl(Composite parent) {\n\t\tComposite comp = new Composite(parent, SWT.NONE);\r\n\t\tsetControl(comp);\r\n\r\n\t\tLaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_MAIN_TAB);\r\n\r\n\t\tGridLayout topLayout = new GridLayout();\r\n\t\ttopLayout.marginHeight = 10;\r\n\t\tcomp.setLayout(topLayout);\r\n\t\t\r\n\t\tcreateTargetCommGroup(comp, 1);\r\n\t\tcreateVerticalSpacer(comp, 1);\r\n\t\tcreateTargetInfoGroup(comp, 1);\r\n\t\t\r\n\t\tLaunchUIPlugin.setDialogShell(parent.getShell());\r\n\t}", "private void initComponents() {\n\n\t\tcancelButton = new javax.swing.JButton();\n\t\tsaveButton = new javax.swing.JButton();\n\t\trepositorySettingsJPanel = new cz.muni.fi.fresneleditor.common.reposconf.RepositorySettingsJPanel();\n\n\t\tsetDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\t\torg.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application\n\t\t\t\t.getInstance(\n\t\t\t\t\t\tcz.muni.fi.fresneleditor.common.FresnelApplication.class)\n\t\t\t\t.getContext().getResourceMap(CreateNewRepositoryDialog.class);\n\t\tsetTitle(resourceMap.getString(\"Form.title\")); // NOI18N\n\t\tsetName(\"Form\"); // NOI18N\n\n\t\tcancelButton.setText(resourceMap.getString(\"cancelButton.text\")); // NOI18N\n\t\tcancelButton.setName(\"cancelButton\"); // NOI18N\n\t\tcancelButton.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tcancelButtonActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tsaveButton.setText(resourceMap.getString(\"saveButton.text\")); // NOI18N\n\t\tsaveButton.setName(\"saveButton\"); // NOI18N\n\t\tsaveButton.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tsaveButtonActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\trepositorySettingsJPanel.setName(\"repositorySettingsJPanel\"); // NOI18N\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(\n\t\t\t\tgetContentPane());\n\t\tgetContentPane().setLayout(layout);\n\t\tlayout.setHorizontalGroup(layout\n\t\t\t\t.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t.addGroup(\n\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.TRAILING,\n\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addContainerGap(542, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t.addComponent(cancelButton).addGap(18, 18, 18)\n\t\t\t\t\t\t\t\t.addComponent(saveButton).addContainerGap())\n\t\t\t\t.addGroup(\n\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t.addComponent(repositorySettingsJPanel,\n\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addContainerGap()));\n\n\t\tlayout.linkSize(javax.swing.SwingConstants.HORIZONTAL,\n\t\t\t\tnew java.awt.Component[] { cancelButton, saveButton });\n\n\t\tlayout.setVerticalGroup(layout\n\t\t\t\t.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t.addGroup(\n\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.TRAILING,\n\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t.addComponent(repositorySettingsJPanel,\n\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(saveButton)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(cancelButton))\n\t\t\t\t\t\t\t\t.addContainerGap()));\n\n\t\tpack();\n\t}", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }" ]
[ "0.6756236", "0.67078567", "0.6488801", "0.6470581", "0.6408964", "0.64026827", "0.63628626", "0.6341904", "0.630701", "0.6272988", "0.6263617", "0.625351", "0.62167865", "0.61841", "0.6144057", "0.60954535", "0.6089", "0.6080381", "0.60793376", "0.60763067", "0.60656244", "0.6050382", "0.6018011", "0.6004964", "0.59945333", "0.5993017", "0.59792465", "0.59740937", "0.5967698", "0.5967698", "0.59627825", "0.59582174", "0.59520566", "0.59429246", "0.59425765", "0.5939573", "0.59324145", "0.59219295", "0.59204787", "0.5916951", "0.5890131", "0.5888003", "0.5886873", "0.5872159", "0.5871467", "0.5861247", "0.58535725", "0.58527106", "0.58490217", "0.58464307", "0.5843139", "0.5831246", "0.5824723", "0.5821926", "0.5821926", "0.5821926", "0.5821926", "0.58188564", "0.58171564", "0.58132875", "0.5812379", "0.58109546", "0.58048886", "0.5800626", "0.5795879", "0.57900107", "0.5786696", "0.5785714", "0.5777599", "0.5773743", "0.5765012", "0.575939", "0.5753306", "0.57456577", "0.5744998", "0.5741299", "0.57349974", "0.5733159", "0.57325506", "0.5731359", "0.5731297", "0.57307434", "0.5722652", "0.57129365", "0.57054555", "0.57054555", "0.57054555", "0.57054555", "0.57054555", "0.57054555", "0.57054555", "0.57054555", "0.57054555", "0.57054555", "0.57054555", "0.57054555", "0.57054555", "0.57054555", "0.57054555", "0.57054555", "0.57054555" ]
0.0
-1
/ Tell the RecyclerView adapter to update its contents
public void updateComponents(){ adapter.updateItems(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void notifyChanged() {\n notifyDataSetChanged();\n }", "@Override\r\n public void onItemsChanged(RecyclerView recyclerView){\r\n isNotifyDataSetChanged = true;\r\n }", "public void notifyDataSetChanged() {\n viewState.setShouldRefreshEvents(true);\n invalidate();\n }", "@Override\n public void notifyDataSetChanged() {\n super.notifyDataSetChanged();\n }", "private void updateUI() {\n mLatestFeedsAdapter.notifyDataSetChanged();\n }", "public void notifyDataSetChanged() {\n generateDataList();\n mSectionedExpandableGridAdapter.notifyDataSetChanged();\n }", "@Override\r\n public void onDataSetChanged() {\n }", "public void refreshListAdapter() {\n adapter.setListContent(requests);\n //We in turn set the adapter to the RecyclerView\n recyclerView.setAdapter(adapter);\n }", "public void notifyDataSetChanged() {\n if (noxItemCatalog != null) {\n noxItemCatalog.recreate();\n createShape();\n initializeScroller();\n refreshView();\n }\n }", "@Override\r\n\tpublic void notifyDataSetChanged() {\n\t\tsuper.notifyDataSetChanged();\r\n\t\tLog.v(\"DEBUG\", \"CHANGE\");\r\n\t}", "public void onDataSetChanged();", "private void refreshRecyclerView() {\n adapter = new AppWrapperAdapter(appList,\n new AppWrapperAdapter.FeedInteractionListener() {\n @Override\n public void onAppClicked(AppWrapper app, int index) {\n // TODO\n }\n });\n recyclerView.setAdapter(adapter);\n }", "public void refreshAdapter() {\n\t\tadapter.notifyDataSetChanged();\n\t\tthis.listView.onRefreshComplete();\n\t}", "@Override\n public void refreshRecipeList() {\n favouritePageRecyclerViewAdapter.notifyDataSetChanged();\n\n }", "public void notifyDataSetChanged() {\n\t\tthis.mModelRssItems = mBusinessRss.getModelRssItem(mRssName,\n\t\t\t\tmOnlyViewUnRead);\n\t\tsuper.notifyDataSetChanged();\n\t}", "public void refreshListView() {\n if (recyclerViewAdapter != null) {\n recyclerViewAdapter.notifyDataSetChanged();\n }\n }", "public void notifyDataSetChanged() {\n\t\tmDataSetObservable.notifyChanged();\n\t}", "@Override\n\tpublic void notifyDataSetChanged() {\n\t\tsuper.notifyDataSetChanged();\n\t\tsetIndexer(list);\n\t}", "public void updateUI() {\n if (mCategoryAdapater == null) {\n mCategoryAdapater = new CategoryAdapter(mCategories);\n mCategoryRecyclerView.setAdapter(mCategoryAdapater);\n } else {\n mCategoryAdapater.setCategories(mCategories);\n mCategoryAdapater.notifyDataSetChanged();\n }\n Log.d(TAG, \"updateUI()\");\n }", "@Override\n public void run() {\n notifyDataSetChanged();\n }", "private void setRecyclerViewData() {\n }", "public void refreshList()\n {\n final ArrayAdapter adapter = (ArrayAdapter)this.foodListAdapter;\n this.getActivity().runOnUiThread(new Runnable() {\n public void run() {\n adapter.notifyDataSetChanged();\n }\n });\n }", "private void updateUI() {\n swipeRefreshLayout.setRefreshing(false);\n adapter.clearItems();\n itemList.addAll(DatabaseController.getInstance(getApplicationContext()).getItems());\n if (itemList.size() > 0){\n emptyTextView.setVisibility(View.GONE);\n adapter.notifyDataSetChanged();\n } else {\n emptyTextView.setVisibility(View.VISIBLE);\n }\n }", "public void notifyDataChanged() {\n notifyDataSetChanged();\n isLoading = false;\n }", "public void updateList(){\r\n preyFragmentAdapter=new PreyFragmentAdapter(CPreyArrayList,this);\r\n recyclerView.setAdapter(preyFragmentAdapter);\r\n LinearLayoutManager a=new LinearLayoutManager(this.getContext());\r\n recyclerView.setLayoutManager(a);\r\n\r\n\r\n }", "public void imageUpdate() {\n this.notifyDataSetChanged();\n }", "void notifyListDataSetChanged();", "protected void notifyItemsChanged() {\n notifyItemsChanged(0, mAdapter.getItemCount());\n }", "public void updateRecyclerView () {\n\n if (recyclerViewDebetableGoalsNow != null) {\n recyclerViewDebetableGoalsNow.destroyDrawingCache();\n recyclerViewDebetableGoalsNow.setVisibility(ListView.INVISIBLE);\n recyclerViewDebetableGoalsNow.setVisibility(ListView.VISIBLE);\n\n displayDebetableGoalsSet ();\n }\n }", "private void updateWhereItemListData() {\n ModelWhereItem itemDB = new ModelWhereItem(database);\n ArrayList<WhereItem> itemList = itemDB.WSfindItemsByFields(selectedCityId,selectedDistrictId,selectedStreetId,selectedCategoryId);\n RecyclerViewAdapter recyclerViewAdapter = new RecyclerViewAdapter(getContext(),itemList,gridViewMenuAdapter,viewPagerSlideAdapter);\n recyclerView.setAdapter(recyclerViewAdapter);\n\n // tweaks cho recycler view\n recyclerView.setHasFixedSize(true);\n //recyclerView.setItemViewCacheSize(20);\n recyclerView.setDrawingCacheEnabled(true);\n //recyclerView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);\n\n changeTab(0);\n }", "private void setDataInRecyclerView(){\n KorisniciAdapter adapter = new KorisniciAdapter(this, korisniciList);\n recyclerView.setAdapter(adapter); // set the Adapter to RecyclerView\n }", "@Override\n public void onClick(View view) {\n update(holder.getAdapterPosition());\n }", "private void updateAdapter() {\n iga = new IngredientGridAdapter(getApplicationContext(), ingredientList);\n gridView.setAdapter(iga);\n iga.notifyDataSetChanged();\n }", "private void updateList() {\n Model.instace.getAllArticles(new ArticleFirebase.GetAllArticlesAndObserveCallback() {\n @Override\n public void onComplete(List<Article> list) {\n data.clear();\n data = list;\n adapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancel() {\n\n }\n });\n }", "public void updateAdapter() {\n// \tContentValues values = new ContentValues(); \n// \tvalues.put(\"note_title\", \"Title of Note 4.4_\" + Math.random());\n// \tString whereClause = \"note_id = ?\";\n// \tString[] whereArgs = new String[] { \"4\" };\n// \t\t\n// \tthis.loader.update(DBConstants.NOTES_TABLE, values, whereClause, whereArgs);\n// dba = new DBAdapter(getActivity());\n// dba.open();\n// \tCursor notes = dba.getAllNotes();\n// \t((SimpleCursorAdapter) notesAdapter).changeCursor(notes);\n//\t\t((SimpleCursorAdapter) lvNotes.getAdapter()).notifyDataSetChanged();\n//\t\tdba.close();\n }", "public void refreshDatas(GsonNews requestNews){\n if (newsItems != null){\n Log.e(\"xx\", \"suaxinshuju\");\n// newsItems.setAdapter(newsAdapter);\n newsAdapter.setItems(requestNews.getData());\n// newsAdapter.notifyDataSetChanged();\n }\n }", "@Override\n public void run() {\n loadItems();\n notifyDataSetChanged();\n }", "private void updateUI() {\n mAdapter = new GoalAdapter(userGoals);\n goalRecyclerView.setAdapter(mAdapter);\n }", "@Override\n\t\t\t\t\t \t public void run() {\n\t\t\t\t\t \t \tadp.notifyDataSetChanged();\n\t\t\t\t\t \t }", "void onItemsLoadComplete() {\n adapter.notifyDataSetChanged();\n\n // Stop refresh animation\n srl.setRefreshing(false);\n }", "public void refresh(){\n\n data2.clear();\n data2=getActionsList(\"\");\n //actionsAdapter=new ActionsAdapter(data2,getContext());\n //myList.setAdapter(actionsAdapter);\n //actionsAdapter.notifyDataSetChanged();\n }", "public static void syncItems() {\n ArrayList<Contest> keep = null;\n if (contestItems.size() > CONTEST_LIST_SIZE) {\n keep = new ArrayList<>(contestItems.subList(0, CONTEST_LIST_SIZE));\n keep = removeDups(keep);\n // sort and redraw\n Collections.sort(keep, new ContestComparator());\n adapter.clear();\n adapter.addAll(keep);\n //adapter = new ContestItemsAdapter(mCtx, keep);\n }\n\n adapter.notifyDataSetChanged();\n }", "public void update()\n\t{\n\t\t//update the view's list of movies...\n\t\tthis.getRemoveButton().setEnabled((this.database.getNumberOfMovies()>0));\n\t\tthis.movieList.setListData(this.database.toList());\n\t}", "public void updateRecyclerView(List lineItems){\n mAdapter = new PrescriptionLineItemAdapter(lineItems);\n mLineItemRecView.setAdapter(mAdapter);\n }", "@Override\n public void onBindViewHolder(DetailAdapter.ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n //holder.mTextView.setText(mDataset[position]);\n holder.informacion.setText(mDataset[position]); //informacion es el dato que nos entrega el arreglo\n }", "private void updateUI() {\n ArrayList<String> taskList = new ArrayList<>();\n SQLiteDatabase db = mHelper.getReadableDatabase();\n Cursor cursor = db.query(Task.TaskEntry.TABLE,new String[] {Task.TaskEntry.COL_TASK_TITLE},null,null,null,null,null);\n listItems.clear();\n\n while (cursor.moveToNext()){\n int index = cursor.getColumnIndex(Task.TaskEntry.COL_TASK_TITLE);\n taskList.add(cursor.getString(index));\n ListItems item = new ListItems(cursor.getString(index));\n listItems.add(item);\n }\n\n\n R_adapter = new RecyclerAdapterGoals(this.getContext(), listItems);\n mTaskListView.setAdapter(R_adapter);\n cursor.close();\n db.close();\n }", "private void populateAdapter(){\n mAdapter = new MovieRecyclerAdapter(context, moviesList, this);\n mRecyclerView.setAdapter(mAdapter);\n }", "private void refreshData(){\n filempty.setVisibility(View.GONE);\n adapter = new FoundRecyclerviewAdapter(FoundActivity.this, data);\n v.setAdapter(adapter);\n emptyView();\n }", "private void setDataInRecyclerView() {\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());\n recyclerView.setLayoutManager(linearLayoutManager);\n // call the constructor of UsersAdapter to send the reference and data to Adapter\n UsersAdapter usersAdapter = new UsersAdapter(getActivity(), userListResponseData);\n recyclerView.setAdapter(usersAdapter); // set the Adapter to RecyclerView\n }", "@Override\n public void run() {\n adapter = new DatabaseCitiesAdapter(getApplicationContext(), activity ,dbCities);\n recyclerView.setAdapter(adapter);\n recyclerView.invalidate();\n }", "@Override\n // Replace the contents of a view (invoked by the layout manager)\n public void onBindViewHolder(@NonNull ViewHolder holder, int position) {\n holder.bind(getItem(position));\n }", "public void refreshList() {\n mCursor.requery();\n mCount = mCursor.getCount() + mExtraOffset;\n notifyDataSetChanged();\n }", "public void updateUI() {\n List<Animal> animals;\n\n String searchQuery = LexiconPreferences.getSearchQuery(getActivity());\n\n // Check if there's a search query present\n if (searchQuery != null) {\n ArrayList<String> whereArgs = new ArrayList<>();\n whereArgs.add(LexiconPreferences.getFilterValue(getActivity()));\n\n animals = mAnimalManager.searchAnimals(\n mAnimalManager.createWhereClauseFromFilter(LexiconPreferences.getFilterKey(getActivity())),\n whereArgs,\n searchQuery\n );\n } else {\n animals = mAnimalManager.getAnimals(\n mAnimalManager.createWhereClauseFromFilter(LexiconPreferences.getFilterKey(getActivity())),\n new String[]{LexiconPreferences.getFilterValue(getActivity())}\n );\n }\n\n if (animals.size() > 0) {\n // If the fragment is already running, update the data in case something changed (some animal)\n if (mAnimalAdapter == null) {\n mAnimalAdapter = new AnimalAdapter(animals);\n mAnimalRecyclerView.setAdapter(mAnimalAdapter);\n } else {\n mAnimalAdapter.setAnimals(animals);\n mAnimalAdapter.notifyDataSetChanged();\n }\n } else {\n RelativeLayout emptyList = (RelativeLayout) mView.findViewById(R.id.list_empty);\n emptyList.setVisibility(View.VISIBLE);\n }\n }", "private void setRecyclerViewData() {\n\n itemList = new ArrayList<ListItem>();\n itemList.add(new RememberCardView(\"Du musst 12€ zahlen\"));\n itemList.add(new DateCardItem(\"Mo\", \"29.07.\", \"Training\", \"20:00\", \"21:45\"));\n itemList.add(new VoteCardItem(\"Welche Trikotfarbe ist besser?\"));\n }", "public void redrawListView() {\n\t\tMySimpleCursorAdapter adapt = (MySimpleCursorAdapter)this.getListAdapter();\n\t\tadapt.notifyDataSetChanged();\n\t}", "public void AddItemsToRecyclerView()\n {\n source = new Vector();\n source.add(\"排班\");\n source.add(\"加班\");\n source.add(\"打卡\");\n source.add(\"請假\");\n source.add(\"文件\");\n source.add(\"訂餐\");\n }", "public void setDataAndRefresh(List<T> data) {\n this.data = data;\n// views = new ArrayList<>(data.size());\n// // builder data set of all item view\n// for (int i = 0; i < data.size(); i++) {\n// int itemLayoutId = getItemLayoutId();\n// LayoutInflater inflater = LayoutInflater.from(getContext());\n// View itemView = inflater.inflate(itemLayoutId, null);\n// fillData(itemView, data.get(i));\n// // add item titleView\n// views.add(itemView);\n// }\n notifyDataSetChanged();\n }", "protected void refreshAdapter() {\n if (mAdapter == null) {\n mAdapter = createMonthAdapter(mController);\n } else {\n mAdapter.setSelectedDay(mSelectedDay);\n if (pageListener != null) pageListener.onPageChanged(getMostVisiblePosition());\n }\n // refresh the view with the new parameters\n setAdapter(mAdapter);\n }", "public void refershData(ArrayList<SquareLiveModel> contents) {\n\t\tlistData = contents;\n\t\tnotifyDataSetChanged();\n\t}", "public void refresh(List<T> list) {\n this.items = list;\n notifyDataSetChanged();\n }", "public void run() {\n updateBtn.reset();\n notifyDataSetChanged();\n }", "private void loadRecyclerViewItem() {\n for (int i = 0; i < mySongs.size(); i++) {\n Song song = new Song(\n mySongs.get(i),\n mySongs.get(i).getName(),\n getTimeSong(mySongs.get(i))\n );\n songsList.add(song);\n }\n songAdapter = new TheAdapter(songsList,this);\n recyclerView.setAdapter(songAdapter);\n songAdapter.notifyDataSetChanged();\n\n }", "private void updateReceivedView() {\n mReceivedCoins = Data.getReceivedCoins();\n mRecyclerViewCol.setVisibility(View.INVISIBLE);\n mRecyclerViewRec.setVisibility(View.VISIBLE);\n mReceivedAdapter.notifyDataSetChanged();\n }", "@Override\n public void showItemsForRecyclerView() {\n //Inicia el adaptadador para el rv\n myIRecyclerViewFragment.initAdapterForRVNotificationFragment(myIRecyclerViewFragment.createNotificationAdapter(this.myListNotifications));\n myIRecyclerViewFragment.generateLinearLayoutVertical();\n }", "public void refreshAdapter() {\n int count = 0;\n removeAllViews();\n for (TypeViewInfo info : this.mTypeToView.values()) {\n info.currentUsedPosition = 0;\n }\n if (this.mListAdapter != null) {\n count = this.mListAdapter.getCount();\n }\n for (int i = 0; i < count; i++) {\n Integer type = Integer.valueOf(this.mListAdapter.getItemViewType(i));\n if (!this.mTypeToView.containsKey(type)) {\n this.mTypeToView.put(type, new TypeViewInfo(type));\n }\n TypeViewInfo info2 = this.mTypeToView.get(type);\n View canvasView = info2.currentUsedPosition < info2.holdViews.size() ? info2.holdViews.get(info2.currentUsedPosition) : null;\n View current = this.mListAdapter.getView(i, canvasView, this);\n if (current == null) {\n throw new RuntimeException(\"Adapter.getView(postion , convasView, viewParent) cannot be null \");\n }\n if (canvasView != current) {\n if (canvasView == null) {\n info2.holdViews.add(current);\n } else {\n info2.holdViews.remove(canvasView);\n info2.holdViews.add(info2.currentUsedPosition, current);\n }\n }\n info2.currentUsedPosition++;\n addView(current);\n }\n this.mSelectIndex = Math.min(this.mSelectIndex, (float) (count - 1));\n this.mSelectIndex = Math.max(0.0f, this.mSelectIndex);\n calculationRect(true);\n }", "public void notifyDataSetChanged(int position ) {\n\t\tmSelectPosition = position;\r\n\t\tsuper.notifyDataSetChanged();\r\n\t}", "public final void updateRecyclerUI() {\n Collection collection = this.setList;\n if (collection == null || collection.isEmpty()) {\n Collection collection2 = this.notSetList;\n if (collection2 == null || collection2.isEmpty()) {\n LinearLayout linearLayout = (LinearLayout) _$_findCachedViewById(C2723R.C2726id.llSet);\n Intrinsics.checkExpressionValueIsNotNull(linearLayout, \"llSet\");\n linearLayout.setVisibility(8);\n LinearLayout linearLayout2 = (LinearLayout) _$_findCachedViewById(C2723R.C2726id.llNotSet);\n Intrinsics.checkExpressionValueIsNotNull(linearLayout2, \"llNotSet\");\n linearLayout2.setVisibility(8);\n return;\n }\n }\n if (this.setList.size() != 0) {\n LinearLayout linearLayout3 = (LinearLayout) _$_findCachedViewById(C2723R.C2726id.llSet);\n Intrinsics.checkExpressionValueIsNotNull(linearLayout3, \"llSet\");\n linearLayout3.setVisibility(0);\n Collection collection3 = this.notSetList;\n if (collection3 == null || collection3.isEmpty()) {\n View _$_findCachedViewById = _$_findCachedViewById(C2723R.C2726id.separatorSet);\n Intrinsics.checkExpressionValueIsNotNull(_$_findCachedViewById, \"separatorSet\");\n _$_findCachedViewById.setVisibility(8);\n } else {\n View _$_findCachedViewById2 = _$_findCachedViewById(C2723R.C2726id.separatorSet);\n Intrinsics.checkExpressionValueIsNotNull(_$_findCachedViewById2, \"separatorSet\");\n _$_findCachedViewById2.setVisibility(0);\n }\n SetSaleDocAdapter setSaleDocAdapter2 = this.setSaleDocAdapter;\n if (setSaleDocAdapter2 == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"setSaleDocAdapter\");\n }\n setSaleDocAdapter2.setData(createSetSaleDocData(true));\n SetSaleDocAdapter setSaleDocAdapter3 = this.setSaleDocAdapter;\n if (setSaleDocAdapter3 == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"setSaleDocAdapter\");\n }\n setSaleDocAdapter3.notifyDataSetChanged();\n }\n if (this.notSetList.size() != 0) {\n LinearLayout linearLayout4 = (LinearLayout) _$_findCachedViewById(C2723R.C2726id.llNotSet);\n Intrinsics.checkExpressionValueIsNotNull(linearLayout4, \"llNotSet\");\n linearLayout4.setVisibility(0);\n NotSetSaleDocAdapter notSetSaleDocAdapter2 = this.notSetSaleDocAdapter;\n if (notSetSaleDocAdapter2 == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"notSetSaleDocAdapter\");\n }\n notSetSaleDocAdapter2.setData(createSetSaleDocData(false));\n NotSetSaleDocAdapter notSetSaleDocAdapter3 = this.notSetSaleDocAdapter;\n if (notSetSaleDocAdapter3 == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"notSetSaleDocAdapter\");\n }\n notSetSaleDocAdapter3.notifyDataSetChanged();\n Button button = (Button) _$_findCachedViewById(C2723R.C2726id.btnReviewPayment);\n Intrinsics.checkExpressionValueIsNotNull(button, \"btnReviewPayment\");\n button.setAlpha(0.5f);\n Button button2 = (Button) _$_findCachedViewById(C2723R.C2726id.btnReviewPayment);\n Intrinsics.checkExpressionValueIsNotNull(button2, \"btnReviewPayment\");\n button2.setClickable(false);\n return;\n }\n Button button3 = (Button) _$_findCachedViewById(C2723R.C2726id.btnReviewPayment);\n Intrinsics.checkExpressionValueIsNotNull(button3, \"btnReviewPayment\");\n button3.setAlpha(1.0f);\n Button button4 = (Button) _$_findCachedViewById(C2723R.C2726id.btnReviewPayment);\n Intrinsics.checkExpressionValueIsNotNull(button4, \"btnReviewPayment\");\n button4.setClickable(true);\n }", "protected void updateDisplay() {\n BuildingAdapter adapter = new BuildingAdapter(this, R.layout.item_building, buildingList);\n setListAdapter(adapter);\n }", "@Override\n public void onDataSetChanged() {\n final long identityToken = Binder.clearCallingIdentity();\n mPresenter.getStocksData();\n Binder.restoreCallingIdentity(identityToken);\n }", "public void notifyStudentsChanged(){\n notifyDataSetChanged();\n }", "private void updateCollectedView() {\n mCollectedCoins = Data.getCollectedCoins();\n mRecyclerViewRec.setVisibility(View.INVISIBLE);\n mRecyclerViewCol.setVisibility(View.VISIBLE);\n mCollectedAdapter.notifyDataSetChanged();\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n holder.currentPosition = position;\n holder.bindData(mCaloriesEntryList.get(position));\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n\n }", "public void refresh() {\r\n\r\n if (searchResultAdapter != null\r\n && preferencesManager.getProperty(\r\n PreferencesManager.IS_THEME_CHANGED, false)) {\r\n\r\n searchResultAdapter.notifyDataSetChanged();\r\n }\r\n\r\n }", "private void updateReviews() {\n ArrayList<MovieReview> movieReviewArrayList = new ArrayList<>();\n reviewRecyclerView = findViewById(R.id.reviews_recycler_view);\n reviewRecyclerView.setLayoutManager(new LinearLayoutManager(this));\n movieReviewAdapter = new MovieReviewAdapter(movieReviewArrayList, MovieDetailActivity.this);\n reviewRecyclerView.setAdapter(movieVideoAdapter);\n }", "@Override\n public void viewPagerNotifyDataSetChanged() {\n if (mediaDetails!=null){\n mediaDetails.notifyDataSetChanged();\n }\n }", "@Override\n public void onBindViewHolder(ViewHolder itemViewHolder, int position) {\n }", "private void reloadListView() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mDevicesListViewAdapter.notifyDataSetChanged();\n }\n });\n }", "private void updateVideo() {\n ArrayList<String> movieVideoArrayList = new ArrayList<String>();\n videoRecyclerView = findViewById(R.id.trailer_recycler_view);\n videoRecyclerView.setLayoutManager(new GridLayoutManager(this, 4));\n movieVideoAdapter = new MovieVideoAdapter(movieVideoArrayList, MovieDetailActivity.this);\n videoRecyclerView.setAdapter(movieVideoAdapter);\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n final Rate rate = mRates.get(position);\n setImage(rate,holder);\n setRate(rate,holder);\n setText(rate,holder);\n }", "private void setDataInRecyclerView() {\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());\n recyclerView.setLayoutManager(linearLayoutManager);\n // call the constructor of UsersAdapter to send the reference and data to Adapter\n ReviewAdapter reviewAdapter = new ReviewAdapter(reviewListResponseData, this);\n recyclerView.setAdapter(reviewAdapter); // set the Adapter to RecyclerView\n }", "@Override\n //updates view items in recycler view\n public final void onBindViewHolder(ViewHolder holder, int position) {\n Book book = bookList.get(position);\n\n holder.authorName.setText(book.getAuthor());\n holder.bookTitle.setText(book.getTitle());\n\n //takes updated image url to load image inside imageview\n Glide.with(context).load(book.getImageURL()).into(holder.cover);\n\n }", "@Override\n\t\t\tpublic void onRefresh() {\n\t\t\t\tmWeixinRecyclerView.setAdapter(mAdapter);\n\t\t\t\tmSwipeRefreshLayout.setRefreshing(false);\n\n\t\t\t}", "private void setData() {\n\n if (id == NO_VALUE) return;\n MarketplaceItem item = ControllerItems.getInstance().getModel().getItemById(id);\n if (item == null) return;\n\n ControllerAnalytics.getInstance().logItemView(id, item.getTitle());\n\n if (item.getPhotos() != null\n && item.getPhotos().size() > 0 &&\n !TextUtils.isEmpty(item.getPhotos().get(0).getSrc_big(this)))\n Picasso.with(this).load(item.getPhotos().get(0).getSrc_big(this)).into((ImageView) findViewById(R.id.ivItem));\n else if (!TextUtils.isEmpty(item.getThumb_photo()))\n Picasso.with(this).load(item.getThumb_photo()).into((ImageView) findViewById(R.id.ivItem));\n\n adapter.updateData(item, findViewById(R.id.rootView));\n }", "@Override\n protected void onPostExecute(Boolean aBoolean) {\n mAdapter.notifyDataSetChanged();\n }", "@Override\n public void onItemsReceived(int type, List<DiscoverItem> items) {\n if (refreshView != null && refreshView.isRefreshing()) {\n refreshView.setRefreshing(false);\n }\n\n if (adapter != null) adapter.update(type, items);\n }", "public interface IMainView extends IView{\n\n\n void refreshRecyclerData(List<Data> newData);\n}", "public void dataSetChanged() {\n int count = this.mAdapter.getCount();\n this.mExpectedAdapterCount = count;\n boolean z = this.mItems.size() < (this.mOffscreenPageLimit * 2) + 1 && this.mItems.size() < count;\n int i = this.mCurItem;\n this.mChangeData = true;\n boolean z2 = z;\n int i2 = i;\n int i3 = 0;\n boolean z3 = false;\n while (i3 < this.mItems.size()) {\n ItemInfo itemInfo = this.mItems.get(i3);\n int itemPosition = this.mAdapter.getItemPosition(itemInfo.object);\n if (itemPosition != -1) {\n if (itemPosition == -2) {\n this.mItems.remove(i3);\n i3--;\n if (!z3) {\n this.mAdapter.startUpdate((ViewGroup) this);\n z3 = true;\n }\n this.mAdapter.destroyItem((ViewGroup) this, itemInfo.position, itemInfo.object);\n if (this.mCurItem == itemInfo.position) {\n i2 = Math.max(0, Math.min(this.mCurItem, count - 1));\n }\n } else if (itemInfo.position != itemPosition) {\n if (itemInfo.position == this.mCurItem) {\n i2 = itemPosition;\n }\n itemInfo.position = itemPosition;\n }\n z2 = true;\n }\n i3++;\n }\n if (z3) {\n this.mAdapter.finishUpdate((ViewGroup) this);\n }\n if (z2) {\n int childCount = getChildCount();\n for (int i4 = 0; i4 < childCount; i4++) {\n LayoutParams layoutParams = (LayoutParams) getChildAt(i4).getLayoutParams();\n if (!layoutParams.isDecor) {\n layoutParams.widthFactor = 0.0f;\n }\n }\n setCurrentItemInternal(i2, false, true);\n requestLayout();\n }\n }", "@Override\n public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n if(holder instanceof EntityViewHolder){\n EntityViewHolder entityViewHolder = ((EntityViewHolder) holder);\n entityViewHolder.getNumeroColumnas().setText(\"\");\n entityViewHolder.getNumeroRegistros().setText(\"\");\n entityViewHolder.getNumeroEntity().setText(\"\");\n entityViewHolder.getNumeroEntity().setText(\"\");\n AbstractDao dao = daoApp.getEntityByName(entityList.get(position));\n entityViewHolder.getNombreEntity().setText(entityList.get(position));\n entityViewHolder.getNumeroEntity().setText(\"\"+position);\n entityViewHolder.getLinearLayout().setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mOnItemClickLister.onItemClicked(entityList.get(position),position);\n }\n });\n entityViewHolder.getNumeroColumnas().setText(\"\"+dao.getAllColumns().length);\n entityViewHolder.getNumeroRegistros().setText(\"\"+dao.count());\n entityViewHolder.getLinearLayout().setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mOnItemClickLister.onItemClicked(entityList.get(position),position);\n\n }\n });\n\n }\n\n\n\n }", "@Override\n public void onChanged(List<Contact> updatedContacts) {\n adapter.clear();\n adapter.addAll(updatedContacts);\n adapter.notifyDataSetChanged();\n }", "@Override\n public void onAdapterAboutToEmpty(int itemsInAdapter) {\n arrayAdapter.notifyDataSetChanged();\n Log.d(\"LIST\", \"notified\");\n i++;\n }", "public void refreshMemberList () {\n if (tourMemberAdapter != null) {\n tourMemberAdapter.notifyDataSetChanged();\n }\n }", "private void update(int position) {\n File f = list_items[position];\n list_items = f.listFiles();\n notifyDataSetChanged();\n }", "@Override\n public void refreshView(Context context, RecyclerView.ViewHolder holder) {\n ((ViewHolder) holder).id_text_test.setText(test);\n// mHolder.id_image_item_shown.setImageDrawable(\n// context.getResources().getDrawable(R.drawable.item_translation));\n }", "@Override\n public void finishUpdate(ViewGroup container) {\n mAdapter.finishUpdate(container);\n }", "@Override\n public void finishUpdate(ViewGroup container) {\n mAdapter.finishUpdate(container);\n }", "private void updateAdapterForViewPager() {\n\n// Stops the page loading animation when response is received successfully\n binding.shimmerFrameLayoutVP.stopShimmer();\n binding.shimmerFrameLayoutVP.setVisibility(View.GONE);\n\n if (vp_adapter == null) {\n vp_adapter = new MainActivityVP_Adapter(this, now_playing_movies, this);\n binding.homeViewPagerID.setAdapter(vp_adapter);\n vp_adapter.notifyDataSetChanged();\n } else if (movieNow_vm.getListLiveDataMovieNow().getValue() != null) {\n vp_adapter = new MainActivityVP_Adapter(this, movieNow_vm.getListLiveDataMovieNow().getValue(), this);\n binding.homeViewPagerID.setAdapter(vp_adapter);\n } else {\n vp_adapter.notifyDataSetChanged();\n }\n\n }", "private void searchRefresh(){\n adapter = new FoundRecyclerviewAdapter(FoundActivity.this, search);\n v.setAdapter(adapter);\n }", "@Override\n public void setChanged() {\n set(getItem());\n }", "public void setAdapter() {\n datalist = new ArrayList<>();\n\n adapter = new SoundListAdapter(context, datalist, new AdapterClickListener() {\n @Override\n public void onItemClick(View view, int pos, Object object) {\n\n SoundsModel item = (SoundsModel) object;\n\n if (view.getId() == R.id.done) {\n stopPlaying();\n downLoadMp3(item.id, item.sound_name, item.acc_path);\n } else if (view.getId() == R.id.fav_btn) {\n callApiForFavSound(pos, item);\n } else {\n if (thread != null && !thread.isAlive()) {\n stopPlaying();\n playaudio(view, item);\n } else if (thread == null) {\n stopPlaying();\n playaudio(view, item);\n }\n }\n }\n });\n\n recyclerView.setAdapter(adapter);\n\n\n }" ]
[ "0.76744175", "0.76350534", "0.758731", "0.7406876", "0.7376782", "0.7299191", "0.7292515", "0.7277008", "0.72366214", "0.7216188", "0.7195797", "0.7186586", "0.7173647", "0.7172947", "0.71686524", "0.71660715", "0.7157731", "0.7138066", "0.7128678", "0.71198297", "0.7063856", "0.70283765", "0.6998517", "0.6975763", "0.69674313", "0.69610184", "0.6948105", "0.6935054", "0.6933336", "0.6922792", "0.6885285", "0.684525", "0.68365204", "0.6828219", "0.6821843", "0.67297196", "0.67198", "0.6670953", "0.6653504", "0.663418", "0.6624717", "0.66060597", "0.65985066", "0.65951794", "0.6587347", "0.658417", "0.6563706", "0.6558933", "0.6550367", "0.6536684", "0.65207434", "0.65171397", "0.6516084", "0.6508629", "0.6491332", "0.64896274", "0.6488582", "0.6479724", "0.64509064", "0.6450205", "0.644006", "0.6426342", "0.6421942", "0.6404076", "0.6399949", "0.6364399", "0.6362544", "0.63484913", "0.6347907", "0.6342976", "0.6339102", "0.63324815", "0.6325823", "0.6322112", "0.6308398", "0.63046616", "0.6301948", "0.62866443", "0.62854624", "0.6278575", "0.62756085", "0.6269635", "0.6266798", "0.6264744", "0.62630045", "0.6259164", "0.62515867", "0.6243621", "0.62399375", "0.6237699", "0.6237012", "0.623695", "0.6232898", "0.62313044", "0.62266433", "0.62266433", "0.62213653", "0.62119216", "0.6209396", "0.6208632" ]
0.7483635
3
/ Callback for clicking on an item
@Override public void onItemClick(View view, int position) { Toast.makeText(getContext(), "You clicked " + adapter.getItem(position) + " on row number " + position, Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void clickItem(int uid);", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\titemClickListener.Callback(itemInfo);\n\t\n\t\t\t}", "void issuedClick(String item);", "@Override\n public void itemClick(int pos) {\n }", "@Override\n public void onItemClicked(int itemPosition, Object dataObject) {\n }", "@Override\n public void OnItemClick(int position) {\n }", "void onClick(View item, View widget, int position, int which);", "@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tracks, getAdapterPosition());\n }", "@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }", "void onItemClick(Note note);", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (itemClicked != null)\n\t\t\t\t\titemClicked.OnItemClicked((BusinessType)item.getTag(), item);\n\t\t\t}", "@Override\n\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\tlong arg3) {\n\t\t\t\n\t\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\n\t}", "@Override\n public void onItemClick(int pos) {\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t\t\t}", "void onChamaItemClicked(int position);", "void onClick(PropertyItem item);", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t}", "void onItemClick(int position);", "@Override\r\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\r\n\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}", "abstract public void onSingleItemClick(View view);", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Log.w(TAG , \"POSITION : \" + position);\n\n itemClick(position);\n }", "@Override\n public void onClick(View view) {\n clickListener.onItemClicked(getBindingAdapterPosition());\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\t\t\t\t\tlong arg3) {\n\t\t\t}", "public void onItemClick(View view, int position);", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t}", "public interface ItemClickListener {\n void itemClicked(long feedItemId, View view);\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}", "void onItemClick(View view, int position);", "@Override\n\t\t\t\t\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\t\t\t\t\t\tint position, long id) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onClick(View v) {\n itemClickListener.itemClicked(movieId, v);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onClick(View v) {\n listener.onItemClick(v, position);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n\n\n }", "@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\r\n\t\t\t\t\tlong arg3) {\n\r\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\t\t\n\t}", "@Override\r\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\r\n\t\t\tlong id) {\n\r\n\t}", "@Override\n\tpublic void onItemClick(Object o, int position) {\n\n\t}", "@Override\n public void onClick(View v) {\n this.itemClickListener.onItemClick(v, getLayoutPosition());\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\n\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\tMainActivity sct = (MainActivity) act;\n\t\t\t\t\t\t\t\t\tsct.onItemClick(posit2, 11);\n\t\t\t\t\t\t\t\t}", "public interface OnItemClickedListener {\n\n\tvoid onItemClicked(Integer itemId);\n}", "@Override\r\n\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\t\tint position, long id) {\n\t\t\t\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\t\tpresenter.onItemClicked(position);\n\t}", "@Override\n public void onClick(View v) {\n if (listener != null)\n listener.onItemClick(itemView, getPosition());\n }", "@Override\n public void onItemClick(Nson parent, View view, int position) {\n }", "public interface ClickListener {\n void onCLickItem(int position);\n }", "@Override\n public void onItemClick(View view, String data) {\n }", "public interface ItemClickListener {\n void itemClicked(View view, int position, int id);\n}", "@Override\n public void onItemClick(View view, ListItem obj, int position) {\n }", "@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }", "@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }", "public void onItemClick(View view, int position) {\n\n }", "public interface OnClick {\n void onItemClick(String userId, String displayName);\n }", "@Override\n public void onClick(View v) {\n if (mListener != null){\n mListener.onItemClick(itemView, getLayoutPosition());\n }\n }", "@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> adapter, View view, int position,\r\n\t\t\t\t\tlong arg3) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n if (position >= 0) {\n Drawing drawing = mItems.get(position);\n Log.d(TAG, \"onItemClick with drawing id \" + drawing.getId());\n mCallBacks.onDrawingSelected(drawing.getId());\n }\n }", "@Override\n public void onItemClick(int position) {\n }", "@Override\r\n\tpublic void clicked(ItemMenuIcon icon, Player p) {\n\t\t\r\n\t}", "public interface ItemClickListener {\n void onMyTourItemClick(View view, String tourId, String tourStartId);\n }", "void onLinkClicked(@Nullable ContentId itemId);", "public void onClickNom(Personne item, int position);", "public interface ItemClickListener {\n\n\n void onItemClick(int pos);\n}", "public interface OnItemClick {\n void onClick(String id);\n}", "public interface ItemClickListener {\nvoid onClick(View view, int position);\n}", "@Override\n public void onClick(View v) {\n\n listener.onItemClick(getAdapterPosition(),v);\n }", "void onItemClicked(View view, int position, StockItemViewHolder viewHolder);", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\thandleClick(position);\n\t\t\t}", "@Override\n public void onClick(View view) {\n coinPositionListener.coinItemClick(view, getAdapterPosition());\n }", "@Override\n public void onClick(View view) {\n int position = getAdapterPosition();\n\n // Check if listener!=null bcz it is not guarantee that we'll call setOnItemClickListener\n // RecyclerView.NO_POSITION - Constant for -1, so that we don't click item at Invalid position (safety measure)\n if (listener != null && position != RecyclerView.NO_POSITION) {\n //listener.onItemClick(notes.get(position)); - used in RecyclerView.Adapter\n listener.onItemClick(getItem(position)); // getting data from superclass\n }\n }", "public interface ItemClickListener {\n void onItemClick(View view, int position);\n }", "public interface ItemClickListener {\n void onItemClick(View view, int position);\n }", "public interface ItemClickListener {\n void onItemClick(View view, int position);\n }", "public interface ItemClickListener {\n void onItemClick(View view, int position);\n }", "public interface ItemClickListener {\n void onItemClick(View view, int position);\n }", "public interface ItemClickListener {\n void onItemClick(View view, int position);\n }", "public interface ItemClickListener {\n void onItemClick(View view, int position);\n }", "public interface ItemClickListener {\n void onItemClick(View view, int position);\n }", "public interface ItemClickListener {\n void onItemClick(View view, int position);\n }", "public interface ItemClickListener {\n void onItemClick(View view, int position);\n }", "public interface ItemClickListener {\n void onItemClick(View view, int position);\n }", "public interface ItemClickListener {\n void onItemClick(View view, int position);\n }" ]
[ "0.8214339", "0.8087317", "0.79964817", "0.79821914", "0.78492606", "0.7834982", "0.78038704", "0.78036547", "0.7794688", "0.77348095", "0.7679006", "0.76654303", "0.76620036", "0.76528454", "0.7645843", "0.76441175", "0.763323", "0.7632486", "0.7627892", "0.7618359", "0.7614522", "0.7613714", "0.7613714", "0.7613168", "0.7593063", "0.7588551", "0.7581642", "0.7581535", "0.757131", "0.75689924", "0.7558244", "0.7558244", "0.7550389", "0.7550389", "0.755008", "0.7542136", "0.7496552", "0.7496552", "0.7496552", "0.7496552", "0.7496552", "0.7484259", "0.74829596", "0.74829596", "0.74829596", "0.74715376", "0.7470426", "0.7470426", "0.7467897", "0.7461301", "0.74568176", "0.74506474", "0.74488664", "0.74488664", "0.7443138", "0.744012", "0.7437614", "0.7403798", "0.73938537", "0.7387113", "0.73838836", "0.7377273", "0.736486", "0.7358014", "0.73560375", "0.735512", "0.73550355", "0.7351357", "0.73398453", "0.7332551", "0.7332551", "0.73311377", "0.7322831", "0.7316167", "0.7309058", "0.72988147", "0.72774434", "0.72464", "0.72459316", "0.7244987", "0.7237773", "0.7232408", "0.72319883", "0.72263503", "0.72204983", "0.72106904", "0.72084886", "0.7197342", "0.71916586", "0.7190543", "0.7190543", "0.7190543", "0.7190543", "0.7190543", "0.7190543", "0.7190543", "0.7190543", "0.7190543", "0.7190543", "0.7190543", "0.7190543" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { System.out.println("Hola Mundo o/"); int i = 0; int nota = 0; boolean copia = true; do{ System.out.println("Tu nota es a" + nota); if(i>20) { break; } i++; }while(copia); System.out.println("Wiiiiii"); }
{ "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
System management service. Add/Update/Remove and show all the systems that will communicate with the record removal service
@RemoteServiceRelativePath("solr-system") public interface SolrSystemService extends RemoteService { /** * Create a new system * * @param systemDTO * The system to create * @param userDTO * The user that creates the system */ void createSolrSystem(SolrSystemDTO systemDTO, UserDTO userDTO); /** * Update a selected system * * @param systemDTO * The system to update * @param userDTO * The user that updates the system */ void updateSolrSystem(SolrSystemDTO systemDTO, UserDTO userDTO); /** * Delete a system * * @param systemDTO * The system to delete * @param userDTO * The user that deletes the system */ void deleteSolrSystem(SolrSystemDTO systemDTO, UserDTO userDTO); /** * Show a list of all the systems the system can communicate with * * @param userDTO * the user that requested the systems * @return A list of all the available systems */ List<SolrSystemDTO> showAllSolrSystems(UserDTO userDTO); boolean optimize(SolrSystemDTO sustemDTO, UserDTO userDTO); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showServices()\n {\n // Remove all of the items from the listField.\n _treeField.deleteAll();\n \n // Get a copy of the ServiceRouting class.\n ServiceRouting serviceRouting = ServiceRouting.getInstance();\n \n // Add in our new items by trolling through the ServiceBook API.\n ServiceBook sb = ServiceBook.getSB();\n ServiceRecord[] records = sb.getRecords();\n \n if( records == null ) \n {\n return;\n }\n \n int rootNode = _treeField.addChildNode( 0, \"Service Records\" );\n \n int numRecords = records.length;\n \n for( int i = 0; i < numRecords; i++ ) \n {\n String name = records[i].getName();\n String description = records[i].getDescription();\n \n if( description == null || description.length() == 0 ) \n {\n description = \"No description available\" ;\n }\n \n String uid = records[i].getUid();\n boolean serialBypass = serviceRouting.isSerialBypassActive( uid );\n\n int newParentNode = _treeField.addChildNode( rootNode, name );\n _treeField.addChildNode( newParentNode, description );\n _treeField.addChildNode( newParentNode, uid );\n _treeField.addChildNode( newParentNode, serialBypass ? \"Serial Bypass: Connected\" : \"Serial Bypass: Disconnected\");\n \n // Perform the check for the Desktop SerialRecord.\n if( name != null && name.equals( \"Desktop\" )) \n {\n _desktopUID = uid;\n }\n }\n \n _treeField.setCurrentNode( rootNode ); // Set the root as the starting point.\n }", "@GetMapping(\"/systems\")\r\n\tpublic String showSystems() {\r\n\r\n\t\treturn \"systems\";\r\n\t}", "@GetMapping(Mappings.SYSTEMS)\n\tpublic String showSystems() {\n\n\t\treturn ViewNames.ADMIN_PANEL;\n\t}", "@Override\r\n\tpublic List<MySys> getAllSystems() {\n\t\tString sql = \"SELECT * FROM systems ORDER BY sgroup;\";\r\n\t\t\r\n\t\tList<MySys> list = new ArrayList<MySys>();\r\n\t\tList<Map<String,Object>> rows = this.jdbcTemplate.queryForList(sql);\r\n\t\tfor (Map<String, Object> row : rows) {\r\n\t\t\tMySys sys = new MySys();\r\n\t\t\tsys.setId((int)row.get(\"idsystems\"));\r\n\t\t\tsys.setName((String)row.get(\"sysname\"));\r\n\t\t\tsys.setAlias((String)row.get(\"sysalias\"));\r\n\t\t\tsys.setState((int)row.get(\"state\"));\r\n\t\t\tsys.setStatetime((Date)row.get(\"statetime\"));\r\n\t\t\tlist.add(sys);\r\n\t\t}\r\n\t\t\r\n\t\treturn list;\r\n\t}", "public static void addNewServices() {\n displayAddNewServicesMenu();\n processAddnewServicesMenu();\n }", "@Override\n\t\tpublic void getService(String system_id) throws RemoteException {\n\t\t\tSystem.out.println(\"get service invoke on \" + system_id);\n\t\t}", "public void updateStoredServices() {\n\t\ttableModelStoredServices.setData(((PswGenCtl) ctl).getServices().getServices());\n\t}", "private void servicesManager(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\t// Extract service and command\r\n\t\tif ( req.getPathInfo().length() > 0 ) {\r\n\t\t\tString path = req.getPathInfo().substring(1);\r\n\t\t\tif ( path.indexOf(\"/\") > 0 ) {\r\n\t\t\t\tString service = path.substring(0, path.indexOf(\"/\"));\r\n\t\t\t\tString cmd = path.substring(path.indexOf(\"/\")+1);\r\n\t\t\t\t// Search service manager and execute it \r\n\t\t\t\tServiceJSManager serv = this.services.get(service);\r\n\t\t\t\tif ( serv != null ) {\r\n\t\t\t\t\tServiceJSResponse r;\r\n\t\t\t\t\tthis.dsp.startProcessing(req);\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tr = serv.execute(this.dsp,cmd,req.getParameterMap());\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO: manage exception\r\n\t\t\t\t\t\tthrow new ServletException(e);\r\n\t\t\t\t\t} finally {\r\n\t\t\t\t\t\tthis.dsp.endProcessing();\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tif (LOG != null && LOG.isDebugEnabled() ) LOG.debug(\"packaging response: %s\",req.getRequestURI());\r\n\t\t\t\t\t\tthis.serviceResponser(r, resp);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\te = null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// TODO: service unknown\r\n\t\t\r\n\t\t\r\n\t\tString out = \"DONE\\n\\r\"\r\n\t\t\t\t+\"XXX\";\r\n\t\tresp.setContentLength(out.length());\r\n\t\tresp.setContentType(\"text/plain\");\r\n\t\tresp.getWriter().println(out);\r\n\t\tresp.getWriter().close();\r\n\t}", "@Override\n\tpublic synchronized StorageOperationResponse<GetStorageSystemsResponse> getStorageSystems(\n\t\t\tGetStorageSystemsRequest request) {\n\t\tlogger.log(IJavaEeLog.SEVERITY_DEBUG, this.getClass().getName(), \"getStorageSystems: \" + request.storageSystemIds , null);\n\t\ttry {\n\t\tList<String> requestedSystems = request.storageSystemIds;\n\t\tArrayList<StorageSystem> systemList = new ArrayList<StorageSystem>();\n\t\tif (requestedSystems == null||requestedSystems.isEmpty()) {\n\t\t\tList<String> regions = openstackClient.getRegions();\n\t\t\tlogger.log(IJavaEeLog.SEVERITY_DEBUG, this.getClass().getName(), \"getStorageSystems: zones:\" + regions , null);\n\t\t\tfor (String region : regions) {\n\t\t \t systemList.add(OpenstackAdapterUtil.createStorageSystem(region,accountId));\n\t\t\t}\n\t\t} else {\n\t\t\tList<String> zones = openstackClient.getAvailabilityZones();\n\t\t\tboolean found = false;\n\t\t\tfor (int i = 0;i<requestedSystems.size();i++) {\n\t\t\t if(requestedSystems.get(i) == null) {\n\t\t\t\t systemList.add(null);\n\t\t\t\t continue;\n\t\t\t }\n\t\t found = false;\n\t\t\t for(String zone : zones) {\n\t\t\t if (requestedSystems.get(i).equals(accountId+':'+zone)) {\n\t\t \t systemList.add(OpenstackAdapterUtil.createStorageSystem(zone, accountId));\n\t\t \t found = true;\n\t\t \t break;\n\t\t }\n\t\t\t }\n\t\t\t if (!found) {\n\t\t\t systemList.add(null);\n\t\t\t }\n\t\t\t}\n\t\t}\n\t\tlogger.log(IJavaEeLog.SEVERITY_DEBUG, this.getClass().getName(), \"getStorageSystems: systems found: \" + systemList.size() + \" systems: \" + systemList , null);\n\t\tGetStorageSystemsResponse payload = new GetStorageSystemsResponse();\n\t\tpayload.storageSystems = systemList;\n\t\tStorageOperationResponse<GetStorageSystemsResponse> response = new StorageOperationResponse<GetStorageSystemsResponse>(payload);\n\t\tresponse.setPercentCompleted(100);\n\t\tresponse.setStatus(StorageOperationStatus.COMPLETED);\n\t\treturn response;\n\n\t\t } catch (Exception e) {\n\t\t\tlogger.traceThrowable(IJavaEeLog.SEVERITY_DEBUG, this.getClass().getName(), \"getStorageSystems:\" + e.getMessage(), null,e);\n\t\t\treturn StorageAdapterImplHelper.createFailedResponse(e.getMessage(), GetStorageSystemsResponse.class); \n\t\t\t\n\t\t}\n\t}", "public List<ServerServices> listServerServices();", "@SuppressWarnings(\"finally\")\n\t@Override\n\tpublic Response showSystem() {\n\t\tBaseResponse<NotifyTemplate> br = new BaseResponse<NotifyTemplate>();\n\t\ttry\n\t\t{\n\t\tList<NotifyTemplate> systemList;\n\t\tjdbcTemplate.setDataSource(dataSourceProvider.getDataSource(FiinfraConstants.BU_DEFAULT));\n\t\tsystemList=jdbcTemplate.query(FiinfraConstants.SP_GET_SYSTEM_RECEPIENT_CHANNEL,new Object[]{FiinfraConstants.NOTIFYTYPE_ID} ,new BeanPropertyRowMapper<NotifyTemplate>(NotifyTemplate.class));\n\t\tbr.setResponseListObject(systemList); \n\t\tresponse=FiinfraResponseBuilder.getSuccessResponse(br, null);\n\t\t}\n\t\tcatch (DataAccessException e) {\n\t\t\tresponse = FiinfraResponseBuilder.getErrorResponse(e.getMessage().toString());\n\t\t}\n\t\tfinally\n\t\t{ \n\t\t\treturn response;\n\t\t\t\t} \n\t}", "public void printHostSystems() throws InvalidProperty, RuntimeFault, RemoteException{\r\n\t\tManagedEntity[] mes = new\r\n\t\t\t\tInventoryNavigator(_instance.getRootFolder()).searchManagedEntities(\"HostSystem\");\r\n\t\tfor (int i = 0; i < mes.length; i++) {\r\n\t\t\tHostSystem currHostSystem = (HostSystem)mes[i];\r\n\t\t\tSystem.out.printf(\"host[%d]: Name = %s\\n\", i, currHostSystem.getName());\r\n\t\t}\r\n\t}", "public interface SystemService {\n\n /**\n * 根据用户名获取User对象\n *\n * @param name 用户名\n * @return 用户对象\n */\n User findUserById(String name);\n\n\n /**\n * 是否存在User\n *\n * @param name 用户名\n * @return 存在返回true\n */\n boolean isUserByName(String name);\n\n\n /**\n * 是否存在User\n *\n * @param user 用户实体类\n * @return 存在返回true\n */\n boolean isUserByNameAndID(User user);\n\n /**\n * 添加User\n *\n * @param user 用户实体类\n */\n void addUser(User user);\n\n\n /**\n * 是否存在Role\n *\n * @param rolename 角色名称\n * @return 存在返回true\n */\n boolean isRoleByName(String rolename);\n\n /**\n * 根据角色名称、角色主键判断是否存在\n *\n * @param roleDb 角色实体类\n * @return 存在返回true\n */\n boolean isRoleByNameAndRoleid(Role roleDb);\n\n\n /**\n * 添加Role\n *\n * @param role 剧社实体类\n */\n void roleAdd(Role role);\n\n\n /**\n * 是否存在Model\n *\n * @param modelname 模块名称\n * @return 存在返回true\n */\n boolean isModelByName(String modelname);\n\n /**\n * 根据模块名称和模块主键查询\n *\n * @param modelDb 模块实体类\n * @return 存在返回true\n */\n boolean isModelByNameAndModelid(Model modelDb);\n\n /**\n * 添加Model\n *\n * @param model 模块实体类\n */\n void modelAdd(Model model);\n\n\n /**\n * 通过主键查找User\n *\n * @param userId 用户主键\n * @return User对象\n */\n User findUserById(Integer userId);\n\n /**\n * 通过主键查找Role\n *\n * @param roleId 角色主键\n * @return Role对象\n */\n Role findRoleById(Integer roleId);\n\n /**\n * 通过主键查找Model\n *\n * @param modelId 模块主键\n * @return Model对象\n */\n Model findModelById(Integer modelId);\n\n /**\n * 删除用户\n *\n * @param userId 用户主键\n */\n void userDelete(Integer userId);\n\n /**\n * 删除角色\n *\n * @param roleId 角色主键\n */\n void roleDelete(Integer roleId);\n\n\n /**\n * 删除Model\n *\n * @param modelId 模块主键\n */\n void modelDelete(Integer modelId);\n\n\n /**\n * 更新用户\n *\n * @param userDb 用户实体类\n */\n void updateUser(User userDb);\n\n\n /**\n * 更新角色\n *\n * @param roleDb 角色实体类\n */\n void updateRole(Role roleDb);\n\n\n /**\n * 更新model\n *\n * @param modelDb 模块实体类\n */\n void updateModel(Model modelDb);\n\n\n /**\n * 用户列表\n *\n * @param user 用户实体类\n * @param pageable 分页工具类\n * @return 返回用户列表\n */\n UserDto userList(User user, Pageable pageable);\n\n\n /**\n * 角色列表\n *\n * @param role 角色实体类\n * @param pageable 分页工具类\n * @return 角色列表\n */\n RoleDto roleList(Role role, Pageable pageable);\n\n\n /**\n * model列表\n *\n * @param model 模块实体类\n * @param pageable 分页工具类\n * @return 模块列表\n */\n ModelDto modelList(Model model, Pageable pageable);\n\n\n /**\n * 设置用户的属于角色\n *\n * @param userRolesDto 包含用户主键、角色主键DTO\n */\n void userRoles(UserRolesDto userRolesDto);\n\n /**\n * 设置角色管理的模块信息\n *\n * @param roleModelsDto 包含模块主键、角色主键DTO\n */\n void roleModels(RoleModelsDto roleModelsDto);\n\n\n /**\n * 通过userid查询用户角色绑定关系\n *\n * @param userid 用户主键\n * @return 用户角色绑定关系\n */\n List<ViewUserRole> findByUserid(Integer userid);\n\n /**\n * 通过roleid查询角色模块绑定关系\n *\n * @param roleid 角色主键\n * @return 角色模块绑定关系\n */\n List<ViewRoleModel> findByRoleid(Integer roleid);\n\n /**\n * 查询用户管理模块信息\n *\n * @param user 用户对象\n * @return 用户模块绑定关系\n */\n List<ViewUserModel> findModelList(User user);\n\n /**\n * 模块与DashBoard绑定关系\n *\n * @param dashboardDto 模块主键、仪表板主键DTO\n */\n void modelDashboards(ModelDashboardDto dashboardDto);\n\n\n}", "public Systems() {\r\n\t\t__initializeSystems = new ArrayList<InitializeSystem>();\r\n\t\t__executeSystems = new ArrayList<ExecuteSystem>();\r\n\t\t__renderSystems = new ArrayList<RenderSystem>();\r\n\t\t__tearDownSystems = new ArrayList<TearDownSystem>();\r\n\t}", "void process(float deltaInSec) {\n \t\tfor (EntitySystem system : systems) {\n \t\t\tif (system.isEnabled()) {\n \t\t\t\tsystem.processSystem(deltaInSec);\n \t\t\t}\n \t\t}\n \t}", "@Override\n\t\tpublic void emergencyServices() {\n\t\t\tSystem.out.println(\"FH--emergency services\");\t\n\t\t\t\n\t\t}", "public void serviceLoop() {\n this.transactionServices.linkServices();\n this.accountServices.linkServices();\n //this.userServices.linkServices();\n\n new UserMenu(this).displayMenu();\n\n new MainMenu(this).displayMenu();\n\n logOut();\n\n serviceLoop();\n }", "public void testServiceList()\n {\n ServiceList services = serviceSetup();\n\n ServiceIterator it = services.createServiceIterator();\n int i = 0;\n try\n {\n while (it.hasNext())\n {\n // Increment the service counter\n i++;\n // Get our next service\n ServiceExt service = (ServiceExt) it.nextService();\n log(\"******************************************************************\");\n log(\"* Services - Counter: (\" + i + \")\");\n dumpService(service);\n\n ServiceDetailsHandle[] handles = sidb.getServiceDetailsByService(service.getServiceHandle());\n\n ServiceDetailsExt[] details = new ServiceDetailsExt[handles.length];\n for (int j = 0; j < handles.length; j++)\n {\n details[j] = sidb.createServiceDetails(handles[j]);\n dumpServiceDetails(details[j]);\n assertEquals(\"ServiceDetails' Service does not match expected value\", service,\n details[j].getService());\n assertEquals(\"ServiceType does not match\", service.getServiceType(), details[j].getServiceType());\n }\n log(\"******************************************************************\");\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic List<Sysmanager> findChecksys(Sysmanager sys) {\n\t\treturn sm.checksys(sys);\n\t}", "@SuppressWarnings(\"unchecked\")\n \tvoid addSystem(EntitySystem system) {\n \t\tif (systems.contains(system))\n \t\t\tthrow new RuntimeException(\"System already added\");\n \t\tsystem.id = getNewSystemId();\n \t\tsystem.componentBits = world.getComponentBits(system.components);\n \n \t\tClass<? extends EntitySystem> class1 = system.getClass();\n \t\tdo {\n \t\t\tfor (Field field : class1.getDeclaredFields()) {\n \t\t\t\t// Check for ComponentManager declarations.\n \t\t\t\tif (field.getType() == ComponentMapper.class) {\n \t\t\t\t\tfield.setAccessible(true);\n \t\t\t\t\t// Read the type in the <> of componentmanager\n \t\t\t\t\tType type = ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0];\n \t\t\t\t\ttry {\n \t\t\t\t\t\t// Set the component manager declaration with the right\n \t\t\t\t\t\t// component manager.\n \t\t\t\t\t\tfield.set(system, world.getComponentMapper((Class<? extends Component>) type));\n \t\t\t\t\t} catch (IllegalArgumentException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t} catch (IllegalAccessException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t// check for EventListener declarations.\n \t\t\t\tif (field.getType() == EventListener.class) {\n \t\t\t\t\tfield.setAccessible(true);\n \t\t\t\t\t// Read the type in the <> of eventListener.\n \t\t\t\t\tType type = ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0];\n \t\t\t\t\t@SuppressWarnings(\"rawtypes\")\n \t\t\t\t\tEventListener<? extends Event> eventListener = new EventListener();\n \t\t\t\t\tworld.registerEventListener(eventListener, (Class<? extends Event>) type);\n \n \t\t\t\t\ttry {\n \t\t\t\t\t\t// Set the event listener declaration with the right\n \t\t\t\t\t\t// field listener.\n \t\t\t\t\t\tfield.set(system, eventListener);\n \t\t\t\t\t} catch (IllegalArgumentException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t} catch (IllegalAccessException 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\tclass1 = (Class<? extends EntitySystem>) class1.getSuperclass();\n \t\t} while (class1 != EntitySystem.class);\n \t\tsystems.add(system);\n \t\tsystemMap.put(system.id, system);\n\t\tsystem.world = world;\n \t}", "private ServiceList serviceSetup()\n {\n SIManager simgr = sm.createSIManager();\n ServiceList services = simgr.filterServices(new ServiceFilter()\n {\n public boolean accept(Service service)\n {\n return !(service instanceof AbstractService);\n }\n });\n try\n {\n services = services.sortByNumber();\n }\n catch (SortNotAvailableException ex)\n {\n // don't sort then\n }\n\n // Check to see if there are arguments\n // If length of one, then sourceID was specified\n // If length of three, then freq/prognum/modformat was specified\n if (args.length == 1)\n {\n String sid = args[0];\n if (args[0].startsWith(\"0x\")) sid = sid.substring(2, sid.length());\n try\n {\n int sourceID = Integer.parseInt(sid, 16);\n OcapLocator[] locs = { new OcapLocator(sourceID) };\n LocatorFilter filter = new LocatorFilter(locs);\n services = simgr.filterServices(filter);\n }\n catch (NumberFormatException ex)\n {\n log(\"SourceID is not in the correct format\");\n log(\"Proceeding with normal SIDump process\");\n }\n catch (Exception ex)\n {\n log(\"Exception while getting specified service: \" + ex.getMessage());\n log(\"Proceeding with normal SIDump process\");\n }\n }\n if (args.length == 3)\n {\n try\n {\n int freq = Integer.parseInt(args[0]);\n int prog = Integer.parseInt(args[1]);\n int mod = Integer.parseInt(args[2]);\n OcapLocator[] locs = { new OcapLocator(freq, prog, mod) };\n LocatorFilter filter = new LocatorFilter(locs);\n services = simgr.filterServices(filter);\n }\n catch (NumberFormatException ex)\n {\n log(\"Freq/prognum/modformat values are not valid\");\n log(\"Proceeding with normal SIDump process\");\n }\n catch (Exception ex)\n {\n log(\"Exception while getting specified service: \" + ex.getMessage());\n log(\"Proceeding with normal SIDump process\");\n }\n }\n\n return services;\n }", "public void update() {\r\n for (SGSystem sys : systems.toArray(new SGSystem[0])) {\r\n sys.update();\r\n }\r\n }", "public List<ClientSystem> getAssociatedSystems() {\n\t\treturn registeredSystems;\n\t}", "@Override\n\t\tpublic void setService(String system_id) throws RemoteException {\n\t\t\tSystem.out.println(\"set service invoke on \" + system_id);\n\t\t}", "private ServiceDisplay() {\n\t\tthis.idisplays = new ArrayList<IDisplay>();\n\t\tthis.idisplays.add(DisplayPorConsola.getInstancia());\n\t}", "@Transactional(readOnly = true)\n public List<SystemDTO> findAll() {\n log.debug(\"Request to get all Systems\");\n return systemRepository.findAll().stream()\n .map(systemMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "public ShowSystemStatusResponse showSystemStatus(ShowSystemStatusRequest request) throws GPUdbException {\n ShowSystemStatusResponse actualResponse_ = new ShowSystemStatusResponse();\n submitRequest(\"/show/system/status\", request, actualResponse_, false);\n return actualResponse_;\n }", "private void initExternalSystemsAvailable() {\n externalSystemsAvailable.add(\"Accounting system\");\n externalSystemsAvailable.add(\"Tax system\");\n }", "public void setSystemId( String systemId ) { this.systemId = systemId; }", "public SystemServiceManager getSystemServiceManager() {\n return this.mService.mSystemServiceManager;\n }", "public interface ServiceManagerInterface {\n\n /**\n * add a Service\n * @param servicePackage the service package to register\n * @param configuration The configuration of the client\n * @param profile the client profile\n * @return The added service description\n * @throws IOException\n * @throws SoapException\n */\n AGServiceDescription addService(\n AGServicePackageDescription servicePackage,\n AGParameter[] configuration,\n ClientProfile profile)\n throws IOException, SoapException;\n\n /**\n * gets the service manager description\n * @return service manager description\n * @throws IOException\n * @throws SoapException\n */\n AGServiceManagerDescription getDescription()\n throws IOException, SoapException;\n\n /**\n * gets the url of the node service\n * @return url of node service\n * @throws IOException\n * @throws SoapException\n */\n String getNodeServiceUrl()\n throws IOException, SoapException;\n\n /**\n * gets the available services\n * @return a vector of available services\n * @throws IOException\n * @throws SoapException\n */\n AGServiceDescription[] getServices()\n throws IOException, SoapException;\n\n /**\n * test whether the service manager is valid\n * @return the 'valid' state\n * @throws IOException\n * @throws SoapException\n */\n int isValid() throws IOException, SoapException;\n\n /**\n * removes a service from the service manager\n * @param serviceDescription the description of the service to be removed\n * @throws IOException\n * @throws SoapException\n */\n void removeService(AGServiceDescription serviceDescription)\n throws IOException, SoapException;\n\n /**\n * removes all services from the service manager\n * @throws IOException\n * @throws SoapException\n */\n void removeServices() throws IOException, SoapException;\n\n /**\n * sets the url for node service\n * @param nodeServiceUri\n * @throws IOException\n * @throws SoapException\n */\n void setNodeServiceUrl(String nodeServiceUri)\n throws IOException, SoapException;\n\n /**\n * shuts down the service manager\n * @throws IOException\n * @throws SoapException\n */\n void shutdown() throws IOException, SoapException;\n\n /**\n * stops all services on service manager\n * @throws IOException\n * @throws SoapException\n */\n void stopServices() throws IOException, SoapException;\n\n /**\n * gets the version number of the service manager\n * @return string with version of service manager\n * @throws IOException\n * @throws SoapException\n */\n String getVersion() throws IOException, SoapException;\n\n\n /**\n * Requests to join a bridge\n * @param bridgeDescription The description of the bridge\n * @throws IOException\n * @throws SoapException\n */\n void joinBridge(BridgeDescription bridgeDescription)\n throws IOException, SoapException;\n\n /**\n * Sets the streams of this service manager\n *\n * @param streamDescriptionList a vector of stream descriptions\n * @throws IOException\n * @throws SoapException\n */\n void setStreams(StreamDescription[] streamDescriptionList)\n throws IOException, SoapException;\n /**\n * adds a stream\n * @param argname stream description of new stream\n * @throws IOException\n * @throws SoapException\n */\n void addStream(StreamDescription argname)\n throws IOException, SoapException;\n /**\n * Removes a stream\n * @param argname The stream to remove\n * @throws IOException\n * @throws SoapException\n */\n void removeStream(StreamDescription argname)\n throws IOException, SoapException;\n /**\n * Sets the point of reference for network traffic\n * @param url The url of the point of reference server\n * @throws IOException\n * @throws SoapException\n */\n void setPointOfReference(String url)\n throws IOException, SoapException;\n\n /**\n * Sets the encryption\n * @param encryption The encryption\n * @throws IOException\n * @throws SoapException\n */\n void setEncryption(String encryption)\n throws IOException, SoapException;\n /**\n * Instructs the client to run automatic bridging\n * @throws IOException\n * @throws SoapException\n */\n void runAutomaticBridging()\n throws IOException, SoapException;\n\n /**\n * Determines if a service is enabled\n * @param service The service to get the status of\n * @return True if enabled, false otherwise\n * @throws IOException\n * @throws SoapException\n */\n boolean isServiceEnabled(AGServiceDescription service)\n throws IOException, SoapException;\n\n /**\n * Enables or disables a service\n * @param service The service to control\n * @param enabled True to enable, false to disable\n * @throws IOException\n * @throws SoapException\n */\n void enableService(AGServiceDescription service, boolean enabled)\n throws IOException, SoapException;\n\n /**\n * Gets the configuration parameters of a service\n * @param service The service to get the configuration of\n * @return The parameters\n * @throws IOException\n * @throws SoapException\n */\n AGParameter[] getServiceConfiguration(AGServiceDescription service)\n throws IOException, SoapException;\n /**\n * Sets the configuration parameters for a service\n * @param service The service to configure\n * @param config The new parameters\n * @throws IOException\n * @throws SoapException\n */\n void setServiceConfiguration(AGServiceDescription service,\n AGParameter[] config)\n throws IOException, SoapException;\n\n /**\n * Sets the client profile\n * @param profile The new profile\n * @throws IOException\n * @throws SoapException\n */\n void setClientProfile(ClientProfile profile)\n throws IOException, SoapException;\n}", "public void setSystemId(String systemId);", "void addSystem(EntitySystem... systems) {\n \t\tfor (EntitySystem s : systems)\n \t\t\taddSystem(s);\n \t}", "private ServiceManage() {\r\n\t\tInitialThreads();\r\n\t}", "private void updateSystemObjectsName(OpProjectSession session, OpBroker broker) {\r\n OpUser admin = session.administrator(broker);\r\n admin.setDisplayName(OpUser.ADMINISTRATOR_DISPLAY_NAME);\r\n admin.setDescription(OpUser.ADMINISTRATOR_DESCRIPTION);\r\n OpGroup every = session.everyone(broker);\r\n every.setDisplayName(OpGroup.EVERYONE_DISPLAY_NAME);\r\n every.setDescription(OpGroup.EVERYONE_DESCRIPTION);\r\n broker.updateObject(admin);\r\n broker.updateObject(every);\r\n }", "public void ventilationServices() {\n\t\tSystem.out.println(\"FH----overridden method from hospital management--parent class of fortis hospital\");\n\t}", "public Set getAssignableServices() throws SMSException {\n // Get all service names, and remove the assigned services\n // Set containing service names that has organization schema\n Set orgSchemaServiceNames = new HashSet();\n try {\n for (Iterator names = getServiceNames(token).iterator(); names\n .hasNext();) {\n String serviceName = (String) names.next();\n ServiceSchemaManagerImpl ssmi = ServiceSchemaManagerImpl\n .getInstance(token, serviceName, \n ServiceManager.getVersion(serviceName));\n if (ssmi.getSchema(SchemaType.ORGANIZATION) != null) {\n // Need to check if the user has permission\n // to add/assign the service\n StringBuffer d = new StringBuffer(100);\n // Need to construct\n // \"ou=default,ou=organizationconfig,ou=1.0,ou=\"\n d.append(SMSEntry.PLACEHOLDER_RDN).append(SMSEntry.EQUALS)\n .append(SMSUtils.DEFAULT).append(SMSEntry.COMMA)\n .append(CreateServiceConfig.ORG_CONFIG_NODE)\n .append(SMSEntry.PLACEHOLDER_RDN).append(\n SMSEntry.EQUALS).append(\"1.0\").append(\n SMSEntry.COMMA).append(\n SMSEntry.PLACEHOLDER_RDN).append(\n SMSEntry.EQUALS);\n // Append service name, and org name\n d.append(serviceName);\n if (!orgDN.equalsIgnoreCase(DNMapper.serviceDN)) {\n d.append(SMSEntry.COMMA).append(SMSEntry.SERVICES_NODE);\n }\n d.append(SMSEntry.COMMA).append(orgDN);\n try {\n // The function will throw exception if\n // user does not have permissions\n SMSEntry.getDelegationPermission(token, d.toString(),\n SMSEntry.modifyActionSet);\n orgSchemaServiceNames.add(serviceName);\n } catch (SMSException smse) {\n if (smse.getExceptionCode() != \n SMSException.STATUS_NO_PERMISSION) \n {\n throw (smse);\n }\n }\n }\n }\n // Need to remove mandatory services\n // %%% TODO. Need to have SMS Service with this information\n // orgSchemaServiceNames.removeAll(getMandatoryServices());\n } catch (SSOException ssoe) {\n SMSEntry.debug.error(\"OrganizationConfigManager.\"\n + \"getAssignableServices(): SSOException\", ssoe);\n throw (new SMSException(SMSEntry.bundle\n .getString(\"sms-INVALID_SSO_TOKEN\"),\n \"sms-INVALID_SSO_TOKEN\"));\n }\n // Remove assigned services\n HashSet answer = new HashSet(orgSchemaServiceNames);\n answer.removeAll(getAssignedServices());\n return (answer);\n }", "public interface ListService {\n\n public String showListCmd();\n\n}", "public Object _getLSservices(CommandInterpreter ci) {\n\t\tSet<Registration> regs = identityManager.getLocalServices();\n\t\tci.print(\"Local Services:\\n------------------\\n\");\n\t\tfor (Registration r : regs) {\n\t\t\tci.print(\"> Service with VA \" + r.getVirtualAddress().toString() + \" \\n\");\n\t\t\tfor (Part p : r.getAttributes()) {\n\t\t\t\tci.println(\"\\t\" + p.getKey() + \": \" + p.getValue());\n\t\t\t}\n\t\t}\n\n\t\tregs = identityManager.getRemoteServices();\n\t\tci.print(\"Remote Services:\\n------------------\\n\");\n\t\tfor (Registration r : regs) {\n\t\t\tci.print(\"> Service with VA \" + r.getVirtualAddress().toString() + \" \\n\");\n\t\t\tfor (Part p : r.getAttributes()) {\n\t\t\t\tci.println(\"\\t\" + p.getKey() + \": \" + p.getValue());\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public interface ServicesManager {\n\tCompletable sendGCMToken();\n\n\tCompletable clearGCMToken();\n}", "public void getSystemStatus() throws Exception\r\n\t{\r\n\t\tsystemDump.delete(0, systemDump.length());\r\n\r\n\t\tboolean needAlarm = memoryLogging();\r\n\r\n\t\tif (Database.appDatasource != null)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"Database connection status: \\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number database connection\\t\\t\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number busy database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumBusyConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number idle database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumIdleConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number idle database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumUnclosedOrphanedConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\r\n\t\tString queueWarningMessage = \"\";\r\n\r\n\t\tsystemDump.append(\"\\r\\n\");\r\n\t\tsystemDump.append(\"Local queue status: \\r\\n\");\r\n\r\n\t\tfor (String key : QueueFactory.localQueues.keySet())\r\n\t\t{\r\n\t\t\tLocalQueue localQueue = QueueFactory.getLocalQueue(key);\r\n\r\n\t\t\tsystemDump.append(\"Local queue (\");\r\n\t\t\tsystemDump.append(key);\r\n\t\t\tsystemDump.append(\"): \");\r\n\t\t\tsystemDump.append(localQueue.getSize());\r\n\r\n\t\t\tif (localQueue.getMaxSize() > 0)\r\n\t\t\t{\r\n\t\t\t\tsystemDump.append(\"/\");\r\n\t\t\t\tsystemDump.append(localQueue.getMaxSize());\r\n\t\t\t}\r\n\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\t\tif (QueueFactory.getTotalLocalPending() > 0)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"Total pending counter : \");\r\n\t\t\tsystemDump.append(QueueFactory.getTotalLocalPending());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\r\n\t\tif (queueDispatcherEnable)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"Remote queue status: \\r\\n\");\r\n\r\n\t\t\tQueueSession session = null;\r\n\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tsession = getQueueSession();\r\n\r\n\t\t\t\tfor (int j = 0; j < externalQueues.length; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (externalQueues[j].equals(\"\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tString queueName = externalQueues[j];\r\n\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tQueue checkQueue = QueueFactory.getQueue(queueName);\r\n\r\n\t\t\t\t\t\tint size = QueueFactory.getQueueSize(session, checkQueue);\r\n\r\n\t\t\t\t\t\tQueueFactory.queueSnapshot.put(queueName, new Integer(size));\r\n\r\n\t\t\t\t\t\tsystemDump.append(\"Total command request for \");\r\n\t\t\t\t\t\tsystemDump.append(queueName);\r\n\t\t\t\t\t\tsystemDump.append(\" : \");\r\n\t\t\t\t\t\tsystemDump.append(size);\r\n\t\t\t\t\t\tsystemDump.append(\"\\r\\n\");\r\n\r\n\t\t\t\t\t\tqueueWarningMessage += queueWarning(checkQueue, queueName, size);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception e)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsystemDump.append(\"Error occur when get size of queue \");\r\n\t\t\t\t\t\tsystemDump.append(queueName);\r\n\t\t\t\t\t\tsystemDump.append(\": \");\r\n\t\t\t\t\t\tsystemDump.append(e.getMessage());\r\n\r\n\t\t\t\t\t\tlogMonitor(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\tsystemDump.append(\"Can not get remote queue size: \");\r\n\t\t\t\tsystemDump.append(e.getMessage());\r\n\t\t\t\tsystemDump.append(\"\\r\\n\");\r\n\r\n\t\t\t\tlogMonitor(e);\r\n\t\t\t}\r\n\t\t\tfinally\r\n\t\t\t{\r\n\t\t\t\tQueueFactory.closeQueue(session);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (needAlarm)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"WARNING: Disk space is running low\");\r\n\t\t}\r\n\t\tif (!queueWarningMessage.equals(\"\"))\r\n\t\t{\r\n\t\t\tneedAlarm = true;\r\n\t\t\tsystemDump.append(queueWarningMessage);\r\n\t\t}\r\n\r\n\t\tlogMonitor(systemDump);\r\n\r\n\t\tif (needAlarm)\r\n\t\t{\r\n\t\t\tsendInstanceAlarm(\"system-resource\", systemDump.toString());\r\n\t\t}\r\n\t}", "public interface SystemService {\n /**\n * Gets unique service identifier.\n *\n * @return unique String service identifier\n */\n public String getServiceID();\n\n /**\n * Starts service. Called when service is about to be\n * requested for the first time. Thus, services can be\n * initialized lazily, only when they are really needed.\n */\n public void start();\n\n /**\n * Shutdowns service.\n */\n public void stop();\n\n /**\n * Accepts connection. When client requests a service, first,\n * a connection between client and service is created, and then\n * it is passed to service via this method to accept it and\n * start doing its thing. Note: you shouldn't block in this\n * method.\n *\n * @param connection connection between client and service\n */\n public void acceptConnection(SystemServiceConnection connection);\n}", "public void setSystem(String value) {\r\n this.system = value;\r\n }", "public static void setupServicesAndParameters(){\n\t\t//replace services in use, e.g.:\n\t\t/*\n\t\tMap<String, ArrayList<String>> systemInterviewServicesMap = new HashMap<>();\n\t\t\n\t\t//CONTROL DEVICES\n\t\tArrayList<String> controlDevice = new ArrayList<String>();\n\t\t\tcontrolDevice.add(MyDeviceControlService.class.getCanonicalName());\n\t\tsystemInterviewServicesMap.put(CMD.CONTROL, controlDevice);\n\t\t\n\t\t//BANKING\n\t\tArrayList<String> banking = new ArrayList<String>();\n\t\t\tbanking.add(MyBankingService.class.getCanonicalName());\n\t\tsystemInterviewServicesMap.put(CMD.BANKING, banking);\n\t\t\t\n\t\tInterviewServicesMap.loadCustom(systemInterviewServicesMap);\n\t\t*/\n\t\t\n\t\t//defaults\n\t\tStart.setupServicesAndParameters();\n\t\t\n\t\t//add\n\t\t//e.g.: ParameterConfig.setHandler(PARAMETERS.ALARM_NAME, Config.parentPackage + \".parameters.AlarmName\");\n\t}", "@Override\n public void getAllSystemsInSession() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"getAllSystemsInSession\");\n }\n\n List<SystemInSession> listOfSiS = null;\n EntityManager em = EntityManagerService.provideEntityManager();\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager() || Role.isLoggedUserMonitor()) {\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n listOfSiS = SystemInSession.getSystemsInSessionForCompanyForSession(em, choosenInstitutionForAdmin);\n } else {\n listOfSiS = SystemInSession.getSystemsInSessionForActivatedTestingSession();\n }\n } else {\n listOfSiS = SystemInSession.getSystemsInSessionForCompanyForSession(em,\n Institution.getLoggedInInstitution());\n }\n foundSystemsInSession = listOfSiS;\n }", "private void updateDiagnostics() {\n\t// driveSubsystem.updateDiagnostics();\n\t// elevatorSubsystem.updateDiagnostics();\n\t// cubeSubsystem.updateDiagnostics();\n\t// cubeVision.updateDiagnostics();\n }", "@GetMapping(\"/systems\")\n public String showSystem(){\n return \"systems\";\n }", "interface Services {\n\tpublic int addEmployee(Connection conn, String empDesignation);\n\n\tpublic void promote(Connection conn);\n\n\tpublic void deleteEmployee(Connection conn, int empId);\n\n\tpublic void changeSupervisor(Connection conn);\n\n\t// public void showEmployeesUnderMe(Map<Integer, Employee> employees, int\n\t// empId);\n}", "public void service(){\n Serv_ID = 0;\n Serv_Emp_ID = 0;\n Serv_Event_ID = 0;\n Serv_Grant_ID = 0;\n Serv_Proj_ID = 0;//add project creation\n Serv_Date = \"currrent_date\";\n Serv_Type = \"\";\n Serv_Desc = \"\";\n Serv_Mon_Val = 0.00;\n Serv_Hours = 0;\n }", "public interface ConsulService {\n\n /**\n * Deregisters a node, service, or check\n */\n public void deregister(SvcInfo svcInfo);\n\n /**\n * Lists known datacenters\n * @return\n */\n public List<String> getDatacenters();\n\n /**\n * Lists nodes in a given DC\n * @return\n */\n public List<Node> getNodes();\n\n /**\n * Lists services in a given DC\n */\n public Map<String, List<String>> getServices();\n\n /**\n * Lists the nodes in a given service\n * @return\n */\n public List<CatalogService> getService(String service);\n\n /**\n * Lists the services provided by a node\n */\n public CatalogNode getNode(String node);\n \n\n\n /**\n * Returns the health info of a node\n */\n public List<HealthCheck> getNodeChecks(String node);\n\n /**\n * Returns the checks of a service\n */\n public List<HealthCheck> getServiceChecks(String service);\n\n /**\n * Returns the nodes and health info of a service\n */\n public List<ServiceHealth> getServiceInstances(String service);\n\n /**\n * Returns the checks in a given state\n */\n public List<HealthCheck> getChecksByState(String state);\n\n}", "java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();", "java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();", "public Services() {\n this.indexes = new ArrayList<Integer>();\n// this.indexes.add(ServiceTypes.NOSERVICES.getValue());\n this.services = new ArrayList<String>();\n// this.services.add(ServiceTypes.NOSERVICES.getKey());\n }", "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}", "public String getAllRunningServices() {\n return \"\";\n }", "org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList addNewServiceConfigurationList();", "public AS400 getSystem() {\r\n return system;\r\n }", "public String showAvailableExternalSystem() {\n int counter = 1;\n StringBuilder systems = new StringBuilder();\n\n for (String systemName : externalSystemsAvailable) {\n systems.append(counter + \". \" + systemName + \"\\n\");\n }\n\n systems.setLength(systems.length() - 1);\n return systems.toString();\n }", "public String getSystemInfo() {\n listItems();\n return String.format(\"Owner: %s\\nNumber of maximum items: %d\\nNumber of current items: %d\\nCurrent items \" +\n \"stocked: %s\\nTotal money in machine: %.2f\\nUser money in machine: %.2f\\nStatus of machine: %s\", owner,\n maxItems, itemCount, Arrays.toString(itemList), totalMoney, userMoney, vmStatus.getStatus());\n }", "@Test\n\tpublic void removeServiceByQuery() throws JSONException, ConfigurationException, InvalidServiceDescriptionException, ExistingResourceException, ParseException{\n\t\tint size = 10;\n\t\tJSONArray ja = TestValueConstants.getDummyJSONArrayWithMandatoryAttributes(size);\n\t\tfor (int i = 0; i < ja.length(); i++) {\n\t\t\tadminMgr.addService(ja.getJSONObject(i));\n\t\t}\n\t\tassertEquals(10, adminMgr.findAll().size());\n\t\t//this should remove everything\n\t\tadminMgr.removeServices(new JSONObject());\n\t\tassertEquals(0, adminMgr.findAll().size());\n\t}", "private void startBootstrapServices() {\n traceBeginAndSlog(\"StartWatchdog\");\n Watchdog watchdog = Watchdog.getInstance();\n watchdog.start();\n traceEnd();\n if (MAPLE_ENABLE) {\n this.mPrimaryZygotePreload = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$UyrPns7R814gZEylCbDKhe8It4.INSTANCE, \"PrimaryZygotePreload\");\n }\n Slog.i(TAG, \"Reading configuration...\");\n traceBeginAndSlog(\"ReadingSystemConfig\");\n SystemServerInitThreadPool.get().submit($$Lambda$YWiwiKm_Qgqb55C6tTuq_n2JzdY.INSTANCE, \"ReadingSystemConfig\");\n traceEnd();\n traceBeginAndSlog(\"StartInstaller\");\n this.installer = (Installer) this.mSystemServiceManager.startService(Installer.class);\n traceEnd();\n traceBeginAndSlog(\"DeviceIdentifiersPolicyService\");\n this.mSystemServiceManager.startService(DeviceIdentifiersPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"UriGrantsManagerService\");\n this.mSystemServiceManager.startService(UriGrantsManagerService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartActivityManager\");\n ActivityTaskManagerService atm = this.mSystemServiceManager.startService(ActivityTaskManagerService.Lifecycle.class).getService();\n this.mActivityManagerService = ActivityManagerService.Lifecycle.startService(this.mSystemServiceManager, atm);\n this.mActivityManagerService.setSystemServiceManager(this.mSystemServiceManager);\n this.mActivityManagerService.setInstaller(this.installer);\n this.mWindowManagerGlobalLock = atm.getGlobalLock();\n traceEnd();\n traceBeginAndSlog(\"StartPowerManager\");\n try {\n this.mPowerManagerService = (PowerManagerService) this.mSystemServiceManager.startService(\"com.android.server.power.HwPowerManagerService\");\n } catch (RuntimeException e) {\n Slog.w(TAG, \"create HwPowerManagerService failed\");\n this.mPowerManagerService = (PowerManagerService) this.mSystemServiceManager.startService(PowerManagerService.class);\n }\n traceEnd();\n traceBeginAndSlog(\"StartThermalManager\");\n this.mSystemServiceManager.startService(ThermalManagerService.class);\n traceEnd();\n try {\n Slog.i(TAG, \"PG Manager service\");\n this.mPGManagerService = PGManagerService.getInstance(this.mSystemContext);\n } catch (Throwable e2) {\n reportWtf(\"PG Manager service\", e2);\n }\n traceBeginAndSlog(\"InitPowerManagement\");\n this.mActivityManagerService.initPowerManagement();\n traceEnd();\n traceBeginAndSlog(\"StartRecoverySystemService\");\n this.mSystemServiceManager.startService(RecoverySystemService.class);\n traceEnd();\n RescueParty.noteBoot(this.mSystemContext);\n traceBeginAndSlog(\"StartLightsService\");\n try {\n this.mSystemServiceManager.startService(\"com.android.server.lights.LightsServiceBridge\");\n } catch (RuntimeException e3) {\n Slog.w(TAG, \"create LightsServiceBridge failed\");\n this.mSystemServiceManager.startService(LightsService.class);\n }\n traceEnd();\n traceBeginAndSlog(\"StartSidekickService\");\n if (SystemProperties.getBoolean(\"config.enable_sidekick_graphics\", false)) {\n this.mSystemServiceManager.startService(WEAR_SIDEKICK_SERVICE_CLASS);\n }\n traceEnd();\n traceBeginAndSlog(\"StartDisplayManager\");\n this.mDisplayManagerService = (DisplayManagerService) this.mSystemServiceManager.startService(DisplayManagerService.class);\n traceEnd();\n try {\n this.mSystemServiceManager.startService(\"com.android.server.security.HwSecurityService\");\n Slog.i(TAG, \"HwSecurityService start success\");\n } catch (Exception e4) {\n Slog.e(TAG, \"can't start HwSecurityService service\");\n }\n traceBeginAndSlog(\"WaitForDisplay\");\n this.mSystemServiceManager.startBootPhase(100);\n traceEnd();\n String cryptState = (String) VoldProperties.decrypt().orElse(\"\");\n if (ENCRYPTING_STATE.equals(cryptState)) {\n Slog.w(TAG, \"Detected encryption in progress - only parsing core apps\");\n this.mOnlyCore = true;\n } else if (ENCRYPTED_STATE.equals(cryptState)) {\n Slog.w(TAG, \"Device encrypted - only parsing core apps\");\n this.mOnlyCore = true;\n }\n HwBootCheck.bootSceneEnd(100);\n HwBootFail.setBootTimer(false);\n HwBootCheck.bootSceneStart(105, 900000);\n if (!this.mRuntimeRestart) {\n MetricsLogger.histogram((Context) null, \"boot_package_manager_init_start\", (int) SystemClock.elapsedRealtime());\n }\n traceBeginAndSlog(\"StartPackageManagerService\");\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"packagemanagermain\");\n this.mPackageManagerService = PackageManagerService.main(this.mSystemContext, this.installer, this.mFactoryTestMode != 0, this.mOnlyCore);\n Watchdog.getInstance().resumeWatchingCurrentThread(\"packagemanagermain\");\n this.mFirstBoot = this.mPackageManagerService.isFirstBoot();\n this.mPackageManager = this.mSystemContext.getPackageManager();\n Slog.i(TAG, \"Finish_StartPackageManagerService\");\n traceEnd();\n if (!this.mRuntimeRestart && !isFirstBootOrUpgrade()) {\n MetricsLogger.histogram((Context) null, \"boot_package_manager_init_ready\", (int) SystemClock.elapsedRealtime());\n HwBootCheck.addBootInfo(\"[bootinfo]\\nisFirstBoot: \" + this.mFirstBoot + \"\\nisUpgrade: \" + this.mPackageManagerService.isUpgrade());\n HwBootCheck.bootSceneStart(101, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n }\n HwBootCheck.bootSceneEnd(105);\n if (!this.mOnlyCore && !SystemProperties.getBoolean(\"config.disable_otadexopt\", false)) {\n traceBeginAndSlog(\"StartOtaDexOptService\");\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"moveab\");\n OtaDexoptService.main(this.mSystemContext, this.mPackageManagerService);\n } catch (Throwable th) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"moveab\");\n traceEnd();\n throw th;\n }\n Watchdog.getInstance().resumeWatchingCurrentThread(\"moveab\");\n traceEnd();\n }\n traceBeginAndSlog(\"StartUserManagerService\");\n this.mSystemServiceManager.startService(UserManagerService.LifeCycle.class);\n traceEnd();\n traceBeginAndSlog(\"InitAttributerCache\");\n AttributeCache.init(this.mSystemContext);\n traceEnd();\n traceBeginAndSlog(\"SetSystemProcess\");\n this.mActivityManagerService.setSystemProcess();\n traceEnd();\n traceBeginAndSlog(\"InitWatchdog\");\n watchdog.init(this.mSystemContext, this.mActivityManagerService);\n traceEnd();\n this.mDisplayManagerService.setupSchedulerPolicies();\n traceBeginAndSlog(\"StartOverlayManagerService\");\n this.mSystemServiceManager.startService(new OverlayManagerService(this.mSystemContext, this.installer));\n traceEnd();\n traceBeginAndSlog(\"StartSensorPrivacyService\");\n this.mSystemServiceManager.startService(new SensorPrivacyService(this.mSystemContext));\n traceEnd();\n if (SystemProperties.getInt(\"persist.sys.displayinset.top\", 0) > 0) {\n this.mActivityManagerService.updateSystemUiContext();\n ((DisplayManagerInternal) LocalServices.getService(DisplayManagerInternal.class)).onOverlayChanged();\n }\n this.mSensorServiceStart = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$oG4I04QJrkzCGs6IcMTKU2211A.INSTANCE, START_SENSOR_SERVICE);\n } catch (Throwable th2) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"packagemanagermain\");\n throw th2;\n }\n }", "public interface ISysDeptService extends IBaseService<SysDept> {\n\n /**\n * 校验部门名称是否唯一\n *\n * @param dept 部门信息\n * @return 结果\n */\n String checkDeptNameUnique(SysDept dept);\n\n /**\n * 查询部门是否存在用户\n *\n * @param deptId 部门ID\n * @return 结果 true 存在 false 不存在\n */\n Boolean checkDeptExistUser(Long deptId);\n\n /**\n * 查询部门管理树\n *\n * @param dept 部门信息\n * @return 所有部门信息\n */\n List<Ztree> selectDeptTree(SysDept dept);\n\n /**\n * 根据角色ID查询菜单\n *\n * @param role 角色对象\n * @return 菜单列表\n */\n List<Ztree> roleDeptTreeData(SysRole role);\n}", "public void getSystemInfo(){\n //get system info\n System.out.println(\"System Information\");\n System.out.println(\"------------------\");\n System.out.println(\"Available Processors: \"+Runtime.getRuntime().availableProcessors());\n System.out.println(\"Max Memory to JVM: \"+String.valueOf(Runtime.getRuntime().maxMemory()/1000000)+\" MB\");\n System.out.println(\"------------------\");\n System.out.println();\n }", "public void testDynamicServices() throws Exception\n {\n int freq = 65432198;\n int prognum = 10;\n int modformat = 16;\n ServiceHandle handle = sidb.getServiceByProgramNumber(freq, modformat, prognum);\n ServiceExt service = sidb.createService(handle);\n OcapLocator loc = (OcapLocator) service.getLocator();\n assertEquals(\"Frequency does not match\", freq, loc.getFrequency());\n assertEquals(\"Program Number does not match\", prognum, loc.getProgramNumber());\n assertEquals(\"Modulation Format does not match\", modformat, loc.getModulationFormat());\n assertEquals(\"SourceID is incorrect\", -1, loc.getSourceID());\n dumpService(service);\n log(\"*********************************************************\");\n\n // Now we're going to try to get an existing service using it's\n // freq/prog/mod.\n ServiceList sl = serviceSetup();\n if (sl.size() > 0)\n {\n // Just grab the first one off the list\n service = (ServiceExt) sl.getService(0);\n tune(service);\n ServiceDetailsHandle[] handles = null;\n try\n {\n handles = sidb.getServiceDetailsByService(service.getServiceHandle());\n }\n catch (SINotAvailableYetException ex)\n {\n synchronized (sial)\n {\n // Wait for the SIAcquiredEvent\n sial.wait();\n // Try again.. if it fails, it will jump out to the outer\n // catch\n handles = sidb.getServiceDetailsByService(service.getServiceHandle());\n }\n }\n assertNotNull(\"No ServiceDetails available\", handles);\n assertTrue(\"Handles array has no data\", handles.length > 0);\n ServiceDetailsExt details = sidb.createServiceDetails(handles[0]);\n assertEquals(\"ServiceDetails' Service does not match expected value\", service, details.getService());\n TransportStreamExt ts = (TransportStreamExt) details.getTransportStream();\n freq = ts.getFrequency();\n prognum = details.getProgramNumber();\n modformat = ts.getModulationFormat();\n handle = sidb.getServiceByProgramNumber(freq, prognum, modformat);\n service = sidb.createService(handle);\n loc = (OcapLocator) service.getLocator();\n assertEquals(\"Frequency does not match\", freq, loc.getFrequency());\n assertEquals(\"Program Number does not match\", prognum, loc.getProgramNumber());\n assertEquals(\"Modulation Format does not match\", modformat, loc.getModulationFormat());\n assertEquals(\"SourceID is incorrect\", -1, loc.getSourceID());\n dumpService(service);\n }\n else\n {\n log(\"No Services available to test for dynamic service creation\");\n }\n log(\"*********************************************************\");\n\n // Try to get a service using an outrageous frequency\n freq = 1;\n prognum = 2;\n modformat = 8;\n try\n {\n sidb.getServiceByProgramNumber(freq, prognum, modformat);\n fail(\"Expected SIRequestInvalidException using 1 as frequency\");\n }\n catch (SIDatabaseException e)\n {\n // Expected\n }\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}", "List<Service> services();", "private void startOtherServices() {\n Object obj;\n String str;\n String str2;\n boolean tuiEnable;\n TelephonyRegistry telephonyRegistry;\n VibratorService vibrator;\n InputManagerService inputManager;\n WindowManagerService wm;\n AlarmManagerService wm2;\n boolean safeMode;\n ILockSettings lockSettings;\n IConnectivityManager iConnectivityManager;\n INetworkManagementService iNetworkManagementService;\n IpSecService ipSecService;\n INetworkPolicyManager iNetworkPolicyManager;\n MediaRouterService mediaRouter;\n CountryDetectorService countryDetector;\n NetworkTimeUpdateService networkTimeUpdater;\n INetworkStatsService iNetworkStatsService;\n LocationManagerService location;\n Resources.Theme systemTheme;\n IpSecService ipSecService2;\n INetworkManagementService iNetworkManagementService2;\n IpSecService ipSecService3;\n IpSecService ipSecService4;\n INetworkPolicyManager iNetworkPolicyManager2;\n INetworkStatsService iNetworkStatsService2;\n IConnectivityManager iConnectivityManager2;\n IBinder iBinder;\n INotificationManager notification;\n IBinder iBinder2;\n MediaRouterService mediaRouter2;\n boolean hasFeatureFace;\n boolean hasFeatureIris;\n boolean hasFeatureFingerprint;\n MediaRouterService mediaRouter3;\n Class<SystemService> serviceClass;\n MediaRouterService mediaRouter4;\n Throwable e;\n ?? mediaRouterService;\n NetworkTimeUpdateService networkTimeUpdater2;\n Throwable e2;\n IBinder iBinder3;\n Throwable e3;\n IBinder iBinder4;\n Throwable e4;\n Throwable e5;\n Throwable e6;\n Throwable e7;\n Throwable e8;\n ?? r2;\n IBinder iBinder5;\n Throwable e9;\n Throwable e10;\n Throwable e11;\n IpSecService ipSecService5;\n Throwable e12;\n ?? create;\n Throwable e13;\n VibratorService vibrator2;\n RuntimeException e14;\n TelephonyRegistry telephonyRegistry2;\n ?? vibratorService;\n InputManagerService inputManager2;\n ?? r9;\n Context context = this.mSystemContext;\n INetworkStatsService iNetworkStatsService3 = null;\n WindowManagerService wm3 = null;\n IBinder iBinder6 = null;\n NetworkTimeUpdateService networkTimeUpdater3 = null;\n InputManagerService inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n MmsServiceBroker mmsService = null;\n AlarmManagerService alarmManager = null;\n this.mHwRogEx = HwServiceFactory.getHwRogEx();\n boolean disableSystemTextClassifier = SystemProperties.getBoolean(\"config.disable_systemtextclassifier\", false);\n boolean disableNetworkTime = SystemProperties.getBoolean(\"config.disable_networktime\", false);\n boolean disableCameraService = SystemProperties.getBoolean(\"config.disable_cameraservice\", false);\n boolean disableSlices = SystemProperties.getBoolean(\"config.disable_slices\", false);\n boolean tuiEnable2 = SystemProperties.getBoolean(\"ro.vendor.tui.service\", false);\n boolean isEmulator = SystemProperties.get(\"ro.kernel.qemu\").equals(ENCRYPTED_STATE);\n boolean enableRms = SystemProperties.getBoolean(\"ro.config.enable_rms\", false);\n boolean enableIaware = SystemProperties.getBoolean(\"ro.config.enable_iaware\", false);\n boolean isChinaArea = \"CN\".equalsIgnoreCase(SystemProperties.get(\"ro.product.locale.region\", \"\"));\n boolean isWatch = context.getPackageManager().hasSystemFeature(\"android.hardware.type.watch\");\n boolean isArc = context.getPackageManager().hasSystemFeature(\"org.chromium.arc\");\n boolean enableVrService = context.getPackageManager().hasSystemFeature(\"android.hardware.vr.high_performance\");\n boolean isStartSysSvcCallRecord = \"3\".equals(SystemProperties.get(\"ro.logsystem.usertype\", \"0\")) && \"true\".equals(SystemProperties.get(\"ro.syssvccallrecord.enable\", \"false\"));\n if (Build.IS_DEBUGGABLE) {\n if (SystemProperties.getBoolean(\"debug.crash_system\", false)) {\n throw new RuntimeException();\n }\n }\n try {\n if (MAPLE_ENABLE) {\n try {\n Slog.d(TAG, \"wait primary zygote preload default resources\");\n ConcurrentUtils.waitForFutureNoInterrupt(this.mPrimaryZygotePreload, \"Primary Zygote preload\");\n Slog.d(TAG, \"primary zygote preload default resources finished\");\n this.mPrimaryZygotePreload = null;\n } catch (RuntimeException e15) {\n e14 = e15;\n str2 = \"false\";\n telephonyRegistry = null;\n vibrator2 = null;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n }\n }\n try {\n this.mZygotePreload = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$NlJmG18aPrQduhRqASIdcn7G0z8.INSTANCE, \"SecondaryZygotePreload\");\n traceBeginAndSlog(\"StartKeyAttestationApplicationIdProviderService\");\n ServiceManager.addService(\"sec_key_att_app_id_provider\", (IBinder) new KeyAttestationApplicationIdProviderService(context));\n traceEnd();\n traceBeginAndSlog(\"StartKeyChainSystemService\");\n this.mSystemServiceManager.startService(KeyChainSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSchedulingPolicyService\");\n ServiceManager.addService(\"scheduling_policy\", (IBinder) new SchedulingPolicyService());\n traceEnd();\n if (hasSystemServerFeature(\"telecomloader\")) {\n traceBeginAndSlog(\"StartTelecomLoaderService\");\n this.mSystemServiceManager.startService(TelecomLoaderService.class);\n traceEnd();\n }\n if (hasSystemServerFeature(\"telephonyregistry\")) {\n traceBeginAndSlog(\"StartTelephonyRegistry\");\n if (HwSystemManager.mPermissionEnabled == 0) {\n r9 = new TelephonyRegistry(context);\n } else {\n HwServiceFactory.IHwTelephonyRegistry itr = HwServiceFactory.getHwTelephonyRegistry();\n if (itr != null) {\n r9 = itr.getInstance(context);\n } else {\n r9 = new TelephonyRegistry(context);\n }\n }\n ServiceManager.addService(\"telephony.registry\", (IBinder) r9);\n traceEnd();\n telephonyRegistry2 = r9;\n } else {\n telephonyRegistry2 = null;\n }\n try {\n traceBeginAndSlog(\"StartEntropyMixer\");\n this.mEntropyMixer = new EntropyMixer(context);\n traceEnd();\n this.mContentResolver = context.getContentResolver();\n traceBeginAndSlog(\"StartAccountManagerService\");\n this.mSystemServiceManager.startService(ACCOUNT_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartContentService\");\n this.mSystemServiceManager.startService(CONTENT_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"InstallSystemProviders\");\n this.mActivityManagerService.installSystemProviders();\n SQLiteCompatibilityWalFlags.reset();\n traceEnd();\n traceBeginAndSlog(\"StartDropBoxManager\");\n this.mSystemServiceManager.startService(DropBoxManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartVibratorService\");\n vibratorService = new VibratorService(context);\n } catch (RuntimeException e16) {\n e14 = e16;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = null;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder7 = null;\n LocationManagerService location2 = null;\n CountryDetectorService countryDetector2 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n try {\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n } catch (Throwable e17) {\n reportWtf(\"starting StorageManagerService\", e17);\n }\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n try {\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n } catch (Throwable e18) {\n reportWtf(\"starting StorageStatsService\", e18);\n }\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config = wm.computeNewConfiguration(0);\n DisplayMetrics metrics = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics);\n context.getResources().updateConfiguration(config, metrics);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e19) {\n e14 = e19;\n str2 = \"false\";\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n telephonyRegistry = null;\n vibrator2 = null;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder72 = null;\n LocationManagerService location22 = null;\n CountryDetectorService countryDetector22 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2);\n context.getResources().updateConfiguration(config2, metrics2);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n try {\n ServiceManager.addService(\"vibrator\", (IBinder) vibratorService);\n traceEnd();\n if (hasSystemServerFeature(\"dynamicsystem\")) {\n try {\n traceBeginAndSlog(\"StartDynamicSystemService\");\n try {\n ServiceManager.addService(\"dynamic_system\", (IBinder) new DynamicSystemService(context));\n traceEnd();\n } catch (RuntimeException e20) {\n e14 = e20;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder722 = null;\n LocationManagerService location222 = null;\n CountryDetectorService countryDetector222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22);\n context.getResources().updateConfiguration(config22, metrics22);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e21) {\n e14 = e21;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder7222 = null;\n LocationManagerService location2222 = null;\n CountryDetectorService countryDetector2222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222);\n context.getResources().updateConfiguration(config222, metrics222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n }\n if (!isWatch && hasSystemServerFeature(\"consumerir\")) {\n traceBeginAndSlog(\"StartConsumerIrService\");\n ServiceManager.addService(\"consumer_ir\", (IBinder) new ConsumerIrService(context));\n traceEnd();\n }\n try {\n traceBeginAndSlog(\"StartAlarmManagerService\");\n alarmManager = HwServiceFactory.getHwAlarmManagerService(context);\n if (alarmManager == null) {\n try {\n alarmManager = new AlarmManagerService(context);\n } catch (RuntimeException e22) {\n e14 = e22;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder72222 = null;\n LocationManagerService location22222 = null;\n CountryDetectorService countryDetector22222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222);\n context.getResources().updateConfiguration(config2222, metrics2222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n }\n } catch (RuntimeException e23) {\n e14 = e23;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder722222 = null;\n LocationManagerService location222222 = null;\n CountryDetectorService countryDetector222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222);\n context.getResources().updateConfiguration(config22222, metrics22222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n try {\n this.mSystemServiceManager.startService(alarmManager);\n traceEnd();\n this.mActivityManagerService.setAlarmManager(alarmManager);\n traceBeginAndSlog(\"StartInputManagerService\");\n InputManagerService inputManager4 = HwServiceFactory.getHwInputManagerService().getInstance(context, null);\n if (inputManager4 == null) {\n inputManager2 = new InputManagerService(context);\n } else {\n inputManager2 = inputManager4;\n }\n try {\n traceEnd();\n traceBeginAndSlog(\"StartHwSysResManagerService\");\n if (enableRms || enableIaware) {\n try {\n this.mSystemServiceManager.startService(\"com.android.server.rms.HwSysResManagerService\");\n } catch (Throwable e24) {\n Slog.e(TAG, e24.toString());\n }\n }\n traceEnd();\n traceBeginAndSlog(\"StartWindowManagerService\");\n ConcurrentUtils.waitForFutureNoInterrupt(this.mSensorServiceStart, START_SENSOR_SERVICE);\n this.mSensorServiceStart = null;\n try {\n Slog.i(TAG, \"initial SystemService \" + Class.forName(\"android.os.SystemService\"));\n } catch (ClassNotFoundException e25) {\n Slog.i(TAG, \"initial SystemService fail because : \" + e25.getMessage());\n } catch (RuntimeException e26) {\n e14 = e26;\n str2 = \"false\";\n inputManager3 = inputManager2;\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder7222222 = null;\n LocationManagerService location2222222 = null;\n CountryDetectorService countryDetector2222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222);\n context.getResources().updateConfiguration(config222222, metrics222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n telephonyRegistry = telephonyRegistry2;\n str2 = \"false\";\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator = vibratorService;\n try {\n WindowManagerService wm4 = WindowManagerService.main(context, inputManager2, !this.mFirstBoot, this.mOnlyCore, HwPolicyFactory.getHwPhoneWindowManager(), this.mActivityManagerService.mActivityTaskManager);\n try {\n if (this.mHwRogEx != null) {\n try {\n this.mHwRogEx.initRogModeAndProcessMultiDpi(wm4, context);\n } catch (RuntimeException e27) {\n e14 = e27;\n wm3 = wm4;\n vibrator2 = vibrator;\n alarmManager = alarmManager;\n inputManager3 = inputManager2;\n }\n }\n ServiceManager.addService(\"window\", wm4, false, 17);\n ?? r8 = inputManager2;\n try {\n ServiceManager.addService(\"input\", (IBinder) r8, false, 1);\n traceEnd();\n traceBeginAndSlog(\"SetWindowManagerService\");\n this.mActivityManagerService.setWindowManager(wm4);\n traceEnd();\n traceBeginAndSlog(\"WindowManagerServiceOnInitReady\");\n wm4.onInitReady();\n traceEnd();\n SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$JQH6ND0PqyyiRiz7lXLvUmRhwRM.INSTANCE, START_HIDL_SERVICES);\n if (!isWatch && enableVrService) {\n traceBeginAndSlog(\"StartVrManagerService\");\n this.mSystemServiceManager.startService(VrManagerService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartInputManager\");\n r8.setWindowManagerCallbacks(wm4.getInputManagerCallback());\n r8.start();\n traceEnd();\n traceBeginAndSlog(\"DisplayManagerWindowManagerAndInputReady\");\n this.mDisplayManagerService.windowManagerAndInputReady();\n traceEnd();\n if (this.mFactoryTestMode == 1) {\n Slog.i(TAG, \"No Bluetooth Service (factory test)\");\n } else if (!context.getPackageManager().hasSystemFeature(\"android.hardware.bluetooth\")) {\n Slog.i(TAG, \"No Bluetooth Service (Bluetooth Hardware Not Present)\");\n } else {\n traceBeginAndSlog(\"StartBluetoothService\");\n this.mSystemServiceManager.startService(BluetoothService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"IpConnectivityMetrics\");\n this.mSystemServiceManager.startService(IpConnectivityMetrics.class);\n traceEnd();\n traceBeginAndSlog(\"NetworkWatchlistService\");\n this.mSystemServiceManager.startService(NetworkWatchlistService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"pinner\")) {\n traceBeginAndSlog(\"PinnerService\");\n ((PinnerService) this.mSystemServiceManager.startService(PinnerService.class)).setInstaller(this.installer);\n traceEnd();\n }\n traceBeginAndSlog(\"ZRHungServiceBridge\");\n try {\n this.mSystemServiceManager.startService(\"com.android.server.zrhung.ZRHungServiceBridge\");\n } catch (Throwable th) {\n Slog.e(TAG, \"Fail to begin and Slog ZRHungServiceBridge\");\n }\n traceEnd();\n traceBeginAndSlog(\"SignedConfigService\");\n SignedConfigService.registerUpdateReceiver(this.mSystemContext);\n traceEnd();\n if (!SystemProperties.get(\"ro.config.hw_fold_disp\").isEmpty() || !SystemProperties.get(\"persist.sys.fold.disp.size\").isEmpty()) {\n traceBeginAndSlog(\"HwFoldScreenManagerService\");\n try {\n this.mSystemServiceManager.startService(\"com.huawei.server.fsm.HwFoldScreenManagerService\");\n } catch (Throwable th2) {\n Slog.e(TAG, \"Failed to start HwFoldScreenManagerService.\");\n }\n traceEnd();\n }\n if (isWatch) {\n traceBeginAndSlog(\"HwWatchConnectivityService\");\n try {\n this.mSystemServiceManager.startService(\"com.huawei.android.server.HwWatchConnectivityServiceBridge\");\n } catch (Throwable th3) {\n Slog.e(TAG, \"Failed to start HwWatchConnectivityService.\");\n }\n traceEnd();\n }\n wm = wm4;\n inputManager = r8;\n wm2 = alarmManager;\n } catch (RuntimeException e28) {\n e14 = e28;\n wm3 = wm4;\n vibrator2 = vibrator;\n alarmManager = alarmManager;\n inputManager3 = r8;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder72222222 = null;\n LocationManagerService location22222222 = null;\n CountryDetectorService countryDetector22222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222);\n context.getResources().updateConfiguration(config2222222, metrics2222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e29) {\n e14 = e29;\n inputManager3 = inputManager2;\n wm3 = wm4;\n vibrator2 = vibrator;\n alarmManager = alarmManager;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder722222222 = null;\n LocationManagerService location222222222 = null;\n CountryDetectorService countryDetector222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222);\n context.getResources().updateConfiguration(config22222222, metrics22222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e30) {\n e14 = e30;\n inputManager3 = inputManager2;\n vibrator2 = vibrator;\n alarmManager = alarmManager;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder7222222222 = null;\n LocationManagerService location2222222222 = null;\n CountryDetectorService countryDetector2222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222);\n context.getResources().updateConfiguration(config222222222, metrics222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e31) {\n e14 = e31;\n str2 = \"false\";\n inputManager3 = inputManager2;\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder72222222222 = null;\n LocationManagerService location22222222222 = null;\n CountryDetectorService countryDetector22222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222);\n context.getResources().updateConfiguration(config2222222222, metrics2222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e32) {\n e14 = e32;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder722222222222 = null;\n LocationManagerService location222222222222 = null;\n CountryDetectorService countryDetector222222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222);\n context.getResources().updateConfiguration(config22222222222, metrics22222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e33) {\n e14 = e33;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder7222222222222 = null;\n LocationManagerService location2222222222222 = null;\n CountryDetectorService countryDetector2222222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222);\n context.getResources().updateConfiguration(config222222222222, metrics222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e34) {\n e14 = e34;\n str2 = \"false\";\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n telephonyRegistry = null;\n vibrator2 = null;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder72222222222222 = null;\n LocationManagerService location22222222222222 = null;\n CountryDetectorService countryDetector22222222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222);\n context.getResources().updateConfiguration(config2222222222222, metrics2222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n this.mActivityManagerService.enterSafeMode();\n Settings.Global.putInt(context.getContentResolver(), \"airplane_mode_on\", 1);\n }\n IBinder iBinder722222222222222 = null;\n LocationManagerService location222222222222222 = null;\n CountryDetectorService countryDetector222222222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n traceBeginAndSlog(\"StartInputMethodManagerLifecycle\");\n if (InputMethodSystemProperty.MULTI_CLIENT_IME_ENABLED) {\n this.mSystemServiceManager.startService(MultiClientInputMethodManagerService.Lifecycle.class);\n } else {\n this.mSystemServiceManager.startService(InputMethodManagerService.Lifecycle.class);\n }\n if (isChinaArea) {\n try {\n Slog.i(TAG, \"Secure Input Method Service\");\n this.mSystemServiceManager.startService(\"com.android.server.inputmethod.HwSecureInputMethodManagerService$MyLifecycle\");\n } catch (Throwable e35) {\n reportWtf(\"starting Secure Input Manager Service\", e35);\n }\n }\n traceEnd();\n if (hasSystemServerFeature(\"accessibility\")) {\n traceBeginAndSlog(\"StartAccessibilityManagerService\");\n try {\n this.mSystemServiceManager.startService(ACCESSIBILITY_MANAGER_SERVICE_CLASS);\n } catch (Throwable e36) {\n reportWtf(\"starting Accessibility Manager\", e36);\n }\n traceEnd();\n }\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n try {\n wm.displayReady();\n } catch (Throwable e37) {\n reportWtf(\"making display ready\", e37);\n }\n traceEnd();\n if (this.mFactoryTestMode != 1 && !str.equals(SystemProperties.get(\"system_init.startmountservice\"))) {\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n traceBeginAndSlog(\"UpdatePackagesIfNeeded\");\n if (HwTvUtils.isBootTimeOpt()) {\n Slog.i(TAG, \"boottimeopt ignore dexopt\");\n } else {\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"dexopt\");\n this.mPackageManagerService.updatePackagesIfNeeded();\n } catch (Throwable th4) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"dexopt\");\n throw th4;\n }\n Watchdog.getInstance().resumeWatchingCurrentThread(\"dexopt\");\n }\n traceEnd();\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n try {\n this.mPackageManagerService.performFstrimIfNeeded();\n } catch (Throwable e38) {\n reportWtf(\"performing fstrim\", e38);\n }\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n traceBeginAndSlog(\"StartLockSettingsService\");\n try {\n this.mSystemServiceManager.startService(LOCK_SETTINGS_SERVICE_CLASS);\n lockSettings = ILockSettings.Stub.asInterface(ServiceManager.getService(\"lock_settings\"));\n } catch (Throwable e39) {\n reportWtf(\"starting LockSettingsService service\", e39);\n }\n traceEnd();\n boolean hasPdb = !SystemProperties.get(PERSISTENT_DATA_BLOCK_PROP).equals(obj);\n boolean hasGsi = SystemProperties.getInt(GSI_RUNNING_PROP, 0) > 0;\n if (!hasPdb || hasGsi) {\n ipSecService2 = null;\n } else {\n traceBeginAndSlog(\"StartPersistentDataBlock\");\n ipSecService2 = null;\n this.mSystemServiceManager.startService(PersistentDataBlockService.class);\n traceEnd();\n }\n if (hasSystemServerFeature(\"testharness\")) {\n traceBeginAndSlog(\"StartTestHarnessMode\");\n this.mSystemServiceManager.startService(TestHarnessModeService.class);\n traceEnd();\n }\n if (hasPdb || OemLockService.isHalPresent()) {\n traceBeginAndSlog(\"StartOemLockService\");\n this.mSystemServiceManager.startService(OemLockService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartDeviceIdleController\");\n this.mSystemServiceManager.startService(DeviceIdleController.class);\n traceEnd();\n traceBeginAndSlog(\"StartDevicePolicyManager\");\n this.mSystemServiceManager.startService(DevicePolicyManagerService.Lifecycle.class);\n traceEnd();\n if (!isWatch && hasSystemServerFeature(\"statusbar\")) {\n traceBeginAndSlog(\"StartStatusBarManagerService\");\n try {\n iBinder722222222222222 = HwServiceFactory.createHwStatusBarManagerService(context, wm);\n ServiceManager.addService(\"statusbar\", iBinder722222222222222);\n } catch (Throwable e40) {\n reportWtf(\"starting StatusBarManagerService\", e40);\n }\n traceEnd();\n }\n startContentCaptureService(context);\n startAttentionService(context);\n startSystemCaptionsManagerService(context);\n if (hasSystemServerFeature(\"appprediction\")) {\n traceBeginAndSlog(\"StartAppPredictionService\");\n this.mSystemServiceManager.startService(APP_PREDICTION_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartContentSuggestionsService\");\n this.mSystemServiceManager.startService(CONTENT_SUGGESTIONS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"InitNetworkStackClient\");\n try {\n NetworkStackClient.getInstance().init();\n } catch (Throwable e41) {\n reportWtf(\"initializing NetworkStackClient\", e41);\n }\n traceEnd();\n traceBeginAndSlog(\"StartNetworkManagementService\");\n try {\n iNetworkManagementService2 = NetworkManagementService.create(context);\n try {\n ServiceManager.addService(\"network_management\", iNetworkManagementService2);\n } catch (Throwable th5) {\n e13 = th5;\n }\n } catch (Throwable th6) {\n e13 = th6;\n iNetworkManagementService2 = null;\n reportWtf(\"starting NetworkManagement Service\", e13);\n iNetworkManagementService2 = iNetworkManagementService2;\n traceEnd();\n traceBeginAndSlog(\"StartIpSecService\");\n create = IpSecService.create(context);\n try {\n ServiceManager.addService(INetd.IPSEC_INTERFACE_PREFIX, (IBinder) create);\n ipSecService3 = create;\n } catch (Throwable th7) {\n e12 = th7;\n ipSecService5 = create;\n }\n traceEnd();\n if (hasSystemServerFeature(\"text\")) {\n }\n if (!disableSystemTextClassifier) {\n }\n traceBeginAndSlog(\"StartNetworkScoreService\");\n this.mSystemServiceManager.startService(NetworkScoreService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartNetworkStatsService\");\n iNetworkStatsService3 = NetworkStatsService.create(context, iNetworkManagementService2);\n ServiceManager.addService(\"netstats\", iNetworkStatsService3);\n traceEnd();\n traceBeginAndSlog(\"StartNetworkPolicyManagerService\");\n iNetworkPolicyManager2 = HwServiceFactory.getHwNetworkPolicyManagerService().getInstance(context, this.mActivityManagerService, iNetworkManagementService2);\n try {\n ServiceManager.addService(\"netpolicy\", iNetworkPolicyManager2);\n } catch (Throwable th8) {\n e11 = th8;\n }\n traceEnd();\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.rtt\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.aware\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.direct\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.lowpan\")) {\n }\n if (!this.mPackageManager.hasSystemFeature(\"android.hardware.ethernet\")) {\n }\n traceBeginAndSlog(\"StartEthernet\");\n this.mSystemServiceManager.startService(ETHERNET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartConnectivityService\");\n iConnectivityManager2 = HwServiceFactory.getHwConnectivityManager().createHwConnectivityService(context, iNetworkManagementService2, iNetworkStatsService3, iNetworkPolicyManager2);\n iNetworkManagementService = iNetworkManagementService2;\n iNetworkStatsService2 = iNetworkStatsService3;\n try {\n ServiceManager.addService(\"connectivity\", iConnectivityManager2, false, 6);\n iNetworkPolicyManager2.bindConnectivityManager(iConnectivityManager2);\n } catch (Throwable th9) {\n e10 = th9;\n }\n traceEnd();\n traceBeginAndSlog(\"StartNsdService\");\n iBinder5 = NsdService.create(context);\n try {\n ServiceManager.addService(\"servicediscovery\", iBinder5);\n iBinder = iBinder5;\n } catch (Throwable th10) {\n e9 = th10;\n reportWtf(\"starting Service Discovery Service\", e9);\n iBinder = iBinder5;\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification2 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n }\n if (hasSystemServerFeature(\"location\")) {\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n try {\n ServiceManager.addService(\"serial\", iBinder4);\n } catch (Throwable th11) {\n e4 = th11;\n }\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager = this.mSystemServiceManager;\n Context context2 = this.mSystemContext;\n systemServiceManager.startService(new RoleManagerService(context2, new LegacyRoleResolutionPolicy(context2)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222);\n context.getResources().updateConfiguration(config22222222222222, metrics22222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification22 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n }\n if (hasSystemServerFeature(\"location\")) {\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n try {\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n } catch (Throwable th12) {\n e4 = th12;\n iBinder4 = null;\n Slog.e(TAG, \"Failure starting SerialService\", e4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager2 = this.mSystemServiceManager;\n Context context22 = this.mSystemContext;\n systemServiceManager2.startService(new RoleManagerService(context22, new LegacyRoleResolutionPolicy(context22)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222);\n context.getResources().updateConfiguration(config222222222222222, metrics222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n try {\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n } catch (Throwable th13) {\n e3 = th13;\n Slog.e(TAG, \"Failure starting HardwarePropertiesManagerService\", e3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager22 = this.mSystemServiceManager;\n Context context222 = this.mSystemContext;\n systemServiceManager22.startService(new RoleManagerService(context222, new LegacyRoleResolutionPolicy(context222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222222);\n context.getResources().updateConfiguration(config2222222222222222, metrics2222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager222 = this.mSystemServiceManager;\n Context context2222 = this.mSystemContext;\n systemServiceManager222.startService(new RoleManagerService(context2222, new LegacyRoleResolutionPolicy(context2222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n try {\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n } catch (Throwable th14) {\n e = th14;\n mediaRouter4 = mediaRouterService;\n }\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222222);\n context.getResources().updateConfiguration(config22222222222222222, metrics22222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n traceBeginAndSlog(\"StartIpSecService\");\n try {\n create = IpSecService.create(context);\n ServiceManager.addService(INetd.IPSEC_INTERFACE_PREFIX, (IBinder) create);\n ipSecService3 = create;\n } catch (Throwable th15) {\n e12 = th15;\n ipSecService5 = ipSecService2;\n reportWtf(\"starting IpSec Service\", e12);\n ipSecService3 = ipSecService5;\n traceEnd();\n if (hasSystemServerFeature(\"text\")) {\n }\n if (!disableSystemTextClassifier) {\n }\n traceBeginAndSlog(\"StartNetworkScoreService\");\n this.mSystemServiceManager.startService(NetworkScoreService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartNetworkStatsService\");\n iNetworkStatsService3 = NetworkStatsService.create(context, iNetworkManagementService2);\n ServiceManager.addService(\"netstats\", iNetworkStatsService3);\n traceEnd();\n traceBeginAndSlog(\"StartNetworkPolicyManagerService\");\n iNetworkPolicyManager2 = HwServiceFactory.getHwNetworkPolicyManagerService().getInstance(context, this.mActivityManagerService, iNetworkManagementService2);\n ServiceManager.addService(\"netpolicy\", iNetworkPolicyManager2);\n traceEnd();\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.rtt\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.aware\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.direct\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.lowpan\")) {\n }\n if (!this.mPackageManager.hasSystemFeature(\"android.hardware.ethernet\")) {\n }\n traceBeginAndSlog(\"StartEthernet\");\n this.mSystemServiceManager.startService(ETHERNET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartConnectivityService\");\n iConnectivityManager2 = HwServiceFactory.getHwConnectivityManager().createHwConnectivityService(context, iNetworkManagementService2, iNetworkStatsService3, iNetworkPolicyManager2);\n iNetworkManagementService = iNetworkManagementService2;\n iNetworkStatsService2 = iNetworkStatsService3;\n ServiceManager.addService(\"connectivity\", iConnectivityManager2, false, 6);\n iNetworkPolicyManager2.bindConnectivityManager(iConnectivityManager2);\n traceEnd();\n traceBeginAndSlog(\"StartNsdService\");\n iBinder5 = NsdService.create(context);\n ServiceManager.addService(\"servicediscovery\", iBinder5);\n iBinder = iBinder5;\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification222 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n }\n if (hasSystemServerFeature(\"location\")) {\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager2222 = this.mSystemServiceManager;\n Context context22222 = this.mSystemContext;\n systemServiceManager2222.startService(new RoleManagerService(context22222, new LegacyRoleResolutionPolicy(context22222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222222);\n context.getResources().updateConfiguration(config222222222222222222, metrics222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n if (hasSystemServerFeature(\"text\")) {\n traceBeginAndSlog(\"StartTextServicesManager\");\n ipSecService4 = ipSecService3;\n this.mSystemServiceManager.startService(TextServicesManagerService.Lifecycle.class);\n traceEnd();\n } else {\n ipSecService4 = ipSecService3;\n }\n if (!disableSystemTextClassifier) {\n traceBeginAndSlog(\"StartTextClassificationManagerService\");\n this.mSystemServiceManager.startService(TextClassificationManagerService.Lifecycle.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartNetworkScoreService\");\n this.mSystemServiceManager.startService(NetworkScoreService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartNetworkStatsService\");\n try {\n iNetworkStatsService3 = NetworkStatsService.create(context, iNetworkManagementService2);\n ServiceManager.addService(\"netstats\", iNetworkStatsService3);\n } catch (Throwable e42) {\n reportWtf(\"starting NetworkStats Service\", e42);\n }\n traceEnd();\n traceBeginAndSlog(\"StartNetworkPolicyManagerService\");\n try {\n iNetworkPolicyManager2 = HwServiceFactory.getHwNetworkPolicyManagerService().getInstance(context, this.mActivityManagerService, iNetworkManagementService2);\n ServiceManager.addService(\"netpolicy\", iNetworkPolicyManager2);\n } catch (Throwable th16) {\n e11 = th16;\n iNetworkPolicyManager2 = null;\n reportWtf(\"starting NetworkPolicy Service\", e11);\n iNetworkPolicyManager2 = iNetworkPolicyManager2;\n traceEnd();\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.rtt\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.aware\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.direct\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.lowpan\")) {\n }\n if (!this.mPackageManager.hasSystemFeature(\"android.hardware.ethernet\")) {\n }\n traceBeginAndSlog(\"StartEthernet\");\n this.mSystemServiceManager.startService(ETHERNET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartConnectivityService\");\n iConnectivityManager2 = HwServiceFactory.getHwConnectivityManager().createHwConnectivityService(context, iNetworkManagementService2, iNetworkStatsService3, iNetworkPolicyManager2);\n iNetworkManagementService = iNetworkManagementService2;\n iNetworkStatsService2 = iNetworkStatsService3;\n ServiceManager.addService(\"connectivity\", iConnectivityManager2, false, 6);\n iNetworkPolicyManager2.bindConnectivityManager(iConnectivityManager2);\n traceEnd();\n traceBeginAndSlog(\"StartNsdService\");\n iBinder5 = NsdService.create(context);\n ServiceManager.addService(\"servicediscovery\", iBinder5);\n iBinder = iBinder5;\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification2222 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n }\n if (hasSystemServerFeature(\"location\")) {\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager22222 = this.mSystemServiceManager;\n Context context222222 = this.mSystemContext;\n systemServiceManager22222.startService(new RoleManagerService(context222222, new LegacyRoleResolutionPolicy(context222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222222222);\n context.getResources().updateConfiguration(config2222222222222222222, metrics2222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi\")) {\n traceBeginAndSlog(\"StartWifi\");\n this.mSystemServiceManager.startService(WIFI_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartWifiScanning\");\n this.mSystemServiceManager.startService(\"com.android.server.wifi.scanner.WifiScanningService\");\n traceEnd();\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.rtt\")) {\n traceBeginAndSlog(\"StartRttService\");\n this.mSystemServiceManager.startService(\"com.android.server.wifi.rtt.RttService\");\n traceEnd();\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.aware\")) {\n traceBeginAndSlog(\"StartWifiAware\");\n this.mSystemServiceManager.startService(WIFI_AWARE_SERVICE_CLASS);\n traceEnd();\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.direct\")) {\n traceBeginAndSlog(\"StartWifiP2P\");\n this.mSystemServiceManager.startService(WIFI_P2P_SERVICE_CLASS);\n traceEnd();\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.lowpan\")) {\n traceBeginAndSlog(\"StartLowpan\");\n this.mSystemServiceManager.startService(LOWPAN_SERVICE_CLASS);\n traceEnd();\n }\n if (!this.mPackageManager.hasSystemFeature(\"android.hardware.ethernet\") || this.mPackageManager.hasSystemFeature(\"android.hardware.usb.host\")) {\n traceBeginAndSlog(\"StartEthernet\");\n this.mSystemServiceManager.startService(ETHERNET_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartConnectivityService\");\n try {\n iConnectivityManager2 = HwServiceFactory.getHwConnectivityManager().createHwConnectivityService(context, iNetworkManagementService2, iNetworkStatsService3, iNetworkPolicyManager2);\n iNetworkManagementService = iNetworkManagementService2;\n iNetworkStatsService2 = iNetworkStatsService3;\n ServiceManager.addService(\"connectivity\", iConnectivityManager2, false, 6);\n iNetworkPolicyManager2.bindConnectivityManager(iConnectivityManager2);\n } catch (Throwable th17) {\n e10 = th17;\n iNetworkManagementService = iNetworkManagementService2;\n iNetworkStatsService2 = iNetworkStatsService3;\n iConnectivityManager2 = null;\n reportWtf(\"starting Connectivity Service\", e10);\n traceEnd();\n traceBeginAndSlog(\"StartNsdService\");\n iBinder5 = NsdService.create(context);\n ServiceManager.addService(\"servicediscovery\", iBinder5);\n iBinder = iBinder5;\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification22222 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n }\n if (hasSystemServerFeature(\"location\")) {\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager222222 = this.mSystemServiceManager;\n Context context2222222 = this.mSystemContext;\n systemServiceManager222222.startService(new RoleManagerService(context2222222, new LegacyRoleResolutionPolicy(context2222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222222222);\n context.getResources().updateConfiguration(config22222222222222222222, metrics22222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n traceBeginAndSlog(\"StartNsdService\");\n try {\n iBinder5 = NsdService.create(context);\n ServiceManager.addService(\"servicediscovery\", iBinder5);\n iBinder = iBinder5;\n } catch (Throwable th18) {\n e9 = th18;\n iBinder5 = null;\n reportWtf(\"starting Service Discovery Service\", e9);\n iBinder = iBinder5;\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification222222 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n }\n if (hasSystemServerFeature(\"location\")) {\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager2222222 = this.mSystemServiceManager;\n Context context22222222 = this.mSystemContext;\n systemServiceManager2222222.startService(new RoleManagerService(context22222222, new LegacyRoleResolutionPolicy(context22222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222222222);\n context.getResources().updateConfiguration(config222222222222222222222, metrics222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n try {\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n } catch (Throwable e43) {\n reportWtf(\"starting SystemUpdateManagerService\", e43);\n }\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n try {\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n } catch (Throwable e44) {\n reportWtf(\"starting UpdateLockService\", e44);\n }\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n try {\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n } catch (RuntimeException e45) {\n this.mSystemServiceManager.startService(NotificationManagerService.class);\n }\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification2222222 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n notification = notification2222222;\n try {\n ServiceManager.addService(\"tui\", (IBinder) new TrustedUIService(context));\n } catch (Throwable e46) {\n Slog.e(TAG, \"Failure starting TUI Service \", e46);\n }\n } else {\n notification = notification2222222;\n }\n if (hasSystemServerFeature(\"location\")) {\n traceBeginAndSlog(\"StartLocationManagerService\");\n try {\n HwServiceFactory.IHwLocationManagerService hwLocation = HwServiceFactory.getHwLocationManagerService();\n if (hwLocation != null) {\n r2 = hwLocation.getInstance(context);\n } else {\n r2 = new LocationManagerService(context);\n }\n try {\n ServiceManager.addService(\"location\", (IBinder) r2);\n location222222222222222 = r2;\n } catch (Throwable th19) {\n e8 = th19;\n location222222222222222 = r2;\n reportWtf(\"starting Location Manager\", e8);\n traceEnd();\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager22222222 = this.mSystemServiceManager;\n Context context222222222 = this.mSystemContext;\n systemServiceManager22222222.startService(new RoleManagerService(context222222222, new LegacyRoleResolutionPolicy(context222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222222222222);\n context.getResources().updateConfiguration(config2222222222222222222222, metrics2222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (Throwable th20) {\n e8 = th20;\n reportWtf(\"starting Location Manager\", e8);\n traceEnd();\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager222222222 = this.mSystemServiceManager;\n Context context2222222222 = this.mSystemContext;\n systemServiceManager222222222.startService(new RoleManagerService(context2222222222, new LegacyRoleResolutionPolicy(context2222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222222222222);\n context.getResources().updateConfiguration(config22222222222222222222222, metrics22222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n traceBeginAndSlog(\"StartCountryDetectorService\");\n try {\n ?? countryDetectorService = new CountryDetectorService(context);\n try {\n ServiceManager.addService(\"country_detector\", (IBinder) countryDetectorService);\n countryDetector222222222222222 = countryDetectorService;\n } catch (Throwable th21) {\n e7 = th21;\n countryDetector222222222222222 = countryDetectorService;\n reportWtf(\"starting Country Detector\", e7);\n traceEnd();\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager2222222222 = this.mSystemServiceManager;\n Context context22222222222 = this.mSystemContext;\n systemServiceManager2222222222.startService(new RoleManagerService(context22222222222, new LegacyRoleResolutionPolicy(context22222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222222222222);\n context.getResources().updateConfiguration(config222222222222222222222222, metrics222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (Throwable th22) {\n e7 = th22;\n reportWtf(\"starting Country Detector\", e7);\n traceEnd();\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager22222222222 = this.mSystemServiceManager;\n Context context222222222222 = this.mSystemContext;\n systemServiceManager22222222222.startService(new RoleManagerService(context222222222222, new LegacyRoleResolutionPolicy(context222222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222222222222222);\n context.getResources().updateConfiguration(config2222222222222222222222222, metrics2222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n traceBeginAndSlog(\"StartTimeDetectorService\");\n try {\n try {\n this.mSystemServiceManager.startService(TIME_DETECTOR_SERVICE_CLASS);\n } catch (Throwable th23) {\n e6 = th23;\n }\n } catch (Throwable th24) {\n e6 = th24;\n reportWtf(\"starting StartTimeDetectorService service\", e6);\n traceEnd();\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager222222222222 = this.mSystemServiceManager;\n Context context2222222222222 = this.mSystemContext;\n systemServiceManager222222222222.startService(new RoleManagerService(context2222222222222, new LegacyRoleResolutionPolicy(context2222222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222222222222222);\n context.getResources().updateConfiguration(config22222222222222222222222222, metrics22222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n }\n if (!isWatch) {\n traceBeginAndSlog(\"StartSearchManagerService\");\n try {\n this.mSystemServiceManager.startService(SEARCH_MANAGER_SERVICE_CLASS);\n } catch (Throwable e47) {\n reportWtf(\"starting Search Service\", e47);\n }\n traceEnd();\n }\n if (context.getResources().getBoolean(17891453)) {\n traceBeginAndSlog(\"StartWallpaperManagerService\");\n this.mSystemServiceManager.startService(WALLPAPER_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n this.mSystemServiceManager.startService(AudioService.Lifecycle.class);\n iNetworkPolicyManager = iNetworkPolicyManager2;\n iConnectivityManager = iConnectivityManager2;\n } else {\n String className = context.getResources().getString(17039829);\n try {\n SystemServiceManager systemServiceManager3 = this.mSystemServiceManager;\n iNetworkPolicyManager = iNetworkPolicyManager2;\n try {\n StringBuilder sb = new StringBuilder();\n sb.append(className);\n iConnectivityManager = iConnectivityManager2;\n try {\n sb.append(\"$Lifecycle\");\n systemServiceManager3.startService(sb.toString());\n } catch (Throwable th25) {\n e5 = th25;\n }\n } catch (Throwable th26) {\n e5 = th26;\n iConnectivityManager = iConnectivityManager2;\n reportWtf(\"starting \" + className, e5);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager2222222222222 = this.mSystemServiceManager;\n Context context22222222222222 = this.mSystemContext;\n systemServiceManager2222222222222.startService(new RoleManagerService(context22222222222222, new LegacyRoleResolutionPolicy(context22222222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222222222222222);\n context.getResources().updateConfiguration(config222222222222222222222222222, metrics222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (Throwable th27) {\n e5 = th27;\n iNetworkPolicyManager = iNetworkPolicyManager2;\n iConnectivityManager = iConnectivityManager2;\n reportWtf(\"starting \" + className, e5);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager22222222222222 = this.mSystemServiceManager;\n Context context222222222222222 = this.mSystemContext;\n systemServiceManager22222222222222.startService(new RoleManagerService(context222222222222222, new LegacyRoleResolutionPolicy(context222222222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222222222222222222);\n context.getResources().updateConfiguration(config2222222222222222222222222222, metrics2222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n traceBeginAndSlog(\"StartBroadcastRadioService\");\n this.mSystemServiceManager.startService(BroadcastRadioService.class);\n traceEnd();\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n traceBeginAndSlog(\"StartDockObserver\");\n this.mSystemServiceManager.startService(DockObserver.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n try {\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n } catch (Throwable e48) {\n reportWtf(\"starting WiredAccessoryManager\", e48);\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n traceBeginAndSlog(\"StartMidiManager\");\n this.mSystemServiceManager.startService(MIDI_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartAdbService\");\n try {\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n } catch (Throwable th28) {\n Slog.e(TAG, \"Failure starting AdbService\");\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.usb.host\") || this.mPackageManager.hasSystemFeature(\"android.hardware.usb.accessory\") || isEmulator) {\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n }\n if (!isWatch && hasSystemServerFeature(\"serial\")) {\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n }\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n try {\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n } catch (Throwable th29) {\n e3 = th29;\n iBinder3 = null;\n Slog.e(TAG, \"Failure starting HardwarePropertiesManagerService\", e3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager222222222222222 = this.mSystemServiceManager;\n Context context2222222222222222 = this.mSystemContext;\n systemServiceManager222222222222222.startService(new RoleManagerService(context2222222222222222, new LegacyRoleResolutionPolicy(context2222222222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222222222222222222);\n context.getResources().updateConfiguration(config22222222222222222222222222222, metrics22222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n traceBeginAndSlog(\"StartBackupManager\");\n this.mSystemServiceManager.startService(BACKUP_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.app_widgets\") || context.getResources().getBoolean(17891433)) {\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager2222222222222222 = this.mSystemServiceManager;\n Context context22222222222222222 = this.mSystemContext;\n systemServiceManager2222222222222222.startService(new RoleManagerService(context22222222222222222, new LegacyRoleResolutionPolicy(context22222222222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n traceBeginAndSlog(\"StartGestureLauncher\");\n this.mSystemServiceManager.startService(GestureLauncherService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n try {\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n } catch (Throwable e49) {\n reportWtf(\"starting DiskStats Service\", e49);\n }\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n try {\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n } catch (Throwable e50) {\n reportWtf(\"starting RuntimeService\", e50);\n }\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n traceBeginAndSlog(\"StartTimeZoneRulesManagerService\");\n this.mSystemServiceManager.startService(TIME_ZONE_RULES_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n if (!disableNetworkTime) {\n traceBeginAndSlog(\"StartNetworkTimeUpdateService\");\n try {\n networkTimeUpdater2 = new NewNetworkTimeUpdateService(context);\n try {\n Slog.d(TAG, \"Using networkTimeUpdater class=\" + networkTimeUpdater2.getClass());\n ServiceManager.addService(\"network_time_update_service\", networkTimeUpdater2);\n networkTimeUpdater3 = networkTimeUpdater2;\n } catch (Throwable th30) {\n e2 = th30;\n reportWtf(\"starting NetworkTimeUpdate service\", e2);\n networkTimeUpdater3 = networkTimeUpdater2;\n traceEnd();\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222222222222222222);\n context.getResources().updateConfiguration(config222222222222222222222222222222, metrics222222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (Throwable th31) {\n e2 = th31;\n networkTimeUpdater2 = null;\n reportWtf(\"starting NetworkTimeUpdate service\", e2);\n networkTimeUpdater3 = networkTimeUpdater2;\n traceEnd();\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222222222222222222222);\n context.getResources().updateConfiguration(config2222222222222222222222222222222, metrics2222222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n }\n traceBeginAndSlog(\"CertBlacklister\");\n try {\n new CertBlacklister(context);\n } catch (Throwable e51) {\n reportWtf(\"starting CertBlacklister\", e51);\n }\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n traceBeginAndSlog(\"StartEmergencyAffordanceService\");\n this.mSystemServiceManager.startService(EmergencyAffordanceService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n traceBeginAndSlog(\"StartPrintManager\");\n this.mSystemServiceManager.startService(PRINT_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n traceBeginAndSlog(\"StartCompanionDeviceManager\");\n this.mSystemServiceManager.startService(COMPANION_DEVICE_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n traceBeginAndSlog(\"StartHdmiControlService\");\n this.mSystemServiceManager.startService(HdmiControlService.class);\n traceEnd();\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.live_tv\") || this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n traceBeginAndSlog(\"StartMediaResourceMonitor\");\n this.mSystemServiceManager.startService(MediaResourceMonitorService.class);\n traceEnd();\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n traceBeginAndSlog(\"StartTvRemoteService\");\n this.mSystemServiceManager.startService(TvRemoteService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n try {\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n } catch (Throwable th32) {\n e = th32;\n mediaRouter4 = null;\n reportWtf(\"starting MediaRouterService\", e);\n mediaRouter2 = mediaRouter4;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222222222222222222222);\n context.getResources().updateConfiguration(config22222222222222222222222222222222, metrics22222222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n traceBeginAndSlog(\"StartFaceSensor\");\n mediaRouter3 = mediaRouter2;\n this.mSystemServiceManager.startService(FaceService.class);\n traceEnd();\n } else {\n mediaRouter3 = mediaRouter2;\n }\n if (hasFeatureIris) {\n traceBeginAndSlog(\"StartIrisSensor\");\n this.mSystemServiceManager.startService(IrisService.class);\n traceEnd();\n }\n if (hasFeatureFingerprint) {\n traceBeginAndSlog(\"StartFingerprintSensor\");\n try {\n HwServiceFactory.IHwFingerprintService ifs = HwServiceFactory.getHwFingerprintService();\n if (ifs != null) {\n Class<SystemService> serviceClass2 = ifs.createServiceClass();\n Slog.i(TAG, \"serviceClass doesn't null\");\n serviceClass = serviceClass2;\n } else {\n Slog.e(TAG, \"HwFingerPrintService is null!\");\n serviceClass = null;\n }\n if (serviceClass != null) {\n Slog.i(TAG, \"start HwFingerPrintService\");\n this.mSystemServiceManager.startService(serviceClass);\n } else {\n this.mSystemServiceManager.startService(FingerprintService.class);\n }\n Slog.i(TAG, \"FingerPrintService ready\");\n } catch (Throwable e52) {\n Slog.e(TAG, \"Start fingerprintservice error\", e52);\n }\n traceEnd();\n }\n if (hasFeatureFace || hasFeatureIris || hasFeatureFingerprint) {\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n try {\n BackgroundDexOptService.schedule(context);\n } catch (Throwable e53) {\n reportWtf(\"starting StartBackgroundDexOptService\", e53);\n }\n traceEnd();\n if (!isWatch) {\n traceBeginAndSlog(\"StartDynamicCodeLoggingService\");\n try {\n DynamicCodeLoggingService.schedule(context);\n } catch (Throwable e54) {\n reportWtf(\"starting DynamicCodeLoggingService\", e54);\n }\n traceEnd();\n }\n if (!isWatch) {\n traceBeginAndSlog(\"StartPruneInstantAppsJobService\");\n try {\n PruneInstantAppsJobService.schedule(context);\n } catch (Throwable e55) {\n reportWtf(\"StartPruneInstantAppsJobService\", e55);\n }\n traceEnd();\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n traceBeginAndSlog(\"StartLauncherAppsService\");\n this.mSystemServiceManager.startService(LauncherAppsService.class);\n traceEnd();\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n traceBeginAndSlog(\"StartCrossProfileAppsService\");\n this.mSystemServiceManager.startService(CrossProfileAppsService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n } else {\n ipSecService = null;\n iNetworkPolicyManager = null;\n iConnectivityManager = null;\n location = null;\n iNetworkManagementService = null;\n iNetworkStatsService = null;\n mediaRouter = null;\n countryDetector = null;\n networkTimeUpdater = null;\n }\n if (!isWatch) {\n traceBeginAndSlog(\"StartMediaProjectionManager\");\n this.mSystemServiceManager.startService(MediaProjectionManagerService.class);\n traceEnd();\n }\n if (!disableSlices) {\n traceBeginAndSlog(\"StartSliceManagerService\");\n this.mSystemServiceManager.startService(SLICE_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n if (!disableCameraService) {\n traceBeginAndSlog(\"StartCameraServiceProxy\");\n this.mSystemServiceManager.startService(CameraServiceProxy.class);\n traceEnd();\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n traceBeginAndSlog(\"StartIoTSystemService\");\n this.mSystemServiceManager.startService(IOT_SERVICE_CLASS);\n traceEnd();\n }\n if (hasSystemServerFeature(\"helper\")) {\n traceBeginAndSlog(\"StartStatsCompanionService\");\n this.mSystemServiceManager.startService(StatsCompanionService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartIncidentCompanionService\");\n this.mSystemServiceManager.startService(IncidentCompanionService.class);\n traceEnd();\n if (safeMode) {\n this.mActivityManagerService.enterSafeMode();\n }\n }\n if (hasSystemServerFeature(\"mms\")) {\n traceBeginAndSlog(\"StartMmsService\");\n traceEnd();\n mmsService = (MmsServiceBroker) this.mSystemServiceManager.startService(MmsServiceBroker.class);\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n traceBeginAndSlog(\"StartAutoFillService\");\n this.mSystemServiceManager.startService(AUTO_FILL_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n try {\n traceBeginAndSlog(\"StartBastetService\");\n this.mSystemServiceManager.startService(\"com.android.server.HwBastetService\");\n traceEnd();\n } catch (Throwable th33) {\n Slog.w(TAG, \"HwBastetService not exists.\");\n }\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n traceBeginAndSlog(\"startSysSvcCallRecordService\");\n startSysSvcCallRecordService();\n traceEnd();\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n try {\n vibrator.systemReady();\n } catch (Throwable e56) {\n reportWtf(\"making Vibrator Service ready\", e56);\n }\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n try {\n lockSettings.systemReady();\n } catch (Throwable e57) {\n reportWtf(\"making Lock Settings Service ready\", e57);\n }\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n try {\n wm.systemReady();\n } catch (Throwable e58) {\n reportWtf(\"making Window Manager Service ready\", e58);\n }\n traceEnd();\n if (safeMode) {\n this.mActivityManagerService.showSafeModeOverlay();\n }\n Configuration config222222222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222222222222222222222);\n context.getResources().updateConfiguration(config222222222222222222222222222222222, metrics222222222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n systemTheme.rebase();\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n try {\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n } catch (Throwable e59) {\n reportWtf(\"making Power Manager Service ready\", e59);\n }\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n try {\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n } catch (Throwable e60) {\n reportWtf(\"making PG Manager Service ready\", e60);\n }\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n try {\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n } catch (Throwable e61) {\n reportWtf(\"making Display Manager Service ready\", e61);\n }\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n for (String className2 : classes222222222222222222222222222222222) {\n traceBeginAndSlog(\"StartDeviceSpecificServices \" + className2);\n try {\n this.mSystemServiceManager.startService(className2);\n } catch (Throwable e62) {\n reportWtf(\"starting \" + className2, e62);\n }\n traceEnd();\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }", "public ManageEnterpriseJPanel(JPanel userProcessContainer, Ecosystem system) {\n initComponents();\n this.userProcessContainer = userProcessContainer;\n this.system = system;\n populateTable();\n \n jLabel1.setText(\"<html><u>View Enterprises</u></html>\");\n\n }", "public void StartAllServices()\n\t{\n\t\tm_oCommServ.StartCmdService(m_oConfig.CmdPort()); //Giving introducer port here\n\t\t// bring up the heartbeat receiver\n\t\tm_oCommServ.StartHeartBeatRecvr();\n\t\t//breing up the file report recvr\n\t\tm_oCommServ.StartFileReportRecvr();\n\t}", "@Test\n\tpublic void testSuppServices() {\n\t\tList<SuppServices> suppServices = suppServicesService.selectList();\n\n\t\tfor (SuppServices supp : suppServices) {\n\n\t\t\tSystem.out.println(supp);\n\t\t}\n\t}", "@Override\n public List<ServiceModel> queryAllServices() throws ApplicationException {\n try {\n // 1. Query basic information of service instance.\n List<ServiceModel> services = getMapper(ServiceModelMapper.class).queryAllServices();\n if(CollectionUtils.isEmpty(services)) {\n return null;\n }\n\n // 2. Query relation data.\n List<ServicePackageMapping> serviceMappings = getMapper(ServicePackageMapper.class).queryAllMappings();\n\n // 3. Compose data.\n return composeData(services, serviceMappings);\n\n } catch(Exception exception) {\n LOGGER.error(\"Fail to delete service instance. {}\", exception);\n throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, ErrorCode.OPER_DB_FAIL);\n }\n }", "private void run() {\n try {\n traceBeginAndSlog(\"InitBeforeStartServices\");\n SystemProperties.set(SYSPROP_START_COUNT, String.valueOf(this.mStartCount));\n SystemProperties.set(SYSPROP_START_ELAPSED, String.valueOf(this.mRuntimeStartElapsedTime));\n SystemProperties.set(SYSPROP_START_UPTIME, String.valueOf(this.mRuntimeStartUptime));\n EventLog.writeEvent((int) EventLogTags.SYSTEM_SERVER_START, Integer.valueOf(this.mStartCount), Long.valueOf(this.mRuntimeStartUptime), Long.valueOf(this.mRuntimeStartElapsedTime));\n if (System.currentTimeMillis() < 86400000) {\n Slog.w(TAG, \"System clock is before 1970; setting to 1970.\");\n SystemClock.setCurrentTimeMillis(86400000);\n }\n if (!SystemProperties.get(\"persist.sys.language\").isEmpty()) {\n SystemProperties.set(\"persist.sys.locale\", Locale.getDefault().toLanguageTag());\n SystemProperties.set(\"persist.sys.language\", \"\");\n SystemProperties.set(\"persist.sys.country\", \"\");\n SystemProperties.set(\"persist.sys.localevar\", \"\");\n }\n Binder.setWarnOnBlocking(true);\n PackageItemInfo.forceSafeLabels();\n SQLiteGlobal.sDefaultSyncMode = \"FULL\";\n SQLiteCompatibilityWalFlags.init((String) null);\n Slog.i(TAG, \"Entered the Android system server!\");\n int uptimeMillis = (int) SystemClock.elapsedRealtime();\n EventLog.writeEvent((int) EventLogTags.BOOT_PROGRESS_SYSTEM_RUN, uptimeMillis);\n if (!this.mRuntimeRestart) {\n MetricsLogger.histogram((Context) null, \"boot_system_server_init\", uptimeMillis);\n Jlog.d(30, \"JL_BOOT_PROGRESS_SYSTEM_RUN\");\n }\n SystemProperties.set(\"persist.sys.dalvik.vm.lib.2\", VMRuntime.getRuntime().vmLibrary());\n VMRuntime.getRuntime().clearGrowthLimit();\n VMRuntime.getRuntime().setTargetHeapUtilization(0.8f);\n Build.ensureFingerprintProperty();\n Environment.setUserRequired(true);\n BaseBundle.setShouldDefuse(true);\n Parcel.setStackTraceParceling(true);\n BinderInternal.disableBackgroundScheduling(true);\n BinderInternal.setMaxThreads(31);\n Process.setThreadPriority(-2);\n Process.setCanSelfBackground(false);\n Looper.prepareMainLooper();\n Looper.getMainLooper().setSlowLogThresholdMs(SLOW_DISPATCH_THRESHOLD_MS, SLOW_DELIVERY_THRESHOLD_MS);\n System.loadLibrary(\"android_servers\");\n if (Build.IS_DEBUGGABLE) {\n initZygoteChildHeapProfiling();\n }\n performPendingShutdown();\n createSystemContext();\n HwFeatureLoader.SystemServiceFeature.loadFeatureFramework(this.mSystemContext);\n this.mSystemServiceManager = new SystemServiceManager(this.mSystemContext);\n this.mSystemServiceManager.setStartInfo(this.mRuntimeRestart, this.mRuntimeStartElapsedTime, this.mRuntimeStartUptime);\n LocalServices.addService(SystemServiceManager.class, this.mSystemServiceManager);\n SystemServerInitThreadPool.get();\n traceEnd();\n try {\n traceBeginAndSlog(\"StartServices\");\n startBootstrapServices();\n startCoreServices();\n startOtherServices();\n SystemServerInitThreadPool.shutdown();\n Slog.i(TAG, \"Finish_StartServices\");\n traceEnd();\n StrictMode.initVmDefaults(null);\n if (!this.mRuntimeRestart && !isFirstBootOrUpgrade()) {\n int uptimeMillis2 = (int) SystemClock.elapsedRealtime();\n MetricsLogger.histogram((Context) null, \"boot_system_server_ready\", uptimeMillis2);\n if (uptimeMillis2 > 60000) {\n Slog.wtf(SYSTEM_SERVER_TIMING_TAG, \"SystemServer init took too long. uptimeMillis=\" + uptimeMillis2);\n }\n }\n LogBufferUtil.closeLogBufferAsNeed(this.mSystemContext);\n if (!VMRuntime.hasBootImageSpaces()) {\n Slog.wtf(TAG, \"Runtime is not running with a boot image!\");\n }\n Looper.loop();\n throw new RuntimeException(\"Main thread loop unexpectedly exited\");\n } catch (Throwable th) {\n Slog.i(TAG, \"Finish_StartServices\");\n traceEnd();\n throw th;\n }\n } catch (Throwable th2) {\n traceEnd();\n throw th2;\n }\n }", "go.micro.runtime.RuntimeOuterClass.Service getServices(int index);", "go.micro.runtime.RuntimeOuterClass.Service getServices(int index);", "public ShowSystemStatusResponse showSystemStatus(Map<String, String> options) throws GPUdbException {\n ShowSystemStatusRequest actualRequest_ = new ShowSystemStatusRequest(options);\n ShowSystemStatusResponse actualResponse_ = new ShowSystemStatusResponse();\n submitRequest(\"/show/system/status\", actualRequest_, actualResponse_, false);\n return actualResponse_;\n }", "@Override\n\t\t\tpublic boolean isSystemEntry() {\n\t\t\t\treturn true;\n\t\t\t}", "private static void updateMgmtServiceOption(HmDomain hmDom) {\r\n\t\tif (allOptionRadius.size() > 0) {\r\n\t\t\tHmUpgradeLog upgradeLog;\r\n\t\t\tList<HmUpgradeLog> lstLogBo = new ArrayList<HmUpgradeLog>();\r\n\t\t\tList<MgmtServiceOption> updateOptionBo = new ArrayList<MgmtServiceOption>();\r\n\r\n\t\t\tString post12 = \"The set of management options do not specify a RADIUS server.\";\r\n\t\t\tString action1 = \"If you need a RADIUS server for the set of management options, manually add it.\";\r\n\t\t\tString action2 = \"To keep the authentication method as local, leave the management options alone. To authenticate \"+NmsUtil.getOEMCustomer().getAccessPonitName()+\" admins through RADIUS, change the method of authentication to RADIUS or Both.\";\r\n\t\t\tString post3 = NmsUtil.getOEMCustomer().getNmsName() +\r\n\t\t\t\t\" chose a RADIUS server from one of the network policies and bound it to this set of management options.\";\r\n\t\t\tString action3 = \"If a network policy must use a different RADIUS server, clone this management options set, specify a different RADIUS server, and reference the newly cloned management options set in the network policy.\";\r\n\t\t\tString post4 = NmsUtil.getOEMCustomer().getNmsName() + \" bound the specified RADIUS server to this set of management options.\";\r\n\t\t\tString action4 = \"No action is required.\";\r\n\t\t\tString post5 = \"Because a network policy now only references a RADIUS server indirectly through a management options set, this network policy no longer references a RADIUS server.\";\r\n\t\t\tString action5 = \"If the network policy must use this RADIUS server, create a new set of management options that references it and specify that management options set in this network policy.\";\r\n\t\t\tMap<String, String> allRadius;\r\n\t\t\tMgmtServiceOption mgmtOption;\r\n\t\t\tfor (String optionIdOld : allOptionRadius.keySet()) {\r\n\t\t\t\tallRadius = allOptionRadius.get(optionIdOld);\r\n\t\t\t\tString former;\r\n\t\t\t\tif (\"-1\".equals(optionIdOld)) {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * these wlan policies have radius server but no mgmt service option\r\n\t\t\t\t\t */\r\n\t\t\t\t\tfor (String radiusName : allRadius.keySet()) {\r\n\t\t\t\t\t\tupgradeLog = new HmUpgradeLog();\r\n\t\t\t\t\t\tformer = \"Network policy \\\"\" + allRadius.get(radiusName) + \") specified RADIUS server \\\"\" + radiusName + \") but not a management options set.\";\r\n\t\t\t\t\t\tupgradeLog.setFormerContent(former);\r\n\t\t\t\t\t\tupgradeLog.setPostContent(post5);\r\n\t\t\t\t\t\tupgradeLog.setRecommendAction(action5);\r\n\t\t\t\t\t\tlstLogBo.add(upgradeLog);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * get this mgmt service option information\r\n\t\t\t\t\t */\r\n\t\t\t\t\tLong newId = AhRestoreNewMapTools.getMapOption(Long.valueOf(optionIdOld));\r\n\t\t\t\t\tmgmtOption = QueryUtil.findBoById(MgmtServiceOption.class, newId);\r\n\t\t\t\t\tString optionName = mgmtOption.getMgmtName();\r\n\t\t\t\t\tString authType = \"\";\r\n\t\t\t\t\tswitch(mgmtOption.getUserAuth()) {\r\n\t\t\t\t\t\tcase EnumConstUtil.ADMIN_USER_AUTHENTICATION_RADIUS :\r\n\t\t\t\t\t\t\tauthType = \"RADIUS\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase EnumConstUtil.ADMIN_USER_AUTHENTICATION_BOTH :\r\n\t\t\t\t\t\t\tauthType = \"Both\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault :\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tStringBuilder strBody = new StringBuilder();\r\n\t\t\t\t\tString radiusName = \"\";\r\n\t\t\t\t\tfor (String radiusId : allRadius.keySet()) {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * set the radius server to this mgmt service option\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tif (!\"-1\".equals(radiusId)) {\r\n\t\t\t\t\t\t\tnewId = AhRestoreNewMapTools.getMapRadiusServerAssign(Long.valueOf(radiusId));\r\n\t\t\t\t\t\t\tif (null != newId) {\r\n\t\t\t\t\t\t\t\tList<?> radiusSql = QueryUtil.executeQuery(\"SELECT radiusName FROM \" + RadiusAssignment.class.getSimpleName(), null, new FilterParams(\"id\", newId));\r\n\t\t\t\t\t\t\t\tif (!radiusSql.isEmpty()) {\r\n\t\t\t\t\t\t\t\t\tradiusName = (String)(radiusSql.get(0));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (!\"\".equals(authType) && null == mgmtOption.getRadiusServer() && null != newId) {\r\n\t\t\t\t\t\t\t\tmgmtOption.setRadiusServer(AhRestoreNewTools.CreateBoWithId(RadiusAssignment.class, newId));\r\n\t\t\t\t\t\t\t\tupdateOptionBo.add(mgmtOption);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// get wlan policy name\r\n\t\t\t\t\t\tString[] wlans = allRadius.get(radiusId).split(\" \");\r\n\t\t\t\t\t\tStringBuilder strEnd = new StringBuilder();\r\n\t\t\t\t\t\tstrEnd.append(\"\\\"\");\r\n\t\t\t\t\t\tif (wlans.length == 1) {\r\n\t\t\t\t\t\t\tstrEnd.append(wlans[0]);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfor (int i = 0; i < wlans.length; i ++) {\r\n\t\t\t\t\t\t\t\tif (i != wlans.length-1) {\r\n\t\t\t\t\t\t\t\t\tstrEnd.append(wlans[i]).append(\", \");\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tstrEnd.append(\"and \").append(wlans[i]);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tstrEnd.append(\"\\\" \");\r\n\t\t\t\t\t\tif (!\"\".equals(authType) && allRadius.size() == 1) {\r\n\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t * the mgmt service option has no corresponding radius server\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\tif (\"-1\".equals(radiusId)) {\r\n\t\t\t\t\t\t\t\tupgradeLog = new HmUpgradeLog();\r\n\t\t\t\t\t\t\t\tstrEnd.append(\"However, no RADIUS server was specified in \");\r\n\t\t\t\t\t\t\t\tstrEnd.append((wlans.length == 1)?\"it.\":\"these network policies.\");\r\n\t\t\t\t\t\t\t\tformer = \"The management options set \\\"\" + optionName + \") specified \" + authType + \" for \"+NmsUtil.getOEMCustomer().getAccessPonitName()+\" admins authentication and was used in network policy \" + strEnd.toString();\r\n\t\t\t\t\t\t\t\tupgradeLog.setFormerContent(former);\r\n\t\t\t\t\t\t\t\tupgradeLog.setPostContent(post12);\r\n\t\t\t\t\t\t\t\tupgradeLog.setRecommendAction(action1);\r\n\t\t\t\t\t\t\t\tlstLogBo.add(upgradeLog);\r\n\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t * the mgmt service option has one same radius server\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tupgradeLog = new HmUpgradeLog();\r\n\t\t\t\t\t\t\t\tstrEnd.append((wlans.length == 1)?\"which specified the RADIUS server \\\"\":\"all of which specified the same RADIUS server \\\"\");\r\n\t\t\t\t\t\t\t\tformer = \"The management options set \\\"\" + optionName + \") specified \" + authType + \" for \"+NmsUtil.getOEMCustomer().getAccessPonitName()+\" admins authentication and was used in network policy \" + strEnd.toString() + radiusName + \").\";\r\n\t\t\t\t\t\t\t\tupgradeLog.setFormerContent(former);\r\n\t\t\t\t\t\t\t\tupgradeLog.setPostContent(post4);\r\n\t\t\t\t\t\t\t\tupgradeLog.setRecommendAction(action4);\r\n\t\t\t\t\t\t\t\tlstLogBo.add(upgradeLog);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tstrBody.append(\" in network policy \").append(strEnd.toString());\r\n\t\t\t\t\t\t\tstrBody.append(radiusName.length() > 32 ? \"no RADIUS server was specified in which;\" : \"which referenced RADIUS server \\\"\" + radiusName + \");\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (strBody.length() > 0) {\r\n\t\t\t\t\t\tString strResult = strBody.toString().substring(0, strBody.toString().length()-1) + \".\";\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * the auth method is radius or both of the mgmt service option which has more than one corresponding radius server\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tif (!\"\".equals(authType)) {\r\n\t\t\t\t\t\t\tupgradeLog = new HmUpgradeLog();\r\n\t\t\t\t\t\t\tformer = \"The management options set \\\"\" + optionName + \") specified \" + authType + \" for \"+NmsUtil.getOEMCustomer().getAccessPonitName()+\" admins authentication and was used\" + strResult;\r\n\t\t\t\t\t\t\tupgradeLog.setFormerContent(former);\r\n\t\t\t\t\t\t\tupgradeLog.setPostContent(post3);\r\n\t\t\t\t\t\t\tupgradeLog.setRecommendAction(action3);\r\n\t\t\t\t\t\t\tlstLogBo.add(upgradeLog);\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * the auth method is local of the mgmt service option which has more than one corresponding radius server\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tupgradeLog = new HmUpgradeLog();\r\n\t\t\t\t\t\t\tformer = \"The management options set \\\"\" + optionName + \") specified Local for \"+NmsUtil.getOEMCustomer().getAccessPonitName()+\" admins authentication and was used\" + strResult;\r\n\t\t\t\t\t\t\tupgradeLog.setFormerContent(former);\r\n\t\t\t\t\t\t\tupgradeLog.setPostContent(post12);\r\n\t\t\t\t\t\t\tupgradeLog.setRecommendAction(action2);\r\n\t\t\t\t\t\t\tlstLogBo.add(upgradeLog);\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\r\n\t\t\t/*\r\n\t\t\t * update the mgmt service option data in database\r\n\t\t\t */\r\n\t\t\tif (updateOptionBo.size() > 0) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tQueryUtil.bulkUpdateBos(updateOptionBo);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tAhRestoreDBTools.logRestoreMsg(\"update mgmt service option data error\");\r\n\t\t\t\t\tAhRestoreDBTools.logRestoreMsg(e.getMessage());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/*\r\n\t\t\t * insert or update the data to database\r\n\t\t\t */\r\n\t\t\tif (lstLogBo.size() > 0) {\r\n\t\t\t\tfor (HmUpgradeLog log : lstLogBo) {\r\n\t\t\t\t\tlog.setOwner(hmDom);\r\n\t\t\t\t\tlog.setLogTime(new HmTimeStamp(System.currentTimeMillis(),hmDom.getTimeZoneString()));\r\n\t\t\t\t\tlog.setAnnotation(\"Click to add an annotation\");\r\n\t\t\t\t}\r\n\t\t\t\ttry {\r\n\t\t\t\t\tQueryUtil.bulkCreateBos(lstLogBo);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tAhRestoreDBTools.logRestoreMsg(\"insert mgmt service option upgrade log error\");\r\n\t\t\t\t\tAhRestoreDBTools.logRestoreMsg(e.getMessage());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic List<sn.ucad.master.assurance.bo.Service> findAllService() {\n\t\treturn serviceRepository.findAll();\r\n\t}", "void logSystemDetails() throws CometApiException {\n sendSynchronously(restApiClient::logSystemDetails, SystemUtils.readSystemDetails());\n }", "void unsetSystem();", "public List<VCal> findAll() throws SystemException {\n\t\treturn findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);\n\t}", "public void initInfoSystem(){\r\n infoSys = new FedInfoSystem();\r\n subscriberList = new ConcurrentHashMap<String, List>();\r\n //singleCptNodes = new ArrayList<String>();\r\n //infoServiceRequest(\"CPT-UPDATE\", null);\r\n //infoServiceRequest(\"REQ-UPDATE\", null);\r\n }", "public com.google.cloud.video.livestream.v1.Encryption.DrmSystems getDrmSystems() {\n if (drmSystemsBuilder_ == null) {\n return drmSystems_ == null\n ? com.google.cloud.video.livestream.v1.Encryption.DrmSystems.getDefaultInstance()\n : drmSystems_;\n } else {\n return drmSystemsBuilder_.getMessage();\n }\n }", "public interface ServiceManager {\n /**\n * Stop the registered services. The service with the highest level will be stoppped first.\n */\n public void stop();\n\n /**\n * First stop and than start. Also resets all managed singletons.\n * \n */\n public void restart();\n}", "public static void main(String[] args) {\n // Set MessageDispatcher.\n // /////////////////////////////////////\n MessageDispatcher dispatcher = new MessageDispatcher(\n SYSTEM_MGR_ID,\n DISPATCHER_IP,\n Integer.parseInt(DISPATCHER_PORT));\n dispatcher.start();\n\n // /////////////////////////////////////\n // // Set SystemManager Interface\n // /////////////////////////////////////\n SystemManagerInterface systemMngInterface =\n new SystemManagerInterface(dispatcher);\n \n // /////////////////////////////////////\n // Set NetworkIntece\n // /////////////////////////////////////\n NetworkInterface originalNwInterface =\n new NetworkInterface(dispatcher, ORIGINAL_NW_ID);\n NetworkInterface aggregatedNwInterface =\n new NetworkInterface(dispatcher, AGGREGATED_NW_ID);\n\n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (1) Delete All Flows.\");\n outMsg(\"//////////////////////////////////////////////////\");\n List<Response> rsps = originalNwInterface.deleteAllFlow(); \n for (Response rsp : rsps) {\n outMsg(\" -DELETE FLow. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n }\n wait(WAIT_TIME);\n\n rsps = aggregatedNwInterface.deleteAllFlow(); \n for (Response rsp : rsps) {\n outMsg(\" -DELETE FLow. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n }\n wait(WAIT_TIME);\n \n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (2) Delete Topology.\");\n outMsg(\"//////////////////////////////////////////////////\");\n rsps = originalNwInterface.deleteTopology();\n for (Response rsp : rsps) {\n outMsg(\" -PUT (empty)Topology (Delete Topology). \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n }\n wait(WAIT_TIME * 2);\n \n rsps = aggregatedNwInterface.deleteTopology();\n for (Response rsp : rsps) {\n outMsg(\" -PUT (empty)Topology (Delete Topology). \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n } \n wait(WAIT_TIME * 2);\n \n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (3) Delete Connections.\");\n outMsg(\"//////////////////////////////////////////////////\");\n Response rsp = systemMngInterface.delConnection(\"conn1\");\n outMsg(\" -DELETE Connection. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n rsp = systemMngInterface.delConnection(\"conn2\");\n outMsg(\" -DELETE Connection. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n\n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (4) Delete Components.\");\n outMsg(\"//////////////////////////////////////////////////\");\n rsp = systemMngInterface.delComponent(ORIGINAL_NW_ID);\n outMsg(\" -DELETE Component. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n rsp = systemMngInterface.delComponent(AGGREGATED_NW_ID);\n outMsg(\" -DELETE Component. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n \n rsp = systemMngInterface.delComponent(AGGREGATOR_ID);\n outMsg(\" -DELETE Component. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n dispatcher.close();\n System.exit(0);\n\n }", "public List<String> getServices() {\n return runtimeClient.getServices();\n }", "public void clear() {\n\t\tsystems.clear();\n\t}", "private void ausgebenSystem() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Rechner: \" + InetAddress.getLocalHost().getHostName());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println();\n\t\tString txt = System.getProperties().toString();\n\t\twhile (txt.indexOf(\",\") > 0) {\n\t\t\tSystem.out.println(txt.substring(0, txt.indexOf(\",\") + 1));\n\t\t\ttxt = txt.substring(txt.indexOf(\",\") + 2);\n\n\t\t}\n\t\tSystem.out.println(txt);\n\t}", "private void displayGattServices(List<BluetoothGattService> gattServices) {\n\t\tif (gattServices == null) return;\n\t\tfor (BluetoothGattService gattService : gattServices) {\n\n\t\t\tif (gattService.getUuid().toString().equals(\"0000ffb0-0000-1000-8000-00805f9b34fb\")) {\n\t\t\t\tList<BluetoothGattCharacteristic> gattCharacteristics = gattService.getCharacteristics();\n\t\t\t\tfor (BluetoothGattCharacteristic characteristic : gattCharacteristics) {\n\t\t\t\t\tif (characteristic.getUuid().toString().trim().equals(\"0000ffb2-0000-1000-8000-00805f9b34fb\")){\n\t\t\t\t\t\tmBluetoothLeService.setCharacteristicNotification(characteristic,true);\n\t\t\t\t\t\tmNotifyCharacteristic = characteristic;\n\t\t\t\t\t}\n\t\t\t\t\tif (characteristic.getUuid().toString().trim().equals(\"0000ffb2-0000-1000-8000-00805f9b34fb\")){\n\t\t\t\t\t\tmWriteCharacteristic=characteristic;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (gattService.getUuid().toString().equals(\"0000fff0-0000-1000-8000-00805f9b34fb\")) {\n\t\t\t\tList<BluetoothGattCharacteristic> gattCharacteristics = gattService.getCharacteristics();\n\t\t\t\tfor (BluetoothGattCharacteristic characteristic : gattCharacteristics) {\n\t\t\t\t\tif (characteristic.getUuid().toString().trim().equals(\"0000fff1-0000-1000-8000-00805f9b34fb\")){\n\t\t\t\t\t\tmBluetoothLeService.setCharacteristicNotification(characteristic,true);\n\t\t\t\t\t\tmNotifyCharacteristic = characteristic;\n\t\t\t\t\t}\n\t\t\t\t\tif (characteristic.getUuid().toString().trim().equals(\"0000fff2-0000-1000-8000-00805f9b34fb\")){\n\t\t\t\t\t\tmWriteCharacteristic=characteristic;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n//\t\tnew Thread(new TimeThread()).start();\n\t}", "void setSystem(java.lang.String system);", "public static UnitSystems GetUnitSystem(Units unit)\n {\n return MethodsCommon.GetSystemFromUnit(unit, false, true);\n }", "public List<String> getServices() throws IOException;", "private void formatSystem() {}", "List<SolrSystemDTO> showAllSolrSystems(UserDTO userDTO);", "public static void InitializeSystems()\n\t{\n\t\tif (_systems.size() < 1)\n\t\t{\n\t\t\tSystem.out.println(\"ERROR - no systems! (InitializeSystems)\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < _systems.size(); i++)\n\t\t\t_systems.get(i).Start();\n\t}", "public void discoverServices() {\n mNsdManager.discoverServices(\n SERVICE_TYPE, NsdManager.PROTOCOL_DNS_SD, mDiscoveryListener);\n }", "public Map listServices() throws IOException\n\t{\n\t\treturn request(GET, address(null, null));\n\t}", "private void displaySell()\r\n {\r\n\r\n System.out.println(\"To sell:\");\r\n for(HardwareDevice devices: hardwares)\r\n {\r\n\r\n devices.displayDescription();\r\n }\r\n }", "private Menu createServiceMenu() {\r\n\t\tMenu serviceMenu = new Menu(\"Service\");\r\n\r\n\t\tstartService = new MenuItem(\"Start\");\r\n\t\tstartService.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tlocalPeer.startService();\r\n\t\t\t}\r\n\t\t});\r\n\t\tserviceMenu.add(startService);\r\n\r\n\t\tstopService = new MenuItem(\"Stop\");\r\n\t\tstopService.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tlocalPeer.stopService();\r\n\t\t\t}\r\n\t\t});\r\n\t\tstopService.setEnabled(false);\r\n\t\tserviceMenu.add(stopService);\r\n\r\n\t\treturn serviceMenu;\r\n\t}", "void clearService();" ]
[ "0.69194597", "0.6271763", "0.62450486", "0.61138654", "0.5996561", "0.5897551", "0.58285666", "0.5793365", "0.5743296", "0.57384676", "0.5717861", "0.5665556", "0.56469184", "0.56351256", "0.55905247", "0.55905175", "0.55615723", "0.5546134", "0.5533331", "0.5527404", "0.55116105", "0.5502147", "0.5495912", "0.5492912", "0.5451333", "0.5447656", "0.54373443", "0.542439", "0.5420335", "0.5398941", "0.53972447", "0.53838176", "0.5383802", "0.5383487", "0.534812", "0.5334156", "0.53169906", "0.5296851", "0.52845234", "0.5270995", "0.52703255", "0.5255574", "0.5252984", "0.524547", "0.52442306", "0.52215797", "0.52188534", "0.52171665", "0.52059466", "0.52003837", "0.51958823", "0.51958823", "0.51883924", "0.5182501", "0.518058", "0.5178322", "0.51773286", "0.51759017", "0.5172105", "0.5170674", "0.51592577", "0.51587915", "0.5158606", "0.5156954", "0.513756", "0.51141006", "0.5109627", "0.5095875", "0.5094524", "0.50916094", "0.5090485", "0.50832933", "0.5082336", "0.5082336", "0.5081109", "0.5080606", "0.50752586", "0.5064829", "0.50553125", "0.50496423", "0.50487137", "0.50421226", "0.5035048", "0.50294346", "0.5026344", "0.50243014", "0.5019796", "0.5011117", "0.5010815", "0.5010791", "0.50035167", "0.5002095", "0.49987882", "0.4995717", "0.49913448", "0.49905244", "0.49854246", "0.49819347", "0.4981145", "0.4979261" ]
0.58411354
6
Create a new system
void createSolrSystem(SolrSystemDTO systemDTO, UserDTO userDTO);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "System createSystem();", "public void create() {\n\t\t\n\t}", "public void create(){}", "private SpaceSystemType addSpaceSystem(SpaceSystemType parentSystem,\n String systemName,\n String description,\n String fullPath,\n String classification,\n String validationStatus,\n String version) throws CCDDException\n {\n // Get the reference to the space system if it already exists\n SpaceSystemType childSystem = parentSystem == null ? null : getSpaceSystemByName(systemName, parentSystem);\n\n // Check if the space system doesn't already exist\n if (childSystem == null)\n {\n // Create the new space system, store its name, and set the flag to indicate a new\n // space system exists\n childSystem = factory.createSpaceSystemType();\n childSystem.setName(systemName);\n\n // Check if this is the root space system\n if (parentSystem == null)\n {\n // Set this space system as the root system\n project = factory.createSpaceSystem(childSystem);\n }\n // Not the root space system\n else\n {\n // Add the new space system as a child of the specified system\n parentSystem.getSpaceSystem().add(childSystem);\n }\n }\n\n // Check if a description is provided\n if (description != null && !description.isEmpty())\n {\n // Set the description attribute\n childSystem.setLongDescription(description);\n }\n\n // Check if the full table path is provided\n if (fullPath != null && !fullPath.isEmpty())\n {\n // Store the table name, with its full path, in the short description field. This is\n // used if the export file is used to import tables into a project\n childSystem.setShortDescription(fullPath);\n }\n\n // Set the new space system's header attributes\n addSpaceSystemHeader(childSystem,\n classification,\n validationStatus,\n version,\n (parentSystem == null ? new Date().toString() : null));\n\n return childSystem;\n }", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Chassis createChassis();", "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 createSShell() {\r\n\t\tGridData gridData = new GridData();\r\n\t\tgridData.widthHint = 500;\r\n\t\tgridData.horizontalAlignment = org.eclipse.swt.layout.GridData.CENTER;\r\n\t\tgridData.grabExcessHorizontalSpace = true;\r\n\t\tgridData.heightHint = 80;\r\n\t\tsShell = new Shell();\r\n\t\tsShell.setText(\"系统管理\");\r\n\t\tsShell.setSize(new Point(703, 656));\r\n\t\tsShell.setLayout(new GridLayout());\r\n\t\tcLabel = new CLabel(sShell, SWT.CENTER);\r\n\t\tcLabel.setImage(new Image(Display.getCurrent(), getClass().getResourceAsStream(\"/images/news.png\")));\r\n\t\tcLabel.setFont(new Font(Display.getDefault(), \"微软雅黑\", 18, SWT.NORMAL));\r\n\t\tcLabel.setLayoutData(gridData);\r\n\t\tcLabel.setText(\"系统管理\");\r\n\t\tcreateTabFolder();\r\n\t\tif(SystemMainShell.userType.equals(\"管理员\")){\r\n\t\t\tbuttonAddRoom.setEnabled(true);\r\n\t\t\tbuttonDeleteRoom.setEnabled(true);\r\n\t\t//\tbuttonAddGoods.setEnabled(true);\r\n\t\t//\tbuttonDeleteGoods.setEnabled(true);\r\n\t\t\tbuttonAddStaff.setEnabled(true);\r\n\t\t\tbuttonDeleteStaff.setEnabled(true);\r\n\t\t\tbuttonAddUser.setEnabled(true);\r\n\t\t\tbuttonDeleteUser.setEnabled(true);\r\n\t\t}else if(SystemMainShell.userType.equals(\"操作员\")){\r\n\t\t\tbuttonAddRoom.setEnabled(false);\r\n\t\t\tbuttonDeleteRoom.setEnabled(false);\r\n\t\t//\tbuttonAddGoods.setEnabled(false);\r\n\t\t//\tbuttonDeleteGoods.setEnabled(false);\r\n\t\t\tbuttonAddStaff.setEnabled(false);\r\n\t\t\tbuttonDeleteStaff.setEnabled(false);\r\n\t\t\tbuttonAddUser.setEnabled(false);\r\n\t\t\tbuttonDeleteUser.setEnabled(false);\r\n\t\t}\r\n\t}", "public NakedObjectsSystem createSystem(final DeploymentType deploymentType) {\r\n\r\n final NakedObjectsSystemUsingInstallers system = new NakedObjectsSystemUsingInstallers(deploymentType, installerLookup);\r\n\r\n system.lookupAndSetAuthenticatorAndAuthorization(deploymentType);\r\n system.lookupAndSetUserProfileFactoryInstaller();\r\n system.lookupAndSetFixturesInstaller();\r\n return system;\r\n }", "public void create(Environment environment);", "public System(String systemMake, String systemModel, int processorSpeed)\n\t{\n\t\tmake = systemMake;\n\t\tmodel = systemModel;\n\t\tspeed = processorSpeed;\n\t}", "public abstract void create();", "VM createVM();", "public int create(Esysmeudef menu);", "private void createWorkSpace() {\n\t\tif(promptForWorkSpaceName() != null){\n\t\t\tmyWorkSpaceListener.createWorkSpace(promptForWorkSpaceName());\n\t\t}\n\t}", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "@DISPID(1611005952) //= 0x60060000. The runtime will prefer the VTID if present\n @VTID(28)\n void newWithAxisSystem(\n boolean oAxisSystemCreated);", "@Create\n public void create()\n {\n \n log.debug(\"Creating users and mailboxes\");\n //MailboxService ms = MMJMXUtil.getMBean(\"meldware.mail:type=MailboxManager,name=MailboxManager\", MailboxService.class);\n AdminTool at = MMJMXUtil.getMBean(\"meldware.mail:type=MailServices,name=AdminTool\", AdminTool.class);\n \n for (MeldwareUser meldwareUser : getUsers())\n {\n at.createUser(meldwareUser.getUsername(), meldwareUser.getPassword(), meldwareUser.getRoles());\n // TODO This won't work on AS 4.2\n /*Mailbox mbox = ms.createMailbox(meldwareUser.getUsername());\n for (String alias : meldwareUser.getAliases())\n {\n ms.createAlias(mbox.getId(), alias);\n }*/\n log.debug(\"Created #0 #1 #2\", meldwareUser.isAdministrator() ? \"administrator\" : \"user\", meldwareUser.getUsername(), meldwareUser.getAliases() == null || meldwareUser.getAliases().size() == 0 ? \"\" : \"with aliases \" + meldwareUser.getAliases());\n }\n }", "@Override\n\tpublic void create() {\n\t\t\n\t}", "public System(String implClassName, Params param) {\n\t\tSimLogger.log(Level.INFO, \"New System Created.\");\n\t\tthis.param = param;\n\t\tthis.param.system = this;\n\t\ttry {\n\t\t\tClass implClass = Class.forName(implClassName);\n\t\t\timpl = (Implementation) implClass.newInstance();\n\t\t\t// Set the implementation's system so init() can set it in workload!!!\n\t\t\timpl.sys = this;\n\t\t\timpl.init(param.starter.build());\n\t\t\tSimLogger.log(Level.FINE, \"Implementation \" + implClassName + \" was created successfully.\");\n\n\t\t\ttry {\n\t\t\t\tfor(String s : param.measures) {\n\t\t\t\t\tSimLogger.log(Level.FINE, \"Adding measure \" + s + \" to system.\");\n\t\t\t\t\tClass measureClass = Class.forName(s);\n\t\t\t\t\tMeasure measure = (Measure) measureClass.newInstance();\n\t\t\t\t\tmeasures.add(measure);\n\t\t\t\t}\n\t\t\t\tCollections.sort(measures);\n\t\t\t} catch(ClassNotFoundException e) {\n\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot find measure class with name = \" + implClassName);\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} catch(InstantiationException e) {\n\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate measure class with name = \" + implClassName);\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} catch(IllegalAccessException e) {\n\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate measure class with name = \" + implClassName);\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\n\t\t\t//init actors\n\t\t\tHashMap<String, Integer> actorMachineInstances = param.starter.buildActorMachine();\n\t\t\tfor(String aType : actorMachineInstances.keySet()) {\n\t\t\t\tint numActors = actorMachineInstances.get(aType);\n\t\t\t\tSimLogger.log(Level.FINE, \"Creating \" + numActors + \" many of actor type \" + aType);\n\t\t\t\tfor(int i = 0; i < numActors; i++) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tClass actorClass = Class.forName(aType);\n\t\t\t\t\t\tActorMachine am = (ActorMachine) actorClass.newInstance();\n\t\t\t\t\t\tString actorName = am.getPrefix() + i;\n\t\t\t\t\t\tam.actor = actorName;\n\t\t\t\t\t\tam.actorType = aType;\n\t\t\t\t\t\tam.sys = this;\n\t\t\t\t\t\tactors.put(actorName, am);\n\t\t\t\t\t} catch(ClassNotFoundException e) {\n\t\t\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot find actor machine class with name = \" + implClassName);\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch(InstantiationException e) {\n\t\t\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate actor machine class with name = \" + implClassName);\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch(IllegalAccessException e) {\n\t\t\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate actor machine class with name = \" + implClassName);\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\tSimLogger.log(Level.FINE, \"Actors init was successful.\");\n\n\t\t} catch(ClassNotFoundException e) {\n\t\t\tSimLogger.log(Level.SEVERE, \"Cannot find implementation class with name = \" + implClassName);\n\t\t\te.printStackTrace();\n\t\t} catch(InstantiationException e) {\n\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate implementation class with name = \" + implClassName);\n\t\t\te.printStackTrace();\n\t\t} catch(IllegalAccessException e) {\n\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate implementation class with name = \" + implClassName);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void create() {\n\n\t}", "Make createMake();", "public void addNewSystemUser()\n {\n\n DietTreatmentSystemUserBO newUser = new DietTreatmentSystemUserBO();\n // default user\n newUser.setSystemUser(SystemUserController.getInstance()\n .getCurrentUser());\n // default function\n newUser.setFunction(SystemUserFunctionBO.TREATING_ASSISTANT);\n\n _dietTreatment.addSystemUsers(newUser);\n }", "private void initSystemPartition() throws Exception {\n // change the working directory to something that is unique\n // on the system and somewhere either under target directory\n // or somewhere in a temp area of the machine.\n\n // Inject the System Partition\n Partition systemPartition = factory.createPartition(service.getSchemaManager(),\n service.getDnFactory(),\n \"system\", ServerDNConstants.SYSTEM_DN, 500,\n new File(service.getInstanceLayout().getPartitionsDirectory(), \"system\"));\n systemPartition.setSchemaManager(service.getSchemaManager());\n\n factory.addIndex(systemPartition, SchemaConstants.OBJECT_CLASS_AT, 100);\n\n service.setSystemPartition(systemPartition);\n }", "@Override\n\tprotected void createShell() {\n\t\tString shellText = \"Add a New Pharmacy\";\n\t\tRectangle bounds = new Rectangle(25, 0, 800, 680);\n\t\tbuildShell(shellText, bounds);\n\t}", "Operacion createOperacion();", "static Algorithm createSystem(String sys, Config cfg) {\n switch (sys.toLowerCase()) {\n case \"shift\":\n return new CaesarCipher(cfg.getKey());\n case \"unicode\":\n return new UnicodeCipher(cfg.getKey());\n default:\n throw new IllegalArgumentException(String.format(\"Invalid algorithm %s\\n\", sys));\n }\n }", "@Override\n\tpublic void create () {\n\n\t}", "public static void main(String[] args)\n {\n Client oneClient;\n\n try\n {\n oneClient = new Client();\n\n // We will try to create a new virtual machine. The first thing we\n // need is an OpenNebula virtual machine template.\n\n // This VM template is a valid one, but it will probably fail to run\n // if we try to deploy it; the path for the image is unlikely to\n // exist.\n String vmTemplate =\n \"NAME = vm_from_java CPU = 0.1 MEMORY = 64\\n\"\n + \"#DISK = [\\n\"\n + \"#\\tsource = \\\"/home/user/vmachines/ttylinux/ttylinux.img\\\",\\n\"\n + \"#\\ttarget = \\\"hda\\\",\\n\"\n + \"#\\treadonly = \\\"no\\\" ]\\n\"\n + \"# NIC = [ NETWORK = \\\"Non existing network\\\" ]\\n\"\n + \"FEATURES = [ acpi=\\\"no\\\" ]\";\n\n // You can try to uncomment the NIC line, in that case OpenNebula\n // won't be able to insert this machine in the database.\n\n System.out.println(\"Virtual Machine Template:\\n\" + vmTemplate);\n System.out.println();\n\n System.out.print(\"Trying to allocate the virtual machine... \");\n OneResponse rc = VirtualMachine.allocate(oneClient, vmTemplate);\n\n if( rc.isError() )\n {\n System.out.println( \"failed!\");\n throw new Exception( rc.getErrorMessage() );\n }\n\n // The response message is the new VM's ID\n int newVMID = Integer.parseInt(rc.getMessage());\n System.out.println(\"ok, ID \" + newVMID + \".\");\n\n // We can create a representation for the new VM, using the returned\n // VM-ID\n VirtualMachine vm = new VirtualMachine(newVMID, oneClient);\n\n // Let's hold the VM, so the scheduler won't try to deploy it\n System.out.print(\"Trying to hold the new VM... \");\n rc = vm.hold();\n\n if(rc.isError())\n {\n System.out.println(\"failed!\");\n throw new Exception( rc.getErrorMessage() );\n }\n else\n System.out.println(\"ok.\");\n\n // And now we can request its information.\n rc = vm.info();\n\n if(rc.isError())\n throw new Exception( rc.getErrorMessage() );\n\n System.out.println();\n System.out.println(\n \"This is the information OpenNebula stores for the new VM:\");\n System.out.println(rc.getMessage() + \"\\n\");\n\n // This VirtualMachine object has some helpers, so we can access its\n // attributes easily (remember to load the data first using the info\n // method).\n System.out.println(\"The new VM \" +\n vm.getName() + \" has status: \" + vm.status());\n\n // And we can also use xpath expressions\n System.out.println(\"The path of the disk is\");\n System.out.println( \"\\t\" + vm.xpath(\"template/disk/source\") );\n\n // Let's delete the VirtualMachine object.\n vm = null;\n\n // The reference is lost, but we can ask OpenNebula about the VM\n // again. This time however, we are going to use the VM pool\n VirtualMachinePool vmPool = new VirtualMachinePool(oneClient);\n // Remember that we have to ask the pool to retrieve the information\n // from OpenNebula\n rc = vmPool.info();\n\n if(rc.isError())\n throw new Exception( rc.getErrorMessage() );\n\n System.out.println(\n \"\\nThese are all the Virtual Machines in the pool:\");\n for ( VirtualMachine vmachine : vmPool )\n {\n System.out.println(\"\\tID : \" + vmachine.getId() +\n \", Name : \" + vmachine.getName() );\n\n // Check if we have found the VM we are looking for\n if ( vmachine.getId().equals( \"\"+newVMID ) )\n {\n vm = vmachine;\n }\n }\n\n // We have also some useful helpers for the actions you can perform\n // on a virtual machine, like suspend:\n rc = vm.suspend();\n System.out.println(\"\\nTrying to suspend the VM \" + vm.getId() +\n \" (should fail)...\");\n\n // This is all the information you can get from the OneResponse:\n System.out.println(\"\\tOpenNebula response\");\n System.out.println(\"\\t Error: \" + rc.isError());\n System.out.println(\"\\t Msg: \" + rc.getMessage());\n System.out.println(\"\\t ErrMsg: \" + rc.getErrorMessage());\n\n rc = vm.terminate();\n System.out.println(\"\\nTrying to terminate the VM \" +\n vm.getId() + \"...\");\n\n System.out.println(\"\\tOpenNebula response\");\n System.out.println(\"\\t Error: \" + rc.isError());\n System.out.println(\"\\t Msg: \" + rc.getMessage());\n System.out.println(\"\\t ErrMsg: \" + rc.getErrorMessage());\n\n\n }\n catch (Exception e)\n {\n System.out.println(e.getMessage());\n }\n\n\n }", "private void createRoutine() {\n String s = (String) JOptionPane.showInputDialog(\n this,\n \"Name the new routine:\",\n \"Create new\",\n JOptionPane.PLAIN_MESSAGE,\n null, null, null);\n\n if (s != null) {\n Routine r = new Routine(s);\n collection.add(r);\n listModel.addElement(r);\n list.setSelectedValue(r, true);\n new WorkoutsFrame(r);\n }\n }", "public SystemInfo() {\r\n\t}", "void setSystem(java.lang.String system);", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "public void create() {\n String salt = PasswordUtils.getSalt(30);\n\n // Protect user's password. The generated value can be stored in DB.\n String mySecurePassword = PasswordUtils.generateSecurePassword(password, salt);\n\n // Print out protected password\n System.out.println(\"My secure password = \" + mySecurePassword);\n System.out.println(\"Salt value = \" + salt);\n Operator op = new Operator();\n op.setUsername(username);\n op.setDescription(description);\n op.setSalt(salt);\n op.setPassword(mySecurePassword);\n op.setRol(rol);\n operatorService.create(op);\n message = \"Se creo al usuario \" + username;\n username = \"\";\n description = \"\";\n password = \"\";\n rol = null;\n }", "Long crear(Espacio espacio);", "public void crearPrograma(Programa prog) throws Exception {\r\n\t\tEntityManager em = AdministradorEntityManager.getEntityManager();\t\t\r\n\t\tem.getTransaction().begin();\r\n\t\tem.persist(prog);\r\n\t\tem.getTransaction().commit();\t\t\r\n\t}", "public void createSystemUser(String nam, String surnam, String id, String username, String password) {\n\t\ttry {\n\t\t\trestaurant.addUser(nam, surnam, id, username, password);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public Systems() {\r\n\t\t__initializeSystems = new ArrayList<InitializeSystem>();\r\n\t\t__executeSystems = new ArrayList<ExecuteSystem>();\r\n\t\t__renderSystems = new ArrayList<RenderSystem>();\r\n\t\t__tearDownSystems = new ArrayList<TearDownSystem>();\r\n\t}", "public void newTask() {\r\n\r\n todoTaskGui(\"Create\", null);\r\n }", "WithCreate withOsType(OperatingSystemTypes osType);", "@TaskAction\n public void create() {\n dir.mkdirs();\n getChmod().chmod(dir, dirMode);\n }", "@Override\r\n\tpublic void create() {\n\r\n\t}", "Program createProgram();", "Program createProgram();", "Program createProgram();", "Process createProcess();", "public FMISComLocal create() throws javax.ejb.CreateException;", "@Override\n protected void createLocationCLI() {\n /*The rooms in the hallway01 location are created---------------------*/\n \n /*Hallway-------------------------------------------------------------*/\n Room hallway = new Room(\"Hallway 01\", \"This hallway connects the Personal, Laser and Net\");\n super.addRoom(hallway);\n }", "@DISPID(1001) //= 0x3e9. The runtime will prefer the VTID if present\r\n @VTID(8)\r\n int creator();", "@DISPID(1001) //= 0x3e9. The runtime will prefer the VTID if present\r\n @VTID(8)\r\n int creator();", "SystemParamModel createSystemParamModel();", "public PnuematicSubsystem() {\n\n }", "@Override\n\tpublic void create() {\n\t\tAssets.load();\n\t\t\n\t\t//creo pantallas y cargo por defecto menuPrincipal\n\t\tscreenJuego = new JuegoScreen(this);\n\t\tmenuPrincipal = new MenuPrincipal(this);\n\t\tsetScreen(menuPrincipal);\n\t}", "public void criar() throws IOException {\nif (!directorio.exists()) {\n directorio.mkdir();\n System.out.println(\"Directorio criado\");\n } else {\n System.out.println(\"Directorio existe\");\n }\n if (!fileAdmin.exists()) {\n fileAdmin.createNewFile();\n System.out.println(\"file de Administrador criado com sucesso\");\n escrever(lista);\n } else {\n System.out.println(\"ficheiro existe\");\n }\n\n }", "public void mkdir(String path) throws SystemException;", "Swarm createSwarm();", "public Arguments create() throws IOException {\r\n Arguments args = new Arguments();\r\n ArrayList vmArgs = new ArrayList();\r\n \r\n // Start empty framework\r\n if (clean) {\r\n // Remove bundle directories\r\n File[] children = workDir.listFiles();\r\n for (int i=0; i<children.length; i++) {\r\n if (children[i].isDirectory() && children[i].getName().startsWith(\"bundle\")) {\r\n deleteDir(children[i]);\r\n }\r\n }\r\n }\r\n \r\n // Create system properties file\r\n File systemPropertiesFile = new File(workDir, \"system.properties\");\r\n Path path = new Path(systemPropertiesFile.getAbsolutePath());\r\n vmArgs.add(\"-Doscar.system.properties=\"+path.toString());\r\n \r\n // Set bundle cache dir\r\n writeProperty(systemPropertiesFile, PROPERTY_CACHE_DIR, new Path(workDir.getAbsolutePath()).toString(), false);\r\n \r\n // Set start level\r\n writeProperty(systemPropertiesFile, PROPERTY_STARTLEVEL, Integer.toString(startLevel), true);\r\n \r\n // System properties\r\n if (systemProperties != null) {\r\n for(Iterator i=systemProperties.entrySet().iterator();i.hasNext();) {\r\n Map.Entry entry = (Map.Entry) i.next();\r\n writeProperty(systemPropertiesFile, (String) entry.getKey(), (String) entry.getValue(), true);\r\n }\r\n }\r\n\r\n // Add bundle\r\n StringBuffer autoStart = new StringBuffer(\"\");\r\n StringBuffer autoInstall = new StringBuffer(\"\");\r\n for (Iterator i=bundles.entrySet().iterator();i.hasNext();) {\r\n Map.Entry entry = (Map.Entry) i.next();\r\n Integer level = (Integer) entry.getKey();\r\n \r\n // Add bundle install entries for this start level\r\n ArrayList l = (ArrayList) entry.getValue();\r\n autoStart.setLength(0);\r\n autoInstall.setLength(0);\r\n for (Iterator j = l.iterator() ; j.hasNext() ;) {\r\n BundleElement e = (BundleElement) j.next();\r\n if (e.getLaunchInfo().getMode() == BundleLaunchInfo.MODE_START) {\r\n if (autoStart.length()>0) {\r\n autoStart.append(\" \");\r\n }\r\n autoStart.append(\"file:\");\r\n autoStart.append(new Path(e.getBundle().getPath()).toString());\r\n } else {\r\n if (autoInstall.length()>0) {\r\n autoInstall.append(\" \");\r\n }\r\n autoInstall.append(\"file:\");\r\n autoInstall.append(new Path(e.getBundle().getPath()).toString());\r\n }\r\n }\r\n if (autoInstall.length()>0) {\r\n writeProperty(systemPropertiesFile, PROPERTY_AUTO_INSTALL+level, autoInstall.toString(), true);\r\n }\r\n if (autoStart.length()>0) {\r\n writeProperty(systemPropertiesFile, PROPERTY_AUTO_START+level, autoStart.toString(), true);\r\n }\r\n }\r\n \r\n args.setVMArguments((String[]) vmArgs.toArray(new String[vmArgs.size()]));\r\n return args;\r\n }", "public IGenScheduleHandler create() throws CreateException, RemoteException;", "public void CreateProgram(int id, String name, String title, String description) throws SQLException {\n\t\ttry {\n\t\t\tString query = \"INSERT INTO program VALUES ('\" + id + \"', '\" + description + \"', '\" + name + \"', '\" + title + \"')\";\n\t\t\tstatement.execute(query); \n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (conex != null) {\n\t\t\t\tconex.close();\n\t\t\t}\n\t\t}\n\t}", "Device createDevice();", "@Override\n\tpublic String createNode(String type,String name,String time,String loca,String phone, String desc,String axisId ) {\n\t\tNode node = new Node(type, name, time, loca, phone, desc, axisId);\n\t\thibernatedao.insert(null, node);\n\t\treturn node.getId();\n\t}", "public co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.soltec\n\t\t.datos_publicacion\n\t\t.ejb\n\t\t.sb\n\t\t.DatosPublicacionSTLocal create()\n\t\tthrows javax.ejb.CreateException;", "SUP createSUP();", "public System() {\n\t\tsuper();\n\t\tthis.profiles = new HashSet<Profile>();\n\t}", "public void setSystem(String value) {\r\n this.system = value;\r\n }", "private SystemInfo() {\n }", "abstract public Core createCore(String configPath, String factoryConfigPath, Object systemContext);", "OperacionColeccion createOperacionColeccion();", "Environment createEnvironment();", "Environment createEnvironment();", "public void createTask() {\n \tSystem.out.println(\"Inside createTask()\");\n \tTask task = Helper.inputTask(\"Please enter task details\");\n \t\n \ttoDoList.add(task);\n \tSystem.out.println(toDoList);\n }", "@RequestMapping(value = \"/gradeSystems\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<GradeSystem> createGradeSystem(@RequestBody GradeSystem gradeSystem) throws URISyntaxException {\n log.debug(\"REST request to save GradeSystem : {}\", gradeSystem);\n if (gradeSystem.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"gradeSystem\", \"idexists\", \"A new gradeSystem cannot already have an ID\")).body(null);\n }\n GradeSystem result = gradeSystemRepository.save(gradeSystem);\n return ResponseEntity.created(new URI(\"/api/gradeSystems/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"gradeSystem\", result.getId().toString()))\n .body(result);\n }", "public void setSystemId(String systemId);", "public void _createInstance() {\n requiredMethod(\"getAvailableServiceNames()\");\n\n if (services.length == 0) {\n services = (String[]) tEnv.getObjRelation(\"XMSF.serviceNames\");\n\n if (services == null) {\n log.println(\"No service to create.\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n }\n\n String needArgs = (String) tEnv.getObjRelation(\"needArgs\");\n\n if (needArgs != null) {\n log.println(\"The \" + needArgs + \n \" doesn't support createInstance without arguments\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n\n boolean res = true; \n\n for (int k = 0; k < services.length; k++) {\n try {\n log.println(\"Creating Instance: \" + services[k]);\n\n Object Inst = oObj.createInstance(services[k]);\n res = (Inst != null);\n } catch (com.sun.star.uno.Exception ex) {\n log.println(\"Exception occurred during createInstance()\");\n ex.printStackTrace(log);\n res = false;\n }\n }\n\n tRes.tested(\"createInstance()\", res);\n }", "private EntityManager initSystems() {\n CameraSystem cameraSystem = new CameraSystem(Constants.WINDOW_WIDTH, Constants.WINDOW_HEIGHT);\n addSystem(cameraSystem);\n addSystem(new ZoomSystem());\n //Physics System\n addSystem(new PhysicsSystem());\n //Player movement system\n addSystem(new PlayerMovementSystem());\n\n addSystem(new CannonFiringSystem());\n addSystem(new CollisionSystem());\n addSystem(new KillSystem());\n addSystem(new HealthSystem());\n addSystem(new StatisticSystem());\n addSystem(new EnemySpawningSystem());\n addSystem(new InventorySystem());\n addSystem(new CurrencySystem());\n\n GUISystem guiSystem = new GUISystem();\n InputSystem inputSystem = new InputSystem(guiSystem);\n\n //Input System\n addSystem(inputSystem);\n //Entity Render System\n addSystem(new EntityRenderSystem());\n //Particle System\n addSystem(new ParticleSystem());\n addSystem(new PlayerActionSystem(guiSystem));\n addSystem(new MapRenderSystem());\n addSystem(new HUDSystem());\n //Debug Render System\n addSystem(new DebugRendererSystem());\n //GUI System\n addSystem(guiSystem);\n\n return this;\n }", "public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n SystemTopicInner createOrUpdate(String resourceGroupName, String systemTopicName, SystemTopicInner systemTopicInfo);", "public void instantiate(String managedSystemURI, ObjRef xArchRef, int engineType) throws InvalidArchitectureDescriptionException{\n\t\tSecureManagedSystem managedSystem = new SecureManagedSystem(managedSystemURI, xarch, engineType);\n\t\tmanagedSystem.addMessageListener(\n\t\t\tnew MessageListener(){\n\t\t\t\tpublic void messageSent(Message m){\n\t\t\t\t\tsendToAll(m, bottomIface);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t\tmanagedSystem.bind(xArchRef);\n\t\tmanagedSystem.startSystem();\n\t\tmanagedSystems.put(managedSystemURI, managedSystem);\n\t\t//managedSystem.createInstanceModel(\"Instance00\");\n\n\t\tSet bindIssues = new HashSet();\n\t\tSet\tinsecureBrickRefs = managedSystem.getInsecureBrickRefs();\n\t\tSet insecureLinkRefs = managedSystem.getInsecureLinkRefs();\n\t\tSet rejectedLinkRefs = managedSystem.getRejectedLinkRefs();\n\t\tfor (Iterator i = insecureBrickRefs.iterator(); i.hasNext(); ) {\n\t\t\tObjRef\tb = (ObjRef)i.next();\n\t\t\tTronElementIdentifier\ttei = new TronElementIdentifier(b, null);\n\t\t\tTronIssue ti = new TronIssue(\"Security\", xArchRef, \"SecureManagedSystem\", TronIssue.SEVERITY_ERROR,\n\t\t\t\t\t\"Insecure brick: \" + XadlUtils.getID(xarch, b), \"Cannot instantiate bricks\", null, new TronElementIdentifier[]{tei});\n\t\t\tbindIssues.add(ti);\n\t\t}\n\t\tfor (Iterator i = insecureLinkRefs.iterator(); i.hasNext(); ) {\n\t\t\tObjRef\tl = (ObjRef)i.next();\n\t\t\tTronElementIdentifier\ttei = new TronElementIdentifier(l, null);\n\t\t\tTronIssue ti = new TronIssue(\"Security\", xArchRef, \"SecureManagedSystem\", TronIssue.SEVERITY_ERROR,\n\t\t\t\t\t\"Link to insecure brick: \" + XadlUtils.getID(xarch, l), \"Cannot weld insecure bricks\", null, new TronElementIdentifier[]{tei});\n\t\t\tbindIssues.add(ti);\n\t\t}\n\t\tfor (Iterator i = rejectedLinkRefs.iterator(); i.hasNext(); ) {\n\t\t\tObjRef\tl = (ObjRef)i.next();\n\t\t\tTronElementIdentifier\ttei = new TronElementIdentifier(l, null);\n\t\t\tTronIssue ti = new TronIssue(\"Security\", xArchRef, \"SecureManagedSystem\", TronIssue.SEVERITY_ERROR,\n\t\t\t\t\t\"Rejected link: \" + XadlUtils.getID(xarch, l), \"Cannot add insecure weld\", null, new TronElementIdentifier[]{tei});\n\t\t\tbindIssues.add(ti);\n\t\t}\n\t\tTronTestResultMessage ttrm = new TronTestResultMessage(\n\t\t\tnull, xArchRef, (TronIssue[])bindIssues.toArray(new TronIssue[0]));\n\t\tsendToAll(ttrm, topIface);\n\t}", "public void createMenu() {\n deleteMenuGroupError = false;\n createMenuGroupError = true;\n if (menu.createMenu()) {\n updateMenuError = false;\n deleteMenuError = false;\n createMenuError = true;\n } else {\n createMenuError = false;\n }\n }", "public void instantiateCommand() throws SystemException {\r\n\t\t// Check the definitation.\r\n\t\tdefinitionCheck();\r\n\t\t\r\n\t\t// Create the fresh instance.\r\n\t\tcommandInstance = new ReadWriteableAttributes();\r\n\t}", "public SystemNode(SystemInfo sys) {\n\t\tsuper(sys);\n\t}", "TypeSystemDefinition createTypeSystemDefinition();", "org.hyperflex.roscomponentmodel.System getSystem();", "@Override\n\tpublic int create(Semester sem) {\n\t\treturn 0;\n\t}", "Cloud createCloud();", "Architecture createArchitecture();", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "public Systems add(System system) {\r\n\t\tif (system != null) {\r\n\t\t\tif (system instanceof InitializeSystem) {\r\n\t\t\t\t__initializeSystems.add((InitializeSystem) system);\r\n\t\t\t}\r\n\t\t\tif (system instanceof ExecuteSystem) {\r\n\t\t\t\t__executeSystems.add((ExecuteSystem) system);\r\n\t\t\t}\r\n\t\t\tif (system instanceof RenderSystem) {\r\n\t\t\t\t__renderSystems.add((RenderSystem) system);\r\n\t\t\t}\r\n\t\t\tif (system instanceof TearDownSystem) {\r\n\t\t\t\t__tearDownSystems.add((TearDownSystem) system);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this;\r\n\t}", "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 }", "@Override\n\tpublic void create () {\n\t\tgempiresAssetHandler = new GempiresAssetHandler(this);\n\t\tbatch = new SpriteBatch();\n\t\tcastle = new CastleScreen(this);\n\t\tsetScreen(new MainMenuScreen(this));\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n SystemTopicInner createOrUpdate(\n String resourceGroupName, String systemTopicName, SystemTopicInner systemTopicInfo, Context context);", "@Override\r\n\t\tpublic void create() {\n\t\t\tsuper.create();\r\n\t\t\tsuper.getOKButton().setEnabled(false);\r\n\t\t\tsuper.setTitle(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t\tsuper.setMessage(Messages.MoveUnitsWizardPage1_Select_a_name_source_folder_and_a_);\r\n\t\t\tsuper.getShell().setText(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t}", "public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}", "public static void main(String[] args) {\n\n Create createList = new Create();\n createList.create();\n\n }", "public String createAgent(String type, String name, List args){\n \t\tPlatformController container = getContainerController();\t\t\t\t\n \n \t\tArgument[] args1 = new Argument[0];\n Argument[] args2 = new Argument[0];\n \n \t\tif (agentTypes.get(type).getOptions() != null){\n \t\t\targs1 = agentTypes.get(type).getOptions();\n \t\t}\n \t\t\n \t\tif (args != null){\n args2=new Argument[args.size()];\n for (int i=0;i<args.size();i++)\n {\n args2[i]=(Argument)args.get(i);\n }\n \t\t}\n \t\t\n \t\tint size = args1.length + args2.length;\n \t\tArgument[] Args = new Argument[size];\n System.arraycopy(args1,0,Args,0,args1.length);\n System.arraycopy(args2,0,Args,args1.length,args2.length);\n \t\tString nameToGenerate=name = generateName(name);\n \t\t\ttry {\n String agentType=agentTypes.get(type).getTypeName();\n if (agentType==null){\n agentType=type;\n }\n \t\t\t\tAgentController agent = container.createNewAgent(name, agentType, Args);\n \t\t\t\tagent.start();\n \t\t\t} catch (ControllerException e) {\n \t\t\t\t e.printStackTrace();\n }\n \t\t// provide agent time to register with DF etc.\n \t\tdoWait(300);\n \t\treturn nameToGenerate;\n \t}", "public SingleSystem(MaltipsSystem maltipsSystem) {\n this.maltipsSystem = maltipsSystem;\n }", "public abstract void createVMByISO(String vmUuid, String isoUuid,\r\n\t\t\tString srUuid, String name, int cpu, int memory, int volumeSize,\r\n\t\t\tString poolUuid, int userId);", "private void createContents() {\r\n\t\tshlOProgramie = new Shell(getParent().getDisplay(), SWT.DIALOG_TRIM\r\n\t\t\t\t| SWT.RESIZE);\r\n\t\tshlOProgramie.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tshlOProgramie.setText(\"O programie\");\r\n\t\tshlOProgramie.setSize(386, 221);\r\n\t\tint x = 386;\r\n\t\tint y = 221;\r\n\t\t// Get the resolution\r\n\t\tRectangle pDisplayBounds = shlOProgramie.getDisplay().getBounds();\r\n\r\n\t\t// This formulae calculate the shell's Left ant Top\r\n\t\tint nLeft = (pDisplayBounds.width - x) / 2;\r\n\t\tint nTop = (pDisplayBounds.height - y) / 2;\r\n\r\n\t\t// Set shell bounds,\r\n\t\tshlOProgramie.setBounds(nLeft, nTop, x, y);\r\n\t\tsetText(\"O programie\");\r\n\r\n\t\tbtnZamknij = new Button(shlOProgramie, SWT.PUSH | SWT.BORDER_SOLID);\r\n\t\tbtnZamknij.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\tshlOProgramie.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnZamknij.setBounds(298, 164, 68, 23);\r\n\t\tbtnZamknij.setText(\"Zamknij\");\r\n\r\n\t\tText link = new Text(shlOProgramie, SWT.READ_ONLY);\r\n\t\tlink.setBackground(SWTResourceManager.getColor(230, 230, 250));\r\n\t\tlink.setBounds(121, 127, 178, 13);\r\n\t\tlink.setText(\"Kontakt: [email protected]\");\r\n\r\n\t\tCLabel lblNewLabel = new CLabel(shlOProgramie, SWT.BORDER\r\n\t\t\t\t| SWT.SHADOW_IN | SWT.SHADOW_OUT | SWT.SHADOW_NONE);\r\n\t\tlblNewLabel.setBackground(SWTResourceManager.getColor(230, 230, 250));\r\n\t\tlblNewLabel.setBounds(118, 20, 248, 138);\r\n\t\tlblNewLabel\r\n\t\t\t\t.setText(\" Kalkulator walut ver 0.0.2 \\r\\n -------------------------------\\r\\n Program umo\\u017Cliwiaj\\u0105cy pobieranie\\r\\n aktualnych kurs\\u00F3w walut ze strony nbp.pl\\r\\n\\r\\n Copyright by Wojciech Trocki.\\r\\n\");\r\n\r\n\t\tLabel lblNewLabel_1 = new Label(shlOProgramie, SWT.NONE);\r\n\t\tlblNewLabel_1.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tlblNewLabel_1.setImage(SWTResourceManager.getImage(\"images/about.gif\"));\r\n\t\tlblNewLabel_1.setBounds(10, 20, 100, 138);\r\n\t}", "Stone create();", "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 static void creator(Website websiteInfo){\n //creates folder using info on current directory\n File newFolder = new File(websiteInfo.currentPath);\n boolean websiteTest = newFolder.mkdir();\n\n if(websiteTest){\n System.out.println(\"Created ./website/\"+ websiteInfo.name);\n htmlFile(websiteInfo);\n createCSSJava(websiteInfo);\n }else{\n System.out.println(\"Could not create website\");\n }\n }" ]
[ "0.74678063", "0.65493375", "0.6490503", "0.63337064", "0.61083347", "0.6067174", "0.59934324", "0.599323", "0.5959604", "0.59333163", "0.5932558", "0.5906357", "0.5874489", "0.5848288", "0.58294034", "0.58211946", "0.5818937", "0.578099", "0.5765641", "0.5763751", "0.5745102", "0.57259905", "0.5722404", "0.57221204", "0.57083553", "0.5698466", "0.5690275", "0.56891143", "0.5658236", "0.5643295", "0.56240386", "0.56128013", "0.55975866", "0.55883276", "0.5582081", "0.5577191", "0.5574344", "0.5562065", "0.55323917", "0.5532282", "0.5531282", "0.5530573", "0.5530573", "0.5530573", "0.55192405", "0.5519232", "0.55119836", "0.5481851", "0.5481851", "0.54800117", "0.5466862", "0.54336756", "0.5433196", "0.54241073", "0.5423268", "0.5410895", "0.5409677", "0.5396796", "0.53946877", "0.53878164", "0.5349908", "0.5346553", "0.5346531", "0.5342561", "0.5340795", "0.53392804", "0.5334912", "0.53300786", "0.53300786", "0.5326186", "0.53231037", "0.53132975", "0.5312869", "0.53039783", "0.5297587", "0.52941394", "0.52898115", "0.52875006", "0.52843475", "0.5279096", "0.5267944", "0.5264701", "0.52612096", "0.5254578", "0.52518487", "0.52451414", "0.5239686", "0.52384853", "0.52240825", "0.52153856", "0.5213019", "0.52063847", "0.52016884", "0.5193725", "0.5193122", "0.51909363", "0.51826227", "0.5179072", "0.5174842", "0.5168824" ]
0.5938055
9
Update a selected system
void updateSolrSystem(SolrSystemDTO systemDTO, UserDTO userDTO);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void update() {\r\n for (SGSystem sys : systems.toArray(new SGSystem[0])) {\r\n sys.update();\r\n }\r\n }", "Software update( Software s );", "public abstract void updateSystem(Set<Integer> selectedDatasetIds);", "void setSystem(java.lang.String system);", "public void setSystem(String value) {\r\n this.system = value;\r\n }", "@PUT\n\t@Path(\"/\") \n\t@Consumes(MediaType.APPLICATION_JSON) \n\t@Produces(MediaType.TEXT_PLAIN) \n\tpublic String updatesystem_editor(String systData) \n\t{\n\t\tJsonObject itemObject = new JsonParser().parse(systData).getAsJsonObject(); \n\t\t\n\t\t//Read the values from the JSON object\n\t\tString sid = itemObject.get(\"sid\").getAsString(); \n\t\tString username = itemObject.get(\"username\").getAsString(); \n\t\tString email = itemObject.get(\"email\").getAsString(); \n\t\tString password = itemObject.get(\"password\").getAsString(); \n\t\t\n\t\tString output = sysObj.updatesystem_editor(sid, username, email,password);\n\t\t\n\t\treturn output; \n\t}", "private void updateSystemObjectsName(OpProjectSession session, OpBroker broker) {\r\n OpUser admin = session.administrator(broker);\r\n admin.setDisplayName(OpUser.ADMINISTRATOR_DISPLAY_NAME);\r\n admin.setDescription(OpUser.ADMINISTRATOR_DESCRIPTION);\r\n OpGroup every = session.everyone(broker);\r\n every.setDisplayName(OpGroup.EVERYONE_DISPLAY_NAME);\r\n every.setDescription(OpGroup.EVERYONE_DESCRIPTION);\r\n broker.updateObject(admin);\r\n broker.updateObject(every);\r\n }", "public void update() {\n System.out.print(\"What do you want to update? A person, address, house, reunion, \" +\n \"or relationship? \");\n Scanner scan = new Scanner(System.in);\n String toUpdate = scan.nextLine();\n if (toUpdate.equalsIgnoreCase(\"person\")) {\n updatePerson();\n }\n else if (toUpdate.equalsIgnoreCase(\"address\")) {\n updateAddress();\n }\n else if (toUpdate.equalsIgnoreCase(\"house\")) {\n updateHouse();\n }\n else if (toUpdate.equalsIgnoreCase(\"reunion\")) {\n // show all reunions\n this.updateReunion();\n }\n else if (toUpdate.equalsIgnoreCase(\"relationship\")) {\n // show all reunions\n this.updateRelationship();\n }\n }", "public void update() {\n manager.update();\n }", "public void setSystemId(String systemId);", "public void UpdateStatus(SystemMessage systemMessage) {\n ContentValues cv = new ContentValues();\n cv.put(\"status\", 1);\n db.update(\"sys_message\", cv, \"_id = ?\",\n new String[] { systemMessage.get_id()+\"\" });\n }", "public void setSystem(byte system) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 4, system);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 4, system);\n\t\t}\n\t}", "public void updateManager();", "public void update(Site site);", "public void updateSystemContext(String contextname) {\n this.jdbcTemplate\n .update(\" update functionalmodeldatafield set deleteflag = true where functionalmodelid in (select functionalmodelid from functionalmodel where systemcontextid in \"\n + \" (select systemcontextid from systemcontext where name = '\"\n + contextname + \"'\" + \"))\");\n\n this.jdbcTemplate\n .update(\" update functionalmodel set deleteflag = true where systemcontextid in (select systemcontextid from systemcontext where name = '\"\n + contextname + \"')\");\n\n this.jdbcTemplate\n .update(\" update functionalsubprocess set deleteflag = true where version = 0 and functionalprocessid in (select functionalprocessid from functionalprocess where systemcontextid in \"\n + \" (select systemcontextid from systemcontext where name = '\"\n + contextname + \"'\" + \"))\");\n\n this.jdbcTemplate\n .update(\" update functionalprocess set deleteflag = true where systemcontextid in (select systemcontextid from systemcontext where name = '\"\n + contextname + \"')\");\n\n this.jdbcTemplate\n .update(\" update datafield set deleteflag = true where version = 0 and datagroupid in (select datagroupid from datagroup where systemcontextid in \"\n + \" (select systemcontextid from systemcontext where name = '\"\n + contextname + \"'\" + \"))\");\n\n this.jdbcTemplate\n .update(\" update datagroup set deleteflag = true where systemcontextid in (select systemcontextid from systemcontext where name = '\"\n + contextname + \"')\");\n\n this.jdbcTemplate\n .update(\" update systemcontext set deleteflag = true where name = '\"\n + contextname + \"'\");\n }", "public void setSystemId( String systemId ) { this.systemId = systemId; }", "Update withOsType(OperatingSystemTypes osType);", "public static system_settings update(nitro_service client, system_settings resource) throws Exception\r\n\t{\r\n\t\tresource.validate(\"modify\");\r\n\t\treturn ((system_settings[]) resource.update_resource(client))[0];\r\n\t}", "@Override\n\t\tpublic void update(Metodologia metodologia,String name) {\n\t\t\t\n\t\t}", "@RequestMapping(value = \"/gradeSystems\",\n method = RequestMethod.PUT,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<GradeSystem> updateGradeSystem(@RequestBody GradeSystem gradeSystem) throws URISyntaxException {\n log.debug(\"REST request to update GradeSystem : {}\", gradeSystem);\n if (gradeSystem.getId() == null) {\n return createGradeSystem(gradeSystem);\n }\n GradeSystem result = gradeSystemRepository.save(gradeSystem);\n return ResponseEntity.ok()\n .headers(HeaderUtil.createEntityUpdateAlert(\"gradeSystem\", gradeSystem.getId().toString()))\n .body(result);\n }", "public boolean update(ConProcess conProcess) throws AppException;", "public void setSystemId(int val) {\n systemId = val;\n }", "public void update() {\n // gear shift\n gear = simConnection.stringValueOf(gearid, \"P\");\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n SystemTopicInner update(\n String resourceGroupName, String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters);", "@ServiceMethod(returns = ReturnType.SINGLE)\n SystemTopicInner update(\n String resourceGroupName,\n String systemTopicName,\n SystemTopicUpdateParameters systemTopicUpdateParameters,\n Context context);", "public void update(SessionFactory factory, EihApps input) {\n\n\t}", "public void update(String name) {\n\n\t}", "public void update(int updateType);", "public void update() {\r\n\t\tScanner sc = new Scanner(System.in); // maybe can implement a while loop\r\n\t\tSystem.out.println(\"What would you like to update?\");\r\n\t\tSystem.out.println(\"1. Description 2. name 3. price 4. add items to Package 5. delete items from package\");\r\n\t\tint choice = sc.nextInt();\r\n\t\tsc.nextLine();\r\n\t\tswitch(choice){\r\n\t\t\tcase 1:\r\n\t\t\tSystem.out.println(\"What is the new description?\");\r\n\t\t\tthis.description = sc.nextLine();\r\n\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\tSystem.out.println(\"What is the new name?\");\r\n\t\t\tthis.name = sc.nextLine();\r\n\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\tSystem.out.println(\"What is the new price?\");\r\n\t\t\tthis.price = sc.nextDouble();\r\n\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\taddPromoItem();\r\n\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\tif (this.promo.isEmpty()){\r\n\t\t\t\tSystem.out.println(\"error\"); \r\n\t\t\t\treturn;\r\n\t\t\t} \r\n\t\t\tthis.print();\r\n\t\t\tSystem.out.println(\"Which item would you like to delete?\");\r\n\t\t\tint promoIndex = sc.nextInt();\r\n\t\t\tsc.nextLine();\r\n\t\t\tthis.promo.remove(promoIndex - 1); //delete the index - 1 promoItem from promoPackage\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tSystem.out.println(\"Promo Set Package updated, printing updated item...\");\r\n\t\tthis.print();\r\n\t}", "public void updateStoredServices() {\n\t\ttableModelStoredServices.setData(((PswGenCtl) ctl).getServices().getServices());\n\t}", "void updateInformation();", "public ResponseEntity<?> editSystem(SongSystemDTO system) {\n\t\t// make sure there is a SystemEntity in the db\n\t\tinitializeSystemIfNull();\n\t\t// get the SystemEntity\n\t\tPlaylistMetadataEntity se = systemRepo.findAll().get(0);\n\n\t\t// error message\n\t\tString error = null;\n\n\t\tSystem.out.println(system.getPositionInPlaylist());\n\t\t// the following chained if/elses will edit the systementity\n\t\t// if one of the input is invalid, the response will be a 400\n\n\t\tTrackEntity te = trackRepo.findByPosition(system.getPositionInPlaylist());\n\t\tif (system.getSecondsPlayed() != null && system.getSecondsPlayed() >= 0\n\t\t\t\t&& system.getSecondsPlayed() < te.getLengthSeconds()) {\n\t\t\tse.setSecondsPlayed(system.getSecondsPlayed());\n\t\t} else {\n\t\t\terror = ms.getMessage(\"runtimePositive\", null, LocaleContextHolder.getLocale());\n\n\t\t}\n\t\tif (system.getPositionInPlaylist() >= 0\n\t\t\t\t&& system.getPositionInPlaylist() < trackRepo.count()) {\n\t\t\tse.setPositionInPlaylist(system.getPositionInPlaylist());\n\n\t\t\t// if the song was changed, we restart at 0\n\t\t\tse.setSecondsPlayed(0);\n\t\t} else {\n\t\t\tif (error == null) {\n\t\t\t\terror = ms.getMessage(\"playlistPositionPositive\", null, LocaleContextHolder.getLocale());\n\t\t\t} else {\n\t\t\t\terror += \"; \" + ms.getMessage(\"playlistPositionPositive\", null, LocaleContextHolder.getLocale());\n\t\t\t}\n\t\t}\n\n\t\tif (error != null)\n\t\t\treturn new ResponseEntity<>(error, HttpStatus.BAD_REQUEST);\n\n\t\t// if no error was found, save the entity\n\n\t\tsystemRepo.save(se);\n\t\treturn new ResponseEntity<>(HttpStatus.OK);\n\t}", "public int updateSetting(UserInfo userInfo, Object obj) {\n\t\tif (SystemIdEnums.AUTHOR_SYS.getCode().equals(userInfo.getSystemId())) {\n\t\t\tAuthorInfo authorInfo = (AuthorInfo)obj;\n\t\t\tauthorInfoManager.saveAuthorInfo(authorInfo);\n\t\t} else if (SystemIdEnums.EXPERT_SYS.getCode().equals(userInfo.getSystemId())) {\n\t\t\tExpertInfo expertInfo = (ExpertInfo)obj;\n\t\t\texpertInfoManager.saveExpertInfo(expertInfo);\n\t\t} else if (SystemIdEnums.READER_SYS.getCode().equals(userInfo.getSystemId())) {\n\t\t\tReaderInfo readerInfo = (ReaderInfo)obj;\n\t\t\treaderInfoManager.saveReaderInfo(readerInfo);\n\t\t} else if (SystemIdEnums.EDIT_SYS.getCode().equals(userInfo.getSystemId())) {\n//\t\t\tAuthorInfo authorInfo = (AuthorInfo)obj;\n//\t\t\tauthorInfoManager.saveAuthorInfo(authorInfo);\n\t\t} else {\n\t\t\tlogger.info(\"系统不存在,你修改啥\");\n\t\t}\n\t\treturn 0;\n\t}", "private void updateMenus()\n {\n m_KernelMenu.updateMenu();\n m_AgentMenu.updateMenu();\n }", "private void onUpdateSelected() {\r\n mUpdaterData.updateOrInstallAll_WithGUI(\r\n null /*selectedArchives*/,\r\n false /* includeObsoletes */,\r\n 0 /* flags */);\r\n }", "public void setSystemName(String systemName) {\n this.systemName = systemName;\n }", "public void modifyGovSystem() {\n mFirestore.collection(\"GovSystems\").document(mGovSystemID).set(mGovSystem).\n addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.d(TAG, \"DocumentSnapshot successfully written!\");\n Intent intent = new Intent(getApplicationContext(), GovSystemsActivity.class);\n startActivity(intent);\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(TAG, \"Error writing document\", e);\n }\n });\n mProgressBar.setVisibility(View.INVISIBLE);\n }", "public static void update() { // Chk for Joystick configuration\n if (jsConfig != chsr.getSelected()) {\n jsConfig = chsr.getSelected();\n caseDefault();\n configJS();\n SmartDashboard.putNumber(\"JS/JS_Config\", jsConfig);\n SmartDashboard.putString(\"JS/Choosen\", chsrDesc[chsr.getSelected()]); //Put selected on sdb\n }\n }", "@Override\n public void update(int deltaMs)\n {\n this.system.update(deltaMs);\n }", "public static org.oep.ssomgt.model.Application updateApplication(\n\t\torg.oep.ssomgt.model.Application application)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getService().updateApplication(application);\n\t}", "public void \n updateMenus()\n {\n UIMaster master = UIMaster.getInstance();\n UICache cache = master.getUICache(pChannel);\n try {\n String tname = cache.getCachedDefaultToolsetName();\n master.updateEditorPluginField(pChannel, tname, pField);\n }\n catch(PipelineException ex) {\n master.showErrorDialog(ex);\n }\n }", "public void update()\n {\n this.controller.updateAll();\n theLogger.info(\"Update request recieved from UI\");\n }", "public void setSystemInputModel(double[][] inputModel)\n {\n this.systemInputModel = inputModel;\n this.systemUpdated = true;\n stateChanged();\n }", "public void editar(String update){\n try {\n Statement stm = Conexion.getInstancia().createStatement();\n stm.executeUpdate(update);\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }", "private static void updateBundle() {\r\n\t\tSystem.out.println(\"updateBundle\");\r\n\t\tint id = -1;\r\n\t\t\r\n\t\tif (bundles.isEmpty()){\r\n\t\t\tSystem.out.println(\"There are no bundls added.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Enter the id for the bundle you want to change: \\n\");\r\n\t\t\t\t\r\n\t\tid = insertInteger(\"id\");\r\n\t\tif (!bundles.containsKey(id)){\r\n\t\t\tSystem.out.println(\"There are no bundles with id \");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tBundle b = bundles.get(id);\r\n\t\tprintBundle(b);\r\n\t\tSystem.out.println(\"What do you want to change? \");\r\n\t\t\r\n\t\tint operation = 0;\r\n\t\twhile ((operation = insertInteger(\" \")) != 4){\r\n\t\t\tif (operation == 1){\r\n\t\t\t\tSystem.out.println(\"Change bundle \");\r\n\t\t\t} else if (operation == 2){\r\n\t\t\t\tSystem.out.println(\"Change path \");\r\n\t\t\t} else if (operation == 3){\r\n\t\t\t\tSystem.out.println(\"Change place \");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\" 1. Change bundle information: \\n 2. Change path information 3. Change place information\\n 4. Cancel\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void modificarPrograma() {\r\n // Abro y obtengo la conexion\r\n this.conection.abrirConexion();\r\n Connection con = this.conection.getConexion();\r\n\r\n // Preparo la consulta\r\n String sql = \"UPDATE programa SET \\n\"\r\n + \"nombre = ?,\\n\"\r\n + \"version = ?,\\n\"\r\n + \"edicion = ?,\\n\"\r\n + \"tipo_programa = ?,\\n\"\r\n + \"fecha_aprobacion = ?,\\n\"\r\n + \"WHERE programa.codigo = ?\";\r\n System.out.println(sql);\r\n\r\n try {\r\n // La ejecuto\r\n PreparedStatement ps = con.prepareStatement(sql);\r\n ps.setString(1, this.nombre);\r\n ps.setString(2, this.version);\r\n ps.setString(3, this.edicion);\r\n ps.setString(4, this.tipo_programa);\r\n ps.setString(5, this.fecha_aprobacion);\r\n ps.setInt(6, this.codigo);\r\n int rows = ps.executeUpdate();\r\n System.out.println(rows);\r\n // Cierro la conexion\r\n this.conection.cerrarConexion();\r\n } catch (SQLException ex) {\r\n System.out.println(ex.getMessage());\r\n }\r\n }", "public void update(){}", "public void update(){}", "@Override\r\n\tpublic void adminSelectUpdate() {\n\t\t\r\n\t}", "private void update(JComboBox combo)\n\t{\n\t\tif(check() && table.getSelectedRow() != -1)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tConnection con = Connector.DBcon();\n\t\t\t\tString query=\"update items set it_name=?, it_id=?, it_quantity=?, it_price=? where it_ID=?\";\n\t\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\t\t\n\t\t\t\tpst.setString(1, txtiname.getText().trim());\n\t\t\t\tpst.setString(2, txticode.getText().trim());\n\t\t\t\tpst.setString(3, txtstock.getText().trim());\n\t\t\t\tpst.setString(4, txtprice.getText().trim());\n\t\t\t\t\n\t\t\t\tString sec = combo.getSelectedItem().toString();\n\t\t\t\tint sec_num = sec.equals(\"Kitchen Essentials\")? 347: sec.equals(\"Fashion Store\")? 357: sec.equals(\"Kids Section\")? 367: sec.equals(\"Electronics\")? 377: 387;\n\t\t\t\tpst.setString(5, sec_num+\"\");\n\t\t\t\t\n\t\t\t\tpst.setString(6, txticode.getText());\n\t\t\t\t\n\t\t\t\tpst.execute();\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Updated Successfully\", \"RESULT\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t\n\t\t\t\tpst.close();\n\t\t\t\tcon.close();\n\t\t\t} \n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t\t}\n\t\t}\n\t\t\n\t\telse if(check() && table.getSelectedRow() == -1)\n\t\t\tJOptionPane.showMessageDialog(null, \"Select the field to be updated!\", \"Alert\", JOptionPane.ERROR_MESSAGE);\n\t\t\n\t\telse\n\t\t\tJOptionPane.showMessageDialog(null, \"Fill all fields!\", \"Alert\", JOptionPane.ERROR_MESSAGE);\n\t}", "public void setSystemName(java.lang.String systemName) {\r\n this.systemName = systemName;\r\n }", "protected void runSQL(String sql) throws SystemException {\n try {\n DataSource dataSource = banking_organizationPersistence.getDataSource();\n\n SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,\n sql, new int[0]);\n\n sqlUpdate.update();\n } catch (Exception e) {\n throw new SystemException(e);\n }\n }", "public void setInformationSystem(long informationSystem) {\n this.informationSystem = informationSystem;\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tpublic Result update(String nativeIdentifier, List<Item> items)\n\t\t\tthrows ConnectorException, ObjectNotFoundException {\n\n\t\tdebug();\n\n\t\tif (isDebug == true) {\n\t\t\tlog.debug(\"===== UPDATE ====\");\n\t\t}\n\n\t\tResult result = new Result();\n\n\t\tString codSistema = \"\", codUsuario = \"\", nomUsuario = \"\", icStatu = \"\", icType = \"\", codSenha = \"\", numPerfil = \"\";\n\t\tint operacao = 0;\n\t\tArrayList<String> arrayPerfilSistema = new ArrayList<String>();\n\n\t\tcodUsuario = nativeIdentifier;\n\n\t\tIC_STATUS_ACESSO = \"0\";\n\n\t\tif (items != null) {\n\t\t\tfor (Item item : items) {\n\t\t\t\tString name = item.getName();\n\t\t\t\t// String value = item.getValue().toString();\n\t\t\t\tItem.Operation op = item.getOperation();\n\t\t\t\tArrayList valueList = new ArrayList();\n\n\t\t\t\tif (item.getValue() instanceof String) {\n\t\t\t\t\tvalueList.add(item.getValue());\n\n\t\t\t\t} else {\n\t\t\t\t\tvalueList = (ArrayList) item.getValue();\n\n\t\t\t\t}\n\n\t\t\t\tif (valueList.size() > 1) {\n\t\t\t\t\tfor (Object sistemaPerfil : valueList) {\n\t\t\t\t\t\tString sitemPerf = sistemaPerfil.toString();\n\n\t\t\t\t\t\tString[] array = sitemPerf.split(\"/\");\n\n\t\t\t\t\t\tString sistema = array[0];\n\n\t\t\t\t\t\tfor (Object sistemaPerfil2 : valueList) {\n\t\t\t\t\t\t\tString sitemPerf2 = sistemaPerfil2.toString();\n\n\t\t\t\t\t\t\tString[] array2 = sitemPerf2.split(\"/\");\n\n\t\t\t\t\t\t\tString sistema2 = array2[0];\n\n\t\t\t\t\t\t\tif (sistema.equals(sistema2) && op.equals(\"Add\")) {\n\t\t\t\t\t\t\t\tresult = new Result(Result.Status.Failed);\n\t\t\t\t\t\t\t\tresult.add(\"TIPO APP SIASES UPDATE\"\n\t\t\t\t\t\t\t\t\t\t+ \"O sistema não permite adicionar mais de um perfil.\");\n\t\t\t\t\t\t\t\treturn result;\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}\n\n\t\t\t\tif (isDebug == true) {\n\t\t\t\t\tlog.debug(\"UPDATE - <Nome Item: \" + name\n\t\t\t\t\t\t\t+ \">\\n <Valor Item: \" + valueList.get(0).toString()\n\t\t\t\t\t\t\t+ \">\\n <Operation: \" + op + \">\");\n\t\t\t\t}\n\n\t\t\t\tswitch (op) {\n\n\t\t\t\tcase Add: {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (name.equalsIgnoreCase(sisPerfil)) {\n\n\t\t\t\t\t\t\tfor (Object sistemaPerfil : valueList) {\n\t\t\t\t\t\t\t\tString sistemaPerfis = sistemaPerfil.toString();\n\n\t\t\t\t\t\t\t\tarrayPerfilSistema.add(sistemaPerfis);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdadosUsuario(codUsuario);\n\t\t\t\t\t} catch (ClassNotFoundException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\tresult = new Result(Result.Status.Failed);\n\t\t\t\t\t\tresult.add(\"TIPO APP SIASES UPDATE ADD\");\n\n\t\t\t\t\t\tif (isDebug == true) {\n\t\t\t\t\t\t\tlog.debug(\"ERRO UPDATE ADD SIASE USER: \"\n\t\t\t\t\t\t\t\t\t+ codUsuario);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthrow new ConnectorException(\n\t\t\t\t\t\t\t\t\"ERRO UPDATE ADD SIASE USER: \" + e1);\n\n\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\tresult = new Result(Result.Status.Failed);\n\t\t\t\t\t\tresult.add(\"TIPO APP SIASES UPDATE\");\n\n\t\t\t\t\t\tif (isDebug == true) {\n\t\t\t\t\t\t\tlog.debug(\"ERRO UPDATE ADD SIASE USER: \"\n\t\t\t\t\t\t\t\t\t+ codUsuario);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthrow new ConnectorException(\n\t\t\t\t\t\t\t\t\"ERRO UPDATE ADD SIASE USER: \" + e1);\n\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\n\t\t\t\t\t\tif (isDebug == true) {\n\t\t\t\t\t\t\tlog.debug(\"ERRO UPDATE ADD SIASE USER: \"\n\t\t\t\t\t\t\t\t\t+ codUsuario);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthrow new ConnectorException(\n\t\t\t\t\t\t\t\t\"ERRO UPDATE ADD SIASE USER: \" + e);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tnomUsuario = noUsuario;\n\t\t\t\t\ticStatu = icStatus;\n\t\t\t\t\ticType = icTipo;\n\t\t\t\t\tcodSenha = coSenhaAcesso;\n\t\t\t\t\toperacao = 1;\n\n\t\t\t\t\tfor (String sistemaPerfis : arrayPerfilSistema) {\n\n\t\t\t\t\t\tString[] array = sistemaPerfis.split(\"/\");\n\n\t\t\t\t\t\tString sistema = array[0];\n\t\t\t\t\t\tString perfil = array[1];\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tdadosPerfil(sistema, perfil);\n\t\t\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\tresult = new Result(Result.Status.Failed);\n\t\t\t\t\t\t\tresult.add(\"TIPO APP SIASES UPDATE\" + e);\n\t\t\t\t\t\t\tif (isDebug == true) {\n\t\t\t\t\t\t\t\tlog.debug(\"ERRO UPDATE ADD SIASE USER: \"\n\t\t\t\t\t\t\t\t\t\t+ codUsuario);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthrow new ConnectorException(\n\t\t\t\t\t\t\t\t\t\"ERRO UPDATE ADD SIASE USER: \" + e);\n\n\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\tresult = new Result(Result.Status.Failed);\n\t\t\t\t\t\t\tresult.add(\"TIPO APP SIASES UPDATE\" + e);\n\t\t\t\t\t\t\tif (isDebug == true) {\n\t\t\t\t\t\t\t\tlog.debug(\"ERRO UPDATE ADD SIASE USER: \"\n\t\t\t\t\t\t\t\t\t\t+ codUsuario);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthrow new ConnectorException(\n\t\t\t\t\t\t\t\t\t\"ERRO UPDATE ADD SIASE USER: \" + e);\n\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\n\t\t\t\t\t\t\tif (isDebug == true) {\n\t\t\t\t\t\t\t\tlog.debug(\"ERRO UPDATE ADD SIASE USER: \"\n\t\t\t\t\t\t\t\t\t\t+ codUsuario);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthrow new ConnectorException(\n\t\t\t\t\t\t\t\t\t\"ERRO UPDATE ADD SIASE USER: \" + e);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnumPerfil = nuPerfil;\n\t\t\t\t\t\tcodSistema = sistema;\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (isDebug == true) {\n\t\t\t\t\t\t\t\tlog.debug(\"UPDADE ADD - <CodUsuario: \"\n\t\t\t\t\t\t\t\t\t\t+ codUsuario + \"> <CodSistema: \"\n\t\t\t\t\t\t\t\t\t\t+ codSistema + \"> <nomUsuario: \"\n\t\t\t\t\t\t\t\t\t\t+ nomUsuario + \"> <icStatu: \" + icStatu\n\t\t\t\t\t\t\t\t\t\t+ \"> <icType: \" + icType\n\t\t\t\t\t\t\t\t\t\t+ \"> <codSenha: \" + codSenha\n\t\t\t\t\t\t\t\t\t\t+ \"> <numPerfil: \" + numPerfil\n\t\t\t\t\t\t\t\t\t\t+ \"> <operacao: \" + operacao + \">\");\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcreateUser(codSistema, codUsuario, nomUsuario,\n\t\t\t\t\t\t\t\t\ticStatu, icType, codSenha, numPerfil,\n\t\t\t\t\t\t\t\t\toperacao);\n\n\t\t\t\t\t\t\tresult = new Result(Result.Status.Committed);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\tresult = new Result(Result.Status.Failed);\n\t\t\t\t\t\t\tresult.add(\"TIPO APP SIASES UPDATE\" + e);\n\n\t\t\t\t\t\t\tif (isDebug == true) {\n\t\t\t\t\t\t\t\tlog.debug(\"ERRO UPDATE ADD SIASE USER: \"\n\t\t\t\t\t\t\t\t\t\t+ codUsuario);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthrow new ConnectorException(\n\t\t\t\t\t\t\t\t\t\"ERRO UPDATE ADD SIASE USER: \" + e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Remove: {\n\n\t\t\t\t\tif (isDebug == true) {\n\t\t\t\t\t\tlog.debug(\"UPDATE - REMOVE\");\n\n\t\t\t\t\t}\n\t\t\t\t\tif (name.equalsIgnoreCase(sisPerfil)) {\n\n\t\t\t\t\t\tfor (Object sistemaPerfil : valueList) {\n\t\t\t\t\t\t\tString sistemaPerfis = sistemaPerfil.toString();\n\n\t\t\t\t\t\t\tarrayPerfilSistema.add(sistemaPerfis);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\tfor (String sistemaPerfis : arrayPerfilSistema) {\n\n\t\t\t\t\t\t\t\tString[] array = sistemaPerfis.split(\"/\");\n\n\t\t\t\t\t\t\t\tString sistema = array[0];\n\n\t\t\t\t\t\t\t\tcodSistema = sistema;\n\n\t\t\t\t\t\t\t\tif (isDebug == true) {\n\t\t\t\t\t\t\t\t\tlog.debug(\"UPDADE - REMOVER <\"\n\t\t\t\t\t\t\t\t\t\t\t+ \"CodUsuario: \" + codUsuario\n\t\t\t\t\t\t\t\t\t\t\t+ \"> <CodSistema: \" + codSistema\n\t\t\t\t\t\t\t\t\t\t\t+ \">\");\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tdesvincularGrupo(codSistema, codUsuario);\n\n\t\t\t\t\t\t\t\tresult = new Result(Result.Status.Committed);\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\tresult = new Result(Result.Status.Failed);\n\t\t\t\t\t\t\tresult.add(\"TIPO APP SIASES \" + e);\n\n\t\t\t\t\t\t\tif (isDebug == true) {\n\t\t\t\t\t\t\t\tlog.debug(\"ERRO UPDATE REMOVE SIASE USER: \"\n\t\t\t\t\t\t\t\t\t\t+ codUsuario);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthrow new ConnectorException(\n\t\t\t\t\t\t\t\t\t\"ERRO UPDATE REMOVE SIASE USER: \" + e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase Set: {\n\n\t\t\t\t\t// existing.put(name, valueList.get(0).toString());\n\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new IllegalArgumentException(\"Unknown operation: \"\n\t\t\t\t\t\t\t+ op);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "private void update() {\n\n\t\tfloat shopping = Float.parseFloat(label_2.getText());\n\t\tfloat giveing = Float.parseFloat(label_5.getText());\n\t\tfloat companyDemand = Float.parseFloat(label_7.getText());\n\n\t\ttry {\n\t\t\tPreparedStatement statement = DBConnection.connection\n\t\t\t\t\t.prepareStatement(\"update customer_list set Shopping_Account = \"\n\t\t\t\t\t\t\t+ shopping\n\t\t\t\t\t\t\t+ \" , Giving_Money_Account = \"\n\t\t\t\t\t\t\t+ giveing\n\t\t\t\t\t\t\t+ \", Company_demand = \"\n\t\t\t\t\t\t\t+ companyDemand\n\t\t\t\t\t\t\t+ \" where Name = '\"\n\t\t\t\t\t\t\t+ name\n\t\t\t\t\t\t\t+ \"' And Last_Name = '\"\n\t\t\t\t\t\t\t+ lastName + \"' \");\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t}", "@Override\r\n public void updateStethoscopeInformation(StethoscopeInformation info) {\r\n\r\n update(info.getModelNumber(), modelNumber);\r\n update(info.getFirmwareVersion() + \"\", firmwareVersion);\r\n update(info.getBatteryLevel() + \"\", batteryLevel);\r\n update(info.getIsAutoBluetoothOn() + \"\", autoBluetooth);\r\n\r\n update(info.getTotalBytesRead() + \"\", bytesRead);\r\n update(info.getBytesReadPerSecond() + \"\", bytesReadSecond);\r\n\r\n update(info.getTotalBytesWritten() + \"\", bytesWritten);\r\n update(info.getBytesWrittenPerSecond() + \"\", bytesWrittenSecond);\r\n }", "public static String checkSystem(String version) {\n \n if (MainFormJFrame.cashMachine.isEnabled()) {\n try {\n \n Connection connection = SingletonConnection.getConnection();\n \n Statement statement = connection.createStatement();\n String queryString = (\"SELECT `newversion`, `maintenance` FROM system_update\");\n ResultSet rs = statement.executeQuery(queryString);\n \n String checkVersion;\n Boolean checkmaintenance;\n \n while (rs.next()) {\n \n System.out.println(rs.getString(1));\n System.out.println(rs.getBoolean(2));\n \n checkVersion = rs.getString(1);\n checkmaintenance = rs.getBoolean(2);\n \n if ((!softwareVersion.equals(checkVersion)) && (checkmaintenance.equals(softwareMaintenance))) {\n MainFormJFrame.cashMachine.changePanel(new UpdateSystemPanel());\n }\n \n else if ((!softwareVersion.equals(checkVersion)) && (!checkmaintenance.equals(softwareMaintenance)) || ((softwareVersion.equals(checkVersion)) && (!checkmaintenance.equals(softwareMaintenance)))) {\n MainFormJFrame.cashMachine.changePanel(new MaintenanceSystemPanel());\n }\n else {\n MainFormJFrame.cashMachine.changePanel(new LoginPanel());\n }\n }\n } catch (Exception ex) {\n System.out.println(ex);\n }\n }\n return softwareVersion;\n }", "public void updateSwarm();", "public void updateEditService(){\r\n \tMap<String,String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();\r\n\t\tint serviceId = Integer.parseInt(params.get(\"serviceId\"));\r\n\t\tthis.getLog().info(\"serviceId:\" + serviceId);\r\n\t\t\r\n\t\tif(serviceId == 0){\r\n\t\t\teditService = new ServiceDTO();\r\n\t\t}else{\r\n\t\t\tfor (ServiceDTO s : this.getServiceList().getAvailableServiceList()) {\r\n\t\t\t\tif(s.getId() == serviceId){\r\n\t\t\t\t\teditService = s;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "void update(Information info);", "public static void updateApiDetails(final int envId, String compName, int numOfApi, String platform){\n\t\tfinal int compId = getComponentIdFromCompName(compName);\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\tif(compId == 0){\n\t\t\tlogger.info(\"Component Name = \" + compName + \"; is not available in the DB\");\n\t\t\treturn;\n\t\t}\n\t\tString updateApiStsQry = null;\n\t\tif(platform.equalsIgnoreCase(\"Mesos\")){\n\t\t\tupdateApiStsQry = HQLConstants.UPDATE_API_DETAILS;\n\t\t}else if(platform.equalsIgnoreCase(\"K8s\")){\n\t\t\tupdateApiStsQry = HQLConstants.UPDATE_K8S_API_DETAILS;\n\t\t}\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(updateApiStsQry);\n\t\tquery.setInteger(\"numOfApi\", numOfApi);\n\t\tquery.setLong(\"compId\", compId);\n\t\tquery.setLong(\"environmentId\", envId);\n\t\tquery.setDate(\"stsDate\", todayDate);\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "public void update(String name){\n\n return;\n }", "public void executeUpdate(String request) {\n try {\r\n st.executeUpdate(request);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public void update(float dt) {\n SystemManager.find(UpdateAction.class).forEach(ua -> ((UpdateAction) ua).update(dt));\n }", "private void updateAction(String taskId) {\n setupPrioritySpinner();\n try {\n QueryBuilder<Task, String> queryBuilder = taskDao.queryBuilder();\n taskForUpdate = taskDao.queryForFirst(queryBuilder.where().eq(Task.TASK_ID, taskId).prepare());\n mTitle.setText(taskForUpdate.getTitle());\n mDescription.setText(taskForUpdate.getDescription());\n mDate.setDate(taskForUpdate.getDate().getTime());\n mPriority.setSelection(taskForUpdate.getPriority());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "protected static void update() {\n\t\tstepsTable.update();\n\t\tactive.update();\n\t\tmeals.update();\n\t\t\n\t}", "public void update() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.update(this); // routine now uses leaseDao to get CampLease class\r\n\t}", "@ApiModelProperty(required = true, value = \"The id of the system where this file lives.\")\n public String getSystem() {\n return system;\n }", "public void updateWorkspace()\n {\n workspace.update();\n }", "public static void updateArchitect(){\n projectChosen = getQuestionInput();\r\n try {\r\n Connection myConn = DriverManager.getConnection(url, user, password);\r\n\r\n String sqlInsert = \"UPDATE projects \" +\r\n \" SET architect_name = ?, architect_tel = ?, architect_email = ?, architect_address = ?\" +\r\n \"WHERE project_num = \" +projectChosen;\r\n\r\n PreparedStatement pstmt = myConn.prepareStatement(sqlInsert);\r\n pstmt.setString(1, NewProject.architect_name);\r\n pstmt.setString(2, NewProject.architect_tel);\r\n pstmt.setString(3, NewProject.architect_email);\r\n pstmt.setString(4, NewProject.architect_address);\r\n pstmt.executeUpdate(); //Execute update of database.\r\n pstmt.close();\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void processUpdates(SystemMetadata newSystemMetadata)\n throws RetryableException, UnrecoverableException, SynchronizationFailed {\n\n logger.debug(task.taskLabel() + \" entering processUpdates...\");\n\n //XXX is cloning the identifier necessary?\n Identifier pid = D1TypeBuilder.cloneIdentifier(newSystemMetadata.getIdentifier());\n\n logger.info(buildStandardLogMessage(null, \"Start ProcessUpdate\"));\n logger.debug(task.taskLabel() + \" Getting sysMeta from HazelCast map\");\n // TODO: assume that if hasReservation indicates the id exists, that \n // hzSystemMetadata will not be null...can we make this assumption?\n SystemMetadata hzSystemMetadata = hzSystemMetaMap.get(pid);\n SystemMetadataValidator validator = null;\n String errorTracker = \"\";\n try {\n errorTracker = \"validateSysMeta\";\n \tvalidator = new SystemMetadataValidator(hzSystemMetadata);\n validator.validateEssentialProperties(newSystemMetadata, nodeCommunications.getMnRead());\n\n // if here, we know that the new system metadata is referring to the same\n // object, and we can consider updating other values.\n NodeList nl = nodeCommunications.getNodeRegistryService().listNodes();\n boolean isV1Object = AuthUtils.isCNAuthorityForSystemMetadataUpdate(nl, newSystemMetadata);\n errorTracker = \"processUpdate\";\n if (task.getNodeId().contentEquals(hzSystemMetadata.getAuthoritativeMemberNode().getValue())) {\n\n if (isV1Object) {\n \t// (no seriesId in V1 to validate)\n processV1AuthoritativeUpdate(newSystemMetadata, hzSystemMetadata);\n \n } else {\n \tvalidateSeriesId(newSystemMetadata,hzSystemMetadata);\n \tprocessV2AuthoritativeUpdate(newSystemMetadata, validator);\n \n }\n } else {\n \t// not populating anything other than replica information\n processPossibleNewReplica(newSystemMetadata, hzSystemMetadata, isV1Object);\n }\n logger.info(buildStandardLogMessage(null, \" Completed ProcessUpdate\"));\n } catch (InvalidSystemMetadata e) {\n if (validator == null) {\n throw new UnrecoverableException(\"In processUpdates, bad SystemMetadata from the HzMap\", e);\n } else {\n throw new UnrecoverableException(\"In processUpdates, could not find authoritativeMN in the NodeList\", e);\n }\n } catch (NotAuthorized e) {\n \tif (errorTracker.equals(\"validateSysMeta\")) {\n \t\tthrow SyncFailedTask.createSynchronizationFailed(task.getPid(), \"In processUpdates, while validating the checksum\", e);\n \t} else {\n \t\tthrow SyncFailedTask.createSynchronizationFailed(task.getPid(), \"NotAuthorized to use the seriesId. \", e);\n \t}\n } catch (IdentifierNotUnique | InvalidRequest | InvalidToken | NotFound e) {\n \n throw SyncFailedTask.createSynchronizationFailed(task.getPid(), \"In processUpdates, while validating the checksum\", e);\n } catch (ServiceFailure e) {\n extractRetryableException(e);\n throw new UnrecoverableException(\"In processUpdates, while validating the checksum:, e\");\n } catch (NotImplemented e) {\n throw new UnrecoverableException(\"In processUpdates, while validating the checksum:, e\");\n }\n }", "public void updateAccountingSystem(Sale sale)\n {\n \n }", "public void update() {\n Dashboard.sendToDash(\"/update Servo \" + id + \" \" + servo.getPosition());\n }", "public void editHouse() {\n System.out.println(\"-----Update House-----\");\n System.out.println(\"enter id(-1 cancel): \");\n int updateId = Utility.readInt();\n if (updateId == -1) {\n System.out.println(\"cancel update program\");\n return;\n }\n House h = houseService.searchHouse(updateId);\n if(h == null) {\n System.out.println(\"no house you needed found\");\n return;\n }\n //update owner name\n System.out.print(\"owner = \" + h.getOwner() + \": \");\n String owner = Utility.readString(10, \"\");\n if(!\"\".equals(owner)) {\n h.setOwner(owner);\n }\n\n //update phone\n System.out.print(\"phone = \" + h.getPhone() + \": \");\n String phone = Utility.readString(10, \"\");\n if(!\"\".equals(phone)) {\n h.setPhone(phone);\n }\n\n //update address\n System.out.print(\"address = \" + h.getAddress() + \": \");\n String address = Utility.readString(20, \"\");\n if(!\"\".equals(address)) {\n h.setAddress(address);\n }\n\n //update rent\n System.out.print(\"rent = \" + h.getRent() + \": \");\n int rent = Utility.readInt(-1);\n if(! (-1 == rent)) {\n h.setRent(rent);\n }\n\n //update state\n System.out.print(\"state = \" + h.getState() + \": \");\n String state = Utility.readString(10, \"\");\n if(!\"\".equals(state)) {\n h.setState(state);\n }\n\n System.out.println(\"update successful\");\n }", "protected void runSQL(String sql) throws SystemException {\n try {\n DataSource dataSource = mbMobilePhonePersistence.getDataSource();\n\n SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,\n sql, new int[0]);\n\n sqlUpdate.update();\n } catch (Exception e) {\n throw new SystemException(e);\n }\n }", "private void updateMenu() {\n\n\t\t\tblockActionsStart();\n\n\t\t\tArrayList<OutputConfig> theConfigs = OutputConfig.getConfigs(getDbID(), type);\n\t\t\ttheConfigs.add(0, OutputConfig.getDefaultObject(type));\n\t\t\tif (!theConfigs.contains(config)) {\n\t\t\t\ttheConfigs.add(0, config);\n\t\t\t}\n\t\t\tif (showNullObject && !config.isNull()) {\n\t\t\t\ttheConfigs.add(0, OutputConfig.getNullObject(type));\n\t\t\t}\n\n\t\t\tconfigMenu.removeAllItems();\n\t\t\tfor (OutputConfig theConfig : theConfigs) {\n\t\t\t\tconfigMenu.addItem(theConfig);\n\t\t\t}\n\t\t\tconfigMenu.setSelectedItem(config);\n\n\t\t\tupdateConfig();\n\n\t\t\tblockActionsEnd();\n\t\t}", "public void setSolarSystemID(int value) {\n this.solarSystemID = value;\n }", "void update(Env world) throws Exception;", "void execute() throws Exception {\n\n\t\tif (getSystemState(db) != SYSTEM_STATE_CREATED_COULD_BE_EXACTLY_ONE) {\n\t\t\tInteger ss = getSystemState(db);\n\t\t\tshutDown();\n\t\t\tthrow new Exception(\"System in wrong state for this task: \" + ss);\n\t\t}\n\n\t\tloadExecutionEngine(db);\n\t\tperformUpdate();\n\t\tshutDown();\n\t}", "public void update() {\n\t\trl = DBManager.getReservationList();\n\t}", "public void updateVM() throws SQLException{\n\t\tDataBase db = DataBase.getInstance();\n\t\tResultSet rs;\n\t\tfor(VirtualMachine aux : vms){\n\t\t\tPreparedStatement ps = db.prepareStatement(\"SELECT id FROM vm WHERE id = ?\");\n\t\t\tps.setString(1, aux.getId());\n\t\t\tSystem.out.println(aux.getId());\n\t\t\tSystem.out.println(this.id);\n\t\t\trs = db.queryDB(ps); \n\t\t\tif(aux.checkRowDBVM(rs)){\n\t\t\t String id = aux.getId();\n\t\t\t\tString label = aux.getLabel();\n\t\t\t\tString flavorID = aux.getFlavorID();\n\t\t\t\tString flavorName = aux.getFlavorName();\n\t\t\t\tString image = aux.getImage();\n\t\t\t\tdb.newEntryDB(\"INSERT INTO vm VALUES ('\" + id + \"','\" + label + \"','\" + flavorID + \"','\" + flavorName + \"','\" + image + \"','\" + this.id + \"')\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tps = db.prepareStatement(\"UPDATE vm SET label=?,flavorID=?,flavorName=?,imageID=? WHERE id=?\");\n\t\t\t\tps.setString(1, aux.getLabel());\n\t\t\t\tps.setString(2, aux.getFlavorID());\n\t\t\t\tps.setString(3, aux.getFlavorName());\n\t\t\t\tps.setString(4, aux.getImage());\n\t\t\t\tps.setString(5, aux.getId());\n\t\t\t\tps.executeUpdate();\n\t\t\t}\n\t\t}\n\t}", "public void updateResvOption(RoomMgr rm) {\n\t\tboolean flag = false;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint ch, rNo;\n\n\t\tSystem.out.printf(\"Please key in the Reservation no: \");\n\t\trNo = sc.nextInt();\n\t\tsc.nextLine();\n\n\t\tfor (Reservation r : rList) {\n\t\t\tif (r.getResvNo() == rNo) {\n\t\t\t\tdo {\n\t\t\t\t\tSystem.out.printf(\"\\n===>Please select from the following:\\n\");\n\t\t\t\t\tSystem.out.println(\"(1) Update Room no\");\n\t\t\t\t\tSystem.out.println(\"(2) Update Adult No\");\n\t\t\t\t\tSystem.out.println(\"(3) Update kids No\");\n\t\t\t\t\tSystem.out.println(\"(4) Update Date Check-In\");\n\t\t\t\t\tSystem.out.println(\"(5) Update Date Check-Out\");\n\t\t\t\t\tSystem.out.println(\"(6) Update Reservation Status\");\n\t\t\t\t\tSystem.out.println(\"(7) Return to the previous menu\");\n\t\t\t\t\tSystem.out.print(\"Enter the number of your choice: \");\n\t\t\t\t\tch = sc.nextInt();\n\t\t\t\t\tsc.nextLine();\n\t\t\t\t\tupdateResv(rm, r, ch,r.getAdultNo()+r.getKidNo());\n\t\t\t\t} while (ch > 0 && ch < 9);\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!flag)\n\t\t\tSystem.out.println(\"Reservation no does not exist\");\n\t}", "public final void setSystemID(java.lang.String systemid)\r\n\t{\r\n\t\tsetSystemID(getContext(), systemid);\r\n\t}", "public void updateDependencyDataInSystem() {\n dependenciesMap.values()\n .forEach(set -> {\n set.forEach(item -> {\n if (items.containsKey(item.getName())) {\n Item actualItem = items.get(item.getName());\n item.setExplicitlyInstalled(actualItem.isExplicitlyInstalled());\n item.setImplicitlyInstalled(actualItem.isImplicitlyInstalled());\n }\n });\n });\n\n dependentsMap.values()\n .forEach(set -> {\n set.forEach(item -> {\n if (items.containsKey(item.getName())) {\n Item actualItem = items.get(item.getName());\n item.setExplicitlyInstalled(actualItem.isExplicitlyInstalled());\n item.setImplicitlyInstalled(actualItem.isImplicitlyInstalled());\n }\n });\n });\n }", "@Override\r\n\tpublic void updateforSTA(ManufacturersVO ManufacturersVO) {\n\t\t\r\n\t}", "public synchronized void UpdateManager(String ModelName, String Name){\n\t\tif(this.Model.equalsIgnoreCase(ModelName.toUpperCase(Locale.getDefault())))\n\t\t\t\topset.add( new OptionSet(Name.toUpperCase(Locale.getDefault())));\n\t}", "void process(float deltaInSec) {\n \t\tfor (EntitySystem system : systems) {\n \t\t\tif (system.isEnabled()) {\n \t\t\t\tsystem.processSystem(deltaInSec);\n \t\t\t}\n \t\t}\n \t}", "public void doUpdate() {\n \tboolean actualizo = this.update(); \n \t\n if (actualizo) {\n // this.exit();\n \n // Ver aca si direcciono a la edición ... lo hace la clase que\n \tthis.redireccion();\n \n } else {\n //new MessageWindowPane(\"Se produjo un error en la actualización\");\n }\n \n \n }", "public final void setSystemID(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String systemid)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.SystemID.toString(), systemid);\r\n\t}", "public void setIsSystem(String isSystem) {\n this.isSystem = isSystem == null ? null : isSystem.trim();\n }", "private static void setSubsystems()\n {\n //Components\n //Talons\n frontLeftTalon.setName(\"DrivetrainSubsystem\", \"FrontLeftDriveTalon\");\n frontRightTalon.setName(\"DrivetrainSubsystem\", \"FrontRightDriveTalon\");\n rearLeftTalon.setName(\"DrivetrainSubsystem\", \"RearLeftDriveTalon\");\n rearRightTalon.setName(\"DrivetrainSubsystem\", \"RearRightDriveTalon\");\n //Sensors\n //navX.setName(\"SensorSubsystem\", \"NavX\");\n System.out.print(pigeon.getAbsoluteCompassHeading());\n \n //Subsystems\n drivetrainSubsystem.setName(\"DrivetrainSubsystem\", \"DrivetrainSubsystem\");\n sensorSubsystem.setName(\"SensorSubsystem\", \"SensorSubsystem\");\n }", "@Override\r\n\tpublic void k_update(ManufacturersVO MANUFACTURERSVO) {\n\t\t\r\n\t}", "public void updateSoftware(Software oldSoftware,Software newSoftware){\n products.remove (oldSoftware);\n products.add (newSoftware);\n }", "private void updateOsMetrics()\n {\n Driver.updateOsMetric();\n }", "public void setSystemId (java.lang.Long systemId) {\r\n\t\tthis.systemId = systemId;\r\n\t}", "private void deviceUpdated() {\n if (!mIsCreate) {\n mSyncthingService.getApi().editDevice(mDevice, getActivity(), this);\n }\n }", "public abstract void updateMainComponents(String component);", "protected void runSQL(String sql) throws SystemException {\n try {\n DataSource dataSource = libroPersistence.getDataSource();\n\n SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,\n sql, new int[0]);\n\n sqlUpdate.update();\n } catch (Exception e) {\n throw new SystemException(e);\n }\n }", "public void actionPerformed( ActionEvent event )\n {\n SoftwareWindow.this.software = parent.getEnvironmentWindow().getEnvironment().getSoftware( name );\n if ( SoftwareWindow.this.software == null )\n {\n SoftwareWindow.this.software = new Software();\n }\n // update the window\n update();\n }", "@GetMapping(\"/systems\")\r\n\tpublic String showSystems() {\r\n\r\n\t\treturn \"systems\";\r\n\t}" ]
[ "0.7413345", "0.66852206", "0.66068053", "0.6204643", "0.61944366", "0.6146423", "0.58686125", "0.5860956", "0.5770859", "0.57071644", "0.56919754", "0.56359607", "0.5634554", "0.5593843", "0.5579262", "0.55435526", "0.55420303", "0.55389756", "0.5528769", "0.5506608", "0.5497405", "0.54827344", "0.5463429", "0.54377866", "0.5437524", "0.53939795", "0.53794014", "0.53777814", "0.5368614", "0.53626424", "0.53616846", "0.533653", "0.53185284", "0.5313183", "0.5307494", "0.530615", "0.5277745", "0.52675736", "0.5265227", "0.52600515", "0.52533823", "0.524327", "0.52416486", "0.52386594", "0.52374303", "0.52320486", "0.5229242", "0.5229242", "0.5224073", "0.52240646", "0.521688", "0.5210957", "0.5203255", "0.51768875", "0.5175183", "0.5173604", "0.5170794", "0.5167232", "0.5158843", "0.5157562", "0.5137033", "0.51355636", "0.5125675", "0.51136965", "0.51104695", "0.5109023", "0.50946915", "0.50938654", "0.5086325", "0.50791085", "0.50669074", "0.506148", "0.5055957", "0.5055263", "0.50548154", "0.50546515", "0.5052378", "0.50478244", "0.50474924", "0.5046227", "0.50431126", "0.50312585", "0.5030966", "0.5029684", "0.5023131", "0.5014561", "0.50125676", "0.50116247", "0.5006704", "0.5004039", "0.50019884", "0.49984205", "0.49958646", "0.4995277", "0.49949613", "0.49923885", "0.49921608", "0.49873567", "0.4987117", "0.49783787" ]
0.60964465
6
Show a list of all the systems the system can communicate with
List<SolrSystemDTO> showAllSolrSystems(UserDTO userDTO);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void listDevices()\n\t{\n\t\tfor(SerialPort port : SerialPort.getCommPorts())\n\t\t{\n\t String portName = port.getSystemPortName();\n\t System.out.println(portName);\n\t\t}\n\t}", "public Collection<String> listDevices();", "public String showAvailableExternalSystem() {\n int counter = 1;\n StringBuilder systems = new StringBuilder();\n\n for (String systemName : externalSystemsAvailable) {\n systems.append(counter + \". \" + systemName + \"\\n\");\n }\n\n systems.setLength(systems.length() - 1);\n return systems.toString();\n }", "public static void getDevicesList()\n {\n MidiDevice.Info[]\taInfos = MidiSystem.getMidiDeviceInfo();\n\t\tfor (int i = 0; i < aInfos.length; i++)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tMidiDevice\tdevice = MidiSystem.getMidiDevice(aInfos[i]);\n\t\t\t\tboolean\t\tbAllowsInput = (device.getMaxTransmitters() != 0);\n\t\t\t\tboolean\t\tbAllowsOutput = (device.getMaxReceivers() != 0);\n\t\t\t\tif (bAllowsInput || bAllowsOutput)\n\t\t\t\t{\n\n\t\t\t\t\tSystem.out.println(i + \"\" + \" \"\n\t\t\t\t\t\t+ (bAllowsInput?\"IN \":\" \")\n\t\t\t\t\t\t+ (bAllowsOutput?\"OUT \":\" \")\n\t\t\t\t\t\t+ aInfos[i].getName() + \", \"\n\t\t\t\t\t\t+ aInfos[i].getVendor() + \", \"\n\t\t\t\t\t\t+ aInfos[i].getVersion() + \", \"\n\t\t\t\t\t\t+ aInfos[i].getDescription());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\" + i + \" \" + aInfos[i].getName());\n\t\t\t\t\t}\n\n\t\t\t}\n\t\t\tcatch (MidiUnavailableException e)\n\t\t\t{\n\t\t\t\t// device is obviously not available...\n\t\t\t\t// out(e);\n\t\t\t}\n\t\t}\n\t\tif (aInfos.length == 0)\n\t\t{\n\t\t\tSystem.out.println(\"[No devices available]\");\n\t\t}\n\t\t//System.exit(0);\n }", "private void ausgebenSystem() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Rechner: \" + InetAddress.getLocalHost().getHostName());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println();\n\t\tString txt = System.getProperties().toString();\n\t\twhile (txt.indexOf(\",\") > 0) {\n\t\t\tSystem.out.println(txt.substring(0, txt.indexOf(\",\") + 1));\n\t\t\ttxt = txt.substring(txt.indexOf(\",\") + 2);\n\n\t\t}\n\t\tSystem.out.println(txt);\n\t}", "protected void listClients() {\r\n\t\tif (smscListener != null) {\r\n\t\t\tsynchronized (processors) {\r\n\t\t\t\tint procCount = processors.count();\r\n\t\t\t\tif (procCount > 0) {\r\n\t\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\t\tSystem.out.print(proc.getSystemId());\r\n\t\t\t\t\t\tif (!proc.isActive()) {\r\n\t\t\t\t\t\t\tSystem.out.println(\" (inactive)\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(\"No client connected.\");\r\n\t\t\t\t}\r\n\t\t\t}\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 static void listSerialPorts()\n\t{\n\t\tprintln(\"available ports on system\");\n\t\tprintln(\"-------------------------\");\n\n\t\tEnumeration ports = CommPortIdentifier.getPortIdentifiers();\n\t\twhile (ports.hasMoreElements())\n\t\t\tprintln(((CommPortIdentifier)ports.nextElement()).getName());\n\n\t\tprintln(\"-------------------------\");\n\t}", "@GetMapping(\"/systems\")\r\n\tpublic String showSystems() {\r\n\r\n\t\treturn \"systems\";\r\n\t}", "@GetMapping(Mappings.SYSTEMS)\n\tpublic String showSystems() {\n\n\t\treturn ViewNames.ADMIN_PANEL;\n\t}", "public void printHostSystems() throws InvalidProperty, RuntimeFault, RemoteException{\r\n\t\tManagedEntity[] mes = new\r\n\t\t\t\tInventoryNavigator(_instance.getRootFolder()).searchManagedEntities(\"HostSystem\");\r\n\t\tfor (int i = 0; i < mes.length; i++) {\r\n\t\t\tHostSystem currHostSystem = (HostSystem)mes[i];\r\n\t\t\tSystem.out.printf(\"host[%d]: Name = %s\\n\", i, currHostSystem.getName());\r\n\t\t}\r\n\t}", "public List<String> getAvailableDevices() {\n if (getEcologyDataSync().getData(\"devices\") != null) {\n return new ArrayList<>((Collection<? extends String>) ((Map<?, ?>) getEcologyDataSync().\n getData(\"devices\")).keySet());\n } else {\n return Collections.emptyList();\n }\n }", "@Override\r\n\tpublic void showList() {\n\t\tSystem.out.println(\"I am a MAC list\");\r\n\t}", "private void listDevices(Context context) {\n\t DeviceList list = new DeviceList();\n\t int result = LibUsb.getDeviceList(context, list);\n\t if(result < 0) throw new LibUsbException(\"Unable to get device list\", result);\n\n\t try\n\t {\n\t for(Device device: list)\n\t {\n\t DeviceDescriptor descriptor = new DeviceDescriptor();\n\t result = LibUsb.getDeviceDescriptor(device, descriptor);\n\t if (result != LibUsb.SUCCESS) throw new LibUsbException(\"Unable to read device descriptor\", result);\n\t System.out.println(\"vendorId=\" + descriptor.idVendor() + \", productId=\" + descriptor.idProduct());\n\t }\n\t }\n\t finally\n\t {\n\t // Ensure the allocated device list is freed\n\t LibUsb.freeDeviceList(list, true);\n\t }\n\t}", "public void listThreads() {\n\t\tthis.toSlave.println(MasterProcessInterface.LIST_THREADS_COMMAND);\n\t}", "public List<ProductModel> getAllDevices() {\n\t\tSystem.out.println(\"\\nNetworkDevServ-getAllDev()\");\r\n\t\treturn deviceData.getAllDevices();\r\n\t}", "List<PCDevice> getAllPC();", "public List<Device> getRunningDevices();", "List<DeviceDetails> getDevices();", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Device> \n getDevicesList();", "public List<ServerHardware> getServers();", "public void getSystemInfo(){\n //get system info\n System.out.println(\"System Information\");\n System.out.println(\"------------------\");\n System.out.println(\"Available Processors: \"+Runtime.getRuntime().availableProcessors());\n System.out.println(\"Max Memory to JVM: \"+String.valueOf(Runtime.getRuntime().maxMemory()/1000000)+\" MB\");\n System.out.println(\"------------------\");\n System.out.println();\n }", "public static void outputAllTrunedOnDevices() {\n for (ElectricalHomeDevice device : allTrunedOnDevices){\n System.out.println(device);\n }\n System.out.println();\n }", "public void print_dev() {\n\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\t\t\"[System] 펫 정보입니다.\\n 이름 : \"+TMGCSYS.tmgcName\r\n\t\t\t\t\t\t\t\t+\t\", 레벨 : \"+TMGCSYS.tmgcLV+\", 경험치 : \"+TMGCSYS.tmgcEXP+\"/\"+(100*TMGCSYS.tmgcLV)\r\n\t\t\t\t\t\t\t\t+\t\", 체력 : \"+TMGCSYS.tmgcHP+\", 스트레스 : \"+TMGCSYS.tmgcStress+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Function Limit Count\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Eat : \"+TMGCSYS.tmgcLimitEat+\", Sleep : \"+TMGCSYS.tmgcLimitSleep\r\n\t\t\t\t\t\t\t\t+\t\", Walk : \"+TMGCSYS.tmgcLimitWalk+\", Study : \"+TMGCSYS.tmgcLimitStudy+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Ability\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" STR : \"+TMGCSYS.tmgcSTR+\", INT : \"+TMGCSYS.tmgcINT\r\n\t\t\t\t\t\t\t\t+\t\", DEB : \"+TMGCSYS.tmgcDEB+\", HET : \"+TMGCSYS.tmgcHET+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Job : \"+TMGCSYS.tmgc2ndJob\r\n\t\t\t\t\t\t\t\t);\r\n\t}", "public List<ClientSystem> getAssociatedSystems() {\n\t\treturn registeredSystems;\n\t}", "private void displaySell()\r\n {\r\n\r\n System.out.println(\"To sell:\");\r\n for(HardwareDevice devices: hardwares)\r\n {\r\n\r\n devices.displayDescription();\r\n }\r\n }", "public void displayAll()\n {\n try\n {\n int i=0;\n for(HardwareDevice equip:equipment)\n {\n System.out.println(\"Equipment Number : \"+i);\n i++;\n equip.DisplayHardwareDevice();\n }\n }\n catch(NumberFormatException aE)\n {\n JOptionPane.showMessageDialog(frame, aE.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void printComputerSummary() {\n\t\tfor (Component comp: configuration.values())\n\t\t{\n\t\t\tSystem.out.println(comp.getDescription());\n\t\t}\n\t}", "public List getDevices() {\n return devices;\n }", "public String printPlatform() {\n String str = new String();\n for (int i = 0; i < platform.size() - 1; i++) {\n str += platform.get(i) + \", \";\n }\n str+= platform.get(platform.size() - 1);\n return str;\n }", "java.util.List<io.netifi.proteus.admin.om.Connection> \n getConnectionsList();", "public List<Software> listSoftware() throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn list(Software.class);\n\t}", "public String showAll()\n {\n StringBuilder commandList = new StringBuilder();\n \n for(String command : validCommands.keySet()) \n {\n commandList.append( command + \" \" );\n } //for\n \n return commandList.toString();\n }", "public abstract List<NADevice> getDevices(Context context);", "public void printClientList() {\n uiService.underDevelopment();\n }", "public void printHelpCommands(){\r\n\t\t//Construct the help command output\r\n\t\tprintAsTable(\"exit\",\t\t \t\t\t\t\"Exit the program.\");\r\n\t\tprintAsTable(\"help\",\t\t \t\t\t\t\"Print out the usage.\");\r\n\t\tprintAsTable(\"host\",\t\t\t\t\t\t\"Enumerate all hosts.\");\r\n\t\tprintAsTable(\"host hname info\", \t\t\t\"Show info of host name.\");\r\n\t\tprintAsTable(\"host hname datastore\", \t\t\"Enumerate datastores of host hname.\");\r\n\t\tprintAsTable(\"host hname network\", \t\t\t\"Enumerate networks of host hname.\");\r\n\t\tprintAsTable(\"vm\", \t\t\t\t\t\t\t\"Enumerate all virtual machines.\");\r\n\t\tprintAsTable(\"vm vname info\", \t\t\t\t\"Show info of VM vname.\");\r\n\t\tprintAsTable(\"vm vname on\", \t\t\t\t\"Power on VM vname and wait until task completes.\");\r\n\t\tprintAsTable(\"vm vname off\", \t\t\t\t\"Power off VM vname and wait until task completes.\");\r\n\t\tprintAsTable(\"vm vname shutdown\", \t\t\t\"Shutdown guest of VM vname.\");\t\t\t\r\n\t}", "private void printAllClients() {\n Set<Client> clients = ctrl.getAllClients();\n clients.stream().forEach(System.out::println);\n }", "private void displayRent(){\r\n\r\n System.out.println(\"To rent:\");\r\n for(HardwareDevice devices: hardwares){\r\n\r\n devices.displayDescription();\r\n }\r\n }", "public List<String> getConnectedDevices() {\n if (services.size() == 0) {\n return new ArrayList<String>();\n }\n\n HashSet<String> toRet = new HashSet<String>();\n\n for (String s : services.keySet()) {\n ConnectionService service = services.get(s);\n\n if (service.getState() == ConnectionConstants.STATE_CONNECTED) {\n toRet.add(s);\n }\n }\n\n return new ArrayList<String>(toRet);\n }", "public static List<String> GetDriverOnSystem() {\n\t\tOSType osType = Utils.getOperatingSystemType();\n\t\tswitch (osType) {\n\t\tcase Windows:\n\t\t\treturn GetDriverOnWindows();\n\t\tcase MacOS:\n\t\t\treturn GetDriverOnMacOS();\n\t\tcase Linux:\n\t\t\treturn GetDriverOnMacOS();\n\t\tdefault:\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}", "public String getSystemInfo() {\n listItems();\n return String.format(\"Owner: %s\\nNumber of maximum items: %d\\nNumber of current items: %d\\nCurrent items \" +\n \"stocked: %s\\nTotal money in machine: %.2f\\nUser money in machine: %.2f\\nStatus of machine: %s\", owner,\n maxItems, itemCount, Arrays.toString(itemList), totalMoney, userMoney, vmStatus.getStatus());\n }", "String getControllerSystemDiagnostics(String clientId);", "public static native String JavaGetDeviceSerialList(int Number);", "public List<String> getServices() throws IOException;", "public String[] getVideoDevicesList();", "private void showServices()\n {\n // Remove all of the items from the listField.\n _treeField.deleteAll();\n \n // Get a copy of the ServiceRouting class.\n ServiceRouting serviceRouting = ServiceRouting.getInstance();\n \n // Add in our new items by trolling through the ServiceBook API.\n ServiceBook sb = ServiceBook.getSB();\n ServiceRecord[] records = sb.getRecords();\n \n if( records == null ) \n {\n return;\n }\n \n int rootNode = _treeField.addChildNode( 0, \"Service Records\" );\n \n int numRecords = records.length;\n \n for( int i = 0; i < numRecords; i++ ) \n {\n String name = records[i].getName();\n String description = records[i].getDescription();\n \n if( description == null || description.length() == 0 ) \n {\n description = \"No description available\" ;\n }\n \n String uid = records[i].getUid();\n boolean serialBypass = serviceRouting.isSerialBypassActive( uid );\n\n int newParentNode = _treeField.addChildNode( rootNode, name );\n _treeField.addChildNode( newParentNode, description );\n _treeField.addChildNode( newParentNode, uid );\n _treeField.addChildNode( newParentNode, serialBypass ? \"Serial Bypass: Connected\" : \"Serial Bypass: Disconnected\");\n \n // Perform the check for the Desktop SerialRecord.\n if( name != null && name.equals( \"Desktop\" )) \n {\n _desktopUID = uid;\n }\n }\n \n _treeField.setCurrentNode( rootNode ); // Set the root as the starting point.\n }", "public ArrayList getDeviceInfo();", "public List<Flow> getAll(String system, int software);", "public abstract GraphicsDevice[] getScreenDevices();", "protected List<PCIDevice> probeDevices() {\n final ArrayList<PCIDevice> result = new ArrayList<PCIDevice>();\n rootBus.probeDevices(result);\n return result;\n }", "public static List<String> getHardwareAddresses() {\r\n\t\tList<String> result = new Vector<String>();\r\n\t\ttry {\r\n\t\t\tEnumeration<NetworkInterface> nis = NetworkInterface.getNetworkInterfaces();\r\n\t\t\tif (nis != null) {\r\n\t\t\t\twhile (nis.hasMoreElements()) {\r\n\t\t\t\t\tbyte[] mac = nis.nextElement().getHardwareAddress();\r\n\t\t\t\t\tif ((mac != null) && (mac.length == 6)) {\r\n\t\t\t\t\t\tresult.add(getHardwareAddressAsString(mac));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (SocketException e) {\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public static void systemPropertyTest() {\n\n Properties properties = System.getProperties();\n properties.list(System.out);\n }", "public static void listAllCommands(){\n printLine();\n System.out.println(\" Hello there! Here are all the available commands and their respective formats:\");\n System.out.println(\" To add a deadline: \\\"deadline {Name of task} /by {date} \\\"\");\n System.out.println(\" To add an event: \\\"event {Name of task} /at {date} \\\" \\\");\");\n System.out.println(\" To add an item in todo: \\\"todo {Name of task}\\\" \");\n System.out.println(\" To list out all tasks that you have entered: \\\"list\\\"\");\n System.out.println(\" To filter task by date: \\\"list {date}\\\"\");\n System.out.println(\" To mark a task as completed: \\\"done {index of task in list}\\\"\");\n System.out.println(\" To delete a task: \\\"delete {index of task in list}\\\"\");\n System.out.println(\" To find a task: \\\"find {keyword to be searched }\\\"\");\n printLine();\n }", "private void listWindows() {\n final Component[] components = getComponents();\n final String[] titles = new String[components.length];\n for (int i=0; i<components.length; i++) {\n Component c = components[i];\n String title = String.valueOf(c.getName());\n if (c instanceof JInternalFrame) {\n final JInternalFrame ci = (JInternalFrame) c;\n title = String.valueOf(ci.getTitle());\n c = ci.getRootPane().getComponent(0);\n }\n final Dimension size = c.getSize();\n titles[i] = title + \" : \" + c.getClass().getSimpleName() +\n '[' + size.width + \" \\u00D7 \" + size.height + ']';\n }\n final JInternalFrame frame = new JInternalFrame(\"Windows\", true, true, true, true);\n frame.add(new JScrollPane(new JList<>(titles)));\n frame.pack();\n frame.setVisible(true);\n add(frame);\n }", "public void printAllPorts() {\n\tEnumeration ports = CommPortIdentifier.getPortIdentifiers();\n \n\tif (ports == null) {\n\t System.out.println(\"No comm ports found!\");\n\t return;\n\t}\n \n\t// print out all ports\n\tSystem.out.println(\"printing all ports...\");\n\twhile (ports.hasMoreElements()) {\n\t System.out.println(\"- \" + ((CommPortIdentifier)ports.nextElement()).getName());\n\t}\n\tSystem.out.println(\"done.\");\n }", "@RequestMapping(value = \"/console\", method = RequestMethod.GET)\n @ResponseStatus(value = HttpStatus.OK)\n public List<Console> getAllConsole() {\n return serviceLayer.getAllConsole();\n }", "public List<String> getOutputPortTerminals() {\n\t\treturn outputPortTerminals;\n\t}", "java.util.List<io.netifi.proteus.admin.om.Connection> \n getConnectionList();", "public void list() {\r\n\t\tfor (String key : nodeMap.keySet()) {\r\n\t\t\tNodeRef node = nodeMap.get(key);\r\n\t\t\tSystem.out.println(node.getIp() + \" : \" + node.getPort());\r\n\t\t}\t\t\r\n\t}", "public void showProcesses() {\n\t\tList<RunningAppProcessInfo> infos=am.getRunningAppProcesses();\n\t\tadapter.clear();\n\t\t\n\t\t\n\t\tProcessesListCellData data;\n\t\t\n\t\tfor (RunningAppProcessInfo info : infos) {\n\t\t\t\n\t\t\tdata=new ProcessesListCellData(this,info);\n\t\t\tif (data.appName!=null&&!data.appName.equals(\"\")) {\n\t\t\t\tadapter.addCellData(data);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tMemoryInfo memInfo=new MemoryInfo();\n\t\tam.getMemoryInfo(memInfo);\n\t\tsetTitle(\"进程管理器,可用内存:\"+memInfo.availMem/1024/1024+\"M\");\n\t}", "public synchronized void PrintDisplayList()\t{\n\t\tSystem.out.print(\"\\n\\tCar Model:\"+getModel()+\"\\n\\tBase Price is:\"\n +getBasePrice());\n\t\tfor(OptionSet Temp: opset)\n System.out.print(Temp.DisplayOptionSet());\n }", "@Override\r\n\tpublic List<MySys> getAllSystems() {\n\t\tString sql = \"SELECT * FROM systems ORDER BY sgroup;\";\r\n\t\t\r\n\t\tList<MySys> list = new ArrayList<MySys>();\r\n\t\tList<Map<String,Object>> rows = this.jdbcTemplate.queryForList(sql);\r\n\t\tfor (Map<String, Object> row : rows) {\r\n\t\t\tMySys sys = new MySys();\r\n\t\t\tsys.setId((int)row.get(\"idsystems\"));\r\n\t\t\tsys.setName((String)row.get(\"sysname\"));\r\n\t\t\tsys.setAlias((String)row.get(\"sysalias\"));\r\n\t\t\tsys.setState((int)row.get(\"state\"));\r\n\t\t\tsys.setStatetime((Date)row.get(\"statetime\"));\r\n\t\t\tlist.add(sys);\r\n\t\t}\r\n\t\t\r\n\t\treturn list;\r\n\t}", "public static ArrayList<File> findDevices() {\n return findDevices(\"/dev/\");\n }", "List<CommandInfo> list();", "public Map listServices() throws IOException\n\t{\n\t\treturn request(GET, address(null, null));\n\t}", "public static void printDevices(List<DeviceResponse> list) {\n\t\tSystem.out.println(\"******** DEVICE LIST *********\");\n\n\t\tfor (DeviceResponse response : list) {\n\t\t\tSystem.out.println(response);\n\t\t}\n\n\t\tSystem.out.println(\"******** LIST EX *********\");\n\t}", "public static String traceCpuEnvironment() {\r\n\r\n StringWriter sw = new StringWriter();\r\n PrintWriter pw = new PrintWriter(sw);\r\n pw.println(\"General information: \");\r\n\r\n Properties p = System.getProperties();\r\n\r\n String[] split = p.toString().split(\",\");\r\n\r\n for (String string : split) {\r\n pw.println(string);\r\n }\r\n\r\n return sw.toString();\r\n }", "List<String> getSubProtocols();", "public void searchPorts() {\r\n try {\r\n Enumeration pList = CommPortIdentifier.getPortIdentifiers();\r\n System.out.println(\"Porta =: \" + pList.hasMoreElements());\r\n while (pList.hasMoreElements()) {\r\n portas = (CommPortIdentifier) pList.nextElement();\r\n if (portas.getPortType() == CommPortIdentifier.PORT_SERIAL) {\r\n System.out.println(\"Serial USB Port: \" + portas.getName());\r\n } else if (portas.getPortType() == CommPortIdentifier.PORT_PARALLEL) {\r\n System.out.println(\"Parallel Port: \" + portas.getName());\r\n } else {\r\n System.out.println(\"Unknown Port: \" + portas.getName());\r\n }\r\n portaCOM = portas.getName();\r\n }\r\n System.out.println(\"Porta escolhida =\" + portaCOM);\r\n } catch (Exception e) {\r\n System.out.println(\"*****Erro ao escolher a porta******\");\r\n }\r\n }", "@Override\n\tpublic String displayInfo(String hostname) {\n\n\t\tList<MonitoringInfo> infos = monitoredHosts.get(getFullHostname(hostname));\n\t\treturn infos.stream().map(info -> info.toString()).collect(Collectors.joining(\", \"));\n\n\t}", "public String toString() {\n String msg = \"\\nList of current server connections\\n\";\n for (Object i : connections.keySet().toArray()) {\n msg += connections.get(i).toString();\n }\n return msg;\n }", "@SuppressWarnings(\"finally\")\n\t@Override\n\tpublic Response showSystem() {\n\t\tBaseResponse<NotifyTemplate> br = new BaseResponse<NotifyTemplate>();\n\t\ttry\n\t\t{\n\t\tList<NotifyTemplate> systemList;\n\t\tjdbcTemplate.setDataSource(dataSourceProvider.getDataSource(FiinfraConstants.BU_DEFAULT));\n\t\tsystemList=jdbcTemplate.query(FiinfraConstants.SP_GET_SYSTEM_RECEPIENT_CHANNEL,new Object[]{FiinfraConstants.NOTIFYTYPE_ID} ,new BeanPropertyRowMapper<NotifyTemplate>(NotifyTemplate.class));\n\t\tbr.setResponseListObject(systemList); \n\t\tresponse=FiinfraResponseBuilder.getSuccessResponse(br, null);\n\t\t}\n\t\tcatch (DataAccessException e) {\n\t\t\tresponse = FiinfraResponseBuilder.getErrorResponse(e.getMessage().toString());\n\t\t}\n\t\tfinally\n\t\t{ \n\t\t\treturn response;\n\t\t\t\t} \n\t}", "private void getDevices(){\n progress.setVisibility(View.VISIBLE);\n\n emptyMessage.setVisibility(View.GONE);\n getListView().setVisibility(View.GONE);\n\n // request device list from the server\n Model.PerformRESTCallTask gd = Model.asynchRequest(this,\n getString(R.string.rest_url) + \"?\"\n + \"authentification_key=\" + MainActivity.authentificationKey + \"&operation=\" + \"getdevices\",\n //Model.GET,\n \"getDevices\");\n tasks.put(\"getDevices\", gd);\n }", "public void printAllComputers( ) { \n\t\tint i=1;\n\t\tfor (Computer temp : computers ) {\n\n\t\t\tSystem.out.println(\"Computer number : \"+i);\n\t\t\ttemp.printComputerSummary();\n\t\t\ti++;\n\n\t\t}\n\t}", "public void listThreadGroups() {\n\t\tthis.toSlave.println(MasterProcessInterface.LIST_THREAD_GROUPS_COMMAND);\n\t}", "public static void listImageIOServices() {\n\t\tIIORegistry registry = IIORegistry.getDefaultInstance();\n\t\tlogger.info(\"ImageIO services:\");\n\t\tIterator<Class<?>> cats = registry.getCategories();\n\t\twhile (cats.hasNext()) {\n\t\t\tClass<?> cat = cats.next();\n\t\t\tlogger.info(\"ImageIO category = \" + cat);\n\n\t\t\tIterator<?> providers = registry.getServiceProviders(cat, true);\n\t\t\twhile (providers.hasNext()) {\n\t\t\t\tObject o = providers.next();\n\t\t\t\tlogger.debug(\"ImageIO provider of type \" + o.getClass().getCanonicalName() + \" in \"\n\t\t\t\t\t\t+ o.getClass().getClassLoader());\n\t\t\t}\n\t\t}\n\t}", "private void displayConnections()\n {\n if (agent == null)\n {\n JOptionPane.showMessageDialog(null, \"No Portal Connected\", \"Portal\", JOptionPane.ERROR_MESSAGE);\n }\n else\n {\n String connection = agent.getPortal().getHandle();\n JOptionPane.showMessageDialog(null, connection, \"Portal\", JOptionPane.INFORMATION_MESSAGE);\n }\n }", "private void doViewAllPartners() {\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"***Hors Management System:: System Administration:: View All Partners\");\n\n List<Partner> partners = partnerControllerRemote.retrieveAllPartners();\n\n partners.forEach((partner) -> {\n System.out.println(\"Partner ID:\" + partner.getPartnerId() + \"Partner Name: \" + partner.getName() + \"Password: \" + partner.getPassword());\n });\n\n System.out.println(\"Press any key to continue...>\");\n sc.nextLine();\n }", "public final synchronized String list()\r\n { return a_info(true); }", "public void displayPairedDevices() {\n\t\tBluetoothAdapter mBluetoothAdapter = BluetoothAdapter\n\t\t\t\t.getDefaultAdapter();\n\t\tSet<BluetoothDevice> bondedDevices = mBluetoothAdapter\n\t\t\t\t.getBondedDevices();\n\n\t\tList<String> s = new ArrayList<String>();\n\t\tpairedDevices = new ArrayList<BluetoothDevice>();\n\t\tfor (BluetoothDevice bt : bondedDevices) {\n\t\t\ts.add(bt.getName());\n\t\t\tpairedDevices.add(bt);\n\t\t}\n\t\tListView List = (ListView) findViewById(R.id.paired_devices);\n\n\t\tList.setAdapter(new ArrayAdapter<String>(this, R.layout.device_row, s));\n\t}", "@GET\n @Produces(\"application/json\")\n public List<OsData> listAllOs() {\n return osBO.getAllOs();\n }", "public void ListNetworkInerface() {\n\t\tNETWORK_INTERFACES=JpcapCaptor.getDeviceList(); \r\n\t\ttextArea_1.setText(\"\");\r\n\t\tfor(int i=0;i<NETWORK_INTERFACES.length;i++)\r\n\t\t{\r\n\t\t\t\ttextArea_1.append(\"\\n----------------------------------------------Interface \"+(i+1)+\" Info------------------------------------------\");\r\n\t\t\t\t\r\n\t\t\t\ttextArea_1.append(\"\\n Interface Number \"+(i+1));\r\n\t\t\t\ttextArea_1.append(\"\\n Description \"+NETWORK_INTERFACES[i].name + \"( \"+NETWORK_INTERFACES[i].description+\" )\");\r\n\r\n\t\t\t\ttextArea_1.append(\"\\n DataLink Name : \"+NETWORK_INTERFACES[i].datalink_name + \"( \"+NETWORK_INTERFACES[i].datalink_description+\" )\");\r\n\t\t\t\ttextArea_1.append(\"\\n MAC address : \");\r\n\t\t\t\tbyte R[]=NETWORK_INTERFACES[i].mac_address;\r\n\t\t\t\t\r\n\t\t\t\tfor(int A=0;A<6;A++)\t// \r\n\t\t\t\t{\r\n\t\t\t\t\ttextArea_1.append(Integer.toHexString(R[A] & 0xff)+ \":\");\r\n\t\t\t\t}\r\n\t\t\t\tNetworkInterfaceAddress []INT =NETWORK_INTERFACES[i].addresses;\r\n\t\t\t\t// there are n no of ip address of any particular network interface and we are calculating the info of one only\r\n\t\t\t\ttextArea_1.append(\"\\n IP Address : \"+INT[0].address);\r\n\t\t\t\t//textArea_1.append(\"\\n Subnet Mask : \"+INT[0].subnet);\r\n\t\t\t\t//textArea_1.append(\"\\n Broadcast Address : \"+INT[0].broadcast+\" \\n\");\r\n\t\t\t\t\r\n\t\t\t\tcounter++;\r\n\t\t}\r\n\t}", "public List<T> showAllClients();", "public List<String> getInputportTerminals() {\n\t\treturn inputportTerminals;\n\t}", "public ArrayList<DriverVO> showDriver() throws ClassNotFoundException,\n\t\t\tIOException {\n\t\tmanageVOPO.addLog(LogType.DRIVER_MANAGEMENT);\n\t\tif (driverDataService != null) {\n\t\t\tArrayList<DriverPO> pos = driverDataService.showDriver();\n\t\t\tArrayList<DriverVO> vos = new ArrayList<DriverVO>();\n\t\t\tDriverVO vo;\n\t\t\tfor (DriverPO po : pos) {\n\t\t\t\tvo = manageVOPO.poToVO(po);\n\t\t\t\tvos.add(vo);\n\t\t\t}\n\t\t\treturn vos;\n\t\t} else\n\t\t\tthrow new RemoteException();\n\t}", "public String showAll(){\n\tString msg = \"\";\n\tboolean val = false;\n\tfor(int i =0;i<arch.length && !val;i++){\n\t\tif(arch[i]!=null){\n\t\t\tmsg+=arch[i].getName()+\": \"+arch[i].getDate().getDay()+\" of \"+ arch[i].getDate().getMonth()+\", \";\n\n\t\t}\n\t\telse{\n\t\t\tval=true;\n\t\t}\n\t}\n\treturn msg;\n}", "private static void mostrarListaDeComandos() {\n System.out.println(\"Lista de comandos:\");\n for (int i = 0; i < comandos.length; i++){\n System.out.println(comandos[i]);\n }\n }", "@GetMapping(\"/systems\")\n public String showSystem(){\n return \"systems\";\n }", "public static void main(String[] args) throws IOException {\n\t\tProperties prop = System.getProperties();//系统信息,就是虚拟机启动时加载的信息\n\t\t\n\t\t//System.out.println(prop);\n\t\tprop.list(new PrintStream(\"D:\\\\Java\\\\SystemInfo.txt\"));//list()方法将属性列表输出到指定的输出流\n\t}", "public void printProtocol()\n\t{\n\t\tString commands[] = {\"A\", \"UID\", \"S\", \"F\"};\n\t\t\n\t\tHashtable<String, String> commandDescription = new Hashtable<String, String>();\n\t\tHashtable<String, String> subStringCommands = new Hashtable<String, String>();\n\t\tcommandDescription.put(\"A\", \"Sends audio data using _ as a regex\");\n\t\tcommandDescription.put(\"UID\", \"Specifies the user's id so that the Network.Server may verify it\");\n\t\tcommandDescription.put(\"S\", \"Specifies server commands.\");\n\t\tcommandDescription.put(\"F\", \"Specifies audio format.\");\n\t\tsubStringCommands.put(\"A\", \"No commands\");\n\t\tsubStringCommands.put(\"UID\", \"No sub commands\");\n\t\tsubStringCommands.put(\"S\", \"Sub commands are: \\nclose - Closes the server.\\ndisconnect - Disconnects the client from the server.\\nclumpSize {int}\");\n\t\tsubStringCommands.put(\"F\", \"Split Audio specifications between spaces. The ordering is {float SampleRate, int sampleSizeInBits, int channels, int frameSize, float frameRate\");\n\t\t\n\t\tfor (String str: commands)\n\t\t{\n\t\t\tSystem.out.printf(\"Command format:\\n %s.xxxxxxx\\n\", str);\n\t\t\tSystem.out.printf(\"Command %s\\n Description: %s \\n sub commands %s\\n\", str, commandDescription.get(str),subStringCommands.get(str));\n\t\t\t\n\t\t}\n\t}", "public String getAllRunningServices() {\n return \"\";\n }", "Set<String> listCapabilities();", "public void printInfo(){\n\t\tSystem.out.println(\"id : \" + id + \" label : \" + label);\n\t\tSystem.out.println(\"vms : \" );\n\t\tfor(VirtualMachine v : vms){\n\t\t\tv.printInfo();\n\t\t}\n\t}", "@Override\n public List<CECDevice> scanDevices() {\n sendCommand(\"scan\");\n return CECClientParser.parseScanResult(waitForOutputLine(\"===================\"));\n }", "public List<String> execAdbDevices() {\n System.out.println(\"adb devices\");\n\n List<String> ret_device_id_list = new ArrayList<>();\n Process proc = null;\n try {\n proc = new ProcessBuilder(this.adb_path, \"devices\").start();\n proc.waitFor();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } catch (InterruptedException ire) {\n ire.printStackTrace();\n }\n\n String devices_result = this.collectResultFromProcess(proc);\n String[] device_id_list = devices_result.split(\"\\\\r?\\\\n\");\n\n if (device_id_list.length <= 1) {\n System.out.println(\"No Devices Attached.\");\n return ret_device_id_list;\n }\n\n /**\n * collect the online devices\n */\n String str_device_id = null;\n String device = null;\n String[] str_device_id_parts = null;\n // ignore the first line which is \"List of devices attached\"\n for (int i = 1; i < device_id_list.length; i++) {\n str_device_id = device_id_list[i];\n str_device_id_parts = str_device_id.split(\"\\\\s+\");\n // add the online device\n if (str_device_id_parts[1].equals(\"device\")) {\n device = str_device_id_parts[0];\n ret_device_id_list.add(device);\n System.out.println(device);\n }\n }\n\n return ret_device_id_list;\n }", "public void show(){\n System.out.println(\"Sender:\"+_sender);\n System.out.println(\"Receivers:\");\n for(String receiver: _receivers){\n System.out.println(\" - \" + receiver);\n }\n }", "@Transactional(readOnly = true)\n public List<SystemDTO> findAll() {\n log.debug(\"Request to get all Systems\");\n return systemRepository.findAll().stream()\n .map(systemMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "public List<ServerServices> listServerServices();", "public String listSync() throws IOException {\n\t\treturn listSync(null, null, null, null);\n\t}", "@Override\n\tpublic void showInfo() {\n\t\tSystem.out.println(\"Machine Interface \" + id);\n\t}", "public String displaySystemProperties()\n\t{\n\t\tString displaySystemInfo = \"\";\n\t\tString yourOS = \"\";\n\t\t\n\t\t//Positive\n\t\t//For TestingOnly - By Default, the below line is commented\n\t\t//if (java.lang.System.getProperty(\"os.name\").equalsIgnoreCase(\"Mac OS X\")){\t\n\t\n\t\tif (java.lang.System.getProperty(\"os.name\").equalsIgnoreCase(\"Windows 10\")){\n\t\t\t\n\t\t\tyourOS = \"Positive - Be Awesome. Run on Windows\";\n\t\t\t\n\t\t}\n\t\t\n\t\t//Negative\n\t\t//For Testing - By Default, the below line is commented\n\t\t//else if (java.lang.System.getProperty(\"os.name\").equalsIgnoreCase(\"Mac OS X\")){\n\t\t\n\t\telse if (java.lang.System.getProperty(\"os.name\").equalsIgnoreCase(\"Linux\")){\n\t\t\tyourOS = \"Negative - Linux\";\n\t\t}\n\t\t\n\t\t//Neutral\n\t\telse {\n\t\t\tyourOS = \"Neutral - You've got a decent OS here\";\n\t\t}\n\t\t\n\t\tdisplaySystemInfo = \"Operating System Architecture\\t=>\\t\" + java.lang.System.getProperty(\"os.arch\") +\n\t\t\t\t \"\\nOperating System Name\\t\\t=>\\t\" + java.lang.System.getProperty(\"os.name\") +\n\t\t\t\t \"\\nOperating System Version\\t=>\\t\" + java.lang.System.getProperty(\"os.version\") +\n\t\t\t\t \"\\nUser Account Name\\t\\t=>\\t\" + java.lang.System.getProperty(\"user.name\") +\n\t\t\t\t \"\\nJava Version\\t\\t\\t=>\\t\" + java.lang.System.getProperty(\"java.version\") +\n\t\t\t\t \"\\n\" + yourOS;\n\t\t\n\t\t\n\t\treturn displaySystemInfo;\n\t\t\n\t}", "public static List<String> getAllHardwareAddress() throws SocketException {\n ArrayList<String> addresses = new ArrayList<>();\n Enumeration<NetworkInterface> ifaces = NetworkInterface.getNetworkInterfaces();\n while (ifaces.hasMoreElements()) {\n NetworkInterface iface = ifaces.nextElement();\n byte[] macaddr = iface.getHardwareAddress();\n if (macaddr == null)\n continue;\n String key = String.format(MACADDR_FORMAT, macaddr[0], macaddr[1], macaddr[2], macaddr[3], macaddr[4], macaddr[5]);\n addresses.add(key);\n }\n return addresses;\n }" ]
[ "0.72143096", "0.694447", "0.6709592", "0.6678835", "0.6423593", "0.6415958", "0.6412876", "0.6411067", "0.63112915", "0.62445617", "0.62379205", "0.616999", "0.61472636", "0.6133945", "0.61020225", "0.60552007", "0.6028464", "0.59306574", "0.5884729", "0.5863119", "0.5839375", "0.58157223", "0.58150077", "0.5718872", "0.5708246", "0.56755453", "0.5674648", "0.56699497", "0.5640908", "0.5640432", "0.5637429", "0.5627985", "0.5621901", "0.5617994", "0.56154853", "0.56113434", "0.55990505", "0.55945766", "0.5584037", "0.5581346", "0.5577118", "0.5572398", "0.55596155", "0.55556035", "0.5540728", "0.55347914", "0.55335516", "0.5522962", "0.551194", "0.5509165", "0.5484924", "0.5482142", "0.54818034", "0.5481557", "0.54807854", "0.5480436", "0.5463773", "0.5455823", "0.54509157", "0.543617", "0.5427391", "0.54191446", "0.54075444", "0.5406965", "0.5396972", "0.5395458", "0.53936535", "0.53926206", "0.5392296", "0.5390387", "0.53897953", "0.5367846", "0.53542674", "0.5353588", "0.5341889", "0.5333196", "0.53301996", "0.5324756", "0.531549", "0.53135204", "0.5310552", "0.5309648", "0.5303081", "0.53026783", "0.5298607", "0.5292458", "0.52864397", "0.52841157", "0.5282665", "0.52817506", "0.5261752", "0.5256947", "0.5252391", "0.52454364", "0.5243337", "0.52431214", "0.52424896", "0.5239869", "0.5234463", "0.52333254", "0.52307856" ]
0.0
-1
Remove Blackboard default formatting
private String removeNamePrefix(String sFileName){ int iDateScoreIndex = 0; String sOriginalFileName = ""; iDateScoreIndex = sFileName.indexOf("_attempt_"); sOriginalFileName = sFileName.substring(iDateScoreIndex + 29); return sOriginalFileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearFormats();", "public static String stripFormattingCodes(String str) {\n \treturn str == null ? null : formattingCodesPattern.matcher(str).replaceAll(\"\");\n }", "public void revertColorAndFont()\r\n\t{\r\n\t\trevertColor();\r\n\t\trevertFont();\r\n\t}", "String removeImageStyle();", "public void setToWhite();", "public void reset() {\n _styles.clear();\n _styles.add(TextStyle.DEFAULT);\n }", "public static String stripColors(String str) {\n\t\tstr = str.replaceAll(\"(?i)\\u00A7[0-F]\", \"\");\n\t\tstr = str.replaceAll(\"(?i)&[0-F]\", \"\");\n\t\treturn str;\n\t}", "@Override\n\tpublic KRRFormat format() {\n\t\treturn null;\n\t}", "public final void mo39711K() {\n setBackgroundColor(0);\n }", "@Override\n\tprotected String formatted(Walue _) {\n\t\treturn \"\";\n\t}", "public void unsetFormat()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FORMAT$10, 0);\n }\n }", "public String mo9295bg() {\n return null;\n }", "public static String getDefaultReplaceFormat(boolean nbProject) {\n return nbProject ? DEFAULT_NETBEANS_REPLACE_FORMAT : DEFAULT_STANDARD_REPLACE_FORMAT;\n }", "public String getSlackRepresentationOfBoard() {\n String boardBorders[] = {\"```| \",\n \" | \",\n \" | \",\n \" |\\n|---+---+---|\\n| \",\n \" | \",\n \" | \",\n \" |\\n|---+---+---|\\n| \",\n \" | \",\n \" | \",\n \" |```\"};\n int boardBordersIndex = 0;\n StringBuilder boardString = new StringBuilder();\n for(int row = 0; row < BOARD_SIZE; row ++ ){\n for(int col = 0; col <BOARD_SIZE; col ++ ){\n boardString.append( boardBorders[boardBordersIndex] );\n boardString.append( getTokenAsCharFromBoardPosition(row, col, boardBordersIndex+1));\n boardBordersIndex++;\n }\n }\n boardString.append( boardBorders[boardBordersIndex] );\n return boardString.toString();\n }", "public IconBuilder autoTextColorPreferBlack() {\n\t\tthis.textColor = AUTO_TEXT_COLOR_BLACK;\n\t\treturn this;\n\t}", "public void allOff() {\r\n\t\tsetAllColor(0, 0, 0);\r\n\t}", "@Override\n public Color getFontColor(){\n return Color.BLACK;\n }", "public void black() {\n g2.setPaint(Color.black);\r\n }", "public void cleanBoard(){\n\n for(PositionInBoard position : positionsThatArePainted){\n int i = position.row();\n int j = position.column();\n if ((i+j)%2==0) {\n board[i][j].setBackground(Color.BLACK);\n }\n else {\n board[i][j].setBackground(Color.WHITE);\n }\n\n board[i][j].setText(null);\n board[i][j].setIcon(null);\n }\n positionsThatArePainted.clear();\n }", "public void removeCharacterStyles() {\r\n fStyleBuffer = new StyleBuffer(this, AttributeMap.EMPTY_ATTRIBUTE_MAP);\r\n fTimeStamp += 1;\r\n fDamagedRange[0] = 0;\r\n fDamagedRange[1] = length();\r\n }", "public void revertToSafeDisplay() {\n\t\ttabGroup.revertToSafeDisplay();\n\t}", "private void clearCustom() {\n if (patternCase_ == 8) {\n patternCase_ = 0;\n pattern_ = null;\n }\n }", "public void resetFormato()\r\n {\r\n this.formato = null;\r\n }", "public void makeWhite() {\n\t\t// make all the lines white\n\t\tfor (int i = 0; i < NUM_LINES; i++) {\n\t\t\toutLine[i].setColor(Color.white);\n\t\t}\n\t}", "protected void uninstallDefaults() {\n\t\tLookAndFeel.uninstallBorder(this.controlPanel);\n\t}", "TextStyle negate();", "public void unsetBold()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(BOLD$4, 0);\n }\n }", "default HtmlFormatter removePackages() {\n return replace(\n PACKAGE_PATTERN,\n \"\"\n );\n }", "private void setStyleToDefault() {\n // enable syntax highlighting\n commandTextField.enableSyntaxHighlighting();\n }", "public void CleanScr() {\n\t\tint a = 0;\n\t\twhile (a < 16) {\n\t\t\tR0[a].setSelected(false);\n\t\t\tR1[a].setSelected(false);\n\t\t\tR2[a].setSelected(false);\n\t\t\tR3[a].setSelected(false);\n\t\t\tX1[a].setSelected(false);\n\t\t\tX2[a].setSelected(false);\n\t\t\tX3[a].setSelected(false);\n\t\t\tMAR[a].setSelected(false);\n\t\t\tMBR[a].setSelected(false);\n\t\t\tIR[a].setSelected(false);\n//\t\t\tMem[a].setSelected(false);\n\t\t\ta++;\n\t\t}\n\t\tint b = 0;\n\t\twhile (b < 12) {\n\t\t\tPC[b].setSelected(false);\n\t\t\tb++;\n\t\t}\n\t}", "public void removeExceptionStyle();", "static void trimWhitespace() {\n for (int i = a.size() - 1; i >= 0; i-- ) {\n Object o = a.get(i);\n StringBuilder sb = new StringBuilder();\n if (o instanceof Token)\n sb.append( ((Token)o).image );\n else\n sb.append((String)o);\n while(sb.length() > 0 && (sb.charAt(sb.length() - 1) == '\\u005cr'\n || sb.charAt(sb.length() - 1) == '\\u005cn'\n || sb.charAt(sb.length() - 1) == '\\u005ct'\n || sb.charAt(sb.length() - 1) == ' ')) {\n sb.deleteCharAt(sb.length() - 1);\n }\n if (sb.length() == 0) {\n a.remove(i);\n }\n else {\n a.set(i, sb.toString());\n break;\n }\n }\n if (a.size() == 0) {\n while(outputBuffer.length() > 0 && (outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cr'\n || outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cn'\n || outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005ct'\n || outputBuffer.charAt(outputBuffer.length() - 1) == ' ')) {\n outputBuffer.deleteCharAt(outputBuffer.length() - 1);\n }\n }\n }", "public void clear()\n {\n clear(BLACK);\n }", "protected void uninstallDefaults() {\n LookAndFeel.uninstallBorder(this.controlPanel);\n }", "void unsetLeading();", "public String getDefaultStyleString() {\n/* 552 */ return getCOSObject().getString(COSName.DS);\n/* */ }", "public void set_standard_format () {\n\t\tf_friendly_format = false;\n\n\t\tmainshock_time = 0L;\n\t\tmainshock_mag = 0.0;\n\t\tmainshock_lat = 0.0;\n\t\tmainshock_lon = 0.0;\n\t\tmainshock_depth = 0.0;\n\n\t\treturn;\n\t}", "public void styleforZero() {\r\n\t\t\r\n\t\tsuper.styleforZero();\r\n\t\t\r\n\t}", "public static void clearBoard() {\n\t\tfor(int i = 0; i < display.length; i++){\n\t\t\tfor(int j = 0; j < display[i].length; j++){\n\t\t\t\tdisplay[i][j].setSelected(false);\n\t\t\t\tdisplay[i][j].setIcon(DEFAULT);\n\t\t\t}\n\t\t}\t\n\t\t\n\t}", "public BibFileFormatter() {\n this(\" \");\n }", "public String blackText(String word) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString colorWord = sb.append(ConsoleColour.BLACK).append(word).append(ConsoleColour.RESET).toString();\n\t\treturn colorWord;\n\t}", "GorgeousFormatter() {\r\n\t\t}", "@Override\r\n\tpublic String getColor() {\n\t\treturn \"white\";\r\n\t}", "public void removeAllInternationalStandardRecordingCode() {\r\n\t\tBase.removeAll(this.model, this.getResource(), INTERNATIONALSTANDARDRECORDINGCODE);\r\n\t}", "public void removeAllSeconderyColorsFromBoard() {\n\t\tArrayList<Tile> boardTiles= getAllBoardTiles();\n\t\tif(!this.coloredTilesList.isEmpty()) {\n\t\t\tboardTiles.retainAll(coloredTilesList);\n\t\t\tfor(Tile t :boardTiles) {\n\t\t\t\tTile basicTile= new Tile.Builder(t.getLocation(), t.getColor1()).setPiece(t.getPiece()).build();\n\t\t\t\treplaceTileInSameTileLocation(basicTile);\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tthis.coloredTilesList=null;\n\t\tthis.coloredTilesList=new ArrayList<Tile>();\n\t\tthis.orangeTiles=null;\n\t\tthis.orangeTiles=new ArrayList<Tile>();\n\n\t}", "private void defaultStyle() {\n\t\t//idField.setStyle(\"\");\n\t\tproductNameField.setStyle(\"\");\n\t\tinvField.setStyle(\"\");\n\t\tpriceField.setStyle(\"\");\n\t\tmaxField.setStyle(\"\");\n\t\tminField.setStyle(\"\");\n\t}", "private void resetMBPattern()\n {\n codedBlockPattern = 0;\n }", "@Test\n public void testColorCodeReplacement() {\n String text = \"§aWelcome §eto §7our §6Server§9!\";\n Assert.assertEquals(\"Welcome to our Server!\", stringUtils.removeFormattingCodes(text));\n }", "public IconBuilder autoTextColorPreferWhite() {\n\t\tthis.textColor = AUTO_TEXT_COLOR_WHITE;\n\t\treturn this;\n\t}", "public boolean blackCheck() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isFormatted() {\n\t\treturn false;\n\t}", "private void resetFieldColors() {\r\n userText.setBackgroundColor(ContextCompat.getColor(this, R.color.cleanBackground));\r\n passText.setBackgroundColor(ContextCompat.getColor(this, R.color.cleanBackground));\r\n }", "@ZAttr(id=647)\n public void unsetSkinForegroundColor() throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraSkinForegroundColor, \"\");\n getProvisioning().modifyAttrs(this, attrs);\n }", "@Override\n\tpublic void draw() {\n\t\tif (isWhite){\n\t\t\tSystem.out.print(\"\\u2656\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.print(\"\\u265C\");\n\t\t}\t\t\n\t}", "public void formatFields() {\r\n if( getFunctionType() == TypeConstants.DISPLAY_MODE ){\r\n ratesBaseWindow.btnOK.setEnabled(false);\r\n }\r\n }", "private RowKeyFormat2 suppressMaterializationRowKeyFormat() {\n ArrayList<RowKeyComponent> components = new ArrayList<RowKeyComponent>();\n components.add(RowKeyComponent.newBuilder()\n .setName(\"NAME\").setType(ComponentType.STRING).build());\n components.add(RowKeyComponent.newBuilder()\n .setName(\"ADDRESS\").setType(ComponentType.STRING).build());\n\n // build the row key format\n RowKeyFormat2 format = RowKeyFormat2.newBuilder().setEncoding(RowKeyEncoding.FORMATTED)\n .setSalt(HashSpec.newBuilder().setSuppressKeyMaterialization(true).build())\n .setRangeScanStartIndex(components.size())\n .setComponents(components)\n .build();\n\n return format;\n }", "public static void makeBackgroundGray(){\r\n\t\tStdDraw.clear(StdDraw.LIGHT_GRAY);\r\n\t}", "public String getAutosizingDefault() { return \"--~,--~\"; }", "public void resetShortColors(){\n\t\t\tfor(int i = 0; i < 10; i++){\n\t\t\t\tshortColors[i] = Color.white;\n\t\t\t}\n\t\t\tfor(int i = 0; i < 20; i++){\n\t\t\t\tshortColors[i] = Color.black;\n\t\t\t}\n\t\t}", "public static void resetBoard() {\n\t\tfor (int i = 0; i<3; i++) {\n\t\t\tfor (int j = 0; j<3; j++) {\n\t\t\t\tboard[i][j] = '_';\n\t\t\t}\n\t\t}\n\t\tprintBoard();\n\t}", "private static void clearScreen()\n {\n System.out.print('\\u000C');\n }", "public void nonEditable() {\r\n\t\tzoneAffichage.setEditable(false);\r\n\t\tzoneAffichage.setBackground(Color.WHITE);\r\n\t\tzoneAffichage.setFocusable(false);\r\n\t\tzoneAffichage.setCursor(null);\r\n\t}", "public static Format getTheirDefaultFormat()\n {\n return (Format) theirDefaultFormat.clone();\n }", "public static String getBlackBox()\n\t{\n\t\treturn \"\";//Tongdun.getPhoneInfo();\n\t}", "public void clean() {\n\t\tfor(int i = 0; i <= 20; i++) {\n\t\t\tSystem.out.println(\" \");\n\t\t}\n\t}", "@Override\n public void clearLineColors() {\n assemblyView.clearLinesColor();\n }", "@Override\r\n\tpublic String swim() {\n\t\treturn null;\r\n\t}", "private Format()\n {\n super();\n }", "public String getDefaultAppearance() {\n/* 530 */ return getCOSObject().getString(COSName.DA);\n/* */ }", "@Override\n\tpublic String Pretty_Prints() {\n\t\treturn \"!=\";\n\t}", "@Override\n public String getCSSStyle() {\n return null;\n }", "public void resetToDefault() throws IOException {\n setInverse(false);\n setBold(false);\n setFontDefault();\n setUnderline(0);\n setJustification(0);\n writer.flush();\n }", "public void revertColor()\r\n\t{\r\n\t\tif (savedColor != null)\r\n\t\t{\r\n\t\t\tg.setColor(savedColor);\r\n\t\t}\r\n\t}", "public static void setTheirDefaultFormat(Format fmt)\n {\n theirDefaultFormat = (Format) fmt.clone();\n }", "public void reset() {\n\t\tbg = TetrisDefaults.BGColor;\n\t\ttext = TetrisDefaults.TEXTColor;\n\t\tz = TetrisDefaults.ZColor;\n\t\ts = TetrisDefaults.SColor;\n\t\tleft = TetrisDefaults.LEFTColor;\n\t\tright = TetrisDefaults.RIGHTColor;\n\t\tline = TetrisDefaults.LINEColor;\n\t\ttri = TetrisDefaults.TRIANGLEColor;\n\t\tsquare = TetrisDefaults.SQUAREColor;\n\t\tflash = TetrisDefaults.FLASHColor;\n\t}", "void clear_display(char[][] _display) {\n for (int i = 0; i < 72; i++) {\n for (int j = 0; j < 37; j++) {\n _display[i][j] = ' ';\n }\n }\n }", "public void unsetBoldItalic()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(BOLDITALIC$8, 0);\n }\n }", "public synchronized void resetStyle() {\n \t\tstyleInitialized = false;\n \t}", "public void reset(){\n super.reset();\n this.troef = CardColor.NONE;\n }", "private void formatSystem() {}", "private PrngFixes() {\n }", "void unsetDisplayName();", "private void clearPatch() {\n if (patternCase_ == 6) {\n patternCase_ = 0;\n pattern_ = null;\n }\n }", "public void clearBoard() {\r\n\t\tbody.removeAll();\r\n\t\tpiece.clear();\r\n\t\t\r\n\t\t// Assign1, Remove 'K' label of all pieces\r\n\t\tfor (int i=0; i<blackPieces.length; i++) {\r\n\t\t\tblackPieces[i].setText(null);\r\n\t\t}\r\n\t\tfor (int i=0; i<whitePieces.length; i++) {\r\n\t\t\twhitePieces[i].setText(null);\r\n\t\t}\r\n\t\tbody.repaint();\r\n\t}", "static void trimNL() {\n if(outputBuffer.length() > 0 && outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cn')\n outputBuffer.deleteCharAt(outputBuffer.length() - 1);\n if(outputBuffer.length() > 0 && outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cr')\n outputBuffer.deleteCharAt(outputBuffer.length() - 1);\n }", "@Override\n\tpublic void hideContents() {\n\t\tprogram.setBackground(null);\n\t\tprogram.remove(returnToMain);\n\t\tprogram.remove(congratMessage);\n\t\t\n\t}", "private void drawBlack() throws IOException, ReversiException {\n playSound(PLAY_SOUND);\n // get the list of stones need to be changed\n String list = fromServer.readUTF();\n // draw black the list of stones\n boardComponent.drawBlack(list);\n\n setScoreText();\n\n // followed by the TURN command\n responseToServer();\n }", "@ZAttr(id=647)\n public Map<String,Object> unsetSkinForegroundColor(Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraSkinForegroundColor, \"\");\n return attrs;\n }", "private void removeNoFields() {\n fieldTable.removeStyleName(\"hidden\");\n noFields.addStyleName(\"hidden\");\n }", "private void clearInputFieldStyle(){\n nameInput.styleProperty().setValue(\"\");\n cogInput.styleProperty().setValue(\"\");\n wheelBaseInput.styleProperty().setValue(\"\");\n frontRollDistInput.styleProperty().setValue(\"\");\n cornerWeightFLInput.styleProperty().setValue(\"\");\n cornerWeightRLInput.styleProperty().setValue(\"\");\n cornerWeightRRInput.styleProperty().setValue(\"\");\n cornerWeightFRInput.styleProperty().setValue(\"\");\n }", "private FormatUtilities() {}", "private String trim(StringBuilder formattedString) {\n int maxWidth;\n int cols = consoleMetaData.getCols();\n if (cols > 0) {\n maxWidth = cols - 1;\n } else {\n // Assume 80 wide. This is to minimize wrapping on console where we don't know the width (eg mintty)\n // It's not intended to be a correct solution, simply a work around\n maxWidth = 79;\n }\n if (maxWidth < formattedString.length()) {\n return formattedString.substring(0, maxWidth);\n }\n return formattedString.toString();\n }", "private static void customSettingWhenDisabled(){\n if (format == null) setFormat(false);\n if (!format.equals(\"\")) tick(false); // If the setting is not empty, then use our custom format\n }", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "void setPenColourOff() {\n currentPenColour = Color.BLACK;\n writeFile.writePenOff();\n }", "private void removeUnwantedPadding() {\n if (C.SDK < 21) {\n return;\n }\n\n View view = getView();\n if (view != null) {\n View viewList = view.findViewById(android.R.id.list);\n if (viewList != null) {\n viewList.setPadding(0, 0, 0, 0);\n }\n }\n }", "public void unsetStyleCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(STYLECODE$16);\n }\n }", "public void unsetStyleCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(STYLECODE$16);\n }\n }" ]
[ "0.65574306", "0.6117897", "0.5918954", "0.5866649", "0.5771552", "0.57428205", "0.57163125", "0.569987", "0.5697891", "0.5680549", "0.5652938", "0.5595404", "0.55732846", "0.55609316", "0.55545956", "0.55382156", "0.5489382", "0.547571", "0.54563445", "0.54412", "0.5431486", "0.54201347", "0.54093784", "0.5389739", "0.5375951", "0.5375301", "0.53618276", "0.5361184", "0.53574514", "0.5352535", "0.5330197", "0.5324426", "0.5316051", "0.53133386", "0.5293207", "0.52819216", "0.5261503", "0.52598184", "0.5259178", "0.5258161", "0.5249633", "0.5244508", "0.5230599", "0.52278155", "0.52272695", "0.52264535", "0.52258235", "0.5205415", "0.5204399", "0.51971686", "0.5161057", "0.51597285", "0.5157468", "0.5153362", "0.51513034", "0.5151257", "0.514815", "0.514813", "0.51442164", "0.5143746", "0.51320946", "0.5129995", "0.5127702", "0.5126692", "0.5126259", "0.5120667", "0.5114528", "0.5113368", "0.5102688", "0.5100626", "0.5100518", "0.50996405", "0.5087431", "0.50834197", "0.5080998", "0.5080053", "0.5074501", "0.50724834", "0.506556", "0.50646275", "0.5049484", "0.5030679", "0.5030409", "0.5030304", "0.5029682", "0.50211656", "0.5020943", "0.50145257", "0.5007128", "0.49967787", "0.49925688", "0.4990344", "0.49871108", "0.4986265", "0.4986265", "0.4986265", "0.4986265", "0.49858525", "0.4979679", "0.4977817", "0.4977817" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_matches, container, false); if (getArguments() != null) { teamInfo = getArguments().getParcelable(StaticConfig.TEAM_INFO); player_id = getArguments().getString(StaticConfig.PARAM_PLAYER_ID); } initialiseViews(view); matches_adapter = new Adapter(getActivity(), list); matches_recycler.setAdapter(matches_adapter); matches_recycler.setLayoutManager(new LinearLayoutManager(getActivity())); calendar = Calendar.getInstance(); datePickerDialog = new DatePickerDialog( getActivity(), this, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH)); if (teamInfo != null && teamInfo.getRecentMatches() != null) { LL_date_layout.setVisibility(GONE); matches.addAll(teamInfo.getRecentMatches()); Collections.sort(matches, (o, t1) -> { Match match = o; Match match1 = t1; long millis1 = Utils.getMillisFromMatchDate(match.getFullDatetimeSpaces()); long millis2 = Utils.getMillisFromMatchDate(match1.getFullDatetimeSpaces()); if (millis1 > millis2) return 1; else if (millis1 < millis2) return -1; else return 0; }); list.addAll(matches); if (matches.size() == 0) AppSingleton.getInstance(getActivity()).loadNativeAds(mNativeAds, matches_recycler, matches_adapter, matches, list, NUMBER_OF_NATIVE_ADS_MATCHES); else AppSingleton.getInstance(getActivity()).loadNativeAds(mNativeAds, matches_recycler, matches_adapter, matches, list, NUMBER_OF_NATIVE_ADS_MATCHES); matches_adapter.notifyDataSetChanged(); shimmerFrameLayout.hideShimmer(); shimmerFrameLayout.setVisibility(GONE); } else if (player_id != null) { LL_date_layout.setVisibility(GONE); getPlayerMatches(); } else { handler = new Handler(); runnable = this::getMatches; getMatches(); displayDate(); } getLatestNews(); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6740675", "0.6725193", "0.67224836", "0.6699259", "0.6691596", "0.668896", "0.6687658", "0.66861755", "0.667755", "0.66756433", "0.6667425", "0.66667783", "0.6665166", "0.66614723", "0.66549766", "0.665031", "0.6643759", "0.6639389", "0.66378653", "0.66345453", "0.6626348", "0.66202056", "0.66176945", "0.66094035", "0.65976113", "0.65937936", "0.6585841", "0.6585124", "0.65741223", "0.65721804", "0.65698904", "0.65695107", "0.6569451", "0.6568099", "0.6565633", "0.6554688", "0.65533894", "0.65447044", "0.65432465", "0.6542017", "0.65385425", "0.6537571", "0.65369105", "0.6535379", "0.6533447", "0.6533258", "0.65316767", "0.6529574", "0.6528449", "0.65262675", "0.6525467", "0.6525181", "0.6524235", "0.6523963", "0.65187466", "0.65138274", "0.65137535", "0.6513218", "0.6513202", "0.65115535", "0.651113", "0.6510943", "0.6510124", "0.65094703", "0.65082514", "0.65038425", "0.65023196", "0.6501983", "0.65014684", "0.64982104", "0.64945936", "0.6492533", "0.6491023", "0.6488248", "0.64879525", "0.6487852", "0.6487744", "0.64873713", "0.6487171", "0.64851", "0.6485003", "0.6483167", "0.6482433", "0.64824027", "0.6481711", "0.6480902", "0.64779234", "0.64767206", "0.6476515", "0.6475657", "0.64747864", "0.64715266", "0.64714354", "0.64711314", "0.6470619", "0.6468112", "0.6466466", "0.64631015", "0.646268", "0.6462456", "0.64620507" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { String s = "abc"; //set(s); int n = 5, a = 2, b = 1, c = 5; System.out.println(ropeP(n, a, b, c)); }
{ "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
constructors (use whichever suits your purposes; you can set any part of this class later) Todo: check if the minimum units allowed for enrollment is reached minimal
public Quarter() { // note: null fields exist for this option courses = new ArrayList<Course>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Units()\n\t{\n\t\t// empty for empty unitset\n\t}", "private Units() {\n // Nothing to do\n }", "public ActionProgrammer(String firstName, String lastName,\r\nString socialSecurityNumber, int month, int year, \r\ndouble wage, double pieces) {\r\nsuper(firstName, lastName, socialSecurityNumber, month, year);\r\n\r\nif (wage < 0.0) { // validate wage\r\n throw new IllegalArgumentException(\r\n \"Hourly wage must be >= 0.0\");\r\n}\r\n\r\nif ((pieces < 0.0) || (pieces > 168.0)) { // validate hours\r\n throw new IllegalArgumentException(\r\n \"Hours worked must be >= 0.0 and <= 168.0\");\r\n}\r\n\r\nthis.wage = wage;\r\nthis.pieces = pieces;\r\n}", "public LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS() {}", "public Unit(String name, int calories, String side) {\n super(name);\n this.side = side;\n setStrength(calories);\n setTagged(false);\n bandanas = 1;\n // profile = new Profile();\n setInJail(false);\n column = -1;\n row = -1;\n challenges = 0;\n challengesWon = 0;\n rewards = new ArrayList<Reward>();\n }", "public CampLease( ) {}", "public Course (double creditHours) {\r\n\t\tname = \"A New Course\";\r\n\t\tnumGrade = 0;\r\n\t\tcredithours = creditHours;\r\n\t\tletterGrade = \"\";\r\n\t}", "public Student() {\n\t\tthis.firstName = \"no name entered\";\n\t\tthis.lastName = \"no name entered\";\n\t\tthis.wId = \"no WID\";\n\t\tthis.labScore = 0;\n\t\tthis.projScore = 0;\n\t\tthis.examScore = 0;\n\t\tthis.codeLabScore = 0;\n\t\tthis.finalExamScore = 0;\n\t\tthis.scorePercent = 0;\n\t}", "public Unit (java.lang.Integer unitId) {\n\t\tsuper(unitId);\n\t}", "public UnitsComponent() {\n\t\ttry {\n\t\t\tsetHardwareUnitString(\"\");\n\t\t\tsetUserUnits(\"\");\n\t\t} catch (DeviceException e) {\n\t\t\tlogger.error(\"Code logic error:\", e);\n\t\t}\n\t\tuserUnitHasBeenExplicitlySet = false;\n\t\thardwareUnitHasBeenExplicitlySet = false;\n\t}", "public Instructor(String name, int maxHP, int minAtk,int maxAtk, int timeToAtk){\r\n this.name = name;\r\n this.maxHP = maxHP;\r\n this.minAtk = minAtk;\r\n this.maxAtk = maxAtk;\r\n this.timeToAtk = timeToAtk;\r\n this.currHP = maxHP;\r\n }", "@Test\n public void testPositiveAllocation() {\n Allocation allocation = new Allocation(\n doctors.get(0),\n surgeryRooms.get(0),\n (new Period(50, 10, 15))\n );\n boolean expected = true;\n boolean actual = hospital.allocate(allocation);\n assertEquals(expected, actual);\n }", "public CommissionEmployee(String name, double monthlySales)\n {\n super(name);\n setMonthlySales(monthlySales);\n }", "public ElectricShower() {\r\n\t\tthis(12, 0, 4);\r\n\t}", "public TutorIndustrial() {}", "protected Workman(String name, double salary, String department, double experience, int shiftsAmount) {\n super(name, salary, department, experience);\n if(salary < 0 || experience < 0 || shiftsAmount < 0) {\n throw new IllegalArgumentException();\n }\n this.shiftsAmount = shiftsAmount;\n }", "public Course() {\n term = \"\";\n subject = \"\";\n number = 0;\n newRoom = 0;\n oldRoomLetter = \"\";\n section = new String();\n crossList = new String();\n title = new String();\n faculty = new String();\n building = new String();\n room = \"\";\n startDate = \"\";\n dayTime = new String();\n\n }", "public void testConstructor() {\n Measurement a = new Measurement();\n assertTrue(a.getFeet() == 0);\n assertTrue(a.getInches() == 0);\n \n Measurement b = new Measurement(5);\n assertTrue(b.getFeet() == 5);\n assertTrue(b.getInches() == 0);\n \n Measurement c = new Measurement(4, 3);\n assertTrue(c.getFeet() == 4);\n assertTrue(c.getInches() == 3);\n }", "public Unit(float length, float width, float height, float totalCost, String unitKind, Furniture furniture, Electrictiy electrictiy, Wall wall, Roof roof, Floor floor) {\n this.length = length;\n this.width = width;\n this.height = height;\n this.totalCost = totalCost;\n this.unitKind = unitKind;\n this.furniture = furniture;\n this.electrictiy = electrictiy;\n this.wall = wall;\n this.roof = roof;\n this.floor = floor;\n }", "LengthUnit(double metres) {\n/* 24 */ this.metres = metres;\n/* 25 */ this.dx = new Dx(1.0D, this);\n/* */ }", "@Test\n public void goalCustomConstructor_isCorrect() throws Exception {\n\n int goalId = 11;\n int userId = 1152;\n String name = \"Test Name\";\n int timePeriod = 1;\n int unit = 2;\n double amount = 1000.52;\n\n\n //Create goal\n Goal goal = new Goal(goalId, userId, name, timePeriod, unit, amount);\n\n // Verify Values\n assertEquals(goalId, goal.getGoalId());\n assertEquals(userId, goal.getUserId());\n assertEquals(name, goal.getGoalName());\n assertEquals(timePeriod, goal.getTimePeriod());\n assertEquals(unit, goal.getUnit());\n assertEquals(amount, goal.getAmount(),0);\n }", "public Ingredient(IngredientName name, IngredientUnit unit, IngredientPrice price, MinimumUnit minimum,\n NumUnits numUnits) {\n requireAllNonNull(name);\n this.name = name;\n this.unit = unit;\n this.price = price;\n this.minimum = minimum;\n this.numUnits = numUnits;\n }", "public Student(int level, String first, String last, long gnum, String major, \n String degree) {\n // TODO initialize the instance variables\n // Also use the parameter variable \"level\" as follows\n // 1) use its value to initialized the PROGRAM constant\n // 2) create the transcripts array to be of size [50] if is level 0, \n // or to be of size [15] if level is 1. \n // note that level refers to the student type and we use a value of 0 for \n // an undergrad and a value of 1 for a grad\n PROGRAM = level;\n this.first = first;\n this.last = last;\n this.gnum = gnum;\n this.major = major;\n this.degree = degree;\n if (PROGRAM == 0){\n transcripts = new TranscriptEntry[50];\n }\n else{\n transcripts = new TranscriptEntry[15];\n }\n }", "public Unit(float length, float width, float height, float totalCost, String unitKind, Furniture furniture, Electrictiy electrictiy, Wall wall, Roof roof, Floor floor, Plumbing plumbing) {\n this.length = length;\n this.width = width;\n this.height = height;\n this.totalCost = totalCost;\n this.unitKind = unitKind;\n this.furniture = furniture;\n this.electrictiy = electrictiy;\n this.wall = wall;\n this.roof = roof;\n this.floor = floor;\n this.plumbing = plumbing;\n }", "public interface Unit {\n /**\n * Simple getter for unit code<br><br>\n * <b>Preconditions:</b><br>\n * None<br>\n * <b>Postconditions:</b><br>\n * None<br>\n *\n * @return The Unit code.\n */\n public String getCode();\n\n /**\n * Simple getter for unit name<br><br>\n * <b>Preconditions:</b><br>\n * None<br>\n * <b>Postconditions:</b><br>\n * None<br>\n *\n * @return The Unit name.\n */\n public String getName();\n\n /**\n * Enrols the given student in this unit<br><br>\n * <b>Preconditions:</b><br>\n * None<br>\n * <b>Postconditions:</b><br>\n * The student will be enrolled in this unit.<br>\n *\n * @param student The student to enrol. May not be null. May not already be enrolled in this unit.\n * @throws IllegalArgumentException If student is null\n * @throws IllegalStateException If a matching student (by equal SID or unikey) is enrolled already\n */\n public void enrolStudent(Student student) throws IllegalArgumentException, IllegalStateException;\n\n /**\n * Withdraws the given student from this unit<br><br>\n * <b>Preconditions:</b><br>\n * None<br>\n * <b>Postconditions:</b><br>\n * The given student will be withdrawn from this unit.<br>\n *\n * @param student The student to withdraw. May not be null. Must currently be enrolled.\n * @throws IllegalArgumentException If student is null\n * @throws IllegalStateException if no matching student (by equal SID or unikey) is currently enrolled\n */\n public void withdrawStudent(Student student) throws IllegalArgumentException, IllegalStateException;\n\n /**\n * Retrieves a list of students enrolled in this unit.<br><br>\n * <b>Preconditions:</b><br>\n * None<br>\n * <b>Postconditions:</b><br>\n * None<br>\n *\n * @return A list of students represented by their unikey\n */\n public List<String> getStudents();\n\n /**\n * Retrieves a given enrolled student from the unit<br><br>\n * <b>Preconditions:</b><br>\n * None<br>\n * <b>Postconditions:</b><br>\n * None<br>\n *\n * @param match The term to search for.\n * @return The matching enrolled student if one exists, otherwise null. A matching student is one whose SID or unikey matches the given search term.\n */\n public Student getStudent(String match);\n}", "public AssistantProfessor(){\n super();\n m_yearsUntilTenure = -1;\n }", "public NullUnit() {\n super(1, 0, new InvalidLocation(), 0);\n }", "public Course(String n, String i, int m, String in, int s, String l) {\n\t\tname = n;\n\t\tid = i;\n\t\tmaxstudents = m;\n\t\tinstructor = in;\n\t\tsection = s;\n\t\tlocation = l;\n\t}", "public Course()\n\t{\n\t\tstudents = new Student[30];\n\t\tnumStudents = 0;\n\t}", "Unit() {\n\t\tthis(new Apfloat(\"0.0\", APFLOATPRECISION), SCALAR, 1);\n\t}", "Unit(Apfloat unitIn, UnitType utIn) {\n\t\tthis(unitIn, utIn, 1);\n\t}", "public UnitSetLoader()\n\t{\n\t // Empty Constructor\n\t}", "public void testCtor1Accuracy() {\n ContestEligibilityValidatorException exception = new ContestEligibilityValidatorException();\n assertNotNull(\"Unable to instantiate ContestEligibilityValidatorException.\", exception);\n }", "public Units(int unitID, String unitName, int credits) {\n this.unitName = unitName;\n this.credits = credits;\n this.unitID = unitID;\n }", "public LaboratoryBatteryOrganizer() {\n\t\tsuper();\n\t}", "public Details() {\r\n\t\tthis.GPA = 0.0;\r\n\t\tthis.passed = false;\r\n\t\tcoursesTaken = new ArrayList<CourseTaken>();\r\n\t}", "public Student()\n {\n lname = \"Tantiviramanond\";\n fname = \"Anchalee\";\n grade = 12;\n studentNumber = 2185;\n }", "public Units(String unitName, int credits) {\n this.unitName = unitName;\n this.credits = credits;\n }", "public Competence() {\r\n\t\tsuper();\r\n\t}", "public EcriveurMetierTest() {\r\n\t\t\r\n\t\tsuper();\r\n\t\t\r\n\t}", "public void setUnits(byte units) { this.units = units; }", "public DCU() {\r\n meters = new ArrayList<Meter>();\r\n id = \"unknown\";\r\n }", "public PublicCashPenaltyRowImpl() {\n }", "public RegularUnit(Location location, int length, int width, int height){\n // initialise instance variables\n super(location, length, width, height, TYPE);\n }", "public Student() { //Default Constructor\n\t\tthis.roll_no=0;\n\t\tthis.full_name=\"\";\n\t\tthis.grade=\"\";\n\t}", "public Loan() {\n this(2.5, 1, 1000);\n }", "public Loyalty() {}", "@Test\n public void constructorComplete() {\n final String NAME = \"name\";\n final String PICTURE = \"pic\";\n final Integer POSITION = 5;\n final Integer STATUS = 1;\n final CourseType courseType = new CourseType(NAME, PICTURE, POSITION, STATUS);\n\n assertNull(courseType.getId());\n assertSame(NAME, courseType.getName());\n assertSame(PICTURE, courseType.getPicture());\n assertSame(POSITION, courseType.getPosition());\n assertSame(STATUS, courseType.getStatus());\n assertNull(courseType.getCourses());\n assertNull(courseType.getAllowedDishes());\n }", "public void setUnit(Length units) {\n unit = units;\n }", "public Unit10(String name)\n {\n \n this.name = name;\n \n \n }", "public Competence(){\n this(1,new BigValue(Constant.EXP_CHAR));\n }", "private ProfitPerTariffType ()\n {\n super();\n }", "public ProductionPower(){\n this(0, new NumberOfResources(), new NumberOfResources(), 0, 0);\n }", "@Test\n public void testConstructor() {\n final double DELTA = 0; //Used for stating precision of assertEquals for 2 doubles\n //Currently it's set to 0 which means the 2 doubles have to be the exact same\n\n System.out.println(\"\\nStarting GradeType Test: constructor\");\n\n GradeType gt = new GradeType(1, \"A+\", 4.5);\n assertNotNull(gt);\n assertEquals(\"ID was assigned incorrectly\", 1, gt.getId());\n assertEquals(\"Name was assigned incorrectly\", \"A+\", gt.getName());\n assertEquals(\"Points was assigned incorrectly\", 4.5, gt.getPoints(), DELTA);\n\n System.out.println(\"Finished GradeType Test: constructor\");\n }", "@Test\n public void purchaseCustomConstructor_isCorrect() throws Exception {\n\n int purchaseId = 41;\n int userId = 99;\n int accountId = 6541;\n double price = 99.99;\n String date = \"02/19/2019\";\n String time = \"12:12\";\n String category = \"test category\";\n String location = \"test location\";\n String comment = \"test comment\";\n\n //Create empty purchase\n Purchase purchase = new Purchase(purchaseId, userId, accountId, price, date, time, category, location, comment);\n\n // Verify Values\n assertEquals(purchaseId, purchase.getPurchaseId());\n assertEquals(userId, purchase.getUserId());\n assertEquals(accountId, purchase.getAccountId());\n assertEquals(price, purchase.getPrice(), 0);\n assertEquals(date, purchase.getDate());\n assertEquals(time, purchase.getTime());\n assertEquals(category, purchase.getCategory());\n assertEquals(location, purchase.getLocation());\n assertEquals(comment, purchase.getComment());\n }", "@Test\n public void testElfConstructor()\n {\n Elf elf1 = new Elf();\n assertTrue(elf1.getHealth() <= elf1.getMaxHP());\n assertTrue(elf1.getHealth() >= elf1.getMinHP());\n assertTrue(elf1.getStrength() <= elf1.getMaxStr());\n assertTrue(elf1.getStrength() >= elf1.getMinStr());\n }", "Quantity createQuantity();", "public CDAccount() {\r\n\t\t//termOfCD = 0;\r\n\t\t//maturityDate = new DateInfo();\r\n\t}", "public UnitConverter() {\r\n getParameters();\r\n }", "public BFUnit(){\n \n }", "public AccrualRule(){}", "@Override\n protected UnitsNeeded calculateUnitsNeeded() {\n long firetrucks = 0;\n long policecars = 0;\n switch (this.getSize()) {\n case LOCAL:\n firetrucks = 1;\n break;\n case HOUSE:\n firetrucks = 2;\n policecars = 1;\n break;\n case FACILITY:\n firetrucks = 4;\n policecars = 3;\n }\n try {\n DispatchUnitsConstraint fir = new NumberDispatchUnitsConstraint(new FiretruckFireSizeValidator(this.getSize()), firetrucks);\n DispatchUnitsConstraint amb = new NumberDispatchUnitsConstraint(new TypeUnitValidator(Ambulance.class), this.getNumberOfInjured() + this.getTrappedPeople());\n DispatchUnitsConstraint pol = new NumberDispatchUnitsConstraint(new TypeUnitValidator(Policecar.class), policecars);\n UnitsNeeded un = new UnitsNeeded(this, new AndDispatchUnitsConstraint(fir, amb, pol));\n un.pushPolicy(new FireSizeDispatchPolicy(un,new ASAPDispatchPolicy(un)));\n return un;\n } catch (InvalidEmergencyException ex) {\n //we assume this can't happen\n Logger.getLogger(Robbery.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidDispatchUnitsConstraintException ex) {\n //we assume this can't happen\n Logger.getLogger(Robbery.class.getName()).log(Level.SEVERE, null, ex);\n } catch (NumberOutOfBoundsException ex) {\n //we assume this can't happen\n Logger.getLogger(Robbery.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidUnitValidatorException ex) {\n //we assume this can't happen\n Logger.getLogger(Robbery.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidClassException ex) {\n //we assume this can't happen\n Logger.getLogger(Robbery.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidConstraintListException ex) {\n //we assume this can't happen\n Logger.getLogger(TrafficAccident.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidDispatchPolicyException ex) {\n //We assume this can't happen\n Logger.getLogger(Fire.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidUnitsNeededException ex) {\n //We assume this can't happen\n Logger.getLogger(Fire.class.getName()).log(Level.SEVERE, null, ex);\n }\n //should never be returned.\n return null;\n }", "public LogicUnit(int width) {\n super(\"LogicUnit\", width);\n }", "public CheckingAcoount(String accountHolder, long accountNum, double balance) {\n // super to have parent class constructor !\n super(accountHolder, accountNum, balance);\n }", "public Simulator(int startYear)\n {\n // Model instantiation parses all of the XML and CSV.\n //\n LOGGER.info(\"Loading and initializing model\");\n model = new Model(startYear);\n model.instantiateRegions();\n\n\n\n LOGGER.info(\"Starting Simulator: year=\"+startYear);\n\n if ((startYear < Constant.FIRST_YEAR || startYear > Constant.LAST_YEAR) ||\n ((Constant.LAST_YEAR - startYear) % 3 != 0))\n {\n String errMsg = \"Simulator(startYear=\" + startYear +\n \") start year must be less than \" + Constant.LAST_YEAR +\n \" and must be a non-negative integer multiple of 3 years after \" + Constant.FIRST_YEAR;\n LOGGER.severe(errMsg);\n throw new IllegalArgumentException(errMsg);\n }\n\n for (EnumRegion playerRegion : EnumRegion.US_REGIONS)\n {\n playerDeck[playerRegion.ordinal()] = new CardDeck(playerRegion);\n }\n }", "public Units(Collection<Unit> units)\n\t{\n\t\tfor (Unit unit : units)\n\t\t{\n\t\t\tadd(unit);\n\t\t}\n\t}", "public Loyalty(int l)\r\n\t{\r\n\t\tvalue = l;\r\n\t}", "@Test\n\tpublic void testCorporateTrainingOfPositiveCostValues() \n\t{\n\t\tTraining GetOrderValue = new CorporateTraining(15, \"Oracle\", 10000, 100); \t//upcasting\n\t\tassertEquals(1000000,GetOrderValue.getOrderValues(),0);\n\t}", "public StudentRecord()\n\t{\n\t\tboolean isValid;\n\t\tisValid = setStudentRecord(DEFAULT_QUIZ1, DEFAULT_QUIZ2, DEFAULT_QUIZ3, DEFAULT_MIDTERM, DEFAULT_FINAL);\n\t\t\n\t\tif(!isValid)\n\t\t{\n\t\t\tSystem.out.println(\"ERROR: bad grade in default StudentRecord()\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public ResolutionUnitTag()\r\n\t{\r\n\t\tthis(INCH);\r\n\t}", "public Q1PrivateStudent() {\n\t\tthis(\"No Name\", 000, \"Not Set\");\n\t}", "public Education() {}", "public Student()\r\n {\r\n // initialise variables with defult values\r\n ID=-1;\r\n Name=null;\r\n University=null;\r\n Department=null;\r\n term=0;\r\n cgpa=0.0;\r\n Gpa=new double[10];\r\n Creditsandgrades=new double[10][10][10];\r\n }", "public StudentFee() {\n }", "public Bedroom(int number, int capacity , TypesOfBedrooms type, int nightlyrate) {\n super(capacity);\n this.number = number;\n this.type = type;\n this.nightlyrate = nightlyrate;\n this.guests = new ArrayList<Guest>();\n }", "public LacyCastle()\r\n {\r\n clearRooms();\r\n createRooms();\r\n }", "public Student() {\r\n\t\t\r\n\t\t//populating country options\r\n\t\t//can also be done using a properties file\r\n\t\t\r\n\t\t/*\r\n\t\t * countryOptions = new LinkedHashMap<String, String>();\r\n\t\t * \r\n\t\t * countryOptions.put(\"BR\", \"Brazil\"); countryOptions.put(\"IN\", \"India\");\r\n\t\t * countryOptions.put(\"US\", \"United States\"); countryOptions.put(\"CA\",\r\n\t\t * \"Canada\");\r\n\t\t */\r\n\t\t\r\n\t\t\r\n\t}", "public CheckingAccount (double openingBalance) {\n\t\t//super(openingBalance; INT_RATE);\n\t\tsuper(openingBalance);\n\t}", "public HourlyWorker () {\r\n super ();\r\n hours = -1;\r\n hourlyRate = -1;\r\n salary = -1;\r\n }", "public LesserDemandDetail() {\n //For serialization.\n }", "private UnitsErrorStrings() {\n }", "public Classroom()\n { \n // Create a new world with 10x6 cells with a cell size of 130x130 pixels.\n super(10, 6, 130); \n prepare();\n }", "public Unit() {\n\t\tthis.set();\n\t}", "public Student() {\r\n\t\tScanner in=new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter Student first name: \");\r\n\t\tthis.firstName=in.nextLine();\r\n\t\tSystem.out.print(\"Enter Student last name: \");\r\n\t\tthis.lastName=in.nextLine();\r\n\t\tSystem.out.print(\"1.Infant\\n2.child\\n3.junior\\n4.senior\\nEnter student class level: \");\r\n\t\tthis.gradeYear=in.nextInt();\r\n\t\r\n\t\tsetStudentId();\r\n\t\t\r\n\t\t\r\n\t}", "public Workout(String exercise, int minutes){\n this.exercise = exercise;0\n this.minutes = minutes;\n\n }", "public Unitmandr (java.lang.Integer unitmandrId) {\n\t\tsuper(unitmandrId);\n\t}", "public OrgUnit (java.lang.Long _id) {\n this.setId(_id);\n initialize();\n }", "public void setUnits(String units) {\n this.units = units;\n }", "public void setUnits(String units) {\n this.units = units;\n }", "public SalesEmployee(){\n\t\tfirstName = \"unassigned\";\n\t\tlastName = \"unassigned\";\n\t\tppsNumber = \"unassigned\";\n\t\tbikeEmployeeNumber++;\n\t}", "public SalesEmployee(String firstName, String lastName, String number, double salary, double commission){\r\n this.firstname = firstName;\r\n this.lastname = lastName;\r\n this.number = number;\r\n this.salary = salary;\r\n this.commission = commission;\r\n }", "public NegativeUnitsException(double u)\r\n\t{\r\n\t\tsuper(\"Negative number given for units.\" + u);\r\n\t}", "public SavingsAccount()\n {\n super();\n this.interestRate = DEFAULT_RATE;\n System.out.println(\"Constructor is called.\");\n }", "ProductUnit() {\n _elements = new Element[0];\n }", "public LaundryCard() {\n\t}", "Elevator() {\n _currentFloor = Floor.FIRST;\n _passengersOnboard = 0;\n _directionOfTravel = DirectionOfTravel.UP;\n\n }", "protected double minimumCostPerUnitDistance( ) {\n\t\treturn 0.0;\n\t}", "public Employee(){\r\n this(\"\", \"\", \"\", 0, \"\", 0.0);\r\n }", "public Employee() throws OutOfRangeException { //default constructors have no parameters\n\t\t//must create a default constructor, if a subclass is created\n\t\tthis(\"\",\"\",10.0f,40);\n\t\temployeeCount++;\n\t}", "public UnitP\n (\n Object numberX, Units unit, Prefix prefix, \n ExceptionHandlingTypes exceptionHandling\n )\n {\n \tthis(numberX, unit, prefix, exceptionHandling, PrefixUsageTypes.DefaultUsage);\n }" ]
[ "0.62710583", "0.60680556", "0.59581393", "0.5869845", "0.5723745", "0.56848264", "0.56667924", "0.5561087", "0.5559914", "0.55399084", "0.552748", "0.54994446", "0.5471642", "0.5470993", "0.54708195", "0.54689336", "0.54609597", "0.54608065", "0.54387486", "0.5402266", "0.5395764", "0.5388994", "0.53845257", "0.5365272", "0.53637", "0.53552777", "0.53529227", "0.5352685", "0.53500783", "0.5345953", "0.53334165", "0.53324485", "0.5325669", "0.53242356", "0.53228366", "0.53192484", "0.53149307", "0.53131473", "0.5312962", "0.53108555", "0.5308222", "0.5308008", "0.5306934", "0.5302004", "0.5301879", "0.5295516", "0.5292593", "0.5287523", "0.5284222", "0.5283808", "0.5274912", "0.52713126", "0.5256045", "0.52489716", "0.5233316", "0.5232925", "0.52325606", "0.5232078", "0.5230079", "0.5228235", "0.52234805", "0.5214487", "0.5209302", "0.5206777", "0.52053493", "0.5205186", "0.52051127", "0.5203626", "0.51984173", "0.51982766", "0.51977044", "0.51973236", "0.5195843", "0.51938546", "0.5192549", "0.518745", "0.51853096", "0.5184518", "0.5182868", "0.51802576", "0.5174862", "0.51722354", "0.5162112", "0.515823", "0.5153527", "0.5148083", "0.51480633", "0.51435417", "0.51435417", "0.513881", "0.5138154", "0.5132343", "0.51231146", "0.51202554", "0.5117941", "0.5115861", "0.51133907", "0.51127154", "0.5104898", "0.51033115" ]
0.52377534
54
get combined units of all classes in the quarter
public double getTotalUnits() { int total = 0; for(int i = 0; i < courses.size(); i++) { // don't count if units are null? idk how defensive I need to be (I choose not to check, units should never be null) // TODO: test with System.out Course course = courses.get(i); //if(!course.getUnits().equals(null)) total += course.getUnits(); } return total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getTotalUnits() {\n double totalUnits = 0;\n for (int i = 0; i < quarters.size(); i++) {\n totalUnits += quarters.get(i).getTotalUnits();\n }\n return totalUnits;\n }", "public String getQuarter() {\r\n return quarter;\r\n }", "public int getQuarter () {\n return NQuarter;\n }", "public Integer getQuarter() {\r\n return QTR;\r\n }", "String getUnits();", "String getUnits();", "String getUnits();", "Units getUnits();", "public int getQuarters()\n {\n\treturn quarters;\n }", "List<Quarter> getQuarterList(Integer cityId)throws EOTException;", "String getUnitsString();", "private String getResultUnit() {\n switch (mCalculationType) {\n case CONSUMPTION_L_100_KM:\n return \"l/100 km\";\n case CONSUMPTION_KM_L:\n return \"km/l\";\n case CONSUMPTION_MPG:\n return \"mpg\";\n default:\n return \"\";\n }\n }", "public abstract Unit getUnits( int dimension );", "public ucar.nc2.units.DateUnit getTimeUnits();", "public int[] findQuarterBounds(int[] datesJulian, int numQuarters) {\n int numTransactions = datesJulian.length;\n int[] timeBlock = new int[numTransactions];\n int lowerBound = 0;\n int upperBound = 0;\n\n // Get indices of earliest and latest julianDate\n earliestIndex = MinAndMaxFinder.findEarliestIndex(datesJulian);\n latestIndex = MinAndMaxFinder.findLatestIndex(datesJulian);\n\n int[] year = new int[datesJulian.length];\n int[] month = new int[datesJulian.length];\n int[] dateGreg = new int[2];\n\n // Get the month and year values of all the transaction julianDate\n for (int i = 0; i < datesJulian.length; i++) {\n dateGreg = convertJulianToGregorian(datesJulian[i]);\n year[i] = dateGreg[0];\n month[i] = dateGreg[1];\n }\n\n /* Get the year and month value of the earliest date only\n * to be used as a starting point for the search */\n int y = year[earliestIndex];\n int m = month[earliestIndex];\n\n /* Find the initial lower and upper bounds for the search\n * loop */\n if (m > 0 & m < 4) {\n lowerBound = 0;\n upperBound = 4;\n }\n if (m > 3 & m < 7) {\n lowerBound = 3;\n upperBound = 7;\n }\n if (m > 6 & m < 10) {\n lowerBound = 6;\n upperBound = 10;\n }\n if (m > 9 & m < 13) {\n lowerBound = 9;\n upperBound = 13;\n }\n //System.out.println(\"Number of ... Quarters \" + getNumQuarters());\n /* Search Loop */\n int groupCounter = 1;\n boolean[] indexToExcludeFromSearch = new boolean[numTransactions];\n java.util.Arrays.fill(indexToExcludeFromSearch, false);\n // Iterate for each quarter\n for (int i = 0; i < numQuarters; i++) {\n // Iterate for each transaction\n for (int j = 0; j < numTransactions; j++) {\n if (year[j] == y && (month[j] > lowerBound & month[j] < upperBound) &&\n indexToExcludeFromSearch[j] == false) {\n timeBlock[j] = groupCounter;\n indexToExcludeFromSearch[j] = true;\n }\n } // end inner for\n if (lowerBound == 9 && upperBound == 13) {\n lowerBound = 0;\n upperBound = 4;\n y++;\n } else {\n lowerBound = lowerBound + 3;\n upperBound = upperBound + 3;\n }\n groupCounter++;\n } // end outer for\n groupCounter--;\n setNumQuarters(groupCounter);\n DataPreprocessing split = new DataPreprocessing();\n\n return timeBlock;\n }", "public ArrayList getUnits();", "public void setQuarter(String quarter) {\r\n this.quarter = quarter;\r\n }", "public ArrayList getComUnits();", "public String getUnits() {\n return units;\n }", "protected String getUnits()\n {\n return units;\n }", "public Units getUnitTable();", "public String getUnits() {\n return this.units;\n }", "final Unit getUnits() {\n Unit units = null;\n for ( int i = getDimension(); --i >= 0; ) {\n final Unit check = getUnits( i );\n if ( units == null )\n units = check;\n else if ( !units.equals( check ) )\n return null;\n }\n return units;\n }", "public String getUnits() {\n return units;\n }", "public abstract StringDt getUnitsElement();", "@Override\n\tpublic void endOfQuarter(int quarter) {\n\t\t\n\t}", "public static Quantile[] getQuantiles(ArrayList<StatisticClass> classes, float[] classMiddles, float[] relativeOccurences)\n\t\t\tthrows Exception\n\t{\n\t\tQuantile[] quantiles = new Quantile[6];\n\t\tquantiles[0] = new Quantile(-1f, 0.05f);\n\t\tquantiles[1] = new Quantile(-1f, 0.1f);\n\t\tquantiles[2] = new Quantile(-1f, 0.25f);\n\t\tquantiles[3] = new Quantile(-1f, 0.75f);\n\t\tquantiles[4] = new Quantile(-1f, 0.9f);\n\t\tquantiles[5] = new Quantile(-1f, 0.95f);\n\n\t\t// Für jedes gesuchte Quantil...\n\t\tfor (int i = 0; i < quantiles.length; i++)\n\t\t{\n\n\t\t\t// ...zunächst die Klasse finden, in der sich das Quantil befindet\n\t\t\t// (analog wie beim Median)\n\t\t\tfloat currentAlpha = quantiles[i].getAlpha();\n\n\t\t\t//Ri\n\t\t\tfloat currentRelativeShare = 0;\n\t\t\tfloat relativeShareBeforeHit = 0;\n\t\t\t\n\t\t\t//Alpha\n\t\t\tfloat threshholdRelativeShare = currentAlpha;\n\n\t\t\tint classIndexWithQuantile = -1;\n\n\t\t\t//Add the relative shares of the classes until their sum is bigger than the alpha threshhold. \n\t\t\t//The index of the class that was added lastly is the class in which the quantile lies.\n\t\t\tfor (int j = 0; j < relativeOccurences.length; j++)\n\t\t\t{\n\t\t\t\tcurrentRelativeShare += relativeOccurences[j];\n\n\t\t\t\tif (currentRelativeShare >= threshholdRelativeShare)\n\t\t\t\t{\n\t\t\t\t\tclassIndexWithQuantile = j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\trelativeShareBeforeHit = currentRelativeShare;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if a class has been found\n\t\t\tif (classIndexWithQuantile == -1)\n\t\t\t{\n\t\t\t\tthrow new Exception(\n\t\t\t\t\t\t\"Es konnte keine Klasse ermittelt werden, in dem das Quantil \" + threshholdRelativeShare + \" liegt\");\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Quantil \" + currentAlpha + \"liegt in Klasse: \" + classIndexWithQuantile + \" mit Rx:\" + currentRelativeShare);\n\t\t\tSystem.out.println(\"relativer Anteil der vorherigen Klasse: \" + relativeShareBeforeHit);\n\t\t\t\n\t\t\t// Calculate quantile\n\t\t\tfloat z1 = classes.get(classIndexWithQuantile).getLowerValue().value;\n\t\t\tfloat z2 = classes.get(classIndexWithQuantile).getUpperValue().value;\n\t\t\tfloat r1 = relativeShareBeforeHit;\n\t\t\tfloat r2 = currentRelativeShare;\n\t\t\tfloat result = z1 + ((currentAlpha - r1) / (r2 - r1)) * (z2 - z1);\n\n\t\t\tquantiles[i].setValue(result);\n\t\t}\n\n\t\treturn quantiles;\n\t}", "TimeUnit getUnit();", "ChronoUnit getUnit();", "public static Object[] getUnits()\n\t{\n\t\treturn new Object[]\n\t\t{\n\t\t\t// SI units\n\t\t\t\"millimeters\",\n\t\t\t\"centimeters\",\n\t\t\t\"meters\",\n\t\t\t\"kilometers\",\n\t\t\t\n\t\t\t// English units\n\t\t\t\"inches\",\n\t\t\t\"feet\",\n\t\t\t\"yards\",\n\t\t\t\"miles\",\n\t\t\t\"knots\"\n\t\t};\n\t}", "public String getUnit();", "String getUnit();", "public String getUnits() {\r\n\t\treturn units;\r\n\t}", "public java.lang.String getUnits() {\r\n return localUnits;\r\n }", "public int getUnits() {\r\n return units;\r\n }", "public float getQclass() {\n return qclass;\n }", "@Override\n public float getCube() {\n\n int wart = 0;\n if (!roomList.isEmpty()){\n for (Room room : roomList){\n if (room instanceof Localization){\n wart += room.getCube();\n }\n }\n }\n return wart;\n }", "private List<ProductQuantity> getQuantities() {\n List<ProductQuantity> quantities = new ArrayList<>();\n for (int i = 1; i <= QUANTITY_MAX; i++) {\n ProductQuantity q = new ProductQuantity(i, i + \"x\");\n quantities.add(q);\n }\n return quantities;\n }", "public static void numOfWrappersAndCoins(BigDecimal penny, BigDecimal nickel, BigDecimal dime, BigDecimal quarter){\n // Find the approximate number of each individual coin type\n BigDecimal numOfPennies = penny.divide(new BigDecimal(\"2.50\"), RoundingMode.FLOOR);\n BigDecimal numOfNickels = nickel.divide(new BigDecimal(\"5\"), RoundingMode.FLOOR);\n BigDecimal numOfDimes = dime.divide(new BigDecimal(\"2.268\"), RoundingMode.FLOOR);\n BigDecimal numOfQuarters = quarter.divide(new BigDecimal(\"5.670\"), RoundingMode.FLOOR);\n\n /* Find the number of wrappers needed to hold each coin type, num of wrappers is always rounded up, even if the\n last wrapper would be left with some empty space.\n */\n BigDecimal numOfPennyWrappers = numOfPennies.divide(new BigDecimal(\"50\"), 0, RoundingMode.CEILING);\n BigDecimal numOfNickelWrappers = numOfNickels.divide(new BigDecimal(\"40\"),0, RoundingMode.CEILING);\n BigDecimal numOfDimeWrappers = numOfDimes.divide(new BigDecimal(\"50\"), 0, RoundingMode.CEILING);\n BigDecimal numOfQuarterWrappers = numOfQuarters.divide(new BigDecimal(\"40\"), 0, RoundingMode.CEILING);\n\n // Find total estimated value of each coin type\n BigDecimal penniesTotalValue = numOfPennies.multiply(new BigDecimal(\"0.01\"), new MathContext(3));\n BigDecimal nickelsTotalValue = numOfNickels.multiply(new BigDecimal(\"0.05\"), new MathContext(3));\n BigDecimal dimesTotalValue = numOfDimes.multiply(new BigDecimal(\"0.10\"), new MathContext(3));\n BigDecimal quartersTotalValue = numOfQuarters.multiply(new BigDecimal(\"0.25\"), new MathContext(3));\n\n System.out.println(\"Result: \\n\");\n System.out.println(\"Number of Pennies: \" + numOfPennies.intValue() + \"\\nWrappers: \" + numOfPennyWrappers +\n \"\\nTotal estimated value: $\" + penniesTotalValue + \"\\n\");\n System.out.println(\"Number of Nickels: \" + numOfNickels.intValue() + \"\\nWrappers: \" + numOfNickelWrappers +\n \"\\nTotal estimated value: $\" + nickelsTotalValue + \"\\n\");\n System.out.println(\"Number of Dimes: \" + numOfDimes.intValue() + \"\\nWrappers: \" + numOfDimeWrappers +\n \"\\nTotal estimated value: $\" + dimesTotalValue + \"\\n\");\n System.out.println(\"Number of Quarters: \" + numOfQuarters.intValue() + \"\\nWrappers: \" + numOfQuarterWrappers +\n \"\\nTotal estimated value: $\" + quartersTotalValue);\n }", "public String getUnits() {\n\t\treturn units;\n\t}", "private List<List<Q3Peptide>> quantitate()\r\n throws XMLStreamException, IOException\r\n {\r\n File pepXmlFile = new File(pepXmlFilename);\r\n PepXmlLoader loader = new PepXmlLoader(pepXmlFile, _log);\r\n\r\n ArrayList<List<Q3Peptide>> master = new ArrayList<List<Q3Peptide>>();\r\n\r\n try\r\n {\r\n FractionIterator fi = loader.getFractionIterator();\r\n int fractionId = 0;\r\n while (fi.hasNext())\r\n {\r\n fractionId++;\r\n\r\n PepXmlFraction fraction = (PepXmlFraction) fi.next();\r\n\r\n File mzXmlFile = findMzXmlFile(fraction, pepXmlFile);\r\n\r\n if (null == mzXmlFile)\r\n throw new Q3RuntimeException(\"Could not find mzXML file associated with \" + pepXmlFilename + \" fraction number \" + fractionId);\r\n\r\n // Write feature pairs for processing by Q3\r\n List<Q3Peptide> fractionPeps = readFraction(fraction, mzXmlFile);\r\n\r\n // Run Q3 on peptides from this fraction\r\n quantitateFraction(fractionPeps, mzXmlFile.getPath());\r\n\r\n master.add(fractionPeps);\r\n }\r\n }\r\n finally\r\n {\r\n loader.close();\r\n }\r\n return master;\r\n }", "public abstract double calculateQuarterlyFees();", "public FioUnit getUnits() {\n\t\treturn this.units;\n\t}", "public ArrayList getSemUnits();", "public java.math.BigDecimal getQtyPeriod3() \r\n {\r\n return get_ValueAsBigDecimal(\"QtyPeriod3\");\r\n \r\n }", "public Match[] getMaleQuartersWinners() {\n return quart;\n }", "@Override\n public List<ReviewBaseline> getNonGreenProjectsForQuarter(String months, String years) {\n\n return reviewBaselineRepository.getNonGreenProjectsForQuarter(months, years);\n }", "public float getQclass() {\n return qclass;\n }", "public byte getUnits() { return units; }", "public Unit<Length> footSurveyUS() {return footSurveyUS;}", "public Quaternion quatProduct(Quaternion q){\n Quaternion result = new Quaternion();\n double wSample = _w, wRotation = q._w;\n Vector3d v = new Vector3d(_i, _j, _k);\n Vector3d u = new Vector3d(q._i, q._j, q._k);\n result.set_W(wSample * wRotation - v.dot(u));\n Vector3d uScale = new Vector3d(wSample * u.getX(), wSample * u.getY(), wSample * u.getZ());\n Vector3d vScale = new Vector3d(wRotation * v.getX(), wRotation * v.getY(), wRotation * v.getZ());\n Vector3d vCrossU = v.cross(u);\n Vector3d fin = (uScale.plus(vScale)).plus(vCrossU);\n result.set_I(fin.getX());\n result.set_J(fin.getY());\n result.set_K(fin.getZ());\n return result;\n }", "public abstract String getUnit();", "@org.junit.Test\n public void kYearMonthDurationMultiply9() {\n final XQuery query = new XQuery(\n \"3 * xs:duration(\\\"P1Y3M\\\")\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XPTY0004\")\n );\n }", "public Quarter() { // note: null fields exist for this option\n courses = new ArrayList<Course>();\n }", "String getBaseUnit() {\n return baseUnit;\n }", "@org.junit.Test\n public void kYearMonthDurationMultiply8() {\n final XQuery query = new XQuery(\n \"xs:duration(\\\"P1Y3M\\\") * 3\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XPTY0004\")\n );\n }", "public int getUnits()\n {\n return m_cUnits;\n }", "public final ArrayList<Units> GetUnitsForCurrentType()\n {\n return MethodsUnitP.GetUnitsTypeCommon(UnitType);\n }", "public JsonArray getFastFuelOrdersByStationIdAndQuarter(String stationID, String quarter, String year) {\r\n\t\tJsonArray fastFuelOrders = new JsonArray();\r\n\t\tArrayList<String> date = new ArrayList<>();\r\n\t\tdate = createDate(quarter, year);\r\n\t\tString totalPriceOfFuel = \"\";\r\n\t\tString query = \"\";\r\n\t\tStatement stmt = null;\r\n\t\ttry {\r\n\t\t\tif (DBConnector.conn != null) {\r\n\t\t\t\tquery = \"SELECT fuelType, sum(amountOfLitters) as totalAmountOfFuel,sum(totalPrice) as totalPriceOfFuel FROM fast_fuel_orders \"\r\n\t\t\t\t\t\t+ \"WHERE stationID='\" + stationID + \"' AND orderDate between '\" + date.get(0)\r\n\t\t\t\t\t\t+ \" 00:00:00' and '\" + date.get(1) + \" 23:59:59' group by fuelType;\";\r\n\t\t\t\tstmt = DBConnector.conn.createStatement();\r\n\t\t\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\tJsonObject order = new JsonObject();\r\n\t\t\t\t\torder.addProperty(\"fuelType\", rs.getString(\"fuelType\"));\r\n\t\t\t\t\torder.addProperty(\"totalAmountOfFuel\", rs.getString(\"totalAmountOfFuel\"));\r\n\t\t\t\t\ttotalPriceOfFuel = String.format(\"%.3f\", Double.parseDouble(rs.getString(\"totalPriceOfFuel\")));\r\n\t\t\t\t\torder.addProperty(\"totalPriceOfFuel\", totalPriceOfFuel);\r\n\t\t\t\t\tfastFuelOrders.add(order);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Conn is null\");\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn fastFuelOrders;\r\n\r\n\t}", "public String getUnitsString() {\n return units;\n }", "Soldat[][] getUnites();", "public int getUnits() {\n\t\treturn units;\n\t}", "public Projection units(String units) {\n setUnits(units);\n return this;\n }", "public int getUnits()\n {\n return m_cCurUnits;\n }", "String unitsListToString(List<Unit> units);", "@Override\r\n public TimeRational getTimeRational ()\r\n {\r\n return timeRational;\r\n }", "public String getUnits() {\n\t\tif (GridDialog.GRID_UNITS.containsKey(name)) {\n\t\t\treturn GridDialog.GRID_UNITS.get(name);\n\t\t}else {\n\t\t\t//for contributed grid, need to find the units from the ESRIShapefile object\n\t\t\tfor (LayerPanel layerPanel : ((MapApp)map.getApp()).layerManager.getLayerPanels()) {\n\t\t\t\tif (layerPanel.layer instanceof ESRIShapefile && ((ESRIShapefile)layerPanel.layer).equals(this)) {\n\t\t\t\t\tESRIShapefile esf = (ESRIShapefile)(layerPanel.layer);\n\t\t\t\t\treturn esf.getGridUnits();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "public void setQuarters(int q)\n {\n\tthis.quarters = q;\n\tchangeChecker();\n }", "public int getUnits() {\r\n\r\n\t\treturn this.units;\r\n\t}", "public Quantiles getQuantiles() {\n\n double median;\n\n double firstQuantile;\n\n double thirdQuantile;\n\n if (accumulate.size() <= 0) {\n return null;\n }\n calculateTimeDifferences();\n\n sorting.sortList(timeOfChanges);\n\n int npFirstQuantile = (int) (timeOfChanges.size() * 0.25d);\n int npThirdQuantile = (int) (timeOfChanges.size() * 0.75d);\n\n if (timeOfChanges.size() % 2 != 0) {\n median = timeOfChanges.get((timeOfChanges.size() / 2));\n firstQuantile = timeOfChanges.get(npFirstQuantile);\n thirdQuantile = timeOfChanges.get(npThirdQuantile);\n } else {\n median = (timeOfChanges.get((timeOfChanges.size() / 2))\n + timeOfChanges.get(timeOfChanges.size() / 2 - 1)) * 0.5d;\n firstQuantile = (timeOfChanges.get(npFirstQuantile)\n + timeOfChanges.get((npFirstQuantile - 1)) * 0.5d);\n thirdQuantile = (timeOfChanges.get(npThirdQuantile)\n + timeOfChanges.get((npThirdQuantile - 1)) * 0.5d);\n }\n\n LOG_HANDLER.logger.finer(\"Value of Median: \" + median\n + \"FirstQuantile: \" + firstQuantile\n + \" thirdQuantile: \" + thirdQuantile);\n\n return new Quantiles(median, firstQuantile, thirdQuantile);\n\n\n\n }", "List<UnitDTO> getAllUnits();", "public String getUnit() {\n return unit;\n }", "public String getUnit() {\n return unit;\n }", "public String getUnit() {\n return unit;\n }", "public static long[] getRawCasesAndUnits(long units, int UnitsPerSKU) {\n\n\t\tlong ret[] = new long[2];\n\t\tif (UnitsPerSKU != 0) {\n\t\t\tdouble RawCasesDouble = (double) units / (double) UnitsPerSKU;\n\t\t\tString RawCasesString = RawCasesDouble + \"\";\n\t\t\tif (RawCasesString.indexOf(\".\") != -1) {\n\t\t\t\tRawCasesString = RawCasesString.substring(0,\n\t\t\t\t\t\tRawCasesString.indexOf(\".\"));\n\t\t\t}\n\t\t\tlong RawCases = Utilities.parseLong(RawCasesString);\n\n\t\t\tlong RawCasesUnits = RawCases * UnitsPerSKU;\n\n\t\t\tlong bottles = units - RawCasesUnits;\n\n\t\t\tret[0] = RawCases;\n\t\t\tret[1] = bottles;\n\t\t\t\n\t\t}\n\t\treturn ret;\n\t}", "@JSProperty(\"units\")\n @Nullable\n Array<Array<Unknown>> getUnits();", "public List<ClassId> getThirdClasses() {\n\t\tList<ClassId> classes = new ArrayList<>();\r\n\r\n\t\t/*\r\n\t\t * classes.add(ClassId.EVAS_SAINT); classes.add(ClassId.SHILLIEN_TEMPLAR);\r\n\t\t * classes.add(ClassId.SPECTRAL_DANCER); classes.add(ClassId.GHOST_HUNTER);\r\n\t\t * \r\n\t\t * classes.add(ClassId.DREADNOUGHT); classes.add(ClassId.PHOENIX_KNIGHT);\r\n\t\t * classes.add(ClassId.HELL_KNIGHT);\r\n\t\t * \r\n\t\t * classes.add(ClassId.HIEROPHANT); classes.add(ClassId.EVAS_TEMPLAR);\r\n\t\t * classes.add(ClassId.SWORD_MUSE);\r\n\t\t * \r\n\t\t * classes.add(ClassId.DOOMCRYER); classes.add(ClassId.FORTUNE_SEEKER);\r\n\t\t * classes.add(ClassId.MAESTRO);\r\n\t\t */\r\n\r\n\t\t// classes.add(ClassId.ARCANA_LORD);\r\n\t\t// classes.add(ClassId.ELEMENTAL_MASTER);\r\n\t\t// classes.add(ClassId.SPECTRAL_MASTER);\r\n\t\t// classes.add(ClassId.SHILLIEN_SAINT);\r\n\r\n\t\tclasses.add(ClassId.SAGGITARIUS);\r\n\t\tclasses.add(ClassId.ARCHMAGE);\r\n\t\tclasses.add(ClassId.SOULTAKER);\r\n\t\tclasses.add(ClassId.MYSTIC_MUSE);\r\n\t\tclasses.add(ClassId.STORM_SCREAMER);\r\n\t\tclasses.add(ClassId.MOONLIGHT_SENTINEL);\r\n\t\tclasses.add(ClassId.GHOST_SENTINEL);\r\n\t\tclasses.add(ClassId.ADVENTURER);\r\n\t\tclasses.add(ClassId.WIND_RIDER);\r\n\t\tclasses.add(ClassId.DOMINATOR);\r\n\t\tclasses.add(ClassId.TITAN);\r\n\t\tclasses.add(ClassId.CARDINAL);\r\n\t\tclasses.add(ClassId.DUELIST);\r\n\r\n\t\tclasses.add(ClassId.GRAND_KHAVATARI);\r\n\r\n\t\treturn classes;\r\n\t}", "public String getUnit()\n {\n return (this.unit);\n }", "public Unit<? extends Quantity> getUnit(int index) {\n return _elements[index].getUnit();\n }", "public java.math.BigDecimal getQtyPeriod4() \r\n {\r\n return get_ValueAsBigDecimal(\"QtyPeriod4\");\r\n \r\n }", "public String getUnitsString() {\n String result = null;\n if (forVar != null) {\n Attribute att = forVar.findAttributeIgnoreCase(CDM.UNITS);\n if ((att != null) && att.isString())\n result = att.getStringValue();\n }\n return (result == null) ? units : result.trim();\n }", "@org.junit.Test\n public void kYearMonthDurationMultiply6() {\n final XQuery query = new XQuery(\n \"xs:yearMonthDuration(\\\"P3Y3M\\\") * xs:double(\\\"-INF\\\")\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"FODT0002\")\n );\n }", "@Override\r\n public String toString() {\r\n return unit.getName();\r\n }", "public java.math.BigDecimal getQtyPeriod6() \r\n {\r\n return get_ValueAsBigDecimal(\"QtyPeriod6\");\r\n \r\n }", "@Override\n\tpublic String toString() {\n\t\tDecimalFormat df = new DecimalFormat(\"0.00\");\n\t\treturn \"[\" + df.format(ratio1) + \",\" + year + \",\" + df.format(ratio2) + \"],\";\n\t}", "public Match[] getFemaleQuartersWinners() {\n return wquart;\n }", "public static double[] getQuartileData(double data[]) {\r\n\t\t\t\r\n\t\t\tint datLength = data.length;\r\n\t \tdouble[] quartileData = {1, 2, 3};\r\n\t \t\r\n\t \tdouble Q1 = 0, Q3 = 0, IQR = 0;\r\n\t \t\t\r\n\t \t\r\n\t if((datLength % 2) == 0 && !( ((datLength / 2) % 2) == 0)){//good\r\n\t \t\t \r\n\t \tQ1 = data[Math.round(datLength / 4)];\r\n\r\n\t \tQ3 = data[Math.round(datLength * (3/4))];\r\n\t \t \r\n\t \tIQR = Q3 - Q1;\r\n\t \t\r\n\t }\r\n\t else if((datLength % 2) == 0 && ((datLength / 2) % 2) == 0){//good\r\n\t \t\r\n\t \tQ1 = ((data[datLength / 4] + data[(datLength / 4) - 1]) / 2);\r\n\r\n\t \tQ3 = ((data[datLength * (3/4)] + data[(datLength * (3/4)) - 1]) / 2);\r\n\t \t \r\n\t \tIQR = Q3 - Q1;\r\n\t \r\n\t }\r\n\t else if(!((datLength % 2) == 0) && (((datLength - 1) / 2) % 2) == 0){//good\r\n\t \t \r\n\t \tQ1 = (data[(datLength - 1) / 4] + data[(datLength - 1) / 4] - 1) / 2;\r\n\t \r\n\t \tQ3 = (data[datLength * (3/4)] + data[datLength * (3/4) + 1]) / 2;\r\n\t \t \t \r\n\t \tIQR = Q3 - Q1;\r\n\t \t\r\n\t }\r\n\t else if(!((datLength % 2) == 0) && !((((datLength - 1) / 2) % 2) == 0)){//good\r\n\t \t \r\n\t \tQ1 = data[Math.round((datLength - 1) / 4)];\r\n\t \t \r\n\t \tQ3 = data[Math.round((datLength) * (3/4))];\r\n\t \t \t \r\n\t \tIQR = Q3 - Q1;\r\n\t \r\n\t }\r\n\t \r\n\t quartileData[0] = Q1;\r\n\t quartileData[1] = Q3;\r\n\t quartileData[2] = IQR;\r\n\t \t\r\n\t return quartileData;\r\n\t }", "@Override\n\tpublic String getUnitsString() {\n\t\treturn null;\n\t}", "public Unit<Length> kilometre() {return kilometre;}", "private static LocalDate[] getQuarterBounds(final LocalDate date) {\n Objects.requireNonNull(date);\n\n final LocalDate[] bounds = new LocalDate[8];\n\n bounds[0] = date.with(TemporalAdjusters.firstDayOfYear());\n bounds[1] = date.withMonth(Month.MARCH.getValue()).with(TemporalAdjusters.lastDayOfMonth());\n bounds[2] = date.withMonth(Month.APRIL.getValue()).with(TemporalAdjusters.firstDayOfMonth());\n bounds[3] = date.withMonth(Month.JUNE.getValue()).with(TemporalAdjusters.lastDayOfMonth());\n bounds[4] = date.withMonth(Month.JULY.getValue()).with(TemporalAdjusters.firstDayOfMonth());\n bounds[5] = date.withMonth(Month.SEPTEMBER.getValue()).with(TemporalAdjusters.lastDayOfMonth());\n bounds[6] = date.withMonth(Month.OCTOBER.getValue()).with(TemporalAdjusters.firstDayOfMonth());\n bounds[7] = date.with(TemporalAdjusters.lastDayOfYear());\n\n return bounds;\n }", "public double quaterlyHealthInsurance(){\n return (this.healthInsurancePerAnnum*4)/12;\n }", "static Unit<? extends Quantity> getQuotientInstance(Unit<?> left,\n Unit<?> right) {\n Element[] leftElems;\n if (left instanceof ProductUnit<?>)\n leftElems = ((ProductUnit<?>) left)._elements;\n else\n leftElems = new Element[]{new Element(left, 1, 1)};\n Element[] rightElems;\n if (right instanceof ProductUnit<?>) {\n Element[] elems = ((ProductUnit<?>) right)._elements;\n rightElems = new Element[elems.length];\n for (int i = 0; i < elems.length; i++) {\n rightElems[i] = new Element(elems[i]._unit, -elems[i]._pow,\n elems[i]._root);\n }\n } else\n rightElems = new Element[]{new Element(right, -1, 1)};\n return getInstance(leftElems, rightElems);\n }", "public final ArrayList<Units> GetUnitsForCurrentTypeAndSystem()\n {\n return MethodsUnitP.GetUnitsTypeAndSystemCommon(UnitType, UnitSystem);\n }", "public List<InputTermUnit<V>> getUnits() {\n\t\treturn this.units;\n\t}", "List<Pacote> buscarPorQtdDiasMaiorEPrecoMenor(int qtd, float preco);", "public static float[] getClassMiddles(ArrayList<StatisticClass> classes)\n\t{\n\t\tfloat[] results = new float[classes.size()];\n\n\t\tfor (int i = 0; i < classes.size(); i++)\n\t\t{\n\t\t\tfloat a = classes.get(i).getLowerValue().value;\n\t\t\tfloat b = classes.get(i).getUpperValue().value;\n\t\t\tfloat currentClassMiddle = (a + b) / 2;\n\n\t\t\tresults[i] = currentClassMiddle;\n\t\t}\n\n\t\treturn results;\n\t}", "public String getUnit () {\n\treturn this.unit;\n }", "public boolean isMultipleQuarterHour() {\n\n if (this.startTimeArray == null || this.endTimeArray == null) {\n return true;\n }\n long minutes = Duration.between(LocalTime.parse(this.startTimeString), LocalTime.parse(this.endTimeString)).toMinutes();\n\n if (minutes % 15 == 0 && minutes > 15) {\n\n return true;\n\n }\n\n return false;\n\n }", "@Test\n\tpublic void testgetUnits1(){\n\t\tTemperature data = new Temperature (400, Temperature.Units.FAHRENHEIT);\n\t\tassertEquals(data.getUnits() , Temperature.Units.FAHRENHEIT);\n\t}", "public java.math.BigDecimal getQtyPeriod9() \r\n {\r\n return get_ValueAsBigDecimal(\"QtyPeriod9\");\r\n \r\n }" ]
[ "0.6261926", "0.6046109", "0.59936416", "0.5887887", "0.5805992", "0.5805992", "0.5805992", "0.5595087", "0.5591392", "0.5587401", "0.5437739", "0.53907806", "0.5347558", "0.5345145", "0.53291667", "0.5328472", "0.5302866", "0.52444124", "0.52114964", "0.52077603", "0.5205243", "0.51672596", "0.5166016", "0.5146104", "0.51385736", "0.51349753", "0.5131642", "0.512066", "0.5117706", "0.510611", "0.50929964", "0.50825447", "0.5067138", "0.5053196", "0.5042394", "0.50405616", "0.50328654", "0.50254995", "0.501405", "0.5013842", "0.5007167", "0.5006812", "0.49585664", "0.49415094", "0.49399704", "0.49317873", "0.49270117", "0.49241823", "0.4908498", "0.48567906", "0.48403093", "0.48244953", "0.4821848", "0.48193064", "0.48027527", "0.47984496", "0.4797067", "0.4794731", "0.47946957", "0.47924793", "0.4792362", "0.47836962", "0.47763607", "0.4769937", "0.47693473", "0.47502652", "0.47405547", "0.4737217", "0.47369295", "0.47126442", "0.46957728", "0.46824035", "0.46824035", "0.46824035", "0.46787193", "0.46701422", "0.4667477", "0.46657443", "0.46449876", "0.46449104", "0.46405125", "0.4637981", "0.4619393", "0.4619319", "0.46146986", "0.46110138", "0.4610411", "0.46082115", "0.45968044", "0.459561", "0.45951718", "0.459195", "0.45902944", "0.4589407", "0.45880127", "0.45810482", "0.4580692", "0.45804188", "0.45794654", "0.4574807" ]
0.49907574
42
we only check for overdone units
public boolean hasValidUnitNum() { return getTotalUnits() <= 22; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean needUnits(){\n\t\tif(units.size() >= maxUnits){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private boolean checkGreedyEnergy() {\r\n return myTotal.get(2) < 10 || (myTotal.get(2) < 13 && myTotal.get(2) <= enTotal.get(2));\r\n }", "Unit getHasUnit();", "int getToughness(Unit unit);", "private boolean hasOnlyStandardUnit() {\n for (int i = 0; i < _elements.length; i++) {\n Unit<?> u = _elements[i]._unit;\n if (!u.isSI())\n return false;\n }\n return true;\n }", "public void update()\r\n\t{\r\n\t\tList<Unit> deadButNotFinished = new ArrayList<Unit>();\r\n\t\t//first check for dead units\r\n\t\tfor(int i = 0; i < units.size();)\r\n\t\t\tif(units.get(i).getState() == MapItemState.Dead && units.get(i).finished()) {\r\n\t\t\t\towner.notifySweepAndPruneUnitRemoved(units.remove(i));\r\n\t\t\t} else if(units.get(i).getState().equals(MapItemState.Dead)) {\r\n\t\t\t\tdeadButNotFinished.add(units.remove(i));\r\n\t\t\t} else {\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\r\n\t\t//don't do anything if there are no units\r\n\t\tif(units.size() <= 0 && deadButNotFinished.size() <= 0)\r\n\t\t{\r\n\t\t\tinCombat = false;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\r\n\t\t//if(!(units.get(0) instanceof Gate))\r\n\t\t\t//System.out.println(\"Unit position == \" + units.get(0).getPosition().getX() + \", \" + units.get(0).getPosition().getY());\r\n\t\t\r\n\t\t//first get the max radius\r\n\t\tdouble maxRad = 0;\r\n\t\tPosition center = this.getCenter();\r\n\t\tfor(Unit u : units)\r\n\t\t{\r\n\t\t\tdouble rad = Math.sqrt(center.distanceSquared(u.getPosition())) + u.getCombatStrategy().getRange();\r\n\t\t\tif(rad > maxRad)\r\n\t\t\t\tmaxRad = rad;\r\n\t\t}\r\n\t\t\r\n\t\t//this is to prevent units from doing a run by on accident\r\n\t\tif(maxRad < owner.getWidth())\r\n\t\t\tmaxRad = owner.getWidth();\r\n\t\t\r\n\t\tAABB box = new AABB(center.getX() - maxRad, center.getY() - maxRad, \r\n\t\t\t\tcenter.getX() + maxRad, center.getY() + maxRad);\r\n\t\tList<Unit> unitsInRange = owner.getUnitsIn(box);\r\n\t\tList<Unit> alliesInRange = new ArrayList<Unit>();\r\n\t\t//remove friendly units\r\n\t\tfor(int i = 0; i < unitsInRange.size();)\r\n\t\t\tif(unitsInRange.get(i).getOwner().equals(units.get(0).getOwner()))\r\n\t\t\t\talliesInRange.add(unitsInRange.remove(i));\r\n\t\t\telse\r\n\t\t\t\ti++;\r\n\t\t\r\n\t\t//if there are units, we're in combat!\r\n\t\tif(unitsInRange.size() > 0)\r\n\t\t{\r\n\t\t\t//for efficiency reasons\r\n\t\t\tUnit[] unitsInRangeArray = unitsInRange.toArray(new Unit[unitsInRange.size()]);\r\n\t\t\tUnit[] alliesInRangeArray = alliesInRange.toArray(new Unit[alliesInRange.size()]);\r\n\t\t\tfor(Unit u : units)\r\n\t\t\t\tu.getCombatStrategy().fight(unitsInRangeArray, alliesInRangeArray);\r\n\t\t\tinCombat = true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tinCombat = false;\r\n\t\t\t//figure out which direction we're going\r\n\t\t\tboolean forward = true;\r\n\t\t\tif (origin.getTransformation().getPosition().distanceSquared(\r\n\t\t\t\t\towner.getPosition(1).getPosition()) < origin.getTransformation().getPosition()\r\n\t\t\t\t\t.distanceSquared(owner.getPosition(0).getPosition()))\r\n\t\t\t\tforward = false;\r\n\t\t\t\r\n\t\t\t//we're gonna move straight forward because I said so -Connor\r\n\t\t\tdouble wayTheFuckOutThere = 100000000;\r\n\t\t\tdouble min = 1;\r\n\t\t\t\r\n\t\t\t//for efficiency reasons\r\n\t\t\tHashMap<Unit, Transformation> closestPoints = new HashMap<Unit, Transformation>();\r\n\t\t\t\r\n\t\t\t//go through each unit and see how far it's going to go\r\n\t\t\tfor(int i = 0; i < units.size();)\r\n\t\t\t{\r\n\t\t\t\tUnit u = units.get(i);\r\n\t\t\t\tdouble pos = u.getPositionAlongCurve();\r\n\t\t\t\tNode target = owner.getNodes()[0];\r\n\t\t\t\tif(target.equals(origin))\r\n\t\t\t\t\ttarget = owner.getNodes()[1];\r\n\t\t\t\t//check to see if we've made it to the node we're going for\r\n\t\t\t\t//also, don't allow entering the node if the gate is still up\r\n\t\t\t\tif(((forward && Math.abs(1 - pos) <= 0.01) || (!forward && Math.abs(pos) <= 0.01)) && \r\n\t\t\t\t\t\t(owner.getGate(target) == null || owner.getGate(target).getState().equals(MapItemState.Dead) \r\n\t\t\t\t\t\t\t\t|| u.getOwner().equals(owner.getGate(target).getOwner())))\r\n\t\t\t\t{\r\n\t\t\t\t\tif(target.getOwner() == null || target.isContested() || !target.getOwner().equals(u.getOwner()))\r\n\t\t\t\t\t\ttarget.setInvader(u.getOwner());\r\n\t\t\t\t\tu.setTransformation(target.getTransformation());\r\n\t\t\t\t\ttarget.addUnit(u);\r\n\t\t\t\t\towner.notifySweepAndPruneUnitRemoved(units.remove(i));\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t//if we're close enough but the gate isn't down\r\n\t\t\t\telse if((forward && Math.abs(1 - pos) <= 0.01) || (!forward && Math.abs(pos) <= 0.01))\r\n\t\t\t\t{\r\n\t\t\t\t\tTransformation t = owner.getPosition(pos);\r\n\t\t\t\t\tclosestPoints.put(u, t);\r\n\t\t\t\t\tu.setState(MapItemState.Idle);\r\n\t\t\t\t\tu.getMovementStrategy().setTarget(u.getTransformation());\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\r\n\t\t\t\tTransformation t = owner.getPosition(pos);\r\n//\t\t\t\tif(Math.abs(t.getRotation()) < .001){\r\n//\t\t\t\t\tSystem.out.println(\"t's rotation is 0\");\r\n//\t\t\t\t}\r\n\t\t\t\tclosestPoints.put(u, t);\r\n\t\t\t\tdouble angle = t.getRotation();\r\n\t\t\t\tif(!forward)\r\n\t\t\t\t\tangle -= Math.PI;\r\n\t\t\t\tdouble m = u.getMovementStrategy().setTarget(\r\n\t\t\t\t\t\tnew Transformation(u.getPosition().add(\r\n\t\t\t\t\t\t\t\twayTheFuckOutThere * Math.cos(angle),\r\n\t\t\t\t\t\t\t\twayTheFuckOutThere * Math.sin(angle)), angle));\r\n\t\t\t\tif(m < min)\r\n\t\t\t\t\tmin = m;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//go through each unit and set its actual target\r\n\t\t\tdouble dis = wayTheFuckOutThere*min;\r\n\t\t\tfor(int i = 0; i < units.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tdouble angle = closestPoints.get(units.get(i)).getRotation();\r\n\t\t\t\tif(!forward)\r\n\t\t\t\t\tangle -= Math.PI;\r\n//\t\t\t\tTransformation t = owner.getPosition(owner.getClosestPointRatio(closestPoints.get(i)\r\n//\t\t\t\t\t\t\t\t.getPosition().add(dis * Math.cos(angle),dis * Math.sin(angle)))); \r\n\t\t\t\tTransformation t = new Transformation(units.get(i).getPosition().add(dis*Math.cos(angle), dis*Math.sin(angle)), angle);\r\n\t\t\t\tunits.get(i).getMovementStrategy().setTarget(t);\r\n\t\t\t}\r\n\t\t\tinCombat = false;\r\n\t\t}\r\n\t\t\r\n\t\tfor(Unit u : units)\r\n\t\t{\r\n\t\t\tu.getMovementStrategy().move();\r\n\t\t\tu.updateMapItem();\r\n\t\t}\r\n\t\t\r\n\t\t//add the dead but not finished units back in\r\n\t\t//also call update for them so they may finish their abilities\r\n\t\tfor(Unit u : deadButNotFinished)\r\n\t\t{\r\n\t\t\tu.updateMapItem();\r\n\t\t\tunits.add(u);\r\n\t\t}\r\n\t\t\r\n\t\tfor(Unit u : unitsInNeedOfRemoval)\r\n\t\t{\r\n\t\t\tunits.remove(u);\r\n\t\t\towner.notifySweepAndPruneUnitRemoved(u);\r\n\t\t}\r\n\t\tunitsInNeedOfRemoval.clear();\r\n\t}", "boolean getWary(Unit unit);", "protected void checkSize()\n {\n // check if pruning is required\n if (m_cCurUnits > m_cMaxUnits)\n {\n synchronized (this)\n {\n // recheck so that only one thread prunes\n if (m_cCurUnits > m_cMaxUnits)\n {\n prune();\n }\n }\n }\n }", "public String checkSystem() {\r\n\t\tif(currentSheeps > totalSheeps || currentSheeps < 0) {\r\n\t\t\treturn \"inconsistent!\";\r\n\t\t}\r\n\t\telse if(currentSheeps < totalSheeps) {\r\n\t\t\treturn \"incomplete!\";\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn \"complete!\";\r\n\t\t}\r\n\t}", "@Override\n protected UnitsNeeded calculateUnitsNeeded() {\n long firetrucks = 0;\n long policecars = 0;\n switch (this.getSize()) {\n case LOCAL:\n firetrucks = 1;\n break;\n case HOUSE:\n firetrucks = 2;\n policecars = 1;\n break;\n case FACILITY:\n firetrucks = 4;\n policecars = 3;\n }\n try {\n DispatchUnitsConstraint fir = new NumberDispatchUnitsConstraint(new FiretruckFireSizeValidator(this.getSize()), firetrucks);\n DispatchUnitsConstraint amb = new NumberDispatchUnitsConstraint(new TypeUnitValidator(Ambulance.class), this.getNumberOfInjured() + this.getTrappedPeople());\n DispatchUnitsConstraint pol = new NumberDispatchUnitsConstraint(new TypeUnitValidator(Policecar.class), policecars);\n UnitsNeeded un = new UnitsNeeded(this, new AndDispatchUnitsConstraint(fir, amb, pol));\n un.pushPolicy(new FireSizeDispatchPolicy(un,new ASAPDispatchPolicy(un)));\n return un;\n } catch (InvalidEmergencyException ex) {\n //we assume this can't happen\n Logger.getLogger(Robbery.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidDispatchUnitsConstraintException ex) {\n //we assume this can't happen\n Logger.getLogger(Robbery.class.getName()).log(Level.SEVERE, null, ex);\n } catch (NumberOutOfBoundsException ex) {\n //we assume this can't happen\n Logger.getLogger(Robbery.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidUnitValidatorException ex) {\n //we assume this can't happen\n Logger.getLogger(Robbery.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidClassException ex) {\n //we assume this can't happen\n Logger.getLogger(Robbery.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidConstraintListException ex) {\n //we assume this can't happen\n Logger.getLogger(TrafficAccident.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidDispatchPolicyException ex) {\n //We assume this can't happen\n Logger.getLogger(Fire.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidUnitsNeededException ex) {\n //We assume this can't happen\n Logger.getLogger(Fire.class.getName()).log(Level.SEVERE, null, ex);\n }\n //should never be returned.\n return null;\n }", "protected boolean isDiscarded()\n {\n return m_cUnits == -1;\n }", "final Unit getUnits() {\n Unit units = null;\n for ( int i = getDimension(); --i >= 0; ) {\n final Unit check = getUnits( i );\n if ( units == null )\n units = check;\n else if ( !units.equals( check ) )\n return null;\n }\n return units;\n }", "private void checkRep() {\n for (Ball ball : balls) {\n assert ball.getPosition().d1 >= 0\n && ball.getPosition().d1 <= WIDTH - 1;\n assert ball.getPosition().d2 >= 0\n && ball.getPosition().d2 <= HEIGHT - 1;\n }\n for (Gadget gadget : gadgets) {\n assert gadget.getPosition().d1 >= 0\n && gadget.getPosition().d1 <= WIDTH - 1;\n assert gadget.getPosition().d2 >= 0\n && gadget.getPosition().d2 <= HEIGHT - 1;\n }\n\n assert GRAVITY > 0 && MU2 > 0 && MU > 0;\n }", "private Boolean calculateTotalEmission() {\n\t\ttry {\n\n\t\t\tfoodCO2E = Double.valueOf(JTFFood.getText().isEmpty() ? \"0.0\" : JTFFood.getText())\n\t\t\t\t\t* energySourceDetail.get(FoodIntake).get(JCBFoodUnit.getSelectedItem().toString());\n\n\t\t\tlandfillingFoodWasteCO2E = Double\n\t\t\t\t\t.valueOf(JTFLandfillingFoodWaste.getText().isEmpty() ? \"0.0\" : JTFLandfillingFoodWaste.getText())\n\t\t\t\t\t* energySourceDetail.get(LandfillingFoodWaste)\n\t\t\t\t\t\t\t.get(JCBLandfillingFoodWasteUnit.getSelectedItem().toString());\n\n\t\t\tcompostingFoodWasteCO2E = Double\n\t\t\t\t\t.valueOf(JTFCompostingFoodWaste.getText().isEmpty() ? \"0.0\" : JTFCompostingFoodWaste.getText())\n\t\t\t\t\t* energySourceDetail.get(CompostingFoodWaste)\n\t\t\t\t\t\t\t.get(JCBCompostingFoodWasteUnit.getSelectedItem().toString());\n\n\t\t} catch (NumberFormatException ne) {\n\t\t\tSystem.out.println(\"Number Format Exception while calculating House Hold Emission\" + ne);\n\t\t\treturn false;\n\t\t}\n\t\t//\n\t\ttotalFoodCO2E = foodCO2E + landfillingFoodWasteCO2E + compostingFoodWasteCO2E;\n\t\ttotalFoodCO2E = Math.round(totalFoodCO2E * 100D) / 100D;\n\t\treturn true;\n\t}", "public boolean isAllowed( Estimate val ){\n\t\t// check that estimate object and parameter have same units\n\t\t/*Estimate estimate = (Estimate)val;\n if (estimate.getUnits() == null && this.units != null)\n return false;\n else if (this.units == null && estimate.getUnits() != null)\n return false;\n else if (this.units != null && estimate.getUnits() != null &&\n !units.equalsIgnoreCase(estimate.getUnits()))\n return false;*/\n\t\treturn super.isAllowed(val);\n\t}", "@Override\r\n\tpublic int unitsToWagger() {\n\t\treturn 0;\r\n\t}", "private boolean canTakeBandanaFrom(Unit other) {\n return getCalories() >= (2 * other.getCalories());\n }", "@Override\n protected String checkMyRule(OneTerritoryOrder order, GameMap gameMap) {\n if (gameMap.getOwnership().get(order.getSourceTerritory()).getTechnologyLevel() <= order.getLevel()) {\n return \"The player's technology level is not high enough to upgrade the units\";\n }\n return null;\n }", "private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }", "@Test\n public void checkFuelEmpty() {\n Game.getInstance().getPlayer().setSolarSystems(SolarSystems.SOMEBI);\n Game.getInstance().getPlayer().setFuel(0);\n assertFalse(SolarSystems.SOMEBI.canTravel(SolarSystems.ADDAM));\n \n \n \n }", "private static boolean checkSpace(Unit unit, GameMap myMap, SearchNode currentNode, XYCoord coord, boolean ignoreUnits)\n {\n // if we're past the edges of the map\n if( !myMap.isLocationValid(coord) )\n {\n return false;\n }\n // if there is a unit in that space\n if( !ignoreUnits && (myMap.getLocation(coord).getResident() != null) )\n { // if that unit is an enemy\n if( unit.CO.isEnemy(myMap.getLocation(coord).getResident().CO) )\n {\n return false;\n }\n }\n // if this unit can't traverse that terrain.\n if( findMoveCost(unit, coord.xCoord, coord.yCoord, myMap) == 99 )\n {\n return false;\n }\n return true;\n }", "public String check_not_ready(Operator op){\n String positive = \"соблюдено\";\n String negative = \"не соблюдено\";\n int not_ready_time_seconds = (int) get_seconds(op.getLoged_out());\n int not_ready_value;\n if(op.getShift()==Shift.nine) {\n not_ready_value = (int) get_seconds(not_ready_9);\n if(not_ready_time_seconds<= not_ready_value)\n return positive;\n else\n {\n op.setBonus(op.getBonus()-500);\n return negative;\n }\n }\n if(op.getShift()==Shift.twelve) {\n not_ready_value = (int) get_seconds(not_ready_12);\n if(not_ready_time_seconds<= not_ready_value)\n return positive;\n else\n {\n op.setBonus(op.getBonus()-500);\n return negative;\n }\n }\n\n return positive;\n }", "protected double minimumCostPerUnitDistance( ) {\n\t\treturn 0.0;\n\t}", "void object_calculations_doesnt_touch_ground(){\n if(angle_with_ground>0&&down_angle>0&&up_angle<0)\n object_on_eyes_level_calc();\n else if(angle_with_ground>0&&down_angle<0&&up_angle<0)\n object_upper_eyes_level_calc();\n else if(angle_with_ground>0&&down_angle>0&&up_angle>0)\n object_below_eyes_level_calc();\n }", "private boolean checkMultipleUnitEdit() {\r\n\t\tboolean flag=false;\r\n\t\tfor(UIUnitType model:uiUnitType.getUnitValueList()){\r\n\t\t\tif(model.isInputDisplayItem()){\r\n\t\t\t\tflag=true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "private boolean needsToRecalcStats() {\n\n return this.equipsChanged;\n }", "private boolean ifTooEmpty() {\n if (items.length <= 8) {\n return false;\n }\n float efficiency = (float) size / (float) items.length;\n return efficiency < 0.25;\n }", "boolean getEntrench(Unit unit);", "Units getUnits();", "public boolean howManyBrokenUnits() {\n int count = 0;\n if (steamFailure()) {\n count++;\n System.out.println(count);\n }\n if (pumpControllerFailure() != -1) {\n count++;\n System.out.println(count);\n }\n\n if (this.onOffPumps.size() > 0) {\n for (int i = 0; i < this.pumpStateMessages.length; i++) {\n if (this.pumpStateMessages[i].getBooleanParameter() != this.onOffPumps.get(i)) {\n count++;\n }\n if (i != this.pumpStateMessages.length\n && (this.onOffPumps.get(i) == false && this.onOffPumps.get(i++) == true)) {\n count++;\n }\n }\n }\n\n if (count >= 2) {\n System.out.println(count);\n return true;\n } else {\n return false;\n }\n }", "private void checkDuplicities(final List<Unit> units) {\n final Set<Unit> tmp = new HashSet<>();\n units.forEach(unit -> {\n if (tmp.contains(unit)) {\n throw new IllegalStateException(\"Unit was registered twice, unit: \" + unit);\n } else {\n tmp.add(unit);\n }\n });\n }", "@Override\n\tprotected long getUpdatedUnits(long units) {\n\t\treturn units;\n\t}", "public double isFull(double size){;\n\t\tif (unitSpaceAvailable > 0 && unitSpaceAvailable <= MAX_QUEUE){\n\t\t\tif(size < unitSpaceAvailable){\n\t\t\treturn unitSpaceAvailable - size;\n\t\t\t}\n\t\t}\n\t\treturn 0.0;\n\t}", "private void checkIfHungry(){\r\n\t\tif (myRC.getEnergonLevel() * 2.5 < myRC.getMaxEnergonLevel()) {\r\n\t\t\tmission = Mission.HUNGRY;\r\n\t\t}\r\n\t}", "@Test(expected=MissingPrice.class)\n\tpublic void testNotEnoughBought() {\n\t\tpos.setPricing(\"A\", 4, 7);\n\n\t\tpos.scan(\"A\");\n\t\tpos.total();\n\t}", "private void checkPaintMeasures() {\r\n\t\t\r\n\t\t//Check from change\r\n\t\tint sizeNow = fontSize;\r\n\t\tif(sizeNow == sizeThen)return;\r\n\t\tsizeThen = sizeNow;\r\n\t\t\r\n\t\t//Set units\r\n\t\tmarkWidth = (double) sizeNow / 15;\r\n\t\tsizePaintLength = p.textLength(text, surface, sizeNow, bold, italic);\r\n\t\tif (viewPaintLength != viewPaintLength) viewPaintLength = sizePaintLength;\r\n\t}", "public void checkOverDue() {\n\t\tif (state == loanState.current && //changed 'StAtE' to 'state' and ' lOaN_sTaTe.CURRENT to loanState.current\r\n\t\t\tCalendar.getInstance().getDate().after(date)) { //changed Calendar.gEtInStAnCe to Calender.getInstance and gEt_DaTe to getDate and DaTe to date\r\n\t\t\tthis.state = loanState.overDue; //changed 'StAtE' to 'state' and lOaN_sTaTe.OVER_DUE to loanState.overDue\t\t\t\r\n\t\t} //added curly brackets\r\n\t}", "private boolean constrainedOnValidUnitName(String unitNameWithoutPrefix){\n if(unitNameWithoutPrefix.isEmpty())\n return false;\n\n return unitsDataModel != null && unitsDataModel.getUnitsContentQuerier().containsUnit(unitNameWithoutPrefix);\n }", "public boolean outOfBounds()\n {\n if((lastpowerUp.equals(\"BLUE\") || lastpowerUp.equals(\"RAINBOW\")) && powerupTimer > 0)\n {\n return false;\n }\n \n if(head.getA() < 150 || head.getA() >= 1260)\n return true;\n else if(head.getB() <150 || head.getB() >=630)\n return true;\n else \n return false;\n \n \n }", "@Override\n public boolean isMayorAt(UnitTime ut) {\n return ((LongUnitTime)ut).getValue()<this.getValue();\n }", "private boolean checkCost(int owner, ItemType item) {\n\t\t\t\t\treturn false;\n\t\t\t\t}", "private void notEligibleForRealMin() {\n eligibleForRealMin = false;\n }", "public void changeChecker()\n {\n\tif (pennies < 0 || nickels < 0 || dimes < 0 || quarters < 0)\n\t throw new IllegalArgumentException();\t// no negative amounts\n }", "boolean checkForShortCircuit(CaveGen g) {\n int i = g.placedMapUnits.size() - 1;\n MapUnit m = g.placedMapUnits.get(i);\n if (i >= Parser.scUnitTypes.length) return false;\n if (Parser.scUnitTypes[i] != -1) {\n String targetName = g.spawnMapUnitsSorted.get(Parser.scUnitTypes[i]).name;\n if (!targetName.equals(m.name))\n return true;\n } \n if (Parser.scRots[i] != -1) {\n if (m.rotation != Parser.scRots[i])\n return true;\n } \n if (Parser.scUnitIdsFrom[i] != -1 \n && Parser.scDoorsFrom[i] != -1\n && Parser.scDoorsTo[i] != -1) {\n Door d = m.doors.get(Parser.scDoorsTo[i]);\n if (d.adjacentDoor == null || d.adjacentDoor.mapUnit == null)\n return true;\n MapUnit o = d.adjacentDoor.mapUnit;\n if (g.placedMapUnits.indexOf(o) != Parser.scUnitIdsFrom[i])\n return true;\n if (o.doors.indexOf(d.adjacentDoor) != Parser.scDoorsFrom[i])\n return true;\n }\n else {\n if (Parser.scDoorsTo[i] != -1) {\n Door d = m.doors.get(Parser.scDoorsTo[i]);\n if (d.adjacentDoor == null || d.adjacentDoor.mapUnit == null)\n return true;\n }\n if (Parser.scUnitIdsFrom[i] != -1 \n && Parser.scDoorsFrom[i] != -1) {\n boolean isGood = false;\n for (Door d: m.doors) {\n if (d.adjacentDoor == null || d.adjacentDoor.mapUnit == null)\n continue;\n MapUnit o = d.adjacentDoor.mapUnit;\n if (g.placedMapUnits.indexOf(o) != Parser.scUnitIdsFrom[i])\n continue;\n if (o.doors.indexOf(d.adjacentDoor) != Parser.scDoorsFrom[i])\n continue;\n isGood = true;\n }\n if (!isGood) return true;\n }\n else if (Parser.scUnitIdsFrom[i] != -1) {\n boolean isGood = false;\n for (Door d: m.doors) {\n if (d.adjacentDoor == null || d.adjacentDoor.mapUnit == null)\n continue;\n MapUnit o = d.adjacentDoor.mapUnit;\n if (g.placedMapUnits.indexOf(o) != Parser.scUnitIdsFrom[i])\n continue;\n isGood = true;\n }\n if (!isGood) return true;\n }\n }\n return false;\n }", "private void checkSpeedAndReserved()\n\t{\n\t\t// only check every 5 seconds\n\t\tif(mainloop_loop_count % MAINLOOP_FIVE_SECOND_INTERVAL != 0)\n\t\t\treturn;\n\n\t\tfinal int\t\t\t\tnbPieces\t=_nbPieces;\n\t\tfinal PEPieceImpl[] pieces =pePieces;\n\t\t//for every piece\n\t\tfor (int i =0; i <nbPieces; i++)\n\t\t{\n\t\t\t// placed before null-check in case it really removes a piece\n\t\t\tcheckEmptyPiece(i);\n\n\n\t\t\tfinal PEPieceImpl pePiece =pieces[i];\n\t\t\t// these checks are only against pieces being downloaded\n\t\t\t// yet needing requests still/again\n\t\t\tif (pePiece !=null)\n\t\t\t{\n\t\t\t\tfinal long timeSinceActivity =pePiece.getTimeSinceLastActivity()/1000;\t\t\t\t\n\n\t\t\t\tint pieceSpeed =pePiece.getSpeed();\n\t\t\t\t// block write speed slower than piece speed\n\t\t\t\tif (pieceSpeed > 0 && timeSinceActivity*pieceSpeed*0.25 > DiskManager.BLOCK_SIZE/1024)\n\t\t\t\t{\n\t\t\t\t\tif(pePiece.getNbUnrequested() > 2)\n\t\t\t\t\t\tpePiece.setSpeed(pieceSpeed-1);\n\t\t\t\t\telse\n\t\t\t\t\t\tpePiece.setSpeed(0);\n\t\t\t\t}\n\n\n\t\t\t\tif(timeSinceActivity > 120)\n\t\t\t\t{\n\t\t\t\t\tpePiece.setSpeed(0);\n\t\t\t\t\t// has reserved piece gone stagnant?\n\t\t\t\t\tfinal String reservingPeer =pePiece.getReservedBy();\n\t\t\t\t\tif(reservingPeer !=null)\n\t\t\t\t\t{\n\t\t\t\t\t\tfinal PEPeerTransport pt = getTransportFromAddress(reservingPeer);\n\t\t\t\t\t\t// Peer is too slow; Ban them and unallocate the piece\n\t\t\t\t\t\t// but, banning is no good for peer types that get pieces reserved\n\t\t\t\t\t\t// to them for other reasons, such as special seed peers\n\t\t\t\t\t\tif (needsMD5CheckOnCompletion(i))\n\t\t\t\t\t\t\tbadPeerDetected(reservingPeer, i);\n\t\t\t\t\t\telse if (pt != null)\n\t\t\t\t\t\t\tcloseAndRemovePeer(pt, \"Reserved piece data timeout; 120 seconds\", true);\n\n\t\t\t\t\t\tpePiece.setReservedBy(null);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!piecePicker.isInEndGameMode()){\n\t\t\t\t\t\tpePiece.checkRequests();\n\t\t\t\t\t}\n\n\t\t\t\t\tcheckEmptyPiece(i);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "@Test\r\n public void testInvalidMinusAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varD_S-=4km\", \"0xA0177\");\r\n }", "void checkConsumption()\n {\n assertEquals(\"Consumption doesn't match\", keyEventPair.getKey().isConsumed(), keyEventPair.getValue().isConsumed());\n }", "private boolean shouldStopBeingCombatEngineer() {\r\n\t\tdouble machineUnitsCount = this.getNumberOfMachineUnits();\r\n\t\tdouble combatEngineers = this.informationStorage.getWorkerConfig().getTotalCombatEngineerCount();\r\n\r\n\t\treturn combatEngineers / machineUnitsCount >= this.combatEngineerTriggerPercentageCancel;\r\n\t}", "public boolean getUnits() {\r\n return Units;\r\n }", "public boolean setUnit(Unit u) //this method is for creating new units or called from territories move unit method\r\n {\r\n//\t\tSystem.out.println(\"Set unit called \" + u);\r\n \tTile old = u.getTile();\r\n boolean test = false;\r\n if(u != null) //this line is mostly useless now but i'm keeping it.\r\n {\r\n \tif(!(u instanceof Capital))\r\n \t{\r\n \t\tif(!(u instanceof Castle))\r\n \t\t{\r\n\t \t\tif(u.canMove())\r\n\t \t\t{\r\n\t\t\t if(Driver.currentPlayer.equals(player))\r\n\t\t\t {\r\n\t\t\t if(hasUnit())\r\n\t\t\t {\r\n\t\t\t if(u instanceof Peasant)\r\n\t\t\t {\r\n\t\t\t \tif(!(unit instanceof Capital) && !(unit instanceof Castle))\r\n\t\t\t \t{\r\n\t\t\t\t int curProtect = unit.getStrength();\r\n\t\t\t\t switch(curProtect) //for upgrading with a peasant.\r\n\t\t\t\t {\r\n\t\t\t\t case 1: newUnitTest(old, u);\r\n\t\t\t\t unit = new Spearman(this);\r\n\t\t\t\t unit.move(false);\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t break;\r\n\t\t\t\t case 2: newUnitTest(old, u);\r\n\t\t\t\t unit = new Knight(this);\r\n\t\t\t\t unit.move(false);;\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t break;\r\n\t\t\t\t case 3:\t\tnewUnitTest(old, u);\r\n\t\t\t\t unit = new Baron(this);\r\n\t\t\t\t unit.move(false);\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t break;\r\n\t\t\t\t default:\r\n\t\t\t\t \t//possibly put a noise or alert here\r\n\t\t\t\t// \t\tAlert a = new Alert(AlertType.WARNING);\r\n\t\t\t\t// \t\ta.setTitle(\"Warning\"); \r\n\t\t\t\t \t\ttest = false;\r\n\t\t\t\t }\r\n\t\t\t \t}\r\n\t\t\t \telse\r\n\t\t\t \t{\r\n\t\t\t \t\t//play a noise or something\r\n\t\t\t \t}\r\n\t\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t \t//possibly put a noise or sumting.\r\n\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t \tnewUnitTest(old, u);\r\n\t\t\t\t unit = u;\r\n\t\t\t\t u.setTile(this);\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t \t//As of now the only time that this case (setting unit to enemy tile) is used is when called by territories move unit method.\r\n\t\t\t\t \t\t//This means that when you build a new unit (in this case a peasant) you have to put them on your territory before moving them to another players tile.\r\n\t\t\t\t \t\tif(old != null)\r\n\t\t\t\t \t\t{\r\n\t\t\t\t \t\t\tunit = u;\r\n\t\t\t\t \t\t\tu.setTile(this);\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t \t\t}\r\n\t\t\t\t \t\telse\r\n\t\t\t\t \t\t{\r\n\t\t\t\t \t\t\t//maybe make a noise or something\r\n\t\t\t\t \t\t}\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\t//maybe play a noise or something\r\n\t \t\t}\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tif(!hasUnit())\r\n \t\t\t{\r\n\t \t\t\tunit = u;\r\n\t u.setTile(this);\r\n\t setAdjacentProtection();\r\n\t test = true;\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \telse\r\n \t{\r\n \t\tunit = u;\r\n u.setTile(this);\r\n setAdjacentProtection();\r\n test = true;\r\n \t}\r\n } \r\n\t return test;\r\n\t \r\n}", "protected int calculateUnits(Object oValue)\n {\n OldOldCache map = OldOldCache.this;\n Object oKey = getKey();\n switch (map.getUnitCalculatorType())\n {\n case UNIT_CALCULATOR_BINARY:\n return BinaryMemoryCalculator.INSTANCE.calculateUnits(oKey, oValue);\n\n case UNIT_CALCULATOR_EXTERNAL:\n return map.getUnitCalculator().calculateUnits(oKey, oValue);\n\n case UNIT_CALCULATOR_FIXED:\n default:\n return 1;\n }\n }", "@Override\n protected boolean isFinished() {\n return Math.abs(m_currentError) <= constants.tolerance;\n }", "@Test\n public void checkFuelEnough() {\n Game.getInstance().getPlayer().setSolarSystems(SolarSystems.SOMEBI);\n Game.getInstance().getPlayer().setFuel(SolarSystems.SOMEBI.getDistance(SolarSystems.ADDAM) + 1);\n assertTrue(SolarSystems.SOMEBI.canTravel(SolarSystems.ADDAM));\n }", "private String needs() {\r\n\t\tint[] needs=tile.getLifeNeedsMet();\r\n\t\tString out=\"Needs Met: \"+needs[0]+\" || Needs Not Met: \"+needs[1];\r\n\t\treturn out;\r\n\t}", "private void assertLimitedUnit(final Unit unit) {\n if (null != unit.getMsgLimit() && unit.getMsgLimit().longValue() <= 0) {\n throw new IllegalStateException(SmsUtils.MSG_LIMIT_EXCEEDE);\n }\n }", "public int changeUnits(int additionalUnits){\n if (units + additionalUnits < 1){\n return 0;\n }\n else {\n units += additionalUnits;\n return units;\n }\n }", "@Override\r\n\tint check_sweetness() {\n\t\treturn 30;\r\n\t}", "String getUnit();", "String getUnits();", "String getUnits();", "String getUnits();", "public boolean isUnit() {\n\t\tboolean unit = false;\n\t\tif(this.head == null){\n\t\t\treturn true;\n\t\t}\n\t\tif(Math.pow(this.head.factor, this.head.power) == 1.0){\n\t\t\tunit = true;\n\t\t}\n\t\treturn unit;\n\t}", "private void checkFreeDiskSpace(List<File> inputFiles) {\n //Check for free space\n long usableSpace = 0;\n long totalSize = 0;\n for (File f : inputFiles) {\n if (f.exists()) {\n totalSize += f.length();\n usableSpace = f.getUsableSpace();\n }\n }\n log.info(\"Total expected store size is {} Mb\",\n new DecimalFormat(\"#,##0.0\").format(totalSize / (1024 * 1024)));\n log.info(\"Usable free space on the system is {} Mb\",\n new DecimalFormat(\"#,##0.0\").format(usableSpace / (1024 * 1024)));\n if (totalSize / (double) usableSpace >= 0.66) {\n throw new OutOfDiskSpace(\"Aborting because there isn't enough free disk space\");\n }\n }", "public boolean isDifficult()\n {\n int count = 0;\n for (int i = 1; i < markers.length; i++) {\n if (Math.abs(markers[i] - markers[i-1]) >= 30){\n count++;\n }\n }\n return (count >= 3);\n }", "public boolean newUnitTest(Tile old, Unit u) //this method sees if this unit has just been bought and then charges it if it should.\r\n {\n \tif(old == null)\r\n \t{\r\n \t\tSystem.out.println(\"This probs works\");\r\n \t\treturn chargeTerritory(u);\r\n \t}\r\n \treturn false;\r\n }", "private void createNewUnit()\r\n {\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n int randomNumber = (int)Math.ceil(Math.random() * 8);\r\n boolean canBuild = false;\r\n\r\n if(currentPlayer == 1)\r\n {\r\n int unitType = worldPanel.player1.units[currentUnit - 1].getUnitType();\r\n if(unitType == 1)//if unit is a settler\r\n canBuild = true;\r\n }\r\n\r\n else if(currentPlayer == 2)\r\n {\r\n int unitType = worldPanel.player2.units[currentUnit - 1].getUnitType();\r\n if(unitType == 1)//if unit is a settler\r\n canBuild = true;\r\n }\r\n\r\n //if the unit who presses build is a settler\r\n if(canBuild == true)\r\n {\r\n if(currentPlayer == 1)\r\n {\r\n int playerLoc = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n worldPanel.player1.addUnit2(randomNumber);\r\n int noUnits = worldPanel.player1.getNumUnits();\r\n\t\t\t\t\t\t\t\tif(randomNumber == 7)//if unit is a ship\r\n\t\t\t\t\t\t\t\t\tworldPanel.player1.units[noUnits].setPosition(getSeaLoc(playerLoc));\r\n\t\t\t\t\t\t\t\telse\r\n \tworldPanel.player1.units[noUnits].setPosition(playerLoc);\r\n worldPanel.player1.setNumUnits(noUnits + 1);\r\n currentUnit++;\r\n worldPanel.setCurrentUnit(currentUnit);\r\n }//end if\r\n else if(currentPlayer == 2)\r\n {\r\n int playerLoc = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n worldPanel.player2.addUnit2(randomNumber);\r\n int noUnits = worldPanel.player2.getNumUnits();\r\n\t\t\t\t\t\t\t\tif(randomNumber == 7)//if unit is a ship\r\n\t\t\t\t\t\t\t\t\tworldPanel.player2.units[noUnits].setPosition(getSeaLoc(playerLoc));\r\n\t\t\t\t\t\t\t\telse\r\n \tworldPanel.player2.units[noUnits].setPosition(playerLoc);\r\n worldPanel.player2.setNumUnits(noUnits + 1);\r\n currentUnit++;\r\n worldPanel.setCurrentUnit(currentUnit);\r\n }//end elseif\r\n }//end if\r\n\r\n //set new player and unit if necessary\r\n int temp = worldPanel.getNumUnits(currentPlayer);\r\n if(currentUnit > temp)\r\n {\r\n if(currentPlayer == 1)\r\n worldPanel.setCurrentPlayer(2);\r\n else\r\n worldPanel.setCurrentPlayer(1);\r\n worldPanel.setCurrentUnit(1);\r\n }//end if\r\n\r\n //set up new mapPosition if player moved\r\n if(canBuild == true)\r\n setMapPos();\r\n setInfoPanel();//set up information panel\r\n }", "public double checkPot(){\r\n\t\treturn totalPot;\r\n\t}", "@Test\r\n public void testInvalidMinusAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varS-=4km\", \"0xA0177\");\r\n }", "@Test\n\tpublic void testgetUnits1(){\n\t\tTemperature data = new Temperature (400, Temperature.Units.FAHRENHEIT);\n\t\tassertEquals(data.getUnits() , Temperature.Units.FAHRENHEIT);\n\t}", "public final void minus (Unit unit) throws ArithmeticException {\n\t\tboolean error = false;\n\t\tif (((mksa|unit.mksa)&_abs)!=0) {\t// Special dates\n\t\t\tif (mksa == unit.mksa)\t\t// date1 - date2\n\t\t\t\tmksa ^= _abs;\t\t\t// ... not a date any more\n\t\t\telse if ((unit.mksa&_abs)!=0) error = true;\n\t\t}\n\t\telse error = (mksa&(~_pic)) != (unit.mksa&(~_pic));\n\t\tif (error) throw new ArithmeticException\n\t\t(\"****Unit: can't combine: \" + symbol + \" - \" + unit.symbol);\n\t\tvalue -= (unit.value*unit.factor)/factor;\n\t}", "public boolean isFull() {\n return numOfGoods == cargoSpace;\n }", "private static boolean _isTooTarget(SPTarget p1Target, ObservationElements elems) {\n final ISPObservation obs = elems.getObservationNode();\n if (obs == null || !Too.isToo(obs)) return false;\n\n final ITarget t = p1Target.getTarget();\n if (t instanceof HmsDegTarget) {\n final HmsDegTarget hmsDeg = (HmsDegTarget) t;\n return hmsDeg.getRa().getValue() == 0.0 &&\n hmsDeg.getDec().getValue() == 0.0; ///\n }\n\n return false;\n }", "@Override\n public boolean isMenorAt(UnitTime ut) {\n return ((LongUnitTime)ut).getValue()>this.getValue(); \n }", "private void checkIsBetterSolution() {\n if (solution == null) {\n solution = generateSolution();\n //Si la solucion que propone esta iteracion es mejor que las anteriores la guardamos como mejor solucion\n } else if (getHealthFromAvailableWorkers(availableWorkersHours, errorPoints.size()) < solution.getHealth()) {\n solution = generateSolution();\n }\n }", "private boolean inGameInvariant(){\n if (owner != null && troops >= 1)\n return true;\n else\n throw new IllegalStateException(\"A Territory is left without a Master or Troops\");\n }", "public void checkBlankSpace() {\n\t\tif (xOffset < 0) {\n\t\t\txOffset = 0;\n\t\t} else if (xOffset > handler.getWorld().getWidth() * Tile.TILEWIDTH - handler.getWidth()) {\n\t\t\txOffset = handler.getWorld().getWidth() * Tile.TILEWIDTH - handler.getWidth();\n\t\t}\n\t\t\n\t\tif (yOffset < 0) {\n\t\t\tyOffset = 0;\n\t\t} else if (yOffset > handler.getWorld().getHeight() * Tile.TILEHEIGHT - handler.getHeight()) {\n\t\t\tyOffset = handler.getWorld().getHeight() * Tile.TILEWIDTH - handler.getHeight();\n\t\t}\n\t}", "protected boolean checkRep() {\n if ( this.getX() < 0 || this.getY() < 0 || this.getX() >= 20 || this.getY() >= 20 ) {\n return false;\n }\n return true;\n }", "public boolean hasIllegalGoods() {\n return cargoHold.hasIllegalGoods();\n }", "public String getUnit();", "private boolean isSelectedArmyForceBigEnough() {\n return selectedArmyForce.getTotalPower() >= selectedTerritoryByPlayer.getArmyThreshold();\n }", "@Test\r\n\tpublic void calculQualityAxisWithNoLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculTestOfStudentQualityAxis(new ModelValue(4f, 2f), 4f), new Float(0));\r\n\t}", "protected void doDeduction() {\n\n boolean narrowed= false;\n\n unit=false;\n isInconclusive=false;\n\n int newXL;\n int newYU;\n\n Variable x = null;\n Variable y = null;\n\n for(Variable var : csp.getVars()){\n if(var.getPosition() == unitSB.getX().getPosition()){\n x = var;\n } else if(var.getPosition() == unitSB.getY().getPosition()){\n y = var;\n }\n }\n\n int xU = x.getUpperDomainBound();\n int yL = y.getLowerDomainBound();\n\n newXL = yL + unitSB.getCright();\n newYU = xU - unitSB.getCright();\n\n if(newXL>x.getLowerDomainBound()){\n Variable newX = new Variable(newXL, xU);\n newX.setPosition(x.getPosition());\n changeVariable(newX);\n narrowed= true;\n }\n if (newYU< y.getUpperDomainBound()){\n Variable newY = new Variable(yL, newYU);\n newY.setPosition(y.getPosition());\n changeVariable(newY);\n narrowed =true;\n }\n\n if(narrowed){\n doAlgorithmA1();\n }else {\n doAlgorithmA3();\n }\n\n }", "Unit getUnit();", "private void tickIsInProduction() {\n if (this.timeInState == this.unitInfo.getProductionTime() - 1) {\n this.player.setSuppliesMax(this.player.getSuppliesMax() + this.unitInfo.getSuppliesGain());\n changeState(this.unitInfo.getUnitStateAfterProduction());\n \n if (this.producer != null)\n this.producer.changeState(UnitState.HOLD);\n }\n \n }", "public double getTotalUnits() {\n int total = 0;\n for(int i = 0; i < courses.size(); i++) {\n // don't count if units are null? idk how defensive I need to be (I choose not to check, units should never be null)\n // TODO: test with System.out\n Course course = courses.get(i);\n //if(!course.getUnits().equals(null))\n total += course.getUnits();\n }\n return total;\n }", "boolean hasQuantity();", "DefinedUnitType getDefinedUnit();", "public final boolean inUse()\n{\n\tif (_buildTime > 0)\n\t{\n\t\treturn false;\n\t}\n\treturn (_base.getAvailableQuarters() - _rules.getPersonnel() < _base.getUsedQuarters() ||\n\t\t\t_base.getAvailableStores() - _rules.getStorage() < _base.getUsedStores() ||\n\t\t\t_base.getAvailableLaboratories() - _rules.getLaboratories() < _base.getUsedLaboratories() ||\n\t\t\t_base.getAvailableWorkshops() - _rules.getWorkshops() < _base.getUsedWorkshops() ||\n\t\t\t_base.getAvailableHangars() - _rules.getCrafts() < _base.getUsedHangars());\n}", "DefiningUnitType getDefiningUnit();", "private void validt() {\n\t\t// -\n\t\tnmfkpinds.setPgmInd99(false);\n\t\tstateVariable.setZmsage(blanks(78));\n\t\tfor (int idxCntdo = 1; idxCntdo <= 1; idxCntdo++) {\n\t\t\tproductMaster.retrieve(stateVariable.getXwabcd());\n\t\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t\t// BR00005 Product not found on Product_Master\n\t\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\t\tmsgObjIdx = setMsgObj(\"OEM0003\", \"XWABCD\", msgObjIdx, messages);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// - If addition, pull the price from file:\n\t\t\tif (nmfkpinds.funKey06()) {\n\t\t\t\tstateVariable.setXwpric(stateVariable.getXwanpr());\n\t\t\t}\n\t\t\t// -\n\t\t\tstoreMaster.retrieve(stateVariable.getXwaacs());\n\t\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t\t// BR00006 Store not found on Store_Master\n\t\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\t\tmsgObjIdx = setMsgObj(\"OES0369\", \"XWAACS\", msgObjIdx, messages);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tstockBalances.retrieve(stateVariable.getXwabcd(), stateVariable.getXwaacs());\n\t\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t\t// BR00007 Store not found on Stock_Balances or CONDET.Contract_Qty >\n\t\t\t// BR Onhand_Quantity\n\t\t\tif (nmfkpinds.pgmInd99() || (stateVariable.getXwa5qt() > stateVariable.getXwbhqt())) {\n\t\t\t\tmsgObjIdx = setMsgObj(\"OES0370\", \"XWAACS\", msgObjIdx, messages);\n\t\t\t\tnmfkpinds.setPgmInd99(true);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// - Transaction Type:\n\t\t\ttransactionTypeDescription.retrieve(stateVariable.getXwricd());\n\t\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t\t// BR00008 Trn_Hst_Trn_Type not found on Transaction_type_description\n\t\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\t\tstateVariable.setXwtdsc(all(\"-\", 20));\n\t\t\t\tmsgObjIdx = setMsgObj(\"OES0371\", \"XWRICD\", msgObjIdx, messages);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// - Unit of measure:\n\t\t\t// BR00009 U_M = 'EAC'\n\t\t\tif (equal(\"EAC\", stateVariable.getXwa2cd())) {\n\t\t\t\tstateVariable.setUmdes(replaceStr(stateVariable.getUmdes(), 1, 11, um[1]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnmfkpinds.setPgmInd99(true);\n\t\t\t\tmsgObjIdx = setMsgObj(\"OES0372\", \"XWA2CD\", msgObjIdx, messages);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private void checkChargeTime() {\n\t\tif (elapsedTimeSeconds > chargeTimeP1) {\n\t\t\tplayerCharge.put(dolphinNodeOne, false);\n\t\t}\n\t}", "@Override\r\n public float getSize(){\r\n throw new AssertionError(\"[Error] You tried to get the size of a depot. You have some logical error in your program\");\r\n }", "@Test\n public void notSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"ED\", 4, 4, 4,\n 4, SolarSystems.GHAVI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Food));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(0, Goods.Furs));\n CargoItem good = game.getPlayer().getShip().getShipCargo().get(2);\n \n int oldCredits = game.getPlayer().getCredits();\n good.getGood().sell(good.getGood(), 1);\n \n CargoItem water = game.getPlayer().getShip().getShipCargo().get(0);\n CargoItem food = game.getPlayer().getShip().getShipCargo().get(1);\n water.setQuantity(2);\n food.setQuantity(1);\n good.setQuantity(0);\n //int P = good.getGood().getPrice(1);\n int curr = game.getPlayer().getCredits();\n //boolean qn = water.getQuantity() == 2 && food.getQuantity() == 1 && good.getQuantity() == 0;\n boolean check = water.getQuantity() == 2;\n System.out.print(curr);\n assertEquals(curr, oldCredits);\n }", "public void setUnit(Length units) {\n unit = units;\n }", "private static int computeUnitsTrappedDynamicProgramming(int[] elevationMap) {\n int[] leftWalls = computeLeftWalls(elevationMap);\n int[] rightWalls = computeRightWalls(elevationMap);\n int units = 0;\n for (int x = 1; x < elevationMap.length; x++) {\n int current = elevationMap[x];\n int tallestLeft = leftWalls[x];\n int tallestRight = rightWalls[x];\n if (tallestLeft > current && tallestRight > current) {\n units += Math.min(tallestLeft, tallestRight) - current;\n }\n }\n return units;\n }", "private void checkLoosePLayer(){\n if (hero.getHp()<=0){\n loose();\n }\n\n }", "public final boolean isCompatibleWith (Unit unit) {\n\t\tif (((unit.mksa|this.mksa)&_abs) != 0) \t\t// Special dates\n\t\t\treturn((this.mksa^_abs) == unit.mksa) ;\n\t\treturn((mksa&(~(_log|_mag))) == (unit.mksa&(~(_log|_mag)))) ;\n\t}", "public int getLowUnits()\n {\n return m_cPruneUnits;\n }", "@Test\r\n\tpublic void calculQualityAxisWithLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculTestOfStudentQualityAxis(new ModelValue(4f, 2f), 3f), new Float(2));\r\n\t}", "public boolean isOverDue() {\n\t\treturn state == loanState.overDue; //changed 'StAtE' to 'state' and lOaN_sTaTe.OVER_DUE to loanState.overDue\r\n\t}" ]
[ "0.7463756", "0.6276188", "0.62405026", "0.6150894", "0.61311364", "0.60830456", "0.6081805", "0.60583943", "0.59782696", "0.5971893", "0.59413576", "0.5918606", "0.5917134", "0.5915477", "0.5912315", "0.589955", "0.5886463", "0.5846946", "0.5837902", "0.57738566", "0.57675606", "0.57623017", "0.5756938", "0.5753986", "0.5750606", "0.5728561", "0.57160306", "0.5673528", "0.5618083", "0.5613179", "0.5608762", "0.56053287", "0.5605156", "0.55956817", "0.5584473", "0.5583955", "0.5583106", "0.55768424", "0.5562509", "0.5560748", "0.55543226", "0.5550175", "0.55371755", "0.5528395", "0.55278385", "0.5523614", "0.5523064", "0.5505173", "0.5504823", "0.5490904", "0.5475951", "0.54746073", "0.54731977", "0.5471769", "0.54570174", "0.5453955", "0.54271257", "0.5423754", "0.54234976", "0.54234976", "0.54234976", "0.54234505", "0.5417083", "0.54028606", "0.54026496", "0.5386542", "0.5383328", "0.5381293", "0.53806835", "0.53796947", "0.5374558", "0.5373955", "0.5368314", "0.5365012", "0.5361342", "0.5356978", "0.53414005", "0.5337245", "0.5333814", "0.5330156", "0.5327266", "0.5324047", "0.532331", "0.5319893", "0.5318817", "0.5317415", "0.53165644", "0.5314631", "0.53124213", "0.53115857", "0.5310794", "0.53078264", "0.530485", "0.5304483", "0.5302506", "0.5299248", "0.5297868", "0.5297164", "0.52861995", "0.52838993" ]
0.646612
1
helper function for reorder()
private int extractDigits(String courseCode) { CharMatcher matcher = CharMatcher.javaLetter(); String digitOnly = matcher.removeFrom(courseCode); int digits = Integer.parseInt(digitOnly); return digits; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changeSortOrder();", "public void reorder(Object obj, int newIndex);", "private void updateOrder() {\n Arrays.sort(positions);\n }", "public void insertReorderBarrier() {\n\t\t\n\t}", "public void reorder(String field){\n\t\tsetOrderFields(new String[] {\n\t\t\tfield\n\t\t});\n\t\tdj.launch(20);\n\t}", "public void reorganizeNote() {\n note = Position.orderList(note);\n }", "public int[] reorder(int[] array) {\n int left = 0;\n int right = array.length-1;\n if (array.length % 2 != 0){\n right = right - 1;\n }\n reversedMergesort(array,left,right);\n return array;\n }", "public static void doReorder ( RunData data)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\n\t\t//get the ParameterParser from RunData\n\t\tParameterParser params = data.getParameters ();\n\t\t\n\t\tboolean isPrioritySortEnabled = ContentHostingService.isSortByPriorityEnabled();\n\n\n\t\tString folderId = params.getString (\"folderId\");\n\t\tif(folderId == null)\n\t\t{\n\t\t\taddAlert(state, \"error\");\n\t\t}\n\t\t\n\t\tString sortBy = (String) state.getAttribute(STATE_REORDER_SORT_BY);\n\t\tif(sortBy == null)\n\t\t{\n\t\t\tsortBy = ResourceProperties.PROP_CONTENT_PRIORITY;\n\t\t\tstate.setAttribute(STATE_REORDER_SORT_BY, sortBy);\n\t\t}\n\t\tString sortedAsc = (String) state.getAttribute (STATE_REORDER_SORT_ASC);\n\t\tif(sortedAsc == null)\n\t\t{\n\t\t\tsortedAsc = Boolean.TRUE.toString();\n\t\t\tstate.setAttribute(STATE_REORDER_SORT_ASC, sortedAsc);\n\t\t}\n\n\t\tComparator comparator = ContentHostingService.newContentHostingComparator(sortBy, Boolean.getBoolean(sortedAsc));\n\t\tstate.setAttribute(STATE_REORDER_SORT, comparator);\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\tstate.setAttribute(STATE_REORDER_FOLDER, folderId);\n\t\t\tstate.setAttribute (STATE_MODE, MODE_REORDER);\n\n\t\t}\t// if-else\n\n\t}", "private List<Article> orderArticles(List<Article> things){\n\t\t Comparator<Article> comparatorPrizes = new Comparator<Article>() {\n\t public int compare(Article x, Article y) {\n\t return (int) (x.getPrize() - y.getPrize());\n\t }\n\t };\n\t Collections.sort(things,comparatorPrizes); \n\t Collections.reverse(things);\n\t return things;\n\t }", "int order();", "void changeOrder(GeometricalObject object, int offset);", "void changeOrder(GeometricalObject object, int offset);", "@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void orderSegments() {\n //insert numOrder for the db\n int i = 0;\n for(TransportSegmentLogic transportSegment: transportSegments){\n transportSegment.setOrder(i);\n i++;\n }\n\n\n\n /*int i = 0;\n int j = 1;\n\n\n TransportSegmentLogic swapSegment;\n\n while(j < transportSegments.size()){\n if(transportSegments.get(j).getOrigin().equals(transportSegments.get(i).getDestination())){\n swapSegment = transportSegments.get(j);\n transportSegments.remove(swapSegment);\n transportSegments.add(i +1, swapSegment);\n i = i + 1;\n j = i + 1;\n }\n j++;\n }\n\n j = transportSegments.size() -1;\n\n while(j > i){\n if(transportSegments.get(j).getDestination().equals(transportSegments.get(0).getOrigin())){\n swapSegment = transportSegments.get(j);\n transportSegments.remove(swapSegment);\n transportSegments.add(0, swapSegment);\n i = i + 1;\n j = transportSegments.size();\n }\n j--;\n } */\n }", "public void makeReorderRanges(int[] iArr, UVector32 uVector32) {\n makeReorderRanges(iArr, false, uVector32);\n }", "public void reorder(FillingStrategy strategy) {\n\n\t\tList<Content> contentsLongList = null;\n\t\tif (contentMap.size() == 0)\n\t\t\tthrow new SomethingWentWrongException(\"Empty Location\");\n \n\t\tcontentsLongList = sortContentMapByVolumeAndBarcode(contentMap);\n\t\tremoveAllContentFromLocation();\n\n\t\tswitch (strategy) {\n\t\tcase ROW_WISE:\t\t\n\t\t\tfillLocationWithItems(contentsLongList, FillingStrategy.ROW_WISE);\n\t\t\tbreak;\n\t\tcase COLUMN_WISE:\n\t\t\tfillLocationWithItems(contentsLongList, FillingStrategy.COLUMN_WISE);\n\t\t\tbreak;\n\t\t}\n\n\t}", "public abstract void toggleSortOrder(int column);", "public myList<T> my_preorder();", "private void changeOrderPhase() {\n for (int i = 0; i < 4; i++)\n System.out.print(playerList[i].getName() + \" ,\");\n Player tmp = playerList[0];\n playerList[0] = playerList[1];\n playerList[1] = playerList[2];\n playerList[2] = playerList[3];\n playerList[3] = tmp;\n System.out.println();\n for (int i = 0; i < 4; i++)\n System.out.print(playerList[i].getName() + \" ,\");\n System.out.println();\n }", "void reorderNode(LinkedEntries.LinkNode insert, LinkedEntries.LinkNode before) {\n removeNode(insert);\n if (before == null) {\n addNode(insert, getHeader());\n } else {\n addNode(insert, before);\n }\n }", "public void sort() {\n\t\tfor (int i = 1; i < this.dataModel.getLength(); i++) {\n\t\t\tfinal int x = this.dataModel.get(i);\n\n\t\t\t// Find location to insert using binary search\n\t\t\tfinal int j = Math.abs(this.dataModel.binarySearch(0, i, x) + 1);\n\n\t\t\t// Shifting array to one location right\n\t\t\tthis.dataModel.arrayCopy(j, j + 1, i - j);\n\n\t\t\t// Placing element at its correct location\n\t\t\tthis.dataModel.set(j, x);\n\t\t\tthis.repaint(this.count++);\n\t\t}\n\t}", "@Override\r\n\tpublic void editSort() {\n\t\t\r\n\t}", "public myList<T> my_postorder();", "void sortUI();", "public void reorderList(ListNode head) {\n if (head == null) {\n return;\n } else if (head.next == null) {\n return;\n }\n \n ListNode pre = findMidPre(head);\n \n // cut the two list.\n ListNode right = pre.next;\n pre.next = null;\n \n // reverse the right link.\n right = reverse(right);\n \n merge(head, right);\n }", "public static Node[] reorder(Node[] nodes, int[] map) {\n\t\tNode[] reordered = new Node[map.length];\n\t\tfor (int i = 0; i < map.length; i++)\n\t\t\treordered[i] = nodes[map[i]];\n\t\treturn reordered;\n\t}", "private static void updateOrderOnRemove( int nOrderId )\n {\n for ( GroupAction groupActionChange : getGroupActionList( ) )\n {\n int nGroupActionToUpdateOrder = groupActionChange.getOrdre( );\n\n if ( ( nGroupActionToUpdateOrder > nOrderId ) )\n {\n groupActionChange.setOrdre( nGroupActionToUpdateOrder - CONSTANT_STEP_ORDER );\n _dao.store( groupActionChange, _plugin );\n }\n }\n }", "public void changeOrder(GeometricalObject object, int offset);", "public static void reorder(ListNode head) {\n ListNode preHead = new ListNode(0), p1 = preHead, p2 = preHead;\n preHead.next = head;\n// head.print();\n// System.out.println(\"\");\n// System.out.println(\"--------\");\n\n while (p2 != null && p2.next != null) {\n p1 = p1.next;\n p2 = p2.next.next;\n }\n// System.out.println(\"p1: \" + p1.val);\n// p1 = p1.next;\n// head.print();\n// System.out.println();\n// System.out.println(\"secondHalfReversed\");\n ListNode secondHalfReversed = reverseList(p1.next); // even number is good\n p1.next = null;\n// head.print();\n// secondHalfReversed.print();\n\n mergeLists(head, secondHalfReversed);\n//\n// System.out.println(\"\");\n// System.out.println(\"printing head \");\n// head.print();\n\n }", "private void shuffleOrder() {\n\t\t// Simple shuffle: swap each piece with some other one\n\t\tfor (int i = 0; i < order.size(); i++) {\n\t\t\tint j = (int) (Math.random() * order.size());\n\t\t\tInteger pi = order.get(i);\n\t\t\torder.set(i, order.get(j));\n\t\t\torder.set(j, pi);\n\t\t}\n\t}", "public void arrange(Order order){\n for(int i=0; i<26; ++i){\n // arrange list of list; list by list\n ArrayList<Integer> list = check_list.get(i);\n for(int j=0; j<list.size(); ++j ){\n if(order == Order.ASCENDING){\n // ascending order\n for(int k=i; k<list.size()-1; ++k){\n int num1= list.get(k);\n int num2= list.get(k+1);\n // ascending order\n if(num2<num1){\n // swap\n list.set(k, num2);\n list.set(k+1, num1);\n }\n }\n }else if(order == Order.DESCENDING){\n // descending order\n for(int k=i; k<list.size()-1; ++k){\n int num1= list.get(k);\n int num2= list.get(k+1);\n // descending order\n if(num2>num1){\n // swap\n list.set(j, num2);\n list.set(k, num1);\n }\n }\n }\n }\n // put arranged list, back in its place\n check_list.set(i, list);\n }\n }", "static public ListNode reorder(ListNode head) {\n\t\tif (head == null || head.next == null) {\n\t\t\treturn head;\n\t\t}\n\t\tListNode one = head;\n\t\tListNode mid = findMidle(head);\n\t\tSystem.out.println(\"mid: \"+ mid.val);\n\t\tListNode two = reverse(mid.next);\n\t\tmid.next = null;\n\t\tListNodeUtils.printList(head);\n\t\tListNodeUtils.printList(two);\n\t\tListNode curr = one;\n\t\twhile (one != null && two != null) {\n\t\t\tone = one.next;\n\t\t\tcurr.next = two;\n\t\t\tcurr = curr.next;\n\n\t\t\ttwo = two.next;\n\t\t\tcurr.next = one;\n\t\t\tcurr = curr.next;\n\t\t}\n\t\tif (one != null) {\n\t\t\tcurr.next = null;\n//\t\t curr = curr.next; \n\t\t}\n\n\t\t// curr.next = null;\n\t\treturn head;\n\t}", "public void orderItem(Item i) {\r\n\r\n\r\n\r\n this.o.orderItem(i);\r\n\r\n }", "public void RearrangeItems() {\n Collections.shuffle(images, new Random(System.currentTimeMillis()));\n Collections.shuffle(text, new Random(System.currentTimeMillis()));\n Adapter adapter = new Adapter(MainActivity.this, images, text);\n recyclerView.setAdapter(adapter);\n }", "public static void reorder(Animal[] animals) {\n\n int beginning = 0;\n int end = animals.length;\n int countCow = 0;\n int countSheep = 0;\n int countGoat = 0;\n do {\n if(animals[beginning] == Animal.sheep){\n countSheep++;\n beginning++;\n } else if(animals[beginning] == Animal.goat){\n countGoat++;\n beginning++;\n }else{\n countCow++;\n beginning++;\n }\n } while (beginning != end); //do while\n\n int i = 0;\n while(i < countGoat){\n animals[i] = Animal.goat;\n i++;\n }\n\n int j = 0;\n while (j < countSheep){\n animals[i] = Animal.sheep;\n i++;\n j++;\n }\n\n j = 0;\n while(j < countCow){\n animals[i] = Animal.cow;\n i++;\n j++;\n }\n\n }", "private static List<Point> reorder(List<Point> points) {\n Point tl = points.get(0);\n for (int i = 1; i< 4; i++) {\n if ((tl.x + tl.y) > (points.get(i).x + points.get(i).y)) {\n tl = points.get(i);\n }\n }\n\n // find bottom right => max sum\n Point br = points.get(0);\n for (int i = 1; i< 4; i++) {\n if ((br.x + br.y) < (points.get(i).x + points.get(i).y)) {\n br = points.get(i);\n }\n }\n\n // find top right => max x - y\n Point tr = points.get(0);\n for (int i = 1; i< 4; i++) {\n if ((tr.x - tr.y) < (points.get(i).x - points.get(i).y)) {\n tr = points.get(i);\n }\n }\n\n // find bottom left => min x - y\n Point bl = points.get(0);\n for (int i = 1; i< 4; i++) {\n if ((bl.x - bl.y) > (points.get(i).x - points.get(i).y)) {\n bl = points.get(i);\n }\n }\n\n List<Point> reorderList = new ArrayList<>();\n reorderList.add(tl);\n reorderList.add(tr);\n reorderList.add(br);\n reorderList.add(bl);\n\n return reorderList;\n }", "private void reorderChildren(TreeNode treeNode) {\n if(treeNode.getChildren().length == 1)\n return;\n TreeNode auxiliar;\n TreeNode[] newChildren = new TreeNode[treeNode.getChildren().length];\n auxiliar = treeNode.getChildren()[treeNode.getChildren().length - 1];\n for(int i = treeNode.getChildren().length - 1; i > 0; i--){\n newChildren[i] = treeNode.getChildren()[i-1];\n }\n newChildren[0] = auxiliar;\n treeNode.setChildren(newChildren);\n }", "private static void DoOrderBy()\n\t{\n\t\tArrayList<Attribute> inAtts = new ArrayList<Attribute>();\n\t\tinAtts.add(new Attribute(\"Int\", \"n_n_nationkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"n_n_name\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"n_n_regionkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"n_n_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Int\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att4\"));\n\n\t\t// These could be more complicated expressions than simple input columns\n\t\tMap<String, String> exprsToCompute = new HashMap<String, String>();\n\t\texprsToCompute.put(\"att1\", \"n_n_nationkey\");\n\t\texprsToCompute.put(\"att2\", \"n_n_name\");\n\t\texprsToCompute.put(\"att3\", \"n_n_regionkey\");\n\t\texprsToCompute.put(\"att4\", \"n_n_comment\");\n\t\t\n\t\t// Order by region key descending then nation name ascending\n\t\tArrayList<SortKeyExpression> sortingKeys = new ArrayList<SortKeyExpression>();\n\t\tsortingKeys.add(new SortKeyExpression(\"Int\", \"n_n_regionkey\", false));\n\t\tsortingKeys.add(new SortKeyExpression(\"Str\", \"n_n_name\", true));\n\t\t\n\t\t// run the selection operation\n\t\ttry\n\t\t{\n\t\t\tnew Order(inAtts, outAtts, exprsToCompute, sortingKeys, \"nation.tbl\", \"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "@Override\n\tpublic void placeOrder() {\n\t\t\n\t}", "void decrementOrderByOne( int nOrder, int nIdWorkflow );", "private void orderList() {\n Iterator<PlanarShape> sort = unorderedList.iterator();\n\n while(sort.hasNext()) {\n orderedList.insertInOrder(sort.next());\n }\n }", "private void sortEntities(){\n for (int i = 1; i < sorted.size; i++) {\n for(int j = i ; j > 0 ; j--){\n \tEntity e1 = sorted.get(j);\n \tEntity e2 = sorted.get(j-1);\n if(getRL(e1) < getRL(e2)){\n sorted.set(j, e2);\n sorted.set(j-1, e1);\n }\n }\n }\n }", "private void goZhuSuOrder(int position){\n\t}", "public int getOrder();", "void sort(OrderBy orderBy);", "@Override\n\tpublic void preorder() {\n\n\t}", "public void sortCompetitors(){\n\t\t}", "private void rearrangeGeneric(){\n for (int i = rear; i > 0; i++) {\n if (arr1[i].compareTo(arr1[i-1]) == 1){\n /*\n In this if condition the crr is a calling object and the parameter passing into the\n compareTo method is argument methods\n\n --> compareTo() will return 1, if calling object is bigger then argument object\n --> compareTo() will return 0, if both objects are same\n --> compareTo() will return -1, if calling object is smaller then argument object\n */\n\n //Now perform swapping\n E temp = arr1[i];\n arr1[i] = arr1[i-1];\n arr1[i-1] = temp;\n }\n }\n }", "public void sortAscending()\r\n\t{\r\n\t\tList<Book> oldItems = items;\r\n\t\titems = new ArrayList<Book>(items);\r\n\t\tCollections.sort(items);\r\n\t\tfirePropertyChange(\"books\", oldItems, items);\r\n\t}", "@Override\n public boolean onItemMove(int fromPosition, int toPosition) {\n if (fromPosition < toPosition){\n for(int i = fromPosition;i<toPosition;i++){\n Collections.swap(cartList, i, i+1);\n }\n }else{\n for (int i = fromPosition; i > toPosition; i--){\n Collections.swap(cartList, i, i-1);\n }\n }\n notifyItemMoved(fromPosition,toPosition);\n return true;\n }", "@Override\n\tpublic void reorderSubComponent(Component component, int position)\n\t\t\tthrows InvalidPositionException {\n\t\tif (!subComponents.contains(component)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check valid position\n\t\tint maxPosition = subComponents.size();\n\t\tif (position < 0 || position > maxPosition) {\n\t\t\tthrow new InvalidPositionException(position, maxPosition);\n\t\t}\n\n\t\t// Check if reordering is necessary\n\t\tint currentPosition = subComponents.indexOf(component);\n\t\tif (position == currentPosition || position == currentPosition + 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (position < currentPosition) {\n\t\t\tsubComponents.remove(component);\n\t\t\tsubComponents.add(position, component);\n\t\t} else {\n\t\t\tsubComponents.remove(component);\n\t\t\tsubComponents.add(position - 1, component);\n\t\t}\n\n\t\tnotifySubComponentsChangedListeners();\n\t}", "public void reorderList(ListNode head) {\n\tif (head == null || head.next == null) {\n\t return;\n\t}\n\n\tDeque<Integer> dq = new LinkedList<>();\n\tListNode cur = head;\n\twhile (cur != null) {\n\t dq.add(cur.val);\n\t cur = cur.next;\n\t}\n\n\tListNode cur1 = head;\n\twhile (cur1 != null && cur1.next != null) {\n\t cur1.val = dq.pollFirst();\n\t cur1.next.val = dq.pollLast();\n\t cur1 = cur1.next.next;\n\t}\n\n\tif (cur1 != null) {\n\t cur1.val = dq.poll();\n\t}\n }", "private void movieOrder(Mnode newMovie0, int movieRank0){\n\t\tint counter = 19;\n\t\tif (movieRank0 > numMP)\n\t\t\tmoviePref[numMP] = newMovie0;\n\t\telse{\n\t\t\twhile (counter > (movieRank0-1)){\n\t\t\t\tmoviePref[counter] = moviePref[counter-1];\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t\tmoviePref[(movieRank0-1)] = newMovie0;\n\t\t}\n\t\tSystem.out.println(newMovie0.getName() + \" was added to wishlist\");\n\t\tnumMP++;\n\t}", "public void sortAllRows(){\n\t\t/* code goes here */ \n\t\t\n\t\t\n\t\t//WHY SHOULD THEY BE SORTED LIKE THE EXAMPLE SAYS???????\n\t\t\n\t}", "public void reorder(int low, int high) {\n if (low < high) {\n // Select pivot position and put all the elements smaller\n // than pivot on left and greater than pivot on right\n int pi = partition(low, high);\n\n // Sort the elements on the left of pivot\n reorder(low, pi - 1);\n\n // Sort the elements on the right of pivot\n reorder(pi + 1, high);\n }\n }", "public String getSortOrder();", "private String bidirectionalReorder(String text) {\n try {\n Bidi bidi = new Bidi((new ArabicShaping(8)).shape(text), 127);\n bidi.setReorderingMode(0);\n return bidi.writeReordered(2);\n } catch (ArabicShapingException exception) {\n return text;\n }\n }", "public String sortOriginOrReturn();", "public void reorderQueuedQuestions(Long playerId, List<Integer> newOrder) {\r\n\t\tPlayer player = lookupPlayer(playerId);\r\n\r\n\t\t// check for invalid ids\r\n\t\tfor (Integer id : newOrder) {\r\n\t\t\tboolean found = false;\r\n\t\t\tfor (QueuedQuestion qq : player.getQueuedQuestions()) {\r\n\t\t\t\tif (qq.getQuestion().getId()==id) {\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!found) {\r\n\t\t\t\tlogger.error(\"Invalid question id in reorder. id=\"+id);\r\n\t\t\t\tthrow new TrivolousError(\"Invalid question id \" + id);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// rerank by new order and make list of not found ids to delete\r\n\t\tArrayList<QueuedQuestion> qqsToBeDeleted = new ArrayList<QueuedQuestion>(); \r\n\t\tfor (QueuedQuestion qq : player.getQueuedQuestions()) {\r\n\t\t\tboolean found = false;\r\n\t\t\tint qid = qq.getQuestion().getId();\r\n\t\t\tint rank = 1;\r\n\t\t\tfor (Integer id : newOrder) {\r\n\t\t\t\tif (qid == id) {\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\trank++;\r\n\t\t\t}\r\n\t\t\tif (!found) {\r\n\t\t\t\tqqsToBeDeleted.add(qq);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// reorder based on new order\r\n\t\t\t\tqq.setRank(rank);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// delete separately to prevent concurrent mod error\r\n\t\tfor (QueuedQuestion qq : qqsToBeDeleted) {\r\n\t\t\tquestionRemove(player, qq);\r\n\t\t}\r\n\t}", "public void order_moves() {\n\t\tfor (int i = 0; i < future_moves.size(); i += 1) {\n\t\t\tArrayList<Integer> curr_smallest = future_moves.get(i);\n\t\t\tint smallest = i;\n\t\t\t\n\t\t\tfor (int j = i; j < future_moves.size(); j += 1) {\n\t\t\t\tArrayList<Integer> curr_checking = future_moves.get(j);\n\t\t\t\t\n\t\t\t\tif (curr_checking.get(1) < curr_smallest.get(1)) {\n\t\t\t\t\tcurr_smallest = curr_checking;\n\t\t\t\t\tsmallest = j;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//Swap the current and the smallest\n\t\t\tfuture_moves.set(smallest, future_moves.get(i));\n\t\t\tfuture_moves.set(i, curr_smallest);\n\t\t}\n\t\t\n\t}", "public String doSort();", "@Override\n\tpublic void reorganize() {\n\n\t}", "@Override\n\tpublic void inorder() {\n\n\t}", "Order(int t, int l) {\n this.t = t;\n this.l = l;\n }", "public static void sortList(ArrayList<Patient> newOrder){\r\n \t\tlistModel.clear();\r\n \t\tPatientView.setSortedArray(newOrder);\r\n \t\tfor (Patient p : newOrder) {\r\n \t\t\tlistModel.addElement(p.getFirstName());\r\n \t\t}\r\n \t}", "public void sortByAndser() {\r\n\t\tQuestion[][] question2DArray = new Question[displayingList.size()][];\r\n\t\tfor (int i = 0; i < displayingList.size(); i++) {\r\n\t\t\tquestion2DArray[i] = new Question[1];\r\n\t\t\tquestion2DArray[i][0] = displayingList.get(i);\r\n\t\t}\r\n\r\n\t\twhile (question2DArray.length != 1) {\r\n\t\t\tquestion2DArray = (Question[][]) merge2DArray(question2DArray);\r\n\t\t}\r\n\t\tdisplayingList.removeAll(displayingList);\r\n\t\tfor (int i = 0; i < question2DArray[0].length; i++) {\r\n\t\t\tdisplayingList.add(question2DArray[0][i]);\r\n\t\t}\r\n\t}", "public void oldSort()\n\t{\n\t\tfor (int index = 0; index < arraySize; index++) {\n\t\t\tfor (int secondIndex = index + 1; secondIndex < arraySize; secondIndex++) {\n\t\t\t\tint temp = 0;\n\t\t\t\tif (array[index] > array[secondIndex]) {\n\t\t\t\t\ttemp = array[index];\n\t\t\t\t\tarray[index] = array[secondIndex];\n\t\t\t\t\tarray[secondIndex] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static Node[] reorderReverse(Node[] nodes, int[] map) {\n\t\tNode[] reordered = new Node[map.length];\n\t\tfor (int i = 0; i < map.length; i++)\n\t\t\treordered[map[i]] = nodes[i];\n\t\treturn reordered;\n\t}", "private void resortAndReselectTreeGrid() {\n resortAndReselectTreeGrid(null);\n }", "Ordering<Part> getOrdering();", "protected abstract void arrange(List<Skill> skills) throws SkillTreeException;", "protected void reorderNode( String workspaceName,\n NodeKey key,\n Name primaryType,\n Set<Name> mixinTypes,\n NodeKey parent,\n Path newPath,\n Path oldPath,\n Path reorderedBeforePath,\n Map<NodeKey, Map<Path, Path>> snsPathChangesByNodeKey ) {\n\n }", "@Override\n public int getOrder() {\n return 4;\n }", "@FXML\n private void updateNameOrder(ActionEvent event) {\n\n if (sortOrder == Order.NAME_ASC) {\n\n sortOrder = Order.NAME_DESC;\n\n } else if (sortOrder == Order.NAME_DESC) {\n\n sortOrder = Order.DEFAULT;\n\n } else {\n\n sortOrder = Order.NAME_ASC;\n\n }\n\n updateOrderButtons();\n\n }", "abstract public void reorganizePositions(Vector2 start, Vector2 newPos);", "@Override\n protected void handleComponentReordering(DragAndDropEvent event) {\n AccordionTargetDetails details = (AccordionTargetDetails) event\n .getTargetDetails();\n DDAccordion acc = (DDAccordion) details.getTarget();\n VerticalDropLocation location = details.getDropLocation();\n LayoutBoundTransferable transferable = (LayoutBoundTransferable) event\n .getTransferable();\n Component c = transferable.getComponent();\n int idx = details.getOverIndex();\n\n Tab tab = acc.getTab(c);\n\n if (location == VerticalDropLocation.TOP) {\n // Left of previous tab\n int originalIndex = acc.getTabPosition(tab);\n if (originalIndex > idx) {\n acc.setTabPosition(tab, idx);\n } else if (idx - 1 >= 0) {\n acc.setTabPosition(tab, idx - 1);\n }\n\n } else if (location == VerticalDropLocation.BOTTOM) {\n // Right of previous tab\n int originalIndex = acc.getTabPosition(tab);\n if (originalIndex > idx) {\n acc.setTabPosition(tab, idx + 1);\n } else {\n acc.setTabPosition(tab, idx);\n }\n }\n }", "public void sort() {\n }", "@Override\n\tpublic void postorder() {\n\n\t}", "void prepareOrder(int orderId);", "private void sortByAmount(){\n int stopPos = 0;\n while(colours.size()-stopPos > 0){\n int inARow = 1;\n for(int i = colours.size() - 1; i > stopPos; i--){\n if(colours.get(i-1).getAmount() < colours.get(i).getAmount()){\n rgb temp = new rgb(colours.get(i-1));\n colours.set(i-1, colours.get(i));\n colours.set(i, temp);\n }else{\n inARow++;\n }\n }\n stopPos++;\n if(inARow == colours.size()){\n break;\n }\n }\n }", "interface IReorderListener {\n\n /**\n* An object has been moved, clients might need to react.\n*\n* @param obj\n* @param newIndex\n*\n*/\n public void reorder(Object obj, int newIndex);\n}", "public void incrementOrder() {\n mOrder++;\n }", "public void reorderList(ListNode head) {\n if (head == null || head.next == null)\n return;\n\n // step 1. cut the list to two halves\n // prev will be the tail of 1st half\n // slow will be the head of 2nd half\n ListNode prev = null, slow = head, fast = head, l1 = head;\n while (fast != null && fast.next != null) {\n prev = slow;\n slow = slow.next;\n fast = fast.next.next;\n }\n prev.next = null;\n // step 2. reverse the 2nd half\n ListNode l2 = reverse(slow);\n // step 3. merge the two halves\n merge(l1, l2);\n }", "public void selectionSort()\r\n {\r\n for(int x = 0; x < numItems; x++)\r\n {\r\n int smallestLoc = x;\r\n for(int y = x+1; y<numItems; y++)\r\n {\r\n if(mArray[y]< mArray[smallestLoc])\r\n {\r\n smallestLoc = y;\r\n }\r\n }\r\n int temp = mArray[x];\r\n mArray[x] = mArray[smallestLoc];\r\n mArray[smallestLoc] = temp;\r\n }\r\n }", "@Override\n public void toggleSortOrder(int column) {\n if (column == TablesTableModel.COLUMN_CREATED || column == TablesTableModel.COLUMN_SEATS) {\n List<? extends SortKey> sortKeys = getSortKeys();\n if (sortKeys.size() == 2) {\n // clear sort on second click\n setSortKeys(null);\n } else {\n // setup sort on first click\n List<SortKey> list = new ArrayList<>();\n list.add(new RowSorter.SortKey(TablesTableModel.COLUMN_SEATS, SortOrder.ASCENDING));\n list.add(new RowSorter.SortKey(TablesTableModel.COLUMN_CREATED, SortOrder.DESCENDING));\n setSortKeys(list);\n }\n } else {\n super.toggleSortOrder(column);\n }\n }", "private void resortAndReselectTreeGrid(final KzTreeAware itemToSelect) {\n\n// inMemoryKzTreeProvider = new TreeDataProvider<>(treeData);\n// kzTreeGrid.getDataCommunicator().getKeyMapper().removeAll();\n// inMemoryKzTreeProvider.setFilter(kz -> kz.getArch());\n// inMemoryKzTreeProvider.refreshAll();\n List<GridSortOrder<KzTreeAware>> sortOrder = kzTreeGrid.getSortOrder();\n// kzTreeGrid.setDataProvider(inMemoryKzTreeProvider);\n\n if (CollectionUtils.isEmpty(sortOrder)) {\n kzTreeGrid.sort(initialSortOrder);\n } else {\n kzTreeGrid.sort(sortOrder);\n }\n\n selectItem(itemToSelect);\n }", "public void reorderList(ListNode head) {\n\n if(head == null||head.next == null) return;\n int len = 0;\n\n for (ListNode cur = head; cur!= null; cur = cur.next) len++;\n\n int middle = (len%2 == 1) ? len/2 + 1: len/2 ;\n\n ListNode midNode = head;\n for (int i = 0; i < middle - 1; i++)\n midNode = midNode.next;\n\n ListNode head1 = head;\n ListNode head2 = midNode.next;\n midNode.next = null;\n head2 = revertListAndReturnHead(head2);\n\n //MERGE\n ListNode cur1 = head1;\n ListNode cur2 = head2;\n while (cur1 != null && cur2 != null) {\n ListNode nextCur1 = cur1.next;\n ListNode nextCur2 = cur2.next;\n cur1.next = cur2;\n cur2.next = nextCur1;\n cur1 = nextCur1;\n cur2 = nextCur2;\n }\n\n }", "Map<String, org.springframework.batch.item.database.Order> genBatchOrderByFromSort(TableFields tableFields, Sort sort);", "@FXML\n private void updateRegionOrder(ActionEvent event) {\n\n if (sortOrder == Order.REGION_ASC) {\n\n sortOrder = Order.REGION_DESC;\n\n } else if (sortOrder == Order.REGION_DESC) {\n\n sortOrder = Order.DEFAULT;\n\n } else {\n\n sortOrder = Order.REGION_ASC;\n\n }\n\n updateOrderButtons();\n\n }", "public void moveSort() {\r\n\t\trefX = 0;\r\n\t\tmoveSort(root);\r\n\t}", "void setGivenByOrder(int[] gbo);", "@Override\n\tpublic int getOrder() {\n\t\treturn 1;\n\t}", "public static void changeOrder(String order){\n switch (order) {\n case \"delais\":\n ordered = \"delais DESC\";\n break;\n case \"date\":\n ordered = \"date_creation DESC\";\n break;\n case \"nom\":\n ordered = \"nom_annonce\";\n break;\n }\n }", "void sort();", "void sort();", "public void sortProposals() {\n\n\t}", "public void sortToDo(){\n\t\tCollections.sort(allToDoLists);\n\t}", "private ArrayList<String> postOrder()\n\t{\n\t\tArrayList<String> rlist = new ArrayList<String>();\n\t\tpostOrder(this,rlist);\n\t\treturn rlist;\n\t}", "public void decrementOrder() {\n mOrder--;\n }", "@Test\n public void shouldTestIsReorderValidWithoutUnbreakable() {\n this.gridLayer.setClientAreaProvider(new IClientAreaProvider() {\n\n @Override\n public Rectangle getClientArea() {\n return new Rectangle(0, 0, 1600, 250);\n }\n\n });\n this.gridLayer.doCommand(new ClientAreaResizeCommand(new Shell(Display.getDefault(), SWT.V_SCROLL | SWT.H_SCROLL)));\n\n // in same group\n assertTrue(RowGroupUtils.isReorderValid(this.rowGroupHeaderLayer, 0, 4, true));\n assertTrue(RowGroupUtils.isReorderValid(this.rowGroupHeaderLayer, 4, 4, true));\n // to other group\n assertTrue(RowGroupUtils.isReorderValid(this.rowGroupHeaderLayer, 0, 6, true));\n // to start of first group\n assertTrue(RowGroupUtils.isReorderValid(this.rowGroupHeaderLayer, 8, 0, true));\n // to end of last group\n assertTrue(RowGroupUtils.isReorderValid(this.rowGroupHeaderLayer, 0, 13, false));\n }", "@Override\n\tpublic T[] sort(T[] input) {\n\t\tfor(int i = 1; i < input.length; i++){\n\t\t\t//compare with the previous one, if smaller, switch with it.\n\t\t\tfor(int j = i; j > 0 && input[j-1].compareTo( input[j]) > 0; j--){\n\t\t\t\t//add the condition input[j-1] > input[j] in the for loop;\n\t\t\t\t//cause if j-1th < jth, j-2th < jth(left part is ordered)\n\t\t\t\tswap(input, j, j-1);\n\t\t\t}\n\t\t}\n\t\treturn input;\n\t}" ]
[ "0.7033024", "0.6948401", "0.64139205", "0.6401494", "0.62500393", "0.62309086", "0.62005085", "0.61061484", "0.6002819", "0.5982208", "0.59642506", "0.59642506", "0.5938708", "0.5937081", "0.59158826", "0.5913287", "0.59118414", "0.588197", "0.5878481", "0.58512723", "0.58371204", "0.5832705", "0.5806636", "0.5802469", "0.57975984", "0.57838976", "0.57746446", "0.5771825", "0.5768488", "0.57297313", "0.5725999", "0.57163334", "0.5705192", "0.5672709", "0.56528383", "0.56498396", "0.56228447", "0.5617877", "0.55900556", "0.5576132", "0.5574578", "0.5542183", "0.55415314", "0.55377007", "0.5513076", "0.54769665", "0.5475373", "0.5471926", "0.5469725", "0.5461435", "0.54560405", "0.545397", "0.54443574", "0.54413944", "0.5441023", "0.54354155", "0.54292995", "0.5427683", "0.5423839", "0.5423227", "0.5405624", "0.5405536", "0.5402004", "0.54019964", "0.53956854", "0.5393312", "0.53845376", "0.5379096", "0.5371246", "0.535089", "0.53494895", "0.53374493", "0.53180176", "0.53159755", "0.5315805", "0.53156406", "0.531429", "0.53139645", "0.5307017", "0.5306389", "0.5298289", "0.5293825", "0.52911454", "0.5289204", "0.5278959", "0.5271276", "0.5267987", "0.5266641", "0.52657926", "0.5258513", "0.5251588", "0.5251345", "0.52471375", "0.52454054", "0.52454054", "0.52399284", "0.5238404", "0.52358395", "0.5230506", "0.5223953", "0.5214285" ]
0.0
-1
helper function for reorder()
private String extractLetters(String courseCode) { CharMatcher matcher = CharMatcher.javaDigit(); String StringOnly = matcher.removeFrom(courseCode); return StringOnly; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changeSortOrder();", "public void reorder(Object obj, int newIndex);", "private void updateOrder() {\n Arrays.sort(positions);\n }", "public void insertReorderBarrier() {\n\t\t\n\t}", "public void reorder(String field){\n\t\tsetOrderFields(new String[] {\n\t\t\tfield\n\t\t});\n\t\tdj.launch(20);\n\t}", "public void reorganizeNote() {\n note = Position.orderList(note);\n }", "public int[] reorder(int[] array) {\n int left = 0;\n int right = array.length-1;\n if (array.length % 2 != 0){\n right = right - 1;\n }\n reversedMergesort(array,left,right);\n return array;\n }", "public static void doReorder ( RunData data)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\n\t\t//get the ParameterParser from RunData\n\t\tParameterParser params = data.getParameters ();\n\t\t\n\t\tboolean isPrioritySortEnabled = ContentHostingService.isSortByPriorityEnabled();\n\n\n\t\tString folderId = params.getString (\"folderId\");\n\t\tif(folderId == null)\n\t\t{\n\t\t\taddAlert(state, \"error\");\n\t\t}\n\t\t\n\t\tString sortBy = (String) state.getAttribute(STATE_REORDER_SORT_BY);\n\t\tif(sortBy == null)\n\t\t{\n\t\t\tsortBy = ResourceProperties.PROP_CONTENT_PRIORITY;\n\t\t\tstate.setAttribute(STATE_REORDER_SORT_BY, sortBy);\n\t\t}\n\t\tString sortedAsc = (String) state.getAttribute (STATE_REORDER_SORT_ASC);\n\t\tif(sortedAsc == null)\n\t\t{\n\t\t\tsortedAsc = Boolean.TRUE.toString();\n\t\t\tstate.setAttribute(STATE_REORDER_SORT_ASC, sortedAsc);\n\t\t}\n\n\t\tComparator comparator = ContentHostingService.newContentHostingComparator(sortBy, Boolean.getBoolean(sortedAsc));\n\t\tstate.setAttribute(STATE_REORDER_SORT, comparator);\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\tstate.setAttribute(STATE_REORDER_FOLDER, folderId);\n\t\t\tstate.setAttribute (STATE_MODE, MODE_REORDER);\n\n\t\t}\t// if-else\n\n\t}", "private List<Article> orderArticles(List<Article> things){\n\t\t Comparator<Article> comparatorPrizes = new Comparator<Article>() {\n\t public int compare(Article x, Article y) {\n\t return (int) (x.getPrize() - y.getPrize());\n\t }\n\t };\n\t Collections.sort(things,comparatorPrizes); \n\t Collections.reverse(things);\n\t return things;\n\t }", "int order();", "void changeOrder(GeometricalObject object, int offset);", "void changeOrder(GeometricalObject object, int offset);", "@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void orderSegments() {\n //insert numOrder for the db\n int i = 0;\n for(TransportSegmentLogic transportSegment: transportSegments){\n transportSegment.setOrder(i);\n i++;\n }\n\n\n\n /*int i = 0;\n int j = 1;\n\n\n TransportSegmentLogic swapSegment;\n\n while(j < transportSegments.size()){\n if(transportSegments.get(j).getOrigin().equals(transportSegments.get(i).getDestination())){\n swapSegment = transportSegments.get(j);\n transportSegments.remove(swapSegment);\n transportSegments.add(i +1, swapSegment);\n i = i + 1;\n j = i + 1;\n }\n j++;\n }\n\n j = transportSegments.size() -1;\n\n while(j > i){\n if(transportSegments.get(j).getDestination().equals(transportSegments.get(0).getOrigin())){\n swapSegment = transportSegments.get(j);\n transportSegments.remove(swapSegment);\n transportSegments.add(0, swapSegment);\n i = i + 1;\n j = transportSegments.size();\n }\n j--;\n } */\n }", "public void makeReorderRanges(int[] iArr, UVector32 uVector32) {\n makeReorderRanges(iArr, false, uVector32);\n }", "public void reorder(FillingStrategy strategy) {\n\n\t\tList<Content> contentsLongList = null;\n\t\tif (contentMap.size() == 0)\n\t\t\tthrow new SomethingWentWrongException(\"Empty Location\");\n \n\t\tcontentsLongList = sortContentMapByVolumeAndBarcode(contentMap);\n\t\tremoveAllContentFromLocation();\n\n\t\tswitch (strategy) {\n\t\tcase ROW_WISE:\t\t\n\t\t\tfillLocationWithItems(contentsLongList, FillingStrategy.ROW_WISE);\n\t\t\tbreak;\n\t\tcase COLUMN_WISE:\n\t\t\tfillLocationWithItems(contentsLongList, FillingStrategy.COLUMN_WISE);\n\t\t\tbreak;\n\t\t}\n\n\t}", "public abstract void toggleSortOrder(int column);", "public myList<T> my_preorder();", "private void changeOrderPhase() {\n for (int i = 0; i < 4; i++)\n System.out.print(playerList[i].getName() + \" ,\");\n Player tmp = playerList[0];\n playerList[0] = playerList[1];\n playerList[1] = playerList[2];\n playerList[2] = playerList[3];\n playerList[3] = tmp;\n System.out.println();\n for (int i = 0; i < 4; i++)\n System.out.print(playerList[i].getName() + \" ,\");\n System.out.println();\n }", "void reorderNode(LinkedEntries.LinkNode insert, LinkedEntries.LinkNode before) {\n removeNode(insert);\n if (before == null) {\n addNode(insert, getHeader());\n } else {\n addNode(insert, before);\n }\n }", "public void sort() {\n\t\tfor (int i = 1; i < this.dataModel.getLength(); i++) {\n\t\t\tfinal int x = this.dataModel.get(i);\n\n\t\t\t// Find location to insert using binary search\n\t\t\tfinal int j = Math.abs(this.dataModel.binarySearch(0, i, x) + 1);\n\n\t\t\t// Shifting array to one location right\n\t\t\tthis.dataModel.arrayCopy(j, j + 1, i - j);\n\n\t\t\t// Placing element at its correct location\n\t\t\tthis.dataModel.set(j, x);\n\t\t\tthis.repaint(this.count++);\n\t\t}\n\t}", "@Override\r\n\tpublic void editSort() {\n\t\t\r\n\t}", "public myList<T> my_postorder();", "void sortUI();", "public void reorderList(ListNode head) {\n if (head == null) {\n return;\n } else if (head.next == null) {\n return;\n }\n \n ListNode pre = findMidPre(head);\n \n // cut the two list.\n ListNode right = pre.next;\n pre.next = null;\n \n // reverse the right link.\n right = reverse(right);\n \n merge(head, right);\n }", "public static Node[] reorder(Node[] nodes, int[] map) {\n\t\tNode[] reordered = new Node[map.length];\n\t\tfor (int i = 0; i < map.length; i++)\n\t\t\treordered[i] = nodes[map[i]];\n\t\treturn reordered;\n\t}", "private static void updateOrderOnRemove( int nOrderId )\n {\n for ( GroupAction groupActionChange : getGroupActionList( ) )\n {\n int nGroupActionToUpdateOrder = groupActionChange.getOrdre( );\n\n if ( ( nGroupActionToUpdateOrder > nOrderId ) )\n {\n groupActionChange.setOrdre( nGroupActionToUpdateOrder - CONSTANT_STEP_ORDER );\n _dao.store( groupActionChange, _plugin );\n }\n }\n }", "public void changeOrder(GeometricalObject object, int offset);", "public static void reorder(ListNode head) {\n ListNode preHead = new ListNode(0), p1 = preHead, p2 = preHead;\n preHead.next = head;\n// head.print();\n// System.out.println(\"\");\n// System.out.println(\"--------\");\n\n while (p2 != null && p2.next != null) {\n p1 = p1.next;\n p2 = p2.next.next;\n }\n// System.out.println(\"p1: \" + p1.val);\n// p1 = p1.next;\n// head.print();\n// System.out.println();\n// System.out.println(\"secondHalfReversed\");\n ListNode secondHalfReversed = reverseList(p1.next); // even number is good\n p1.next = null;\n// head.print();\n// secondHalfReversed.print();\n\n mergeLists(head, secondHalfReversed);\n//\n// System.out.println(\"\");\n// System.out.println(\"printing head \");\n// head.print();\n\n }", "private void shuffleOrder() {\n\t\t// Simple shuffle: swap each piece with some other one\n\t\tfor (int i = 0; i < order.size(); i++) {\n\t\t\tint j = (int) (Math.random() * order.size());\n\t\t\tInteger pi = order.get(i);\n\t\t\torder.set(i, order.get(j));\n\t\t\torder.set(j, pi);\n\t\t}\n\t}", "public void arrange(Order order){\n for(int i=0; i<26; ++i){\n // arrange list of list; list by list\n ArrayList<Integer> list = check_list.get(i);\n for(int j=0; j<list.size(); ++j ){\n if(order == Order.ASCENDING){\n // ascending order\n for(int k=i; k<list.size()-1; ++k){\n int num1= list.get(k);\n int num2= list.get(k+1);\n // ascending order\n if(num2<num1){\n // swap\n list.set(k, num2);\n list.set(k+1, num1);\n }\n }\n }else if(order == Order.DESCENDING){\n // descending order\n for(int k=i; k<list.size()-1; ++k){\n int num1= list.get(k);\n int num2= list.get(k+1);\n // descending order\n if(num2>num1){\n // swap\n list.set(j, num2);\n list.set(k, num1);\n }\n }\n }\n }\n // put arranged list, back in its place\n check_list.set(i, list);\n }\n }", "static public ListNode reorder(ListNode head) {\n\t\tif (head == null || head.next == null) {\n\t\t\treturn head;\n\t\t}\n\t\tListNode one = head;\n\t\tListNode mid = findMidle(head);\n\t\tSystem.out.println(\"mid: \"+ mid.val);\n\t\tListNode two = reverse(mid.next);\n\t\tmid.next = null;\n\t\tListNodeUtils.printList(head);\n\t\tListNodeUtils.printList(two);\n\t\tListNode curr = one;\n\t\twhile (one != null && two != null) {\n\t\t\tone = one.next;\n\t\t\tcurr.next = two;\n\t\t\tcurr = curr.next;\n\n\t\t\ttwo = two.next;\n\t\t\tcurr.next = one;\n\t\t\tcurr = curr.next;\n\t\t}\n\t\tif (one != null) {\n\t\t\tcurr.next = null;\n//\t\t curr = curr.next; \n\t\t}\n\n\t\t// curr.next = null;\n\t\treturn head;\n\t}", "public void orderItem(Item i) {\r\n\r\n\r\n\r\n this.o.orderItem(i);\r\n\r\n }", "public void RearrangeItems() {\n Collections.shuffle(images, new Random(System.currentTimeMillis()));\n Collections.shuffle(text, new Random(System.currentTimeMillis()));\n Adapter adapter = new Adapter(MainActivity.this, images, text);\n recyclerView.setAdapter(adapter);\n }", "public static void reorder(Animal[] animals) {\n\n int beginning = 0;\n int end = animals.length;\n int countCow = 0;\n int countSheep = 0;\n int countGoat = 0;\n do {\n if(animals[beginning] == Animal.sheep){\n countSheep++;\n beginning++;\n } else if(animals[beginning] == Animal.goat){\n countGoat++;\n beginning++;\n }else{\n countCow++;\n beginning++;\n }\n } while (beginning != end); //do while\n\n int i = 0;\n while(i < countGoat){\n animals[i] = Animal.goat;\n i++;\n }\n\n int j = 0;\n while (j < countSheep){\n animals[i] = Animal.sheep;\n i++;\n j++;\n }\n\n j = 0;\n while(j < countCow){\n animals[i] = Animal.cow;\n i++;\n j++;\n }\n\n }", "private static List<Point> reorder(List<Point> points) {\n Point tl = points.get(0);\n for (int i = 1; i< 4; i++) {\n if ((tl.x + tl.y) > (points.get(i).x + points.get(i).y)) {\n tl = points.get(i);\n }\n }\n\n // find bottom right => max sum\n Point br = points.get(0);\n for (int i = 1; i< 4; i++) {\n if ((br.x + br.y) < (points.get(i).x + points.get(i).y)) {\n br = points.get(i);\n }\n }\n\n // find top right => max x - y\n Point tr = points.get(0);\n for (int i = 1; i< 4; i++) {\n if ((tr.x - tr.y) < (points.get(i).x - points.get(i).y)) {\n tr = points.get(i);\n }\n }\n\n // find bottom left => min x - y\n Point bl = points.get(0);\n for (int i = 1; i< 4; i++) {\n if ((bl.x - bl.y) > (points.get(i).x - points.get(i).y)) {\n bl = points.get(i);\n }\n }\n\n List<Point> reorderList = new ArrayList<>();\n reorderList.add(tl);\n reorderList.add(tr);\n reorderList.add(br);\n reorderList.add(bl);\n\n return reorderList;\n }", "private void reorderChildren(TreeNode treeNode) {\n if(treeNode.getChildren().length == 1)\n return;\n TreeNode auxiliar;\n TreeNode[] newChildren = new TreeNode[treeNode.getChildren().length];\n auxiliar = treeNode.getChildren()[treeNode.getChildren().length - 1];\n for(int i = treeNode.getChildren().length - 1; i > 0; i--){\n newChildren[i] = treeNode.getChildren()[i-1];\n }\n newChildren[0] = auxiliar;\n treeNode.setChildren(newChildren);\n }", "private static void DoOrderBy()\n\t{\n\t\tArrayList<Attribute> inAtts = new ArrayList<Attribute>();\n\t\tinAtts.add(new Attribute(\"Int\", \"n_n_nationkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"n_n_name\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"n_n_regionkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"n_n_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Int\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att4\"));\n\n\t\t// These could be more complicated expressions than simple input columns\n\t\tMap<String, String> exprsToCompute = new HashMap<String, String>();\n\t\texprsToCompute.put(\"att1\", \"n_n_nationkey\");\n\t\texprsToCompute.put(\"att2\", \"n_n_name\");\n\t\texprsToCompute.put(\"att3\", \"n_n_regionkey\");\n\t\texprsToCompute.put(\"att4\", \"n_n_comment\");\n\t\t\n\t\t// Order by region key descending then nation name ascending\n\t\tArrayList<SortKeyExpression> sortingKeys = new ArrayList<SortKeyExpression>();\n\t\tsortingKeys.add(new SortKeyExpression(\"Int\", \"n_n_regionkey\", false));\n\t\tsortingKeys.add(new SortKeyExpression(\"Str\", \"n_n_name\", true));\n\t\t\n\t\t// run the selection operation\n\t\ttry\n\t\t{\n\t\t\tnew Order(inAtts, outAtts, exprsToCompute, sortingKeys, \"nation.tbl\", \"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "@Override\n\tpublic void placeOrder() {\n\t\t\n\t}", "void decrementOrderByOne( int nOrder, int nIdWorkflow );", "private void orderList() {\n Iterator<PlanarShape> sort = unorderedList.iterator();\n\n while(sort.hasNext()) {\n orderedList.insertInOrder(sort.next());\n }\n }", "private void sortEntities(){\n for (int i = 1; i < sorted.size; i++) {\n for(int j = i ; j > 0 ; j--){\n \tEntity e1 = sorted.get(j);\n \tEntity e2 = sorted.get(j-1);\n if(getRL(e1) < getRL(e2)){\n sorted.set(j, e2);\n sorted.set(j-1, e1);\n }\n }\n }\n }", "private void goZhuSuOrder(int position){\n\t}", "public int getOrder();", "void sort(OrderBy orderBy);", "@Override\n\tpublic void preorder() {\n\n\t}", "public void sortCompetitors(){\n\t\t}", "private void rearrangeGeneric(){\n for (int i = rear; i > 0; i++) {\n if (arr1[i].compareTo(arr1[i-1]) == 1){\n /*\n In this if condition the crr is a calling object and the parameter passing into the\n compareTo method is argument methods\n\n --> compareTo() will return 1, if calling object is bigger then argument object\n --> compareTo() will return 0, if both objects are same\n --> compareTo() will return -1, if calling object is smaller then argument object\n */\n\n //Now perform swapping\n E temp = arr1[i];\n arr1[i] = arr1[i-1];\n arr1[i-1] = temp;\n }\n }\n }", "public void sortAscending()\r\n\t{\r\n\t\tList<Book> oldItems = items;\r\n\t\titems = new ArrayList<Book>(items);\r\n\t\tCollections.sort(items);\r\n\t\tfirePropertyChange(\"books\", oldItems, items);\r\n\t}", "@Override\n public boolean onItemMove(int fromPosition, int toPosition) {\n if (fromPosition < toPosition){\n for(int i = fromPosition;i<toPosition;i++){\n Collections.swap(cartList, i, i+1);\n }\n }else{\n for (int i = fromPosition; i > toPosition; i--){\n Collections.swap(cartList, i, i-1);\n }\n }\n notifyItemMoved(fromPosition,toPosition);\n return true;\n }", "@Override\n\tpublic void reorderSubComponent(Component component, int position)\n\t\t\tthrows InvalidPositionException {\n\t\tif (!subComponents.contains(component)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check valid position\n\t\tint maxPosition = subComponents.size();\n\t\tif (position < 0 || position > maxPosition) {\n\t\t\tthrow new InvalidPositionException(position, maxPosition);\n\t\t}\n\n\t\t// Check if reordering is necessary\n\t\tint currentPosition = subComponents.indexOf(component);\n\t\tif (position == currentPosition || position == currentPosition + 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (position < currentPosition) {\n\t\t\tsubComponents.remove(component);\n\t\t\tsubComponents.add(position, component);\n\t\t} else {\n\t\t\tsubComponents.remove(component);\n\t\t\tsubComponents.add(position - 1, component);\n\t\t}\n\n\t\tnotifySubComponentsChangedListeners();\n\t}", "public void reorderList(ListNode head) {\n\tif (head == null || head.next == null) {\n\t return;\n\t}\n\n\tDeque<Integer> dq = new LinkedList<>();\n\tListNode cur = head;\n\twhile (cur != null) {\n\t dq.add(cur.val);\n\t cur = cur.next;\n\t}\n\n\tListNode cur1 = head;\n\twhile (cur1 != null && cur1.next != null) {\n\t cur1.val = dq.pollFirst();\n\t cur1.next.val = dq.pollLast();\n\t cur1 = cur1.next.next;\n\t}\n\n\tif (cur1 != null) {\n\t cur1.val = dq.poll();\n\t}\n }", "private void movieOrder(Mnode newMovie0, int movieRank0){\n\t\tint counter = 19;\n\t\tif (movieRank0 > numMP)\n\t\t\tmoviePref[numMP] = newMovie0;\n\t\telse{\n\t\t\twhile (counter > (movieRank0-1)){\n\t\t\t\tmoviePref[counter] = moviePref[counter-1];\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t\tmoviePref[(movieRank0-1)] = newMovie0;\n\t\t}\n\t\tSystem.out.println(newMovie0.getName() + \" was added to wishlist\");\n\t\tnumMP++;\n\t}", "public void sortAllRows(){\n\t\t/* code goes here */ \n\t\t\n\t\t\n\t\t//WHY SHOULD THEY BE SORTED LIKE THE EXAMPLE SAYS???????\n\t\t\n\t}", "public void reorder(int low, int high) {\n if (low < high) {\n // Select pivot position and put all the elements smaller\n // than pivot on left and greater than pivot on right\n int pi = partition(low, high);\n\n // Sort the elements on the left of pivot\n reorder(low, pi - 1);\n\n // Sort the elements on the right of pivot\n reorder(pi + 1, high);\n }\n }", "public String getSortOrder();", "private String bidirectionalReorder(String text) {\n try {\n Bidi bidi = new Bidi((new ArabicShaping(8)).shape(text), 127);\n bidi.setReorderingMode(0);\n return bidi.writeReordered(2);\n } catch (ArabicShapingException exception) {\n return text;\n }\n }", "public String sortOriginOrReturn();", "public void reorderQueuedQuestions(Long playerId, List<Integer> newOrder) {\r\n\t\tPlayer player = lookupPlayer(playerId);\r\n\r\n\t\t// check for invalid ids\r\n\t\tfor (Integer id : newOrder) {\r\n\t\t\tboolean found = false;\r\n\t\t\tfor (QueuedQuestion qq : player.getQueuedQuestions()) {\r\n\t\t\t\tif (qq.getQuestion().getId()==id) {\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!found) {\r\n\t\t\t\tlogger.error(\"Invalid question id in reorder. id=\"+id);\r\n\t\t\t\tthrow new TrivolousError(\"Invalid question id \" + id);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// rerank by new order and make list of not found ids to delete\r\n\t\tArrayList<QueuedQuestion> qqsToBeDeleted = new ArrayList<QueuedQuestion>(); \r\n\t\tfor (QueuedQuestion qq : player.getQueuedQuestions()) {\r\n\t\t\tboolean found = false;\r\n\t\t\tint qid = qq.getQuestion().getId();\r\n\t\t\tint rank = 1;\r\n\t\t\tfor (Integer id : newOrder) {\r\n\t\t\t\tif (qid == id) {\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\trank++;\r\n\t\t\t}\r\n\t\t\tif (!found) {\r\n\t\t\t\tqqsToBeDeleted.add(qq);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// reorder based on new order\r\n\t\t\t\tqq.setRank(rank);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// delete separately to prevent concurrent mod error\r\n\t\tfor (QueuedQuestion qq : qqsToBeDeleted) {\r\n\t\t\tquestionRemove(player, qq);\r\n\t\t}\r\n\t}", "public void order_moves() {\n\t\tfor (int i = 0; i < future_moves.size(); i += 1) {\n\t\t\tArrayList<Integer> curr_smallest = future_moves.get(i);\n\t\t\tint smallest = i;\n\t\t\t\n\t\t\tfor (int j = i; j < future_moves.size(); j += 1) {\n\t\t\t\tArrayList<Integer> curr_checking = future_moves.get(j);\n\t\t\t\t\n\t\t\t\tif (curr_checking.get(1) < curr_smallest.get(1)) {\n\t\t\t\t\tcurr_smallest = curr_checking;\n\t\t\t\t\tsmallest = j;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//Swap the current and the smallest\n\t\t\tfuture_moves.set(smallest, future_moves.get(i));\n\t\t\tfuture_moves.set(i, curr_smallest);\n\t\t}\n\t\t\n\t}", "public String doSort();", "@Override\n\tpublic void reorganize() {\n\n\t}", "@Override\n\tpublic void inorder() {\n\n\t}", "Order(int t, int l) {\n this.t = t;\n this.l = l;\n }", "public static void sortList(ArrayList<Patient> newOrder){\r\n \t\tlistModel.clear();\r\n \t\tPatientView.setSortedArray(newOrder);\r\n \t\tfor (Patient p : newOrder) {\r\n \t\t\tlistModel.addElement(p.getFirstName());\r\n \t\t}\r\n \t}", "public void sortByAndser() {\r\n\t\tQuestion[][] question2DArray = new Question[displayingList.size()][];\r\n\t\tfor (int i = 0; i < displayingList.size(); i++) {\r\n\t\t\tquestion2DArray[i] = new Question[1];\r\n\t\t\tquestion2DArray[i][0] = displayingList.get(i);\r\n\t\t}\r\n\r\n\t\twhile (question2DArray.length != 1) {\r\n\t\t\tquestion2DArray = (Question[][]) merge2DArray(question2DArray);\r\n\t\t}\r\n\t\tdisplayingList.removeAll(displayingList);\r\n\t\tfor (int i = 0; i < question2DArray[0].length; i++) {\r\n\t\t\tdisplayingList.add(question2DArray[0][i]);\r\n\t\t}\r\n\t}", "public void oldSort()\n\t{\n\t\tfor (int index = 0; index < arraySize; index++) {\n\t\t\tfor (int secondIndex = index + 1; secondIndex < arraySize; secondIndex++) {\n\t\t\t\tint temp = 0;\n\t\t\t\tif (array[index] > array[secondIndex]) {\n\t\t\t\t\ttemp = array[index];\n\t\t\t\t\tarray[index] = array[secondIndex];\n\t\t\t\t\tarray[secondIndex] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static Node[] reorderReverse(Node[] nodes, int[] map) {\n\t\tNode[] reordered = new Node[map.length];\n\t\tfor (int i = 0; i < map.length; i++)\n\t\t\treordered[map[i]] = nodes[i];\n\t\treturn reordered;\n\t}", "private void resortAndReselectTreeGrid() {\n resortAndReselectTreeGrid(null);\n }", "Ordering<Part> getOrdering();", "protected abstract void arrange(List<Skill> skills) throws SkillTreeException;", "protected void reorderNode( String workspaceName,\n NodeKey key,\n Name primaryType,\n Set<Name> mixinTypes,\n NodeKey parent,\n Path newPath,\n Path oldPath,\n Path reorderedBeforePath,\n Map<NodeKey, Map<Path, Path>> snsPathChangesByNodeKey ) {\n\n }", "@Override\n public int getOrder() {\n return 4;\n }", "@FXML\n private void updateNameOrder(ActionEvent event) {\n\n if (sortOrder == Order.NAME_ASC) {\n\n sortOrder = Order.NAME_DESC;\n\n } else if (sortOrder == Order.NAME_DESC) {\n\n sortOrder = Order.DEFAULT;\n\n } else {\n\n sortOrder = Order.NAME_ASC;\n\n }\n\n updateOrderButtons();\n\n }", "abstract public void reorganizePositions(Vector2 start, Vector2 newPos);", "@Override\n protected void handleComponentReordering(DragAndDropEvent event) {\n AccordionTargetDetails details = (AccordionTargetDetails) event\n .getTargetDetails();\n DDAccordion acc = (DDAccordion) details.getTarget();\n VerticalDropLocation location = details.getDropLocation();\n LayoutBoundTransferable transferable = (LayoutBoundTransferable) event\n .getTransferable();\n Component c = transferable.getComponent();\n int idx = details.getOverIndex();\n\n Tab tab = acc.getTab(c);\n\n if (location == VerticalDropLocation.TOP) {\n // Left of previous tab\n int originalIndex = acc.getTabPosition(tab);\n if (originalIndex > idx) {\n acc.setTabPosition(tab, idx);\n } else if (idx - 1 >= 0) {\n acc.setTabPosition(tab, idx - 1);\n }\n\n } else if (location == VerticalDropLocation.BOTTOM) {\n // Right of previous tab\n int originalIndex = acc.getTabPosition(tab);\n if (originalIndex > idx) {\n acc.setTabPosition(tab, idx + 1);\n } else {\n acc.setTabPosition(tab, idx);\n }\n }\n }", "public void sort() {\n }", "@Override\n\tpublic void postorder() {\n\n\t}", "void prepareOrder(int orderId);", "private void sortByAmount(){\n int stopPos = 0;\n while(colours.size()-stopPos > 0){\n int inARow = 1;\n for(int i = colours.size() - 1; i > stopPos; i--){\n if(colours.get(i-1).getAmount() < colours.get(i).getAmount()){\n rgb temp = new rgb(colours.get(i-1));\n colours.set(i-1, colours.get(i));\n colours.set(i, temp);\n }else{\n inARow++;\n }\n }\n stopPos++;\n if(inARow == colours.size()){\n break;\n }\n }\n }", "interface IReorderListener {\n\n /**\n* An object has been moved, clients might need to react.\n*\n* @param obj\n* @param newIndex\n*\n*/\n public void reorder(Object obj, int newIndex);\n}", "public void incrementOrder() {\n mOrder++;\n }", "public void reorderList(ListNode head) {\n if (head == null || head.next == null)\n return;\n\n // step 1. cut the list to two halves\n // prev will be the tail of 1st half\n // slow will be the head of 2nd half\n ListNode prev = null, slow = head, fast = head, l1 = head;\n while (fast != null && fast.next != null) {\n prev = slow;\n slow = slow.next;\n fast = fast.next.next;\n }\n prev.next = null;\n // step 2. reverse the 2nd half\n ListNode l2 = reverse(slow);\n // step 3. merge the two halves\n merge(l1, l2);\n }", "public void selectionSort()\r\n {\r\n for(int x = 0; x < numItems; x++)\r\n {\r\n int smallestLoc = x;\r\n for(int y = x+1; y<numItems; y++)\r\n {\r\n if(mArray[y]< mArray[smallestLoc])\r\n {\r\n smallestLoc = y;\r\n }\r\n }\r\n int temp = mArray[x];\r\n mArray[x] = mArray[smallestLoc];\r\n mArray[smallestLoc] = temp;\r\n }\r\n }", "@Override\n public void toggleSortOrder(int column) {\n if (column == TablesTableModel.COLUMN_CREATED || column == TablesTableModel.COLUMN_SEATS) {\n List<? extends SortKey> sortKeys = getSortKeys();\n if (sortKeys.size() == 2) {\n // clear sort on second click\n setSortKeys(null);\n } else {\n // setup sort on first click\n List<SortKey> list = new ArrayList<>();\n list.add(new RowSorter.SortKey(TablesTableModel.COLUMN_SEATS, SortOrder.ASCENDING));\n list.add(new RowSorter.SortKey(TablesTableModel.COLUMN_CREATED, SortOrder.DESCENDING));\n setSortKeys(list);\n }\n } else {\n super.toggleSortOrder(column);\n }\n }", "private void resortAndReselectTreeGrid(final KzTreeAware itemToSelect) {\n\n// inMemoryKzTreeProvider = new TreeDataProvider<>(treeData);\n// kzTreeGrid.getDataCommunicator().getKeyMapper().removeAll();\n// inMemoryKzTreeProvider.setFilter(kz -> kz.getArch());\n// inMemoryKzTreeProvider.refreshAll();\n List<GridSortOrder<KzTreeAware>> sortOrder = kzTreeGrid.getSortOrder();\n// kzTreeGrid.setDataProvider(inMemoryKzTreeProvider);\n\n if (CollectionUtils.isEmpty(sortOrder)) {\n kzTreeGrid.sort(initialSortOrder);\n } else {\n kzTreeGrid.sort(sortOrder);\n }\n\n selectItem(itemToSelect);\n }", "public void reorderList(ListNode head) {\n\n if(head == null||head.next == null) return;\n int len = 0;\n\n for (ListNode cur = head; cur!= null; cur = cur.next) len++;\n\n int middle = (len%2 == 1) ? len/2 + 1: len/2 ;\n\n ListNode midNode = head;\n for (int i = 0; i < middle - 1; i++)\n midNode = midNode.next;\n\n ListNode head1 = head;\n ListNode head2 = midNode.next;\n midNode.next = null;\n head2 = revertListAndReturnHead(head2);\n\n //MERGE\n ListNode cur1 = head1;\n ListNode cur2 = head2;\n while (cur1 != null && cur2 != null) {\n ListNode nextCur1 = cur1.next;\n ListNode nextCur2 = cur2.next;\n cur1.next = cur2;\n cur2.next = nextCur1;\n cur1 = nextCur1;\n cur2 = nextCur2;\n }\n\n }", "Map<String, org.springframework.batch.item.database.Order> genBatchOrderByFromSort(TableFields tableFields, Sort sort);", "@FXML\n private void updateRegionOrder(ActionEvent event) {\n\n if (sortOrder == Order.REGION_ASC) {\n\n sortOrder = Order.REGION_DESC;\n\n } else if (sortOrder == Order.REGION_DESC) {\n\n sortOrder = Order.DEFAULT;\n\n } else {\n\n sortOrder = Order.REGION_ASC;\n\n }\n\n updateOrderButtons();\n\n }", "public void moveSort() {\r\n\t\trefX = 0;\r\n\t\tmoveSort(root);\r\n\t}", "void setGivenByOrder(int[] gbo);", "@Override\n\tpublic int getOrder() {\n\t\treturn 1;\n\t}", "public static void changeOrder(String order){\n switch (order) {\n case \"delais\":\n ordered = \"delais DESC\";\n break;\n case \"date\":\n ordered = \"date_creation DESC\";\n break;\n case \"nom\":\n ordered = \"nom_annonce\";\n break;\n }\n }", "void sort();", "void sort();", "public void sortProposals() {\n\n\t}", "public void sortToDo(){\n\t\tCollections.sort(allToDoLists);\n\t}", "private ArrayList<String> postOrder()\n\t{\n\t\tArrayList<String> rlist = new ArrayList<String>();\n\t\tpostOrder(this,rlist);\n\t\treturn rlist;\n\t}", "public void decrementOrder() {\n mOrder--;\n }", "@Test\n public void shouldTestIsReorderValidWithoutUnbreakable() {\n this.gridLayer.setClientAreaProvider(new IClientAreaProvider() {\n\n @Override\n public Rectangle getClientArea() {\n return new Rectangle(0, 0, 1600, 250);\n }\n\n });\n this.gridLayer.doCommand(new ClientAreaResizeCommand(new Shell(Display.getDefault(), SWT.V_SCROLL | SWT.H_SCROLL)));\n\n // in same group\n assertTrue(RowGroupUtils.isReorderValid(this.rowGroupHeaderLayer, 0, 4, true));\n assertTrue(RowGroupUtils.isReorderValid(this.rowGroupHeaderLayer, 4, 4, true));\n // to other group\n assertTrue(RowGroupUtils.isReorderValid(this.rowGroupHeaderLayer, 0, 6, true));\n // to start of first group\n assertTrue(RowGroupUtils.isReorderValid(this.rowGroupHeaderLayer, 8, 0, true));\n // to end of last group\n assertTrue(RowGroupUtils.isReorderValid(this.rowGroupHeaderLayer, 0, 13, false));\n }", "@Override\n\tpublic T[] sort(T[] input) {\n\t\tfor(int i = 1; i < input.length; i++){\n\t\t\t//compare with the previous one, if smaller, switch with it.\n\t\t\tfor(int j = i; j > 0 && input[j-1].compareTo( input[j]) > 0; j--){\n\t\t\t\t//add the condition input[j-1] > input[j] in the for loop;\n\t\t\t\t//cause if j-1th < jth, j-2th < jth(left part is ordered)\n\t\t\t\tswap(input, j, j-1);\n\t\t\t}\n\t\t}\n\t\treturn input;\n\t}" ]
[ "0.7033024", "0.6948401", "0.64139205", "0.6401494", "0.62500393", "0.62309086", "0.62005085", "0.61061484", "0.6002819", "0.5982208", "0.59642506", "0.59642506", "0.5938708", "0.5937081", "0.59158826", "0.5913287", "0.59118414", "0.588197", "0.5878481", "0.58512723", "0.58371204", "0.5832705", "0.5806636", "0.5802469", "0.57975984", "0.57838976", "0.57746446", "0.5771825", "0.5768488", "0.57297313", "0.5725999", "0.57163334", "0.5705192", "0.5672709", "0.56528383", "0.56498396", "0.56228447", "0.5617877", "0.55900556", "0.5576132", "0.5574578", "0.5542183", "0.55415314", "0.55377007", "0.5513076", "0.54769665", "0.5475373", "0.5471926", "0.5469725", "0.5461435", "0.54560405", "0.545397", "0.54443574", "0.54413944", "0.5441023", "0.54354155", "0.54292995", "0.5427683", "0.5423839", "0.5423227", "0.5405624", "0.5405536", "0.5402004", "0.54019964", "0.53956854", "0.5393312", "0.53845376", "0.5379096", "0.5371246", "0.535089", "0.53494895", "0.53374493", "0.53180176", "0.53159755", "0.5315805", "0.53156406", "0.531429", "0.53139645", "0.5307017", "0.5306389", "0.5298289", "0.5293825", "0.52911454", "0.5289204", "0.5278959", "0.5271276", "0.5267987", "0.5266641", "0.52657926", "0.5258513", "0.5251588", "0.5251345", "0.52471375", "0.52454054", "0.52454054", "0.52399284", "0.5238404", "0.52358395", "0.5230506", "0.5223953", "0.5214285" ]
0.0
-1
helper function for reorder()
private int partition(int low, int high) { // choose the pivot point int pivot = extractDigits(courses.get(high).getCode()); int i = (low - 1); // partition the larger elements to the right of the pivot // and smaller elements to the left of the pivot for (int j = low; j < high; j++) { int coursePtr = extractDigits(courses.get(j).getCode()); if (coursePtr <= pivot) { i++; Course temp = courses.get(i); courses.set(i, courses.get(j)); courses.set(j, temp); } } Course temp = courses.get(i+1); courses.set(i+1, (courses.get(high))); courses.set(high, temp); return (i + 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changeSortOrder();", "public void reorder(Object obj, int newIndex);", "private void updateOrder() {\n Arrays.sort(positions);\n }", "public void insertReorderBarrier() {\n\t\t\n\t}", "public void reorder(String field){\n\t\tsetOrderFields(new String[] {\n\t\t\tfield\n\t\t});\n\t\tdj.launch(20);\n\t}", "public void reorganizeNote() {\n note = Position.orderList(note);\n }", "public int[] reorder(int[] array) {\n int left = 0;\n int right = array.length-1;\n if (array.length % 2 != 0){\n right = right - 1;\n }\n reversedMergesort(array,left,right);\n return array;\n }", "public static void doReorder ( RunData data)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\n\t\t//get the ParameterParser from RunData\n\t\tParameterParser params = data.getParameters ();\n\t\t\n\t\tboolean isPrioritySortEnabled = ContentHostingService.isSortByPriorityEnabled();\n\n\n\t\tString folderId = params.getString (\"folderId\");\n\t\tif(folderId == null)\n\t\t{\n\t\t\taddAlert(state, \"error\");\n\t\t}\n\t\t\n\t\tString sortBy = (String) state.getAttribute(STATE_REORDER_SORT_BY);\n\t\tif(sortBy == null)\n\t\t{\n\t\t\tsortBy = ResourceProperties.PROP_CONTENT_PRIORITY;\n\t\t\tstate.setAttribute(STATE_REORDER_SORT_BY, sortBy);\n\t\t}\n\t\tString sortedAsc = (String) state.getAttribute (STATE_REORDER_SORT_ASC);\n\t\tif(sortedAsc == null)\n\t\t{\n\t\t\tsortedAsc = Boolean.TRUE.toString();\n\t\t\tstate.setAttribute(STATE_REORDER_SORT_ASC, sortedAsc);\n\t\t}\n\n\t\tComparator comparator = ContentHostingService.newContentHostingComparator(sortBy, Boolean.getBoolean(sortedAsc));\n\t\tstate.setAttribute(STATE_REORDER_SORT, comparator);\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\tstate.setAttribute(STATE_REORDER_FOLDER, folderId);\n\t\t\tstate.setAttribute (STATE_MODE, MODE_REORDER);\n\n\t\t}\t// if-else\n\n\t}", "private List<Article> orderArticles(List<Article> things){\n\t\t Comparator<Article> comparatorPrizes = new Comparator<Article>() {\n\t public int compare(Article x, Article y) {\n\t return (int) (x.getPrize() - y.getPrize());\n\t }\n\t };\n\t Collections.sort(things,comparatorPrizes); \n\t Collections.reverse(things);\n\t return things;\n\t }", "int order();", "void changeOrder(GeometricalObject object, int offset);", "void changeOrder(GeometricalObject object, int offset);", "@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void orderSegments() {\n //insert numOrder for the db\n int i = 0;\n for(TransportSegmentLogic transportSegment: transportSegments){\n transportSegment.setOrder(i);\n i++;\n }\n\n\n\n /*int i = 0;\n int j = 1;\n\n\n TransportSegmentLogic swapSegment;\n\n while(j < transportSegments.size()){\n if(transportSegments.get(j).getOrigin().equals(transportSegments.get(i).getDestination())){\n swapSegment = transportSegments.get(j);\n transportSegments.remove(swapSegment);\n transportSegments.add(i +1, swapSegment);\n i = i + 1;\n j = i + 1;\n }\n j++;\n }\n\n j = transportSegments.size() -1;\n\n while(j > i){\n if(transportSegments.get(j).getDestination().equals(transportSegments.get(0).getOrigin())){\n swapSegment = transportSegments.get(j);\n transportSegments.remove(swapSegment);\n transportSegments.add(0, swapSegment);\n i = i + 1;\n j = transportSegments.size();\n }\n j--;\n } */\n }", "public void makeReorderRanges(int[] iArr, UVector32 uVector32) {\n makeReorderRanges(iArr, false, uVector32);\n }", "public void reorder(FillingStrategy strategy) {\n\n\t\tList<Content> contentsLongList = null;\n\t\tif (contentMap.size() == 0)\n\t\t\tthrow new SomethingWentWrongException(\"Empty Location\");\n \n\t\tcontentsLongList = sortContentMapByVolumeAndBarcode(contentMap);\n\t\tremoveAllContentFromLocation();\n\n\t\tswitch (strategy) {\n\t\tcase ROW_WISE:\t\t\n\t\t\tfillLocationWithItems(contentsLongList, FillingStrategy.ROW_WISE);\n\t\t\tbreak;\n\t\tcase COLUMN_WISE:\n\t\t\tfillLocationWithItems(contentsLongList, FillingStrategy.COLUMN_WISE);\n\t\t\tbreak;\n\t\t}\n\n\t}", "public abstract void toggleSortOrder(int column);", "public myList<T> my_preorder();", "private void changeOrderPhase() {\n for (int i = 0; i < 4; i++)\n System.out.print(playerList[i].getName() + \" ,\");\n Player tmp = playerList[0];\n playerList[0] = playerList[1];\n playerList[1] = playerList[2];\n playerList[2] = playerList[3];\n playerList[3] = tmp;\n System.out.println();\n for (int i = 0; i < 4; i++)\n System.out.print(playerList[i].getName() + \" ,\");\n System.out.println();\n }", "void reorderNode(LinkedEntries.LinkNode insert, LinkedEntries.LinkNode before) {\n removeNode(insert);\n if (before == null) {\n addNode(insert, getHeader());\n } else {\n addNode(insert, before);\n }\n }", "public void sort() {\n\t\tfor (int i = 1; i < this.dataModel.getLength(); i++) {\n\t\t\tfinal int x = this.dataModel.get(i);\n\n\t\t\t// Find location to insert using binary search\n\t\t\tfinal int j = Math.abs(this.dataModel.binarySearch(0, i, x) + 1);\n\n\t\t\t// Shifting array to one location right\n\t\t\tthis.dataModel.arrayCopy(j, j + 1, i - j);\n\n\t\t\t// Placing element at its correct location\n\t\t\tthis.dataModel.set(j, x);\n\t\t\tthis.repaint(this.count++);\n\t\t}\n\t}", "@Override\r\n\tpublic void editSort() {\n\t\t\r\n\t}", "public myList<T> my_postorder();", "void sortUI();", "public void reorderList(ListNode head) {\n if (head == null) {\n return;\n } else if (head.next == null) {\n return;\n }\n \n ListNode pre = findMidPre(head);\n \n // cut the two list.\n ListNode right = pre.next;\n pre.next = null;\n \n // reverse the right link.\n right = reverse(right);\n \n merge(head, right);\n }", "public static Node[] reorder(Node[] nodes, int[] map) {\n\t\tNode[] reordered = new Node[map.length];\n\t\tfor (int i = 0; i < map.length; i++)\n\t\t\treordered[i] = nodes[map[i]];\n\t\treturn reordered;\n\t}", "private static void updateOrderOnRemove( int nOrderId )\n {\n for ( GroupAction groupActionChange : getGroupActionList( ) )\n {\n int nGroupActionToUpdateOrder = groupActionChange.getOrdre( );\n\n if ( ( nGroupActionToUpdateOrder > nOrderId ) )\n {\n groupActionChange.setOrdre( nGroupActionToUpdateOrder - CONSTANT_STEP_ORDER );\n _dao.store( groupActionChange, _plugin );\n }\n }\n }", "public void changeOrder(GeometricalObject object, int offset);", "public static void reorder(ListNode head) {\n ListNode preHead = new ListNode(0), p1 = preHead, p2 = preHead;\n preHead.next = head;\n// head.print();\n// System.out.println(\"\");\n// System.out.println(\"--------\");\n\n while (p2 != null && p2.next != null) {\n p1 = p1.next;\n p2 = p2.next.next;\n }\n// System.out.println(\"p1: \" + p1.val);\n// p1 = p1.next;\n// head.print();\n// System.out.println();\n// System.out.println(\"secondHalfReversed\");\n ListNode secondHalfReversed = reverseList(p1.next); // even number is good\n p1.next = null;\n// head.print();\n// secondHalfReversed.print();\n\n mergeLists(head, secondHalfReversed);\n//\n// System.out.println(\"\");\n// System.out.println(\"printing head \");\n// head.print();\n\n }", "private void shuffleOrder() {\n\t\t// Simple shuffle: swap each piece with some other one\n\t\tfor (int i = 0; i < order.size(); i++) {\n\t\t\tint j = (int) (Math.random() * order.size());\n\t\t\tInteger pi = order.get(i);\n\t\t\torder.set(i, order.get(j));\n\t\t\torder.set(j, pi);\n\t\t}\n\t}", "public void arrange(Order order){\n for(int i=0; i<26; ++i){\n // arrange list of list; list by list\n ArrayList<Integer> list = check_list.get(i);\n for(int j=0; j<list.size(); ++j ){\n if(order == Order.ASCENDING){\n // ascending order\n for(int k=i; k<list.size()-1; ++k){\n int num1= list.get(k);\n int num2= list.get(k+1);\n // ascending order\n if(num2<num1){\n // swap\n list.set(k, num2);\n list.set(k+1, num1);\n }\n }\n }else if(order == Order.DESCENDING){\n // descending order\n for(int k=i; k<list.size()-1; ++k){\n int num1= list.get(k);\n int num2= list.get(k+1);\n // descending order\n if(num2>num1){\n // swap\n list.set(j, num2);\n list.set(k, num1);\n }\n }\n }\n }\n // put arranged list, back in its place\n check_list.set(i, list);\n }\n }", "static public ListNode reorder(ListNode head) {\n\t\tif (head == null || head.next == null) {\n\t\t\treturn head;\n\t\t}\n\t\tListNode one = head;\n\t\tListNode mid = findMidle(head);\n\t\tSystem.out.println(\"mid: \"+ mid.val);\n\t\tListNode two = reverse(mid.next);\n\t\tmid.next = null;\n\t\tListNodeUtils.printList(head);\n\t\tListNodeUtils.printList(two);\n\t\tListNode curr = one;\n\t\twhile (one != null && two != null) {\n\t\t\tone = one.next;\n\t\t\tcurr.next = two;\n\t\t\tcurr = curr.next;\n\n\t\t\ttwo = two.next;\n\t\t\tcurr.next = one;\n\t\t\tcurr = curr.next;\n\t\t}\n\t\tif (one != null) {\n\t\t\tcurr.next = null;\n//\t\t curr = curr.next; \n\t\t}\n\n\t\t// curr.next = null;\n\t\treturn head;\n\t}", "public void orderItem(Item i) {\r\n\r\n\r\n\r\n this.o.orderItem(i);\r\n\r\n }", "public void RearrangeItems() {\n Collections.shuffle(images, new Random(System.currentTimeMillis()));\n Collections.shuffle(text, new Random(System.currentTimeMillis()));\n Adapter adapter = new Adapter(MainActivity.this, images, text);\n recyclerView.setAdapter(adapter);\n }", "public static void reorder(Animal[] animals) {\n\n int beginning = 0;\n int end = animals.length;\n int countCow = 0;\n int countSheep = 0;\n int countGoat = 0;\n do {\n if(animals[beginning] == Animal.sheep){\n countSheep++;\n beginning++;\n } else if(animals[beginning] == Animal.goat){\n countGoat++;\n beginning++;\n }else{\n countCow++;\n beginning++;\n }\n } while (beginning != end); //do while\n\n int i = 0;\n while(i < countGoat){\n animals[i] = Animal.goat;\n i++;\n }\n\n int j = 0;\n while (j < countSheep){\n animals[i] = Animal.sheep;\n i++;\n j++;\n }\n\n j = 0;\n while(j < countCow){\n animals[i] = Animal.cow;\n i++;\n j++;\n }\n\n }", "private static List<Point> reorder(List<Point> points) {\n Point tl = points.get(0);\n for (int i = 1; i< 4; i++) {\n if ((tl.x + tl.y) > (points.get(i).x + points.get(i).y)) {\n tl = points.get(i);\n }\n }\n\n // find bottom right => max sum\n Point br = points.get(0);\n for (int i = 1; i< 4; i++) {\n if ((br.x + br.y) < (points.get(i).x + points.get(i).y)) {\n br = points.get(i);\n }\n }\n\n // find top right => max x - y\n Point tr = points.get(0);\n for (int i = 1; i< 4; i++) {\n if ((tr.x - tr.y) < (points.get(i).x - points.get(i).y)) {\n tr = points.get(i);\n }\n }\n\n // find bottom left => min x - y\n Point bl = points.get(0);\n for (int i = 1; i< 4; i++) {\n if ((bl.x - bl.y) > (points.get(i).x - points.get(i).y)) {\n bl = points.get(i);\n }\n }\n\n List<Point> reorderList = new ArrayList<>();\n reorderList.add(tl);\n reorderList.add(tr);\n reorderList.add(br);\n reorderList.add(bl);\n\n return reorderList;\n }", "private void reorderChildren(TreeNode treeNode) {\n if(treeNode.getChildren().length == 1)\n return;\n TreeNode auxiliar;\n TreeNode[] newChildren = new TreeNode[treeNode.getChildren().length];\n auxiliar = treeNode.getChildren()[treeNode.getChildren().length - 1];\n for(int i = treeNode.getChildren().length - 1; i > 0; i--){\n newChildren[i] = treeNode.getChildren()[i-1];\n }\n newChildren[0] = auxiliar;\n treeNode.setChildren(newChildren);\n }", "private static void DoOrderBy()\n\t{\n\t\tArrayList<Attribute> inAtts = new ArrayList<Attribute>();\n\t\tinAtts.add(new Attribute(\"Int\", \"n_n_nationkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"n_n_name\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"n_n_regionkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"n_n_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Int\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att4\"));\n\n\t\t// These could be more complicated expressions than simple input columns\n\t\tMap<String, String> exprsToCompute = new HashMap<String, String>();\n\t\texprsToCompute.put(\"att1\", \"n_n_nationkey\");\n\t\texprsToCompute.put(\"att2\", \"n_n_name\");\n\t\texprsToCompute.put(\"att3\", \"n_n_regionkey\");\n\t\texprsToCompute.put(\"att4\", \"n_n_comment\");\n\t\t\n\t\t// Order by region key descending then nation name ascending\n\t\tArrayList<SortKeyExpression> sortingKeys = new ArrayList<SortKeyExpression>();\n\t\tsortingKeys.add(new SortKeyExpression(\"Int\", \"n_n_regionkey\", false));\n\t\tsortingKeys.add(new SortKeyExpression(\"Str\", \"n_n_name\", true));\n\t\t\n\t\t// run the selection operation\n\t\ttry\n\t\t{\n\t\t\tnew Order(inAtts, outAtts, exprsToCompute, sortingKeys, \"nation.tbl\", \"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "@Override\n\tpublic void placeOrder() {\n\t\t\n\t}", "void decrementOrderByOne( int nOrder, int nIdWorkflow );", "private void orderList() {\n Iterator<PlanarShape> sort = unorderedList.iterator();\n\n while(sort.hasNext()) {\n orderedList.insertInOrder(sort.next());\n }\n }", "private void sortEntities(){\n for (int i = 1; i < sorted.size; i++) {\n for(int j = i ; j > 0 ; j--){\n \tEntity e1 = sorted.get(j);\n \tEntity e2 = sorted.get(j-1);\n if(getRL(e1) < getRL(e2)){\n sorted.set(j, e2);\n sorted.set(j-1, e1);\n }\n }\n }\n }", "private void goZhuSuOrder(int position){\n\t}", "public int getOrder();", "void sort(OrderBy orderBy);", "@Override\n\tpublic void preorder() {\n\n\t}", "public void sortCompetitors(){\n\t\t}", "private void rearrangeGeneric(){\n for (int i = rear; i > 0; i++) {\n if (arr1[i].compareTo(arr1[i-1]) == 1){\n /*\n In this if condition the crr is a calling object and the parameter passing into the\n compareTo method is argument methods\n\n --> compareTo() will return 1, if calling object is bigger then argument object\n --> compareTo() will return 0, if both objects are same\n --> compareTo() will return -1, if calling object is smaller then argument object\n */\n\n //Now perform swapping\n E temp = arr1[i];\n arr1[i] = arr1[i-1];\n arr1[i-1] = temp;\n }\n }\n }", "public void sortAscending()\r\n\t{\r\n\t\tList<Book> oldItems = items;\r\n\t\titems = new ArrayList<Book>(items);\r\n\t\tCollections.sort(items);\r\n\t\tfirePropertyChange(\"books\", oldItems, items);\r\n\t}", "@Override\n public boolean onItemMove(int fromPosition, int toPosition) {\n if (fromPosition < toPosition){\n for(int i = fromPosition;i<toPosition;i++){\n Collections.swap(cartList, i, i+1);\n }\n }else{\n for (int i = fromPosition; i > toPosition; i--){\n Collections.swap(cartList, i, i-1);\n }\n }\n notifyItemMoved(fromPosition,toPosition);\n return true;\n }", "@Override\n\tpublic void reorderSubComponent(Component component, int position)\n\t\t\tthrows InvalidPositionException {\n\t\tif (!subComponents.contains(component)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check valid position\n\t\tint maxPosition = subComponents.size();\n\t\tif (position < 0 || position > maxPosition) {\n\t\t\tthrow new InvalidPositionException(position, maxPosition);\n\t\t}\n\n\t\t// Check if reordering is necessary\n\t\tint currentPosition = subComponents.indexOf(component);\n\t\tif (position == currentPosition || position == currentPosition + 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (position < currentPosition) {\n\t\t\tsubComponents.remove(component);\n\t\t\tsubComponents.add(position, component);\n\t\t} else {\n\t\t\tsubComponents.remove(component);\n\t\t\tsubComponents.add(position - 1, component);\n\t\t}\n\n\t\tnotifySubComponentsChangedListeners();\n\t}", "public void reorderList(ListNode head) {\n\tif (head == null || head.next == null) {\n\t return;\n\t}\n\n\tDeque<Integer> dq = new LinkedList<>();\n\tListNode cur = head;\n\twhile (cur != null) {\n\t dq.add(cur.val);\n\t cur = cur.next;\n\t}\n\n\tListNode cur1 = head;\n\twhile (cur1 != null && cur1.next != null) {\n\t cur1.val = dq.pollFirst();\n\t cur1.next.val = dq.pollLast();\n\t cur1 = cur1.next.next;\n\t}\n\n\tif (cur1 != null) {\n\t cur1.val = dq.poll();\n\t}\n }", "private void movieOrder(Mnode newMovie0, int movieRank0){\n\t\tint counter = 19;\n\t\tif (movieRank0 > numMP)\n\t\t\tmoviePref[numMP] = newMovie0;\n\t\telse{\n\t\t\twhile (counter > (movieRank0-1)){\n\t\t\t\tmoviePref[counter] = moviePref[counter-1];\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t\tmoviePref[(movieRank0-1)] = newMovie0;\n\t\t}\n\t\tSystem.out.println(newMovie0.getName() + \" was added to wishlist\");\n\t\tnumMP++;\n\t}", "public void sortAllRows(){\n\t\t/* code goes here */ \n\t\t\n\t\t\n\t\t//WHY SHOULD THEY BE SORTED LIKE THE EXAMPLE SAYS???????\n\t\t\n\t}", "public void reorder(int low, int high) {\n if (low < high) {\n // Select pivot position and put all the elements smaller\n // than pivot on left and greater than pivot on right\n int pi = partition(low, high);\n\n // Sort the elements on the left of pivot\n reorder(low, pi - 1);\n\n // Sort the elements on the right of pivot\n reorder(pi + 1, high);\n }\n }", "public String getSortOrder();", "private String bidirectionalReorder(String text) {\n try {\n Bidi bidi = new Bidi((new ArabicShaping(8)).shape(text), 127);\n bidi.setReorderingMode(0);\n return bidi.writeReordered(2);\n } catch (ArabicShapingException exception) {\n return text;\n }\n }", "public String sortOriginOrReturn();", "public void reorderQueuedQuestions(Long playerId, List<Integer> newOrder) {\r\n\t\tPlayer player = lookupPlayer(playerId);\r\n\r\n\t\t// check for invalid ids\r\n\t\tfor (Integer id : newOrder) {\r\n\t\t\tboolean found = false;\r\n\t\t\tfor (QueuedQuestion qq : player.getQueuedQuestions()) {\r\n\t\t\t\tif (qq.getQuestion().getId()==id) {\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!found) {\r\n\t\t\t\tlogger.error(\"Invalid question id in reorder. id=\"+id);\r\n\t\t\t\tthrow new TrivolousError(\"Invalid question id \" + id);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// rerank by new order and make list of not found ids to delete\r\n\t\tArrayList<QueuedQuestion> qqsToBeDeleted = new ArrayList<QueuedQuestion>(); \r\n\t\tfor (QueuedQuestion qq : player.getQueuedQuestions()) {\r\n\t\t\tboolean found = false;\r\n\t\t\tint qid = qq.getQuestion().getId();\r\n\t\t\tint rank = 1;\r\n\t\t\tfor (Integer id : newOrder) {\r\n\t\t\t\tif (qid == id) {\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\trank++;\r\n\t\t\t}\r\n\t\t\tif (!found) {\r\n\t\t\t\tqqsToBeDeleted.add(qq);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// reorder based on new order\r\n\t\t\t\tqq.setRank(rank);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// delete separately to prevent concurrent mod error\r\n\t\tfor (QueuedQuestion qq : qqsToBeDeleted) {\r\n\t\t\tquestionRemove(player, qq);\r\n\t\t}\r\n\t}", "public void order_moves() {\n\t\tfor (int i = 0; i < future_moves.size(); i += 1) {\n\t\t\tArrayList<Integer> curr_smallest = future_moves.get(i);\n\t\t\tint smallest = i;\n\t\t\t\n\t\t\tfor (int j = i; j < future_moves.size(); j += 1) {\n\t\t\t\tArrayList<Integer> curr_checking = future_moves.get(j);\n\t\t\t\t\n\t\t\t\tif (curr_checking.get(1) < curr_smallest.get(1)) {\n\t\t\t\t\tcurr_smallest = curr_checking;\n\t\t\t\t\tsmallest = j;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//Swap the current and the smallest\n\t\t\tfuture_moves.set(smallest, future_moves.get(i));\n\t\t\tfuture_moves.set(i, curr_smallest);\n\t\t}\n\t\t\n\t}", "public String doSort();", "@Override\n\tpublic void reorganize() {\n\n\t}", "@Override\n\tpublic void inorder() {\n\n\t}", "Order(int t, int l) {\n this.t = t;\n this.l = l;\n }", "public static void sortList(ArrayList<Patient> newOrder){\r\n \t\tlistModel.clear();\r\n \t\tPatientView.setSortedArray(newOrder);\r\n \t\tfor (Patient p : newOrder) {\r\n \t\t\tlistModel.addElement(p.getFirstName());\r\n \t\t}\r\n \t}", "public void sortByAndser() {\r\n\t\tQuestion[][] question2DArray = new Question[displayingList.size()][];\r\n\t\tfor (int i = 0; i < displayingList.size(); i++) {\r\n\t\t\tquestion2DArray[i] = new Question[1];\r\n\t\t\tquestion2DArray[i][0] = displayingList.get(i);\r\n\t\t}\r\n\r\n\t\twhile (question2DArray.length != 1) {\r\n\t\t\tquestion2DArray = (Question[][]) merge2DArray(question2DArray);\r\n\t\t}\r\n\t\tdisplayingList.removeAll(displayingList);\r\n\t\tfor (int i = 0; i < question2DArray[0].length; i++) {\r\n\t\t\tdisplayingList.add(question2DArray[0][i]);\r\n\t\t}\r\n\t}", "public void oldSort()\n\t{\n\t\tfor (int index = 0; index < arraySize; index++) {\n\t\t\tfor (int secondIndex = index + 1; secondIndex < arraySize; secondIndex++) {\n\t\t\t\tint temp = 0;\n\t\t\t\tif (array[index] > array[secondIndex]) {\n\t\t\t\t\ttemp = array[index];\n\t\t\t\t\tarray[index] = array[secondIndex];\n\t\t\t\t\tarray[secondIndex] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static Node[] reorderReverse(Node[] nodes, int[] map) {\n\t\tNode[] reordered = new Node[map.length];\n\t\tfor (int i = 0; i < map.length; i++)\n\t\t\treordered[map[i]] = nodes[i];\n\t\treturn reordered;\n\t}", "private void resortAndReselectTreeGrid() {\n resortAndReselectTreeGrid(null);\n }", "Ordering<Part> getOrdering();", "protected abstract void arrange(List<Skill> skills) throws SkillTreeException;", "protected void reorderNode( String workspaceName,\n NodeKey key,\n Name primaryType,\n Set<Name> mixinTypes,\n NodeKey parent,\n Path newPath,\n Path oldPath,\n Path reorderedBeforePath,\n Map<NodeKey, Map<Path, Path>> snsPathChangesByNodeKey ) {\n\n }", "@Override\n public int getOrder() {\n return 4;\n }", "@FXML\n private void updateNameOrder(ActionEvent event) {\n\n if (sortOrder == Order.NAME_ASC) {\n\n sortOrder = Order.NAME_DESC;\n\n } else if (sortOrder == Order.NAME_DESC) {\n\n sortOrder = Order.DEFAULT;\n\n } else {\n\n sortOrder = Order.NAME_ASC;\n\n }\n\n updateOrderButtons();\n\n }", "abstract public void reorganizePositions(Vector2 start, Vector2 newPos);", "@Override\n protected void handleComponentReordering(DragAndDropEvent event) {\n AccordionTargetDetails details = (AccordionTargetDetails) event\n .getTargetDetails();\n DDAccordion acc = (DDAccordion) details.getTarget();\n VerticalDropLocation location = details.getDropLocation();\n LayoutBoundTransferable transferable = (LayoutBoundTransferable) event\n .getTransferable();\n Component c = transferable.getComponent();\n int idx = details.getOverIndex();\n\n Tab tab = acc.getTab(c);\n\n if (location == VerticalDropLocation.TOP) {\n // Left of previous tab\n int originalIndex = acc.getTabPosition(tab);\n if (originalIndex > idx) {\n acc.setTabPosition(tab, idx);\n } else if (idx - 1 >= 0) {\n acc.setTabPosition(tab, idx - 1);\n }\n\n } else if (location == VerticalDropLocation.BOTTOM) {\n // Right of previous tab\n int originalIndex = acc.getTabPosition(tab);\n if (originalIndex > idx) {\n acc.setTabPosition(tab, idx + 1);\n } else {\n acc.setTabPosition(tab, idx);\n }\n }\n }", "public void sort() {\n }", "@Override\n\tpublic void postorder() {\n\n\t}", "void prepareOrder(int orderId);", "private void sortByAmount(){\n int stopPos = 0;\n while(colours.size()-stopPos > 0){\n int inARow = 1;\n for(int i = colours.size() - 1; i > stopPos; i--){\n if(colours.get(i-1).getAmount() < colours.get(i).getAmount()){\n rgb temp = new rgb(colours.get(i-1));\n colours.set(i-1, colours.get(i));\n colours.set(i, temp);\n }else{\n inARow++;\n }\n }\n stopPos++;\n if(inARow == colours.size()){\n break;\n }\n }\n }", "interface IReorderListener {\n\n /**\n* An object has been moved, clients might need to react.\n*\n* @param obj\n* @param newIndex\n*\n*/\n public void reorder(Object obj, int newIndex);\n}", "public void incrementOrder() {\n mOrder++;\n }", "public void reorderList(ListNode head) {\n if (head == null || head.next == null)\n return;\n\n // step 1. cut the list to two halves\n // prev will be the tail of 1st half\n // slow will be the head of 2nd half\n ListNode prev = null, slow = head, fast = head, l1 = head;\n while (fast != null && fast.next != null) {\n prev = slow;\n slow = slow.next;\n fast = fast.next.next;\n }\n prev.next = null;\n // step 2. reverse the 2nd half\n ListNode l2 = reverse(slow);\n // step 3. merge the two halves\n merge(l1, l2);\n }", "public void selectionSort()\r\n {\r\n for(int x = 0; x < numItems; x++)\r\n {\r\n int smallestLoc = x;\r\n for(int y = x+1; y<numItems; y++)\r\n {\r\n if(mArray[y]< mArray[smallestLoc])\r\n {\r\n smallestLoc = y;\r\n }\r\n }\r\n int temp = mArray[x];\r\n mArray[x] = mArray[smallestLoc];\r\n mArray[smallestLoc] = temp;\r\n }\r\n }", "@Override\n public void toggleSortOrder(int column) {\n if (column == TablesTableModel.COLUMN_CREATED || column == TablesTableModel.COLUMN_SEATS) {\n List<? extends SortKey> sortKeys = getSortKeys();\n if (sortKeys.size() == 2) {\n // clear sort on second click\n setSortKeys(null);\n } else {\n // setup sort on first click\n List<SortKey> list = new ArrayList<>();\n list.add(new RowSorter.SortKey(TablesTableModel.COLUMN_SEATS, SortOrder.ASCENDING));\n list.add(new RowSorter.SortKey(TablesTableModel.COLUMN_CREATED, SortOrder.DESCENDING));\n setSortKeys(list);\n }\n } else {\n super.toggleSortOrder(column);\n }\n }", "private void resortAndReselectTreeGrid(final KzTreeAware itemToSelect) {\n\n// inMemoryKzTreeProvider = new TreeDataProvider<>(treeData);\n// kzTreeGrid.getDataCommunicator().getKeyMapper().removeAll();\n// inMemoryKzTreeProvider.setFilter(kz -> kz.getArch());\n// inMemoryKzTreeProvider.refreshAll();\n List<GridSortOrder<KzTreeAware>> sortOrder = kzTreeGrid.getSortOrder();\n// kzTreeGrid.setDataProvider(inMemoryKzTreeProvider);\n\n if (CollectionUtils.isEmpty(sortOrder)) {\n kzTreeGrid.sort(initialSortOrder);\n } else {\n kzTreeGrid.sort(sortOrder);\n }\n\n selectItem(itemToSelect);\n }", "public void reorderList(ListNode head) {\n\n if(head == null||head.next == null) return;\n int len = 0;\n\n for (ListNode cur = head; cur!= null; cur = cur.next) len++;\n\n int middle = (len%2 == 1) ? len/2 + 1: len/2 ;\n\n ListNode midNode = head;\n for (int i = 0; i < middle - 1; i++)\n midNode = midNode.next;\n\n ListNode head1 = head;\n ListNode head2 = midNode.next;\n midNode.next = null;\n head2 = revertListAndReturnHead(head2);\n\n //MERGE\n ListNode cur1 = head1;\n ListNode cur2 = head2;\n while (cur1 != null && cur2 != null) {\n ListNode nextCur1 = cur1.next;\n ListNode nextCur2 = cur2.next;\n cur1.next = cur2;\n cur2.next = nextCur1;\n cur1 = nextCur1;\n cur2 = nextCur2;\n }\n\n }", "Map<String, org.springframework.batch.item.database.Order> genBatchOrderByFromSort(TableFields tableFields, Sort sort);", "@FXML\n private void updateRegionOrder(ActionEvent event) {\n\n if (sortOrder == Order.REGION_ASC) {\n\n sortOrder = Order.REGION_DESC;\n\n } else if (sortOrder == Order.REGION_DESC) {\n\n sortOrder = Order.DEFAULT;\n\n } else {\n\n sortOrder = Order.REGION_ASC;\n\n }\n\n updateOrderButtons();\n\n }", "public void moveSort() {\r\n\t\trefX = 0;\r\n\t\tmoveSort(root);\r\n\t}", "void setGivenByOrder(int[] gbo);", "@Override\n\tpublic int getOrder() {\n\t\treturn 1;\n\t}", "public static void changeOrder(String order){\n switch (order) {\n case \"delais\":\n ordered = \"delais DESC\";\n break;\n case \"date\":\n ordered = \"date_creation DESC\";\n break;\n case \"nom\":\n ordered = \"nom_annonce\";\n break;\n }\n }", "void sort();", "void sort();", "public void sortProposals() {\n\n\t}", "public void sortToDo(){\n\t\tCollections.sort(allToDoLists);\n\t}", "private ArrayList<String> postOrder()\n\t{\n\t\tArrayList<String> rlist = new ArrayList<String>();\n\t\tpostOrder(this,rlist);\n\t\treturn rlist;\n\t}", "public void decrementOrder() {\n mOrder--;\n }", "@Test\n public void shouldTestIsReorderValidWithoutUnbreakable() {\n this.gridLayer.setClientAreaProvider(new IClientAreaProvider() {\n\n @Override\n public Rectangle getClientArea() {\n return new Rectangle(0, 0, 1600, 250);\n }\n\n });\n this.gridLayer.doCommand(new ClientAreaResizeCommand(new Shell(Display.getDefault(), SWT.V_SCROLL | SWT.H_SCROLL)));\n\n // in same group\n assertTrue(RowGroupUtils.isReorderValid(this.rowGroupHeaderLayer, 0, 4, true));\n assertTrue(RowGroupUtils.isReorderValid(this.rowGroupHeaderLayer, 4, 4, true));\n // to other group\n assertTrue(RowGroupUtils.isReorderValid(this.rowGroupHeaderLayer, 0, 6, true));\n // to start of first group\n assertTrue(RowGroupUtils.isReorderValid(this.rowGroupHeaderLayer, 8, 0, true));\n // to end of last group\n assertTrue(RowGroupUtils.isReorderValid(this.rowGroupHeaderLayer, 0, 13, false));\n }", "@Override\n\tpublic T[] sort(T[] input) {\n\t\tfor(int i = 1; i < input.length; i++){\n\t\t\t//compare with the previous one, if smaller, switch with it.\n\t\t\tfor(int j = i; j > 0 && input[j-1].compareTo( input[j]) > 0; j--){\n\t\t\t\t//add the condition input[j-1] > input[j] in the for loop;\n\t\t\t\t//cause if j-1th < jth, j-2th < jth(left part is ordered)\n\t\t\t\tswap(input, j, j-1);\n\t\t\t}\n\t\t}\n\t\treturn input;\n\t}" ]
[ "0.7033024", "0.6948401", "0.64139205", "0.6401494", "0.62500393", "0.62309086", "0.62005085", "0.61061484", "0.6002819", "0.5982208", "0.59642506", "0.59642506", "0.5938708", "0.5937081", "0.59158826", "0.5913287", "0.59118414", "0.588197", "0.5878481", "0.58512723", "0.58371204", "0.5832705", "0.5806636", "0.5802469", "0.57975984", "0.57838976", "0.57746446", "0.5771825", "0.5768488", "0.57297313", "0.5725999", "0.57163334", "0.5705192", "0.5672709", "0.56528383", "0.56498396", "0.56228447", "0.5617877", "0.55900556", "0.5576132", "0.5574578", "0.5542183", "0.55415314", "0.55377007", "0.5513076", "0.54769665", "0.5475373", "0.5471926", "0.5469725", "0.5461435", "0.54560405", "0.545397", "0.54443574", "0.54413944", "0.5441023", "0.54354155", "0.54292995", "0.5427683", "0.5423839", "0.5423227", "0.5405624", "0.5405536", "0.5402004", "0.54019964", "0.53956854", "0.5393312", "0.53845376", "0.5379096", "0.5371246", "0.535089", "0.53494895", "0.53374493", "0.53180176", "0.53159755", "0.5315805", "0.53156406", "0.531429", "0.53139645", "0.5307017", "0.5306389", "0.5298289", "0.5293825", "0.52911454", "0.5289204", "0.5278959", "0.5271276", "0.5267987", "0.5266641", "0.52657926", "0.5258513", "0.5251588", "0.5251345", "0.52471375", "0.52454054", "0.52454054", "0.52399284", "0.5238404", "0.52358395", "0.5230506", "0.5223953", "0.5214285" ]
0.0
-1
Reorder the course list using quick sort by choosing the last element as the pivot point. After sorting, the course list will be in the increasing order according to the course codes.
public void reorder(int low, int high) { if (low < high) { // Select pivot position and put all the elements smaller // than pivot on left and greater than pivot on right int pi = partition(low, high); // Sort the elements on the left of pivot reorder(low, pi - 1); // Sort the elements on the right of pivot reorder(pi + 1, high); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sortFinalsList() {\n \n Course course = null;\n int j = 0;\n for (int i = 1; i < finalsList.size(); i++) {\n\n j = i;\n // checks to see if the start time of the element j is less than the\n // previous element, and if j > 0\n while (j > 0) {\n\n // if the current element, is less than the previous, then....\n if (finalsList.get(j).getDate()\n .compareTo(finalsList.get(j - 1).getDate()) < 0) {\n\n // if so, swap the two\n course = finalsList.get(j);\n finalsList.set(j, finalsList.get(j - 1));\n finalsList.set(j - 1, course);\n }\n else if (finalsList.get(j).getDate()\n .compareTo(finalsList.get(j - 1).getDate()) == 0) {\n \n if (compareTimes(finalsList.get(j).getBeginTime(), finalsList.get(j - 1).getBeginTime()) < 0) {\n \n // if so, swap the two\n course = finalsList.get(j);\n finalsList.set(j, finalsList.get(j - 1));\n finalsList.set(j - 1, course);\n }\n }\n\n // decrement j\n j--;\n }\n }\n }", "private void sortCourses() {\n ctrl.sortCourses().forEach(System.out::println);\n }", "public void sortList() {\n Node3 current = front, index = null;\n student temp;\n\n if(front == null) {\n return;\n }\n else {\n while(current != null) {\n //Node index will point to node next to current\n index = current.getNext();\n\n while(index != null) {\n //If current node's data is greater than index's node data, swap the data between them\n if(current.getData().getRoll()> index.getData().getRoll()) {\n temp = current.getData();\n current.setData(index.getData());\n index.setData(temp);\n }\n index = index.getNext();\n }\n current = current.getNext();\n }\n }\n }", "public static void quickSortTest(){\n\t\tTransformer soundwave = new Transformer(\"Soundwave\", 'D', new int[] {8,9,2,6,7,5,6,10});\n\t\tTransformer bluestreak = new Transformer(\"Bluestreak\", 'A', new int[] {6,6,7,9,5,2,9,7});\n\t\tTransformer hubcap = new Transformer(\"Hubcap\", 'A', new int[] {4,4,4,4,4,4,4,4});\n\t\tTransformer abominus = new Transformer(\"Abominus\", 'D', new int[] {10,1,3,10,5,10,8,4});\n\t\t\n\t\tgame.addTransformer(soundwave);\n\t\tgame.addTransformer(bluestreak);\n\t\tgame.addTransformer(hubcap);\n\t\tgame.addTransformer(abominus);\n\t\t\n\t\tgame.sortCompetitorsByRank();\n\t\tgame.printSortedRoster();\n\t}", "public ListUtilities quicksort(){\n\t\t\n\t\tListUtilities lo = this.returnToStart();\n\t\tListUtilities hi = this.goToEnd();\n\t\tListUtilities sorted = this.partition(lo, hi);\n\t\t\n\t\treturn sorted.returnToStart();\t\t\n\t}", "public void sort() {\r\n int k = start;\r\n for (int i = 0; i < size - 1; i++) {\r\n int p = (k + 1) % cir.length;\r\n for (int j = i + 1; j < size; j++) {\r\n if ((int) cir[p] < (int) cir[k % cir.length]) {\r\n Object temp = cir[k];\r\n cir[k] = cir[p];\r\n cir[p] = temp;\r\n }\r\n p = (p + 1) % cir.length;\r\n }\r\n k = (k + 1) % cir.length;\r\n }\r\n }", "public void sortCompetitors(){\n\t\t}", "public void changeSortOrder();", "@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void oldSort()\n\t{\n\t\tfor (int index = 0; index < arraySize; index++) {\n\t\t\tfor (int secondIndex = index + 1; secondIndex < arraySize; secondIndex++) {\n\t\t\t\tint temp = 0;\n\t\t\t\tif (array[index] > array[secondIndex]) {\n\t\t\t\t\ttemp = array[index];\n\t\t\t\t\tarray[index] = array[secondIndex];\n\t\t\t\t\tarray[secondIndex] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void quicksortSeq(Comparable[] array, int low, int up){\r\n\t\tif(low < up){\r\n\t\t\trekursionsSchritte += 2;\r\n\t\t\tint p = findPiv(array, low, up);\r\n\t\t\tquicksortSeq(array, low, p);\r\n\t\t\tquicksortSeq(array, p + 1, up);\r\n\t\t}\r\n\t}", "public ListUtilities cocktailSort(){\n\t\tboolean swaps = true;\n\t\tListUtilities temp = new ListUtilities();\n\t\t\n\t\twhile(swaps == true){\n\t\t\t//no swaps to begin with\n\t\t\tswaps = false;\n\n\t\t\t//if not end of list\n\t\t\tif (this.nextNum != null){\n\t\t\t\t\n\t\t\t\t//make temp point to next\n\t\t\t\ttemp = this.nextNum;\n\n\t\t\t\t//if b is greater than c\n\t\t\t\tif(this.num > this.nextNum.num){\n\t\t\t\t\t//it swapped\n\t\t\t\t\tswaps = true;\n\t\t\t\t\t\n\t\t\t\t\tswapF(temp);\n\t\t\t\t}\n\t\t\t//keep going until you hit end of list\n\t\t\ttemp.cocktailSort();\n\t\t\t}\n\t\t\t//if not beginning of list\n\t\t\tif (this.prevNum != null){\n\t\t\t\t//if c is smaller than b\n\t\t\t\tif(this.num < this.prevNum.num){\n\t\t\t\t\t//it swapped\n\t\t\t\t\tswaps = true;\n\t\t\t\t\tswapB(temp);\n\t\t\t\t}\n\t\t\t\t//keep going until hit beginning of list\n\t\t\t\ttemp.cocktailSort();\n\t\t\t}\n\t\t}\n\t//return beginning of list\n\treturn this.returnToStart();\n\t}", "private static <T extends Comparable<? super T>> void quickSort(List<T> list, int beginIndex, int finishIndex){\n if(beginIndex + 1 <= finishIndex){\n int i = beginIndex;\n int j = finishIndex;\n while(i <= j){\n while(list.get(i).compareTo(list.get(finishIndex)) < 0 && i < finishIndex){\n i++;\n }\n while(list.get(j).compareTo(list.get(finishIndex)) >= 0 && j > beginIndex){\n j--;\n }\n if(i <= j) {\n if(i != j)\n swap(list, i, j);\n if(i != beginIndex)\n i++;\n if(j != finishIndex)\n j--;\n }\n }\n if(i < finishIndex)\n swap(list, i, finishIndex);\n\n quickSort(list, beginIndex, i - 1);\n quickSort(list, i + 1, finishIndex);\n }\n }", "public static List<Course> sortElNumOfStdSkipFirstLimitByTwo(List<Course> courseList){\n return courseList.\n stream().\n sorted(Comparator.comparing(Course::getNumberOfStudents)).\n skip(1).\n limit(2).\n collect(Collectors.toList());\n }", "protected void sortCode() {\n for (int i = 1; i < codeCount; i++) {\n int who = i;\n for (int j = i + 1; j < codeCount; j++) {\n if (code[j].getFileName().compareTo(code[who].getFileName()) < 0) {\n who = j; // this guy is earlier in the alphabet\n }\n }\n if (who != i) { // swap with someone if changes made\n SketchCode temp = code[who];\n code[who] = code[i];\n code[i] = temp;\n }\n }\n }", "private void quicksort(int inLow, int inHigh) {\n\t\tint i = inLow; int j = inHigh;\n\t\t//____| Get Pivot from middle.\n\t\tfloat pivot = gameObjectsList.get(inLow + (inHigh - inLow)/2).getX();\n\t\t//____| Divide List\n\t\twhile (i <= j){\n\t\t\twhile(gameObjectsList.get(i).getX() < pivot){\n\t\t\t\ti++;\n\t\t\t}\n\t\t\twhile(gameObjectsList.get(j).getX() > pivot){\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tif (i<=j){\n\t\t\t\tCollections.swap(gameObjectsList, i, j);\n\t\t\t\ti++;\n\t\t\t\tj--;\n\t\t\t}\n\t\t}\n\t\tif (inLow < j)\n\t\t\tquicksort(inLow, j);\n\t\tif (i < inHigh)\n\t\t\tquicksort(i, inHigh);\n\t}", "private int partition(int low, int high) {\n // choose the pivot point\n int pivot = extractDigits(courses.get(high).getCode());\n int i = (low - 1);\n // partition the larger elements to the right of the pivot\n // and smaller elements to the left of the pivot\n for (int j = low; j < high; j++) {\n int coursePtr = extractDigits(courses.get(j).getCode());\n if (coursePtr <= pivot) {\n i++;\n Course temp = courses.get(i);\n courses.set(i, courses.get(j));\n courses.set(j, temp);\n }\n }\n Course temp = courses.get(i+1);\n courses.set(i+1, (courses.get(high)));\n courses.set(high, temp);\n return (i + 1);\n }", "public void sort(int[] seq, int begin, int end) {\n if (seq == null || end - begin <= 1) {// only seq with length larger than 1 is needed to sort\n return;\n }\n // divide and conquer\n int p = partition(seq, begin, end);// the pivot is now in the final place\n sort(seq, begin, p); // sort the left part\n sort(seq, p + 1, end); // sort the right part, p+1 excludes p because p is the final place of pivot\n }", "public void sortByQnNum() {\r\n\t\tfor (int j = 0; j < displayingList.size() - 1; j++) {\r\n\t\t\tfor (int i = 0; i < displayingList.size() - j - 1; i++) {\r\n\t\t\t\tif (displayingList.get(i).getQnNum() > displayingList.get(i + 1).getQnNum()) {\r\n\t\t\t\t\tswapPosition(displayingList, i, i + 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void quickSortHelper(int start, int end){\n if(start < end){\n //partition index calls partition that returns idx\n //and also puts toSort[partitionidx] in the right place\n int partitionidx = partition(start, end);\n\n //sorts elements before and after the partitions\n //recursive - nice\n //System.out.println(\"test\");\n quickSortHelper(start, partitionidx - 1); //befre\n quickSortHelper(partitionidx + 1, end); //after\n }\n }", "public static List<Course> sortElAvrScrSkipFirstThree(List<Course> courseList){\n return courseList.stream().\n sorted(Comparator.comparing(Course::getAverageScore)).\n skip(3).\n collect(Collectors.toList());\n }", "public static void sequentialSort(List<Integer> list, int start, int end) {\n if (start >= end)\n return;\n // recursive case\n\n // now sort into two sections so stuff in lower section is less than\n // pivot, and remainder is in upper section.\n int pivot = list.get((start + end) / 2);\n int lower = start;\n int upper = end - 1;\n\n while (lower < upper) {\n int lowerItem = list.get(lower);\n int upperItem = list.get(upper);\n if (lowerItem < pivot)\n // this item is not out of place\n lower++;\n else if (upperItem > pivot)\n // this item is not out of place\n upper--;\n else {\n // both items are out of place --- so swap them.\n list.set(lower, upperItem);\n list.set(upper, lowerItem);\n if (upperItem != pivot)\n lower++;\n if (lowerItem != pivot)\n upper--;\n }\n }\n\n list.set(lower, pivot);\n\n ParSort.pause(list, 100); // to make animation in display mode better\n\n // A this point, lower == upper.\n ParSort.sequentialSort(list, start, lower);\n ParSort.sequentialSort(list, lower + 1, end);\n }", "public void quickSort() {\n\t\tquickSort(0, data.size() - 1);\n\t}", "private static void sortByVerified( ArrayList<Volunteer> list)\n {\n // Find the string reference that should go in each cell of\n // the array, from cell 0 to the end\n for ( int j = 0; j < list.size();j++ )\n {\n // Find min: the index of the string reference that should go into cell j.\n // Look through the unsorted strings (those at j or higher) for the one that is first in lexicographic order\n int min = j;\n for ( int k=j+1; k < list.size(); k++ ) {\n if (list.get(k).compareTo(list.get(min)) > 0) {\n min = k;\n }\n\n }\n\n // Swap the reference at j with the reference at min\n Collections.swap(list, j, min);\n }\n }", "private void quickSort(List<T> array, int startIndex, int endIndex, FuncInterface<T> ICompare)\n {\n if (startIndex < endIndex)\n {\n // calculate the pivotIndex\n int pivotIndex = partition(array, startIndex, endIndex, ICompare);\n // quickSort the left sub-array\n quickSort(array, startIndex, pivotIndex, ICompare);\n // quickSort the right sub-array\n quickSort(array, pivotIndex + 1, endIndex, ICompare); \n }\n }", "public <T extends Comparable<T>> int partition(T[] list, int first, int last) {\n\t/**\n\t * System.out.println(\"hey\" + Arrays.toString(list));\n\n\tint pivotIndex = 0;\n\tif(list.length < 3) {\n\t\tpivotIndex = 0;\n\t} else {\n\t\tT[] temp = Arrays.copyOfRange(list, 0, 3);\n\t\tArrays.sort(temp);\n\t\tT a = temp[1];\n\t\tfor(int i=0; i<3; i++) {\n\t\t\tif(a.equals(list[i])) {\n\t\t\t\tpivotIndex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// Move pivot to first Index...\n\t\tT tempo = list[first];\n\t\tlist[first] = list[pivotIndex];\n\t\tlist[pivotIndex] = tempo;\n\t}\n\t\n\t\t */\n\t\n\t\n\tT pivot = list[first]; \n\tdisplay(list, pivot);\n\t// Choose the first element as the pivot 17 \n\tint low = first + 1; // Index for forward search\n\tint high = last; \n\t// Index for backward search\n\n\twhile (high > low) {\n\t\t// Search forward from left\n\t\twhile (low <= high && list[low].compareTo(pivot) <= 0)\n\t\t\tlow++;\n\n\t\t// Search backward from right\n\t\twhile (low <= high && list[high].compareTo(pivot) > 0)\n\t\t\thigh--;\n\n\t\t// Swap two elements in the list\n\t\tif (high > low) {\n\t\t\tT temp = list[high]; \n\t\t\tlist[high] = list[low]; \n\t\t\tlist[low] = temp;\n\t\t} \n\t} \n\n\n\twhile (high > first && list[high].compareTo(pivot) >= 0) high--;\n\tif (list[high].compareTo(pivot) <= 0){ \n\t\tlist[first] = list[high]; \n\t\tlist[high] = pivot;\n\t\treturn high;\n\t}else {\n\t\treturn first; \n\t}\n}", "public void sortGivenArray_name(){\n movieList = quickSort(movieList);\n }", "private void quickSort(int start, int end) {\n\t\tint pivot, i, j;\n\t\tif (start < end) {\n\t\t\t// Select first element as Pivot\n\t\t\tpivot = start;\n\t\t\ti = start;\n\t\t\tj = end;\n\n\t\t\t// Base condition\n\t\t\twhile (i < j) {\n\t\t\t\t// increment i till found greater element than pivot\n\t\t\t\tfor (i = start; i <= end; i++) {\n\t\t\t\t\tif (data.get(i) > data.get(pivot)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// decrement j till found lesser element than pivot\n\t\t\t\tfor (j = end; j >= start; j--) {\n\t\t\t\t\tif (data.get(j) <= data.get(pivot)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// if i<j than swap\n\t\t\t\tif (i < j) {\n\t\t\t\t\tswap(i, j);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// set pivot to jth element & move pivot to proper position\n\t\t\tswap(j, pivot);\n\n\t\t\t// Repeat for sub arrays\n\t\t\tquickSort(start, j - 1);\n\t\t\tquickSort(j + 1, end);\n\t\t}\n\t}", "private void doQuickSort(int lowerIndex, int higherIndex){\n\t\tint lowItter = lowerIndex;\n\t\tint highItter = higherIndex;\n \n\t\t// use the middle as a pivot numberr\n int middleIndex = lowerIndex + (higherIndex - lowerIndex)/2;\n\t\tint pivot = sortArray[middleIndex];\n \n\t\twhile (lowItter <= highItter) {\n\t\t\twhile (sortArray[lowItter] < pivot)\n lowItter++;\n \n\t\t\twhile (sortArray[highItter] > pivot)\n highItter--;\n \n compCount++;\n\t\t\tif (lowItter <= highItter) {\n\t\t\t\tswap(lowItter, highItter);\n swapCount++;\n \n\t\t\t\tlowItter++;\n\t\t\t\thighItter--;\n\t\t }\n\t\t}\n \n compCount++;\n\t\tif (lowerIndex < higherIndex)\n\t\t\tdoQuickSort(lowerIndex, highItter);\n \n compCount++;\n\t\tif (lowItter < higherIndex)\n\t\t\tdoQuickSort(lowItter, higherIndex);\n \n\t}", "@Override\n\tpublic void sortir() {\n\t\tif (!estVide()) {\n\t\t\tTC next = getProchain();\t\t\t\t//On recupere le prochain\n\t\t\tsalle.get(next.getPrio()).remove(next);\t//Antinomie de entrer\n\t\t}\n\t}", "static void quickSort (int a[], int lo, int hi){\n\t int i=lo, j=hi, h;\r\n\t int pivot=a[lo];\r\n\r\n\t // pembagian\r\n\t do{\r\n\t while (a[i]<pivot) i++;\r\n\t while (a[j]>pivot) j--;\r\n\t if (i<=j)\r\n\t {\r\n\t h=a[i]; a[i]=a[j]; a[j]=h;//tukar\r\n\t i++; j--;\r\n System.out.println(\"i = \"+i + \" j = \" + j);\r\n\t }\r\n\t } while (i<=j);\r\n\r\n\t // pengurutan\r\n\t if (lo<j) quickSort(a, lo, j);\r\n\t if (i<hi) quickSort(a, i, hi);\r\n\t }", "public void sort() {\n Stack<Pair> stack = new Stack();\n //fill the stack\n Pair temp = new Pair(0, a.length);\n stack.push(temp);\n quickSort(stack,stack.peek().first, stack.peek().n);\n }", "void quickSort(int arr[], int low, int high) \n { \n if (low < high) \n { \n /* pi is partitioning index, arr[pi] is \n now at right place */\n int pi = partition(arr, low, high); \n \n // Recursively sort elements before \n // partition and after partition \n quickSort(arr, low, pi-1); \n quickSort(arr, pi+1, high); \n } \n }", "void quick_sort(int intArray[], int low, int high)\n {\n if (low < high)\n {\n // partition the array around pi=>partitioning index and return pi\n int pi = partition(intArray, low, high);\n // sort each partition recursively\n quick_sort(intArray, low, pi - 1);\n quick_sort(intArray, pi + 1, high);\n }\n }", "private static void quicksort( Comparable [ ] a, int low, int high ) {\n if( low + CUTOFF > high )\n insertionSort( a, low, high );\n else {\n// Sort low, middle, high\n int middle = ( low + high ) / 2;\n if( a[ middle ].lessThan( a[ low ] ) )\n swapReferences( a, low, middle );\n if( a[ high ].lessThan( a[ low ] ) )\n swapReferences( a, low, high );\n if( a[ high ].lessThan( a[ middle ] ) )\n swapReferences( a, middle, high );\n// Place pivot at position high - 1\n swapReferences( a, middle, high - 1 );\n Comparable pivot = a[ high - 1 ];\n// Begin partitioning\n int i, j;\n for( i = low, j = high - 1; ; ) {\n while( a[ ++i ].lessThan( pivot ) );\n while( pivot.lessThan( a[ --j ] ) );\n if( i < j )\n swapReferences( a, i, j );\n else\n break;\n }\n// Restore pivot\n swapReferences( a, i, high - 1 );\n quicksort( a, low, i - 1 ); // Sort small elements\n quicksort( a, i + 1, high ); // Sort large elements\n }\n }", "private static void quickSort(int[] array, int startIndex, int rightIndex) {\n if (startIndex < rightIndex) {\n int pivot = partition(array, startIndex, rightIndex);\n quickSort(array, startIndex, pivot - 1);\n quickSort(array, pivot + 1, rightIndex);\n }\n }", "private void sort() {\n ScoreComparator comparator = new ScoreComparator();\n Collections.sort(scores, comparator);\n }", "public void sortAscending()\r\n\t{\r\n\t\tList<Book> oldItems = items;\r\n\t\titems = new ArrayList<Book>(items);\r\n\t\tCollections.sort(items);\r\n\t\tfirePropertyChange(\"books\", oldItems, items);\r\n\t}", "public static void userSort(ArrayList<FileData> fromFile, int primary_sort, int secondary_sort, int primary_order, int secondary_order)\n {\n \n // user wants to sort by primary = state code and secondary = county code\n if(primary_sort == 1 && secondary_sort == 2) \n {\n if(primary_order == 1 && secondary_order == 1){// user wants both primary and secondary in ascending order\n Collections.sort(fromFile, new Sort_State_Code());\n Collections.sort(fromFile,new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information by state and county code\n }\n }\n else if(primary_order == 2 && secondary_order == 2){ // user wants both primary and secondary in decending order\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){// primary is ascending\n Collections.sort(fromFile, new Sort_State_Code());\n Collections.sort(fromFile,new Sort_County_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){//primary is descending\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n Collections.sort(fromFile,new Sort_County_Code()); \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n // user wants to sort by primary = county code and secondary = state code\n if(primary_sort == 2 && secondary_sort == 1){\n if(primary_order == 1 && secondary_order == 1){\n //primary and seconary is ascending\n Collections.sort(fromFile, new Sort_State_Code());\n Collections.sort(fromFile,new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order == 2 && secondary_order == 2){\n //both descending\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n Collections.sort(fromFile,new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){//primary is ascending\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n Collections.sort(fromFile,new Sort_County_Code()); // primary sort\n \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){//primary is descending\n Collections.sort(fromFile, new Sort_State_Code());\n Collections.sort(fromFile,new Sort_County_Code().reversed()); // primary sort\n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==1&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new Sort_State_Code()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information by state and county code\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information by state and county code\n } \n } \n }\n \n if(primary_sort==3&&secondary_sort==1){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Code());\n Collections.sort(fromFile,new Sort_State_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n Collections.sort(fromFile, new Sort_State_Name()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information by state and county code\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new Sort_State_Name().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==1&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new Sort_State_Code()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==4&&secondary_sort==1){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile, new Sort_State_Code());\n Collections.sort(fromFile,new Sort_County_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new Sort_State_Code().reversed());\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n Collections.sort(fromFile, new Sort_County_Name()); \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new Sort_County_Name().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n if(primary_sort==1&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==5&&secondary_sort==1){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortFirstConfirmCount());\n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information \n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information \n } \n } \n }\n \n \n if(primary_sort==1&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); \n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); \n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information by state and county code\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortSecondConfirmCount());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information by state and county code\n } \n } \n }\n \n if(primary_sort==6&&secondary_sort==1){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==1&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==7&&secondary_sort==1){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==1&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n \n if(primary_sort==8&&secondary_sort==1){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==2&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n Collections.sort(fromFile,new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new Sort_County_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==3&&secondary_sort==2){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Code());\n Collections.sort(fromFile,new Sort_State_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n Collections.sort(fromFile,new Sort_State_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Code());\n Collections.sort(fromFile, new Sort_State_Name().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==2&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new Sort_County_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==4&&secondary_sort==2){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Code());\n Collections.sort(fromFile,new Sort_County_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n Collections.sort(fromFile,new Sort_County_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Code());\n Collections.sort(fromFile, new Sort_County_Name().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==2&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==5&&secondary_sort==2){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Code());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Code());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n \n if(primary_sort==2&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortSecondConfirmCount());\n Collections.sort(fromFile, new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n if(primary_sort==6&&secondary_sort==2){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Code());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Code());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n \n if(primary_sort==2&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n if(primary_sort==7&&secondary_sort==2){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Code());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Code());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==2&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n if(primary_sort==8&&secondary_sort==2){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Code());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Code());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n \n if(primary_sort==3&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new Sort_State_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new Sort_State_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==4&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new Sort_County_Name());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n Collections.sort(fromFile,new Sort_County_Name());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==3&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new Sort_State_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==5&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==3&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==6&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==3&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new Sort_State_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==7&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==3&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new Sort_State_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==8&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==4&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new Sort_County_Name());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Name());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==5&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==4&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new Sort_County_Name());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Name());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortSecondConfirmCount());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==6&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==4&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new Sort_County_Name());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Name());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==7&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==4&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new Sort_County_Name());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Name());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==8&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==5&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortSecondConfirmCount());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==6&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==5&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==7&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==5&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==8&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==6&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==7&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortSecondConfirmCount());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==6&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==8&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortSecondConfirmCount());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==7&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==8&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order == 2){\n //primary is descending\n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n }", "List<SurveyQuestion> sortByPageAndPosition(List<SurveyQuestion> questions);", "public static void quickSortInPlace(List<Comparable> data, int from, int to) {\n\t\tif (data==null || data.size()<2 || (to-from)<1)\n\t\t\treturn;\n\t\tif (from<0 || to <0 || from>data.size() || to>data.size()) {\n\t\t\tthrow new IndexOutOfBoundsException(data+\" from \"+from+\" to \"+to);\n\t\t}\n\t\t\n\t\tComparable pivot = data.get(to);\n\t\tint pos=from;\n\t\tfor (int i=from; i<to; ++i ) {\n\t\t\tif (data.get(i).compareTo(pivot)<0) {\n\t\t\t\tif (i!=pos) {\n\t\t\t\t\tComparable tmp = data.get(i);\n\t\t\t\t\tdata.set(i,data.get(pos));\n\t\t\t\t\tdata.set(pos, tmp);\n\t\t\t\t\t//System.out.println(data.get(i)+\"<=>\"+tmp);\n\t\t\t\t}\n\t\t\t\tpos++;\n\t\t\t}\n\t\t\t//System.out.println(Arrays.asList(data));\n\t\t}\n\t\t\n\t\tif (pos!=to) {\n\t\t\tComparable tmp = data.get(to);\n\t\t\tdata.set(to, data.get(pos));\n\t\t\tdata.set(pos, tmp);\n\t\t}\n\t\t\n\t\t//System.out.println(Arrays.asList(data)+\" [\"+pos+\"]\"+pivot+\" (\"+from+\",\"+to+\")\");\n\t\tquickSortInPlace(data,from, pos-1);\n\t\tquickSortInPlace(data,pos+1,to);\n\t}", "public void sortByAndser() {\r\n\t\tQuestion[][] question2DArray = new Question[displayingList.size()][];\r\n\t\tfor (int i = 0; i < displayingList.size(); i++) {\r\n\t\t\tquestion2DArray[i] = new Question[1];\r\n\t\t\tquestion2DArray[i][0] = displayingList.get(i);\r\n\t\t}\r\n\r\n\t\twhile (question2DArray.length != 1) {\r\n\t\t\tquestion2DArray = (Question[][]) merge2DArray(question2DArray);\r\n\t\t}\r\n\t\tdisplayingList.removeAll(displayingList);\r\n\t\tfor (int i = 0; i < question2DArray[0].length; i++) {\r\n\t\t\tdisplayingList.add(question2DArray[0][i]);\r\n\t\t}\r\n\t}", "public static int[] partialSort(int[] a) {\n for (int i = 0; i < 2; i++) {\n for (int j = 0; j < 2 - i; j++) {\n if (a[j] > a[j+1]) {\n int temp = a[j+1];\n a[j+1] = a[j];\n a[j] = temp;\n }\n }\n }\n return a;\n}", "public void sort() {\n\t\tSystem.out.println(\"Quick Sort Algorithm invoked\");\n\n\t}", "public static void sort (int[] data)\n {\n \t\n \tfor(int i = 0; i < data.length-1; i++)\n \t{\n \t\tint max = data[i];\n \t\tint indexOfMax = i;\n \t\t\n \t\tfor(int j = i + 1; j < data.length; j++)\n \t\t{\n \t\t\tif(data[j] > max)\n \t\t\t{\n \t\t\t\tmax = data[j];\n \t\t\t\tindexOfMax = j;\n \t\t\t}\n \t\t}\n \t\t\n \t\tdata[indexOfMax] = data[i];\n \t\tdata[i] = max;\n \t}\n \t\n // Your TA will help you write selection sort in lab. \n }", "public static void quickSort(int[] src) {\n if (src == null || src.length <= 1) return;\n\n rPartition(src, 0, src.length - 1);\n }", "public void sort() {\n ListNode start = head;\n ListNode position1;\n ListNode position2;\n\n // Going through each element of the array from the second element to the end\n while (start.next != null) {\n start = start.next;\n position1 = start;\n position2 = position1.previous;\n // Checks if previous is null and keeps swapping elements backwards till there\n // is an element that is bigger than the original element\n while (position2 != null && (position1.data < position2.data)) {\n swap(position1, position2);\n numberComparisons++;\n position1 = position2;\n position2 = position1.previous;\n }\n }\n }", "private static void quickSort(double arr[],Integer[] pageIDS, int low, int high)\n {\n if (low < high)\n {\n /* pi is partitioning index, arr[pi] is\n now at right place */\n int pi = partition(arr,pageIDS, low, high);\n\n // Recursively sort elements before\n // partition and after partition\n quickSort(arr, pageIDS, low, pi-1);\n quickSort(arr, pageIDS,pi+1, high);\n }\n }", "public void quicksort(int[] a, int start, int end){\n\t\tif(end <= start) return;\r\n\t\t//2 number\r\n//\t\tif(end - start == 1 && a[start] > a[end]){\r\n//\t\t\tswap(a, start, end);\r\n//\t\t\treturn;\r\n//\t\t}\r\n\t\tif((end - start )< 20){\r\n\t\t\tinsertSort(a, start,end);\r\n\t\t\treturn;\r\n\t\t}\r\n\t int pivot = getPivot(a, start, end);\r\n\t int i = start, j = end - 1;\r\n\t while(i < j){\r\n\t while(i < j && a[++i] < pivot);\r\n\t while(i < j && a[--j] > pivot);\r\n\t if(i < j)\r\n\t swap(a, i, j);\r\n\t }\r\n\t swap(a, i, end -1);\r\n\t quicksort(a, start, i - 1);\r\n\t quicksort(a, i + 1, end);\r\n\t}", "public static List<Integer> sort(List<Integer> input) {\n\t\tif (input.size() < 2)\n\t\t\treturn input;\n\n\t\tint pivot = input.get((input.size() - 1) / 2);\n\t\tList<Integer> less = input.stream().filter(x -> x < pivot).collect(Collectors.toList());\n\t\tList<Integer> greater = input.stream().filter(x -> x > pivot).collect(Collectors.toList());\n\t\tList<Integer> all = new ArrayList<>(sort(less));\n\t\tall.add(pivot);\n\t\tall.addAll(sort(greater));\n\t\treturn all;\n\t}", "public void sortHighscores(){\n Collections.sort(highscores);\n Collections.reverse(highscores);\n }", "public void sort() // sort according to primary key defined in RecordTemplate\n\t{\n\t\trecordList.sort((Record r1, Record r2)->r1.getValue(PRIMARY_KEY_FIELD_INDEX).compareTo(r2.getValue(PRIMARY_KEY_FIELD_INDEX))); \n //recordList.forEach((r)->System.out.println(r)); \n\t}", "private void sortScoreboard() {\n score.setSortType(TableColumn.SortType.DESCENDING);\n this.scoreboard.getSortOrder().add(score);\n score.setSortable(true);\n scoreboard.sort();\n }", "public static void intQSort(int v[], int l, int r) {\n\n int tmp; //tmp variable for swapping\n\n if (INSERTIONENABLED) {\n\n //Use insertion sort for arrays smaller than CUTOFF\n if (r < CUTOFF) {\n\n for(int i = l; i < r; i++) {\n for(int j = i; j > 0 && v[j - 1] > v[j]; j--) {\n // swap(j, j -1) {\n tmp=v[j - 1];\n v[j - 1]=v[j];\n v[j]=tmp;\n // }\n }\n }\n\n return;\n }\n }\n\n int pivot;\n int m = l + (int) (Math.random() * ((r - l) + 1)); // random number between first and last, Peto's remark\n\n //median(v[l], v[m], v[r]) {\n if (v[l] <= v[m]) {\n if (v[m] <= v[r])\n pivot = v[m];\n else {\n if (v[l] <= v[r])\n pivot = v[r];\n else\n pivot = v[l];\n }\n } else {\n if (v[m] <= v[r]) {\n if (v[l] <= v[r])\n pivot = v[l];\n else\n pivot = v[r];\n } \n else\n pivot = v[m];\n }\n // }\n\n int i=l,j=r;\n\n //Partioning\n while(i<=j) {\n\n while(v[i]<pivot) i++;\n while(v[j]>pivot) j--;\n\n if(i<=j) {\n //swap(i, j) {\n tmp=v[i];\n v[i]=v[j];\n v[j]=tmp;\n // }\n\n i++;\n j--;\n }\n }\n\n if(l<j) \n intQSort(v,l,j);\n\n if(i<r) \n intQSort(v,i,r);\n }", "public void sort() {\n\t\tfor (int i = 1; i < this.dataModel.getLength(); i++) {\n\t\t\tfinal int x = this.dataModel.get(i);\n\n\t\t\t// Find location to insert using binary search\n\t\t\tfinal int j = Math.abs(this.dataModel.binarySearch(0, i, x) + 1);\n\n\t\t\t// Shifting array to one location right\n\t\t\tthis.dataModel.arrayCopy(j, j + 1, i - j);\n\n\t\t\t// Placing element at its correct location\n\t\t\tthis.dataModel.set(j, x);\n\t\t\tthis.repaint(this.count++);\n\t\t}\n\t}", "private ArrayList<ArrayList<Integer>> sortValidPartners(Matching data, int validPartnersNo, ArrayList<ArrayList<Integer>> validPartners) {\n for (int resident = 0; resident < validPartners.get(0).size(); resident++) {\n\n for (int partner = 1; partner < validPartnersNo; partner++) {\n int partnerRank = data.getResidentPreference().get(resident).indexOf(validPartners.get(partner).get(resident));\n int partnerValue = validPartners.get(partner).get(resident);\n if (partnerRank == -1)\n partnerRank = 999999;\n int partnerToCompare = partner - 1;\n\n int partnerToCompareRank = data.getResidentPreference().get(resident).indexOf(validPartners.get(partnerToCompare).get(resident));\n if (partnerToCompareRank == -1)\n partnerToCompareRank = 999999;\n while (partnerToCompareRank > partnerRank) {\n validPartners.get(partnerToCompare + 1).set(resident, validPartners.get(partnerToCompare).get(resident));\n partnerToCompare--;\n if (partnerToCompare < 0)\n break;\n partnerToCompareRank = data.getResidentPreference().get(resident).indexOf(validPartners.get(partnerToCompare).get(resident));\n if (partnerToCompareRank == -1)\n partnerToCompareRank = 999999;\n }\n\n validPartners.get(partnerToCompare + 1).set(resident, partnerValue);\n }\n }\n return validPartners;\n }", "public void shellSort(){\n int increment = list.size() / 2;\n while (increment > 0) {\n for (int i = increment; i < list.size(); i++) {\n int j = i;\n int temp = list.get(i);\n while (j >= increment && list.get(j - increment) > temp) {\n list.set(j, list.get(j - increment));\n j = j - increment;\n }\n list.set(j, temp);\n }\n if (increment == 2) {\n increment = 1;\n } else {\n increment *= (5.0 / 11);\n }\n }\n }", "private static <T> void quickSort(@Nonnull List<T> x, @Nonnull Comparator<? super T> comparator, int off, int len) {\n if (len < 7) {\n for (int i = off; i < len + off; i++) {\n for (int j = i; j > off && comparator.compare(x.get(j), x.get(j - 1)) < 0; j--) {\n swapElements(x, j, j - 1);\n }\n }\n return;\n }\n\n // Choose a partition element, v\n int m = off + (len >> 1); // Small arrays, middle element\n if (len > 7) {\n int l = off;\n int n = off + len - 1;\n if (len > 40) { // Big arrays, pseudomedian of 9\n int s = len / 8;\n l = med3(x, comparator, l, l + s, l + 2 * s);\n m = med3(x, comparator, m - s, m, m + s);\n n = med3(x, comparator, n - 2 * s, n - s, n);\n }\n m = med3(x, comparator, l, m, n); // Mid-size, med of 3\n }\n T v = x.get(m);\n\n // Establish Invariant: v* (<v)* (>v)* v*\n int a = off;\n int b = a;\n int c = off + len - 1;\n int d = c;\n while (true) {\n while (b <= c && comparator.compare(x.get(b), v) <= 0) {\n if (comparator.compare(x.get(b), v) == 0) {\n swapElements(x, a++, b);\n }\n b++;\n }\n while (c >= b && comparator.compare(v, x.get(c)) <= 0) {\n if (comparator.compare(x.get(c), v) == 0) {\n swapElements(x, c, d--);\n }\n c--;\n }\n if (b > c) break;\n swapElements(x, b++, c--);\n }\n\n // Swap partition elements back to middle\n int n = off + len;\n int s = Math.min(a - off, b - a);\n vecswap(x, off, b - s, s);\n s = Math.min(d - c, n - d - 1);\n vecswap(x, b, n - s, s);\n\n // Recursively sort non-partition-elements\n if ((s = b - a) > 1) quickSort(x, comparator, off, s);\n if ((s = d - c) > 1) quickSort(x, comparator, n - s, s);\n }", "public static void quicksortByX(Point[] A, int left, int right) {\n if (left < right) {\n // Array partitioning (any partitioning algorithm can be used here).\n int pivot = hoarePartitioning(A, left, right);\n // Recursive application of Quicksort to left-part and right-part.\n quicksortByX(A, left, pivot - 1);\n quicksortByX(A, pivot + 1, right);\n }\n }", "public void quickSort(int[] list, int p, int r){\r\n\t\tif(p<r){\r\n\t\t\tint q = partition(list, p, r);\r\n\t\t\tquickSort(list, p, q-1);\r\n\t\t\tquickSort(list, q+1, r); \r\n\t\t}\r\n\t}", "private void quickSort(Comparable[] items, int left, int right) {\n if (left < right) {\n /**\n * Split the list at the pivot through partitioning it,\n * and return the pivot to separate out the less than\n * and greater than sides.\n */\n int pivot = partition(items, left, right);\n if (pivot - 1 > left) {\n quickSort(items, left, pivot - 1);\n }\n if (pivot + 1 < right) {\n quickSort(items, pivot + 1, right);\n }\n }\n }", "private void sort(T[] arr, int lo, int hi) {\n if (lo >= hi) return; // we return if the size of the part equals 1\n int pivot = partition(arr, lo, hi); // receiving the index of the pivot element\n sort(arr, lo, pivot - 1); // sorting the left part\n sort(arr, pivot + 1, hi); // sorting the right part\n }", "void sortV();", "private void quickSort(int low, int high) {\n\t\tint i = low;\n\t\tint k = high;\n\t\tint pivot = array[low + (high - low) / 2];\n\n\t\twhile (i <= k) {\n\t\t\t// Stops when element on left side is greater than the pivot\n\t\t\twhile (array[i] < pivot) {\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t// Stops when the element on the right side is less than the pivot\n\t\t\twhile (array[k] > pivot) {\n\t\t\t\tk--;\n\t\t\t}\n\t\t\t// Swap the left and right elements, since the one on the left is\n\t\t\t// greater than the one on the right (proved via pivot)\n\t\t\tif (i <= k) {\n\t\t\t\texchangeNums(i, k);\n\t\t\t\t// Move on to the next elements\n\t\t\t\ti++;\n\t\t\t\tk--;\n\t\t\t}\n\t\t}\n\t\t// Recursive calls\n\t\tif (low < k) {\n\t\t\tquickSort(low, k);\n\t\t}\n\t\tif (i < high) {\n\t\t\tquickSort(i, high);\n\t\t}\n\t}", "public static void quicksort(int l, int r, List<CustomCharacter> list)\n throws InterruptedException {\n\n // handle edge cases\n if(l >= r){\n return;\n }\n if(l >= list.size()){\n return;\n }\n if(r >= list.size()){\n r = list.size() - 1;\n }\n\n\n\n // partition smaller elements on left // and larger on right // with respect to the originalPosition of the rth element (pivot)\n int smallElementEnd = l-1;\n System.out.println(\"Deciding for : \" + list.get(r).key);\n\n CustomCharacter rth = list.get(r);\n for (int i = l; i < r; i++) {\n CustomCharacter curr = list.get(i);\n if(curr.originalPosition < rth.originalPosition){\n swap(list, ++smallElementEnd, i);\n }\n }\n\n // place rth element at correct position\n swap(list, ++smallElementEnd, r);\n\n Thread.sleep(1500);\n printList(list);\n\n // sort the remaining two halves\n quicksort(l, smallElementEnd-1, list);\n quicksort(smallElementEnd + 1, r, list);\n }", "private ArrayList<Teacher> sortTeacherByPriorty(ArrayList<Teacher> teachers, ArrayList<Integer> preferedTeachers, int numSections) {\n ArrayList<Teacher> aux = new ArrayList<>();\r\n if (preferedTeachers.isEmpty()) {\r\n return aux;\r\n }\r\n\r\n for (int i = 0; i < numSections; i++) {\r\n Teacher teacher = findTeacher(teachers, preferedTeachers.get(i % preferedTeachers.size()));\r\n aux.add(teacher);\r\n }\r\n return aux;\r\n }", "public void quicksort() {\r\n quicksort(mArray, 0, mArray.length -1);\r\n }", "public static List<Course> sortElNumOfStdLimitByTwo(List<Course> courseList){\n return courseList.stream().\n sorted(Comparator.comparing(Course::getNumberOfStudents)).\n limit(2).\n collect(Collectors.toList());\n }", "public void sortDescending()\r\n\t{\r\n\t\tList<Book> oldItems = items;\r\n\t\titems = new ArrayList<Book>(items);\r\n\t\tCollections.sort(items, Collections.reverseOrder());\r\n\t\tfirePropertyChange(\"books\", oldItems, items);\r\n\t}", "private static int partition(int left, int right, int pivot, List<Integer> A) {\n int pivotValue = A.get(pivot);\n int largerIndex = left;\n\n Collections.swap(A, pivot, right);\n for (int i = left; i < right; ++i) {\n if (A.get(i) > pivotValue) {\n Collections.swap(A, i, largerIndex++);\n }\n }\n Collections.swap(A, right, largerIndex);\n return largerIndex;\n }", "void sort( int low, int high)\n {\n if (low > high)\n {\n /* pi is partitioning index, arr[pi] is\n now at right place */\n int pi = partition(low, high);\n\n // Recursively sort elements before\n // partition and after partition\n sort( low, pi-1);\n sort( pi+1, high);\n }\n }", "void sort();", "void sort();", "@Test\n public void testQuickSort() {\n System.out.println(\"QuickSort listo\");\n Comparable[] list = {3,2,5,4,1};\n QuickSort instance = new QuickSort();\n Comparable[] expResult = {1,2,3,4,5};\n Comparable[] result = instance.QuickSort(list, 0, list.length-1);\n assertArrayEquals(expResult, result);\n }", "public void selectionSort() {\n int nextMin;\n\n for (int i = 0; i < IntList.length - 1; i++) {\n nextMin = i;\n for (int j = i + 1; j < IntList.length; j++) {\n if (IntList[j] < IntList[nextMin])\n nextMin = j;\n }\n if (nextMin != i)\n swapSelection(IntList, i, nextMin);\n }\n }", "public static void quickSortOut(int[] array, int left, int right, int n) {\n\n\t\tif (right - left >= n) {\n\t\t\tif (left < right) {\n\t\t\t\tint pivotNewIndex = partition(array, left, right);\n\t\t\t\tquickSortOut(array, left, pivotNewIndex - 1, n);\n\t\t\t\tquickSortOut(array, pivotNewIndex + 1, right, n);\n\t\t\t}\n\t\t}\n\t\tinsertionSort(array, 0, array.length - 1);\n\n\t}", "private static void sort(int[] seq) {\n\t\tfor (int i = 0; i < seq.length; i++) {\n\n\t\t\tfor (int j = i; j < seq.length; j++) {\n\n\t\t\t\tif (seq[i] > seq[j]) {\n int temp = seq[i];\n seq[i] = seq[j];\n seq[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void quickSort(int[] arr, int lo, int hi) {\n //write your code here\n if(lo>hi){\n return;\n }\n int pivot = partition(arr, arr[hi], lo, hi);\n quickSort(arr, lo, pivot-1);\n quickSort(arr, pivot+1, hi);\n }", "public static void quickSort(int[] a, int left, int right)\r\n {\r\n int pivot = partition(a, left, right);\r\n if(left < pivot - 1)\r\n quickSort(a, left, pivot - 1);\r\n if(pivot < right)\r\n quickSort(a, pivot, right);\r\n }", "public void sort() {\r\n // sort the process variables\r\n Arrays.sort(pvValues, categoryComparator);\r\n fireTableDataChanged();\r\n }", "private int partition(Comparable[] items, int first, int last) {\n /**\n * Get a random pivot for the current section.\n * <p/>\n * It should be noted that I made a decision to choose a randomized pivot\n * over selecting a hard-coded pivot (i.e. the middle), or a median. This\n * is to avoid situations where we might get the 'worst case' scenario for\n * QuickSort, leading to O(n^2) time complexity. By using a random pivot,\n * it becomes highly unlikely for the algorithm to run into this situation.\n * <p/>\n * I felt this was the safest and most reliable way of implementing the\n * pivot selection.\n */\n int pivot = (int) Math.floor(UtilityMethods.getPivot(first, last));\n\n /**\n * Swap the pivot item with the first element to move it out\n * of the way during sorting. Assign a variable to hold this\n * for quick comparison.\n */\n UtilityMethods.swapElements(items, pivot, first);\n Comparable pivotElement = items[first];\n\n /**\n * The index to begin the swapping of the elements is the next\n * index after the pivot, currently at first.\n */\n int swapPosition = first + 1;\n\n /**\n * For each element within the current section, we iterate through\n * the section, starting from one after the pivot (the swap position)\n */\n for (int currentElement = swapPosition; currentElement <= last; currentElement++) {\n\n /**\n * If the currently being checked element is smaller than the pivot,\n * we swap the current element with the 'swap position'. This results\n * in gathering all of the numbers less than the pivot element to\n * one side of the array.\n *\n * The index that is then to be swapped is incremented. This means\n * that any elements before the swap position will be sorted as 'less'\n * than the pivot. We don't need to move any elements greater than\n * the pivot.\n */\n if (items[currentElement].compareTo(pivotElement) < 0) {\n UtilityMethods.swapElements(items, swapPosition, currentElement);\n swapPosition++;\n }\n\n }\n\n /**\n * After all elements have been swapped around, we switch the first element\n * (the pivot element), with the last sorted 'less than' element in swap\n * position -1. The works, as it doesn't matter what element is in what\n * position, as long as there are greater and less than sections. By\n * doing this swap, we keep the elements less than the pivot to the left\n * of the pivot, and put the pivot in the 'correct' sorted place in the list.\n */\n UtilityMethods.swapElements(items, first, swapPosition - 1);\n\n /**\n * We return the swapPosition -1, which is the final index of the pivot element.\n */\n return swapPosition - 1;\n }", "public void sortIncreasing()\n {\n int min;\n \n for (int i = 0; i < list.length - 1; i++)\n {\n min = i; \n for(int j = i+1; j < list.length; j++)\n {\n if(list[j] < list[min])\n min = j; \n }\n if(i != min && list[min] < list.length)\n {\n int temp = list[min];\n list[min] = list[i];\n list[i] = temp; \n }\n }\n }", "void decreaseSortLetter();", "public void sort() {\n /*int jokers = this.getJokers();\n\t\tif (jokers > 0 && this.size() > 2) {\n\t\t\tArrayList<Tile> list = new ArrayList<>();\n for (int i=0; i<this.size(); i++) {\n\t\t\t\tif (this.get(i).getColour() == 'J') {\n\t\t\t\t\tTile joker = this.remove(this.get(i));\n\t\t\t\t\tlist.add(joker);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (Tile j : list) {\n\t\t\t\tthis.addInSort(j);\n\t\t\t}\n }*/\n \n\n //may need something in here to accomodate a joker changing its form\n\n if (tiles.size() > 1) { //will only sort a meld with any tiles in it\n //Override default comparator to compare by tile value (ints)\n Collections.sort(tiles, new Comparator<Tile>() {\n @Override \n public int compare(Tile t1, Tile t2) { \n if (t1.getColour() > t2.getColour()) {\n return 1;\n } else if (t1.getColour() < t2.getColour()) {\n return -1;\n }\n if (t1.getValue() > t2.getValue()) {\n return 1;\n } else if (t1.getValue() < t2.getValue()) {\n return -1;\n } else {\n return 0;\n }\n }\n });\n }\n\n }", "static void quickSort(int[] arr, int left, int right){\n int position = partition(arr, left, right);\n if(left<position){\n quickSort(arr,left,position);\n }\n if(position+1<right){\n quickSort(arr,position+1,right);\n }\n }", "private static void sort(long[] list) {\n\t\tint start = 0, limit = list.length;\n\t\t\n\t\tlong temp;\n\t\tint current;\n\t\tint lowestindex;\n\n\t\twhile (start < limit) {\n\t\t\tlowestindex = start;\n\t\t\tfor (current = start; current < limit; current++)\n\t\t\t\tif (list[current] < list[lowestindex])\n\t\t\t\t\tlowestindex = current;\n\t\t\t//swap\n\t\t\ttemp = list[start];\n\t\t\tlist[start] = list[lowestindex];\n\t\t\tlist[lowestindex] = temp;\n\t\t\tstart++;\n\t\t}\n\t}", "public interface QuickSort<A> {\r\n\t\r\n\tpublic void sort(A list, PivotPositions pivot) throws UnsupportedPivotException;\r\n\t\r\n\t/**\r\n\t * These values represents all possible pivots.\r\n\t * @author Robin\r\n\t *\r\n\t */\r\n\tpublic static enum PivotPositions {\r\n\t\tFIRST, RANDOM, MIDDLE;\r\n\r\n\t\t@Override\r\n\t\tpublic String toString() {\r\n\t\t\tString s = \"\";\r\n\t\t\tswitch (this) {\r\n\t\t\tcase FIRST:\r\n\t\t\t\ts = \"first\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase RANDOM:\r\n\t\t\t\ts = \"random\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase MIDDLE:\r\n\t\t\t\ts = \"middle\";\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn s;\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t * Class for generating unsupported pivot exceptions. This\r\n\t * exception is thrown if the input cannot be interpreted as a pivot.\r\n\t * \r\n\t * @author Robin\r\n\t *\r\n\t */\r\n\tpublic static class UnsupportedPivotException extends Exception {\r\n\t\t/**\r\n\t\t * \r\n\t\t */\r\n\t\tprivate static final long serialVersionUID = 853436763252048434L;\r\n\t\tprivate final PivotPositions pivot;\r\n\r\n\t\tpublic UnsupportedPivotException(PivotPositions pivot) {\r\n\t\t\tthis.pivot = pivot;\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic void printStackTrace() {\r\n\t\t\tSystem.out.println(pivot);\r\n\t\t}\r\n\t}\r\n}", "public void selectionSort(ArrayList <Comparable> list){\r\n\t\tsteps += 2;\r\n\t\tfor (int i = list.size() - 1; i >= 0; i--){\r\n\t\t\tsteps ++;\r\n\t\t\tint biggest = 0; \r\n\t\t\tsteps += 2;\r\n\t\t\tfor (int j = 0; j < i; j++){\r\n\t\t\t\tsteps += 4;\r\n\t\t\t\tif (list.get(j).compareTo(list.get(biggest)) > 0){\r\n\t\t\t\t\tsteps ++;\r\n\t\t\t\t\tbiggest = j;\r\n\t\t\t\t}\r\n\t\t\t\tsteps += 2;\r\n\t\t\t}\r\n\t\t\tsteps += 5;\r\n\t\t\tswap(list, i, biggest);\r\n\t\t\tsteps += 2;\r\n\t\t}\r\n\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Selection Sort\");\r\n\t\tSystem.out.println();\r\n\t}", "public int[] quicksort(int A[], int izq, int der) {\r\n\r\n\t\t int piv=A[izq]; // tomamos el primer elemento como pivote\r\n\t\t int i=izq; // i realiza la búsqueda de izquierda a derecha\r\n\t\t int j=der; // j realiza la búsqueda de derecha a izquierda\r\n\t\t int aux;\r\n\t\t \r\n\t\t while(i<j){ // mientras no se crucen...\r\n\t\t while(A[i]<=piv && i<j) i++; // busca un elemento mayor que pivote,\r\n\t\t while(A[j]>piv) j--; // busca un elemento menor que pivote,\r\n\t\t if (i<j) { // si los encuentra y no se han cruzado... \r\n\t\t aux= A[i]; // los intercambia.\r\n\t\t A[i]=A[j];\r\n\t\t A[j]=aux;\r\n\t\t }\r\n\t\t }\r\n\t\t A[izq]=A[j]; // colocamos el pivote en su lugar de la forma [menores][pivote][mayores]\r\n\t\t A[j]=piv; \r\n\t\t if(izq<j-1)\r\n\t\t quicksort(A,izq,j-1); // ordenamos mitad izquierda\r\n\t\t if(j+1 <der)\r\n\t\t quicksort(A,j+1,der); // ordenamos mitad derecha\r\n\t\t \r\n\t return A;\r\n\t\t\t }", "public static int quickSortInAscendingOrder(int[] array, int start, int end) {\n\n int pivot = array[start];\n int index1 = start;\n int index2 = end;\n\n while (index1 < index2) {\n while (index1 < index2 && array[--index2] >= pivot);\n if (index1 < index2) {\n array[index1] = array[index2];\n }\n\n while (index1 < index2 && array[++index1] <= pivot);\n\n if (index1 < index2) {\n array[index2] = array[index1];\n }\n }\n\n array[index2] = pivot;\n return index2;\n }", "static void quickSort (double a[], int lo, int hi){\n int i=lo, j=hi;\r\n\t\tdouble h;\r\n double pivot=a[lo];\r\n\r\n // pembagian\r\n do{\r\n while (a[i]<pivot) i++;\r\n while (a[j]>pivot) j--;\r\n if (i<=j)\r\n {\r\n h=a[i]; a[i]=a[j]; a[j]=h;//tukar\r\n i++; j--;\r\n }\r\n } while (i<=j);\r\n\r\n // pengurutan\r\n if (lo<j) quickSort(a, lo, j);\r\n if (i<hi) quickSort(a, i, hi);\r\n }", "public void selectionSort()\r\n {\r\n for(int x = 0; x < numItems; x++)\r\n {\r\n int smallestLoc = x;\r\n for(int y = x+1; y<numItems; y++)\r\n {\r\n if(mArray[y]< mArray[smallestLoc])\r\n {\r\n smallestLoc = y;\r\n }\r\n }\r\n int temp = mArray[x];\r\n mArray[x] = mArray[smallestLoc];\r\n mArray[smallestLoc] = temp;\r\n }\r\n }", "public void quicksort(ArrayList<Node> array, int low, int high)\n {\n Node pivot = new Node(array.get(low).element);\n //Start value for pivot index\n int pivotIndex = low;\n //Define index in list where values start being higher than the pivot \n int higherThan = -1;\n //Begin the for loop after the first element\n for (int i = low + 1; i <= high; i++)\n \n { int gap = Math.abs(pivotIndex - i);\n if (array.get(i).element.compareTo(pivot.element) <= 0 && gap == 1)\n { switchPosition(i,pivotIndex);\n pivotIndex = i;\n }\n else if (array.get(i).element.compareTo(pivot.element) <= 0 && gap > 1)\n { //higherThan = i;\n switchPosition(i, pivotIndex);\n int temp = i;\n i = pivotIndex;\n pivotIndex = temp;\n switchPosition(i+1, pivotIndex); \n pivotIndex = i+1;\n //i++;\n //pivotIndex = higherThan;\n //higherThan++;\n }\n else // (array.get(i).element.compareTo(pivot.element) > 0 )\n { //Do nothing, element should stay in its position greater than the pivot\n }\n \n }\n System.out.println(\"Pivot index: \" + pivotIndex + \"\\n\");\n for (int i = 0; i < array.size(); i++)\n {\n System.out.println(\" \" + array.get(i).element.toString());\n }\n if ((pivotIndex - 1) >= 1)\n { quicksort(array, 0, pivotIndex - 1);\n System.out.println(\"\\n low index call, pivot element \" + array.get(pivotIndex).element.toString());\n }\n if ((high - pivotIndex) >= 1)\n {\n quicksort(array, pivotIndex + 1, high-1); \n }\n }", "public String[][] quickSort(String[][] arr, int inicio, int fim, int requiredData) { // Função que realiza\r\n\t\tif (requiredData != 4) {\r\n\t\t\tif (inicio < fim) {\r\n\t\t\t\tint pivo;\r\n\t\t\t\tpivo = Integer.parseInt(arr[fim][requiredData]); // Pivo ser� o ultimo de cada galho\r\n\r\n\t\t\t\tint i = (inicio - 1);\r\n\t\t\t\tfor (int j = inicio; j <= fim - 1; j++) {\r\n\r\n\t\t\t\t\tif (Integer.parseInt(arr[j][requiredData]) < pivo) {\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\tString[] aux = arr[i];\r\n\t\t\t\t\t\tarr[i] = arr[j];\r\n\t\t\t\t\t\tarr[j] = aux;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tString[] aux = arr[i + 1];\r\n\t\t\t\tarr[i + 1] = arr[fim];\r\n\t\t\t\tarr[fim] = aux;\r\n\t\t\t\tint piAux = i + 1;\r\n\r\n\t\t\t\t// Funcao recursiva para cada ramo da arvore\r\n\t\t\t\tquickSort(arr, inicio, piAux - 1, requiredData);\r\n\t\t\t\tquickSort(arr, piAux + 1, fim, requiredData);\r\n\t\t\t\treturn arr;\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tCollator collator = Collator.getInstance();\r\n\t\t\tcollator.setStrength(Collator.NO_DECOMPOSITION);\r\n\t\t\tif (inicio < fim) {\r\n\t\t\t\tString pivo = arr[fim][requiredData];\r\n\r\n\t\t\t\tint i = (inicio - 1);\r\n\t\t\t\tfor (int j = inicio; j <= fim - 1; j++) {\r\n\r\n\t\t\t\t\tif (collator.compare(pivo, arr[j][requiredData]) > 0) {\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\tString[] aux = arr[i];\r\n\t\t\t\t\t\tarr[i] = arr[j];\r\n\t\t\t\t\t\tarr[j] = aux;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tString[] aux = arr[i + 1];\r\n\t\t\t\tarr[i + 1] = arr[fim];\r\n\t\t\t\tarr[fim] = aux;\r\n\t\t\t\tint piAux = i + 1;\r\n\r\n\t\t\t\t// Funcao recursiva para cada ramo da arvore\r\n\t\t\t\tquickSort(arr, inicio, piAux - 1, requiredData);\r\n\t\t\t\tquickSort(arr, piAux + 1, fim, requiredData);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn arr;\r\n\t}", "public static void quickSort(int[] a, int levy, int pravy) {\n if (levy < pravy) {\n int pom;\n int m = levy;\n for (int i = levy + 1; i <= pravy; i++) {\n if (a[i] < a[levy]) {\n m++;\n pom = a[i];\n a[i] = a[m];\n a[m] = pom;\n }\n }\n pom = a[levy];\n a[levy] = a[m];\n a[m] = pom;\n quickSort(a, levy, m - 1);\n quickSort(a, m + 1, pravy);\n }\n }", "private void quicksort(int low, int high) {\r\n\t\tint i = low, j = high;\r\n\t\t// Get the pivot element from the middle of the list\r\n\t\tint pivot = mutualNum[low + (high-low)/2];\r\n\t\t// Divide into two lists\r\n\t\twhile (i <= j) {\r\n\t\t\twhile (mutualNum[i] > pivot) {\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\twhile (mutualNum[j] < pivot) {\r\n\t\t\t\tj--;\r\n\t\t\t}\r\n\t\t\tif (i <= j) {\r\n\t\t\t\texchange(i, j);\r\n\t\t\t\ti++;\r\n\t\t\t\tj--;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Recursion\r\n\t\tif (low < j)\r\n\t\t\tquicksort(low, j);\r\n\t\tif (i < high)\r\n\t\t\tquicksort(i, high);\r\n\t}", "public void sort() {\n }", "public void quickSortIter(){\n int pivot = 0;\n int partition;\n boolean unordered = false;\n do {\n unordered = false;\n partition = pivot;\n for (int i = pivot + 1; i < array.length; i++) {\n if (((Comparable) array[pivot]).compareTo(array[i]) >= 0) {\n if (i - partition > 1) {\n T temp = array[i];\n array[i] = array[partition];\n array[partition] = temp;\n partition++;\n unordered = true;\n } else {\n partition++;\n unordered = true;\n }\n }\n }\n T temp = array[partition];\n array[partition] = array[pivot];\n array[pivot] = temp;\n if (partition < array.length) {\n pivot = partition + 1;\n for (int i = 0; i < partition; i++) {\n if (((Comparable) array[i]).compareTo(array[i + 1]) > 0) {\n pivot = i;\n break;\n }\n }\n }\n } while (unordered);\n\n }", "private void sort()\n {\n // This implements Shell sort.\n // Unfortunately we cannot use the sorting functions from the library\n // (e.g. java.util.Arrays.sort), since the ones that work on int\n // arrays do not accept a comparison function, but only allow\n // sorting into natural order.\n int jump = length;\n boolean done;\n \n while( jump>1 ){\n jump /= 2;\n \n do {\n done = true;\n \n for( int j = 0; j<(length-jump); j++ ){\n int i = j + jump;\n \n if( !areCorrectlyOrdered( indices[j], indices[i] ) ){\n // Things are in the wrong order, swap them and step back.\n int tmp = indices[i];\n indices[i] = indices[j];\n indices[j] = tmp;\n done = false;\n }\n }\n } while( !done );\n }\n \n // TODO: integrate this with the stuff above.\n for( int i=1; i<length; i++ ){\n commonality[i] = commonLength( indices[i-1], indices[i] );\n }\n commonality[0] = -1;\n }", "static void sort(int vec[], int low, int high) {\n\t\tif (low < high) {\n\t\t\t/* pi esta particionando indices, arr[pi] is now at right place */\n\t\t\tint pi = particion(vec, low, high);\n\t\t\t// Recursivamente ordena elementos antes de\n\t\t\t// la partición y despues de la partición\n\t\t\tsort(vec, low, pi - 1);\n\t\t\tsort(vec, pi + 1, high);\n\t\t}\n\t}" ]
[ "0.63380766", "0.6053602", "0.58875495", "0.57157916", "0.57045585", "0.57000005", "0.5600499", "0.55475783", "0.55318886", "0.5499393", "0.5476292", "0.54700536", "0.5459385", "0.54440564", "0.5428711", "0.5426669", "0.5426162", "0.5409121", "0.5404561", "0.5393202", "0.5368761", "0.5365484", "0.535006", "0.53095007", "0.5308419", "0.52977985", "0.5288295", "0.5278873", "0.5267254", "0.5248448", "0.52464813", "0.5233383", "0.52321583", "0.52313673", "0.52254426", "0.5222544", "0.5214088", "0.51910824", "0.51877", "0.5184524", "0.5150563", "0.51503724", "0.51445884", "0.51388925", "0.5129572", "0.5119669", "0.5112862", "0.5107595", "0.5107372", "0.5106127", "0.51028925", "0.51019806", "0.5091591", "0.5088546", "0.50843763", "0.50818413", "0.5076345", "0.5074007", "0.50664014", "0.5065188", "0.5063375", "0.5062516", "0.5058485", "0.50511634", "0.50499594", "0.50453836", "0.50441396", "0.5043402", "0.5037855", "0.50310683", "0.502088", "0.5016587", "0.5016587", "0.50126123", "0.5011125", "0.49885663", "0.49882227", "0.49880373", "0.498577", "0.49765444", "0.4975664", "0.49752706", "0.4973865", "0.49723887", "0.4969903", "0.49621612", "0.4961963", "0.4961195", "0.49533308", "0.4949596", "0.49495924", "0.49471384", "0.4943151", "0.4941031", "0.49352187", "0.4934673", "0.49320993", "0.49316514", "0.49307442", "0.49229833" ]
0.571422
4
Called just before this Command runs the first time
@Override protected void initialize() { Robot.collector.open(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void preRun() {\n super.preRun();\n }", "protected void preRun() {\r\n\t\tthis.preparePairs();\r\n\t}", "@Override\n public void beforeFirstLogic() {\n }", "public void prePerform() {\n // nothing to do by default\n }", "protected void onFirstUse() {}", "@Override\n\t\t\tprotected void onPreExecute()\n\t\t\t{\n\n\t\t\t}", "@Override\n public void beforeStart() {\n \n }", "protected void initialize() {\n\t\tRobot.firstAutonomousCommandDone = true;\n\t}", "@Override\n\t\t\t\tprotected void onPreExecute()\n\t\t\t\t{\n\t\t\t\t\tsuper.onPreExecute();\n\t\t\t\t}", "public void preExecution() throws CommandListenerException;", "public void initDefaultCommand() {\n\t\t// Don't do anything\n }", "@Override\n\t\tprotected void onPreExecute() {\n\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}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "protected void onFirstTimeLaunched() {\n }", "@Override\n\t\t\tprotected void onPreExecute() {\n\t\t\t\tsuper.onPreExecute();\n\t\t\t}", "@Override\n\t\t\tprotected void onPreExecute() {\n\t\t\t\tsuper.onPreExecute();\n\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\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}", "protected void runBeforeStep() {}", "@Override\n protected void onPreExecute() {\n\n }", "@Override\n protected void onPreExecute() {\n\n }", "@Override\n protected void onPreExecute() {\n\n }", "@Override\n protected void onPreExecute() {\n\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\r\n\t\tprotected void onPreExecute() {\n\t\t}", "@Override\r\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\r\n\r\n\t\t}", "@Override\n protected void onStart() {\n checkUserStatus();\n\n super.onStart();\n }", "void PrepareRun() {\n }", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t}", "@Override\n\t\tprotected void onPreExecute() \n\t\t{\n\t\t}", "@Override\r\n\t\t\tprotected void onPreExecute() {\n\t\t\t\tsuper.onPreExecute();\r\n\t\t\t}", "public void autonomousInit() {\n if (autonomousCommand != null) autonomousCommand.start();\n }", "protected void onPreExecute() {\n\t\t}", "@Override\n protected void onStart() {\n checkUserStatus();\n super.onStart();\n }", "protected void initDefaultCommand() {\n \t\t\n \t}", "@Override\n protected void onPreExecute() {\n }", "@Override\n protected void onPreExecute() {\n }", "@Override\n protected void onPreExecute() {\n }", "@Override\n protected void onPreExecute() {\n }", "@Override\n protected void onPreExecute() {\n }", "@Override\n\t protected void onPreExecute() {\n\t }", "public void initDefaultCommand() {\n \n }", "@Override\n\t\t\t\t\tprotected void onPreExecute() {\n\t\t\t\t\t\tsuper.onPreExecute();\n\t\t\t\t\t}", "public void autonomousInit() {\n\t\tautonomousCommand.start();\r\n\t}", "@Override\n\t\t\t\t\tpublic void onStart() {\n\n\t\t\t\t\t}", "@Override\r\n\tprotected void doPre() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void onPreExecute() {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tprotected void initDefaultCommand() {\n\t\t\r\n\t}", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "protected abstract void preRun();", "@Override\n public void initDefaultCommand() {\n\n }", "private Command() {\n initFields();\n }", "public void initDefaultCommand() {\n \n }", "@RequiresApi(api = Build.VERSION_CODES.N)\n public void StartInitial() {\n model.StartInitial();\n\n // Add any code required\n\n }", "public void onStart() {\n /* do nothing - stub */\n }", "@Override\n protected void startUp() {\n }", "@Override\r\n\tprotected void onPreExecute() {\n\t}", "@Override\n public void initDefaultCommand() \n {\n }", "@Override\n protected void onPreExecute()\n {\n super.onPreExecute();\n }", "@Override\n protected void onPreExecute() {\n\n super.onPreExecute();\n\n }", "@Override\r\n protected void onPreExecute() {\n super.onPreExecute();\r\n }", "@Override\r\n\tpublic void preCheck(CheckCommand checkCommand) throws Exception {\n\r\n\t}", "public void preInstallHook() {\n }", "public void startup() {\n neutral();\n }", "public void initDefaultCommand() {\n\t}", "@Override\n\tprotected void onPreExecute() {\n\t\tsuper.onPreExecute();\n\t}", "@Override\n\tprotected void onPreExecute() {\n\t\tsuper.onPreExecute();\n\t}", "@Override\n\tprotected void onPreExecute() {\n\t\tsuper.onPreExecute();\n\t}", "@Override\n\tprotected void onPreExecute() {\n\t\tsuper.onPreExecute();\n\n\t}", "@Override\n\tprotected void onPreExecute() {\n\t\tsuper.onPreExecute();\n\n\t}", "public void onStart() {\n super.onStart();\n getStockVerification();\n }", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}", "@Override\n public void onStart() {\n \n }", "@Override\n public void onStart() {\n \n }", "@Override\n public void preStart() {\n Reaper.watchWithDefaultReaper(this);\n }" ]
[ "0.7113986", "0.6542487", "0.64347786", "0.6433418", "0.64082474", "0.6353506", "0.6309701", "0.62537354", "0.62473047", "0.62407833", "0.6167777", "0.6163407", "0.6129232", "0.6129232", "0.6129232", "0.6129232", "0.6129232", "0.61080366", "0.608483", "0.608483", "0.60805327", "0.60805327", "0.6068528", "0.60680324", "0.60680324", "0.60680324", "0.60680324", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.60580724", "0.6044969", "0.6041834", "0.603989", "0.6035691", "0.60305667", "0.60298306", "0.6012218", "0.60053056", "0.6002687", "0.59965384", "0.59901303", "0.5988611", "0.5988611", "0.5988611", "0.5988611", "0.5988611", "0.5977599", "0.59622574", "0.5961238", "0.59496737", "0.59461665", "0.59449667", "0.5909627", "0.5907129", "0.59067136", "0.59067136", "0.59067136", "0.59067136", "0.59067136", "0.59067136", "0.59067136", "0.59065974", "0.5906112", "0.5902859", "0.5901146", "0.5892453", "0.58864474", "0.5884274", "0.58823276", "0.58756584", "0.5870505", "0.5860054", "0.5857494", "0.58513945", "0.5844433", "0.58421814", "0.5840623", "0.5837147", "0.5837147", "0.5837147", "0.58352405", "0.58352405", "0.5834613", "0.58340293", "0.58340293", "0.58284307", "0.58284307", "0.58276254" ]
0.0
-1
Make this return true when this Command no longer needs to run execute()
@Override protected boolean isFinished() { return Robot.collector.isOpen(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean execute() {\n return false;\n }", "@Override\n public boolean execute() {\n return false;\n }", "public boolean execute(){\n return false;\n }", "@Override\n\tpublic boolean Unexecute() \n\t{\n\t\treturn false;\n\t}", "protected boolean onExecute(String command)\n {\n return false;\n }", "@Override\n\tpublic boolean execute() {\n\t\treturn false;\n\t}", "@Override\n\t\tpublic boolean shouldContinueExecuting() {\n\t\t\treturn false;\n\t\t}", "public boolean shouldExecute() {\n\t\treturn true;\n\t}", "protected void execute() {\n \t// literally still do nothing\n }", "@Override\n public boolean canExecute() {\n return true;\n }", "protected void execute() {\n finished = true;\n }", "@Override\r\n\tpublic void unexecute() {\n\t\t\r\n\t}", "public Command() {\n this.executed = false;\n }", "@Override\n public void stopExecute() {\n\n }", "public boolean shouldExecute()\n {\n if (this.runDelay <= 0)\n {\n if (!this.theRaider.world.getGameRules().getBoolean(\"mobGriefing\"))\n {\n return false;\n }\n\n this.currentTask = -1;\n this.wantsToReapStuff = true;\n }\n\n return super.shouldExecute();\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n public void execute() {\n if(!manipulatorController.getRawButton(button)){\n shooter.shooterMotorsOff();\n hopper.hopperMotorOff();\n isDone = true;\n end(false);\n }\n\n }", "public void unExecute()\n\t{\n\t}", "@Override\r\n protected boolean isFinished() {\n return false;\r\n }", "@Override\r\n public void executeCommand() {\r\n shell.stopRunning();\r\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished()\n {\n return false;\n }", "@Override\r\n\tprotected boolean isFinished() {\r\n\t\treturn false;\r\n\t}", "@Override\r\n\tprotected boolean isFinished() {\r\n\t\treturn false;\r\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\t\t\n\t}", "@Override\n protected boolean isFinished() \n {\n return false;\n }", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn false;\r\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n boolean isFinished() {\n return false;\n }", "public boolean shouldContinueExecuting() {\n return (this.shouldExecute() || !this.entity.getNavigator().noPath()) && this.isBowInMainhand();\n }", "protected boolean isFinished() {\r\n return false;\r\n }", "protected boolean isFinished() {\r\n return false;\r\n }", "public boolean shouldExecute() {\n return this.goalOwner.getTeam() == null ? false : super.shouldExecute();\n }", "public void prepareExecuteNoSelect() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareExecuteNoSelect();\n }", "protected void waitUntilCommandFinished() {\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "@Override\n\tprotected boolean isFinished()\n\t{\n\t\treturn false;\n\t}", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "protected void executionSuccess() {\n this.isUndoable = true;\n }", "protected boolean isFinished() {\n return false;\n \n }", "boolean redoLastCommand() throws Exception;", "@Override\n public boolean isFinished() {\n return false;\n }", "public boolean shouldContinueExecuting() {\n return this.currentTask >= 0 && super.shouldContinueExecuting();\n }", "@Override\r\n public void execute()\r\n {\r\n printInvalidCommandMessage();\r\n }" ]
[ "0.77345294", "0.77345294", "0.7678753", "0.76457655", "0.75966", "0.7554271", "0.6877811", "0.6748956", "0.6728847", "0.66855806", "0.65891784", "0.65624696", "0.64980483", "0.63857424", "0.63736373", "0.6356819", "0.6356819", "0.63498974", "0.63401324", "0.63290936", "0.63238996", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.63158405", "0.63097465", "0.63097465", "0.62977403", "0.62754494", "0.62744504", "0.62744504", "0.62499565", "0.62499565", "0.62499565", "0.62499565", "0.62499565", "0.62499565", "0.62499565", "0.62499565", "0.62499565", "0.6211897", "0.62113553", "0.62087166", "0.62087166", "0.62084436", "0.6203807", "0.619581", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.61709535", "0.61614436", "0.61614436", "0.61614436", "0.61614436", "0.61614436", "0.6158993", "0.61529076", "0.61481965", "0.6146213", "0.6145282", "0.6143307" ]
0.0
-1
method to open browser with practo.com website
public static void openBrowser() { driver = DriverSetup.getWebDriver(ReadPropertiesFile.getBrowser()); driver.get(ReadPropertiesFile.getURL()); log.info("Opening Browser"); log.info("Practo website is launched "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void openWebpage(String url) {\n try {\n new ProcessBuilder(\"x-www-browser\", url).start();\n } catch (IOException e) {\n log.error(e.getMessage(), e);\n }\n }", "public void openUrlInBrowser(String URL) {}", "@Given(\"^Open URL in chrome browser$\")\r\n\tpublic void open_URL_in_chrome_browser() {\n\t nop.Launch(\"chrome\", \"http://automationpractice.com/index.php\");\r\n\t}", "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 }", "private void openUrl() throws IOException, URISyntaxException{\r\n if(Desktop.isDesktopSupported()){\r\n Desktop desktop = Desktop.getDesktop();\r\n desktop.browse(new URI(url));\r\n } else {\r\n Runtime runtime = Runtime.getRuntime();\r\n runtime.exec(\"xdg-open \" + url);\r\n }\r\n }", "private void openBrowser() {\r\n //http://必须有\r\n String url = urlText.getText().toString();\r\n if (!\"http\".equals(url.substring(0, 4))) {\r\n url = \"http://\" + url;\r\n }\r\n Uri uri = Uri.parse(url);//获取网址,并转换成URI\r\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);//打开浏览器\r\n startActivity(intent);\r\n }", "@Given(\"^user should launch the browser$\")\n\tpublic void user_should_launch_the_browser() throws Throwable {\n\t\tgetUrl(\"https://adactin.com/HotelAppBuild2/\");\n\t \n\t}", "private void openWebPage(String url) {\n Uri webpage = Uri.parse(\"http://\" + url);\n Intent intent = new Intent(Intent.ACTION_VIEW, webpage);\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }", "void openUrl (String url);", "public void openURL(String url) {\r\n\t\t\r\n\t\tfinal String errMsg = \"Error attempting to launch web browser\";\r\n\t\tString osName = System.getProperty(\"os.name\");\r\n\t\ttry {\r\n\t\t\tif (osName.startsWith(\"Mac OS\")) {\r\n\t\t\t\tClass fileMgr = Class.forName(\"com.apple.eio.FileManager\");\r\n\t\t\t\tMethod openURL = fileMgr.getDeclaredMethod(\"openURL\",\r\n\t\t\t\t\t\tnew Class[] {String.class});\r\n\t\t\t\topenURL.invoke(null, new Object[] {url});\r\n\t\t\t}\r\n\t\t\telse if (osName.startsWith(\"Windows\"))\r\n\t\t\t\tRuntime.getRuntime().exec(\"rundll32 url.dll,FileProtocolHandler \" + url);\r\n\t\t\telse { //assume Unix or Linux\r\n\t\t\t\tString[] browsers = {\r\n\t\t\t\t\t\t\"firefox\", \"opera\", \"konqueror\", \"epiphany\", \"mozilla\", \"netscape\" };\r\n\t\t\t\tString browser = null;\r\n\t\t\t\tfor (int count = 0; count < browsers.length && browser == null; count++)\r\n\t\t\t\t\tif (Runtime.getRuntime().exec(\r\n\t\t\t\t\t\t\tnew String[] {\"which\", browsers[count]}).waitFor() == 0)\r\n\t\t\t\t\t\tbrowser = browsers[count];\r\n\t\t\t\tif (browser == null)\r\n\t\t\t\t\tthrow new Exception(\"Could not find web browser\");\r\n\t\t\t\telse\r\n\t\t\t\t\tRuntime.getRuntime().exec(new String[] {browser, url});\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n//\t\t\tJOptionPane.showMessageDialog(null, errMsg + \":\\n\" + e.getLocalizedMessage());\r\n\t\t\tAboutDialog dlgSupport = new AboutDialog(actController.getUIInstance(), \"Support\", \t\"<html> Couldn't find web browser!\"+ \r\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\"<br> Please start your browser and type in the following URL:\"+\r\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\"<br> www.battleship.bymaxe.de</html>\");\r\n\t\t}\r\n\t}", "private void openURL() {\n webview.loadUrl(\"http://192.168.0.116/webvitool/view/webvitool.php\");\n webview.requestFocus();\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}", "private void openWebPage(String url) {\n Uri webpage = Uri.parse(url);\n Intent intent = new Intent(Intent.ACTION_VIEW, webpage);\n if (intent.resolveActivity(getActivity().getPackageManager()) != null) {\n startActivity(intent);\n }\n }", "public static void goTo() {\n Browser.driver.get(\"https://www.abv.bg/\");\n Browser.driver.manage().window().maximize();\n }", "public void openBrowser(View view){\n String url = (String)view.getTag();\n\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_VIEW);\n intent.addCategory(Intent.CATEGORY_BROWSABLE);\n\n //pass the url to intent data\n intent.setData(Uri.parse(url));\n\n startActivity(intent);\n }", "public void openUrl(String url) {\n driver.get(url);\n }", "public void open(){\n driver.get(\"https://demoqa.com/slider\");\n }", "public static void main(String[] args) {\n WebDriverManager.chromedriver().setup();\n\n // create object for using selenium driver;\n WebDriver driver=new ChromeDriver();\n\n //open browser\n driver.get(\"http://amazon.com\");// bumu exlaydu\n //driver.get(\"http://google.com\");\n // open website\n System.out.println(driver.getTitle());\n\n\n\n\n }", "protected void openWebPage() {\n\t\tEseoTest.driver.get(Configuration.getString(\"website_address\"));\n\t\t//Assert.assertEquals(\"Web page title does not appear correct.\", Configuration.getString(\"login_title\"),\n\t\t\t//\tEseoTest.driver.getTitle());\t\t\n\t\tAssert.assertEquals(\"Browser title bar does not appear correct.\",Configuration.getString(\"homepage_title\"),EseoTest.driver.getTitle());\n\t\tAssert.assertEquals(\"Site title does not appear correct.\",Configuration.getString(\"blog_title\"),EseoTest.driver.findElement(By.tagName(\"h1\")).getText());\n\t\tAssert.assertEquals(\"Site description does not appear correct.\",Configuration.getString(\"blog_description\"),EseoTest.driver.findElement(By.tagName(\"p\")).getText());\n\t\tAssert.assertTrue(\"Log in item does not appear correct.\",EseoTest.driver.findElement(By.linkText(Configuration.getString(\"mainmenu_login_item\"))).isDisplayed());\n\t}", "public void openBrowser(Context context, String url) {\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n context.startActivity(i);\n }", "public void openWebPage(String url) {\n Intent intent= new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n startActivity(intent);\n }", "public void openBrowser(String url) {\n System.setProperty(\"webdriver.chrome.driver\", \"c:\\\\webdriver\\\\chromedriver.exe\");\n driver = new ChromeDriver();\n driver.manage().window().maximize();\n// int timeout = Integer.parseInt(ApplicationConfig.readConfigProperties(\"config-week17project.properties\", \"timeout\"));\n int timeout = Integer.parseInt(testData.timeout);\n driver.manage().timeouts().pageLoadTimeout(timeout, TimeUnit.SECONDS);\n driver.get(url);\n }", "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 void openSite(View view) {\n Intent toView = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://www.google.com\"));\n startActivity(toView);\n }", "public static void openBrowser() {\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n // === Google Chrome Browsers === //\n CHOSEN_BROWSER = CHROME;\n driver.manage().window().maximize();\n }", "@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}", "void openInAppBrowser(String url, String title, String subtitle, int errorMsg);", "@Given(\"^I go to \\\"([^\\\"]*)\\\" on \\\"([^\\\"]*)\\\"$\") \n\tpublic void openWebPage(String url, String browser){\n\t\tString result = selenium.openBrowser(browser);\n\t\tAssert.assertEquals(selenium.result_pass, result);\n\t\tString result2 = selenium.navigate(url);\n\t\tAssert.assertEquals(selenium.result_pass, result2);\n\t}", "private void toUrl(String url){\n Uri uriUrl = Uri.parse(url);\n Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);\n startActivity(launchBrowser);\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}", "private void openBrowser(String Url) {\n \tif (Url != null && Url.trim().length()>0) {\n \t\tUri uri = Uri.parse(Url);\n \tIntent i = new Intent(Intent.ACTION_VIEW, uri);\n \tstartActivity(i);\n \t} \t\n }", "private void openPage(String address)\n {\n String os = System.getProperty(\"os.name\").toLowerCase();\n \n if(os.contains(\"win\"))\n {\n if(Desktop.isDesktopSupported())\n {\n Desktop desktop = Desktop.getDesktop();\n if(desktop.isSupported(Desktop.Action.BROWSE))\n {\n try { desktop.browse(new URI(address)); }\n\n catch(IOException | URISyntaxException e)\n {\n JOptionPane.showMessageDialog(null, \"Could not open page\");\n }\n }\n }\n }\n \n else \n JOptionPane.showMessageDialog(null, \"Cannot open page, system is not supported\");\n }", "@Test\n\tpublic void start() {\n\t\t\n\t\tSeleniumUtil.startDriverFirefox(\"DEV_ROBO\");\n\t\t\n\t\tSeleniumUtil.openURL(\"https://www.cadesp.fazenda.sp.gov.br/(S(aljupn5501cd5jefroucepm3))/Pages/Cadastro/Consultas/ConsultaPublica/ConsultaPublica.aspx\");\n\n\t}", "private void openUrlInBrowser(String url) {\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n url = \"http://\" + url;\n }\n // Open the browser and point it to the given url\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n startActivity(intent);\n }", "public static void openBrowser(Context context, String url) {\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\"))\n url = \"http://\" + url;\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n context.startActivity(intent);\n }", "public String openPHPTravels() {\r\n\t\tString URL = CommonProperty.getProperty(\"url\" + PropertyManager.getProperty(\"zone\").toUpperCase());\r\n\t\tLog.info(\"\");\r\n\t\tLog.info(\"Opening URL : \" + URL);\r\n\t\tdriver.navigate().to(URL);\r\n\t\tString title = driver.getTitle();\r\n\t\tLog.info(title);\r\n\t\treturn URL;\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 void openURL(Activity ctx, String url)\n {\n if (isConnected(ctx)) {\n try {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n ctx.startActivity(browserIntent);\n } catch (Exception e) {\n\n }\n } else {\n Dialogs.getInstance().simpleNoInternet(ctx);\n }\n }", "@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}", "@Given(\"^the user Opens the opencart webpage$\")\r\n\tpublic void the_user_Opens_the_opencart_webpage() throws Throwable {\n\t r.web();\r\n\t}", "public static WebDriver startBrowser() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedriver.exe\");\n\t\t\n\t\t// Create ChromeDriver object, launch Chrome browser\n\t\t WebDriver driver = new ChromeDriver();\n\t\t \n\t\t// Create ChromeDriver object, launch Chrome browser\n\t\tdriver.get(\"http://techfios.com/test/107/\");\n\t\treturn driver;\n\t}", "@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}", "@Test(priority=1)\r\n\tpublic void OpenURLA() {\r\n\t WebDriverManager.chromedriver().setup();\r\n\t\t\r\n\t driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n \r\n\t\t driver = new ChromeDriver();\r\n\t\t driver.get(\"https://www.amazon.in/\"); // Open the url in chrome browser page\r\n\t }", "public static void openURL(String url) throws Exception\r\n\t{\r\n\t\t//deleteCookies();\r\n\r\n\t\t//IronWasp Connection logic for Security Testing\r\n\t\tString browser = FilesAndFolders.getPropValue(\"driverName\");\r\n\t\tif (browser.contentEquals(\"firefoxIronWasp\"))\r\n\t\t{\r\n\t\t\tIronWasp.workflowStart();\t\r\n\t\t\t//\t\t\ttry\r\n\t\t\t//\t\t\t{\r\n\t\t\t//\t\t\t\tIronWasp.workflowStart();\t\r\n\t\t\t//\t\t\t}\r\n\t\t\t//\t\t\tcatch(ConnectException e)\r\n\t\t\t//\t\t\t{\r\n\t\t\t//\t\t\t\tReporter.log(\"IronWasp Server has not been started...Ignore this error if you don't wish to track your test flow traffic & requests for IronWasp...\",true);\r\n\t\t\t//\t\t\t}\t\t\t\r\n\t\t}\r\n\r\n\r\n\t\tSystem.out.println(\"url: \" + url);\r\n\t\tdriver.get(url);\r\n\t\tSystem.out.println(\"URL loaded successfully:\" + url);\r\n\r\n\t\t//handling ssl certification\r\n\t\ttry{\r\n\t\t\tdriver.navigate().to(\"javascript:document.getElementById('overridelink').click()\");\r\n\t\t}\r\n\t\tcatch(Exception e){}\r\n\r\n\t\twindowMax();\r\n\t\tWebCommonMethods.implicitSleep();\r\n\t}", "private void launchBrowser(URI uri) throws IOException\r\n {\r\n getDesktop().browse(uri);\r\n }", "public void open() {\n setWebDriver();\n }", "public ICurrentPage openNewWindow(String url);", "@BeforeTest //special type of testng method which alway run before.\r\n\t\t\tpublic void openBrowser() {\r\n\t\t\t\tWebDriverManager.chromedriver().setup();\r\n\t\t\t\tdriver = new ChromeDriver();\r\n\t\t\t\tdriver.get(\"https://locator.chase.com/\");\r\n\t\t\t}", "void openLinkInSystemBrowser(String url, int errorMsg);", "@Given(\"^launch the browser \\\"([^\\\"]*)\\\"$\")\n\tpublic void launch_the_browser(String url) throws Throwable {\n\t\tdriver = getDriver();\n\t\tdriver.get(url);\n\n\t}", "public static void openTrivia() { \n\t\tdriver.manage().window().setPosition(new Point(400,0));\n\t\tdriver.get(url);\n\t}", "public void showLink(String url)\n {\n try\n {\n jalview.util.BrowserLauncher.openURL(url);\n } catch (Exception ex)\n {\n JOptionPane\n .showInternalMessageDialog(\n Desktop.desktop,\n \"Unixers: Couldn't find default web browser.\"\n + \"\\nAdd the full path to your browser in Preferences.\",\n \"Web browser not found\", JOptionPane.WARNING_MESSAGE);\n\n ex.printStackTrace();\n }\n }", "public static void goTo() {\n Browser.driver.get(\"https://www.amazon.co.uk/\");\n Browser.driver.manage().window().maximize();\n }", "public void openMuseumWebsite(String url){\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n startActivity(intent);\n }", "@Given(\"^open new browser and go to \\\"([^\\\"]*)\\\"$\")\r\n\tpublic void open_new_browser_and_go_to_url(String url) {\r\n\t\tSelenium_Functions.openNewBrowserAndgotoNewUrl(driver,\r\n\t\t\t\tEnvironmentConfig.baseUrlTescoItp);\r\n\t\tlog.info(\"The user is on Tesco ITP Login page\"\r\n\t\t\t\t+ EnvironmentConfig.baseUrlTescoItp);\r\n\t\tSystem.out.println(\"The user is on Tesco ITP Login page\");\r\n\r\n\t}", "@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 void goTo() { // Navigate to home page\n\t\tBrowser.goTo(url);\n\t}", "private void goToUrl (String url) {\n Intent launchWebview = new Intent(this, ManualWebviewActivity.class);\n launchWebview.putExtra(\"url\", url);\n startActivity(launchWebview);\n }", "public void openURL(WebDriver driver, String url) {\r\n\t\tdriver.get(url);\r\n\t}", "@Given(\"^launch an chrome browser$\")\r\n\tpublic void launch_an_chrome_browser() throws Throwable {\n\t sign.url();\r\n\t\t\r\n\t}", "public static void executeBrowser() throws Exception{\n\t\tinvokeMyBrowser();\n\t}", "public static void main(String[] args) {\n\t\t System.setProperty(\"webdriver.chrome.driver\", \"D:/workspace/chromedriver\");\r\n\t\t //System.setProperty(\"webdriver.chrome.driver\", ...);\r\n\t\t \r\n\t\t System.setProperty(\"selenide.browser\", \"Chrome\");\r\n\t\t Configuration.browser=\"chrome\";\r\n\t\t open(\"http://google.com\");\r\n\t\t //$(By.id(\"registerLink\")).pressEnter();\r\n\t\t }", "public void openURL() throws Exception{\r\n\r\n\t try{\r\n\t driverUtil.trigger();\r\n\t reporter.reportTestStep(\"App Launch\", \"ok\", \"ok\", \"PASS\", false);\r\n\t }\r\n\t\t\r\n\tcatch(Exception e){\r\n\t\te.printStackTrace();\r\n\t}\r\n}", "public static void openWebPage(Context context, String url) {\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n context.startActivity(intent);\n }", "@Override\r\n public void doAction(ActionEvent e)\r\n {\n NetworkUtil.openURL(NetworkUtil.WEBSITE_URL);\r\n }", "@Override\n\tpublic boolean openURL(final String url) {\n\t\ttry {\n\t\t\tURI uri = new URI(url);\n\t\t\tif(Desktop.isDesktopSupported()) {\n\t\t\t\tfinal Desktop desktop = Desktop.getDesktop();\n\t\t\t\tdesktop.browse(uri);\n\t\t\t}\n\t\t\telse { //fallback if desktop API not supported\n\t\t\t\tfor (final String browser : BROWSERS) {\n\t\t\t\t\tString cmd = browser + \" \" + url;\n\t\t\t\t\tfinal Process p = Runtime.getRuntime().exec(cmd);\n\t\t\t\t\tif(p.waitFor() == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\tJOptionPane.showInputDialog(null, \"There was an error while attempting to open the system browser. \"\n\t\t\t\t\t+ \"\\nPlease copy and paste the following URL into your browser:\", url);\n\t\t\tlogger.info(\"Error opening system browser; displaying copyable link instead\");\n\t\t} catch (URISyntaxException e) {\n\t\t\tlogger.warn(\"This URI is invalid: \" + url, e);\n\t\t\treturn false;\n\t\t} catch (InterruptedException e) {\n\t\t\tlogger.warn(\"Browser process thread interrupted\");\n\t\t}\n\t\treturn true;\n\t}", "public static final void openWebpage(URI uri) {\n Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\r\n if ((desktop != null) && (desktop.isSupported(Desktop.Action.BROWSE))) {\r\n try {\r\n desktop.browse(uri);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@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}", "@Override\r\n protected URLConnection openConnection(URL url) throws IOException {\n Runtime.getRuntime().exec(\"cmd.exe /c start \" + url.toExternalForm());\r\n //Once the command has called we don't need to diasplay anything so we load a blank page.\r\n return new URL(\"about:blank\").openConnection();\r\n }", "public void openWebBrowser(String stringURL) {\r\n\t\tWebBrowser.openBrowser(stringURL);\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}", "private void openUri() {\n try {\n Desktop.getDesktop().browse(new URI(\"http://localhost:\" + Constants.DEFAULT_PORT));\n } catch (URISyntaxException | IOException e) {\n logger.error(\"MainService error [openUri]: \" + e);\n }\n }", "@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/\"));\n startActivity(browserIntent);\n }", "@Test(priority=0) \r\n\tpublic void openApplication() { \r\n\t\tdriver.get(\"https://locator.chase.com/\");\r\n\t}", "public void openApp(String Url) {\n\t\tfd = new FirefoxDriver();\r\n\t\tfd.get(Url);\r\n\t\tfd.manage().window().maximize();\r\n\t}", "@Given(\"^Open the Chrome and open google site$\")\t\t\t\t\n public void Open_the_Chrome_and_open_google_site() throws Throwable\t\t\t\t\t\t\t\n {\t\t\n \tdriver = new ChromeDriver();\n \tdriver.get(\"https://accounts.google.com/SignUp\");\n }", "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}", "public static void main(String[] args) throws MalformedURLException {\n\t\t\r\n\t\tChromeOptions chromeoptions=new ChromeOptions();\r\n\t\tWebDriver driver=new RemoteWebDriver(new URL(\"http://192.168.225.206:6878/wd/hub\"),chromeoptions);\r\n\t\t\r\n\t\tdriver.get(\"http://opensource.demo.orangehrmlive.com\");\r\n\t\tSystem.out.println(\"URL opened\");\r\n\r\n\t}", "HtmlPage clickSiteLink();", "@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 }", "public static void open(String url,WebDriver driver)\n\t{\n\t\tdriver.navigate().to(url);\n\t}", "public static void launchSite(String browser) throws AWTException, IOException, InterruptedException\n\t{\n\t\topenBrowserAndSite(browser);\n\t}", "public void getBrowser(String browser, String url) {\n\n\n if (browser.equalsIgnoreCase(\"chrome\")) {\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n } else if (browser.equalsIgnoreCase(\"firefox\")) {\n WebDriverManager.firefoxdriver().setup();\n driver = new FirefoxDriver();\n }\n driver.manage().window().maximize();\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n driver.get(url);\n\n }", "public void openWebsiteGvG(View v) {\n\t\tplayer.start();\n\t\t// Play the clicking sound\n\t\tIntent intent = new Intent(\n\t\t\t\tIntent.ACTION_VIEW,\n\t\t\t\tUri.parse(\"http://www.nieuwwest.amsterdam.nl/wonen_en/de-9-wijken-van/geuzenveld\"));\n\t\t// Create a new intent to be displayed and give it the web adress\n\t\tstartActivity(intent);\n\t\t// Start the just created intent, which opens the website in a new\n\t\t// window\n\t}", "@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}", "public static void openWebsite(Context context, String url) {\n Uri articleUri = Uri.parse(url);\n Intent websiteIntent = new Intent(Intent.ACTION_VIEW, articleUri);\n context.startActivity(websiteIntent);\n }", "@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}", "public void launch() throws IOException {\n \r\n FileInputStream fs=new FileInputStream(\"C:\\\\New folder\\\\PHPTravelers\\\\src\\\\main\\\\java\\\\file\\\\base.properties\");\r\n\t\tprop.load(fs);\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\rakshitha\\\\chromedriver.exe\"); \r\n\t\t\t\t driver = new ChromeDriver(); \r\n\t\t\t\t//driver.get(\"https://www.phptravels.net\");\r\n\t\t\t\t//System.out.println(driver.getTitle());\r\n\t\t\t\tdriver.manage().window().maximize();\r\n\t\t\t driver.manage().timeouts().implicitlyWait(5,TimeUnit.SECONDS);\r\n\t\t\t driver.get(prop.getProperty(\"url\"));\r\n\t\t\r\n\t\t\r\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}", "private void execURL(String link) {\n Uri webLink = Uri.parse(link);\n Intent openLink = new Intent(Intent.ACTION_VIEW, webLink);\n PackageManager pm = getPackageManager();\n List<ResolveInfo> handlers = pm.queryIntentActivities(openLink, 0);\n if (handlers.size() > 0)\n startActivity(openLink);\n }", "@Given(\"^Open Book My Show Website$\")\r\n\tpublic void open_Book_My_Show_Website() {\n\t\twait=new WebDriverWait(driver, 20);\r\n\t\t driver.get(\"https://in.bookmyshow.com\");\r\n\t\t uimap = new UIMap(\"src//test//resources//locators.properties\");\r\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}", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"E:\\\\chrome driver 90\\\\chromedriver_win32 (2)\\\\chromedriver.exe\");\n\t\tWebDriver driver = new ChromeDriver();\n\t\tdriver.get(\"https://demo.nopcommerce.com/\");\n\t\t\n\t\t//driver.switchTo().newWindow(WindowType.TAB); // ithu work agum but dependnces nala work agala\n\t\t//driver.switchTo().newWindow(WindowType.WINDOW);\n\t\t\n\t\tdriver.get(\"https://www.opencart.com/)\");\n\t\t\n\t\t\n\t\t\n\n\t}", "public void openHomePage() {\n\t\tlogger.info(\"Opening Home Page\");\n\t\tdriver.get(ReadPropertyFile.getConfigPropertyVal(\"homePageURL\"));\n\t\t\n\t}", "private boolean openBrowser(IProgressMonitor monitor) {\n\n monitor.subTask(\"Open index page\");\n // FIXME: port should come from the config files\n Display.getDefault().syncExec(new Runnable() {\n public void run() {\n URL url;\n try {\n url = new URL(\"http://localhost:8888\");\n IWorkbenchBrowserSupport browserSupport = WebBrowserUIPlugin\n .getInstance().getWorkbench().getBrowserSupport();\n IWebBrowser browser = browserSupport.createBrowser(\n IWorkbenchBrowserSupport.LOCATION_BAR\n | IWorkbenchBrowserSupport.NAVIGATION_BAR,\n null, null, null);\n browser.openURL(url);\n } catch (Exception e) {\n Trace.trace(Trace.SEVERE, \"Error opening browser\", e);\n }\n }\n });\n\n monitor.worked(3);\n return true;\n }", "protected void openInNewBrowser(SelectEvent event, String url)\n {\n try\n {\n BrowserOpener.browse(new URL(url));\n event.consume();\n }\n catch (Exception e)\n {\n String message = Logging.getMessage(\"generic.ExceptionAttemptingToInvokeWebBrower\", url);\n Logging.logger().warning(message);\n }\n }", "public void openHomeDepotAppln() throws Exception {\n\t\t\n\t\tString envUrl = dataHelper\n\t\t\t\t.getCommonData(CommonDataColumn.EnvironmentUrl);\n\n\t\ttry {\n\n\t\t\tdriver.manage().deleteAllCookies();\n\t\t\tdriver.get(envUrl);\n\t\t\tdriver.manage().window().maximize();\n\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t\twh.handleAlert();\n\t\t}\n\t\t\n\t\tif (isConsumerHomePage()) {\n\t\t\treport.addReportStep(\"Open browser and enter HomeDepot URL\",\n\t\t\t\t\t\"Home page displayed successfully\", StepResult.PASS);\n\t\t} else {\n\t\t\treport.addReportStep(\"Open browser and enter HomeDepot URL\",\n\t\t\t\t\t\"Home page was not displayed successfully\", StepResult.FAIL);\n\t\t}\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 launchWeb(){\n\t\t\t\n\t\t\t// STEP 2 :- Open the online shopping website.\n\t\t\tdriver.get(\"https://www.flipkart.com/\");\n\t\t\tSystem.out.println(\"Window opened successfully\");\n\t\t\t\t\n\t\t\t//STEP 3:- Close the Pop-up window.\n\t\t\tWebElement close = driver.findElement(By.xpath(\"/html/body/div[2]/div/div/button\"));\n\t\t\tclose.click();\n\t\t\tSystem.out.println(\"Pop up Window closed successfully\");\n\t\t}", "@Override\n public void onClick(View view) {\n Intent browser = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://petobesityprevention.org/\"));\n startActivity(browser);\n }" ]
[ "0.7618539", "0.7418567", "0.73231465", "0.7305593", "0.7263695", "0.72339225", "0.72089946", "0.70703626", "0.7042674", "0.7041303", "0.70101595", "0.6999222", "0.6973783", "0.6942476", "0.6936305", "0.6911404", "0.6901125", "0.6880209", "0.68795466", "0.685858", "0.6851403", "0.6849128", "0.68206066", "0.68184346", "0.68143785", "0.68109715", "0.6775548", "0.6754931", "0.6747976", "0.6747242", "0.6746382", "0.6732265", "0.67231315", "0.66948867", "0.66925174", "0.6681276", "0.66645026", "0.6651216", "0.6644542", "0.6637578", "0.6634829", "0.662946", "0.6623119", "0.66216004", "0.6603075", "0.6600058", "0.6578331", "0.6575469", "0.657212", "0.65706336", "0.6554324", "0.65409744", "0.6537824", "0.65309584", "0.6524672", "0.6514753", "0.6494902", "0.649071", "0.6488092", "0.64747304", "0.6414525", "0.641367", "0.6404246", "0.63937616", "0.6371767", "0.6369207", "0.63501674", "0.63428897", "0.6335612", "0.63341576", "0.63339347", "0.633033", "0.63220525", "0.63191515", "0.6309604", "0.6294863", "0.6291764", "0.6289954", "0.62754387", "0.6267709", "0.626685", "0.62597495", "0.62526673", "0.6245499", "0.62454873", "0.62414265", "0.6227612", "0.6221669", "0.62143165", "0.6214232", "0.6206922", "0.6205645", "0.62039316", "0.6192711", "0.61826557", "0.6182297", "0.6181286", "0.6166011", "0.6162455", "0.61623514" ]
0.7932748
0
method to close browser
public static void closeBrowser() { driver.quit(); BaseUI.logger.log(Status.INFO,ReadPropertiesFile.getBrowser()+" is closed Successfully "); report.flush(); log.info("Closing Browser \n"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void closeBrowser() {\n System.out.println(\"Browser closed\");}", "public void closeBrowser(){\n driver.quit();\n }", "public void closeBrowser(){\n\t driver.close();\n\t \t }", "public static void CloseBrowser() {\n\t\tBrowser.Driver.quit();\n\t}", "public static void browserClose() {\r\n\t// Make sure we shut everything down to avoid memory leaks\r\n\tdriver.close();\r\n\tdriver.quit();\r\n\tdriver = null;\r\n}", "public void closeBrowserSession() {\n\t\tdriver.quit();\n\t}", "public static void closeBrowser() {\n\t\tLOG.info(\"Closing current browser window.\");\n\t\tConstants.driver.close();\n\t\tLOG.info(\"Closed current browser window.\");\n\n\t}", "public static void closeBrowser(){\n if(CHOSEN_BROWSER.equals(FIREFOX)) {\n if(driver != null) {\n driver.quit();\n return;\n }\n return;\n }\n if (driver != null){\n driver.close();\n driver.quit();\n }\n }", "public void closeAllBrowser(){\r\n\tdriver.quit();\t\r\n\t}", "@Test (priority = 5)\n\t@Then(\"^Close browser$\")\n\tpublic void close_browser() throws Throwable {\n\t\t\n\t\tobjDriver.close();\n\t\tobjDriver.quit();\n\t\t\n\t}", "public void quitBrowser(){\n\t\t driver.quit();\n\t }", "public void close() {\r\n driver.quit();\r\n }", "@After\n public void closeBrowser(){\n\n browserManager.setcloseBrowser();// calling browser method to close the browser\n }", "private void close() throws Exception {\n browser.getDriver().close();\n }", "public void BrowserQuit() {\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- The Browser should be closed\");\r\n\t\ttry{\r\n\t\t\tdriver.manage().deleteAllCookies();\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\r\n\t\t\tdriver.quit();\r\n\t\t\tSystem.out.println(\"Browser Closed\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:-The Browser is closed\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- No Browser is opened currently\");\r\n\r\n\t\t}\r\n\r\n\t}", "@AfterTest\n\tpublic void closeBrowser() {\n\t\tdriver.close();\n\t}", "public static void quitBrowser() {\r\n\t\ttry {\r\n\t\t\t// Thread.sleep(3000);\r\n\t\t\tdriver.quit();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Driver instance does not exist \" + e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void closeAllBrowsers() {\n\n driver.quit();\n\n\n }", "@AfterMethod\n\tpublic void quitBrowser(){\n\t\tbrowser.closeBrowser(driver);\n\t}", "public void close() {\n if (driver.get() != null) {\n driver.get().quit();\n driver.set(null);\n }\n }", "@AfterClass\n\tpublic void closeBrowser(){\n\t\tdriver.quit();\n\t}", "public void close() {\n getCloseButton().click();\n }", "@When(\"^user should close the browsers$\")\n\tpublic void user_should_close_the_browsers() throws Throwable {\n\t\tdriver.quit();\n\t}", "public void closeWindow() {\n\t\tgetDriver().close();\n\n\t}", "public static void closeBrowser(WebDriver driver)\r\n\t{\r\n\t\tdriver.close();\r\n\t}", "@AfterClass\n public void closeBrowser() throws IOException {\n driver.quit();\n }", "public void closeDriver() {\n driver.quit();\n }", "public void close(){\r\n \tStage stage = (Stage) exit.getScene().getWindow();\r\n\t stage.close();\r\n\t main.browserInteraction.close();\r\n }", "public void close() {\n seleniumDriver.close();\n }", "public void closeWindow() throws Exception {\n\t\t\tthis.driver.close();\r\n\t\t}", "protected void closeWeb() {\n closeWeb(currentWeb());\n }", "public static void closeMe() {\n window.close();\n }", "public void close()\n {\n driver.close();\n }", "public void closeAllBrowsers() {\r\n\t\ttry {\r\n\t\t\tif (driver != null) {\r\n\t\t\t\tdriver.quit();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic void windowClosing(WebBrowserEvent arg0) {\n\t\t\t}", "public void quitBrowsers() {\n\n\t\tgetDriver().quit();\n\t}", "@AfterClass(description = \"After class: closing browser\")\n public void quitBrowser()\n {\n HTMLReport htmlReport = new HTMLReport();\n htmlReport.log(\"STARTING AfterClass\");\n htmlReport.logINFO(\"The browser is quit\");\n driver.quit();\n htmlReport.logINFO(\"The end of test reporting\");\n reports.endTest(test);\n htmlReport.logINFO(\"Saving all logs to file\");\n reports.flush();\n }", "private void closeProgram()\n {\n window.close();\n }", "public static void closeAllBrowser() {\n\t\tLOG.info(\"Closing all browser window.\");\n\t\tConstants.driver.quit();\n\t\tLOG.info(\"Closed all browser window.\");\n\t}", "public static void quit() throws Exception\r\n\t{\r\n\t\t//Close IronWasp Connection\r\n\t\tString browser = FilesAndFolders.getPropValue(\"driverName\");\r\n\t\tif (browser.contentEquals(\"firefoxIronWasp\"))\r\n\t\t{\r\n\t\t\tIronWasp.workflowEnd();\t\t\t\r\n\t\t}\r\n\r\n\t\t// Closing Browser instance\r\n\t\tdriver.quit(); \r\n\t}", "@AfterSuite (alwaysRun = true)\n public static void closeBrowser() {\n report.endTest(test);\n //line below will flush the report\n report.flush();\n\n\n //line below will open the report\n driver.get(\"C:\\\\Users\\\\zakir\\\\Documents\\\\MyMavenProject\\\\\" + reportPath);\n\n //line below will close the report\n //report.close();\n\n\n // driver.quit();\n }", "void forceClose();", "@AfterMethod\r\n\tpublic void closeapp()\r\n\t{\n\t\tdriver.quit();\r\n\t}", "@AfterSuite\n\tpublic void closeBrowser(){\n\t\t\n\t\ttry{\n\t\t\tdriver.close();\n\t\t\tThread.sleep(5000);\n\t\t\t//MailService_API.zip(System.getProperty(\"user.dir\")+\"\\\\test-output\\\\Hybrid Security Telepath Test Suite\");\n\t\t\t//MailService_API.Email(config.getProperty(\"sendTo\"), config.getProperty(\"sendCC\"), config.getProperty(\"sendBCC\"), config.getProperty(\"sendMailFrom\"), config.getProperty(\"sendMailPassword\"));\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public void close() {\n\t\tgetFrame().dispatchEvent(new WindowEvent(getFrame(), WindowEvent.WINDOW_CLOSING));\n\t\t\n\t}", "public void closeWindow() {\n\t\tdriver.close();\n\t\tdriver.switchTo().window(winHandleBefore);\n\t}", "public void exit()\r\n\t{\r\n\t\tmainFrame.exit();\r\n\t}", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close() {\r\n dispatchEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));\r\n }", "public static void close() {\n\t\tfindWindow();\n\t\t\n\t\tuser32.SendMessageA(handle, CLOSE_COMMAND, 0x00000000, 0x00000000);\n\t}", "public void closeKiosk() {\n\t\tdriver.close();\n\t}", "private void closeFrame()\n\t{\n\t\tSystem.exit(0);\n\t}", "public void quit()\r\n {\r\n brokerage.logout(this);\r\n myWindow = null;\r\n }", "public void quitDriver() {\n webDriver.quit();\n webDriver = null;\n }", "public void close()\n {\n\n window.close();\n try\n {\n screen.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }", "public void close() {\n System.exit(0);\n }", "private static void Close () {\n frame.setVisible (false);\n frame.dispose();\n System.exit(0);\n }", "void close() {\n\t\t\n\t\tthis.frame.setVisible(false);\n\t\tthis.frame.dispose();\n\t\t\n\t}", "public boolean requestCloseWindow() \n {\n return true; \n }", "public void close() {}", "public String closeBrowser(String object, String data) {\n\t\tlogger.debug(\"Checking existance of browser\");\n\t\ttry {\n\t\t\tdriver.close();\n\t\t} catch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Object doest not exist\";\n\t\t}\n\t\treturn Constants.KEYWORD_PASS;\n\t}", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();" ]
[ "0.8524229", "0.8394343", "0.8339457", "0.82482463", "0.81417084", "0.80828565", "0.80299157", "0.79668486", "0.7825666", "0.77937186", "0.7686354", "0.76724756", "0.76299936", "0.76069385", "0.7604965", "0.75798607", "0.7432492", "0.74141735", "0.7395506", "0.73435223", "0.72966456", "0.72289026", "0.7220639", "0.7155539", "0.7146443", "0.7138679", "0.71366787", "0.7110767", "0.7071007", "0.7051974", "0.7029682", "0.7019944", "0.7006047", "0.69972676", "0.6988586", "0.6961141", "0.6958079", "0.6921306", "0.6907018", "0.69016653", "0.68841785", "0.6867661", "0.68617195", "0.68477637", "0.6840956", "0.6834678", "0.68172896", "0.6809569", "0.6809569", "0.6809569", "0.6809569", "0.6809569", "0.6809569", "0.6809569", "0.6809569", "0.6809569", "0.6809569", "0.6809569", "0.6809569", "0.6809569", "0.6809569", "0.6809569", "0.6783695", "0.6777202", "0.6776491", "0.6762533", "0.6759123", "0.67535436", "0.6738556", "0.67342824", "0.6730091", "0.67280746", "0.67194974", "0.67132384", "0.6707706", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568", "0.6705568" ]
0.759474
15
adding cleanUp method for when the console based service side program is closed
public void cleanUp() { emfactory.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cleanUp(){\n\t\tSystem.out.println(\"Destroying beans cleanUp method() for triangle\");\n\t}", "@PreDestroy\r\n\tpublic void doMyCleanupStuff() {\r\n\t\tSystem.out.println(\">> TennisCoach: inside of doMyCleanupStuff()\");\r\n\t}", "public void cleanShutDown () {\n shutdown = true;\n }", "@PreDestroy\n\tpublic void doMyCleanupStfff() {\n\t\tSystem.out.println(\">> TennisCoach: inside of doMyCleanupStuff\");\n\t}", "private void cleanUp(){\n\t\tSSHUtil sSHUtil=(SSHUtil) SpringUtil.getBean(\"sSHUtil\");\n\t\ttry {\n\t\t\tsSHUtil.disconnect();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void cleanUp(){\n //Clean up the parent class, i.e. close pipes.\n super.cleanUp();\n }", "public void doMyStartupStuffDestroy() {\n System.out.println(\"destroy method\");\n }", "public void abnormalShutDown() {\n\t}", "@Override\r\n public void onCleanup() {\n }", "public void cleanup() {\r\n }", "@Override\n public void cleanup() {\n \n }", "@Override\n public void cleanup() {\n \n }", "public void cleanup() {\n endtracking();\n\n //sends data to UI\n MainActivity.trackingservicerunning = false;\n MainActivity.servicestopped();\n\n //stops\n stopSelf();\n }", "@Override\r\n public void cleanup() {\n }", "public void cleanup() {\n }", "protected void cleaningUp() {\n\t}", "protected void cleanupOnClose() {\n\t}", "@Override\n public void cleanup() {\n }", "public void cleanup() {\n\t}", "protected void handleCleanup() {\r\n\t\t// Implement in subclass\r\n\t}", "@After\r\n\tpublic void cleanup() {\n\t}", "public void cleanup()\n {\n \tsuper.cleanup();\n _channelHandler.cleanup();\n }", "@Override\r\n\tpublic void cleanup() {\n\t\t\r\n\t}", "public void shutdown() {\n\t\tInput.cleanUp();\n\t\tVAO.cleanUp();\n\t\tTexture2D.cleanUp();\n\t\tResourceLoader.cleanUp();\n\t}", "@Override\n public void cleanUp() {\n }", "@After\n public void cleanUp() {\n mApConfigFile.delete();\n }", "public void cleanup();", "public static void shutdown ()\n\t{\n\t\tif (m_interpreter != null)\n\t\t{\n\t\t\tm_console.dispose ();\n\t\t\tm_interpreter.cleanup ();\n\t\t}\n\t}", "public void cleanUp();", "public void cleanUp();", "@Override\n\tpublic void destroyProcess() {\n\t\tsuper.destroyProcess();\n\t\tDataDirRemoverHandler ddhHandler = \n\t\t\tnew DataDirRemoverHandler(getLogHandler());\n\t\tddhHandler.setRetryLimitInMillis(2000);\n\t\tddhHandler.execute();\n\t\tportsInUse.remove(port);\n\t}", "private void cleanup() {\n\t\tif (myListener!=null)\n\t\t\t_prb.removeListener(myListener);\n\t}", "@Override\n\tpublic void cleanup() {\n\t\t\n\t}", "@Override\n\tpublic void cleanup() {\n\t\t\n\t}", "@Override\n\tpublic void cleanup() {\n\t\t\n\t}", "void cleanUp();", "void cleanUp();", "void cleanUp();", "@Override\n\tpublic void cleanup() {\n\n\t}", "@Override\n\tpublic void cleanup() {\n\n\t}", "private void exit() {\n\n // Farewell message\n pOutput.println(\"Good Bye!\");\n pOutput.close();\n\n try {\n pClient.close();\n\n } catch (final IOException ex) {\n pShellService.error(\"Shell::exit()\", ex);\n }\n\n // Clean up\n pShellService = null;\n }", "@AfterMethod\n\tpublic void close(){\n\t\tquit();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tSystem.exit(0);\n\t}", "@Override\n protected void onDestroy() {\n mManager.clearLocalServices(mChannel, null);\n super.onDestroy();\n }", "@AfterAll\n\tstatic void afterAll() {\n\t\tinOut.resetSystem();\n\t}", "public void shutdown()\n {\n // todo\n }", "public void shutdown() {\r\n System.exit(0);\r\n }", "public static void cleanUp() {\n\t\tHashDecay.stopAll();\n\t\tSystem.gc();\n\t}", "@Override\n\tpublic void onDestroy() {\n\t\tshutdown();\n\t\tLog.d(tag,\"service onDestroy\");\n\t\tsuper.onDestroy();\n\t}", "@Override\n protected void shutdownService() {\n }", "@Override\n protected void performCleanup() {\n }", "public static void shutdown() {\n\t}", "@PreDestroy\n\tpublic void destroy() {\n\t\tthis.executorService.shutdown();\n\t}", "@Override\n public void shutDown() {\n }", "protected abstract void cleanup();", "@Override\n protected void shutDown() {\n }", "public void shutDown()\n {\n // Runtime.getRuntime().removeShutdownHook(shutdownListener);\n //shutdownListener.run();\n }", "@AfterClass\n public void stop() throws Exception {\n super.finalize();\n }", "void prepareForShutdown();", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tCleanup();\r\n\t}", "@Override\n\tpublic void destroy() {\n\t\tlogService=null;\n\t\tnoInterceptUrlRegxList=null;\n\n\t}", "@PreDestroy\r\n\tpublic void doMyCleaupStuff() {\r\n\t\t\r\n\t\tSystem.out.println(\"TennisCoach : -> Inside of doMyCleaupStuff()\");\r\n\t}", "@PreDestroy //code will execute before the bean is destroyed \r\n\tpublic void doMyCleanupStuff()\r\n\t{\r\n\t\tSystem.out.println(\"TennisCoach: inside doMyCleanupStuff method\");\r\n\t}", "public void cleanUp() {\r\n\t\tsuper.cleanUp() ;\r\n\t}", "public abstract void cleanUp();", "@Override\r\n\tpublic void cleanUp(Event event) {\n\t\t\r\n\t}", "@AfterClass\n public void cleanUp() {\n }", "public void cleanUp() { listener = null; }", "@Override\n protected void onDestroy() {\n stopService(collectDataService);\n super.onDestroy();\n }", "private void quitService() {\n output.println(\"Quit command\");\n output.println(\"End session\");\n }", "@AfterClass\n public static void shutdown()\n {\n }", "protected void finalize() throws Throwable {\n\t\tcleanup();\n\n\t\t//kill the scsynth\n\t\t_scsynthLauncher.killScsynth();\n\t\t\n\t\t// free the UDP port from JavaOSC\n\t\tif (_receiver != null)\n\t\t\t_receiver.close();\n\n\t}", "@Override\n public void onDestroy() {\n // Cleanup service before destruction\n mHandlerThread.quit();\n }", "public void destroy()\r\n\t{\r\n\t\tlog.fine(\"destroy\");\r\n\t}", "@PreDestroy\r\n\t@Override\r\n\tpublic void terminate()\r\n\t{\r\n\t\tthis.cleanUpDone = true;\r\n\t\tthis.isRunning = false;\r\n\t\tthis.priceMap.clear();\r\n\t\tthis.priceUpdateBlockingQueue.clear();\r\n\t\tthis.executorService.shutdownNow();\r\n\t\t\r\n\t\tif(logger.isInfoEnabled())\r\n\t\t\tlogger.info(\"Termination of price service has been completed successfully.\");\r\n\t}", "@After\n\tpublic void cleanUp() {\n\t\tsuper.unload();\n\n\t\t// shutdown the database\n\t\tif (db != null) {\n\t\t\tdb.shutDownDb();\n\t\t}\n\t\tassertTrue(Files.deleteDir(tmpDir));\n\t}", "void cleanup();", "void cleanup();", "void cleanup();", "@After\n\tpublic void teardown() {\n\t\tdrv.quit();\n\t}", "public static final void onExit() {\r\n isShutdown = true;\r\n if (instance != null) {\r\n if (instance.logBase.isInfoEnabled()) {\r\n instance.logBase.info(\"LogUtil.onExit : free singleton : \" + SingletonSupport.getSingletonLogName(instance));\r\n }\r\n\r\n // After the Log4J shutdown, Loggers are no more usable :\r\n\r\n // Release Log4J resources :\r\n Log4JCleaner.shutdown();\r\n\r\n // Classloader unload problem with commons-logging :\r\n LogFactory.release(Thread.currentThread().getContextClassLoader());\r\n // force GC :\r\n instance.log = null;\r\n instance.logBase = null;\r\n instance.logDev = null;\r\n instance.logs.clear();\r\n\r\n // free singleton :\r\n instance = null;\r\n }\r\n\r\n // clean up custom logger instances associated with eclipseLink :\r\n CommonsLoggingSessionLog.onExit();\r\n }", "private void cleanUp() {\n System.out.println(\"ConnectionHandler: ... cleaning up and exiting ...\");\n try {\n br.close();\n is.close();\n conn.close();\n log.close();\n } catch (IOException ioe) {\n System.err.println(\"ConnectionHandler:cleanup: \" + ioe.getMessage());\n }\n }", "public void doMyCleanupStuff(){\r\n System.out.println(\"TrackCoach: inside method doMyCleanupStuff\");\r\n }", "public static void shut () {\r\n if(factory != null) { \t \r\n factory.finalixe(); \r\n }\r\n factory = null ;\r\n }", "protected void finalizeSystemOut() {}", "public void shutdown(){\n\t\tAndroidSensorDataManagerSingleton.cleanup();\n\t}", "public void cleanup() {\n sendBuffer(baos);\n shutdown();\n }", "public void shutdown() {\n }", "public void shutdown() {\n YbkService.stop(ErrorDialog.this);\r\n System.runFinalizersOnExit(true);\r\n // schedule actual shutdown request on a background thread to give the service a chance to stop on the\r\n // foreground thread\r\n new Thread(new Runnable() {\r\n\r\n public void run() {\r\n try {\r\n Thread.sleep(500);\r\n } catch (InterruptedException e) {\r\n }\r\n System.exit(-1);\r\n }\r\n }).start();\r\n }", "@AfterClass(alwaysRun = true)\n\tpublic void destroy() throws Exception {\n\t\tsuper.cleanup();\n\t}", "void shutDown();", "public final void destroy()\n {\n log.info(\"PerformanceData Servlet: Done shutting down!\");\n }", "public void shutDown();", "public void cleanup()\n {\n CogTool.delayedWorkMgr.doDelayedWork(true);\n }", "public synchronized void shutdown() {\n try {\n stop();\n } catch (Exception ex) {\n }\n \n try {\n cleanup();\n } catch (Exception ex) {\n }\n }", "public void doMyCleanUpStuff() {\r\n\t\tSystem.out.println(\"TrackCoach: inside method doMyCleanUpStuff\");\r\n\t}", "@Override\n protected void cleanUp() throws AbortException {\n }", "private void cleanup() throws RemoteException {\n log.info(\"GP run complete.\");\n running = false;\n\n log.info(\"Releasing clients.\");\n for (IClient client : clients)\n client.release();\n clients.clear();\n\n writeCheckpoint(\"final_generation\");\n }", "@AfterClass\n\tpublic static void tearDownAfterClass() throws Exception {\n\t\tydelseService = null;\n\t}", "public static void exit() {\n\t\t\n\t\t//\tlog out\n\t\tlogout();\n\t\t\n\t\t//\tclean up\n\t\taccountNames.clear();\n\t\taccountsByName.clear();\n\t\tdataProvider = null;\n\t\trememberedUserNames = null;\n\t}" ]
[ "0.73289067", "0.7264795", "0.7212863", "0.7197392", "0.71673995", "0.71217126", "0.7102324", "0.70481145", "0.7036847", "0.70326847", "0.6986768", "0.6986768", "0.69711286", "0.69469905", "0.69443256", "0.69417673", "0.6932761", "0.68912256", "0.68762517", "0.6861742", "0.6857506", "0.68396723", "0.6831927", "0.6806885", "0.6791988", "0.67827904", "0.67814565", "0.6781259", "0.6770932", "0.6770932", "0.67702997", "0.67485297", "0.674356", "0.674356", "0.674356", "0.67380726", "0.67380726", "0.67380726", "0.6735119", "0.6735119", "0.67339265", "0.67133254", "0.6695506", "0.6687605", "0.6687269", "0.6684657", "0.66403484", "0.66368437", "0.66357356", "0.6621688", "0.66189367", "0.6618122", "0.6610536", "0.66023886", "0.6593124", "0.6592325", "0.6575284", "0.6573656", "0.65716255", "0.6559413", "0.6554972", "0.6554586", "0.65441066", "0.653746", "0.65344", "0.6528107", "0.652644", "0.65243083", "0.65035385", "0.6500009", "0.64882225", "0.64882183", "0.64858466", "0.64843947", "0.64678085", "0.6458052", "0.64572144", "0.64572144", "0.64572144", "0.6451543", "0.6450388", "0.6448908", "0.6448308", "0.64454967", "0.6445267", "0.644424", "0.6443965", "0.6441277", "0.6435446", "0.6430548", "0.6428164", "0.6426133", "0.64230114", "0.6416124", "0.64087063", "0.6407656", "0.63988036", "0.63980687", "0.6385586", "0.638459" ]
0.65006083
69
adding service side option to view customer's order by order number
public Order viewOrder(int on) { EntityManager em = emfactory.createEntityManager(); em.getTransaction().begin(); Order found = em.find(Order.class, on); em.close(); return found; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@VTID(10)\r\n int getOrder();", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "public void setOrderno(String orderno) {\n this.orderno = orderno;\n }", "String getOrderId();", "public void setOrderNumber(int value) {\n this.orderNumber = value;\n }", "void getOrders();", "public String getOrderno() {\n return orderno;\n }", "public String getOrderno() {\n return orderno;\n }", "public String getOrderNo() {\n return orderNo;\n }", "public String getOrderNumber() {\n return orderNumber;\n }", "public void setOrderNo(Short orderNo) {\n this.orderNo = orderNo;\n }", "List<CustomerOrder> getAllCustomerOrder();", "public String getServiceOrderNumber() {\n return serviceOrderNumber.get();\n }", "public void setOrder(Order order){\n this.order = order;\n }", "public void setOrderId(int value) {\n this.orderId = value;\n }", "public void setOrder(int value) {\n this.order = value;\n }", "public int getOrderNumber() {\n return orderNumber;\n }", "public void showCustomerOrders() {\n\t\ttextArea.setText(\"\");\n\t\tfor (int i = 0; i < driver.getOrderDB().getCustomerOrderList().size(); i++) {\n\t\t\tOrder order = (driver.getOrderDB().getCustomerOrderList().get(i));\n\t\t\ttextArea.append(\"Order \" + order.getId() + \" was created by \"\n\t\t\t\t\t+ order.getCurrentlyLoggedInStaff().getName() + \"\\nCustomer ID : \"\n\t\t\t\t\t+ ((Customer) order.getPerson()).getId() + \"\\nItems in this order :\");\n\t\t\tfor (int j = 0; j < order.getOrderEntryList().size(); j++) {\n\t\t\t\tStockItem stockItem = order.getOrderEntryList().get(j);\n\t\t\t\ttextArea.append(\"\\n \" + stockItem.getQuantity() + \" \"\n\t\t\t\t\t\t+ stockItem.getProduct().getProductName() + \" \"\n\t\t\t\t\t\t+ (stockItem.getProduct().getRetailPrice() * stockItem.getQuantity()));\n\t\t\t}\n\t\t\ttextArea.append(\"\\nThe total order value is \" + order.getGrandTotalOfOrder() + \"\\n\\n\\n\");\n\t\t}\n\t}", "public String getOrdernum() {\n return ordernum;\n }", "public String toStringOrder(){\n\t\treturn \" CustomerID: \" + customerID + \"\\n Name: \" + name + \"\\n Address: \" + address + \"\\n Email: \" + email + \"\\n\\n\";\n\t}", "private void requestOrderDetail() {\n\n ModelHandler.OrderRequestor.requestOrderDetail(client, mViewData.getOrder().getId(), (order) -> {\n mViewData.setOrder(order);\n onViewDataChanged();\n }, this::showErrorMessage);\n }", "public Short getOrderNo() {\n return orderNo;\n }", "public void setOrderNo (Long orderNo) {\r\n\t\tthis.orderNo = orderNo;\r\n\t}", "public long getOrderNumber()\n {\n return _orderNumber;\n }", "@Override\n\tpublic void getOrders() {\n\t\t\n\t}", "public void viewOrderDetails(){\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"StatisticsTab\"), \"StatisticsTab\");\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"OrdersTab\"), \"OrdersTab\");\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"BtnOrderDetails\"), \"Order Details Button\");\t\n\t}", "public void provideOrderAccess() {\n\t\tint choiceOrder = View.NO_CHOICE;\n\t\t// get customer id and date for the order\n\t\tLong customerId = view.readIDWithPrompt(\"Enter Customer ID for Order: \");\n\t\tif (customerId == null) {\n\t\t\tSystem.out.println(\"Error: Customer Not Found.\");\n\t\t}\n\t\tLong orderId = view.readIDWithPrompt(\"Enter new Unique ID for Order: \");\n\t\tDate currDate = new Date();\n\n\t\t// create the order,\n\t\t// add the orderID to Customer\n\t\tatMyService.placeOrder(customerId, orderId, currDate);\n\n\t\t// enter loop to add items to the order\n\t\tArrayList<Long[]> items = new ArrayList<Long[]>();\n\t\twhile (choiceOrder != View.ENDORDER) {\n\t\t\t// display the order menu\n\t\t\tview.menuOrder();\n\t\t\tchoiceOrder = view.readIntWithPrompt(\"Enter choice: \");\n\t\t\tswitch (choiceOrder) {\n\t\t\t\tcase View.ADD_ORDER_ITEM:\n\t\t\t\t\tLong itemID = view.readIDWithPrompt(\"Enter Item ID: \");\n\t\t\t\t\t// note: Needs to be Long for Long[] below. \n\t\t\t\t\t//Also, i DO want to use readID rather than readInt then convert to long,\n\t\t\t\t\t// because I do not want amt to be negative. \n\t\t\t\t\tLong amt = view.readIDWithPrompt(\"Enter Amount: \");\n\t\t\t\t\t// check to see if the item exists and is in stock\n\t\t\t\t\tItem temp = atMyService.findItem(itemID);\n\t\t\t\t\tif (temp == null) {\n\t\t\t\t\t\tSystem.out.println(\"Item '\" + itemID + \"' not found. Item skipped.\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((temp.getStock() - amt) < 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"There is only '\" + temp.getStock() + \"' of this item left. Please try again.\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// add the items to the arrayList\n\t\t\t\t\t\t\tLong[] toAdd = { itemID, amt };\n\t\t\t\t\t\t\titems.add(toAdd);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase View.ENDORDER:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// convert arrayList to array, add to orders.\n\t\tif (!(items.isEmpty())) {\n\t\t\tLong[][] array = new Long[items.size()][2];\n\t\t\tfor (int i = 0; i < items.size(); i++) {\n\t\t\t\tarray[i][0] = items.get(i)[0];\n\t\t\t\tarray[i][1] = items.get(i)[1];\n\t\t\t}\n\t\t\tatMyService.addOrderItems(orderId, array);\n\t\t}\n\t}", "public Integer getOrderNumber()\n {\n return orderNum;\n }", "public String getOrderNum() {\n return orderNum;\n }", "public Long getOrderNo () {\r\n\t\treturn orderNo;\r\n\t}", "List<Order> getOpenOrders(OpenOrderRequest orderRequest);", "void showOrderText(int ID) throws OrderNotFoundException;", "public String getOrderID() {return orderID;}", "public void setOrder(Integer order) {\n this.order = order;\n }", "public void setOrder(Integer order) {\n this.order = order;\n }", "public void setOrder(Integer order) {\n this.order = order;\n }", "public void setOrder(int order) {\n this.order = order;\n }", "public void setOrder(int order) {\n this.order = order;\n }", "@Override\n\tpublic ProductVO detailOrderList(int p_num) {\n\t\treturn sql.selectOne(\"detailOrderList\", p_num);\n\t}", "io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer();", "@RequestMapping(value = \"/order/list\")\n\tpublic String list(Model model, HttpSession session, HttpServletRequest request, RedirectAttributes ra) {\n\n\t\tString return_page = \"\";\n\n\t\tCostumer c = new Costumer();\n\t\tString CID_string = request.getParameter(\"cid\");\n\n\t\tif (CID_string != null && StringUtils.isNumeric(CID_string)) {\n\t\t\t\n\t\t\tCID_string.toUpperCase();\n\t\t\tInteger CID = Integer.valueOf(CID_string);\n\t\t\tc.setCID(CID);\n\t\t\t\n\t\t\tCostumer costumer = this.costumerService.getCostumer(c);\n\n\t\t\tif (costumer == null) {\n\n\t\t\t\tString CID_str = (\"000000\" + CID).substring(CID.toString().length());\n\t\t\t\tra.addFlashAttribute(\"msgRetornoTipo\", \"warning\");\n\t\t\t\tra.addFlashAttribute(\"msgRetorno\", \"Client #\" + CID_str + \" not found.\");\n\n\t\t\t\treturn_page = \"redirect:/\";\n\t\t\t} else {\n\n\t\t\t\tList<Order> ordersList = this.orderService.getOrdersByClient(costumer);\n\n\t\t\t\tmodel.addAttribute(\"costumer\", costumer);\n\t\t\t\tmodel.addAttribute(\"ordersList\", ordersList);\n\n\t\t\t\treturn_page = \"order_list\";\n\t\t\t}\n\t\t} else {\n\t\t\tif (CID_string == null) CID_string = \"\";\n\t\t\tra.addFlashAttribute(\"msgRetornoTipo\", \"warning\");\n\t\t\tra.addFlashAttribute(\"msgRetorno\", \"Client \" + CID_string + \" not found.\");\n\n\t\t\treturn_page = \"redirect:/\";\n\t\t}\n\n\t\treturn return_page;\n\t}", "public static void viewOrder() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Viewing existing orders************\");\n\t\t// TODO - implement RRPSS.viewOrder\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\t\tOrderedPackageManager orderedPackageManager = new OrderedPackageManager();\n\t\tList listOfOrderedPromotionalPackage = null;\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to view the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tlistOfOrderedItems = orderedItemManager\n\t\t\t\t\t.retrieveOrderedItemsByOrderID(order.getId());\n\t\t\tlistOfOrderedPromotionalPackage = orderedPackageManager\n\t\t\t\t\t.retrieveOrderedPackageByOrderID(order.getId());\n\n\t\t\tif (listOfOrderedItems.size() == 0\n\t\t\t\t\t&& listOfOrderedPromotionalPackage.size() == 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\tSystem.out.println(\"Order is empty!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t\tif (listOfOrderedItems.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"All Cart Items Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedItems.size(); j++) {\n\t\t\t\t\tOrderedItem orderedItem = (OrderedItem) listOfOrderedItems\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedItem.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\n\t\t\tif (listOfOrderedPromotionalPackage.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"Promotional Packages Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedPromotionalPackage.size(); j++) {\n\t\t\t\t\tOrderedPackage orderedPackage = (OrderedPackage) listOfOrderedPromotionalPackage\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedPackage.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of viewing orders************\");\n\t}", "public List getOrderDetails(OrderDetail orderDetail);", "OrderDetailBean getSearchOrderById(long orderIdi,String userLogin,int paymenttype) throws SQLException, Exception, RemoteException;", "OrderModel getOrderForCode(CustomerModel currentUser, String code, BaseStoreModel baseStoreModel);", "@RequestMapping(value = \"/orders\")\r\n\tpublic ModelAndView openOrdersPage() {\r\n\t\tList<Order> orders = databaseInfo.selectOrders();\r\n\r\n\t\treturn new ModelAndView(\"orders\", \"orderslist\", orders);\r\n\t}", "public void setOrder(List<Order> order) {\n this.order = order;\n }", "@Path(\"showorder\")\n @GET\n @Produces(MediaType.TEXT_PLAIN)\n public String getOrder(@QueryParam(\"jsonpcallback\") String jsonpcallback) {\n return jsonpcallback + \"(\" + os.getAllOrders().toJSONString() + \")\";\n }", "public void setOrder(String Order) {\n this.Order = Order;\n }", "private Order getOrder()\n {\n return orderController.getOrder(getOrderNumber());\n }", "@GetMapping(\"/order\")\n\t public String getAllOrders() {\n\t \tList<Order> orders = oService.getAllOrers();\n\t StringBuffer ordertext = new StringBuffer();\n\t orders.parallelStream().forEach(ord->{\n\t \t ordertext.append(\"<tr><td>\"+ord.getOrdid()+\"</td>\") ;\n\t ordertext.append(\"<td><span class=\\\"badge badge-secondary\\\">\"+ord.getPaymentstatus()\n\t +\"</span></td>\") ;\n\t ordertext.append(\"<td>\"+ord.getPaymentgroup()+\"</td>\") ; \n\t ordertext.append(\"<td><span class=\\\"badge badge-success\\\">\"+ord.getOrdstatus()+\"</span></td>\");\n\t ordertext.append(\"<td>\"+ord.getOrderdate()+\"</td>\") ;\n\t ordertext.append(\"<td>\"+ord.getTotal()+\"</td>\") ;\n\t ordertext.append(\"<td><span class=\\\"fa fa-eye\\\" style=\\\"cursor:pointer;\\\" onclick=\\\"showprd('\"+ord.getOrdid()+\"')\\\" title=\\\"view details\\\"> </span>\") ;\n\t ordertext.append(\"<span class=\\\"fa fa-remove\\\" style=\\\"cursor:pointer;\\\" onclick=\\\"\\\" title=\\\"cancel\\\"></span></td>\") ;\n\t });\n\t return ordertext.toString() ;\n\t }", "void setOrder(int order){\r\n\t\t\tthis.order = order;\r\n\t\t}", "public boolean showOrders(Connection conn, int order_no) {\r\n\t\ttry {\r\n\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\tResultSet rset = stmt.executeQuery(\"select * from order_XXXX where orderno=\" + order_no);\r\n\r\n\t\t\t// Print the no and name\r\n\t\t\tSystem.out.println(\"Order No\\t\\t\\tItem No\\t\\t\\tOrder Quantity\\t\\t\\tOrder Date\\t\\t\\tCustomer No\");\r\n\t\t\tSystem.out.println(\"_________________________________________________________________\");\r\n\t\t\tif (!rset.isBeforeFirst())\r\n\t\t\t\treturn true;\r\n\t\t\telse {\r\n\t\t\t\twhile (rset.next()) {\r\n\t\t\t\t\tSystem.out.println(rset.getInt(1) + \"\\t\\t\\t\" + rset.getInt(2) + \"\\t\\t\\t\" + rset.getInt(3) + \"\\t\\t\\t\"\r\n\t\t\t\t\t\t\t+ rset.getString(4) + \"\\t\\t\\t\" + rset.getString(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 String[] viewOrder(Session session) throws RemoteException{\n\t\tSystem.out.println(\"Server model invokes viewOrder() method\");\n\t\treturn null;\n\t\t\n\t}", "public Integer\t\tgetOrderID();", "public void view() {\n\t\t\t\n\t\t\tSystem.out.println(\"Poping up window to show each order of customer @ AdminSaleController\");\n\t\t\tCustomerOrderMain vo = new CustomerOrderMain();\n\t\t vo.start(ps);\n\t\t\t\n\t\t}", "String askingOrderNumber();", "public void setOrderNum(String orderNum) {\n\t\tthis.orderNum = orderNum;\n\t}", "public void visitRemoteOrderDisplay( DevCat devCat ) {}", "@RequestMapping(\"/getUserOrder\")\n public List<Order> getUserOrder(@RequestParam(\"user_id\") int user_id){\n return orderService.getOrdersByUser(user_id);\n }", "public Customer displayCustomer(int cid);", "public CustomerOrder getOrder() {\n return (CustomerOrder) get(\"order\");\n }", "public void writeOrderId() {\n FacesContext fc = FacesContext.getCurrentInstance();\n HttpSession session = (HttpSession) fc.getExternalContext().getSession(false);\n session.setAttribute(\"orderId\", \"\" + orderId);\n }", "Order getOrder();", "@Override\n public JSONObject viewTelephoneSalesOderByDirector() {\n\n return in_telephonesalesdao.viewTelephoneSalesOrderByDirector();\n }", "@JsonGetter(\"orderId\")\r\n public int getOrderId ( ) { \r\n return this.orderId;\r\n }", "public Order(int _orderId){\n this.orderId = _orderId;\n }", "public String getOrdersId() {\n return ordersId;\n }", "public void listOrder()\r\n {o.listOrder();}", "public void setOrder(Integer order) {\n\t\tthis.order = order;\n\t}", "public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }", "public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }", "public void readOrderId() {\n FacesContext fc = FacesContext.getCurrentInstance();\n HttpSession session = (HttpSession) fc.getExternalContext().getSession(false);\n Object orderIdParam = session.getAttribute(\"orderId\");\n orderId = null;\n if(orderIdParam != null) {\n orderId = Integer.parseInt(orderIdParam.toString().trim());\n }\n }", "@ApiModelProperty(example = \"123456\", value = \"Client order ID if supplied by client.\")\n public String getOrderId() {\n return orderId;\n }", "public String getOrderid() {\n return orderid;\n }", "List<OrderDTO> findAll(String customerId);", "public void setOrder(int order) {\n\t\tthis.order = order;\n\t}", "@Override\n public String toString(){\n return \"\\n\"+String.valueOf(orderId) + \" $\"+String.valueOf(amount)+ \" Name:\"+String.valueOf(vendor);\n }", "public void setOrdernum(String ordernum) {\n this.ordernum = ordernum == null ? null : ordernum.trim();\n }", "public void incrementOrder(View view) {\n final int numberOfCoffees = getNumberOfCoffees();\n if (numberOfCoffees == Constants.MAX_NUM_COFFEES_IN_ORDER) {\n Toast.makeText(getApplicationContext(),\n \"Maximum number of coffees in one order reached\",\n Toast.LENGTH_SHORT).show();\n return;\n }\n displayQuantity(numberOfCoffees+1);\n }", "@Override\n\tpublic String queryOrderByOrderNo(String orderno) {\n\treturn null;\n\t}", "public Order getOrderById(long orderId);", "void getMarketOrders();", "@Override\r\n\tpublic OrderVO getOrderByID(Integer ono) throws Exception {\n\t\treturn sqlSession.selectOne(namespaceOrder+\".getOneOrderByOrderID\",ono);\r\n\t}", "TrackingOrderDetails trackingOrderDetails(String username, int order_id, String role);", "public int getOrder();", "public String printOrders(String customerID) {\n\t\tString out = \"Ordrene til kunde \" + customerID + \"\\n\";\n\t\tString theOrders = \"\";\n\n\t\tfor (Order o : orders) {\n\t\t\tif (o.getUserID().equals(customerID)) {\n\t\t\t\ttheOrders += o.printOrder() + \"\\n\";\n\t\t\t}\n\t\t}\n\t\tif (theOrders.equals(\"\")) {\n\t\t\tout = \"\";\n\t\t} else {\n\t\t\tout += theOrders;\n\t\t}\n\t\treturn out;\n\t}", "@GetMapping(\"/{customerid}\")\n public ResponseEntity<List<Order>> byCustomer(@PathVariable(value = \"customerid\") Long customerId) {\n return new ResponseEntity<>(orderService.getAllByCustomerId(customerId), HttpStatus.OK);\n }", "@RequestMapping(\"/getOrderItems\")\n public List<OrderItem> getOrderItems(@RequestParam(\"order_id\") int order_id){\n return orderService.getOrderItems(order_id);\n }", "List<LineItem> listLineItemByOrderId(Integer orderId);", "public int getCustomerNo() {\n\t\treturn this.customerNo;\r\n\t}", "public String getOrder() {\n return this.Order;\n }", "@Override\n\tpublic List<Order> selectOrderList(int mno) {\n\t\treturn orderDAO.selectOrderList(mno);\n\t}", "public int getCustNumber()\n\t{\n\t\treturn customerNumber;\n\t}", "public Integer getOrder();", "void paymentOrder(long orderId);", "Order getOrder(int id) throws ServiceException;", "public java.lang.String getOrderID(){\n return localOrderID;\n }", "public java.lang.String getOrderID(){\n return localOrderID;\n }" ]
[ "0.67353714", "0.6583472", "0.6583472", "0.6508207", "0.6501687", "0.6474215", "0.64631534", "0.6438762", "0.6438762", "0.635955", "0.632697", "0.6300097", "0.6295439", "0.6270658", "0.62168133", "0.6211889", "0.62024254", "0.61812466", "0.6174559", "0.6154442", "0.61406875", "0.61162496", "0.610345", "0.6078692", "0.60739297", "0.6070063", "0.6069939", "0.6043118", "0.6029232", "0.60017395", "0.59997153", "0.59952205", "0.5983918", "0.5976226", "0.59693235", "0.59693235", "0.5965897", "0.59572005", "0.59572005", "0.59515405", "0.59471786", "0.5936059", "0.5934714", "0.5931685", "0.5913049", "0.5900992", "0.58959913", "0.58891785", "0.588613", "0.58709174", "0.58681744", "0.585557", "0.58514947", "0.5850329", "0.5846799", "0.5842887", "0.58428806", "0.58425915", "0.5830952", "0.58286995", "0.5826572", "0.58250666", "0.5822129", "0.5811664", "0.58103555", "0.58070827", "0.5805465", "0.5799108", "0.578214", "0.57697517", "0.5765166", "0.57595223", "0.57595223", "0.574147", "0.5741383", "0.5731173", "0.5728491", "0.57277054", "0.5727434", "0.5721635", "0.5716954", "0.5709473", "0.57059234", "0.5693129", "0.56928253", "0.5689089", "0.568746", "0.5679378", "0.56787974", "0.5674987", "0.5656848", "0.565683", "0.56478524", "0.56450343", "0.56416374", "0.56401724", "0.56365615", "0.563494", "0.5626732", "0.5626732" ]
0.6041243
28
adding service side option to view full inventory
public List<Order> showAllInventory() { EntityManager em = emfactory.createEntityManager(); //I may need to change the query criteria TypedQuery<Order> typedQuery = em.createQuery("select orderNumber from Order orderNumber", Order.class); List<Order> allInventory = typedQuery.getResultList(); em.close(); return allInventory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Inventory getInventory(){ //needed for InventoryView - Sam\n return inventory;\n }", "public void showInventory()\n\t{\n\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t+ \"__________________\\n\\n\");\n\t\tSystem.out.print(\"\\t\\t\\t\\tInventory\");\n\t\t\n\t\tfor (String s: inventory)\n\t\t{\n\t\t\tSystem.out.print(\"\\n\" + s);\n\t\t}\n\t\t\n\t\tSystem.out.print(\"\\n\\n[R] Return\\n\");\n\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t+ \"__________________\\n\\n\");\n\t\tSystem.out.print(\"Action: \");\n\t\t\n\t}", "private void showServices()\n {\n // Remove all of the items from the listField.\n _treeField.deleteAll();\n \n // Get a copy of the ServiceRouting class.\n ServiceRouting serviceRouting = ServiceRouting.getInstance();\n \n // Add in our new items by trolling through the ServiceBook API.\n ServiceBook sb = ServiceBook.getSB();\n ServiceRecord[] records = sb.getRecords();\n \n if( records == null ) \n {\n return;\n }\n \n int rootNode = _treeField.addChildNode( 0, \"Service Records\" );\n \n int numRecords = records.length;\n \n for( int i = 0; i < numRecords; i++ ) \n {\n String name = records[i].getName();\n String description = records[i].getDescription();\n \n if( description == null || description.length() == 0 ) \n {\n description = \"No description available\" ;\n }\n \n String uid = records[i].getUid();\n boolean serialBypass = serviceRouting.isSerialBypassActive( uid );\n\n int newParentNode = _treeField.addChildNode( rootNode, name );\n _treeField.addChildNode( newParentNode, description );\n _treeField.addChildNode( newParentNode, uid );\n _treeField.addChildNode( newParentNode, serialBypass ? \"Serial Bypass: Connected\" : \"Serial Bypass: Disconnected\");\n \n // Perform the check for the Desktop SerialRecord.\n if( name != null && name.equals( \"Desktop\" )) \n {\n _desktopUID = uid;\n }\n }\n \n _treeField.setCurrentNode( rootNode ); // Set the root as the starting point.\n }", "public String getDescription() {return \"Use an item in your inventory\"; }", "private void viewBackpack() {\n Item[] inventory = GameControl.getSortedInventoryList();\r\n \r\n System.out.println(\"\\n List of inventory Items\");\r\n System.out.println(\"Description\" + \"\\t\" + \r\n \"Required\" + \"\\t\" +\r\n \"In Stock\");\r\n \r\n // For each inventory item\r\n for (Item inventoryItem : inventory){\r\n // Display the description, the required amount and amount in stock\r\n System.out.println(InventoryItem.getType + \"\\t \" +\r\n InventoryItem.requiredAmount + \"\\t \" +\r\n InventoryItem.getQuantity);\r\n }\r\n \r\n }", "private void printToolListMenu(Shop shop) {\n System.out.println(shop.getInventory());\n }", "public void inventoryPrint() {\n System.out.println(\"Artifact Name: \" + name);\r\n System.out.println(\"Desc:\" + description);\r\n System.out.println(\"Value: \" + value);\r\n System.out.println(\"Mobility: \" + mobility); \r\n }", "void showUI(Player player) {\n\t\tString title = (this.range!=-1 ? \"BCL:\"+this.getOwnerName()+\"@\"+this.getLoc() : \"New \"+(this.isAdminChunkLoader()?\"Admin \":\"\")+\"BetterChunkLoader\");\n\t\tif (title.length()>32) {\n\t\t\ttitle=title.substring(0, 32);\n\t\t}\n\t\tInventory inventory = Bukkit.createInventory(this, 9, title);\n\n\t\taddInventoryOption(inventory, 0, Material.REDSTONE_TORCH_ON, \"Remove\");\n\t\t\n\t\tfor (byte i=0; i<5; i++) {\n\t\t\taddInventoryOption(inventory, i+2, Material.MAP, \"Size \"+this.sizeX(i)+(this.getRange()==i?\" [selected]\":\"\"));\n\t\t}\n\t\t\n\t\tplayer.openInventory(inventory);\n\t}", "@Override\n\tpublic void openInventory() {\n\t\t\n\t}", "public void displaySelections() {\n List<VendingItem> listOfItems = service.getAllItemsNonZero(); //<-- uses lambda\n view.displaySelections(listOfItems);\n }", "@Override\r\n\tpublic void onOpenInventory(InventoryOpenEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void setInventoryItems() {\n\t\t\r\n\t}", "@SuppressWarnings(\"deprecation\")\r\n\t@EventHandler\r\n\tpublic void inventoryClickEvent(InventoryClickEvent e) {\r\n\t\tEntity applier = e.getWhoClicked();\r\n\t\tif (!e.isCancelled()) {\r\n\t\t\tif (applier instanceof Player) {\r\n\t\t\t\tPlayer papplier = (Player) applier;\r\n\t\t\t\t// PlayerInventory pinventory = papplier.getInventory();\r\n\t\t\t\t// inven.put(papplier, pinventory);\r\n\t\t\t\tItemStack item = e.getCurrentItem();\r\n\t\t\t\tItemStack transmog = e.getCursor();\r\n\t\t\t\tString tname = \"\";\r\n\t\t\t\tif (item != null) {\r\n\t\t\t\t\tItemMeta itemMeta = item.getItemMeta();\r\n\t\t\t\t\tArrayList<String> lore1 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore2 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore3 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore4 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore5 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore6 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore7 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> totallore = new ArrayList<String>();\r\n\t\t\t\t\tif (item.getType() != Material.AIR) {\r\n\t\t\t\t\t\t// papplier.sendMessage(\"1\");\r\n\t\t\t\t\t\tif (transmog != null) {\r\n\t\t\t\t\t\t\t// papplier.sendMessage(\"2\");\r\n\t\t\t\t\t\t\tif (item.getType().name().endsWith(\"SWORD\") || item.getType().name().endsWith(\"AXE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"HELMET\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"SHOVEL\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"CHESTPLATE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"LEGGINGS\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"BOOTS\") || item.getType().name().endsWith(\"BOW\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"PICKAXE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"HOE\")) {\r\n\t\t\t\t\t\t\t\t// papplier.sendMessage(\"3\");\r\n\t\t\t\t\t\t\t\tif (item.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"4\");\r\n\t\t\t\t\t\t\t\t\tif (item.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"5\");\r\n\t\t\t\t\t\t\t\t\t\tif (item.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"6\");\r\n\t\t\t\t\t\t\t\t\t\t\tif (Methods.transmogged(item) == true) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"7\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(Api.transint(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t// + \"\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tdname.put(item, item.getItemMeta().getDisplayName());\r\n\t\t\t\t\t\t\t\t\t\t\t\tI.put(papplier, Methods.transint(item));\r\n\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, true);\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif (Methods.transmogged(item) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"8\");\r\n\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, false);\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (!item.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"9\");\r\n\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, false);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"10\");\r\n\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"11\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"12\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"13\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.color(\"&e&lTransmog\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"14\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String tlore : transmog.getItemMeta().getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"15\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tlore.contains(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&e&oPlace scroll on item to apply.\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"16\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.getClickedInventory() instanceof PlayerInventory) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"17\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (CE.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaterial material = item.getType();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemStack titem = new ItemStack(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaterial, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemMeta titemMeta = titem\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemMeta();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanted.put(titem, false);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = item.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<CEnchantments> enchantes = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> enchanters = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments encs : enchantes) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanters.add(Methods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tencs.getCustomName()));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String ench : item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"29\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanters\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.removePower(\r\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\tMethods.removeColor(\r\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\tench)))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"31\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments enchant : CE\r\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.getEnchantments()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"19\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (ench.contains(enchant\r\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.getCustomName())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString tier = CE\r\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.getEnchantmentCategory(\r\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\tenchant);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tier.contains(\r\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\"T1\")) {\r\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\tlore1.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T2\")) {\r\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\tlore2.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T3\")) {\r\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\tlore3.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T4\")) {\r\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\tlore4.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T5\")) {\r\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\tlore5.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T6\")) {\r\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\tlore6.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore7.add(ench);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore7);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore6);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore5);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore4);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint enchNumber = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = \"&a\" + item.getType().name()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCancelled(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setLore(totallore);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setDisplayName(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(tname));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.setItemMeta(titemMeta);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.addUnsafeEnchantments(enchants);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanted.get(titem) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanted.get(titem) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.addGlow(titem);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCursor(null);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.removeItem(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory().addItem(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew ItemStack[] { titem });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (int i2 = 1; i2 <= 10; ++i2) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playEffect(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getEyeLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEffect.SPELL, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playSound(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSound.LEVEL_UP, 1.0f, 1.0f);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (dname.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdname.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (I.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tI.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.getWhoClicked().sendMessage(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&6Swarm&eEnchants&f >> &cYou may only use Transmog scrolls in your own inventory!\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) == true) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"21\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tString dname1 = dname.get(item).replace(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(\"&d&l[&b&l&n\" + I.get(papplier) + \"&d&l]\"), \"\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"22\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"23\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.color(\"&e&lTransmog\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"24\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String tlore : transmog.getItemMeta().getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"25\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tlore.contains(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&e&oPlace scroll on item to apply.\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"26\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.getClickedInventory() instanceof PlayerInventory) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"27\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (CE.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"28\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaterial material = item.getType();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemStack titem = new ItemStack(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaterial, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemMeta titemMeta = titem\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemMeta();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.addGlow(titem);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = item.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<CEnchantments> enchantes = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> enchanters = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments encs : enchantes) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanters.add(Methods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tencs.getCustomName()));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String ench : item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"29\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanters\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.removePower(\r\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\tMethods.removeColor(\r\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\tench)))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"31\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments enchant : CE\r\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.getEnchantments()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"19\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (ench.contains(enchant\r\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.getCustomName())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString tier = CE\r\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.getEnchantmentCategory(\r\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\tenchant);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tier.contains(\r\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\"T1\")) {\r\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\tlore1.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T2\")) {\r\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\tlore2.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T3\")) {\r\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\tlore3.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T4\")) {\r\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\tlore4.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T5\")) {\r\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\tlore5.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T6\")) {\r\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\tlore6.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore7.add(ench);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore7);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore6);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore5);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore4);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint enchNumber = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = dname1 + \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCancelled(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setLore(totallore);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setDisplayName(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(tname));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.setItemMeta(titemMeta);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.addUnsafeEnchantments(enchants);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCursor(null);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.removeItem(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory().addItem(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew ItemStack[] { titem });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (int i2 = 1; i2 <= 10; ++i2) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playEffect(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getEyeLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEffect.SPELL, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playSound(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSound.LEVEL_UP, 1.0f, 1.0f);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (dname.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdname.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (I.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tI.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.getWhoClicked().sendMessage(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&6Swarm&eEnchants&f >> &cYou may only use Transmog scrolls in your own inventory!\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\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}\r\n\t}", "public void list(){\n //loop through all inventory items\n for(int i=0; i<this.items.size(); i++){\n //print listing of each item\n System.out.printf(this.items.get(i).getListing()+\"\\n\");\n }\n }", "@EventHandler(ignoreCancelled = true)\n public void onPageThreeTerminalClick(InventoryClickEvent event) {\n Inventory inv = event.getInventory();\n String name = inv.getTitle();\n if (name.equals(\"§4Even More Presets\")) {\n event.setCancelled(true);\n int slot = event.getRawSlot();\n final Player player = (Player) event.getWhoClicked();\n if (slot >= 0 && slot < 54) {\n ItemStack is = inv.getItem(slot);\n if (is != null) {\n // get the TARDIS the player is in\n HashMap<String, Object> wheres = new HashMap<String, Object>();\n wheres.put(\"uuid\", player.getUniqueId().toString());\n ResultSetTravellers rst = new ResultSetTravellers(plugin, wheres, false);\n if (rst.resultSet()) {\n int id = rst.getTardis_id();\n HashMap<String, Object> where = new HashMap<String, Object>();\n where.put(\"tardis_id\", id);\n ResultSetTardis rs = new ResultSetTardis(plugin, where, \"\", false, 0);\n if (rs.resultSet()) {\n Tardis tardis = rs.getTardis();\n String last_line = TARDISStaticUtils.getLastLine(tardis.getChameleon());\n final boolean bool = tardis.isChamele_on();\n final boolean adapt = tardis.isAdapti_on();\n String preset = tardis.getPreset().toString();\n HashMap<String, Object> set = new HashMap<String, Object>();\n HashMap<String, Object> set_oo = new HashMap<String, Object>();\n QueryFactory qf = new QueryFactory(plugin);\n HashMap<String, Object> wherec = new HashMap<String, Object>();\n wherec.put(\"tardis_id\", id);\n switch (slot) {\n case 0:\n // toggle chameleon circuit\n String onoff;\n String engage;\n int oo;\n if (tardis.isChamele_on()) {\n onoff = ChatColor.RED + plugin.getLanguage().getString(\"SET_OFF\");\n engage = plugin.getLanguage().getString(\"SET_ON\");\n oo = 0;\n } else {\n onoff = ChatColor.GREEN + plugin.getLanguage().getString(\"SET_ON\");\n engage = plugin.getLanguage().getString(\"SET_OFF\");\n oo = 1;\n }\n ItemMeta im = is.getItemMeta();\n im.setLore(Arrays.asList(onoff, String.format(plugin.getLanguage().getString(\"CHAM_CLICK\"), engage)));\n is.setItemMeta(im);\n // set sign text\n TARDISStaticUtils.setSign(tardis.getChameleon(), 2, onoff, player);\n set_oo.put(\"chamele_on\", oo);\n break;\n case 2:\n player.performCommand(\"tardis rebuild\");\n close(player);\n if (plugin.getConfig().getBoolean(\"circuits.damage\") && !plugin.getDifficulty().equals(DIFFICULTY.EASY) && plugin.getConfig().getInt(\"circuits.uses.chameleon\") > 0) {\n TARDISCircuitChecker tcc = new TARDISCircuitChecker(plugin, id);\n tcc.getCircuits();\n // decrement uses\n int uses_left = tcc.getChameleonUses();\n new TARDISCircuitDamager(plugin, DISK_CIRCUIT.CHAMELEON, uses_left, id, player).damage();\n }\n break;\n case 4:\n // toggle biome adaption\n String biome;\n String to_turn;\n int ba;\n if (tardis.isAdapti_on()) {\n biome = ChatColor.RED + plugin.getLanguage().getString(\"SET_OFF\");\n to_turn = plugin.getLanguage().getString(\"SET_ON\");\n ba = 0;\n } else {\n biome = ChatColor.GREEN + plugin.getLanguage().getString(\"SET_ON\");\n to_turn = plugin.getLanguage().getString(\"SET_OFF\");\n ba = 1;\n }\n ItemMeta bio = is.getItemMeta();\n bio.setLore(Arrays.asList(biome, String.format(plugin.getLanguage().getString(\"CHAM_CLICK\"), to_turn)));\n is.setItemMeta(bio);\n set_oo.put(\"adapti_on\", ba);\n break;\n case 8:\n // page one\n close(player);\n plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n @Override\n public void run() {\n TARDISChameleonInventory tci = new TARDISChameleonInventory(plugin, bool, adapt);\n ItemStack[] items = tci.getTerminal();\n Inventory chaminv = plugin.getServer().createInventory(player, 54, \"§4Chameleon Circuit\");\n chaminv.setContents(items);\n player.openInventory(chaminv);\n }\n }, 2L);\n break;\n case 18:\n // Gazebo\n if (!last_line.equals(\"GAZEBO\")) {\n set.put(\"chameleon_preset\", \"GAZEBO\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"GAZEBO\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Gazebo\");\n break;\n case 20:\n // Apperture Science\n if (!last_line.equals(\"APPERTURE\")) {\n set.put(\"chameleon_preset\", \"APPERTURE\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"APPERTURE\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Apperture Science\");\n break;\n case 22:\n // Lighthouse\n if (!last_line.equals(\"LIGHTHOUSE\")) {\n set.put(\"chameleon_preset\", \"LIGHTHOUSE\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"LIGHTHOUSE\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Tiny Lighthouse\");\n break;\n case 24:\n // Library\n if (!last_line.equals(\"LIBRARY\")) {\n set.put(\"chameleon_preset\", \"LIBRARY\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"LIBRARY\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Library\");\n break;\n case 26:\n // Snowman\n if (!last_line.equals(\"SNOWMAN\")) {\n set.put(\"chameleon_preset\", \"SNOWMAN\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"SNOWMAN\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Snowman\");\n break;\n case 28:\n // Jail Cell\n if (!last_line.equals(\"JAIL\")) {\n set.put(\"chameleon_preset\", \"JAIL\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"JAIL\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Jail Cell\");\n break;\n case 30:\n // Pandorica\n if (!last_line.equals(\"PANDORICA\")) {\n set.put(\"chameleon_preset\", \"PANDORICA\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"PANDORICA\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Pandorica\");\n break;\n case 32:\n // double helix\n if (!last_line.equals(\"HELIX\")) {\n set.put(\"chameleon_preset\", \"HELIX\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"HELIX\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Double Helix\");\n break;\n case 34:\n // Prismarine\n if (!last_line.equals(\"PRISMARINE\")) {\n set.put(\"chameleon_preset\", \"PRISMARINE\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"PRISMARINE\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Guardian Temple\");\n break;\n case 36:\n // Chorus\n if (!last_line.equals(\"CHORUS\")) {\n set.put(\"chameleon_preset\", \"CHORUS\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"CHORUS\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Chorus Flower\");\n break;\n case 38:\n // Andesite\n if (!last_line.equals(\"ANDESITE\")) {\n set.put(\"chameleon_preset\", \"ANDESITE\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"ANDESITE\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Andesite Box\");\n break;\n case 40:\n // Diorite\n if (!last_line.equals(\"DIORITE\")) {\n set.put(\"chameleon_preset\", \"DIORITE\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"DIORITE\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Diorite Box\");\n break;\n case 42:\n // Granite\n if (!last_line.equals(\"GRANITE\")) {\n set.put(\"chameleon_preset\", \"GRANITE\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"GRANITE\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Granite Box\");\n break;\n case 48:\n // Invisibility\n if (!last_line.equals(\"INVISIBLE\")) {\n // check they have an Invisibility Circuit\n TARDISCircuitChecker tcc = new TARDISCircuitChecker(plugin, id);\n tcc.getCircuits();\n if (!plugin.getDifficulty().equals(DIFFICULTY.EASY)) {\n if (!plugin.getUtils().inGracePeriod(player, false) && !tcc.hasInvisibility()) {\n close(player);\n TARDISMessage.send(player, \"INVISIBILITY_MISSING\");\n break;\n }\n }\n if (plugin.getConfig().getBoolean(\"circuits.damage\") && !plugin.getDifficulty().equals(DIFFICULTY.EASY) && plugin.getConfig().getInt(\"circuits.uses.invisibility\") > 0) {\n // decrement uses\n int uses_left = tcc.getInvisibilityUses();\n new TARDISCircuitDamager(plugin, DISK_CIRCUIT.INVISIBILITY, uses_left, id, player).damage();\n }\n set.put(\"chameleon_preset\", \"INVISIBLE\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"INVISIBLE\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Invisibility\");\n break;\n case 50:\n // constructor GUI\n close(player);\n plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n @Override\n public void run() {\n TARDISChameleonConstructorGUI tci = new TARDISChameleonConstructorGUI(plugin);\n ItemStack[] items = tci.getConstruct();\n Inventory chamcon = plugin.getServer().createInventory(player, 54, \"§4Chameleon Construction\");\n chamcon.setContents(items);\n player.openInventory(chamcon);\n }\n }, 2L);\n break;\n default:\n close(player);\n }\n if (set.size() > 0) {\n set.put(\"chameleon_demat\", preset);\n qf.doUpdate(\"tardis\", set, wherec);\n }\n if (set_oo.size() > 0) {\n qf.doUpdate(\"tardis\", set_oo, wherec);\n }\n }\n }\n }\n }\n }\n }", "public void onInventoryClick(View v) {\n // Launch Inventory activity\n onAnyClick(Inventory.class);\n }", "@Override\n void accept(T inventoryEvent, IView view);", "public interface VendingUI\n\t{\n\t\tvoid showTotalPaymentsAs(int paymentsSoFar);\n\t\tvoid giveProductOut(StockedProduct portion);\n\t\tvoid giveRefundOut(List<Coin> refund);\n\t\tvoid showWhatsAvailable(Collection<StockedProduct> result);\t\t\n\t}", "public interface AssetService extends IService {\n\n BaseFragment getEquipmentInfoFragment(long equipmentId,boolean showMenu);\n}", "@Override\n\tpublic void onInventoryChanged() {\n\t}", "@Override\n public void onInventoryClick(InventoryClickEvent event) {\n // Do nothing here\n }", "public void onInventoryChanged();", "public void inventory() {\n\t\tList<Item> items = super.getItems();\n\n\t\tString retStr = \"Items: \";\n\t\tItem item;\n\t\tfor (int i = 0; i < items.size(); i++) {\n\t\t\titem = items.get(i);\n\t\t\tretStr += item.toString();\n\t\t\tif (i != items.size()-1)\n \t{\n\t\t\t\tretStr += \", \";\n \t}\n\t\t}\n\t\tretStr += \"\\nCapacity: \" + this.currentCapacity() + \"/\" + this.maxCapacity;\n\t\tSystem.out.println(retStr);\n\t}", "public void openInterface() {\r\n if (getContainer().itemCount() == 0 && this instanceof Forager) {\r\n owner.getActionSender().sendMessage(\"Your familiar is not carrying any items that you can withdraw.\");\r\n return;\r\n }\r\n container.shift();\r\n owner.getInventory().getListeners().add(container.getListeners().get(0));\r\n owner.getInventory().refresh();\r\n owner.getInterfaceState().open(new Component(25706).setCloseEvent(new CloseEvent() {\r\n\r\n @Override\r\n public void close(Player player, Component component) {\r\n player.getInterfaceState().closeSingleTab();\r\n }\r\n\r\n @Override\r\n public boolean canClose(Player player, Component component) {\r\n return true;\r\n }\r\n }));\r\n owner.getInterfaceState().setOverlay(new Component(25708));\r\n PacketRepository.send(InventoryInterface.class, new InventoryInterfaceContext(owner, new Component(25699), new Component(25707)));\r\n container.refresh();\r\n }", "public void vender() {\n\t\tSystem.out.println(\"Vender \"+cantidad+\" de \"+itemName);\n\t}", "public InventoryView getOpenInventory ( ) {\n\t\treturn extract ( handle -> handle.getOpenInventory ( ) );\n\t}", "void createOrderGui(Client_H client, ProductController_H menu) throws OrderLineFullListException;", "@Override\n\tpublic void viewItem() {\n\t\t\n\t}", "private void loadStore(Inventory inventory){\n\t\t \n\t\t TextView tvPremiumUpgradeTitle = (TextView)this.findViewById(R.id.tvPremiumUpgradeTitle);\n\t\t TextView tvPremiumUpgradeDescription = (TextView)this.findViewById(R.id.tvPremiumUpgradeDescription);\n\t\t Button bPremiumUpgradePrice = (Button)this.findViewById(R.id.bPremiumUpgradePrice);\n\t\t ImageView ivPremiumUpgradePurchased = (ImageView)this.findViewById(R.id.ivPremiumUpgradePurchased);\n\t\t \n\t\t \n\t\t SkuDetails skuPremiumUpgrade = inventory.getSkuDetails(this.getString(R.string.SKU_GOOGLE_PLAY_PREMIUM_UPGRADE));\n\t\t tvPremiumUpgradeTitle.setText(this.getString(R.string.store_item_premium_upgrade_title));\n\t\t tvPremiumUpgradeDescription.setText(this.getString(R.string.store_item_premium_upgrade_description));\n\t\t if (inventory.hasPurchase(this.getString(R.string.SKU_GOOGLE_PLAY_PREMIUM_UPGRADE))){\n\t\t\t bPremiumUpgradePrice.setVisibility(View.GONE); \n\t\t\t }\n\t\t else{\n\t\t\t bPremiumUpgradePrice.setText(skuPremiumUpgrade.getPrice());\n\t\t\t bPremiumUpgradePrice.setTag(this.getString(R.string.SKU_GOOGLE_PLAY_PREMIUM_UPGRADE));\n\t\t\t bPremiumUpgradePrice.setOnClickListener(this);\n\t\t\t ivPremiumUpgradePurchased.setVisibility(View.GONE);\n\t\t }\n\n\t\t\t }", "public void action() {\n\t\tfor(int i=0; i<facade.getServiceOptions().getOptionsList().size();i++){\n\t\t\tReader reader= new Reader(facade.getOptionsList().get(i));\n\t\t\treader.print();\n\t\t}\n\t}", "public static void addNewServices() {\n displayAddNewServicesMenu();\n processAddnewServicesMenu();\n }", "@EventHandler\n public void onInventoryClick(InventoryClickEvent event){\n // Get who clicked\n Player player = (Player) event.getWhoClicked();\n // Item clicked on\n ItemStack clickedItem = event.getCurrentItem();\n // Inventory clicked in\n Inventory clickedInventory = event.getInventory();\n // Check if clicked in selector inventory\n if (clickedInventory.getName().equals(Selector.invSelector.getName())) {\n // Cancel event\n event.setCancelled(true);\n // Check if not null\n if (clickedItem != null) {\n // Check what clicked\n if (clickedItem.getType() == Material.DIAMOND_PICKAXE) {\n // Close inventory\n player.closeInventory();\n // Open servers\n Survival.openMenu(player);\n } else if (clickedItem.getType() == Material.SNOW_BALL) {\n // Close inventory\n player.closeInventory();\n // Open servers\n Paintball.openMenu(player);\n } else if (clickedItem.getType() == Material.SKULL_ITEM) {\n // Close selector\n player.closeInventory();\n // Send message to player disabled\n Mobarena.openMenu(player);\n } else if (clickedItem.getType() == Material.WOOL) {\n // Close selector\n player.closeInventory();\n // Open servers\n Ctf.openMenu(player);\n } else if(clickedItem.getType() == Material.GRASS){\n // Close selector\n player.closeInventory();\n // Open servers\n Skyblock.openMenu(player);\n } else if(clickedItem.getType() == Material.COMPASS){\n // Close inventory\n player.closeInventory();\n // Back to hub\n Channels.teleportToServer(player, \"We are sending you to the hub.\", Functions.getRandomLobby());\n } else if (clickedItem.getType() == Material.IRON_DOOR) {\n // Close selector\n player.closeInventory();\n // Check if back\n if(Settings.exServers.contains(Settings.pluginServerName)) {\n player.openInventory(networkMenu.networkInv);\n }\n }\n }\n }\n }", "@Override\n\tpublic boolean hasCustomInventoryName(){\n\t return false;\n\t}", "public List<Inventory> getInventory();", "@Override\n public void onClick(View view) {\n clearItemData();\n set_view_for(1);\n getSellMenuId();\n\n\n }", "public abstract void setTabUI(Inventory inventory);", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_service_list, menu);\n\n return true;\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.inventory, menu);\n return true;\n }", "public abstract List<String> getInventory();", "public interface IScenicServiceView extends MvpView {\n void showTicketList(List<TicketDto> ticketDtos,int money);\n\n void applyFreeTeaSuccess();\n\n void showActionInfo(ActionDto actionDto);\n}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_list_clientes, menu);\n\n //para incorporar el search\n // Associate searchable configuration with the SearchView\n /* SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);\n SearchView searchView = (SearchView) menu.findItem(R.id.search).getActionView();// .getActionView();\n searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));\n searchView.setIconifiedByDefault(false); // Do not iconify the widget; expand it by default\n*/\n\n\n return true;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tgetDeliveryList(true, solverMan);\n\t\t\t}", "public void openTableMenu(){\n Table table = tableView.getSelectionModel().getSelectedItem();\n try{\n\n if (table != null) {\n OrderScreen controller = new OrderScreen(server,table,restaurant);\n if (!table.getIsOccupied()){\n controller.addOptionsToComboBox(table);}\n if(table.getTableSize() != 0){\n vBox.getChildren().setAll(controller);\n }\n }\n\n\n } catch (NullPointerException e){\n e.printStackTrace();\n }\n\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_inventory, menu);\n return true;\n }", "public void Loadata(){ // fill the choice box\n stats.removeAll(stats);\n String seller = \"Seller\";\n String customer = \"Customer\";\n stats.addAll(seller,customer);\n Status.getItems().addAll(stats);\n }", "public void printInventory()\n {\n System.out.println(\"Welcome to \" + storeName + \"! We are happy to have you here today!\");\n System.out.println(storeName + \" Inventory List\");\n System.out.println();\n \n System.out.println(\"Our Books:\");\n System.out.println(Book1.toString());\n System.out.println(Book2.toString());\n System.out.println(Book3.toString());\n System.out.println(Book4.toString());\n System.out.println(Book5.toString());\n \n System.out.println();\n \n System.out.println(\"Our Bevereges:\");\n System.out.println(Beverage1.toString());\n System.out.println(Beverage2.toString());\n System.out.println(Beverage3.toString());\n\n System.out.println();\n }", "@GetMapping ( BASE_PATH + \"/inventory\" )\n public ResponseEntity getInventory () {\n final Inventory inventory = inventoryService.getInventory();\n return new ResponseEntity( inventory, HttpStatus.OK );\n }", "List<InventoryItem> getInventory();", "public static void inventoryMenuHeader() {\n System.out.print(\"Welcome to Inventory Menu!\\nType \\\"help\\\" for Inventory menu commands\\n\");\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 }", "@Override\n public void onClick(View v) {\n for (ObjectStock s : product.getStocks()) {\n s.setControlled(true);\n stockDataSource.updateStock(s);\n }\n adapter.notifyDataSetChanged();\n squareTotalStock.setBackgroundColor(\n Methods.giveColor(squareTotalStock,\n Methods.getInventoryState(product)));\n }", "@Override\n\tpublic int getSizeInventory() {\n\t\treturn 0;\n\t}", "@Override\n public void openInventory() {\n PacketPlayOutOpenWindow packetPlayOutOpenWindow = new PacketPlayOutOpenWindow(this.fakeAnvil.getContainerId(), Containers.ANVIL, new ChatMessage(this.title));\n ((CraftPlayer) player).getHandle().playerConnection.sendPacket(packetPlayOutOpenWindow);\n ((CraftPlayer) player).getHandle().activeContainer = this.fakeAnvil;\n this.fakeAnvil.addSlotListener(((CraftPlayer) player).getHandle());\n }", "@Override\n\tpublic void seeSoldItem() {\n\t\tShip selectedShip = game.getSelectedShip();\n\t\tHashMap<Goods, ArrayList<String>> soldItems = selectedShip.getSoldItems();\n\t\tint index = 1;\n\t\tSystem.out.println(\"Items that has been sold: \");\n\t\tfor (HashMap.Entry<Goods, ArrayList<String>> set: soldItems.entrySet()) {\n\t\t\tString name = set.getKey().getName();\n\t\t\tint quantity = set.getKey().getQuantitySold();\n\t\t\tSystem.out.println(\"(\" + index + \") Name: \" + name + \" Quantity: \" + quantity + \" Loaction it was sold: \" + set.getValue());\n\t\t\tindex++;\n\t\t\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\tboolean state = false;\n\t\twhile (state == false) {\n\t\t\tSystem.out.println(\"Choose your actions: \");\n\t\t\tSystem.out.println(\"(1) Go back!\");\n\t\t\ttry {\n\t\t\t\tint selectedAction = scanner.nextInt();\n\t\t\t\tif (selectedAction == 1) {\n\t\t\t\t\t\n\t\t\t\t\tstate = true;\n\t\t\t\t\tgame.seeShipSpec();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t}\n\t}", "public void selectAll() {\n\t\tProductMenu menu = new ProductMenu();\n\t\ttry {\n\t\t\tList<Stock> list = service.selectAll();\n\t\t\tmenu.displayList(list);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private List<InventoryBO> shortListRelevantInventory(final ItemBO anItem)\n\t{\n\t\tfinal InventoryBO selected = anItem.getSelectedInventory();\n\t\tfinal InventoryBO main = anItem.getMainDCInventory();\n\n\t\tlogger.info(\"shortListRelevantInventory(...): selected: \" + selected);\n\t\tlogger.info(\"shortListRelevantInventory(...): main: \" + main);\n\t\tlogger.info(\"shortListRelevantInventory(...): ------------------------\");\n\t\t\n\t\tfinal Set<InventoryBO> temp = new HashSet<InventoryBO>();\n\t\tif (selected != null)\n\t\t{\n\t\t\ttemp.add(selected);\n\t\t}\n\t\tif (main != null)\n\t\t{\n\t\t\ttemp.add(main);\n\t\t}\n\n\t\treturn new ArrayList<InventoryBO>(temp);\n\t}", "@VTID(30)\n boolean getShowAllItems();", "@Override\n public void onClick(View v) {\n Log.e(\"Add Button Clicked\",\"*************************************************\");\n Log.e(\"search Adapter\",\"\"+tempProduct.getmItemName()+\" \"+1+\" \"+ tempProduct.getType()+\" \"+ tempProduct.getmCost());\n adapter.addItem(new MenuItemClass(tempProduct.getmItemName(),1, tempProduct.getType(), tempProduct.getmCost(), tempProduct.getmId(), tempProduct.getmUnit(), tempProduct.getmGstPercent()));\n searchView.setQuery(\"\", false);\n listView.setVisibility(View.GONE);\n }", "InventoryItem getInventoryItem();", "public static void showAllVilla(){\n ArrayList<Villa> villaList = getListFromCSV(FuncGeneric.EntityType.VILLA);\n displayList(villaList);\n showServices();\n }", "public void printInventory(){\n\t\tint i;\n\t\tint listSize = inventory.size();\n\t\tRoll temp;\n\t\tString outputText;\n\t\toutputText = \"Inventory Stocks Per Roll: \";\n\t\t//outputText = inventory.get(0).getRoll().getType() + \" Roll Current stock: \" + inventory.get(0).getStock();\n\t\tfor(i = 0; i < listSize; i++){\n\t\t\tif(i % 3 == 0){\n\t\t\t\toutputText = outputText + \"\\n\";\n\t\t\t}\n\t\t\toutputText = outputText + inventory.get(i).getRoll().getType() + \" : \" + inventory.get(i).getStock() + \" \";\n\t\t}\n\t\tSystem.out.println(outputText);\n\t\tthis.status = outputText;\n\t\tsetChanged();\n notifyObservers();\n\t}", "@Override\n public String getDescription() {\n return \"Digital goods listing\";\n }", "@Override\n public boolean active() {\n return !Inventory.isFull();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tString [] params = {H_Panel.getName(),H_Panel.getDesc()};\n\t\t\t\tservDisp.add(params);\t\t\n\t\t\t\t_MGR.setHeader(H_Panel.getName());\n\t\t\t\t_MGR.setDescr(H_Panel.getDesc());\n\t\t\t\t_MGR.loadTagsToProject();\n\t\t\t\t//_MGR.updateTagsInProjectPanels();\n\t\t\t\tSP_PManager_Widget.this.setVisible(false);\n\t\t\t}", "public void showMenu()\r\n {\r\n System.out.println(\"Enter Truck order: \");\r\n \r\n super.showCommon();\r\n \r\n \r\n super.showMenu(\"What size truck is this? \", SIZE);\r\n \r\n \r\n \r\n \r\n \r\n \r\n super.showMenu(\"What is the engine size of the truck?\", ENGINE_SIZE);\r\n \r\n \r\n \r\n }", "public void viewOptions()\r\n {\r\n SetupScreen setupScreen = new SetupScreen();\r\n pushScreen(setupScreen);\r\n }", "@Override\n public boolean onCreateOptionsMenu( Menu menu ) {\n getMenuInflater().inflate(R.menu.menu_ingredient_details_view, menu);\n return true;\n }", "@Override\n\tpublic void onInventoryChanged() {\n\t\tsuper.onInventoryChanged();\n\t}", "private void loadInv() {\n\t\titem = Main.inventory.business.getAllBaked();\n\t\tString test = \"ID, Name, Amount, Price\\n\";\n\t\t//formatting for string to load into the screen\n\t\tfor(int i=0 ; i< item.size() ; i++) {\n\t\t\ttest += (i+1) + \" \" + item.get(i).getName() +\", \" \n\t\t\t\t\t+ item.get(i).getQuantity() + \n\t\t\t\t\t\", $\"+ Main.inventory.business.getItemCost(item.get(i).getName()) +\"\\n\";\n\t\t}\n\t\tthis.inv.setText(test);\n\t}", "void showSelectedAgentView();", "void openInventory(Player player, SimpleInventory inventory);", "private void use() {\n switch (choices.get(selection)) {\n case INFO : { \n AbstractInMenu newMenu = new ItemInfo(sourceMenu, item);\n this.sourceMenu.setMenu(newMenu);\n newMenu.setVisible(true);\n } break;\n case USE : {\n entity.use(item); \n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case EQUIP : {\n entity.equip(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case ACTIVE : {\n entity.setActiveItem(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case UNEQUIP : {\n entity.equip(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case UNACTIVE : {\n entity.setActiveItem(null);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case DROP : {\n entity.drop(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break; \n case PLACE : {\n entity.placeItem(item);\n entity.removeItem(item); \n sourceMenu.activate();\n sourceMenu.setState(true); \n } break;\n case CLOSE : { \n sourceMenu.activate();\n } break;\n case DESTROY : {\n entity.removeItem(item);\n sourceMenu.activate();\n sourceMenu.setState(true); \n } break;\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.edit_inventory_menu, menu);\n return true;\n }", "static void montaMenu() {\n System.out.println(\"\");\r\n System.out.println(\"1 - Novo cliente\");\r\n System.out.println(\"2 - Lista clientes\");\r\n System.out.println(\"3 - Apagar cliente\");\r\n System.out.println(\"0 - Finalizar\");\r\n System.out.println(\"Digite a opcao desejada: \");\r\n System.out.println(\"\");\r\n }", "public interface IInventoryBase extends IInventory {\n\n @Override\n default public int getInventoryStackLimit() {\n return 64;\n }\n\n @Override\n default public void openInventory(EntityPlayer player) {}\n\n @Override\n default public void closeInventory(EntityPlayer player) {}\n\n @Override\n default public boolean isItemValidForSlot(int index, ItemStack stack) {\n return true;\n }\n\n @Override\n default public int getField(int id) {\n return 0;\n }\n\n @Override\n default public void setField(int id, int value) {}\n\n @Override\n default public int getFieldCount() {\n return 0;\n }\n\n @Override\n default public boolean hasCustomName() {\n return false;\n }\n\n @Override\n default public ITextComponent getDisplayName() {\n return new TextComponentTranslation(getName());\n }\n\n}", "public String PrintInventoryList()\r\n {\r\n String inventoryInformation = \"\";\r\n\r\n System.out.println(\"Inventory: \");\r\n //You may print the inventory details here\r\n for (Product product: productArrayList) // foreach loop to iterate through the ArrayList\r\n {\r\n // TODO: check if this code is right\r\n inventoryInformation += product.getId() + \" \" + product.getName() + \" \" +\r\n product.getCost() + \" \" + product.getQuantity() + \" \" + product.getMargin() + \"\\n\";\r\n }\r\n System.out.println(inventoryInformation);\r\n return inventoryInformation;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_cloud_vault, menu);\n return true;\n }", "public ServiceLevelAction getExpandAction();", "@Override\n\tpublic boolean inventory(Player player, Item item, int opcode) {\n\t\treturn false;\n// Clan channel = ClanRepository.get(player.clan);\n// if (channel == null) {\n// player.send(new SendMessage(\"You need to be in a clan to do this!\"));\n// return true;\n// }\n// player.inventory.remove(item);\n// Item showcaseReward = new Item(Utility.randomElement(ClanUtility.getRewardItems(channel)));\n// channel.showcaseItems.add(showcaseReward.getId());\n// player.send(new SendMessage(\"Inside the box you found \" + showcaseReward.getName() + \"! Showcase size: \" + channel.showcaseItems.size() + \"/28\", SendMessage.MessageColor.DARK_PURPLE));\n// return true;\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n\tif (e.getSource().equals(this.viewBtn)) {\n\t String selection = (String) this.selections.getSelectedItem();\n\t SerendipView sv = null;\n\t // Remove current panel\n\t if (null != this.epcViewPanel) {\n\t\tthis.remove(this.epcViewPanel);\n\t }\n\t // Set the new panel\n\t try {\n\t\tif (this.isProcess) {\n\n\t\t sv = engine.getModelFactory().getProcessView(selection,\n\t\t\t null);\n\t\t // Add data dependencies\n\t\t if (isDataChckBox.isSelected()) {\n\t\t\tMap<String, String> map = CompositionUtil\n\t\t\t\t.getTaskRuleMapping(this.engine\n\t\t\t\t\t.getComposition().getComposite());\n\t\t\tfor (String s : map.keySet()) {\n\t\t\t log.debug(s);\n\t\t\t}\n\t\t\tSerendipView.markDataDependencies(sv.getViewAsEPC(),\n\t\t\t\tmap);\n\t\t }\n\n\t\t} else {\n\t\t // sv = engine.getModelFactory().getSRView(selection);\n\t\t}\n\t } catch (SerendipException e1) {\n\t\t// TODO Auto-generated catch block\n\t\tJOptionPane.showMessageDialog(this,\n\t\t\t\"Error while generating the view for \" + selection,\n\t\t\t\"View generation error\", JOptionPane.ERROR_MESSAGE);\n\n\t\te1.printStackTrace();\n\t }\n\t this.epcViewPanel = new SerendipEPCView(sv);\n\n\t this.add(epcViewPanel, BorderLayout.CENTER);\n\t this.setTextArea(selection);\n\t this.repaint();\n\n\t} else if (e.getSource().equals(this.viewBtn)) {\n\t String[] strList = null;\n\t if (this.isProcess) {\n\t\tstrList = CompositionUtil\n\t\t\t.getAllProcessDefinitionIds(this.engine\n\t\t\t\t.getComposition());\n\t } else {\n\t\tstrList = CompositionUtil.getAllSRIds(this.engine\n\t\t\t.getComposition());\n\t }\n\t // Remove existing items and update\n\t this.selections.removeAllItems();\n\t for (int i = 0; i < strList.length; i++) {\n\t\tthis.selections.addItem(strList[i]);\n\t }\n\t System.out.println(\"Selections Updated \");\n\t}\n }", "@EventHandler(ignoreCancelled = true)\n public void onInventoryClick(@NotNull InventoryClickEvent event) {\n if (!(event.getInventory().getHolder() instanceof Gui)) {\n return;\n }\n\n Gui gui = (Gui) event.getInventory().getHolder();\n Consumer<InventoryClickEvent> onOutsideClick = gui.getOnOutsideClick();\n\n if (onOutsideClick != null && event.getClickedInventory() == null) {\n onOutsideClick.accept(event);\n return;\n }\n\n Consumer<InventoryClickEvent> onGlobalClick = gui.getOnGlobalClick();\n\n if (onGlobalClick != null) {\n onGlobalClick.accept(event);\n }\n\n InventoryView view = event.getView();\n Inventory inventory = Gui.getInventory(view, event.getRawSlot());\n\n if (inventory == null) {\n return;\n }\n\n Consumer<InventoryClickEvent> onTopClick = gui.getOnTopClick();\n\n if (onTopClick != null && inventory.equals(view.getTopInventory())) {\n onTopClick.accept(event);\n }\n\n Consumer<InventoryClickEvent> onBottomClick = gui.getOnBottomClick();\n\n if (onBottomClick != null && inventory.equals(view.getBottomInventory())) {\n onBottomClick.accept(event);\n }\n\n if ((inventory.equals(view.getBottomInventory()) && gui.getState() == Gui.State.TOP) ||\n event.getCurrentItem() == null) {\n return;\n }\n\n List<Pane> panes = gui.getPanes();\n\n //loop through the panes reverse, because the pane with the highest priority (last in list) is most likely to have the correct item\n for (int i = panes.size() - 1; i >= 0; i--) {\n if (panes.get(i).click(gui, event, 0, 0, 9, gui.getRows() + 4))\n break;\n }\n }", "@Override\n public List<Item> viewAllItems() {\n // calls List<Item> itemRepo.findCatalog();\n return itemRepo.findCatalog();\n }", "public void printInventory()\n { \n System.out.println();\n\n // Checks if the player has items.\n if(!(getPerson(PLAYER).getInventory().getItems().isEmpty())){\n System.out.println(\"In your backpack, you have:\");\n\n // Gets each item in the player's inventory.\n for(Item item: getPerson(PLAYER).getInventory().getItems()){\n System.out.print(item.getName() + \",\");\n }\n System.out.println();\n System.out.println(\"You are carrying \"+ getPerson(PLAYER).getWeight() + \"kg.\");\n }\n else{\n System.out.println(\"There are currently no items in your backpack.\");\n }\n System.out.println();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n input_prac_type.setText(renewal[which]);\n Currentitem = mParam1.get(which);\n input_prac_price.setText(\"RM\"+String.valueOf(mParam1.get(which).price));\n Log.e(\"equipment select\",Currentitem.name);\n }", "private void makeStockMenu() {\r\n\t\tJMenu stockMnu = new JMenu(\"Inventario\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Inventario\")) {\r\n\t\t\tisAccesible = true;\r\n\r\n\t\t\tif (StoreCore.getAccess(\"AgregarInventario\")) {\r\n\t\t\t\tJMenuItem addItem = new JMenuItem(\"Agregar Articulo\");\r\n\t\t\t\taddItem.setMnemonic('a');\r\n\t\t\t\taddItem.setToolTipText(\"Agregar rapidamente un nuevo articulo\");\r\n\t\t\t\taddItem.addActionListener(new ActionListener() {\r\n\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\t\tnew AddStockItem(\"\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t\t\tstockMnu.add(addItem);\r\n\t\t\t}\r\n\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Listar Inventario\",\r\n\t\t\t\t\timageLoader.getImage(\"world.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'v', \"Ver el inventario\",\r\n\t\t\t\t\tKeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), Stock.class);\r\n\t\t\tstockMnu.add(menuItem);\r\n\t\t\tstockMnu.addSeparator();\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Kardex\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Ver Kardex\", \r\n\t\t\t\t\timageLoader.getImage(\"kardexSingle.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'k', \"Ver el kardex\", null,\r\n\t\t\t\t\tKardex.class);\r\n\t\t\tstockMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tstockMnu.setMnemonic('i');\r\n\t\t\tadd(stockMnu);\r\n\t\t}\r\n\t}", "public interface InventoryService {\n\n /**\n * Lists the inventory.\n * @return List of the inventory\n */\n List<Inventory> getInventoryList();\n\n /**\n * Executes an order using an OrderForm.\n * @param orderForm\n * @return\n * @throws Exception\n */\n List<Inventory> executeOrder(OrderForm orderForm) throws Exception;\n\n /**\n * Resets the data.\n */\n void reset();\n\n}", "@EventHandler\n public void onInventoryClick(InventoryClickEvent e)\n {\n Player player = (Player) e.getWhoClicked();\n if(player.getOpenInventory().getTitle() == \"§6§l[§a§lGuildMC§6§l] §r§eGuild Master\" || player.getOpenInventory().getTitle() == \"§6§l[§a§lGuildMC§6§l] §r§eRaid GUI\"){\n if(e.getCurrentItem().getType() == Material.NETHER_STAR){\n GuildMCFunctions functions = new GuildMCFunctions();\n functions.addPlayerToCreatorList(player);\n }\n e.setCancelled(true);\n }\n }", "public abstract List<String> getUserInventory();", "public void openInventory ( InventoryView inventory ) {\n\t\texecute ( handle -> handle.openInventory ( inventory ) );\n\t}", "public void display_inventory() {\n\t\t// displays all identified crystals\n\t\tfor(int i = 0;i<maxInvSize;i++) {\n\t\t\tif(identifiedArray[i] != null) {\n\t\t\t\tcrystal_description(identifiedArray[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void drawInventory() {\n Texture highlight = createInventoryHighlight();\n InventoryComponent inventory = gameWorld.getHero().getInventory();\n\n float originX = ((VIRTUAL_HEIGHT * Gdx.graphics.getWidth() / Gdx.graphics.getHeight()) / 2) - (inventory.getSize() * ITEM_BACKGROUND_SIZE) / 2;\n\n Item[] items = inventory.getItems();\n for (int i = 0; i < inventory.getSize(); i++) {\n hudBatch.draw(background, originX + i * ITEM_BACKGROUND_SIZE, 0, ITEM_BACKGROUND_SIZE, ITEM_BACKGROUND_SIZE);\n if (items[i] != null) {\n if (inventory.getSelectedItem() != null && items[i] == inventory.getSelectedItem()) {\n hudBatch.draw(highlight, originX + i * ITEM_BACKGROUND_SIZE, 0, ITEM_BACKGROUND_SIZE, ITEM_BACKGROUND_SIZE / 12);\n }\n float itemOffset = ITEM_BACKGROUND_SIZE / 2 - calculateItemWidth(items[i]) / 2;\n hudBatch.draw(items[i].getTexture(), (originX + i * INVENTORY_ITEM_SIZE) + itemOffset, 0, calculateItemWidth(items[i]), INVENTORY_ITEM_SIZE);\n }\n }\n }", "private void showFullMenu() {\r\n Menu[] menu = MenuFactory.showMenu();\r\n System.out.println(\"Menu_Id \\t Food_Name \\t Food_Type \\t\\t Calories \\t Food_Amount\");\r\n for (Menu m : menu) {\r\n System.out.println(m.getFoodId() + \"\\t\\t\" + m.getFoodName() + \"\\t\\t\" + m.getFoodType() + \"\\t\\t\\t\" + m.getCalories() + \"\\t\\t\" + m.getFoodAmt());\r\n }\r\n }", "@EventHandler\n public void onInventoryClick(InventoryClickEvent e) {\n // Check if it is one of our inventories\n if (!(e.getInventory().getHolder() instanceof InventoryEvent)) return;\n\n // Cancel the event so the player can't take the item\n e.setCancelled(true);\n\n // Check if it was air or null\n if (e.getCurrentItem() == null || e.getCurrentItem().getType() == Material.AIR) return;\n\n // Get the sign in progress\n ShopSign cur = null;\n for( ShopSign sign : signs) {\n if(sign.owner.equalsIgnoreCase(e.getWhoClicked().getUniqueId().toString())) {\n cur = sign;\n break;\n }\n }\n\n // Check if cur is null\n if(cur == null) {\n return;\n }\n\n // Check if the sign is done\n if(cur.done) {\n return;\n }\n\n // Set the can remove flag to true\n can_remove = true;\n\n // Get the player\n HumanEntity player = e.getWhoClicked();\n\n // Get the inventory that was clicked\n Inventory inv = clone_inv(e.getClickedInventory(), e.getView().getTitle());\n\n // Get the clicked item\n ItemStack clicked = e.getCurrentItem();\n ItemMeta clicked_meta = clicked.getItemMeta();\n\n // Check if it was exit\n if(clicked_meta.getDisplayName().equalsIgnoreCase(\"exit\") && e.getRawSlot() == 0) {\n // Remove the in progress sign\n signs.remove(cur);\n\n e.getWhoClicked().closeInventory();\n return;\n }\n\n // Make sure it's not removed when switching the UI\n can_remove = false;\n\n // Check if it was to proceed\n if(clicked_meta.getDisplayName().equalsIgnoreCase(\"next\") && e.getRawSlot() == 8) {\n if(e.getView().getTitle().equalsIgnoreCase(\"Item Amount\")) {\n player.openInventory(itemPrice);\n } else {\n player.sendMessage(\"Now right click on a chest to select it!\");\n player.closeInventory();\n }\n return;\n }\n\n // Check if it is buying or selling\n else if(e.getView().getTitle().equalsIgnoreCase(\"Selling or Buying\")) {\n // If it was selling\n if(clicked_meta.getDisplayName().equalsIgnoreCase(\"Buy\") && e.getRawSlot() == 5) {\n cur.selling = false;\n }\n // If it was buying\n else if(clicked_meta.getDisplayName().equalsIgnoreCase(\"Sell\") && e.getRawSlot() == 3) {\n cur.selling = true;\n }\n\n inv = clone_inv(itemAmount, \"Item Amount\");\n inv.setItem(4, cur.item);\n player.openInventory(inv);\n }\n\n // Check if it was an increase or decrease in amount\n else if(e.getView().getTitle().equalsIgnoreCase(\"Item Amount\")) {\n // If it was green wool\n if(clicked_meta.getDisplayName().equalsIgnoreCase(\"More\") && e.getRawSlot() == 5) {\n // Make sure were not at the max stack size\n if(cur.item.getAmount() == cur.item.getMaxStackSize()) {\n return;\n }\n\n // Add one to the amount of the in progress sign\n cur.item.setAmount(cur.item.getAmount()+1);\n\n // Update the ui\n inv.setItem(4, cur.item);\n player.openInventory(inv);\n return;\n }\n\n // If it was red wool\n else if(clicked_meta.getDisplayName().equalsIgnoreCase(\"Less\") && e.getRawSlot() == 3) {\n // Make sure were not at the stack minimum\n if(cur.item.getAmount() == 1) {\n return;\n }\n\n // Subtract one from the amount of the in progress sign\n cur.item.setAmount(cur.item.getAmount()-1);\n\n // Update the ui\n inv.setItem(4, cur.item);\n player.openInventory(inv);\n return;\n }\n }\n\n // Check if we are changing the price\n else if(e.getView().getTitle().equalsIgnoreCase(\"Item Price\")) {\n // If it was green wool\n if(clicked_meta.getDisplayName().equalsIgnoreCase(\"More\") && e.getRawSlot() == 5) {\n // Make sure were not at the max stack size\n if(cur.price == 64) {\n return;\n }\n\n // Add one to the amount of the in progress sign\n cur.price++;\n\n // Update the ui\n inv.setItem(4, new ItemStack(Material.GOLD_INGOT, cur.price));\n player.openInventory(inv);\n return;\n }\n\n // If it was red wool\n else if(clicked_meta.getDisplayName().equalsIgnoreCase(\"Less\") && e.getRawSlot() == 3) {\n // Make sure were not at the stack minimum\n if(cur.price == 1) {\n return;\n }\n\n // Subtract one from the amount of the in progress sign\n cur.price--;\n\n // Update the ui\n inv.setItem(4, new ItemStack(Material.GOLD_INGOT, cur.price));\n player.openInventory(inv);\n return;\n }\n }\n\n // Allow removal again\n can_remove = true;\n }", "public static void inventoryListHeader() {\n System.out.println(\n UI.prettyPrint(\"Items Name\", 15) + \" | \"\n + UI.prettyPrint(\"Price\", 10) + \" | \"\n + UI.prettyPrint(\"Quantity\", 5));\n }", "private Menu createServiceMenu() {\r\n\t\tMenu serviceMenu = new Menu(\"Service\");\r\n\r\n\t\tstartService = new MenuItem(\"Start\");\r\n\t\tstartService.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tlocalPeer.startService();\r\n\t\t\t}\r\n\t\t});\r\n\t\tserviceMenu.add(startService);\r\n\r\n\t\tstopService = new MenuItem(\"Stop\");\r\n\t\tstopService.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tlocalPeer.stopService();\r\n\t\t\t}\r\n\t\t});\r\n\t\tstopService.setEnabled(false);\r\n\t\tserviceMenu.add(stopService);\r\n\r\n\t\treturn serviceMenu;\r\n\t}", "@Override\n\tpublic void openInventory(EntityPlayer player) {\n\t\t\n\t}", "@Override\n\tpublic void openInventory(EntityPlayer player) {\n\t\t\n\t}", "private void menuOptionOne(){\n SimulatorFacade.printTransactions();\n pressAnyKey();\n }", "public Inventory getInventory(){\n return inventory;\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_transport, menu);\r\n return true;\r\n }", "@EventHandler(ignoreCancelled = true)\n public void onARSTerminalClick(InventoryClickEvent event) {\n Inventory inv = event.getInventory();\n String name = inv.getTitle();\n if (name.equals(\"§4Architectural Reconfiguration\")) {\n event.setCancelled(true);\n final Player player = (Player) event.getWhoClicked();\n UUID uuid = player.getUniqueId();\n ids.put(uuid, getTardisId(player.getUniqueId().toString()));\n int slot = event.getRawSlot();\n if (slot != 10 && !hasLoadedMap.contains(uuid)) {\n TARDISMessage.send(player, \"ARS_LOAD\");\n return;\n }\n if (slot >= 0 && slot < 54) {\n switch (slot) {\n case 1:\n case 9:\n case 11:\n case 19:\n // up\n moveMap(uuid, inv, slot);\n break;\n case 4:\n case 5:\n case 6:\n case 7:\n case 8:\n case 13:\n case 14:\n case 15:\n case 16:\n case 17:\n case 22:\n case 23:\n case 24:\n case 25:\n case 26:\n case 31:\n case 32:\n case 33:\n case 34:\n case 35:\n case 40:\n case 41:\n case 42:\n case 43:\n case 44:\n if (!checkSlotForConsole(inv, slot)) {\n // select slot\n selected_slot.put(uuid, slot);\n }\n break;\n case 10:\n // load map\n loadMap(inv, uuid);\n break;\n case 12:\n // reconfigure\n close(player);\n break;\n case 27:\n case 28:\n case 29:\n // switch level\n if (map_data.containsKey(uuid)) {\n switchLevel(inv, slot, uuid);\n TARDISARSMapData md = map_data.get(uuid);\n setMap(md.getY(), md.getE(), md.getS(), uuid, inv);\n setLore(inv, slot, null);\n } else {\n setLore(inv, slot, \"Load map data first!\");\n }\n break;\n case 30:\n // reset selected slot to empty\n if (selected_slot.containsKey(uuid)) {\n // check whether original loaded slot was a room - as it will need to be jettisoned, not reset\n if (checkSavedGrid(uuid, selected_slot.get(uuid), 0)) {\n setLore(inv, slot, \"You cannot reset the selected slot!\");\n break;\n } else {\n ItemStack stone = new ItemStack(Material.STONE, 1);\n ItemMeta s1 = stone.getItemMeta();\n s1.setDisplayName(\"Empty slot\");\n stone.setItemMeta(s1);\n setSlot(inv, selected_slot.get(uuid), stone, uuid, true);\n setLore(inv, slot, null);\n }\n } else {\n setLore(inv, slot, \"No slot selected!\");\n }\n break;\n case 36:\n // scroll left\n int startl;\n int max = room_ids.size() - 9;\n if (scroll_start.containsKey(uuid)) {\n startl = scroll_start.get(uuid) + 1;\n if (startl >= max) {\n startl = max;\n }\n } else {\n startl = 1;\n }\n scroll_start.put(uuid, startl);\n for (int i = 0; i < 9; i++) {\n // setSlot(Inventory inv, int slot, int id, String room, UUID uuid, boolean update)\n setSlot(inv, (45 + i), room_ids.get(startl + i), room_names.get(startl + i), uuid, false);\n }\n break;\n case 38:\n // scroll right\n int startr;\n if (scroll_start.containsKey(uuid)) {\n startr = scroll_start.get(uuid) - 1;\n if (startr <= 0) {\n startr = 0;\n }\n } else {\n startr = 0;\n }\n scroll_start.put(uuid, startr);\n for (int i = 0; i < 9; i++) {\n // setSlot(Inventory inv, int slot, int id, String room, UUID uuid, boolean update)\n setSlot(inv, (45 + i), room_ids.get(startr + i), room_names.get(startr + i), uuid, false);\n }\n break;\n case 39:\n // jettison\n if (selected_slot.containsKey(uuid)) {\n // need to check for gravity wells, and jettison both layers...\n ItemStack tnt = new ItemStack(Material.TNT, 1);\n ItemMeta j = tnt.getItemMeta();\n j.setDisplayName(\"Jettison\");\n tnt.setItemMeta(j);\n setSlot(inv, selected_slot.get(uuid), tnt, uuid, true);\n setLore(inv, slot, null);\n } else {\n setLore(inv, slot, \"No slot selected!\");\n }\n break;\n case 45:\n case 46:\n case 47:\n case 48:\n case 49:\n case 50:\n case 51:\n case 52:\n case 53:\n // put room in selected slot\n if (selected_slot.containsKey(uuid)) {\n // check whether original loaded slot was a room - as it will need to be jettisoned, not reset\n if (checkSavedGrid(uuid, selected_slot.get(uuid), 0)) {\n setLore(inv, slot, \"Jettison existing room first!\");\n break;\n } else {\n ItemStack ris = inv.getItem(slot);\n String displayName = ris.getItemMeta().getDisplayName();\n String room;\n room = TARDISARS.ARSFor(displayName).getActualName();\n if (!player.hasPermission(\"tardis.room.\" + room.toLowerCase())) {\n setLore(inv, slot, \"You don't have permission for this room!\");\n break;\n }\n if (room.equals(\"GRAVITY\") || room.equals(\"ANTIGRAVITY\")) {\n int updown = (room.equals(\"GRAVITY\")) ? -1 : 1;\n if (checkSavedGrid(uuid, selected_slot.get(uuid), updown)) {\n setLore(inv, slot, \"Using a gravity well here would overwrite an existing room!\");\n break;\n }\n }\n if (plugin.getConfig().getBoolean(\"growth.rooms_require_blocks\")) {\n if (!hasCondensables(player.getUniqueId().toString(), room, ids.get(uuid))) {\n setLore(inv, slot, \"You haven't condensed enough blocks for this room!\");\n break;\n }\n }\n if (room.equals(\"RENDERER\") && hasRenderer(uuid)) {\n setLore(inv, slot, \"You already have one of these!\");\n break;\n }\n // setSlot(Inventory inv, int slot, ItemStack is, String player, boolean update)\n setSlot(inv, selected_slot.get(uuid), ris, uuid, true);\n setLore(inv, slot, null);\n }\n } else {\n setLore(inv, slot, \"No slot selected!\");\n }\n break;\n default:\n break;\n }\n }\n }\n }" ]
[ "0.6049224", "0.6033736", "0.59395874", "0.59150124", "0.591212", "0.5886931", "0.58848506", "0.58468866", "0.58449036", "0.58309877", "0.5687193", "0.5676263", "0.56738234", "0.5619211", "0.5600939", "0.55751", "0.5570459", "0.5515078", "0.5506955", "0.54920965", "0.54649967", "0.54616", "0.5453188", "0.545037", "0.5442386", "0.54070103", "0.53705317", "0.536841", "0.53604853", "0.5357585", "0.5356813", "0.535172", "0.5343155", "0.5335174", "0.53292346", "0.5329172", "0.53274757", "0.53255355", "0.5320919", "0.5291598", "0.52872944", "0.52779025", "0.527627", "0.5266971", "0.52625346", "0.52565956", "0.52546775", "0.52494085", "0.52487004", "0.5246683", "0.5244886", "0.5241868", "0.52409494", "0.5240518", "0.52397084", "0.5232375", "0.52281386", "0.52233034", "0.52228695", "0.52142143", "0.52134734", "0.5212998", "0.5210051", "0.51912475", "0.5190732", "0.5179983", "0.5178595", "0.5178278", "0.5169187", "0.5158422", "0.5155689", "0.514353", "0.51424825", "0.5140108", "0.5140005", "0.51395935", "0.51367986", "0.513576", "0.51352626", "0.5134089", "0.51291364", "0.51272064", "0.512589", "0.5125784", "0.511771", "0.51161706", "0.51093394", "0.5100515", "0.51003766", "0.50987166", "0.5096159", "0.50912094", "0.50907594", "0.50874555", "0.5085863", "0.5083126", "0.5083126", "0.5073151", "0.5069969", "0.5061746", "0.5061626" ]
0.0
-1
adding service side option to view the next order in line
public Order viewOrders() { EntityManager em = emfactory.createEntityManager(); em.getTransaction().begin(); //Order nextOrder = return nextOrder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String showCurrentOrder(){\n stringBuilder = new StringBuilder();\n for (int i = 0; i < OrderManager.getInstance().getOrder().size(); i++) {\n stringBuilder.append((i + 1) + \". \" + OrderManager.getInstance().getOrder().get(i).toString() + \"\\n\");\n }\n return stringBuilder.toString();\n }", "public void incrementOrder() {\n mOrder++;\n }", "public void incrementOrder(View view) {\n final int numberOfCoffees = getNumberOfCoffees();\n if (numberOfCoffees == Constants.MAX_NUM_COFFEES_IN_ORDER) {\n Toast.makeText(getApplicationContext(),\n \"Maximum number of coffees in one order reached\",\n Toast.LENGTH_SHORT).show();\n return;\n }\n displayQuantity(numberOfCoffees+1);\n }", "@Override\n\tpublic String getNextOrderNumber() {\n\t\t// TODO Auto-generated method stub\n\t\treturn \"ORD\"+sequenceNumberDao.findNextSequenceType(ESequenceType.ORDER);\n\t}", "@VTID(10)\r\n int getOrder();", "private void printUpdateOrderMenu()\n {\n System.out.println(\"\");\n System.out.println(\"*** Opdater Salg ***\");\n System.out.println(\"(0) Tilbage\");\n System.out.println(\"(1) Opdater Medarbejder\");\n System.out.println(\"(2) Opdater Kunde\");\n System.out.println(\"(3) Opdater Produkt\");\n System.out.println(\"(4) Tilføj Produkt\");\n System.out.println(\"(5) Bekræft\");\n System.out.print(\"Valg: \");\n }", "public void addToOrder() {\n OrderLine orderLine = new OrderLine(order.lineNumber++, sandwhich, sandwhich.price());\n order.add(orderLine);\n ObservableList<Extra> selected = extraSelected.getItems();\n orderPrice.clear();\n String price = new DecimalFormat(\"#.##\").format(sandwhich.price());\n orderPrice.appendText(\"$\"+price);\n extraOptions.getItems().addAll(selected);\n extraSelected.getItems().removeAll(selected);\n pickSandwhich();\n\n\n\n }", "private static void placeOrder() {\n System.out.println();\n System.out.println(\"Menu : \");\n for (int i = 0; i < menuItems.length; i++) {\n System.out.printf(\"%2d. %-30s Price: %8.2f Baht%n\", i + 1, menuItems[i], menuPrices[i]);\n }\n System.out.println();\n\n int orderNo = getIntReply(\"What would you like to menuOrder (by menu number)\");\n if (orderNo > menuOrder.length || orderNo == -1) {\n System.out.println(\"Invalid menu number\");\n return;\n }\n\n int amount = getIntReply(\"How many of them\");\n if (amount == -1) return;\n menuOrder[orderNo - 1] += amount;\n\n System.out.printf(\"You've ordered %s for %d piece(s)%n%n\", menuItems[orderNo - 1], menuOrder[orderNo - 1]);\n }", "public int getOrder();", "public String[] viewOrder(Session session) throws RemoteException{\n\t\tSystem.out.println(\"Server model invokes viewOrder() method\");\n\t\treturn null;\n\t\t\n\t}", "public void visitRemoteOrderDisplay( DevCat devCat ) {}", "private void requestOrderDetail() {\n\n ModelHandler.OrderRequestor.requestOrderDetail(client, mViewData.getOrder().getId(), (order) -> {\n mViewData.setOrder(order);\n onViewDataChanged();\n }, this::showErrorMessage);\n }", "private void inOrder() {\n inOrderTraversal(0);\n System.out.println(); // jump to next line\n }", "public void setOrder(int order) {\n this.order = order;\n }", "public void setOrder(int order) {\n this.order = order;\n }", "void setOrder(int order){\r\n\t\t\tthis.order = order;\r\n\t\t}", "public static void viewOrder() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Viewing existing orders************\");\n\t\t// TODO - implement RRPSS.viewOrder\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\t\tOrderedPackageManager orderedPackageManager = new OrderedPackageManager();\n\t\tList listOfOrderedPromotionalPackage = null;\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to view the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tlistOfOrderedItems = orderedItemManager\n\t\t\t\t\t.retrieveOrderedItemsByOrderID(order.getId());\n\t\t\tlistOfOrderedPromotionalPackage = orderedPackageManager\n\t\t\t\t\t.retrieveOrderedPackageByOrderID(order.getId());\n\n\t\t\tif (listOfOrderedItems.size() == 0\n\t\t\t\t\t&& listOfOrderedPromotionalPackage.size() == 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\tSystem.out.println(\"Order is empty!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t\tif (listOfOrderedItems.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"All Cart Items Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedItems.size(); j++) {\n\t\t\t\t\tOrderedItem orderedItem = (OrderedItem) listOfOrderedItems\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedItem.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\n\t\t\tif (listOfOrderedPromotionalPackage.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"Promotional Packages Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedPromotionalPackage.size(); j++) {\n\t\t\t\t\tOrderedPackage orderedPackage = (OrderedPackage) listOfOrderedPromotionalPackage\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedPackage.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of viewing orders************\");\n\t}", "public void setOrder(Order order){\n this.order = order;\n }", "private void printCreateOrderMenu()\n {\n System.out.println(\"\");\n System.out.println(\"*** Opret Salg ***\");\n System.out.println(\"(0) Tilbage\");\n System.out.println(\"(1) Tilføj Medarbejder\");\n System.out.println(\"(2) Tilføj Kunde\");\n System.out.println(\"(3) Tilføj Produkt\");\n System.out.println(\"(4) Bekræft\");\n System.out.print(\"Valg: \");\n }", "@Override\n\tpublic int getOrder() {\n\t\treturn 1;\n\t}", "public void gotoDetailSalesOrder() {\n\t}", "public void setOrder(int value) {\n this.order = value;\n }", "public void viewOrderDetails(){\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"StatisticsTab\"), \"StatisticsTab\");\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"OrdersTab\"), \"OrdersTab\");\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"BtnOrderDetails\"), \"Order Details Button\");\t\n\t}", "public String processOrder() {\n notifyAllObservers();\n\n return getOrderReport();\n }", "private void showOrderDetails(Order order) {\n\t\tString status, shownOption;\n\n\t\tif (order.getStatus()) {\n\t\t\tstatus = new String();\n\t\t\tstatus = \"Processed\";\n\n\t\t\tshownOption = new String();\n\t\t\tshownOption = \"Return\";\n\t\t}\n\t\telse {\n\t\t\tstatus = new String();\n\t\t\tshownOption = new String();\n\n\t\t\tstatus = \"Pending\";\n\t\t\tshownOption = \"Set Processed\";\n\t\t}\n\n\t\tString orderDetailsMessage = \"ORDER DATE : \" + order.getDate();\n\t\torderDetailsMessage += \"\\nSTATUS: \" + status;\n\t\torderDetailsMessage += \"\\nITEMS: \";\n\t\tfor (StockItem stockItem : order.getOrderEntryList()) {\n\t\t\torderDetailsMessage += \"\\n \" + stockItem.getQuantity() + \" \\t x \\t \"\n\t\t\t\t\t+ stockItem.getProduct().getProductName() + \" \\t\\t\\t Subtotal: \\t\\u20ac\"\n\t\t\t\t\t+ (stockItem.getProduct().getRetailPrice() * stockItem.getQuantity());\n\t\t}\n\n\t\torderDetailsMessage += \"\\n\\nCUSTOMER ID: \" + order.getPerson().getId()\n\t\t\t\t+ \"\\nPersonal Details: \";\n\t\torderDetailsMessage += \"\\n Name: \\t\" + order.getPerson().getName();\n\t\torderDetailsMessage += \"\\n Phone: \\t\" + order.getPerson().getContactNumber();\n\t\torderDetailsMessage += \"\\n Address: \\t\" + order.getPerson().getAddress();\n\t\torderDetailsMessage += \"\\n\\nThe total order value is \\t\\u20ac\"\n\t\t\t\t+ order.getGrandTotalOfOrder() + \"\\n\";\n\n\t\tObject[] options = { \"OK\", shownOption };\n\t\tint n = JOptionPane.showOptionDialog(null, orderDetailsMessage, \"ORDER ID: \"\n\t\t\t\t+ (order.getId()) + \" STAFF ID: \" + order.getCurrentlyLoggedInStaff().getId()\n\t\t\t\t+ \" STATUS : \" + status /* order.isStatus() */, JOptionPane.YES_NO_OPTION,\n\t\t\t\tJOptionPane.PLAIN_MESSAGE, null, options, options[0]);\n\t\tif (n == 1) {\n\t\t\torder.setStatus(true);\n\t\t}\n\t}", "@Override\n\tpublic void placeOrder() {\n\t\t\n\t}", "public void setOrder(Integer order) {\n this.order = order;\n }", "@Override\n\tpublic void openOrderEnd() {\n\t}", "@Test\n\tpublic void findAllOrderLines() {\n\t\t// TODO: JUnit - Populate test inputs for operation: findAllOrderLines \n\t\tInteger startResult = 0;\n\t\tInteger maxRows = 0;\n\t\tList<OrderLine> response = null;\n\t\tresponse = service.findAllOrderLines(startResult, maxRows);\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: findAllOrderLines\n\t}", "int getOrder(){\r\n\t\t\treturn this.order;\r\n\t\t}", "public void setOrder(Integer order) {\n this.order = order;\n }", "public void setOrder(Integer order) {\n this.order = order;\n }", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "void createOrderText(Client_H client, ProductController_H menu) throws OrderLineFullListException;", "public Integer getOrder();", "private void orderItem(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "public Order viewOrder(int on) {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\tOrder found = em.find(Order.class, on);\r\n\t\tem.close();\r\n\t\treturn found;\r\n\t}", "public void provideOrderAccess() {\n\t\tint choiceOrder = View.NO_CHOICE;\n\t\t// get customer id and date for the order\n\t\tLong customerId = view.readIDWithPrompt(\"Enter Customer ID for Order: \");\n\t\tif (customerId == null) {\n\t\t\tSystem.out.println(\"Error: Customer Not Found.\");\n\t\t}\n\t\tLong orderId = view.readIDWithPrompt(\"Enter new Unique ID for Order: \");\n\t\tDate currDate = new Date();\n\n\t\t// create the order,\n\t\t// add the orderID to Customer\n\t\tatMyService.placeOrder(customerId, orderId, currDate);\n\n\t\t// enter loop to add items to the order\n\t\tArrayList<Long[]> items = new ArrayList<Long[]>();\n\t\twhile (choiceOrder != View.ENDORDER) {\n\t\t\t// display the order menu\n\t\t\tview.menuOrder();\n\t\t\tchoiceOrder = view.readIntWithPrompt(\"Enter choice: \");\n\t\t\tswitch (choiceOrder) {\n\t\t\t\tcase View.ADD_ORDER_ITEM:\n\t\t\t\t\tLong itemID = view.readIDWithPrompt(\"Enter Item ID: \");\n\t\t\t\t\t// note: Needs to be Long for Long[] below. \n\t\t\t\t\t//Also, i DO want to use readID rather than readInt then convert to long,\n\t\t\t\t\t// because I do not want amt to be negative. \n\t\t\t\t\tLong amt = view.readIDWithPrompt(\"Enter Amount: \");\n\t\t\t\t\t// check to see if the item exists and is in stock\n\t\t\t\t\tItem temp = atMyService.findItem(itemID);\n\t\t\t\t\tif (temp == null) {\n\t\t\t\t\t\tSystem.out.println(\"Item '\" + itemID + \"' not found. Item skipped.\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((temp.getStock() - amt) < 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"There is only '\" + temp.getStock() + \"' of this item left. Please try again.\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// add the items to the arrayList\n\t\t\t\t\t\t\tLong[] toAdd = { itemID, amt };\n\t\t\t\t\t\t\titems.add(toAdd);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase View.ENDORDER:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// convert arrayList to array, add to orders.\n\t\tif (!(items.isEmpty())) {\n\t\t\tLong[][] array = new Long[items.size()][2];\n\t\t\tfor (int i = 0; i < items.size(); i++) {\n\t\t\t\tarray[i][0] = items.get(i)[0];\n\t\t\t\tarray[i][1] = items.get(i)[1];\n\t\t\t}\n\t\t\tatMyService.addOrderItems(orderId, array);\n\t\t}\n\t}", "void run() {\n System.out.println(\"Enter a date (MM/DD/YY): \");\n Scanner scan = new Scanner(System.in);\n String date = scan.next();\n ArrayList<Order> orders = Screen.state.getOrdersByOrderDate(date);\n int index = 0;\n if (orders.size() != 0) {\n while (true) {\n System.out.print(orders.get(index).toString());\n System.out.println(\"Press n for Next, p for Previous\");\n scan = new Scanner(System.in);\n String key = scan.next();\n if (key.equalsIgnoreCase(\"n\")) {\n if (index == orders.size() - 1) {\n index = 0;\n } \n else {\n index++;\n }\n } \n else if (key.equalsIgnoreCase(\"p\")) {\n if (index == 0) {\n index = orders.size() - 1;\n } \n else {\n index--;\n }\n } \n else {\n break;\n }\n }\n } \n else {\n System.out.println(\"No such order\");\n System.out.println(\"Press any key to continue\");\n scan = new Scanner(System.in);\n scan.next();\n }\n this.prev.run();\n }", "List<RoutePoint> getRoutePointsForOrder(Order order);", "@Override\n public int getOrder() {\n return 4;\n }", "@GetMapping(\"/order\")\n\t public String getAllOrders() {\n\t \tList<Order> orders = oService.getAllOrers();\n\t StringBuffer ordertext = new StringBuffer();\n\t orders.parallelStream().forEach(ord->{\n\t \t ordertext.append(\"<tr><td>\"+ord.getOrdid()+\"</td>\") ;\n\t ordertext.append(\"<td><span class=\\\"badge badge-secondary\\\">\"+ord.getPaymentstatus()\n\t +\"</span></td>\") ;\n\t ordertext.append(\"<td>\"+ord.getPaymentgroup()+\"</td>\") ; \n\t ordertext.append(\"<td><span class=\\\"badge badge-success\\\">\"+ord.getOrdstatus()+\"</span></td>\");\n\t ordertext.append(\"<td>\"+ord.getOrderdate()+\"</td>\") ;\n\t ordertext.append(\"<td>\"+ord.getTotal()+\"</td>\") ;\n\t ordertext.append(\"<td><span class=\\\"fa fa-eye\\\" style=\\\"cursor:pointer;\\\" onclick=\\\"showprd('\"+ord.getOrdid()+\"')\\\" title=\\\"view details\\\"> </span>\") ;\n\t ordertext.append(\"<span class=\\\"fa fa-remove\\\" style=\\\"cursor:pointer;\\\" onclick=\\\"\\\" title=\\\"cancel\\\"></span></td>\") ;\n\t });\n\t return ordertext.toString() ;\n\t }", "private void printCurrentOrderMenu(Shop shop) {\n System.out.println(shop.orderListToString());\n }", "public void setOrder(int order) {\n\t\tthis.order = order;\n\t}", "private void postOrder() {\n postOrderTraversal(0);\n System.out.println(); // jump to next line\n }", "public void setOrder(int order) {\n this.order = order;\n paint();\n }", "public void printOrderItem(){\r\n\t\tSystem.out.print(this.quantity+\" x \"+this.menuItem.getName()+\" ---- \");\r\n\t\tSystem.out.printf(\"$%.2f\\n\",this.calculatePrice());\r\n\t}", "public String displayOrderList(){\r\n // display = addFood() + \"\\n\" + addDrink() + \"\\n\" + addDessert();\r\n ArrayList<String> output = new ArrayList<>(); \r\n for(int i =0; i < allOrder.size(); i++){\r\n output.add(allOrder.get(i));\r\n }\r\n return String.valueOf(output);\r\n }", "@Override\r\n public int getOrder() {\r\n return this.order;\r\n }", "public List<OrderLine> getOrderLineList() {\n\t\tHttpServletRequest request = (HttpServletRequest)FacesContext.getCurrentInstance()\n\t\t\t\t.getExternalContext().getRequest();\n\t\tHttpSession session = ((HttpServletRequest) request).getSession(false);\n\t\t\n\t\t//recuperation du login\n\t\tlogin = (session != null) ? (LoginMB) session.getAttribute(\"loginMB\") : null;\n\t\t//recuperation du user\n\t\tSystem.out.println(\"login user from session : \"+login.getUser().getIdPerson());\n\t\torderList = orderBu.getLastOrder(login.getUser().getIdPerson());\n\t\t\n\t\tSet<OrderLine> set = new HashSet<OrderLine>();\n\t\tset = orderList.get(orderList.size()-1).getOrderLines();\n\t\torderLineList = new ArrayList<OrderLine>(set);\n\t\tsetTotal(orderList.get(orderList.size()-1).getTotalAmount());\n\t\t\n\t\t\n\t\treturn orderLineList;\n\t}", "public int getOrder() {\n return order;\n }", "public int getOrder() {\n return order;\n }", "@Override\n\tpublic void getOrders() {\n\t\t\n\t}", "public void listOrder()\r\n {o.listOrder();}", "@Override\r\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tnextOrder();\r\n\t\t\t\t\t\t}", "@Override\n\tpublic int getNextOperacionDetalle() {\n\t\treturn 0;\n\t}", "public String getOrder() {\n return this.Order;\n }", "Order getOrder();", "public void Show(int _order){\n\t\tSystem.out.println(_order + \": \" + name + \" is at floor #\" + actualFloor + \", he wants to go to floor #\" + targetFloor);\n\t}", "public void setOrder(List<Order> order) {\n this.order = order;\n }", "private static void writeToOrder() throws IOException {\n FileWriter write = new FileWriter(path5, append);\n PrintWriter print_line = new PrintWriter(write);\n ArrayList<Order> orders = Inventory.getOrderHistory();\n for (int i = 0; i < orders.size(); i++) {\n Order o = (Order) orders.get(i);\n\n String orderNum = String.valueOf(o.getOrderNumber());\n String UPC = String.valueOf(o.getUpc());\n String productName = o.getProductName();\n String distName = o.getDistributorName();\n String cost = String.valueOf(o.getCost());\n String quantity = String.valueOf(o.getQuantity());\n String isProcesed = String.valueOf(o.isProcessed());\n\n textLine =\n orderNum + \", \" + UPC + \", \" + quantity + \",\" + productName + \", \" + distName + \", \" + cost\n + \", \" + isProcesed;\n print_line.printf(\"%s\" + \"%n\", textLine);\n\n }\n print_line.close();\n\n }", "@Override\n public String getDescription() {\n return \"Ask order placement\";\n }", "void printOrder(double newBonus) {\n System.out.println(getDate());\n System.out.println();\n System.out.println(getCode());\n System.out.println();\n System.out.println(\"buyer name :\" + getBuyer().getName() + \" - \" + \"buyer id :\" + getBuyer().getCode());\n System.out.println();\n for(Product x : getBuy()) {\n System.out.println(\"code: - \" + x.getCode() + \", product: - \" + x.getName() + \" - amount - \" + x.getAmt() + \" prise - \" + x.getPrice() + \" sum - \" + x.getAmt()*x.getPrice());\n sum += x.getAmt()*x.getPrice();\n }\n System.out.println();\n System.out.println(\"your bonus is - \" + getBuyer().getBonus());\n System.out.println();\n System.out.println(\"the amount of your purchase - \" + (getSum()-getBuyer().getBonus()));\n System.out.println();\n System.out.println();\n System.out.println(\"Your bonus will be with the next purchase - \" + newBonus);\n\n }", "public Order generateNext();", "@Override\n\tpublic void eventSelectOrder() {\n\t\t\n\t}", "default int getOrder() {\n\treturn 0;\n }", "@Override\n public PurchaseOrderLine getOrderLine(int index) {\n return orderLines.get(index);\n }", "public void orderNow() throws Exception {\n\t\tQTiumAutomation.sleep(10);\n\t\tint item = 0;\n\t\tint range = 10;\n\t\tString clientName = Constants.CLIENT_NAME;\n\t\tString clientPhone = Constants.CLIENT_PHONE;\n\t\tSystem.out.println(\"click Order Now button & fill client info at RankingPage...\");\n\t\tdo {\n\t\t\titem = QTiumAutomation.randomIntNumber(range);\n\t\t\tString xpath = String.format(RankingPageEntity.ORDER_NOW_BUTTON, item);\n\t\t\tSystem.out.println(\">>>>> trying to click item: \" + xpath);\n\t\t\tBy element = By.xpath(xpath);\n\t\t\tif (QTiumAutomation.waitForElement(element)) {\n\t\t\t\tQTiumAutomation.scrollPageToElementAndClick(element);\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tSystem.err.println(\"NoSuchElement: \" + xpath);\n\t\t\t\trange = range / 2;\n\t\t\t}\n\t\t} while (range > 1);\n\t\tQTiumAutomation.sleep(5);\n\t\tdo {\n\t\t\tQTiumAutomation.enter(RankingPageEntity.CLIENT_NAME_TEXTBOX, clientName);\n\t\t\tQTiumAutomation.enter(RankingPageEntity.CLIENT_PHONE_TEXTBOX, clientPhone);\n\t\t\tQTiumAutomation.click(RankingPageEntity.SUBMIT_BUTTON);\n\t\t} while (QTiumAutomation.waitForElement(RankingPageEntity.NAME_ERROR)||\n\t\t\t\tQTiumAutomation.waitForElement(RankingPageEntity.PHONE_ERROR));\n\t}", "private void orderSegments() {\n //insert numOrder for the db\n int i = 0;\n for(TransportSegmentLogic transportSegment: transportSegments){\n transportSegment.setOrder(i);\n i++;\n }\n\n\n\n /*int i = 0;\n int j = 1;\n\n\n TransportSegmentLogic swapSegment;\n\n while(j < transportSegments.size()){\n if(transportSegments.get(j).getOrigin().equals(transportSegments.get(i).getDestination())){\n swapSegment = transportSegments.get(j);\n transportSegments.remove(swapSegment);\n transportSegments.add(i +1, swapSegment);\n i = i + 1;\n j = i + 1;\n }\n j++;\n }\n\n j = transportSegments.size() -1;\n\n while(j > i){\n if(transportSegments.get(j).getDestination().equals(transportSegments.get(0).getOrigin())){\n swapSegment = transportSegments.get(j);\n transportSegments.remove(swapSegment);\n transportSegments.add(0, swapSegment);\n i = i + 1;\n j = transportSegments.size();\n }\n j--;\n } */\n }", "void newOrder();", "public void orderSummaryPage(View v){\n\n String order = gatherOrder(v);\n\n Intent redirect = new Intent(this, SummaryActivity.class);\n redirect.putExtra(EXTRA_MESSAGE,order);\n startActivity(redirect);\n }", "private void getLargeOrderList(){\n sendPacket(CustomerTableAccess.getConnection().getLargeOrderList());\n \n }", "@Override\n public int getOrder() {\n return 0;\n }", "void showOrderText(int ID) throws OrderNotFoundException;", "public int getOrder() {\r\n\t\treturn order;\r\n\t}", "public void makeOrder(Order order) {\n for(Order_Item x : order.getOrdered()){\n TableRow item_row = build_row(x.getItem().getName(), String.valueOf(x.getQuantity()), (x.getPrice()*x.getQuantity()) + \"€\");\n orderLayout.addView(item_row);\n }\n\n refreshPriceView();\n }", "public static void helper(){\n System.out.println(\"\\n0: Search Transaction\");\n System.out.println(\"1: New Transaction\");\n System.out.println(\"2: Query Transaction Detail\");\n System.out.println(\"back: return last menu\");\n }", "@Override\n public void goToNextFragment(DeliverOederInfo t) {\n List<DeliverOederInfo> list = mAdapter.getData();\n for (int i = 0; i < list.size(); i++) {\n DeliverOederInfo info = list.get(i);\n if (info.getOrderId() == t.getOrderId()) {\n positionCheck = i;\n break;\n }\n }\n\n orderInfo = t;\n\n if (orderInfo.getIsChecked() == 1) {\n show(orderInfo, deliveryInfo);\n } else {\n submitOrderdetail(orderInfo.getOrderId());\n }\n\n }", "public void setOrder(int order) {\n mOrder = order;\n }", "void getOrders();", "public Short getOrderNo() {\n return orderNo;\n }", "public static void C_OrderLine(MOrderLine ol) {\n\t\tif (MUMOrderLine.isConsumesForecast(ol))\n\t\t\treturn;\n\n\t\tMPPMRP mrp = getQuery(ol, null, null).firstOnly();\n\t\tif (mrp == null) {\n\t\t\tmrp = new MPPMRP(ol.getCtx(), 0, ol.get_TrxName());\n\t\t\tmrp.setC_OrderLine_ID(ol.getC_OrderLine_ID());\n\t\t}\n\t\tmrp.setAD_Org_ID(ol.getAD_Org_ID());\n\t\tmrp.setC_Order(MUMOrderLine.getParent(ol));\n\t\tmrp.setDescription(ol.getDescription());\n\t\tmrp.setName(\"MRP\");\n\t\tmrp.setDatePromised(ol.getDatePromised());\n\t\tmrp.setDateStartSchedule(ol.getDatePromised());\n\t\tmrp.setDateFinishSchedule(ol.getDatePromised());\n\t\tmrp.setDateOrdered(ol.getDateOrdered());\n\t\tmrp.setM_Warehouse_ID(ol.getM_Warehouse_ID());\n\t\tmrp.setM_Product_ID(ol.getM_Product_ID());\n\t\tmrp.setQty(ol.getQtyOrdered().subtract(ol.getQtyDelivered()));\n\t\tmrp.save();\n\n\t\tMOrder o = MUMOrderLine.getParent(ol);\n\t\tMDocType dt = MDocType.get(o.getCtx(), o.getC_DocTypeTarget_ID());\n\t\tString DocSubTypeSO = dt.getDocSubTypeSO();\n\t\tMProduct product = new MProduct(ol.getCtx(), ol.getM_Product_ID(), ol.get_TrxName());\n\t\tif (MDocType.DOCSUBTYPESO_StandardOrder.equals(DocSubTypeSO) && product.isBOM() && !product.isPurchased()\n\t\t\t\t&& IsProductMakeToOrder(ol.getCtx(), ol.getM_Product_ID(), ol.get_TrxName())) {\n\t\t\tMPPMRP.createMOMakeTo(ol, ol.getQtyOrdered());\n\t\t}\n\n\t\treturn;\n\t}", "public void queryOrder(){\n\t\ttry{\n\t\t\tlock.lock();\n\t\t\tSystem.out.println(Thread.currentThread().getName()+\"查询到数据:\"+System.currentTimeMillis());\n\t\t\tThread.sleep(2000);\n\t\t}catch( Exception e){\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\tlock.unlock();\n\t\t}\n\t}", "@Override\n\tpublic void processViewOrderButtonClick(ProcessViewOrderObjectEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void order() {\n\t\tSystem.out.println(\"고객 판매 주문\");\n\t}", "public void printOrder(){\n System.out.println(count);\n \n double price=0;\n for (product object : this.pro_o) {\n System.out.println(object.getName() + \" quantity : \" + object.getQuantity()+\" price : \" + object.getPrice());\n price+=object.getQuantity()*object.getPrice();\n }\n System.out.println(\"total : \" + price );\n }", "void showOrdersText();", "public void setOrder(Integer order) {\n\t\tthis.order = order;\n\t}", "java.lang.String getNextStep();", "List<LineItem> listLineItemByOrderId(Integer orderId);", "public void increaseDisplayOrder(int incDisplayOrder){\n\t\tupdateDisplayOrder(this.displayOrder + incDisplayOrder);\n\t}", "@Override\n public void orderReceivedByServer(Order currentOrder, OrderConsumer server) {\n currentOrder.setTimestamp(new Date());\n LOGGER.log(server.getName() + \": received order=\" + currentOrder.toString());\n\n serverFrame.updateView(server, currentOrder);\n callback.orderReceivedByServer(currentOrder, server);\n }", "@Test\n\tpublic void saveOrderLineSalesOrder() {\n\t\t// TODO: JUnit - Populate test inputs for operation: saveOrderLineSalesOrder \n\t\tInteger id_2 = 0;\n\t\tSalesOrder related_salesorder = new ecom.domain.SalesOrder();\n\t\tOrderLine response = null;\n\t\tresponse = service.saveOrderLineSalesOrder(id_2, related_salesorder);\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: saveOrderLineSalesOrder\n\t}", "private String getOrderReport() {\n String result = \"Number of items in order: \" + items.size() + System.getProperty(\"line.separator\") +\n \"List of items: \" + System.getProperty(\"line.separator\");\n for (Item i : items) {\n result += i.getListOfPlants();\n }\n result += \"Total price: \" + calculateTotalPrice() + System.getProperty(\"line.separator\") +\n \"Delivery strategy: \" + delivery.toString() + System.getProperty(\"line.separator\") +\n \"Payment strategy: \" + payment.toString();\n return result;\n }", "public void setOrder(String Order) {\n this.Order = Order;\n }", "public interface OrderService {\n PageInfo<OrderEntity> getOrders(int index, int size);\n PageInfo<OrderEntity> getOrdersForScript(int index, int size, OrderEntity entity);\n PageInfo<OrderEntity> getAll();\n int insertOrder(OrderEntity entity);\n}", "void generateTravelOrderCode(AbstractOrderModel orderModel);", "@Test\n\tpublic void loadOrderLines() {\n\t\tSet<OrderLine> response = null;\n\t\tresponse = service.loadOrderLines();\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: loadOrderLines\n\t}", "@Override\n\tpublic int getOrderLineIndex(int parseInt) {\n\t\treturn 0;\n\t}" ]
[ "0.63372827", "0.5963775", "0.5888414", "0.5837513", "0.58089715", "0.57971656", "0.57564354", "0.5755411", "0.5736038", "0.57332814", "0.5729621", "0.5697573", "0.56947666", "0.56505764", "0.56505764", "0.5637642", "0.5630739", "0.56001455", "0.5543732", "0.5535331", "0.5527445", "0.5497796", "0.5496832", "0.54819137", "0.54751635", "0.54701006", "0.5460298", "0.5446686", "0.5439726", "0.5406865", "0.53940046", "0.53940046", "0.53932357", "0.53932357", "0.53886485", "0.53784066", "0.53756607", "0.53742963", "0.5364819", "0.53642136", "0.53601515", "0.5355556", "0.5353115", "0.53433335", "0.53333795", "0.53280306", "0.5314413", "0.5305373", "0.5301262", "0.5300661", "0.5295856", "0.5292164", "0.5292164", "0.529082", "0.52867657", "0.52848583", "0.5282121", "0.52560854", "0.525322", "0.5243761", "0.52368397", "0.5232545", "0.52311325", "0.5225818", "0.522408", "0.5219422", "0.52132773", "0.52103263", "0.5210051", "0.5193942", "0.5191987", "0.5184512", "0.5181421", "0.5175033", "0.5171605", "0.5170295", "0.51691645", "0.51688576", "0.51586115", "0.51548254", "0.515339", "0.5150867", "0.5149206", "0.5142472", "0.51401585", "0.5139098", "0.5130203", "0.51265126", "0.5125792", "0.51196474", "0.51136017", "0.5111587", "0.5110368", "0.51074463", "0.51008606", "0.5100859", "0.5091418", "0.5080683", "0.50795233", "0.5070859" ]
0.60337865
1
Factory for Spring to configure the EntityManager.
@Bean public LocalContainerEntityManagerFactoryBean entityManagerFactory() { LocalContainerEntityManagerFactoryBean entityManagerFactory = new LocalContainerEntityManagerFactoryBean(); entityManagerFactory.setDataSource(dataSource); entityManagerFactory.setJpaDialect(hibernateJpaDialect()); entityManagerFactory.setJpaVendorAdapter(hibernateJpaVendorAdapter()); entityManagerFactory.setJpaProperties(getJpaProperties()); entityManagerFactory.setPackagesToScan("com.bouacheria.ami.domain"); return entityManagerFactory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Bean\n EntityManagerFactory entityManagerFactoryProvider() {\n \tEntityManagerFactory emf = Persistence.createEntityManagerFactory(DATA_SOURCE_NAME);\n return emf;\n }", "@Bean\n public LocalContainerEntityManagerFactoryBean managerFactory() {\n HibernateJpaVendorAdapter adapter = new HibernateJpaVendorAdapter();\n adapter.setGenerateDdl(false);\n\n Properties jpaProps = new Properties();\n jpaProps.put(\"hibernate.dialect\",\"org.hibernate.dialect.H2Dialect\");\n\n LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();\n factory.setJpaVendorAdapter(adapter);\n factory.setPackagesToScan(\"com.webmvc.mywebmvc\");\n factory.setDataSource(dataSource);\n factory.setJpaProperties(jpaProps);\n\n\n return factory;\n }", "@Bean\n public LocalContainerEntityManagerFactoryBean entityManagerFactory() throws NamingException {\n LocalContainerEntityManagerFactoryBean factoryBean = new LocalContainerEntityManagerFactoryBean();\n factoryBean.setDataSource(dataSource());\n factoryBean.setPackagesToScan(new String[]{\"com.group.project.entities\"});\n factoryBean.setJpaVendorAdapter(jpaVendorAdapter());\n factoryBean.setJpaProperties(jpaProperties());\n return factoryBean;\n }", "@Bean\n LocalContainerEntityManagerFactoryBean entityManagerFactory() {\n\n HibernateJpaVendorAdapter jpaVendorAdapter = new HibernateJpaVendorAdapter();\n jpaVendorAdapter.setGenerateDdl(true);\n\n LocalContainerEntityManagerFactoryBean factoryBean = new LocalContainerEntityManagerFactoryBean();\n\n Properties properties = new Properties();\n\n factoryBean.setDataSource(dataSource());\n factoryBean.setJpaVendorAdapter(jpaVendorAdapter);\n //factoryBean.setPackagesToScan(\"com.theglue.edcm.journey.user.moralcustomer.jhipster.domain\");\n factoryBean.setPackagesToScan(SpringConfig.class.getPackage().getName());\n\n factoryBean.setJpaProperties(properties);\n return factoryBean;\n }", "@Bean\n @Scope(SCOPE_PROTOTYPE)\n EntityManager entityManagerProvider(EntityManagerFactory emf) {\n EntityManagerHolder holder = (EntityManagerHolder) getResource(emf);\n if (holder == null) {\n return emf.createEntityManager();\n }\n return holder.getEntityManager();\n }", "@Bean\n\tpublic LocalContainerEntityManagerFactoryBean entityManagerFactory() {\n\t\tLocalContainerEntityManagerFactoryBean entityManagerFactory = new LocalContainerEntityManagerFactoryBean();\n\t\tentityManagerFactory.setDataSource(dataSource());\n\t\t// Classpath scanning of @Component, @Service, etc annotated class\n\t\tentityManagerFactory.setPackagesToScan(\"com.jpa\");\n\t\t// Vendor adapter\n\t\tHibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();\n\t\tentityManagerFactory.setJpaVendorAdapter(vendorAdapter);\n\t\t// Hibernate properties\n\t\tProperties additionalProperties = new Properties();\n\t\tadditionalProperties.put(\"hibernate.show_sql\", \"true\");\n\t\tadditionalProperties.put(\"hibernate.hbm2ddl.auto\", \"none\");\n\t\tadditionalProperties.put(\"hibernate.jdbc.batch_size\", \"10\");\n\t\tadditionalProperties.put(\"hibernate.order_inserts\", \"true\");\n\t\tadditionalProperties.put(\"hibernate.order_updates\", \"true\");\n\t\tadditionalProperties.put(\"hibernate.jdbc.batch_versioned_data\", \"true\");\n\t\tentityManagerFactory.setJpaProperties(additionalProperties);\n\t\treturn entityManagerFactory;\n\t}", "@Bean\n\tpublic LocalContainerEntityManagerFactoryBean entityManagerFactory() {\n\t\tProperties jpaProperties = new Properties();\n\t\tjpaProperties.put(org.hibernate.cfg.AvailableSettings.HBM2DDL_AUTO, this.env.getProperty(\"hibernate.hbm2ddl.auto\"));\n\t\tjpaProperties.put(org.hibernate.cfg.AvailableSettings.CACHE_REGION_FACTORY, SingletonEhCacheRegionFactory.class.getCanonicalName());\n\t\tjpaProperties.put(\"hibernate.cache.use_structured_entries\", Boolean.TRUE);\n\t\tjpaProperties.put(\"hibernate.cache.use_second_level_cache\", Boolean.TRUE);\n\n\t\tHibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();\n\t\tvendorAdapter.setGenerateDdl(Boolean.valueOf(this.env.getProperty(\"hibernate.ddl_create\")).booleanValue());\n\t\tvendorAdapter.setShowSql(Boolean.valueOf(this.env.getProperty(\"hibernate.show_sql\")).booleanValue());\n\t\tvendorAdapter.getJpaPropertyMap().put(\"databasePlatform\", this.env.getProperty(\"hibernate.dialect\"));\n\n\t\tLocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();\n\t\tfactory.setDataSource(this.dataSource());\n\t\tfactory.setJpaVendorAdapter(vendorAdapter);\n\t\tfactory.setPackagesToScan(PersistenceConfiguration.ENTITIES_PACKAGE);\n\t\tfactory.setJpaProperties(jpaProperties);\n\t\tfactory.afterPropertiesSet();\n\t\tfactory.setLoadTimeWeaver(new InstrumentationLoadTimeWeaver());\n\t\tfactory.setPersistenceProvider(new HibernatePersistenceProvider());\n\n\t\treturn factory;\n\t}", "@Bean\n @DependsOn(\"flyway\")\n public LocalContainerEntityManagerFactoryBean entityManagerFactory() {\n LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();\n entityManagerFactoryBean.setDataSource(dataSource());\n entityManagerFactoryBean.setPackagesToScan(env.getRequiredProperty(ENTITY_PACKAGES_TO_SCAN));\n\n JpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();\n entityManagerFactoryBean.setJpaVendorAdapter(vendorAdapter);\n entityManagerFactoryBean.setJpaProperties(hibernateProperties());\n\n return entityManagerFactoryBean;\n }", "@Bean\r\n public LocalContainerEntityManagerFactoryBean entityManagerFactory() {\r\n String message = messageSource.getMessage(\"begin\", null, \"locale not found\", Locale.getDefault())\r\n + \" \" + messageSource.getMessage(\"config.data.entity\", null, \"locale not found\", Locale.getDefault());\r\n logger.info(message);\r\n LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();\r\n entityManagerFactoryBean.setDataSource(dataSource());\r\n entityManagerFactoryBean.setPersistenceProviderClass(HibernatePersistenceProvider.class);\r\n entityManagerFactoryBean.setPackagesToScan(propEntityManagerPackagesToScan);\r\n entityManagerFactoryBean.setJpaProperties(getHibernateProperties());\r\n message = messageSource.getMessage(\"end\", null, \"locale not found\", Locale.getDefault())\r\n + \" \" + messageSource.getMessage(\"config.data.entity\", null, \"locale not found\", Locale.getDefault());\r\n logger.info(message);\r\n return entityManagerFactoryBean;\r\n }", "@Bean(name = \"serviceEntityManagerFactory\")\n public LocalContainerEntityManagerFactoryBean serviceEntityManagerFactory() {\n final LocalContainerEntityManagerFactoryBean bean = new LocalContainerEntityManagerFactoryBean();\n\n bean.setJpaVendorAdapter(jpaServiceVendorAdapter());\n bean.setPersistenceUnitName(\"jpaServiceRegistryContext\");\n bean.setPackagesToScan(jpaServicePackagesToScan());\n bean.setDataSource(dataSourceService());\n\n final Properties properties = new Properties();\n properties.put(\"hibernate.dialect\", this.hibernateDialect);\n properties.put(\"hibernate.hbm2ddl.auto\", this.hibernateHbm2DdlAuto);\n properties.put(\"hibernate.jdbc.batch_size\", this.hibernateBatchSize);\n bean.setJpaProperties(properties);\n return bean;\n }", "public interface IEntityManagerFactory {\r\n\r\n\t/**\r\n\t * Called when entity manager factory will help to create DAO objects.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tEntityManager createEntityManager();\r\n}", "protected abstract EntityManagerFactory getEntityManagerFactory();", "private EntityManagerProvider(){}", "@Bean\n @Autowired\n public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource datasource) {\n\n LocalContainerEntityManagerFactoryBean entityManagerFactory = new LocalContainerEntityManagerFactoryBean();\n\n entityManagerFactory.setDataSource(dataSource());\n entityManagerFactory.setPackagesToScan(\"com.emergya.sss3E.persistence.model\");\n\n HibernateJpaVendorAdapter jpaVendorAdapter = new HibernateJpaVendorAdapter();\n\n jpaVendorAdapter.setGenerateDdl(true);\n\n entityManagerFactory.setJpaVendorAdapter(jpaVendorAdapter);\n\n entityManagerFactory.setJpaProperties(jpaProperties());\n\n return entityManagerFactory;\n }", "@Bean(name = \"masterEntityManager\")\n\tpublic LocalContainerEntityManagerFactoryBean entityManagerFactory() {\n\t\tJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();\n\t\tLocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();\n\t\tem.setDataSource(dataSource());\n\t\tem.setPackagesToScan(\"model\");\n\t\tem.setJpaVendorAdapter(vendorAdapter);\n\t\tem.setJpaProperties(new Properties());\n\t\tem.setPersistenceUnitName(\"master\");\n\t\treturn em;\n\t}", "@Bean\n static LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) {\n LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();\n\n em.setDataSource(dataSource);\n em.setPackagesToScan(\"pl.exsio.querydsl.entityql\");\n em.setJpaVendorAdapter(new HibernateJpaVendorAdapter());\n\n Properties properties = new Properties();\n properties.setProperty(\"hibernate.hbm2ddl.auto\", \"create\");\n properties.setProperty(\"hibernate.hbm2ddl.import_files\", \"data.sql\");\n em.setJpaProperties(properties);\n\n return em;\n }", "@Autowired\n\tpublic EmployeeDAOJpaImpl(EntityManager theEntityManager) {\n\t\tentityManager = theEntityManager;\n\t}", "@Bean\n public EntityManagerFactory entityManagerFactory(DataSource dataSource, @Qualifier(\"dialect\") String dialect) {\n\n LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();\n factory.setPersistenceProviderClass(HibernatePersistenceProvider.class);\n factory.setPackagesToScan(\"model\");\n factory.setDataSource(dataSource);\n factory.setJpaProperties(additionalProperties(dialect));\n factory.afterPropertiesSet();\n\n return factory.getObject();\n }", "@Bean\n\tpublic JpaTransactionManager transactionManager() {\n\t\tJpaTransactionManager transactionManager = new JpaTransactionManager();\n\t\ttransactionManager.setEntityManagerFactory(entityManagerFactory().getObject());\n\t\treturn transactionManager;\n\t}", "static EntityManager getEntityManager(){\n return ENTITY_MANAGER_FACTORY.createEntityManager();\n }", "EntityManager createEntityManager();", "@Autowired\n public SubCategoryDAOImpl(EntityManager theEntityManager) {\n\n entityManager = theEntityManager;\n }", "public interface EntityManagerCreator {\n EntityManager createEntityManager();\n}", "@Autowired\n\tpublic EmployeeDAOHibernateImpl(EntityManager entityManager) {\n\t\tthis.entityManager = entityManager;\n\t}", "@Bean\r\n public JpaTransactionManager transactionManager() {\r\n String message = messageSource.getMessage(\"begin\", null, \"locale not found\", Locale.getDefault())\r\n + \" \" + messageSource.getMessage(\"config.data.transaction\", null, \"locale not found\", Locale.getDefault());\r\n logger.info(message);\r\n JpaTransactionManager transactionManager = new JpaTransactionManager();\r\n transactionManager.setEntityManagerFactory(entityManagerFactory().getObject());\r\n message = messageSource.getMessage(\"end\", null, \"locale not found\", Locale.getDefault())\r\n + \" \" + messageSource.getMessage(\"config.data.transaction\", null, \"locale not found\", Locale.getDefault());\r\n logger.info(message);\r\n return transactionManager;\r\n }", "@Bean\n JpaTransactionManager jpaTransactionManagerProvider(EntityManagerFactory emf) {\n JpaTransactionManager transactionManager = new JpaTransactionManager(emf);\n return transactionManager;\n }", "public MapJobRepositoryFactoryBean(PlatformTransactionManager transactionManager) {\n\t\tsetTransactionManager(transactionManager);\n\t}", "public static Configurable configure() {\n return new SqlServerManager.ConfigurableImpl();\n }", "@Bean\n\tpublic PlatformTransactionManager transactionManager() {\n\t\tEntityManagerFactory factory = this.entityManagerFactory().getObject();\n\t\treturn new JpaTransactionManager(factory);\n\t}", "public EntityManagerFactory newEMFactory() {\n emFactory = Persistence.createEntityManagerFactory(\"Exercici1-JPA\");\n return emFactory;\n }", "@Bean(name = \"transactionManagerServiceReg\")\n public JpaTransactionManager transactionManagerServiceReg(@Qualifier(\"serviceEntityManagerFactory\") \n final EntityManagerFactory emf) {\n final JpaTransactionManager mgmr = new JpaTransactionManager();\n mgmr.setEntityManagerFactory(emf);\n return mgmr;\n }", "protected abstract EntityManager getEntityManager();", "EMInitializer() {\r\n try {\r\n emf = Persistence.createEntityManagerFactory(\"pl.polsl_MatchStatist\"\r\n + \"icsWeb_war_4.0-SNAPSHOTPU\");\r\n em = emf.createEntityManager();\r\n } catch (Exception e) {\r\n em = null;\r\n emf = null;\r\n }\r\n\r\n }", "private static EntityManagerFactory createNewEntityManagerFactory()\n\t\t\tthrows NamingException, PersistenceException, UnsupportedUserAttributeException {\n\n\t\tInitialContext ctx = new InitialContext();\n\t\tDataSource ds = (DataSource) ctx.lookup(DATA_SOURCE_NAME);\n\n\t\tMap<String, Object> properties = new HashMap<String, Object>();\n\t\tproperties.put(PersistenceUnitProperties.NON_JTA_DATASOURCE, ds);\n\n\t\t// As replication will change the underlying database without\n\t\t// notifying the hub the JPA cache needs to be disabled.\n\t\t// Else the hub might provide outdated data\n\t\tproperties.put(PersistenceUnitProperties.CACHE_SHARED_DEFAULT, \"false\");\n\n\t\treturn Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, properties);\n\t}", "@Bean\n public PlatformTransactionManager transactionManager() {\n JpaTransactionManager manager = new JpaTransactionManager();\n manager.setEntityManagerFactory(entityManagerFactory());\n\n return manager;\n }", "private static void init() {\n\t\tif (factory == null) {\n\t\t\tfactory = Persistence.createEntityManagerFactory(\"hibernatePersistenceUnit\");\n\t\t}\n\t\tif (em == null) {\n\t\t\tem = factory.createEntityManager();\n\t\t}\n\t}", "@Primary\n @Bean\n LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource, Environment env) {\n LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();\n entityManagerFactoryBean.setDataSource(dataSource);\n entityManagerFactoryBean.setPersistenceUnitName(\"base.manager\");\n\n HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();\n vendorAdapter.setDatabase(Database.POSTGRESQL);\n vendorAdapter.setDatabasePlatform(env.getRequiredProperty(PROPERTY_NAME_DATABASE_PLATAFORM));\n vendorAdapter.setGenerateDdl(Boolean.parseBoolean(env.getRequiredProperty(PROPERTY_GENERATE_DDL)));\n vendorAdapter.setShowSql(Boolean.parseBoolean(env.getRequiredProperty(PROPERTY_NAME_HIBERNATE_SHOW_SQL)));\n\n entityManagerFactoryBean.setJpaVendorAdapter(vendorAdapter);\n entityManagerFactoryBean.setPackagesToScan(ENTITY_PACKAGES);\n\n Properties jpaProperties = new Properties();\n\n // datasource plataform\n jpaProperties.put(PROPERTY_NAME_DATASOURCE_PLATAFORM, env.getRequiredProperty(PROPERTY_NAME_DATASOURCE_PLATAFORM));\n\n // database plataform\n jpaProperties.put(PROPERTY_NAME_DATABASE_PLATAFORM, env.getRequiredProperty(PROPERTY_NAME_DATABASE_PLATAFORM));\n\n //Specifies the action that is invoked to the database when the Hibernate\n //SessionFactory is created or closed.\n jpaProperties.put(PROPERTY_NAME_HIBERNATE_HBM2DDL_AUTO, env.getRequiredProperty(PROPERTY_NAME_HIBERNATE_HBM2DDL_AUTO));\n\n //If the value of this property is true, Hibernate writes all SQL\n //statements to the console.\n jpaProperties.put(PROPERTY_NAME_HIBERNATE_SHOW_SQL, env.getRequiredProperty(PROPERTY_NAME_HIBERNATE_SHOW_SQL));\n\n //If the value of this property is true, Hibernate will use prettyprint\n //when it writes SQL to the console.\n jpaProperties.put(PROPERTY_NAME_HIBERNATE_FORMAT_SQL, env.getRequiredProperty(PROPERTY_NAME_HIBERNATE_FORMAT_SQL));\n\n jpaProperties.put(\"org.hibernate.dialect.Dialect\", \"org.hibernate.dialect.PostgreSQL95Dialect\");\n jpaProperties.put(\"spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults\", \"false\");\n jpaProperties.put(\"spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation\", \"true\");\n jpaProperties.put(\"hibernate.jdbc.lob.non_contextual_creation\",\"true\");\n entityManagerFactoryBean.setJpaProperties(jpaProperties);\n\n return entityManagerFactoryBean;\n }", "@Primary\n @Bean\n JpaTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {\n JpaTransactionManager transactionManager = new JpaTransactionManager();\n transactionManager.setEntityManagerFactory(entityManagerFactory);\n return transactionManager;\n }", "JpaConfig getJpaConfig();", "@Bean\n @Autowired\n public JpaTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {\n\n JpaTransactionManager txManager = new JpaTransactionManager();\n txManager.setEntityManagerFactory(entityManagerFactory);\n\n return txManager;\n }", "private JpaModule(JpaModuleConfig config, EntityManagerFactory emFactory, Supplier<EntityManager> em, TransactionRunner\n transactionRunner) {\n this();\n\n this.config = config;\n this.emFactory = emFactory;\n this.emSupplier = em;\n this.transactionRunner = transactionRunner;\n }", "@Bean\n public PlatformTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {\n JpaTransactionManager transactionManager = new JpaTransactionManager();\n transactionManager.setEntityManagerFactory(entityManagerFactory);\n\n return transactionManager;\n }", "protected\r\n JpaDaoFactory()\r\n {\r\n ISessionStrategy mySessionStrategy = new JpaSessionStrategy();\r\n ITransactionStrategy myTransactionStrategy = \r\n new JpaTransactionStrategy(mySessionStrategy);\r\n\r\n setSessionStrategy(mySessionStrategy);\r\n setTransactionStrategy(myTransactionStrategy);\r\n }", "@Primary\n @Bean\n public PlatformTransactionManager ildaTransactionManager() {\n final JpaTransactionManager txManager = new JpaTransactionManager();\n txManager.setEntityManagerFactory(ildaEntityManagerFactory().getObject());\n return txManager;\n }", "@Override\n public void afterPropertiesSet() {\n\n super.afterPropertiesSet();\n\n Assert.notNull(getDataSources(), \"Data sources not set\");\n\n /**\n * SettingServiceProvider setup.\n */\n setSettingService((SettingServiceProvider) getServiceFactory().makeService(SettingServiceProvider.class));\n Assert.notNull(getSettingService(), \"Settings Service Provider could be located.\");\n\n /**\n * IdGenerator setup.\n */\n setIdGenerator((IdGenerator) getServiceFactory().makeService(IdGenerator.class));\n Assert.notNull(getIdGenerator(), \"ID Generator could be located.\");\n\n /**\n * TransactionDAO setup.\n */\n setTransactionDao((JdbcTransactionDao) getServiceFactory().makeService(JdbcTransactionDao.class));\n Assert.notNull(getTransactionDao(), \"TransactionDAO could not be located.\");\n\n /**\n * PartnerDAO setup.\n */\n setPartnerDao((JdbcPartnerDao) getServiceFactory().makeService(JdbcPartnerDao.class));\n Assert.notNull(getTransactionDao(), \"PartnerDao could not be located.\");\n\n /**\n * CompressionService setup.\n */\n setCompressionService((CompressionService) getServiceFactory().makeService(CompressionService.class));\n Assert.notNull(getTransactionDao(), \"CompressionService could not be located.\");\n\n /**\n * Data Access Objects setup\n */\n HibernatePersistenceProvider provider = new HibernatePersistenceProvider();\n EntityManagerFactory emf = provider.createEntityManagerFactory(\n getDataSources().get(ARG_DS_SOURCE),\n new PluginPersistenceConfig()\n .classLoader(OrganizationDataType.class.getClassLoader())\n .debugSql(Boolean.FALSE)\n .rootEntityPackage(\"com.windsor.node.plugin.wqx.domain\")\n .setBatchFetchSize(1000));\n\n setEntityManager(emf.createEntityManager());\n\n /**\n * SubmissionHistoryDao setup\n */\n setSubmissionHistoryDao(new SubmissionHistoryDaoJpaImpl(getEntityManager()));\n\n /**\n * WqxDao setup\n */\n setWqxDao(new WqxDaoJpaImpl(getEntityManager()));\n Assert.notNull(getWqxDao(), \"WqxDao could not be located.\");\n }", "@SuppressWarnings(\"rawtypes\")\r\n\t@Override\r\n\tpublic void configure(Element metadata, Dictionary configuration) throws ConfigurationException {\r\n\t\t// Get factory name\r\n\t\tElement[] elements = metadata.getElements(\"Transactional\", \"org.krakenapps.jpa.handler\");\r\n\t\tif (elements != null && elements.length > 0) {\r\n\t\t\tElement transactionalElement = elements[0];\r\n\t\t\tfactoryName = transactionalElement.getAttribute(\"name\");\r\n\t\t}\r\n\r\n\t\t// try external handler annotation\r\n\t\tif (factoryName == null) {\r\n\t\t\tElement[] el = metadata.getElements(\"JpaConfig\", \"org.krakenapps.jpa.handler\");\r\n\t\t\tif (el == null || el.length == 0)\r\n\t\t\t\tthrow new IllegalStateException(\"@JpaConfig configuration not found.\");\r\n\r\n\t\t\tElement entityManagerFactoryElement = el[0];\r\n\t\t\tfactoryName = entityManagerFactoryElement.getAttribute(\"factory\");\r\n\t\t}\r\n\r\n\t\tObject o = getInstanceManager().getPojoObject();\r\n\t\tpojoClassName = o.getClass().getName();\r\n\r\n\t\tlogger.trace(\"JPA: using [\" + factoryName + \"] entity manager factory for [{}].\", pojoClassName);\r\n\r\n\t\tfor (Method m : o.getClass().getDeclaredMethods()) {\r\n\t\t\tTransactional t = m.getAnnotation(Transactional.class);\r\n\t\t\tif (t != null) {\r\n\t\t\t\tlogger.trace(\"JPA: transactional method detected: \" + m.getName());\r\n\r\n\t\t\t\tString[] parameterTypes = getMethodParameterTypes(m);\r\n\r\n\t\t\t\tMethodMetadata mm = getPojoMetadata().getMethod(m.getName(), parameterTypes);\r\n\t\t\t\tif (mm != null) {\r\n\t\t\t\t\tlogger.trace(\"JPA: annotated method injected: \" + getMethodSignature(m));\r\n\r\n\t\t\t\t\tmethodFactoryMap.put(m, t.value());\r\n\t\t\t\t\tgetInstanceManager().register(mm, this);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Bean\n @Profile(value = \"prod\")\n public LocalContainerEntityManagerFactoryBean localContainerServerModeEntityManagerFactoryBean(\n @ServerMode DataSource dataSource,\n JpaVendorAdapter jpaVendorAdapter\n ) {\n LocalContainerEntityManagerFactoryBean lcemfb = new LocalContainerEntityManagerFactoryBean();\n lcemfb.setDataSource(dataSource);\n lcemfb.setJpaVendorAdapter(jpaVendorAdapter);\n lcemfb.setJpaProperties(serverModeProperties());\n lcemfb.setPackagesToScan(\"caveatemptor.entities\");\n lcemfb.setPersistenceUnitName(\"ServerModePersistenceUnit\");\n return lcemfb;\n }", "abstract E getEntityManager();", "public BookJPAImpl(TxDAOFactoryImpl factory) {\n\t\t//emf = Persistence.createEntityManagerFactory(\"sistemiDistribuitiLS\");\n\t\tthis.em = factory.getEntityManager();\n\t}", "ManagerFactory getManagerFactory();", "@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}", "@Autowired\n\t public FlightSeatRepositoryImpl(EntityManagerFactory factory) {\n\t\t if(factory.unwrap(SessionFactory.class) == null){\n\t\t\t throw new NullPointerException(\"factory is not a hibernate factory\");\n\t\t }\n\t\t this.sessionFactory = factory.unwrap(SessionFactory.class);\n\t }", "@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}", "@NotNull\n public StationDaoJpa(final EntityManager em)\n {\n this.entityManager = em;\n }", "protected EntityManager getEntityManager() {\n return emf.createEntityManager();\n }", "@Override\n public EntityManager getEntityManager() {\n return entityManager;\n }", "private ORMServiceFactory() { }", "@Override\n protected EntityManager getEntityManager() {\n return em;\n }", "@Bean\r\n public PlatformTransactionManager transactionManager() {\r\n return new DataSourceTransactionManager(dynamicDataSource());\r\n }", "@Inject\n CustomerRepositoryImpl(@CurrentSession EntityManager entityManager, ApplicationConfiguration applicationConfiguration) {\n this.entityManager = entityManager;\n this.applicationConfiguration = applicationConfiguration;\n }", "public SettlementBean() {\r\n entitymanagerbean = new EntityManagerBean();\r\n }", "@Override\n\tpublic void contextInitialized(ServletContextEvent arg0) {\n\t\tfactory = Persistence.createEntityManagerFactory(\"Test\");\n\t\tServletContext sc = arg0.getServletContext();\n\t\tsc.setAttribute(EntityManagerFactory.class.getName(), factory);\n\t}", "@BeforeEach\n void init() {\n\n EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory(\"pu\");\n employeeDao = new EmployeeDao(entityManagerFactory);\n\n\n }", "private EntityFactory() {}", "@Override\n\tpublic EntityManagerFactory getEntityManagerFactory() {\n\t\treturn null;\n\t}", "public EntityFactoryImpl() {\n\t\tsuper();\n\t}", "public EmpleadoService() {\n super();\n emf = Persistence.createEntityManagerFactory(\"up_h2\");\n empDAO = new EmpleadoDAO(emf);\n }", "public CustomerJPAImpl(EntityManagerFactory emfPassed) {\n\t\temf = emfPassed;\n\t}", "@Bean\n @Profile(value = \"test\")\n public LocalContainerEntityManagerFactoryBean localContainerInMemoryEntityManagerFactoryBean(\n @InMemoryMode DataSource dataSource,\n JpaVendorAdapter jpaVendorAdapter\n ) {\n LocalContainerEntityManagerFactoryBean lcemfb = new LocalContainerEntityManagerFactoryBean();\n lcemfb.setDataSource(dataSource);\n lcemfb.setJpaVendorAdapter(jpaVendorAdapter);\n lcemfb.setJpaProperties(inMemoryProperties());\n lcemfb.setPackagesToScan(\"caveatemptor.entities\");\n lcemfb.setPersistenceUnitName(\"InMemoryPersistenceUnit\");\n return lcemfb;\n }", "public abstract void setEntityManager(EntityManager em);", "@SuppressWarnings(\"unchecked\")\n\tprivate static XmlEntityObjectFactory getFactory() {\n\t\tif (factory == null) {\n\t\t\tfactory = new XmlEntityObjectFactory();\n\t\t\ttry {\n\t\t\t\tClass<IXmlEntityResolverLoader> loaderClass = (Class<IXmlEntityResolverLoader>) Class\n\t\t\t\t\t\t.forName(defaulEntityResolverLoaderClassName);\n\t\t\t\tIXmlEntityResolverLoader loader;\n\t\t\t\tloader = loaderClass.newInstance();\n\t\t\t\tloader.loadTo(factory);\n\t\t\t} catch (Exception ex) {\n\t\t\t\tthrow new UnexpectedRuntimeException(ex);\n\t\t\t}\n\t\t}\n\t\treturn factory;\n\t}", "private DAOJPAFactory() {\r\n }", "@Inject\n private DataStore() {\n final StandardServiceRegistry registry = new StandardServiceRegistryBuilder()\n .configure()\n .build();\n try {\n sessionFactory = new MetadataSources(registry).buildMetadata().buildSessionFactory();\n } catch (Exception e) {\n LOGGER.error(\"Fehler beim initialisieren der Session\", e);\n StandardServiceRegistryBuilder.destroy(registry);\n }\n \n }", "public CircuitJpaDAO(EntityManager entityManager) {\n\t\tem = entityManager;\n\t}", "BusinessEntityFactory getBusinessEntityFactory();", "@Override\n\tprotected EntityManager getEntityManager() {\n\t return em;\n\t}", "public BlogDaoHibernateFactoryImpl() {\n\t\tsuper();\n\t}", "@Bean\n\tpublic AccountManager accountManager() {\n\t\treturn new JpaAccountManager();\n\t}", "public static EntityManagerFactory getConnection() {\r\n return emf;\r\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\tydelseService.setEntityManager(entityManager);\n\t}", "@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn em;\n\t}", "@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn em;\n\t}", "@BeforeClass\n\tpublic static void init() {\n\t\ttry {\n\t\t\tif (emf == null) {\n\t\t\t\temf = Persistence.createEntityManagerFactory(\"application\");\n\t\t\t\tif (em == null) {\n\t\t\t\t\tem = loadConfiguration(emf);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private AdminEntity() {\n \tsuper();\n\n this.emf = Persistence.createEntityManagerFactory(\"entityManager\");\n\tthis.em = this.emf.createEntityManager();\n\tthis.tx = this.em.getTransaction();\n }", "public UsuarioDao(EntityManager entityManager){\r\n\t\tsuper(entityManager);\r\n\t}", "public static EntityManagerFactory getEntityManagerFactory()\n\t\t\tthrows PersistenceException, UnsupportedUserAttributeException, NamingException {\n\t\tif (emf == null)\n\t\t\temf = createNewEntityManagerFactory();\n\t\treturn emf;\n\t}", "@Bean\n public PlatformTransactionManager transactionManager() {\n DataSourceTransactionManager transactionManager = new DataSourceTransactionManager();\n transactionManager.setDataSource(dataSource());\n return transactionManager;\n }", "public EntityManager getEntityManager() {\n return getFactory().createEntityManager();\n }", "@Inject\n\tpublic AlunoDAO(EntityManager entityManager) {\n\t\tthis.entityManager = entityManager;\n\t}", "EntityConfiguration getConfiguration();", "@Bean\n\tpublic DataSourceDao dataSourceDao() {\n\t\tDataSourceDao metadata = new DataSourceDao();\n\t\tmetadata.put(\"rslite\", dsRSLite());\n\t\tmetadata.put(\"rastreosat\", dsRS());\n\t\tmetadata.put(\"entel\", dsEntel());\n\t\tmetadata.put(\"mongo\", dsMongo());\n\t\treturn metadata;\n\t}", "public SpringAwareJdbcTransactionManager() {\r\n }", "@Override\n\tpublic void contextInitialized(ServletContextEvent arg0) {\n\t\temf = Persistence.createEntityManagerFactory(\"CACIC2018\");\n\t}", "@Override\n protected Properties createEntityManagerFactoryProperties() {\n final Properties properties = super.createEntityManagerFactoryProperties();\n final String action = drop ? \"drop-and-create\" : \"create\";\n Arrays.asList(\n \"javax.persistence.schema-generation.database.action\",\n \"javax.persistence.schema-generation.scripts.action\"\n ).forEach(p -> properties.put(p, action));\n return properties;\n }", "DAOClienteJPA(EntityManager entity) {\r\n this.entity = entity;\r\n }", "public static Configurable configure() {\n return new SqlVirtualMachineManager.ConfigurableImpl();\n }", "@PersistenceContext\r\n public void setEntityManager(EntityManager em) {\r\n this.em = em;\r\n }", "@Override\n public void initSessionFactories() {\n super.initSessionFactories();\n\n sessionFactories.put(EntityCache.class, new SessionFactory() {\n\n @Override\n public Class<?> getSessionType() {\n return EntityCache.class;\n }\n @Override\n public Session openSession(CommandContext commandContext) {\n return new EntityCacheImpl();\n }\n });\n }", "public DataSetJpaController(EntityManagerFactory emf) {\n this.emf = emf;\n }", "@Override\n\tpublic void init() throws ServletException {\n\t\tsuper.init();\n\t\tObject object=getServletContext().getAttribute(\"entitymanagerfactory\");\n\n\t\tif(object==null){\n\t\t\temf=Persistence.createEntityManagerFactory(\"10-em-jsp\");\n\t\t\tgetServletContext().setAttribute(\"entitymanagerfactory\", emf);\n\t\t}else {\n\t\t\temf=(EntityManagerFactory) object;\n\t\t}\n\t\tservice=new StudentService(emf.createEntityManager());\n\t}" ]
[ "0.72597814", "0.71444726", "0.7086596", "0.7072899", "0.70439637", "0.7037152", "0.7003914", "0.69793504", "0.6923343", "0.69231635", "0.68399596", "0.6739074", "0.6611167", "0.6610511", "0.65997624", "0.6561932", "0.65611076", "0.65232986", "0.64938766", "0.648664", "0.64257073", "0.6332595", "0.6315717", "0.62361646", "0.6234196", "0.6205576", "0.619918", "0.6115754", "0.61010164", "0.6100587", "0.6062919", "0.60592335", "0.6057507", "0.6050888", "0.6025153", "0.60221046", "0.5934302", "0.59206", "0.5910565", "0.5896105", "0.58954334", "0.5854986", "0.583448", "0.579187", "0.5760769", "0.5753612", "0.5734877", "0.57314485", "0.5709056", "0.57015634", "0.57010216", "0.56960607", "0.56890094", "0.56845117", "0.56812257", "0.5669448", "0.56656873", "0.56649595", "0.5643906", "0.5642966", "0.5633782", "0.5618636", "0.5605282", "0.56014645", "0.5599376", "0.55899113", "0.5582441", "0.5536733", "0.5529463", "0.55284923", "0.5528249", "0.55224395", "0.5522057", "0.550864", "0.55072874", "0.55050665", "0.5504972", "0.55011064", "0.5497225", "0.54960954", "0.54800725", "0.54800725", "0.5475079", "0.5469372", "0.5451757", "0.54491675", "0.5433362", "0.5432911", "0.5429975", "0.54209596", "0.541883", "0.5418645", "0.541576", "0.5402187", "0.53694123", "0.5366428", "0.5361489", "0.5359619", "0.53509", "0.53451854" ]
0.7118843
2
/ Assumes that there is no entity currently occupying the intended destination cell.
public void addEntity(Entity entity) { if (withinBounds(entity.getPosition())) { setOccupancyCell(entity.getPosition(), entity); this.entities.add(entity); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean checkCellsNotNull(\n \t\t\tde.fhhannover.inform.hnefatafl.vorgaben.Move currentMove){\n \t\t\t\tif (currentMove.getFromCell() == null ||\n \t\t\t\t\tcurrentMove.getToCell() == null){\n \t\t\t\t\t\treturn false;\n \t\t\t\t}\n \t\t\t\treturn true;\t\t\n \t}", "public Position destination(Position ep) throws InvalidPositionException;", "public void move(Cell[][] board) {\n Cell[] nextCells = generateNeighbors(this.x, this.y);\n Cell nextCell = nextCells[rand.nextInt(4)];\n if (!this.objectFound) {\n if (nextCell != null && nextCell.isOccupied() && nextCell.occupiedBy instanceof Integer) {\n this.objectFound = true;\n this.goal = nextCell;\n } else if (nextCell != null && !nextCell.isOccupied()) {\n synchronized (board[this.x][this.y]) {\n board[this.x][this.y].resetCell();\n nextCell.occupiedBy = this;\n }\n }\n } else {\n // bfs to location\n System.out.println(\"BFS to goal\");\n }\n }", "private Cell chooseCell(List<Cell> surroundingCells, int destinationX, int destinationY) {\n boolean diagonalChosen = false;\n\n Cell chosenCell = surroundingCells.get(0);\n int i = 0;\n\n // Mencari cell yang bisa membawa ke cell tujuan\n while (i < surroundingCells.size() && !diagonalChosen) { // Karena move diagonal bakal paling efektif, kalo bisa\n // diagonal yang dipilih yang diagonal.\n Cell currentCell = surroundingCells.get(i);\n if (between(currentCell.x, destinationX, currentWorm.position.x)\n && between(currentCell.y, destinationY, currentWorm.position.y)) {\n chosenCell = currentCell;\n if (currentCell.x != currentWorm.position.x && currentCell.y != currentWorm.position.y) {\n diagonalChosen = true;\n }\n }\n i++;\n }\n return chosenCell;\n }", "@Override\n public boolean atDestination() {\n return myMovable.atDestination();\n }", "public boolean teleport(Entity destination) {\n/* 571 */ return teleport(destination.getLocation());\n/* */ }", "public boolean canMoveEntity (Entity entity, Point dest) {\n if (entity == null) throw new IllegalArgumentException(\"Entity is null\");\n if (dest == null) throw new IllegalArgumentException(\"Point is null\");\n if (!grid.containsKey(dest)) throw new IllegalArgumentException(\"The cell is not on the grid\");\n\n Point origin = entity.getCoords();\n\n if (origin.equals(dest)) return false;\n\n Vector vector = Vector.findStraightVector(origin, dest);\n\n if (vector == null) return false;\n Vector step = new Vector(vector.axis(), (int) (1 * Math.signum(vector.length())));\n Point probe = (Point) origin.clone();\n while (!probe.equals(dest)) {\n probe = step.applyVector(probe);\n if (!grid.containsKey(probe)) return false;\n }\n\n\n return true;\n }", "@Override\n boolean canMove(Cell source, Cell destination) {\n return true;\n }", "public void findDestination() {\n\t\t\n\t}", "private boolean legalMove() {\n\n\t\t// empty landing spot\n\t\tif (tilePath.size() == 0) {\n\t\t\tdebug(\"illegal, empty landing spot\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!mBoard.tileIsEmpty(tilePath.get(tilePath.size() - 1))) {\n\t\t\tdebug(\"illegal, tile not empty\");\n\t\t\treturn false;\n\t\t}\n\n\t\t// start doesn't equal end\n\t\tif (tilePath.get(0).equals(tilePath.get(tilePath.size() - 1))) {\n\t\t\tdebug(\"illegal, start doesn't equal end\");\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public Coordinate getDestination() {\n return cDestination;\n }", "private boolean moveTo(AntArea.Cell dest) throws AntArtException {\n if (dest.isAntPresent()) {\n return false;\n }\n\n getCurrentCell().leave(this);\n dest.move(this);\n\n //Update the ant location\n Pair<Integer, Integer> newLoc = dest.getLocation();\n location = new Pair<>(newLoc.getKey(), newLoc.getValue());\n\n return true;\n }", "@Test\r\n\tpublic void testRoomExit()\r\n\t{\r\n\t\t// Take one step, essentially just the adj list\r\n\t\tboard.calcTargets(8, 2, 1);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\t// Ensure doesn't exit through the wall\r\n\t\tassertEquals(1, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 2)));\r\n\t\t// Take two steps\r\n\t\tboard.calcTargets(8, 2, 2);\r\n\t\ttargets= board.getTargets();\r\n\t\tassertEquals(3, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 1)));\r\n\t}", "public void getPossibleMoves() { \n\t\t\tsuper.getPossibleMoves();\n\t\t\tfor (int i = 0; i < Math.abs(xrange); i++) {\n\t\t\t\tif (currentx + xrange - ((int) Math.pow(-1,color)*i) >= 0) { \n\t\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + xrange - ((int) Math.pow(-1,color)*i) ][currenty]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( currentx - 1 >= 0 && currenty - 1 >= 0 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1].isOccupiedByOpponent()) {\t// Diagonol left space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1]);\n\t\t\t}\n\t\t\tif (currentx - 1 >= 0 && currenty + 1 <= 7 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1].isOccupiedByOpponent()) { \t//Diagonol right space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1]);\n\t\t\t}\n\t\t\t\n\t}", "public static List<Cell> aStar(Cell origin, Cell destination, FJetCellsGraph cellsGraph){\n Map<String, String> cameFrom = new HashMap<String, String>();\n Map<String, Double> costSoFar = new HashMap<String, Double>();\n\n PriorityQueue<Cell> frontier = new PriorityQueue<>();\n frontier.enqueue(origin, 0.0d);\n\n cameFrom.put(origin.getId(), origin.getId());\n costSoFar.put(origin.getId(), 0.0);\n\n while(frontier.getElements().size() > 0) {\n Cell current = frontier.dequeue();\n\n if (current.equals(destination)){\n break;\n }\n\n for (Cell next : cellsGraph.getNeightbors(current)) {\n double newCost = costSoFar.get(current.getId()) + next.getTerrain().getMovementCost();\n\n if (!costSoFar.containsKey(next.getId())\n || newCost < costSoFar.get(next.getId())){\n costSoFar.put(next.getId(), newCost);\n\n double priority = newCost + heuristic(next.getCoords(), destination.getCoords());\n frontier.enqueue(next, priority);\n cameFrom.put(next.getId(), current.getId());\n }\n }\n }\n\n if (cameFrom.size() > 0) {\n List<Cell> auxPath = new ArrayList<>();\n List<Cell> path = new ArrayList<>();\n Cell prevCell = cellsGraph.getCells().get(destination.getId());\n auxPath.add(destination);\n\n while (prevCell != null\n && !prevCell.getId().equals(origin.getId())) {\n auxPath.add(prevCell);\n prevCell = cellsGraph.getCells().get(cameFrom.get(prevCell.getId()));\n }\n auxPath.add(origin);\n\n // Inverting a path order\n for (int i = auxPath.size() - 1; i >= 0; i--){\n path.add(auxPath.get(i));\n }\n return path;\n }\n return null;\n }", "@Test\n\tpublic void testRoomExit()\n\t{\n\t\t// Take one step, essentially just the adj list\n\t\tboard.calcTargets(18, 21, 1);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\t// Ensure doesn't exit through the wall\n\t\tassertEquals(1, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(17, 21)));\n\t\t// Take two steps\n\t\tboard.calcTargets(18, 21, 2);\n\t\ttargets= board.getTargets();\n\t\tassertEquals(3, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(17, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 21)));\n\t\tassertTrue(targets.contains(board.getCellAt(17, 20)));\n\t}", "private boolean thereispath(Move m, Tile tile, Integer integer, Graph g, Board B) {\n\n boolean result = true;\n boolean result1 = true;\n\n int start_dest_C = tile.COLUMN;\n int start_dest_R = tile.ROW;\n\n int move_column = m.getX();\n int move_row = m.getY();\n\n int TEMP = 0;\n int TEMP_ID = 0;\n int TEMP_ID_F = tile.id;\n int TEMP_ID_FIRST = tile.id;\n\n int final_dest_R = (integer / B.width);\n int final_dest_C = (integer % B.width);\n\n //System.out.println(\"* \" + tile.toString() + \" \" + integer + \" \" + m.toString());\n\n // Y ROW - X COLUMN\n\n for (int i = 0; i != 2; i++) {\n\n TEMP_ID_FIRST = tile.id;\n\n // possibility 1\n if (i == 0) {\n\n\n // first move columns\n for (int c = 0; c != Math.abs(move_column) && result != false; c++) {\n\n if (c == 0) {\n TEMP_ID_FIRST = tile.id;\n\n } else {\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n }\n\n TEMP = move_column / Math.abs(move_column);\n\n //System.out.println(\"1C:\" + TEMP);\n\n //System.out.println(\" \" + TEMP_ID_FIRST + \" - > \" + (start_dest_C + TEMP));\n\n start_dest_C += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n //System.out.println(TEMP_ID_FIRST + \" = \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n // System.out.println(\"OK\");\n\n } else {\n\n result = false;\n\n // System.out.println(\"NOPE\");\n\n\n }\n }\n\n for (int r = 0; r != Math.abs(move_row) && result != false; r++) {\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_row / Math.abs(move_row);\n\n //System.out.println(\"1R:\" + TEMP);\n\n //System.out.println(start_dest_R + \" - > \" + (start_dest_R + TEMP));\n\n start_dest_R += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n // System.out.println(TEMP_ID_FIRST + \" and \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n\n } else {\n\n result = false;\n\n //System.out.println(\"NOPE\");\n\n\n }\n }\n\n if (result == true) {\n return true;\n }\n\n\n }\n\n TEMP_ID = 0;\n\n if (i == 1) {\n\n result = true;\n\n start_dest_C = tile.COLUMN;\n start_dest_R = tile.ROW;\n // first move row\n for (int r = 0; r != Math.abs(move_row) && result1 != false; r++) {\n\n if (r == 0) {\n TEMP_ID_FIRST = tile.id;\n\n } else {\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n }\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_row / Math.abs(move_row);\n\n //System.out.println(\"1R:\" + TEMP);\n\n //System.out.println(start_dest_R + \" - > \" + (start_dest_R + TEMP));\n\n start_dest_R += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n\n //System.out.println(TEMP_ID_FIRST + \" = \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n } else {\n\n //System.out.println(\"NOPE\");\n\n result = false;\n\n }\n\n\n }\n\n // first move columns\n for (int c = 0; c != Math.abs(move_column) && result1 != false; c++) {\n\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_column / Math.abs(move_column);\n\n //System.out.println(\"1C:\" + TEMP);\n\n //System.out.println(\" \" + TEMP_ID_FIRST + \" - > \" + (start_dest_C + TEMP));\n\n start_dest_C += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n //System.out.println(TEMP_ID_FIRST + \" and \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n } else {\n result = false;\n\n //System.out.println(\"NOPE\");\n\n\n }\n }\n\n if (result == false) {\n return false;\n\n }\n\n\n }\n\n\n }\n\n\n return true;\n }", "public boolean destinationReached() {\n boolean xCheck = cDestination.getX() <= cPosition.getX() + cFishSizeX\n && cDestination.getX() >= cPosition.getX();\n\n boolean yCheck = cDestination.getY() <= cPosition.getY() + cFishSizeY\n && cDestination.getY() >= cPosition.getY();\n return xCheck && yCheck;\n }", "public void move() {\n\t\tGrid<Actor> gr = getGrid();\n\t\tif (gr == null) {\n\t\t\treturn;\n\t\t}\n\t\tLocation loc = getLocation();\n\t\tLocation next = loc.getAdjacentLocation(getDirection());\n\t\t\n\t\tLocation next2 = next.getAdjacentLocation(getDirection());\n\t\tif (gr.isValid(next2)) {\n\t\t\tmoveTo(next2);\n\t\t} else {\n\t\t\tremoveSelfFromGrid();\n\t\t}\n\t}", "private void checkAndConnect(int srcIndex, int dstRow, int dstCol) {\n if (isInGrid(dstRow, dstCol) && isOpen(dstRow, dstCol)) {\n final int dstIndex = convertRowColToIndex(dstRow, dstCol);\n gridGraphVirtualTop.union(srcIndex, dstIndex);\n gridGraphVirtualTopBottom.union(srcIndex, dstIndex);\n }\n }", "@Test\n public void testMovePlayerToCell()\n {\n theEngine.start();\n assertTrue(theEngine.inPlayingState());\n \n assertFalse(getThePlayer().getLocation() == getEmptyCell());\n movePlayerToCell(getEmptyCell());\n assertEquals(getThePlayer().getLocation(), getEmptyCell());\n }", "public boolean move(Cell destCell)\n\t{\n\t\t// Checking whether of not the Cells are adjacent is redundant so long as only a\n\t\t// DPad-type system is used to control movement\n\t\tif(currentCell.isAdjecentWithCorners(destCell) && destCell.getSpaceOpen())\n\t\t{\n\t\t\t// Store the origin Cell temporarily\n\t\t\tCell prevCell = currentCell;\n\n\t\t\t// Assign this Character to its destination Cell\n\t\t\t// currentCell is automatically updated by setOccupant()\n\t\t\tif(destCell.setOccupant(this))\n\t\t\t{\n\t\t\t\t// Remove this Character from its current Cell\n\t\t\t\tprevCell.setOccupant(null);\n\n\t\t\t\t// Set movement animation offsets\n\t\t\t\tanimationOffsetX += Tile.TILE_SCALE * Tile.TILE_WIDTH * (prevCell.getGridX() - currentCell.getGridX());\n\t\t\t\tanimationOffsetY += Tile.TILE_SCALE * Tile.TILE_HEIGHT * (prevCell.getGridY() - currentCell.getGridY());\n\n\t\t\t\treturn true;\n\t\t\t} else\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n public double getDestinationX() {\n return myMovable.getDestinationX();\n }", "public void move() throws InstructionExecutionException\r\n\t{\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tStreet street=this.getHeadingStreet();\r\n\t\t\tif(street==null){\r\n\t\t\t\tString err=\"WALL·E says: There is no street in direction \"+this.getCurrentHeading();\r\n\t\t\t\tif(isSwing()){\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, err);\r\n\t\t\t\t}\r\n\t\t\t\tthrow new InstructionExecutionException(err);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tPlace nextPlace=street.nextPlace(this.currentPlace);\r\n\t\t\tif (street.isOpen()){\r\n\t\t\t\tthis.currentPlace=nextPlace;\r\n\t\t\t\tif(isSwing()){\r\n\t\t\t\t\tthis.navigationPanel.updateCell(currentDirection, nextPlace);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tString err=\"WALL·E says: Arrggg, there is a street but it is closed!\";\r\n\t\t\t\tif(isSwing()){\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, err);\r\n\t\t\t\t}\r\n\t\t\t\tthrow new InstructionExecutionException(err);\r\n\t\t\t}\r\n\t\t}catch (Exception e){\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t}", "@Override\n public Point3D getDestination() {\n return myMovable.getDestination();\n }", "protected void moveToDestination(){\n\t\tqueue.clear();\n\t\twhile (destination[0] < 0){\n\t\t\tqueue.add(\"MOVE S\");\n\t\t\tdestination[0] += 1;\n\t\t}\n\t\twhile (destination[0] > 0){\n\t\t\tqueue.add(\"MOVE N\");\n\t\t\tdestination[0] -= 1;\n\t\t}\n\t\twhile (destination[1] < 0){\n\t\t\tqueue.add(\"MOVE E\");\n\t\t\tdestination[1] += 1;\n\t\t}\n\t\twhile (destination[1] > 0){\n\t\t\tqueue.add(\"MOVE W\");\n\t\t\tdestination[1] -= 1;\n\t\t}\n\t\tdestination = null;\n\t}", "private Point getMoveDestination(Building b)\n\t{\n\t\tObjectType buildType = b.getObjectType();\n\t\tPoint workPoint = b.getPosition();\n\t\tfor (int i = workPoint.getX(); i < workPoint.getX()\n\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(buildType) - 1; i++)\n\t\t{\n\t\t\tPoint p1 = new Point(i, workPoint.getY() - 1);\n\t\t\tif (p1.getY() < getMyPlayer().getMyMap().getMapBlocks()[0].length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[i][p1.getY()]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[i][p1.getY()])))\n\t\t\t\treturn p1;\n\t\t\tPoint p2 = new Point(i, workPoint.getY()\n\t\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t\t.get(buildType));\n\t\t\tif ((p2.getY() < getMyPlayer().getMyMap().getMapBlocks()[0].length)\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[i][p2.getY()]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[i][p2.getY()])))\n\t\t\t\treturn p2;\n\n\t\t}\n\t\tfor (int j = workPoint.getY(); j < workPoint.getY()\n\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(buildType); j++)\n\t\t{\n\t\t\tPoint p1 = new Point(workPoint.getX() - 1, j);\n\t\t\tif (p1.getX() < getMyPlayer().getMyMap().getMapBlocks().length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[p1.getX()][j]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[p1.getX()][j])))\n\t\t\t\treturn p1;\n\t\t\tPoint p2 = new Point(workPoint.getX()\n\t\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t\t.get(buildType), j);\n\t\t\tif (p2.getX() < getMyPlayer().getMyMap().getMapBlocks().length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[p2.getX()][j]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[p2.getX()][j])))\n\t\t\t\treturn p2;\n\n\t\t}\n\t\treturn null;\n\t}", "@Test\n public void testMoveMonsterToCell()\n {\n theEngine.start();\n assertTrue(theEngine.inPlayingState());\n \n assertFalse(getTheMonster().getLocation() == getEmptyCell());\n moveMonsterToCell(getEmptyCell());\n assertEquals(getTheMonster().getLocation(), getEmptyCell());\n }", "private static Tile findBorderLocation(Entity mover, Entity destination) {\r\n\t\tint size = destination.getSize();\r\n\t\tTile centerDest = destination.getCurrentTile().copyNew(size >> 1, size >> 1, 0);\r\n\t\tTile center = mover.getCurrentTile().copyNew(mover.getSize() >> 1, mover.getSize() >> 1, 0);\r\n\t\tDirection direction = Direction.getLogicalDirection(centerDest, center);\r\n\t\tTile delta = Tile.getDelta(destination.getCurrentTile(), mover.getCurrentTile());\r\n\t\tmain: for (int i = 0; i < 4; i++) {\r\n\t\t\tint amount = 0;\r\n\t\t\tswitch (direction) {\r\n\t\t\tcase NORTH:\r\n\t\t\t\tamount = size - delta.getY();\r\n\t\t\t\tbreak;\r\n\t\t\tcase EAST:\r\n\t\t\t\tamount = size - delta.getX();\r\n\t\t\t\tbreak;\r\n\t\t\tcase SOUTH:\r\n\t\t\t\tamount = mover.getSize() + delta.getY();\r\n\t\t\t\tbreak;\r\n\t\t\tcase WEST:\r\n\t\t\t\tamount = mover.getSize() + delta.getX();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\tfor (int j = 0; j < amount; j++) {\r\n\t\t\t\tfor (int s = 0; s < mover.getSize(); s++) {\r\n\t\t\t\t\tswitch (direction) {\r\n\t\t\t\t\tcase NORTH:\r\n\t\t\t\t\t\tif (!direction.canMove(mover.getCurrentTile().copyNew(s, j + mover.getSize(), 0))) {\r\n\t\t\t\t\t\t\tdirection = Direction.get((direction.toInteger() + 1) & 3);\r\n\t\t\t\t\t\t\tcontinue main;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase EAST:\r\n\t\t\t\t\t\tif (!direction.canMove(mover.getCurrentTile().copyNew(j + mover.getSize(), s, 0))) {\r\n\t\t\t\t\t\t\tdirection = Direction.get((direction.toInteger() + 1) & 3);\r\n\t\t\t\t\t\t\tcontinue main;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase SOUTH:\r\n\t\t\t\t\t\tif (!direction.canMove(mover.getCurrentTile().copyNew(s, -(j + 1), 0))) {\r\n\t\t\t\t\t\t\tdirection = Direction.get((direction.toInteger() + 1) & 3);\r\n\t\t\t\t\t\t\tcontinue main;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase WEST:\r\n\t\t\t\t\t\tif (!direction.canMove(mover.getCurrentTile().copyNew(-(j + 1), s, 0))) {\r\n\t\t\t\t\t\t\tdirection = Direction.get((direction.toInteger() + 1) & 3);\r\n\t\t\t\t\t\t\tcontinue main;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tTile location = mover.getCurrentTile().copyNew(direction, amount);\r\n\t\t\treturn location;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public HexCell getAdjacentCell(HexCell currentCell, MyValues.HEX_POSITION position){\n int cellX = currentCell.x;\n int cellY = currentCell.y;\n HexCell adjacentCell = null;\n switch (position){\n case TOP:\n if(isInBound(cellY-1, y)){\n adjacentCell = getCell(cellX,\n cellY-1);\n }\n break;\n case BOT:\n if(isInBound(cellY+1, y)){\n adjacentCell = getCell(cellX, cellY+1);\n }\n break;\n case TOP_LEFT:\n if(isInBound(cellX -1, x)){\n if(cellX % 2 ==0){\n if(isInBound(cellY-1, y)){\n adjacentCell = getCell(cellX-1, cellY-1);\n }\n } else{\n adjacentCell = getCell(cellX-1, cellY);\n }\n }\n break;\n case TOP_RIGHT:\n if(isInBound(cellX +1, x)){\n if(cellX % 2 ==0){\n if(isInBound(cellY-1, y)){\n adjacentCell = getCell(cellX+1, cellY-1);\n }\n } else{\n adjacentCell = getCell(cellX+1, cellY);\n }\n }\n break;\n case BOT_LEFT:\n if(isInBound(cellX -1, x)){\n if(cellX % 2 ==1){\n if(isInBound(cellY+1, y)){\n adjacentCell = getCell(cellX-1, cellY+1);\n }\n } else{\n adjacentCell = getCell(cellX-1, cellY);\n }\n }\n break;\n case BOT_RIGHT:\n if(isInBound(cellX +1, x)){\n if(cellX % 2 ==1){\n if(isInBound(cellY+1, y)){\n adjacentCell = getCell(cellX+1, cellY+1);\n }\n } else{\n adjacentCell = getCell(cellX+1, cellY);\n }\n }\n break;\n }\n return adjacentCell;\n }", "@Override\n protected Grid initDestinationGrid(Grid src) {\n return null;\n }", "public abstract void manageCell(int x, int y, int livingNeighbours);", "@Test\n\t\t\tpublic void testRoomExit()\n\t\t\t{\n\t\t\t\t// One step from room\n\t\t\t\tboard.calcTargets(13, 14, 1);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(1, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 14)));\n\n\t\t\t\t// Take two steps\n\t\t\t\tboard.calcTargets(13, 14, 2);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(3, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(11, 14)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 13)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 15)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Test\n void checkCannotForceWithForcedCellOccupied() {\n assertFalse(abilities.checkCanMove(turn, board.getCellFromCoords(1, 0)));\n }", "@Override\n\tpublic boolean takeCellSpace() {\n\t\treturn true;\n\t}", "public WritableCell copyTo(int col, int row)\r\n/* 179: */ {\r\n/* 180:319 */ Assert.verify(false);\r\n/* 181:320 */ return null;\r\n/* 182: */ }", "static private void checkEndNode(PathFinder pathFinder) {\n for (Node n : pathFinder.getSpaceTimeGrid().getBaseLayer().getNodeListWithoutObstacles()) {\n if (n.getX() == pathFinder.getEndNode().getX() && n.getY() == pathFinder.getEndNode().getY()) {\n return;\n }\n }\n throw new PathNotPossibleException(\"The end point was placed outside the SpaceTimeGrid: (\" + pathFinder.getEndNode().getX() + \";\" + pathFinder.getEndNode().getY() + \")\");\n }", "public void setCellToPath(int pos){//how to check for the end???\n\t\t\n\t\tif(pos<0||pos>width*height-1||getCompletePath())\n\t\t\treturn;// the position entered is not valid or the path has already been completed\n\t\t\n\t\telse if(temp.isEmpty()){//no path tile have been defined\n\t\t\tif(currentPos<0){//start hasn't been placed\t\t\n\t\t\t\tcurrentPos=pos;\n\t\t\t\tcurrentPath=new Path(currentPos);\n\t\t\t\tsetEntryPoint(currentPath);\n\t\t\t\tsetGrid(currentPath.getRow(),currentPath.getCol(),currentPath);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tint d = currentPath.getDirection(pos);\n\t\t\t\tif (d<0||d>=4)\n\t\t\t\t\treturn; //the two tiles are not connected\n\t\t\t\tPathType type =Map.createPathTileOfType(d, caseEdge);\n\t\t\t\tPath p =PathFactory.makePath(type, currentPos);\n\t\t\t\t\n\t\t\t\t//fix direction of tile\n\t\t\t\tif(p.getEntry()==pos)\n\t\t\t\t\tp.rotate();\n\t\t\t\t//validate spot (for entry/exit)\n\t\t\t\t\n\t\t\t\t//set as Path entry point \n\t\t\t\tp.setStart();\n\t\t\t\tsetEntryPoint(p);\n\t\t\t\t\n\t\t\t\t//add to grid and list\n\t\t\t\tp.storePathTile();\n\n\t\t\t\t//update current\n\t\t\t\tcurrentPos=pos;\n\t\t\t\tcurrentPath=new Path(currentPos);\t\t\n\t\t\t\tsetGrid(currentPath.getRow(),currentPath.getCol(),currentPath);\n\t\t\t}\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tif (getGrid(pos/width, pos%width)!=null)\n\t\t\t\tif(getGrid(pos/width, pos%width).isPath())\n\t\t\t\t\treturn;//causes intersection\n\t\t\t\n\t\t\tint dExit = currentPath.getDirection(pos);\n\t\t\tint lastPos= temp.peekLast().getPos();\n\t\t\tint dEntry= currentPath.getDirection(lastPos);\n\n\t\t\t\n\t\t\tif (dExit<0||dExit>3||dEntry<0||dEntry>3)\n\t\t\t\treturn; //the two tiles are not connected\n\t\t\t\n\t\t\t\n\t\t\tPathType type =Map.createPathTileOfType(dExit,dEntry);\n\t\t\tPath p =PathFactory.makePath(type, currentPos);\n\t\t\t\n\t\t\t//fix direction of tile\n\t\t\tif(p.getEntry()==pos)\n\t\t\t\tp.rotate();\n\t\t\t\n\t\t\tif(!inValidSpot(p))\n\t\t\t\treturn; //\n\t\t\t\n\t\t\t//add to grid and list\n\t\t\tp.storePathTile();\n\t\t\t\n\t\t\t//update current\n\t\t\tcurrentPos=pos;\n\t\t\tcurrentPath=new Path(currentPos);\t\n\t\t\tsetGrid(currentPath.getRow(),currentPath.getCol(),currentPath);\n\t\t}\n\t}", "private boolean finalDestination(OverlayNodeSendsData event) {\n\t\tif (event.getDestID() == myAssignedID)\n\t\t\treturn true;\n\t\treturn false;\n\n\t}", "private Pair decideMovement(Entity e) {\n Pair pos = gameMap.getCoordinatesFor(e.getId());\n Movable movable = mm.get(e);\n Array<Pair> reachableCells = gameMap.pathFinder.getReachableCells(pos.x, pos.y, movable);\n ImmutableBag<Integer> enemies = groupAI.getEnemies(e);\n if (enemies.size() == 0) return reachableCells.get(MathUtils.random(reachableCells.size-1));\n\n // The best enemy you are considering chasing and its score\n int targetEnemy = -1;\n float bestScore = 0f;\n\n // The current enemy you are checking out and its score\n int id;\n float score;\n\n // How far away is the enemy? How many enemies are within a small radius of it?\n int distance, count;\n\n for (int i = 0; i < enemies.size(); i++) {\n count = 1;\n Pair target = gameMap.getCoordinatesFor(enemies.get(i));\n distance = MapTools.distance(pos.x, pos.y, target.x, target.y);\n for (Pair cell : MapTools.getNeighbors(target.x, target.y, 6)) {\n id = gameMap.getEntityAt(cell.x, cell.y);\n if (!enemies.contains(id)) continue;\n count++;\n }\n\n score = groupAI.entityScores.get(enemies.get(i)) * count / (1 + distance / 5);\n if (score > bestScore) {\n bestScore = score;\n targetEnemy = enemies.get(i);\n }\n }\n\n if (targetEnemy > -1) {\n Pair target = gameMap.getCoordinatesFor(targetEnemy);\n Path path = gameMap.pathFinder.findPath(pos.x, pos.y, target.x, target.y, movable, true);\n for (int i = 0; i < path.getLength(); i++) {\n Step step = path.getStep(i);\n Pair p = new Pair(step.getX(),step.getY());\n if (reachableCells.contains(p, false)) return p;\n }\n }\n return reachableCells.get(MathUtils.random(reachableCells.size-1));\n }", "private MapCell nextCell(MapCell cell) {\r\n\t\t\r\n\t\t//This is an array that holds the possible neighbouring tiles.\r\n\t\tMapCell[] potentialCells = {null,null,null,null};\r\n\t\t\r\n\t\t//This variable is an indicator. If it remains -1, that means no possible neighbouring tiles were found.\r\n\t\tint next = -1; \r\n\t\t\t\r\n\t\t//If the cell is a north road, check that its neighbour to the north is not null or marked. Then, see if it's either\r\n\t\t//an intersection, the destination, or another north road.\r\n\t\tif(cell.getNeighbour(0)!=null && cell.isNorthRoad()) {\r\n\r\n\t\t\tif(!cell.getNeighbour(0).isMarked()) {\r\n\r\n\t\t\t\tif(cell.getNeighbour(0).isIntersection()||cell.getNeighbour(0).isDestination()||cell.getNeighbour(0).isNorthRoad()) {\r\n\r\n\t\t\t\t\t//Add the north neighbour to the array of potential next tiles.\r\n\t\t\t\t\tpotentialCells[0] = cell.getNeighbour(0);\r\n\t\t\t\t\tnext = 0;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t//If the cell is an east road, check that its neighbour to the east is not null or marked. Then, see if it's either\r\n\t\t//an intersection, the destination, or another east road.\r\n\t\t} else if (cell.getNeighbour(1)!=null && cell.isEastRoad()) {\r\n\r\n\t\t\tif(!cell.getNeighbour(1).isMarked()) {\r\n\r\n\t\t\t\tif(cell.getNeighbour(1).isIntersection()||cell.getNeighbour(1).isDestination()||cell.getNeighbour(1).isEastRoad()) {\r\n\r\n\t\t\t\t\t//Add the east neighbour to the potential next tiles.\r\n\t\t\t\t\tpotentialCells[1] = cell.getNeighbour(1);\r\n\t\t\t\t\tnext = 0;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t//If the cell is a south road, check that its neighbour to the south is not null or marked. Then, see if it's either\r\n\t\t//an intersection, the destination, or another south road.\r\n\t\t} else if (cell.getNeighbour(2)!=null && cell.isSouthRoad()) {\r\n\r\n\t\t\tif(!cell.getNeighbour(2).isMarked()) {\r\n\r\n\t\t\t\tif(cell.getNeighbour(2).isIntersection()||cell.getNeighbour(2).isDestination()||cell.getNeighbour(2).isSouthRoad()) {\r\n\r\n\t\t\t\t\t//Add the south neighbour to the potential next tiles.\r\n\t\t\t\t\tpotentialCells[2] = cell.getNeighbour(2);\r\n\t\t\t\t\tnext = 0;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t//If the cell is a west road, check that its neighbour to the west is not null or marked. Then, see if it's either\r\n\t\t//an intersection, the destination, or another west road.\r\n\t\t} else if (cell.getNeighbour(3)!=null && cell.isWestRoad()) {\r\n\r\n\t\t\tif(!cell.getNeighbour(3).isMarked()) {\r\n\r\n\t\t\t\tif(cell.getNeighbour(3).isIntersection()||cell.getNeighbour(3).isDestination()||cell.getNeighbour(3).isWestRoad()) {\r\n\r\n\t\t\t\t\t//Add the west neighbour to the potential next tiles.\r\n\t\t\t\t\tpotentialCells[3] = cell.getNeighbour(3);\r\n\t\t\t\t\tnext = 0;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t//If the current cell is an intersection, go through all 4 of its potential neighbours.\r\n\t\t} else {\r\n\r\n\t\t\tfor(int i = 0; i<4; i++) {\r\n\r\n\t\t\t\t//Check that the neighbour isn't null or marked.\r\n\t\t\t\tif(cell.getNeighbour(i)!=null) {\r\n\r\n\t\t\t\t\tif(!cell.getNeighbour(i).isMarked()) {\r\n\r\n\t\t\t\t\t\t//Check to see if the neighbour is either an intersection, or a one-way road in the proper orientation to\r\n\t\t\t\t\t\t//continue the path.\r\n\t\t\t\t\t\tif(cell.getNeighbour(i).isIntersection()||cell.getNeighbour(i).isDestination()||(i==0\r\n\t\t\t\t\t\t\t\t&&cell.getNeighbour(i).isNorthRoad())||(i==1&&cell.getNeighbour(i).isEastRoad())||(i==2\r\n\t\t\t\t\t\t\t\t&&cell.getNeighbour(i).isSouthRoad())||(i==3&&cell.getNeighbour(i).isWestRoad())) {\r\n\r\n\t\t\t\t\t\t\t//Add the tile to the possible next tiles.\r\n\t\t\t\t\t\t\tpotentialCells[i] = cell.getNeighbour(i);\r\n\t\t\t\t\t\t\tnext = 0;\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t//If no tiles were found, return null.\r\n\t\tif(next == -1) {\r\n\r\n\t\t\treturn null;\r\n\r\n\t\t//Otherwise, select one (or one of) the next possible tiles and return it.\r\n\t\t} else {\r\n\r\n\t\t\tfor(int i = 3; i >= 0; i--) {\r\n\r\n\t\t\t\tif(potentialCells[i]!=null) {\r\n\r\n\t\t\t\t\tnext = i;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\treturn potentialCells[next];\r\n\r\n\t\t}\r\n\t\t\r\n\t}", "public static List<MapTile> findPath(MovableObject mO, GameObject destination) {\n List<MapTile> openList = new LinkedList<>();\n List<MapTile> closedList = new LinkedList<>();\n List<MapTile> neighbours = new ArrayList<>();\n Point objectTileCoord = mO.getGridCoordinates();\n Point destinationTileCoord = destination.getGridCoordinates();\n MapTile currentTile;\n try {\n currentTile = mapGrid.mapGrid[objectTileCoord.x][objectTileCoord.y];\n } catch (ArrayIndexOutOfBoundsException e) {\n System.out.print(\"Error while getting current tile for pathfinding. Trying to adapt coords.\");\n if (mO.getX() >= MapManager.getWorldWidth()) {\n objectTileCoord.x -= 1;\n }\n if (mO.getY() >= MapManager.getWorldHeight()) {\n objectTileCoord.y -= 1;\n }\n if (mO.getY() >= MapManager.getWorldHeight() && mO.getX() >= MapManager.getWorldWidth()) {\n objectTileCoord.x -= 1;\n objectTileCoord.y -= 1;\n }\n currentTile = mapGrid.mapGrid[objectTileCoord.x][objectTileCoord.y];\n }\n\n currentTile.setParentMapTile(null);\n currentTile.totalMovementCost = 0;\n openList.add(currentTile);\n\n boolean notDone = true;\n\n while (notDone) {\n neighbours.clear();\n currentTile = getLowestCostTileFromOpenList(openList, currentTile);\n closedList.add(currentTile);\n openList.remove(currentTile);\n\n //ReachedGoal?\n if ((currentTile.xTileCoord == destinationTileCoord.x) && (currentTile.yTileCoord == destinationTileCoord.y)) {\n try {\n return getResultListOfMapTiles(currentTile);\n } catch (Exception e) {\n System.out.println(\"closed list size: \" + closedList.size());\n throw e;\n }\n }\n\n neighbours.addAll(currentTile.getNeighbourTiles());\n neighbours.removeAll(closedList);\n\n for (MapTile mapTile : neighbours) {\n if (openList.contains(mapTile)) {\n // compare total movement costs.\n if (mapTile.totalMovementCost > currentTile.getMovementCostToTile(mapTile) + currentTile.totalMovementCost) {\n mapTile.setParentMapTile(currentTile);\n mapTile.totalMovementCost = currentTile.getMovementCostToTile(mapTile) + currentTile.totalMovementCost;\n }\n } else {\n mapTile.setParentMapTile(currentTile);\n mapTile.totalMovementCost = currentTile.totalMovementCost + currentTile.getMovementCostToTile(mapTile);\n openList.add(mapTile);\n }\n }\n }\n return null;\n }", "boolean hasDestRange();", "@Test \r\n\tpublic void testTargetsIntoRoom()\r\n\t{\r\n\t\t// One room is exactly 2 away\r\n\t\tboard.calcTargets(19, 8, 2);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(5, targets.size());\r\n\t\t// directly left (can't go right 2 steps)\r\n\t\tassertTrue(targets.contains(board.getCellAt(19, 6)));\r\n\t\t// directly up and down\r\n\t\tassertTrue(targets.contains(board.getCellAt(17, 8)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(21, 8)));\r\n\t\t// one up/down, one left/right\r\n\t\tassertTrue(targets.contains(board.getCellAt(18, 7)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(20, 7)));\r\n\t}", "EndCell(int x, int y) {\r\n this.x = x;\r\n this.y = y;\r\n this.left = null;\r\n this.top = null;\r\n this.right = null;\r\n this.bottom = null;\r\n }", "@Override\n public boolean canMove(int destinationX, int destinationY) {\n int differenceX = Math.abs(destinationX - this.boardCoordinates.x);\n int differenceY = Math.abs(destinationY - this.boardCoordinates.y);\n\n return (destinationX == this.boardCoordinates.x && differenceY == 1) ||\n (destinationY == this.boardCoordinates.y && differenceX == 1) ||\n (differenceX == differenceY && differenceX == 0); //we're handling start=finish coordinates separately\n }", "public Location getDestination()\r\n\t{ return this.destination; }", "public Optional<Boolean> isDestinationPositionAfter();", "public void chasePlayer() {\n refreshObstructionMatrix();\n Coordinate currPosition = new Coordinate(getX(), getY());\n Player player = this.dungeon.getPlayer();\n Coordinate playerPosition = new Coordinate(player.getX(), player.getY());\n\n if (currPosition.equals(playerPosition)) {\n // Debug.printC(\"Enemy has reached the player!\", Debug.RED);\n player.useItem(this);\n } else {\n this.pathToDest = pathFinder.getPathToDest(currPosition, playerPosition);\n if (!this.pathToDest.empty()) {\n Coordinate nextPosition = this.pathToDest.pop();\n // this.setCoordinate(nextPosition);\n if (getX() + 1 == nextPosition.x) {\n moveRight();\n } else if (getX() - 1 == nextPosition.x) {\n moveLeft();\n } else if (getY() + 1 == nextPosition.y) {\n moveDown();\n } else if (getY() - 1 == nextPosition.y) {\n moveUp();\n }\n }\n }\n }", "@Override\n public Location getDestination() {\n return _destinationLocation != null ? _destinationLocation : getOrigin();\n }", "@Override\n public boolean hasPossibleCapture(final Coordinate destination) {\n\n Coordinate coordinate = this.getCoordinate();\n int row = coordinate.getRow();\n int col = coordinate.getCol();\n\n //\n //\n ////\n int tempRow1 = row - 2;\n int tempCol1 = col - 1;\n Coordinate tempCoordinate1 = new Coordinate(tempRow1, tempCol1);\n if (destination.equals(tempCoordinate1)) {\n return true;\n }\n\n ////\n //\n //\n int tempRow2 = row + 2;\n int tempCol2 = col - 1;\n Coordinate tempCoordinate2 = new Coordinate(tempRow2, tempCol2);\n if (destination.equals(tempCoordinate2)) {\n return true;\n }\n\n //////\n //\n int tempRow3 = row - 1;\n int tempCol3 = col - 2;\n Coordinate tempCoordinate3 = new Coordinate(tempRow3, tempCol3);\n if (destination.equals(tempCoordinate3)) {\n return true;\n }\n\n ///////\n //\n int tempRow4 = row - 1;\n int tempCol4 = col + 2;\n Coordinate tempCoordinate4 = new Coordinate(tempRow4, tempCol4);\n if (destination.equals(tempCoordinate4)) {\n return true;\n }\n\n ////\n //\n //\n int tempRow5 = row + 2;\n int tempCol5 = col + 1;\n Coordinate tempCoordinate5 = new Coordinate(tempRow5, tempCol5);\n if (destination.equals(tempCoordinate5)) {\n return true;\n }\n\n //\n //\n ////\n int tempRow6 = row - 2;\n int tempCol6 = col + 1;\n Coordinate tempCoordinate6 = new Coordinate(tempRow6, tempCol6);\n if (destination.equals(tempCoordinate6)) {\n return true;\n }\n\n //\n //////\n int tempRow7 = row + 1;\n int tempCol7 = col - 2;\n Coordinate tempCoordinate7 = new Coordinate(tempRow7, tempCol7);\n if (destination.equals(tempCoordinate7)) {\n return true;\n }\n\n //\n //////\n int tempRow8 = row + 1;\n int tempCol8 = col + 2;\n Coordinate tempCoordinate8 = new Coordinate(tempRow8, tempCol8);\n return destination.equals(tempCoordinate8);\n }", "@Test \n\tpublic void testTargetsIntoRoom()\n\t{\n\t\t// One room is exactly 2 away\n\t\tboard.calcTargets(5, 24, 2);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(4, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(3, 24)));\n\t\tassertTrue(targets.contains(board.getCellAt(6, 23)));\n\t\tassertTrue(targets.contains(board.getCellAt(5, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(4, 23)));\n\t}", "boolean isAllOnDestination(){\n\n if(player.getCurrentX()-player.getDestinationX()!=0 || player.getCurrentY()-player.getDestinationY()!=0)\n return false;\n\n for(int i = 0; i < boxes.size(); i++){\n Box item = boxes.get(i);\n if(item.getCurrentX()-item.getDestinationX()!=0 || item.getCurrentY()-item.getDestinationY()!=0)\n return false;\n }\n return true;\n }", "@Test\n\t\t\tpublic void testRoomEntry()\n\t\t\t{\n\t\t\t\t// two steps from a room two steps away\n\t\t\t\tboard.calcTargets(13, 10, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 9)));\n\t\t\t\t\n\t\t\t\t//Test entering a door when steps are greater than distance to room\n\t\t\t\tboard.calcTargets(8, 7, 8);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 6)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public boolean hasDestination() {\n return destination_ != null;\n }", "public Cell hunt() {\n for (int i = 0; i < height; i++) {\n for (int j = 0; j < width; j++) {\n if (cells[i][j].isVisited() == false && getNeighbors(cells[i][j], true).length >= 1) {\n //mark the found cell as visited\n cells[i][j].visit();\n //find all visited neighbors\n Cell[] visitedNeighbors = getNeighbors(cells[i][j], true);\n //connect this cell and one of the visited neighbors (choose randomly)\n cells[i][j].carveThrough(visitedNeighbors[numberGenerator.nextInt(visitedNeighbors.length)]);\n return cells[i][j];\n }\n }\n }\n return null;\n }", "public Square destination() {\n return destination;\n }", "private AntArea.Cell getCellInDirection(Pair<Integer, Integer> direction) {\n int newX = location.getKey() + direction.getKey();\n int newY = location.getValue() + direction.getValue();\n\n //Torus shape\n newX = newX < 0 ? antArea.getAreaWidth() - 1 : newX;\n newY = newY < 0 ? antArea.getAreaHeight() - 1 : newY;\n newX %= antArea.getAreaWidth();\n newY %= antArea.getAreaHeight();\n\n return antArea.getMap()[newX][newY];\n }", "@Override\n public boolean isValidMove(Tile target, Board board) {\n if (target == null || board == null) {\n throw new NullPointerException(\"Arguments for the isValidMove method can not be null.\");\n }\n // current and target tiles have to be on a diagonal (delta between row and col index have to be identical)\n int currentCol = this.getTile().getCol();\n int currentRow = this.getTile().getRow();\n int targetCol = target.getCol();\n int targetRow = target.getRow();\n\n int deltaRow = Math.abs(currentRow - targetRow);\n int deltaCol = Math.abs(currentCol - targetCol);\n int minDelta = Math.min(deltaCol, deltaRow);\n\n boolean sameDiagonal = deltaCol == deltaRow;\n\n // check if there are pieces between the tiles\n boolean noPiecesBetween = true;\n // Directions -- (Up and to the left) , -+ (Up and to the right), ++, +-\n if (targetRow < currentRow && targetCol < currentCol) { // --\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow - delta, currentCol - delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n\n } else if (targetRow > currentRow && targetCol < currentCol) { // +-\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow + delta, currentCol - delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n } else if (targetRow > currentRow && targetCol > currentCol) { // ++\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow + delta, currentCol + delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n } else if (targetRow < currentRow && targetCol > currentCol) { // -+\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow - delta, currentCol + delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n }\n\n return sameDiagonal && noPiecesBetween;\n }", "public void punishment(){\n\t\tthis.cell = 0;\n\t}", "private void transferPendingCellData()\r\n\t{\r\n\t\tsynchronized(dataLock)\r\n\t\t{\r\n\t\t\tcellData = pendingCellData;\r\n\t\t\trowCount = cellData.length;\r\n\t\t}\r\n\t}", "@Override\n ArrayList<Cell> findPossibleMoves(Cell workerPosition) {\n ArrayList<Cell> neighbors = board.getNeighbors(workerPosition);\n ArrayList<Cell> possibleMoves = new ArrayList<Cell>();\n for (Cell cell : neighbors) {\n // + allow movement to cells occupied by opponents, if they can be pushed away\n Cell nextCell;\n int nextX = cell.getPosX() + (cell.getPosX() - workerPosition.getPosX());\n int nextY = cell.getPosY() + (cell.getPosY() - workerPosition.getPosY());\n try {\n nextCell = board.getCell(nextX, nextY);\n } catch (ArrayIndexOutOfBoundsException e) {\n nextCell = null;\n }\n if ((!cell.hasWorker() || (nextCell != null && !nextCell.hasWorker() && !nextCell.isDomed())) &&\n !cell.isDomed() && (cell.getBuildLevel() <= workerPosition.getBuildLevel() + 1))\n possibleMoves.add(cell);\n //\n }\n return findLegalMoves(workerPosition, possibleMoves);\n }", "int getDestination();", "@SuppressWarnings(\"ConstantConditions\")\n private void moveToNest() throws AntArtException {\n AntArea.Cell forward = getCellInDirection(directionVector);\n AntArea.Cell left = getCellInDirection(AntDirections.moveCounterClockwise(directionVector));\n AntArea.Cell right = getCellInDirection(AntDirections.moveClockWise(directionVector));\n\n //Try to move to a nest cell\n List<AntArea.Cell> cellList = Arrays.asList(forward, left, right);\n if (moveToNestCell(cellList)) {\n return;\n }\n\n //Sort according to home pheremone levels\n cellList.sort((o1, o2) -> {\n float hp1 = o1.getHomePheromone();\n float hp2 = o2.getHomePheromone();\n if (hp1 == hp2) {\n return 0;\n }\n return hp1 > hp2 ? -1 : 1;\n });\n //Do a random action based on a probability\n if (random.nextInt(Configuration.ANT_SELECTION_SEED) == 0) {\n Collections.shuffle(cellList);\n }\n //Try to move to a cell\n for (AntArea.Cell cell : cellList) {\n if (moveTo(cell)) {\n break;\n }\n }\n }", "Destination getDestination();", "@SuppressWarnings(\"ConstantConditions\")\n private void moveToFoodSource() throws AntArtException {\n AntArea.Cell forward = getCellInDirection(directionVector);\n AntArea.Cell left = getCellInDirection(AntDirections.moveCounterClockwise(directionVector));\n AntArea.Cell right = getCellInDirection(AntDirections.moveClockWise(directionVector));\n\n //Try to move to a food cell.\n List<AntArea.Cell> cellList = Arrays.asList(forward, left, right);\n if (moveToFoodCell(cellList)) {\n return;\n }\n //Sort according to food pheromone levels\n cellList.sort((o1, o2) -> {\n float fp1 = o1.getFoodPheromone();\n float fp2 = o2.getFoodPheromone();\n if (fp1 == fp2) {\n return 0;\n }\n return fp1 > fp2 ? -1 : 1;\n });\n //Do a random action based on a probability\n if (random.nextInt(Configuration.ANT_SELECTION_SEED) == 0) {\n Collections.shuffle(cellList);\n }\n //Try to move to a cell\n for (AntArea.Cell cell : cellList) {\n if (moveTo(cell)) {\n break;\n }\n }\n }", "public Actor getDestination()\r\n\t{\r\n\t\treturn destinationActor;\t\r\n\t}", "boolean hasDestination();", "boolean hasDestination();", "public void specialMove() {\n\t\tChessSquare initial = getSquare();\n\t\tChessSquare next;\n\t\t\n\t\tif(initial.getNorth() != null){\n\t\t\tnext = initial.getNorth();\n\t\t\t\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getEast() != null)\n\t\t\t\tif((next.getEast().getOccupant() == null) || (!next.getEast().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getWest() != null && next.getWest().getOccupant() == null)\n\t\t\t\tif((next.getWest().getOccupant() == null) || (!next.getWest().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t}\n\t\t\n\t\tif(initial.getSouth() != null){\n\t\t\tnext = initial.getSouth();\n\t\t\t\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getEast() != null)\n\t\t\t\tif((next.getEast().getOccupant() == null) || (!next.getEast().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getWest() != null)\n\t\t\t\tif((next.getWest().getOccupant() == null) || (!next.getWest().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\t\n\t\t}\n\t\t\n\t\tnext = initial.getEast();\n\t\tif(next != null)\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\tnext = initial.getWest();\n\t\tif(next != null)\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\tsetCountdown(9);\n\t}", "private void tryMovePlayer(int direction) {\n int layerOffset = 0, rowOffset = 0, colOffset = 0;\n boolean canMove = false;\n Maze3D.Cell currentCell = maze3D[playerLayer][playerRow][playerCol];\n Maze3D.Cell nextCell = null;\n try {\n switch (direction)\n {\n case Maze3D.UP:\n nextCell = maze3D[playerLayer][playerRow - 1][playerCol];\n canMove = !(currentCell.isWallTop() || nextCell.isWallBottom());\n rowOffset = -1;\n break;\n case Maze3D.DOWN:\n nextCell = maze3D[playerLayer][playerRow + 1][playerCol];\n canMove = !(currentCell.isWallBottom() || nextCell.isWallTop());\n rowOffset = 1;\n break;\n case Maze3D.LEFT:\n nextCell = maze3D[playerLayer][playerRow][playerCol - 1];\n canMove = !(currentCell.isWallLeft() || nextCell.isWallRight());\n colOffset = -1;\n break;\n case Maze3D.RIGHT:\n nextCell = maze3D[playerLayer][playerRow][playerCol + 1];\n canMove = !(currentCell.isWallRight() || nextCell.isWallLeft());\n colOffset = 1;\n break;\n case Maze3D.FRONT:\n nextCell = maze3D[playerLayer - 1][playerRow][playerCol];\n canMove = !(currentCell.isWallFront() || nextCell.isWallBack());\n layerOffset = -1;\n break;\n case Maze3D.BACK:\n nextCell = maze3D[playerLayer + 1][playerRow][playerCol];\n canMove = !(currentCell.isWallBack() || nextCell.isWallFront());\n layerOffset = 1;\n break;\n }\n //if cell is not null and can move, then move\n if (nextCell != null && canMove)\n {\n playerLayer += layerOffset;\n playerRow += rowOffset;\n playerCol += colOffset;\n mazeView.setPlayerLocation(playerLayer, playerRow, playerCol);\n moves++;\n }\n //if new position is the solution, then game is solved\n if (isSolved())\n {\n notifyGameEnd();\n }\n }\n catch (ArrayIndexOutOfBoundsException e)\n {\n Log.d(TAG, \"tryMovePlayer: player tried to move to edge\");\n }\n }", "@Override\n\tpublic void setDestination(int x, int y) {\n\t\t\n\t}", "private void processMoving(Figure currentFigure, int desiredRow, int desiredCol, int currentRow, int currentCol) {\n if (currentFigure.isValidMove(currentRow, currentCol, desiredRow, desiredCol)) {\n\n if (desiredField.isObstacle()) {\n\n showMessageOnScreen(\"Obstacle in your desired destination,destroy it!\");\n\n\n } else if (!desiredField.isFieldFree()) {\n showMessageOnScreen(\"Opponent unit in your desired destination,kill it!\");\n\n } else {\n this.stats.increaseNumberOfRounds();\n desiredField.setCurrentFigure(currentFigure);\n currentField.setCurrentFigure(null);\n currentPlayer = currentPlayer.equals(playerOne) ? playerTwo : playerOne;\n\n }\n\n } else {\n\n showMessageOnScreen(\"Invalid move!\");\n\n }\n clearChosenFields();\n }", "@Override\r\n\tpublic void move() {\n\t\tPoint target = strategy.search(this.getLocation(), new Point(0,0));\r\n\r\n\t\tint tries = 0;\r\n\t\t\r\n\t\twhile(!state.equals(\"Inactive\") && !game.movement(this, target.x, target.y)){\r\n\t\t\ttarget = strategy.search(new Point(x,y),playerLocation);\r\n\t\t\ttries++;\r\n\t\t\tif(tries > 4) return; // the search strategy has 4 tries to pick a valid location to move to\r\n\t\t}\r\n\t\t\r\n\t\tx = target.x;\r\n\t\ty = target.y;\r\n\r\n\t\tmoveSprite();\r\n\t}", "public void moveToLastAcceptableLocation(){\n\t\tthis.x=this.xTemp;\n\t\tthis.y=this.yTemp;\n\t}", "public void bouger(int origine, int destination) {\n\t\t\n\t}", "private void setAdjacentUnknown(Cell cell) {\n\t\tint count = 0;\n\t\tPoint pos = cell.getPosition();\n\t\tfor (Point adjPos : pos.allAdjacent()) {\n\t\t\tif (!map.containsKey(adjPos)) {\n\t\t\t\tCell adjacent = createCell(adjPos, CellType.UNSAFE_UNKNOWN);\n\t\t\t\tmap.put(adjPos, adjacent);\n\t\t\t\t++count;\n\t\t\t}\n\t\t}\n\t\tLOG.trace(\"added {} cell(s) of type around cell at {}\", count, CellType.UNSAFE_UNKNOWN, pos);\n\t}", "public boolean hasDestination() {\n return result.hasDestination();\n }", "@Test\n\tpublic void selectTargetLocation() {\n\t\tboard.findAllTargets(playerComputer.getCurrentLocation(), 6);\n\t\tSet<BoardCell> targets = board.getTargets();\n\t\t\n\t\t//Tests to make sure the computers chosen cell is in targets\n\t\tBoardCell cell = ((computerPlayer) playerComputer).pickLocation(targets);\n\t\tassertTrue(targets.contains(cell));\n\t\t\n\t\t//This test ensures that if there is a room that hasn't been visited the computer picks that cell\n\t\tIterator<BoardCell> iterator = targets.iterator();\n\t\twhile(iterator.hasNext()) {\n\t\t\tBoardCell cell2 = iterator.next();\n\t\t\tif(cell2.isRoom()) {\n\t\t\t\tif(cell2.getInitial() != ((computerPlayer) playerComputer).getLastVisited()) {\n\t\t\t\t\tassertEquals(cell2.getInitial(), cell.getInitial());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public boolean moveIsPossible(Coordinate coord) {\n if(gameState.getTurnState().hasMoved()){\n return false;\n }\n Field field = gameState.getField();\n if(!field.getField().containsKey(coord)){\n return false;\n }\n Cell currentPosition = gameState.getTurnState().getCurrentPlayer()\n .getPosition();\n Cell destination = field.getCell(coord);\n return field.isReachable(currentPosition, destination, 3);\n }", "@Override\n public double getDestinationY() {\n return myMovable.getDestinationY();\n }", "@Override\n\tprotected void moveto(World world, double x, double y)\n\t{\n\t\t// If the destination is not blocked by terrain, move there\n\t\tif (!world.terrainBlocks(x + halfPlayerWidth(), y - halfPlayerHeight()) &&\n\t\t\t\t!world.terrainBlocks(x - halfPlayerWidth(), y + halfPlayerHeight()) &&\n\t\t\t\t!world.terrainBlocks(x + halfPlayerWidth(), y + halfPlayerHeight()) &&\n\t\t\t\t!world.terrainBlocks(x - halfPlayerWidth(), y - halfPlayerHeight()))\n\t\t{\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t}\n\t\t// Else: Check vertically collision\n\t\telse if (!world.terrainBlocks(this.x + halfPlayerWidth(), y - halfPlayerHeight()) &&\n\t\t\t\t!world.terrainBlocks(this.x - halfPlayerWidth(), y + halfPlayerHeight()) &&\n\t\t\t\t!world.terrainBlocks(this.x + halfPlayerWidth(), y + halfPlayerHeight()) &&\n\t\t\t\t!world.terrainBlocks(this.x - halfPlayerWidth(), y - halfPlayerHeight()))\n\t\t{\n\t\t\tthis.y = y;\n\n\t\t\tthis.drawMissile = false;\n\t\t}\n\t\t// Else: Check horizontally collision\n\t\telse if (!world.terrainBlocks(x + halfPlayerWidth(), this.y - halfPlayerHeight()) &&\n\t\t\t\t!world.terrainBlocks(x - halfPlayerWidth(), this.y + halfPlayerHeight()) &&\n\t\t\t\t!world.terrainBlocks(x + halfPlayerWidth(), this.y + halfPlayerHeight()) &&\n\t\t\t\t!world.terrainBlocks(x - halfPlayerWidth(), this.y - halfPlayerHeight()))\n\t\t{\n\t\t\tthis.x = x;\n\n\t\t\tthis.drawMissile = false;\n\t\t}\n\t}", "public void testGetCell() {\n assertEquals(MazeCell.UNEXPLORED, maze1.getCell(test));\n test = new Location(10, 10);\n assertEquals(MazeCell.INVALID_CELL, maze1.getCell(test));\n test = new Location(-1, -1);\n assertEquals(MazeCell.INVALID_CELL, maze1.getCell(test));\n\n assertEquals(MazeCell.INVALID_CELL, maze1.getCell(test));\n test = new Location(-1, 0);\n assertEquals(MazeCell.INVALID_CELL, maze1.getCell(test));\n test = new Location(0, -1);\n assertEquals(MazeCell.INVALID_CELL, maze1.getCell(test));\n }", "boolean isCellBelowNeighbor() {\r\n return this.neighbors.contains(new Cell(this.x, this.y + 1));\r\n }", "public Location getDestination() {\r\n return destination;\r\n }", "public boolean doIMoveToWorkPlace()\n\t{\n\t\t// if(myWorker.getPosition().getX() == destBuilding.getPosition().getX()\n\t\t// && myWorker.getPosition().getY() ==\n\t\t// destBuilding.getPosition().getY())\n\t\t// return false;\n\t\t// return true;\n\t\tObjectType workplaceType = destBuilding.getObjectType();\n\t\tPoint workplacePoint = destBuilding.getPosition();\n\t\tfor (int i = destBuilding.getPosition().getX(); i < destBuilding\n\t\t\t\t.getPosition().getX()\n\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(workplaceType) - 1; i++)\n\t\t{\n\t\t\tif ((myWorker.getPosition().getX() == i && workplacePoint.getY() - 1 == myWorker\n\t\t\t\t\t.getPosition().getY())\n\t\t\t\t\t|| (myWorker.getPosition().getX() == i && workplacePoint\n\t\t\t\t\t\t\t.getY()\n\t\t\t\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t\t\t\t.get(workplaceType) == myWorker\n\t\t\t\t\t\t\t.getPosition().getY()))\n\t\t\t\treturn false;\n\t\t}\n\n\t\tfor (int i = destBuilding.getPosition().getY(); i < destBuilding\n\t\t\t\t.getPosition().getY()\n\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(workplaceType) - 1; i++)\n\t\t{\n\t\t\tif ((myWorker.getPosition().getY() == i && workplacePoint.getX() - 1 == myWorker\n\t\t\t\t\t.getPosition().getX())\n\t\t\t\t\t|| (myWorker.getPosition().getY() == i && workplacePoint\n\t\t\t\t\t\t\t.getX()\n\t\t\t\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t\t\t\t.get(workplaceType) == myWorker\n\t\t\t\t\t\t\t.getPosition().getX()))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private void checkForConversions() {\n\n for(int r=0; r<COLUMN_ROW_COUNT; r++) {\n for(int c=0; c<COLUMN_ROW_COUNT; c++) {\n Piece p = cells[r][c];\n if(p == null) continue;\n\n if (p.getType().equals(Type.GUARD)) {\n int surroundingDragons = 0;\n Piece piece;\n\n if ((c - 1) >= 0) {\n piece = cells[r][c - 1];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((r- 1) >= 0) {\n piece = cells[r- 1][c];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((c + 1) < COLUMN_ROW_COUNT) {\n piece = cells[r][c + 1];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((r+ 1) < COLUMN_ROW_COUNT) {\n piece = cells[r+ 1][c];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n\n if (surroundingDragons >= 3) {\n cells[r][c].changeType(Type.DRAGON);\n }\n }\n\n /*\n if(p.getType().equals(Type.KING)) {\n int blockedDirections = 0;\n Piece piece;\n\n if ((c - 1) >= 0) {\n piece = cells[r][c - 1];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (c - 2) >= COLUMN_ROW_COUNT && cells[r][c-2] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((r- 1) >= 0) {\n piece = cells[r- 1][c];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (r - 2) >= COLUMN_ROW_COUNT && cells[r-2][c] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((c + 1) < COLUMN_ROW_COUNT) {\n piece = cells[r][c+1];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (c + 2) < COLUMN_ROW_COUNT && cells[r][c+2] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((r+ 1) < COLUMN_ROW_COUNT) {\n piece = cells[r+1][c];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (r + 2) < COLUMN_ROW_COUNT && cells[r+2][c] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if(blockedDirections == 4) {\n //gameOver = true;\n }\n }*/\n }\n }\n }", "public void move(FightCell cell);", "@Override\n public void act()\n {\n Location loc = getLocation();\n int r = loc.getRow();\n int c = loc.getCol();\n int dir = getDirection();\n if(dir == Location.NORTH)\n {\n if(r - START_ROW + 1 > -2*(address & ADDRESS))\n {\n move();\n }\n else\n {\n setDirection(Location.WEST);\n }\n }\n else if(dir == Location.WEST)\n {\n if(c <= RETURN_COL)\n {\n setDirection(Location.SOUTH);\n }\n else\n {\n Bit b = null;\n Actor a = getGrid().get(loc.getAdjacentLocation(Location.SOUTH));\n if(a instanceof Bit) b = (Bit)a;\n if(b != null)\n {\n processBit(b,-c-1);\n }\n move();\n }\n }\n else if(dir == Location.SOUTH)\n {\n if(r == -1)\n {\n setDirection(Location.EAST);\n }\n else\n {\n move();\n }\n }\n else if(dir == Location.EAST)\n {\n move();\n }\n else\n {\n System.err.println(\"yer bus is on an angle bud\");\n }\n }", "public void paradiseMove(){\n if (!getCurrentMainCellCoordinates().equals(new DiscreteCoordinates(11, 9))) {\n move(30);\n }\n }", "protected Location nextLocation()\n {\n // Get list of neighboring empty locations.\n ArrayList emptyNbrs = emptyNeighbors();\n\n // Remove the location behind, since fish do not move backwards.\n Direction oppositeDir = direction().reverse();\n Location locationBehind = environment().getNeighbor(location(),\n oppositeDir);\n emptyNbrs.remove(locationBehind);\n Debug.print(\"Possible new locations are: \" + emptyNbrs.toString());\n\n // If there are no valid empty neighboring locations, then we're done.\n if ( emptyNbrs.size() == 0 )\n return location();\n\n // Return a randomly chosen neighboring empty location.\n Random randNumGen = RandNumGenerator.getInstance();\n int randNum = randNumGen.nextInt(emptyNbrs.size());\n\t return (Location) emptyNbrs.get(randNum);\n }", "@Override\n\tpublic boolean isMoveValid(int srcRow, int srcCol, int destRow, int destCol) {\n\t\treturn false;\n\t}", "private Integer newDestination(Move m, int v, Graph g, Board B) {\n\n int final_dest_R = 0, final_dest_C = 0;\n\n int temp_id = 0;\n\n final_dest_R = (m.getY() + (v / B.width));\n final_dest_C = (m.getX() + (v % B.width));\n\n if (final_dest_R < B.height && final_dest_R >= 0\n && final_dest_C < B.width && final_dest_C >= 0) {\n\n\n temp_id = B.a.get(final_dest_R).get(final_dest_C).id;\n\n }\n\n return temp_id;\n }", "public void testPlaceIllegalTile1() {\n Placement placement = new Placement(Color.GREEN, 0, 0, Color.BLUE, 1, 1);\n try {\n \t\tboard.place(placement);\n fail(\"It's not legal to put tile without any adjacent occupied cells\");\n } catch (StateException e) {\n // passed\n }\n catch (ContractAssertionError e) {\n \tSystem.out.println(\"ContractAssertionError\");\n }\n \t\n }", "public int uniquePathsWithObstacles(int[][] obstacleGrid) {\n // If the starting cell has an obstacle, then simply return as there would be\n // no paths to the destination.\n if (obstacleGrid[0][0] == 1) {\n return 0;\n }\n\n int rowLen = obstacleGrid.length;\n int colLen = obstacleGrid[0].length;\n\n // Number of ways of reaching the starting cell = 1.\n obstacleGrid[0][0] = 1;\n\n // Filling the values for the first column\n for (int col = 1; col < colLen; col++) {\n obstacleGrid[0][col] = (obstacleGrid[0][col] == 0 && obstacleGrid[0][col-1] == 1) ? 1 : 0;\n }\n\n // Filling the values for the first row\n for (int row = 1; row < rowLen; row++) {\n obstacleGrid[row][0] = (obstacleGrid[row][0] == 0 && obstacleGrid[row-1][0] == 1) ? 1 : 0;\n }\n\n // Starting from cell(1,1) fill up the values\n // No. of ways of reaching cell[i][j] = cell[i - 1][j] + cell[i][j - 1]\n // i.e. From above and left.\n for(int row=1; row < rowLen; row++) {\n for (int col = 1; col < colLen; col++) {\n if (obstacleGrid[row][col] == 1) {\n obstacleGrid[row][col] = 0;\n }else {\n obstacleGrid[row][col] = obstacleGrid[row][col-1] + obstacleGrid[row-1][col];\n }\n }\n }\n\n // Return value stored in rightmost bottommost cell. That is the destination.\n return obstacleGrid[rowLen-1][colLen-1];\n }", "public boolean destinationPermitted(Position p) {\n\n return (p.getX() >= 0 && p.getX() < x_length + 1 && p.getY() >= 0 &&\n p.getY() < y_length + 1 && !isOccupied(p));\n }", "void findUp(Board board) {\n if (tile.getRowPos() != 0) {\n Tile upTile = board.getTileObjByPosition(tile.getRowPos() - 1, tile.getColPos());\n if (upTile != null) {\n if (RailroadInk.areConnectedNeighbours(tile.getPlacementStr(), upTile.getPlacementStr())) {\n Node upNode;\n if ((upTile.graphId > 0) || ((upTile.graphId == -1) && (upTile.upId == graphId))) {\n upNode = nodeMap.get(upTile.pos);\n } else {\n upNode = new Node(upTile);\n if (upTile.name.equals(\"B2\")) {\n upTile.downId = graphId;\n }\n nodeMap.put(upTile.pos, upNode);\n }\n\n // Update the connection relationship.\n this.up = upNode;\n upNode.down = this;\n if (this.tile.name.equals(\"B2\")) {\n this.tile.upId = graphId;\n }\n\n if (upNode.up == null) {\n upNode.findUp(board);\n }\n if ((!upTile.name.equals(\"B2\")) && (upNode.right == null)) {\n upNode.findRight(board);\n }\n if ((!upTile.name.equals(\"B2\")) && (upNode.left == null)) {\n upNode.findLeft(board);\n }\n }\n }\n }\n }", "@Override\n\tprotected void landAction(){\n\t\tdestIndex++;\n\t\tif(destIndex>=track.size())\n\t\t\tdestIndex=0;\n\t\tdestination=track.get(destIndex);\n\t\t\n\t}", "@Test\r\n\tpublic void testTargetsIntoRoomShortcut() \r\n\t{\r\n\t\tboard.calcTargets(11, 24, 3);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(6, targets.size());\r\n\t\t//up and then left\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 22)));\r\n\t\t//up left down\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 23)));\r\n\t\t//left up right\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 24)));\r\n\t\t//left only\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 21)));\r\n\t\t// into the rooms\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 23)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 22)));\t\t\t\r\n\t}", "@Override\n public Map<Direction, List<Coordinate>> getPossibleMoves() {\n\n Map<Direction, List<Coordinate>> moves = new HashMap<>();\n\n Coordinate coordinate = this.getCoordinate();\n int row = coordinate.getRow();\n int col = coordinate.getCol();\n\n //Jumps\n List<Coordinate> jumps = new ArrayList<>();\n\n //\n //\n ////\n int tempRow1 = row - 2;\n int tempCol1 = col - 1;\n Coordinate tempCoordinate1 = new Coordinate(tempRow1, tempCol1);\n if (Board.inBounds(tempCoordinate1)) {\n jumps.add(tempCoordinate1);\n }\n\n ////\n //\n //\n int tempRow2 = row + 2;\n int tempCol2 = col - 1;\n Coordinate tempCoordinate2 = new Coordinate(tempRow2, tempCol2);\n if (Board.inBounds(tempCoordinate2)) {\n jumps.add(tempCoordinate2);\n }\n\n //////\n //\n int tempRow3 = row - 1;\n int tempCol3 = col - 2;\n Coordinate tempCoordinate3 = new Coordinate(tempRow3, tempCol3);\n if (Board.inBounds(tempCoordinate3)) {\n jumps.add(tempCoordinate3);\n }\n\n ///////\n //\n int tempRow4 = row - 1;\n int tempCol4 = col + 2;\n Coordinate tempCoordinate4 = new Coordinate(tempRow4, tempCol4);\n if (Board.inBounds(tempCoordinate4)) {\n jumps.add(tempCoordinate4);\n }\n\n ////\n //\n //\n int tempRow5 = row + 2;\n int tempCol5 = col + 1;\n Coordinate tempCoordinate5 = new Coordinate(tempRow5, tempCol5);\n if (Board.inBounds(tempCoordinate5)) {\n jumps.add(tempCoordinate5);\n }\n\n //\n //\n ////\n int tempRow6 = row - 2;\n int tempCol6 = col + 1;\n Coordinate tempCoordinate6 = new Coordinate(tempRow6, tempCol6);\n if (Board.inBounds(tempCoordinate6)) {\n jumps.add(tempCoordinate6);\n }\n\n //\n //////\n int tempRow7 = row + 1;\n int tempCol7 = col - 2;\n Coordinate tempCoordinate7 = new Coordinate(tempRow7, tempCol7);\n if (Board.inBounds(tempCoordinate7)) {\n jumps.add(tempCoordinate7);\n }\n\n //\n //////\n int tempRow8 = row + 1;\n int tempCol8 = col + 2;\n Coordinate tempCoordinate8 = new Coordinate(tempRow8, tempCol8);\n if (Board.inBounds(tempCoordinate8)) {\n jumps.add(tempCoordinate8);\n }\n\n if (!jumps.isEmpty()) {\n moves.put(Direction.Jump, jumps);\n }\n return moves;\n }", "private void moveTile()\n {\n int[] moveIndices = null;\n \n int sourceRow = moveIndices[0];\n int sourceCol = moveIndices[1];\n int destRow = moveIndices[2] - 1;\n int destCol = moveIndices[3];\n \n if (sourceRow == 0) \n {\n try\n {\n game.playTileFromHand(sourceCol, destRow, destCol);\n }\n catch(ArrayIndexOutOfBoundsException ex)\n {\n // TODO: ConsoleUtils.message(\"Unable to complete your play, wrong indices!\");\n }\n }\n else\n {\n sourceRow--;\n try\n {\n game.moveTileInBoard(sourceRow, sourceCol, destRow, destCol); \n }\n catch(ArrayIndexOutOfBoundsException ex)\n {\n // TODO: ConsoleUtils.message(\"Unable to complete your play, wrong indices!\");\n }\n }\n }" ]
[ "0.64039695", "0.6199365", "0.60665345", "0.60548526", "0.6035209", "0.6034745", "0.6003671", "0.5981077", "0.59729755", "0.59695154", "0.58832896", "0.5871445", "0.58503044", "0.58477896", "0.58465636", "0.58309305", "0.58302", "0.58018064", "0.579739", "0.57802045", "0.57789767", "0.5760508", "0.57435477", "0.57289934", "0.5712437", "0.57116544", "0.57027525", "0.5687332", "0.56563354", "0.5648341", "0.56439507", "0.5640687", "0.5639108", "0.56350064", "0.56238526", "0.56202966", "0.56039923", "0.5601975", "0.5596415", "0.5594964", "0.55931664", "0.5592829", "0.5563036", "0.5556967", "0.55556893", "0.5551133", "0.55391675", "0.5533495", "0.5528226", "0.55230737", "0.5521413", "0.54989696", "0.54961973", "0.54917693", "0.54914796", "0.54887474", "0.5482181", "0.5477078", "0.5476555", "0.5465572", "0.5463035", "0.54596865", "0.54564595", "0.54558474", "0.54490626", "0.54473245", "0.54362077", "0.5435927", "0.5435927", "0.5435795", "0.5435064", "0.543237", "0.54287225", "0.54222053", "0.54201204", "0.54191536", "0.54159224", "0.54089713", "0.54034245", "0.54020995", "0.5399114", "0.5397464", "0.5392351", "0.538345", "0.5382218", "0.5380845", "0.5379579", "0.53706443", "0.53625834", "0.5359199", "0.5356522", "0.53457546", "0.5342237", "0.53346616", "0.53335285", "0.53317225", "0.53254277", "0.53244686", "0.53233504", "0.5322057", "0.5320017" ]
0.0
-1
a priority queue to keep weight to know which edge is lighter
public DijkstraSP(EdgeWeightedDigraph G, int s) { edgeTo = new DirectedEdge[G.V()]; distTo = new double[G.V()]; pq = new IndexMinPQ<Double>(G.V()); for (int v = 0; v < G.V(); v++) distTo[v] = Double.POSITIVE_INFINITY; distTo[s] = 0.0; pq.insert(s, 0.0); while (!pq.isEmpty()) relax(G, pq.delMin()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void primsMST(List<Vertex> graph) {\n\n\t\tMyPriorityQueue priorityQueue = new MyPriorityQueue(10);\n\t\tfor (Vertex v : graph) {\n\t\t\tv.key = Integer.MAX_VALUE;\n\t\t\tpriorityQueue.add(v);\n\t\t}\n\n\t\tVertex peek = priorityQueue.peek();\n\t\tpeek.key = 0;\n\n\t\twhile (!priorityQueue.isEmpty()) {\n\t\t\t//Vertex minVertex = priorityQueue.poll();\n\t\t\tVertex minVertex = priorityQueue.poll();\n\t\t\t\n\t\t\tif (minVertex.incidentEdges != null && minVertex.incidentEdges.size() > 0) {\n\t\t\t\tfor (Edge edge : minVertex.incidentEdges) {\n\t\t\t\t\tif (/*priorityQueue.contains(edge.end) && */edge.weight < edge.end.key) {\n\t\t\t\t\t\t//priorityQueue.remove(edge.end);\n\t\t\t\t\t\tedge.end.key = edge.weight;\n\t\t\t\t\t\tedge.end.previous = minVertex;\n\t\t\t\t\t\tpriorityQueue.add(edge.end);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void PrimsAlgorithm(WeightedGraph graph) {\n System.out.println(\"______________________________Prim's Algorithm(Priority Queue)_____________________________\\n\");\n ArrayList<Edge> mst = new ArrayList<>();\n // initialize an array that will keep track of which vertices have been visited\n boolean[] visited = new boolean[graph.getVertices()];\n // initialize a PriorityQueue \n PriorityQueue<Edge> priorityQueue = new PriorityQueue<>();\n // mark the initial vertex as visited\n visited[0] = true;\n\n // for every edge connected to the source, add it to the PriorityQueue \n for (int i = 0; i < graph.getAdjacencylist(0).size(); i++) {\n priorityQueue.add(graph.getAdjacencylist(0).get(i));\n }\n\n // keep adding edges until the PriorityQueue is empty\n while (!priorityQueue.isEmpty()) {\n Edge e = priorityQueue.remove();\n\n // if we have already visited the opposite vertex, go to the next edge\n if (visited[e.getDestination()]) {\n continue;\n }\n\n //mark the opposite vertex as visited\n visited[e.getDestination()] = true;\n //Add an edge to the minimum spanning tree\n mst.add(e);\n\n // for every edge connected to the opposite vertex, add it to the PriorityQueue\n for (int i = 0; i < graph.getAdjacencylist(e.getDestination()).size(); i++) {\n priorityQueue.add(graph.getAdjacencylist(e.getDestination()).get(i));\n }\n\n }\n\n // if we haven't visited all of the vertices, return \n for (int i = 1; i < graph.getVertices(); i++) {\n if (!visited[i]) {\n System.out.println(\"Error! the graph is not connected.\");\n return;\n }\n }\n\n }", "double getEdgeWeight();", "private void e_Neighbours(int u){ \n int edgeDistance = -1; \n int newDistance = -1; \n \n // All the neighbors of v \n for (int i = 0; i < adj.get(u).size(); i++) { \n Node v = adj.get(u).get(i); \n \n // If current node hasn't already been processed \n if (!settled.contains(v.node)) { \n edgeDistance = v.cost; \n newDistance = dist[u] + edgeDistance; \n \n // If new distance is cheaper in cost \n if (newDistance < dist[v.node]) \n dist[v.node] = newDistance; \n \n // Add the current node to the queue \n pq.add(new Node(v.node, dist[v.node])); \n } \n } \n }", "public int getWeight(){\n\t\treturn this.edgeWeight;\n\t}", "private void processOverlay(){\n \n // go for as long as edges still exist.\n while(this.availableVertices.size() > 0)\n {\n \n // pick the least weight vertex.\n Vertex next = this.availableVertices.poll(); // finding the least weight vertex.\n int distanceToNext = this.distances.get(convertToString(next.getVertexPortNum())); // must use the string version of the portnum.\n \n // and for each available squad member of the chosen vertex\n List<Edge> nextSquad = next.getSquad(); \n for(Edge e: nextSquad)\n {\n Vertex other = e.getNeighbor(next);\n if(this.visitedVertices.contains(other))\n {\n continue; // continue the while loop in this case.\n }\n \n // check for a shorter path, update if a new path is found within the overlay.\n int currentWeight = this.distances.get(convertToString(other.getVertexPortNum())); // using string version of the port number.\n int newWeight = distanceToNext + e.getWeight();\n \n if(newWeight < currentWeight){\n this.predecessors.put(convertToString(other.getVertexPortNum()), convertToString(next.getVertexPortNum())); // use the string versions of the port numbers.\n this.distances.put(convertToString(other.getVertexPortNum()), newWeight); // use the string version of the port numbers.\n // updating here.\n this.availableVertices.remove(other);\n this.availableVertices.add(other);\n }\n \n }\n \n this.visitedVertices.add(next); // add this vertex as \"visited\" so we do not visit it again.\n }\n }", "public int getWeight()\r\n\t{\r\n\t\treturn edgeWeight;\t\t\r\n\t}", "@Override\r\n\tpublic ArrayList<Edge<E>> primMinimumSpanningTree(E src) {\r\n\t\tArrayList<Edge<E>> prim = new ArrayList<Edge<E>>();\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tlastSrc = vertices.get(src);\r\n\t\t\tPriorityQueue<Vertex<E>> pq = new PriorityQueue<Vertex<E>>();\r\n\t\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\t\tu.setDistance(Integer.MAX_VALUE);\r\n\t\t\t\tu.setColor(Color.WHITE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t\tpq.offer(u);\r\n\t\t\t});\r\n\t\t\tpq.remove(lastSrc);\r\n\t\t\tlastSrc.setDistance(0);\r\n\t\t\tpq.offer(lastSrc);\r\n\r\n\t\t\twhile(!pq.isEmpty()) {\r\n\t\t\t\tVertex<E> u = pq.poll();\r\n\t\t\t\tfor(Edge<E> ale : adjacencyLists.get(u.getElement())) {\r\n\t\t\t\t\tVertex<E> s = vertices.get(ale.getSrc());\r\n\t\t\t\t\tVertex<E> d = vertices.get(ale.getDst());\r\n\t\t\t\t\tif(d.getColor() == Color.WHITE && d.getDistance() > ale.getWeight()) {\r\n\t\t\t\t\t\tpq.remove(d);\r\n\t\t\t\t\t\tVertex<E> pred = d.getPredecessor();\r\n\t\t\t\t\t\tif(pred != null) { //remove the edge that has ale.dst as dst vertex\r\n\t\t\t\t\t\t\tEdge<E> edgeToRemove = new Edge<>(pred.getElement(), ale.getDst(), 1);\r\n\t\t\t\t\t\t\tprim.remove(edgeToRemove);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\td.setDistance(ale.getWeight());\r\n\t\t\t\t\t\td.setPredecessor(s);\r\n\t\t\t\t\t\tpq.offer(d);\r\n\t\t\t\t\t\tprim.add(ale);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tu.setColor(Color.BLACK);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn prim;\r\n\t}", "public int compareTo(Object e){\n if(weight == ((Edge)e).weight){\n return 0;\n }\n else if(weight > ((Edge)e).weight){\n return 1;\n }\n else{\n return -1;\n }\n }", "@Override\n public int compareTo(Edge edge) {\n return Integer.compare(this.weight, edge.weight);\n }", "public void calcSP(Graph g, Vertex source){\n // Algorithm:\n // 1. Take the unvisited node with minimum weight.\n // 2. Visit all its neighbours.\n // 3. Update the distances for all the neighbours (In the Priority Queue).\n // Repeat the process till all the connected nodes are visited.\n\n // clear existing info\n// System.out.println(\"Calc SP from vertex:\" + source.name);\n g.resetMinDistance();\n source.minDistance = 0;\n PriorityQueue<Vertex> queue = new PriorityQueue<Vertex>();\n queue.add(source);\n\n while(!queue.isEmpty()){\n Vertex u = queue.poll();\n for(Edge neighbour:u.neighbours){\n// System.out.println(\"Scanning vector: \"+neighbour.target.name);\n Double newDist = u.minDistance+neighbour.weight;\n\n // get new shortest path, empty existing path info\n if(neighbour.target.minDistance>newDist){\n // Remove the node from the queue to update the distance value.\n queue.remove(neighbour.target);\n neighbour.target.minDistance = newDist;\n\n // Take the path visited till now and add the new node.s\n neighbour.target.path = new ArrayList<>(u.path);\n neighbour.target.path.add(u);\n// System.out.println(\"Path\");\n// for (Vertex vv: neighbour.target.path) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n\n// System.out.println(\"Paths\");\n neighbour.target.pathCnt = 0;\n neighbour.target.paths = new ArrayList<ArrayList<Vertex>>();\n if (u.paths.size() == 0) {\n ArrayList<Vertex> p = new ArrayList<Vertex>();\n p.add(u);\n neighbour.target.paths.add(p);\n neighbour.target.pathCnt++;\n } else {\n for (ArrayList<Vertex> p : u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n// for (Vertex vv : p1) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n }\n\n //Reenter the node with new distance.\n queue.add(neighbour.target);\n }\n // get equal cost path, add into path list\n else if (neighbour.target.minDistance == newDist) {\n queue.remove(neighbour.target);\n for(ArrayList<Vertex> p: u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n queue.add(neighbour.target);\n }\n }\n }\n }", "public static void mst(int n)\r\n {\r\n \r\n boolean[]visited=new boolean[n+1];\r\n \r\n //sort queue with considering weight as a key\r\n PriorityQueue<Node>queue=new PriorityQueue<>(new Comparator<Node>(){\r\n public int compare(Node n1,Node n2)\r\n {\r\n return n1.weight-n2.weight;\r\n }\r\n });\r\n \r\n visited[1]=true;\r\n \r\n for(Edge e:list[1])\r\n {\r\n queue.add(new Node(e.weight,e.vertex,1));\r\n }\r\n \r\n while(queue.size()!=0)\r\n {\r\n Node node=queue.poll();\r\n \r\n int weight=node.weight;\r\n int curr=node.curr;\r\n int parent=node.parent;\r\n \r\n if(visited[curr])\r\n continue;\r\n \r\n visited[curr]=true;\r\n arr.add(new Node(weight,curr,parent));\r\n ans+=weight;\r\n \r\n for(Edge e:list[curr])\r\n {\r\n queue.add(new Node(e.weight,e.vertex,curr));\r\n }\r\n \r\n }\r\n \r\n }", "@Override\n public int compareTo(Edge e) {\n if (this.getWeight() > e.getWeight()) {\n return +1;\n } else if (this.getWeight() == e.getWeight()) {\n return 0;\n } else {\n return -1;\n }\n }", "@Override\r\n\tpublic int compareTo(Edge o) {\n\t\tif(o.weight==this.weight) return 0;\r\n\t\tif(this.weight>o.weight) return 1;\r\n\t\treturn -1;\r\n\t}", "void setBestIncoming(E edge);", "public void computeAllPaths(String source)\r\n {\r\n Vertex sourceVertex = network_topology.get(source);\r\n Vertex u,v;\r\n double distuv;\r\n\r\n Queue<Vertex> vertexQueue = new PriorityQueue<Vertex>();\r\n \r\n \r\n // Switch between methods and decide what to do\r\n if(routing_method.equals(\"SHP\"))\r\n {\r\n // SHP, weight of each edge is 1\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + 1;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n else if (routing_method.equals(\"SDP\"))\r\n {\r\n // SDP, weight of each edge is it's propagation delay\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + u.adjacentVertices.get(key).propDelay;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n } \r\n }\r\n }\r\n else if (routing_method.equals(\"LLP\"))\r\n {\r\n // LLP, weight each edge is activeCircuits/AvailableCircuits\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = Math.max(u.minDistance,u.adjacentGet(key).load());\r\n //System.out.println(u.adjacentGet(key).load());\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n }\r\n }\r\n }", "void addEdge(int source, int destination, int weight);", "public static void main(String[] args)\n\t{\n\t\tdouble mine = (29 + 27 + 29 + /*24*/ 28 + 30 + 50 + 55 + 17 + 19 + 16 + 18 + 17 + 17 + 20 + 18 + 20 + 82 + 81 + 87 + 215);\n\t\t\n\t\tdouble pote = (30 + 30 + 30 + 30 + 30 + 60 + 30 + 30 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 100 + 100 + 100 + 250);\n\t\t\n\t\tdouble grade = (mine / pote) * 100;\n\t\tSystem.out.println(grade);\n\t\t\n\t\tPriorityQueue<String> pq = new PriorityQueue<String>();\n\t\tPriorityQueue<String> pq2 = new PriorityQueue<String>();\n\t\tPriorityQueue<Character> pq3 = new PriorityQueue<Character>();\n\t\t/*\n\t\tPriorityQueue pq4 = new PriorityQueue();\n\t\tpq4.enqueuePQ(2, \"F\");\n\t\tpq4.enqueuePQ(2, 32);\n\t\tSystem.out.println(pq4.toString());\n\t\t*/\n\t\t\n\t\t\n\t\tpq3.enqueuePQ(3, 'A');\n\t\tpq3.enqueuePQ(3, 'B');\n\t\tpq3.enqueuePQ(3, 'C');\n\t\tSystem.out.println(pq3.toString());\n\t\t\n\t\tSystem.out.println(pq3.dequeuePQ());\n\t\tSystem.out.println(pq3.peekPQ());\n\t\t\n\t\tpq2.enqueuePQ(2, \"two\");\n\t\tpq2.enqueuePQ(3, \"three\");\n\t\tpq2.enqueuePQ(1, \"one\");\n\t\t//pq2.enqueuePQ(-2, \"neg two\");\n\t\t//pq2.enqueuePQ(3, \"three 2\");\n\t\t//pq2.enqueuePQ(-2, \"neg two 2\");\n\t\t//pq2.enqueuePQ(1, \"one 2\");\n\t\tSystem.out.println(pq2.toString());\n\t\t\n\t\tSystem.out.println(pq2.dequeuePQ());\n\t\tSystem.out.println(pq2.peekPQ());\n\t\tSystem.out.println(pq2.toString());\n\t\t\n\t\tSystem.out.println(pq.isEmpty());\n\t\tpq.enqueuePQ(3, \"three\");\n\t\tSystem.out.println(pq.toString());\n\t\tpq.enqueuePQ(5, \"five\");\n\t\tSystem.out.println(pq.isEmpty());\n\t\tSystem.out.println(pq.toString());\n\t\tSystem.out.println(pq.dequeuePQ());\n\t\tSystem.out.println(pq.isEmpty());\n\t\tSystem.out.println(pq.dequeuePQ());\n\t\t\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(pq.peekPQ());\n\t\t}\n\t\tcatch (PQException ex)\n\t\t{\n\t\t\tSystem.out.println(\"PEEK EXCEPTION CAUGHT\");\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(pq.dequeuePQ());\n\t\t}\n\t\tcatch (PQException ex)\n\t\t{\n\t\t\tSystem.out.println(\"Dequeue EXCEPTION CAUGHT\");\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(pq.isEmpty());\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"DONE\");\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n\t\tpublic int compareTo(Edge o) {\n\t\t\treturn Integer.compare(this.weight, o.weight);\n\t\t}", "private synchronized void refreshQueuePriority() {\n BlockingQueue<Message> newQueue;\n if(highPriorityMode) {\n newQueue = new PriorityBlockingQueue<>(DEFAULT_CAPACITY_SIZE, HighPriorityModeComparator.COMPARATOR);\n } else {\n newQueue = new PriorityBlockingQueue<>(DEFAULT_CAPACITY_SIZE, NoPriorityModeComparator.COMPARATOR);\n }\n this.queue.drainTo(newQueue);\n this.queue = newQueue;\n latch.countDown();\n }", "@Override\r\n\tpublic void Dijkstra(E src) {\r\n\t\tPriorityQueue<Vertex<E>> pq = new PriorityQueue<Vertex<E>>();\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tlastSrc = vertices.get(src);\r\n\t\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\t\tu.setDistance(Integer.MAX_VALUE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t\tpq.offer(u);\r\n\t\t\t});\r\n\t\t\tpq.remove(lastSrc);\r\n\t\t\tlastSrc.setDistance(0);\r\n\t\t\tpq.offer(lastSrc);\r\n\t\t\twhile(!pq.isEmpty()) {\r\n\t\t\t\tVertex<E> u = pq.poll();\r\n\t\t\t\tfor(Edge<E> ale : adjacencyLists.get(u.getElement())) {\r\n\t\t\t\t\tVertex<E> s = vertices.get(ale.getSrc());\r\n\t\t\t\t\tVertex<E> d = vertices.get(ale.getDst());\r\n\t\t\t\t\tif(d.getDistance() > (long)s.getDistance() + (long)ale.getWeight()) {\r\n\t\t\t\t\t\tpq.remove(ale.getDst());\r\n\t\t\t\t\t\td.setDistance(s.getDistance() + ale.getWeight());\r\n\t\t\t\t\t\td.setPredecessor(s);\r\n\t\t\t\t\t\tpq.offer(d);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setPriorityQueue() {\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\tif (leafEntries[i].getFrequency() > 0)\n\t\t\t\tpq.add(new BinaryTree<HuffmanData>(leafEntries[i]));\n\t\t}\n\t}", "private void calculate() {\n\t\tList<Edge> path = new ArrayList<>();\n\t\tPriorityQueue<Vert> qv = new PriorityQueue<>();\n\t\tverts[s].dist = 0;\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tif (e.w==0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist < L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t} else if (verts[t].dist == L) {\n\t\t\tok = true;\n\t\t\tfor (int i=0; i<m; i++) {\n\t\t\t\tif (edges[i].w == 0) {\n\t\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// replace 0 with 1, adding to za list\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (edges[i].w == 0) {\n\t\t\t\tza[i] = true;\n\t\t\t\tedges[i].w = 1;\n\t\t\t} else {\n\t\t\t\tza[i] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// looking for shortest path from s to t with 0\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tif (i != s) {\n\t\t\t\tverts[i].dist = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tqv.clear();\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist > L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t}\n\t\tVert v = verts[t];\n\t\twhile (v.dist > 0) {\n\t\t\tlong minDist = MAX_DIST;\n\t\t\tVert vMin = null;\n\t\t\tEdge eMin = null;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(v.idx)];\n\t\t\t\tif (vo.dist+e.w < minDist) {\n\t\t\t\t\tvMin = vo;\n\t\t\t\t\teMin = e;\n\t\t\t\t\tminDist = vMin.dist+e.w;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tv = vMin;\t\n\t\t\tpath.add(eMin);\n\t\t}\n\t\tCollections.reverse(path);\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (za[i]) {\n\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tlong totLen=0;\n\t\tboolean wFixed = false;\n\t\tfor (Edge e : path) {\n\t\t\ttotLen += (za[e.idx] ? 1 : e.w);\n\t\t}\n\t\tfor (Edge e : path) {\n\t\t\tif (za[e.idx]) {\n\t\t\t\tif (!wFixed) {\n\t\t\t\t\te.w = L - totLen + 1;\n\t\t\t\t\twFixed = true;\n\t\t\t\t} else {\n\t\t\t\t\te.w = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tok = true;\n\t}", "private static void disjkstraAlgorithm(Node sourceNode, GraphBuilder graph){\n PriorityQueue<Node> smallestDisQueue = new PriorityQueue<>(graph.nodeArr.size(), new Comparator<Node>() {\n @Override\n public int compare(Node first, Node sec) {\n if(first.distance == Integer.MAX_VALUE && sec.distance == Integer.MAX_VALUE){\n return 0;\n }\n else if(first.distance == Integer.MAX_VALUE && sec.distance != Integer.MAX_VALUE){\n return 1;\n } else if(first.distance != Integer.MAX_VALUE && sec.distance == Integer.MAX_VALUE){\n return -1;\n }\n else\n return (int) (first.distance - sec.distance);\n }\n });\n\n smallestDisQueue.add(sourceNode); //add the node to the queue\n\n // until all vertices are know get the vertex with smallest distance\n\n while(!smallestDisQueue.isEmpty()) {\n\n Node currNode = smallestDisQueue.poll();\n// System.out.println(\"Curr: \");\n// System.out.println(currNode);\n if(currNode.known)\n continue; //do nothing if the currNode is known\n\n currNode.known = true; // otherwise, set it to be known\n\n for(Edge connectedEdge : currNode.connectingEdges){\n Node nextNode = connectedEdge.head;\n if(!nextNode.known){ // Visit all neighbors that are unknown\n\n long weight = connectedEdge.weight;\n if(currNode.distance == Integer.MAX_VALUE){\n continue;\n }\n else if(nextNode.distance == Integer.MAX_VALUE && currNode.distance == Integer.MAX_VALUE) {\n continue;\n }\n\n else if(nextNode.distance> weight + currNode.distance){//Update their distance and path variable\n smallestDisQueue.remove(nextNode); //remove it from the queue\n nextNode.distance = weight + currNode.distance;\n\n smallestDisQueue.add(nextNode); //add it again to the queue\n nextNode.pathFromSouce = currNode;\n\n// System.out.println(\"Next: \");\n// System.out.println(nextNode);\n }\n }\n }\n// System.out.println(\"/////////////\");\n }\n }", "@Test\n public void randomLockstep() {\n PriorityBlockingQueue pbq = new PriorityBlockingQueue();\n PriorityQueue pq = new PriorityQueue();\n List<Consumer<Queue>> frobbers = List.of(\n q -> q.add(42),\n q -> assertTrue(q.offer(86)),\n q -> q.poll(),\n q -> q.peek(),\n q -> {\n Iterator it = q.iterator();\n if (it.hasNext()) {\n it.next();\n it.remove();\n }});\n for (int i = 0; i < 100; i++) {\n Consumer<Queue> frobber = frobbers.get(rnd.nextInt(frobbers.size()));\n frobber.accept(pq);\n frobber.accept(pbq);\n assertInvariants(pbq);\n assertInvariants(pq);\n assertTrue(Arrays.equals(pq.toArray(), pbq.toArray()));\n }\n }", "void enqueue(int x, int p){\n for(int i=0;i<size;i++){\n if(values[i]==(-1)){\n values[i] = x;\n priorities[i] = p;\n break;\n }\n }\n }", "@Override\n public double getEdgeWeight() {\n return edgeWeight;\n }", "private PriorityQueue<Edge> _getKruskalTree(boolean input)\n{\n PriorityQueue<Edge> completeTree = new PriorityQueue<Edge>();\n for (int loop = 0;\n loop < this.nVerts;\n loop++\n ) {\n for (int innerLoop = 0;\n innerLoop < this.adjMat[loop].length;\n innerLoop++\n ) {\n /*\n * Once we identify a weighted edge, we find its position in the\n * minimum priority queue.\n */\n int edgeDistance = this.adjMat[loop][innerLoop];\n if (INFINITY == edgeDistance) {\n continue;\n }\n completeTree.add(new Edge(loop, innerLoop, edgeDistance));\n }\n }\n if (true == input) {\n return completeTree;\n }\n /*\n * Once we have the queue, we can display the tree and see how much it\n * weighs.\n * Now we make a set of vertices for UnionFind{}. This will help us to find\n * cycles.\n */\n UnionFind union = new UnionFind(this.nVerts);\n PriorityQueue<Edge> output = new PriorityQueue<Edge>();\n while (0 != completeTree.size()) {\n /*\n * We know that the completeTree will include each edge twice, so we can\n * skip the next item. It will be the same edge.\n */\n Edge nextEdge = completeTree.remove();\n if (union.find(nextEdge.srcVert) == union.find(nextEdge.destVert)) {\n continue;\n }\n union.union(nextEdge.srcVert, nextEdge.destVert);\n output.add(nextEdge);\n }\n return output;\n}", "public ArrayList<Edge> Prim (String s){\n Node Start = nodeMap.get(s);\n mst = new ArrayList<>();\n HashMap<String, String> inserted = new HashMap<String, String>();\n ArrayList<Edge> failed = new ArrayList<Edge>();\n PriorityQueue<Edge> pq = new PriorityQueue<Edge>();\n ArrayList<Edge> ed = new ArrayList<Edge>(edgeMap.values());\n Edge first = ed.get(0);\n mst.add(first);\n inserted.put(first.w, first.w);\n inserted.put(first.v, first.v);\n\n priorityEdgeInsert(pq, first);\n\n while (inserted.size() <= edges() && pq.size() != 0){ //O(E log(V))\n //runs for E checking the possible V, where the number of V is devided each time, or log(V), giving ELog(V)\n Edge e = pq.poll();\n String w = inserted.get(e.w);\n String v = inserted.get(e.v);\n\n if ((w == null) ^ (v == null)){\n priorityEdgeInsert(pq, e);\n for(Edge f : failed){\n if(f.v == e.v || f.v == e.w || f.w == e.v || f.w == e.w){\n\n }\n else{\n pq.add(f);\n }\n }\n failed.clear();\n mst.add(e);\n inserted.put(e.w, e.w); //only puts one, the null one is hashed to a meaningless spot\n inserted.put(e.v, e.v);\n }\n else if ((w == null) && (v == null) ){\n failed.add(e);\n }\n else if (!(w == null) && !(v == null) ){\n failed.remove(e);\n pq.remove(e);\n }\n else if (e == null){\n System.out.println(\"HOW?\"); //should never happen.\n }\n }\n return mst;\n }", "private void BFS() {\n\n int fruitIndex = vertices.size()-1;\n Queue<GraphNode> bfsQueue = new LinkedList<>();\n bfsQueue.add(vertices.get(0));\n while (!bfsQueue.isEmpty()) {\n GraphNode pollNode = bfsQueue.poll();\n pollNode.setSeen(true);\n for (GraphNode node : vertices) {\n if (node.isSeen()) {\n continue;\n } else if (node.getID() == pollNode.getID()) {\n continue;\n } else if (!los.isIntersects(pollNode.getPoint(), node.getPoint())) {\n pollNode.getNeigbours().add(node);\n if (node.getID() != fruitIndex) {\n bfsQueue.add(node);\n node.setSeen(true);\n }\n }\n }\n }\n }", "public Result fun() {\n\t\tComparator<Van> c=new Comparator<Van>(){\n\t\t\tpublic int compare(Van r,Van s)\n\t\t\t{\n\t\t\t\tint l1=r.getL();\n\t\t\t\tint b1=r.getB();\n\t\t\t\tint h1=r.getH();\n\t\t\t\tint l2=s.getL();\n\t\t\t\tint b2=s.getB();\n\t\t\t\tint h2=s.getH();\n\t\t\t\tif(l1!=l2)\n\t\t\t\t\treturn (l1>l2)?-1:1;\n\t\t\t\telse if(b1!=b2)\n\t\t\t\t\treturn (b1>b2)?-1:1;\n\t\t\t\telse return (h1>h2)?-1:1;\n\t\t\t}\n\t\t};\n\t\tPriorityQueue<Van> cubes=new PriorityQueue<Van>(20,c);\n\t\tVan v1=new Van(1,1,1,30,15,15);\n\t\tVan v2=new Van(1,1,1,15,9,6);\n\t\tVan v3=new Van(1,1,1,21,15,12);\n\t\tVan v10=new Van(1,1,1,30,15,15);\n\t\tVan v5=new Van(1,1,1,15,9,6);\n\t\tVan v6=new Van(1,1,1,20,15,2);\n\t\tVan v7=new Van(1,1,1,30,15,5);\n\t\tVan v8=new Van(1,1,1,15,9,6);\n\t\tVan v9=new Van(1,1,1,21,15,12);\n\t\tVan vft;\n\t\tvft=v5;\n\t\t//System.out.println(vft.getL()+\"/\"+vft.getB()+\"/\"+vft.getH());\n\t\tcubes.offer(v1);\n\t\tcubes.offer(v2);\n\t\tcubes.offer(v3);\n\t\tcubes.offer(v10);\n\t\tcubes.offer(v5);\n\t\tcubes.offer(v6);\n\t\tcubes.offer(v7);\n\t\tcubes.offer(v8);\n\t\tcubes.offer(v9);\n\t\twhile (cubes.size()>0)\n\t\t{\n\t\t\tvft=cubes.poll();\n\t\t\tSystem.out.println(vft.getL()+\"/\"+vft.getB()+\"/\"+vft.getH());\n\t\t\t\n\t\t}\n\t\t\n\t\treturn ok();\n\t}", "public int compareTo(Edge other){\n return this.weight - other.weight;\n }", "@Override\n public int compare(Edge edge1, Edge edge2) {\n return Integer.compare(edge1.weight, edge2.weight);\n }", "@Override\n\t\t\tpublic int compare(Edge o1, Edge o2) {\n\t\t\t\treturn o1.weight - o2.weight;\n\t\t\t}", "public abstract double getPriority();", "public WeightedEdge(){\n\t\t\n\t}", "public int compareTo(Edge other) {\n if (this.weight < other.weight) {\n return -1;\n } else if (this.weight > other.weight) {\n return 1;\n } else {\n return 0;\n }\n }", "int priority();", "int priority();", "private static void computePaths(Vertex source) {\n source.minDistance = 0;\n // retrieves with log(n) time\n PriorityQueue<Vertex> vertexPriorityQueue = new PriorityQueue<>();\n\n //BFS traversal\n vertexPriorityQueue.add(source);\n\n // O((v + e) * log(v))\n while (!vertexPriorityQueue.isEmpty()) {\n // this poll always returns the shortest distance vertex at log(v) time\n Vertex vertex = vertexPriorityQueue.poll();\n\n //visit each edge exiting vertex (adjacencies)\n for (Edge edgeInVertex : vertex.adjacencies) {\n // calculate new distance between edgeInVertex and target\n Vertex targetVertex = edgeInVertex.target;\n double edgeWeightForThisVertex = edgeInVertex.weight;\n double distanceThruVertex = vertex.minDistance + edgeWeightForThisVertex;\n if (distanceThruVertex < targetVertex.minDistance) {\n // modify the targetVertex with new calculated minDistance and previous vertex\n // by removing the old vertex and add new vertex with updates\n vertexPriorityQueue.remove(targetVertex);\n targetVertex.minDistance = distanceThruVertex;\n // update previous with the shortest distance vertex\n targetVertex.previous = vertex;\n vertexPriorityQueue.add(targetVertex);// adding takes log(v) time because needs to heapify\n }\n }\n }\n }", "public void updateTopWeight(){\r\n\t \tif(this.topNode != null)\r\n\t \t{\r\n\t \t\tif(this.topNode.isNoGoZone() == true)\r\n\t \t{\r\n\t \t\t\t//set edge weight to 9999999 if the next node is NO go zone or\r\n\t \t\t\t//boundary node\r\n\t \t\tthis.topWeight = weightOfNoGoZone;\r\n\t \t}\r\n\t \telse if(this.topNode.road == true && this.topNode.isNoGoZone() == false)\r\n\t \t{\r\n\t \t\t//set edge weight to 1 if the next node is a road node\r\n\t \t\tthis.topWeight = this.topNode.getOwnElevation();\r\n\t \t}\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\t//set edge weight to INF if the next node is NULL\r\n\t \t\tthis.topWeight = weightOfMapEdge;\r\n\t \t}\r\n\t }", "@Override\n\t\t\tpublic int compare(Edge o1, Edge o2) {\n\t\t\t\tif (o1.weight < o2.weight)\n\t\t\t\t\treturn -1;\n\t\t\t\telse if (o1.weight > o2.weight)\n\t\t\t\t\treturn 1;\n\t\t\t\telse\n\t\t\t\t\treturn 0;\n\t\t\t}", "public static void main(String[] args) {\nPriorityQueue pq= new PriorityQueue(15);//,new MyComparator123());\r\nSystem.out.println(pq.peek());\r\n//System.out.println(pq.element());\r\n/*for(int i=1;i<=10;i++)\r\npq.offer(i);\r\nSystem.out.println(pq);\r\nSystem.out.println(pq.poll());\r\n\r\nSystem.out.println(pq);*/\r\npq.offer(\"A\");\r\npq.offer(\"C\");\r\npq.offer(\"B\");\r\npq.offer(\"Z\");\r\nfor(int i=0;i<pq.size();i++)\r\nSystem.out.println(pq.peek());\r\n\t}", "public void bft() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public int weight ();", "public Graph prims() {\r\n\t\tGraph mst = new Graph();\r\n\r\n\t\tHashMap<String, PrimsPair> map = new HashMap<>();\r\n\t\tGenericHeap<PrimsPair> heap = new GenericHeap<>(PrimsPair.Ctor);\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tPrimsPair pair = new PrimsPair(vname, null, Integer.MAX_VALUE);\r\n\t\t\theap.add(pair);\r\n\t\t\tmap.put(vname, pair);\r\n\t\t}\r\n\r\n\t\twhile (heap.size() != 0) {\r\n\t\t\tPrimsPair rp = heap.removeHP();\r\n\r\n\t\t\t// work\r\n\t\t\tif (rp.avname == null) {\r\n\t\t\t\tmst.addVertex(rp.vname);\r\n\t\t\t} else {\r\n\t\t\t\tmst.addVertex(rp.vname);\r\n\t\t\t\tmst.addEdge(rp.vname, rp.avname, rp.csf);\r\n\t\t\t}\r\n\t\t\t// work\r\n\r\n\t\t\tArrayList<String> nbrnames = new ArrayList<>(vces.get(rp.vname).nbrs.keySet());\r\n\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\tif (mst.containsVertex(nbrname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tPrimsPair np = map.get(nbrname);\r\n\r\n\t\t\t\tint oc = np.csf;\r\n\t\t\t\tint nc = vces.get(rp.vname).nbrs.get(np.vname);\r\n\r\n\t\t\t\tif (nc < oc) {\r\n\t\t\t\t\tnp.csf = nc;\r\n\t\t\t\t\tnp.avname = rp.vname;\r\n\t\t\t\t\theap.updatePriority(np);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn mst;\r\n\t}", "public static void main(String[] args) {\n GraphAdjMatrix g = new GraphAdjMatrix();\n g.addVertices(7);\n g.addEdge(0, 1, 7);\n g.addEdge(0, 3, 5);\n g.addEdge(1, 2, 8);\n g.addEdge(1, 3, 9);\n g.addEdge(1, 4, 7);\n g.addEdge(2, 4, 5);\n g.addEdge(3, 4, 15);\n g.addEdge(3, 5, 6);\n g.addEdge(4, 5, 8);\n g.addEdge(4, 6, 9);\n g.addEdge(5, 6, 11);\n\n PrimHeapQueue prim = new PrimHeapQueue(g);\n GraphAD mst = prim.MST_PrimHeap();\n System.out.println(g.toString());\n System.out.println(mst.toString());\n System.out.println(\"Total weight: \" + mst.MST_TotalWeight());\n\n }", "private int BFS() {\n adjList.cleanNodeFields();\n\n //Queue for storing current shortest path\n Queue<Node<Integer, Integer>> q = new LinkedList<>();\n\n //Set source node value to 0\n q.add(adjList.getNode(startNode));\n q.peek().key = 0;\n q.peek().d = 0;\n q.peek().visited = true;\n\n //Helper variables\n LinkedList<Pair<Node<Integer, Integer>, Integer>> neighbors;//Array of pairs <neighborKey, edgeWeight>\n Node<Integer, Integer> neighbor, u;\n long speed = (long) (cellSideLength * 1.20);\n\n while (!isCancelled() && q.size() != 0) {\n u = q.poll();\n\n //Marks node as checked\n checkedNodesGC.fillRect((u.value >> 16) * cellSideLength + 0.5f,\n (u.value & 0x0000FFFF) * cellSideLength + 0.5f,\n (int) cellSideLength - 1, (int) cellSideLength - 1);\n\n //endNode found\n if (u.value == endNode) {\n //Draws shortest path\n Node<Integer, Integer> current = u, prev = u;\n\n while ((current = current.prev) != null) {\n shortestPathGC.strokeLine((prev.value >> 16) * cellSideLength + cellSideLength / 2,\n (prev.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2,\n (current.value >> 16) * cellSideLength + cellSideLength / 2,\n (current.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2);\n prev = current;\n }\n return u.d;\n }\n\n //Wait after checking node\n try {\n Thread.sleep(speed);\n } catch (InterruptedException interrupted) {\n if (isCancelled())\n break;\n }\n\n //Checking Neighbors\n neighbors = adjList.getNeighbors(u.value);\n for (Pair<Node<Integer, Integer>, Integer> neighborKeyValuePair : neighbors) {\n neighbor = neighborKeyValuePair.getKey();\n //Relaxation step\n //Checks if neighbor hasn't been checked, if so the assign the shortest path\n if (!neighbor.visited) {\n //Adds checked neighbor to queue\n neighbor.key = u.d + 1;\n neighbor.d = u.d + 1; //Assign shorter path found to neighbor\n neighbor.prev = u;\n neighbor.visited = true;\n q.add(neighbor);\n }\n }\n }\n return Integer.MAX_VALUE;\n }", "public static void main(String[] args) {\n\t\tVertex v1, v2, v3, v4, v5, v6, v7;\n\t\tv1 = new Vertex(\"v1\");\n\t\tv2 = new Vertex(\"v2\");\n\t\tv3 = new Vertex(\"v3\");\n\t\tv4 = new Vertex(\"v4\");\n\t\tv5 = new Vertex(\"v5\");\n\t\tv6 = new Vertex(\"v6\");\n\t\tv7 = new Vertex(\"v7\");\n\n\t\tv1.addAdjacency(v2, 2);\n\t\tv1.addAdjacency(v3, 4);\n\t\tv1.addAdjacency(v4, 1);\n\n\t\tv2.addAdjacency(v1, 2);\n\t\tv2.addAdjacency(v4, 3);\n\t\tv2.addAdjacency(v5, 10);\n\n\t\tv3.addAdjacency(v1, 4);\n\t\tv3.addAdjacency(v4, 2);\n\t\tv3.addAdjacency(v6, 5);\n\n\t\tv4.addAdjacency(v1, 1);\n\t\tv4.addAdjacency(v2, 3);\n\t\tv4.addAdjacency(v3, 2);\n\t\tv4.addAdjacency(v5, 2);\n\t\tv4.addAdjacency(v6, 8);\n\t\tv4.addAdjacency(v7, 4);\n\n\t\tv5.addAdjacency(v2, 10);\n\t\tv5.addAdjacency(v4, 2);\n\t\tv5.addAdjacency(v7, 6);\n\n\t\tv6.addAdjacency(v3, 5);\n\t\tv6.addAdjacency(v4, 8);\n\t\tv6.addAdjacency(v7, 1);\n\n\t\tv7.addAdjacency(v4, 4);\n\t\tv7.addAdjacency(v5, 6);\n\t\tv7.addAdjacency(v6, 1);\n\n\t\tArrayList<Vertex> weightedGraph = new ArrayList<Vertex>();\n\t\tweightedGraph.add(v1);\n\t\tweightedGraph.add(v2);\n\t\tweightedGraph.add(v3);\n\t\tweightedGraph.add(v4);\n\t\tweightedGraph.add(v5);\n\t\tweightedGraph.add(v6);\n\t\tweightedGraph.add(v7);\n\t\t\n\t\tdijkstra( weightedGraph, v7 );\n\t\tprintPath( v1 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v2 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v3 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v4 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v5 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v6 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v7 );\n\t\tSystem.out.println(\"\");\n\t}", "public abstract int priority();", "public void calculateEdgeWeights() {\n\n\t// Use a ListIterator so that we can modify the list\n\t// as we go\n\tListIterator<LayoutEdge>iter = edgeList.listIterator();\n\twhile (iter.hasNext()) {\n\t LayoutEdge edge = iter.next();\n\n\t // If we're only dealing with selected nodes, drop any edges\n\t // that don't have any selected nodes\n\t if (edge.getSource().isLocked() && edge.getTarget().isLocked()) {\n\t\titer.remove();\n\t } else if (edgeWeighter != null && edgeWeighter.normalizeWeight(edge) == false)\n\t\titer.remove();\n\n\t //logger.debug(\"Edge \"+edge.getEdge().getIdentifier()+\" now has weight \"+edge.getWeight());\n\t // logger.info( edge.toString() + \" now has weight \"+edge.getWeight());\n\t}\n }", "public weighted_graph getGraph();", "@SuppressWarnings(\"unchecked\") // 빡쳐서 넣음 ArrayList<Pair> 이 라인에 계속 노란줄 떠서 시발\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint V = scan.nextInt(); // 정점의 개수\n\t\tint E = scan.nextInt(); // 간선의 개수\n\t\tint K = scan.nextInt(); // 시작 정점 번호\n\t\tint weight[] = new int[V + 1]; // 시작점에서 해당 정점(인덱스)까지의 최단거리\n\t\tboolean visit[] = new boolean[V + 1]; // 정점 방문여부\n\t\tArrayList<Pair>[] route = new ArrayList[V + 1];\n\t\tfor (int i = 1; i < V + 1; i++) {\n\t\t\troute[i] = new ArrayList<Pair>();\n\t\t\tif (i == K)\n\t\t\t\tcontinue;\n\t\t\tweight[i] = INF;\n\t\t}\n\t\tfor (int i = 0; i < E; i++) {\n\t\t\tint u = scan.nextInt();\n\t\t\tint v = scan.nextInt();\n\t\t\tint w = scan.nextInt();\n\t\t\troute[u].add(new Pair(v, w));\n\t\t}\n\t\t/*\n\t\t * 테스트 용\n\t\t * 2 3 \n\t\t * 1 \n\t\t * 1 2 3\n\t\t * 1 2 1 \n\t\t * 1 2 4\n\t\t * \n\t\t */\n\t\t\n\t\t\n\t\n\t\tPriorityQueue<Pair> q = new PriorityQueue<Pair>();\n\t\tq.offer(new Pair(K, 0));\n\t\twhile (!q.isEmpty()) {\n\t\t\tPair pair = q.poll();\n\t\t\tSystem.out.println(pair.v+\" \"+pair.w);\n\t\t\tif (visit[pair.v] == true)\n\t\t\t\tcontinue;\n\t\t\tvisit[pair.v] = true; //route\n\t\t\t/*\n\t\t\t * ArrayList<Pair> arrayList = route[pair.v]; \n\t\t\t * for (int i = 0; i < arrayList.size(); i++) { Pair p = arrayList.get(i); }\n\t\t\t * \n\t\t\t */\n\t\t\tfor (Pair p : route[pair.v]) { //route[pair.v] 값들을 p 변수에 하나하나씩 대입\n\t\t\t\tif (visit[p.v] == false) {\n\t\t\t\t\tweight[p.v] = Math.min(weight[p.v], weight[pair.v] + p.w);\n\t\t\t\t\tq.add(new Pair(p.v, weight[p.v]));\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tfor (int i = 1; i < V + 1; i++) {\n\t\t\tif (weight[i] == INF) {\n\t\t\t\tSystem.out.println(\"INF\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.println(weight[i]);\n\t\t}\n\t}", "private void toZeroWeightGraph() {\n source.disable();\n for (Graph.Vertex v : graph) {\n int min = Integer.MAX_VALUE;\n XGraph.XVertex vertex = (XGraph.XVertex) v;\n for (XGraph.Edge e : vertex.getNonZeroRevItr()) {\n if (e.getWeight() < min) {\n min = e.getWeight();\n }\n }\n for (Graph.Edge e : vertex.getNonZeroRevItr())\n e.setWeight(e.getWeight() - min);\n }\n source.enable();\n }", "public MyQueue() {\n queue = new PriorityQueue<>();\n }", "public static Integer[] LexBFS(Graph<Integer,String> g) {\n\t\tGraph<myVertex,String> h = new SparseGraph<myVertex,String>();\r\n\t\th = convertToWeighted(g);\r\n\t\tfinal int N = g.getVertexCount();\r\n\t\t//System.out.print(\"Done. Old graph: \"+N+\" vertices. New graph \" +h.getVertexCount()+\"\\n\");\r\n\t\t\r\n\t\t//System.out.print(\"New graph is:\\n\"+h+\"\\n\");\r\n\t\tmyVertex[] queue = new myVertex[N];\r\n\t\t\r\n\t\tIterator<myVertex> a = h.getVertices().iterator();\r\n\t\tqueue[0] = a.next(); // start of BFS search. Now add neighbours.\r\n\t\tint indexCounter = 1;\r\n\t\tint pivot = 0;\r\n\t\t//System.out.print(\"Initial vertex is: \"+queue[0]+\" \");\r\n\t\tSystem.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\tIterator<myVertex> b = h.getNeighbors(queue[0]).iterator();\r\n\t\twhile (b.hasNext()) {\r\n\t\t\tqueue[indexCounter] = b.next();\r\n\t\t\tqueue[indexCounter].label.add(N);\r\n\t\t\tqueue[indexCounter].setColor(1); // 1 = grey = queued\r\n\t\t\tindexCounter++;\r\n\t\t}\r\n\t\t//System.out.print(\"with \"+(indexCounter-1) +\" neighbours\\n\");\r\n\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\tqueue[0].setColor(2); // 2 = black = processed\r\n\t\t// indexCounter counts where the next grey vertex will be enqueued\r\n\t\t// pivot counts where the next grey vertex will be processed and turned black\r\n\r\n\t\tpivot = 1;\r\n\r\n\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\twhile (pivot < indexCounter) {\r\n\t\t\t// first, find the highest labelled entry in the rest of the queue\r\n\t\t\t// and move it to the pivot position. This should be improved upon\r\n\t\t\t// by maintaining sorted order upon adding elements to the queue\r\n\t\t\t\r\n\t\t\t//System.out.print(\"choosing next vertex...\\n\");\r\n\t\t\tint max = pivot;\r\n\t\t\tfor (int i = pivot+1; i<indexCounter; i++) {\r\n\t\t\t\t//indexCounter is the next available spot, so indexCounter-1 is the last\r\n\t\t\t\t//entry i.e. it is last INDEX where queue[INDEX] is non-empty.\r\n\t\t\t\tif (queue[i].comesBefore(queue[max])) {\r\n\t\t\t\t\tmax = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\t\t// at the end of this for-loop, found the index \"max\" of the element of\r\n\t\t\t// the queue with the lexicographically largest label. Swap it with pivot.\r\n\t\t\tmyVertex temp = queue[pivot];\r\n\t\t\tqueue[pivot] = queue[max];\r\n\t\t\tqueue[max] = temp;\r\n\r\n\t\t\t//System.out.print(\"Chose vertex: \"+temp+\" to visit next\\n\");\r\n\t\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\t\t\r\n\t\t\t// process the pivot point => find and mark its neighbours, turn it black.\r\n\t\t\tb = h.getNeighbors(queue[pivot]).iterator();\r\n\t\t\twhile (b.hasNext()) {\r\n\t\t\t\tmyVertex B = b.next();\r\n\t\t\t\tif (B.color == 0) {\r\n\t\t\t\t\t// found a vertex which has not been queued...\r\n\t\t\t\t\tqueue[indexCounter] = B;\r\n\t\t\t\t\tB.label.add(N-pivot);\r\n\t\t\t\t\tB.setColor(1);\r\n\t\t\t\t\tindexCounter++;\r\n\t\t\t\t}\r\n\t\t\t\telse if (B.color == 1) {\r\n\t\t\t\t\t// found a vertex in the queue which has not been processed...\r\n\t\t\t\t\tB.label.add(N-pivot);\r\n\t\t\t\t}\r\n\t\t\t\telse if (B.color != 2) {\r\n\t\t\t\t\tSystem.out.print(\"Critical Error: found a vertex in LexBFS process \");\r\n\t\t\t\t\tSystem.out.print(\"which has been visited but is not grey or black.\\n\");\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\t\t}\r\n\t\t\tqueue[pivot].setColor(2); //done processing current pivot\r\n\t\t\tpivot ++;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//LexBFS done; produce integer array to return;\r\n\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\tInteger[] LBFS = new Integer[N]; // N assumes the graph is connected...\r\n\t\tfor (int i = 0; i<N; i++) {\r\n\t\t\tLBFS[i] = queue[i].id;\r\n\t\t}\r\n\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\t//System.out.print(\"Returning array: \" + LBFS);\r\n\t\treturn LBFS;\r\n\t}", "public static void main(String[] args) {\n Queue<Integer> values=new PriorityQueue<>();\r\n values.add(87);\r\n\t values.add(97);\r\n\t values.add(34);\r\n\t values.add(92);\r\n\t System.out.println(values);\r\n\t}", "public int weight() {\n \treturn weight;\n }", "private void buildPath( PriorityQueue<SearchNode<T>> nodes ) {\n\t\tNode<T> v;\n\t\tSearchNode<T> su, sv;\n\t\tWeightedEdge<T> we;\n\n\t\twhile ( ! nodes.isEmpty() ) { // while Q is not empty:\n\t\t\tsu = nodes.poll(); // u = Q.min()\n\t\t\tif ( su.isUnreachable() ) { break; } //\n\n\t\t\tfor ( Edge<T> edge : su.getEdges() ) { // for each\n\t\t\t\twe = (WeightedEdge<T>)edge; //\n\t\t\t\tv = we.getOtherNode( su.getNode() ); // neighbor v of u\n\t\t\t\tsv = getSearchNode( v ); //\n\t\t\t\tint uToV = su.getDistance() + we.getWeight();// alt = dist[u] + length(u, v)\n\t\t\t\tif (uToV < sv.getDistance() ) { // if alt < dist[v]\n\t\t\t\t\tnodes.remove( sv ); // ( force recalc )\n\t\t\t\t\tsv.setDistance( uToV ); // dist[v] <- alt\n\t\t\t\t\tsv.setPrevious( su.getNode() ); // prev[v] <- u\n\t\t\t\t\tnodes.add( sv ); // Q.decrease_priority(v, alt) (dist recalc)\n\t\t\t\t} // end if\n\t\t\t} // end for\n\t\t} // end while\n\t}", "public void minCut(){\n QueueMaxHeap<GraphNode> queue = new QueueMaxHeap<>();\n setNodesToUnvisited();\n queue.add(graphNode[0]);\n graphNode[0].visited = true;\n while(!queue.isEmpty()){//if queue is empty it means that we have made all the cuts that need to be cut and we cant get anywhere else\n GraphNode node = queue.get();\n int from = node.nodeID;\n for(int i = 0; i < node.succ.size(); i++){//get the successor of each node and then checks each of the edges between the node and that successor\n GraphNode.EdgeInfo info = node.succ.get(i);\n int to = info.to;\n if(graph.flow[from][to][1] == 0){//if it has no flow then it prints out that line\n System.out.printf(\"Edge (%d, %d) transports %d cases\\n\", from, to, graph.flow[from][to][0]);\n } else {//adds it to the queue if it still has flow to it and if we haven't gone there yet\n if(!graphNode[to].visited){\n graphNode[to].visited = true;\n queue.add(graphNode[to]);\n }\n }\n }\n }\n }", "private int optimize() {\n\t\t// items: Items sorted by value-to-weight ratio for linear relaxation\n\t\t// t: the decision vector being tested at each node\n\t\t// ws, vs, is, bs: stacks of weight, value, item id, whether bring item\n\t\t// p: stack pointer; i, b, weight, value: loop caches; best: max search\n\t\t// ss: stack size: Always <=2 children on stack for <=n-1 parents\n\t\tItem[] items = new Item[n];\n\t\tint ss = 2 * n;\n\t\tint[] itemsSorted = new int[n], t = new int[n], ws = new int[ss],\n\t\t\tvs = new int[ss], is = new int[ss], bs = new int[ss];\n\t\tint i, b, weight, value, best = 0, p = 0;\n\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titems[j] = new Item(j);\n\t\tArrays.sort(items);\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titemsSorted[j] = items[j].i();\n\t\titems = null; // For garbage collection.\n\n\t\t// Push item 0 onto the stack with and without bringing it.\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 1; p++;\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 0; p++;\n\n\t\twhile (p > 0) {\n\t\t\tp--; // Pop the latest item off the stack\n\t\t\ti = is[p]; b = bs[p];\n\t\t\tweight = ws[p] + w[i] * b;\n\t\t\tif (weight > k)\n\t\t\t\tcontinue;\n\t\t\tvalue = vs[p] + v[i] * b;\n\t\t\tif (bound(i, weight, value, itemsSorted) < best)\n\t\t\t\tcontinue;\n\t\t\tbest = Math.max(value, best);\n\t\t\tt[i] = b;\n\t\t\tif (i < n - 1) { // Push children onto stack w/ & w/o bringing item\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 1; p++;\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 0; p++;\n\t\t\t}\n\t\t\telse if (value >= best)\n\t\t\t\tSystem.arraycopy(t, 0, x, 0, n);\n\t\t}\n\t\treturn best;\n\t}", "public Queue<Integer> adj(int v){\n return adj[v];\n }", "private void raisePriority() {\n Thread cThr = Thread.currentThread();\n _priority = (byte)((cThr instanceof H2O.FJWThr) ? ((H2O.FJWThr)cThr)._priority+1 : super.priority());\n }", "public static void balanceHeaps()\n {\n // add your code here\n if(Math.abs(s.size()-g.size()) > 1){\n if(s.size() > g.size()){\n g.add(s.poll());\n }\n else {\n s.add(g.poll());\n }\n }\n }", "public abstract void increasedPriority(int elementId, float oldRank, float newRank);", "private PriorityQueue<PCB> newRemainingQueue() {\n\n\t\t// Comparator for sorting low priorities first\n\t\tComparator<PCB> byLowestPriority =\n\t\t\t(p1, p2) -> new Integer(p1.getPriority()).compareTo(p2.getPriority());\n\n\t\treturn new PriorityQueue<>(byLowestPriority);\n\t}", "public void addedge(String fro, String to, int wt) {\r\n Edge e = new Edge(fro, to, wt);\r\n\r\n\r\n Set<String> keys = graph.keySet();\r\n// Object[] arr = keys.toArray();\r\n int f = 0;\r\n if(graph.containsKey(fro)&&graph.containsKey(to))\r\n {\r\n\r\n int[] bb2 = new int[2000];\r\n for(int zz=0;zz<5000;zz++){\r\n\r\n\r\n ArrayList<Integer> abcd = new ArrayList<>();\r\n abcd.add(zz);\r\n\r\n if(zz<2500)\r\n zz++;\r\n else\r\n zz++;\r\n\r\n bb2[zz%500]=zz;\r\n\r\n\r\n int qq= 5000;\r\n\r\n qq--;\r\n\r\n String nnn = \"aaa aa\";\r\n nnn+=\"df\";\r\n\r\n\r\n }\r\n\r\n }\r\n else\r\n {\r\n\r\n\r\n System.out.println(\"some vertices are not present\");\r\n return;\r\n }\r\n for ( String y : keys) {\r\n if (fro.compareTo(y) == 0) {\r\n f = 1;\r\n ArrayList<Edge> ee =graph.get(y);\r\n\r\n\r\n ee.add(e);\r\n }\r\n\r\n\r\n }\r\n if (f == 0) {}\r\n }", "public static int QTDelHeuristic1 (Graph<Integer,String> h) {\n\t\tint count = 0;\r\n\t\tboolean isQT = false;\r\n\t\t//h = Copy(g);\r\n\t\t//boolean moreToDo = true;\r\n\t\t\r\n\t\tIterator<Integer> a;\r\n\t\tIterator<Integer> b;\r\n\t\tIterator<Integer> c;\r\n\t\tIterator<Integer> d;\r\n\r\n\t\twhile (isQT == false) {\r\n\t\t\tisQT = true;\r\n\t\t\ta= h.getVertices().iterator();\r\n\t\t\twhile(a.hasNext()){\r\n\t\t\t\tInteger A = a.next();\r\n\t\t\t\t//System.out.print(\"\"+A+\" \");\r\n\t\t\t\tb = h.getNeighbors(A).iterator();\r\n\t\t\t\twhile(b.hasNext()){\r\n\t\t\t\t\tInteger B = b.next();\r\n\t\t\t\t\tc = h.getNeighbors(B).iterator();\r\n\t\t\t\t\twhile (c.hasNext()){\r\n\t\t\t\t\t\tInteger C = c.next();\r\n\t\t\t\t\t\tif (h.isNeighbor(C, A) || C==A) continue;\r\n\t\t\t\t\t\td = h.getNeighbors(C).iterator();\r\n\t\t\t\t\t\twhile (d.hasNext()){\r\n\t\t\t\t\t\t\tInteger D = d.next();\r\n\t\t\t\t\t\t\tif (D==B) continue; \r\n\t\t\t\t\t\t\tif (h.isNeighbor(D,B)) continue;\r\n\t\t\t\t\t\t\t//otherwise, we have a P4 or a C4\r\n\r\n\t\t\t\t\t\t\tisQT = false;\r\n\t\t\t\t\t\t\t//System.out.print(\"Found P4: \"+A+\"-\"+B+\"-\"+C+\"-\"+D+\"... not a cograph\\n\");\r\n\r\n\t\t\t\t\t\t\tif (h.isNeighbor(D,A)) {\r\n\t\t\t\t\t\t\t\t// we have a C4 = a-b-c-d-a\r\n\t\t\t\t\t\t\t\t// requires 2 deletions\r\n\t\t\t\t\t\t\t\tcount += 2;\r\n\t\t\t\t\t\t\t\th.removeVertex(A);\r\n\t\t\t\t\t\t\t\th.removeVertex(B);\r\n\t\t\t\t\t\t\t\th.removeVertex(C);\r\n\t\t\t\t\t\t\t\th.removeVertex(D);\r\n\t\t\t\t\t\t\t\treturn 2 + QTDelHeuristic1(h);\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t// this case says:\r\n\t\t\t\t\t\t\t\t// else D is NOT adjacent to A. Then we have P4=abcd\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tcount += 1;\r\n\t\t\t\t\t\t\t\th.removeVertex(A);\r\n\t\t\t\t\t\t\t\th.removeVertex(B);\r\n\t\t\t\t\t\t\t\th.removeVertex(C);\r\n\t\t\t\t\t\t\t\th.removeVertex(D);\r\n\t\t\t\t\t\t\t\treturn 1 + QTDelHeuristic1(h);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t} // end d.hasNext()\r\n\t\t\t\t} // end c.hasNext()\r\n\t\t\t} // end b.hasNext() \r\n\t\t} // end a.hasNext()\r\n\t\t\r\n\t\treturn count;\t\t\r\n\t}", "@Override\n public PaintOrder next() {\n if (!queue.isEmpty()) {\n currentOrders ++;\n var temp = queue.peek();\n return temp;\n }\n return null;\n }", "public void dijkstra(int graphWeight[][], int source){\r\n\t\t\r\n\t\tint queue[] = new int[vertices]; //The array which will hold the shortest distance from source to node i\r\n\t\tboolean set[] = new boolean[vertices]; //It will store true for node i if the shortest path to that vertex or node is found\r\n\t\t\r\n\t\t//Initialize distances to infinity and set[] array to false \r\n\t\tfor(int i=0;i<vertices;i++){\r\n\t\t\tqueue[i] = Integer.MAX_VALUE; \r\n\t\t\tset[i] = false;\r\n\t\t}\r\n\t\t\r\n\t\t//Distance of source vertex from itself is always 0\r\n\t\tqueue[source] = 0;\r\n\r\n\t\t//Find shortest path of all the vertices\r\n\t\tfor(int count=0;count<vertices-1;count++){\r\n\t\t\t\r\n\t\t\t//Pick the minimum distance vertex from the from the set of vertices \r\n\t\t\t//not processed. u is equal to source in first iteration\r\n\t\t\tint u = extractMinDistance(queue, set);\r\n\t\t\t\r\n\t\t\t//Mark the picked vertex processed\r\n\t\t\tset[u] = true;\r\n\t\t\t//Update queue value of the adjacent vertices of the picked vertex\r\n\t\t\tfor(int v=0;v<vertices;v++)\r\n\t\t\t{\r\n\t\t\t\t//Update queue[v] only if\r\n\t\t\t\t// 1. It is not in set true in the Set Array\r\n\t\t\t\t// 2. There is an edge from u to v\r\n\t\t\t\t// 3. Total weight of path from source to v through u is smaller than current value of queue[v]\r\n\t\t\t\tif((graphWeight[u][v] > 0) && set[v] == false){\r\n\t\t\t\t\t\tif(queue[u] + graphWeight[u][v] < queue[v]){\r\n\t\t\t\t\t\t\tqueue[v] = queue[u] + graphWeight[u][v];\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//printSolution(queue, vertices);\r\n\t\t}\r\n\t\t//Print the constructed distance array\r\n\t\tprintSolution(queue, vertices);\r\n\t}", "public void Djkstra(int source) {\n\t\tfor (int i = 0; i < vertices; i++) {\n\t\t\tdist[i] = Integer.MAX_VALUE; // added infinity to all ,\n\t\t}\n\t\t\n\t\tdist[source] = 0;\n\n\t\t// add source vertex to priority queue\n\t\tq.add(new Node(source, 0));\n\n\n\t\t// while my all vertices are not selected as a min among smallest one time\n\t\t// refracted in visited\n\t\twhile (visited.size() != vertices) {\n\n\t\t\t// pick from priority queue the smallest/min distance\n\t\t\tint i = q.remove().node;\n\n\t\t\t// once node is removed from queue add to set\n\t\t\tvisited.add(i);\n\n\t\t\t// relax adjacent vertex of this node;\n\t\t\t// And add the new node to queue bcoz distance has got updated so add new node as i dont have any method to update \n\t\t\t// already present node and its distance\n\t\t\t\n\n\t\t\tfor (Node v : graph[i]) {\n\t\t\t\tif (!visited.contains(v.node)) {\n\t\t\t\t\tif (dist[i] + v.cost < dist[v.node]) {\n\t\t\t\t\t\tdist[v.node] = dist[i] + v.cost;\n\t\t\t\t\t\tq.add(new Node(v.node, dist[v.node]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "private void relax(Edge e, int v) {\r\n int w = e.other(v);\r\n if (distTo[w] > distTo[v] + e.weight()) {\r\n distTo[w] = distTo[v] + e.weight();\r\n edgeTo[w] = e;\r\n if(nWays[v]>0)\r\n \tnWays[w]= nWays[v];\t\t\t//posibles caminos desde origen...\r\n else\r\n \tnWays[w]=1;\r\n if (pq.contains(w)) pq.decreaseKey(w, distTo[w]);\r\n else pq.insert(w, distTo[w]);\r\n }else if(distTo[w] == distTo[v] + e.weight()){\r\n \tnWays[w] += nWays[v];\r\n \t/* if(nWays[v]>1)\r\n \tnWays[w]=nWays[w]*nWays[v];\r\n \t else\r\n \t\t nWays[w]++;*/\r\n }\r\n }", "private final void pruneParallelSkipEdges() {\n // TODO: IF THERE ARE MULTIPLE EDGES WITH THE SAME EDGE WEIGHT, WE ARBITRARILY PICK THE FIRST EDGE TO KEEP\n // THE ORDERING MAY BE DIFFERENT FROM BOTH SIDES OF THE EDGE, WHICH CAN LEAD TO A NONSYMMETRIC GRAPH\n // However, no issues have cropped up yet. Perhaps the ordering happens to be the same for both sides,\n // due to how the graph is constructed. This is not good to rely upon, however.\n Memory.initialise(maxSize, Float.POSITIVE_INFINITY, -1, false);\n \n int maxDegree = 0;\n for (int i=0;i<nNodes;++i) {\n maxDegree = Math.max(maxDegree, nSkipEdgess[i]);\n }\n \n int[] neighbourIndexes = new int[maxDegree];\n int[] lowestCostEdgeIndex = new int[maxDegree];\n float[] lowestCost = new float[maxDegree];\n int nUsed = 0;\n \n for (int i=0;i<nNodes;++i) {\n nUsed = 0;\n int degree = nSkipEdgess[i];\n int[] sEdges = outgoingSkipEdgess[i];\n float[] sWeights = outgoingSkipEdgeWeightss[i];\n \n for (int j=0;j<degree;++j) {\n int dest = sEdges[j];\n float weight = sWeights[j];\n \n int p = Memory.parent(dest);\n int index = -1;\n \n if (p == -1) {\n index = nUsed;\n ++nUsed;\n \n Memory.setParent(dest, index);\n neighbourIndexes[index] = dest;\n \n lowestCostEdgeIndex[index] = j;\n lowestCost[index] = weight;\n } else {\n index = p;\n if (weight < lowestCost[index]) {\n // Remove existing\n \n /* ________________________________\n * |______E__________C____________L_|\n * ________________________________\n * |______C__________L____________E_|\n * ^\n * |\n * nSkipEdges--\n */\n swapSkipEdges(i, lowestCostEdgeIndex[index], j);\n swapSkipEdges(i, j, degree-1);\n --j; --degree;\n \n // lowestCostEdgeIndex[index] happens to be the same as before.\n lowestCost[index] = weight;\n } else {\n // Remove this.\n \n /* ________________________________\n * |______E__________C____________L_|\n * ________________________________\n * |______E__________L____________C_|\n * ^\n * |\n * nSkipEdges--\n */\n swapSkipEdges(i, j, degree-1);\n --j; --degree;\n }\n }\n \n }\n nSkipEdgess[i] = degree;\n \n // Cleanup\n for (int j=0;j<nUsed;++j) {\n Memory.setParent(neighbourIndexes[j], -1); \n }\n }\n }", "public void setWeight(int weightIn){\n\t\tthis.edgeWeight = weightIn;\n\t}", "static List<WEdge<Pixel>> segmenter(WGraph<Pixel> g, double kvalue) {\r\n List<WEdge<Pixel>> edges = new ArrayList<WEdge<Pixel>>();\r\n PriorityQueue<WEdge<Pixel>> queue = new PQHeap<WEdge<Pixel>>();\r\n GraphPartition part = new GraphPartition(g.allVertices(), kvalue);\r\n WEdge<Pixel> temp;\r\n int sourceID;\r\n int endID;\r\n boolean suc;\r\n queue.init(g.allEdges());\r\n\r\n for (int i = queue.size(); i > 0; i--) {\r\n temp = queue.remove();\r\n // System.out.println(temp.weight());\r\n sourceID = temp.source().id();\r\n endID = temp.end().id();\r\n suc = part.union(sourceID, endID);\r\n\r\n if (suc) {\r\n edges.add(temp);\r\n }\r\n }\r\n return edges;\r\n }", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "PriorityQueue(boolean transferPriority) \n\t\t{\n\t\t\tthis.transferPriority = transferPriority;\n\t\t\twaitQueue = new java.util.PriorityQueue<KThread>(1, new comparePriority()); //Initialize the waitQueue to a java.util.PriorityQueue with a custom comparator defined below\n\t\t}", "public int weight(){\n\t\treturn this.weight;\n\t}", "public int getEdgeCount() \n {\n return 3;\n }", "public static void main(String[] args) {\r\n\t\tPriorityQueue p1=new PriorityQueue();\r\n\t\t // System.out.println(\"p1.poll()=\"+p1.poll());\r\n // System.out.println(\"p1.remove()=\"+p1.remove());\r\n\t\tp1.add(12); \r\n\t\tp1.add(10);\r\n p1.add(20);\r\n // p1.add(2.3);\r\n p1.add(20);\r\n p1.add(100);\r\n p1.add(21);\r\n // p1.add(null);\r\n System.out.println(p1);\r\n System.out.println(\"p1.remove()=\"+p1.remove());\r\n System.out.println(\"p1.poll()=\"+p1.poll());\r\n System.out.println(p1);\r\n System.out.println(\"p1.peek()=\"+p1.peek()); \r\n System.out.println(\"p1.peek()=\"+p1.peek()); \r\n System.out.println(p1);\r\n\t}", "public static ArrayList<edges<String, Double>> Dijkstra(String CHAR1, String CHAR2, graph<String,Float> g) {\n\t\tPriorityQueue<ArrayList<edges<String, Double>>> active = \n\t\t\tnew PriorityQueue<ArrayList<edges<String, Double>>>(10,new Comparator<ArrayList<edges<String, Double>>>() {\n\t\t\t\tpublic int compare(ArrayList<edges<String, Double>> path1, ArrayList<edges<String, Double>> path2) {\n\t\t\t\t\tedges<String, Double> dest1 = path1.get(path1.size() - 1);\n\t\t\t\t\tedges<String, Double> dest2 = path2.get(path2.size() - 1);\n\t\t\t\t\tif (!(dest1.getLabel().equals(dest2.getLabel())))\n\t\t\t\t\t\treturn dest1.getLabel().compareTo(dest2.getLabel());\n\t\t\t\t\treturn path1.size() - path2.size();\n\t\t\t\t}\n\t\t\t});\n\t\t\tSet<String> known = new HashSet<String>();\n\t\t\tArrayList<edges<String, Double>> begin = new ArrayList<edges<String, Double>>();\n\t\t\tbegin.add(new edges<String, Double>(CHAR1, 0.0));\n\t\t\tactive.add(begin);\t\t\n\t\t\twhile (!active.isEmpty()) {\n\t\t\t\tArrayList<edges<String, Double>> minPath = active.poll();\n\t\t\t\tedges<String, Double> endOfMinPath = minPath.get(minPath.size() - 1);\n\t\t\t\tString minDest = endOfMinPath.getDest();\n\t\t\t\tdouble minCost = endOfMinPath.getLabel();\n\t\t\t\tif (minDest.equals(CHAR2)) {\n\t\t\t\t\treturn minPath;\n\t\t\t\t}\n\t\t\t\tif (known.contains(minDest))\n\t\t\t\t\tcontinue;\n\t\t\t\tSet<edges<String,Float>> children = g.childrenOf(minDest);\n\t\t\t\tfor (edges<String, Float> e : children) {\n\t\t\t\t\tif (!known.contains(e.getDest())) {\n\t\t\t\t\t\tdouble newCost = minCost + e.getLabel();\n\t\t\t\t\t\tArrayList<edges<String, Double>> newPath = new ArrayList<edges<String, Double>>(minPath); \n\t\t\t\t\t\tnewPath.add(new edges<String, Double>(e.getDest(), newCost));\n\t\t\t\t\t\tactive.add(newPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tknown.add(minDest);\n\t\t\t}\n\t\t\treturn null;\n\t}", "public static void reweight(List<List<Pair>> edges, List<List<Pair>> newEdges, int h[]) {\n\t\tint V = edges.size();\n\t\tfor (int i =1; i < V; i++) {\n\t\t\tList<Pair> cur = edges.get(i);\n\t\t\tfor (int j = 0; j< cur.size(); j++) {\n\t\t\t\tint formerWeight = cur.get(j).weight;\n\t\t\t\tint newWeight = formerWeight + h[i] - h[cur.get(j).to]; \n\t\t\t\tnewEdges.get(i).add(new Pair(cur.get(j).to, newWeight));\n\t\t\t}\n\t\t}\n\t}", "public PriorityColor recalculateBranchColors(long level) {\n if (currentColor == null) {\n currentColor = new PriorityColor(nodeColor);\n }\n level++;\n if (children.size() == 0) {\n Context.getInstance().getEventQueue().add(new EventCandidate(nodeId, currentColor, level));\n return new PriorityColor(currentColor);\n }\n PriorityColor topPriorityColor = new PriorityColor(nodeColor);\n for (Node child : children) {\n PriorityColor childPriorityColor = child.recalculateBranchColors(level);\n if (childPriorityColor.getPriority() > topPriorityColor.getPriority()) {\n topPriorityColor = new PriorityColor(childPriorityColor);\n }\n }\n currentColor = topPriorityColor;\n Context.getInstance().getEventQueue().add(new EventCandidate(nodeId, currentColor, level));\n return topPriorityColor;\n }", "private void relax(SiteEdge e) {\n int v = e.from(), w = e.to();\n if (distTo[w] > distTo[v] + e.weight()) {\n distTo[w] = distTo[v] + e.weight();\n edgeTo[w] = e;\n if (pq.contains(w)) pq.decreaseKey(w, distTo[w]);\n else pq.insert(w, distTo[w]);\n }\n }", "public void addEdge(int start, int end, double weight);", "public void greedyBFS(String input)\r\n\t{\r\n\t\tNode root_gbfs = new Node (input);\r\n\t\tNode current = new Node(root_gbfs.getState());\r\n\t\t\r\n\t\tNodeComparator gbfs_comparator = new NodeComparator();\r\n\t\tPriorityQueue<Node> queue_gbfs = new PriorityQueue<Node>(12, gbfs_comparator);\r\n\t\tArrayList<String> visited = new ArrayList<String>();\r\n\t\tArrayList<String> children = new ArrayList<String>();\r\n\t\t\r\n\t\tint nodes_popped = 0;\r\n\t\tint pqueue_max_size = 0;\r\n\t\tint pq_size = 0;\r\n\t\t\r\n\t\tcurrent.cost = 0;\r\n\t\tcurrent.total_cost = 0;\r\n\t\t\r\n\t\twhile(!goal_gbfs)\r\n\t\t{\r\n\t\t\tvisited.add(current.getState());\r\n\t\t\tchildren = Successor.findChildren(current.getState());\r\n\t\t\t\r\n\t\t\tfor (String a : children)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tif (visited.contains(a))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tNode nino = new Node(a);\r\n\t\t\t\t\tcurrent.children_nodes.add(nino);\r\n\t\t\t\t\tvisited.add(nino.getState());\r\n\t\t\t\t\t\r\n\t\t\t\t\tint cost = isCost(current.getState(), nino.getState());\r\n\t\t\t\t\tnino.cost = cost;\r\n\t\t\t\t\tnino.parent = current;\r\n\t\t\t\t\tint greedy_cost = greedybfsCost(nino.getState(), root_gbfs.getState());\r\n\t\t\t\t\tnino.setTotalCost(greedy_cost);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!queue_gbfs.contains(nino))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tqueue_gbfs.add(nino);\r\n\t\t\t\t\t\tpq_size++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Repeated State checking. Removing the same node from PQ if the path cost is less then the current one \r\n\t\t\t\t\telse if (queue_gbfs.contains(nino))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor (Node original : queue_gbfs)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (original.equals(nino))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tNode copy = original;\r\n\t\t\t\t\t\t\t\tif (nino.getTotalCost() < copy.getTotalCost())\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tqueue_gbfs.remove(copy);\r\n\t\t\t\t\t\t\t\t\tqueue_gbfs.add(nino);\r\n\t\t\t\t\t\t\t\t}\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\t\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent = queue_gbfs.poll();\r\n\t\t\tnodes_popped++;\r\n\t\t\t\r\n\t\t\tif (pq_size > pqueue_max_size)\r\n\t\t\t{\r\n\t\t\t\tpqueue_max_size = pq_size;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpq_size--;\r\n\t\t\tgoal_gbfs = isGoal(current.getState());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tgoal_gbfs = false;\r\n\t\tSystem.out.println(\"GBFS Solved!!\");\r\n\t\tSolution.performSolution(current, root_gbfs, nodes_popped, pqueue_max_size);\r\n\t}", "@Override public int set(L source, L target, int weight) {\r\n \r\n \tif(weight>0) {\r\n \t\tboolean flag=false;\r\n \t\tif(!vertices.contains(source)) {\r\n \t\t\tvertices.add(source);\r\n \t\t\tflag=true;\r\n \t\t}\r\n \tif(!vertices.contains(target)) {\r\n \t\tvertices.add(target);\r\n \t\tflag=true;\r\n \t}\r\n \tEdge<L> e=new Edge<L>(source,target,weight);\r\n \tif(flag==true) {//加点,直接把新边写入,\r\n \t\t\r\n \tedges.add(e);\r\n \tcheckRep();\r\n \treturn 0;\r\n \t}\r\n \telse {//点已经在了,可能边已经在了,考虑重复问题\r\n \t\tint n=edges.size();\r\n \t\tif(n==0) {\r\n \t\t\t\r\n \tedges.add(e);\r\n \tcheckRep();\r\n \treturn 0;\r\n \t\t}\r\n \t\telse {\r\n \t\t\tboolean tag=false;\t\r\n \t\t\tfor(int i=0;i<n;i++) {\r\n \t\t\t\t//这一步太关键了,之前一直判断是false\r\n \t\t\t\tif(edges.get(i).getSource().equals(source) && edges.get(i).getTarget().equals(target)) {\r\n \t\t\t//\tif(edges.get(i).getSource()==source && edges.get(i).getTarget()==target) {\r\n \t\t\t\t\tint res=edges.get(i).getWeight();\r\n \t\t\t\t\tedges.set(i,e);\r\n \t\t\t\t\tcheckRep();\r\n \t\t\t\t\ttag=true;\r\n \t\t\t\t\treturn res;//边已经在了,重新写权重\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\t//边不在里面,直接写入\r\n \t\t\tif(tag==false) {\r\n \t\t\t\tedges.add(e);\r\n \t\t\t\tcheckRep();\r\n \t\t\t\treturn 0;\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n \t}\r\n \telse if(weight==0) {\r\n \t\tif(!vertices.contains(source)||!vertices.contains(target)) return 0;\r\n \t\tint n=edges.size();\r\n \t\tfor(int i=0;i<n;i++) {\r\n \t\t\t//改了\r\n\t\t\t\tif(edges.get(i).getSource().equals(source) && edges.get(i).getTarget().equals(target)) {\r\n \t\t\t//if(edges.get(i).getSource()==source && edges.get(i).getTarget()==target) {\t\r\n \t\t\t//把已经在的边移除\r\n\t\t\t\t\tint res=edges.get(i).getWeight();\r\n\t\t\t\t\tedges.remove(i);\r\n\t\t\t\t\tcheckRep();\r\n\t\t\t\t\treturn res;\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t\treturn 0;\r\n \t}\r\n \tcheckRep();\r\n \treturn 0;\r\n \t\r\n }", "public void breadthFirstTraverse() {\n\t\t// track whether vertex was visited\n\t\tHashMap<Integer, Boolean> visited = buildVisited();\n\t\t// store neighbors\n\t\tQueue<Integer> queue = new LinkedList<Integer>();\n\n\t\t// arbitrarily add first element\n\t\tInteger current = (Integer) edges.keySet().toArray()[0];\n\t\tqueue.add(current);\n\n\t\twhile (queue.peek() != null) {\n\n\t\t\tcurrent = queue.remove();\n\t\t\tSystem.out.println(\"current: \" + current);\n\t\t\tvisited.put(current, true);\n\n\t\t\tfor (Integer neighbor: edges.get(current)) {\n\t\t\t\tif (!visited.get(neighbor)) {\n\t\t\t\t\tqueue.add(neighbor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void run() {\n\t\tMap<Integer, Integer> roots = new TreeMap<Integer, Integer>();\n\t\t\n\t\tEdge[] edges = new Edge[this.edges.length];\n\t\tint n, weight, relevantEdges, root, lowerBound = 0;\n\t\n\t\t// Sort edges by weight.\n\t\tquickSort(0, this.edges.length - 1);\n\t\n\t\t// Compute initial lower bound (best k - 1 edges).\n\t\t// Choosing the cheapest k - 1 edges is not very intelligent. There is no guarantee\n\t\t// that this subset of edges even induces a subgraph over the initial graph.\n\t\t// TODO: Find a better initial lower bound.\n\t\tfor (int i = 0; i < solution.length; i++) {\n\t\t\tlowerBound += this.edges[i].weight;\n\t\t}\n\t\n\t\t// Iterate over all nodes in the graph and run Prim's algorithm\n\t\t// until k - 1 edges are fixed.\n\t\t// As all induced subgraphs have k nodes and are connected according to Prim, they\n\t\t// are candidate solutions and thus submitted.\n\t\tfor (root = 0; root < taken.length; root++) {\n\t\t\ttaken = new boolean[taken.length];\n\t\t\tSystem.arraycopy(this.edges, 0, edges, 0, this.edges.length);\n\n\t\t\ttaken[root] = true;\n\t\t\tn = 0;\n\t\t\tweight = 0;\n\t\t\trelevantEdges = this.edges.length;\n\n\t\t\twhile (n < solution.length) { \n\t\t\t\tfor (int i = 0; i < relevantEdges; i++) {\n\t\t\t\t\t// XOR to check if connected and no circle.\n\t\t\t\t\tif (taken[edges[i].node1] ^ taken[edges[i].node2]) {\n\t\t\t\t\t\ttaken[taken[edges[i].node1] ? edges[i].node2 : edges[i].node1] = true;\n\t\t\t\t\t\tsolution[n++] = edges[i];\n\t\t\t\t\t\tweight += edges[i].weight;\n\t\t\t\t\t\tSystem.arraycopy(edges, i + 1, edges, i, --relevantEdges - i);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t// Check for circle.\n\t\t\t\t\telse if (taken[edges[i].node1]) {\n\t\t\t\t\t\tSystem.arraycopy(edges, i + 1, edges, i, --relevantEdges - i);\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\t// Sum up what we've just collected and submit this\n\t\t\t// solution to the framework.\n\t\t\tHashSet<Edge> set = new HashSet<Edge>(solution.length);\n\t\t\tfor (int i = 0; i < solution.length; i++) {\n\t\t\t\tset.add(solution[i]);\n\t\t\t}\n\t\t\tsetSolution(weight, set);\n\t\t\troots.put(weight, root);\n\t\t}\n\n\t\t// Now for the real business, let's do some Branch-and-Bound. Roots of \"k Prim Spanning Trees\"\n\t\t// are enumerated by weight to increase our chances to obtain the kMST earlier.\n\t\tfor (int item : roots.values()) {\n\t\t\ttaken = new boolean[taken.length];\n\t\t\tSystem.arraycopy(this.edges, 0, edges, 0, this.edges.length);\n\t\t\ttaken[item] = true;\n\t\t\tbranchAndBound(edges, solution.length, 0, lowerBound);\n\t\t}\n\t}", "public void Excute() {\n Node img1 = new Node(\"Branche1\", 1);\r\n Node img2 = new Node(\"Branche2\", 2);\r\n Node img3 = new Node(\"Branche3\", 3);\r\n Node img4 = new Node(\"Branche4\", 4);\r\n Node img5 = new Node(\"Branche5\", 5);\r\n Node img6 = new Node(\"Branche6\", 6);\r\n Node img7 = new Node(\"Branche7\", 7);\r\n Node img8 = new Node(\"Branche8\", 8);\r\n Node img9 = new Node(\"Branche9\", 9);\r\n\r\n // creat the edges from class Edge and connection the edges(scene bulider) , nodes(that creat from class Node) , weight , node(scene bulider) \r\n Edge edge1 = new Edge(4, img1, img2, this.edg1);\r\n Edge edge2 = new Edge(5, img1, img8, this.edg2);\r\n Edge edge3 = new Edge(8, img2, img3, this.edg3);\r\n Edge edge4 = new Edge(11, img2, img8, this.edg4);\r\n Edge edge5 = new Edge(4, img2, img1, this.edg1);\r\n Edge edge6 = new Edge(1, img3, img4, this.edg5);\r\n Edge edge7 = new Edge(4, img3, img6, this.edg6);\r\n Edge edge8 = new Edge(2, img3, img9, this.edg7);\r\n Edge edge9 = new Edge(8, img3, img2, this.edg3);\r\n Edge edge10 = new Edge(9, img4, img5, this.edg8);\r\n Edge edge11 = new Edge(14, img4, img6, this.edg9);\r\n Edge edge12 = new Edge(7, img4, img3, this.edg5);\r\n Edge edge13 = new Edge(10, img5, img6, this.edg10);\r\n Edge edge14 = new Edge(9, img5, img4, this.edg8);\r\n Edge edge15 = new Edge(10, img6, img5, this.edg10);\r\n Edge edge16 = new Edge(14, img6, img4, this.edg9);\r\n Edge edge17 = new Edge(4, img6, img3, this.edg6);\r\n Edge edge18 = new Edge(2, img6, img7, this.edg11);\r\n Edge edge19 = new Edge(6, img7, img9, this.edg12);\r\n Edge edge20 = new Edge(1, img7, img8, this.edg13);\r\n Edge edge21 = new Edge(2, img7, img6, this.edg11);\r\n Edge edge22 = new Edge(7, img8, img9, this.edg14);\r\n Edge edge23 = new Edge(11, img8, img2, this.edg4);\r\n Edge edge24 = new Edge(5, img8, img1, this.edg2);\r\n Edge edge25 = new Edge(1, img8, img7, this.edg13);\r\n Edge edge26 = new Edge(7, img9, img8, this.edg14);\r\n Edge edge27 = new Edge(2, img9, img3, this.edg7);\r\n Edge edge28 = new Edge(6, img9, img7, this.edg12);\r\n\r\n //System.out.println(edg1.getId());\r\n // add per the node the edges them to it\r\n ArrayList img1Edges = new ArrayList<>();\r\n img1Edges.add(edge1);\r\n img1Edges.add(edge2);\r\n img1.setEdge(img1Edges);\r\n //Collections.sort(img1Edges);\r\n //----------------------------------------------------------------\r\n ArrayList img2Edges = new ArrayList<>();\r\n img2Edges.add(edge3);\r\n img2Edges.add(edge4);\r\n img2Edges.add(edge5);\r\n img2.setEdge(img2Edges);\r\n //Collections.sort(img2Edges);\r\n //----------------------------------------------------------------\r\n ArrayList img3Edges = new ArrayList<>();\r\n img3Edges.add(edge6);\r\n img3Edges.add(edge7);\r\n img3Edges.add(edge8);\r\n img3Edges.add(edge9);\r\n img3.setEdge(img3Edges);\r\n //Collections.sort(img3Edges);\r\n //----------------------------------------------------------------\r\n ArrayList img4Edges = new ArrayList<>();\r\n img4Edges.add(edge10);\r\n img4Edges.add(edge11);\r\n img4Edges.add(edge12);\r\n img4.setEdge(img4Edges);\r\n //Collections.sort(img4Edges);\r\n //----------------------------------------------------------------\r\n ArrayList img5Edges = new ArrayList<>();\r\n img5Edges.add(edge13);\r\n img5Edges.add(edge14);\r\n img5.setEdge(img5Edges);\r\n //Collections.sort(img5Edges);\r\n //----------------------------------------------------------------\r\n ArrayList img6Edges = new ArrayList<>();\r\n img6Edges.add(edge15);\r\n img6Edges.add(edge16);\r\n img6Edges.add(edge17);\r\n img6Edges.add(edge18);\r\n img6.setEdge(img6Edges);\r\n //Collections.sort(img6Edges);\r\n //----------------------------------------------------------------\r\n ArrayList img7Edges = new ArrayList<>();\r\n img7Edges.add(edge19);\r\n img7Edges.add(edge20);\r\n img7Edges.add(edge21);\r\n img7.setEdge(img7Edges);\r\n //Collections.sort(img7Edges);\r\n //----------------------------------------------------------------\r\n ArrayList img8Edges = new ArrayList<>();\r\n img8Edges.add(edge22);\r\n img8Edges.add(edge23);\r\n img8Edges.add(edge24);\r\n img8Edges.add(edge25);\r\n img8.setEdge(img8Edges);\r\n //Collections.sort(img8Edges);\r\n //----------------------------------------------------------------\r\n ArrayList img9Edges = new ArrayList<>();\r\n img9Edges.add(edge26);\r\n img9Edges.add(edge27);\r\n img9Edges.add(edge28);\r\n img9.setEdge(img9Edges);\r\n //Collections.sort(img9Edges);\r\n\r\n // Add all the nodes in array \r\n nodes = new ArrayList<>();\r\n nodes.add(img1);\r\n nodes.add(img2);\r\n nodes.add(img3);\r\n nodes.add(img4);\r\n nodes.add(img5);\r\n nodes.add(img6);\r\n nodes.add(img7);\r\n nodes.add(img8);\r\n nodes.add(img9);\r\n\r\n ObservableList<Node> userobserblood = FXCollections.observableArrayList(nodes);\r\n nodeStart.getItems().addAll(userobserblood);\r\n nodeStart.setPrefWidth(150);\r\n ObservableList<Node> uuserobserblood = FXCollections.observableArrayList(nodes);\r\n nodeEnd.getItems().addAll(uuserobserblood);\r\n nodeEnd.setPrefWidth(150);\r\n }", "public void updateBottomWeight(){\r\n\t \tif(this.bottomNode != null)\r\n\t \t{\r\n\t \t\tif( this.bottomNode.isNoGoZone() == true)\r\n\t \t{\r\n\t \t\t\t//set edge weight to 9999 if the next node is NO go zone or\r\n\t \t\t\t//boundary node\r\n\t \t\tthis.bottomWeight = weightOfNoGoZone;\r\n\t \t}\r\n\t \telse if(this.bottomNode.isRoad() == true && this.bottomNode.isNoGoZone() == false)\r\n\t \t{\r\n\t \t\t//set edge weight to 1 if the next node is a road node\r\n\t \t\tthis.bottomWeight = this.bottomNode.getOwnElevation();\r\n\t \t}\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\t//set edge weight to INF if the next node is NULL\r\n\t \t\tthis.bottomWeight = weightOfMapEdge;\r\n\t \t}\r\n\t }", "public boolean DijkstraHelp(int src, int dest) {\n PriorityQueue<Entry>queue=new PriorityQueue();//queue storages the nodes that we will visit by the minimum tag\n //WGraph_DS copy = (WGraph_DS) (copy());//create a copy graph that the algorithm will on it\n initializeTag();\n initializeInfo();\n node_info first=this.ga.getNode(src);\n first.setTag(0);//distance from itself=0\n queue.add(new Entry(first,first.getTag()));\n while(!queue.isEmpty()) {\n Entry pair=queue.poll();\n node_info current= pair.node;\n if (current.getInfo() != null) continue;//if we visit we can skip to the next loop because we have already marked\n current.setInfo(\"visited\");//remark the info\n Collection<node_info> listNeighbors = this.ga.getV(current.getKey());//create a collection for the neighbors list\n LinkedList<node_info> Neighbors = new LinkedList<>(listNeighbors);//create the neighbors list\n if (Neighbors == null) continue;\n for(node_info n:Neighbors) {\n\n if(n.getTag()>ga.getEdge(n.getKey(),current.getKey())+current.getTag())\n {\n n.setTag(current.getTag() + ga.getEdge(n.getKey(), current.getKey()));//compute the new tag\n }\n queue.add(new Entry(n,n.getTag()));\n }\n }\n Iterator<node_info> it=this.ga.getV().iterator();\n while(it.hasNext()){\n if(it.next().getInfo()==null) return false;\n }\n return true;\n }", "protected void processEdge(Edge e) {\n\t}", "@Override\r\n\tpublic int compareTo(Object o) {\n\t\tNode other=(Node)o;\r\n\t\t\r\n\t\t\r\n\t\treturn this.getWeight()-other.getWeight();//正序,\r\n\t}" ]
[ "0.6277024", "0.62074417", "0.60784435", "0.6026116", "0.59984446", "0.59177315", "0.59033585", "0.58857465", "0.58259505", "0.5795449", "0.57763493", "0.57679856", "0.57554746", "0.5725826", "0.5673012", "0.56539166", "0.5633489", "0.5615425", "0.5594146", "0.5592937", "0.55615085", "0.5559756", "0.55591697", "0.5556605", "0.5556444", "0.55369425", "0.5527744", "0.5526282", "0.5498679", "0.5464272", "0.54546833", "0.54447925", "0.5443773", "0.5440108", "0.54371405", "0.54347056", "0.54227567", "0.54032665", "0.54032665", "0.5384856", "0.53750044", "0.5372091", "0.5337076", "0.53296864", "0.5327927", "0.53246385", "0.53129524", "0.53097695", "0.53046864", "0.53008485", "0.5299638", "0.5294207", "0.5292142", "0.5286708", "0.52826923", "0.52783346", "0.52382815", "0.52348125", "0.52346426", "0.52331245", "0.5231728", "0.5229565", "0.5222661", "0.5220124", "0.5214006", "0.5212223", "0.52101755", "0.52081233", "0.52050537", "0.52035624", "0.51934403", "0.5192141", "0.5189624", "0.51825345", "0.5181928", "0.51781404", "0.51781404", "0.51781404", "0.51781404", "0.51781404", "0.51781404", "0.51781404", "0.51781404", "0.5164226", "0.51555336", "0.5153161", "0.5151581", "0.515136", "0.5148151", "0.5146879", "0.5146334", "0.5136462", "0.513409", "0.51219815", "0.5111526", "0.51105875", "0.51062375", "0.50971806", "0.5094643", "0.5094051", "0.50920165" ]
0.0
-1
OK static public e = 1; // NOT OK, access modifier MUST come before specifier
void m1();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private E() {}", "public static void main(String[] args) {\nprivate final int d=20; // illegal modifier ( inside {} block private can't use\nfinal int f=20;\nprivate int g=30;\n\t}", "private Constantes() {\r\n\t\t// No way\r\n\t}", "private static class <init>\n implements e\n{\n\n public String a()\n {\n return \"\";\n }", "public void e() {\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(CONSTANT1*Nested.CONSTANT2);\n\t\t\n\t\tNested b = new Nested();\n\t\tSystem.out.println(b.c); // access to non-static members of a nested static class. (Even private).\n\t}", "public byte e()\r\n/* 84: */ {\r\n/* 85:86 */ return this.e;\r\n/* 86: */ }", "public interface AbstractC4464qo0 extends AbstractC3313k30 {\n public static final /* synthetic */ int v = 0;\n}", "private Ex() {\n }", "public static a c() {\n }", "static void m1(int a){\n\t\ta=Static11.a;\nSystem.out.println(a);\n\t}", "private LevelConstants() {\n\t\t\n\t}", "private Example() {\n\t\tthrow new Error(\"no instantiation is permitted\");\n\t}", "public interface e {\n}", "@Test\n public void testPrivateAccessForProperties3() {\n testError(\n srcs(\n \"/** @constructor */ function Foo() {}\"\n + \"/** @private */ Foo.prototype.bar_ = function() {}; (new Foo).bar_();\",\n \"Foo.prototype.baz = function() { this.bar_(); };\"),\n BAD_PRIVATE_PROPERTY_ACCESS);\n }", "private Const() {\n }", "@Test\n public void testNoPrivateAccessForProperties6a() {\n testError(\n srcs(\n \"/** @const */ var ns = {};\"\n + \"/** @constructor */ ns.Foo = function() {}; \"\n + \"/** @private */ ns.Foo.prototype.bar_ = function() {};\",\n \"/** @constructor \\n * @extends {ns.Foo} */ \"\n + \"ns.SubFoo = function() {};\"\n + \"ns.SubFoo.prototype.bar_ = function() {};\"),\n BAD_PRIVATE_PROPERTY_ACCESS);\n }", "public void checkPublic() {\n }", "public int e() {\n return 12;\n }", "public static aa a() {\n }", "private GPSConst()\n\t{\n\t\t\n\t}", "public void mo1405e() {\n }", "public static void main(String[] args) {\n Class clazz = ModifierDemo.InnerPrivateClass.class;\n\n int modifiers = clazz.getModifiers();\n System.out.println(modifiers);\n String name = clazz.getName();\n System.out.println(name);\n\n int modifiers1 = ModifierDemo.class.getModifiers();\n System.out.println(modifiers1);\n\n\n\n }", "public void o_()\r\n/* 533: */ {\r\n/* 534:539 */ this.e = true;\r\n/* 535: */ }", "static void e() throws LowLevelException {\n throw new LowLevelException();\n }", "public abstract int mo123246e();", "private StaticProperty() {}", "public void test0102() throws JavaModelException {\n\tIPath projectPath = env.addProject(\"Project\");\n\tenv.addExternalJars(projectPath, Util.getJavaClassLibs());\t\n\tenv.removePackageFragmentRoot(projectPath, \"\");\n\tIPath root = env.addPackageFragmentRoot(projectPath, \"src\");\n\tIPath classTest1 = env.addClass(root, \"p1\", \"Test1\",\n\t\t\"package p1;\\n\" +\n\t\t\"public class Test1 {\\n\" +\n\t\t\" private static int i;\\n\" +\n\t\t\" int j = i;\\n\" +\n\t\t\"}\\n\" +\n\t\t\"class Test2 {\\n\" +\n\t\t\" static int i = Test1.i;\\n\" +\n\t\t\"}\\n\"\n\t);\n\tfullBuild();\n\tProblem[] prob1 = env.getProblemsFor(classTest1);\n\texpectingSpecificProblemFor(classTest1, new Problem(\"p1\", \"The field Test1.i is not visible\", classTest1, 109, 110, 50));\n\tassertEquals(JavaBuilder.GENERATED_BY, prob1[0].getGeneratedBy());\n}", "int mo38974e();", "public void mo2471e() {\n }", "private Constants() {\n\t\tthrow new AssertionError();\n\t}", "public interface C48855s {\n\n /* renamed from: a */\n public static final C48856a f124209a = C48856a.f124210a;\n\n /* renamed from: shark.s$a */\n public static final class C48856a {\n\n /* renamed from: a */\n static final /* synthetic */ C48856a f124210a = new C48856a();\n\n private C48856a() {\n }\n }\n\n /* renamed from: a */\n void mo123342a(C48857t tVar);\n}", "public float e()\r\n/* 20: */ {\r\n/* 21:167 */ return this.c;\r\n/* 22: */ }", "private Utility() {\n throw new IllegalAccessError();\n }", "public int getE() {\n return e_;\n }", "public int mo1265e() {\n throw new UnsupportedOperationException(getClass().getSimpleName());\n }", "private void m50366E() {\n }", "private VolumeDataConstants() {\r\n \r\n }", "public static void a() {\n\n }", "private Public() {\n super(\"public\", null);\n }", "int getE();", "@Override\n\t/**\n\t * does nothing because a class cannot be static\n\t */\n\tpublic void setStatic(boolean b) {\n\n\t}", "@Test\n public void testDeclarationAndConventionConflict3() {\n testSame(\"/** @protected */ var Foo_;\");\n }", "private Validations() {\n\t\tthrow new IllegalAccessError(\"Shouldn't be instantiated.\");\n\t}", "int mo30291e();", "@Test\n public void testNoPrivateAccessForProperties7() {\n testError(\n srcs(\n \"/** @constructor */ function Foo() {} \"\n + \"/** @private */ Foo.prototype.bar_ = function() {};\"\n + \"/** @constructor \\n * @extends {Foo} */ \"\n + \"function SubFoo() {};\"\n + \"SubFoo.prototype.bar_ = function() {};\",\n \"SubFoo.prototype.baz = function() { this.bar_(); }\"),\n BAD_PRIVATE_PROPERTY_ACCESS);\n }", "private Constants() {\n }", "private Constants() {\n }", "private USBConstant() {\r\n\r\n\t}", "public static void error(boolean e) {\n E = e;\n }", "public static void main(String[] args) {\n\t\n\tAccesingModifiers.hello();//heryerden accessable \n\tAccesingModifiers.hello1();\n\tAccesingModifiers.hello2();\n\t\n\t//AccesingModifiers.hello3(); not acceptable since permission is set to private\n\t\n}", "public int E() {\r\n return E;\r\n }", "static void d() throws LowLevelException {\n e();\n }", "@Test\n public void testDeclarationAndConventionConflict1() {\n testSame(\"/** @constructor */ function Foo() {} /** @protected */ Foo.prototype.length_;\");\n }", "public int E() {\n return E;\n }", "public int E() {\n return E;\n }", "@SuppressWarnings(\"UnusedDeclaration\")\n public static void __staticInitializer__() {\n }", "int mo17014e();", "private Constants(){\n }", "private SecurityConsts()\r\n\t{\r\n\r\n\t}", "static int test()\n\t{\n\n\t\treturn 20;\n\t}", "public static void main(String[] args) {\n\t\tSubAccessEx sub = new SubAccessEx();\r\n\t\tsub.subPrintField();\r\n\t\t\r\n\t\t//System.out.println(sub.c);//protected member\r\n\t\tSystem.out.println(sub.d); // public\r\n\t\t\r\n\t\t\r\n\t\tAccessEx acc = new AccessEx();\r\n//\t\tSystem.out.println(acc.a); // private\r\n//\t\tSystem.out.println(acc.b); // package(»ý·«)\r\n//\t\tSystem.out.println(acc.c); // protected\r\n\t\tSystem.out.println(acc.d); // public\r\n\t}", "public void mo38031a(C13262e eVar) {\n }", "public int getE() {\n return e_;\n }", "public static void main(String[] args) {\r\n\t\t//A obj = new A(); //A cannot be resolved to a type...try to access the class A method in thz class -- error \r\n\t // obj.i = 80; //here..The field A.i is not visible...it, allow as to create the object, but still it is not allow as to access thev & m, bcoz if we dont specify anything-- default(V & M) so it only accessible within the package.\r\n\t\r\n\t // obj.j = 90; //The field A.j is not visible -- error, cant access since it is protected.\r\n\t // obj.flow(); //The method flow() from the type A is not visible, cant access since it is protected.\r\n\t \r\n\t B obj1 = new B(); //extended class A, so we can access its V and M here.\r\n\t obj1.j = 70;\r\n\t obj1.flow();\r\n\t \r\n\t A obj3 = new A(); // here no need to extend class A , just create obj for A class and access it, bcoz it is \"public\".\r\n\t obj3.D = 100;\r\n\t obj3.sub();\r\n\t}", "private stendhal() {\n\t}", "public void m23075a() {\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:02:04.534 -0500\", hash_original_method = \"E4DEB0C107DDB25A537EF0E89F1C04F8\", hash_generated_method = \"2E76AFD8C90588F5139C0C2D28CAEA05\")\n \nprivate static int translateCodingErrorAction(CodingErrorAction action) {\n if (action == CodingErrorAction.REPORT) {\n return 0;\n } else if (action == CodingErrorAction.IGNORE) {\n return 1;\n } else if (action == CodingErrorAction.REPLACE) {\n return 2;\n } else {\n throw new AssertionError(); // Someone changed the enum.\n }\n }", "private Constants() {\n throw new AssertionError();\n }", "private Util()\n {\n // Empty default ctor, defined to override access scope.\n }", "private Constants() {\n\n }", "public ImpossibleAccessException() {\n super(Constants.IMPOSSIBLE_ACCESS);\n }", "public static void main(String[] args) {\n// System.out.println(Parent2.str);//public static String str = \"hello world\";\n\n// hello world\n System.out.println(Parent2.a);//public static final String str = \"hello world\";\n }", "public void mo21780E() {\n }", "public int E() {\n \treturn E;\n }", "public int a() {\n return this.f404d;\n }", "@Override\n\tpublic void e() {\n\n\t}", "static void test(){\n\t }", "public interface Constants\r\n{\r\n\tfinal public static double EPSILON = 0.0001;\r\n\tfinal public static int LEFT_BUTTON = MouseEvent.BUTTON1;\r\n\tfinal public static int RIGHT_BUTTON = MouseEvent.BUTTON3;\r\n\tfinal public static double SMALL_EPSILON = 0.0000000001;\r\n}", "private test5() {\r\n\t\r\n\t}", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tPrivateAb ob=new PrivateAb(); \r\n\t\t ob.mydata;\r\n\t\t\r\n\t\t//System.out.println(obj.data);\t//Compile Time Error \r\n\t\t obj.msg();\t//Compile Time Error \r\n\t\t \r\n\t\t\r\n\t\t }", "public default boolean isStatic() {\n\t\treturn false;\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(InstanceInner.CONST);\n\t\tSystem.out.println(StaticInner.cv);\n//\t\tSystem.out.println(LocalInner.CONST);//에러 지역 내부 클래스는 메서드 내에서만\n\t\t\n\t}", "public int d()\n {\n return 1;\n }", "public int zzef() {\n throw new UnsupportedOperationException();\n }", "private MainConst() {\n super(\"\");\n }", "public DoubleDeclarationInScopeException() {\n\t\tsuper(defaultMessage);\n\t}", "public static InvalidEventHandlerException reusable() {\n return STATIC;\n }", "private ApplicationConstants(){\n\t\t//not do anything \n\t}", "public static void main(String[] args) {\n\t\tAccessModifiers am = new AccessModifiers();\r\n\t\tSystem.out.println(am.publicInt);\r\n\t\t//System.out.println(am.privatefloat);\r\n\t\tSystem.out.println(am.protectedName);\r\n\t\tSystem.out.println(am.defaultAge);\r\n\t}", "@Test\n public void testDeclarationAndConventionConflict2() {\n testSame(\"/** @constructor */ function Foo() { /** @protected */ this.length_ = 1;\\n}\\n\");\n }", "int getEInt();", "public static void main(String[] args) {\n\tThree4 t4 = new Three4();\n\tSystem.out.println(t4.i); //static var can be accessed by ref var but warn, when run <t4> is replaced by <class-name>\n\tSystem.out.println(i);\n\tSystem.out.println(Three4.i);\n\t\n}", "public int d()\r\n/* 79: */ {\r\n/* 80:82 */ return this.d;\r\n/* 81: */ }", "void mo43357a(C16726e eVar) throws RemoteException;", "public void mo6944a() {\n }", "public interface AbstractC0537ba {\n public static final AbstractC0537ba A00 = new C1195uw();\n\n List A3h(C0544bh bhVar);\n}", "private SelfShieldingCalc()\n {\n // This class should just contain static methods. Don't let anyone\n // instantiate it.\n }", "private LabelUtilsConstants() {}", "void m5771e() throws C0841b;", "public void mo21779D() {\n }" ]
[ "0.6285236", "0.592388", "0.5888297", "0.58562154", "0.57338357", "0.5593752", "0.5593696", "0.55513376", "0.55275875", "0.5477585", "0.54641205", "0.5439028", "0.54041684", "0.5379921", "0.5375381", "0.53584045", "0.5344914", "0.53355235", "0.532833", "0.5305493", "0.5296596", "0.5270019", "0.52551234", "0.52489555", "0.5220114", "0.52061385", "0.5201735", "0.51627237", "0.51576006", "0.5153435", "0.5150033", "0.514811", "0.5140624", "0.5140216", "0.5131887", "0.5130238", "0.5129017", "0.51052994", "0.50900435", "0.5081652", "0.5073411", "0.5057812", "0.50491905", "0.50470436", "0.5037188", "0.50316775", "0.5029799", "0.5029799", "0.50294536", "0.5028212", "0.50222766", "0.5016947", "0.50120586", "0.5007518", "0.50072795", "0.50072795", "0.49976018", "0.4990418", "0.4989023", "0.49824834", "0.4975408", "0.49665922", "0.4962035", "0.49512058", "0.4949633", "0.49460977", "0.4945163", "0.49387476", "0.49368083", "0.49362448", "0.49360308", "0.49340248", "0.4926077", "0.49237606", "0.49128586", "0.49115583", "0.49071264", "0.48992518", "0.4896678", "0.48935938", "0.48903197", "0.48796448", "0.48779005", "0.48711604", "0.48709843", "0.48660138", "0.48631456", "0.48597488", "0.48575756", "0.4848325", "0.48434776", "0.4838351", "0.48380086", "0.48347142", "0.48344153", "0.4833097", "0.48233655", "0.4823238", "0.48224953", "0.48220384", "0.48212105" ]
0.0
-1
A simple implementation of getting all the column names in the clause. Filter out the columns that are variaibles, expressions, literals. A more complete implementation should move this method into each specific atomic condition.
public Columns getColumns() { Columns cs = null; if (column1 != null && !column1.isVariable()) { cs = new Columns(column1); if (column2 != null && !column2.isVariable()) { cs.add(column2); } } return cs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getAllColumnName() {\n\t\t\n\t\tStringBuilder builder = new StringBuilder();\n\t\t// .append(COLUMN_id).append(\"=?,\").\n\t\tbuilder.append(\"user_id\").append(\"=?,\");\n\t\tbuilder.append(\"lib_book_id\").append(\"=?,\");\n\t\tbuilder.append(\"lending_date\").append(\"=?,\");\n\t\tbuilder.append(\"return_date\").append(\"=?,\");\n\t\tbuilder.append(\"returned_date\").append(\"=?,\");\n\t\tbuilder.append(\"status\").append(\"=?\");\n\t\t\n\t\treturn builder.toString();\n\t}", "public List<String> getAllSelectColumnNames() {\n\t\tList<String> result = new ArrayList<>();\n\n\t\tfor (ColumnSpec cs : getColumnSpecs()) {\n\t\t\tresult.add(cs.getColumnName());\n\t\t}\n\n\t\treturn result;\n\t}", "List<Column> getQueryColumns();", "public String [] getColumnNamesForQuery(String query) {\n LOG.error(\"This database does not support free-form query column names.\");\n return null;\n }", "protected ArrayList<String> getColumnNames() {\n return getVariableNames();\n }", "@Override\n public Set<String> getAllColumnIds() {\n return subFilter.getAllColumnIds();\n }", "public String[] getColumnNames();", "private List<String> getColNames() {\r\n\t\t//\r\n\t\tDBManager dbm = new DBManager(this);\r\n\t\t\r\n\t\tSQLiteDatabase wdb = dbm.getWritableDatabase();\r\n\r\n\t\t// REF=> http://stackoverflow.com/questions/947215/how-to-get-a-list-of-column-names-on-sqlite3-iphone\r\n\t\tString sql = \"PRAGMA table_info('\" + DBManager.tableName + \"')\";\r\n\t\t\r\n\t\tCursor c = wdb.rawQuery(sql, null);\r\n\t\t\r\n\t\t// Log\r\n\t\tLog.d(\"DBAdminActivity.java\" + \"[\"\r\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\r\n\t\t\t\t+ \"]\", \"c.getCount() => \" + c.getCount());\r\n\t\t\r\n\t\tLog.d(\"DBAdminActivity.java\" + \"[\"\r\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\r\n\t\t\t\t+ \"]\", \"c.getColumnCount() => \" + c.getColumnCount());\r\n\r\n\t\tList<String> colNames = new ArrayList<String>();\r\n\t\t\r\n\t\tc.moveToFirst();\r\n\t\t\r\n\t\tfor (int i = 0; i < c.getCount(); i++) {\r\n\t\t\t\r\n\t\t\tcolNames.add(c.getString(0));\r\n\t\t\t\r\n\t\t\t// Log\r\n\t\t\tLog.d(\"DBAdminActivity.java\" + \"[\"\r\n\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\r\n\t\t\t\t\t+ \"]\", \"c.getString(0) => \" + c.getString(0) + \r\n\t\t\t\t\t\" / \" + \"c.getString(1) => \" + c.getString(1));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tc.moveToNext();\r\n\t\t\t\r\n\t\t}//for (int i = 0; i < c.getCount(); i++)\r\n\t\t\r\n\t\twdb.close();\r\n\t\t\r\n\t\tfor (String string : colNames) {\r\n\t\t\t\r\n\t\t\t// Log\r\n\t\t\tLog.d(\"DBAdminActivity.java\" + \"[\"\r\n\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\r\n\t\t\t\t\t+ \"]\", \"colName => \" + string);\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n//\t\treturn (String[])colNames.toArray();\r\n\t\treturn colNames;\r\n\t\t\r\n\t}", "public static Object[] getColumnNames()\n\t{\n\t\treturn new Object[]{\"id\", \"name\", \"price\", \"onSale\"};\n\t}", "public ArrayList<String> getColumnNames();", "protected void buildColNamesSet(ResultSet resultSet) throws SQLException {\n ResultSetMetaData metaData = resultSet.getMetaData();\n if (null != metaData) {\n int columnCount = metaData.getColumnCount();\n if (columnCount > 0) {\n for (int i = 1; i <= columnCount; ) {\n colNames.add(metaData.getColumnName(i++));\n }\n }\n }\n if (log.isDebugEnabled()) {\n log.debug(String.format(\"Dynamic column set [%s]\", colNames.toString()));\n }\n }", "public abstract String [] getColumnNames(String tableName);", "private String[] getColumnNames(ResultSet rs) throws SQLException {\n ResultSetMetaData meta = rs.getMetaData();\n String[] names = new String[meta.getColumnCount()];\n\n for (int i = 0; i < names.length; i++) {\n // NB: we're getting the label here, to support the SQL's \"select a AS b\".\n // If label not available, we'll get the plain column name.\n names[i] = meta.getColumnLabel(i + 1);\n }\n return names;\n }", "private static String commonSelectFields() {\n return Arrays.stream(TaskQueryColumnName.values())\n .map(TaskQueryColumnName::toString)\n .filter(column -> column.startsWith(\"t\"))\n .collect(Collectors.joining(\", \"));\n }", "public static String[] columnNames(final ResultSet aResultSet) {\r\n if (aResultSet==null) return null;\r\n try {\r\n ResultSetMetaData md = aResultSet.getMetaData();\r\n String[] cn = new String[md.getColumnCount()];\r\n for (int i=0, n= cn.length; i<n; i++) {\r\n cn[i] = md.getColumnName(i+1);\r\n// cn[i] = md.getColumnLabel(i+1);\r\n }\r\n return cn;\r\n }\r\n catch (SQLException ex) {} // intentional: no need for logging here\r\n return null;\r\n }", "protected Set<String> filterColumns() {\n return columnSelectionMap.keySet();\n }", "@Test\n public void selectAllDeletedColumns() {\n String[] retArray = {\n \"3,30000.0,null,30000\", \"4,4.0,4,null\",\n };\n\n String[] columnNames = {\"root.sg1.d1.s1\", \"root.sg1.d1.s2\", \"root.sg1.d1.s3\"};\n\n try (Connection connection = EnvFactory.getEnv().getConnection();\n Statement statement = connection.createStatement();\n ResultSet resultSet =\n statement.executeQuery(\"select s1, s2, s3 from root.sg1.d1 where time <= 4\")) {\n\n ResultSetMetaData resultSetMetaData = resultSet.getMetaData();\n Map<String, Integer> map = new HashMap<>();\n for (int i = 1; i <= resultSetMetaData.getColumnCount(); i++) {\n map.put(resultSetMetaData.getColumnName(i), i);\n }\n assertEquals(columnNames.length + 1, resultSetMetaData.getColumnCount());\n int cnt = 0;\n while (resultSet.next()) {\n StringBuilder builder = new StringBuilder();\n builder.append(resultSet.getString(1));\n for (String columnName : columnNames) {\n int index = map.get(columnName);\n builder.append(\",\").append(resultSet.getString(index));\n }\n assertEquals(retArray[cnt], builder.toString());\n cnt++;\n }\n assertEquals(retArray.length, cnt);\n } catch (SQLException e) {\n e.printStackTrace();\n fail(e.getMessage());\n }\n }", "List<String> getColumnIdentifiers();", "public static String getSelectColumns(boolean selectIDs)\r\n {\r\n Course.CourseTable[] cols = Course.CourseTable.class.getEnumConstants();\r\n\r\n String columnSetUp = \"\";\r\n\r\n for (int i = 0; i < cols.length; i++)\r\n {\r\n if (selectIDs || !cols[i].isID() || i == 0)\r\n {\r\n columnSetUp += cols[i].getWithAlias() + \" as '\" + cols[i].getWithAlias() + \"', \";\r\n }\r\n }\r\n columnSetUp = columnSetUp.substring(0, columnSetUp.length() - 2);\r\n return columnSetUp;\r\n\r\n }", "public String[] getColumnNames()\n {\n return columnNames;\n }", "private Object [] getFilterVals()\n throws java.sql.SQLException\n {\n Object [] ret = new Object[m_cols.length];\n\n for (int i = 0; i < m_cols.length; i++)\n {\n ret[i] = m_rs.getString((String)m_cols[i]);\n }\n return ret;\n }", "private void checkColumns(String[] projection) {\n\t\tString[] available = { MedTable.MED_NAME,\n\t\t\t\tMedTable.MED_DOSAGE, MedTable.MED_ID,\n\t\t\t\tMedTable.MED_DATE_FILLED, MedTable.MED_DURATION,\n\t\t\t\tMedTable.MED_WARNING, MedTable.MED_REMINDER_ON };\n\t\tif(projection != null) {\n\t\t\tHashSet<String> requestedColumns = new HashSet<String>(Arrays.asList(projection));\n\t\t\tHashSet<String> availableColumns = new HashSet<String>(Arrays.asList(available));\n\t\t\t// Check if all columns which are requested are available\n\t\t\tif(!availableColumns.containsAll(requestedColumns)) {\n\t\t\t\tthrow new IllegalArgumentException(\"Unknown columns in projection\");\n\t\t\t}\n\t\t}\n\t}", "public Object[] getColumnNames(){\r\n if (ufeRunner == null || renders == null || htmlObjLang == null) {\r\n return null;\r\n }\r\n String[] columnNames = {\"Name\", \"Value\"};\r\n return columnNames;\r\n }", "public List<String> getInsertColumnNames() {\n InsertStatement insertStatement = getSqlStatement();\n return InsertStatementHandler.getSetAssignmentSegment(insertStatement).map(this::getColumnNamesForSetAssignment).orElseGet(() -> getColumnNamesForInsertColumns(insertStatement.getColumns()));\n }", "private static String [] getColumnName(){\r\n\t\tString [] columnNames = { DBSAResourceBundle.res.getString(\"no\"), DBSAResourceBundle.res.getString(\"title\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"authors\"), DBSAResourceBundle.res.getString(\"link\"),\r\n\t\t\t\tDBSAResourceBundle.res.getString(\"year\"),DBSAResourceBundle.res.getString(\"abstract\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"publisher\"),(\"X\"), \r\n\t\t\t\t(\"duplicate\"), \"id\"};\r\n\t\t\t\r\n\t\treturn columnNames;\r\n\t}", "public LuaObject getcolnames() throws SQLException\n {\n L.newTable();\n LuaObject table = L.getLuaObject(-1);\n \n ResultSetMetaData md = rs.getMetaData();\n \n for (int i = 1; i <= md.getColumnCount(); i++)\n {\n String name = md.getColumnName(i);\n \n L.pushNumber(i);\n L.pushString(name);\n L.setTable(-3);\n }\n L.pop(1);\n \n return table;\n }", "List<String> getColumns();", "public static Column[] all() {\n return Column.values();\n }", "public static String[] columnProjection() {\n\n\t\treturn new String[]{KEY_ID, KEY_ADDRESS, KEY_NAME, KEY_VOLUME, KEY_POOL_LOCALE, KEY_FINISH, KEY_SANITIZER, KEY_PUMP_BRAND, KEY_PUMP_MODEL, KEY_FILTER, KEY_CLEANER_BRAND, KEY_CLEANER_MODEL, KEY_TRAFFIC, KEY_MIN_DEPTH, KEY_MAX_DEPTH, KEY_TILING, KEY_COVER, KEY_ATTACHED_SPA, KEY_HEATER, KEY_DIVING_BOARD, KEY_SLIDE, KEY_LADDER, KEY_FOUNTAINS, KEY_ROCK_WATERFALL, KEY_LIGHTS, KEY_INFINITY, KEY_SPORTING_EQUIPMENT, KEY_BEACH_ENTRY, KEY_SAND, KEY_IMAGE, KEY_WEATHER_NOTIFICATIONS, KEY_WATER_TEST_REMINDERS, KEY_FILTER_REMINDERS, KEY_SAFETY_NOTIFICATIONS, KEY_MAINTENANCE_REMINDERS, KEY_CUSTOM_NOTIFICATIONS, KEY_COUPON_NOTIFICATIONS};\n\t}", "private String[] getHeaderColumns() {\n int length = CallLogQuery._PROJECTION.length;\n String[] columns = new String[length + 1];\n System.arraycopy(CallLogQuery._PROJECTION, 0, columns, 0, length);\n columns[length] = CallLogQuery.SECTION_NAME;\n return columns;\n }", "@Override\n protected String getColNamesQuery(String tableName) {\n return \"SELECT t.* FROM \" + escapeTableName(tableName) + \" AS t LIMIT 1\";\n }", "public static String[] concreteColumnProjection() {\n\n\t\treturn new String[]{CONCRETE_ID, CONCRETE_ADDRESS, CONCRETE_NAME, CONCRETE_VOLUME, CONCRETE_POOL_LOCALE, CONCRETE_FINISH, CONCRETE_SANITIZER, CONCRETE_PUMP_BRAND, CONCRETE_PUMP_MODEL, CONCRETE_FILTER, CONCRETE_CLEANER_BRAND, CONCRETE_CLEANER_MODEL, CONCRETE_TRAFFIC, CONCRETE_MIN_DEPTH, CONCRETE_MAX_DEPTH, CONCRETE_TILING, CONCRETE_COVER, CONCRETE_ATTACHED_SPA, CONCRETE_HEATER, CONCRETE_DIVING_BOARD, CONCRETE_SLIDE, CONCRETE_LADDER, CONCRETE_FOUNTAINS, CONCRETE_ROCK_WATERFALL, CONCRETE_LIGHTS, CONCRETE_INFINITY, CONCRETE_SPORTING_EQUIPMENT, CONCRETE_BEACH_ENTRY, CONCRETE_SAND, CONCRETE_IMAGE, CONCRETE_WEATHER_NOTIFICATIONS, CONCRETE_WATER_TEST_REMINDERS, CONCRETE_FILTER_REMINDERS, CONCRETE_SAFETY_NOTIFICATIONS, CONCRETE_MAINTENANCE_REMINDERS, CONCRETE_CUSTOM_NOTIFICATIONS, CONCRETE_COUPON_NOTIFICATIONS};\n\t}", "private static String [] getColumnName(){\r\n\t\tString [] columnNames = { DBSAResourceBundle.res.getString(\"no\"), DBSAResourceBundle.res.getString(\"title\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"authors\"), DBSAResourceBundle.res.getString(\"link\"),\r\n\t\t\t\tDBSAResourceBundle.res.getString(\"year\"),DBSAResourceBundle.res.getString(\"abstract\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"publisher\"),DBSAResourceBundle.res.getString(\"mark\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"duplicate\"), \"dlsName\"};\r\n\t\t\t\r\n\t\treturn columnNames;\r\n\t}", "Vector<String> getColumns(String table) throws SQLException {\n\t\tVector<String> columns = new Vector<String>();\n\t\tDatabaseMetaData md = con.getMetaData();\n\t\tfor (ResultSet rs = md.getColumns(null, null, table, null); rs.next(); columns\n\t\t\t\t.add(rs.getString(4)))\n\t\t\t;\n\t\treturn columns;\n\t}", "public Tuple<String> getColumnNames() {\n return resultTable.getColumnNames();\r\n }", "@Override\r\n\tpublic String[] getPrettyColumnNames() {\n\t\treturn this.dispColNames;\r\n\t\t//未实现\r\n\t}", "public String[] getColumns() {\r\n\t\tlogger.trace(\"Enter getColumns\");\r\n\t\tlogger.trace(\"Exit getColumns\");\r\n\t\treturn columns;\r\n\t}", "public StaticTypeColumn[] getAllStaticColumns() { return ALL_COLUMNS; }", "protected SqlExpression getFieldsSqlExpression() {\n\t\tSqlCollectionExpression fields = new SqlCollectionExpression();\n\t\t\n\t\tCollection variables = new HashSet(this.variableToDatabaseMapping.values());\t\t\n\t\tIterator i = variables.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tfields.add(new SqlStringExpression((String) i.next()));\n\t\t}\n\t\treturn fields;\n\t}", "public final List<String> getColumnNames(ResultSet rs) throws SQLException\r\n\t{\r\n\t\tList<String> columnNames = new ArrayList<String>();\r\n\t\tResultSetMetaData meta = rs.getMetaData();\r\n\t\tint numColumns = meta.getColumnCount();\r\n\t\tfor (int i = 1; i <= numColumns; ++i)\r\n\t\t{\r\n\t\t\tcolumnNames.add(meta.getColumnName(i));\r\n\t\t}\r\n\t\treturn columnNames;\r\n\t}", "public String getColumns() {\n\t\tString[] colStrArr = columns.toArray(new String[columns.size()]); \n\t\tlogInfo(String.join(\", \", colStrArr));\n\t\treturn \"\"+String.join(\", \", colStrArr);\n\t}", "public Vector<String> getColumns() throws SQLException {\r\n return this.columns;\r\n }", "boolean getIncludesAllColumns();", "public static List<String> setColumnNames(){\n List <String> columnName = new ArrayList<>();\n columnName.add(\"Category No\");\n columnName.add(\"Category Name\");\n\n return columnName;\n }", "private String[] getInputColNames() \r\n\t{\r\n\t\tif (null == formatString)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tint length = formatString.length();\r\n\t\tString [] colNames = new String[length];\r\n\t\tchar tmp;\r\n\t\tfor (int i=0; i<length; i++)\r\n\t\t{\r\n\t\t\t/** Read the format identifier from the command file and set the corresponding \r\n\t\t\t * column name in colNames \t */\r\n\t\t\ttmp = formatString.charAt(i);\r\n\t\t\tswitch (tmp)\r\n\t\t\t{\r\n\t\t\tcase 'A': case 'a':\r\n\t\t\t\tcolNames[i] = \"CIN_ACC_NO\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'U': case 'u':\r\n\t\t\t\tcolNames[i] = \"CIN_UGID\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'O': case 'o':\r\n\t\t\t\tcolNames[i] = \"CIN_LOCAL_TAXID\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'E': case 'e':\r\n\t\t\t\tcolNames[i] = \"CIN_GENEID\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tLogger.log(\"Character \" + tmp + \" not a valid format character\",Logger.WARNING);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn colNames;\r\n\t}", "protected String buildDataQuery() {\n StringBuilder sql = new StringBuilder(\"select\");\n String delim = \" \";\n for (String vname : getColumnNames()) {\n sql.append(delim).append(vname);\n delim = \", \";\n }\n \n Element ncElement = getNetcdfElement();\n \n String table = ncElement.getAttributeValue(\"dbTable\");\n if (table == null) {\n String msg = \"No database table defined. Must set 'dbTable' attribute.\";\n _logger.error(msg);\n throw new TSSException(msg);\n }\n sql.append(\" from \" + table);\n \n String predicate = ncElement.getAttributeValue(\"predicate\");\n if (predicate != null) sql.append(\" where \" + predicate);\n \n //Order by time.\n String tname = getTimeVarName();\n sql.append(\" order by \"+tname+\" ASC\");\n \n return sql.toString();\n }", "public List<String> getSelectFields() {\n List<String> selectField = new ArrayList<>();\n for (SelectItem item : queryBody.getSelect().getSelectItems()) {\n if (item instanceof SingleColumn) {\n Expression expression = ((SingleColumn)item).getExpression();\n if (expression instanceof Identifier) {\n selectField.add(((Identifier)expression).getValue());\n }\n\n }\n }\n return selectField;\n }", "private void appendColumnName() {\n appendColumnNames(joinQueryInputs.columns, true);\n }", "ColumnNames createColumnNames();", "public Set<String> getColumns();", "public ArrayList<String> getTableColumns(String _tName) {\n ArrayList<String> retList = new ArrayList<String>();\n\n try {\n ResultSetMetaData rsmd = getMetaData(executeQuery(\"SELECT * FROM \" + _tName));\n\n for (int i = 1; i <= rsmd.getColumnCount(); i++) {\n retList.add(rsmd.getColumnName(i));\n }\n } catch (SQLException ex) {\n System.out.println(ex);\n }\n\n return retList;\n }", "public Set<String> getRestrictingColumns() {\r\n\t\treturn Collections.unmodifiableSet(this.restrictingColumns.keySet());\r\n\t}", "public List<Column> getQueryDependColumns() {\n return queryDependendCollumns;\n }", "public List<String> getColumns();", "String getColumnName();", "@Override\n public List<ScalarFunctionColumn> getScalarFunctionColumns() {\n return subFilter.getScalarFunctionColumns();\n }", "public List<String> getSelectClauseVarList() ;", "public java.util.List getColumnNamesCalls() {\n\t\treturn Arrays.asList(columnNamesCallsTable);\n\t}", "java.util.List<Column>\n getColumnsList();", "String getMetadataSelectClause();", "@Override\r\n\tpublic Collection selectKeyColumnsWithWhere(String columnNames, String where, Connection con) {\n\t\treturn null;\r\n\t}", "public String[] getReferencedColumnNames();", "private static ArrayList getColumns (Connection c, String t)\n\t\tthrows Exception\n\t{\n\t\tStatement s = c.createStatement();\n\t\tResultSet r = s.executeQuery(\"show columns from `\" + t + \"`\");\n\t\tArrayList result = new ArrayList();\n\t\twhile (r.next()) {\n\t\t\tColumnInfo info = new ColumnInfo();\n\t\t\tinfo.name = r.getString(1);\n\t\t\tinfo.type = r.getString(2);\n\t\t\tinfo.nullok = r.getString(3);\n\t\t\tinfo.key = r.getString(4);\n\t\t\tinfo.defaultval = r.getString(5);\n\t\t\tinfo.extra = r.getString(6);\n\t\t\tresult.add(info);\n\t\t}\n\t\ts.close();\n\t\tCollections.sort(result);\n\t\treturn result;\n\t}", "public List<Column> getColumns();", "@Override\r\n\tpublic String[] getCol(String[] sql) {\n\t\treturn null;\r\n\t}", "ColumnInfoFilter getColumnInfoFilter();", "public SystemColumn[] buildColumnList()\n throws StandardException\n {\n return new SystemColumn[] {\n SystemColumnImpl.getUUIDColumn(\"UUID\", false),\n SystemColumnImpl.getIdentifierColumn(\"ROLEID\", false),\n SystemColumnImpl.getIdentifierColumn(\"GRANTEE\", false),\n SystemColumnImpl.getIdentifierColumn(\"GRANTOR\", false),\n SystemColumnImpl.getIndicatorColumn(\"WITHADMINOPTION\"),\n SystemColumnImpl.getIndicatorColumn(\"ISDEF\"),\n };\n }", "public SystemColumn[] buildColumnList() {\n \n return new SystemColumn[] {\n SystemColumnImpl.getUUIDColumn(\"TIMING_ID\", false),\n SystemColumnImpl.getColumn(\"CONSTRUCTOR_TIME\", Types.BIGINT, true),\n SystemColumnImpl.getColumn(\"OPEN_TIME\", Types.BIGINT, true),\n SystemColumnImpl.getColumn(\"NEXT_TIME\", Types.BIGINT, true),\n SystemColumnImpl.getColumn(\"CLOSE_TIME\", Types.BIGINT, true),\n SystemColumnImpl.getColumn(\"EXECUTE_TIME\", Types.BIGINT, true),\n SystemColumnImpl.getColumn(\"AVG_NEXT_TIME_PER_ROW\", Types.BIGINT, true),\n SystemColumnImpl.getColumn(\"PROJECTION_TIME\", Types.BIGINT, true),\n SystemColumnImpl.getColumn(\"RESTRICTION_TIME\", Types.BIGINT, true),\n SystemColumnImpl.getColumn(\"TEMP_CONG_CREATE_TIME\", Types.BIGINT, true),\n SystemColumnImpl.getColumn(\"TEMP_CONG_FETCH_TIME\", Types.BIGINT, true),\n };\n }", "public static ListOfString columnNamesAsList(final ResultSet aResultSet) {\r\n if (aResultSet==null) return null;\r\n String cn[]= columnNames(aResultSet);\r\n if (cn==null) return null;\r\n return new ListOfString(cn);\r\n }", "String getWhereClause();", "java.util.List<com.google.devtools.kythe.proto.Filecontext.ContextDependentVersion.Column> \n getColumnList();", "private List<SelectColumn> expandQueryColumns(Map<String, TableDefinition> tableDefs)\n {\n List<SelectColumn> result = new ArrayList<>();\n\n if (queryColumns.size() == 1 && queryColumns.get(0).equals(\"*\"))\n {\n int index = 0;\n // easy case, just process all tables in the order they were specified\n for (Alias alias : tables)\n {\n TableDefinition tdef = tableDefs.get(alias.getNameToUse());\n if (tdef == null) continue;\n for (ColumnIdentifier col : tdef.getColumns())\n {\n SelectColumn c = new SelectColumn(col.getColumnName());\n c.setColumnTable(tdef.getTable().getRawTableName());\n c.setIndexInResult(index++);\n result.add(c);\n }\n }\n return result;\n }\n\n int index = 0;\n for (String col : queryColumns)\n {\n SelectColumn c = new SelectColumn(col);\n\n String tname = c.getColumnTable();\n if (StringUtil.isBlank(tname))\n {\n c.setIndexInResult(index++);\n result.add(c);\n continue;\n }\n\n TableDefinition tdef = tableDefs.get(c.getColumnTable());\n if (tdef != null)\n {\n if (c.getObjectName().equals(\"*\"))\n {\n for (ColumnIdentifier cid : tdef.getColumns())\n {\n SelectColumn sc = new SelectColumn(cid.getColumnName());\n sc.setColumnTable(tdef.getTable().getRawTableName());\n sc.setIndexInResult(index++);\n result.add(sc);\n }\n }\n else\n {\n c.setColumnTable(tname);\n c.setIndexInResult(index++);\n result.add(c);\n }\n }\n }\n return result;\n }", "com.google.protobuf.ByteString\n getWhereClauseBytes();", "@Override\n public boolean getIncludesAllColumns() {\n return includesAllColumns_;\n }", "List<String> headerColumns();", "public java.lang.String[] getColumns() {\n return columns;\n }", "public String getColumnName();", "java.lang.String getColumn();", "com.google.protobuf.ByteString getColumnBytes();", "public List<String> getColumnsNames() {\n return columnsNames;\n }", "private String[] getTableFields(String pTableName) {\r\n\t\tString[] returnedValue = null;\r\n\t\t\r\n\t\tif (getDatabse() != null && getDatabse().isOpen()) {\r\n\t\t\t\r\n\t\t\tCursor cursor = getDatabse().query(pTableName, null, null, null, null, null, null);\r\n\t\t\tif (cursor != null) {\r\n\t\t\t\treturnedValue = cursor.getColumnNames();\r\n\t\t\t}\r\n\t\t\tcursor.close();\r\n\t\t\tcursor = null;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn returnedValue;\r\n\t}", "public String[] getColumnNames(T1 ob) {\n\t\tjava.lang.reflect.Field[] f1=ob.getClass().getDeclaredFields(); \r\n\t\tString[] s =new String[f1.length-1];\t\r\n\t\t//JOptionPane.showMessageDialog(null,f1.length); \r\n\t\tfor(int i=0;i<f1.length-1;i++)\r\n\t\t{\r\n\t\t\t String name = f1[i].getName(); //获取属性的名字\r\n\t\t\t String type = f1[i].getGenericType().toString(); //获取属性的类型\r\n\t if(type.equals(\"class java.lang.String\")){ //如果type是类类型,则前面包含\"class \",后面跟类名\r\n\t\t name=name.substring(0, 1).toUpperCase()+name.substring(1);\r\n\t\t //JOptionPane.showMessageDialog(null,name);\r\n\t\t Method m = null;\r\n\t\t\ttry {\r\n\t\t\t\tm = ob.getClass().getMethod(\"get\"+name);\r\n\t\t\t} catch (SecurityException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t} catch (NoSuchMethodException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t String value = null;\r\n\t\t\ttry {\r\n\t\t\t\tvalue = (String) m.invoke(ob);\r\n\t\t\t} catch (IllegalArgumentException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t} catch (IllegalAccessException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t} catch (InvocationTargetException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t} //调用getter方法获取属性值\r\n\t if(value != null){\t \r\n\t s[i]=value;\r\n\t\t\t\t //JOptionPane.showMessageDialog(null,value);\r\n\t }\r\n\t\t\t\t\r\n\t\t\t}\t\r\n\t\t }\r\n\t\t//JOptionPane.showMessageDialog(null,s.size());\r\n\t return s;\r\n\t\t\r\n }", "@Override\n public boolean getIncludesAllColumns() {\n return includesAllColumns_;\n }", "public ResultSet getColumns(String table)\n\t{\n\t\tDatabaseMetaData metadata = null;\n\t\tResultSet rs = null;\n\t\ttry\n\t\t{\n\t\t\tConnection conn = source.conn;\n\t\t\tmetadata = conn.getMetaData();\n\t\t\trs = metadata.getColumns(null, sourceSchema, table, \"%\");\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{\n\t\t\tLog.error(\"Errore SQL generico: \" + e.getMessage());\n\t\t}\n\t\treturn rs;\n\t}", "private boolean checkColNameSet() {\n return (null != colNames && colNames.size() > 0);\n }", "public boolean isSetColumn_names() {\n return this.column_names != null;\n }", "private void runSomeColumns( TableMeta tmeta ) {\n if ( ! checkHasColumns( tmeta ) ) {\n return;\n }\n\n /* Assemble column specifiers for the query. */\n String talias = tmeta.getName().substring( 0, 1 );\n List<ColSpec> clist = new ArrayList<ColSpec>();\n int ncol = tmeta.getColumns().length;\n int step = Math.max( 1, ncol / 11 );\n int ix = 0;\n for ( int icol = ncol - 1; icol >= 0; icol -= step ) {\n ColSpec cspec = new ColSpec( tmeta.getColumns()[ icol ] );\n if ( ix % 2 == 1 ) {\n cspec.setRename( \"taplint_c_\" + ( ix + 1 ) );\n }\n if ( ix % 3 == 2 ) {\n cspec.setQuoted( true );\n }\n if ( ix % 5 == 3 ) {\n cspec.setTableAlias( talias );\n }\n clist.add( cspec );\n ix++;\n }\n ColSpec[] cspecs = clist.toArray( new ColSpec[ 0 ] );\n\n /* Assemble the ADQL text. */\n int nr = 8;\n StringBuffer abuf = new StringBuffer();\n abuf.append( \"SELECT \" )\n .append( \"TOP \" )\n .append( nr )\n .append( \" \" );\n for ( Iterator<ColSpec> colIt = clist.iterator();\n colIt.hasNext(); ) {\n ColSpec col = colIt.next();\n abuf.append( col.getQueryText() );\n if ( colIt.hasNext() ) {\n abuf.append( \",\" );\n }\n abuf.append( \" \" );\n }\n abuf.append( \" FROM \" )\n .append( tmeta.getName() )\n .append( \" AS \" )\n .append( talias );\n String adql = abuf.toString();\n\n /* Run the query. */\n runCheckedQuery( adql, -1, cspecs, nr );\n }", "public static String[] detailsColumnProjection() {\n\n\t\treturn new String[]{KEY_ID, KEY_ADDRESS, KEY_NAME, KEY_VOLUME};\n\t}", "String getMetadataWhereClause();", "@Override\n\tpublic String getColumnName(int column) {\n\t\tswitch (column) {\n\t\tcase 0:\n\t\t\treturn \"Expression\";\n\t\tcase 1:\n\t\t\treturn \"Value\";\n\t\t}\n\t\treturn null;\n\t}", "private static String buildSelectColumnList(com.corm.mapping.generated.Class clazz){\n\t\tString table = clazz.getColumnFamily();\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append(\"SELECT \");\n\n\t\tfor(com.corm.mapping.generated.Column Column: clazz.getColumn()){\n\n\t\t\tString column = Column.getName();\n\t\t\tbuilder.append(column+',');\t\t\t\n\t\t}\n\t\tbuilder.trimToSize();\t\t\n\t\tString ret = builder.substring(0,builder.length()-1) + \" FROM \"+ table+\" \";\n\t\tbuilder.setLength(0);\n\t\tbuilder = null;\n\t\treturn ret;\n\n\t}", "java.util.List<com.factset.protobuf.stach.v2.table.ColumnDefinitionProto.ColumnDefinition> \n getColumnsList();", "com.google.protobuf.ByteString\n getSourceColumnNameBytes();", "java.lang.String getSourceColumnName();", "public String getColumnName(int col) { return columnNames[col]; }", "public Set<String> columns() {\n if (columnsDefinedOrder.size() <= 0) {\n columnsDefinedOrder = rows.stream()\n .findFirst()\n .map(x -> new ArrayList<>(x.keySet()))\n .orElse(columnsDefinedOrder);\n }\n\n return new LinkedHashSet<>(columnsDefinedOrder);\n }", "public final Column[] getRawColumns() { return columns; }", "private static TextColumnBuilder getColumnByNameField(String nameField){ \n return drColumns.get(nameField);\n }", "private static String createColumns(Collection<String> tagNames) {\n StringBuilder s = new StringBuilder();\n for (String tagName : tagNames){\n s.append(tagName).append(\" BOOLEAN, \");\n }\n return s.toString().substring(0, s.length() - 2); // remove trailing \", \"\n }", "public static String buildSelectAllSql(Object object, FlyingModel flyingModel)\r\n\t\t\tthrows IllegalAccessException, InvocationTargetException, NoSuchMethodException {\r\n\t\tif (null == object) {\r\n\t\t\tthrow new BuildSqlException(BuildSqlExceptionEnum.nullObject);\r\n\t\t}\r\n\t\tString ignoreTag = flyingModel.getIgnoreTag();\r\n\t\tStringBuffer selectSql = new StringBuffer(SELECT_);\r\n\t\tStringBuffer fromSql = new StringBuffer(FROM);\r\n\t\tStringBuffer whereSql = new StringBuffer(WHERE_);\r\n\t\tAtomicInteger ai = new AtomicInteger(0);\r\n\t\tdealMapperAnnotationIterationForSelectAll(object, selectSql, fromSql, whereSql, null, null, null, ai, null,\r\n\t\t\t\tignoreTag);\r\n\r\n\t\tif (selectSql.indexOf(COMMA) > -1) {\r\n\t\t\tselectSql.delete(selectSql.lastIndexOf(COMMA), selectSql.lastIndexOf(COMMA) + 1);\r\n\t\t}\r\n\t\tif (WHERE_.equals(whereSql.toString())) {\r\n\t\t\twhereSql = new StringBuffer();\r\n\t\t} else if (whereSql.indexOf(AND) > -1) {\r\n\t\t\twhereSql.delete(whereSql.lastIndexOf(AND), whereSql.lastIndexOf(AND) + 3);\r\n\t\t}\r\n\t\treturn selectSql.append(fromSql).append(whereSql).toString();\r\n\t}", "private String ColumnDefinition(SimpleNode treeRoot) {\n String statement;\n SimpleNode node;\n String nodeType;\n\n String columnName = \"\";\n String columnType = \"\";\n String columnParams = \"\";\n\n for (int i = 0; i < treeRoot.jjtGetNumChildren(); i++) {\n node = ((SimpleNode) treeRoot.jjtGetChild(i));\n nodeType = node.toString();\n if (\"ColumnName\".equals(nodeType)) {\n columnName = node.jjtGetFirstToken().image;\n } else if (\"ColumnDataType\".equals(nodeType)) {\n // check if column is surrogate and if it is, add it to table surrogate columns\n if (node.jjtGetChild(0).toString().equals(\"SurrogateDataType\")) {\n columnType = Settings.SurrogateColumnType;\n _tableInfo.addSurrogate(columnName, 1); // first value will be 1\n } else {\n /*\n\t\t\t\t\t * Data type can consist of more than one token.\n\t\t\t\t\t * Example: NUMBER(6)\n */\n columnType = SimpleNodeCompatibility.getSourceString(node);\n }\n } else if (\"PrimaryKeyInlineConstraint\".equals(nodeType)) {\n // add column to primary key list\n _keys.add(columnName);\n } else {\n /*\n\t\t\t\t * Parameter can consist of more than one token.\n\t\t\t\t * Example: NOT NULL\n */\n columnParams = SimpleNodeCompatibility.getSourceString(node);\n }\n }\n\n statement = columnName + \" \" + columnType + \" \" + columnParams;\n\n return statement;\n }" ]
[ "0.69952714", "0.6676717", "0.64928573", "0.6384534", "0.6260012", "0.6155855", "0.6077666", "0.59735554", "0.5922623", "0.5922222", "0.58110774", "0.58086354", "0.579362", "0.57632095", "0.5751167", "0.5720024", "0.5687214", "0.5645436", "0.56439984", "0.5568238", "0.5555652", "0.5538143", "0.5529796", "0.55245966", "0.5522121", "0.54899627", "0.5489828", "0.5486699", "0.54762584", "0.5466845", "0.5458679", "0.54439867", "0.5439714", "0.5430275", "0.5426354", "0.5423631", "0.5403079", "0.5392557", "0.539203", "0.539043", "0.5383966", "0.5379847", "0.5367687", "0.5364733", "0.5352644", "0.53332615", "0.5325251", "0.53243834", "0.53211284", "0.5304496", "0.52992845", "0.5291328", "0.52841955", "0.52771753", "0.52740335", "0.5267243", "0.52434283", "0.5226979", "0.5193485", "0.51749104", "0.51694703", "0.5160437", "0.5147513", "0.51355743", "0.51355255", "0.5121317", "0.5114108", "0.5111716", "0.50984526", "0.5089467", "0.5064236", "0.5063801", "0.5057773", "0.505745", "0.5053681", "0.50471437", "0.5046363", "0.50451314", "0.50438064", "0.50397915", "0.50384164", "0.50303847", "0.5029245", "0.5022606", "0.5021329", "0.50068504", "0.5006734", "0.49763912", "0.4975378", "0.4963948", "0.49623135", "0.49613342", "0.49444354", "0.4935366", "0.49306008", "0.49248096", "0.49235317", "0.49136412", "0.490762", "0.49058032", "0.4905519" ]
0.0
-1
Get the tables from the two operands of the condition.
public Tables getTables(){ Tables result=null; Table t1=(column1==null || column1.getTableName()==null)?(null):new Table(column1.getTableName()); Table t2=(column2==null || column2.getTableName()==null)?(null):new Table(column2.getTableName()); if (t1!=null) { result=new Tables(t1); result.add(t2); } else if(t2!=null){ result=new Tables(t2); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Table condSelect(String name, String[] columns, String[] tablesList, String[] conds) {\n Table t1;\n Table t2;\n tablesList = new LinkedHashSet<String>(Arrays.asList(tablesList)).toArray(new String[0]);\n\n //Parse Comparison and Arithmetic Operations\n LinkedList<LinkedList> compOp = p.compOp(conds);\n LinkedList<LinkedList> arithOp = p.arithOp(columns);\n\n //Check if Comparison operation exist in the statement -- if null should return ERROR\n if (compOp == null) {\n return null;\n }\n //Unwrap Comparison information\n LinkedList<String> rhsComp = compOp.get(0);\n LinkedList<String> lhsComp = compOp.get(1);\n LinkedList<String> operationComp = compOp.get(2);\n //Check if arithemtic operations exist in the statement\n if (arithOp != null) {\n LinkedList<String> columnsToKeep = p.realCols(columns);\n LinkedList<String> colNames = arithOp.get(0);\n LinkedList<String> lhs = arithOp.get(1);\n LinkedList<String> rhs = arithOp.get(2);\n LinkedList<String> operators = arithOp.get(3);\n\n // creates a new table from all columns - before running operators\n t1 = tables.get(tablesList[0]);\n t1 = selectColumns(name, tablesList[0], t1.getColNames());\n\n for (int i = 1; i < tablesList.length; i++) {\n t2 = tables.get(tablesList[i]);\n t2 = selectColumns(name, tablesList[i], t2.getColNames());\n t1 = joinTwoTables(name, t1, t2);\n tables.put(t1.getName(), t1);\n }\n /**run over the arithOp Columns that needs to be handeled\n * - t1 is the new combined table! And inserts the new column.*/\n for (int i = 0; i < operators.size(); i += 1) {\n t1.insertNewColumn(t1.arithmaticOperator(colNames.get(i),\n lhs.get(i), rhs.get(i), operators.get(i)));\n }\n t1.removeColumn(columnsToKeep);\n for (int i = 0; i < operationComp.size(); i++) {\n\n t1.comparisonOperation(lhsComp.get(i), rhsComp.get(i), operationComp.get(i));\n }\n return t1;\n }\n if (columns[0].equals(\"*\")) {\n t1 = tables.get(tablesList[0]);\n t1 = selectColumns(name, tablesList[0], t1.getColNames());\n\n for (int i = 1; i < tablesList.length; i++) {\n t2 = tables.get(tablesList[i]);\n t2 = selectColumns(name, tablesList[i], t2.getColNames());\n t1 = joinTwoTables(name, t1, t2);\n tables.put(t1.getName(), t1);\n }\n for (int i = 0; i < operationComp.size(); i++) {\n t1.comparisonOperation(lhsComp.get(i), rhsComp.get(i), operationComp.get(i));\n }\n return t1;\n //Check similar and distinct column names of tables\n } else {\n t1 = tables.get(tablesList[0]);\n t1 = selectColumns(\"temp\", tablesList[0], t1.getColNames());\n\n\n for (int i = 1; i < tablesList.length; i++) {\n t2 = tables.get(tablesList[i]);\n t2 = selectColumns(\"temp\", tablesList[i], t2.getColNames());\n t1 = joinTwoTables(\"temp\", t1, t2);\n tables.put(t1.getName(), t1);\n }\n for (int i = 0; i < operationComp.size(); i++) {\n t1.comparisonOperation(lhsComp.get(i), rhsComp.get(i), operationComp.get(i));\n }\n return selectColumns(name, t1.getName(), columns);\n }\n }", "public static ArrayList<String> evaluateJoinCondition (Table table1,Table table2,Expression expression)\n\t{\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\n\t\tHashSet<String> set = extractCond(expression);\n\t\t\n\t\tfor(String s: set)\n\t\t{\n\t\t\tString[] strArr=null;\n\t\t\tif(s.contains(\"=\"))\n\t\t\t{\n\t\t\t\tstrArr=s.split(\"=\");\n\t\t\t\tfor (int i = 0; i < strArr.length; i++) {\n\t\t\t\t\tstrArr[i] = strArr[i].trim();\n\t\t\t\t}\n\t\t\t\tif(!table1.tableName.contains(\"|\"))\n\t\t\t\t{\n\n\t\t\t\t\tif ((strArr[0].split(\"\\\\.\")[0].equalsIgnoreCase(table1.tableName) || strArr[0].split(\"\\\\.\")[0].equalsIgnoreCase(table2.tableName)) &&\n\t\t\t\t\t\t\t(strArr[1].split(\"\\\\.\")[0].equalsIgnoreCase(table1.tableName) || strArr[1].split(\"\\\\.\")[0].equalsIgnoreCase(table2.tableName))){\n\n\t\t\t\t\t\tString FirsttableName=table1.tableName;\n\t\t\t\t\t\tString secondtableName=table2.tableName;\n\t\t\t\t\t\tString attr=strArr[0].substring(strArr[0].indexOf(\".\")+1,strArr[0].length());\n\t\t\t\t\t\tarrayList.add(FirsttableName);\n\t\t\t\t\t\tarrayList.add(secondtableName);\n\t\t\t\t\t\tarrayList.add(attr);\n\t\t\t\t\t\treturn arrayList;\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tString[] newTableName=table1.tableName.trim().split(\"\\\\|\");\n\t\t\t\t\tfor(int i=0;i<newTableName.length;i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif((strArr[0].split(\"\\\\.\")[0].equalsIgnoreCase(newTableName[i])&&strArr[1].split(\"\\\\.\")[0].equalsIgnoreCase(table2.tableName))||\n\t\t\t\t\t\t\t\t(strArr[1].split(\"\\\\.\")[0].equalsIgnoreCase(newTableName[i])&&strArr[0].split(\"\\\\.\")[0].equalsIgnoreCase(table2.tableName)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString FirsttableName=newTableName[i];\n\t\t\t\t\t\t\tString secondtableName=table2.tableName;\n\t\t\t\t\t\t\tString attr=strArr[0].substring(strArr[0].indexOf(\".\")+1,strArr[0].length());\n\t\t\t\t\t\t\tarrayList.add(FirsttableName);\n\t\t\t\t\t\t\tarrayList.add(secondtableName);\n\t\t\t\t\t\t\tarrayList.add(attr);\n\t\t\t\t\t\t\treturn arrayList;\n\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\n\t\t}\n\n\t\treturn arrayList;\n\t}", "void setInConditionsAsTables() {\n\n for (int i = rangeVariables.length - 1; i >= 0; i--) {\n RangeVariable rangeVar = rangeVariables[i];\n Expression in = inExpressions[i];\n\n if (in != null) {\n Index index = rangeVar.rangeTable.getIndexForColumn(\n in.getLeftNode().nodes[0].getColumnIndex());\n RangeVariable newRangeVar =\n new RangeVariable(in.getRightNode().subQuery.getTable(),\n null, null, null, compileContext);\n RangeVariable[] newList =\n new RangeVariable[rangeVariables.length + 1];\n\n ArrayUtil.copyAdjustArray(rangeVariables, newList,\n newRangeVar, i, 1);\n\n rangeVariables = newList;\n\n // make two columns as arg\n ColumnSchema left = rangeVar.rangeTable.getColumn(\n in.getLeftNode().nodes[0].getColumnIndex());\n ColumnSchema right = newRangeVar.rangeTable.getColumn(0);\n Expression e = new ExpressionLogical(rangeVar, left,\n newRangeVar, right);\n\n rangeVar.addIndexCondition(e, index, flags[i]);\n\n rangeVar.addCondition(in, true);\n }\n }\n }", "protected List<LogicalTable> getTablesInvolved( LogicalModel model, List<Selection> selections,\n List<Constraint> conditions, List<Order> orderBy, Map<Constraint, SqlOpenFormula> constraintFormulaMap,\n Map<String, Object> parameters, boolean genAsPreparedStatement, DatabaseMeta databaseMeta, String locale,\n Constraint securityConstraint ) {\n Set<LogicalTable> treeSet = new TreeSet<LogicalTable>();\n\n // Figure out which tables are involved in the SELECT\n //\n for ( Selection selection : selections ) {\n // We need to figure out which tables are involved in the formula.\n // This could simply be the parent table, but it could also be another one too.\n //\n // If we want to know all the tables involved in the query, we need to parse all the formula first\n // TODO: We re-use the static method below, maybe there is a better way to clean this up a bit.\n //\n\n SqlAndTables sqlAndTables =\n getBusinessColumnSQL( model, selection, null, parameters, genAsPreparedStatement, databaseMeta, locale );\n\n // Add the involved tables to the list...\n //\n for ( LogicalTable businessTable : sqlAndTables.getUsedTables() ) {\n treeSet.add( businessTable );\n }\n }\n\n // Figure out which tables are involved in the WHERE\n //\n for ( Constraint condition : conditions ) {\n SqlOpenFormula formula = constraintFormulaMap.get( condition );\n List<Selection> cols = formula.getSelections();\n for ( Selection selection : cols ) {\n LogicalTable businessTable = selection.getLogicalColumn().getLogicalTable();\n treeSet.add( businessTable );\n }\n }\n\n // Figure out which tables are involved in the ORDER BY\n //\n for ( Order order : orderBy ) {\n SqlAndTables sqlAndTables =\n getBusinessColumnSQL( model, order.getSelection(), null, parameters, genAsPreparedStatement, databaseMeta,\n locale );\n\n // Add the involved tables to the list...\n //\n for ( LogicalTable businessTable : sqlAndTables.getUsedTables() ) {\n treeSet.add( businessTable );\n }\n }\n\n // find any tables listed in the security constraint\n\n if ( securityConstraint != null ) {\n SqlOpenFormula formula = constraintFormulaMap.get( securityConstraint );\n\n List<Selection> cols = formula.getSelections();\n for ( Selection selection : cols ) {\n treeSet.add( selection.getLogicalColumn().getLogicalTable() );\n }\n }\n\n return new ArrayList<LogicalTable>( treeSet );\n }", "public ArrayList getAllTables(TableSelectExpression selExp) {\r\n\t\tArrayList sourceTableList = new ArrayList();\r\n\r\n\t\t// from clause in select statement\r\n\t\tFromClause fromclause = selExp.from_clause;\r\n\t\tArrayList def_list = fromclause.def_list;\r\n\t\tfor (int i = 0; i < def_list.size(); i++) {\r\n\t\t\tFromTableDef table_def = (FromTableDef) def_list.get(i);\r\n\t\t\tString tableName = table_def.getName();\r\n\t\t\t// if the table is a subquery table\r\n\t\t\tif (table_def.isSubQueryTable()) {\r\n\t\t\t\tTableSelectExpression sub_query = table_def.getTableSelectExpression();\r\n\t\t\t\tArrayList tablesInSubQuery = getAllTables(sub_query);\r\n\t\t\t\tfor (int j = 0; j < tablesInSubQuery.size(); j++) {\r\n\t\t\t\t\tsourceTableList.add(tablesInSubQuery.get(j));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tsourceTableList.add(tableName);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// where clause in select statement\r\n\t\tSearchExpression where = (SearchExpression) selExp.where_clause;\r\n\t\tExpression whereExp = where.getFromExpression();\r\n\t\tif (whereExp != null) {\r\n\t\t\tfor (int i = 0; i < whereExp.allElements().size(); i++) {\r\n\t\t\t\tObject element = whereExp.allElements().get(i);\r\n\t\t\t\t// if existing sub query in where clause\r\n\t\t\t\tif (element.getClass().getName().equals(\"com.teradata.sqlparser.interpret.TableSelectExpression\")) {\r\n\t\t\t\t\tTableSelectExpression tablesel = (TableSelectExpression) element;\r\n\t\t\t\t\tArrayList tablesInWhere = getAllTables(tablesel);\r\n\t\t\t\t\tfor (int j = 0; j < tablesInWhere.size(); j++) {\r\n\t\t\t\t\t\tsourceTableList.add(tablesInWhere.get(j));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// 处理union语句\r\n\t\twhile (selExp.composite_function != -1) {\r\n\t\t\tselExp = selExp.next_composite;\r\n\t\t\tArrayList tablesInUnion = getAllTables(selExp);\r\n\t\t\tfor (int j = 0; j < tablesInUnion.size(); j++) {\r\n\t\t\t\tsourceTableList.add(tablesInUnion.get(j));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sourceTableList;\r\n\t}", "Table regularSelect(String name, String[] columns, String[] tablesList) {\n Table t1;\n Table t2;\n tablesList = new LinkedHashSet<String>(Arrays.asList(tablesList)).toArray(new String[0]);\n\n //Parse Arithmetic Op\n LinkedList<LinkedList> arithOp = p.arithOp(columns);\n\n // creates a new table from all columns - before running operators\n if (arithOp != null) {\n //get real column names, operated columns, and operation\n LinkedList<String> columnsToKeep = p.realCols(columns);\n LinkedList<String> colNames = arithOp.get(0);\n LinkedList<String> lhs = arithOp.get(1);\n LinkedList<String> rhs = arithOp.get(2);\n LinkedList<String> operators = arithOp.get(3);\n\n t1 = tables.get(tablesList[0]);\n t1 = selectColumns(name, tablesList[0], t1.getColNames());\n\n for (int i = 1; i < tablesList.length; i++) {\n t2 = tables.get(tablesList[i]);\n t2 = selectColumns(name, tablesList[i], t2.getColNames());\n t1 = joinTwoTables(name, t1, t2);\n tables.put(t1.getName(), t1);\n\n }\n\n /**run over the arithOp Columns that needs to be handeled\n * - t1 is the new combined table! And inserts the new column.*/\n for (int i = 0; i < operators.size(); i += 1) {\n t1.insertNewColumn(t1.arithmaticOperator(colNames.get(i),\n lhs.get(i), rhs.get(i), operators.get(i)));\n }\n t1.removeColumn(columnsToKeep);\n return t1;\n }\n\n if (columns[0].equals(\"*\")) {\n t1 = tables.get(tablesList[0]);\n t1 = selectColumns(name, tablesList[0], t1.getColNames());\n\n for (int i = 1; i < tablesList.length; i++) {\n t2 = tables.get(tablesList[i]);\n t2 = selectColumns(name, tablesList[i], t2.getColNames());\n t1 = joinTwoTables(name, t1, t2);\n tables.put(t1.getName(), t1);\n }\n\n return t1;\n // Check similar and distinct column names of tables\n } else {\n t1 = tables.get(tablesList[0]);\n t1 = selectColumns(name, tablesList[0], columns);\n for (int i = 1; i < tablesList.length; i++) {\n t2 = tables.get(tablesList[i]);\n t2 = selectColumns(name, tablesList[i], columns);\n t1 = joinTwoTables(name, t1, t2);\n tables.put(t1.getName(), t1);\n }\n\n return t1;\n }\n\n }", "@Test\n public void operator_table() {\n OutputNode output = new OutputNode(\"testing\", typeOf(Result.class), typeOf(String.class));\n OperatorNode operator = new OperatorNode(\n classOf(SimpleOp.class), typeOf(Result.class), typeOf(String.class),\n output, new DataTableNode(\"t\", typeOf(DataTable.class), typeOf(String.class)));\n InputNode root = new InputNode(operator);\n MockContext context = new MockContext();\n context.put(\"t\", new BasicDataTable.Builder<>().build());\n testing(root, context, op -> {\n op.process(\"Hello, world!\");\n });\n assertThat(context.get(\"testing\"), contains(\"Hello, world!TABLE\"));\n }", "Object getTables();", "private String getRightTableName(Condition condition) {\n if (condition != null && condition.tableName != null) {\n return condition.tableName;\n }\n return null;\n }", "private void calcTableList() throws SQLException {\n tableList = new TableList(session);\n SQLTokenizer[] tzs = tableListTokens.parse(SQLTokenizer.COMMA);\n for(int i = 0; tzs != null && i < tzs.length; i++) {\n if(tzs[i].countTokens() == 0) throw new SQLException(\"Syntax error\");\n String correlation = null;\n String table = tzs[i].getToken(0);\n int n = 1;\n if(tzs[i].getType(1) == Keyword.AS) {\n n++;\n }\n correlation = tzs[i].getToken(n);\n tableList.addTable(table, correlation);\n }\n }", "public static final int[] get_AND(){\n\t\t\n\t\tint[] table = new int[16*16];\n\t\t\n\t\t//\ttable[(T_undefined<<4)+T_undefined] \t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_byte] \t\t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_long] \t\t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_short] \t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_void] \t\t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_String] \t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_Object] \t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_double] \t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_float] \t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_boolean] \t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_char] \t\t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_int] \t\t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_null] \t\t\t= T_undefined;\n\t\t\n\t\t//\ttable[(T_byte<<4)+T_undefined] \t= T_undefined;\n\t\ttable[(T_byte<<4)+T_byte] \t\t= (Byte2Int<<12) +(Byte2Int<<4) +T_int;\n\t\ttable[(T_byte<<4)+T_long]\t\t= (Byte2Long<<12)+(Long2Long<<4)+T_long;\n\t\ttable[(T_byte<<4)+T_short] \t\t= (Byte2Int<<12) +(Short2Int<<4)+T_int;\n\t\t//\ttable[(T_byte<<4)+T_void] \t\t= T_undefined;\n\t\t//\ttable[(T_byte<<4)+T_String] \t= T_undefined;\n\t\t//\ttable[(T_byte<<4)+T_Object] \t= T_undefined;\n\t\t//\ttable[(T_byte<<4)+T_double] \t= T_undefined;\n\t\t//\ttable[(T_byte<<4)+T_float] \t\t= T_undefined;\n\t\t//\ttable[(T_byte<<4)+T_boolean] \t= T_undefined;\n\t\ttable[(T_byte<<4)+T_char] \t\t= (Byte2Int<<12) +(Char2Int<<4) +T_int;\n\t\ttable[(T_byte<<4)+T_int] \t\t= (Byte2Int<<12) +(Int2Int<<4) +T_int;\n\t\t//\ttable[(T_byte<<4)+T_null] \t\t= T_undefined;\n\t\t\n\t\t//\ttable[(T_long<<4)+T_undefined] \t= T_undefined;\n\t\ttable[(T_long<<4)+T_byte] \t\t= (Long2Long<<12)+(Byte2Long<<4)+T_long;\n\t\ttable[(T_long<<4)+T_long] \t\t= (Long2Long<<12)+(Long2Long<<4)+T_long;\n\t\ttable[(T_long<<4)+T_short] \t\t= (Long2Long<<12)+(Short2Long<<4)+T_long;\n\t\t//\ttable[(T_long<<4)+T_void] \t\t= T_undefined;\n\t\t//\ttable[(T_long<<4)+T_String] \t= T_undefined;\n\t\t//\ttable[(T_long<<4)+T_Object] \t= T_undefined;\n\t\t//\ttable[(T_long<<4)+T_double] \t= T_undefined;\n\t\t//\ttable[(T_long<<4)+T_float] \t\t= T_undefined;\n\t\t//\ttable[(T_long<<4)+T_boolean] \t= T_undefined;\n\t\ttable[(T_long<<4)+T_char] \t\t= (Long2Long<<12)+(Char2Long<<4)+T_long;\n\t\ttable[(T_long<<4)+T_int] \t\t= (Long2Long<<12)+(Int2Long<<4)+T_long;\n\t\t//\ttable[(T_long<<4)+T_null] \t\t= T_undefined;\n\t\t\n\t\t//\ttable[(T_short<<4)+T_undefined] \t= T_undefined;\n\t\ttable[(T_short<<4)+T_byte] \t\t\t= (Short2Int<<12)+(Byte2Int<<4)+T_int;\n\t\ttable[(T_short<<4)+T_long] \t\t\t= (Short2Long<<12)+(Long2Long<<4)+T_long;\n\t\ttable[(T_short<<4)+T_short] \t\t= (Short2Int<<12)+(Short2Int<<4)+T_int;\n\t\t//\ttable[(T_short<<4)+T_void] \t\t\t= T_undefined;\n\t\t//\ttable[(T_short<<4)+T_String] \t\t= T_undefined;\n\t\t//\ttable[(T_short<<4)+T_Object] \t\t= T_undefined;\n\t\t//\ttable[(T_short<<4)+T_double] \t\t= T_undefined;\n\t\t//\ttable[(T_short<<4)+T_float] \t\t= T_undefined;\n\t\t//\ttable[(T_short<<4)+T_boolean] \t\t= T_undefined;\n\t\ttable[(T_short<<4)+T_char] \t\t\t= (Short2Int<<12)+(Char2Int<<4)+T_int;\n\t\ttable[(T_short<<4)+T_int] \t\t\t= (Short2Int<<12)+(Int2Int<<4)+T_int;\n\t\t//\ttable[(T_short<<4)+T_null] \t\t\t= T_undefined;\n\t\t\n\t\t//\ttable[(T_void<<4)+T_undefined] \t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_byte] \t\t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_long] \t\t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_short] \t\t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_void] \t\t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_String] \t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_Object] \t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_double] \t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_float] \t\t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_boolean] \t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_char] \t\t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_int] \t\t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_null] \t\t= T_undefined;\n\t\t\n\t\t//\ttable[(T_String<<4)+T_undefined] \t= T_undefined;\n\t\t//\ttable[(T_String<<4)+T_byte] \t\t= T_undefined;\n\t\t//\ttable[(T_String<<4)+T_long] \t\t= T_undefined;\n\t\t//\ttable[(T_String<<4)+T_short] \t\t= T_undefined;\n\t\t//\ttable[(T_String<<4)+T_void] \t\t= T_undefined;\n\t\t//\ttable[(T_String<<4)+T_String] \t\t= T_undefined;\n\t\t//\ttable[(T_String<<4)+T_Object] \t\t= T_undefined;\n\t\t//\ttable[(T_String<<4)+T_double] \t\t= T_undefined;\n\t\t//\ttable[(T_String<<4)+T_float] \t\t= T_undefined;\n\t\t//\ttable[(T_String<<4)+T_boolean] \t\t= T_undefined;\n\t\t//\ttable[(T_String<<4)+T_char] \t\t= T_undefined;\n\t\t//\ttable[(T_String<<4)+T_int] \t\t\t= T_undefined;\n\t\t//\ttable[(T_String<<4)+T_null] \t\t= T_undefined;\n\t\t\n\t\t//\ttable[(T_Object<<4)+T_undefined] \t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_byte] \t\t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_long] \t\t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_short]\t\t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_void] \t\t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_String] \t\t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_Object] \t\t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_double] \t\t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_float] \t\t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_boolean]\t\t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_char] \t\t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_int] \t\t\t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_null] \t\t= T_undefined;\n\t\t\n\t\t//\ttable[(T_double<<4)+T_undefined] \t= T_undefined;\n\t\t//\ttable[(T_double<<4)+T_byte] \t\t= T_undefined;\n\t\t//\ttable[(T_double<<4)+T_long] \t\t= T_undefined;\n\t\t//\ttable[(T_double<<4)+T_short] \t\t= T_undefined;\n\t\t//\ttable[(T_double<<4)+T_void] \t\t= T_undefined;\n\t\t//\ttable[(T_double<<4)+T_String] \t\t= T_undefined;\n\t\t//\ttable[(T_double<<4)+T_Object] \t\t= T_undefined;\n\t\t//\ttable[(T_double<<4)+T_double] \t\t= T_undefined;\n\t\t//\ttable[(T_double<<4)+T_float] \t\t= T_undefined;\n\t\t//\ttable[(T_double<<4)+T_boolean] \t\t= T_undefined;\n\t\t//\ttable[(T_double<<4)+T_char] \t\t= T_undefined;\n\t\t//\ttable[(T_double<<4)+T_int] \t\t\t= T_undefined;\n\t\t//\ttable[(T_double<<4)+T_null] \t\t= T_undefined;\n\t\t\n\t\t//\ttable[(T_float<<4)+T_undefined] \t= T_undefined;\n\t\t//\ttable[(T_float<<4)+T_byte] \t\t\t= T_undefined;\n\t\t//\ttable[(T_float<<4)+T_long] \t\t\t= T_undefined;\n\t\t//\ttable[(T_float<<4)+T_short] \t\t= T_undefined;\n\t\t//\ttable[(T_float<<4)+T_void] \t\t\t= T_undefined;\n\t\t//\ttable[(T_float<<4)+T_String] \t\t= T_undefined;\n\t\t//\ttable[(T_float<<4)+T_Object] \t\t= T_undefined;\n\t\t//\ttable[(T_float<<4)+T_double] \t\t= T_undefined;\n\t\t//\ttable[(T_float<<4)+T_float] \t\t= T_undefined;\n\t\t//\ttable[(T_float<<4)+T_boolean] \t\t= T_undefined;\n\t\t//\ttable[(T_float<<4)+T_char] \t\t\t= T_undefined;\n\t\t//\ttable[(T_float<<4)+T_int] \t\t\t= T_undefined;\n\t\t//\ttable[(T_float<<4)+T_null] \t\t\t= T_undefined;\n\t\t\n\t\t//\ttable[(T_boolean<<4)+T_undefined] \t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_byte] \t\t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_long] \t\t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_short] \t\t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_void] \t\t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_String] \t\t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_Object] \t\t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_double] \t\t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_float] \t\t\t= T_undefined;\n\t\ttable[(T_boolean<<4)+T_boolean] \t\t= (Boolean2Boolean << 12)+(Boolean2Boolean << 4)+T_boolean;\n\t\t//\ttable[(T_boolean<<4)+T_char] \t\t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_int] \t\t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_null] \t\t\t= T_undefined;\n\t\t\t\n\t\t//\ttable[(T_char<<4)+T_undefined] \t\t= T_undefined;\n\t\ttable[(T_char<<4)+T_byte] \t\t\t= (Char2Int<<12)+(Byte2Int<<4)+T_int;\n\t\ttable[(T_char<<4)+T_long] \t\t\t= (Char2Long<<12)+(Long2Long<<4)+T_long;\n\t\ttable[(T_char<<4)+T_short] \t\t\t= (Char2Int<<12)+(Short2Int<<4)+T_int;\n\t\t//\ttable[(T_char<<4)+T_void] \t\t\t= T_undefined;\n\t\t//\ttable[(T_char<<4)+T_String] \t\t= T_undefined;\n\t\t//\ttable[(T_char<<4)+T_Object] \t\t= T_undefined;\n\t\t//\ttable[(T_char<<4)+T_double] \t\t= T_undefined;\n\t\t//\ttable[(T_char<<4)+T_float] \t\t\t= T_undefined;\n\t\t//\ttable[(T_char<<4)+T_boolean] \t\t= T_undefined;\n\t\ttable[(T_char<<4)+T_char] \t\t\t= (Char2Int<<12)+(Char2Int<<4)+T_int;\n\t\ttable[(T_char<<4)+T_int] \t\t\t= (Char2Int<<12)+(Int2Int<<4)+T_int;\n\t\t//\ttable[(T_char<<4)+T_null] \t\t\t= T_undefined;\n\t\t\t\n\t\t//\ttable[(T_int<<4)+T_undefined] \t= T_undefined;\n\t\ttable[(T_int<<4)+T_byte] \t\t= (Int2Int<<12)+(Byte2Int<<4)+T_int;\n\t\ttable[(T_int<<4)+T_long] \t\t= (Int2Long<<12)+(Long2Long<<4)+T_long;\n\t\ttable[(T_int<<4)+T_short] \t\t= (Int2Int<<12)+(Short2Int<<4)+T_int;\n\t\t//\ttable[(T_int<<4)+T_void] \t\t= T_undefined;\n\t\t//\ttable[(T_int<<4)+T_String] \t\t= T_undefined;\n\t\t//\ttable[(T_int<<4)+T_Object] \t\t= T_undefined;\n\t\t//\ttable[(T_int<<4)+T_double] \t\t= T_undefined;\n\t\t//\ttable[(T_int<<4)+T_float] \t\t= T_undefined;\n\t\t//\ttable[(T_int<<4)+T_boolean] \t= T_undefined;\n\t\ttable[(T_int<<4)+T_char] \t\t= (Int2Int<<12)+(Char2Int<<4)+T_int;\n\t\ttable[(T_int<<4)+T_int] \t\t= (Int2Int<<12)+(Int2Int<<4)+T_int;\n\t\t//\ttable[(T_int<<4)+T_null] \t\t= T_undefined;\n\t\t\n\t\t//\ttable[(T_null<<4)+T_undefined] \t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_byte] \t\t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_long] \t\t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_short] \t\t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_void] \t\t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_String] \t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_Object] \t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_double] \t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_float] \t\t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_boolean] \t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_char] \t\t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_int] \t\t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_null] \t\t\t= T_undefined;\n\t\n\t\treturn table;\n\t}", "public static SqlOperatorTable chain(SqlOperatorTable... tables) {\n return chain(ImmutableList.copyOf(tables));\n }", "public abstract String[] createTablesStatementStrings();", "public void testTwoTableSyn() {\n\n String\tsql\t= \"SELECT t.AD_Table_ID, t.TableName, c.AD_Column_ID, c.ColumnName FROM AD_Table as t, AD_Column AS c WHERE t.AD_Table_ID=c.AD_Table_ID AND t.IsActive='Y'\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[AD_Table=t,AD_Column=c|0]\", fixture.toString());\n }", "public LinkedHashMap<String, LinkedHashSet<String>> getConditionsFromTable() {\n\t\tLinkedHashMap<String, LinkedHashSet<String>> toReturn = new LinkedHashMap<String, LinkedHashSet<String>>();\n\t\tfor (int i = 0; i < modelCondTable.getRowCount(); i++) {\n\t\t\tString key = (String) modelCondTable.getValueAt(i, 0);\n\t\t\tString value = (String) modelCondTable.getValueAt(i, 1);\n\t\t\tLinkedHashSet<String> setValue = new LinkedHashSet<String>(Arrays.asList(value.split(\";\")));\n\n\t\t\ttoReturn.put(key, setValue);\n\t\t}\n\t\treturn toReturn;\n\t}", "public void testTwoTable() {\n\n String\tsql\t= \"SELECT t.AD_Table_ID, t.TableName, c.AD_Column_ID, c.ColumnName FROM AD_Table t, AD_Column c WHERE t.AD_Table_ID=c.AD_Table_ID AND t.IsActive='Y'\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[AD_Table=t,AD_Column=c|0]\", fixture.toString());\n }", "public static final int[] get_AND_AND(){\n\t\t\n\t\tint[] table = new int[16*16];\n\t\t\n\t\t// table[(T_undefined<<4)+T_undefined] \t\t= T_undefined;\n\t\t// table[(T_undefined<<4)+T_byte] \t\t\t= T_undefined;\n\t\t// table[(T_undefined<<4)+T_long] \t\t\t= T_undefined;\n\t\t// table[(T_undefined<<4)+T_short] \t\t\t= T_undefined;\n\t\t// table[(T_undefined<<4)+T_void] \t\t\t= T_undefined;\n\t\t// table[(T_undefined<<4)+T_String] \t\t= T_undefined;\n\t\t// table[(T_undefined<<4)+T_Object] \t\t= T_undefined;\n\t\t// table[(T_undefined<<4)+T_double] \t\t= T_undefined;\n\t\t// table[(T_undefined<<4)+T_float] \t\t\t= T_undefined;\n\t\t// table[(T_undefined<<4)+T_boolean] \t\t= T_undefined;\n\t\t// table[(T_undefined<<4)+T_char] \t\t\t= T_undefined;\n\t\t// table[(T_undefined<<4)+T_int] \t\t\t= T_undefined;\n\t\t// table[(T_undefined<<4)+T_null] \t\t\t= T_undefined;\n\t\t\t\n\t\t// table[(T_byte<<4)+T_undefined] \t= T_undefined;\n\t\t// table[(T_byte<<4)+T_byte] \t\t= T_undefined;\n\t\t// table[(T_byte<<4)+T_long] \t\t= T_undefined;\n\t\t// table[(T_byte<<4)+T_short] \t\t= T_undefined;\n\t\t// table[(T_byte<<4)+T_void] \t\t= T_undefined;\n\t\t// table[(T_byte<<4)+T_String] \t\t= T_undefined;\n\t\t// table[(T_byte<<4)+T_Object] \t\t= T_undefined;\n\t\t// table[(T_byte<<4)+T_double] \t\t= T_undefined;\n\t\t// table[(T_byte<<4)+T_float] \t\t= T_undefined;\n\t\t// table[(T_byte<<4)+T_boolean] \t= T_undefined;\n\t\t// table[(T_byte<<4)+T_char] \t\t= T_undefined;\n\t\t// table[(T_byte<<4)+T_int] \t\t= T_undefined;\n\t\t// table[(T_byte<<4)+T_null] \t\t= T_undefined;\n\t\t\n\t\t// table[(T_long<<4)+T_undefined] \t= T_undefined;\n\t\t// table[(T_long<<4)+T_byte] \t\t= T_undefined;\n\t\t// table[(T_long<<4)+T_long] \t\t= T_undefined;\n\t\t// table[(T_long<<4)+T_short] \t\t= T_undefined;\n\t\t// table[(T_long<<4)+T_void] \t\t= T_undefined;\n\t\t// table[(T_long<<4)+T_String] \t\t= T_undefined;\n\t\t// table[(T_long<<4)+T_Object] \t\t= T_undefined;\n\t\t// table[(T_long<<4)+T_double] \t\t= T_undefined;\n\t\t// table[(T_long<<4)+T_float] \t\t= T_undefined;\n\t\t// table[(T_long<<4)+T_boolean] \t= T_undefined;\n\t\t// table[(T_long<<4)+T_char] \t\t= T_undefined;\n\t\t// table[(T_long<<4)+T_int] \t\t= T_undefined;\n\t\t// table[(T_long<<4)+T_null] \t\t= T_undefined;\n\t\t\n\t\t// table[(T_short<<4)+T_undefined] \t= T_undefined;\n\t\t// table[(T_short<<4)+T_byte] \t\t= T_undefined;\n\t\t// table[(T_short<<4)+T_long] \t\t= T_undefined;\n\t\t// table[(T_short<<4)+T_short] \t\t= T_undefined;\n\t\t// table[(T_short<<4)+T_void] \t\t= T_undefined;\n\t\t// table[(T_short<<4)+T_String] \t= T_undefined;\n\t\t// table[(T_short<<4)+T_Object] \t= T_undefined;\n\t\t// table[(T_short<<4)+T_double] \t= T_undefined;\n\t\t// table[(T_short<<4)+T_float] \t\t= T_undefined;\n\t\t// table[(T_short<<4)+T_boolean]\t= T_undefined;\n\t\t// table[(T_short<<4)+T_char] \t\t= T_undefined;\n\t\t// table[(T_short<<4)+T_int] \t\t= T_undefined;\n\t\t// table[(T_short<<4)+T_null] \t\t= T_undefined;\n\t\t\n\t\t// table[(T_void<<4)+T_undefined] \t= T_undefined;\n\t\t// table[(T_void<<4)+T_byte] \t\t= T_undefined;\n\t\t// table[(T_void<<4)+T_long] \t\t= T_undefined;\n\t\t// table[(T_void<<4)+T_short] \t\t= T_undefined;\n\t\t// table[(T_void<<4)+T_void] \t\t= T_undefined;\n\t\t// table[(T_void<<4)+T_String] \t= T_undefined;\n\t\t// table[(T_void<<4)+T_Object] \t= T_undefined;\n\t\t// table[(T_void<<4)+T_double] \t= T_undefined;\n\t\t// table[(T_void<<4)+T_float] \t\t= T_undefined;\n\t\t// table[(T_void<<4)+T_boolean] \t= T_undefined;\n\t\t// table[(T_void<<4)+T_char] \t\t= T_undefined;\n\t\t// table[(T_void<<4)+T_int] \t\t= T_undefined;\n\t\t// table[(T_void<<4)+T_null] \t\t= T_undefined;\n\t\t\n\t\t// table[(T_String<<4)+T_undefined] \t= T_undefined;\n\t\t// table[(T_String<<4)+T_byte] \t\t= T_undefined;\n\t\t// table[(T_String<<4)+T_long] \t\t= T_undefined;\n\t\t// table[(T_String<<4)+T_short] \t\t= T_undefined;\n\t\t// table[(T_String<<4)+T_void] \t\t= T_undefined;\n\t\t// table[(T_String<<4)+T_String] \t\t= T_undefined;\n\t\t// table[(T_String<<4)+T_Object] \t\t= T_undefined;\n\t\t// table[(T_String<<4)+T_double] \t\t= T_undefined;\n\t\t// table[(T_String<<4)+T_float] \t\t= T_undefined;\n\t\t// table[(T_String<<4)+T_boolean] \t\t= T_undefined;\n\t\t// table[(T_String<<4)+T_char] \t\t= T_undefined;\n\t\t// table[(T_String<<4)+T_int] \t\t\t= T_undefined;\n\t\t// table[(T_String<<4)+T_null] \t\t= T_undefined;\n\t\t\n\t\t// table[(T_Object<<4)+T_undefined] \t= T_undefined;\n\t\t// table[(T_Object<<4)+T_byte] \t\t= T_undefined;\n\t\t// table[(T_Object<<4)+T_long] \t\t= T_undefined;\n\t\t// table[(T_Object<<4)+T_short]\t\t= T_undefined;\n\t\t// table[(T_Object<<4)+T_void] \t\t= T_undefined;\n\t\t// table[(T_Object<<4)+T_String] \t\t= T_undefined;\n\t\t// table[(T_Object<<4)+T_Object] \t\t= T_undefined;\n\t\t// table[(T_Object<<4)+T_double] \t\t= T_undefined;\n\t\t// table[(T_Object<<4)+T_float] \t\t= T_undefined;\n\t\t// table[(T_Object<<4)+T_boolean]\t\t= T_undefined;\n\t\t// table[(T_Object<<4)+T_char] \t\t= T_undefined;\n\t\t// table[(T_Object<<4)+T_int] \t\t\t= T_undefined;\n\t\t// table[(T_Object<<4)+T_null] \t\t= T_undefined;\n\t\t\n\t\t// table[(T_double<<4)+T_undefined] \t= T_undefined;\n\t\t// table[(T_double<<4)+T_byte] \t\t= T_undefined;\n\t\t// table[(T_double<<4)+T_long] \t\t= T_undefined;\n\t\t// table[(T_double<<4)+T_short] \t\t= T_undefined;\n\t\t// table[(T_double<<4)+T_void] \t\t= T_undefined;\n\t\t// table[(T_double<<4)+T_String] \t\t= T_undefined;\n\t\t// table[(T_double<<4)+T_Object] \t\t= T_undefined;\n\t\t// table[(T_double<<4)+T_double] \t\t= T_undefined;\n\t\t// table[(T_double<<4)+T_float] \t\t= T_undefined;\n\t\t// table[(T_double<<4)+T_boolean] \t\t= T_undefined;\n\t\t// table[(T_double<<4)+T_char] \t\t= T_undefined;\n\t\t// table[(T_double<<4)+T_int] \t\t\t= T_undefined;\n\t\t// table[(T_double<<4)+T_null] \t\t= T_undefined;\n\t\t\n\t\t// table[(T_float<<4)+T_undefined] \t= T_undefined;\n\t\t// table[(T_float<<4)+T_byte] \t\t\t= T_undefined;\n\t\t// table[(T_float<<4)+T_long] \t\t\t= T_undefined;\n\t\t// table[(T_float<<4)+T_short] \t\t= T_undefined;\n\t\t// table[(T_float<<4)+T_void] \t\t\t= T_undefined;\n\t\t// table[(T_float<<4)+T_String] \t\t= T_undefined;\n\t\t// table[(T_float<<4)+T_Object] \t\t= T_undefined;\n\t\t// table[(T_float<<4)+T_double] \t\t= T_undefined;\n\t\t// table[(T_float<<4)+T_float] \t\t= T_undefined;\n\t\t// table[(T_float<<4)+T_boolean] \t\t= T_undefined;\n\t\t// table[(T_float<<4)+T_char] \t\t\t= T_undefined;\n\t\t// table[(T_float<<4)+T_int] \t\t\t= T_undefined;\n\t\t// table[(T_float<<4)+T_null] \t\t\t= T_undefined;\n\t\t\n\t\t// table[(T_boolean<<4)+T_undefined] \t\t= T_undefined;\n\t\t// table[(T_boolean<<4)+T_byte] \t\t\t= T_undefined;\n\t\t// table[(T_boolean<<4)+T_long] \t\t\t= T_undefined;\n\t\t// table[(T_boolean<<4)+T_short] \t\t\t= T_undefined;\n\t\t// table[(T_boolean<<4)+T_void] \t\t\t= T_undefined;\n\t\t// table[(T_boolean<<4)+T_String] \t\t\t= T_undefined;\n\t\t// table[(T_boolean<<4)+T_Object] \t\t\t= T_undefined;\n\t\t// table[(T_boolean<<4)+T_double] \t\t\t= T_undefined;\n\t\t// table[(T_boolean<<4)+T_float] \t\t\t= T_undefined;\n\t table[(T_boolean<<4)+T_boolean] \t\t= (Boolean2Boolean<<12)+(Boolean2Boolean<<4)+T_boolean;\n\t\t// table[(T_boolean<<4)+T_char] \t\t\t= T_undefined;\n\t\t// table[(T_boolean<<4)+T_int] \t\t\t= T_undefined;\n\t\t// table[(T_boolean<<4)+T_null] \t\t\t= T_undefined;\n\t\t\t\n\t\t// table[(T_char<<4)+T_undefined] \t\t= T_undefined;\n\t\t// table[(T_char<<4)+T_byte] \t\t\t= T_undefined;\n\t\t// table[(T_char<<4)+T_long] \t\t\t= T_undefined;\n\t\t// table[(T_char<<4)+T_short] \t\t\t= T_undefined;\n\t\t// table[(T_char<<4)+T_void] \t\t\t= T_undefined;\n\t\t// table[(T_char<<4)+T_String] \t\t= T_undefined;\n\t\t// table[(T_char<<4)+T_Object] \t\t= T_undefined;\n\t\t// table[(T_char<<4)+T_double] \t\t= T_undefined;\n\t\t// table[(T_char<<4)+T_float] \t\t\t= T_undefined;\n\t\t// table[(T_char<<4)+T_boolean] \t\t= T_undefined;\n\t\t// table[(T_char<<4)+T_char] \t\t\t= T_undefined;\n\t\t// table[(T_char<<4)+T_int] \t\t\t= T_undefined;\n\t\t// table[(T_char<<4)+T_null] \t\t\t= T_undefined;\n\t\t\t\n\t\t// table[(T_int<<4)+T_undefined] \t= T_undefined;\n\t\t// table[(T_int<<4)+T_byte] \t\t= T_undefined;\n\t\t// table[(T_int<<4)+T_long] \t\t= T_undefined;\n\t\t// table[(T_int<<4)+T_short] \t\t= T_undefined;\n\t\t// table[(T_int<<4)+T_void] \t\t= T_undefined;\n\t\t// table[(T_int<<4)+T_String] \t\t= T_undefined;\n\t\t// table[(T_int<<4)+T_Object] \t\t= T_undefined;\n\t\t// table[(T_int<<4)+T_double] \t\t= T_undefined;\n\t\t// table[(T_int<<4)+T_float] \t\t= T_undefined;\n\t\t// table[(T_int<<4)+T_boolean] \t= T_undefined;\n\t\t// table[(T_int<<4)+T_char] \t\t= T_undefined;\n\t\t// table[(T_int<<4)+T_int] \t\t= T_undefined;\n\t\t// table[(T_int<<4)+T_null] \t\t= T_undefined;\n\t\t\n\t\t// table[(T_null<<4)+T_undefined] \t\t= T_undefined;\n\t\t// table[(T_null<<4)+T_byte] \t\t\t= T_undefined;\n\t\t// table[(T_null<<4)+T_long] \t\t\t= T_undefined;\n\t\t// table[(T_null<<4)+T_short] \t\t\t= T_undefined;\n\t\t// table[(T_null<<4)+T_void] \t\t\t= T_undefined;\n\t\t// table[(T_null<<4)+T_String] \t\t= T_undefined;\n\t\t// table[(T_null<<4)+T_Object] \t\t= T_undefined;\n\t\t// table[(T_null<<4)+T_double] \t\t= T_undefined;\n\t\t// table[(T_null<<4)+T_float] \t\t\t= T_undefined;\n\t\t// table[(T_null<<4)+T_boolean] \t\t= T_undefined;\n\t\t// table[(T_null<<4)+T_char] \t\t\t= T_undefined;\n\t\t// table[(T_null<<4)+T_int] \t\t\t= T_undefined;\n\t\t// table[(T_null<<4)+T_null] \t\t\t= T_undefined;\n\t\treturn table;\n\t}", "private static ArrayList<Integer> expressionEvaluator(Expression expression, Table tableToApplySelectionOn) throws IOException, ParseException {\n\t\t\n\t\t\n\t\t\n\t\t// this is the actual list of indices that stores the indices of the tuples that satisfy all the conditions\n\t\tArrayList<Integer> listOfIndices = new ArrayList<Integer>();\n\n\t\t// this Table contains the resultant table after applying selection operation\n\t\tTable resultantTable = new Table(tableToApplySelectionOn);\n\t\tresultantTable.tableName = \"resultTable\";\n\n\t\t// the following conditions are to evaluate the EQUAL expression\n\t\tif (expression instanceof EqualsTo) {\n\t\t\t// this extracts the equal to clause in the WHERE clause\n\t\t\tEqualsTo equalsExpression = (EqualsTo) expression;\n\t\t\t\n\t\t\t// this extracts the left and the right expressions in the equal to clause\n\t\t\tExpression leftExpression = ((Expression) equalsExpression.getLeftExpression());\n\t\t\tExpression rightExpression = ((Expression) equalsExpression.getRightExpression());\n\n\t\t\tif (leftExpression instanceof BinaryExpression || rightExpression instanceof BinaryExpression) {\n\t\t\t\tlistOfIndices = alegbricExpressionEvaluator(equalsExpression, tableToApplySelectionOn);\n\n\t\t\t} else {\n\t\t\t\tString leftVal = leftExpression.toString();\n\t\t\t\tString rightVal = rightExpression.toString();\n\t\t\t\t//System.out.println(tableToApplySelectionOn);\n\t\t\t\t//System.out.println(tableToApplySelectionOn.columnDescriptionList);\n\t\t\t\t//System.out.println(tableToApplySelectionOn.columnIndexMap);\n\t\t\t\t/*System.out.println(leftVal);\n\t\t\t\tSystem.out.println(tableToApplySelectionOn.columnIndexMap.get(leftVal));\n\t\t\t\t*/\n\t\t\t\tString type = tableToApplySelectionOn.columnDescriptionList.get(tableToApplySelectionOn.columnIndexMap.get(leftVal)).getColDataType().getDataType();\n\t\t\t\t\n\t\t\t\tString tuple = null;\n\t\t\t\tint tupleNo = 0;\n\t\t\t\twhile ((tuple = tableToApplySelectionOn.returnTuple()) != null) {\n\t\t\t\t\ttupleNo++;\n\t\t\t\t\tString array[] = tuple.split(\"\\\\|\");\n\t\t\t\t\tint index = tableToApplySelectionOn.columnIndexMap.get(leftVal);\n\t\t\t\t\tString[] rightArray = null;\n\t\t\t\t\tint rightIndex = 0;\n\n\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\trightIndex = tableToApplySelectionOn.columnIndexMap.get(rightVal);\n\t\t\t\t\t\trightArray = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trightArray = new String[1];\n\t\t\t\t\t\trightArray[0] = rightVal;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (type.equalsIgnoreCase(\"string\") || type.equalsIgnoreCase(\"char\") || type.equalsIgnoreCase(\"varchar\")) {\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\tif (array[index].equals(rightArray[rightIndex])) {\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (array[index].equals(rightArray[rightIndex].substring(1,rightArray[rightIndex].length() - 1))) {\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"int\") || type.equalsIgnoreCase(\"decimal\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Double.parseDouble(array[index]) == Double.parseDouble(rightArray[rightIndex])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"date\")) {\n\t\t\t\t\t\tString leftDate[] = array[index].split(\"-\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tString rightDate[] = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\trightDate = rightArray[rightIndex].split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\trightDate = rightArray[rightIndex].substring(6, rightArray[rightIndex].length() - 2).split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tif (Integer.parseInt(leftDate[0]) == Integer.parseInt(rightDate[0]) && Integer.parseInt(leftDate[1]) == Integer.parseInt(rightDate[1]) && Integer.parseInt(leftDate[2]) == Integer.parseInt(rightDate[2])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\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} else if (expression instanceof NotEqualsTo) {\n\n\t\t\n\t\t\t\n\t\t\t// this extracts the equal to clause in the WHERE clause\n\t\t\tNotEqualsTo equalsExpression = (NotEqualsTo) expression;\n\t\t\t\n\t\t\t// this extracts the left and the right expressions in the equal to clause\n\t\t\tExpression leftExpression = ((Expression) equalsExpression.getLeftExpression());\n\t\t\tExpression rightExpression = ((Expression) equalsExpression.getRightExpression());\n\n\t\t\tif (leftExpression instanceof BinaryExpression || rightExpression instanceof BinaryExpression) {\n\t\t\t\tlistOfIndices = alegbricExpressionEvaluator(equalsExpression, tableToApplySelectionOn);\n\n\t\t\t} else {\n\t\t\n\t\t\t\t\n\t\t\t\tString leftVal = leftExpression.toString();\n\t\t\t\tString rightVal = rightExpression.toString();\n\n\t\t\t\tString type = tableToApplySelectionOn.columnDescriptionList.get(tableToApplySelectionOn.columnIndexMap.get(leftVal)).getColDataType().getDataType();\n\t\t\t\t\n\t\t\t\tString tuple = null;\n\t\t\t\tint tupleNo = 0;\n\t\t\t\twhile ((tuple = tableToApplySelectionOn.returnTuple()) != null) {\n\t\t\t\t\ttupleNo++;\n\t\t\t\t\tString array[] = tuple.split(\"\\\\|\");\n\t\t\t\t\tint index = tableToApplySelectionOn.columnIndexMap.get(leftVal);\n\t\t\t\t\tString[] rightArray = null;\n\t\t\t\t\tint rightIndex = 0;\n\n\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\trightIndex = tableToApplySelectionOn.columnIndexMap.get(rightVal);\n\t\t\t\t\t\trightArray = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trightArray = new String[1];\n\t\t\t\t\t\trightArray[0] = rightVal;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (type.equalsIgnoreCase(\"string\") || type.equalsIgnoreCase(\"char\") || type.equalsIgnoreCase(\"varchar\")) {\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\tif (!array[index].equals(rightArray[rightIndex])) {\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\tif (!array[index].equals(rightArray[rightIndex].substring(1,rightArray[rightIndex].length() - 1))) {\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"int\") || type.equalsIgnoreCase(\"decimal\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Double.parseDouble(array[index]) != Double.parseDouble(rightArray[rightIndex])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"date\")) {\n\t\t\t\t\t\tString leftDate[] = array[index].split(\"-\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tString rightDate[] = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\trightDate = rightArray[rightIndex].split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\trightDate = rightArray[rightIndex].substring(6, rightArray[rightIndex].length() - 2).split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tif (Integer.parseInt(leftDate[0]) != Integer.parseInt(rightDate[0]) && Integer.parseInt(leftDate[1]) == Integer.parseInt(rightDate[1]) && Integer.parseInt(leftDate[2]) != Integer.parseInt(rightDate[2])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\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\t}\n\n\t\telse if (expression instanceof GreaterThanEquals) {\n\t\t\t\n\t\t\tGreaterThanEquals greaterThanEqualsExpression = (GreaterThanEquals) expression;\n\t\t\tExpression leftExpression = ((Expression) greaterThanEqualsExpression.getLeftExpression());\n\t\t\tExpression rightExpression = ((Expression) greaterThanEqualsExpression.getRightExpression());\n\n\t\t\tif (leftExpression instanceof BinaryExpression || rightExpression instanceof BinaryExpression) {\n\t\t\t\tlistOfIndices = alegbricExpressionEvaluator(greaterThanEqualsExpression, tableToApplySelectionOn);\n\t\t\t} else {\n\t\t\t\tString leftVal = leftExpression.toString();\n\t\t\t\tString rightVal = rightExpression.toString();\n\t\t\t\tString type = tableToApplySelectionOn.columnDescriptionList.get(tableToApplySelectionOn.columnIndexMap.get(leftVal)).getColDataType().getDataType();\n\n\t\t\t\tString tuple = null;\n\t\t\t\tint tupleNo = 0;\n\n\t\t\t\twhile ((tuple = tableToApplySelectionOn.returnTuple()) != null) {\n\t\t\t\t\ttupleNo++;\n\t\t\t\t\tString array[] = tuple.split(\"\\\\|\");\n\t\t\t\t\tint index = tableToApplySelectionOn.columnIndexMap.get(leftVal);\n\t\t\t\t\tString[] rightArray = null;\n\t\t\t\t\tint rightIndex = 0;\n\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\trightIndex = tableToApplySelectionOn.columnIndexMap.get(rightVal);\n\t\t\t\t\t\trightArray = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trightArray = new String[1];\n\t\t\t\t\t\trightArray[0] = rightVal;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (type.equalsIgnoreCase(\"int\") || type.equalsIgnoreCase(\"decimal\")) {\n\n\t\t\t\t\t\tif (Double.parseDouble(array[index]) >= Double.parseDouble(rightArray[rightIndex])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"date\")) {\n\n\t\t\t\t\t\tString leftDate[] = array[index].split(\"-\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tString rightDate[] = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\trightDate = rightArray[rightIndex].split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\trightDate = rightArray[rightIndex].substring(6, rightArray[rightIndex].length() - 2).split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tif (Integer.parseInt(leftDate[0]) < Integer.parseInt(rightDate[0])) {\n\n\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[0]) == Integer.parseInt(rightDate[0])) {\n\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[1]) < Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[1]) == Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[2]) < Integer.parseInt(rightDate[2])) {\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\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\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/*if(tableToApplySelectionOn.tableName.equalsIgnoreCase(\"lineitem\") && expression.toString().equals(\"lineitem.receiptdate >= date('1994-01-01')\")){\n\t\t\t\t\t//System.out.println(listOfIndices);\n\t\t\t\t\t}*/\n\t\t\t}\n\t\t} else if (expression instanceof GreaterThan) {\n\t\t\t\n\t\t\tGreaterThan greaterThanExpression = (GreaterThan) expression;\n\t\t\tExpression leftExpression = ((Expression) greaterThanExpression.getLeftExpression());\n\t\t\tExpression rightExpression = ((Expression) greaterThanExpression.getRightExpression());\n\n\t\t\tif (leftExpression instanceof BinaryExpression || rightExpression instanceof BinaryExpression) {\n\t\t\t\tlistOfIndices = alegbricExpressionEvaluator(greaterThanExpression, tableToApplySelectionOn);\n\t\t\t} else {\n\t\t\t\tString leftVal = leftExpression.toString();\n\t\t\t\tString rightVal = rightExpression.toString();\n\t\t\t\tString type = tableToApplySelectionOn.columnDescriptionList.get(tableToApplySelectionOn.columnIndexMap.get(leftVal)).getColDataType().getDataType();\n\n\t\t\t\tString tuple = null;\n\t\t\t\tint tupleNo = 0;\n\n\t\t\t\twhile ((tuple = tableToApplySelectionOn.returnTuple()) != null) {\n\t\t\t\t\ttupleNo++;\n\t\t\t\t\tString array[] = tuple.split(\"\\\\|\");\n\t\t\t\t\tint index = tableToApplySelectionOn.columnIndexMap.get(leftVal);\n\t\t\t\t\tString[] rightArray = null;\n\t\t\t\t\tint rightIndex = 0;\n\n\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\trightIndex = tableToApplySelectionOn.columnIndexMap.get(rightVal);\n\t\t\t\t\t\trightArray = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trightArray = new String[1];\n\t\t\t\t\t\trightArray[0] = rightVal;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (type.equalsIgnoreCase(\"int\") || type.equalsIgnoreCase(\"decimal\")) {\n\n\t\t\t\t\t\tif (Double.parseDouble(array[index]) > Double.parseDouble(rightArray[rightIndex])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"date\")) {\n\t\t\t\t\t\tString leftDate[] = array[index].split(\"-\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tString rightDate[] = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\trightDate = rightArray[rightIndex].split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\trightDate = rightArray[rightIndex].substring(6, rightArray[rightIndex].length() - 2).split(\"-\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (Integer.parseInt(leftDate[0]) < Integer.parseInt(rightDate[0])) {\n\n\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[0]) == Integer.parseInt(rightDate[0])) {\n\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[1]) < Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[1]) == Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[2]) <= Integer.parseInt(rightDate[2])) {\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\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\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\telse if (expression instanceof MinorThan) {\n\t\t\tMinorThan minorThanExpression = (MinorThan) expression;\n\n\t\t\tExpression leftExpression = ((Expression) minorThanExpression.getLeftExpression());\n\t\t\tExpression rightExpression = ((Expression) minorThanExpression.getRightExpression());\n\n\t\t\tif (leftExpression instanceof BinaryExpression|| rightExpression instanceof BinaryExpression) {\n\t\t\t\tlistOfIndices = alegbricExpressionEvaluator(minorThanExpression, tableToApplySelectionOn);\n\t\t\t} else {\n\t\t\t\tString leftVal = leftExpression.toString();\n\t\t\t\tString rightVal = rightExpression.toString();\n\t\t\t\tString type = tableToApplySelectionOn.columnDescriptionList.get(tableToApplySelectionOn.columnIndexMap.get(leftVal)).getColDataType().getDataType();\n\n\t\t\t\tString tuple = null;\n\t\t\t\tint tupleNo = 0;\n\n\t\t\t\twhile ((tuple = tableToApplySelectionOn.returnTuple()) != null) {\n\t\t\t\t\ttupleNo++;\n\t\t\t\t\tString array[] = tuple.split(\"\\\\|\");\n\t\t\t\t\tint index = tableToApplySelectionOn.columnIndexMap.get(leftVal);\n\t\t\t\t\tString[] rightArray = null;\n\t\t\t\t\tint rightIndex = 0;\n\n\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\trightIndex = tableToApplySelectionOn.columnIndexMap.get(rightVal);\n\t\t\t\t\t\trightArray = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trightArray = new String[1];\n\t\t\t\t\t\trightArray[0] = rightVal;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (type.equalsIgnoreCase(\"int\") || type.equalsIgnoreCase(\"decimal\")) {\n\n\t\t\t\t\t\tif (Double.parseDouble(array[index]) < Double.parseDouble(rightArray[rightIndex])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"date\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tString leftDate[] = array[index].split(\"-\");\n\t\t\t\t\t\tString rightDate[] = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\trightDate = rightArray[rightIndex].split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\trightDate = rightArray[rightIndex].substring(6, rightArray[rightIndex].length() - 2).split(\"-\");\n\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\tif (Integer.parseInt(leftDate[0]) > Integer.parseInt(rightDate[0])) {\n\n\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[0]) == Integer.parseInt(rightDate[0])) {\n\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[1]) > Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[1]) == Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[2]) >= Integer.parseInt(rightDate[2])) {\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\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\t\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t/*if(tableToApplySelectionOn.tableName.equalsIgnoreCase(\"lineitem\") && expression.toString().equals(\"lineitem.commitdate < lineitem.receiptdate\")){\n\t\t\t\t\tSystem.out.println(listOfIndices);\n\t\t\t\t\t}*/\n\t\t\t}\n\t\t}\n\t\telse if (expression instanceof MinorThanEquals) {\n\t\t\t\n\t\t\tMinorThanEquals minorEqualsThan = (MinorThanEquals) expression;\n\t\t\tExpression leftExpression = ((Expression) minorEqualsThan.getLeftExpression());\n\t\t\tExpression rightExpression = ((Expression) minorEqualsThan.getRightExpression());\n\n\t\t\tif (leftExpression instanceof BinaryExpression || rightExpression instanceof BinaryExpression) {\n\t\t\t\tlistOfIndices = alegbricExpressionEvaluator(minorEqualsThan,tableToApplySelectionOn);\n\t\t\t} else {\n\t\t\t\tString leftVal = leftExpression.toString();\n\t\t\t\tString rightVal = rightExpression.toString();\n\t\t\t\tString type = tableToApplySelectionOn.columnDescriptionList.get(tableToApplySelectionOn.columnIndexMap.get(leftVal)).getColDataType().getDataType();\n\n\t\t\t\tString tuple = null;\n\t\t\t\tint tupleNo = 0;\n\n\t\t\t\twhile ((tuple = tableToApplySelectionOn.returnTuple()) != null) {\n\t\t\t\t\ttupleNo++;\n\t\t\t\t\tString array[] = tuple.split(\"\\\\|\");\n\t\t\t\t\tint index = tableToApplySelectionOn.columnIndexMap.get(leftVal);\n\n\t\t\t\t\tString[] rightArray = null;\n\t\t\t\t\tint rightIndex = 0;\n\n\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\trightIndex = tableToApplySelectionOn.columnIndexMap.get(rightVal);\n\t\t\t\t\t\trightArray = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trightArray = new String[1];\n\t\t\t\t\t\trightArray[0] = rightVal;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (type.equalsIgnoreCase(\"int\") || type.equalsIgnoreCase(\"decimal\")) {\n\n\t\t\t\t\t\tif (Double.parseDouble(array[index]) <= Double.parseDouble(rightArray[rightIndex])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"date\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tString leftDate[] = array[index].split(\"-\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tString rightDate[] = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\trightDate = rightArray[rightIndex].split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\trightDate = rightArray[rightIndex].substring(6, rightArray[rightIndex].length() - 2).split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tif (Integer.parseInt(leftDate[0]) > Integer.parseInt(rightDate[0])) {\n\n\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[0]) == Integer.parseInt(rightDate[0])) {\n\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[1]) > Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[1]) == Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[2]) > Integer.parseInt(rightDate[2])) {\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\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\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t} else if (expression instanceof AndExpression) {\n\t\t\t\n\t\t\tAndExpression andExpression = (AndExpression) expression;\n\t\t\tExpression leftVal = ((Expression) andExpression.getLeftExpression());\n\t\t\tExpression rightVal = ((Expression) andExpression.getRightExpression());\n\n\t\t\tArrayList<Integer> leftArr = expressionEvaluator(leftVal, tableToApplySelectionOn);\n\t\t\tArrayList<Integer> rightArr = expressionEvaluator(rightVal, tableToApplySelectionOn);\n\n\t\t\tArrayList<Integer> set = new ArrayList<Integer>();\n\t\t\tfor (int i : leftArr) {\n\t\t\t\tif (rightArr.contains(i)) {\n\t\t\t\t\tset.add(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlistOfIndices = set;\n\t\t}\n\n\t\telse if (expression instanceof OrExpression) {\n\t\t\t\n\t\t\t\n\t\t\tOrExpression orExpression = (OrExpression) expression;\n\t\t\tExpression leftVal = ((Expression) orExpression.getLeftExpression());\n\t\t\tExpression rightVal = ((Expression) orExpression.getRightExpression());\n\n\t\t\tArrayList<Integer> leftArr = expressionEvaluator(leftVal, tableToApplySelectionOn);\n\t\t\tArrayList<Integer> rightArr = expressionEvaluator(rightVal, tableToApplySelectionOn);\n\t\t\t\t\t\t\n\t\t\tTreeSet<Integer> set = new TreeSet<Integer>();\n\t\t\t\n\t\t\tfor (int i : leftArr) {\n\t\t\t\tset.add(i);\n\t\t\t}\n\t\t\tfor (int i : rightArr) {\n\t\t\t\tset.add(i);\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i : set) {\n\t\t\t\tlistOfIndices.add(i);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\telse if (expression instanceof Parenthesis){\n\t\t\t\n\t\t\tArrayList<Integer> expArr = expressionEvaluator(((Parenthesis)expression).getExpression(), tableToApplySelectionOn);\n\t\t\t\n\t\t\tfor(int i:expArr){\n\t\t\t\tlistOfIndices.add(i);\n\t\t\t}\n\t\t}\n\n\t\t\n\t\treturn listOfIndices;\n\t}", "public static void ComputeTables() {\n int[][] nbl2bit\n = {\n new int[]{1, 0, 0, 0}, new int[]{1, 0, 0, 1}, new int[]{1, 0, 1, 0}, new int[]{1, 0, 1, 1},\n new int[]{1, 1, 0, 0}, new int[]{1, 1, 0, 1}, new int[]{1, 1, 1, 0}, new int[]{1, 1, 1, 1},\n new int[]{-1, 0, 0, 0}, new int[]{-1, 0, 0, 1}, new int[]{-1, 0, 1, 0}, new int[]{-1, 0, 1, 1},\n new int[]{-1, 1, 0, 0}, new int[]{-1, 1, 0, 1}, new int[]{-1, 1, 1, 0}, new int[]{-1, 1, 1, 1}\n };\n\n int step, nib;\n\n /* loop over all possible steps */\n for (step = 0; step <= 48; step++) {\n /* compute the step value */\n int stepval = (int) (Math.floor(16.0 * Math.pow(11.0 / 10.0, (double) step)));\n\n\n /* loop over all nibbles and compute the difference */\n for (nib = 0; nib < 16; nib++) {\n diff_lookup[step * 16 + nib] = nbl2bit[nib][0]\n * (stepval * nbl2bit[nib][1]\n + stepval / 2 * nbl2bit[nib][2]\n + stepval / 4 * nbl2bit[nib][3]\n + stepval / 8);\n }\n }\n }", "private TableInfo[] getTableInfo (String sql)\n\t{\n\t\tArrayList<TableInfo> list = new ArrayList<TableInfo>();\n\t\t//\tremove ()\n\t\tif (sql.startsWith(\"(\") && sql.endsWith(\")\"))\n\t\t\tsql = sql.substring(1,sql.length()-1);\n\t\t\t\n\t\tint fromIndex = sql.indexOf(FROM);\n\t\tif (fromIndex != sql.lastIndexOf(FROM))\n\t\t\tlog.log(Level.SEVERE, \"getTableInfo - More than one FROM clause - \" + sql);\n\t\twhile (fromIndex != -1)\n\t\t{\n\t\t\tString from = sql.substring(fromIndex+FROM_LENGTH);\n\t\t\tint index = from.lastIndexOf(WHERE);\t//\tend at where\n\t\t\tif (index != -1)\n\t\t\t\tfrom = from.substring(0, index);\n\t\t\tfrom = Util.replace(from, \" AS \", \" \");\n\t\t\tfrom = Util.replace(from, \" as \", \" \");\n\t\t\tfrom = Util.replace(from, \" INNER JOIN \", \", \");\n\t\t\tfrom = Util.replace(from, \" LEFT OUTER JOIN \", \", \");\n\t\t\tfrom = Util.replace(from, \" RIGHT OUTER JOIN \", \", \");\n\t\t\tfrom = Util.replace(from, \" FULL JOIN \", \", \");\n\t\t\t//\tRemove ON clause - assumes that there is no IN () in the clause\n\t\t\tindex = from.indexOf(ON);\n\t\t\twhile (index != -1)\n\t\t\t{\n\t\t\t\tint indexClose = from.indexOf(')');\t\t//\tdoes not catch \"IN (1,2)\" in ON\n\t\t\t\tint indexNextOn = from.indexOf(ON, index+4);\n\t\t\t\tif (indexNextOn != -1)\n\t\t\t\t\tindexClose = from.lastIndexOf(')', indexNextOn);\n\t\t\t\tif (indexClose != -1)\n\t\t\t\t\tfrom = from.substring(0, index) + from.substring(indexClose+1);\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlog.log(Level.SEVERE, \"parse - could not remove ON \" + from);\n\t\t\t\t\tbreak;\n\t\t\t\t}\t\t\t\n\t\t\t\tindex = from.indexOf(ON);\n\t\t\t}\n\t\t\t\n//\t\t\tlog.fine(\"getTableInfo - \" + from);\n\t\t\tStringTokenizer tableST = new StringTokenizer (from, \",\");\n\t\t\twhile (tableST.hasMoreTokens())\n\t\t\t{\n\t\t\t\tString tableString = tableST.nextToken().trim();\n\t\t\t\tStringTokenizer synST = new StringTokenizer (tableString, \" \");\n\t\t\t\tTableInfo tableInfo = null;\n\t\t\t\tif (synST.countTokens() > 1)\n\t\t\t\t\ttableInfo = new TableInfo(synST.nextToken(), synST.nextToken());\n\t\t\t\telse\n\t\t\t\t\ttableInfo = new TableInfo(tableString);\n//\t\t\t\tlog.fine(\"getTableInfo -- \" + tableInfo);\n\t\t\t\tlist.add(tableInfo);\n\t\t\t}\n\t\t\t//\n\t\t\tsql = sql.substring(0, fromIndex);\n\t\t\tfromIndex = sql.lastIndexOf(FROM);\n\t\t}\n\t\tTableInfo[] retValue = new TableInfo[list.size()];\n\t\tlist.toArray(retValue);\n\t\treturn retValue;\n\t}", "public static Table selectionOnTable(Expression expression, Table tableToApplySelectionOn) throws IOException, ParseException {\n\n\t\t//System.out.println(tableToApplySelectionOn.columnIndexMap);\n\t\t\n\t\t// if the where expression is null then we don't apply any operations on the table and just return the table as is\n\t\tif(expression == null)\n\t\t\treturn tableToApplySelectionOn;\n\t\t\n\t\t// this Table contains the resultant table, obtained after applying selection operation\n\t\tFile resultantTableFile = new File(tableToApplySelectionOn.tableDataDirectoryPath+System.getProperty(\"file.separator\") + tableToApplySelectionOn.tableName + \"|.tbl\");\n\t\tif(!resultantTableFile.exists())\n\t\t\tresultantTableFile.createNewFile();\n\t\t\n\t\tTable resultantTable = new Table(tableToApplySelectionOn.tableName + \"|\", \n\t\t\t\t\t\t\t\t\t\t tableToApplySelectionOn.noOfColumns,\n\t\t\t\t\t\t\t\t\t\t resultantTableFile,\n\t\t\t\t\t\t\t\t\t\t tableToApplySelectionOn.tableDataDirectoryPath);\n\n\t\t// initialize the column description list of the resultant table, which would be the same as the table given as input\n\t\tresultantTable.columnDescriptionList = tableToApplySelectionOn.columnDescriptionList;\n\t\t// initialize the column index map of the resultant table, which would be the same as the table given as input\n\t\tresultantTable.columnIndexMap = tableToApplySelectionOn.columnIndexMap;\n\n\t\t// we use the following conditions to evaluate the expressions\n\t\tif (expression instanceof EqualsTo || expression instanceof GreaterThanEquals\n\t\t\t|| expression instanceof GreaterThan || expression instanceof MinorThanEquals || expression instanceof MinorThan || expression instanceof NotEqualsTo) {\n\t\t\t\n\t\t\t// indices of the tuples that match the where clause or satisfy the where clause\n\t\t\tArrayList<Integer> listOfIndices = expressionEvaluator(expression, tableToApplySelectionOn);\n\t\t\tpopulateTable(resultantTable, tableToApplySelectionOn, listOfIndices);\n\n\t\t}\n\n\t\t else if (expression instanceof InExpression) {\n\t\t} else if (expression instanceof LikeExpression) {\n\t\t} else if (expression instanceof AndExpression) {\n\t\t\t\n\t\t\t// this is the AND expression extracted from the WHERE clause\n\t\t\tAndExpression andExpression = (AndExpression) expression;\n\t\t\t// this is the left expression of the AND expression\n\t\t\tExpression leftExpression = ((Expression) andExpression.getLeftExpression());\n\t\t\t// this is the right expression of the AND expression\n\t\t\tExpression rightExpression = ((Expression) andExpression.getRightExpression());\n\t\t\t// this stores the list of indices that satisfy the leftExpression\n\t\t\tArrayList<Integer> leftArr = expressionEvaluator(leftExpression, tableToApplySelectionOn);\n\t\t\t// this stores the list of indices that satisfy the rightExpression\n\t\t\tArrayList<Integer> rightArr = expressionEvaluator(rightExpression, tableToApplySelectionOn);\n\t\t\t// indices of the tuples that match the where clause or satisfy the where clause \n\t\t\tArrayList<Integer> listOfIndices = new ArrayList<Integer>();\n\t\t\t//System.out.println(leftExpression);\n\t\t\t//System.out.println(leftArr);\n\t\t\t//System.out.println(rightExpression);\n\t\t\t//System.out.println(rightArr);\n\t\t\t\n\t\t\t// the following nested loop is used to find the intersection of the two list indices\n\t\t\tfor (int i : leftArr) {\n\t\t\t\t\tif (rightArr.contains(i)) {\n\t\t\t\t\t\tlistOfIndices.add(i);\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// this is used to populate the resultant table with the indices in the listOfIndices\n\t\t\tpopulateTable(resultantTable, tableToApplySelectionOn, listOfIndices);\n\n\t\t} else if (expression instanceof OrExpression) {\n\t\t\tOrExpression orExpression = (OrExpression) expression;\n\t\t\tExpression leftExpression = ((Expression) orExpression.getLeftExpression());\n\t\t\tExpression rightExpression = ((Expression) orExpression.getRightExpression());\n\t\t\t\n\t\t\t// this stores the list of indices that satisfy the leftExpression\n\t\t\tArrayList<Integer> leftArr = expressionEvaluator(leftExpression, tableToApplySelectionOn);\n\t\t\t// this stores the list of indices that satisfy the rightExpression\n\t\t\tArrayList<Integer> rightArr = expressionEvaluator(rightExpression, tableToApplySelectionOn);\n\t\t\t// this set is used to store the list of indices of tuples that satisfy both left and right expression\n\t\t\tTreeSet<Integer> set = new TreeSet<Integer>();\n\t\t\t\n\t\t\tfor (int i : leftArr) {\n\t\t\t\tset.add(i);\n\t\t\t}\n\t\t\tfor (int i : rightArr) {\n\t\t\t\tset.add(i);\n\t\t\t}\n\n\t\t\tArrayList<Integer> listOfIndices = new ArrayList<Integer>();\n\n\t\t\tfor (int i : set) {\n\t\t\t\tlistOfIndices.add(i);\n\t\t\t}\n\n\t\t\tpopulateTable(resultantTable, tableToApplySelectionOn, listOfIndices);\n\n\t\t} else if (expression instanceof Between) {\n\n\t\t} else if (expression instanceof NullValue) {\n\n\t\t} else if (expression instanceof IsNullExpression) {\n\n\t\t}\n\t\t// change the name of the resultant table to be the name of the table on which you applied selection conditions, this is done to extract the join conditions\n\t\tresultantTable.tableName = tableToApplySelectionOn.tableName;\n\t\treturn resultantTable;\n\t}", "public static final String generateTableTestCase(){\n\t\n\t\tint[] operators = new int[]{AND,AND_AND,DIVIDE,GREATER,GREATER_EQUAL,\n\t\t\t\tLEFT_SHIFT,LESS,LESS_EQUAL,MINUS,MULTIPLY,OR,OR_OR,PLUS,REMAINDER,\n\t\t\t\tRIGHT_SHIFT,UNSIGNED_RIGHT_SHIFT,XOR};\n\t\n\t\tclass Decode {\n\t\t\tpublic final String constant(int code){\n\t\t\t\tswitch(code){ \n\t\t\t\t\tcase T_boolean \t: return \"true\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_byte\t\t: return \"((byte) 3)\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_char\t\t: return \"'A'\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_double\t: return \"300.0d\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_float\t: return \"100.0f\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_int\t\t: return \"1\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_long\t\t: return \"7L\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_JavaLangString\t: return \"\\\"hello-world\\\"\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_null\t\t: return \"null\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_short\t: return \"((short) 5)\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_JavaLangObject\t: return \"null\";} //$NON-NLS-1$\n\t\t\t\treturn \"\";} //$NON-NLS-1$\n\t\n\t\t\tpublic final String type(int code){\n\t\t\t\tswitch(code){ \n\t\t\t\t\tcase T_boolean \t: return \"z\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_byte\t\t: return \"b\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_char\t\t: return \"c\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_double\t: return \"d\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_float\t: return \"f\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_int\t\t: return \"i\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_long\t\t: return \"l\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_JavaLangString\t: return \"str\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_null\t\t: return \"null\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_short\t: return \"s\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_JavaLangObject\t: return \"obj\";} //$NON-NLS-1$\n\t\t\t\treturn \"xxx\";} //$NON-NLS-1$\n\t\t\t\n\t\t\tpublic final String operator(int operator){\n\t\t\t\t\tswitch (operator) {\n\t\t\t\t\tcase EQUAL_EQUAL :\treturn \"==\"; //$NON-NLS-1$\n\t\t\t\t\tcase LESS_EQUAL :\treturn \"<=\"; //$NON-NLS-1$\n\t\t\t\t\tcase GREATER_EQUAL :return \">=\"; //$NON-NLS-1$\n\t\t\t\t\tcase LEFT_SHIFT :\treturn \"<<\"; //$NON-NLS-1$\n\t\t\t\t\tcase RIGHT_SHIFT :\treturn \">>\"; //$NON-NLS-1$\n\t\t\t\t\tcase UNSIGNED_RIGHT_SHIFT :\treturn \">>>\"; //$NON-NLS-1$\n\t\t\t\t\tcase OR_OR :return \"||\"; //$NON-NLS-1$\n\t\t\t\t\tcase AND_AND :\t\treturn \"&&\"; //$NON-NLS-1$\n\t\t\t\t\tcase PLUS :\t\t\treturn \"+\"; //$NON-NLS-1$\n\t\t\t\t\tcase MINUS :\t\treturn \"-\"; //$NON-NLS-1$\n\t\t\t\t\tcase NOT :\t\t\treturn \"!\"; //$NON-NLS-1$\n\t\t\t\t\tcase REMAINDER :\treturn \"%\"; //$NON-NLS-1$\n\t\t\t\t\tcase XOR :\t\t\treturn \"^\"; //$NON-NLS-1$\n\t\t\t\t\tcase AND :\t\t\treturn \"&\"; //$NON-NLS-1$\n\t\t\t\t\tcase MULTIPLY :\t\treturn \"*\"; //$NON-NLS-1$\n\t\t\t\t\tcase OR :\t\t\treturn \"|\"; //$NON-NLS-1$\n\t\t\t\t\tcase TWIDDLE :\t\treturn \"~\"; //$NON-NLS-1$\n\t\t\t\t\tcase DIVIDE :\t\treturn \"/\"; //$NON-NLS-1$\n\t\t\t\t\tcase GREATER :\t\treturn \">\"; //$NON-NLS-1$\n\t\t\t\t\tcase LESS :\t\t\treturn \"<\";\t} //$NON-NLS-1$\n\t\t\t\treturn \"????\";} //$NON-NLS-1$\n\t\t}\n\t\n\t\t\t\n\t\tDecode decode = new Decode();\n\t\tString s;\n\t\n\t\ts = \"\\tpublic static void binaryOperationTablesTestCase(){\\n\" + //$NON-NLS-1$\n\t\n\t\t\t\"\\t\\t//TC test : all binary operation (described in tables)\\n\"+ //$NON-NLS-1$\n\t\t\t\"\\t\\t//method automatically generated by\\n\"+ //$NON-NLS-1$\n\t\t\t\"\\t\\t//org.eclipse.jdt.internal.compiler.ast.OperatorExpression.generateTableTestCase();\\n\"+ //$NON-NLS-1$\n\t\t\n\t\t\t\"\\t\\tString str0;\\t String str\\t= \"+decode.constant(T_JavaLangString)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\t\\tint i0;\\t int i\\t= \"+decode.constant(T_int)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\t\\tboolean z0;\\t boolean z\\t= \"+decode.constant(T_boolean)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\t\\tchar c0; \\t char c\\t= \"+decode.constant(T_char)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\t\\tfloat f0; \\t float f\\t= \"+decode.constant(T_float)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\t\\tdouble d0;\\t double d\\t= \"+decode.constant(T_double)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\t\\tbyte b0; \\t byte b\\t= \"+decode.constant(T_byte)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\t\\tshort s0; \\t short s\\t= \"+decode.constant(T_short)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\t\\tlong l0; \\t long l\\t= \"+decode.constant(T_long)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\t\\tObject obj0; \\t Object obj\\t= \"+decode.constant(T_JavaLangObject)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\n\"; //$NON-NLS-1$\n\t\n\t\tint error = 0;\t\t\n\t\tfor (int i=0; i < operators.length; i++)\n\t\t{\tint operator = operators[i];\n\t\t\tfor (int left=0; left<16;left++)\n\t\t\tfor (int right=0; right<16;right++)\n\t\t\t{\tint result = (OperatorSignatures[operator][(left<<4)+right]) & 0x0000F;\n\t\t\t\tif (result != T_undefined)\n\t\n\t\t\t\t\t//1/ First regular computation then 2/ comparaison\n\t\t\t\t\t//with a compile time constant (generated by the compiler)\n\t\t\t\t\t//\tz0 = s >= s;\n\t\t\t\t\t//\tif ( z0 != (((short) 5) >= ((short) 5)))\n\t\t\t\t\t//\t\tSystem.out.println(155);\n\t\n\t\t\t\t{\ts += \"\\t\\t\"+decode.type(result)+\"0\"+\" = \"+decode.type(left); //$NON-NLS-1$ //$NON-NLS-3$ //$NON-NLS-2$\n\t\t\t\t\ts += \" \"+decode.operator(operator)+\" \"+decode.type(right)+\";\\n\"; //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-3$\n\t\t\t\t\tString begin = result == T_JavaLangString ? \"\\t\\tif (! \" : \"\\t\\tif ( \"; //$NON-NLS-2$ //$NON-NLS-1$\n\t\t\t\t\tString test = result == T_JavaLangString ? \".equals(\" : \" != (\"; //$NON-NLS-2$ //$NON-NLS-1$\n\t\t\t\t\ts += begin\t+decode.type(result)+\"0\"+test //$NON-NLS-1$\n\t\t\t\t\t\t\t\t+decode.constant(left)+\" \" //$NON-NLS-1$\n\t\t\t\t\t\t\t\t+decode.operator(operator)+\" \" //$NON-NLS-1$\n\t\t\t\t\t\t\t\t+decode.constant(right)+\"))\\n\"; //$NON-NLS-1$\n\t\t\t\t\ts += \"\\t\\t\\tSystem.out.println(\"+ (++error) +\");\\n\"; //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\treturn s += \"\\n\\t\\tSystem.out.println(\\\"binary tables test : done\\\");}\"; //$NON-NLS-1$\n\t}", "protected void generateFromAndWhere( SQLQueryModel query, List<LogicalTable> usedBusinessTables, LogicalModel model,\n Path path, List<Constraint> conditions, Map<LogicalTable, String> tableAliases,\n Map<Constraint, SqlOpenFormula> constraintFormulaMap, Map<String, Object> parameters,\n boolean genAsPreparedStatement, DatabaseMeta databaseMeta, String locale ) throws PentahoMetadataException {\n\n // Boolean delayConditionOnOuterJoin = null;\n // Object val = null;\n // FROM TABLES\n for ( int i = 0; i < usedBusinessTables.size(); i++ ) {\n LogicalTable businessTable = usedBusinessTables.get( i );\n String schemaName = null;\n if ( businessTable.getProperty( SqlPhysicalTable.TARGET_SCHEMA ) != null ) {\n schemaName = databaseMeta.quoteField( (String) businessTable.getProperty( SqlPhysicalTable.TARGET_SCHEMA ) );\n }\n // ToDo: Allow table-level override of delaying conditions.\n // val = businessTable.getProperty(\"delay_table_outer_join_conditions\");\n // if ( (val != null) && (val instanceof Boolean) ) {\n // delayConditionOnOuterJoin = (Boolean)val;\n // } else {\n // delayConditionOnOuterJoin = null;\n // }\n\n // This code allows subselects to drive the physical model.\n // TODO: make this key off a metadata flag vs. the\n // beginning of the table name.\n\n String tableName = (String) businessTable.getProperty( SqlPhysicalTable.TARGET_TABLE );\n TargetTableType type = (TargetTableType) businessTable.getProperty( SqlPhysicalTable.TARGET_TABLE_TYPE );\n if ( type == TargetTableType.INLINE_SQL ) {\n tableName = \"(\" + tableName + \")\"; //$NON-NLS-1$ //$NON-NLS-2$\n } else {\n tableName = databaseMeta.getQuotedSchemaTableCombination( schemaName, tableName );\n }\n query.addTable( tableName, databaseMeta.quoteField( tableAliases.get( businessTable ) ) );\n }\n\n // JOIN CONDITIONS\n if ( path != null ) {\n for ( int i = 0; i < path.size(); i++ ) {\n LogicalRelationship relation = path.getRelationship( i );\n String joinFormula =\n getJoin( model, relation, tableAliases, parameters, genAsPreparedStatement, databaseMeta, locale );\n String joinOrderKey = relation.getJoinOrderKey();\n JoinType joinType;\n switch ( RelationshipType.getJoinType( relation.getRelationshipType() ) ) {\n case LEFT_OUTER:\n joinType = JoinType.LEFT_OUTER_JOIN;\n break;\n case RIGHT_OUTER:\n joinType = JoinType.RIGHT_OUTER_JOIN;\n break;\n case FULL_OUTER:\n joinType = JoinType.FULL_OUTER_JOIN;\n break;\n default:\n joinType = JoinType.INNER_JOIN;\n break;\n }\n\n String leftTableName =\n databaseMeta.getQuotedSchemaTableCombination( (String) relation.getFromTable().getProperty(\n SqlPhysicalTable.TARGET_SCHEMA ), (String) relation.getFromTable().getProperty(\n SqlPhysicalTable.TARGET_TABLE ) );\n String leftTableAlias = databaseMeta.quoteField( tableAliases.get( relation.getFromTable() ) );\n String rightTableName =\n databaseMeta.getQuotedSchemaTableCombination( (String) relation.getToTable().getProperty(\n SqlPhysicalTable.TARGET_SCHEMA ), (String) relation.getToTable().getProperty(\n SqlPhysicalTable.TARGET_TABLE ) );\n String rightTableAlias = databaseMeta.quoteField( tableAliases.get( relation.getToTable() ) );\n\n boolean legacyJoin = Boolean.TRUE.equals( model.getProperty( LEGACY_JOIN_ORDER ) );\n query.addJoin( leftTableName, leftTableAlias, rightTableName, rightTableAlias, joinType, joinFormula,\n joinOrderKey, legacyJoin );\n // query.addWhereFormula(joinFormula, \"AND\"); //$NON-NLS-1$\n }\n }\n\n // WHERE CONDITIONS\n if ( conditions != null ) {\n boolean first = true;\n for ( Constraint condition : conditions ) {\n SqlOpenFormula formula = constraintFormulaMap.get( condition );\n\n // Configure formula to use table aliases.\n formula.setTableAliases( tableAliases );\n\n // The ones with aggregates in it are for the HAVING clause.\n if ( !formula.hasAggregate() ) {\n\n String sqlFormula = formula.generateSQL( locale );\n String[] usedTables = formula.getLogicalTableIDs();\n query.addWhereFormula( sqlFormula, condition.getCombinationType().toString(), usedTables );\n first = false;\n } else {\n query.addHavingFormula( formula.generateSQL( locale ), condition.getCombinationType().toString() );\n }\n }\n }\n }", "public static SqlOperatorTable chain(Iterable<SqlOperatorTable> tables) {\n final ImmutableList<SqlOperatorTable> list =\n ImmutableList.copyOf(tables);\n if (list.size() == 1) {\n return list.get(0);\n }\n return new ChainedSqlOperatorTable(list);\n }", "Table getTable();", "@Override\n\tpublic Table resolve(ArrayList<Table> tables) throws InvalidQueryException {\n\t\tTable left = leftTable.resolve(tables);\n\t\tTable right = rightTable.resolve(tables);\n\t\t\n\t\tString tableNameLeft = left.getName();\n\t\tString tableNameRight = right.getName();\n\n\t\t\n\t\tString columnNameLeft = leftCell.getcolumnName();\n\t\tString columnNameRight = rightCell.getcolumnName();\n\t\t\n\t\tArrayList<Column> columnsLeft = left.getColumns();\n\t\tArrayList<Column> columnsRight = right.getColumns();\n\n\t\t//Find left column\n\t\tColumn leftColumn = columnsLeft.\n\t\t\t\t\t\t\tstream().\n\t\t\t\t\t\t\tfilter(c -> {\n\t\t\t\t\t\t\t\tDebugPrinter.print(\"Found: \"+c.getName());\n\t\t\t\t\t\t\t\tDebugPrinter.print(\"Searching for: \"+tableNameLeft+\".\"+columnNameLeft);\n\t\t\t\t\t\t\t\treturn c.getName().equals(tableNameLeft+\".\"+columnNameLeft);\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.findFirst().\n\t\t\t\t\t\t\torElseThrow(() -> new InvalidQueryException(\"Unable to find column \"+columnNameLeft+\" in JOIN clause\"));\n\t\t\n\t\t//Find right column\n\t\tColumn rightColumn = columnsRight.\n\t\t\t\tstream().\n\t\t\t\tfilter(c -> {\n\t\t\t\t\treturn c.getName().equals(tableNameRight+\".\"+columnNameRight);\n\t\t\t\t}).\n\t\t\t\tfindFirst().\n\t\t\t\torElseThrow(() -> new InvalidQueryException(\"Unable to find column \"+columnNameRight+\" in JOIN clause\"));\n\n\t\t\n\t\tArrayList<RowPair> matches = new ArrayList<>();\n\t\t\n\t\t//Find rows that match, save as tuples (i1, i2)\n\t\tfor (int i=0; i<leftColumn.getCells().size();i++) {\n\t\t\tfor (int j=0; j<rightColumn.getCells().size();j++) {\n\t\t\t\tif (leftColumn.getCells().get(i).getValue().equals(rightColumn.getCells().get(j).getValue())){\n\t\t\t\t\tmatches.add(new RowPair(i,j));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Create clones of the necessary columns, omitting one of \n\t\t//the columns used to join\n\t\tArrayList<Column> newColumns = new ArrayList<Column>();\n\t\tcolumnsLeft.stream()\n\t\t\t\t .forEach((c) -> createDuplicateColumn(tableNameLeft,c, newColumns));\n\t\tcolumnsRight.stream()\n\t\t\t\t\t.filter((c)->!c.getName().equals(tableNameRight+\".\"+columnNameRight))\n\t\t\t\t\t.forEach((c) -> createDuplicateColumn(tableNameRight,c,newColumns));\n\t\t\n\t\tStoredTable t = new StoredTable(left.getName());\n\t\tt.addAllColumns(newColumns);\n\t\t\n\t\t//Build new table from the list of matches (i1,i2)\n\t\tfor (RowPair p : matches) {\n\t\t\tArrayList<Cell> leftCells = left.getRowByIndex(p.getLeftIndex(),\"\");\n\t\t\tArrayList<Cell> rightCells = right.getRowByIndex(p.getRightIndex(),tableNameRight+\".\"+columnNameRight);\n\t\t\tArrayList<Cell> newRow = new ArrayList<Cell>(leftCells);\n\t\t\tnewRow.addAll(rightCells);\n\t\t\tt.addRow(newRow);\n\t\t}\n\t\tDebugPrinter.print(\"End JOIN\");\n\t\treturn t;\n\t}", "private static String[] getTwoExpr(String expr, String op) {\n\t\t\n\t\tString[] exprArr = new String[2]; \n\t\t\n\t\tint commaPos = SyntaxChecker.checkMatchedParansAndReturnNextDelim(expr, op.length() + 1, ',');\n\t\tString expr1 = expr.substring(op.length() + 1, commaPos);\n\t\texprArr[0] = expr1;\n\t\t\n\t\tint endPos = SyntaxChecker.checkMatchedParansAndReturnNextDelim(expr, commaPos + 1, ')');\n\t\tString expr2 = expr.substring(commaPos + 1, endPos);\n\t\texprArr[1] = expr2;\n\t\t\n\t\treturn exprArr;\n\t}", "public static HashMap fetchTable(Logger logger, Statement s, int compone, int comptwo) {\n confirmTableExistence(logger,s);\n int x = compone; int y = comptwo;\n if (comptwo < compone) { x = comptwo; y = compone; }\n \n HashMap retval = new HashMap();\n try {\n ResultSet rs = s.executeQuery(\"select * from \"+\n\t\t\t\t DGPSPConstants.STATUS_TABLE\n\t\t\t\t +\" where (\"+\n\t\t\t\t \"runone = '\"+x+\"' and runtwo = '\"+y+\"')\"+\n\t\t\t\t \" or (runone = '\"+x+\"' and runtwo = '\"+x+\"')\"+\n\t\t\t\t \" or (runone = '\"+y+\"' and runtwo = '\"+y+\"')\");\n while (rs.next()) {\n\tretval.put(generateKey(rs.getInt(2),rs.getInt(3),rs.getInt(4)),\n\t\t Contrastor.RESULTS[rs.getInt(5)]);\n }\n } catch (SQLException e){\n logger.logMessage(Logger.ERROR,Logger.DB_QUERY,\n\t\t\t\"Problem querying status table\",e);\n }\n return retval;\n }", "public HashMap<String,LinkedList<String>> splitWhere() {\n\n LinkedList<String> where = new LinkedList<>(whereClause);\n LinkedList<String> referencingRelations;\n LinkedList<MyRelation> relations;\n String temp;\n optimizedWhere = new HashMap<>();\n\n String whereString = new String(myHelper.getWhereFields(where));\n String[] whereParts = whereString.split(\"(?i)and\");\n\n //Iterates through all the parts divided by \"AND\"\n for (int i=0; i<whereParts.length; i++) {\n\n referencingRelations = new LinkedList<>();\n String symbol = myHelper.getSymbol(whereParts[i]);\n\n if(symbol != null) {\n String[] equationParts = whereParts[i].split(symbol);\n String condition = null;\n\n //For every side of the \"=\" sing.\n for(int j=0; j<equationParts.length; j++) {\n //Removes white spaces if any.\n equationParts[j] = equationParts[j].replaceAll(\"\\\\s\",\"\");\n\n //if there is a referencing table stores the table and and the field used is temporarily stored.\n if(equationParts[j].contains(\".\")) {\n referencingRelations.addLast(equationParts[j].substring(0, equationParts[j].indexOf(\".\")));\n temp = equationParts[j].substring(equationParts[j].indexOf(\".\")+1);\n\n }else {\n //if no \".\" p simeni en ksero se pio relation kamni reference enna to psaxo p to schema !!\n relations = schema.getRelations();\n String name = myHelper.getRelationNameOnField(equationParts[j],relations,newTablesFromCanonical);\n\n //if name is a field name add the table name to the referencing\n if(name != null) {\n referencingRelations.addLast(name);\n temp = equationParts[j];\n }\n else\n temp = equationParts[j].substring(equationParts[j].indexOf(\".\")+1);\n }\n if(j!= equationParts.length-1)\n condition = temp + symbol;\n else condition = condition + temp;\n }\n optimizedWhere.put(condition,referencingRelations);\n }\n }\n return optimizedWhere;\n }", "public interface IQueryResolver {\n List<Field> equalCondition = new ArrayList();\n List<Field> greaterEqualCondition = new ArrayList();\n List<Field> lesserEqualCondition = new ArrayList();\n\n String getTableName();\n}", "public List<String> getBodyTables() {\r\n\t\tList<String> tableNames = new ArrayList<String>();\r\n\t\tfor (Atom a: getBody()) {\r\n\t\t\tif(!a.isNeg() && !a.isSkolem())\r\n\t\t\t\ttableNames.add(a.toString3());\r\n\t\t}\r\n\t\treturn tableNames;\r\n\t}", "private List<Table> getTables() {\n List<Table> tables = new ArrayList<>();\n\n DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n Query query = new Query(\"Table\");\n PreparedQuery results = datastore.prepare(query);\n\n for (Entity entity : results.asIterable()) {\n String firstName = (String) entity.getProperty(\"firstName\");\n String lastName = (String) entity.getProperty(\"lastName\");\n String email = (String) entity.getProperty(\"email\");\n String phoneNumber = (String) entity.getProperty(\"phoneNumber\");\n String restName = (String) entity.getProperty(\"restName\");\n String restAdd = (String) entity.getProperty(\"restAdd\");\n String restDescrip = (String) entity.getProperty(\"restDescrip\");\n String dateTime = (String) entity.getProperty(\"dateTime\");\n String maxSize = (String) entity.getProperty(\"maxSize\");\n String otherNotes = (String) entity.getProperty(\"otherNotes\");\n List members = (List) entity.getProperty(\"members\");\n double lat = (double) entity.getProperty(\"lat\");\n double lng = (double) entity.getProperty(\"lng\");\n\n\n \n\n Table table = new Table(firstName, lastName, email, phoneNumber, restName, restAdd, restDescrip, dateTime, maxSize, otherNotes, members, lat, lng);\n tables.add(table);\n }\n return tables;\n }", "private static List<Table<?>> getTablesFromContext(final DSLContext dslContext, final List<String> constraints) {\n final Set<String> accessedTableNames = new HashSet<>();\n constraints.forEach(constraint -> {\n final ViewsWithChecks viewsWithChecks = ViewsWithChecks.fromString(constraint);\n final ExtractAccessedTables visitor = new ExtractAccessedTables(accessedTableNames);\n visitor.process(viewsWithChecks.getCreateView());\n viewsWithChecks.getCheckExpression().ifPresent(visitor::process);\n });\n\n final Meta dslMeta = dslContext.meta();\n final List<Table<?>> tables = new ArrayList<>();\n for (final Table<?> t : dslMeta.getTables()) {\n // Only access the tables that are referenced by the constraints.\n if (accessedTableNames.contains(t.getName())) {\n tables.add(t);\n\n // Also add tables referenced by foreign keys.\n t.getReferences().forEach(\n fk -> tables.add(fk.getKey().getTable())\n );\n }\n }\n return tables;\n }", "@Override\n protected ASTNode getTargetTableNode(ASTNode tree) {\n ASTNode tabName = (ASTNode)tree.getChild(0);\n assert tabName.getToken().getType() == HiveParser.TOK_TABNAME :\n \"Expected tablename as first child of \" + operation + \" but found \" + tabName.getName();\n return tabName;\n }", "public ATExpression base_tableExpression();", "public JoinedTable[] getJoinedTables();", "public List<Table> getQueryDependTables() {\n return queryDependTables;\n }", "public static final int[] get_EQUAL_EQUAL(){\n\t\t\n\t\tint[] table = new int[16*16];\n\t\t\n\t\t//\ttable[(T_undefined<<4)+T_undefined] \t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_byte] \t\t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_long] \t\t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_short] \t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_void] \t\t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_String] \t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_Object] \t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_double] \t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_float] \t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_boolean] \t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_char] \t\t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_int] \t\t\t= T_undefined;\n\t\t//\ttable[(T_undefined<<4)+T_null] \t\t\t= T_undefined;\n\t\t\n\t\t//\ttable[(T_byte<<4)+T_undefined] \t= T_undefined;\n\t\ttable[(T_byte<<4)+T_byte] \t\t= (Byte2Int<<12)+(Byte2Int<<4)+T_boolean;\n\t\ttable[(T_byte<<4)+T_long] \t\t= (Byte2Long<<12)+(Long2Long<<4)+T_boolean;\n\t\ttable[(T_byte<<4)+T_short] \t\t= (Byte2Int<<12)+(Short2Int<<4)+T_boolean;\n\t\t//\ttable[(T_byte<<4)+T_void] \t\t= T_undefined;\n\t\t//\ttable[(T_byte<<4)+T_String] \t= T_undefined;\n\t\t//\ttable[(T_byte<<4)+T_Object] \t= T_undefined;\n\t\ttable[(T_byte<<4)+T_double] \t= (Byte2Double<<12)+(Double2Double<<4)+T_boolean;\n\t\ttable[(T_byte<<4)+T_float] \t\t= (Byte2Float<<12)+(Float2Float<<4)+T_boolean;\n\t\t//\ttable[(T_byte<<4)+T_boolean] \t= T_undefined;\n\t\ttable[(T_byte<<4)+T_char] \t\t= (Byte2Int<<12)+(Char2Int<<4)+T_boolean;\n\t\ttable[(T_byte<<4)+T_int] \t\t= (Byte2Int<<12)+(Int2Int<<4)+T_boolean;\n\t\t//\ttable[(T_byte<<4)+T_null] \t\t= T_undefined;\n\t\n\t\t//\ttable[(T_long<<4)+T_undefined] \t= T_undefined;\n\t\ttable[(T_long<<4)+T_byte] \t\t= (Long2Long<<12)+(Byte2Long<<4)+T_boolean;\n\t\ttable[(T_long<<4)+T_long] \t\t= (Long2Long<<12)+(Long2Long<<4)+T_boolean;\n\t\ttable[(T_long<<4)+T_short] \t\t= (Long2Long<<12)+(Short2Long<<4)+T_boolean;\n\t\t//\ttable[(T_long<<4)+T_void] \t\t= T_undefined;\n\t\t//\ttable[(T_long<<4)+T_String] \t= T_undefined;\n\t\t//\ttable[(T_long<<4)+T_Object] \t= T_undefined;\n\t\ttable[(T_long<<4)+T_double] \t= (Long2Double<<12)+(Double2Double<<4)+T_boolean;\n\t\ttable[(T_long<<4)+T_float] \t\t= (Long2Float<<12)+(Float2Float<<4)+T_boolean;\n\t\t//\ttable[(T_long<<4)+T_boolean] \t= T_undefined;\n\t\ttable[(T_long<<4)+T_char] \t\t= (Long2Long<<12)+(Char2Long<<4)+T_boolean;\n\t\ttable[(T_long<<4)+T_int] \t\t= (Long2Long<<12)+(Int2Long<<4)+T_boolean;\n\t\t//\ttable[(T_long<<4)+T_null] \t\t= T_undefined;\n\t\n\t\t//\ttable[(T_short<<4)+T_undefined] \t= T_undefined;\n\t\ttable[(T_short<<4)+T_byte] \t\t\t= (Short2Int<<12)+(Byte2Int<<4)+T_boolean;\n\t\ttable[(T_short<<4)+T_long] \t\t\t= (Short2Long<<12)+(Long2Long<<4)+T_boolean;\n\t\ttable[(T_short<<4)+T_short] \t\t= (Short2Int<<12)+(Short2Int<<4)+T_boolean;\n\t\t//\ttable[(T_short<<4)+T_void] \t\t\t= T_undefined;\n\t\t//\ttable[(T_short<<4)+T_String] \t\t= T_undefined;\n\t\t//\ttable[(T_short<<4)+T_Object] \t\t= T_undefined;\n\t\ttable[(T_short<<4)+T_double] \t\t= (Short2Double<<12)+(Double2Double<<4)+T_boolean;\n\t\ttable[(T_short<<4)+T_float] \t\t= (Short2Float<<12)+(Float2Float<<4)+T_boolean;\n\t\t//\ttable[(T_short<<4)+T_boolean] \t\t= T_undefined;\n\t\ttable[(T_short<<4)+T_char] \t\t\t= (Short2Int<<12)+(Char2Int<<4)+T_boolean;\n\t\ttable[(T_short<<4)+T_int] \t\t\t= (Short2Int<<12)+(Int2Int<<4)+T_boolean;\n\t\t//\ttable[(T_short<<4)+T_null] \t\t\t= T_undefined;\n\t\t\n\t\t//\ttable[(T_void<<4)+T_undefined] \t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_byte] \t\t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_long] \t\t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_short] \t\t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_void] \t\t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_String] \t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_Object] \t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_double] \t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_float] \t\t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_boolean] \t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_char] \t\t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_int] \t\t= T_undefined;\n\t\t//\ttable[(T_void<<4)+T_null] \t\t= T_undefined;\n\t\t\n\t\t//\ttable[(T_String<<4)+T_undefined] \t= T_undefined; \n\t\t//\ttable[(T_String<<4)+T_byte] \t\t= T_undefined;\n\t\t//\ttable[(T_String<<4)+T_long] \t\t= T_undefined; \n\t\t//\ttable[(T_String<<4)+T_short] \t\t= T_undefined;\n\t\t//\ttable[(T_String<<4)+T_void] \t\t= T_undefined;\n\t\ttable[(T_JavaLangString<<4)+T_JavaLangString] \t\t= /*String2Object String2Object*/\n\t\t\t\t\t\t\t\t\t\t\t (T_JavaLangObject<<16)+(T_JavaLangString<<12)+(T_JavaLangObject<<8)+(T_JavaLangString<<4)+T_boolean;\n\t\ttable[(T_JavaLangString<<4)+T_JavaLangObject] \t\t= /*String2Object Object2Object*/\n\t\t\t\t\t\t\t\t\t\t\t (T_JavaLangObject<<16)+(T_JavaLangString<<12)+(T_JavaLangObject<<8)+(T_JavaLangObject<<4)+T_boolean;\n\t\t//\ttable[(T_String<<4)+T_double] \t\t= T_undefined;\n\t\t//\ttable[(T_String<<4)+T_float] \t\t= T_undefined; \n\t\t//\ttable[(T_String<<4)+T_boolean] \t\t= T_undefined;\n\t\t//\ttable[(T_String<<4)+T_char] \t\t= T_undefined;\n\t\t//\ttable[(T_String<<4)+T_int] \t\t\t= T_undefined;\n\t\ttable[(T_JavaLangString<<4)+T_null] \t\t= /*Object2String null2Object */\n\t\t\t\t\t\t\t\t\t\t\t (T_JavaLangObject<<16)+(T_JavaLangString<<12)+(T_JavaLangObject<<8)+(T_null<<4)+T_boolean;\n\t\n\t\t//\ttable[(T_Object<<4)+T_undefined] \t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_byte] \t\t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_long] \t\t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_short]\t\t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_void] \t\t= T_undefined;\n\t\ttable[(T_JavaLangObject<<4)+T_JavaLangString] \t\t= /*Object2Object String2Object*/\n\t\t\t\t\t\t\t\t\t\t\t (T_JavaLangObject<<16)+(T_JavaLangObject<<12)+(T_JavaLangObject<<8)+(T_JavaLangString<<4)+T_boolean;\n\t\ttable[(T_JavaLangObject<<4)+T_JavaLangObject] \t\t= /*Object2Object Object2Object*/\n\t\t\t\t\t\t\t\t\t\t\t (T_JavaLangObject<<16)+(T_JavaLangObject<<12)+(T_JavaLangObject<<8)+(T_JavaLangObject<<4)+T_boolean;\n\t\t//\ttable[(T_Object<<4)+T_double] \t\t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_float] \t\t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_boolean]\t\t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_char] \t\t= T_undefined;\n\t\t//\ttable[(T_Object<<4)+T_int] \t\t\t= T_undefined;\n\t\ttable[(T_JavaLangObject<<4)+T_null] \t\t= /*Object2Object null2Object*/\n\t\t\t\t\t\t\t\t\t\t\t (T_JavaLangObject<<16)+(T_JavaLangObject<<12)+(T_JavaLangObject<<8)+(T_null<<4)+T_boolean;\n\t\n\t\t//\ttable[(T_double<<4)+T_undefined] \t= T_undefined;\n\t\ttable[(T_double<<4)+T_byte] \t\t= (Double2Double<<12)+(Byte2Double<<4)+T_boolean;\n\t\ttable[(T_double<<4)+T_long] \t\t= (Double2Double<<12)+(Long2Double<<4)+T_boolean;\n\t\ttable[(T_double<<4)+T_short] \t\t= (Double2Double<<12)+(Short2Double<<4)+T_boolean;\n\t\t//\ttable[(T_double<<4)+T_void] \t\t= T_undefined;\n\t\t//\ttable[(T_double<<4)+T_String] \t\t= T_undefined;\n\t\t//\ttable[(T_double<<4)+T_Object] \t\t= T_undefined;\n\t\ttable[(T_double<<4)+T_double] \t\t= (Double2Double<<12)+(Double2Double<<4)+T_boolean;\n\t\ttable[(T_double<<4)+T_float] \t\t= (Double2Double<<12)+(Float2Double<<4)+T_boolean;\n\t\t//\ttable[(T_double<<4)+T_boolean] \t\t= T_undefined;\n\t\ttable[(T_double<<4)+T_char] \t\t= (Double2Double<<12)+(Char2Double<<4)+T_boolean;\n\t\ttable[(T_double<<4)+T_int] \t\t\t= (Double2Double<<12)+(Int2Double<<4)+T_boolean;\n\t\t//\ttable[(T_double<<4)+T_null] \t\t= T_undefined;\n\t\n\t\t//\ttable[(T_float<<4)+T_undefined] \t= T_undefined;\n\t\ttable[(T_float<<4)+T_byte] \t\t\t= (Float2Float<<12)+(Byte2Float<<4)+T_boolean;\n\t\ttable[(T_float<<4)+T_long] \t\t\t= (Float2Float<<12)+(Long2Float<<4)+T_boolean;\n\t\ttable[(T_float<<4)+T_short] \t\t= (Float2Float<<12)+(Short2Float<<4)+T_boolean;\n\t\t//\ttable[(T_float<<4)+T_void] \t\t\t= T_undefined;\n\t\t//\ttable[(T_float<<4)+T_String] \t\t= T_undefined;\n\t\t//\ttable[(T_float<<4)+T_Object] \t\t= T_undefined;\n\t\ttable[(T_float<<4)+T_double] \t\t= (Float2Double<<12)+(Double2Double<<4)+T_boolean;\n\t\ttable[(T_float<<4)+T_float] \t\t= (Float2Float<<12)+(Float2Float<<4)+T_boolean;\n\t\t//\ttable[(T_float<<4)+T_boolean] \t\t= T_undefined;\n\t\ttable[(T_float<<4)+T_char] \t\t\t= (Float2Float<<12)+(Char2Float<<4)+T_boolean;\n\t\ttable[(T_float<<4)+T_int] \t\t\t= (Float2Float<<12)+(Int2Float<<4)+T_boolean;\n\t\t//\ttable[(T_float<<4)+T_null] \t\t\t= T_undefined;\n\t\t\n\t\t//\ttable[(T_boolean<<4)+T_undefined] \t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_byte] \t\t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_long] \t\t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_short] \t\t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_void] \t\t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_String] \t\t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_Object] \t\t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_double] \t\t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_float] \t\t\t= T_undefined;\n\t\ttable[(T_boolean<<4)+T_boolean] \t\t= (Boolean2Boolean<<12)+(Boolean2Boolean<<4)+T_boolean;\n\t\t//\ttable[(T_boolean<<4)+T_char] \t\t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_int] \t\t\t= T_undefined;\n\t\t//\ttable[(T_boolean<<4)+T_null] \t\t\t= T_undefined;\n\t\t\t\n\t\t//\ttable[(T_char<<4)+T_undefined] \t\t= T_undefined;\n\t\ttable[(T_char<<4)+T_byte] \t\t\t= (Char2Int<<12)+(Byte2Int<<4)+T_boolean;\n\t\ttable[(T_char<<4)+T_long] \t\t\t= (Char2Long<<12)+(Long2Long<<4)+T_boolean;\n\t\ttable[(T_char<<4)+T_short] \t\t\t= (Char2Int<<12)+(Short2Int<<4)+T_boolean;\n\t\t//\ttable[(T_char<<4)+T_void] \t\t\t= T_undefined;\n\t\t//\ttable[(T_char<<4)+T_String] \t\t= T_undefined;\n\t\t//\ttable[(T_char<<4)+T_Object] \t\t= T_undefined;\n\t\ttable[(T_char<<4)+T_double] \t\t= (Char2Double<<12)+(Double2Double<<4)+T_boolean;\n\t\ttable[(T_char<<4)+T_float] \t\t\t= (Char2Float<<12)+(Float2Float<<4)+T_boolean;\n\t\t//\ttable[(T_char<<4)+T_boolean] \t\t= T_undefined;\n\t\ttable[(T_char<<4)+T_char] \t\t\t= (Char2Int<<12)+(Char2Int<<4)+T_boolean;\n\t\ttable[(T_char<<4)+T_int] \t\t\t= (Char2Int<<12)+(Int2Int<<4)+T_boolean;\n\t\t//\ttable[(T_char<<4)+T_null] \t\t\t= T_undefined;\n\t\t\t\n\t\t//\ttable[(T_int<<4)+T_undefined] \t= T_undefined;\n\t\ttable[(T_int<<4)+T_byte] \t\t= (Int2Int<<12)+(Byte2Int<<4)+T_boolean;\n\t\ttable[(T_int<<4)+T_long] \t\t= (Int2Long<<12)+(Long2Long<<4)+T_boolean;\n\t\ttable[(T_int<<4)+T_short] \t\t= (Int2Int<<12)+(Short2Int<<4)+T_boolean;\n\t\t//\ttable[(T_int<<4)+T_void] \t\t= T_undefined;\n\t\t//\ttable[(T_int<<4)+T_String] \t\t= T_undefined;\n\t\t//\ttable[(T_int<<4)+T_Object] \t\t= T_undefined;\n\t\ttable[(T_int<<4)+T_double] \t\t= (Int2Double<<12)+(Double2Double<<4)+T_boolean;\n\t\ttable[(T_int<<4)+T_float] \t\t= (Int2Float<<12)+(Float2Float<<4)+T_boolean;\n\t\t//\ttable[(T_int<<4)+T_boolean] \t= T_undefined;\n\t\ttable[(T_int<<4)+T_char] \t\t= (Int2Int<<12)+(Char2Int<<4)+T_boolean;\n\t\ttable[(T_int<<4)+T_int] \t\t= (Int2Int<<12)+(Int2Int<<4)+T_boolean;\n\t\t//\ttable[(T_int<<4)+T_null] \t\t= T_undefined;\n\t\t\n\t\t//\ttable[(T_null<<4)+T_undefined] \t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_byte] \t\t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_long] \t\t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_short] \t\t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_void] \t\t\t= T_undefined;\n\t\ttable[(T_null<<4)+T_JavaLangString] \t\t= /*null2Object String2Object*/\n\t\t\t\t\t\t\t\t\t\t\t (T_JavaLangObject<<16)+(T_null<<12)+(T_JavaLangObject<<8)+(T_JavaLangString<<4)+T_boolean;\n\t\ttable[(T_null<<4)+T_JavaLangObject] \t\t= /*null2Object Object2Object*/\n\t\t\t\t\t\t\t\t\t\t\t (T_JavaLangObject<<16)+(T_null<<12)+(T_JavaLangObject<<8)+(T_JavaLangObject<<4)+T_boolean; \n\t\t//\ttable[(T_null<<4)+T_double] \t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_float] \t\t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_boolean] \t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_char] \t\t\t= T_undefined;\n\t\t//\ttable[(T_null<<4)+T_int] \t\t\t= T_undefined;\n\t\ttable[(T_null<<4)+T_null] \t\t\t= /*null2Object null2Object*/\n\t\t\t\t\t\t\t\t\t\t\t (T_JavaLangObject<<16)+(T_null<<12)+(T_JavaLangObject<<8)+(T_null<<4)+T_boolean;\n\t\treturn table;\n\t}", "public String[] getSortConditionTable()\n\t{\n\t\tKey[] karray = new Key[_searchKeyList.size()] ;\n\n\t\t_searchKeyList.copyInto(karray) ;\n\t\tfor (int i = 0; i < karray.length; i++)\n\t\t{\n\t\t\tfor (int j = i; j < karray.length; j++)\n\t\t\t{\n\t\t\t\tif (karray[i].getTableOrder() > karray[j].getTableOrder())\n\t\t\t\t{\n\t\t\t\t\tKey ktmp = karray[i] ;\n\t\t\t\t\tkarray[i] = karray[j] ;\n\t\t\t\t\tkarray[j] = ktmp ;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tString stbf = \"\" ;\n\t\tVector vec = new Vector();\n\t\t\n\n\t\tfor (int i = 0; i < karray.length; i++)\n\t\t{\n\t\t\tif (karray[i].getTableOrder() > 0)\n\t\t\t{\n\t\t\t\tstbf = Integer.toString(karray[i].getTableOrder()) + \",\" + karray[i].getTableColumn() ;\n\t\t\t\t//#CM708962\n\t\t\t\t// The descending key word is set for the descending order. \n\t\t\t\tif (karray[i].getTableDesc() == false)\n\t\t\t\t{\n\t\t\t\t\tstbf = stbf + \" DESC\" ;\n\t\t\t\t}\n\t\t\t\tvec.addElement(stbf);\n\t\t\t}\n\t\t}\n\n\t\t//#CM708963\n\t\t// Return the content of Vector. \n\t\tString[] rStr = new String[vec.size()];\n\t\tvec.copyInto(rStr);\n\t\treturn rStr ;\n\t}", "private ResultSet constructLogicalTable(TriplesMap triplesMap)\n \t\t\tthrows SQLException {\n \t\tlog.debug(\"[R2RMLEngine:constructLogicalTable] Run effective SQL Query : \"\n \t\t\t\t+ triplesMap.getLogicalTable().getEffectiveSQLQuery());\n \t\tResultSet rs = null;\n \t\tjava.sql.Statement s = conn.createStatement(\n \t\t\t\tResultSet.HOLD_CURSORS_OVER_COMMIT, ResultSet.CONCUR_READ_ONLY);\n \t\tif (triplesMap.getLogicalTable().getEffectiveSQLQuery() != null) {\n \n \t\t\ts.executeQuery(triplesMap.getLogicalTable().getEffectiveSQLQuery());\n \t\t\trs = s.getResultSet();\n \t\t\tif (rs == null)\n \t\t\t\tthrow new IllegalStateException(\n \t\t\t\t\t\t\"[R2RMLEngine:constructLogicalTable] SQL request \"\n \t\t\t\t\t\t\t\t+ \"failed : result of effective SQL query is null.\");\n \n \t\t} else {\n \t\t\tthrow new IllegalStateException(\n \t\t\t\t\t\"[R2RMLEngine:constructLogicalTable] No effective SQL query has been found.\");\n \t\t}\n \t\t// Commit to held logical table (read-only)\n \t\tconn.setAutoCommit(false);\n \t\tconn.commit();\n \t\treturn rs;\n \t}", "private static TempTable crossProductPair(Table one, Table two) throws ProcessorException {\n\t\ttry {\n\t\t\t// Define product table\n\t\t\tTempTable tempTable = new TempTable(one.getDatabase());\n\t\t\tfor (FieldDefinition fd : one.getFields()) {\n\t\t\t\ttempTable.addField(fd);\n\t\t\t}\n\t\t\tfor (FieldDefinition fd : two.getFields()) {\n\t\t\t\ttempTable.addField(fd);\n\t\t\t}\n\t\t\t\n\t\t\t// Create and load definition into memory\n\t\t\ttempTable.create();\n\t\t\t\n\t\t\t// Populate table with product rows\n\t\t\tClass<?> tempDef = tempTable.getDefinition();\n\t\t\tfor (Tuple oneRow : one.getTuples2()) {\n\t\t\t\t\n\t\t\t\t// Get fields from table one\n\t\t\t\tClass<?> fieldDef = oneRow.getData().getClass();\n\t\t\t\tField[] attrDef = fieldDef.getFields();\n\t\t\t\t\n\t\t\t\t// All \"inserts\" done at the nested level\n\t\t\t\tfor (Tuple twoRow : two.getTuples2()) {\n\t\t\t\t\t\n\t\t\t\t\t// New row instance\n\t\t\t\t\tTableDefinition newRow = (TableDefinition) tempDef.newInstance();\n\t\t\t\t\t\n\t\t\t\t\t// Set fields for table one\n\t\t\t\t\tfor (Field f : attrDef) {\n\t\t\t\t\t\tString fieldName = f.getName();\n\t\t\t\t\t\tObject fieldVal = f.get(oneRow.getData());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!tempTable.isValidFieldValue(fieldName, fieldVal)) {\n\t\t\t\t\t\t\tthrow new ProcessorException(\"Failed to build cross product pair: tuple domains do not match\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ttempDef.getField(fieldName).set(newRow, fieldVal);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get fields from table two\n\t\t\t\t\tClass<?> fieldDef2 = twoRow.getData().getClass();\n\t\t\t\t\tField[] attrDef2 = fieldDef2.getFields();\n\t\t\t\t\t\n\t\t\t\t\t// Set fields for table two\n\t\t\t\t\tfor (Field f : attrDef2) {\n\t\t\t\t\t\tString fieldName = f.getName();\n\t\t\t\t\t\tObject fieldVal = f.get(twoRow.getData());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!tempTable.isValidFieldValue(fieldName, fieldVal)) {\n\t\t\t\t\t\t\tthrow new ProcessorException(\"Failed to build cross product pair: tuple domains do not match\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ttempDef.getField(fieldName).set(newRow, fieldVal);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Wrap in Tuple and insert\n\t\t\t\t\tTuple tuple = new Tuple(tempTable);\n\t\t\t\t\ttuple.setData(newRow);\n\t\t\t\t\ttempTable.insertTuple(tuple);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn tempTable;\n\t\t\t\n\t\t} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | IOException | IllegalArgumentException | NoSuchFieldException | SecurityException e) {\n\t\t\tthrow new ProcessorException(\"Failed to build cross product pair: \" + e);\n\t\t}\n\t}", "private void buildTables() {\n\t\tint k = G.getK();\n\t\tint numEachPod = k * k / 4 + k;\n \n\t\tbuildEdgeTable(k, numEachPod);\n\t\tbuildAggTable(k, numEachPod);\n\t\tbuildCoreTable(k, numEachPod); \n\t}", "cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();", "public ArrayList<String> selectFromTable(String _tField, String _tName, String _tFilterField,\n String _operator, String _tFilter) throws SQLException {\n System.out.println(\"Executing: SELECT \" + _tField + \" FROM \" + _tName + \" WHERE \"\n + _tFilterField + \" \" + _operator + \" '\" + _tFilter + \"'\");\n\n ResultSet rs = statement.executeQuery(\"SELECT \" + _tField + \" FROM \"\n + _tName + \" WHERE \" + _tFilterField + \" \" + _operator + \" '\" + _tFilter + \"'\");;\n ResultSetMetaData rsmd = this.getMetaData(rs);\n\n ArrayList<String> retString = new ArrayList<String>();\n String tableEntry = \"\";\n\n while (rs.next()) {\n for (int i = 1; i <= rsmd.getColumnCount(); i++) {\n if (i != rsmd.getColumnCount()) {\n tableEntry += rs.getString(i) + \",\";\n } else {\n tableEntry += rs.getString(i);\n }\n\n }\n\n retString.add(tableEntry);\n tableEntry = \"\";\n }\n return retString;\n }", "@Test\n public void testFromClauses() throws Exception {\n String sql = \"SELECT * FROM (g1 cross join g2), g3\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verify(selectNode, Select.SYMBOLS_REF_NAME, MultipleElementSymbol.ID);\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n\n Node jpNode = verify(fromNode, From.CLAUSES_REF_NAME, 1, JoinPredicate.ID);\n verifyJoin(jpNode, JoinTypeTypes.JOIN_CROSS);\n\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g1\");\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"g2\");\n\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 2, \"g3\");\n \n verifySql(\"SELECT * FROM g1 CROSS JOIN g2, g3\", fileNode);\n }", "public interface ATTabulation extends ATExpression {\n\n\t/**\n\t * The table expression must evaluate to a native table\n\t * Example: <code>`(m()[idx+1]).tableExpression == `(m())</code>\n\t * @return the table expression\n\t */\n\tpublic ATExpression base_tableExpression();\n\t\n\t/**\n\t * The index expression must evaluate to a native number\n\t * Example: <code>`(m()[idx+1]).indexExpression == `(idx.+(1))</code>\n\t * @return the index expression\n\t */\n\tpublic ATExpression base_indexExpression();\n\t\n}", "@Override\r\n\tpublic String getTableName(String[] sql) {\n\t\treturn sql[2];\r\n\t}", "public Collection<TapTable> findAllTables();", "public static Table getcurrentTable(List<Currency> currencies, List<Time>times){\n\n\n Time currentTime = times.get(times.size()-1);\n Time yesterdayTime = times.get(times.size()-2);\n\n\n Table currentTable = new Table(currentTime.getDate(),currencies,currentTime);\n currentTable.setYesterdayTime(yesterdayTime);\n currentTable.setTodayTime(currentTime);\n return currentTable;\n }", "public ArrayList<ArrayList> searchCache(String operator, ArrayList<ArrayList> operand1, ArrayList<ArrayList> operand2)\n {\n if(operand1 == null || operand2 == null)\n return null;\n if(operator.equalsIgnoreCase(\"|\"))\n {\n for(CacheObject c: unionCache)\n {\n if(c.equals(operand1, operand2))\n {\n return c.getResult();\n }\n }\n }\n \n if(operator.equalsIgnoreCase(\"+\"))\n {\n for(CacheObject c: intersectionCache)\n {\n if(c.equals(operand1, operand2))\n {\n return c.getResult();\n }\n }\n }\n if(operator.equalsIgnoreCase(\"-\"))\n {\n for(CacheObject c: differenceCache)\n {\n if(c.equals(operand1, operand2))\n {\n return c.getResult();\n }\n }\n }\n return null;\n }", "LogicalTableModify.Operation getTableModOp();", "private Table<Integer,String> buildTable(Collection<Block> featuresAsBlocks, Collection<Clause> featuresAsClauses, List<PredicateDefinition> globalConstants, Dataset dataset, Algorithm mode, PresubsumptionType presubsumptionType){\n Table<Integer,String> table = new Table<Integer,String>();\n //i.e. not global constants\n List<Block> nonConstantAttributes = new ArrayList<Block>();\n List<Block> globalConstantAttributes = new ArrayList<Block>();\n for (Block attribute : featuresAsBlocks){\n if (attribute.definition().isGlobalConstant()){\n globalConstantAttributes.add(attribute);\n } else {\n nonConstantAttributes.add(attribute);\n }\n }\n Dataset copyOfDataset = dataset.shallowCopy();\n copyOfDataset.reset();\n while (copyOfDataset.hasNextExample()){\n Example example = copyOfDataset.nextExample();\n table.addClassification(copyOfDataset.currentIndex(), copyOfDataset.classificationOfCurrentExample());\n addGlobalConstants(example, copyOfDataset.currentIndex(), table, globalConstants);\n }\n if (mode == HIFI || mode == HIFI_GROUNDING_COUNTING || mode == RELF || mode == RELF_GROUNDING_COUNTING){\n HiFi tableConstructionHifi = new HiFi(dataset);\n if (mode == HIFI_GROUNDING_COUNTING || mode == RELF_GROUNDING_COUNTING){\n tableConstructionHifi.setAggregablesBuilder(VoidAggregablesBuilder.construct());\n tableConstructionHifi.setPostProcessingAggregablesBuilder(GroundingCountingAggregablesBuilder.construct());\n }\n if (this.normalizationFactor != null){\n tableConstructionHifi.setNormalizationFactor(normalizationFactor);\n }\n table.addAll(tableConstructionHifi.constructTable(nonConstantAttributes));\n } else if (mode == POLY || mode == POLY_GROUNDING_COUNTING){\n Poly tableConstructionHiFi = new Poly(dataset);\n if (mode == POLY){\n tableConstructionHiFi.setUseGroundingCounting(false);\n } else if (mode == POLY_GROUNDING_COUNTING){\n tableConstructionHiFi.setUseGroundingCounting(true);\n }\n table.addAll(tableConstructionHiFi.constructTable(nonConstantAttributes));\n } else if (mode == RELF_X){\n throw new UnsupportedOperationException();\n// HiFi tableConstructionHifi = new HiFi(dataset);\n// if (mode == HIFI_GROUNDING_COUNTING || mode == RELF_GROUNDING_COUNTING){\n// tableConstructionHifi.setAggregablesBuilder(VoidAggregablesBuilder.construct());\n// tableConstructionHifi.setPostProcessingAggregablesBuilder(GroundingCountingAggregablesBuilder.construct());\n// }\n// if (this.normalizationFactor != null){\n// tableConstructionHifi.setNormalizationFactor(normalizationFactor);\n// }\n// //table.addAll(tableConstructionHifi.constructTable(nonConstantAttributes));\n//\n// RelfX tableConstructionRelfX = new RelfX(dataset);\n// table.addAll(tableConstructionRelfX.constructTable(Sugar.listFromCollections(featuresAsClauses), presubsumptionType));\n }\n\n return table;\n }", "String getTabela();", "protected void createSubQueryJoinTable() throws ODataApplicationException {\r\n try {\r\n final List<JPAOnConditionItem> left = association\r\n .getJoinTable()\r\n .getJoinColumns(); // Team -->\r\n final List<JPAOnConditionItem> right = association\r\n .getJoinTable()\r\n .getInverseJoinColumns(); // Person -->\r\n createSelectClauseJoin(subQuery, queryRoot, right);\r\n Expression<Boolean> whereCondition = createWhereByAssociation(from, queryJoinTable, left);\r\n whereCondition = cb.and(whereCondition, createWhereByAssociation(queryJoinTable, queryRoot, right));\r\n subQuery.where(applyAdditionalFilter(whereCondition));\r\n } catch (final ODataJPAModelException e) {\r\n throw new ODataJPAQueryException(e, HttpStatusCode.INTERNAL_SERVER_ERROR);\r\n }\r\n\r\n }", "private TableFunctionSignature[] sourceDestinationTableSignatures() {\n return new TableFunctionSignature[]{\n // (s_d_t)\n new TableFunctionSignature(TableDefinition.GEOMETRY,\n TableArgument.ANY),\n // (s_d_t,w) OR (s_d_t,o)\n new TableFunctionSignature(TableDefinition.GEOMETRY,\n TableArgument.ANY,\n ScalarArgument.STRING),\n // (s_d_t,w,o) OR (s_d_t,o,w)\n new TableFunctionSignature(TableDefinition.GEOMETRY,\n TableArgument.ANY,\n ScalarArgument.STRING,\n ScalarArgument.STRING)\n };\n }", "Object findOperatorNeedCheck();", "Table getTables(int index);", "static BiPredicate<SibillaValue,SibillaValue> getRelationOperator(String op) {\n if (op.equals(\"<\")) { return (x,y) -> x.doubleOf()<y.doubleOf(); }\n if (op.equals(\"<=\")) { return (x,y) -> x.doubleOf()<=y.doubleOf(); }\n if (op.equals(\"==\")) { return (x,y) -> x.doubleOf()==y.doubleOf(); }\n if (op.equals(\"!=\")) { return (x,y) -> !x.equals(y); }\n if (op.equals(\">\")) { return (x,y) -> x.doubleOf()>y.doubleOf(); }\n if (op.equals(\">=\")) { return (x,y) -> x.doubleOf()>=y.doubleOf(); }\n return (x,y) -> false;\n }", "public String toString() {\n\t\treturn \"JoinTableSpec(\"+leftTable.toString()+\" INNER JOIN \"+rightTable.toString()\n\t\t\t\t+\" ON \"+leftCell.toString()+\" = \"+rightCell.toString()+\")\";\n\t}", "Table joinTwoTables(String name, Table t1, Table t2) {\n if (t1.equals(t2)) {\n return t1;\n }\n int sim = 0;\n LinkedList<String> simNames = new LinkedList<>();\n for (String c1 : t1.getColNames()) {\n for (String c2 : t2.getColNames()) {\n if (c1.equals(c2)) {\n sim += 1;\n simNames.addLast(c1);\n }\n }\n }\n if (sim == 0) {\n return noCommonJoin(name, t1, t2);\n }\n //Check matches between similar columns and log the row number per table\n LinkedList<Integer> simRowsT1 = new LinkedList<>();\n HashMap<Integer, LinkedList> t1ToT2 = new HashMap<>();\n LinkedList<LinkedList> totalSimRows = new LinkedList<>();\n\n checkSimColumns(t1, t2, simNames, t1ToT2, simRowsT1, totalSimRows);\n boolean flag = false;\n\n /**Here we check if there is a repetition\n * of the same row equal to the number of similar columns*/\n simRowsT1 = totalSimRows.get(0);\n LinkedHashSet<Integer> similarRow = new LinkedHashSet<>();\n LinkedList<Integer> simRowsTemp;\n LinkedList<Integer> simRowsFinal = new LinkedList<>();\n if (totalSimRows.size() > 1) {\n for (int i = 1; i < totalSimRows.size(); i++) {\n simRowsTemp = totalSimRows.get(i);\n int count = 0;\n for (int j = 0; j < simRowsT1.size(); j++) {\n Integer intTemp = simRowsT1.get(j);\n for (int k = 0; k < simRowsTemp.size(); k++) {\n if (intTemp == simRowsTemp.get(k)) {\n count += 1;\n }\n if (count == sim) {\n similarRow.add(intTemp);\n break;\n }\n }\n }\n }\n } else {\n simRowsFinal = simRowsT1;\n }\n simRowsFinal.addAll(0, similarRow);\n /**Call createSubTable with similar column & rows to generate similarity subTable*/\n Table simTable = t1.similarSubTable(simNames, simRowsFinal);\n /**Call createSubTable with unsimilar column & rows to generate unsimilar subTable from t1*/\n Table unsimT1 = t1.unsimSubTable(simNames, simRowsFinal);\n /**Call createSubTable with unsimilar column & rows to generate unsimilar subTable from t2*/\n if (!flag) {\n for (int i = 0; i < simRowsFinal.size(); i++) {\n simRowsFinal.addLast(\n (Integer) (t1ToT2.get(simRowsFinal.removeFirst())).removeFirst());\n }\n } else {\n int row;\n int size1 = simRowsFinal.size();\n int size2;\n for (int i = 0; i < size1; i++) {\n row = simRowsFinal.removeFirst();\n size2 = (t1ToT2.get(row).size());\n for (int j = 0; j < size2; j++) {\n simRowsFinal.addLast((Integer) (t1ToT2.get(row).removeFirst()));\n }\n }\n }\n Table unsimT2 = t2.unsimSubTable(simNames, simRowsFinal);\n simTable = simTable.naiveJoinTables(unsimT1);\n return simTable.naiveJoinTables(unsimT2);\n }", "List<Table2> selectByExample(Table2Example example);", "public String composeTableNamesQuery() {\n\t\treturn String.format(\"show tables;\");\n\t}", "@Factory\n public static Matcher<QueryTreeNode> relation(Matcher<QueryTreeNode> leftMatcher, String operation, Matcher<QueryTreeNode> rightMatcher) {\n return new BinaryOperatorNodeMatcher(leftMatcher, operation, rightMatcher);\n }", "private void getSelectStatements()\n\t{\n\t\tString[] sqlIn = new String[] {m_sqlOriginal};\n\t\tString[] sqlOut = null;\n\t\ttry\n\t\t{\n\t\t\tsqlOut = getSubSQL (sqlIn);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlog.log(Level.SEVERE, m_sqlOriginal, e);\n\t\t\tthrow new IllegalArgumentException(m_sqlOriginal);\n\t\t}\n\t\t//\ta sub-query was found\n\t\twhile (sqlIn.length != sqlOut.length)\n\t\t{\n\t\t\tsqlIn = sqlOut;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tsqlOut = getSubSQL (sqlIn);\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tlog.log(Level.SEVERE, m_sqlOriginal, e);\n\t\t\t\tthrow new IllegalArgumentException(sqlOut.length + \": \"+ m_sqlOriginal);\n\t\t\t}\n\t\t}\n\t\tm_sql = sqlOut;\n\t\t/** List & check **\n\t\tfor (int i = 0; i < m_sql.length; i++)\n\t\t{\n\t\t\tif (m_sql[i].indexOf(\"SELECT \",2) != -1)\n\t\t\t\tlog.log(Level.SEVERE, \"#\" + i + \" Has embedded SQL - \" + m_sql[i]);\n\t\t\telse\n\t\t\t\tlog.fine(\"#\" + i + \" - \" + m_sql[i]);\n\t\t}\n\t\t/** **/\n\t}", "public static int[][] computeTable() {\n\t\tint [][] ret = new int[10][10];\n\t\tfor (int m = 0; m < 10; m++) {\n\t\t\tfor (int n = 0; n < 10; n++) {\n\t\t\t\tret[m][n] = m*n;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "private String extractTableName() {\n\t\treturn fromElement.getQueryable().getTableName();\n\t}", "protected List<LogicalTable> getNonSelectedTables( LogicalModel model, List<LogicalTable> selectedTables ) {\n List<BusinessTableNeighbours> extra = new ArrayList<BusinessTableNeighbours>( model.getLogicalTables().size() );\n List<LogicalTable> unused = new ArrayList<LogicalTable>();\n List<LogicalTable> used = new ArrayList<LogicalTable>( selectedTables );\n\n // the first part of this algorithm looks for all the tables that are connected to the selected\n // tables in any way. We loop through all the tables until there are no more connections\n\n for ( int i = 0; i < model.getLogicalTables().size(); i++ ) {\n unused.add( model.getLogicalTables().get( i ) );\n }\n\n boolean anyFound = true;\n\n // iterate over the list until there are no more neighbors\n while ( anyFound ) {\n anyFound = false;\n Iterator<LogicalTable> iter = unused.iterator();\n while ( iter.hasNext() ) {\n boolean found = false;\n LogicalTable check = iter.next(); // unused.get(i);\n for ( int j = 0; j < used.size(); j++ ) {\n LogicalTable businessTable = used.get( j );\n if ( check.equals( businessTable ) ) {\n found = true;\n }\n }\n if ( !found ) {\n BusinessTableNeighbours btn = new BusinessTableNeighbours();\n btn.businessTable = check;\n btn.nrNeighbours = getNrNeighbours( model, check, used );\n if ( btn.nrNeighbours > 0 ) {\n extra.add( btn );\n used.add( check );\n // remove check from the unused list\n iter.remove();\n anyFound = true;\n }\n }\n }\n }\n\n // OK, we now have a number of tables, but we want to sort this list\n // The tables with the highest numbers of neighbours should be placed first. (descending)\n //\n Collections.sort( extra );\n\n List<LogicalTable> retval = new ArrayList<LogicalTable>( extra.size() );\n for ( int i = 0; i < extra.size(); i++ ) {\n BusinessTableNeighbours btn = extra.get( i );\n // If the number of neighbours is 0, there is no point in returning the table for the SQL generation\n // There is no way the table can connect to the selected tables anyway as there are no neighbours.\n //\n if ( btn.nrNeighbours > 0 ) {\n retval.add( 0, btn.businessTable );\n }\n }\n\n return retval;\n }", "String getBaseTable();", "private List<ComparisonExpression> comparisons(HashMap<TimeSelector, Long> lowerBounds,\n HashMap<TimeSelector, Long> upperBounds) {\n List<ComparisonExpression> newComparisons = new ArrayList<>();\n // for all selectors, as lowerBounds has the same keys as upperBounds\n for (Map.Entry<TimeSelector, Long> entry : lowerBounds.entrySet()) {\n TimeSelector selector = entry.getKey();\n Long lower = entry.getValue();\n Long upper = upperBounds.get(selector);\n if (lower.equals(upper)) {\n newComparisons.add(new ComparisonExpression(\n new Comparison(selector, EQ, new TimeLiteral(lower)),\n new ComparableTPGMFactory()));\n } else {\n if (lower > TemporalElement.DEFAULT_TIME_FROM) {\n // check if informative: lower bound of from is trivial lower bound of to\n if (selector.getTimeProp().equals(TX_TO)) {\n TimeSelector txFromSel = new TimeSelector(selector.getVariable(), TX_FROM);\n if (lowerBounds.getOrDefault(txFromSel, TemporalElement.DEFAULT_TIME_FROM).equals(lower)) {\n continue;\n }\n } else if (selector.getTimeProp().equals(VAL_TO)) {\n TimeSelector valFromSel = new TimeSelector(selector.getVariable(), VAL_FROM);\n if (lowerBounds.getOrDefault(valFromSel, TemporalElement.DEFAULT_TIME_FROM).equals(lower)) {\n continue;\n }\n }\n // informative => build comparison\n newComparisons.add(new ComparisonExpression(\n new Comparison(new TimeLiteral(lower), LTE, selector),\n new ComparableTPGMFactory()));\n }\n if (upper < TemporalElement.DEFAULT_TIME_TO) {\n // analagously as for lower bounds\n // upper bound of to is trivial upper of from\n if (selector.getTimeProp().equals(TimeSelector.TimeField.TX_FROM)) {\n TimeSelector txToSel = new TimeSelector(selector.getVariable(), TX_TO);\n if (upperBounds.getOrDefault(txToSel, TemporalElement.DEFAULT_TIME_TO).equals(upper)) {\n continue;\n }\n } else if (selector.getTimeProp().equals(TimeSelector.TimeField.VAL_FROM)) {\n TimeSelector valToSel = new TimeSelector(selector.getVariable(), VAL_TO);\n if (upperBounds.getOrDefault(valToSel, TemporalElement.DEFAULT_TIME_TO).equals(upper)) {\n continue;\n }\n }\n // informative => build comparison\n newComparisons.add(new ComparisonExpression(\n new Comparison(selector, LTE, new TimeLiteral(upper)),\n new ComparableTPGMFactory()));\n }\n }\n }\n return newComparisons;\n }", "@Override\n public Object getTables(Long serverId, String statementExample)\n {\n return null;\n }", "@Override\n\tpublic HashMap<String, String> findTableNameAliases() {\n\t\tHashMap<String,String> s = new HashMap<String,String>();\n\t\t\n\t\tHashMap<String,String> sLeft = leftTable.findTableNameAliases();\n\t\tHashMap<String,String> sRight = rightTable.findTableNameAliases();\n\t\t\n\t\ts.putAll(sLeft);\n\t\ts.putAll(sRight);\n\t\t\n\t\treturn s;\n\t}", "public abstract String [] listTables();", "void doNestedNaturalJoin(WorkflowExpressionQuery e, NestedExpression nestedExpression, StringBuffer columns, StringBuffer where, StringBuffer whereComp, List values, List queries, StringBuffer orderBy) { // throws WorkflowStoreException {\n\n Object value;\n Field currentExpField;\n\n int numberOfExp = nestedExpression.getExpressionCount();\n\n for (int i = 0; i < numberOfExp; i++) { //ori\n\n //for (i = numberOfExp; i > 0; i--) { //reverse 1 of 3\n Expression expression = nestedExpression.getExpression(i); //ori\n\n //Expression expression = nestedExpression.getExpression(i - 1); //reverse 2 of 3\n if (!(expression.isNested())) {\n FieldExpression fieldExp = (FieldExpression) expression;\n\n FieldExpression fieldExpBeforeCurrent;\n queries.add(expression);\n\n int queryId = queries.size();\n\n if (queryId > 1) {\n columns.append(\" , \");\n }\n\n //do; OS_CURRENTSTEP AS a1 ....\n if (fieldExp.getContext() == Context.CURRENT_STEPS) {\n columns.append(currentTable + \" AS \" + 'a' + queryId);\n } else if (fieldExp.getContext() == Context.HISTORY_STEPS) {\n columns.append(historyTable + \" AS \" + 'a' + queryId);\n } else {\n columns.append(entryTable + \" AS \" + 'a' + queryId);\n }\n\n ///////// beginning of WHERE JOINS/s : //////////////////////////////////////////\n //do for first query; a1.ENTRY_ID = a1.ENTRY_ID\n if (queryId == 1) {\n where.append(\"a1\" + '.' + stepProcessId);\n where.append(\" = \");\n\n if (fieldExp.getContext() == Context.CURRENT_STEPS) {\n where.append(\"a\" + queryId + '.' + stepProcessId);\n } else if (fieldExp.getContext() == Context.HISTORY_STEPS) {\n where.append(\"a\" + queryId + '.' + stepProcessId);\n } else {\n where.append(\"a\" + queryId + '.' + entryId);\n }\n }\n\n //do; a1.ENTRY_ID = a2.ENTRY_ID\n if (queryId > 1) {\n fieldExpBeforeCurrent = (FieldExpression) queries.get(queryId - 2);\n\n if (fieldExpBeforeCurrent.getContext() == Context.CURRENT_STEPS) {\n where.append(\"a\" + (queryId - 1) + '.' + stepProcessId);\n } else if (fieldExpBeforeCurrent.getContext() == Context.HISTORY_STEPS) {\n where.append(\"a\" + (queryId - 1) + '.' + stepProcessId);\n } else {\n where.append(\"a\" + (queryId - 1) + '.' + entryId);\n }\n\n where.append(\" = \");\n\n if (fieldExp.getContext() == Context.CURRENT_STEPS) {\n where.append(\"a\" + queryId + '.' + stepProcessId);\n } else if (fieldExp.getContext() == Context.HISTORY_STEPS) {\n where.append(\"a\" + queryId + '.' + stepProcessId);\n } else {\n where.append(\"a\" + queryId + '.' + entryId);\n }\n }\n\n ///////// end of LEFT JOIN : \"LEFT JOIN OS_CURRENTSTEP a1 ON a0.ENTRY_ID = a1.ENTRY_ID\n //\n //////// BEGINNING OF WHERE clause //////////////////////////////////////////////////\n value = fieldExp.getValue();\n currentExpField = fieldExp.getField();\n\n //if the Expression is negated and FieldExpression is \"EQUALS\", we need to negate that FieldExpression\n if (expression.isNegate()) {\n //do ; a2.STATUS !=\n whereComp.append(\"a\" + queryId + '.' + fieldName(fieldExp.getField()));\n\n switch (fieldExp.getOperator()) { //WHERE a1.STATUS !=\n case EQUALS:\n\n if (value == null) {\n whereComp.append(\" IS NOT \");\n } else {\n whereComp.append(\" != \");\n }\n\n break;\n\n case NOT_EQUALS:\n\n if (value == null) {\n whereComp.append(\" IS \");\n } else {\n whereComp.append(\" = \");\n }\n\n break;\n\n case GT:\n whereComp.append(\" < \");\n\n break;\n\n case LT:\n whereComp.append(\" > \");\n\n break;\n\n default:\n whereComp.append(\" != \");\n\n break;\n }\n\n switch (currentExpField) {\n case START_DATE:\n case FINISH_DATE:\n values.add(new Timestamp(((java.util.Date) value).getTime()));\n\n break;\n\n default:\n\n if (value == null) {\n values.add(null);\n } else {\n values.add(value);\n }\n\n break;\n }\n } else {\n //do; a1.OWNER =\n whereComp.append(\"a\" + queryId + '.' + fieldName(fieldExp.getField()));\n\n switch (fieldExp.getOperator()) { //WHERE a2.FINISH_DATE <\n case EQUALS:\n\n if (value == null) {\n whereComp.append(\" IS \");\n } else {\n whereComp.append(\" = \");\n }\n\n break;\n\n case NOT_EQUALS:\n\n if (value == null) {\n whereComp.append(\" IS NOT \");\n } else {\n whereComp.append(\" <> \");\n }\n\n break;\n\n case GT:\n whereComp.append(\" > \");\n\n break;\n\n case LT:\n whereComp.append(\" < \");\n\n break;\n\n default:\n whereComp.append(\" = \");\n\n break;\n }\n\n switch (currentExpField) {\n case START_DATE:\n case FINISH_DATE:\n values.add(new Timestamp(((java.util.Date) value).getTime()));\n\n break;\n\n default:\n\n if (value == null) {\n values.add(null);\n } else {\n values.add(value);\n }\n\n break;\n }\n }\n\n //do; a1.OWNER = ? ... a2.STATUS != ?\n whereComp.append(\" ? \");\n\n //////// END OF WHERE clause////////////////////////////////////////////////////////////\n if ((e.getSortOrder() != WorkflowExpressionQuery.SORT_NONE) && (e.getOrderBy() != null)) {\n // System.out.println(\"ORDER BY ; queries.size() : \" + queries.size());\n orderBy.append(\" ORDER BY \");\n orderBy.append(\"a1\" + '.' + fieldName(e.getOrderBy()));\n\n if (e.getSortOrder() == WorkflowExpressionQuery.SORT_ASC) {\n orderBy.append(\" ASC\");\n } else if (e.getSortOrder() == WorkflowExpressionQuery.SORT_DESC) {\n orderBy.append(\" DESC\");\n }\n }\n } else {\n NestedExpression nestedExp = (NestedExpression) expression;\n\n where.append('(');\n\n doNestedNaturalJoin(e, nestedExp, columns, where, whereComp, values, queries, orderBy);\n\n where.append(')');\n }\n\n //add AND or OR clause between the queries\n if (i < (numberOfExp - 1)) { //ori\n\n //if (i > 1) { //reverse 3 of 3\n if (nestedExpression.getExpressionOperator() == LogicalOperator.AND) {\n where.append(\" AND \");\n whereComp.append(\" AND \");\n } else {\n where.append(\" OR \");\n whereComp.append(\" OR \");\n }\n }\n }\n }", "private List<Table> getTableFromStringTableName(String tableName) throws HyracksDataException {\n\n // Get all the tables\n if (generateAllTables) {\n // Remove the DBGEN_VERSION table and all children tables, parent tables will generate them\n return Table.getBaseTables().stream()\n .filter(table -> !table.equals(Table.DBGEN_VERSION) && !table.isChild())\n .collect(Collectors.toList());\n }\n\n // Search for the table\n List<Table> matchedTables = Table.getBaseTables().stream()\n .filter(table -> tableName.equalsIgnoreCase(table.getName())).collect(Collectors.toList());\n\n // Ensure the table was found\n if (matchedTables.isEmpty()) {\n throw new RuntimeDataException(ErrorCode.TPCDS_INVALID_TABLE_NAME, getFunctionIdentifier().getName(),\n tableName);\n }\n\n return matchedTables;\n }", "@Test\n public void testCrossJoin() throws Exception {\n String sql = \"SELECT * FROM g1 cross join g2\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verify(selectNode, Select.SYMBOLS_REF_NAME, MultipleElementSymbol.ID);\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n\n Node jpNode = verify(fromNode, From.CLAUSES_REF_NAME, JoinPredicate.ID);\n verifyJoin(jpNode, JoinTypeTypes.JOIN_CROSS);\n\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g1\");\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"g2\");\n \n verifySql(\"SELECT * FROM g1 CROSS JOIN g2\", fileNode);\n }", "private Expr comparison() {\n Expr expr = addition();\n\n while(match(GREATER, GREATER_EQUAL, LESS, LESS_EQUAL)) { // These variable length arguments are real convenient\n Token operator = previous();\n Expr right = addition();\n expr = new Expr.Binary(expr, operator, right);\n }\n\n return expr;\n }", "public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }", "public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }", "public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }", "public ArrayList<Table> getTablePayment() {\n \tArrayList<Table> fetchedTables = new ArrayList<Table>();\n \tfetchedTables = getTable(tablePayment);\n \treturn fetchedTables;\n }", "private void table(String where_condition){\n \n String query = \"SELECT reports.id,patients.patient_name,reports.report,doctors.doctor_name,reports.admitted FROM reports INNER JOIN patients on reports.patient_id = patients.id INNER JOIN doctors on reports.doctor_id = doctors.id WHERE (reports.patient_id = \"+global_patient_id+\") \"+where_condition+\" ORDER BY reports.id DESC\" ;\n\n ResultSet rs = null;\n \n try\n {\n rs = database().prepareStatement(query).executeQuery();\n displayTable.setModel(DbUtils.resultSetToTableModel(rs));\n displayTable.setVisible(true);\n }\n catch(Exception ex)\n { JOptionPane.showMessageDialog(null,ex); }\n}", "public int checktable(int powerOfTwo) {\r\n\t\tint table=0;\r\n\t\tfor(int i=1;i<=powerOfTwo;i++){\r\n\t\t\ttable=powerOfTwo*i;\r\n\t\t}\r\n\t\treturn table;\r\n\t}", "public ArrayList getSourceTableList(String tableName) {\r\n\t\tArrayList sourceTableList = new ArrayList();\r\n\t\tHashSet tableSet = new HashSet();\r\n\t\t// whether the table is a volatile table\r\n\t\tint index = -1;\r\n\t\tindex = volatileIndex(tableName);\r\n\t\t// is a volatile table\r\n\t\tif (index >= 0) {\r\n\t\t\tfor (int i = 0; i < volatileTableSourceList.size(); i++) {\r\n\t\t\t\tHashMap volatileTable = (HashMap) volatileTableSourceList.get(i);\r\n\t\t\t\tInteger volatileIndex = (Integer) volatileTable.get(\"sqlIndex\");\r\n\t\t\t\tif (index == volatileIndex.intValue()) {\r\n\t\t\t\t\ttableSet = (HashSet) volatileTable.get(\"sourceTableList\");\r\n\t\t\t\t\tArrayList tableList = new ArrayList(tableSet);\r\n\r\n\t\t\t\t\tfor (int j = 0; j < tableList.size(); j++) {\r\n\t\t\t\t\t\tHashMap table = (HashMap) tableList.get(j);\r\n\t\t\t\t\t\tString sTable_name = (String) table.get(\"sourceTable\");\r\n\t\t\t\t\t\t// String expressionExp = (String) table.get(\"expression\");\r\n\t\t\t\t\t\tHashMap sTable = new HashMap();\r\n\t\t\t\t\t\tsTable.put(\"sourceTable\", sTable_name);\r\n\t\t\t\t\t\tsTable.put(\"targetTable\", tableName);\r\n\t\t\t\t\t\t// sTable.put(\"expression\",expressionExp);\r\n\t\t\t\t\t\tsourceTableList.add(sTable);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tindex = commonIndex(tableName);\r\n\t\t\tif (index >= 0) {\r\n\t\t\t\tfor (int i = 0; i < commonTableSourceList.size(); i++) {\r\n\t\t\t\t\tHashMap commonTable = (HashMap) commonTableSourceList.get(i);\r\n\t\t\t\t\tInteger commonIndex = (Integer) commonTable.get(\"sqlIndex\");\r\n\t\t\t\t\tif (index == commonIndex.intValue()) {\r\n\t\t\t\t\t\ttableSet = (HashSet) commonTable.get(\"sourceTableList\");\r\n\t\t\t\t\t\tArrayList tableList = new ArrayList(tableSet);\r\n\r\n\t\t\t\t\t\tfor (int j = 0; j < tableList.size(); j++) {\r\n\t\t\t\t\t\t\tHashMap table = (HashMap) tableList.get(j);\r\n\t\t\t\t\t\t\tString sTable_name = (String) table.get(\"sourceTable\");\r\n\t\t\t\t\t\t\t// String expressionExp = (String) table.get(\"expression\");\r\n\t\t\t\t\t\t\tHashMap sTable = new HashMap();\r\n\t\t\t\t\t\t\tsTable.put(\"sourceTable\", sTable_name);\r\n\t\t\t\t\t\t\tsTable.put(\"targetTable\", tableName);\r\n\t\t\t\t\t\t\t// sTable.put(\"expression\",expressionExp);\r\n\t\t\t\t\t\t\tsourceTableList.add(sTable);\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} else {\r\n\t\t\t\tHashMap sourceTable = new HashMap();\r\n\t\t\t\tsourceTable.put(\"sourceTable\", \"\");\r\n\t\t\t\tsourceTable.put(\"targetTable\", tableName);\r\n\t\t\t\t// sourceTable.put(\"expression\",expString);\r\n\t\t\t\tsourceTableList.add(sourceTable);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new ArrayList(new HashSet(sourceTableList));\r\n\t}", "private String[] getTables() {\r\n\t\tString[] returnedValue = null;\r\n\t\tList<String> tablesList = new ArrayList<String>();\r\n\t\t\r\n\t\tif (getDatabse() != null && getDatabse().isOpen()) {\r\n\t\t\tCursor cursor = getDatabse().rawQuery(\"SELECT DISTINCT tbl_name FROM sqlite_master\", null);\r\n\t\t\tif (cursor != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcursor.moveToLast();\r\n\t\t\t\t\tcursor.moveToFirst();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (cursor.getCount() > 0) {\r\n\t\t\t\t\t\tdo{\r\n\t\t\t\t\t\t\tString tableName = cursor.getString(0);\r\n\t\t\t\t\t\t\tif (tableName != null && tableName.trim() != \"\") {\r\n\t\t\t\t\t\t\t\tif (!tableName.trim().toLowerCase().equals(\"android_metadata\") &&\r\n\t\t\t\t\t\t\t\t\t!tableName.trim().toLowerCase().equals(\"sqlite_sequence\")) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\ttablesList.add(tableName);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} while(cursor.moveToNext());\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} finally {\r\n\t\t\t\t\tcursor.close();\r\n\t\t\t\t\tcursor = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (tablesList.size() > 0) {\r\n\t\t\treturnedValue = tablesList.toArray(new String[tablesList.size()]);\r\n\t\t}\r\n\t\ttablesList.clear();\r\n\t\ttablesList = null;\r\n\t\t\r\n\t\treturn returnedValue;\r\n\t}", "java.util.List<Table>\n getTablesList();", "public List<String> get_table_names() {\n LinkedList<String> res = new LinkedList<>();\n\n //the table name information is stored in sqlite_master\n ResultSet resultSet = execute_statement(\"SELECT name FROM sqlite_master WHERE type='table'\" +\n \"AND name <> 'sqlite_sequence' AND name <> 'relationship'\", true);\n\n try {\n while (resultSet.next()) {\n res.add(resultSet.getString(1));\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return res;\n }", "@Override\n public SqlDatabaseTable filter(SqlDatabaseTable table, List<FilterRule> filterRules) {\n if (filterRules.isEmpty()) return table;\n\n StringBuilder sql = new StringBuilder();\n sql.append(\"SELECT * FROM \").append(table.getFullRef());\n sql.append(\" WHERE\");\n for (int i = 0; i < filterRules.size(); i++) {\n FilterRule filterRule = filterRules.get(i);\n if (filterRule instanceof ColumnFilterRule) {\n int lhs = ((ColumnFilterRule) filterRule).getRowId();\n int rhs = ((ColumnFilterRule) filterRule).getAnotherRowId();\n sql.append(\" `_\").append(lhs).append(\"`=`_\").append(rhs).append(\"`\");\n } else if (filterRule instanceof ConstantFilterRule) {\n int rowId = ((ConstantFilterRule) filterRule).getRowId();\n String value = ((ConstantFilterRule) filterRule).getValue();\n sql.append(\" `_\").append(rowId).append(\"`='\").append(value).append(\"'\");\n } else {\n throw new IllegalArgumentException();\n }\n if (i != filterRules.size() - 1) {\n sql.append(\" AND\");\n }\n }\n\n return new SqlDatabaseQueryTable(sql.toString(), table.getArity());\n }", "@Override\n protected AdqlValidator.ValidatorTable[] getExtraTables() {\n TopcatModel[] tcModels = getTopcatModels();\n List<AdqlValidator.ValidatorTable> vtList =\n new ArrayList<AdqlValidator.ValidatorTable>();\n for ( int it = 0; it < tcModels.length; it++ ) {\n TopcatModel tcModel = tcModels[ it ];\n String[] aliases = getUploadAliases( tcModel );\n for ( int ia = 0; ia < aliases.length; ia++ ) {\n String tname = \"TAP_UPLOAD.\" + aliases[ ia ];\n vtList.add( toValidatorTable( tcModel, tname ) );\n }\n }\n return vtList.toArray( new AdqlValidator.ValidatorTable[ 0 ] );\n }", "public String[] composeFetchAllQueries(String tables[]) {\n\t\tString queries[] = new String[tables.length];\n\t\tfor (int i = 0; i < tables.length; i++)\n\t\t\tqueries[i] = String.format(\"SELECT * FROM `%s`;\", tables[i]);\n\t\treturn queries;\n\t}", "SubQueryOperand createSubQueryOperand();", "@Test\n public void testMultiCrossJoin2() throws Exception {\n String sql = \"SELECT * FROM (g1 cross join g2) cross join (g3 cross join g4)\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n\n verify(selectNode, Select.SYMBOLS_REF_NAME, MultipleElementSymbol.ID);\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n\n Node jpNode1 = verify(fromNode, From.CLAUSES_REF_NAME, JoinPredicate.ID);\n verifyJoin(jpNode1, JoinTypeTypes.JOIN_CROSS);\n\n Node jpNode2 = verify(jpNode1, JoinPredicate.LEFT_CLAUSE_REF_NAME, JoinPredicate.ID);\n verifyJoin(jpNode2, JoinTypeTypes.JOIN_CROSS);\n\n Node jpNode3 = verify(jpNode1, JoinPredicate.RIGHT_CLAUSE_REF_NAME, JoinPredicate.ID);\n verifyJoin(jpNode3, JoinTypeTypes.JOIN_CROSS);\n \n verifyUnaryFromClauseGroup(jpNode2, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g1\");\n verifyUnaryFromClauseGroup(jpNode2, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"g2\");\n\n verifyUnaryFromClauseGroup(jpNode3, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g3\");\n verifyUnaryFromClauseGroup(jpNode3, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"g4\");\n \n verifySql(\"SELECT * FROM (g1 CROSS JOIN g2) CROSS JOIN (g3 CROSS JOIN g4)\", fileNode);\n }", "private TableFunctionSignature[] sourceSignatures() {\n return new TableFunctionSignature[]{\n // (s)\n new TableFunctionSignature(TableDefinition.GEOMETRY,\n ScalarArgument.INT),\n // (s,w) OR (s,o)\n new TableFunctionSignature(TableDefinition.GEOMETRY,\n ScalarArgument.INT,\n ScalarArgument.STRING),\n // (s,w,o) OR (s,o,w)\n new TableFunctionSignature(TableDefinition.GEOMETRY,\n ScalarArgument.INT,\n ScalarArgument.STRING,\n ScalarArgument.STRING)\n };\n }", "void prepareTables();", "public String toStringTabbed(int tabs){\n StringBuilder b = new StringBuilder();\n for(int i = 0; i < tabs; i++){\n b.append(\"\\t\");\n }\n b.append(\"while (\" + bExpression.toString() + \")\\n\" + s1.toStringTabbed(tabs+1));\n return b.toString();\n \n }", "@Test\n public void testMixedJoin2() throws Exception {\n String sql = \"SELECT * FROM g1 cross join (g2 cross join g3), g4, g5 cross join g6\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verify(selectNode, Select.SYMBOLS_REF_NAME, MultipleElementSymbol.ID);\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n\n Node jpNode1 = verify(fromNode, From.CLAUSES_REF_NAME, 1, JoinPredicate.ID);\n verifyJoin(jpNode1, JoinTypeTypes.JOIN_CROSS);\n\n verifyUnaryFromClauseGroup(jpNode1, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g1\");\n \n Node jpNode2 = verify(jpNode1, JoinPredicate.RIGHT_CLAUSE_REF_NAME, JoinPredicate.ID);\n verifyJoin(jpNode2, JoinTypeTypes.JOIN_CROSS);\n \n verifyUnaryFromClauseGroup(jpNode2, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g2\");\n verifyUnaryFromClauseGroup(jpNode2, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"g3\");\n\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 2, \"g4\");\n\n Node jpNode3 = verify(fromNode, From.CLAUSES_REF_NAME, 3, JoinPredicate.ID);\n verifyJoin(jpNode3, JoinTypeTypes.JOIN_CROSS);\n\n verifyUnaryFromClauseGroup(jpNode3, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g5\");\n verifyUnaryFromClauseGroup(jpNode3, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"g6\");\n \n verifySql(\"SELECT * FROM g1 CROSS JOIN (g2 CROSS JOIN g3), g4, g5 CROSS JOIN g6\", fileNode);\n }", "Table noCommonJoin(String name, Table t1, Table t2) {\n {\n String[] names = new String[t1.colSize() + t2.colSize()];\n String[] types = new String[t1.colSize() + t2.colSize()];\n\n System.arraycopy(t1.getColNames(), 0, names, 0, t1.colSize());\n System.arraycopy(t2.getColNames(), 0, names, t1.colSize(), t2.colSize());\n System.arraycopy(t1.getColTypes(), 0, types, 0, t1.colSize());\n System.arraycopy(t2.getColTypes(), 0, types, t1.colSize(), t2.colSize());\n\n Table t = new Table(name, names, types);\n\n for (int i = 0; i < t1.rowSize(); i += 1) {\n for (int j = 0; j < t2.rowSize(); j += 1) {\n t.insertLastRow(t1.combineRows(t2, i, j));\n }\n }\n return t;\n }\n }", "private MetaSparqlRequest createQueryMT2() {\n\t\treturn createQueryMT1();\n\t}", "private List getMappingTablesInternal() {\n MappingTable primary = getPrimaryMappingTable();\n List tables = new ArrayList();\n\n if (primary != null) {\n MappingReferenceKey[] refKeys = primary.getMappingReferenceKeys();\n int i, count = ((refKeys != null) ? refKeys.length : 0);\n\n tables.add(primary);\n\n for (i = 0; i < count;i++) {\n MappingTable secondaryTable = refKeys[i].getMappingTable();\n\n if (secondaryTable != null)\n tables.add(secondaryTable);\n }\n }\n\n return tables;\n }", "private int getResult() {\n ArrayList<Character> operanzi = new ArrayList<Character>();\n ArrayList<Character> operatori = new ArrayList<Character>();\n for(int i = 1; i <= n; i++){\n // System.out.println(i);\n if ((expr[i] == 'T' ) || (expr[i] == 'F'))\n operanzi.add(expr[i]);\n else \n operatori.add(expr[i]);\n }\n System.out.println(operanzi.get(0));\n int n1 = operanzi.size();\n System.out.println(n1);\n long [][] T = new long[n1][n1];\n long [][] F = new long[n1][n1];\n\n for (int i = 0; i < operanzi.size(); i++) {\n \n if (operanzi.get(i) == 'T') {\n T[i][i] = 1;\n F[i][i] = 0;\n } else if (operanzi.get(i) == 'F') {\n T[i][i] = 0;\n F[i][i] = 1;\n }\n }\n long aux=0;\n for (int l=1; l<n1; ++l) \n { \n for (int i=0, j=l; j<n1; ++i, ++j) \n { \n T[i][j] = F[i][j] = 0; \n for (int g=0; g<l; g++) \n { \n int k = i + g; \n long total_i_k = evaluate(T[i][k],F[i][k],'+'); \n long total_k_j = evaluate(T[k+1][j] , F[k+1][j],'+'); \n long total = evaluate(total_i_k,total_k_j,'*');\n if (operatori.get(k) == '&') \n { \n aux = evaluate(T[i][k],T[k+1][j],'*');\n T[i][j] = evaluate(T[i][j],aux,'+'); \n \n\n F[i][j] = evaluate( F[i][j],evaluate(total,aux,'-'),'+'); \n } \n if (operatori.get(k) == '|') \n { \n aux = evaluate(F[i][k],F[k+1][j],'*');\n F[i][j] = evaluate(F[i][j],aux,'+'); \n \n T[i][j] =evaluate( T[i][j],evaluate(total, aux,'-'),'+'); \n } \n if (operatori.get(k) == '^') \n { \n aux = evaluate(F[i][k],T[k+1][j],'*');\n long aux1= evaluate(T[i][k],F[k+1][j],'*');\n T[i][j] = evaluate( T[i][j],evaluate( aux , aux1,'+'),'+'); \n aux = evaluate(T[i][k],T[k+1][j],'*');\n aux1 = evaluate(F[i][k],F[k+1][j],'*');\n F[i][j] = evaluate( F[i][j],evaluate(aux,aux1,'+'),'+');\n } \n } \n } \n } \n return (int)T[0][n1-1]; \n }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}" ]
[ "0.6349637", "0.58991915", "0.58642316", "0.5721395", "0.55017567", "0.5416369", "0.53762573", "0.5343045", "0.53428936", "0.51079875", "0.50979596", "0.5085567", "0.50350565", "0.5020528", "0.50105697", "0.5009759", "0.4926545", "0.48699477", "0.48600885", "0.485043", "0.4845202", "0.48291254", "0.48247278", "0.4795038", "0.47823885", "0.4778049", "0.4770298", "0.47614154", "0.4748668", "0.47378665", "0.47175586", "0.46949458", "0.4684463", "0.46816024", "0.46770862", "0.46675503", "0.4667113", "0.46501264", "0.46078017", "0.45816812", "0.4554487", "0.4553517", "0.4529472", "0.45112827", "0.4500889", "0.44985235", "0.4476165", "0.4475325", "0.44664192", "0.44636053", "0.44631052", "0.446061", "0.4458583", "0.44581336", "0.44396016", "0.4435409", "0.44314814", "0.44284496", "0.44275442", "0.44230282", "0.44210392", "0.44029704", "0.4402239", "0.43990746", "0.4397233", "0.43907297", "0.43828666", "0.4377177", "0.43734387", "0.4372925", "0.43647766", "0.43639064", "0.43622294", "0.4360457", "0.4354525", "0.43535903", "0.4353293", "0.4353293", "0.4353293", "0.43506563", "0.43506196", "0.43431494", "0.4337205", "0.43217582", "0.43155482", "0.43151838", "0.43137124", "0.4311138", "0.43069166", "0.43008688", "0.42946285", "0.42915487", "0.42831784", "0.4277157", "0.42717093", "0.42622063", "0.42621338", "0.425615", "0.42561176", "0.42525953" ]
0.5743152
3
dynamic query method/finder all we need is to set up the method name (findBy.../findAll..) and then Spring Data JPA is going to provide us with the implementation fetch data from the database.
Owner findByLastName(String lastName);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Getter<ENTITY, FK> finder();", "public Faq[] findByDynamicSelect(String sql, Object[] sqlParams) throws FaqDaoException;", "@Repository\npublic interface HotelRepository extends JpaRepository<Hotel, Integer> {\n\t//query methods: findByPropertyName . . . (parses method name)\n\tpublic List<Hotel> findByPriceBetween(double low, double high);\n}", "public Items[] findByDynamicSelect(String sql, Object[] sqlParams) throws ItemsDaoException;", "@Repository\n@Transactional\npublic interface CatalogRepository extends CrudRepository<Catalog, Long> {\n Catalog findCatalogByCatalogCode(String code);\n\n @Query(value = \"select * from catalog where code like %:query% or name like %:query% \", nativeQuery = true)\n Set<Catalog> find(@Param(value = \"query\") String query);\n}", "public interface LiquorRepo extends CrudRepository<Liquor, Integer>, LiquorRepoCustom {\n Liquor findByName(String name);\n Liquor findByItemCode(String itemCode);\n ArrayList findAllByNameContaining(String name);\n ArrayList findAllByNameLikeIgnoreCase(String name);\n ArrayList findAllByItemCodeLikeIgnoreCase(String itemCode);\n ArrayList findAllByDistilleryLikeIgnoreCase(String distillery);\n}", "public Usuario[] findByDynamicSelect(String sql, Object[] sqlParams) throws SQLException;", "@Repository\npublic interface StudentRep extends JpaRepository<Student, String>, JpaSpecificationExecutor<Student> {\n\n List<Student> findByMName(String name);\n List<Student> findByMId(String Id);\n\n @Query(\"select s from student s where s.mName like ?1%\")\n List<Student> findByLikeName(String likeName);\n\n}", "@Repository\npublic interface QuestionRepository extends JpaRepository<Question,Long> ,Serializable{\n\n Question findById(Long id);\n\n @Query(value = \"select q.lang from Question q where q.lang =?1 or q.lang=?2 or q.lang=?3 or q.lang=?4 limit 0,?5 \",nativeQuery = true)\n List<String> findLang(String A, String B, String C, String D, int count);\n\n @Query(value = \"select * from Question q where q.lang =?1 or q.lang=?2 or q.lang=?3 or q.lang=?4 limit 0,?5 \",nativeQuery = true)\n List<Question> find(String A, String B, String C, String D, int count);\n//@Query(\"select q from Question q where lang =?1 or lang=?2 or lang=?3 or lang=?4\")\n//List<Question> find(String A, String B, String C, String D);\n\n @Query(value = \"select q.answer from Question q where q.lang =?1 or q.lang=?2 or q.lang=?3 or q.lang=?4 limit 0,?5 \",nativeQuery = true)\n List<String> findAnwserList(String A, String B, String C, String D, int count);\n\n\n}", "@Repository\npublic interface ItemRepository extends JpaRepository<Item, Integer> {\n\n\t/**\n\t * findByName method to get the respective item for the given name from db\n\t *\n\t * @param name is the name of the item\n\t * @return the item\n\t */\n\t@Query(value=\"select I.ID , I.NAME from ITEM I\",nativeQuery = true)\n\tpublic Item findByName(String name);\n\n\n\t\n\t/*\n\t * @Query(value = \"SELECT i.ID, i. FROM ITEM i\", nativeQuery = true) public\n\t * List<Item> findItems();\n\t */\n}", "public interface UserDao extends JpaRepository<User, Long>, UserDaoExt {\n\n public static final String ddd=\"\";\n /**\n * 原生sql\n * @param uid\n * @return\n */\n @Query(value = \"SELECT * FROM users WHERE uid = ?1\",nativeQuery = true)\n User findUserByAllId(Long uid);\n\n\n /**\n * jpq\n * @param uid\n * @return\n */\n @Query(\"FROM User WHERE uid = ?1\")\n User findUserById(Long uid);\n\n /**\n * 使用@Param注解注入参数\n * @param name\n * @return\n */\n @Query(value = \"FROM User b where b.name = :name\")\n List<User> findByNamedParam(@Param(\"name\") String name);\n\n\n /**\n * 使用约定命名规则\n * @param name\n * @return\n */\n List<User> findByName(String name);\n\n}", "public Usuario[] findByDynamicWhere(String sql, Object[] sqlParams) throws SQLException;", "public Faq[] findByDynamicWhere(String sql, Object[] sqlParams) throws FaqDaoException;", "public NominaPuesto[] findByDynamicSelect(String sql, Object[] sqlParams) throws NominaPuestoDaoException;", "@Repository\npublic interface UserMysqlRepository extends JpaRepository<UserEntity, String> {\n\n @Query(\"select u from UserEntity u where u.name like CONCAT('%',:name,'%') order by u.createdtime\")\n List<UserEntity> findByNameLike(@Param(\"name\") String name);\n\n @Query(\"select u from UserEntity u where u.name like CONCAT('%',:name,'%') order by u.createdtime\")\n Page<UserEntity> findByNameLike(@Param(\"name\") String name, Pageable pageable);\n\n @Query(\"select u from UserEntity u where u.loginName=?1\")\n UserEntity findByLoginName(String loginName);\n}", "@Override\n\tpublic List<T> find(String hql) {\n\t\treturn hibernateTemplate.find(hql);\n\t}", "public SgfensBanco[] findByDynamicSelect(String sql, Object[] sqlParams) throws SgfensBancoDaoException;", "public interface TaskJoinDao extends IBaseJpaRepository<TaskJoin>{\n\n @Query(\"SELECT a.id FROM UserInfo a WHERE a.mobile LIKE ?1\" )\n public List<Long> mobile(String mobile);\n\n @Query(\"SELECT a.id FROM Team a WHERE a.name LIKE ?1\" )\n public List<Long> teamName(String teamName);\n\n @Query(\"SELECT a.id FROM UserInfo a WHERE a.nickname LIKE ?1\" )\n public List<Long> nickName(String nickName);\n\n @Query(\"SELECT a.id FROM Team a WHERE a.userinfo.nickname LIKE ?1\" )\n public List<Long> teamNickName(String nickName);\n\n}", "public Items[] findByDynamicWhere(String sql, Object[] sqlParams) throws ItemsDaoException;", "public interface PersonRepository extends CustomRepository<Person, Long> {\n List<Person> findByAddress(String address);\n\n Person findByNameAndAddress(String name, String address);\n\n @Query(\"select p from Person p where p.name= :name and p.address= :address\")\n Person withNameAndAddressQuery(@Param(\"name\") String name, @Param(\"address\") String address);\n\n Person withNameAndAddressNamedQuery(String name, String address);\n\n}", "public List<Record> executeNativeFinder(String queryName, Object context);", "public Ruta[] findByDynamicSelect(String sql, Object[] sqlParams) throws RutaDaoException;", "public Ruta[] findByDynamicWhere(String sql, Object[] sqlParams) throws RutaDaoException;", "public TipologiaStruttura[] findByDynamicSelect(String sql, Object[] sqlParams) throws TipologiaStrutturaDaoException;", "public interface PortalPricesInfoResponsitory extends JpaCustomResponsitory<PortalPricesInfoEntity, Integer> {\n\n @Query(\"select p from PortalPricesInfoEntity p where p.name = ?1\")\n List<PortalPricesInfoEntity> findByName(String name);\n\n}", "@Override\n @SuppressWarnings(\"rawtypes\")\n public List dynamicQuery(DynamicQuery dynamicQuery)\n throws SystemException {\n return libroPersistence.findWithDynamicQuery(dynamicQuery);\n }", "public NominaPuesto[] findByDynamicWhere(String sql, Object[] sqlParams) throws NominaPuestoDaoException;", "public List findByNamedQuery(String queryName);", "public interface WorkerRepository extends JpaRepository<Worker,Long> {\n List<Worker> findByName(String name);\n\n List<Worker> findByAddress(String address);\n\n List<Worker> findByNameAndAddress(String name,String address);\n @Query(\"select p from Worker p where p.name=:name and p.address=:address\")\n List<Worker> withNameAndAddressQuery(@Param(\"name\")String Name, @Param(\"address\")String address);\n}", "interface UserRepository extends JpaRepository<User, Long> {\n\n Collection<User> findByUserNumber(String userNumber);\n Collection<User> findByFirstName(String firstName);\n Collection<User> findByLastName(String value);\n Collection<User> findByFirstNameAndLastName(String firstName, String lastName);\n\n @Query(\"select u from #{#entityName} u where u.team = ?1\")\n List<User> findAllByTeam(String teamName);\n\n Collection<WorkItem> findByWorkItems(User user);\n}", "public interface MenuInstanceRepo extends JpaRepository<MenuInstance,Long> {\n public List<MenuInstance> findByMenuNameContains(String menuName);\n public MenuInstance findByMenuTypeAndMenuForDate(String menuType, LocalDate menuForDate);\n public List<MenuInstance> findByMenuType(String menuType);\n public List<MenuInstance> findByMenuTypeAndMenuForDateAfter(String menuType, LocalDate fromDate);\n}", "@Override\n\tpublic <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {\n\t\treturn itemPublicacaoPersistence.findWithDynamicQuery(dynamicQuery);\n\t}", "public TipologiaStruttura[] findByDynamicWhere(String sql, Object[] sqlParams) throws TipologiaStrutturaDaoException;", "public interface DirektoratRepository extends JpaRepository<Direktorat,Long> {\n\n @Query(value = \"select d from Direktorat d where d.nama like :cariNama\")\n List<Direktorat> findByNama(@Param(\"cariNama\")String cariNama);\n\n List<Direktorat> findByKode(String kode);\n\n}", "public SgfensBanco[] findByDynamicWhere(String sql, Object[] sqlParams) throws SgfensBancoDaoException;", "@Repository\npublic interface DeviceTypeDao extends CrudRepository<DeviceType,Long> {\n\n DeviceType findByChinatypename(String chinatypename);\n\n// @Query(value=\"select * from tb_devicetype where chinatypename like ?1 or hextypename like ?1 or typename like ?1 or typenum like ?1\",nativeQuery=true)\n// DeviceType findSearch(String info);\n\n}", "@Repository\npublic interface IUserRepository extends JpaRepository<UserOB, Long> {\n\n @Query(\"SELECT u FROM UserOB u WHERE u.name = ?1 AND u.lastName = ?2\")\n List<UserOB> findByFullName(String aName, String aLastName);\n\n @Query(\"SELECT u FROM UserOB u WHERE u.email = ?1\")\n UserOB findByEmail(String email);\n\n @Query(\"SELECT u FROM UserOB u WHERE u.company.id = ?1\")\n List<UserOB> findByCompanyId(Long aId);\n\n @Query(\"SELECT u FROM UserOB u WHERE u.typUzytkownika =?1\")\n List<UserOB> findByUserType(ETypUzytkownika aType);\n\n}", "@Repository\npublic interface ActivityRep extends JpaRepository<Activity, Long>, JpaSpecificationExecutor<Activity>{\n\n List<Activity> findByMId(Long id);\n\n List<Activity> findByMName(String name);\n\n @Query(\"select a from activity a where a.mName like ?1%\")\n List<Activity> findByLikeName(String likeName);\n}", "public interface PlanProcedureRepository extends JpaRepository<PlanProcedure, Integer> {\n public PlanProcedure findByProcedureName(String procedureName);\n\n public List<PlanProcedure> findByPlanId(Integer planId);\n\n public PlanProcedure findByPlanIdAndProcedureName(Integer planId, String procedureName);\n\n public List<PlanProcedure> findByProcedureNameLike(String procedureName);\n\n public PlanProcedure findByProcedureId(Integer procedureId);\n\n\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface ShoppingCartItemRepository extends JpaRepository<ShoppingCartItem, Long> {\n\n @Query(\"select shopping_cart_item from ShoppingCartItem shopping_cart_item where shopping_cart_item.createBy.login = ?#{principal.username}\")\n List<ShoppingCartItem> findByCreateByIsCurrentUser();\n\n @Query(\"select shopping_cart_item from ShoppingCartItem shopping_cart_item where shopping_cart_item.updateBy.login = ?#{principal.username}\")\n List<ShoppingCartItem> findByUpdateByIsCurrentUser();\n\n Page<ShoppingCartItem> findByCreateByLoginOrderByCreateAtDesc(String username, Pageable pageable);\n}", "@Repository\npublic interface DepartmentRepository extends JpaRepository<Department, Long> {\n /**\n * 根据ID和名称模糊匹配获取部门\n * @param id\n * @param name\n * @return\n */\n List<Department> findByIdOrName(Long id, String name);\n /**\n * 根据部门名称模糊匹配\n * @param name\n * @return\n */\n Department getByName(String name);\n Department getByNameEquals(String name);\n Department getByNameLike(String name);\n}", "public interface StudentDao extends MongoRepository<Student, String> {\n /**\n * 自定义搜索 find + By + 字段 首字母大写\n * @param name\n * @return\n */\n Student findByName(String name);\n\n /**\n * 自定义搜索 find + By + 字段 首字母大写 +Like\n * @param name\n * @return\n */\n List<Student> findByNameLike(String name);\n}", "@Repository\npublic interface UserRepository extends JpaRepository<SysUser, Long> {\n\n @Query(value =\" from SysUser u where u.username= :userName \")\n public SysUser findByUserName(@Param(\"userName\") String userName);\n}", "public Tipo[] findByDynamicSelect(String sql, Object[] sqlParams)\r\n throws TipoDaoException;", "@Repository\npublic interface AnalyseResultRepository extends JpaRepository<AnalyseCsv,Integer> {\n/* Iterable<AnalyseCsv> findById(Integer resultid);*/\n\n/* //按名称进行模糊搜索\n List<DatamodelSource> findByfilenameLike(String sourcename);*/\n\n\n\n\n}", "@Transactional\npublic interface Route_configJPA extends JpaRepository<Route_configEntity, String> {\n\n /**\n * Find by condition list.\n *\n * @param key the key\n * @return the list\n */\n @Query(value = \"select * from ROUTE_CONFIG t where t.SENDER like %?1% or t.SENDER_ORG like %?1% or t.RECEIVER_ORG like %?1% or t.RECEIVER like %?1% or t.SERVICE_CODE like %?1%\",nativeQuery=true)\n List<Route_configEntity> findByCondition(String key);\n\n}", "public interface UserRepository extends JpaRepository<User, Long> {\n\n @Query(\"select u From User u where u.email='SYSTEM'\")\n User findSystemUser();\n\n @Query(\"select u From User u where u.email = :username\")\n List<User> loadUsersByUserName(@Param(\"username\") String username);\n\n @Query(\"select u from User u join u.roles r where r.name = :rolename\")\n List<User> loadUsersByRoleName(@Param(\"rolename\")String rolename);\n\n @Query(\"select u From User u Where u.email like :ctx Or u.userNumber like :ctx Or u.profile.phone like :ctx\")\n List<User> findByEmailOrUserNumberOrPhone(@Param(\"ctx\") String compare);\n}", "public interface UserRepository extends JpaRepository<User, Integer> {\n\n User findByUserName(String userName);\n\n User findByUserNameAndUserType(String userName, Integer userType);\n\n @Query(\"from User u where u.userName=:userName\")\n User findUser(@Param(\"userName\") String userName);\n\n}", "@Override\n\tpublic List<Item> findItemListByQuery() {\n\t\tCriteriaBuilder cb=entityManager.getCriteriaBuilder();\n\t//\tCriteriaQuery<Item> query = cb.createQuery(Item.class); \n // Root<Item> item = query.from(Item.class);\n TypedQuery<Item> iquery=entityManager.createQuery(\"select i from Item i\", Item.class);\n\t\treturn iquery.getResultList();\n\t\t\n\t}", "public Cliente[] findByDynamicSelect(String sql, Object[] sqlParams) throws ClienteDaoException;", "public DatiBancari[] findByDynamicSelect(String sql, Object[] sqlParams) throws DatiBancariDaoException;", "@Repository\npublic interface MpidRepository extends JpaRepository<Mpid, Integer> {\n \n Mpid findByHandle(String handle);\n\n List<Mpid> findByDealCode(String dealCode);\n\n}", "public interface UserDao extends CrudRepository<User,Long>{\r\n\r\n\t//017 mappers; retreive uName or Email to retrieve inst of user Entity; the naming 'findBy' helps sBt retrieve user because it assume that the user class has userNm and email fields and it ignore the UserNm case in the dao, and it will gen mappers during initialization to be used for retrieving the user obj\r\n\tUser findByUsername(String username);\r\n\tUser findByEmail(String email);\r\n}", "public Tipo[] findByDynamicWhere(String sql, Object[] sqlParams)\r\n throws TipoDaoException;", "public interface DropDownFieldRepository extends JpaRepository<DropDownField,Long> {\n\n @Query(\"select dropDownField from DropDownField dropDownField where dropDownField.user.login = ?#{principal.username}\")\n List<DropDownField> findByUserIsCurrentUser();\n\n\n @Query(\"select dropDownField from DropDownField dropDownField where dropDownField.user.login = ?#{principal.username}\")\n Page<DropDownField> findByUserIsCurrentUser(Pageable pageable);\n\n}", "public interface BookRepository extends JpaRepository<Book, Integer> {\n public List<Book> findByBookName(String bookName);\n}", "public interface CustomerRepository extends JpaRepository<Customer,Long> {\n\n @Query(\"select customer from Customer customer where customer.user.login = ?#{principal.username}\")\n List<Customer> findByUserIsCurrentUser();\n \n @Query(\"select customer from Customer customer where customer.user.login = ?#{principal.username}\")\n Page<Customer> findByUserIsCurrentUser(Pageable page);\n\n}", "@Override\n\tpublic List<T> findByName(String name) {\n\t\treturn baseDaoImpl.findByName(name);\n\t}", "public Cliente[] findByDynamicWhere(String sql, Object[] sqlParams) throws ClienteDaoException;", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface EMContractRepository extends JpaRepository<EMContract, UUID>,EMContractRepositoryCustom {\n\n /**\n * add by namnh\n *\n * @return\n */\n @Override\n List<EMContract> findAll();\n\n List<EMContract> findAllByIsActiveTrue();\n @Query(value = \"select id from EMContract where UPPER(NoFBook) = UPPER (?1) and CompanyID = ?2 and isActive = 1\", nativeQuery = true)\n UUID findIdByNoFBook(String expenseItemCode, UUID companyId);\n\n @Query(value = \"select id from EMContract where UPPER(NoMBook) = UPPER (?1) and CompanyID = ?2 and isActive = 1\", nativeQuery = true)\n UUID findIdByNoMBook(String expenseItemCode, UUID companyId);\n}", "public <T> List<T> findByQuery(AnutaQuery<T> query);", "public interface ProductMetaDataRepo extends MongoRepository<ProductMetaData, String>, ProductMetaDataRepoCustom {\n ArrayList<ProductMetaData> findAllByNameContainingIgnoreCase(String name);\n\n ArrayList<ProductMetaData> findByItemCodeContainingIgnoreCase(String itemCode);\n\n ArrayList<ProductMetaData> findByBreweryContainingIgnoreCase(String brewery);\n\n ArrayList<ProductMetaData> findByDistilleryContainingIgnoreCase(String distillery);\n\n ArrayList<ProductMetaData> findByImporterContainingIgnoreCase(String importer);\n}", "@Repository\npublic interface EventRepository extends JpaRepository<Event, Integer> {\n\n @Query(\"select e from Event e where lower(e.title) like lower(concat('%',:search,'%'))\"\n + \" or e.author in (select u.userId from User u \"\n + \" where lower(u.firstName) like lower(concat('%',:search,'%')) \"\n + \" or lower(u.lastName) like lower(concat('%',:search,'%')))\"\n + \" or lower(e.description) like lower(concat('%',:search,'%'))\")\n List<Event> findByTitleOrAuthorOrDescription(\n @Param(\"search\") String search);\n\n @Query(\"select e from Event e where e.startTime between :startTime and :endTime\"\n + \" or e.endTime between :startTime and :endTime\")\n List<Event> findBetweenStartTimeAndEndTime(\n @Param(\"startTime\") Timestamp startTime,\n @Param(\"endTime\") Timestamp endTime);\n\n @Query(\"select e from Event e where e.author = (select u.userId from User u where u.email = :email)\")\n List<Event> findByAuthorEmail(@Param(\"email\") String email);\n \n}", "public interface WhereHqlGetter {\n /**\n * 生成查询的hql语句\n *\n * @param entityName 要查询的实体名称\n * @param modelName 实体在查询中的别名\n * @param enableSort 启用排序\n * @return\n */\n KeyValuePair<String, Map<String, Object>> getWhereHql(String entityName, String modelName, boolean enableSort);\n\n /**\n * 生成查询条数的语句\n * @param entityName\n * @param modelName\n * @return\n */\n KeyValuePair<String, Map<String, Object>> getCountHql(String entityName, String modelName);\n}", "public interface BookDAO extends JpaRepository<Book,Integer> {\n List<Book> findAllByCategory(Category category);\n List<Book> findAllByTitleLikeOrAuthorLike(String keyword1, String keyword2);\n}", "public interface VendorRepository extends CrudRepository<Vendor, Integer> {\n Vendor findByName(String name);\n Iterable<Vendor> findByNameLike(String search);\n Iterable<Vendor> findByLocation(String location);\n Vendor findByUser(User user);\n}", "public void test_findByNamedOfQuery() {\r\n\t\t// step 1:\r\n\t\tList personList = this.persistenceService.findByNamedOfQuery(FIND_ALL_PERSON);\r\n\t\tassertNotNull(personList);\r\n\t\tassertEquals(ALL_PERSON_COUNT, personList.size());\r\n\t\t\r\n\t\t// init again\r\n\t\tpersonList = null;\r\n\t\t// step 2:\r\n\t\tpersonList = this.persistenceService.findByNamedOfQuery(FIND_PERSON_BY_NAME_EXT, NAME_PARAM[0]);\r\n\t\tassertForFindGoingmm(personList);\r\n\t\t\r\n\t\t// init again\r\n\t\tpersonList = null;\r\n\t\t// step 3:\r\n\t\tpersonList = this.persistenceService.findByNamedOfQuery(FIND_PERSON_BY_NAME, getParamMap(1));\r\n\t\tassertForFindGoogle(personList);\r\n\t}", "@Repository\npublic interface IUserRepository extends JpaRepository<UserOB,Long> {\n @Query(\"SELECT u FROM UserOB u WHERE u.active = ?1\")\n List<UserOB> findUserByActivity (Boolean aActive);\n @Query(\"SELECT u FROM UserOB u WHERE u.login LIKE ?1\")\n UserOB findUserByLogin (String aLogin);\n @Query(\"SELECT u FROM UserOB u WHERE u.email LIKE ?1\")\n UserOB findUserByEmail (String aEmail);\n @Query(\"SELECT u FROM UserOB u WHERE u.name = ?1\")\n List<UserOB> findUserByName (String aName);\n @Query(\"SELECT u FROM UserOB u WHERE u.surname = ?1\")\n List<UserOB> findUserBySurname (String aSurname);\n @Query(\"SELECT u FROM UserOB u WHERE u.name = ?1 AND u.surname = ?2\")\n List<UserOB> findUserByNameAndSurname (String aName, String aSurname);\n @Query(\"SELECT u FROM UserOB u WHERE u.role.name = ?1\")\n List<UserOB> findUserByRole(String aRoleOB);\n\n\n}", "public interface GoodsRepository extends JpaRepository<Goods, Long> {\n\n /**\n * Find by name list.\n *\n * @param name the name\n * @return the list\n */\n List<Goods> findByName(String name);\n}", "public DatiBancari[] findByDynamicWhere(String sql, Object[] sqlParams) throws DatiBancariDaoException;", "@Query(value = \"SELECT * FROM Users where user_name = :user_name\", nativeQuery = true) // jpql\n\tUser findUserByUserName(@Param(\"user_name\") String user_name);", "public interface CustomerRepository extends JpaRepository<Customer, Long> {\n\n\t//SELECT * FROM CUSTOMER WHERE LASTNAME = ?\n\tList<Customer> findByLastName(String lastName);\n\t\n\t//SELECT * FROM CUSTOMER WHERE FIRSTNAME = ? AND LASTNAME = ?\n\tList<Customer> findByFirstNameAndLastName(String firstName, String lastName);\n\t\n\t//JPQL\n\t@Query(\"from Customer c where c.firstName = :firstName and c.lastName = :lastName\")\n\tList<Customer> miMetodo(String firstName, String lastName);\n\t\n}", "public SgfensPedidoProducto[] findByDynamicSelect(String sql, Object[] sqlParams) throws SgfensPedidoProductoDaoException;", "@Repository\npublic interface IJpaUserDAO extends JpaRepository<JpaUser,Long>{\n\n JpaUser findByName(String name);\n\n JpaUser findByNameAndAge(String name, Integer age);\n\n}", "@Repository\npublic interface DoctorRepository extends JpaRepository<Doctor, Long>,QueryDslPredicateExecutor<Doctor> {\n\n Page<Doctor> findByName(String name, Pageable pageable);\n\n\n @Query(\"SELECT new com.child.json.doctor.DoctorNameJson(d.id,d.name) FROM Doctor d\")\n List<DoctorNameJson> findAllDoctorName();\n\n}", "public interface TariffRepository extends JpaRepository<Tariff, Long> {\n\n public Tariff findByName(TariffType name);\n\n public Tariff findByTariffId(Long tariffId);\n\n @Query(\"select t.name from Tariff t\")\n public List<TariffType> findAllNames();\n\n}", "public SgfensPedidoProducto[] findByDynamicWhere(String sql, Object[] sqlParams) throws SgfensPedidoProductoDaoException;", "@Repository\npublic interface EmpresaRepository extends JpaRepository<Empresa, Long> {\n\n Optional<Empresa> findById(Long pollId);\n\n Page<Poll> findByCreatedBy(Long userId, Pageable pageable);\n\n @Query(\"select e from Empresa e where ( :nome is null or lower(e.user.name) like lower(concat('%', :nome,'%')) ) and ( :categoriaEmpresa is null or e.categoriaEmpresa = :categoriaEmpresa) \")\n\tPage<Empresa> getEmpresasByFilters(@Param(\"nome\")String nome, @Param(\"categoriaEmpresa\")CategoriaEmpresa categoriaEmpresa, Pageable pageable);\n\n}", "public interface DoctorService extends CrudRepository<Doctor, Integer>{\r\n\t\r\n\tIterable<Doctor> findByDocFirstName(String docFirstName);\r\n\tIterable<Doctor> findByDocLastName(String docLastName);\r\n\tIterable<Doctor> findByDocFirstNameAndDocLastName(String docFirstName,String docLastName);\r\n\r\n}", "public interface ProductRepository extends CrudRepository<Product,Long> {\n Product findById(Long id);\n Product findByName(String name);\n List<Product> findByNameIgnoreCaseContaining(String name);\n List<Product> findByDescriptionIgnoreCaseContaining(String description);\n\n}", "public interface SysUserDao extends MyJpaRepository<SysUser,String> {\n public void delete(SysUser user);\n\n /**\n * 直接在接口中定义查询方法,如果是符合规范的,可以不用写实现,目前支持的关键字写法如下:\n * findByFirstNameAndLastName: where X.lastname=?1 and x.firstName=?2\n * findByFirstNameORLastName: where X.lastname=?1 or x.firstName=?2\n * etc: Between LessThan GreaterThan isNull like notLike startingWith endingwith\n * not in notin true false\n *\n * 使用@Query\n 可以在自定义的查询方法上使用@Query来指定该方法要执行的查询语句,比如:\n @Query(\"select o from UserModel o where o.uuid=?1\")\n public List<UserModel> findByUuidOrAge(int uuid);\n */\n\n// @Query来指定本地查询,只要设置nativeQuery为true,比如:\n// @Query(value=\"select * from tbl_user where name like %?1\" ,nativeQuery=true)\n// public List<UserModel> findByUuidOrAge(String name);\n\n public List<SysUser> findByLoginName(String loginName);\n\n //特殊的条件,如创建时间大于2017年\n @Query(\"select o from SysUser o where createTime>'2017-01-01' and loginName=?1\")\n public List<SysUser> findByLoginName1(String loginName);\n\n\n //直接使用native uery,如此例需要用到md5函数,但可移殖性不好,不推荐。\n @Query(value = \"select count(*) from t_sys_user_info where login_name= ?1 and password=md5(?2)\",nativeQuery = true)\n public int ifValidUser(String name,String pwd);\n\n\n}", "public interface UserRepository extends JpaRepository<User, Long> {\n /**\n * @param username Username to be searched from the JPA database\n * @return User object if one was found\n */\n User findByName(String username);\n\n /**\n * @param name Username or part of a username to be searched\n * @return List of users if the search criteria was met\n */\n List<User> findByNameContaining(String name);\n\n /**\n * @param email Email of user to be searched\n * @return User object if one was found with the provided email\n */\n User findByEmailIs(String email);\n}", "List<Employee> findAllByName(String name);", "@Repository\npublic interface ConductorRepository extends JpaRepository<Conductor, Integer> {\n Conductor findByPhone(String newPhone);\n\n\n @Query(\"select c from Conductor c where (?1 is null or c.realname like ?1)\" +\n \" and (?2 is null or c.phone like ?2)\")\n Page<Conductor> findPage(String name, String phone, Pageable pageable);\n}", "public interface LookupRepository extends JpaRepository<Lookup,Long> {\n\n @Query(value = \"select distinct discriminator from RULES_MANAGER.Lookup l\", nativeQuery = true)\n List<String> findAllTypes();\n\n @Query(value = \"select * from RULES_MANAGER.Lookup where discriminator = ?1 and reference_id = ?2 order by name\", nativeQuery = true)\n List<Lookup> findByTypeAndReferenceId(String type, Long referenceId);\n\n}", "public interface CustomerRepository extends JpaRepository<Customer,Long> {\r\n public Customer findByNumberID(String numberID);\r\n public List<Customer> findByLastName(String lastName);\r\n public List<Customer> findByRegion(Region region);\r\n}", "public interface SupplierRepository extends JpaRepository<Supplier,Long> {\n\n Page<Supplier> findByNamaLike(String nama, Pageable pageable);\n List<Supplier> findByNama(String nama);\n}", "@SelectProvider(type = BaseProvider.class, method = \"findAll\")\n List<T> findAll();", "@Repository\npublic interface PersonRepository extends JpaRepository<Person, Long> {\n\n Person findByPeselIn(String pesel);\n}", "public interface ReadDao {\n\n /**\n * 根据手机号码获取用户\n *\n * @param phone\n * @return\n */\n @Select(\"select * from t_user where phone=#{phone}\")\n UserModel getUserByPhone(@Param(\"phone\") String phone);\n\n /**\n * 根据用户名密码获取用户\n *\n * @param phone\n * @return\n */\n @Select(\"select * from t_user where phone=#{phone} and passwd=substr(md5(#{pwd}),9,8)\")\n UserModel getUserByPassword(@Param(\"phone\") String phone, @Param(\"pwd\") String pwd);\n\n /**\n * 根据商品名查询商品\n *\n * @return\n */\n @Select(\"select id goodsid,name,price from t_goods where name like #{name}\")\n List<Commodity> queryCommodity(@Param(\"name\") String name);\n\n /**\n * 根据关键字查询\n *\n * @param keyword\n * @param size\n * @return\n */\n @Select(\"select * from t_goods where name like #{keyword} limit 0,#{size}\")\n public List<Commodity> getCommodityByKeyword(@Param(\"keyword\") String keyword, @Param(\"size\") int size);\n\n\n /**\n * 根据ID获取商品\n *\n * @param id\n * @return\n */\n @Select(\"select * from t_goods where id=#{id}\")\n public Commodity getCommodityById(@Param(\"id\") long id);\n\n /**\n * 查询所有商品类别\n * @return\n */\n @Select(\"select id,category1,category2 from t_goods_category\")\n public List<CommodityCategory> queryCategorys();\n\n /**\n * 查询所有商品\n * @return\n */\n @Select(\"select * from t_goods\")\n public List<Commodity> queryAllCommodityes();\n\n\n /**\n * 根据父级名称获取子级名称\n *\n * @param name\n * @return\n */\n @Select(\"select * from t_goods_category where category1=#{name}\")\n public List<CommodityCategory> getCommodityCategoryByParentName(@Param(\"name\") String name);\n\n /**\n * 获取一级分类名称\n *\n * @return\n */\n @Select(\"select DISTINCT(category1) as category1 from t_goods_category\")\n public List<CommodityCategory> getParentCommodityCateory();\n}", "public interface DownMchBusiInfoRepository extends JpaRepository<DownMchBusiInfo, String> , JpaSpecificationExecutor<DownMchBusiInfo> , Serializable {\n\n /**\n * 获取该商户所对应的通道\n * @return\n */\n @Query(\"from DownMchBusiInfo where down_sp_id = ?1 and down_mch_id = ?2 and down_mch_busi_type = ?3\")\n List<DownMchBusiInfo> queryMchPassage(String downSpId, String downMchId, String downMchBusiType);\n\n /**\n * 获取该商户所有的通道\n * @param downMchId\n * @param downMchBusiType\n * @return\n */\n @Query(\"from DownMchBusiInfo where down_mch_id = ?1 and down_mch_busi_type = ?2\")\n List<DownMchBusiInfo> queryMchPassage(String downMchId , String downMchBusiType);\n\n}", "public interface EssayQuestionDetailRepository extends JpaRepository<EssayQuestionDetail, Long>, JpaSpecificationExecutor<EssayQuestionDetail> {\n\n // List<EssayQuestionDetail> findByBizStatusAndStatusAndType(int bizStatus, int status, int type, Pageable pageRequest);\n\n\n List<EssayQuestionDetail> findByStatusAndType(int status, int type);\n\n // long countByTypeAndBizStatusAndStatus(int type,int bizStatus, int status);\n\n\n List<EssayQuestionDetail> findByIdIn(List<Long> detailIds);\n\n List<EssayQuestionDetail> findByStatusNot(int status);\n\n EssayQuestionDetail findById(long detailId);\n\n List<EssayQuestionDetail> findByStatus(int status);\n\n @Query(\"select eqd.id from EssayQuestionDetail eqd where eqd.type = ?1 and trim(eqd.stem) like ?2\")\n List<Long> findIdByTypeAndStem(int type, String stem);\n// List<EssayPaperDetail> findEssayPaperByEssayQuestionDetail(long id);\n\n// @Transactional\n// @Query(\"SELECT ep FROM EssayQuestionDetail eq JOIN eq.essayPaper ep\")\n// List<EssayPaperDetail> findPaperList(long id);\n\n EssayQuestionDetail findByIdAndStatus(long detailId, int status);\n}", "public interface ResourceDAO {\n //通过资源信息获取id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \")\n public List<Long> findIdByResourceInfo(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId) ;\n\n //通过资源信息和可用性获取可用id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \" +\n \" AND r.state = #{state} \")\n public List<Long> findIdByResourceInfoAndState(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId,\n @Param(\"state\") int state) ;\n\n //通过ids获取资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取可用的资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.state = #{state} \",\n \" AND r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIdsAndState(@Param(\"ids\") List<Long> ids , @Param(\"state\") int state) ;\n\n //通过ids获取资源信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceInfosByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源名称\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceName \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceNameByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源可用信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.state \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithStateByIds(@Param(\"ids\") List<Long> ids) ;\n\n\n //获取所有处于某种状态下的资源信息\n @Select(\" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.state = #{state} \")\n public List<ResourceRecord> findIdsWithResourceInfoByState(@Param(\"state\") int state) ;\n\n //通过名字获取资源记录(分页)\n @Select(\" SELECT * \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \" +\n \" LIMIT ${skip},${size} \")\n public List<ResourceRecord> findByNameInPage(@Param(\"name\") String name,\n @Param(\"skip\") int skip,\n @Param(\"size\") int size);\n //通过名字获取资源数\n @Select(\" SELECT count(1) \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \")\n long getCountByName(@Param(\"name\") String name);\n\n\n //获取资源树信息\n @Select(\"SELECT r.resourceId , r.resourceName , r.parentId , r.state FROM btl_resource r\")\n public List<ResourceRecord> findAllRoleIdsWithRoleNameAndParentIdAndState() ;\n\n //添加资源\n @Insert(\" INSERT IGNORE INTO btl_resource(createTime , resourceCode , resourceName , resourceURL , resourceMethodType , systemId , state , parentId , resourceMemo) \" +\n \" VALUES(now() , #{re.resourceCode} , #{re.resourceName} , #{re.resourceURL} , #{re.resourceMethodType} , #{re.systemId} , #{re.state} , #{re.parentId} , #{re.resourceMemo}) \")\n public int insertResource(@Param(\"re\") ResourceRecord re);\n\n //删除资源\n @Delete(\"DELETE FROM btl_resource WHERE resourceId=#{resourceId}\")\n public int deleteById(@Param(\"resourceId\") long resourceId);\n\n //更新资源\n @Update(\"UPDATE btl_resource SET \" +\n \" resourceCode = #{re.resourceCode} , \" +\n \" resourceName = #{re.resourceName} , \" +\n \" resourceURL = #{re.resourceURL} , \" +\n \" resourceMethodType = #{re.resourceMethodType} , \" +\n \" systemId = #{re.systemId} , \" +\n \" state = #{re.state} , \" +\n \" parentId = #{re.parentId} , \" +\n \" resourceMemo = #{re.resourceMemo} \" +\n \" WHERE resourceId = #{re.resourceId}\")\n public int updateResource(@Param(\"re\") ResourceRecord re);\n\n}", "@Repository\npublic interface BlogRepository extends CrudRepository<Blog, Integer>{\n\n @Query(\"select b from Blog b where b.title like :title escape '/'\")\n public List<Blog> findBlogByTitle(@Param(\"title\") String title);\n\n @Query(\"select b from Blog b where b.author=:author\")\n public List<Blog> findBlogByAuthor(@Param(\"author\") String author);\n\n @Query(\"select b from Blog b where b.author like :keywords escape '/'\")\n public List<Blog> findBlogByAuthorKeywords(@Param(\"keywords\") String keywords);\n\n @Query(value = \"SELECT * from blog ORDER BY UNIX_TIMESTAMP(blog.create_date) DESC LIMIT :start, :end\", nativeQuery = true)\n public List<Blog> listBlog(@Param(\"start\") Integer start, @Param(\"end\") Integer end);\n}", "public interface RatesRepository extends CrudRepository<Rate, Long> {\n Rate findByCurrency_Name_AndDate(String name, Date date);\n}", "public interface ContactRepository extends JpaRepository<Contact, Integer> {\n\n public List<Contact> getByName(String name);\n\n public List<Contact> getByNumber(String number);\n\n public List<Contact> getByUserId(int id);\n}", "public interface UserRepository extends JpaRepository<User, String> {\r\n\r\n\tList<User> findByNameLike(String name); \r\n\t\r\n\r\n}", "public RelacionConceptoEmbalaje[] findByDynamicSelect(String sql, Object[] sqlParams) throws RelacionConceptoEmbalajeDaoException;", "public interface TransactionFlowRepository extends JpaRepository<TransactionFlow, Long> {\n @Query(\"select tf from TransactionFlow tf where tf.uid=?1 order by operateDate desc\")\n public List<TransactionFlow> findByUid(Long uid);\n\n @Query(\"select tf from TransactionFlow tf where tf.orderNo=?1 order by operateDate desc\")\n public List<TransactionFlow> findByOrderNo(String orderNo);\n\n}", "@Query(\"select i from Product i where name=:name\")\r\n public List<Product> findByQuery(@Param(\"name\")String netto);", "public abstract T findByName(String name) ;" ]
[ "0.62656206", "0.6235466", "0.61981547", "0.61190724", "0.6088847", "0.60299975", "0.60191894", "0.6018273", "0.6010124", "0.6001861", "0.5999717", "0.59934723", "0.59846354", "0.597384", "0.59592867", "0.5946355", "0.5945871", "0.5928076", "0.5925613", "0.5925559", "0.5924781", "0.59086066", "0.59041333", "0.5899215", "0.5896517", "0.5886862", "0.5871233", "0.58687645", "0.58673793", "0.5861811", "0.5861599", "0.585196", "0.5844255", "0.5839824", "0.5824009", "0.5822721", "0.58213633", "0.58210534", "0.58170766", "0.58122385", "0.58027864", "0.58021545", "0.5786273", "0.578125", "0.57642835", "0.57516813", "0.5744471", "0.5743033", "0.5736151", "0.572303", "0.571864", "0.57140124", "0.57127124", "0.5700885", "0.5700363", "0.5699107", "0.5689701", "0.56811756", "0.5680653", "0.5679904", "0.56791645", "0.56743836", "0.5668337", "0.56679916", "0.56625825", "0.56550294", "0.5653868", "0.56485677", "0.5647456", "0.5643411", "0.56420904", "0.56412065", "0.5637643", "0.5633423", "0.56311303", "0.5628021", "0.56212324", "0.5616104", "0.5614558", "0.56061965", "0.5604379", "0.560342", "0.56033456", "0.5599587", "0.55959433", "0.55882883", "0.558806", "0.5584445", "0.5583036", "0.5581286", "0.5580819", "0.55789024", "0.5571032", "0.5570338", "0.5568012", "0.55582887", "0.5556746", "0.55543494", "0.55523425", "0.5540146", "0.5540028" ]
0.0
-1
maximum valid time in milliseconds constructor
public EditorDayTime( int columnIndex, int row ) { // use spin editor super( columnIndex, row ); m_spin = new SpinEditor(); m_spin.setFormat( "00" ); setControl( m_spin ); // determine min & max valid times m_min = 0; m_max = Time.MILLISECONDS_IN_DAY; Day day = JPlanner.plan.daytypes.get( row ); if ( columnIndex > Day.SECTION_START1 ) { m_min = ( (Time) day.getValue( columnIndex - 1 ) ).getDayMilliseconds(); m_min += 60000; } int num = day.getNumberOfPeriods(); if ( columnIndex < Day.SECTION_START1 + 2 * num - 1 ) { m_max = ( (Time) day.getValue( columnIndex + 1 ) ).getDayMilliseconds(); m_max -= 60000; } // add listener text changes to wrap hours and minutes, and set error status addListener( ( observable, oldText, newText ) -> { // as prefix hold hours, if not null means minutes are being edited if ( m_spin.getPrefix() != null ) { // if minutes greater than 59, increase hours int minutes = m_spin.getInteger(); if ( minutes > 59 ) { String prefix = m_spin.getPrefix(); int hours = minutes / 60 + Integer.parseInt( prefix.substring( 0, prefix.length() - 1 ) ); m_spin.setPrefixSuffix( hours + ":", null ); m_spin.setInteger( minutes % 60 ); return; } // if minutes less than 0, decrease hours if ( minutes < 0 ) { String prefix = m_spin.getPrefix(); int hours = ( minutes - 60 ) / 60 + Integer.parseInt( prefix.substring( 0, prefix.length() - 1 ) ); m_spin.setPrefixSuffix( hours + ":", null ); m_spin.setInteger( ( minutes + 60 ) % 60 ); return; } } // check editor value and if error String error = check( newText ); if ( error == null ) JPlanner.setNoError( getControl(), "" ); else JPlanner.setError( getControl(), error ); } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getMaxTime() { return _maxTime; }", "public float getMaxTimeSeconds() { return getMaxTime()/1000f; }", "public Integer getMaxTime() {\n return maxTime;\n }", "TimeResource maxDuration();", "int getMaxRecordingMillis();", "public long getMaxTime()\n {\n return times[times.length - 1];\n }", "public long getRunMaxMillis()\n {\n return 0L;\n }", "public void setMaxTime(int aMaxTime)\n{\n // Set max time\n _maxTime = aMaxTime;\n \n // If time is greater than max-time, reset time to max time\n if(getTime()>_maxTime)\n setTime(_maxTime);\n}", "public double getMaxTimeDiff()\n\t{\n\t\treturn 0;\n\t}", "public long getTimeLimit() {\n\t\treturn timeLimit;\n\t}", "public void ponerMaximoTiempo() {\n this.timeFi = Long.parseLong(\"2000000000000\");\n }", "public void setMaxTime(Integer maxTime) {\n this.maxTime = maxTime;\n }", "private AbsTime(long t) throws IllegalArgumentException\n {\n itsValue = t;\n }", "@Test (expected = IllegalArgumentException.class)\n\tpublic void testConstructor3LargeMinute() {\n\t\tnew CountDownTimer(12, 60, 14);\n\t}", "public LimitDuration(long maxDuration) {\n _maxDuration = maxDuration;\n }", "public void setMaxTimeSeconds(float aTime) { setMaxTime(Math.round(aTime*1000)); }", "public void setTimeLimit(long value) {\n\t\ttimeLimit = value;\n\t}", "public java.lang.Long getValidToMillis() {\n return validToMillis;\n }", "public Time(){\r\n Seconds = 0; \r\n }", "protected int maxTimeout() { return 15*1000*1000; }", "public java.lang.Long getValidToMillis() {\n return validToMillis;\n }", "public void setValidToMillis(java.lang.Long value) {\n this.validToMillis = value;\n }", "public interface DURATION_INFINITY_NSEC\n{\n\tint value = 134217727;\n}", "long getTimeInMillis();", "public long getMaxTime(final TimeUnit timeUnit) {\n notNull(\"timeUnit\", timeUnit);\n return timeUnit.convert(maxTimeMS, TimeUnit.MILLISECONDS);\n }", "@Test(expected = IllegalArgumentException.class)\n public void testConstructorBadMinutesOne() {\n CountDownTimer s = new CountDownTimer(4, 100, 30);\n }", "public int getEleMaxTimeOut(){\r\n\t\t String temp= rb.getProperty(\"eleMaxTimeOut\");\r\n\t\t return Integer.parseInt(temp);\r\n\t}", "com.google.protobuf.Duration getSequenceMaximumDuration();", "public Long getMaxDelayTime() {\n return this.MaxDelayTime;\n }", "int getAbsoluteMaximumDelay();", "public Time() {\n this(System.currentTimeMillis());\n }", "public static long getMaximumResponseTime() {\n return (long) maxResponseTime;\n }", "public java.lang.Long getValidFromMillis() {\n return validFromMillis;\n }", "public java.lang.Long getValidFromMillis() {\n return validFromMillis;\n }", "public int getTimeOut()\r\n\t{\r\n\t\tString time = JOptionPane.showInputDialog(null, \"Please enter the timeout amount in milliseconds: \", \"Set Timeout\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t//Check to see if the entry was invalid\r\n\t\twhile(!isNumber(time))\r\n\t\t\ttime = JOptionPane.showInputDialog(null, \"You must enter a NUMBER. Please re-enter the timeout time in milliseconds: \", \"Set Timeout\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\r\n\t\treturn Integer.parseInt(time);\r\n\t}", "public long getMaxActiveTime()\n {\n if (_maxActiveTime > Long.MAX_VALUE / 2)\n return -1;\n else\n return _maxActiveTime;\n }", "public AbsTime() throws Time.Ex_TimeNotAvailable\n {\n itsValue = timeNow();\n }", "public final long mo20954WX() {\n return 10485760;\n }", "public boolean hasValidToMillis() {\n return fieldSetFlags()[5];\n }", "public long ticks(){\n return maxTicks;\n\n }", "public java.util.Collection getTimeLimit();", "protected long getLastMsTime() {\r\n return lastMsTime;\r\n }", "int getMinRecordingMillis();", "int getMaximumDelay();", "private TimeUtil() {}", "@Test(expected = IllegalArgumentException.class)\n public void testConstructorNegativeMinutesOne(){\n \tCountDownTimer s = new CountDownTimer(5, -5, 5);\n }", "public Time() {\r\n\t\tsecond = (System.currentTimeMillis() / 1000) % 60;\r\n\t\tminute = (System.currentTimeMillis() / 1000) / 60 % 60;\r\n\t\thour = ((System.currentTimeMillis() / 1000) / 3600) % 24;\r\n\t}", "long getTimeInMilliSeconds();", "@Override\n public double getMaxTimeBeetween2Measurement() {\n return super.getMaxTimeBeetween2Measurement();\n }", "public long toMillisecond(long value) { return value; }", "Millimeter createMillimeter();", "public long getMillis() {\r\n \treturn millis;\r\n }", "public Long getDispatchtimemax() {\r\n return dispatchtimemax;\r\n }", "public boolean hasValidFromMillis() {\n return fieldSetFlags()[4];\n }", "long getTime() throws Exception;", "public int getMaximumAge() {\n\t\treturn 2 * 60 * 60; \n\t}", "public void setMaxTime(Dt maxTime) {\n\t\tthis.maxTime = maxTime;\n\t}", "public Time( int minutes ) {\n this.minutes = minutes;\n }", "private static int validTimeLength(String timeString) {\n\t\tif (TextUtils.isEmpty(timeString)) { return 0; }\n\t\t\n\t\tint time;\n\t\ttry {\n\t\t\ttime = Integer.parseInt(timeString);\n\t\t\tif (time > MAX_TIME_VALUE) { time = MAX_TIME_VALUE; }\n\t\t} catch (Exception e) { // Don't care which exception it is.\n\t\t\ttime = MAX_TIME_VALUE;\n\t\t}\n\t\treturn time;\n\t}", "int getMaxTicksLimit();", "public void setMiliSeconds(int nt) {\r\n\t\tthis.milis = nt;\r\n\t}", "long toMillisecond(long timelineValue);", "final Long getTimeoutValue()\n/* */ {\n/* 137 */ return this.timeout;\n/* */ }", "public java.lang.Integer getMillis() {\n return millis;\n }", "public long setLimit(final long time) {\n this.limitTime = time;\n return this.limitTime;\n }", "@java.lang.Override\n public long getMinigameEndMs() {\n return minigameEndMs_;\n }", "public void setMaxActiveTime(Period maxActiveTime)\n {\n long period = maxActiveTime.getPeriod();\n \n if (period < 0)\n _maxActiveTime = Long.MAX_VALUE / 2;\n else if (period == 0)\n _maxActiveTime = 1000L;\n else\n _maxActiveTime = period;\n }", "public int getMillisecondLength() {\n\t\treturn meta.length();\n\t}", "long getCurrentTimeMs();", "public FreeTime() {}", "public void setTimeEnd(long te)\n {\n this.timeEnd = (te > 0L)? te : -1L;\n }", "com.google.protobuf.Duration getMaxExperience();", "public TimeValue getMaxTaskWaitTime() {\n final var oldestTaskTimeMillis = allBatchesStream().mapToLong(Batch::getCreationTimeMillis).min().orElse(Long.MAX_VALUE);\n\n if (oldestTaskTimeMillis == Long.MAX_VALUE) {\n return TimeValue.ZERO;\n }\n\n return TimeValue.timeValueMillis(threadPool.relativeTimeInMillis() - oldestTaskTimeMillis);\n }", "public abstract T newEmptyValue(long timeMillis);", "public java.lang.Integer getMillis() {\n return millis;\n }", "public long getRunLastMillis()\n {\n return 0L;\n }", "private void setTime(long value) {\n bitField0_ |= 0x00000002;\n time_ = value;\n }", "public static long randomTime() {\n return (random.nextInt(11) + 25)*1000;\n }", "public TimeoutException(long time) {\n\t\tduration = time;\n\t}", "public long getMinTime()\n {\n return times[0];\n }", "public void setMaxPoolTime(Period maxPoolTime)\n {\n long period = maxPoolTime.getPeriod();\n \n if (period < 0)\n _maxPoolTime = Long.MAX_VALUE / 2;\n else if (period == 0)\n _maxPoolTime = 1000L;\n else\n _maxPoolTime = period;\n }", "public FuzzyTimer(long time, long inaccuracy) {\r\n value = new FuzzyValueHolderImpl();\r\n value.value = FuzzyValueHolder.False;\r\n value.validate();\r\n this.time = time;\r\n this.inaccuracy = inaccuracy;\r\n \r\n }", "com.google.protobuf.DurationOrBuilder getSequenceMaximumDurationOrBuilder();", "public int getTimeLength() {\r\n return timeLength;\r\n }", "protected int minTimeout() { return 500; }", "protected Time(int minutes) throws ArgumentException {\n\t\tthis();\n\t\tif (minutes < 0 || minutes >= 1440) {\n\t\t\tthrow new ArgumentException(String.format(\"%s,%s\",\n\t\t\t\t\tStrings.MinutesMustBeBetween0And1439, \"minutes\"));\n\t\t}\n\n\t\tthis.hours = minutes / 60;\n\t\tthis.minutes = minutes % 60;\n\t\tthis.seconds = 0;\n\t}", "public Timeout(final long milliseconds)\n\t{\n\t\tthis(milliseconds, TimeUnit.MILLISECONDS);\n\t}", "public static DateTime getMax() {\n DateTime maxDateTime = null;\n\n //It is guaranteed that there is no exception thrown\n try {\n maxDateTime = new DateTime(MAX_TIME);\n } catch (IllegalValueException e) {\n }\n return maxDateTime;\n }", "@Override\r\n\tpublic int requiredTime() {\n\t\treturn 0;\r\n\t}", "@java.lang.Override\n public long getMinigameEndMs() {\n return minigameEndMs_;\n }", "public static Time uniqueInstance() {\r\n\t\tif (time == null) {\r\n\t\t\tsynchronized (Time.class) {\r\n\t\t\t\tif (time == null) {\r\n\t\t\t\t\ttime = new Time(600);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn time;\r\n\t}", "public synchronized long getTime() {\n return -1L;\n }", "Integer getStartTimeout();", "long getTimeout();", "@Test(expected = IllegalArgumentException.class)\n public void testConstructorBadSecondsOne() {\n CountDownTimer s = new CountDownTimer(5, 5, 300);\n\n }", "@Override\n\t\tpublic long getEndMillis() {\n\t\t\treturn 0;\n\t\t}", "public long getMaximumLong() {\n/* 233 */ return this.max;\n/* */ }", "private int getMinute() {\n\t\tString time = getPersistedString(this.defaultValue);\n\t\tif (time == null || !time.matches(VALIDATION_EXPRESSION)) {\n\t\t\treturn -1;\n\t\t}\n\n\t\treturn Integer.valueOf(time.split(\":|/\")[1]);\n\t}", "TimeUnit() {\n }", "public void setValidFromMillis(java.lang.Long value) {\n this.validFromMillis = value;\n }", "public Long getMaxAgeTime() {\n return this.MaxAgeTime;\n }" ]
[ "0.7228569", "0.7138707", "0.6726576", "0.66546726", "0.6649586", "0.6581801", "0.65698457", "0.6547331", "0.65303767", "0.64744097", "0.64735776", "0.64300734", "0.62902164", "0.6248714", "0.61918926", "0.6169075", "0.6163241", "0.61105424", "0.6099554", "0.6096397", "0.6087778", "0.60768676", "0.6074384", "0.6003129", "0.5992407", "0.59914213", "0.59773964", "0.5976751", "0.5960413", "0.59522074", "0.59477437", "0.5946454", "0.5913714", "0.58922905", "0.5867478", "0.58524865", "0.58497393", "0.584213", "0.5835055", "0.5832344", "0.5807822", "0.58071506", "0.57956004", "0.5792257", "0.57859707", "0.57768834", "0.577253", "0.5766216", "0.57583505", "0.57456756", "0.57427615", "0.57310647", "0.57291734", "0.57209945", "0.571998", "0.5709651", "0.5705426", "0.5701113", "0.56812835", "0.56679094", "0.56615096", "0.5659247", "0.5657912", "0.56532353", "0.56486756", "0.56484777", "0.5644675", "0.5643001", "0.5639053", "0.563847", "0.5634042", "0.5629637", "0.56274235", "0.5618757", "0.5617858", "0.5615256", "0.55871344", "0.55844927", "0.55824697", "0.5581534", "0.5581284", "0.55677396", "0.55615413", "0.5558187", "0.555685", "0.5554469", "0.55474216", "0.554611", "0.5539034", "0.5538769", "0.55384386", "0.5536456", "0.5535291", "0.55319065", "0.5527815", "0.55250376", "0.55245334", "0.55237037", "0.5523008", "0.55194587", "0.5508353" ]
0.0
-1
create mapping filter config Assumes: store previous path in meta is enabled
@Test public void testMetadataMapping() { PathMappingConfig filterConfig = new PathMappingConfig(); filterConfig.setMapSource(Metadata); filterConfig.setMetadataName(mappingMetadataName); SyncOptions options = new SyncOptions(); TestStorage source = initializeSourceStorage(options, true); // build sync config SyncConfig syncConfig = new SyncConfig(); syncConfig.setOptions(options); syncConfig.setFilters(Collections.singletonList(filterConfig)); syncConfig.setTarget(testConfig); EcsSync sync = new EcsSync(); sync.setSyncConfig(syncConfig); sync.setSource(source); TestUtil.run(sync); validateMappingResults((TestStorage) sync.getTarget()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initMapper() {\n final BeanPropertyFilter filterOutAllExcept =\n SimpleBeanPropertyFilter.filterOutAllExcept(\"fname\", \"executionTimeNano\");\n this.mapper.addMixInAnnotations(\n PortalEvent.class, PortletRenderExecutionEventFilterMixIn.class);\n final SimpleFilterProvider filterProvider = new SimpleFilterProvider();\n filterProvider.addFilter(\n PortletRenderExecutionEventFilterMixIn.FILTER_NAME, filterOutAllExcept);\n this.portletEventWriter = this.mapper.writer(filterProvider);\n }", "@Bean\n\tpublic MetadataGeneratorFilter metadataGeneratorFilter() {\n\t\treturn new MetadataGeneratorFilter(metadataGenerator());\n\t}", "private void initMapNameMapping() {\n mMapNameMapping.clear();\n\n // Load the name mapping from the config\n ConfigurationSection mappingSection = getConfig().getConfigurationSection(MappingSectionName);\n if (mappingSection != null) {\n // Load and check the mapping found in the config\n Map<String, Object> configMap = mappingSection.getValues(false);\n for (Map.Entry<String, Object> entry : configMap.entrySet()) {\n mMapNameMapping.put(entry.getKey(), (String) entry.getValue());\n }\n } else {\n getLogger().warning(String.format(\"[%s] found no configured mapping, creating a default one.\", mPdfFile.getName()));\n }\n\n // If there are new worlds in the server add them to the mapping\n List<World> serverWorlds = getServer().getWorlds();\n for (World w : serverWorlds) {\n if (!mMapNameMapping.containsKey(w.getName())) {\n mMapNameMapping.put(w.getName(), w.getName());\n }\n }\n\n // Set the new mapping in the config\n getConfig().createSection(MappingSectionName, mMapNameMapping);\n }", "public void mapping() {\n\t\t\n\t}", "@Bean\n public MetadataGeneratorFilter metadataGeneratorFilter() {\n return new MetadataGeneratorFilter(metadataGenerator());\n }", "@Override\r\n\t\t public boolean isResourceFiltered(Resource resource) {\n\t\t return \"pathmap\".equals(resource.getURI().scheme());\r\n\t\t }", "@Override\r\n\tpublic Map<String, String> initOtherPermission() {\n\t\tMap<String, String> shrioUrlMap = new HashMap<String, String>();\r\n\t\tList<ShrioUrl> shrioUrlList = shrioUrlDao.selectAllShrioUrl();\r\n\t\tif (shrioUrlList != null && shrioUrlList.size() > 0) {\r\n\t\t\tfor (ShrioUrl shrioUrl : shrioUrlList) {\r\n\t\t\t\tif (shrioUrl.getUrl() == null || shrioUrl.getUrl().isEmpty()) {\r\n\t\t\t\t\tlog.debug(\"sys_shrio_url表中id为\" + shrioUrl.getId() + \"的url字段为空,不进行过滤\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (shrioUrl.getFiltername() == null || shrioUrl.getFiltername().isEmpty()) {\r\n\t\t\t\t\tlog.debug(\"sys_shrio_url表中id为\" + shrioUrl.getId() + \"的filtername字段为空,不进行过滤\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (shrioUrl.getDef() == null || shrioUrl.getDef().isEmpty()) {\r\n\t\t\t\t\tlog.debug(\"sys_shrio_url表中id为\" + shrioUrl.getId() + \"的def字段为空,不进行过滤\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tshrioUrlMap.put(shrioUrl.getUrl(), shrioUrl.getFiltername() + \"[\" + shrioUrl.getDef() + \"]\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn shrioUrlMap;\r\n\t}", "@Override\n\t protected void applyCustomConfiguration(SiteMeshFilterBuilder builder) {\n\t\t builder.addDecoratorPath(\"/*\", \"/WEB-INF/jsp/decorator/decorator.jsp\")\n//\t\t .addDecoratorPaths(\"/articles/*\", \"/decorators/article.html\",\n//\t\t \"/decoratos/two-page-layout.html\",\n//\t\t \"/decorators/common.html\")\n\t\t // Exclude path from decoration.\n\t\t .addExcludedPath(\"/member/list.do\")\n\t\t .addExcludedPath(\"/base/codeWindow.html*\")\n\t\t .addExcludedPath(\"/base/postWindow.html*\");\n\t\t \n\t\t builder.addTagRuleBundles(new DivExtractingTagRuleBundle());\n\n\t }", "BuildFilter defaultFilter();", "private XContentBuilder prepareLoanIndexMapping() throws IOException {\n\t\tXContentBuilder loanMapping = XContentFactory.jsonBuilder()\n\t\t\t\t// entity..\n\t\t\t\t.startObject().startObject(TYPE_ENTITY).startObject(PROPERTIES)\n\t\t\t\t// identification no..\n\t\t\t\t.startObject(Tag.IDENTIFICATION_NO).field(TYPE, KEYWORD).endObject()\n\t\t\t\t// name..\n\t\t\t\t.startObject(Tag.NAME).field(TYPE, TEXT).endObject()\n\t\t\t\t// surname..\n\t\t\t\t.startObject(Tag.SURNAME).field(TYPE, TEXT).endObject()\n\t\t\t\t// monthly income..\n\t\t\t\t.startObject(Tag.MONTHLY_INCOME).field(TYPE, DOUBLE).endObject()\n\t\t\t\t// phone no..\n\t\t\t\t.startObject(Tag.PHONE_NO).field(TYPE, TEXT).endObject()\n\t\t\t\t// credit limit..\n\t\t\t\t.startObject(Tag.CREDIT_RESULT).field(TYPE, BOOLEAN).endObject()\n\t\t\t\t// credit limit..\n\t\t\t\t.startObject(Tag.CREDIT_LIMIT).field(TYPE, DOUBLE).endObject()\n\t\t\t\t// credit score..\n\t\t\t\t.startObject(Tag.CREDIT_SCORE).field(TYPE, DOUBLE).endObject().endObject().endObject().endObject();\n\t\treturn loanMapping;\n\t}", "FilterInfo addFilter(String filtercode, String filter_type, String filter_name, String disableFilterPropertyName, String filter_order);", "public String getMappingFilePath();", "@Override\n public void init(FilterConfig config) {\n }", "@Override\n public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, Filter filter) {\n return null;\n }", "private Document createMapping() {\n return getIndexOperations().createMapping();\n }", "public static void addFilterMapBefore(WFJFilterMap filterMap) {\n validateFilterMap(filterMap);\n // Add this filter mapping to our registered set\n filterMaps.addBefore(filterMap);\n }", "private void ini_CacheDB()\r\n\t{\r\n\t\tLogger.DEBUG(\"ini_CacheDB\");\r\n\t\t// chk if exist filter preset splitter \"#\" and Replace\r\n\r\n\t}", "protected ActionMapping processMapping( HttpServletRequest request,\n HttpServletResponse response,\n String path)\n throws IOException\n { //20030425AH\n ActionMapping mapping = super.processMapping(request, response, path);\n if(mapping instanceof GTActionMapping)\n {\n if( ((GTActionMapping)mapping).isLogParameters() )\n {\n StaticWebUtils.logRequestDetails(request, _log);\n }\n }\n return mapping;\n }", "private void populateFilter() throws TransformerConfigurationException\r\n\t{\r\n\t\tthis.filter = new AddressSet(\"./filtered.xml\");\r\n\t\tthis.filter.addElement(\"postmaster\");\r\n\t\tthis.filter.addElement(\"uucp\");\r\n\t\tthis.filter.addElement(\"mailer-daemon\");\r\n\t\tthis.filter.addElement(\"maildaemon\");\r\n\t\tthis.filter.addElement(\"majordomo\");\r\n\t\tthis.filter.addElement(\"mailerdaemon\");\r\n\t\tthis.filter.addElement(\"abuse@\");\r\n\t\tthis.filter.addElement(\"-relay\");\r\n\t\tthis.filter.addElement(\"-request@\");\r\n\t}", "@Override\n public HashMap<String, List<String>> initializeMapping(HashMap<String, List<String>> mapping) {\n mapping.put(\"xEncoder\", Arrays.asList(\"outtakeMotor1\", \"outtake1\"));\n mapping.put(\"yEncoder\", Arrays.asList(\"wobbleMotor\"));\n\n return mapping;\n }", "private ImageMappings() {}", "@Override\n\tpublic void init(FilterConfig filterConfig) {\n\n\t}", "protected FilterImpl() {\n this(SparkUtils.ALL_PATHS);\n }", "public static void configure(SnapShop theShop)\r\n{\r\n \r\n\r\n theShop.setDefaultFilename(\"C:/Users/An Nguyen/Documents/billg.jpg\");\r\n theShop.addFilter(new FlipHorizontalFilter(), \"Flip Horizontal\");\r\n // add your other filters below\r\n \r\n theShop.addFilter(theShop.new FlipVerticalFilter(), \"Flip Vertical\");\r\n theShop.addFilter(theShop.new Gaussian(), \"Gaussian\");\r\n theShop.addFilter(theShop.new Lapcian(), \"Lapcian\");\r\n theShop.addFilter(theShop.new UnsharpMasking(), \"UnsharpMasking\");\r\n theShop.addFilter(theShop.new Edgy(), \"Edgy\");\r\n \r\n \r\n \r\n \r\n}", "public void init(FilterConfig config) {}", "public void addBusinessFilterToMigRelations(ViewerFilter filter);", "private void ini_MapPaks()\r\n\t{\r\n\r\n\t}", "private void add2Mapping(Permission permission) {\n for (String c : permission.collections) {\n InfraRuleBasedAuthorizationPlugin.WildCardSupportMap m = mapping.get(c);\n if (m == null) mapping.put(c, m = new InfraRuleBasedAuthorizationPlugin.WildCardSupportMap());\n for (String path : permission.path) {\n List<Permission> perms = m.get(path);\n if (perms == null) m.put(path, perms = new ArrayList<>());\n perms.add(permission);\n }\n }\n }", "public void addFilterToMigRelations(ViewerFilter filter);", "@Override\n\tpublic void attachFilter(ConfigContext ctx, Entity entity) {\n\t}", "final void updateMsdtFilterMap() {\r\n\r\n logger.entering(this.getClass().getName(), \"updateMsdtFilterMap\");\r\n\r\n String filterExpression = \"\";\r\n\t\t\r\n\t\tfor (MicroSensorDataType msdt : this.chkMsdtSelection.keySet()) {\r\n JCheckBox chkBox = this.chkMsdtSelection.get(msdt);\r\n\r\n this.msdtFilterMap.remove(msdt);\r\n\r\n if (chkBox.isSelected()) {\r\n\r\n\t\t\t\tthis.msdtFilterMap.put(msdt, Boolean.FALSE);\r\n\t\t\t\t// Compile new filter property string\r\n\t\t\t\tfilterExpression += (filterExpression.length() == 0 ? \"\" : \",\") + msdt.getName();\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tthis.msdtFilterMap.put(msdt, Boolean.TRUE);\r\n\r\n\t\t\t}\r\n }\r\n\t\t\r\n\t\t// set the new value of the filter property\r\n\t\ttry {\r\n\t\t\tthis.getModuleProperty(BLOCKER_PROPERTY).setValue(filterExpression);\r\n\t\t} catch (ModulePropertyException e) {\r\n\t\t\tlogger.log(Level.WARNING, \"The filter module is supposed to support the property \" + BLOCKER_PROPERTY);\r\n\t\t}\r\n\t\t\t\r\n\r\n logger.exiting(this.getClass().getName(), \"updateMsdtFilterMap\");\r\n }", "@MyBatisMapper\npublic interface RouteFilterDao {\n //for api\n public List<RouteFilter> listRouteFilter(int userId);\n\n public List<RouteFilter> listRouteFilterIncludeModelRoute(int userId);\n\n public List<RouteFilter> listFilterRoutes(int userId);\n\n public RouteFilter getFilterRoutesByFilterId(int userId, int filterId);\n\n //首页列表\n public int findTotalCount();\n\n public List<RouteFilter> listFilterByPage(int pageNo, int pageSize);\n\n //编辑\n public RouteFilter findOne(int filterId);\n\n //根据ID查找出分类同时带有模式\n public RouteFilter findOneWithModel(int filterId);\n\n //根据ID查找出分类同时带有控制器\n public RouteFilter findOneWithControl(int filterId);\n\n public List<Control> listControlByFilterId(int filterId);\n\n //保存\n public void addFilter(RouteFilter routeFilter);\n\n //删除\n public void deleteFilter(int filterId);\n\n //更新\n public void updateFilter(RouteFilter routeFilter);\n\n //根据名称查询\n public List<RouteFilter> findByName(String filterName, int pageNo, int pageSize);\n\n //保存分类模式对应关系\n public void saveFilterModel(Map<String, Object> gruMap);\n\n public void deleteModelFromFilterModelMapping(int groupID);\n\n //保存分类模式对应关系\n public void saveFilterControl(Map<String, Object> gruMap);\n\n public void deleteControlFromFilterControlMapping(int groupID);\n\n}", "void reinitFilters() throws IOException;", "private void inicializarFiltros() {\r\n filtros = new HashMap<String, String>();\r\n filtros.put(\"parametroNombre\", null);\r\n filtros.put(\"parametroApellido\", null);\r\n filtros.put(\"parametroDocumento\", null);\r\n filtros.put(\"parametroTipoDocumento\", null);\r\n filtros.put(\"parametroCorreo\", null);\r\n filtros.put(\"parametroUsuario\", null);\r\n filtros.put(\"parametroEstado\", null);\r\n filtros.put(\"parametroGenero\", null);\r\n agregarFiltrosAdicionales();\r\n }", "public SourceMapResourceHandler(ResourceHandler wrapped) {\n\t\tsuper(wrapped);\n\t\tsourceMapPattern = getInitParameterOrDefault(PARAM_NAME_SOURCE_MAP_PATTERN, DEFAULT_SOURCE_MAP_PATTERN);\n\t}", "public ServletInfo addMapping(final String mapping) {\n\t\tif (!mapping.startsWith(\"/\") && !mapping.startsWith(\"*\") && !mapping.isEmpty()) {\n\t\t\t//if the user adds a mapping like 'index.html' we transparently translate it to '/index.html'\n\t\t\tmappings.add(\"/\" + mapping);\n\t\t} else {\n\t\t\tmappings.add(mapping);\n\t\t}\n\t\treturn this;\n\t}", "private void mapContext(ManagedPlugin managedPlugin) {\n RequestMappingHandlerMapping mapper = new RequestMappingHandlerMapping();\n mapper.setApplicationContext(managedPlugin.getPluginContext());\n mapper.afterPropertiesSet();\n this.handlerMappings.add(mapper);\n this.pluginMappings.put(managedPlugin.getPlugin().getDescriptor().getId(), mapper);\n }", "protected MXBeanMappingFactory() {}", "public static XContentBuilder toRiverMapping(String type, String analyzer) {\r\n\t\tXContentBuilder xbMapping = null;\r\n\t\ttry {\r\n xbMapping = jsonBuilder().prettyPrint().startObject();\r\n\r\n // Type\r\n xbMapping.startObject(type);\r\n\r\n // Manage _source\r\n // We store binary source as a stored field so we don't need it in _source\r\n xbMapping.startObject(\"_source\").array(\"excludes\", FsRiverUtil.Doc.ATTACHMENT).endObject();\r\n\r\n xbMapping.startObject(\"properties\");\r\n\r\n // Doc content\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.CONTENT, analyzer);\r\n\r\n // Doc source\r\n addBinary(xbMapping, FsRiverUtil.Doc.ATTACHMENT);\r\n\r\n // Meta\r\n xbMapping.startObject(FsRiverUtil.Doc.META).startObject(\"properties\");\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.Meta.AUTHOR);\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.Meta.TITLE);\r\n addDate(xbMapping, FsRiverUtil.Doc.Meta.DATE);\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.Meta.KEYWORDS);\r\n xbMapping.endObject().endObject(); // End Meta\r\n\r\n // File\r\n xbMapping.startObject(FsRiverUtil.Doc.FILE).startObject(\"properties\");\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.File.CONTENT_TYPE);\r\n addDate(xbMapping, FsRiverUtil.Doc.File.LAST_MODIFIED);\r\n addDate(xbMapping, FsRiverUtil.Doc.File.INDEXING_DATE);\r\n addLong(xbMapping, FsRiverUtil.Doc.File.FILESIZE);\r\n addLong(xbMapping, FsRiverUtil.Doc.File.INDEXED_CHARS);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.File.FILENAME);\r\n addNotIndexedString(xbMapping, FsRiverUtil.Doc.File.URL);\r\n xbMapping.endObject().endObject(); // End File\r\n\r\n // Path\r\n xbMapping.startObject(FsRiverUtil.Doc.PATH).startObject(\"properties\");\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.ENCODED);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.VIRTUAL);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.ROOT);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.REAL);\r\n xbMapping.endObject().endObject(); // End Path\r\n\r\n xbMapping.endObject().endObject().endObject(); // End Type\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Log when error\r\n\t\t}\r\n\t\treturn xbMapping;\r\n\t}", "@Override\r\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\t\r\n\t}", "private XContentBuilder createMappingObject() throws IOException {\n return XContentFactory.jsonBuilder()\n .startObject()\n .startObject(type)\n .startObject(ES_PROPERTIES)\n .startObject(\"externalId\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"sourceUri\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"kind\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"name\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"fields\")\n .field(ES_TYPE, ES_TYPE_NESTED)\n .startObject(ES_PROPERTIES)\n .startObject(\"name\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"value\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .endObject()\n .endObject()\n .endObject()\n .endObject()\n .endObject();\n }", "@Override\n public void init(FilterConfig filterConfig) throws ServletException {\n\n }", "public PreOauth2SSOGatewayFilter() {\n super(Config.class);\n }", "@Override\n public void init(FilterConfig filterConfig) throws ServletException {\n }", "protected Map<String, DataFilter> getFilterMap()\r\n {\r\n return getFilterMap(getQueryableDataTypeKeys());\r\n }", "public void testMapping(PluginContainer cont){\n \t ApacheAugeasUtil apacheUtil = new ApacheAugeasUtil();\n \t try{\n \t //copy all configuration files to temporary folder\n \t String path = apacheUtil.prepareConfigFiles();\n \t //loading of augeas from temporary folder\n \t AugeasProxy proxy = apacheUtil.initAugeas(path+File.separator+ApacheTestConstants.ROOT_CONFIG_FILE_NAME, path, path);\t\n \t AugeasTree tree = proxy.getAugeasTree(ApacheTestConstants.MODULE_NAME, true);\n \t \n \t testLoadConfig(tree, cont);\n \t testSaveConfig(cont);\n \t apacheUtil.cleanConfigFiles();\n \t }catch(Exception e){\n \t e.printStackTrace();\n \t apacheUtil.cleanConfigFiles();\n \t }\n \t }", "private BeanMapping createMapping(Object bean, String name) {\n // first\n BeanMapping mapping = new BeanMapping(name);\n return mapping;\n }", "public abstract String getDefaultFilter ();", "Map<String, Object> getFilterScratchpad();", "@Test\n public void testRegExMapping() {\n PathMappingConfig filterConfig = new PathMappingConfig();\n filterConfig.setMapSource(RegEx);\n filterConfig.setRegExPattern(regexPattern);\n filterConfig.setRegExReplacementString(regexReplacement);\n\n SyncOptions options = new SyncOptions();\n\n TestStorage source = initializeSourceStorage(options, false);\n\n // build sync config\n SyncConfig syncConfig = new SyncConfig();\n syncConfig.setOptions(options);\n syncConfig.setFilters(Collections.singletonList(filterConfig));\n syncConfig.setTarget(testConfig);\n EcsSync sync = new EcsSync();\n sync.setSyncConfig(syncConfig);\n sync.setSource(source);\n TestUtil.run(sync);\n\n validateMappingResults((TestStorage) sync.getTarget());\n }", "public abstract RequestMappingInfo build();", "@Override\n public void init(FilterConfig filterConfig) throws ServletException {\n }", "@Override\n public void init(FilterConfig filterConfig) throws ServletException {\n }", "protected Mapping(String name) {\n this.name = name;\n }", "@Override\n public void reloadCachedMappings() {\n }", "@Override\n public void reloadCachedMappings() {\n }", "@Override\r\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\t\r\n\t}", "static ObjectInputFilter createFilter(String param2String, boolean param2Boolean) {\n/* 446 */ Global global = new Global(param2String, param2Boolean);\n/* 447 */ return global.isEmpty() ? null : global;\n/* */ }", "@Override\n public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, Class<? extends Filter> filterClass) {\n return null;\n }", "public static void addFilterMap(WFJFilterMap filterMap) {\n validateFilterMap(filterMap);\n // Add this filter mapping to our registered set\n filterMaps.add(filterMap);\n }", "@Override\r\n public void init(FilterConfig filterConfig) throws ServletException {\n }", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\tSystem.out.print(\"过滤初始\");\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\t\n\t}", "@Override\r\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\r\n\t}", "static ObjectInputFilter createFilter(String param2String, boolean param2Boolean) {\n/* 448 */ Global global = new Global(param2String, param2Boolean);\n/* 449 */ return global.isEmpty() ? null : global;\n/* */ }", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\n\t}", "public abstract Builder mappingName(String paramString);", "@Override\r\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\r\n\t}", "@Override\r\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\r\n\t}", "private void initFilter() {\r\n if (filter == null) {\r\n filter = new VocabularyConceptFilter();\r\n }\r\n filter.setVocabularyFolderId(vocabularyFolder.getId());\r\n filter.setPageNumber(page);\r\n filter.setNumericIdentifierSorting(vocabularyFolder.isNumericConceptIdentifiers());\r\n }", "public void onStartup(ServletContext arg0) throws ServletException {\n\n Dynamic cros = arg0.addFilter(\"WebContextFilter\",com.example.arcface.config.WebContextFilter.class );\n cros.addMappingForUrlPatterns(null, false, \"/*\");\n\n }", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t}", "private void addFilterSortConfigToUrl( UrlItem urlRedirectionDetails )\n {\n if ( _formItemSortConfig != null )\n {\n String strSortPosition = Integer.toString( _formItemSortConfig.getColumnToSortPosition( ) );\n String strAttributeName = _formItemSortConfig.getSortAttributeName( );\n String strAscSort = String.valueOf( _formItemSortConfig.isAscSort( ) );\n\n urlRedirectionDetails.addParameter( FormsConstants.PARAMETER_SORT_COLUMN_POSITION, strSortPosition );\n urlRedirectionDetails.addParameter( FormsConstants.PARAMETER_SORT_ATTRIBUTE_NAME, strAttributeName );\n urlRedirectionDetails.addParameter( FormsConstants.PARAMETER_SORT_ASC_VALUE, strAscSort );\n }\n }", "@Override\n public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, String className) {\n return null;\n }", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}" ]
[ "0.5657493", "0.52672", "0.5267141", "0.5249511", "0.5205401", "0.51956075", "0.5028447", "0.49890098", "0.49626648", "0.49626014", "0.49334985", "0.49295503", "0.48950824", "0.48816904", "0.4867897", "0.48458523", "0.4827878", "0.48250622", "0.48011705", "0.47612926", "0.4760564", "0.4758139", "0.47536284", "0.47292504", "0.47183916", "0.47120917", "0.46845087", "0.46809736", "0.46784568", "0.46656707", "0.46655163", "0.4647793", "0.46464658", "0.46391478", "0.46317315", "0.4620188", "0.46117815", "0.461144", "0.46050233", "0.4580232", "0.45792922", "0.4575834", "0.457149", "0.4566534", "0.45575836", "0.4556013", "0.4553439", "0.45446423", "0.45433146", "0.45375547", "0.45357025", "0.4533588", "0.4533588", "0.4532897", "0.45295805", "0.45295805", "0.45283917", "0.45283917", "0.45283917", "0.45283917", "0.45274544", "0.45269942", "0.45245963", "0.4517536", "0.45164287", "0.45164287", "0.45164287", "0.45164287", "0.45164287", "0.45164287", "0.45164287", "0.45164287", "0.45164287", "0.45128104", "0.4512544", "0.4512544", "0.45120928", "0.45087853", "0.4507152", "0.4507152", "0.4507152", "0.4507152", "0.4507152", "0.4507152", "0.4507152", "0.4507152", "0.4507152", "0.45035645", "0.4500124", "0.4500124", "0.4495073", "0.44882888", "0.44875827", "0.44865254", "0.44858173", "0.448559", "0.448559", "0.448559", "0.448559", "0.448559" ]
0.50837255
6
create mapping filter config Assumes: store previous path in meta is enabled
@Test public void testRegExMapping() { PathMappingConfig filterConfig = new PathMappingConfig(); filterConfig.setMapSource(RegEx); filterConfig.setRegExPattern(regexPattern); filterConfig.setRegExReplacementString(regexReplacement); SyncOptions options = new SyncOptions(); TestStorage source = initializeSourceStorage(options, false); // build sync config SyncConfig syncConfig = new SyncConfig(); syncConfig.setOptions(options); syncConfig.setFilters(Collections.singletonList(filterConfig)); syncConfig.setTarget(testConfig); EcsSync sync = new EcsSync(); sync.setSyncConfig(syncConfig); sync.setSource(source); TestUtil.run(sync); validateMappingResults((TestStorage) sync.getTarget()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initMapper() {\n final BeanPropertyFilter filterOutAllExcept =\n SimpleBeanPropertyFilter.filterOutAllExcept(\"fname\", \"executionTimeNano\");\n this.mapper.addMixInAnnotations(\n PortalEvent.class, PortletRenderExecutionEventFilterMixIn.class);\n final SimpleFilterProvider filterProvider = new SimpleFilterProvider();\n filterProvider.addFilter(\n PortletRenderExecutionEventFilterMixIn.FILTER_NAME, filterOutAllExcept);\n this.portletEventWriter = this.mapper.writer(filterProvider);\n }", "private void initMapNameMapping() {\n mMapNameMapping.clear();\n\n // Load the name mapping from the config\n ConfigurationSection mappingSection = getConfig().getConfigurationSection(MappingSectionName);\n if (mappingSection != null) {\n // Load and check the mapping found in the config\n Map<String, Object> configMap = mappingSection.getValues(false);\n for (Map.Entry<String, Object> entry : configMap.entrySet()) {\n mMapNameMapping.put(entry.getKey(), (String) entry.getValue());\n }\n } else {\n getLogger().warning(String.format(\"[%s] found no configured mapping, creating a default one.\", mPdfFile.getName()));\n }\n\n // If there are new worlds in the server add them to the mapping\n List<World> serverWorlds = getServer().getWorlds();\n for (World w : serverWorlds) {\n if (!mMapNameMapping.containsKey(w.getName())) {\n mMapNameMapping.put(w.getName(), w.getName());\n }\n }\n\n // Set the new mapping in the config\n getConfig().createSection(MappingSectionName, mMapNameMapping);\n }", "@Bean\n\tpublic MetadataGeneratorFilter metadataGeneratorFilter() {\n\t\treturn new MetadataGeneratorFilter(metadataGenerator());\n\t}", "public void mapping() {\n\t\t\n\t}", "@Bean\n public MetadataGeneratorFilter metadataGeneratorFilter() {\n return new MetadataGeneratorFilter(metadataGenerator());\n }", "@Override\r\n\t\t public boolean isResourceFiltered(Resource resource) {\n\t\t return \"pathmap\".equals(resource.getURI().scheme());\r\n\t\t }", "@Test\n public void testMetadataMapping() {\n PathMappingConfig filterConfig = new PathMappingConfig();\n filterConfig.setMapSource(Metadata);\n filterConfig.setMetadataName(mappingMetadataName);\n\n SyncOptions options = new SyncOptions();\n\n TestStorage source = initializeSourceStorage(options, true);\n\n // build sync config\n SyncConfig syncConfig = new SyncConfig();\n syncConfig.setOptions(options);\n syncConfig.setFilters(Collections.singletonList(filterConfig));\n syncConfig.setTarget(testConfig);\n EcsSync sync = new EcsSync();\n sync.setSyncConfig(syncConfig);\n sync.setSource(source);\n TestUtil.run(sync);\n\n validateMappingResults((TestStorage) sync.getTarget());\n }", "@Override\r\n\tpublic Map<String, String> initOtherPermission() {\n\t\tMap<String, String> shrioUrlMap = new HashMap<String, String>();\r\n\t\tList<ShrioUrl> shrioUrlList = shrioUrlDao.selectAllShrioUrl();\r\n\t\tif (shrioUrlList != null && shrioUrlList.size() > 0) {\r\n\t\t\tfor (ShrioUrl shrioUrl : shrioUrlList) {\r\n\t\t\t\tif (shrioUrl.getUrl() == null || shrioUrl.getUrl().isEmpty()) {\r\n\t\t\t\t\tlog.debug(\"sys_shrio_url表中id为\" + shrioUrl.getId() + \"的url字段为空,不进行过滤\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (shrioUrl.getFiltername() == null || shrioUrl.getFiltername().isEmpty()) {\r\n\t\t\t\t\tlog.debug(\"sys_shrio_url表中id为\" + shrioUrl.getId() + \"的filtername字段为空,不进行过滤\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (shrioUrl.getDef() == null || shrioUrl.getDef().isEmpty()) {\r\n\t\t\t\t\tlog.debug(\"sys_shrio_url表中id为\" + shrioUrl.getId() + \"的def字段为空,不进行过滤\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tshrioUrlMap.put(shrioUrl.getUrl(), shrioUrl.getFiltername() + \"[\" + shrioUrl.getDef() + \"]\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn shrioUrlMap;\r\n\t}", "@Override\n\t protected void applyCustomConfiguration(SiteMeshFilterBuilder builder) {\n\t\t builder.addDecoratorPath(\"/*\", \"/WEB-INF/jsp/decorator/decorator.jsp\")\n//\t\t .addDecoratorPaths(\"/articles/*\", \"/decorators/article.html\",\n//\t\t \"/decoratos/two-page-layout.html\",\n//\t\t \"/decorators/common.html\")\n\t\t // Exclude path from decoration.\n\t\t .addExcludedPath(\"/member/list.do\")\n\t\t .addExcludedPath(\"/base/codeWindow.html*\")\n\t\t .addExcludedPath(\"/base/postWindow.html*\");\n\t\t \n\t\t builder.addTagRuleBundles(new DivExtractingTagRuleBundle());\n\n\t }", "BuildFilter defaultFilter();", "private XContentBuilder prepareLoanIndexMapping() throws IOException {\n\t\tXContentBuilder loanMapping = XContentFactory.jsonBuilder()\n\t\t\t\t// entity..\n\t\t\t\t.startObject().startObject(TYPE_ENTITY).startObject(PROPERTIES)\n\t\t\t\t// identification no..\n\t\t\t\t.startObject(Tag.IDENTIFICATION_NO).field(TYPE, KEYWORD).endObject()\n\t\t\t\t// name..\n\t\t\t\t.startObject(Tag.NAME).field(TYPE, TEXT).endObject()\n\t\t\t\t// surname..\n\t\t\t\t.startObject(Tag.SURNAME).field(TYPE, TEXT).endObject()\n\t\t\t\t// monthly income..\n\t\t\t\t.startObject(Tag.MONTHLY_INCOME).field(TYPE, DOUBLE).endObject()\n\t\t\t\t// phone no..\n\t\t\t\t.startObject(Tag.PHONE_NO).field(TYPE, TEXT).endObject()\n\t\t\t\t// credit limit..\n\t\t\t\t.startObject(Tag.CREDIT_RESULT).field(TYPE, BOOLEAN).endObject()\n\t\t\t\t// credit limit..\n\t\t\t\t.startObject(Tag.CREDIT_LIMIT).field(TYPE, DOUBLE).endObject()\n\t\t\t\t// credit score..\n\t\t\t\t.startObject(Tag.CREDIT_SCORE).field(TYPE, DOUBLE).endObject().endObject().endObject().endObject();\n\t\treturn loanMapping;\n\t}", "FilterInfo addFilter(String filtercode, String filter_type, String filter_name, String disableFilterPropertyName, String filter_order);", "public String getMappingFilePath();", "@Override\n public void init(FilterConfig config) {\n }", "@Override\n public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, Filter filter) {\n return null;\n }", "private Document createMapping() {\n return getIndexOperations().createMapping();\n }", "public static void addFilterMapBefore(WFJFilterMap filterMap) {\n validateFilterMap(filterMap);\n // Add this filter mapping to our registered set\n filterMaps.addBefore(filterMap);\n }", "private void ini_CacheDB()\r\n\t{\r\n\t\tLogger.DEBUG(\"ini_CacheDB\");\r\n\t\t// chk if exist filter preset splitter \"#\" and Replace\r\n\r\n\t}", "protected ActionMapping processMapping( HttpServletRequest request,\n HttpServletResponse response,\n String path)\n throws IOException\n { //20030425AH\n ActionMapping mapping = super.processMapping(request, response, path);\n if(mapping instanceof GTActionMapping)\n {\n if( ((GTActionMapping)mapping).isLogParameters() )\n {\n StaticWebUtils.logRequestDetails(request, _log);\n }\n }\n return mapping;\n }", "private void populateFilter() throws TransformerConfigurationException\r\n\t{\r\n\t\tthis.filter = new AddressSet(\"./filtered.xml\");\r\n\t\tthis.filter.addElement(\"postmaster\");\r\n\t\tthis.filter.addElement(\"uucp\");\r\n\t\tthis.filter.addElement(\"mailer-daemon\");\r\n\t\tthis.filter.addElement(\"maildaemon\");\r\n\t\tthis.filter.addElement(\"majordomo\");\r\n\t\tthis.filter.addElement(\"mailerdaemon\");\r\n\t\tthis.filter.addElement(\"abuse@\");\r\n\t\tthis.filter.addElement(\"-relay\");\r\n\t\tthis.filter.addElement(\"-request@\");\r\n\t}", "@Override\n public HashMap<String, List<String>> initializeMapping(HashMap<String, List<String>> mapping) {\n mapping.put(\"xEncoder\", Arrays.asList(\"outtakeMotor1\", \"outtake1\"));\n mapping.put(\"yEncoder\", Arrays.asList(\"wobbleMotor\"));\n\n return mapping;\n }", "@Override\n\tpublic void init(FilterConfig filterConfig) {\n\n\t}", "private ImageMappings() {}", "protected FilterImpl() {\n this(SparkUtils.ALL_PATHS);\n }", "public static void configure(SnapShop theShop)\r\n{\r\n \r\n\r\n theShop.setDefaultFilename(\"C:/Users/An Nguyen/Documents/billg.jpg\");\r\n theShop.addFilter(new FlipHorizontalFilter(), \"Flip Horizontal\");\r\n // add your other filters below\r\n \r\n theShop.addFilter(theShop.new FlipVerticalFilter(), \"Flip Vertical\");\r\n theShop.addFilter(theShop.new Gaussian(), \"Gaussian\");\r\n theShop.addFilter(theShop.new Lapcian(), \"Lapcian\");\r\n theShop.addFilter(theShop.new UnsharpMasking(), \"UnsharpMasking\");\r\n theShop.addFilter(theShop.new Edgy(), \"Edgy\");\r\n \r\n \r\n \r\n \r\n}", "public void init(FilterConfig config) {}", "public void addBusinessFilterToMigRelations(ViewerFilter filter);", "private void ini_MapPaks()\r\n\t{\r\n\r\n\t}", "private void add2Mapping(Permission permission) {\n for (String c : permission.collections) {\n InfraRuleBasedAuthorizationPlugin.WildCardSupportMap m = mapping.get(c);\n if (m == null) mapping.put(c, m = new InfraRuleBasedAuthorizationPlugin.WildCardSupportMap());\n for (String path : permission.path) {\n List<Permission> perms = m.get(path);\n if (perms == null) m.put(path, perms = new ArrayList<>());\n perms.add(permission);\n }\n }\n }", "public void addFilterToMigRelations(ViewerFilter filter);", "@Override\n\tpublic void attachFilter(ConfigContext ctx, Entity entity) {\n\t}", "final void updateMsdtFilterMap() {\r\n\r\n logger.entering(this.getClass().getName(), \"updateMsdtFilterMap\");\r\n\r\n String filterExpression = \"\";\r\n\t\t\r\n\t\tfor (MicroSensorDataType msdt : this.chkMsdtSelection.keySet()) {\r\n JCheckBox chkBox = this.chkMsdtSelection.get(msdt);\r\n\r\n this.msdtFilterMap.remove(msdt);\r\n\r\n if (chkBox.isSelected()) {\r\n\r\n\t\t\t\tthis.msdtFilterMap.put(msdt, Boolean.FALSE);\r\n\t\t\t\t// Compile new filter property string\r\n\t\t\t\tfilterExpression += (filterExpression.length() == 0 ? \"\" : \",\") + msdt.getName();\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tthis.msdtFilterMap.put(msdt, Boolean.TRUE);\r\n\r\n\t\t\t}\r\n }\r\n\t\t\r\n\t\t// set the new value of the filter property\r\n\t\ttry {\r\n\t\t\tthis.getModuleProperty(BLOCKER_PROPERTY).setValue(filterExpression);\r\n\t\t} catch (ModulePropertyException e) {\r\n\t\t\tlogger.log(Level.WARNING, \"The filter module is supposed to support the property \" + BLOCKER_PROPERTY);\r\n\t\t}\r\n\t\t\t\r\n\r\n logger.exiting(this.getClass().getName(), \"updateMsdtFilterMap\");\r\n }", "@MyBatisMapper\npublic interface RouteFilterDao {\n //for api\n public List<RouteFilter> listRouteFilter(int userId);\n\n public List<RouteFilter> listRouteFilterIncludeModelRoute(int userId);\n\n public List<RouteFilter> listFilterRoutes(int userId);\n\n public RouteFilter getFilterRoutesByFilterId(int userId, int filterId);\n\n //首页列表\n public int findTotalCount();\n\n public List<RouteFilter> listFilterByPage(int pageNo, int pageSize);\n\n //编辑\n public RouteFilter findOne(int filterId);\n\n //根据ID查找出分类同时带有模式\n public RouteFilter findOneWithModel(int filterId);\n\n //根据ID查找出分类同时带有控制器\n public RouteFilter findOneWithControl(int filterId);\n\n public List<Control> listControlByFilterId(int filterId);\n\n //保存\n public void addFilter(RouteFilter routeFilter);\n\n //删除\n public void deleteFilter(int filterId);\n\n //更新\n public void updateFilter(RouteFilter routeFilter);\n\n //根据名称查询\n public List<RouteFilter> findByName(String filterName, int pageNo, int pageSize);\n\n //保存分类模式对应关系\n public void saveFilterModel(Map<String, Object> gruMap);\n\n public void deleteModelFromFilterModelMapping(int groupID);\n\n //保存分类模式对应关系\n public void saveFilterControl(Map<String, Object> gruMap);\n\n public void deleteControlFromFilterControlMapping(int groupID);\n\n}", "void reinitFilters() throws IOException;", "private void inicializarFiltros() {\r\n filtros = new HashMap<String, String>();\r\n filtros.put(\"parametroNombre\", null);\r\n filtros.put(\"parametroApellido\", null);\r\n filtros.put(\"parametroDocumento\", null);\r\n filtros.put(\"parametroTipoDocumento\", null);\r\n filtros.put(\"parametroCorreo\", null);\r\n filtros.put(\"parametroUsuario\", null);\r\n filtros.put(\"parametroEstado\", null);\r\n filtros.put(\"parametroGenero\", null);\r\n agregarFiltrosAdicionales();\r\n }", "public SourceMapResourceHandler(ResourceHandler wrapped) {\n\t\tsuper(wrapped);\n\t\tsourceMapPattern = getInitParameterOrDefault(PARAM_NAME_SOURCE_MAP_PATTERN, DEFAULT_SOURCE_MAP_PATTERN);\n\t}", "public ServletInfo addMapping(final String mapping) {\n\t\tif (!mapping.startsWith(\"/\") && !mapping.startsWith(\"*\") && !mapping.isEmpty()) {\n\t\t\t//if the user adds a mapping like 'index.html' we transparently translate it to '/index.html'\n\t\t\tmappings.add(\"/\" + mapping);\n\t\t} else {\n\t\t\tmappings.add(mapping);\n\t\t}\n\t\treturn this;\n\t}", "private void mapContext(ManagedPlugin managedPlugin) {\n RequestMappingHandlerMapping mapper = new RequestMappingHandlerMapping();\n mapper.setApplicationContext(managedPlugin.getPluginContext());\n mapper.afterPropertiesSet();\n this.handlerMappings.add(mapper);\n this.pluginMappings.put(managedPlugin.getPlugin().getDescriptor().getId(), mapper);\n }", "protected MXBeanMappingFactory() {}", "public static XContentBuilder toRiverMapping(String type, String analyzer) {\r\n\t\tXContentBuilder xbMapping = null;\r\n\t\ttry {\r\n xbMapping = jsonBuilder().prettyPrint().startObject();\r\n\r\n // Type\r\n xbMapping.startObject(type);\r\n\r\n // Manage _source\r\n // We store binary source as a stored field so we don't need it in _source\r\n xbMapping.startObject(\"_source\").array(\"excludes\", FsRiverUtil.Doc.ATTACHMENT).endObject();\r\n\r\n xbMapping.startObject(\"properties\");\r\n\r\n // Doc content\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.CONTENT, analyzer);\r\n\r\n // Doc source\r\n addBinary(xbMapping, FsRiverUtil.Doc.ATTACHMENT);\r\n\r\n // Meta\r\n xbMapping.startObject(FsRiverUtil.Doc.META).startObject(\"properties\");\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.Meta.AUTHOR);\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.Meta.TITLE);\r\n addDate(xbMapping, FsRiverUtil.Doc.Meta.DATE);\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.Meta.KEYWORDS);\r\n xbMapping.endObject().endObject(); // End Meta\r\n\r\n // File\r\n xbMapping.startObject(FsRiverUtil.Doc.FILE).startObject(\"properties\");\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.File.CONTENT_TYPE);\r\n addDate(xbMapping, FsRiverUtil.Doc.File.LAST_MODIFIED);\r\n addDate(xbMapping, FsRiverUtil.Doc.File.INDEXING_DATE);\r\n addLong(xbMapping, FsRiverUtil.Doc.File.FILESIZE);\r\n addLong(xbMapping, FsRiverUtil.Doc.File.INDEXED_CHARS);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.File.FILENAME);\r\n addNotIndexedString(xbMapping, FsRiverUtil.Doc.File.URL);\r\n xbMapping.endObject().endObject(); // End File\r\n\r\n // Path\r\n xbMapping.startObject(FsRiverUtil.Doc.PATH).startObject(\"properties\");\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.ENCODED);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.VIRTUAL);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.ROOT);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.REAL);\r\n xbMapping.endObject().endObject(); // End Path\r\n\r\n xbMapping.endObject().endObject().endObject(); // End Type\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Log when error\r\n\t\t}\r\n\t\treturn xbMapping;\r\n\t}", "@Override\r\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\t\r\n\t}", "private XContentBuilder createMappingObject() throws IOException {\n return XContentFactory.jsonBuilder()\n .startObject()\n .startObject(type)\n .startObject(ES_PROPERTIES)\n .startObject(\"externalId\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"sourceUri\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"kind\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"name\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"fields\")\n .field(ES_TYPE, ES_TYPE_NESTED)\n .startObject(ES_PROPERTIES)\n .startObject(\"name\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"value\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .endObject()\n .endObject()\n .endObject()\n .endObject()\n .endObject();\n }", "@Override\n public void init(FilterConfig filterConfig) throws ServletException {\n\n }", "public PreOauth2SSOGatewayFilter() {\n super(Config.class);\n }", "@Override\n public void init(FilterConfig filterConfig) throws ServletException {\n }", "protected Map<String, DataFilter> getFilterMap()\r\n {\r\n return getFilterMap(getQueryableDataTypeKeys());\r\n }", "public void testMapping(PluginContainer cont){\n \t ApacheAugeasUtil apacheUtil = new ApacheAugeasUtil();\n \t try{\n \t //copy all configuration files to temporary folder\n \t String path = apacheUtil.prepareConfigFiles();\n \t //loading of augeas from temporary folder\n \t AugeasProxy proxy = apacheUtil.initAugeas(path+File.separator+ApacheTestConstants.ROOT_CONFIG_FILE_NAME, path, path);\t\n \t AugeasTree tree = proxy.getAugeasTree(ApacheTestConstants.MODULE_NAME, true);\n \t \n \t testLoadConfig(tree, cont);\n \t testSaveConfig(cont);\n \t apacheUtil.cleanConfigFiles();\n \t }catch(Exception e){\n \t e.printStackTrace();\n \t apacheUtil.cleanConfigFiles();\n \t }\n \t }", "private BeanMapping createMapping(Object bean, String name) {\n // first\n BeanMapping mapping = new BeanMapping(name);\n return mapping;\n }", "public abstract String getDefaultFilter ();", "Map<String, Object> getFilterScratchpad();", "@Override\n public void init(FilterConfig filterConfig) throws ServletException {\n }", "@Override\n public void init(FilterConfig filterConfig) throws ServletException {\n }", "public abstract RequestMappingInfo build();", "protected Mapping(String name) {\n this.name = name;\n }", "@Override\r\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\t\r\n\t}", "@Override\n public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, Class<? extends Filter> filterClass) {\n return null;\n }", "static ObjectInputFilter createFilter(String param2String, boolean param2Boolean) {\n/* 446 */ Global global = new Global(param2String, param2Boolean);\n/* 447 */ return global.isEmpty() ? null : global;\n/* */ }", "@Override\n public void reloadCachedMappings() {\n }", "@Override\n public void reloadCachedMappings() {\n }", "public static void addFilterMap(WFJFilterMap filterMap) {\n validateFilterMap(filterMap);\n // Add this filter mapping to our registered set\n filterMaps.add(filterMap);\n }", "@Override\r\n public void init(FilterConfig filterConfig) throws ServletException {\n }", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\tSystem.out.print(\"过滤初始\");\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\t\n\t}", "@Override\r\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\r\n\t}", "static ObjectInputFilter createFilter(String param2String, boolean param2Boolean) {\n/* 448 */ Global global = new Global(param2String, param2Boolean);\n/* 449 */ return global.isEmpty() ? null : global;\n/* */ }", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\n\t}", "@Override\r\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\r\n\t}", "@Override\r\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\r\n\t}", "public abstract Builder mappingName(String paramString);", "private void initFilter() {\r\n if (filter == null) {\r\n filter = new VocabularyConceptFilter();\r\n }\r\n filter.setVocabularyFolderId(vocabularyFolder.getId());\r\n filter.setPageNumber(page);\r\n filter.setNumericIdentifierSorting(vocabularyFolder.isNumericConceptIdentifiers());\r\n }", "private void addFilterSortConfigToUrl( UrlItem urlRedirectionDetails )\n {\n if ( _formItemSortConfig != null )\n {\n String strSortPosition = Integer.toString( _formItemSortConfig.getColumnToSortPosition( ) );\n String strAttributeName = _formItemSortConfig.getSortAttributeName( );\n String strAscSort = String.valueOf( _formItemSortConfig.isAscSort( ) );\n\n urlRedirectionDetails.addParameter( FormsConstants.PARAMETER_SORT_COLUMN_POSITION, strSortPosition );\n urlRedirectionDetails.addParameter( FormsConstants.PARAMETER_SORT_ATTRIBUTE_NAME, strAttributeName );\n urlRedirectionDetails.addParameter( FormsConstants.PARAMETER_SORT_ASC_VALUE, strAscSort );\n }\n }", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t}", "public void onStartup(ServletContext arg0) throws ServletException {\n\n Dynamic cros = arg0.addFilter(\"WebContextFilter\",com.example.arcface.config.WebContextFilter.class );\n cros.addMappingForUrlPatterns(null, false, \"/*\");\n\n }", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}" ]
[ "0.5654965", "0.52656025", "0.5265483", "0.5245519", "0.5203483", "0.519431", "0.5081159", "0.50282604", "0.4988424", "0.49637684", "0.4961013", "0.49351078", "0.49270487", "0.48963302", "0.48819774", "0.48644578", "0.4846386", "0.48266596", "0.4824294", "0.48002428", "0.475887", "0.47588453", "0.4756949", "0.4752315", "0.4728554", "0.4719901", "0.47124106", "0.46826568", "0.46802297", "0.4678875", "0.4666194", "0.46656", "0.46465898", "0.46455196", "0.46372554", "0.4627932", "0.462001", "0.46093616", "0.4608051", "0.4604404", "0.45807844", "0.45761836", "0.45760942", "0.4572561", "0.45667595", "0.45577008", "0.4554641", "0.4551244", "0.45453668", "0.45435354", "0.4534094", "0.4534094", "0.45332724", "0.45296398", "0.4528917", "0.4528917", "0.4528917", "0.4528917", "0.452702", "0.45263523", "0.45262456", "0.45262456", "0.45254037", "0.45180526", "0.45166847", "0.45166847", "0.45166847", "0.45166847", "0.45166847", "0.45166847", "0.45166847", "0.45166847", "0.45166847", "0.45137006", "0.45128995", "0.45128995", "0.45124525", "0.45077476", "0.45076698", "0.45076698", "0.45076698", "0.45076698", "0.45076698", "0.45076698", "0.45076698", "0.45076698", "0.45076698", "0.45005673", "0.45005673", "0.45004547", "0.44949442", "0.4488515", "0.44880947", "0.4487531", "0.4485931", "0.4485931", "0.4485931", "0.4485931", "0.4485931", "0.4485931" ]
0.45363918
50
"ingest" source keys in dummy storage
TestStorage initializeSourceStorage(SyncOptions options, boolean addMappingMetadata) { TestStorage storage = new TestStorage(); storage.withConfig(testConfig).withOptions(options); for (String key : pathMap.keySet()) { boolean directory = directories.contains(key); ObjectMetadata meta = new ObjectMetadata().withContentLength(0).withDirectory(directory); // add mapping metadata if necessary if (addMappingMetadata) meta.setUserMetadataValue(mappingMetadataName, pathMap.get(key)); SyncObject syncObject = new SyncObject(this.storage, key, meta, new ByteArrayInputStream(new byte[0]), new ObjectAcl()); // updateObject expects a storage identifier (absolute path), so here we have to add the // internal path prefix that it uses storage.updateObject(testStoragePrefix + key, syncObject); } return storage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void reDistributeMyKeys() {\n toDistribute = readNodeEntries();\n }", "private <K, V> Source initInputFile(\n Iterable<IsmRecord<WindowedValue<V>>> elements,\n IsmRecordCoder<WindowedValue<V>> coder,\n String tmpFilePath)\n throws Exception {\n // Group the keys by shard and sort the values within a shard by the composite key.\n Map<Integer, SortedMap<RandomAccessData, IsmRecord<WindowedValue<V>>>> writeOrder =\n new HashMap<>();\n for (IsmRecord<WindowedValue<V>> element : elements) {\n int shardId = coder.hash(element.getKeyComponents());\n if (!writeOrder.containsKey(shardId)) {\n writeOrder.put(\n shardId,\n new TreeMap<RandomAccessData, IsmRecord<WindowedValue<V>>>(\n RandomAccessData.UNSIGNED_LEXICOGRAPHICAL_COMPARATOR));\n }\n RandomAccessData data = encodeKeyPortion(coder, element);\n writeOrder.get(shardId).put(data, element);\n }\n\n IsmSink<WindowedValue<V>> sink =\n new IsmSink<>(\n FileSystems.matchNewResource(tmpFilePath, false), coder, BLOOM_FILTER_SIZE_LIMIT);\n try (SinkWriter<WindowedValue<IsmRecord<WindowedValue<V>>>> writer = sink.writer()) {\n for (Entry<Integer, SortedMap<RandomAccessData, IsmRecord<WindowedValue<V>>>> entry :\n writeOrder.entrySet()) {\n for (IsmRecord<WindowedValue<V>> record : entry.getValue().values()) {\n writer.add(new ValueInEmptyWindows<>(record));\n }\n }\n }\n return newIsmSource(coder, tmpFilePath);\n }", "public void updateSource() {\n\t\t// Set the mode to recording\n\t\tmode = RECORD;\n\t\t// Traverse the source and record the architectures structure\n\t\tinspect();\n\t\t// Set the mode to code generation\n\t\tmode = GENERATE;\n\t\t// Traverse the source and calls back when key source elements are\n\t\t// missing\n\t\tinspect();\n\t\t// System.out.println(tree);\n\t\t// Add the source files that are missing\n\t\tArrayList<TagNode> tags = tree.getUnvisited();\n\t\tcreateSourceFiles(tags);\n\t}", "public void importKey(IsoBuffer isoBuffer);", "@Override\n\tpublic void prepareKeys() {\n\t\tfor (RecordKey key : paramHelper.getPushingKeys())\n\t\t\taddReadKey(key);\n\t}", "@Override\n\tprotected void setup(Reducer<LongWritable, Text, Text, Text>.Context context)\n\t\t\tthrows IOException, InterruptedException {\n\t\tsuper.setup(context);\n\t\tminPnts=Long.parseLong(context.getConfiguration().get(\"minPnts\"));\n\t\tepsilon=Double.parseDouble(context.getConfiguration().get(\"epsilon\"));\n\t\toutput = new MultipleOutputs<Text,Text>(context);\n\t\tPath[] cacheFilesLocal = DistributedCache.getLocalCacheFiles(context.getConfiguration());\n\t\tfor (Path eachPath : cacheFilesLocal) {\n\t\t\t\n\t\t\tloadPartition(eachPath, context);\n\t\t\t\n\t\t}\n\t}", "private void preloadData()\n {\n ICardinality cardinality = newCardinality();\n\n byte[] scratchBytes = new byte[8];\n ByteBuffer scratch = ByteBuffer.wrap(scratchBytes);\n long numToFlush;\n int lastFlushed = 0;\n long lastLogged = System.currentTimeMillis();\n long maxBytesToInsert = (long) datasetSizeGB << 30;\n long bytesInserted = 0;\n int i = 0;\n\n logger.info(\"Inserting up to {}\", FBUtilities.prettyPrintMemory(maxBytesToInsert));\n\n try\n {\n while(bytesInserted < maxBytesToInsert)\n {\n scratch.clear();\n scratch.putLong(0, i);\n long hash = MurmurHash.hash64(scratchBytes, scratchBytes.length);\n cardinality.offerHashed(hash);\n\n counters.numInserted.incrementAndGet();\n bytesInserted += valueSize;\n\n i++;\n if (i == maxKey)\n i = 0;\n\n if (System.currentTimeMillis()- lastLogged >= TimeUnit.SECONDS.toMillis(1))\n {\n lastLogged = System.currentTimeMillis();\n logger.debug(\"Ins: {}, keys: {}, live sstables: {}, compacting: {}, pending compactions: {}\",\n FBUtilities.prettyPrintMemory(bytesInserted),\n i,\n dataTracker.getLiveSSTables().size(),\n dataTracker.getCompacting().size(),\n compactions.size() + strategy.getEstimatedRemainingTasks());\n }\n\n if (i >= (lastFlushed + uniqueKeysPerSStable) && // no point in checking the cardinality until we've inserted uniqueKeysPerSStable more entries\n (numToFlush = cardinality.cardinality()) >= uniqueKeysPerSStable)\n {\n counters.numFlushed.addAndGet(numToFlush);\n lastFlushed = i;\n generateSSTables(cardinality, numToFlush, partitioner.getMinimumToken(), partitioner.getMaximumToken(), \"preload\", true);\n\n cardinality = newCardinality();\n }\n\n if (i % 1000 == 0 && state.get() == SimulationState.TEARING_DOWN)\n { // this happens if the compaction threads fail\n logger.debug(\"Interrupting preload, simulation is tearing down\");\n break;\n }\n }\n\n if ((numToFlush = cardinality.cardinality()) > 0)\n {\n counters.numFlushed.addAndGet(numToFlush);\n generateSSTables(cardinality, numToFlush, partitioner.getMinimumToken(), partitioner.getMaximumToken(), \"preload\", true);\n }\n }\n catch (Exception e)\n {\n logger.error(\"Exception happen during preloading\", e);\n }\n }", "Set getLocalKeySet();", "private void createTestData() {\n for (int i = startKey; i < startKey + numKeys; i++) {\n keys.add(i);\n }\n }", "public void setSrcKey(String value) {\n\t\tsrcKey = value;\r\n }", "void distributeKeys() {\n // System.out.println(\"Mapper.distributeKeys() :: 1\");\n while (!toDistribute.empty()) {\n Entry e = toDistribute.pop();\n sendEntry(e);\n printAct(\">sent Entry \" + e.hash);\n\n }//while\n }", "Source createDatasourceZ3950IdFile(Source ds, Provider prov) throws RepoxException;", "@Test\n public void testQueryLessKeys1() throws Exception {\n File file = new File(testInfo.getDir());\n FileUtils.deleteDirectory(file);\n\n EventSchema eventSchema = GenericAggregateSerializerTest.getEventSchema();\n\n String[] dimensionSpecs = new String[] {\n \"time=\" + TimeUnit.MINUTES,\n \"time=\" + TimeUnit.MINUTES + \":adUnit\",\n \"time=\" + TimeUnit.MINUTES + \":adId\",\n \"time=\" + TimeUnit.MINUTES + \":pubId\",\n \"time=\" + TimeUnit.MINUTES + \":adId:adUnit\",\n \"time=\" + TimeUnit.MINUTES + \":pubId:adUnit\",\n \"time=\" + TimeUnit.MINUTES + \":pubId:adId\",\n \"time=\" + TimeUnit.MINUTES + \":pubId:adId:adUnit\"\n };\n\n GenericAggregator[] aggregators = new GenericAggregator[dimensionSpecs.length];\n for (int i = dimensionSpecs.length; i-- > 0;) {\n GenericAggregator aggregator = new GenericAggregator(eventSchema);\n aggregator.init(dimensionSpecs[i]);\n aggregators[i] = aggregator;\n }\n\n DimensionStoreOperator hdsOut = new DimensionStoreOperator() {\n @Override\n public void setup(OperatorContext arg0)\n {\n super.setup(arg0);\n super.writeExecutor = super.queryExecutor = MoreExecutors.sameThreadExecutor(); // synchronous processing\n }\n };\n TFileImpl hdsFile = new TFileImpl.DefaultTFileImpl();\n hdsOut.setFileStore(hdsFile);\n hdsFile.setBasePath(testInfo.getDir());\n //GenericAggregator aggregator = new GenericAggregator(eventSchema);\n //aggregator.init(\"time=MINUTES:pubId:adId:adUnit\");\n hdsOut.setEventSchemaJSON(GenericAggregateSerializerTest.TEST_SCHEMA_JSON);\n hdsOut.setAggregator(aggregators[0]);\n hdsOut.setMaxCacheSize(100);\n hdsOut.setFlushIntervalCount(100);\n hdsOut.setup(null);\n\n CollectorTestSink<DimensionStoreOperator.HDSRangeQueryResult> queryResults = new CollectorTestSink<DimensionStoreOperator.HDSRangeQueryResult>();\n @SuppressWarnings({\"unchecked\", \"rawtypes\"})\n CollectorTestSink<Object> tmp = (CollectorTestSink) queryResults;\n hdsOut.queryResult.setSink(tmp);\n\n\n long baseTime = System.currentTimeMillis();\n long baseMinute = TimeUnit.MILLISECONDS.convert(TimeUnit.MINUTES.convert(baseTime, TimeUnit.MILLISECONDS), TimeUnit.MINUTES);\n\n int numMinutes = 5;\n int wid = 1;\n for(int i = 0; i < numMinutes; i++) {\n hdsOut.beginWindow(wid);\n\n long timestamp = baseMinute - TimeUnit.MINUTES.toMillis(i);\n\n // Check aggregation for ae1 and ae2 as they have same key.\n Map<String, Object> eventMap = Maps.newHashMap();\n eventMap.put(\"timestamp\", timestamp);\n eventMap.put(\"pubId\", 1);\n eventMap.put(\"adId\", 2);\n eventMap.put(\"adUnit\", 3);\n eventMap.put(\"clicks\", 10L);\n\n GenericEvent ge = eventSchema.convertMapToGenericEvent(eventMap);\n\n int aggrIdx = 0;\n for (GenericAggregator aggregator : aggregators) {\n GenericAggregate aggr = aggregator.getGroup(ge, aggrIdx);\n aggregator.aggregate(aggr, ge);\n hdsOut.input.process(aggr);\n aggrIdx++;\n }\n hdsOut.endWindow();\n wid++;\n }\n\n hdsOut.beginWindow(wid);\n\n int pubId = 1;\n int adId = 2;\n int adUnit = 3;\n\n for(int i = 0; i < 8; i++) {\n JSONObject keys = new JSONObject();\n if ((i & 0x1) != 0)\n keys.put(\"pubId\", pubId);\n if ((i & 0x2) != 0)\n keys.put(\"adId\", adId);\n if ((i & 0x4) != 0)\n keys.put(\"adUnit\", adUnit);\n\n JSONObject query = new JSONObject();\n query.put(\"keys\", keys);\n query.put(\"id\", \"query\" + i);\n query.put(\"startTime\", baseMinute - TimeUnit.MILLISECONDS.convert(20, TimeUnit.MINUTES));\n query.put(\"endTime\", baseMinute);\n\n hdsOut.query.process(query.toString());\n }\n Assert.assertEquals(\"timeSeriesQueries \" + hdsOut.rangeQueries, 8, hdsOut.rangeQueries.size());\n hdsOut.endWindow();\n\n Assert.assertEquals(\"queryResults \" + queryResults.collectedTuples, 8, queryResults.collectedTuples.size());\n System.out.println(\"basetime \" + baseMinute);\n\n for(HDSRangeQueryResult r : queryResults.collectedTuples) {\n Assert.assertEquals(\"result points \" + r, Math.min(numMinutes, 20), r.data.size());\n for(Object o : r.data)\n System.out.println(o);\n }\n }", "private void generateSampleKeys()\n {\n Iterator<ArrayList<String>> di = data.iterator();\n String key2;\n\n while (di.hasNext())\n {\n ArrayList<String> row = di.next();\n\n Iterator<Integer> kci = keyCols.iterator();\n StringBuffer buf = new StringBuffer();\n while (kci.hasNext())\n {\n Integer i = kci.next();\n String value = row.get(i);\n buf.append(value + '_');\n }\n key2 = new String(StringUtils.chop(buf.toString()));\n key2 = key2.toUpperCase();\n\n SampleWithProperties s = new SampleWithProperties(key2);\n\n // now have to add properties\n Iterator<Integer> pi = spts.keySet().iterator();\n while (pi.hasNext())\n {\n Integer key3 = pi.next();\n String val = row.get(key3);\n val = val.toUpperCase();\n s.addProperty(spts.get(key3), val);\n }\n swp.add(s);\n }\n }", "public void reDistributeKeys() {\n predKey = chord.getPredecessorKey();\n if (predKey == 0) {\n return;\n }\n if (map.isEmpty()) {\n return;\n }\n\n Iterator it = map.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry<Integer, FileLocation> entry = (Map.Entry) it.next();\n //If I am not a successor of this Entry, put in in toDistribute Stack\n if (!Hasher.isBetween(predKey, entry.getKey(), nodeKey)) {\n toDistribute.push(new Entry(entry));\n }\n }\n\n }", "@Test\n public void testReplicateEntriesForHFiles() throws Exception {\n Path dir = TestReplicationSink.TEST_UTIL.getDataTestDirOnTestFS(\"testReplicateEntries\");\n Path familyDir = new Path(dir, Bytes.toString(TestReplicationSink.FAM_NAME1));\n int numRows = 10;\n List<Path> p = new ArrayList<>(1);\n final String hfilePrefix = \"hfile-\";\n // 1. Generate 25 hfile ranges\n Random rng = new SecureRandom();\n Set<Integer> numbers = new HashSet<>();\n while ((numbers.size()) < 50) {\n numbers.add(rng.nextInt(1000));\n } \n List<Integer> numberList = new ArrayList<>(numbers);\n Collections.sort(numberList);\n Map<String, Long> storeFilesSize = new HashMap<>(1);\n // 2. Create 25 hfiles\n Configuration conf = TestReplicationSink.TEST_UTIL.getConfiguration();\n FileSystem fs = dir.getFileSystem(conf);\n Iterator<Integer> numbersItr = numberList.iterator();\n for (int i = 0; i < 25; i++) {\n Path hfilePath = new Path(familyDir, (hfilePrefix + i));\n HFileTestUtil.createHFile(conf, fs, hfilePath, TestReplicationSink.FAM_NAME1, TestReplicationSink.FAM_NAME1, Bytes.toBytes(numbersItr.next()), Bytes.toBytes(numbersItr.next()), numRows);\n p.add(hfilePath);\n storeFilesSize.put(hfilePath.getName(), fs.getFileStatus(hfilePath).getLen());\n }\n // 3. Create a BulkLoadDescriptor and a WALEdit\n Map<byte[], List<Path>> storeFiles = new HashMap<>(1);\n storeFiles.put(TestReplicationSink.FAM_NAME1, p);\n org.apache.hadoop.hbase.wal.WALEdit edit = null;\n WALProtos.BulkLoadDescriptor loadDescriptor = null;\n try (Connection c = ConnectionFactory.createConnection(conf);RegionLocator l = c.getRegionLocator(TestReplicationSink.TABLE_NAME1)) {\n HRegionInfo regionInfo = l.getAllRegionLocations().get(0).getRegionInfo();\n loadDescriptor = ProtobufUtil.toBulkLoadDescriptor(TestReplicationSink.TABLE_NAME1, UnsafeByteOperations.unsafeWrap(regionInfo.getEncodedNameAsBytes()), storeFiles, storeFilesSize, 1);\n edit = org.apache.hadoop.hbase.wal.WALEdit.createBulkLoadEvent(regionInfo, loadDescriptor);\n }\n List<WALEntry> entries = new ArrayList<>(1);\n // 4. Create a WALEntryBuilder\n WALEntry.Builder builder = TestReplicationSink.createWALEntryBuilder(TestReplicationSink.TABLE_NAME1);\n // 5. Copy the hfile to the path as it is in reality\n for (int i = 0; i < 25; i++) {\n String pathToHfileFromNS = new StringBuilder(100).append(TestReplicationSink.TABLE_NAME1.getNamespaceAsString()).append(SEPARATOR).append(Bytes.toString(TestReplicationSink.TABLE_NAME1.getName())).append(SEPARATOR).append(Bytes.toString(loadDescriptor.getEncodedRegionName().toByteArray())).append(SEPARATOR).append(Bytes.toString(TestReplicationSink.FAM_NAME1)).append(SEPARATOR).append((hfilePrefix + i)).toString();\n String dst = ((TestReplicationSink.baseNamespaceDir) + (Path.SEPARATOR)) + pathToHfileFromNS;\n Path dstPath = new Path(dst);\n FileUtil.copy(fs, p.get(0), fs, dstPath, false, conf);\n }\n entries.add(builder.build());\n try (ResultScanner scanner = TestReplicationSink.table1.getScanner(new Scan())) {\n // 6. Assert no existing data in table\n Assert.assertEquals(0, scanner.next(numRows).length);\n }\n // 7. Replicate the bulk loaded entry\n TestReplicationSink.SINK.replicateEntries(entries, CellUtil.createCellScanner(edit.getCells().iterator()), TestReplicationSink.replicationClusterId, TestReplicationSink.baseNamespaceDir, TestReplicationSink.hfileArchiveDir);\n try (ResultScanner scanner = TestReplicationSink.table1.getScanner(new Scan())) {\n // 8. Assert data is replicated\n Assert.assertEquals(numRows, scanner.next(numRows).length);\n }\n // Clean up the created hfiles or it will mess up subsequent tests\n }", "private void fillPkCache(Stack s, String ename) {\n\t\tLong pkValueStart = getNextPkValueForEntityIncreaseBy(ename, 10, increaseBy());\n\t\tlong value = pkValueStart.longValue();\n\t\tlog.debug(\"filling pkCache for {}, starting at {}\", ename, value);\n\t\tfor (int i = increaseBy(); i > 0; i--) {\n\t\t\ts.push(Long.valueOf(i + value));\n\t\t}\n\t}", "private void changeDSSDataSourceEncryptedEntries() throws KeyChangeException {\n List<Tenant> tenantList = getTenantList();\n // Iterate through tenants\n for (Tenant tenant : tenantList) {\n String tenantDomain = tenant.getDomain();\n String tenantAdminUsername = tenant.getAdminName();\n try {\n // Start a new tenant flow for a tenant\n int tenantId = statTenantFlow(tenantDomain, tenantAdminUsername);\n // Load tenants registry\n ServiceHolder.getTenantRegLoader().loadTenantRegistry(tenantId);\n Registry registry = ServiceHolder.getRegistryService().getRegistry(tenantAdminUsername, tenantId);\n\n if (registry.resourceExists(KeyChangeConstants.DSS_DATA_SOURCE_FILE_LOCATION)) {\n Resource dataSourceCollectionResource = registry\n .get(KeyChangeConstants.DSS_DATA_SOURCE_FILE_LOCATION);\n\n if (dataSourceCollectionResource instanceof Collection) {\n\n Collection collection = (Collection) dataSourceCollectionResource;\n String[] dataSourceRegistryFilePaths = collection.getChildren();\n // Iterate over data sources.\n for (String dataSourceRegistryFilePath : dataSourceRegistryFilePaths) {\n if (registry.resourceExists(dataSourceRegistryFilePath)) {\n Resource resource = registry.get(dataSourceRegistryFilePath);\n // Change DSS password hash.\n changeDataSourcePasswordHash(registry, resource, dataSourceRegistryFilePath);\n }\n }\n }\n }\n } catch (RegistryException e) {\n throw new KeyChangeException(\"Error while getting registry from service holder getRegistryService() \"\n + \"method\", e);\n } finally {\n PrivilegedCarbonContext.endTenantFlow();\n }\n }\n }", "protected abstract SortedMap<String, SampleDescriptor> computeSamples(File sampleDir) throws IOException;", "private <K, V> Source initInputFile(\n Iterable<IsmRecord<WindowedValue<V>>> elements, IsmRecordCoder<WindowedValue<V>> coder)\n throws Exception {\n return initInputFile(elements, coder, tmpFolder.newFile().getPath());\n }", "private void init() throws UnknownHostException, RemoteException {\n\n FileApp.setMapper(this);\n predKey = 0;\n toDistribute = readNodeEntries();\n //System.out.println(\"Mapper.init() :: toDistribute=\"+toDistribute);\n }", "Map<K,V> readFromStore(Collection<K> keys);", "public NodeKey createNodeKeyWithSource( String sourceName );", "private void init() {\n _capacity = 1 << 9;\n int holderSize = _capacity << 1;\n _keyValueHolder = new int[holderSize];\n _mask = holderSize - 1;\n _maxNumEntries = (int) (_capacity * LOAD_FACTOR);\n }", "MapBuilder<K,V> keyInjection(Injection<K, byte[]> keyInjection);", "void prepareSortedLedgerStorageCheckpoint(long numBytesFlushed) throws IOException;", "private void initializeStoreFromPersistedData() throws IOException\r\n {\r\n loadKeys();\r\n\r\n if (keyHash.isEmpty())\r\n {\r\n dataFile.reset();\r\n }\r\n else\r\n {\r\n final boolean isOk = checkKeyDataConsistency(false);\r\n if (!isOk)\r\n {\r\n keyHash.clear();\r\n keyFile.reset();\r\n dataFile.reset();\r\n log.warn(\"{0}: Corruption detected. Resetting data and keys files.\", logCacheName);\r\n }\r\n else\r\n {\r\n synchronized (this)\r\n {\r\n startupSize = keyHash.size();\r\n }\r\n }\r\n }\r\n }", "public interface IIterableConfigurationSource extends IConfigurationSource\n{\n /**\n * @return A map of all contained keys with their values in this configuration\n * source. If the underlying source uses some kind of ordering (e.g.\n * in files), this order should be maintained. Never <code>null</code>\n * but maybe empty.\n */\n @Nonnull\n @ReturnsMutableCopy\n ICommonsMap <String, String> getAllConfigItems ();\n\n /**\n * @return A map of all contained keys and {@link ConfiguredValue} in this\n * configuration source. If the underlying source uses some kind of\n * ordering (e.g. in files), this order should be maintained. Never\n * <code>null</code> but maybe empty.\n * @see #getAllConfigItems()\n */\n @Nonnull\n @ReturnsMutableCopy\n default ICommonsMap <String, ConfiguredValue> getAllConfiguredValues ()\n {\n return new CommonsLinkedHashMap <> (getAllConfigItems (), Function.identity (), x -> new ConfiguredValue (this, x));\n }\n}", "private void distributeFragments() {\r\n\t\tif (!isOptComplete || !isEncryptComplete)\r\n\t\t\treturn;\r\n\r\n\t\t// Scan through all files in the folder and upload them\r\n\t\tFile fileFragDir = AndroidIOUtils.getExternalFile(Constants.DIR_ROOT + \"/\"\r\n\t\t\t\t+ MDFSFileInfo.getDirName(file.getName(), file.lastModified()));\r\n\t\tFile[] files = fileFragDir.listFiles();\r\n\t\tString name;\r\n\r\n\t\t// Distribute the key fragments\r\n\t\t/*\r\n\t\t * keyStorages = new ArrayList<Integer>(); keyStorages.add(2);\r\n\t\t * keyStorages.add(4); keyStorages.add(6); keyStorages.add(7);\r\n\t\t */\r\n\t\tfinal Node node = serviceHelper.getMyNode();\r\n\t\tint destNode;\r\n\t\t\r\n\t\t// Hack: Try to deliver the key multiple times...\r\n\t\tfor(int keyRun=0; keyRun < 1 ; keyRun++) {\r\n\t\tIterator<Integer> nodesIter = keyStorages.iterator();\r\n\t\tfor (KeyShareInfo key : keyShares) {\r\n\t\t\tif (nodesIter != null && nodesIter.hasNext()) {\r\n\t\t\t\tdestNode = nodesIter.next();\r\n\t\t\t\tif (destNode != node.getNodeId()) {\r\n\t\t\t\t\tfinal KeyFragPacket packet = new KeyFragPacket(node.getNodeId(),\r\n\t\t\t\t\t\t\tdestNode, key, file.lastModified());\r\n\t\t\t\t\t// This thread may not be necessary\r\n\t\t\t\t\t/*pool.execute(new Runnable(){\t\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// Problem: There is no way to confirm that the key fragment is successfully sent ...\r\n\t\t\t\t\t\t\t// node.sendAODVDataContainer(packet);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});*/\r\n\t\t\t\t\tnode.sendAODVDataContainer(packet);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Just store the key fragment locally.\r\n\t\t\t\t\tFile tmp = IOUtilities.createNewFile(fileFragDir,\r\n\t\t\t\t\t\t\tkey.getFileName() + \"__key__\" + key.getIndex());\r\n\t\t\t\t\tif (IOUtilities.writeObjectToFile(key, tmp)) {\r\n\t\t\t\t\t\tMDFSDirectory directory = serviceHelper.getDirectory();\r\n\t\t\t\t\t\tdirectory.addKeyFragment(file.lastModified(),\r\n\t\t\t\t\t\t\t\tkey.getIndex());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Distribute the file fragments\r\n\t\t/*\r\n\t\t * fileStorages = new ArrayList<Integer>(); fileStorages.add(2);\r\n\t\t * fileStorages.add(4); fileStorages.add(6); fileStorages.add(7);\r\n\t\t */\r\n\t\tlogger.distStart = System.currentTimeMillis();\r\n\t\tfragCounter.set(0);\r\n\t\tIterator<Integer> nodesIter = fileStorages.iterator();\r\n\t\tfor (File f : files) {\r\n\t\t\tname = f.getName();\r\n\t\t\tif (name.contains(\"__frag__\")) {\r\n\t\t\t\t// Find the fragment Number\r\n\t\t\t\tif (nodesIter != null && nodesIter.hasNext()) {\r\n\t\t\t\t\tdestNode = nodesIter.next();\r\n\t\t\t\t\tif (destNode == node.getNodeId()){\r\n\t\t\t\t\t\tfragCounter.incrementAndGet();\r\n\t\t\t\t\t\tcontinue; // Don't need to send to myself again\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tpool.execute(new FileFragmentUploader(f, file\r\n\t\t\t\t\t\t\t.lastModified(), destNode, !nodesIter.hasNext()));\r\n\t\t\t\t}\r\n\t\t\t} else if (name.contains(\"__key__\")) {\r\n\t\t\t\t/*\r\n\t\t\t\t * This may only happens if the file creator is also chosen as\r\n\t\t\t\t * the key storage node and the key fragment is copied to this\r\n\t\t\t\t * folder faster than the files in the folder is read. Just\r\n\t\t\t\t * ignore it for now\r\n\t\t\t\t */\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tjTimer.start(); //jTimer.start();\r\n\t\tlistener.statusUpdate(\"Distributing file fragments\");\r\n\t}", "public NetworkMapKey(NetworkMapKey source) {\n this._pid = source._pid;\n }", "protected void trunkStore() {\n LOG.info(\"Trunking state filestore: {}\", fileStore);\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(fileStore);\n for (Map.Entry<String, String> entry : cache.entrySet()) {\n fos.write(entry.getKey().getBytes());\n fos.write(KEY_VALUE_DELIMITER.getBytes());\n fos.write(entry.getValue().getBytes());\n fos.write(STORE_DELIMITER.getBytes());\n }\n } catch (IOException e) {\n throw RuntimeCamelException.wrapRuntimeCamelException(e);\n } finally {\n IOHelper.close(fos, \"Trunking file state repository\", LOG);\n }\n }", "Source updateDatasourceZ3950IdFile(Source ds) throws RepoxException;", "public void initAfterUnpersistence() {\n //From a legacy bundle\n if (sources == null) {\n sources = Misc.newList(getName());\n }\n super.initAfterUnpersistence();\n openData();\n }", "public void from(com.intuit.datasource.jooq.information_schema.tables.interfaces.IKeyColumnUsage from);", "public interface NamedStorage extends Iterable<String>, AutoCloseable {\n\n /**\n * Gets data stored by specified key and puts it to the provided stream.\n * Does not close given stream.\n * @param key data key\n * @param stream stream to process data\n * @return true if data was found, false otherwise\n */\n boolean getInto(String key, OutputStream stream);\n\n /**\n * Saves data from stream using provided key. If there was data for this key it will be overwritten with new data.\n * Does not close given stream.\n * @param key data key\n * @param stream stream to get data from\n */\n void saveFrom(String key, InputStream stream);\n\n /**\n * Checks that there is data stored for provided key\n * @param key data key\n * @return true if there is data for this key, false otherwise\n */\n boolean contains(String key);\n\n /**\n * Deletes key and associated data from storage. Does nothing if there is no such key in storage\n * @param key\n */\n void delete(String key);\n\n /**\n *\n * @return iterator for all keys. Order of keys is unknown.\n */\n Iterator<String> iterator();\n\n /**\n * Closes storage and flushes all changes on disk.\n */\n void close();\n\n /**\n * Copies all data to the specified storage\n * @param storage\n */\n void cloneTo(NamedStorage storage);\n}", "public ReduceLauncher(String[] keys, File inputFile) {\n\t\t\n\t\tthis.keys = keys;\n\t\tthis.inputFile = inputFile;\n\t\tthis.keysCounts = new HashMap<String, Integer>();\n\t}", "@PostConstruct\n public void init() {\n KeyGenerator keyGen;\n try {\n int KEK_SIZE = 256;\n String KEK_ALGORITHM = \"AES\";\n\n keyGen = KeyGenerator.getInstance(KEK_ALGORITHM);\n keyGen.init(KEK_SIZE);\n\n SecretKey secretKey = keyGen.generateKey();\n byte[] encodedKey = secretKey.getEncoded();\n String baseKek = new String(Hex.encode(encodedKey));\n KeyDto key = new KeyDto(baseKek);\n keyValueOperations.put(KEK_STORAGE_PATH, key);\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n }", "public interface StoreReader<K, V> {\n /**\n * read the value from the backend data source given the key\n *\n * @param k\n * @return\n */\n V readFromStore(K k);\n\n /**\n * read the collection from the backend data source given the collection of keys\n * @param keys\n * @return\n */\n Map<K,V> readFromStore(Collection<K> keys);\n\n /**\n * update the value\n * @param k\n */\n V updateFromStore(K k);\n\n}", "private void populateDataAndVerify(ReplicatedEnvironment masterEnv) {\n createTestData();\n populateDB(masterEnv, dbName, keys);\n readDB(masterEnv, dbName, startKey, numKeys);\n logger.info(numKeys + \" records (start key: \" +\n startKey + \") have been populated into db \" +\n dbName + \" and verified\");\n }", "private void clearSourceIds() {\r\n DiscourseDao discourseDao = DiscourseDbDaoFactory.DEFAULT.getDiscourseDao();\r\n Integer rowsCleared = discourseDao.clearSourceIds();\r\n\r\n DataSourcesDao dsDao = DiscourseDbDaoFactory.DEFAULT.getDataSourcesDao();\r\n rowsCleared = dsDao.clearSourceIds();\r\n\r\n DUserDao userDao = DiscourseDbDaoFactory.DEFAULT.getDUserDao();\r\n rowsCleared = userDao.clearSourceIds();\r\n\r\n ContentDao contentDao = DiscourseDbDaoFactory.DEFAULT.getContentDao();\r\n rowsCleared = contentDao.clearSourceIds();\r\n\r\n DataSourceInstanceDao dsiDao = DiscourseDbDaoFactory.DEFAULT.getDataSourceInstanceDao();\r\n rowsCleared = dsiDao.clearSourceIds();\r\n\r\n ContributionDao contributionDao = DiscourseDbDaoFactory.DEFAULT.getContributionDao();\r\n rowsCleared = contributionDao.clearSourceIds();\r\n\r\n DiscoursePartDao discoursePartDao = DiscourseDbDaoFactory.DEFAULT.getDiscoursePartDao();\r\n rowsCleared = discoursePartDao.clearSourceIds();\r\n\r\n DiscourseRelationDao discourseRelationDao =\r\n DiscourseDbDaoFactory.DEFAULT.getDiscourseRelationDao();\r\n rowsCleared = discourseRelationDao.clearSourceIds();\r\n\r\n DiscoursePartRelationDao discoursePartRelationDao =\r\n DiscourseDbDaoFactory.DEFAULT.getDiscoursePartRelationDao();\r\n rowsCleared = discoursePartRelationDao.clearSourceIds();\r\n }", "public void testMap() throws Exception {\n String key1 = 1 + randomAlphaOfLength(3);\n String key2 = 2 + randomAlphaOfLength(3);\n String key3 = 3 + randomAlphaOfLength(3);\n updateAndCheckSource(\n 0,\n 1,\n XContentFactory.jsonBuilder().startObject().startObject(\"test\").field(key1, \"foo\").field(key2, \"baz\").endObject().endObject()\n );\n updateAndCheckSource(\n 0,\n 1,\n XContentFactory.jsonBuilder().startObject().startObject(\"test\").field(key1, \"foo\").field(key2, \"baz\").endObject().endObject()\n );\n updateAndCheckSource(\n 1,\n 2,\n XContentFactory.jsonBuilder().startObject().startObject(\"test\").field(key1, \"foo\").field(key2, \"bir\").endObject().endObject()\n );\n updateAndCheckSource(\n 1,\n 2,\n XContentFactory.jsonBuilder().startObject().startObject(\"test\").field(key1, \"foo\").field(key2, \"bir\").endObject().endObject()\n );\n updateAndCheckSource(\n 2,\n 3,\n XContentFactory.jsonBuilder().startObject().startObject(\"test\").field(key1, \"foo\").field(key2, \"foo\").endObject().endObject()\n );\n updateAndCheckSource(\n 3,\n 4,\n XContentFactory.jsonBuilder()\n .startObject()\n .startObject(\"test\")\n .field(key1, \"foo\")\n .field(key2, (Object) null)\n .endObject()\n .endObject()\n );\n updateAndCheckSource(\n 3,\n 4,\n XContentFactory.jsonBuilder()\n .startObject()\n .startObject(\"test\")\n .field(key1, \"foo\")\n .field(key2, (Object) null)\n .endObject()\n .endObject()\n );\n updateAndCheckSource(\n 4,\n 5,\n XContentFactory.jsonBuilder()\n .startObject()\n .startObject(\"test\")\n .field(key1, \"foo\")\n .field(key2, (Object) null)\n .field(key3, (Object) null)\n .endObject()\n .endObject()\n );\n\n assertEquals(3, totalNoopUpdates());\n }", "private static Map<Integer, Map<String, List<String>>> importSummaries(\n String inputDir, String summarizer) {\n ObjectMapper mapper = new ObjectMapper();\n Map<Integer, Map<String, List<String>>> kToDocSummaries = new HashMap<>();\n for (int k : K_LIST) {\n Path summaryPath = Paths.get(inputDir, summarizer + \"_\" + String.valueOf(k) + \".json\");\n try (BufferedReader reader = Files.newBufferedReader(summaryPath)) {\n Map<String, List<String>> docToSummary = mapper.readValue(\n reader, new TypeReference<HashMap<String, List<String>>>() {\n });\n docToSummary.entrySet().removeIf(e -> e.getValue().size() < k);\n kToDocSummaries.put(k, docToSummary);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return kToDocSummaries;\n }", "public final void addKeyHandlersTo(HasAllKeyHandlers source) {\n addHandlers(source, this);\n }", "List<Source> process(int topK, Set<Source> sources);", "public void put(String platform, String key, File source) throws ExtenderClientException {\n File cachedFile = getCachedBuildFile(platform);\n File parentDir = cachedFile.getParentFile();\n\n if (!parentDir.exists()) {\n parentDir.mkdirs();\n }\n if (!parentDir.exists()) {\n throw new ExtenderClientException(String.format(\"Failed to create cache dir %s\", parentDir.getAbsolutePath()));\n }\n\n try {\n Files.copy(new FileInputStream(source), cachedFile.toPath(), REPLACE_EXISTING);\n } catch (IOException e) {\n throw new ExtenderClientException(String.format(\"Failed to copy %s to %s\", source.getAbsolutePath(), cachedFile.getAbsolutePath()), e);\n }\n\n this.persistentHashes.put(cachedFile.getAbsolutePath(), key);\n saveCache();\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 interface Source<V> {\n\n /**\n * Gets an object by unique identifier.\n * <p>\n * \n * @param uniqueId the unique identifier, not null\n * @return the UniqueIdentifiable object, not null\n * @throws IllegalArgumentException if the identifier is invalid\n * @throws DataNotFoundException if the object could not be found\n * @throws RuntimeException if an error occurs\n */\n V get(UniqueId uniqueId);\n\n /**\n * Gets an object by object identifier and version-correction.\n * <p>\n * In combination, the object identifier and version-correction exactly specify a single object at a single version-correction.\n * \n * @param objectId the object identifier to find, not null\n * @param versionCorrection the version-correction, not null\n * @return the matched object, not null\n * @throws IllegalArgumentException if the identifier or version-correction is invalid\n * @throws DataNotFoundException if the object could not be found\n * @throws RuntimeException if an error occurs\n */\n V get(ObjectId objectId, VersionCorrection versionCorrection);\n\n /**\n * Gets objects by unique identifier.\n * <p>\n * A unique identifier exactly specifies a single object at a single version-correction. This bulk method is potentially a more efficient form of {@link #get(UniqueId)} for multiple lookups.\n * \n * @param uniqueIds the unique identifiers to query, not null\n * @return the map of results, if there is no data for an identifier it will be missing from the map, not null\n */\n Map<UniqueId, V> get(Collection<UniqueId> uniqueIds);\n\n /**\n * Gets objects by object identifier and version-correction.\n * <p>\n * In combination, the object identifier and version-correction exactly specify a single object at a single version-correction. This bulk method is potentially a more efficient form of\n * {@link #get(ObjectId,VersionCorrection)} for multiple lookups.\n * \n * @param objectIds the object identifiers to query, not null\n * @param versionCorrection the version-correction, not null\n * @return the map of results, if there is no data for an identifier it will be missing from the map, not null\n */\n Map<ObjectId, V> get(Collection<ObjectId> objectIds, VersionCorrection versionCorrection);\n\n}", "private void createSourceCollection() throws Exception {\n List<String> nodeNames = this.startServers(shardCount * replicationFactor);\n this.collectionToNodeNames.put(SOURCE_COLLECTION, nodeNames);\n this.createCollection(SOURCE_COLLECTION);\n this.waitForRecoveriesToFinish(SOURCE_COLLECTION, true);\n this.updateMappingsFromZk(SOURCE_COLLECTION);\n }", "public void reduce(IntWritable key, Iterable<Text> values, Context context) throws IOException, InterruptedException {\n HashMap<String, ArrayList<String>> hm = new HashMap<String, ArrayList<String>>();\n\n //ArrayList<String> tableS = new ArrayList<String>(); Trying to reduce memory\n ArrayList<String> tableT = new ArrayList<String>();\n\n //group the records in the iterator into table S and table T\n for(Text val : values){\n String record = val.toString();\n int i = record.indexOf(\" \");\n String tag = record.substring(0,i);\n String value = record.substring(i+1);\n\n if (tag.contentEquals(\"S\")) {\n //get the key-value information\n int j = value.indexOf(\" \");\n String tagKey = value.substring(0,j);\n String mapValue = value.substring(j+1);\n\n //if the key doesn't exist\n if (!hm.containsKey(tagKey)) {\n ArrayList<String> list = new ArrayList<String>();\n list.add(mapValue);\n hm.put(tagKey, list);\n } else {\n //same key exists, then add it to the array list\n hm.get(tagKey).add(mapValue);\n }\n } else if(tag.contentEquals(\"T\")) {\n tableT.add(value);\n }\n }\n\n// for (String s : tableS){\n// int i = s.indexOf(\" \");\n// String keyValue = s.substring(0, i);\n// //if the key doesn't exist\n// if (!hm.containsKey(keyValue)) {\n// ArrayList<String> list = new ArrayList<String>();\n// list.add(s.substring(i+1));\n// hm.put(keyValue, list);\n// } else {\n// //same key exists, then add it to the array list\n// hm.get(keyValue).add(s.substring(i+1));\n// }\n// }\n\n //then iterate through the other table to produce the result\n for (String t : tableT) {\n //check to see if there's a match\n int i = t.indexOf(\" \");\n String hashKey = t.substring(0, i);\n if (!hm.containsKey(hashKey)) {\n //no match and don't do anything\n } else {\n //match\n for (String s : hm.get(hashKey)) {\n String result = s + \" \" + hashKey + \":\" + t;\n context.write(key, new Text(result));\n }\n }\n }\n }", "private void constructSourceMetadata() throws Exception {\n final String masterTag = \"ifg\";\n final String slaveTag = \"dummy\";\n\n // get sourceMaster & sourceSlave MetadataElement\n final MetadataElement masterMeta = AbstractMetadata.getAbstractedMetadata(sourceProduct);\n final String slaveMetadataRoot = AbstractMetadata.SLAVE_METADATA_ROOT;\n\n /* organize metadata */\n\n // put sourceMaster metadata into the masterMap\n metaMapPut(masterTag, masterMeta, sourceProduct, masterMap);\n\n // pug sourceSlave metadata into slaveMap\n MetadataElement[] slaveRoot = sourceProduct.getMetadataRoot().getElement(slaveMetadataRoot).getElements();\n for (MetadataElement meta : slaveRoot) {\n metaMapPut(slaveTag, meta, sourceProduct, slaveMap);\n }\n\n }", "public StateDictionary<T> make(Map<CharSequence, T> source) {\n // clear out state\n buildingCurrentAddRow = null;\n buildingLastEntry = \"\";\n builtTotalBytes = builtTotalStrings = builtMaxByteLength = 0;\n builtRows = new ArrayList<Row>();\n builtBaseRow = makeRow();\n builtResults = intMapFactory.make(source.values());\n if (SHOW_SIZE) System.out.println(\"***VALUE STORAGE: \" + builtResults.approximateStorage());\n \n Map<T, Integer> valueToInt = builtResults.getValueMap();\n Map<byte[],Integer> sorted = new TreeMap(SHORTER_BYTE_ARRAY_COMPARATOR);\n for (CharSequence text : source.keySet()) {\n sorted.put(byteConverter.toBytes(text), valueToInt.get(source.get(text)));\n }\n\n for (byte[] key : sorted.keySet()) {\n addMapping(key, sorted.get(key));\n }\n\n // now compact the rows\n // first find out which rows are equivalent (recursively)\n Map<Row,Row> replacements = new HashMap<Row,Row>();\n {\n Map<Row,Row> equivalents = new TreeMap<Row,Row>(StateDictionary.rowComparator);\n for (Row row : builtRows) {\n Row cardinal = equivalents.get(row);\n if (cardinal == null) {\n equivalents.put(row,row);\n } else {\n replacements.put(row,cardinal);\n }\n }\n }\n if (SHOW_SIZE) System.out.println(\"***ROWS: \" + builtRows.size() + \"\\t REPLACEMENTS: \" + replacements.size());\n \n // now replace all references to rows by their equivalents\n for (Row row : builtRows) {\n for (Byte key : row.byteToCell.keySet()) {\n Cell cell = row.byteToCell.get(key);\n Row newRow = replacements.get(cell.nextRow);\n if (newRow != null) {\n cell.nextRow = newRow;\n }\n }\n }\n // now compact the rows array\n ArrayList<Row> newRows = new ArrayList<Row>();\n for (Row row : builtRows) {\n if (!replacements.containsKey(row)) {\n newRows.add(row);\n }\n }\n builtRows = newRows;\n if (SHOW_SIZE) System.out.println(\"***ROWS: \" + builtRows.size());\n return new StateDictionary<T>(builtBaseRow, builtRows, builtResults, builtMaxByteLength, byteConverter);\n }", "public interface TopKeySample {\n\n public void push(TopKeyNodeBucket nodeBucket);\n public TopKeyNodeBucket getNodeBucket(String node);\n public Collection<TopKeyNodeBucket> getNodeBuckets();\n public int numOfNodeBuckets();\n public TopKeySample subTopKeySample(TopKeyParam... params);\n\n}", "private void bootstrapIndexIfNeed(String partition) {\n if (OptionsResolver.isInsertOverwrite(config)) {\n // skips the index loading for insert overwrite operation.\n return;\n }\n if (bucketIndex.containsKey(partition)) {\n return;\n }\n LOG.info(String.format(\"Loading Hoodie Table %s, with path %s\", this.metaClient.getTableConfig().getTableName(),\n this.metaClient.getBasePath() + \"/\" + partition));\n\n // Load existing fileID belongs to this task\n Map<Integer, String> bucketToFileIDMap = new HashMap<>();\n this.writeClient.getHoodieTable().getHoodieView().getLatestFileSlices(partition).forEach(fileSlice -> {\n String fileId = fileSlice.getFileId();\n int bucketNumber = BucketIdentifier.bucketIdFromFileId(fileId);\n if (isBucketToLoad(bucketNumber, partition)) {\n LOG.info(String.format(\"Should load this partition bucket %s with fileId %s\", bucketNumber, fileId));\n // Validate that one bucketId has only ONE fileId\n if (bucketToFileIDMap.containsKey(bucketNumber)) {\n throw new RuntimeException(String.format(\"Duplicate fileId %s from bucket %s of partition %s found \"\n + \"during the BucketStreamWriteFunction index bootstrap.\", fileId, bucketNumber, partition));\n } else {\n LOG.info(String.format(\"Adding fileId %s to the bucket %s of partition %s.\", fileId, bucketNumber, partition));\n bucketToFileIDMap.put(bucketNumber, fileId);\n }\n }\n });\n bucketIndex.put(partition, bucketToFileIDMap);\n }", "public abstract void copyFrom(KeyedString src);", "@Override\n public PreparedData prepare(SparkContext sc, TrainingData trainingData) {\n // now that we have all actions in separate RDDs we must merge any user dictionaries and\n // make sure the same user ids map to the correct events\n Optional<BiDictionaryJava> userDictionary = Optional.empty();\n\n List<Tuple2<String,IndexedDatasetJava>> indexedDatasets = new ArrayList<>();\n\n // make sure the same user ids map to the correct events for merged user dictionaries\n for(Tuple2<String,JavaPairRDD<String,String>> entry : trainingData.getActions()) {\n\n String eventName = entry._1();\n JavaPairRDD<String,String> eventIDS = entry._2();\n\n // passing in previous row dictionary will use the values if they exist\n // and append any new ids, so after all are constructed we have all user ids in the last dictionary\n IndexedDatasetJava ids = IndexedDatasetJava.apply(eventIDS, userDictionary, sc);\n userDictionary = Optional.of(ids.getRowIds());\n\n // append the transformation to the indexedDatasets list\n indexedDatasets.add(new Tuple2<>(eventName, ids));\n }\n\n List<Tuple2<String,IndexedDatasetJava>> rowAdjustedIds = new ArrayList<>();\n\n // check to see that there are events in primary event IndexedDataset and return an empty list if not\n if(userDictionary.isPresent()){\n\n // now make sure all matrices have identical row space since this corresponds to all users\n // with the primary event since other users do not contribute to the math\n for(Tuple2<String,IndexedDatasetJava> entry : indexedDatasets) {\n String eventName = entry._1();\n IndexedDatasetJava eventIDS = entry._2();\n rowAdjustedIds.add(new Tuple2<>(eventName,\n (new IndexedDatasetJava(eventIDS.getMatrix(),userDictionary.get(),eventIDS.getColIds())).\n newRowCardinality(userDictionary.get().size())));\n }\n }\n\n JavaPairRDD<String, Map<String,JsonAST.JValue>>fieldsRDD =\n trainingData.getFieldsRDD().mapToPair(entry -> new Tuple2<>(\n entry._1(), JavaConverters.mapAsJavaMapConverter(entry._2().fields()).asJava()));\n\n JavaPairRDD<String,HashMap<String,JsonAST.JValue>> fields = fieldsRDD.mapToPair(entry ->\n new Tuple2<>(entry._1(),new HashMap<>(entry._2())));\n\n return new PreparedData(rowAdjustedIds, fields);\n }", "public interface ContextPartitionSelectorSegmented extends ContextPartitionSelector {\n /**\n * Returns the partition keys.\n *\n * @return key set\n */\n public List<Object[]> getPartitionKeys();\n}", "public MinimumTrialsSourceToDestWord()\n {\n nodeList = new HashMap<T, GraphNode>();\n }", "public void init() {\n LOG.info(\"Initializing side input stores.\");\n\n initializeStoreDirectories();\n }", "@Override\n public void prepareInputDiscovery() {\n // Make sure to clear the additional inputs potentially left over from an old build (in case we\n // ran discoverInputs, but not beginExecution).\n clearAdditionalInputs();\n }", "ArrayList<ExportedKeyData> generatePublicKeyList();", "public void unDistributeMyKeys() {\n unDistributeKeys(readNodeEntries());\n }", "public interface IKeyCreator {\n byte[] generateKey(int n);\n\n byte[] getKeyFromFile(String p);\n\n byte[] inputKey(String s);\n}", "@Override\n\tpublic void takeMyData(String srcHost, String srcPort, String key)\n\t\t\tthrows RemoteException {\n\t\t\n\t}", "public interface HostKeyImportApi extends HostApi {\n\n\t/**\n\t * To modify the fields for key import from host.\n\t * \n\t * @param isoBuffer\n\t */\n\tpublic void importKey(IsoBuffer isoBuffer);\n\n}", "private void rebuildKey() {\r\n\r\n final StringBuffer sb = new StringBuffer();\r\n\r\n sb.append(getClassField().getCanonicalName());\r\n for (final Object k : this.keyPartList) {\r\n sb.append(k.toString()).append('|');\r\n }\r\n this.key = sb.toString();\r\n }", "private void setupMockBase() {\n storage = new MockBase(tsdb, client, true, true, true, true);\n storage.addColumn(UID_TABLE, new byte[] { 0 }, ID_FAMILY, METRICS, \n Bytes.fromLong(2L));\n storage.addColumn(UID_TABLE, new byte[] { 0 }, ID_FAMILY, TAGK, \n Bytes.fromLong(2L));\n storage.addColumn(UID_TABLE, new byte[] { 0 }, ID_FAMILY, TAGV, \n Bytes.fromLong(2L));\n // forward mappings\n storage.addColumn(UID_TABLE, \"foo\".getBytes(MockBase.ASCII()), ID_FAMILY, \n METRICS, new byte[] {0, 0, 1});\n storage.addColumn(UID_TABLE, \"host\".getBytes(MockBase.ASCII()), ID_FAMILY, \n TAGK, new byte[] {0, 0, 1});\n storage.addColumn(UID_TABLE, \"web01\".getBytes(MockBase.ASCII()), ID_FAMILY, \n TAGV, new byte[] {0, 0, 1});\n \n storage.addColumn(UID_TABLE, \"bar\".getBytes(MockBase.ASCII()), ID_FAMILY, \n METRICS, new byte[] {0, 0, 2});\n storage.addColumn(UID_TABLE, \"dc\".getBytes(MockBase.ASCII()), ID_FAMILY, \n TAGK, new byte[] {0, 0, 2});\n storage.addColumn(UID_TABLE, \"web02\".getBytes(MockBase.ASCII()), ID_FAMILY, \n TAGV, new byte[] {0, 0, 2});\n \n // reverse mappings\n storage.addColumn(UID_TABLE, new byte[] {0, 0, 1}, NAME_FAMILY, \n METRICS, \"foo\".getBytes(MockBase.ASCII()));\n storage.addColumn(UID_TABLE, new byte[] {0, 0, 1}, NAME_FAMILY, \n TAGK, \"host\".getBytes(MockBase.ASCII()));\n storage.addColumn(UID_TABLE, new byte[] {0, 0, 1}, NAME_FAMILY, \n TAGV, \"web01\".getBytes(MockBase.ASCII()));\n \n storage.addColumn(UID_TABLE, new byte[] {0, 0, 2}, NAME_FAMILY, \n METRICS, \"bar\".getBytes(MockBase.ASCII()));\n storage.addColumn(UID_TABLE, new byte[] {0, 0, 2}, NAME_FAMILY, \n TAGK, \"dc\".getBytes(MockBase.ASCII()));\n storage.addColumn(UID_TABLE, new byte[] {0, 0, 2}, NAME_FAMILY, \n TAGV, \"web02\".getBytes(MockBase.ASCII()));\n }", "private void processMetadataFromLoader() {\n\n int recordCount = mdi.readInt();\n\n long currentTime = System.currentTimeMillis();\n synchronized (entities) {\n clearOldTempIndexes(currentTime);\n\n for (int i = 0; i < recordCount; i++) {\n int tempIndex = mdi.readInt();\n assert DirectProtocol.isValidTempIndex(tempIndex);\n String symbol = mdi.readCharSequence().toString().intern();\n\n ConstantIdentityKey key;\n int entityIndex = entities.get(symbol, NOT_FOUND_VALUE);\n if (entityIndex == NOT_FOUND_VALUE) {\n entityIndex = entities.size();\n key = new ConstantIdentityKey(symbol);\n entities.put(key, entityIndex);\n } else {\n key = entities.getKeyObject(symbol);\n }\n\n // Note: key is guarantied to be same object as in \"entities\" field\n tempIndexes.put(tempIndex, key);\n\n sendMetadata(symbol, entityIndex);\n }\n if (recordCount > 0) {\n lastTempIndexAdded = currentTime;\n }\n }\n }", "private void ingest(SnowflakeStreamingServiceConfig config)\n throws IngestResponseException, IOException, URISyntaxException {\n List<String> filesList = config.getFilesList();\n String stagingBucketDir = config.getStagingBucketDir();\n ingestManager = config.getIngestManager();\n\n Set<String> files =\n filesList.stream()\n .map(e -> e.replaceAll(String.valueOf(stagingBucketDir), \"\"))\n .map(e -> e.replaceAll(\"'\", \"\"))\n .collect(Collectors.toSet());\n\n if (!files.isEmpty()) {\n this.ingestManager.ingestFiles(SimpleIngestManager.wrapFilepaths(files), null);\n }\n }", "private void setKeySet(OwnSet<K> st){\n this.keySet = st; \n }", "@Override\r\n public Set<K> getKeySet() throws IOException\r\n {\r\n final HashSet<K> keys = new HashSet<>();\r\n\r\n storageLock.readLock().lock();\r\n\r\n try\r\n {\r\n keys.addAll(this.keyHash.keySet());\r\n }\r\n finally\r\n {\r\n storageLock.readLock().unlock();\r\n }\r\n\r\n return keys;\r\n }", "@Test\n\tpublic void testGetStreamSourcesByID_00() {\n\t\ttry {\n\t\t\tClass c = Class.forName(\"InternalMemory\");\n\t\t\tMethod method = c.getDeclaredMethod(\"getStreamSourcesByID\", new Class[] { String.class });\n\t\t\tmethod.setAccessible(true);\n\t\t\tObject i = c.newInstance();\n\n\t\t\tConcurrentHashMap<String, ArrayList<String>> map = new ConcurrentHashMap<String, ArrayList<String>>();\n\t\t\tArrayList<String> links = new ArrayList<String>();\n\t\t\tlinks.add(\"a\");\n\t\t\tlinks.add(\"b\");\n\t\t\tlinks.add(\"c\");\n\t\t\tmap.put(\"randomString\", links);\n\n\t\t\tField field = c.getDeclaredField(\"_streamerToStreamSourcesMap\");\n\t\t\tfield.setAccessible(true);\n\t\t\tfield.set(i, map);\n\n\t\t\tObject r = method.invoke(i, new Object[] { \"randomString\" });\n\t\t\tassertEquals(r, \"a b c \");\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\n\t}", "@Override\n public HashMap initFileSet()\n {\n return null;\n }", "@Test\n public void bigDataInMap() throws Exception {\n\n final byte[] data = new byte[16 * 1024 * 1024]; // 16 MB\n rnd.nextBytes(data); // use random data so that Java does not optimise it away\n data[1] = 0;\n data[3] = 0;\n data[5] = 0;\n\n CollectingSink resultSink = new CollectingSink();\n\n StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\n env.setParallelism(1);\n\n DataStream<Integer> src = env.fromElements(1, 3, 5);\n\n src.map(\n new MapFunction<Integer, String>() {\n private static final long serialVersionUID = 1L;\n\n @Override\n public String map(Integer value) throws Exception {\n return \"x \" + value + \" \" + data[value];\n }\n })\n .addSink(resultSink);\n\n JobGraph jobGraph = StreamingJobGraphGenerator.createJobGraph(env.getStreamGraph());\n\n final RestClusterClient<StandaloneClusterId> restClusterClient =\n new RestClusterClient<>(\n MINI_CLUSTER_RESOURCE.getClientConfiguration(),\n StandaloneClusterId.getInstance());\n\n try {\n submitJobAndWaitForResult(restClusterClient, jobGraph, getClass().getClassLoader());\n\n List<String> expected = Arrays.asList(\"x 1 0\", \"x 3 0\", \"x 5 0\");\n\n List<String> result = CollectingSink.result;\n\n Collections.sort(expected);\n Collections.sort(result);\n\n assertEquals(expected, result);\n } finally {\n restClusterClient.close();\n }\n }", "byte[] getActualRowKey(ConsumerConfig consumerConfig, byte[] originalRowKey);", "@SneakyThrows\n protected void addSourceResource() {\n if (databaseType instanceof MySQLDatabaseType) {\n try (Connection connection = DriverManager.getConnection(getComposedContainer().getProxyJdbcUrl(\"\"), \"root\", \"root\")) {\n connection.createStatement().execute(\"USE sharding_db\");\n addSourceResource0(connection);\n }\n } else {\n Properties queryProps = ScalingCaseHelper.getPostgreSQLQueryProperties();\n try (Connection connection = DriverManager.getConnection(JDBC_URL_APPENDER.appendQueryProperties(getComposedContainer().getProxyJdbcUrl(\"sharding_db\"), queryProps), \"root\", \"root\")) {\n addSourceResource0(connection);\n }\n }\n List<Map<String, Object>> resources = queryForListWithLog(\"SHOW DATABASE RESOURCES FROM sharding_db\");\n assertThat(resources.size(), is(2));\n }", "@Override\n\tpublic void prepare(Map arg0, TopologyContext arg1, OutputCollector arg2) {\n\t\t\n\t\tsuid_list =new ArrayList<Integer>();\n\t\t\n\t}", "protected void heapStore(Node base, Set src, jq_Field f) {\n base.addEdges(f, NodeSet.FACTORY.makeSet(src));\n }", "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}", "public boolean inStorage(String key);", "protected void setCollectKey(Key key)\n\t{\n\t\tfor (int i = 0; i < _searchKeyList.size(); i++)\n\t\t{\n\t\t\tKey ky = (Key)_searchKeyList.get(i) ;\n\t\t\tif (ky.getTableColumn().equals(key.getTableColumn()))\n\t\t\t{\n\t\t\t\tif (key.getTableCollect().equals(\"NULL\"))\n\t\t\t\t{\n\t\t\t\t\tky.setTableCollect(null) ;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tky.setTableCollect(key.getTableCollect()) ;\n\t\t\t\t}\n\t\t\t\t_searchKeyList.set(i, ky) ;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}", "private void processAllPathsExt( final IndyStoreEvent event, Predicate<? super String> pathFilter )\n {\n DrainingExecutorCompletionService<Integer> clearService =\n new DrainingExecutorCompletionService<>( cleanupExecutor );\n\n Set<ArtifactStore> stores = new HashSet<>( event.getStores() );\n stores.forEach(store->{\n final StoreKey key = store.getKey();\n try\n {\n Set<Group> groups =\n storeDataManager.query().packageType( key.getPackageType() ).getGroupsAffectedBy( key );\n if ( store instanceof Group )\n {\n groups.add( (Group) store );\n }\n\n groups.forEach( g->{\n listPathsAnd( key, pathFilter, p->clearService.submit(clearPathProcessor( p, key, groups )) );\n } );\n\n nfc.clearMissing( LocationUtils.toLocation( store ) ); // clear NFC for this store\n }\n catch ( IndyDataException e )\n {\n e.printStackTrace();\n }\n } );\n\n Set<StoreKey> keys = event.getStores().stream().map( s -> s.getKey() ).collect( Collectors.toSet() );\n drainAndCount( clearService, \"stores: \" + keys );\n }", "protected void initializeEmbeddableKey() {\n }", "@Test\n public void reuseKeys() throws Exception {\n VolatileLookUpTable.Builder<IntOption> builder = new VolatileLookUpTable.Builder<>();\n LookUpKey key = key();\n\n key.add(new IntOption(100));\n builder.add(key, new IntOption(100));\n key.reset();\n\n key.add(new IntOption(101));\n builder.add(key, new IntOption(101));\n key.reset();\n\n key.add(new IntOption(102));\n builder.add(key, new IntOption(102));\n key.reset();\n\n LookUpTable<IntOption> table = builder.build();\n assertThat(sort(table.get(key(100))), is(values(100)));\n assertThat(sort(table.get(key(101))), is(values(101)));\n assertThat(sort(table.get(key(102))), is(values(102)));\n }", "protected abstract SingleKeyVersionDataExtractor<DATA> generateDataKeyAsString () ;", "private void init(AnalyticSource source) throws AnalysisException {\n columnValuesMap = new HashMap<String,ColumnValueAnalysisResult>();\n\n HadoopAnalyticSource hadoopSource = (HadoopAnalyticSource) source;\n //hadoopSource.getHadoopFileStructureModel().\n String errString;\n //Setting purefilename\n String pureFileName =hadoopSource.getFileName();\n if(null==pureFileName||\"\".equals(pureFileName.trim())){\n errString=\"File name[\"+pureFileName+\"] is either empty or null\";\n throw new IllegalArgumentException(errString);\n }\n setPureFileName(pureFileName);\n //Setting pig server\n setPigServer(acquirePigServerInfo(hadoopSource));\n //Setting the column names\n ValueAnalysisConfig config = (ValueAnalysisConfig) source\n .getAnalyticConfig();\n String cNames = config.getColumnNames();\n if(null==cNames||\"\".equals(cNames.trim())){\n errString=\"Column names[\"+cNames+\"] are either empty or null\";\n throw new IllegalArgumentException(errString);\n }\n setColumnNames(new TreeSet<String>(Arrays.asList(cNames.split(\",\"))));\n fetchColumnValuePairs(hadoopSource.getHadoopFileStructureModel());\n //Setting locale\n Locale loc=hadoopSource.getAnalyticConfig().getLocale();\n if(null==loc){\n itsLogger.error(\"Could not acquire Locale yet will try to continue\");\n }\n setLocale(hadoopSource.getAnalyticConfig().getLocale());\n //Setting pigData source variable name\n String pigDataSourceName = hadoopSource.getInputTempName();\n if(null==pigDataSourceName||\"\".equals(pigDataSourceName.trim())){\n errString=\"PigDataSource name[\"+pigDataSourceName+\"] is either empty or null\";\n throw new IllegalArgumentException(errString);\n }\n setLoadedVariableName(pigDataSourceName);\n initNumberAndTextColumns();\n }", "private static INodeFile[] verifySrcFiles(FSDirectory fsd, String[] srcs,\n INodesInPath targetIIP, FSPermissionChecker pc) throws IOException {\n Set<INodeFile> si = new LinkedHashSet<>();\n final INodeFile targetINode = targetIIP.getLastINode().asFile();\n final INodeDirectory targetParent = targetINode.getParent();\n // now check the srcs\n for (String src : srcs) {\n final INodesInPath iip = fsd.getINodesInPath4Write(src);\n // permission check for srcs\n if (pc != null) {\n fsd.checkPathAccess(pc, iip, FsAction.READ); // read the file\n fsd.checkParentAccess(pc, iip, FsAction.WRITE); // for delete\n }\n\n final INode srcINode = iip.getLastINode();\n final INodeFile srcINodeFile = INodeFile.valueOf(srcINode, src);\n // make sure the src file and the target file are in the same dir\n if (srcINodeFile.getParent() != targetParent) {\n throw new HadoopIllegalArgumentException(\"Source file \" + src\n + \" is not in the same directory with the target \"\n + targetIIP.getPath());\n }\n // source file cannot be the same with the target file\n if (srcINode == targetINode) {\n throw new HadoopIllegalArgumentException(\"concat: the src file \" + src\n + \" is the same with the target file \" + targetIIP.getPath());\n }\n\n if(srcINodeFile.getStoragePolicyID() == HdfsConstants.DB_STORAGE_POLICY_ID) {\n throw new HadoopIllegalArgumentException(\"concat: source file \" + src\n + \" is stored in DB.\");\n }\n\n // source file cannot be under construction or empty\n if(srcINodeFile.isUnderConstruction() || srcINodeFile.numBlocks() == 0) {\n throw new HadoopIllegalArgumentException(\"concat: source file \" + src\n + \" is invalid or empty or underConstruction\");\n }\n // source file's preferred block size cannot be greater than the target\n // file\n if (srcINodeFile.getPreferredBlockSize() >\n targetINode.getPreferredBlockSize()) {\n throw new HadoopIllegalArgumentException(\"concat: source file \" + src\n + \" has preferred block size \" + srcINodeFile.getPreferredBlockSize()\n + \" which is greater than the target file's preferred block size \"\n + targetINode.getPreferredBlockSize());\n }\n si.add(srcINodeFile);\n }\n \n // make sure no two files are the same\n if (si.size() < srcs.length) {\n // it means at least two files are the same\n throw new HadoopIllegalArgumentException(\n \"concat: at least two of the source files are the same\");\n }\n return si.toArray(new INodeFile[si.size()]);\n }", "@Override\n public void preSourceTasks () throws SQLException {\n chunkSize = 0L;\n\n // Only calculate the chunk size when parallel execution is active\n if (this.options.getJobs() != 1) {\n /*\n * Calculating the chunk size for parallel job processing\n */\n Statement statement = this.getConnection().createStatement();\n String sql = \"SELECT \" + \" CEIL(count(*) / \" + options.getJobs() + \") chunk_size\" + \", count(*) total_rows\" + \" FROM \";\n\n // Source Query\n if (options.getSourceQuery() != null && !options.getSourceQuery().isEmpty()) {\n sql = sql + \"( \" + this.options.getSourceQuery() + \" ) as REPLICADB_TABLE\";\n\n } else {\n\n sql = sql + this.options.getSourceTable();\n // Source Where\n if (options.getSourceWhere() != null && !options.getSourceWhere().isEmpty()) {\n sql = sql + \" WHERE \" + options.getSourceWhere();\n }\n }\n\n LOG.debug(\"Calculating the chunks size with this sql: {}\", sql);\n ResultSet rs = statement.executeQuery(sql);\n rs.next();\n chunkSize = rs.getLong(1);\n long totalNumberRows = rs.getLong(2);\n LOG.debug(\"chunkSize: {} totalNumberRows: {}\", chunkSize, totalNumberRows);\n\n statement.close();\n this.getConnection().commit();\n }\n }", "void distributedSingleModeLoading( File dataPath, File resultsPath, int scenarioNumber );", "public void createHSMapping(\n\t\t\tSpatialEntitySet sourceSESet) {\n\t\tthis.shMapping.forEach((se,hrHash)->{\n\t\t\tif (!hrHash.isEmpty()\n\t\t\t\t\t&&sourceSESet.seHash.containsKey(\n\t\t\t\t\t\t\tse.getLeft())) {\n\t\t\t\tfor (int hrIndex: hrHash) {\n\t\t\t\t\tif (!this.hsMapping.containsKey(hrIndex)) {\n\t\t\t\t\t\tthis.hsMapping.put(hrIndex, \n\t\t\t\t\t\t\t\tnew SpatialEntitySet());\n\t\t\t\t\t}\n\t\t\t\t\tthis.hsMapping.get(hrIndex).addSE(\n\t\t\t\t\t\t\tse.getLeft(), se.getRight());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t//process target se next\n\t\tthis.shMapping.forEach((se,hrHash)->{\n\t\t\tif (!hrHash.isEmpty()\n\t\t\t\t\t&&!sourceSESet.seHash.containsKey(\n\t\t\t\t\t\t\tse.getLeft())) {\n\t\t\t\tfor (int hrIndex: hrHash) {\n\t\t\t\t\tif (this.hsMapping.containsKey(hrIndex)) {\n\t\t\t\t\t\tthis.hsMapping.get(hrIndex).addSE(\n\t\t\t\t\t\t\t\tse.getLeft(), se.getRight());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "private int[] genKeys() {\n HashSet<Integer> set = new HashSet<Integer>();\n HashSet<int[]> next = new HashSet<int[]>();\n rowKeys = new HashMap<Integer, Integer>();\n int[] rowKeys2combo = new int[keySize];\n\n // 1st set starts with 0004, 0040, 0400, 4000\n int counter = 0;\n int key;\n for (int i = 0; i < rowSize; i++) {\n int[] temp = new int[rowSize];\n temp[i] = rowSize;\n key = rowCombo2Key(temp);\n rowKeys2combo[counter] = key;\n rowKeys.put(key, counter++);\n set.add(key);\n next.add(temp);\n }\n\n while (next.size() > 0) {\n HashSet<int[]> expand = next;\n next = new HashSet<int[]>();\n for (int[] combo : expand) {\n for (int i = 0; i < rowSize; i++) {\n if (combo[i] > 0) {\n for (int j = 0; j < rowSize; j++) {\n if (i != j) {\n int[] shift = new int[rowSize];\n System.arraycopy(combo, 0, shift, 0, rowSize);\n shift[i] = combo[i] - 1;\n shift[j] = combo[j] + 1;\n key = rowCombo2Key(shift);\n if (!set.contains(key)) {\n rowKeys2combo[counter] = key;\n rowKeys.put(key, counter++);\n set.add(key);\n next.add(shift);\n }\n }\n }\n }\n }\n }\n }\n\n final int splitIdx = counter;\n\n // 2nd set starts with 0003, 0030, 0300, 3000\n for (int i = 0; i < rowSize; i++) {\n int[] temp = new int[rowSize];\n temp[i] = rowSize - 1;\n key = rowCombo2Key(temp);\n rowKeys2combo[counter] = key;\n rowKeys.put(key, counter++);\n set.add(key);\n next.add(temp);\n }\n\n while (next.size() > 0) {\n HashSet<int[]> expand = next;\n next = new HashSet<int[]>();\n for (int[] combo : expand) {\n for (int i = 0; i < rowSize; i++) {\n if (combo[i] > 0) {\n for (int j = 0; j < rowSize; j++) {\n if (i != j) {\n int[] shift = new int[rowSize];\n System.arraycopy(combo, 0, shift, 0, rowSize);\n shift[i] = combo[i] - 1;\n shift[j] = combo[j] + 1;\n key = rowCombo2Key(shift);\n if (!set.contains(key)) {\n rowKeys2combo[counter] = key;\n rowKeys.put(key, counter++);\n set.add(key);\n next.add(shift);\n }\n }\n }\n }\n }\n }\n }\n return genKeyLink(splitIdx, rowKeys2combo);\n }", "private void invertedToDatabase(){\r\n cleFreq = new HashMap<>();\r\n System.out.println(\"Strat collecting\");\r\n Map<String,List<Invertedindex>> collects = collecting();\r\n System.out.println(\"Ending collecting\");\r\n Database.getInstance().invertedIndex(collects);\r\n Database.getInstance().addPoids(cleFreq);\r\n }", "@Override\n\t\tprotected void setup(org.apache.hadoop.mapreduce.Mapper.Context context)\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\tConfiguration conf=context.getConfiguration() ;\n\t\t\tPath p=new Path(conf.get(\"HDFS\"));\n\t\t\tFileSystem fs = p.getFileSystem ( conf) ;\n\t\t//\tSequenceFile.Reader reader=new SequenceFile.Reader(fs, new Path(\"hdfs://localhost:9000/home/novas/clusterpointoutput/part-r-00000\"), context.getConfiguration());\n\t\t\t SequenceFile.Reader reader=new SequenceFile.Reader(fs, new Path(conf.get(\"cluster\")),conf);\n\t\t\t while(reader.next(seqkey, seqvalue))\n\t\t {\n\t\t\t // System.out.println(seqvalue.toString());\n\t\t\t clist.add(seqvalue.toString());\n\t\t }\n\t\t}", "void configureSource(Job job, int inputId) throws IOException;", "void setAlgIdExtSource(java.lang.String algIdExtSource);", "public CacheKey(SubGraph keys) {\n this.keys = new ArrayList<Integer>(keys.size());\n for (int i = 0; i < keys.size(); i++) {\n this.keys.add(keys.get(i));\n }\n }", "void saveFrom(String key, InputStream stream);", "public void importKeys() {\n\n if (mListFragment.getSelectedEntries().size() == 0) {\n Notify.create(this, R.string.error_nothing_import_selected, Notify.Style.ERROR)\n .show((ViewGroup) findViewById(R.id.import_snackbar));\n return;\n }\n\n ServiceProgressHandler serviceHandler = new ServiceProgressHandler(this) {\n @Override\n public void handleMessage(Message message) {\n // handle messages by standard KeychainIntentServiceHandler first\n super.handleMessage(message);\n\n ImportKeysActivity.this.handleMessage(message);\n }\n };\n\n // Send all information needed to service to import key in other thread\n Intent intent = new Intent(this, KeychainNewService.class);\n ImportKeyringParcel operationInput = null;\n CryptoInputParcel cryptoInput = null;\n\n ImportKeysListFragment.LoaderState ls = mListFragment.getLoaderState();\n if (ls instanceof ImportKeysListFragment.BytesLoaderState) {\n Log.d(Constants.TAG, \"importKeys started\");\n\n // get DATA from selected key entries\n IteratorWithSize<ParcelableKeyRing> selectedEntries = mListFragment.getSelectedData();\n\n // instead of giving the entries by Intent extra, cache them into a\n // file to prevent Java Binder problems on heavy imports\n // read FileImportCache for more info.\n try {\n // We parcel this iteratively into a file - anything we can\n // display here, we should be able to import.\n ParcelableFileCache<ParcelableKeyRing> cache =\n new ParcelableFileCache<>(this, \"key_import.pcl\");\n cache.writeCache(selectedEntries);\n\n operationInput = new ImportKeyringParcel(null, null);\n cryptoInput = new CryptoInputParcel();\n\n } catch (IOException e) {\n Log.e(Constants.TAG, \"Problem writing cache file\", e);\n Notify.create(this, \"Problem writing cache file!\", Notify.Style.ERROR)\n .show((ViewGroup) findViewById(R.id.import_snackbar));\n }\n } else if (ls instanceof ImportKeysListFragment.CloudLoaderState) {\n ImportKeysListFragment.CloudLoaderState sls = (ImportKeysListFragment.CloudLoaderState) ls;\n\n // get selected key entries\n ArrayList<ParcelableKeyRing> keys = new ArrayList<>();\n {\n // change the format into ParcelableKeyRing\n ArrayList<ImportKeysListEntry> entries = mListFragment.getSelectedEntries();\n for (ImportKeysListEntry entry : entries) {\n keys.add(new ParcelableKeyRing(\n entry.getFingerprintHex(), entry.getKeyIdHex(), entry.getExtraData())\n );\n }\n }\n\n operationInput = new ImportKeyringParcel(keys, sls.mCloudPrefs.keyserver);\n if (mProxyPrefs != null) { // if not null means we have specified an explicit proxy\n cryptoInput = new CryptoInputParcel(mProxyPrefs.parcelableProxy);\n } else {\n cryptoInput = new CryptoInputParcel();\n }\n }\n\n intent.putExtra(KeychainNewService.EXTRA_OPERATION_INPUT, operationInput);\n intent.putExtra(KeychainNewService.EXTRA_CRYPTO_INPUT, cryptoInput);\n\n // Create a new Messenger for the communication back\n Messenger messenger = new Messenger(serviceHandler);\n intent.putExtra(KeychainService.EXTRA_MESSENGER, messenger);\n\n // show progress dialog\n serviceHandler.showProgressDialog(\n getString(R.string.progress_importing),\n ProgressDialog.STYLE_HORIZONTAL, true\n );\n\n // start service with intent\n startService(intent);\n }", "@Override\n public RecordId put(RecordId key, RecordId value) {\n if (key.getSegmentId().getMostSignificantBits() % 10000 == 0) {\n getCandidateIds.add(key);\n }\n return null;\n }", "private void populateData() {\n\t\tList<TrafficRecord> l = TestHelper.getSampleData();\r\n\t\tfor(TrafficRecord tr: l){\r\n\t\t\tput(tr);\r\n\t\t}\r\n\t\t \r\n\t}", "@Override\n public void preSourceTasks () throws SQLException {\n chunkSize = 0L;\n\n // Only calculate the chunk size when parallel execution is active\n if (this.options.getJobs() != 1) {\n // Calculating the chunk size for parallel job processing\n Statement statement = this.getConnection().createStatement();\n String sql = \"SELECT \" + \" CEIL(count(*) / \" + options.getJobs() + \") chunk_size\" + \", count(*) total_rows\" + \" FROM \";\n\n // Source Query\n if (options.getSourceQuery() != null && !options.getSourceQuery().isEmpty()) {\n sql = sql + \"( \" + this.options.getSourceQuery() + \" ) as REPLICADB_TABLE\";\n\n } else {\n\n sql = sql + this.options.getSourceTable();\n // Source Where\n if (options.getSourceWhere() != null && !options.getSourceWhere().isEmpty()) {\n sql = sql + \" WHERE \" + options.getSourceWhere();\n }\n }\n\n LOG.debug(\"Calculating the chunks size with this sql: {}\", sql);\n ResultSet rs = statement.executeQuery(sql);\n rs.next();\n chunkSize = rs.getLong(1);\n long totalNumberRows = rs.getLong(2);\n LOG.debug(\"chunkSize: {} totalNumberRows: {}\", chunkSize, totalNumberRows);\n\n statement.close();\n this.getConnection().commit();\n }\n }" ]
[ "0.5396048", "0.53731793", "0.52176386", "0.51905084", "0.51898664", "0.51669765", "0.51426643", "0.5121085", "0.50517106", "0.49271423", "0.49063796", "0.48908046", "0.48890245", "0.48841682", "0.48661295", "0.4846961", "0.48333722", "0.48282427", "0.48073897", "0.4799244", "0.47968143", "0.47908917", "0.4788579", "0.4771536", "0.474261", "0.4734707", "0.47219098", "0.47139102", "0.46889856", "0.46521738", "0.4649438", "0.46464342", "0.46403772", "0.46317902", "0.46229517", "0.46226948", "0.46164143", "0.46141407", "0.4611718", "0.4605513", "0.45944825", "0.4577544", "0.45716295", "0.45657656", "0.45601964", "0.45583797", "0.45447975", "0.45419586", "0.4530874", "0.45239896", "0.45145357", "0.45090798", "0.4504406", "0.4504002", "0.44993863", "0.44972423", "0.44964927", "0.4493947", "0.44917586", "0.44907025", "0.4489075", "0.447542", "0.44705248", "0.44681957", "0.4462964", "0.44624674", "0.44611153", "0.4460388", "0.4457454", "0.445262", "0.4452316", "0.44506934", "0.44489145", "0.4448327", "0.4437515", "0.44302958", "0.44263864", "0.44221446", "0.44214162", "0.44186196", "0.44173974", "0.4415439", "0.44129294", "0.44122085", "0.44112226", "0.44070557", "0.44042048", "0.44024226", "0.4400913", "0.4400637", "0.43983778", "0.43953797", "0.43947047", "0.43917802", "0.43895134", "0.43890214", "0.43864468", "0.43856534", "0.43850654", "0.43810156" ]
0.4796865
20
total object count matches
void validateMappingResults(TestStorage targetStorage) { Set<SyncObject> targetObjects = getAllObjects(targetStorage, null); Assertions.assertEquals(pathMap.size(), targetObjects.size()); // target storage contains only target paths Set<String> targetPaths = targetObjects.stream().map(SyncObject::getRelativePath).collect(Collectors.toSet()); Assertions.assertEquals(new HashSet<>(pathMap.values()), targetPaths); // check mapping and original path in metadata for (SyncObject object : targetObjects) { String originalPath = object.getMetadata().getUserMetadataValue(PathMappingConfig.META_PREVIOUS_NAME); Assertions.assertNotNull("original path not set in metadata", originalPath); Assertions.assertEquals(pathMap.get(originalPath), object.getRelativePath()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object getNumberMatched();", "public int numMatches();", "public int getObjectCount() {\n\t\treturn objects.size(); // Replace with your code\n\t}", "public int getNumOfMatchedBets();", "public int count(T instance, M matchCondition);", "public Double getTotalMatched(){\n return totalMatched;\n }", "public void count() {\n\t\talgae = -1;\n\t\tcrab = -1;\n\t\tbigFish = -1;\n\t\tfor(GameObjects o: objects) {\n\t\t\tswitch(o.toString()) {\n\t\t\tcase \"algae\":\n\t\t\t\talgae +=1;\n\t\t\t\tbreak;\n\t\t\tcase \"crab\":\n\t\t\t\tcrab +=1;\n\t\t\t\tbreak;\n\t\t\tcase \"big fish\":\n\t\t\t\tbigFish +=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "int getObjectAnnotationsCount();", "int getObjectAnnotationsCount();", "public int numMatches() {\n int count = 0;\n for (WordPair pair : allPairs) {\n if (pair.getFirst() == pair.getSecond())\n count++;\n }\n return count;\n }", "int getResultsCount();", "int getResultsCount();", "public void setMatches() {\r\n this.matches++;\r\n\r\n }", "int findAllCount() ;", "public void addMatch() {\n totalMatches ++;\n }", "int countAssociations();", "public static int numberObjects()\r\n\t{\r\n\t\treturn(no_of_obj);\r\n\t}", "@Override\n public long count() {\n return super.doCountAll();\n }", "@Override\n public long count() {\n return super.doCountAll();\n }", "@Override\n public long count() {\n return super.doCountAll();\n }", "int findCount();", "protected long getObjectCount() {\r\n return objectCount;\r\n }", "private int countMatchingPerson(final ExpressionJpa expression) {\n\n int matchCount = 0;\n\n for (MarcDataField field700 : this.marcRecord.getDataFields(\"700\")) {\n for (String relatorSubfield : field700.getValueList('4')) {\n if (\"prf\".equals(relatorSubfield)\n || \"cnd\".equals(relatorSubfield)) {\n final String persAuthIdent =\n PersonMapper.getAuthIdent(field700);\n // now have a personIdent from the MarcRecord\n // is there a matching persisted personIdent\n // under the expression.realizedBy relationship\n for (ExpressionToResponsibleParty realizedBy :\n expression.getHasRealizers()) {\n // this should be a PersonJpa, but ...\n // TODO better way to screen ResponsiblePartyJpa subclasses?\n try {\n final PersonJpa responPers =\n (PersonJpa) realizedBy.\n getTargetResponsibleParty();\n if (persAuthIdent.equals(responPers.getAuthIdent())) {\n matchCount++;\n }\n } catch (ClassCastException notPerson) {\n // not a PersonJpa\n }\n }\n }\n }\n }\n\n return matchCount;\n }", "int getGrammarMatchCount();", "public int getCount() {\n return objects.size();\n }", "@Override\r\n public Integer countingDuplicates(String match) {\r\n if(duplicates == null) { // if it's not already located\r\n duplicates = new HashMap<>();\r\n for (Core str : pondred) {\r\n for (String term:str.abstractTerm){\r\n if (duplicates.containsKey(term) )\r\n duplicates.put(term, duplicates.get(term) + 1);\r\n else {\r\n duplicates.put(term, 1);\r\n }\r\n }\r\n }\r\n }\r\n return duplicates.get(match);\r\n }", "@Override\n\tpublic int selectCount(Object ob) {\n\n\t\tint res = session.selectOne(\"play.all_count\", ob);\n\n\t\treturn res;\n\t}", "public void can_counter()\n {\n candidate_count=0;\n for (HashMap.Entry<String,Candidate> set : allCandidates.entrySet())\n {\n candidate_count++;\n }\n }", "public int selectCount(Object[] obj) {\n\t\treturn 0;\n\t}", "public static int count(final IdentifiedObject object) {\n int c = 0;\n final NameIterator it = new NameIterator(object);\n while (it.hasNext()) {\n it.next();\n c++;\n }\n return c;\n }", "@Override\n\tpublic int getAvailableCount(Object obj){\n\t\tString name= (String) obj;\n\t\tint counter = 0;\n\t\tsql=\"select count(*) from news_sort where sort_name like ? \";\n\t\tDBUtil db = new DBUtil(sql);\n\t\ttry {\n\t\t\tdb.ps.setString(1, \"%\"+name+\"%\");\n\t\t\trs=db.ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tcounter = rs.getInt(1);\n\t\t\t}\n\t\t\treturn counter;\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}db.close();\n\t\t}\n\t\treturn 0;\n\t\t\n\t\t\n\t}", "@Override\n public long count();", "public long numSimilarities();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countResults() \n {\n return itsResults_size;\n }", "public int getMatches() {\n\t\treturn matches;\n\t}", "private int countMatchingCorpBody(final ExpressionJpa expression) {\n\n int matchCount = 0;\n\n for (MarcDataField field710 : this.marcRecord.getDataFields(\"710\")) {\n for (String relatorSubfield : field710.getValueList('4')) {\n if (\"prf\".equals(relatorSubfield)) {\n final String corpAuthIdent =\n CorporateBodyMapper.getAuthIdent(field710);\n // have a corpIdent from the MarcRecord\n // is there a matching persisted corpIdent\n // under the expression.realizedBy relationship\n for (ExpressionToResponsibleParty realizedBy :\n expression.getHasRealizers()) {\n // just want the CorporateBodyJpa ones\n // TODO a better way to screen ResponsiblePartyJpa subclasses?\n try {\n final CorporateBodyJpa corpPers =\n (CorporateBodyJpa) realizedBy.\n getTargetResponsibleParty();\n if (corpAuthIdent.equals(corpPers.getAuthIdent())) {\n matchCount++;\n }\n } catch (ClassCastException notCorpBody) {\n // not a CorporateBodyJpa\n }\n }\n }\n }\n }\n\n return matchCount;\n }", "Long getAllCount();", "public static void main(String[] args) {\n int objectCount;\n //Now let create 4 instances of the countable class\n\n Countable obj1 = new Countable();\n Countable obj2 = new Countable();\n Countable obj3 = new Countable();\n Countable obj4 = new Countable();\n\n //Get the number of instances from\n //the class's static field\n\n objectCount = obj1.getInstanceCount(); //Here is the note it does not matter which obj1 or obj2 or obj3 or\n //obj4 assign objectCount. Result will be same\n System.out.println(objectCount + \" instances of the class were created.\");\n\n\n }", "public int numberOfOccorrence();", "public int getNumObjects(){\n return numObjects;\n }", "@Override\r\n\tpublic int getTotal() {\n\t\treturn mapper.count();\r\n\t}", "long countAll();", "long countAll();", "long count(Collection<? extends Object> values);", "public long countAll();", "private int searchCountByName(Object name) {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int searchCount(String text) {\n\t\treturn productRawDao.searchCount(text);\r\n\t}", "@Override\r\n\tpublic int selectObjectCount() {\n\t\treturn complainMapper.selectComplainCount();\r\n\t}", "public int count();", "public int count();", "public int count();", "public int count();", "public Integer countAll();", "public int findTotalVariants() throws DAOException;", "@Override\r\n\tpublic int searchInCount(String text) {\n\t\treturn productRaw_InDao.searchCount(text);\r\n\t}", "long getObjectSize(Object instance);", "public long count() ;", "@java.lang.Override\n public int getResultsCount() {\n return results_.size();\n }", "public int numOccurences(Object object){\n\t\t\n\t\tint occur = 0;\n\t\tQueue queue = new Queue();\n\t\tqueue.enqueue(this);\n\t\t\n\t\twhile(!queue.isEmpty()){\n\t\t\tBinaryTree tree = (BinaryTree) queue.dequeue();\n\t\t\t\n\t\t\tif((object).equals(tree.getElement())){\n\t\t\t\toccur++;\n\t\t\t}\n\t\t\t\n\t\t\tif(!tree.leftTree().isEmpty())\n\t\t\t\tqueue.enqueue(tree.left);\n\t\t\tif(!tree.rightTree().isEmpty())\n\t\t\t\tqueue.enqueue(tree.rightTree());\n\t\t}\n\t\t\n\t\treturn occur;\n\t}", "Long count();", "Long count();", "Long count();", "Long count();", "Long count();", "public int getWrapperHits();", "int getTotalCount();", "@Override\npublic long count() {\n\treturn super.count();\n}", "int getNumberOfResults();", "int countObjectFlowStates();", "boolean hasCount();", "Integer countAll();", "@java.lang.Override\n public int getResultsCount() {\n return results_.size();\n }", "public void setTotalMatched(Double totalMatched){\n this.totalMatched = totalMatched;\n }", "public abstract long count();", "@Override\n\tpublic int findCounts(DetachedCriteria detachedCriteria) {\n\t\treturn scoreDao.findCounts(detachedCriteria);\n\t}", "public long numCandidates();", "int countByExample(CfgSearchRecommendExample example);", "public abstract int count();", "public abstract int count();", "@Override\n\tpublic int selectCount(Object ob) {\n\t\t\n\t\tint res = session.selectOne(\"party.party_list_total_count\",ob);\n\t\t\n\t\treturn res;\n\t}", "long count(Specification<E> spec);", "int countByExample(MVoucherDTOCriteria example);", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_APPROVATORE);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "int countByExample(BasicinfoCriteria example);", "public int findTotalPapersWithVariants() throws DAOException;", "public void testCount()\n\t{\n\t\tinfo.append(a1);\n\t\tinfo.append(a2);\n\t\tinfo.append(a3);\n\t\tassertEquals(3,info.getSynonymsCount());\n\t}", "public int searchRowsCount(SearchCriteria cri);", "public void rankMatches();", "long getRecipesCount();", "int getMatchedElements();" ]
[ "0.7471589", "0.7134092", "0.6871442", "0.6852208", "0.6823397", "0.68167794", "0.65674114", "0.65003055", "0.65003055", "0.6476863", "0.6474391", "0.6474391", "0.6449797", "0.63930625", "0.6378294", "0.63605887", "0.6353358", "0.63024914", "0.63024914", "0.63024914", "0.6278606", "0.62735003", "0.62443644", "0.6242013", "0.61876863", "0.61791754", "0.61727834", "0.61608195", "0.6156913", "0.61435467", "0.61373866", "0.6126516", "0.6100499", "0.60741425", "0.60741425", "0.60741425", "0.60741425", "0.60741425", "0.60741425", "0.60741425", "0.60741425", "0.60741425", "0.60741425", "0.60741425", "0.6065007", "0.606186", "0.6059902", "0.6046424", "0.60460466", "0.60381716", "0.603181", "0.6030868", "0.6029406", "0.6029406", "0.60105145", "0.6005449", "0.6004604", "0.60031474", "0.59986985", "0.59826523", "0.59826523", "0.59826523", "0.59826523", "0.5977292", "0.5971569", "0.5950654", "0.5950275", "0.5949507", "0.5948806", "0.59437406", "0.5941814", "0.5941814", "0.5941814", "0.5941814", "0.5941814", "0.59312826", "0.5930411", "0.5930397", "0.5915878", "0.5915062", "0.5913552", "0.59081966", "0.5895672", "0.5895306", "0.5883601", "0.5880528", "0.5870639", "0.586987", "0.58582956", "0.58582956", "0.5857526", "0.5854972", "0.5850723", "0.58486366", "0.5848577", "0.58427066", "0.5840314", "0.5836384", "0.58349687", "0.5833786", "0.5833457" ]
0.0
-1
switch the screen to add sales form
@FXML void add_btn_clicked(MouseEvent event) { switchScenes("/client/boundry/MarketingAgentSalesAddForm.fxml", "/client/boundry/MarketingAgentMainCustomer.css"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void salesScreen()\n {\n onSales = true;\n salesItem = new SalesItem[50];\n Button timbitAdd = new Button(24, \"button-blue.png\", \"button-green.png\", \"Add timbit:\");\n Button doughnutAdd = new Button(24, \"button-blue.png\", \"button-green.png\", \"Add doughnut:\");\n Button coffeeAdd = new Button(24, \"button-blue.png\", \"button-green.png\", \"Add coffee:\");\n \n addObject(timbitAdd, 400, 100);\n addObject(doughnutAdd, 400, 200);\n addObject(coffeeAdd, 400, 300);\n }", "public void startScreen()\n {\n onSales = false;\n \n numItemsAdded = 0; \n Menu guiMenu = new Menu(\"File\", \"NewSale\\nClose\\nExit\", 24, Color.BLACK, Color.WHITE, Color.BLACK,Color.WHITE, new FileCommands());\n clearScreen();\n addObject(guiMenu, 200, 50);\n }", "public void saleAct() {\t\r\n\t\t\r\n\t\tif(createWine() != null) {\r\n\t\t\t\r\n\t\t\ttext_amount =String.valueOf( cus.saleTransaction(createWine()));\r\n\t\t\twine_name.setText(name.getText());\r\n\t\t\tamount.setText(\" £ \" + text_amount + \" \" );\r\n\t\t\tbalance.setText(\" £ \" + isCredit((double)cus.getAccount() / 100.00) + \" \");\r\n\t\t\t\r\n\t\t\t//reset all textfield\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void addItemScreen() {\n \tIntent intent = new Intent(this, ItemEditor.class);\n \tstartActivity(intent);\n }", "@FXML\n void OnActionShowAddCustomerScreen(ActionEvent event) throws IOException {\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(getClass().getResource(\"/View/AddCustomer.fxml\"));\n stage.setTitle(\"Add Customer\");\n stage.setScene(new Scene(scene));\n stage.show();\n }", "@FXML\n\tprivate void handleAdd() {\n\t\tshowCustomerInfoDialog(null);\t\n\t}", "public void startNewSale() {\n sale = new Sale(cashRegister);\n }", "@FXML\r\n\tvoid open_btn_clicked(MouseEvent event) {\r\n\t\tsale_selected = sales_table.getSelectionModel().getSelectedItem();\r\n\t\tif (sale_selected != null) {\r\n\t\t\tswitchScenes(\"/client/boundry/MarketingAgentSaleShowForm.fxml\",\r\n\t\t\t\t\t\"/client/boundry/MarketingAgentMainCustomer.css\");\r\n\t\t} else {\r\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\r\n\t\t\talert.setTitle(\"No sale pattern selected\");\r\n\t\t\talert.setHeaderText(null);\r\n\t\t\talert.setContentText(\"Please select sale pattern\");\r\n\t\t\talert.show();\r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "private void addAppointmentButtonAction (ActionEvent event) {\r\n\t\t\tif (customersTable.getItems().isEmpty()) {\r\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\r\n\t\t\t\talert.setHeaderText(\"No customer selected\");\r\n\t\t\t\talert.setContentText(\"You must select a customer to schedule an appointment\");\r\n\t\t\t\talert.showAndWait();\r\n\t\t\t} else {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tselectedItem = customersTable.getSelectionModel().getSelectedItem();\r\n\t\t\t\t\t//Go to add appointment screen\r\n\t\t\t\t\tParent root;\r\n\t\t\t\t\tStage stage = (Stage) appointmentsButton.getScene().getWindow();\r\n\t\t\t\t\troot = FXMLLoader.load(getClass().getResource(\"/views/AddAppointmentScreen.fxml\"));\r\n\t\t\t\t\tScene scene = new Scene(root);\r\n\t\t\t\t\tstage.setScene(scene);\r\n\t\t\t\t\tstage.show();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tdropdown.clear();\r\n\t\t\tRootPanel.get(\"details\").clear();\r\n\t\t\tSpielplanErstellenForm erstellen = new SpielplanErstellenForm();\r\n\r\n\t\t\tRootPanel.get(\"details\").add(erstellen);\r\n\t\t}", "public void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tnew AddComplaintsShop().setVisible(true);\n\t\t\t}", "@FXML\r\n public void onActionToAddProductScreen(ActionEvent actionEvent) throws IOException {\r\n Parent root = FXMLLoader.load(getClass().getResource(\"/View_Controller/addProduct.fxml\"));\r\n Stage stage = (Stage) ((Button) actionEvent.getSource()).getScene().getWindow();\r\n Scene scene = new Scene(root, 980, 560);\r\n stage.setTitle(\"Add Product\");\r\n stage.setScene(scene);\r\n stage.show();\r\n }", "public void handleAddProducts()\n {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/UI/Views/product.fxml\"));\n Parent root = null;\n try {\n root = (Parent) fxmlLoader.load();\n\n // Get controller and configure controller settings\n ProductController productController = fxmlLoader.getController();\n productController.setModifyProducts(false);\n productController.setInventory(inventory);\n productController.setHomeController(this);\n productController.updateParts();\n\n // Spin up product form\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.initStyle(StageStyle.DECORATED);\n stage.setTitle(\"Add Products\");\n stage.setScene(new Scene(root));\n stage.show();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tif (((Cashier) comboBox.getSelectedItem()).getPassword().equals(pwdField.getText()))\n\t\t\t\t{\n\t\t\t\t\t//make a new session with the selected cashier and register\n\t\t\t\t\tCashDrawer tempCashDrawer = new CashDrawer(textField.getText());\n\t\t\t\t\t((Register) comboBox_1.getSelectedItem()).setCashDrawer(tempCashDrawer);\n\t\t\t\t\tSession session = new Session((Cashier) comboBox.getSelectedItem(), (Register) comboBox_1.getSelectedItem());\n\t\t\t\t\tframe.getContentPane().removeAll();\n\t\t\t\t\tframe.getContentPane().add(new SaleEntry(store, frame, session));\n\t\t\t\t\tframe.getContentPane().revalidate();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//show an error message\n\t\t\t\t\tlblErrorSpecifiedCashier.setVisible(true);\n\t\t\t\t}\n\t\t\t}", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n\t \t\n\t \tboolean custCreated = createCustomer();\n\t \t\n\t \t\t\n\t \tif(custCreated){\n\t \t\tdispose();\n\t \t\thome home = new home(cust);\n\t \t\thome.setLocationRelativeTo(null);\n\t \t\thome.setVisible(true);\n\t \t}\n\t \t\n\t \t\n\t }", "public static void addNewServices() {\n displayAddNewServicesMenu();\n processAddnewServicesMenu();\n }", "protected void addStock(ActionEvent ae) {\n\t\tStockFrm sca=new StockFrm(); \n\t\tsca.setVisible(true);\n\t\tdesktopPane.add(sca);\n\t}", "@Override\n\t\tpublic void postShow() {\n\t\t\tif (bmoRequisition.getSupplierId().toInteger() > 0)\n\t\t\t\tsetFormatEmailTo(bmoRequisition.getBmoSupplier().getEmail().toString(), bmoRequisition.getBmoSupplier().getName().toString());\n\n\t\t\tif (!newRecord)\n\t\t\t\tbuttonPanel.add(lifeCycleShowButton);\n\t\t\t// Mostrar boton cuando NO tenga un recibo(en parcial/total) y tenga un pagos de anticipo\n\t\t\tif (enableCheekingCostTravelExpense(false))\n\t\t\t\tbuttonPanel.add(verifyTravelExpenseShowButton);\n\t\t\telse {\n\t\t\t\tbuttonPanel.add(copyRequisitionDialogButton);\n\t\t\t}\n\n\t\t\tgetBmoOrderType(((BmoFlexConfig)getSFParams().getBmoAppConfig()).getDefaultOrderTypeId().toInteger());\t\n\t\t}", "@FXML\r\n void onActionAddCustomer(ActionEvent event) throws IOException {\r\n\r\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\r\n scene = FXMLLoader.load(getClass().getResource(\"/view/AddCustomer.fxml\"));\r\n stage.setScene(new Scene(scene));\r\n stage.show();\r\n\r\n\r\n }", "@FXML\n void onActionAddCustomer(ActionEvent event) throws IOException {\n stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(Objects.requireNonNull(getClass().getResource(\"/Views/AddCustomer.fxml\")));\n stage.setScene(new Scene(scene));\n stage.show();\n }", "public void setSales( String showInputDialog )\n\t{\n\n\t}", "public void startSale() {\r\n System.out.println(\"[CashRegister] startSale\");\r\n System.out.println(\"\");\r\n\r\n //receipt = new Receipt(customerId); \r\n receipt = new Receipt(\"100\");\r\n\r\n //addItemToSale(productId, quantity);\r\n addItemToSale(\"A101\", 10);\r\n\r\n addItemToSale(\"B205\", 6);\r\n\r\n addItemToSale(\"C222\", 12);\r\n\r\n }", "protected void addButtonActionPerformed() {\n\t\tFoodTruckManagementSystem ftms = FoodTruckManagementSystem.getInstance();\n\t\t// Initialize controller\n\t\tMenuController mc = new MenuControllerAdapter();\n\t\t\n\t\t// Get selected supply type\n\t\tSupplyType supply = null;\n\t\ttry {\n\t\t\tsupply = ftms.getSupplyType(selectedSupply);\n\t\t} catch (NullPointerException | IndexOutOfBoundsException e) {\n\t\t}\n\t\t\n\t\t// Get given quantity\n\t\tdouble qty = -1;\n\t\ttry {\n\t\t\tqty = Double.parseDouble(qtyTextField.getText());\n\t\t} catch (NumberFormatException | NullPointerException e) {\n\t\t}\n\t\t\n\t\t// Add supply to item\n\t\ttry {\n\t\t\tmc.addIngredientToItem(item, supply, qty);\n\t\t} catch (InvalidInputException | DuplicateTypeException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\t\t\n\t\trefreshData();\n\t\t\n\t}", "public void onAddByWebSitePressed( ) {\n Router.Instance().changeView(Router.Views.AddFromWebSite);\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\n\t\t\tString name=\"\";\n\t\t\tname=view.getNameTF().getText();\n\t\t\tString price=\"\";\n\t\t\tprice=view.getPriceTF().getText();\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif(name.equals(\"\") ||price.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tthrow new BadInput(\"Nu au fost completate toate casutele pentru a se putea realiza CREATE!\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble p=Double.parseDouble(price);\n\t\t\t\t\n\t\t\t\tMenuItem nou=new BaseProduct(name,p);\n\t\t\t\t\n\t\t\t\trestaurant.createMenuItem(nou);\n\t\t\t\tview.updateList(name);\n\t\t\t\t\n\t\t\t}catch(NumberFormatException ex)\n\t\t\t{\n\t\t\t\tview.showError(\"Nu s-a introdus o valoare valida pentru pret!\");\n\t\t\t}\n\t\t\tcatch(BadInput ex)\n\t\t\t{\n\t\t\t\tview.showError(ex.getMessage());\n\t\t\t}\n\t\t\tcatch(AssertionError er)\n\t\t\t{\n\t\t\t\tview.showError(\"Nu se poate adauga produsul deoarece acesta EXISTA deja!!!\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tRootPanel.get(\"details\").clear();\r\n\t\t\tuf = new UserForm(AktuellerAnwender.getAnwender());\r\n\t\t\tRootPanel.get(\"details\").add(uf);\r\n\t\t}", "@FXML\n void addNewCustomer(ActionEvent event) throws IOException {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"/view/AddCustomer.fxml\"));\n loader.load();\n\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n Parent scene = loader.getRoot();\n stage.setScene(new Scene(scene));\n stage.show();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tStudentManagement studentManagement =new StudentManagement();\n\t\t\t studentManagement.setModal(true);\n\t\t\t studentManagement.setVisible(true);\n\t\t\t}", "@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tRootPanel.get(\"details\").clear();\r\n\t\t\thome = new AdminDashboardForm();\r\n\t\t\tRootPanel.get(\"details\").add(home);\r\n\t\t}", "public void startSale() {\n sale = new Sale();\n }", "@Override\n public void buttonClick(ClickEvent event) {\n \n \ttry {\n\t\t\t\t\tUI.getCurrent().getNavigator().addView(_nombreSeccion + \"Adm/\" + _titulo.getCaption(), new AdministradorClase(new Lista_Mensaje_V_Administrador(it.getIdTema())));\n\t\t\t\t} catch (PersistentException 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\tUI.getCurrent().getNavigator().navigateTo(_nombreSeccion+ \"Adm/\" + _titulo.getCaption());\n \t\n \t\n }", "@FXML\n\tpublic void addInvestor() {\n\t\tString iName = name.getText();\n\t\tString iSurname = surname.getText();\n\t\tString iPesel = pesel.getText();\n\t\tString iBudget = budget.getText();\n\t\tif (iName.isEmpty()) {\n\t\t\tshowErrorDialog(\"Provide valid name\");\n\t\t} else if (iSurname.isEmpty()) {\n\t\t\tshowErrorDialog(\"Provide valid surname\");\n\t\t} else if (!NumberUtils.isPESEL(iPesel)) {\n\t\t\tshowErrorDialog(\"Given PESEL is not valid\");\n\t\t} else if (!NumberUtils.isNumeric(iBudget)) {\n\t\t\tshowErrorDialog(\"Given budget is not valid\");\n\t\t} else {\n\t\t\tInvestor investor = new Investor(iName, iSurname, iPesel, iBudget);\n\t\t\tPseudoDB.addNewInwestor(investor);\n\t\t\tPseudoDB.showAllInvestors();\n\t\t\tStage stage = (Stage) closePopUpIco.getScene().getWindow();\n\t\t\tBlurUtils.unblur();\n\t\t\tstage.close();\n\t\t}\n\n\t}", "public void actionPerformed(ActionEvent e){\n\t\t\topenAdd();\n\t\t}", "public void onAddButtonClick(View view) {\n\n if (view.getId() == R.id.Badd) {\n\n EditText a = (EditText) findViewById(R.id.TFenterName);\n\n String b = a.getText().toString();\n product.setProductName(b);\n\n a = (EditText) findViewById(R.id.TFenterPrice);\n b = a.getText().toString();\n product.setPrice(b);\n\n a = (EditText) findViewById(R.id.TFenterQuantity);\n b = a.getText().toString();\n product.setQuantity(b);\n\n a = (EditText) findViewById(R.id.TFLocation);\n b = a.getText().toString();\n product.setLocation(b);\n\n a = (EditText) findViewById(R.id.TFExpiration);\n b = a.getText().toString();\n product.setExpiration(b);\n\n helper.insertProduct(product);\n\n Intent i = new Intent(AddProduct.this, WasAdded.class);\n i.putExtra(\"product\", product.getProductName());\n startActivity(i);\n\n }\n }", "public void actionPerformed(ActionEvent e) {\n \t\t\t\tscreen.setScene(new CreateAccount(screen));\n \t\t\t}", "@FXML\n public void goToShop(ActionEvent event) {\n this.myController.setScreen(MainView.shop);\n }", "@Override\n public void onClick(View view) {\n\n Intent intent_addProduct = new Intent(this, AddToolActivity.class);\n startActivity(intent_addProduct);\n }", "public SalesView() {\n initComponents();\n salesDetailTable.setAutoCreateColumnsFromModel(false);\n jdcTransaksi.setDate(new Date());\n enableForm(false);\n buttonConfig();\n salesDetailTable.getTableHeader().setFont(new Font(\"Segoe UI\", 0, 18)); \n }", "public void HardwareDeviceRental()\n {\n Rentlbl=new JLabel(\"Renting System\");\n Rentlbl.setBounds(450,180,100,25);\n content.add(Rentlbl);\n \n rentDescriptionlbl=new JLabel(\"Description\");\n rentDescriptionlbl.setBounds(20,20,100,25);\n content.add(rentDescriptionlbl);\n \n rentDescriptiontxt=new JTextField();\n rentDescriptiontxt.setBounds(105,20,320,25);\n content.add(rentDescriptiontxt);\n \n \n \n rentManufacturerlbl=new JLabel(\"Manufacturer\");\n rentManufacturerlbl.setBounds(20,55,100,25);\n content.add(rentManufacturerlbl);\n \n rentManufacturertxt=new JTextField();\n rentManufacturertxt.setBounds(105,55,320,25);\n content.add(rentManufacturertxt);\n \n \n \n dailyRatelbl=new JLabel(\"Daily Rate\");\n dailyRatelbl.setBounds(20,90,100,25);\n content.add(dailyRatelbl);\n \n dailyRatetxt=new JTextField();\n dailyRatetxt.setBounds(105,90,105,25);\n content.add(dailyRatetxt);\n \n downPaymentlbl=new JLabel(\"Down Payment\");\n downPaymentlbl.setBounds(220,90,105,25);\n content.add(downPaymentlbl);\n \n downPaymenttxt=new JTextField();\n downPaymenttxt.setBounds(330,90,105,25);\n content.add(downPaymenttxt);\n \n btnAddRent=new JButton(\"Add to Rent\");\n btnAddRent.setBounds(320,125,105,25);\n content.add(btnAddRent);\n btnAddRent.addActionListener(this);\n \n rentCustomerlbl=new JLabel(\"Customer\");\n rentCustomerlbl.setBounds(20,185,100,25);\n content.add(rentCustomerlbl);\n \n rentCustomertxt=new JTextField();\n rentCustomertxt.setBounds(105,185,320,25);\n content.add(rentCustomertxt);\n \n hireDatelbl=new JLabel(\"Hire Date\");\n hireDatelbl.setBounds(20,220,100,25);\n content.add(hireDatelbl);\n \n hireDatetxt=new JTextField();\n hireDatetxt.setBounds(105,220,105,25);\n content.add(hireDatetxt);\n \n returnDatelbl=new JLabel(\"Return Date\");\n returnDatelbl.setBounds(220,220,100,25);\n content.add(returnDatelbl);\n \n returnDatetxt=new JTextField();\n returnDatetxt.setBounds(320,220,105,25);\n content.add(returnDatetxt);\n \n noOfDayslbl=new JLabel(\"No. of Days\");\n noOfDayslbl.setBounds(20,255,100,25);\n content.add(noOfDayslbl);\n \n noOfDaystxt=new JTextField();\n noOfDaystxt.setBounds(105,255,105,25);\n content.add(noOfDaystxt);\n \n rentEquipmentNumlbl=new JLabel(\"Equip. No\");\n rentEquipmentNumlbl.setBounds(220,255,100,25);\n content.add(rentEquipmentNumlbl);\n \n rentEquipmentNumtxt=new JTextField();\n rentEquipmentNumtxt.setBounds(320,255,105,25);\n content.add(rentEquipmentNumtxt);\n \n btnReturnGen=new JButton(\"Return\");\n btnReturnGen.setBounds(320,290,105,25);\n content.add(btnReturnGen);\n btnReturnGen.addActionListener(this);\n \n btnRent=new JButton(\"Rent\");\n btnRent.setBounds(20,325,105,25);\n content.add(btnRent);\n btnRent.addActionListener(this);\n \n btnRentClear=new JButton(\"Clear\");\n btnRentClear.setBounds(175,325,105,25);\n content.add(btnRentClear);\n btnRentClear.addActionListener(this);\n \n btnRentDisplay=new JButton(\"Display All\");\n btnRentDisplay.setBounds(320,325,105,25);\n content.add(btnRentDisplay);\n btnRentDisplay.addActionListener(this);\n \n Selllbl=new JLabel(\"Selling system\");\n Selllbl.setBounds(450,550,100,25);\n content.add(Selllbl);\n \n sellDescriptionlbl=new JLabel(\"Description\");\n sellDescriptionlbl.setBounds(20,400,100,25);\n content.add(sellDescriptionlbl);\n \n sellDescriptiontxt=new JTextField();\n sellDescriptiontxt.setBounds(105,400,320,25);\n content.add(sellDescriptiontxt);\n \n \n \n sellManufacturerlbl=new JLabel(\"Manufacturer\");\n sellManufacturerlbl.setBounds(20,435,100,25);\n content.add(sellManufacturerlbl);\n \n sellManufacturertxt=new JTextField();\n sellManufacturertxt.setBounds(105,435,320,25);\n content.add(sellManufacturertxt);\n \n pricelbl=new JLabel(\"Price\");\n pricelbl.setBounds(20,470,100,25);\n content.add(pricelbl);\n \n pricetxt=new JTextField();\n pricetxt.setBounds(105,470,105,25);\n content.add(pricetxt);\n \n taxlbl=new JLabel(\"Tax amount\");\n taxlbl.setBounds(220,470,100,25);\n content.add(taxlbl);\n \n taxtxt=new JTextField();\n taxtxt.setBounds(320,470,100,25);\n content.add(taxtxt);\n \n btn_Add_Sell=new JButton(\"Add to Sell\");\n btn_Add_Sell.setBounds(320,510,105,25);\n content.add(btn_Add_Sell);\n btn_Add_Sell.addActionListener(this);\n \n sellCustomerlbl=new JLabel(\"Customer\");\n sellCustomerlbl.setBounds(20,530,100,25);\n content.add(sellCustomerlbl);\n \n sellCustomertxt=new JTextField();\n sellCustomertxt.setBounds(105,550,320,25);\n content.add(sellCustomertxt);\n \n dateOfSelllbl=new JLabel(\"Date\");\n dateOfSelllbl.setBounds(20,605,100,25);\n content.add(dateOfSelllbl);\n \n dateOfSelltxt=new JTextField();\n dateOfSelltxt.setBounds(105,605,105,25);\n content.add(dateOfSelltxt);\n \n sellEquipmentNumlbl=new JLabel(\"Equip. No.\");\n sellEquipmentNumlbl.setBounds(20,640,100,25);\n content.add(sellEquipmentNumlbl);\n \n sellEquipmentNumtxt=new JTextField();\n sellEquipmentNumtxt.setBounds(105,640,105,25);\n content.add(sellEquipmentNumtxt);\n \n btn_Sell=new JButton(\"Sell\");\n btn_Sell.setBounds(20,675,105,25);\n content.add(btn_Sell);\n btn_Sell.addActionListener(this);\n \n btn_Sell_Clear=new JButton(\"Clear\");\n btn_Sell_Clear.setBounds(175,675,105,25);\n content.add(btn_Sell_Clear);\n btn_Sell_Clear.addActionListener(this);\n \n btn_Sell_Display=new JButton(\"Display All\");\n btn_Sell_Display.setBounds(320,675,105,25);\n content.add(btn_Sell_Display);\n btn_Sell_Display.addActionListener(this); \n }", "private static void viewItems() {\r\n\t\tdisplayShops();\r\n\t\tint shopNo = getValidUserInput(scanner, shops.length);\r\n\t\tdisplayItems(shopNo);\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Please enter the ID of the element to add to cart. \\\"0\\\" for exit\");\r\n\t\tSystem.out.println();\r\n\t\tint productNo = getValidUserInput(scanner, shops[shopNo].getAllSales().length + 1);\r\n\t\tif (productNo > 0) {\r\n\t\t\tProduct productToBeAdd = shops[shopNo].getAllSales()[productNo - 1];\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.print(\" Please enter the number of the item you would like to buy: \");\r\n\t\t\tint numberOfTheItems = getUserIntInput();\r\n\t\t\tcart.addProduct(productToBeAdd, numberOfTheItems);\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Purchase done, going back to the menu.\");\r\n\t\tSystem.out.println();\r\n\t}", "@FXML\r\n\tvoid customers_btn_clicked(MouseEvent event) {\r\n\t\tswitchScenes(\"/client/boundry/MarketingAgentMainCustomerForm.fxml\",\r\n\t\t\t\t\"/client/boundry/MarketingAgentMainCustomer.css\");\r\n\r\n\t}", "private void btnReturnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnReturnActionPerformed\n ViewProducts viewProducts = new ViewProducts(loggedInCustomer);\n this.dispose();\n viewProducts.setVisible(true);\n }", "private void ShowProductActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ShowProductActionPerformed\n alert.setText(\"\");\n if (displayMgr.mainMgr.orderMgr.getCart().isEmpty())\n RowItem.setText(\"Add items to the cart first\");\n else {\n displayMgr.POU.addRowToTable();\n displayMgr.showProductScreen();\n }\n }", "public void onClickAdd(View v) {\n Intent intent = new Intent(this, ItemFormActivity.class);\n startActivity(intent);\n }", "@FXML\n private void goToAddEvent(ActionEvent event){\n SceneManager.navigate(SceneName.ADDEVENT);\n }", "public SalesPanel() {\n initComponents();\n tblSalesDetail.setAutoCreateColumnsFromModel(false);\n jdcTransaction.setDate(new Date());\n enableForm(false);\n btnDelete.setEnabled(false);\n btnAdd.setEnabled(true);\n btnCancel.setEnabled(false);\n btnEdit.setEnabled(false);\n btnSave.setEnabled(false);\n }", "private void butTools_Click(Object sender, System.EventArgs e) throws Exception {\n FormFeeSchedTools FormF = new FormFeeSchedTools(FeeSchedC.getListShort()[listFeeSched.SelectedIndex].FeeSchedNum);\n FormF.ShowDialog();\n if (FormF.DialogResult == DialogResult.Cancel)\n {\n return ;\n }\n \n Fees.refreshCache();\n ProcedureCodes.refreshCache();\n changed = true;\n if (Programs.isEnabled(ProgramName.eClinicalWorks))\n {\n fillFeeSchedules();\n }\n \n //To show possible added fee schedule.\n fillGrid();\n SecurityLogs.MakeLogEntry(Permissions.Setup, 0, \"Fee Schedule Tools\");\n }", "public void add(ActionEvent e) {\r\n Customer newCustomer = new Customer();\r\n newCustomer.setContactfirstname(tempcontactfirstname);\r\n newCustomer.setContactlastname(tempcontactlastname);\r\n save(newCustomer);\r\n addRecord = !addRecord;\r\n }", "public void goToAddProductScene(ActionEvent event) throws IOException {\n Parent addProductParent = FXMLLoader.load(getClass().getResource(\"AddProduct.fxml\"));\n Scene addProductScene = new Scene(addProductParent);\n\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\n\n window.setScene(addProductScene);\n window.show();\n }", "public void showPage(){\n\t\tflexTable.setWidget(0, 0, lblNome);\n\t flexTable.setWidget(0, 1, nomePratoBox);\n\t flexTable.setWidget(0, 2, pesquisarButton);\n\t\t\n\t initWidget(flexTable);\n\t \n\t\tRootPanel formRootPanel = RootPanel.get(\"loginContainer\");\n\t\tformRootPanel.add(this);\n\t}", "public void addButtonClicked(View view) {\n\n Products product = new Products(johnsInput.getText().toString());\n\n dbHandler.addProduct(product);\n printDatabase();\n }", "private void adicionaMateria(){\n\n FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);\n fab.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n AlertDialog.Builder alertBuilder = new AlertDialog.Builder(MainActivity.this); // mostra um alert dialog\n View view2 = getLayoutInflater().inflate(R.layout.tela_adiciona_materia,null);\n final EditText nomeMateria = (EditText) view2.findViewById(R.id.nomeMateria);\n Button addMateria = (Button) view2.findViewById(R.id.button);\n\n alertBuilder.setView(view2);\n\n final AlertDialog dialog = alertBuilder.create();\n dialog.show();\n\n addMateria.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n if(!nomeMateria.getText().toString().isEmpty()){\n NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);\n menu = navigationView.getMenu();\n String materia = nomeMateria.getText().toString();\n subMenu.add(materia);\n adicionaSQL(materia);\n //.setOnMenuItemClickListener(clicaMenu(\"Disciplinas\"));\n Snackbar.make(view, \"Matéria adicionada com sucesso!\", Snackbar.LENGTH_LONG)\n .show();\n\n dialog.dismiss();\n\n\n } else{\n nomeMateria.setError(\"Adicione uma materia para inserir!\");\n Snackbar.make(view, \"Campo vazio!\", Snackbar.LENGTH_LONG)\n .show();\n }\n\n }\n });\n }\n });\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(HomeScreen.this, AddAdminScreen.class);\n\t\t\t startActivity(i);\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tString supName = supNameTextField.getText().trim();\n\t\t\t\tString supAddress = supAddressTextField.getText().trim();\n\t\t\t\tString supCity = supCityTextField.getText().trim();\n\t\t\t\tString supState = supStateTextField.getText().trim();\n\t\t\t\tint supZip = Integer.parseInt(supZipTextField.getText().trim());\n\t\t\t\tString supEmail = supEmailTextField.getText().trim();\n\t\t\t\tString supWebsite = supWebsiteTextField.getText().trim();\n\t\t\t\tString supPhone = supPhoneTextField.getText().trim();\n\t\t\t\t\n\t\t\t\t//check for required information\n\t\t\t\tif(supName.equals(\"\") || supAddress.equals(\"\") || supCity.equals(\"\") || \n\t\t\t\t\t\tsupState.equals(\"\") || supZipTextField.getText().equals(\"\")){\n\t\t\t\t\tsetWarningMsg(\"Please enter information in the *required boxes.\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSupplier temp = new Supplier(supName, supAddress, supCity, supState,\n\t\t\t\t\t\tsupZip, supEmail, supWebsite, supPhone);\n\t\t\t\t\n\t\t\t\t\t//checks for administrator approval\n\t\t\t\t\tAdminVerificationScreen adminveri = new AdminVerificationScreen(data);\n\t\t\t\t\tif (adminveri.verify)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"New Supplier added\");\n\t\t\t\t\t\t//adds supplier to database\n\t\t\t\t\t\ttemp.setID(callAddSupplierProcedure(connect, temp));\n\t\t\t\t\t\t//adds supplier to program\n\t\t\t\t\t\tsuppliers.addSupplier(temp);\n\t\t\t\t\t\tadded = true;\n\t\t\t\t\t\tlist.removeAllItems();\n\t\t\t\t\t\t//adds new supplier to comboBox list and selects it \n\t\t\t\t\t\tfor(int x = 0; x< suppliers.size(); x++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist.addItem(suppliers.getSupplier(x).getName());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlist.addItem(\"New Supplier\");\n\t\t\t\t\t\tlist.setSelectedIndex(suppliers.size()-1);\n\t\t\t\t\t\tlist.revalidate();\n\t\t\t\t\t\taddingSups.dispose();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tsetWarningMsg(\"Administrator not verified. No \"\n\t\t\t\t\t\t\t\t+ \"information was saved.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "public void addShop() {\n FacesContext context = FacesContext.getCurrentInstance();\n\n log.info(\"OrdersBean : AddShop\");\n\n int idAds = Integer.parseInt(getParam(\"adsId\"));\n\n if (idAds == 0) {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"fxs.addShopButton.addShopError\"), null));\n return;\n }\n\n adsBean.getAdsId(idAds);\n\n init();\n checkIfOrdersEntityIsNullAndCreateOrders();\n\n if (contractsBean.createContract()) {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, JsfUtils.returnMessage(getLocale(), \"fxs.addShopButton.addShopSuccess\"), null));\n } else {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"fxs.addShopButton.addShopError\"), null));\n }\n findOrderAndfindContracts();\n }", "public SalesSystemUI(SalesDomainController domainController) {\n this.domainController = domainController;\n this.model = new SalesSystemModel(domainController);\n \n // Create singleton instances of the tab classes\n historyTab = new HistoryTab(model);\n stockTab = new StockTab(model);\n purchaseTab = new PurchaseTab(domainController, model);\n \n setTitle(\"Sales system\");\n \n // set L&F to the nice Windows style\n try {\n UIManager.setLookAndFeel(new WindowsLookAndFeel());\n \n } catch (UnsupportedLookAndFeelException e1) {\n log.warn(e1.getMessage());\n }\n \n drawWidgets();\n \n // size & location\n int width = 600;\n int height = 400;\n setSize(width, height);\n Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();\n setLocation((screen.width - width) / 2, (screen.height - height) / 2);\n \n addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n System.exit(0);\n }\n });\n }", "public void startSale(){\n this.sale = new Sale();\n this.inventory = new Inventory();\n this.accounting = new Accounting();\n }", "public menuAddStasiun() {\n initComponents();\n }", "public AddCustomer() {\n initComponents();\n loadAllToTable();\n\n tblCustomers.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n\n @Override\n public void valueChanged(ListSelectionEvent e) {\n if (tblCustomers.getSelectedRow() == -1) {\n return;\n }\n\n String cusId = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 0).toString();\n\n String cusName = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 1).toString();\n String contact = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 2).toString();\n String creditLimi = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 3).toString();\n String credidays = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 4).toString();\n\n txtCustId.setText(cusId);\n txtCustomerN.setText(cusName);\n\n txtContact.setText(contact);\n txtCreditLimit.setText(creditLimi);\n txtCreditDays.setText(credidays);\n\n }\n });\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString title = textTitle.getText();\n\t\t\t\tString producer = txtProducer.getText();\n\t\t\t\tString price = txtPricePerBox.getText();\n\t\t\t\tString quantity = txtQuantityPerBox.getText();\n\t\t\t\t\n\t\t\t\tif(title.isEmpty()){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Title is empty\");\n\t\t\t\t\treturn;\t\n\t\t\t\t}\n\t\t\t\tif(producer.isEmpty()){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Producer is empty\");\n\t\t\t\t\treturn;\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(price.isEmpty()){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Price is empty\");\n\t\t\t\t\treturn;\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(quantity.isEmpty()){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Quntity is empty\");\n\t\t\t\t\treturn;\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Pharmacy p = new Pharmacy(0, title, address);\n\t\t\t\tMedicine m = new Medicine(0,title,producer,Double.parseDouble(price),Integer.parseInt(quantity));\n\t\t\t\tboolean res = MedicineDataContext.getInstance().addMedicine(m);\n\t\t\t\t\n\t\t\t\tif(res){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"S U C C\");\n\t\t\t\t\tNewMedicineWindow.this.setVisible(false);\n\t\t\t\t\tNewMedicineWindow.this.dispose();\n\t\t\t\t}\n\t\t\t}", "public Add_E() {\n initComponents();\n this.setTitle(\"Add Engineer\");\n }", "@FXML\n\tpublic void add(ActionEvent event) {\n\t\tBrand brand = new Brand();\n\t\tbrand.setLabel(nameTF.getText());\n\t\t\n\n\t\t\n\t\tBrandDelegate.addBrand(brand);\n\t\tJOptionPane.showMessageDialog(null, \"Ajout effectué avec succés\");\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tGlobalStatic data = (GlobalStatic) getApplication();\n\t\t\t\tdata.cliente=null;\n\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\t\n\t\t\t\tdata.factura = new Facturas(-1, new java.sql.Date(cal.getTimeInMillis()), null, false);\n\t\t\t\tdata.fromMenu=false;\n\t\t\t\t//Iniciamos el formulario de las facturas\n\t\t\t\tIntent intent = new Intent(DiarySelection.this,BillForm.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "private void onAddClicked() {\r\n\t\t\r\n\t\tString givenName = Window.showStudentDialog();\r\n\t\t\r\n\t\tif (givenName != null) {\r\n\t\t\t\r\n\t\t\tif(!chart.addStudentName(givenName)) {\r\n\t\t\t\tWindow.msg(\"There are no seats available.\");\r\n\t\t\t}\r\n\t\t\tupdate();\r\n\t\t}\r\n\t\t\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n salesTypeDialog = new javax.swing.JDialog();\n selectPurchaseButton = new javax.swing.JButton();\n selectServiceButton = new javax.swing.JButton();\n cancelButton = new javax.swing.JButton();\n receiptInfoLabel1 = new javax.swing.JLabel();\n receiptInfoLabel2 = new javax.swing.JLabel();\n receiptNumberInput = new javax.swing.JTextField();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jButton2 = new javax.swing.JButton();\n\n salesTypeDialog.setTitle(\"Choose Transaction Type\");\n salesTypeDialog.setBounds(new java.awt.Rectangle(0, 0, 500, 200));\n salesTypeDialog.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n salesTypeDialog.setModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL);\n salesTypeDialog.setLocationRelativeTo(null);\n\n selectPurchaseButton.setText(\"Purchase\");\n selectPurchaseButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n selectPurchaseButtonActionPerformed(evt);\n }\n });\n\n selectServiceButton.setText(\"Service\");\n selectServiceButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n selectServiceButtonActionPerformed(evt);\n }\n });\n\n cancelButton.setText(\"Cancel\");\n cancelButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cancelButtonActionPerformed(evt);\n }\n });\n\n receiptInfoLabel1.setText(\"The system has detected an item with warranty among the products in the cart.\");\n receiptInfoLabel1.setVisible(false);\n\n receiptInfoLabel2.setText(\"Please enter the Receipt Number:\");\n receiptInfoLabel2.setVisible(false);\n\n receiptNumberInput.setVisible(false);\n\n javax.swing.GroupLayout salesTypeDialogLayout = new javax.swing.GroupLayout(salesTypeDialog.getContentPane());\n salesTypeDialog.getContentPane().setLayout(salesTypeDialogLayout);\n salesTypeDialogLayout.setHorizontalGroup(\n salesTypeDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(salesTypeDialogLayout.createSequentialGroup()\n .addGap(56, 56, 56)\n .addComponent(selectPurchaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(selectServiceButton, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(57, 57, 57))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, salesTypeDialogLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cancelButton)\n .addContainerGap())\n .addGroup(salesTypeDialogLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(salesTypeDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(salesTypeDialogLayout.createSequentialGroup()\n .addComponent(receiptInfoLabel1)\n .addGap(0, 73, Short.MAX_VALUE))\n .addGroup(salesTypeDialogLayout.createSequentialGroup()\n .addComponent(receiptInfoLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(receiptNumberInput)))\n .addContainerGap())\n );\n salesTypeDialogLayout.setVerticalGroup(\n salesTypeDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, salesTypeDialogLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(receiptInfoLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(salesTypeDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(receiptInfoLabel2)\n .addComponent(receiptNumberInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(salesTypeDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(selectServiceButton, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(selectPurchaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cancelButton)\n .addContainerGap())\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setAlwaysOnTop(true);\n\n jPanel1.setBackground(new java.awt.Color(250, 238, 161));\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabel1.setText(\"Product List\");\n\n jButton2.setText(\"Clear List\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap(48, Short.MAX_VALUE)\n .addComponent(jButton2)\n .addGap(573, 573, 573))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(312, 312, 312)\n .addComponent(jLabel1)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 222, Short.MAX_VALUE)\n .addComponent(jButton2)\n .addContainerGap())\n );\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 .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "public void actionPerformed(ActionEvent e){\n\t\t\t\tArrayList<Transaction> transactions = new ArrayList<Transaction>(currentAccount.getTransactionList());\n\t\t\t\tTransactionUI t = new TransactionUI(transactions); //create an interface of the user's selected account transactions\n\t\t\t}", "public CreateNewScreening(MainWindow main_window) {\n this.main_window = main_window;\n initComponents();\n \n // Center align the login window\n this.setLocationRelativeTo(null);\n \n for(Film current_film : main_window.core_controller.film_controller.getFilms()){\n this.film_combo.addItem(current_film);\n }\n\n for(Screen current_screen : main_window.core_controller.screen_controller.getScreens()){\n this.screen_combo.addItem(current_screen);\n }\n\n\n GregorianCalendar today_date = new GregorianCalendar();\n\n System.out.println(today_date.get(Calendar.DAY_OF_MONTH));\n\n this.date_day.setSelectedItem(today_date.get(Calendar.DAY_OF_MONTH)+\"\");\n this.date_month.setSelectedItem((today_date.get(Calendar.MONTH)+1)+\"\");\n this.date_year.setSelectedItem(today_date.get(Calendar.YEAR)+\"\");\n }", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "public void addButtonClicked(){\n Products products = new Products(buckysInput.getText().toString());\n dbHandler.addProduct(products);\n printDatabase();\n }", "@Override\n\tpublic void buttonClick(ClickEvent event) {\n\t\tif (event.getButton()==view.getBtnAddForm()){\n\t\t\taddHeader();\n\t\t} else if (event.getButton()==view.getBtnDeleteForm()){\n\t\t\tdeleteHeader();\n\t\t} else if (event.getButton()==view.getBtnSearchForm()){\n\t\t\tsearchHeader();\n\t\t} else if (event.getButton()==view.getBtnAdd()){\n\t\t\taddDetailModul();\n\t\t} else if (event.getButton()==view.getBtnRem()){\n\t\t\tremDetailModul();\n\t\t} else if (event.getButton()==view.getBtnSaveForm()){\n\t\t\tsaveForm();\n\t\t} else if (event.getButton()==view.getBtnCancelForm()){\n\t\t\tcancelForm();\n\t\t} \n\t\t\n\t}", "public AddVehicleShowPage() {\n initComponents();\n }", "public void view() {\n\t\t\t\n\t\t\tSystem.out.println(\"Poping up window to show each order of customer @ AdminSaleController\");\n\t\t\tCustomerOrderMain vo = new CustomerOrderMain();\n\t\t vo.start(ps);\n\t\t\t\n\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == btnBack){\n\t\t\t//if user presses back, ask user if they are sure\n\t\t\tif (UserInterface.getMethods().yesOrNoDialogBox(\"Are You Sure You Want To Go Back??\", \"Return\")){\n\t\t\t\t//if true then create listMenu and dispose current window\n\t\t\t\ttry {\n\t\t\t\t\tListMenu list = new ListMenu();\n\t\t\t\t\t//Catch for errors\n\t\t\t\t} catch (NumberFormatException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ERROR: Number Format Error\");\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\t\t\"ERROR: File(s) Not Found\\n Please Check Your File Format\\n\"\n\t\t\t\t\t\t\t\t\t+ \"and The File Name!\");\n\t\t\t\t}\n\t\t\t\tdispose();\n\t\t\t}\t\t\t\n\t\t}\n\t\telse if (e.getSource()==btnCreate){\n\t\t\t//if user presses the create button it checks if the required fields are filled if not \n\t\t\t// an error is displayed\n\t\t\tif (txtName.getText().equalsIgnoreCase(\"\")||txtLastName.getText().equalsIgnoreCase(\"\")\n\t\t\t\t\t||txtAddress.getText().equalsIgnoreCase(\"\")||txtPhoneNumber.getText().equalsIgnoreCase(\"\")){\n\t\t\t\tJOptionPane.showMessageDialog(null, \"ERROR: Please Fill All Of The Fields!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//if user presses create and all required fields are full then\n\t\t\t\t//create strings for the data and get the text from the text fields\n\t\t\t\tString str, str2;\n\t\t\t\tString name = txtName.getText() + \" \" + txtMiddle.getText() + \" \" + txtLastName.getText();\n\t\t\t\tString address = txtAddress.getText();\n\t\t\t\tString phone = txtPhoneNumber.getText();\n\t\t\t\t//create a new customer \n\t\t\t\tCustomer customer = new Customer (name,address,phone);\n\t\t\t\t//insert the customer into the customerList\n\t\t\t\tUserInterface.getCustList().insert(customer);\n\t\t\t\t//make str get the updated customerList\n\t\t\t\tstr = UserInterface.getCustList().print();\n\t\t\t\t//create a new chequings and savings account using the new customer ID\n\t\t\t\tChequing chequing = new Chequing(customer.getCustomerID());\n\t\t\t\tSavings savings = new Savings(customer.getCustomerID());\n\t\t\t\t//insert the accounts into accountList\n\t\t\t\tUserInterface.getAccountList().insertC(chequing);\n\t\t\t\tUserInterface.getAccountList().insertS(savings);\n\t\t\t\t//get updated accountList\n\t\t\t\tstr2 = UserInterface.getAccountList().print();\n\t\t\t\t//write to the files \n\t\t\t\tUserInterface.getMethods().writeToFile(UserInterface.getCustFileName(), str);\n\t\t\t\tUserInterface.getMethods().writeToFile(UserInterface.getAccFileName(), str2);\n\t\t\t\t//when created go back to the list menu and then dispose current window\n\t\t\t\ttry {\n\t\t\t\t\tListMenu list = new ListMenu();\n\t\t\t\t} catch (NumberFormatException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ERROR: Number Format Error\");\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\t\t\"ERROR: File(s) Not Found\\n Please Check Your File Format\\n\"\n\t\t\t\t\t\t\t\t\t+ \"and The File Name!\");\n\t\t\t\t}\n\t\t\t\tdispose();\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Created!\");\n\t\t\t}\n\t\t}\n\t\telse if (e.getSource()==btnChange){\n\t\t\t//if button change is pressed get the data from the fields using the holder variable\n\t\t\tString str;\n\t\t\tString name = holder.txtName.getText() + \" \" + holder.txtMiddle.getText() + \" \" + holder.txtLastName.getText();\n\t\t\tString address = holder.txtAddress.getText();\n\t\t\tString phone = holder.txtPhoneNumber.getText();\n\t\t\t//create a string that combines the data via a comma\n\t\t\tString customerInfo = name + \",\" + address + \",\" + phone; \n\t\t\t//call the change method from the customerList\n\t\t\tif (UserInterface.getCustList().change(customerId, customerInfo)){\n\t\t\t\t//if true and the list is changed \n\t\t\t\t//get the updated customerList\n\t\t\t\tstr = UserInterface.getCustList().print();\n\t\t\t\t//write to the customerRecords file\n\t\t\t\tUserInterface.getMethods().writeToFile(UserInterface.getCustFileName(), str);\n\t\t\t\t//when created go back to the list menu and then dispose current window\n\t\t\t\ttry {\n\t\t\t\t\tListMenu list = new ListMenu();\n\t\t\t\t} catch (NumberFormatException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ERROR: Number Format Error\");\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\t\t\"ERROR: File(s) Not Found\\n Please Check Your File Format\\n\"\n\t\t\t\t\t\t\t\t\t+ \"and The File Name!\");\n\t\t\t\t}\n\t\t\t\tholder.dispose();\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Edited!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//if false\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Failed! Couldn't Change The Account\");\n\t\t\t}\n\t\t}\n\t}", "public static void returnAddNewServicesMenu() {\n System.out.print(\"Please enter a number to continue:\");\n processAddnewServicesMenu();\n }", "public void switchToCreateAccount() {\r\n\t\tlayout.show(this, \"createPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "public void linktomyorderseditbuttonPressed(javafx.event.ActionEvent event) throws IOException {\r\n Parent myorderseditParent = FXMLLoader.load(getClass().getResource(\"myOrdersEdit.fxml\"));\r\n Scene myorderseditScene = new Scene(myorderseditParent);\r\n Stage window = (Stage)((Node)event.getSource()).getScene().getWindow();\r\n window.setScene(myorderseditScene);\r\n window.show();\r\n }", "@Override\n public void onClick(View v) {\n startActivity(new Intent(\n HomeScreen.this, AddPoi.class));\n\n }", "public void onSaveButton(ActionEvent actionEvent) {\n if (nameField.getText() == null || addressField.getText() == null || postalField.getText() == null || phoneField.getText() == null || divisionCombo.getValue() == null) {\n Alert error = new Alert(Alert.AlertType.ERROR);\n error.setTitle(\"Error\");\n error.setHeaderText(\"Error: Invalid input.\");\n error.setContentText(\"Check values and try again.\");\n error.showAndWait();\n }\n else {\n try {\n int divisionID = getDivisionIdFromDivisionName(divisionCombo.getValue().toString());\n Customer newCustomer = new Customer(\n 0,\n nameField.getText(),\n addressField.getText(),\n postalField.getText(),\n phoneField.getText(),\n divisionID);\n Customer.addNewCustomer(newCustomer);\n onBackButton(actionEvent);\n } catch (RuntimeException | IOException e) {\n Alert error = new Alert(Alert.AlertType.ERROR);\n error.setTitle(\"Error\");\n error.setHeaderText(\"Error: Server issue.\");\n error.setContentText(\"Unable to complete this action, please try again.\");\n error.showAndWait();\n }\n }\n }", "@FXML\n public void saveCust(ActionEvent event) throws SQLException {\n\n if (completionCheck() < 0)\n return;\n\n int id = Integer.parseInt(idTB.getText().trim());\n\n CustomerDAOImpl.updateCustomer(id , nameTB.getText().trim(), addressTB.getText().trim(), postCodeTB.getText().trim(), stateProvinceCB.getSelectionModel().getSelectedItem().toString(), phone.getText());\n\n AlertMessage.addCustomerInfo();\n\n stage = (Stage)((Button) event.getSource()).getScene().getWindow();\n try {\n scene = FXMLLoader.load(getClass().getResource(\"../View_Controller/MainScreen.fxml\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n stage.setScene(new Scene(scene));\n stage.show();\n }", "@FXML\n private void addCustomerButton(ActionEvent event)\n {\n bankLogic.addCustomer(textFieldName.getText(),Long.parseLong(textFieldPnr.getText()));\n for (int i = 0; i < bankLogic.getCustomers().size(); i++)\n {\n System.out.println(bankLogic.getCustomers().get(i).toString());\n }\n \n }", "public ArticulosAdd() {\n initComponents();\n Sistema.lblNotificacion.setText(\"Ingreso Artítuclos\");\n this.setLocationRelativeTo(null);\n\n Date date = new Date();\n\n dtDesde.setDate(date);\n dtHasta.setDate(date);\n\n articulos.searchArticulo(cboArticulos, \"\", 0, 1000, 0);\n }", "@FXML\n void OnActionShowUpdateCustomerScreen(ActionEvent event) throws IOException {\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(getClass().getResource(\"/View/ModifyCustomer.fxml\"));\n stage.setTitle(\"Modify Customer\");\n stage.setScene(new Scene(scene));\n stage.show();\n }", "public void initialScreen() {\n PortfolioStocksVOImpl vo = getPortfolioStocksVO();\n //Number numb = (Number)2;\n Number num = new Number(2);\n vo.setBindPortfolioID(2);\n vo.executeQuery();\n //System.out.println(\"\\n\\n\\n End initial screen method \\n\\n\");\n }", "@FXML\r\n private void handleButtonCreateTicket() {\r\n MobileApplication.getInstance().addViewFactory(NEWTICKET_VIEW, () -> new NewTicketView(NEWTICKET_VIEW).getView());\r\n MobileApplication.getInstance().switchView(NEWTICKET_VIEW);\r\n\r\n }", "public void createOrderInDB() {\n if (newCustomer.isSelected()) {\n\n if(customerPhone.getText().isEmpty() ) {\n customerPhone.setStyle(\"-fx-focus-color: RED\");\n customerPhone.requestFocus();\n } else if(customerName.getText().isEmpty()) {\n customerName.setStyle(\"-fx-focus-color: RED\");\n customerName.requestFocus();\n } else {\n ControllerPartner controller = new ControllerPartner();\n controller.createOrderNewCustomer(customerPhone.getText(), customerName.getText(), totalPrice.getText());\n Label successMessage = new Label(\"Order is created, an sms with invoice is sent to the customer\");\n successMessage.setLayoutX(305);\n successMessage.setLayoutY(800);\n successMessage.setTextFill(Color.CORAL);\n root.getChildren().add(successMessage);\n content();\n\n customerName.clear();\n customerPhone.clear();\n\n }\n\n\n\n\n } else if (existingCustomer.isSelected()) {\n }\n }", "public void btnAddClicked(View view){\n List list = new List(input.getText().toString());\n dbHandler.addProduct(list);\n printDatabase();\n }", "private void onAddGoalsClicked() {\n Intent intent = new Intent(this, GoalCreationActivity.class);\n startActivity(intent);\n }", "private void initialize() {\r\n\t\tfrmEquipment = new JFrame();\r\n\t\tfrmEquipment.setTitle(\"Equipment\");\r\n\t\tfrmEquipment.setBounds(100, 100, 514, 533);\r\n\t\tfrmEquipment.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tfrmEquipment.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setLayout(null);\r\n\t\tpanel.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tpanel.setBackground(SystemColor.menu);\r\n\t\tpanel.setBounds(0, 0, 496, 486);\r\n\t\tfrmEquipment.getContentPane().add(panel);\r\n\t\t\r\n\t\tJLabel label = new JLabel(\"Sale Price\");\r\n\t\tlabel.setBounds(183, 162, 75, -4);\r\n\t\tpanel.add(label);\r\n\t\t\r\n\t\ttextField = new JTextField();\r\n\t\ttextField.setColumns(10);\r\n\t\ttextField.setBounds(356, 172, 116, 22);\r\n\t\tpanel.add(textField);\r\n\t\t\r\n\t\tJButton btnBack = new JButton(\"Back\");\r\n\t\tbtnBack.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\tback();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnBack.setBounds(206, 448, 94, 25);\r\n\t\tpanel.add(btnBack);\r\n\t\t\r\n\t\tJPanel panel_1 = new JPanel();\r\n\t\tpanel_1.setLayout(null);\r\n\t\tpanel_1.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tpanel_1.setBounds(12, 13, 472, 81);\r\n\t\tpanel.add(panel_1);\r\n\t\t\r\n\t\ttextField_1 = new JTextField();\r\n\t\ttextField_1.setColumns(10);\r\n\t\ttextField_1.setBounds(344, 27, 116, 22);\r\n\t\tpanel_1.add(textField_1);\r\n\t\t\r\n\t\tJLabel label_1 = new JLabel(\"Supplier ID\");\r\n\t\tlabel_1.setBounds(266, 30, 97, 16);\r\n\t\tpanel_1.add(label_1);\r\n\t\t\r\n\t\tJLabel label_2 = new JLabel(\"Product ID\");\r\n\t\tlabel_2.setBounds(12, 30, 75, 16);\r\n\t\tpanel_1.add(label_2);\r\n\t\t\r\n\t\tpidTF = new JTextField();\r\n\t\tpidTF.setColumns(10);\r\n\t\tpidTF.setBounds(87, 27, 64, 22);\r\n\t\tpanel_1.add(pidTF);\r\n\t\t\r\n\t\tJButton btnFind = new JButton(\"Find\");\r\n\t\tbtnFind.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\tfindEquipment();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnFind.setBounds(163, 26, 91, 25);\r\n\t\tpanel_1.add(btnFind);\r\n\t\t\r\n\t\tJPanel panel_2 = new JPanel();\r\n\t\tpanel_2.setLayout(null);\r\n\t\tpanel_2.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tpanel_2.setBounds(12, 107, 472, 320);\r\n\t\tpanel.add(panel_2);\r\n\t\t\r\n\t\tJButton btnRemove = new JButton(\"Remove\");\r\n\t\tbtnRemove.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\tremoveEquipment();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnRemove.setBounds(369, 282, 91, 25);\r\n\t\tpanel_2.add(btnRemove);\r\n\t\t\r\n\t\tJButton btnUpdate = new JButton(\"Update\");\r\n\t\tbtnUpdate.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\tupdateEquipment();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnUpdate.setBounds(197, 282, 91, 25);\r\n\t\tpanel_2.add(btnUpdate);\r\n\t\t\r\n\t\tJButton btnCreate = new JButton(\"Create\");\r\n\t\tbtnCreate.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\tinsertEquipment();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCreate.setBounds(12, 282, 91, 25);\r\n\t\tpanel_2.add(btnCreate);\r\n\t\t\r\n\t\tspriceTF = new JTextField();\r\n\t\tspriceTF.setColumns(10);\r\n\t\tspriceTF.setBounds(160, 65, 152, 22);\r\n\t\tpanel_2.add(spriceTF);\r\n\t\t\r\n\t\tppriceTF = new JTextField();\r\n\t\tppriceTF.setColumns(10);\r\n\t\tppriceTF.setBounds(12, 65, 116, 22);\r\n\t\tpanel_2.add(ppriceTF);\r\n\t\t\r\n\t\tJLabel label_3 = new JLabel(\"Rent Price\");\r\n\t\tlabel_3.setBounds(369, 45, 81, 16);\r\n\t\tpanel_2.add(label_3);\r\n\t\t\r\n\t\tJLabel label_4 = new JLabel(\"Sale Price\");\r\n\t\tlabel_4.setBounds(203, 45, 75, 16);\r\n\t\tpanel_2.add(label_4);\r\n\t\t\r\n\t\tJLabel label_5 = new JLabel(\"Purchase Price\");\r\n\t\tlabel_5.setBounds(30, 45, 97, 16);\r\n\t\tpanel_2.add(label_5);\r\n\t\t\r\n\t\tnameTF = new JTextField();\r\n\t\tnameTF.setColumns(10);\r\n\t\tnameTF.setBounds(56, 12, 152, 22);\r\n\t\tpanel_2.add(nameTF);\r\n\t\t\r\n\t\tJLabel lblName = new JLabel(\"Name\");\r\n\t\tlblName.setBounds(12, 15, 41, 16);\r\n\t\tpanel_2.add(lblName);\r\n\t\t\r\n\t\tminStockTF = new JTextField();\r\n\t\tminStockTF.setColumns(10);\r\n\t\tminStockTF.setBounds(344, 138, 116, 22);\r\n\t\tpanel_2.add(minStockTF);\r\n\t\t\r\n\t\tJLabel label_7 = new JLabel(\"Minimum Stock\");\r\n\t\tlabel_7.setBounds(355, 118, 117, 16);\r\n\t\tpanel_2.add(label_7);\r\n\t\t\r\n\t\tinStockTF = new JTextField();\r\n\t\tinStockTF.setColumns(10);\r\n\t\tinStockTF.setBounds(12, 138, 116, 22);\r\n\t\tpanel_2.add(inStockTF);\r\n\t\t\r\n\t\tJLabel label_8 = new JLabel(\"In Stock\");\r\n\t\tlabel_8.setBounds(42, 118, 97, 16);\r\n\t\tpanel_2.add(label_8);\r\n\t\t\r\n\t\ttypeTF = new JTextField();\r\n\t\ttypeTF.setColumns(10);\r\n\t\ttypeTF.setBounds(160, 168, 152, 22);\r\n\t\tpanel_2.add(typeTF);\r\n\t\t\r\n\t\tdescriptionTF = new JTextField();\r\n\t\tdescriptionTF.setToolTipText(\"Enter description\");\r\n\t\tdescriptionTF.setColumns(10);\r\n\t\tdescriptionTF.setBounds(137, 203, 200, 54);\r\n\t\tpanel_2.add(descriptionTF);\r\n\t\t\r\n\t\tJLabel lblEquipmentType = new JLabel(\"Equipment Type\");\r\n\t\tlblEquipmentType.setBounds(185, 141, 152, 16);\r\n\t\tpanel_2.add(lblEquipmentType);\r\n\t\t\r\n\t\tJLabel lblCountry = new JLabel(\"Country\");\r\n\t\tlblCountry.setBounds(246, 15, 59, 16);\r\n\t\tpanel_2.add(lblCountry);\r\n\t\t\r\n\t\tcountryTF = new JTextField();\r\n\t\tcountryTF.setColumns(10);\r\n\t\tcountryTF.setBounds(308, 12, 152, 22);\r\n\t\tpanel_2.add(countryTF);\r\n\t}", "private void showNewForm(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n RequestDispatcher dispatcher = request.getRequestDispatcher(\"customer/newCustomer.jsp\");\n dispatcher.forward(request, response);\n }", "@FXML\n public void addHospital() {\n \tnew eMenuHandler().hideMenu();\n \tDisplayBuildingInstructions.showBuildingInstr();\n \tAddEntityOnMouseClick.setBuildMode(Boolean.TRUE);\n \tAddEntityOnMouseClick.entityList(new BuildingHospital(0, 0));\n }", "public void showAddCustomerDialog() {\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApplication.class.getResource(\"view/AddCustomerDialog.fxml\"));\n\t\t\tAnchorPane page = (AnchorPane) loader.load();\n\t\t\tStage dialogStage = new Stage();\n\t\t\tdialogStage.setTitle(\"Add Customer\");\n\t\t\tdialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\tdialogStage.initOwner(primaryStage);\n\t\t\tScene scene = new Scene(page);\n\t\t\tdialogStage.setScene(scene);\n\t\t\tAddCustomerDialogController controller = loader.getController();\n\t\t\tcontroller.setDialogStage(dialogStage);\n\t\t\tdialogStage.showAndWait();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\t}\n\t}", "@FXML void but_AddProduct(ActionEvent event) {\n\n productLine.add(new Widget(txtProductName.getText(), txtManufacturer.getText(),\n choiceType.getValue())); //Adding test product in observable list\n\n productTable.setItems(productLine); //Adds product to table\n listProduce.setItems(productLine); //Adds product to produce list\n\n addToDatabaseProduct();\n\n System.out.println(\"Product added\");\n }", "public void startSale()\n\t{\n\t\tpurchase.reset();\n\t}", "private void addProduct()\n {\n System.out.println(\"|➕| Add new Product:\\n\");\n System.out.println(\"|➕| Enter ID\\n\");\n int id = Integer.parseInt(reader.getInput());\n System.out.println(\"|➕| Enter Name\\n\");\n String name = reader.getInput();\n manager.addProduct(id, name);\n }", "private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }", "FrmViewContacts() {\n startupForm();\n }", "public void ajouter(){\n Main.showPages(\"pageAjoutMateriel.fxml\");\n\n }", "public Sales() {\n\n initComponents();\n //loadSales();\n fillComboTienda();\n fillComboTitulos();\n }", "void goMainScreen(){\n\t\tcheckSavePwd();\n\t\tActionEvent e = new ActionEvent();\n\t\te.sender = this;\n\t\te.action = ActionEventConstant.ACTION_SWITH_TO_CATEGORY_SCREEN;\n\t\tUserController.getInstance().handleSwitchActivity(e);\n\t}", "public Purchase(String name, String date) {\n movName = name;\n movDate = date;\n initComponents();\n this.setLocationRelativeTo(null);//!Centers the window.\n movieDetailsTF.setText(\"The movie you have selected is:\\n\" + movName\n + \"\\n and your chosen date and time is: \\n\" + movDate);\n }" ]
[ "0.6929588", "0.6716668", "0.66893274", "0.6370093", "0.63547", "0.6194389", "0.61890554", "0.6177842", "0.6119392", "0.6094611", "0.6093315", "0.6058392", "0.6007968", "0.5999155", "0.5997324", "0.5987549", "0.59496886", "0.5945645", "0.59410757", "0.5934362", "0.59303796", "0.5913771", "0.58928734", "0.5890792", "0.5865235", "0.5828255", "0.5809115", "0.5793438", "0.5792561", "0.5789593", "0.57811236", "0.57803756", "0.5779982", "0.5778563", "0.5776468", "0.5774668", "0.5773514", "0.57706594", "0.57682574", "0.5753245", "0.57455444", "0.57446784", "0.573934", "0.57365364", "0.572541", "0.57225806", "0.5721219", "0.57163054", "0.5696192", "0.5683981", "0.5683469", "0.5682495", "0.56764233", "0.56667095", "0.5661417", "0.5656398", "0.56539387", "0.56531316", "0.5638989", "0.56374025", "0.56358176", "0.56326663", "0.56304085", "0.5626119", "0.5626023", "0.56153935", "0.56101424", "0.5603737", "0.5602236", "0.55978674", "0.55963343", "0.55957305", "0.55927604", "0.558665", "0.55814606", "0.5579664", "0.5579459", "0.5576589", "0.55722153", "0.5568844", "0.5566577", "0.5564809", "0.55613", "0.5560085", "0.5549591", "0.55438477", "0.55416363", "0.5540194", "0.55367804", "0.55324817", "0.5526938", "0.55268055", "0.55259645", "0.5521372", "0.5521152", "0.5512646", "0.55083036", "0.55052346", "0.5503051", "0.5502551" ]
0.64533097
3
switch the screen to main customer form
@FXML void customers_btn_clicked(MouseEvent event) { switchScenes("/client/boundry/MarketingAgentMainCustomerForm.fxml", "/client/boundry/MarketingAgentMainCustomer.css"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void goMainScreen(){\n\t\tcheckSavePwd();\n\t\tActionEvent e = new ActionEvent();\n\t\te.sender = this;\n\t\te.action = ActionEventConstant.ACTION_SWITH_TO_CATEGORY_SCREEN;\n\t\tUserController.getInstance().handleSwitchActivity(e);\n\t}", "private void backToCustomer() {\n new CustomerPanel().setVisible(true);\n this.setVisible(false);\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcustomerFrame cf = new customerFrame(user);\r\n\t\t\t\tcf.setVisible(true);\r\n\t\t\t\tsetVisible(false);\r\n\t\t\t}", "public void actionPerformed(ActionEvent e){\r\n JButton eventSource = (JButton) e.getSource();\r\n HelperControl control = new HelperControl();\r\n //Turn to OrderMenu\r\n if(eventSource.equals(customerButton)){\r\n this.setVisible(false);\r\n \r\n control.skipOrderMenu();\r\n System.out.println(\"Turn to 2nd page: OrderMenu\"); \r\n }\r\n //Turn to manager\r\n else if(eventSource.equals(managerButton)){\r\n this.setVisible(false);\r\n // manager mng = new manager();\r\n // mng.setVisible(true);\r\n control.skipManager();\r\n System.out.println(\"Turn to 7Th page: manager\");\r\n }\r\n \r\n }", "private void BacktoMainActionPerformed(java.awt.event.ActionEvent evt) {\n new Machines().setVisible(true);\n }", "public CustomerAddInterFrm() {\r\n\t\tinitComponents();\r\n\t\tthis.setLocation(200, 100);\r\n\t}", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n\t \t\n\t \tboolean custCreated = createCustomer();\n\t \t\n\t \t\t\n\t \tif(custCreated){\n\t \t\tdispose();\n\t \t\thome home = new home(cust);\n\t \t\thome.setLocationRelativeTo(null);\n\t \t\thome.setVisible(true);\n\t \t}\n\t \t\n\t \t\n\t }", "void nextFrame(CustomerRegistration custRegF){\n\t\t\tcustRegF.setVisible(false);\n\t\t\twelcomeF.setVisible(true);\n\t\t\t\n\t\t}", "public void view() {\n\t\t\t\n\t\t\tSystem.out.println(\"Poping up window to show each order of customer @ AdminSaleController\");\n\t\t\tCustomerOrderMain vo = new CustomerOrderMain();\n\t\t vo.start(ps);\n\t\t\t\n\t\t}", "public Master_Customer() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "FrmViewContacts() {\n startupForm();\n }", "private void loadMainUserScene(javafx.event.ActionEvent event, Customer customer) throws Exception {\n stageManager.switchScene(FxmlView.USER, customer);\n }", "public void factoryMainScreen()\n\t{\n\t\t\n\t}", "public CustomerDetailsView displayDetailsView(char mode, Customer customer) { \r\n\r\n\t\tif(customerDetailsView == null) {\r\n\t\t\tcustomerDetailsView = new CustomerDetailsView() {\r\n\t\t\t\tpublic void cancelAction() {\r\n\t\t\t\t\tif(validateScreenBeforeClose()) {\r\n\t\t\t\t\t\tdisposeDetailsView();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tApplicationMaster.addScreen(customerDetailsView);\r\n\t\t}\r\n\r\n\t\tcustomerDetailsView.setTitle(getValue(\"TTLscrxxxxx001CustomerDetailsScreen\"));\r\n\t\tcustomerDetailsView.setScreenMode(mode);\r\n\t\tcustomerDetailsView.setController(this);\r\n\r\n\t\tif(mode != CustomerDetailsView.ADD && customer != null) {\r\n\t\t\tcustomerDetailsView.populateScreen(customer);\r\n\t\t}\r\n\r\n\t\tif(customerSearchView != null && customerSearchView.isVisible()) {\r\n\t\t\tcustomerSearchView.setVisible(false);\r\n\t\t}\r\n\r\n\t\tcustomerDetailsView.setVisible(true);\r\n\t\treturn customerDetailsView;\r\n\t}", "@Override\n\tpublic void returnToGUI(JFrame frame) {\n\t\tframe.setVisible(false);\n\t\tCustomerGUI customer = new CustomerGUI();\n\t\tcustomer.accountNumber = this.accNo;\n\t\tcustomer.pinNumber = this.pinNo;\n\t\tcustomer.create();\t\n\t}", "public void onShowMain(ActionEvent event) {\n try {\n Stage stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\n Parent scene = FXMLLoader.load(getClass().getResource(\"/App/View/MainScreenView.fxml\"));\n stage.setTitle(\"Customer Schedule\");\n stage.setScene(new Scene(scene));\n stage.show();\n }\n catch (Exception e){\n System.out.println(e.getMessage());\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew Admin_Screen();\n\t\t\t\tADCL.setVisible(false);\n\t\t\t}", "public login() {\n initComponents();\n setTitle(\"COLLAGE MANAGEMENT SYSTEM\");\n }", "public void backbutton(ActionEvent event) throws Exception{\n\t\t\n\t\tcustomermainpage main = new customermainpage();\n\t\tmain.setgui();\n\t}", "public void showPage(){\n\t\tflexTable.setWidget(0, 0, lblNome);\n\t flexTable.setWidget(0, 1, nomePratoBox);\n\t flexTable.setWidget(0, 2, pesquisarButton);\n\t\t\n\t initWidget(flexTable);\n\t \n\t\tRootPanel formRootPanel = RootPanel.get(\"loginContainer\");\n\t\tformRootPanel.add(this);\n\t}", "void nextFrame(Shopping shoppingF){\n\t\tcustLoginF.reset();\n\t\tcustLoginF.setVisible(true);\n\t}", "public show_medicine() {\n initComponents();\n upDateDB();\n this.setLocationRelativeTo(null);\n }", "@FXML\n void OnActionShowAddCustomerScreen(ActionEvent event) throws IOException {\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(getClass().getResource(\"/View/AddCustomer.fxml\"));\n stage.setTitle(\"Add Customer\");\n stage.setScene(new Scene(scene));\n stage.show();\n }", "@FXML\n void OnActionShowUpdateCustomerScreen(ActionEvent event) throws IOException {\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(getClass().getResource(\"/View/ModifyCustomer.fxml\"));\n stage.setTitle(\"Modify Customer\");\n stage.setScene(new Scene(scene));\n stage.show();\n }", "public MainForm() {\n initComponents();\n \n Utility.centerScreen(this);\n myself = this;\n }", "@Override\n\tpublic void goToUiCobrador() {\n\t\tif(uiHomeCobrador!=null){\n\t\t\tuiHomeCobrador.getHeader().getLblTitulo().setText(constants.cobrador());\n\t\t\tuiHomeCobrador.getHeader().setVisibleBtnMenu(true);\n\t\t\tuiHomeCobrador.getContainer().showWidget(0);\n\t\t\t}\n\t}", "private void btn_ReturnActionPerformed(java.awt.event.ActionEvent evt) {\n \n Filight_Details FD = new Filight_Details();\n FD.setVisible(true);\n this.close();\n \n }", "private void switchScreen(int pScreen) {\r\n\t\tif (pScreen == START) {\r\n\t\t\tcontroller.close();\r\n\t\t\t\r\n\t\t\tcontroller = new StartController(model, display);\r\n\t\t\tcontroller.addObserver(this);\r\n\t\t\tview = new StartView(shell, model, controller);\r\n\t\t\tview.setLayoutData(gridData);\r\n\t\t\t\r\n\t\t\tshell.layout();\r\n\t\t} else if (pScreen == JOURNAL) {\r\n\t\t\tcontroller.close();\r\n\t\t\t\r\n\t\t\tcontroller = new JournalController(model, display);\r\n\t\t\tcontroller.addObserver(this);\r\n\t\t\tview = new JournalView(shell, model, (JournalController)controller);\r\n\t\t\tview.setLayoutData(gridData);\r\n\t\t\t\r\n\t\t\tshell.layout();\r\n\t\t} else if (pScreen == SETTINGS) {\r\n\t\t\tcontroller.close();\r\n\r\n\t\t\tcontroller = new SettingsController(model, display);\r\n\t\t\tcontroller.addObserver(this);\r\n\t\t\tview = new SettingsView(shell, model, (SettingsController)controller);\r\n\t\t\tview.setLayoutData(gridData);\r\n\t\t\t\r\n\t\t\tshell.layout();\r\n\t\t} else if (pScreen == EXAM) {\r\n\t\t\tcontroller.close();\r\n\r\n\t\t\tcontroller = new ExamController(model, display);\r\n\t\t\tcontroller.addObserver(this);\r\n\t\t\tview = new ExamView(shell, model, (ExamController)controller);\r\n\t\t\t\r\n\t\t\t/* Construction of ExamView may fail, in which case it is disposed at once. */\r\n\t\t\tif (!view.isDisposed()) {\r\n\t\t\t\tview.setLayoutData(gridData);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tshell.layout();\r\n\t\t} else if (pScreen == HELP) {\r\n\t\t\tcontroller.close();\r\n\r\n\t\t\tcontroller = new HelpController(model, display);\r\n\t\t\tcontroller.addObserver(this);\r\n\t\t\tview = new HelpView(shell, model, (HelpController)controller);\r\n\t\t\t\r\n\t\t\t/* Construction of HelpView may fail, in which case it is disposed at once. */\r\n\t\t\tif (!view.isDisposed()) {\r\n\t\t\t\tview.setLayoutData(gridData);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tshell.layout();\r\n\t\t} else if (pScreen == ABOUT) {\r\n\t\t\tcontroller.close();\r\n\t\r\n\t\t\tcontroller = new AboutController(model, display);\r\n\t\t\tcontroller.addObserver(this);\r\n\t\t\tview = new AboutView(shell, model, (AboutController)controller);\r\n\t\t\t\r\n\t\t\tview.setLayoutData(gridData);\r\n\t\t\tshell.layout();\r\n\t\t}\r\n\t}", "public void switchToMenuScreen() {\n \tCardLayout currLayout = (CardLayout) screens.getLayout();\n \tcurrLayout.show(screens, \"menu\");\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew Admin_Screen();\n\t\t\t\tADML.setVisible(false);\n\t\t\t}", "void nextFrame(CustomerLogin custLoginF, boolean loginType) throws SQLException, ClassNotFoundException {\n\t\tshoppingF.setVisible(false);\n\t\tcustLoginF.setVisible(false);\n\t\tpaymentF.reset();\n\t\t\n\t\t\tif(loginType == Globals.CUST_LOGIN){\n\t\t\t\t//prepares the layout of PAYMENT Frame for a registered customer\n\t\t\t\tpaymentF.setLoginType(Globals.CUST_LOGIN);\n\t\t\t}\n\t\t\telse if(loginType == Globals.GUEST_LOGIN){\n\t\t\t\t//prepares the layout of PAYMENT Frame for guest customer\n\t\t\t\tpaymentF.setLoginType(Globals.GUEST_LOGIN);\n\t\t\t}\n\t\t\n\t\tpaymentF.setVisible(true);\n\t}", "public void adminMainMenuControl()\n\t{\n \tviewAdminMainMenu = new AdminMainMenuView();\n \tviewAdminMainMenu.showMe();\n \t\n \tThread thread = new newOrderIconThread();\n \tthread.start();\n \t\n \tviewAdminMainMenu.setAddBookActionListener(new ActionListener(){\n\n \t\t@Override\n \t\tpublic void actionPerformed(ActionEvent arg0)\n \t\t{\n \t\t\tAdminController con = new AdminController(adminModel);\n\t\t\t\tcon.addBooksControl();\n\t\t\t\tviewAdminMainMenu.closeFrame();\t\n \t\t\n \t\t}\n \t});\n \tviewAdminMainMenu.setDeleteBookActionListener(new ActionListener(){\n\n \t\t@Override\n \t\tpublic void actionPerformed(ActionEvent arg0)\n \t\t{\n \t\t\tAdminController con = new AdminController(adminModel);\n\t\t\t\tcon.deleteBooksControl();\n\t\t\t\tviewAdminMainMenu.closeFrame();\t\n \t\t\n \t\t}\n \t});\n \tviewAdminMainMenu.setLogOutActionListener(new ActionListener(){\n\n \t\t@Override\n \t\tpublic void actionPerformed(ActionEvent arg0)\n \t\t{\n \t\t\tUserServices user = new SQLUserServices();\n \t\t\tServicesController con = new ServicesController(user);\n\t\t\t\tcon.loginControl();\n\t\t\t\tviewAdminMainMenu.closeFrame();\t\n \t\t\n \t\t}\n \t});\n \tviewAdminMainMenu.setOrdersDoneActionListener(new ActionListener(){\n\n \t\t@Override\n \t\tpublic void actionPerformed(ActionEvent arg0)\n \t\t{\n \t\t\tAdminController con = new AdminController(adminModel);\n\t\t\t\tcon.ordersFinishedControl();\n\t\t\t\tviewAdminMainMenu.closeFrame();\t\n \t\t\n \t\t}\n \t});\n \tviewAdminMainMenu.setOrdersToDoActionListener(new ActionListener(){\n\n \t\t@Override\n \t\tpublic void actionPerformed(ActionEvent arg0)\n \t\t{\n \t\t\tAdminController con = new AdminController(adminModel);\n\t\t\t\tcon.ordersToDoControl();\n\t\t\t\tviewAdminMainMenu.closeFrame();\t\n \t\t\n \t\t}\n \t});\n \t\n \t\t\n\t}", "protected abstract Controller initialScreen();", "public void switchToInstructionScreen() {\n \tCardLayout currLayout = (CardLayout) screens.getLayout();\n \tcurrLayout.show(screens, \"insn\");\n }", "@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tOpenscreen.open(\"/admin_main/first_main.fxml\");\r\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tf1.dispose();\n\t\t\t\tnew Gui().customer_frame(name);\n\t\t\t}", "private void btnReturnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnReturnActionPerformed\n ViewProducts viewProducts = new ViewProducts(loggedInCustomer);\n this.dispose();\n viewProducts.setVisible(true);\n }", "void goToLogin() {\n mainFrame.setPanel(panelFactory.createPanel(PanelFactoryOptions.panelNames.LOGIN));\n }", "public void returnToMainMenu() {\n AppStateManager stateManager = getStateManager();\n setEnabled(false);\n\n EnginePowerGraphState enginePowerGraphState\n = getState(EnginePowerGraphState.class);\n stateManager.detach(enginePowerGraphState);\n\n TireDataState tireDataState = getState(TireDataState.class);\n stateManager.detach(tireDataState);\n\n VehicleEditorState vehicleEditorState\n = getState(VehicleEditorState.class);\n stateManager.detach(vehicleEditorState);\n\n DebugTabState debugTabState = getState(DebugTabState.class);\n stateManager.detach(debugTabState);\n\n getState(DriverHud.class).setEnabled(false);\n\n Vehicle vehicle = MavDemo1.getVehicle();\n Vehicle newVehicle;\n try {\n Class<? extends Vehicle> clazz = vehicle.getClass();\n newVehicle = clazz.getDeclaredConstructor().newInstance();\n } catch (ReflectiveOperationException exception) {\n throw new RuntimeException(exception);\n }\n MavDemo1 main = MavDemo1.getApplication();\n AssetManager assetManager = main.getAssetManager();\n newVehicle.load(assetManager);\n MavDemo1.setVehicle(newVehicle);\n\n stateManager.attach(new MainMenu());\n getState(CameraInputMode.class).orbit();\n }", "private void returnToMainScreen(ActionEvent event) throws IOException {\r\n\r\n Parent parent = FXMLLoader.load(getClass().getResource(\"../view/MainScreen.fxml\"));\r\n Scene scene = new Scene(parent);\r\n Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();\r\n stage.setScene(scene);\r\n stage.show();\r\n }", "public static void changeScreen(Parent screen) {\n mainStage.setScene( new Scene( screen ) );\n mainStage.show();\n }", "@FXML\n private void handleManageClients(ActionEvent event) {\n try {\n LOGGER.log(Level.INFO, \"Redirecting to ClientManagement window.\");\n FXMLLoader loader = new FXMLLoader(getClass()\n .getResource(\"/reto2desktopclient/view/ClientManagement.fxml\"));\n Parent root = (Parent) loader.load();\n //Getting window controller.\n ClientManagementController controller = (loader.getController());\n controller.setStage(stage);\n //Initializing stage.\n controller.initStage(root);\n } catch (IOException ex) {\n LOGGER.log(Level.SEVERE, \"Could not switch to ClientManagement window: {0}\", ex.getMessage());\n showErroAlert(\"Could not switch to Client Management window due to an\"\n + \" unexpected error, please try later.\");\n }\n }", "private void updateScreenCustomerDetails(Customer c) {\n // - update main title with customers full name\n tvCustomerMainTitle.setText(customer.toString());\n\n // - update screen with customer ID\n textViewID.setText(customer.getCustomerID());\n\n // - update screen with customer email\n tvCustomerEmail.setText(customer.getEmail());\n\n // - update screen with customer VIP status\n tvCustomerVipStatus.setText(customer.vipStatusToString());\n\n // - update avctive game and lane fields\n }", "public void showEditCustomerScene(Customer customer) throws IOException {\n this.showEditCustomerScene(customer,null);\r\n }", "private void initialize()\n\t{\n\n\t\tfrmCustomers = new JFrame();\n\t\tfrmCustomers.setResizable(false);\n\t\tfrmCustomers.setTitle(\"Guitar Builder - Customers\");\n\t\tfrmCustomers.setBounds(100, 100, 499, 354);\n\t\tfrmCustomers.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfrmCustomers.getContentPane().setLayout(new GridLayout(0, 1, 0, 0));\n\t\tDimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tfrmCustomers.setLocation(\n\t\t\t\tdim.width / 2 - frmCustomers.getSize().width / 2,\n\t\t\t\tdim.height / 2 - frmCustomers.getSize().height / 2); // launches window in center of the screen.\n\n\t\tJTabbedPane tabbedPane = new JTabbedPane(SwingConstants.TOP); // creates a tabbed pane\n\t\tfrmCustomers.getContentPane().add(tabbedPane);\n\n\t\t// -----------------------------------------------------------------------------------\n\t\t// ---------------------------------CREATE CUSTOMER-----------------------------------\n\t\t// -----------------------------------------------------------------------------------\n\n\t\tJPanel pnlCreateCustomer = new JPanel();\n\t\ttabbedPane.addTab(\"Create Customer\", null, pnlCreateCustomer, null);\n\t\tpnlCreateCustomer.setLayout(null);\n\n\t\t// labels on create customer tab\n\t\tJLabel lblCustomerID = new JLabel(\"Enter Customer ID:\");\n\t\tlblCustomerID.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblCustomerID.setBounds(10, 11, 126, 14);\n\t\tpnlCreateCustomer.add(lblCustomerID);\n\n\t\tJLabel lblFirstName = new JLabel(\"First Name:\");\n\t\tlblFirstName.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblFirstName.setBounds(10, 36, 126, 14);\n\t\tpnlCreateCustomer.add(lblFirstName);\n\n\t\tJLabel lblLastName = new JLabel(\"Last Name:\");\n\t\tlblLastName.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblLastName.setBounds(10, 62, 126, 14);\n\t\tpnlCreateCustomer.add(lblLastName);\n\n\t\tJLabel lblPhoneNumber = new JLabel(\"Phone Number:\");\n\t\tlblPhoneNumber.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblPhoneNumber.setBounds(10, 87, 126, 14);\n\t\tpnlCreateCustomer.add(lblPhoneNumber);\n\n\t\tJLabel lblEmail = new JLabel(\"Email:\");\n\t\tlblEmail.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblEmail.setBounds(10, 112, 126, 14);\n\t\tpnlCreateCustomer.add(lblEmail);\n\n\t\tJLabel lblAddress = new JLabel(\"Address:\");\n\t\tlblAddress.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblAddress.setBounds(10, 137, 126, 14);\n\t\tpnlCreateCustomer.add(lblAddress);\n\n\t\tJLabel lblReturnCustomer = new JLabel(\"Return Customer:\");\n\t\tlblReturnCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReturnCustomer.setBounds(10, 162, 126, 14);\n\t\tpnlCreateCustomer.add(lblReturnCustomer);\n\n\t\t// input objects on create customer tab\n\t\ttxtCustomerID = new JTextField(\"\");\n\t\ttxtCustomerID.setToolTipText(\n\t\t\t\t\"Enter a customer ID that is 5 digits or less.\");\n\t\ttxtCustomerID.setBounds(146, 10, 332, 20);\n\t\tpnlCreateCustomer.add(txtCustomerID);\n\t\ttxtCustomerID.setColumns(10);\n\n\t\ttxtFirstName = new JTextField(\"\");\n\t\ttxtFirstName.setToolTipText(\"Enter a First Name\");\n\t\ttxtFirstName.setBounds(146, 35, 332, 20);\n\t\tpnlCreateCustomer.add(txtFirstName);\n\t\ttxtFirstName.setColumns(10);\n\n\t\ttxtLastName = new JTextField(\"\");\n\t\ttxtLastName.setToolTipText(\"Enter a Last Name\");\n\t\ttxtLastName.setColumns(10);\n\t\ttxtLastName.setBounds(146, 61, 332, 20);\n\t\tpnlCreateCustomer.add(txtLastName);\n\n\t\ttxtPhoneNumber = new JTextField(\"\");\n\t\ttxtPhoneNumber.setToolTipText(\"Enter a Phone Number\");\n\t\ttxtPhoneNumber.setColumns(10);\n\t\ttxtPhoneNumber.setBounds(146, 86, 332, 20);\n\t\tpnlCreateCustomer.add(txtPhoneNumber);\n\n\t\ttxtEmail = new JTextField(\"\");\n\t\ttxtEmail.setToolTipText(\"Enter an Email Address\");\n\t\ttxtEmail.setColumns(10);\n\t\ttxtEmail.setBounds(146, 111, 332, 20);\n\t\tpnlCreateCustomer.add(txtEmail);\n\n\t\ttxtAddress = new JTextField(\"\");\n\t\ttxtAddress.setToolTipText(\"Enter an Adress\");\n\t\ttxtAddress.setColumns(10);\n\t\ttxtAddress.setBounds(146, 136, 332, 20);\n\t\tpnlCreateCustomer.add(txtAddress);\n\n\t\tJRadioButton rdbtnNo = new JRadioButton(\"No\");\n\t\treturnCustomerButtonGroup.add(rdbtnNo);\n\t\trdbtnNo.setSelected(true);\n\t\trdbtnNo.setBounds(146, 160, 45, 23);\n\t\tpnlCreateCustomer.add(rdbtnNo);\n\n\t\tJRadioButton rdbtnYes = new JRadioButton(\"Yes\");\n\t\treturnCustomerButtonGroup.add(rdbtnYes);\n\t\trdbtnYes.setBounds(193, 160, 53, 23);\n\t\tpnlCreateCustomer.add(rdbtnYes);\n\n\t\t// stores information in database\n\t\tJButton btnCreateCustomer = new JButton(\"Create Customer\");\n\t\tbtnCreateCustomer.addActionListener(new ActionListener()\n\t\t{\n\t\t\t// event handler for create customer button\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tint ID = 0;\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tID = Integer.parseInt(txtCustomerID.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,\n\t\t\t\t\t\t\t\"ID must consist of only numbers\", \"Error\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Gather user input\n\t\t\t\tString first = txtFirstName.getText();\n\t\t\t\tString last = txtLastName.getText();\n\t\t\t\tString phone = txtPhoneNumber.getText();\n\t\t\t\tString address = txtAddress.getText();\n\t\t\t\tString email = txtEmail.getText();\n\n\t\t\t\tif(first.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tfirst = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(last.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tlast = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(phone.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tphone = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(address.isEmpty())\n\t\t\t\t{\n\t\t\t\t\taddress = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(email.isEmpty())\n\t\t\t\t{\n\t\t\t\t\temail = \"N/A\";\n\t\t\t\t}\n\n\t\t\t\tchar returnCustomer;\n\n\t\t\t\tif(rdbtnYes.isSelected())\n\t\t\t\t\treturnCustomer = 'Y';\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturnCustomer = 'N';\n\t\t\t\t}\n\n\t\t\t\t// confirmation dialog\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null,\n\t\t\t\t\t\t\"Is The Following Information Correct?\" + \"\\nID: \" + ID\n\t\t\t\t\t\t\t\t+ \"\\nFirst Name: \" + first + \"\\nLast Name: \"\n\t\t\t\t\t\t\t\t+ last + \"\\nPhone Number: \" + phone\n\t\t\t\t\t\t\t\t+ \"\\nAddress: \" + address + \"\\nEmail: \" + email\n\t\t\t\t\t\t\t\t+ \"\\nReturn Customer: \" + returnCustomer,\n\t\t\t\t\t\t\"Confirmation\", JOptionPane.YES_NO_OPTION);\n\n\t\t\t\t// if information confirmed, commits data to database.\n\t\t\t\tif(choice == 0)\n\t\t\t\t{\n\n\t\t\t\t\t// creates customer object\n\t\t\t\t\tCustomer create = new Customer(ID, first, last, phone,\n\t\t\t\t\t\t\taddress, email, returnCustomer);\n\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tOracleJDBC.writeCustomer(create); // passes to method that writes customer to database\n\t\t\t\t\t}\n\t\t\t\t\tcatch(SQLException e1)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif(e1.getErrorCode() == 12899)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString message = e1.getMessage();\n\n\t\t\t\t\t\t\tif(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"FIRSTNAME\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"First name is too Long, Max Length = 12\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"LASTNAME\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"Last name is too Long, Max Length = 50\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"PHONE\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"Phone number is too Long, Max Length = 14\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"ADDRESS\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"Address is too Long, Max Length = 50\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"EMAIL\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"EMAIL is too Long, Max Length = 50\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse if(e1.getErrorCode() == 00001) // sql error for PK constraint violation\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\"Customer ID already in use\", \"Error\",\n\t\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\telse if(e1.getErrorCode() == 1438) // sql error for customer ID too long\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\"Customer ID to long, must be 5 digits or less\",\n\t\t\t\t\t\t\t\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\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Created\",\n\t\t\t\t\t\t\t\"Success\", JOptionPane.INFORMATION_MESSAGE, null);\n\n\t\t\t\t\t// clears form\n\t\t\t\t\tclearForm();\n\t\t\t\t\trdbtnNo.isSelected();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn;\n\n\t\t\t}\n\t\t});\n\t\tbtnCreateCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnCreateCustomer.setBounds(10, 199, 226, 86);\n\t\tpnlCreateCustomer.add(btnCreateCustomer);\n\n\t\t// main menu button\n\t\tJButton btnMainMenu = new JButton(\"Main Menu\");\n\t\tbtnMainMenu.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tGuitarBuilderMainMenu.createMainMenu(); // opens main menu screen\n\t\t\t\tfrmCustomers.dispose(); // closes current screen without exiting application\n\t\t\t}\n\t\t});\n\t\tbtnMainMenu.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnMainMenu.setBounds(252, 199, 226, 86);\n\t\tpnlCreateCustomer.add(btnMainMenu);\n\n\t\t// --------------------------------------------------------------------------------------------------\n\t\t// ---------------------------------------UPDATE CUSTOMER--------------------------------------------\n\t\t// --------------------------------------------------------------------------------------------------\n\n\t\tJPanel pnlUpdateCustomer = new JPanel();\n\t\ttabbedPane.addTab(\"Update Customer\", null, pnlUpdateCustomer, null);\n\t\tpnlUpdateCustomer.setLayout(null);\n\n\t\t// main menu button\n\t\tJButton btnUpdateMainMenu = new JButton(\"Main Menu\");\n\t\tbtnUpdateMainMenu.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tGuitarBuilderMainMenu.createMainMenu(); // opens main menu screen\n\t\t\t\tfrmCustomers.dispose(); // closes current screen without exiting application\n\t\t\t}\n\t\t});\n\t\tbtnUpdateMainMenu.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnUpdateMainMenu.setBounds(252, 199, 226, 86);\n\t\tpnlUpdateCustomer.add(btnUpdateMainMenu);\n\n\t\tJRadioButton radUpdateNo = new JRadioButton(\"No\");\n\t\tradUpdateNo.setSelected(true);\n\t\tupdateReturnCustomerButtonGroup.add(radUpdateNo);\n\t\tradUpdateNo.setBounds(146, 160, 45, 23);\n\t\tpnlUpdateCustomer.add(radUpdateNo);\n\n\t\tJRadioButton radUpdateYes = new JRadioButton(\"Yes\");\n\t\tupdateReturnCustomerButtonGroup.add(radUpdateYes);\n\t\tradUpdateYes.setBounds(193, 160, 57, 23);\n\t\tpnlUpdateCustomer.add(radUpdateYes);\n\n\t\t// update customer button\n\t\tJButton btnUpdateCustomer = new JButton(\"Update Customer\");\n\t\tbtnUpdateCustomer.setEnabled(false);\n\t\tbtnUpdateCustomer.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\n\t\t\t\t// Gather user input\n\t\t\t\tint ID = Integer.parseInt(txtUpdateID.getText());\n\t\t\t\tString first = txtUpdateFirstName.getText();\n\t\t\t\tString last = txtUpdateLastName.getText();\n\t\t\t\tString phone = txtUpdatePhoneNumber.getText();\n\t\t\t\tString address = txtUpdateAddress.getText();\n\t\t\t\tString email = txtUpdateEmail.getText();\n\t\t\t\tchar returnCustomer;\n\n\t\t\t\tif(first.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tfirst = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(last.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tlast = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(phone.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tphone = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(address.isEmpty())\n\t\t\t\t{\n\t\t\t\t\taddress = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(email.isEmpty())\n\t\t\t\t{\n\t\t\t\t\temail = \"N/A\";\n\t\t\t\t}\n\n\t\t\t\tif(radUpdateYes.isSelected())\n\t\t\t\t\treturnCustomer = 'Y';\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturnCustomer = 'N';\n\t\t\t\t}\n\n\t\t\t\t// confirms information\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null,\n\t\t\t\t\t\t\"Is The Following Information Correct?\" + \"\\nID: \" + ID\n\t\t\t\t\t\t\t\t+ \"\\nFirst Name: \" + first + \"\\nLast Name: \"\n\t\t\t\t\t\t\t\t+ last + \"\\nPhone Number: \" + phone\n\t\t\t\t\t\t\t\t+ \"\\nAddress: \" + address + \"\\nEmail: \" + email\n\t\t\t\t\t\t\t\t+ \"\\nReturn Customer: \" + returnCustomer,\n\t\t\t\t\t\t\"Confirmation\", JOptionPane.YES_NO_OPTION);\n\t\t\t\tif(choice == 0)\n\t\t\t\t{\n\n\t\t\t\t\tCustomer update = new Customer(ID, first, last, phone,\n\t\t\t\t\t\t\taddress, email, returnCustomer);\n\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tOracleJDBC.updateCustomer(update);\n\t\t\t\t\t}\n\t\t\t\t\tcatch(SQLException e1)\n\t\t\t\t\t{\n\n\t\t\t\t\t\te1.printStackTrace();\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Updated\",\n\t\t\t\t\t\t\t\"Success\", JOptionPane.INFORMATION_MESSAGE, null);\n\n\t\t\t\t\t// clears form\n\t\t\t\t\tclearForm();\n\t\t\t\t\trdbtnNo.isSelected();\n\t\t\t\t\tbtnUpdateCustomer.setEnabled(false);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn;\n\t\t\t}\n\t\t});\n\t\tbtnUpdateCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnUpdateCustomer.setBounds(10, 199, 226, 86);\n\t\tpnlUpdateCustomer.add(btnUpdateCustomer);\n\n\t\t// update tab labels\n\t\tJLabel lblUpdateReturnCustomer = new JLabel(\"Return Customer:\");\n\t\tlblUpdateReturnCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblUpdateReturnCustomer.setBounds(10, 162, 126, 14);\n\t\tpnlUpdateCustomer.add(lblUpdateReturnCustomer);\n\n\t\tJLabel lblUpdateAddress = new JLabel(\"Address:\");\n\t\tlblUpdateAddress.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblUpdateAddress.setBounds(10, 137, 126, 14);\n\t\tpnlUpdateCustomer.add(lblUpdateAddress);\n\n\t\tJLabel lblUpdateEmail = new JLabel(\"Email:\");\n\t\tlblUpdateEmail.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblUpdateEmail.setBounds(10, 112, 126, 14);\n\t\tpnlUpdateCustomer.add(lblUpdateEmail);\n\n\t\tJLabel lblUpdatePhoneNumber = new JLabel(\"Phone Number:\");\n\t\tlblUpdatePhoneNumber.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblUpdatePhoneNumber.setBounds(10, 87, 126, 14);\n\t\tpnlUpdateCustomer.add(lblUpdatePhoneNumber);\n\n\t\tJLabel lblUpdateLastName = new JLabel(\"Last Name:\");\n\t\tlblUpdateLastName.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblUpdateLastName.setBounds(10, 62, 126, 14);\n\t\tpnlUpdateCustomer.add(lblUpdateLastName);\n\n\t\tJLabel lblUpdateFirstName = new JLabel(\"First Name:\");\n\t\tlblUpdateFirstName.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblUpdateFirstName.setBounds(10, 36, 126, 14);\n\t\tpnlUpdateCustomer.add(lblUpdateFirstName);\n\n\t\tJLabel lblEnterCustomerId = new JLabel(\"Enter Customer ID For Update:\");\n\t\tlblEnterCustomerId.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblEnterCustomerId.setBounds(10, 11, 204, 14);\n\t\tpnlUpdateCustomer.add(lblEnterCustomerId);\n\n\t\t// input objects for update\n\t\ttxtUpdateAddress = new JTextField();\n\t\ttxtUpdateAddress.setColumns(10);\n\t\ttxtUpdateAddress.setBounds(146, 136, 332, 20);\n\t\tpnlUpdateCustomer.add(txtUpdateAddress);\n\t\ttxtUpdateEmail = new JTextField();\n\t\ttxtUpdateEmail.setColumns(10);\n\t\ttxtUpdateEmail.setBounds(146, 111, 332, 20);\n\t\tpnlUpdateCustomer.add(txtUpdateEmail);\n\t\ttxtUpdatePhoneNumber = new JTextField();\n\t\ttxtUpdatePhoneNumber.setColumns(10);\n\t\ttxtUpdatePhoneNumber.setBounds(146, 86, 332, 20);\n\t\tpnlUpdateCustomer.add(txtUpdatePhoneNumber);\n\t\ttxtUpdateLastName = new JTextField();\n\t\ttxtUpdateLastName.setColumns(10);\n\t\ttxtUpdateLastName.setBounds(146, 61, 332, 20);\n\t\tpnlUpdateCustomer.add(txtUpdateLastName);\n\t\ttxtUpdateFirstName = new JTextField();\n\t\ttxtUpdateFirstName.setColumns(10);\n\t\ttxtUpdateFirstName.setBounds(146, 35, 332, 20);\n\t\tpnlUpdateCustomer.add(txtUpdateFirstName);\n\t\ttxtUpdateID = new JTextField();\n\t\ttxtUpdateID.setColumns(10);\n\t\ttxtUpdateID.setBounds(224, 10, 180, 20);\n\t\tpnlUpdateCustomer.add(txtUpdateID);\n\n\t\t// Brings current info into text fields for editing, and enables the update button\n\t\tJButton btnUpdateEnterID = new JButton(\"Enter\");\n\t\tbtnUpdateEnterID.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tint ID = Integer.parseInt(txtUpdateID.getText());\n\t\t\t\tint returnID = 0;\n\t\t\t\tString first = null;\n\t\t\t\tString last = null;\n\t\t\t\tString phone = null;\n\t\t\t\tString address = null;\n\t\t\t\tString email = null;\n\t\t\t\tString returnCustomer = null;\n\n\t\t\t\t// gets current info\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\treturnID = OracleJDBC.readCustomerID(ID);\n\t\t\t\t\tfirst = OracleJDBC.readCustomerFirstName(ID);\n\t\t\t\t\tlast = OracleJDBC.readCustomerLastName(ID);\n\t\t\t\t\tphone = OracleJDBC.readCustomerPhoneNumber(ID);\n\t\t\t\t\taddress = OracleJDBC.readCustomerAddress(ID);\n\t\t\t\t\temail = OracleJDBC.readCustomerEmail(ID);\n\t\t\t\t\treturnCustomer = OracleJDBC.readReturnCustomer(ID);\n\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,\n\t\t\t\t\t\t\t\"Could Not Retrieve Customer Info\", \"Error\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tif(returnID != 0) // checks if customer exists\n\t\t\t\t{\n\n\t\t\t\t\ttxtUpdateFirstName.setText(first);\n\t\t\t\t\ttxtUpdateLastName.setText(last);\n\t\t\t\t\ttxtUpdatePhoneNumber.setText(phone);\n\t\t\t\t\ttxtUpdateAddress.setText(address);\n\t\t\t\t\ttxtUpdateEmail.setText(email);\n\n\t\t\t\t\tif(returnCustomer.equals(\"Y\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tradUpdateYes.setSelected(true);\n\t\t\t\t\t}\n\n\t\t\t\t\tbtnUpdateCustomer.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,\n\t\t\t\t\t\t\t\"Could Not Retrieve Customer Info, Customer ID \"\n\t\t\t\t\t\t\t\t\t+ ID + \" does not exist\",\n\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE, null);\n\n\t\t\t\t\tclearForm();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t\tbtnUpdateEnterID.setBounds(414, 9, 64, 21);\n\t\tpnlUpdateCustomer.add(btnUpdateEnterID);\n\n\t\t// -------------------------------------------------------------------------------------\n\t\t// -------------------------------------REVIEW CUSTOMER---------------------------------\n\t\t// -------------------------------------------------------------------------------------\n\n\t\tJPanel pnlReviewCustomer = new JPanel();\n\t\ttabbedPane.addTab(\"Review Customer\", null, pnlReviewCustomer, null);\n\t\tpnlReviewCustomer.setLayout(null);\n\n\t\t// Customer Review Labels\n\t\tJLabel lblReviewCustomerID = new JLabel(\n\t\t\t\t\"Enter Customer ID To Review Information\");\n\t\tlblReviewCustomerID.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblReviewCustomerID.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewCustomerID.setBounds(10, 12, 468, 19);\n\t\tpnlReviewCustomer.add(lblReviewCustomerID);\n\n\t\ttxtReviewCustomerID = new JTextField();\n\t\ttxtReviewCustomerID.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtReviewCustomerID.setColumns(10);\n\t\ttxtReviewCustomerID.setBounds(10, 34, 468, 20);\n\t\tpnlReviewCustomer.add(txtReviewCustomerID);\n\n\t\tJLabel lblReviewFirstName = new JLabel(\"First Name:\");\n\t\tlblReviewFirstName.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewFirstName.setBounds(10, 130, 74, 14);\n\t\tpnlReviewCustomer.add(lblReviewFirstName);\n\n\t\tJLabel lblReviewLastName = new JLabel(\"Last Name:\");\n\t\tlblReviewLastName.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewLastName.setBounds(10, 156, 74, 14);\n\t\tpnlReviewCustomer.add(lblReviewLastName);\n\n\t\tJLabel lblReviewPhoneNumber = new JLabel(\"Phone Number:\");\n\t\tlblReviewPhoneNumber.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewPhoneNumber.setBounds(10, 181, 97, 14);\n\t\tpnlReviewCustomer.add(lblReviewPhoneNumber);\n\n\t\tJLabel lblReviewEmail = new JLabel(\"Email:\");\n\t\tlblReviewEmail.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewEmail.setBounds(10, 206, 44, 14);\n\t\tpnlReviewCustomer.add(lblReviewEmail);\n\n\t\tJLabel lblReviewAddress = new JLabel(\"Address:\");\n\t\tlblReviewAddress.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewAddress.setBounds(10, 231, 74, 14);\n\t\tpnlReviewCustomer.add(lblReviewAddress);\n\n\t\tJLabel lblReviewReturnCustomer = new JLabel(\"Return Customer:\");\n\t\tlblReviewReturnCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewReturnCustomer.setBounds(10, 256, 117, 14);\n\t\tpnlReviewCustomer.add(lblReviewReturnCustomer);\n\n\t\t// Labels to display information\n\t\tJLabel lblShowFirstName = new JLabel(\"\");\n\t\tlblShowFirstName.setBackground(Color.WHITE);\n\t\tlblShowFirstName.setBounds(94, 130, 356, 14);\n\t\tpnlReviewCustomer.add(lblShowFirstName);\n\n\t\tJLabel lblShowLastName = new JLabel(\"\");\n\t\tlblShowLastName.setBackground(Color.WHITE);\n\t\tlblShowLastName.setBounds(94, 158, 356, 14);\n\t\tpnlReviewCustomer.add(lblShowLastName);\n\n\t\tJLabel lblShowPhoneNumber = new JLabel(\"\");\n\t\tlblShowPhoneNumber.setBackground(Color.WHITE);\n\t\tlblShowPhoneNumber.setBounds(117, 183, 333, 14);\n\t\tpnlReviewCustomer.add(lblShowPhoneNumber);\n\n\t\tJLabel lblShowEmail = new JLabel(\"\");\n\t\tlblShowEmail.setBackground(Color.WHITE);\n\t\tlblShowEmail.setBounds(64, 206, 386, 14);\n\t\tpnlReviewCustomer.add(lblShowEmail);\n\n\t\tJLabel lblShowAddress = new JLabel(\"\");\n\t\tlblShowAddress.setBackground(Color.WHITE);\n\t\tlblShowAddress.setBounds(74, 233, 376, 14);\n\t\tpnlReviewCustomer.add(lblShowAddress);\n\n\t\tJLabel lblShowReturnCustomer = new JLabel(\"\");\n\t\tlblShowReturnCustomer.setBackground(Color.WHITE);\n\t\tlblShowReturnCustomer.setBounds(123, 258, 327, 14);\n\t\tpnlReviewCustomer.add(lblShowReturnCustomer);\n\n\t\t// gets data from database\n\t\tJButton btnReviewCustomer = new JButton(\"Review Customer\");\n\t\tbtnReviewCustomer.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tint ID = Integer.parseInt(txtReviewCustomerID.getText());\n\t\t\t\tint returnID = 0;\n\t\t\t\tString first = null;\n\t\t\t\tString last = null;\n\t\t\t\tString phone = null;\n\t\t\t\tString address = null;\n\t\t\t\tString email = null;\n\t\t\t\tString returnCustomer = null;\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t// Store data to values\n\t\t\t\t\treturnID = OracleJDBC.readCustomerID(ID);\n\t\t\t\t\tfirst = OracleJDBC.readCustomerFirstName(ID);\n\t\t\t\t\tlast = OracleJDBC.readCustomerLastName(ID);\n\t\t\t\t\tphone = OracleJDBC.readCustomerPhoneNumber(ID);\n\t\t\t\t\taddress = OracleJDBC.readCustomerAddress(ID);\n\t\t\t\t\temail = OracleJDBC.readCustomerEmail(ID);\n\t\t\t\t\treturnCustomer = OracleJDBC.readReturnCustomer(ID);\n\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,\n\t\t\t\t\t\t\t\"Could Not Retrieve Customer First Name\", \"Error\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tif(returnID != 0) // checks if customer exists\n\t\t\t\t{\n\t\t\t\t\t// Displays data\n\t\t\t\t\tlblShowFirstName.setText(first);\n\t\t\t\t\tlblShowLastName.setText(last);\n\t\t\t\t\tlblShowPhoneNumber.setText(phone);\n\t\t\t\t\tlblShowAddress.setText(address);\n\t\t\t\t\tlblShowEmail.setText(email);\n\t\t\t\t\tif(returnCustomer.equals(\"N\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tlblShowReturnCustomer.setText(\"No\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tlblShowReturnCustomer.setText(\"Yes\");\n\t\t\t\t\t}\n\t\t\t\t\t;\n\t\t\t\t}\n\t\t\t\telse // customer does not exist\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"Customer with ID \" + ID + \" does not exist\",\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}\n\t\t});\n\t\tbtnReviewCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnReviewCustomer.setBounds(10, 65, 227, 54);\n\t\tpnlReviewCustomer.add(btnReviewCustomer);\n\n\t\tJButton btnReviewMainMenu = new JButton(\"Main Menu\");\n\t\tbtnReviewMainMenu.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tGuitarBuilderMainMenu.createMainMenu();\n\t\t\t\tfrmCustomers.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnReviewMainMenu.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnReviewMainMenu.setBounds(251, 65, 227, 54);\n\t\tpnlReviewCustomer.add(btnReviewMainMenu);\n\n\t\t// -------------------------------------------------------------------------------\n\t\t// ------------------------------DELETE CUSTOMER----------------------------------\n\t\t// -------------------------------------------------------------------------------\n\t\tJPanel pnlDeleteCustomer = new JPanel();\n\t\ttabbedPane.addTab(\"Delete Customer\", null, pnlDeleteCustomer, null);\n\t\tpnlDeleteCustomer.setLayout(null);\n\n\t\t// Labels for the customer deletion window\n\t\tJLabel lblDeleteCustomerID = new JLabel(\"Enter Customer ID To Delete\");\n\t\tlblDeleteCustomerID.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblDeleteCustomerID.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblDeleteCustomerID.setBounds(10, 11, 468, 19);\n\t\tpnlDeleteCustomer.add(lblDeleteCustomerID);\n\n\t\ttxtDeleteCustomerID = new JTextField();\n\t\ttxtDeleteCustomerID.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtDeleteCustomerID.setColumns(10);\n\t\ttxtDeleteCustomerID.setBounds(10, 33, 468, 20);\n\t\tpnlDeleteCustomer.add(txtDeleteCustomerID);\n\n\t\tJButton btnDeleteCustomer = new JButton(\"Delete Customer\");\n\t\tbtnDeleteCustomer.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\n\t\t\t\tint ID = Integer.parseInt(txtDeleteCustomerID.getText());\n\t\t\t\tint returnID = 0;\n\t\t\t\tString first = null;\n\t\t\t\tString last = null;\n\t\t\t\tString phone = null;\n\t\t\t\tString address = null;\n\t\t\t\tString email = null;\n\t\t\t\tString returnCustomer = null;\n\t\t\t\ttry\n\t\t\t\t{\n\n\t\t\t\t\t// Gathers data from database\n\t\t\t\t\treturnID = OracleJDBC.readCustomerID(ID);\n\t\t\t\t\tfirst = OracleJDBC.readCustomerFirstName(ID);\n\t\t\t\t\tlast = OracleJDBC.readCustomerLastName(ID);\n\t\t\t\t\tphone = OracleJDBC.readCustomerPhoneNumber(ID);\n\t\t\t\t\taddress = OracleJDBC.readCustomerAddress(ID);\n\t\t\t\t\temail = OracleJDBC.readCustomerEmail(ID);\n\t\t\t\t\treturnCustomer = OracleJDBC.readReturnCustomer(ID);\n\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,\n\t\t\t\t\t\t\t\"Could Not Delete Customer\", \"Error\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tif(returnID == 0)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"Customer with ID \" + ID + \" does not exist!\",\n\t\t\t\t\t\t\t\"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,\n\t\t\t\t\t\t\t\"Are you sure you want to delete the following customer?\"\n\t\t\t\t\t\t\t\t\t+ \"\\nID: \" + returnID + \"\\nFirst Name: \"\n\t\t\t\t\t\t\t\t\t+ first + \"\\nLast Name: \" + last\n\t\t\t\t\t\t\t\t\t+ \"\\nPhone Number: \" + phone + \"\\nAddress: \"\n\t\t\t\t\t\t\t\t\t+ address + \"\\nEmail: \" + email\n\t\t\t\t\t\t\t\t\t+ \"\\nReturn Customer: \" + returnCustomer,\n\t\t\t\t\t\t\t\"Confirmation\", JOptionPane.YES_NO_OPTION);\n\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.deleteCustomer(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,\n\t\t\t\t\t\t\t\t\t\"Couldn't Delete Customer\", \"Error\",\n\t\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Deleted\",\n\t\t\t\t\t\t\t\t\"Sucess\", JOptionPane.INFORMATION_MESSAGE,\n\t\t\t\t\t\t\t\tnull);\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\n\t\t\t}\n\t\t});\n\t\tbtnDeleteCustomer\n\t\t\t\t.setBackground(UIManager.getColor(\"Button.background\"));\n\t\tbtnDeleteCustomer.setForeground(Color.RED);\n\t\tbtnDeleteCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnDeleteCustomer.setBounds(10, 64, 226, 73);\n\t\tpnlDeleteCustomer.add(btnDeleteCustomer);\n\n\t\tJButton btnDeleteMainMenu = new JButton(\"Main Menu\");\n\t\tbtnDeleteMainMenu.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tGuitarBuilderMainMenu.createMainMenu();\n\t\t\t\tfrmCustomers.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnDeleteMainMenu.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnDeleteMainMenu.setBounds(252, 64, 226, 73);\n\t\tpnlDeleteCustomer.add(btnDeleteMainMenu);\n\t}", "private void showLogin() {\n \t\tLogin.actionHandleLogin(this);\n \t}", "private void goToMenu() {\n\t\tgame.setScreen(new MainMenuScreen(game));\n\n\t}", "private void goToMenu() {\n game.setScreen(new MainMenuScreen(game));\n\n }", "public void accuse()\n {\n //show the accusation window\n accusationScreen = new AccusationScreen(this, false, null);\n accusationScreen.setVisible(true);\n }", "private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }", "public void routetopage() {\n this.setVisible(true);\n }", "private void backPageActionPerformed(java.awt.event.ActionEvent evt) {\n studentsEntry panel = new studentsEntry();\n panel.setVisible(true);\n this.setVisible(false);\n }", "@Override\n protected void showOtherForm(Resources res) {\n }", "public void showEditCustomerScene(Customer customer, Customer oldCustomer) throws IOException {\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(MainApp.class.getResource(\"view/customers/EditCustomerOverview.fxml\"));\r\n AnchorPane page = (AnchorPane) loader.load();\r\n\r\n mainLayout.setCenter(page);\r\n // Set the agent into the controller\r\n EditCustomerOverviewController controller = loader.getController();\r\n controller.setMainApp(this);\r\n controller.setCustomer(customer);\r\n controller.setOldCustomer(oldCustomer);\r\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 453, 301);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblEditTitle = new JLabel(\"EDIT CUSTOMER\");\n\t\tlblEditTitle.setBounds(0, 0, 437, 27);\n\t\tlblEditTitle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblEditTitle.setFont(new Font(\"Tahoma\", Font.PLAIN, 22));\n\t\tframe.getContentPane().add(lblEditTitle);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Customer CPF to edit:\");\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblNewLabel.setBounds(20, 116, 138, 14);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\ttextFieldCpfToEdit = new JTextField();\n\t\ttextFieldCpfToEdit.setBounds(178, 115, 219, 20);\n\t\tframe.getContentPane().add(textFieldCpfToEdit);\n\t\ttextFieldCpfToEdit.setColumns(10);\n\t\t\n\t\tJButton btnEdit = new JButton(\"edit\");\n\t\tbtnEdit.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tbtnEdit.setBounds(163, 206, 89, 23);\n\t\tframe.getContentPane().add(btnEdit);\n\t\tbtnEdit.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tEditCustomerMenuView.main(null);\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t}", "private void showNewForm(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n RequestDispatcher dispatcher = request.getRequestDispatcher(\"customer/newCustomer.jsp\");\n dispatcher.forward(request, response);\n }", "private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }", "public CustomerGUI() {\n\t initComponents();\n\t }", "public void returnToMainScreen(ActionEvent event) throws IOException {\n Parent root = FXMLLoader.load(getClass().getResource(\"/view/MainScreen.fxml\"));\n Scene scene = new Scene(root);\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\n window.setScene(scene);\n window.show();\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==clear)\r\n\t\t{\r\n\t\t\ttname.setText(\"\");\r\n\t\t\ttpwd.setText(\"\");\r\n\t\t}\r\n\t\telse if(e.getSource()==registration)\r\n\t\t{\r\n\t\t\tRegist rg=new Regist();\r\n\t\t\t\trg.setVisible(true);\r\n\t\t\t\trg.setSize(500,500);\r\n\t\t\t\trg.setTitle(\"Registration Page\");\r\n\t\t}\r\n\t\telse if(e.getSource()==exit)\r\n\t\t{\r\n\t\t\tthis.setVisible(false);\r\n\t\t}\r\n\t\telse if(e.getSource()==login)\r\n\t\t{\r\n\t\t\tConnection con=null;\r\n\t\t\tStatement stmt=null;\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tString uname=tname.getText();\r\n\t\t\t\tString upwd=tpwd.getText();\r\n\t\t\t\tString sql=\"select *from logininfo where username='\"+uname+\"' and password='\"+upwd+\"'\";\r\n\t\t\t\tSystem.out.println(sql);\r\n\t\t\t\tcon=DBConnection.getConnection();\r\n\t\t\t\tstmt=con.createStatement();\r\n\t\t\t\t\r\n\t\t\t\tResultSet rs=stmt.executeQuery(sql);\r\n\t\t\t\tif(rs.next())\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t//jd.show();\r\n\t\t\t\t\tString msg=\"Login success\";\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, msg);\r\n\t\t\t\t\tthis.setVisible(false);\r\n\t\t\t\t\tInformationSecurity IS=new InformationSecurity();// object created for frame\r\n\t\t\t\t\t\r\n\t\t\t\t\tIS.setVisible(true);\r\n\t\t\t\t\tIS.setSize(500,500);\r\n\t\t\t\t\tIS.setTitle(\"InformationSecurity\");\r\n\t\t\t\t // md.setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tString msg=\"Login Unsuccess\";\r\n\t\t\t\t\tJOptionPane.showConfirmDialog(null, msg);\r\n\t\t\t\t\tthis.setVisible(false);\r\n\t\t\t\t\tInfoPiracy login=new InfoPiracy();\r\n\t\t\t\t\tlogin.setVisible(true);\r\n\t\t\t\t\tlogin.setTitle(\"LoginPage\");\r\n\t\t\t\t\tlogin.setSize(1500,1500);\r\n\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}\r\n\t\t\r\n\t\t\t}\r\n\t\t\tcatch(SQLException ex)\r\n\t\t\t{\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n}", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "private void btn_BackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_BackActionPerformed\n // go back to database access screen\n SS.StudentScreenPopulate();\n SS.setVisible(true);\n this.setVisible(false);\n\n }", "public void backToMain(ActionEvent event) throws IOException{\n try {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"../view/main.fxml\"));\n root = loader.load();\n MainController controller = loader.getController();\n controller.selectTab(1);\n stage = (Stage)((Node)event.getSource()).getScene().getWindow();\n scene = new Scene(root);\n stage.setScene(scene);\n stage.show();\n } catch (IOException e) {\n showError(true, \"Can not load the protected page.\");\n }\n }", "public static void main(String[] args) {\n new DisplayManager(new AppointmentMgr()).StartProg(true);\n //AppointmentMgr.makeAppt = new makeAppt(AppointmentMgr);\n //myMgr.screen2 = new Screen2(myMgr);\n\n //new MakeAppoinment().setVisible(true);\n //upldMedRec.setVisible(true);\n //makeAppt.setVisible(true);\n //showScreen1();\n //jButton2ActionPerformed(java.awt.event.ActionEvent evt)\n \n //makeAppt.jButton2ActionPerformed();\n\n \n \n }", "public void showSearchCustomerDialog() {\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApplication.class.getResource(\"view/SearchCustomerDialog.fxml\"));\n\t\t\tAnchorPane page = (AnchorPane) loader.load();\n\t\t\tStage searchCustomerDialogStage = new Stage();\n\t\t\tthis.searchCustomerDialogStage = searchCustomerDialogStage;\n\t\t\tsearchCustomerDialogStage.setTitle(\"Search Customer\");\n\t\t\tsearchCustomerDialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\tsearchCustomerDialogStage.initOwner(primaryStage);\n\t\t\tScene scene = new Scene(page);\n\t\t\tsearchCustomerDialogStage.setScene(scene);\n\t\t\tSearchCustomerDialogController searchCustomerDialogController = loader.getController();\n\t\t\tsearchCustomerDialogController.setDialogStage(searchCustomerDialogStage);\n\t\t\tsearchCustomerDialogController.setMainApp(this);\n\t\t\tsetSearchCustomerController(searchCustomerDialogController);\n\t\t\tsearchCustomerDialogStage.showAndWait();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t }\n\t}", "@Override protected void startup() {\n show(new FrontView());\n //show(new RestaurantManagementView(this));\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tStudentManagement studentManagement =new StudentManagement();\n\t\t\t studentManagement.setModal(true);\n\t\t\t studentManagement.setVisible(true);\n\t\t\t}", "private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tGUICheckCustomer check = new GUICheckCustomer();\n\t\t\t\tcloseFrame();\n\t\t\t}", "public void switchToGameScreen() {\n \tCardLayout currLayout = (CardLayout) screens.getLayout();\n \tcurrLayout.show(screens, \"game\");\n \troom.reset();\n }", "@Override\r\n public void actionPerformed(ActionEvent el) {\n \r\n \r\n if(el.getSource()==b9)\r\n {\r\n adminsuccess l1=new adminsuccess();\r\n l1.setVisible(true);\r\n l1.setLocationRelativeTo(null);\r\n dispose();\r\n }\r\n \r\n \r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n Main.switchViews();\n }", "public MainScreen()\n {\n initComponents();\n \n //Load the tables of the application with data from database\n loadClientTable();\n loadSupplierTable();\n loadStorageTable();\n loadPurchaseTable();\n loadSellTable();\n loadDeskPane();\n \n // Set window's location to the center of the screen\n setLocationRelativeTo(null);\n }", "public static void customerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the customers\");\n System.out.println(\"2 - Would you like to search for a customer's information\");\n System.out.println(\"3 - Adding a new customer's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }", "public FrontPage ()\n\t{\n\t\t\n\t\tframe.setLayout(new BorderLayout());\t\t\n\t\ttwobuttonPanel.setLayout(new GridLayout(1,2));\n\t\t\n\t\t\n\t\t// 2 buttons let user choose how to search\n\t\tJButton mak = new JButton(\"Car Maker\");\n\t\tJButton vendor = new JButton(\"Vendor\");\n\t\theader.setLayout(new BorderLayout());\n\t\tFont font = new Font(\"Dialog\", 1, 24);\n\t\tJLabel msgLabel = new JLabel(\"Select Search Option\");\n\t\tmsgLabel.setFont(font);\n\t\tmsgLabel.setForeground(Color.RED);\n\t\tmsgLabel.setHorizontalAlignment(JLabel.CENTER);\n\t\ttwobuttonPanel.add(mak);\n\t\ttwobuttonPanel.add(vendor);\n\t\theader.add(msgLabel, BorderLayout.NORTH);\n\t\theader.add(twobuttonPanel, BorderLayout.CENTER);\n\t\tframe.add(header,BorderLayout.NORTH);\n\t\tframe.add(display, BorderLayout.CENTER);\n\t\t//frame.add(details, BorderLayout.SOUTH);\n\t\tdisplay.add(partP);\n\t\tdisplay.add(carP);\n\t\tcarP.setVisible(false);\n\t\tpartP.setVisible(false);\n\t//\tdetails.setVisible(false);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//final boolean carMan = true;\n\t\tmak.addActionListener( \n\t \t\t \tnew ActionListener()\n\t \t\t \t{\n\t \t\t \t\tpublic void actionPerformed(ActionEvent event)\n\t \t\t \t\t{\n\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\tfinal int ans =1;\n\t \t\t \t\t\tselected =ans ;\t \t\t \n\t \t\t \t\t\tchangeView();\n\t \t\t \t\t\t//stateChanged(new ChangeEvent(this));\n\t \t\t \t\t}\n\t \t\t \t}\n\t );\n\t\t\n\t\t\n\t\tvendor.addActionListener( \n\t \t\t \tnew ActionListener()\n\t \t\t \t{\n\t \t\t \t\tpublic void actionPerformed(ActionEvent event)\n\t \t\t \t\t{\n\t \t\t \t\t\t\n\t \t\t \t\t\tfinal int ans2 =2;\n\t \t\t \t\t\tselected =ans2 ;\n\t \t\t \t\t\t//stateChanged(new ChangeEvent(this));\n\t \t\t \t\t\tchangeView();\n\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\n\t \t\t \t\t}\n\t \t\t \t}\n\t );\n\t\t\n\t\tframe.setTitle(\"AUTOMOBILE PART SEARCH SYSTEM\");\n\t\tframe.setSize(1500, 900);\n\t\t//frame.pack();\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setVisible(true);\n\t\t\t\n\t\t\t\t\n\t\t\n\t}", "void showOrdersGui();", "void goToWhiteboardSelect(){\n CollaboardGUI.this.setSize(500,500);\n CardLayout layout = (CardLayout) panels.getLayout();\n layout.show(panels, \"whiteboard\");\n }", "private void showCustomerInfoDialog(Customer customer) {\n\t\ttry {\n\t\t\t// set up the root for the customer information dialog\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(C195Application.class.getResource(\"view/AddCustomer.fxml\"));\n\t\t\tloader.setResources(lang);\n\t\t\tAnchorPane customerInfoRoot = (AnchorPane) loader.load();\n\n\t\t\t// set up the stage for the customer information dialog\n\t\t\tStage customerInfoStage = new Stage();\n\t\t\tcustomerInfoStage.setTitle(\"\");\n\t\t\tcustomerInfoStage.initModality(Modality.WINDOW_MODAL);\n\t\t\tcustomerInfoStage.initOwner(stage);\n\n\t\t\t// add a new scene with the root to the stage\n\t\t\tScene scene = new Scene(customerInfoRoot);\n\t\t\tcustomerInfoStage.setScene(scene);\n\n\t\t\t// get the controller for the dialog and pass a reference \n\t\t\t// the customer info dialog stage, and a customer, if one was selected\n\t\t\tAddCustomerController controller = loader.getController();\n\t\t\tcontroller.setupDialog(customerInfoStage, customer);\n\n\t\t\t// show the customer information dialog\n\t\t\tcustomerInfoStage.showAndWait();\n\n\t\t\t// refresh the customer list after an update\n\t\t\tCustomer newCustomer = controller.getNewCustomer();\n\t\t\tif (newCustomer == null) return;\n\n\t\t\tif(customer == null) {\n\t\t\t\tcustomers.add(newCustomer);\n\t\t\t} else {\n\t\t\t\tcustomers.set(customers.indexOf(customer), newCustomer);\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void startScreen()\n {\n onSales = false;\n \n numItemsAdded = 0; \n Menu guiMenu = new Menu(\"File\", \"NewSale\\nClose\\nExit\", 24, Color.BLACK, Color.WHITE, Color.BLACK,Color.WHITE, new FileCommands());\n clearScreen();\n addObject(guiMenu, 200, 50);\n }", "private void showLocksForm() throws edu.mit.coeus.exception.CoeusException{\r\n CurrentLockForm currentLockForm = new CurrentLockForm(mdiForm,true);\r\n currentLockForm.display();\r\n }", "public void goToScreeningControl(ActionEvent Event) throws IOException {\n\t\t\n\t\tif(movieList.getSelectionModel().getSelectedItem()!=null)\n\t\t{\n\t\t\tapplication.VariableTracker.selectedMovieStaff=movieList.getSelectionModel().getSelectedItem();\n\t\t\tParent main = FXMLLoader.load(getClass().getResource(\"/staff/ScreeningControl.fxml\"));\n\t\t\tScene loginscene = new Scene(main);\n\t\t\tStage window = (Stage) ((Node) Event.getSource()).getScene().getWindow();\n\t\t\twindow.setScene(loginscene);\n\t\t\twindow.show();\n\t\t\tloginscene.getWindow().centerOnScreen();\n\t\t}\n\n\t}", "public void actionPerformed (ActionEvent e) {\n if(e.getActionCommand().equals(\"Back\")) {\r\n OptionsPage f1 = new OptionsPage(strUser);\r\n f1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n f1.setSize(500, 500 ); \r\n f1.setVisible(true); \r\n this.dispose(); \r\n }\r\n //open the main page\r\n\tif(e.getActionCommand().equals(\"Log Out\")) {\r\n MainPage f1 = new MainPage();\r\n f1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n f1.setSize(500, 500 ); \r\n f1.setVisible(true); \r\n this.dispose(); \r\n }\r\n }", "void navigateToOrderingCoffee() {\n Intent gotoOrderCoffee = new Intent(this, OrderingCoffeeActivity.class);\n startActivity(gotoOrderCoffee);\n }", "public void gotoLogin() {\n try {\n LoginController login = (LoginController) replaceSceneContent(\"Login.fxml\");\n login.setApp(this);\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "public void switchToLogin() {\r\n\t\tlayout.show(this, \"loginPane\");\r\n\t\tloginPane.resetPassFields();\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "protected void Userselect(ActionEvent arg0) {\n\t\tUsersManageFrm umf=new UsersManageFrm();\n\t\tumf.setVisible(true);\n\t\tdesktopPane.add(umf);\n\t}", "public static Result startNewForm() {\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tDecision firstDecision = CMSGuidedFormFill.startNewForm(formName,\r\n\t\t\t\tCMSSession.getEmployeeName(), CMSSession.getEmployeeId());\r\n\t\treturn ok(backdrop.render(firstDecision));\r\n\t}", "public void showEditCustomerDialog(Customer customer) {\n \t\n \ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApplication.class.getResource(\"view/CustomerEditDialog.fxml\"));\n\t\t\tAnchorPane page = (AnchorPane) loader.load();\n\t\t\tStage editCustomerDialogStage = new Stage(); \n\t\t\teditCustomerDialogStage.setTitle(\"Edit Person\");\n\t\t\teditCustomerDialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\teditCustomerDialogStage.initOwner(searchCustomerDialogStage);\n\t\t\tScene scene = new Scene(page);\n\t\t\teditCustomerDialogStage.setScene(scene);\n\t\t\tCustomerEditDialogController customerEditDialogController = loader.getController();\n\t\t\tcustomerEditDialogController.setDialogStage(editCustomerDialogStage);\n\t\t\tcustomerEditDialogController.setCustomer(customer);\n\t\t\tcustomerEditDialogController.setSearchCustomerController(this.searchCustomerDialogController);\n\t\t\teditCustomerDialogStage.showAndWait();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t }\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void switchFrontEnd() {\n\t\tfor(ABoat b : ABmap.instance().boats) {\n\t\t\t((JComboBox<String>)components.get(\"nameComboBox\")).addItem(b.name);\n\t\t}\n\t\t((JPanel)components.get(\"initPanel\")).setVisible(false);\n\t\t((JPanel)components.get(\"controlPanel\")).setBounds(931, 11, 253, 185);\n\t\t((JPanel)components.get(\"controlPanel\")).setVisible(true);\n\t\t((JPanel)components.get(\"generalInfoPanel\")).setBounds(931, 230, 253, 208);\n\t\t((JPanel)components.get(\"generalInfoPanel\")).setVisible(true);\n\t\t((JPanel)components.get(\"boatInfoPanel\")).setBounds(931, 450, 253, 252);\n\t\t((JPanel)components.get(\"boatInfoPanel\")).setVisible(true);\n\t}", "public void launchMainScreen() {\n\t\tmainWindow = new MainGameScreen(this);\n\t}", "public void displayMainScreen(ActionEvent event) throws IOException {\n Parent parent = FXMLLoader.load(getClass().getResource(\"/View_Controller/MainScreen.fxml\"));\n Scene targetScene = new Scene(parent);\n\n Stage window = (Stage) ((Button) event.getSource()).getScene().getWindow();\n window.setScene(targetScene);\n window.show();\n }", "@Override protected void startup() {\n LoganoView main = new LoganoView(this);\n JFrame frame = main.getFrame();\n\n \n show(main);\n\n frame.setMinimumSize(new Dimension(800, 600));\n frame.setExtendedState(JFrame.MAXIMIZED_BOTH);\n\n FrmLogin frmLogin = new FrmLogin();\n Helper.showForm(frmLogin);\n frmLogin.setLocationRelativeTo(frame);\n }", "public void switchToCreateAccount() {\r\n\t\tlayout.show(this, \"createPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "@FXML\r\n\tvoid menu_btn_clicked(MouseEvent event) {\r\n\t\tswitchScenes(\"/client/boundry/MarketingAgentMenuWelcomeForm.fxml\",\r\n\t\t\t\t\"/client/boundry/MarketingAgentMainCustomer.css\");\r\n\t}", "private void initialize() {\n\t\tChoiceScreen = new JFrame();\n\t\tChoiceScreen.setFont(new Font(\"Silom\", Font.PLAIN, 12));\n\t\tChoiceScreen.setType(Type.POPUP);\n\t\tChoiceScreen.setTitle(\"Bank of Programmers - Services\");\n\t\tChoiceScreen.getContentPane().setBackground(new Color(30, 144, 255));\n\t\tChoiceScreen.getContentPane().setLayout(null);\n\t\t\n\t\t\n\t\tJLabel lblBankNameLabel = new JLabel(\"BANK OF PROGRAMMERS\");\n\t\tlblBankNameLabel.setBounds(0, 0, 517, 52);\n\t\tlblBankNameLabel.setForeground(new Color(255, 255, 255));\n\t\tlblBankNameLabel.setFont(new Font(\"Silom\", Font.PLAIN, 40));\n\t\tlblBankNameLabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tChoiceScreen.getContentPane().add(lblBankNameLabel);\n\t\t\n\t\tJButton btnAtm = new JButton(\"ATM\");\n\t\tbtnAtm.setForeground(new Color(30, 144, 255));\n\t\tbtnAtm.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tChoiceScreen.dispose();\n\t\t\t\tATM atm = new ATM();\n\t\t\t\tatm.ATMLogIn.setVisible(true);\n\t\t\t}\n\t\t});\n\t\tbtnAtm.setFont(new Font(\"Silom\", Font.PLAIN, 22));\n\t\tbtnAtm.setBounds(89, 129, 337, 92);\n\t\tChoiceScreen.getContentPane().add(btnAtm);\n\t\t\n\t\tJButton btnBank = new JButton(\"BANK (Create an Account!)\");\n\t\tbtnBank.setForeground(new Color(30, 144, 255));\n\t\tbtnBank.setFont(new Font(\"Silom\", Font.PLAIN, 22));\n\t\tbtnBank.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tChoiceScreen.dispose();\n\t\t\t\tAccountTypes acty = new AccountTypes();\n\t\t\t\tacty.AccountType.setVisible(true);\n\t\t\t}\n\t\t});\n\t\tbtnBank.setBounds(89, 270, 337, 92);\n\t\tChoiceScreen.getContentPane().add(btnBank);\n\t\tChoiceScreen.getContentPane().setFocusTraversalPolicy(new FocusTraversalOnArray(new Component[]{lblBankNameLabel, btnAtm, btnBank}));\n\t\tChoiceScreen.setBounds(100, 100, 517, 475);\n\t\tChoiceScreen.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tDimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tChoiceScreen.setLocation(dim.width/2-ChoiceScreen.getSize().width/2, dim.height/2-ChoiceScreen.getSize().height/2);\n\t\t\n\t}", "public MainKredit() {\n initComponents();\n setLocationRelativeTo(null);\n setAwalTampilan();\n setTitle(\"APLIKASI PENGAJUAN KREDIT\");\n }", "@FXML\n private void switchHome(ActionEvent event) {\n setNode(mainForm);\n }", "private void navigationAdminScreen(UserInfo usn) {\n finish();\n }", "public Customer_Edit() {\n initComponents();\n getMenu_Catagory();\n getMenu();\n showmenu_table();\n getPromotion();\n getPromotion_Menu();\n showpromotion_table();\n getIngredient();\n getStock();\n if(c.getmaintenance()==true){\n t.setid(\"01\");\n }else{\n }\n getorder();\n getorder_menu();\n table_number_txt.setText(t.getid());\n showorder_table();\n }" ]
[ "0.74262583", "0.7214529", "0.68940485", "0.67108905", "0.66991776", "0.6682688", "0.66643965", "0.6632337", "0.65935075", "0.65536606", "0.64563644", "0.64529544", "0.6449966", "0.6431052", "0.6391256", "0.63624376", "0.6361551", "0.63557357", "0.6351482", "0.63490343", "0.634889", "0.63344157", "0.63340026", "0.632299", "0.631253", "0.6308603", "0.630714", "0.62915325", "0.62696004", "0.6268324", "0.6261367", "0.6255014", "0.62338346", "0.6217228", "0.6186783", "0.61846364", "0.61712456", "0.614398", "0.61400557", "0.6138044", "0.6130879", "0.61292815", "0.6126919", "0.61226946", "0.6111185", "0.60914767", "0.6084831", "0.6076468", "0.6074039", "0.6060073", "0.60597765", "0.605421", "0.60488755", "0.60447973", "0.6044148", "0.6043683", "0.6038537", "0.60368943", "0.6035455", "0.6024283", "0.6023187", "0.6019525", "0.60110444", "0.6008289", "0.6007644", "0.6004263", "0.60038227", "0.5998549", "0.59938425", "0.5990804", "0.5985903", "0.5983505", "0.597414", "0.59740853", "0.59734464", "0.59731865", "0.59611255", "0.5954011", "0.59528005", "0.59463215", "0.5935051", "0.5934435", "0.5932535", "0.59307927", "0.5926987", "0.591756", "0.59137404", "0.59099907", "0.58974576", "0.5894184", "0.5892383", "0.5892221", "0.58907163", "0.58878034", "0.58853483", "0.5883076", "0.5880247", "0.58749646", "0.58684313", "0.5865835" ]
0.65973777
8
this method delete sale pattern if sale is clicked and it's not "active" at the DB after appropriate alert
@FXML void delete_btn_clicked(MouseEvent event) { if (sales_table.getSelectionModel().getSelectedItem() == null) { Alert alert3 = new Alert(AlertType.ERROR); alert3.setTitle("ERROR"); alert3.setHeaderText(null); alert3.setContentText("Please select a sale to delete"); alert3.show(); return; } if (sales_table.getSelectionModel().getSelectedItem().getStatus().toLowerCase().equals("active")) { Alert alert2 = new Alert(AlertType.ERROR); alert2.setTitle("The sale is active"); alert2.setHeaderText(null); alert2.setContentText("Active sale cannot be deleted"); alert2.show(); return; } Alert alert = new Alert(AlertType.WARNING, "Are you sure you delete the sale pattern?", ButtonType.YES, ButtonType.NO); alert.setTitle("Back"); alert.setHeaderText(null); alert.showAndWait(); if (alert.getResult() == ButtonType.YES) { if (sales_table.getSelectionModel().getSelectedItem().getStatus().equals("Un-active")) { // query for delete from DB String query1 = "Delete from sale_pattern where salePatternTag = " + sales_table.getSelectionModel().getSelectedItem().getSalePatternTag().toString(); Message message1 = new Message(MessageType.UPDATEINFO, "MarketingAgentSalesMainController_delete", query1); MainClientGUI.client.handleMessageFromClientUI(message1); // successful alert Alert alert1 = new Alert(AlertType.CONFIRMATION); alert1.setTitle("Sale deleted"); alert1.setHeaderText(null); alert1.setContentText("The sale pattern deleted successfully"); alert1.show(); switchScenes("/client/boundry/MarketingAgentSalesMainForm.fxml", "/client/boundry/MarketingAgentMainCustomer.css"); } } else { return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void delete(Sale sale) {\n sale_dao.delete(sale);\n }", "protected boolean afterDelete() {\n if (!DOCSTATUS_Drafted.equals(getDocStatus())) {\n JOptionPane.showMessageDialog(null, \"El documento no se puede eliminar ya que no esta en Estado Borrador.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n return false;\n } \n \n //C_AllocationLine\n String sql = \"DELETE FROM C_AllocationLine \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PaymentAllocate\n sql = \"DELETE FROM C_PaymentAllocate \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_VALORPAGO\n sql = \"DELETE FROM C_VALORPAGO \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PAYMENTVALORES\n sql = \"DELETE FROM C_PAYMENTVALORES \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PAYMENTRET\n sql = \"DELETE FROM C_PAYMENTRET \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n return true;\n\n }", "@Override\n public void onClick(View v) {\n long sid = allListOkLast.get(position).getId();\n Query<GpsPointDetailData> build = db.getGpsPointDetailDao().queryBuilder().where(GpsPointDetailDao.Properties.Id.eq(sid)).build();\n db.deleteGpsPointDetailData(sid);\n adapter.removeItem(position);\n }", "@Override\r\n\tpublic void PressBtnDel(int position) {\n\t\tnoteGlobal.deletePlan(position, dateTextView.getText().toString());\r\n\t\tMainActivity.mainService.updateAlarm();\r\n\t\taddPlan_View();\r\n\t}", "private void buttonToDeleteMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_buttonToDeleteMouseClicked\n ActivityService activityService = new ActivityService();\n activityService\n .setId(this.id)\n .setUser(this.dashboard.user);\n try {\n activityService.delete();\n this.setVisible(false);\n this.dashboard.refreshUI();\n }catch (Exception err) {\n this.alert.showMessageDialog(null, \"gagal menghapus data\");\n }\n }", "@Override\n public void onClick(View view) {\n\n mDatabase.delete(shop.getName());\n\n //refresh the activity page.\n ((Activity)context).finish();\n context.startActivity(((Activity) context).getIntent());\n }", "protected void deleteClicked(View view){\n PriceFinder pf = new PriceFinder();\n pf = this.itm.getItem(this.position);\n this.itm.removeItem(pf);\n try {\n save();\n } catch (IOException e) {\n e.printStackTrace();\n }\n finish();\n }", "public String btn_delete_action()\n {\n int n = this.getDataTableSemental().getRowCount();\n ArrayList<SementalDTO> selected = new ArrayList();\n for (int i = 0; i < n; i++) { //Obtener elementos seleccionados\n this.getDataTableSemental().setRowIndex(i);\n SementalDTO aux = (SementalDTO) this.\n getDataTableSemental().getRowData();\n if (aux.isSelected()) {\n selected.add(aux);\n }\n }\n if(selected == null || selected.size() == 0)\n {\n //En caso de que no se seleccione ningun elemento\n MessageBean.setErrorMessageFromBundle(\"not_selected\", this.getMyLocale());\n return null;\n }\n else if(selected.size() == 1)\n { //En caso de que solo se seleccione un elemento\n \n //si tiene hijos o asociacions despliega el mensaje de alerta\n if(getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n haveSemenGathering(\n selected.get(0).getSementalId()))\n {\n this.getAlertMessage().setRendered(true);\n this.getMainPanel().setRendered(false);\n getgermplasm$SementalSessionBean().setDeleteSemental(\n selected.get(0).getSementalId());\n }\n else\n {\n //delete the accession\n getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n deleteSemental(selected.get(0).getSementalId());\n //refresh the list\n getgermplasm$SementalSessionBean().getPagination().deleteItem();\n getgermplasm$SementalSessionBean().getPagination().refreshList();\n getgermplasm$SemenGatheringSessionBean().setPagination(null);\n MessageBean.setSuccessMessageFromBundle(\"delete_semental_success\", this.getMyLocale());\n }\n \n return null;\n }\n else{ //En caso de que sea seleccion multiple\n MessageBean.setErrorMessageFromBundle(\"not_yet\", this.getMyLocale());\n return null;\n }\n }", "public String btn_confirm_delete_action()\n {\n //delete the accession\n getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n deleteSemental(\n getgermplasm$SementalSessionBean().getDeleteSemental());\n //refresh the list\n getgermplasm$SementalSessionBean().getPagination().deleteItem();\n getgermplasm$SementalSessionBean().getPagination().refreshList();\n getgermplasm$SemenGatheringSessionBean().setPagination(null);\n \n //show and hidde panels\n this.getMainPanel().setRendered(true);\n this.getAlertMessage().setRendered(false);\n MessageBean.setSuccessMessageFromBundle(\"delete_semental_success\", this.getMyLocale());\n \n return null;\n }", "private void delete() {\n\t\tComponents.questionDialog().message(\"Are you sure?\").callback(answeredYes -> {\n\n\t\t\t// if confirmed, delete the current product PropertyBox\n\t\t\tdatastore.delete(TARGET, viewForm.getValue());\n\t\t\t// Notify the user\n\t\t\tNotification.show(\"Product deleted\", Type.TRAY_NOTIFICATION);\n\n\t\t\t// navigate back\n\t\t\tViewNavigator.require().navigateBack();\n\n\t\t}).open();\n\t}", "public void onClick(DialogInterface dialog, int id) {\n realm.beginTransaction();\n RealmResults <Model_reservarSalas> excluirAgendamento = realm.where(Model_reservarSalas.class)\n .equalTo(\"FkSalas_letraBloco\",buscarSalasReservadas.get(position).getFkSalas_letraBloco())\n .equalTo(\"FkSala_numSala\",buscarSalasReservadas.get(position).getFkSala_numSala())\n .equalTo(\"data\",buscarSalasReservadas.get(position).getData())\n .equalTo(\"turno\",buscarSalasReservadas.get(position).getTurno())\n .findAll();\n excluirAgendamento.deleteAllFromRealm();\n realm.commitTransaction();\n onResume();\n Toast.makeText(getContext(), \"Agendamento deletado com sucesso.\", Toast.LENGTH_SHORT).show();\n }", "public void deleteSales(int saleId) throws SQLException, SaleDoesnotExistException, ConnectionCorruptionException {\n if (salesLogContains(saleId)) {\n Sale saleToRemove = DatabaseSelectHelper.getSaleById(saleId);\n salesLog.remove(saleToRemove);\n salesCounter--;\n } else {\n\n throw new SaleDoesnotExistException();\n }\n\n }", "public void delsal(String idi) {\n\t\tourDatabase.delete(DATABASE_TABLE2, Sales_Id + \"=\" +idi, null);\n\t\t\n\t}", "@Override\n public void onClick(View v) {\n for (ObjectStock s : product.getStocks()) {\n stockDataSource.deleteStock(s);\n }\n\n productDataSource.deleteProduct(product);\n popupWindowIsOn = false;\n popupWindow.dismiss();\n Toast toast = Toast.makeText(getBaseContext(),\n R.string.product_deleted, Toast.LENGTH_LONG);\n\n toast.show();\n\n finish();\n Intent i = new Intent(getBaseContext(), MyProducts.class);\n startActivity(i);\n }", "@Override\n public void onClick(View view) {\n StudentDelete(TempItem);\n\n }", "@FXML\n\tprivate void deleteButtonAction(ActionEvent clickEvent) {\n\t\t\n\t\tPart deletePartFromProduct = partListProductTable.getSelectionModel().getSelectedItem();\n\t\t\n\t\tif (deletePartFromProduct != null) {\n\t\t\t\n\t\t\tAlert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Pressing OK will remove the part from the product.\\n\\n\" + \"Are you sure you want to remove the part?\");\n\t\t\n\t\t\tOptional<ButtonType> result = alert.showAndWait();\n\t\t\n\t\t\tif (result.isPresent() && result.get() == ButtonType.OK) {\n\t\t\t\n\t\t\t\tdummyList.remove(deletePartFromProduct);\n\n\t\t\t}\n\t\t}\n\t}", "private static void deleteTest(int no) {\n\t\tboolean result=new CartDao().delete(no);\r\n\t\tif(!result) System.out.println(\"deleteTest fail\");\r\n\t}", "@Override\r\n public void onClick(DialogInterface dialog, int which) {\n subjectDAO.deleteFridayEntry(employee);\r\n subjectListAdapter.remove(employee);\r\n Toast.makeText(getActivity(), \"Subject Deleted\",\r\n Toast.LENGTH_SHORT).show();\r\n\r\n }", "@Override\n public void onClick(View v) {\n\n CouSyncDb.getInstance(getApplicationContext()).deleteSync(bean1, new OnOperateFinish() {\n @Override\n public void onFinish(int operateType, Object result) {\n text.setText(\"delete row ID = \" + result.toString());\n }\n });\n }", "@Override\n public void onClick(View view) {\n final ShoppingList obj = itemList.get(getPosition());\n\n switch (view.getId()) {\n\n case R.id.btn_delete:\n\n\n AlertDialog.Builder builder = new AlertDialog.Builder(view.getContext());\n builder.setTitle(R.string.app_name);\n builder.setMessage(\"Do you want to remove shopping list ?\");\n //builder.setIcon(R.drawable.ic_launcher_background);\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n\n\n if (mContext instanceof ShoppingListActivity) {\n // CartActivity.TotalPrice = (CartActivity.TotalPrice-removedItem.ItemPrice);\n Log.d(\"test\",\"show msg call2\");\n ((ShoppingListActivity) mContext).remove(obj.Id);\n }\n\n\n // stop chronometer here\n\n }\n });\n builder.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n alert.getButton(AlertDialog.BUTTON_NEGATIVE).setTextColor(ContextCompat.getColor(view.getContext(), R.color.black));\n alert.getButton(AlertDialog.BUTTON_POSITIVE).setTextColor(ContextCompat.getColor(view.getContext(), R.color.black));\n\n\n break;\n\n case R.id.txt_name:\n Log.d(\"testme\",\"show listitem\");\n ShoppigListItemActivity.ListName=obj.Name;\n ShoppigListItemActivity.ListId=obj.Id;\n ActivityManager.startActivity(view.getContext(),ShoppigListItemActivity.class);\n\n break;\n\n\n\n\n\n }\n\n\n\n }", "private void delete() {\n AltDatabase.getInstance().getAlts().remove(getCurrentAsEditable());\n if (selectedAccountIndex > 0)\n selectedAccountIndex--;\n updateQueried();\n updateButtons();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tAlertDialog.Builder alertbox = new AlertDialog.Builder(MainActivity.this);\n\t\t\t\talertbox.setCancelable(true);\n\t\t\t\talertbox.setMessage(\"Are you sure you want to delete ?\");\n\t\t\t\tSystem.out.println(\"Inside 2 OnClickListener() !!!!\");\n\t\t\t\t\n\t\t\t\talertbox.setPositiveButton(\"Yes\",new DialogInterface.OnClickListener() {\n\n\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\n\t\t\t\t\t\t\t\t//Intent shopIntent = new Intent(ShopActivity.this,ShopActivity.class);\n\t\t\t\t\t\t\t\t//featuredIntent.putExtra(EXTRA_MESSAGE, message);\n\t\t\t\t\t\t\t\t//startActivity(shopIntent);\n\t\t\t\t\t\t\t\tSystem.out.println(\"Inside Click !!!!\");\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\"Record Deleted...\",\tToast.LENGTH_SHORT).show();\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t});\n\t\t\t\talertbox.setNegativeButton(\"No\",new DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\talertbox.show();\n\t\t\t\t\n\t\t\t}", "public void saleAct() {\t\r\n\t\t\r\n\t\tif(createWine() != null) {\r\n\t\t\t\r\n\t\t\ttext_amount =String.valueOf( cus.saleTransaction(createWine()));\r\n\t\t\twine_name.setText(name.getText());\r\n\t\t\tamount.setText(\" £ \" + text_amount + \" \" );\r\n\t\t\tbalance.setText(\" £ \" + isCredit((double)cus.getAccount() / 100.00) + \" \");\r\n\t\t\t\r\n\t\t\t//reset all textfield\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.out.println(\"btnDelete\");\n\t\t\t\tint i = table.getSelectedRow();\n\t\t\t\tif (i >= 0) {\n\t\t\t\t\tSystem.out.println(\"row-Delete\" + i);\n\t\t\t\t\tSystem.out.println(\"row-Delete\" + textSuppD.getText());\n\t\t\t\t\tint suppID = Integer.parseInt(textSuppD.getText().trim());\n\n\t\t\t\t\tDatabase db = new Database();\n\t\t\t\t\tSuppliersDAO suppDAO = new SuppliersDAO(db);\n\t\t\t\t\tSuppliersModel suppModel = new SuppliersModel();\n\t\t\t\t\tsuppModel.setSuppliers_id(suppID);\n\t\t\t\t\tsuppDAO.Delete(suppModel);\n\t\t\t\t\tdb.commit();\n\t\t\t\t\tdb.close();\n\n\t\t\t\t\tmodel.removeRow(i);\n\t\t\t\t} else {\n\t\t\t\t}\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, final int position, long id) {\n AlertDialog.Builder alert = new AlertDialog.Builder(StressReportsActivity.this);\n alert.setMessage(\"Confirm delete?\");\n alert.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int whichButton) {\n userDb.deleteStressSession(stressList.get(position-1));\n //Toast to let user know meal was deleted\n Context context = StressReportsActivity.this;\n CharSequence text = \"Session deleted\";\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n //refresh list\n displayStressList(getCurrentFocus());\n }\n });\n alert.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener()\n {\n public void onClick(DialogInterface dialog, int whichButton) {}\n });\n alert.show();\n }", "private void toDelete() {\n if(toCount()==0)\n {\n JOptionPane.showMessageDialog(rootPane,\"No paint detail has been currently added\");\n }\n else\n {\n String[] choices={\"Delete First Row\",\"Delete Last Row\",\"Delete With Index\"};\n int option=JOptionPane.showOptionDialog(rootPane, \"How would you like to delete data?\", \"Delete Data\", WIDTH, HEIGHT,null , choices, NORMAL);\n if(option==0)\n {\n jtModel.removeRow(toCount()-toCount());\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted first row\");\n }\n else if(option==1)\n {\n jtModel.removeRow(toCount()-1);\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted last row\");\n }\n else if(option==2)\n {\n toDeletIndex();\n }\n else\n {\n \n }\n }\n }", "public void onClick(View view){\n mDatabaseHelper.deleteMeal(selectedID,selectedName);\n finish();\n }", "public boolean deletePalvelupisteet();", "@Override\n public int delete( J34SiscomexOrigemDi j34SiscomexOrigemDi ) {\n return super.doDelete(j34SiscomexOrigemDi);\n }", "public void delLift(){\n //https://stackoverflow.com/questions/36747369/how-to-show-a-pop-up-in-android-studio-to-confirm-an-order\n AlertDialog.Builder builder = new AlertDialog.Builder(SetsPage.this);\n builder.setCancelable(true);\n builder.setTitle(\"Confirm Delete\");\n builder.setMessage(\"Are you sure you want to delete this lift?\");\n builder.setPositiveButton(\"Confirm Delete\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n lift.setId(lift.getId()*-1);\n Intent intent=new Intent(SetsPage.this, LiftsPage.class);\n intent.putExtra(\"lift\", lift);\n setResult(Activity.RESULT_OK, intent);\n finish();\n }\n });\n builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "@Override\n public void onClick(View view) {\n long result = typeBookDAO.deleteTypeBook(typeBook.id);\n\n if (result < 0) {\n\n Toast.makeText(context,\"Xoa ko thanh cong!!!\",Toast.LENGTH_SHORT).show();\n\n } else {\n Toast.makeText(context,\"Xoa thanh cong!!!\",Toast.LENGTH_SHORT).show();\n // xoa typebook trong arraylist\n arrayList.remove(position);\n\n // f5 adapter\n notifyDataSetChanged();\n\n }\n\n\n\n }", "@FXML\n public void deleteSet(MouseEvent e) {\n //confirm first\n Alert confirmAlert = new Alert(AlertType.CONFIRMATION, \"\", ButtonType.YES, ButtonType.NO);\n confirmAlert.setHeaderText(\"Are you sure you want to delete this set?\");\n Optional<ButtonType> result = confirmAlert.showAndWait();\n if (result.get() == ButtonType.YES) {\n //delete from database\n try (\n Connection conn = dao.getConnection();\n PreparedStatement stmt = conn.prepareStatement(\"DELETE FROM Theory WHERE Title = ?\");\n ) {\n conn.setAutoCommit(false);\n stmt.setString(1, txtTitle.getText());\n stmt.executeUpdate();\n conn.commit();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n //delete from interface\n VBox vbxCards = (VBox) apnSetRow.getParent();\n vbxCards.getChildren().remove(apnSetRow);\n }\n }", "@FXML\n void deleteBooking(ActionEvent event) throws IOException, ClassNotFoundException {\n Booking selectedBooking = table.getSelectionModel().getSelectedItem();\n if (selectedBooking != null) {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Delete booking\");\n alert.setHeaderText(\"This will delete the booking permanently\");\n alert.setContentText(\"Are you sure you want to do this?\");\n Optional<ButtonType> result = alert.showAndWait();\n if (result.get() == ButtonType.OK) {\n for (Ticket ticket:selectedBooking.getTickets()) {\n for (Showing showing:Main.getShowings().getShowings()) {\n if (showing.getFilm().getTitle().equals(ticket.getShowing().getFilm().getTitle())&&showing.getShowingTimeFormatted().equals(ticket.getShowing().getShowingTimeFormatted())&&showing.getShowingDateFormatted(false).equals(showing.getShowingDateFormatted(false))) {\n String row = ticket.getSeat().getRowLetter();\n int number = ticket.getSeat().getSeatNumber();\n showing.getSeat(row, number).setBookingStatus(false);\n }\n }\n }\n Main.getBookings().removeBooking(selectedBooking);\n populateTableView();\n Main.getBookings().saveBookings();\n Main.getShowings().saveShowings();\n }\n }\n }", "@FXML\r\n public void onDelete() {\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setTitle(\"Mensagem\");\r\n alert.setHeaderText(\"\");\r\n alert.setContentText(\"Deseja excluir?\");\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.get() == ButtonType.OK) {\r\n AlunoModel alunoModel = tabelaAluno.getItems().get(tabelaAluno.getSelectionModel().getSelectedIndex());\r\n\r\n if (AlunoDAO.executeUpdates(alunoModel, AlunoDAO.DELETE)) {\r\n tabelaAluno.getItems().remove(tabelaAluno.getSelectionModel().getSelectedIndex());\r\n alert(\"Excluido com sucesso!\");\r\n desabilitarCampos();\r\n } else {\r\n alert(\"Não foi possivel excluir\");\r\n }\r\n }\r\n }", "@SkipValidation\n public String deleteImportantNews() {\n Map session = ActionContext.getContext().getSession();\n EmployeesVO oEmp = (EmployeesVO) session.get(\"EMPLOYEE_OBJECT\");\n\n // To Delete Important News.\n important.setUpdatedBy(oEmp);\n impService.deleteImportantNews(important);\n addActionMessage(getText(\"Deleted Successfully\"));\n\n return SUCCESS;\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n new AgendamentoDAO(MainActivity.this).delete(agendamentos.get(position));\n\n // Remover o item da lista de agendamentos que está em memória\n agendamentos.remove(position);\n\n // Atualizar lista\n adapter.notifyItemRemoved(position);\n\n // Avisar o usuário\n Toast.makeText(MainActivity.this, R.string.agendamento_excluido, Toast.LENGTH_LONG).show();\n }", "@FXML\r\n public void deleteTreatmentButton(){\r\n int sIndex = treatmentTabletv.getSelectionModel().getSelectedIndex();\r\n String sID = treatmentData.get(sIndex).getIdProperty();\r\n\r\n String deleteTreatment = \"delete from treatment where treatmentID = ?\";\r\n try{\r\n ps = mysql.prepareStatement(deleteTreatment);\r\n ps.setString(1,sID);\r\n ps.executeUpdate();\r\n ps.close();\r\n ps = null;\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n //maybe more in this exception\r\n }\r\n\r\n treatmentData.remove(sIndex);\r\n }", "private void deleteExec(){\r\n\t\tList<HashMap<String,String>> selectedDatas=ViewUtil.getSelectedData(jTable1);\r\n\t\tif(selectedDatas.size()<1){\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Please select at least 1 item to delete\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tint options = 1;\r\n\t\tif(selectedDatas.size() ==1 ){\r\n\t\t\toptions = JOptionPane.showConfirmDialog(null, \"Are you sure to delete this Item ?\", \"Info\",JOptionPane.YES_NO_OPTION);\r\n\t\t}else{\r\n\t\t\toptions = JOptionPane.showConfirmDialog(null, \"Are you sure to delete these \"+selectedDatas.size()+\" Items ?\", \"Info\",JOptionPane.YES_NO_OPTION);\r\n\t\t}\r\n\t\tif(options==1){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tfor(HashMap<String,String> map:selectedDatas){\r\n\t\t\t\r\n\t\t\tdiscountService.deleteDiscountByMap(NameConverter.convertViewMap2PhysicMap(map, \"Discount\"));\r\n\t\t}\r\n\t\tthis.initDatas();\r\n\t}", "@Test\n @DisplayName(\"Testataan tilausten poisto tietokannasta\")\n void deleteReservation() {\n TablesEntity table = new TablesEntity();\n table.setSeats(2);\n tablesDao.createTable(table);\n\n ReservationsEntity reservation = new ReservationsEntity(\"Antero\", \"10073819\", new Date(System.currentTimeMillis()), table.getId(), new Time(1000), new Time(2000));\n reservationsDao.createReservation(reservation);\n\n // Confirm that the reservation is in DB\n ReservationsEntity reservationFromDb = reservationsDao.getReservation(reservation.getId());\n assertEquals(reservation, reservationFromDb);\n\n // Delete reservation and confirm that it's not in the DB\n reservationsDao.deleteReservation(reservation);\n\n reservationFromDb = reservationsDao.getReservation(reservation.getId());\n assertEquals(null, reservationFromDb);\n\n }", "@Test(groups = \"Transactions Tests\", description = \"Delete transaction\")\n\tpublic void deleteTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"Bonus\");\n\t\tTransactionsScreen.clickDeleteTransactionOption();\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"Bonus\");\n\t\tTransactionsScreen.clickDeleteTransactionOption();\n\t\tTransactionsScreen.transactionItens(\"Edited Transaction test\").shouldHave(size(0));\n\t\ttest.log(Status.PASS, \"Transaction successfully deleted\");\n\n\t\t//Testing if there no transaction in the 'Double Entry' account and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItens(\"Bonus\").shouldHave(size(0));\n\t\ttest.log(Status.PASS, \"Transaction successfully deleted from the 'Double Entry' account\");\n\n\t}", "@Override\n\tpublic int delete(PrestationCDI obj) throws DAOException {\n\t\treturn 0;\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString RemoveOrder=\"Delete from UserFace1 where (ID=?)\";\r\n\t\t\t\ttry {\r\n\t\t\t\t\tst=con.prepareStatement(RemoveOrder);\r\n\t\t\t\t\tst.setInt(1,Integer.parseInt(idField.getText()));\r\n\t\t\t\t\tint i = st.executeUpdate();\r\n //Executing MySQL Update Query\t\t\t\t\t\t+++++++++++++++++++++++\r\n if(i==1){\r\n JOptionPane.showMessageDialog(panel,\"Successfully Removed\");\r\n }\r\n \r\n refreshTable();\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}", "public Boolean deleteSale(int vehicle_id) throws SQLException{\n\t\tConnection dbConnection = null;\n\t\tPreparedStatement preparedStatement= null;\n\t\t// query to delete a vehicle based on ID\n\t\tString query = \"DELETE FROM sales WHERE vehicle_id = ?\";\n\t\ttry{\n\t\t\t// connect to database\n\t\t\tdbConnection = getDBConnection();\n\t\t\tpreparedStatement = dbConnection.prepareStatement(query);\n\t\t\t// set variable in the questionmark\n\t\t\tpreparedStatement.setInt(1,vehicle_id);\n\t\t\tSystem.out.println(\"DBQuery = \"+query);\n\t\t\t// execute query\n\t\t\tpreparedStatement.executeUpdate();\n\t\t} catch(Exception e){return false;}\n\t\t\n\t\tfinally{\n\t\t\t// close connection\n\t\t\tif (preparedStatement != null){preparedStatement.close();}\n\t\t\tif (dbConnection != null){dbConnection.close();}\n\t\t}\n\t\treturn true;\n\t}", "private void deleteButton2ActionPerformed(ActionEvent e) {\n // TODO add your code here\n PlanBuffer.setBuffer(\"\");\n PlanBuffer.setBuffer(this.list.get(this.page*6 + 1).getPlanID());\n String planID = PlanBuffer.getBuffer();\n PlanFunction.DeletePlanByPlanID(planID);\n this.dispose();\n PlanHomeCoach.run();\n }", "public void deleteUniversalDeal() {\r\n/* 149 */ this._has_universalDeal = false;\r\n/* */ }", "public static void click_delete() {\n\t\tCommonUtils.alertContentXpath();\n\t\tif (AndroidLocators.findElements_With_Id(\"alertTitle\").size() > 0) {\n\t\t\tAndroidLocators.clickElementusingXPath(\"//*[@text='DELETE']\");\n\t\t} else if (AndroidLocators.findElements_With_ResourceId(\n\t\t\t\t\"new UiSelector().resourceId(\\\"in.spoors.effortplusbeta:id/alertTitle\\\")\")\n\t\t\t\t.size() > 0) {\n\t\t\tAndroidLocators.clickElementusingResourceId(\"android:id/button1\");\n\t\t} else {\n\t\t\tAndroidLocators.clickElementusingXPath(\"//*[@text='DELETE']\");\n\t\t}\n\t}", "public void botaodelete(View v) {\n startActivity(new Intent(this, com.example.appstore.DeleteSale.class));\n }", "@FXML\n\t private void deleteProduct (ActionEvent actionEvent) throws SQLException, ClassNotFoundException {\n\t try {\n\t ProductDAO.deleteProdWithId(prodIdText.getText());\n\t resultArea.setText(\"Product deleted! Product id: \" + prodIdText.getText() + \"\\n\");\n\t } catch (SQLException e) {\n\t resultArea.setText(\"Problem occurred while deleting product \" + e);\n\t throw e;\n\t }\n\t }", "@Transactional\n\t@Override\n\tpublic boolean deleteSalesorder(SalesorderModel salesorder)\n\t\t\tthrows Exception {\n\t\treturn false;\n\t}", "public void delete() {\n \t\t try(Connection con = DB.sql2o.open()) {\n \t\t\t String sql = \"DELETE FROM sightings where id=:id\";\n\t\t\t con.createQuery(sql)\n\t\t\t.addParameter(\"id\", this.id)\n\t\t\t.executeUpdate();\n\n \t\t }\n \t }", "private void deleteBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_deleteBtnMouseClicked\n\n String id = searchidTxt.getText();\n try {\n\n String Query = \"DELETE from stock where Product_ID =?\";\n\n pstm = con.prepareStatement(Query);\n pstm.setInt(1, Integer.parseInt(id));\n pstm.executeUpdate();\n\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"ID Not Found \");\n }\n //Refresh Table\n refTable();\n\n //by Default hide Update button\n deleteBtn.setVisible(false);\n\n //Clear all Fields\n clearFields();\n }", "@Transactional\n\t@Override\n\tpublic boolean deleteSalesorderbreakdown(\n\t\t\tSalesorderbreakdownModel salesorderbreakdown) throws Exception {\n\t\treturn false;\n\t}", "@Override\n public void onClick(View v) {\n ((CreateDocketActivityPart2) activity).deleteSpareParts(pos);\n }", "@Test\n public void deleteCatalogSaleTest() {\n Integer id = null;\n // Void response = api.deleteCatalogSale(id);\n\n // TODO: test validations\n }", "@Override\r\n\tpublic String deleteDeal() {\n\t\tif(!SysFun.isNullOrEmpty(id)) {\r\n\t\t\tLong iId=SysFun.parseLong(id);\r\n\t\t\tHeadLine headLine = headLineService.load(iId);\r\n\t\t\tString filePath = ServletActionContext.getServletContext().getRealPath(\"/\");\r\n\t\t\tnew File(filePath+headLine.getLineImg()).delete();\r\n\t\t\tLong result=headLineService.delete(iId);\r\n\t\t\tif(result>0) {\r\n\t\t\t\treturn \"go_ok\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn \"go_ok\";\r\n\t}", "@Override\n\tpublic Item delete() {\n\t\treadAll();\n\t\tLOGGER.info(\"\\n\");\n\t\t//user can select either to delete a customer from system with either their id or name\n\t\tLOGGER.info(\"Do you want to delete record by Item ID\");\n\t\tlong id = util.getLong();\n\t\titemDAO.deleteById(id);\n\t\t\t\t\n\t\t\t\t\n\t\treturn null;\n\t}", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tSMSDao mSMSDao = new SMSDao(mContext);\n\t\t\t\t\t\tmSMSDao.deleteSMS(String.valueOf(mSMSList.get(position).getSort()));\n\t\t\t\t\t\tmSMSList.remove(position);\n\t\t\t\t\t\tmyAdapter.notifyDataSetChanged();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tSMSDao mSMSDao = new SMSDao(mContext);\n\t\t\t\t\t\tmSMSDao.deleteSMS(String.valueOf(mSMSList.get(position).getSort()));\n\t\t\t\t\t\tmSMSList.remove(position);\n\t\t\t\t\t\tmyAdapter.notifyDataSetChanged();\n\t\t\t\t\t}", "public void onClick(DialogInterface dialog, int which) {\n\r\n TableRow tr = (TableRow) v1.getParent();\r\n TextView ItemNumber = (TextView) tr.getChildAt(0);\r\n\r\n DeletedKOT objDeletedKOT = new DeletedKOT();\r\n objDeletedKOT.setReason(\"Billing Mode is 3 or 4\");\r\n objDeletedKOT.setEmployeeId(0);\r\n objDeletedKOT.setTableNumber(0);//Integer.parseInt(tvTableNumber.getText().toString()));\r\n objDeletedKOT.setSubUdfNumber(Integer.parseInt(tvSubUdfValue.getText().toString()));\r\n objDeletedKOT.setTokenNumber(iTokenNumber);\r\n objDeletedKOT.setTime(String.format(\"%tR\", Time));\r\n long lResult = db.addDeletedKOT_new(objDeletedKOT);\r\n Log.v(\"VoidKOT\", \"Deleted KOT added, Row ID:\" + lResult);\r\n lResult = db.deleteKOTItemsByItemToken_new(ItemNumber.getText().toString(), iTokenNumber,\r\n Integer.parseInt(tvSubUdfValue.getText().toString()));\r\n\r\n CustomerDetailsFilled = true;\r\n DisplayModifyKOT();\r\n\r\n }", "private void deleteButton1ActionPerformed(ActionEvent e) {\n // TODO add your code here\n PlanBuffer.setBuffer(\"\");\n PlanBuffer.setBuffer(this.list.get(this.page*6).getPlanID());\n String planID = PlanBuffer.getBuffer();\n PlanFunction.DeletePlanByPlanID(planID);\n this.dispose();\n PlanHomeCoach.run();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n mCategoryDao.delete(mCategoryDao.getCategoryByID(selectedCategory));\n Intent intent = new Intent(ACT_Detailed_Category_Editable.this,ACT_Initial_Category_Display.class);\n startActivity(intent);\n }", "public void deleteExempleDirect(ExempleDirect exempleDirect) throws DaoException;", "@Override\n public void onClick(View v) {\n final Intent intent = new Intent(context, admin_show_std.class);\n intent.putExtra(\"roll\", adminUserList.get(holder.getAdapterPosition()).getRoll());\n final String roll = intent.getStringExtra(\"roll\");\n\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setMessage(\"Delete ?\" + roll).setCancelable(false)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n adminUserList.remove(adminUserList.get(position));\n DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference().child(\"UsersData\");\n assert roll != null;\n databaseReference.child(roll).removeValue();\n notifyItemRemoved(position);\n notifyDataSetChanged();\n Toast.makeText(context, \"User Deleted\" + position, Toast.LENGTH_SHORT).show();\n }\n })\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n AlertDialog dialog = builder.create();\n dialog.setTitle(\"Confirm\");\n dialog.show();\n }", "@FXML\n\tprivate void handleDelete() {\n\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\talert.getButtonTypes().clear();\n\t\talert.getButtonTypes().addAll(ButtonType.YES, ButtonType.NO);\n\t\talert.setHeaderText(lang.getString(\"deleteCustomerMessage\"));\n\t\talert.initOwner(stage);\n\t\talert.showAndWait()\n\t\t.filter(answer -> answer == ButtonType.YES)\n\t\t.ifPresent(answer -> {\n\t\t\tCustomer customer = customerTable.getSelectionModel().getSelectedItem();\n\t\t\tdeleteCustomer(customer);\n\t\t});\n\t}", "private void deleteButton6ActionPerformed(ActionEvent e) {\n // TODO add your code here\n PlanBuffer.setBuffer(\"\");\n PlanBuffer.setBuffer(this.list.get(this.page*6 + 5).getPlanID());\n String planID = PlanBuffer.getBuffer();\n PlanFunction.DeletePlanByPlanID(planID);\n this.dispose();\n PlanHomeCoach.run();\n }", "@Override\n public void deleteItem(P_CK t) {\n \n }", "@Override\n public void onClick(View v) {\n Cart.delete(c.getID());\n finish();\n }", "@Transactional\n public boolean deleteArtListing(ArtListing al) {\n return deleteArtListing(al.getIdCode());\n }", "public static void deleteAlert() {\n\n }", "public void onClick(DialogInterface dialog, int which) {\n indivReservee.getRef().removeValue();\n\n //Remove reservation from user\n for(DataSnapshot indivSpace : snapshot.child(Keys.KEY_RESERVATIONS.name()).getChildren()) {\n if(spaceID.equals(indivSpace.child(\"id\").getValue().toString().trim())) {\n String key = indivSpace.getKey();\n bmDatabaseRef.child(Keys.KEY_RESERVATIONS.name()).child(key).removeValue();\n }\n }\n Toast.makeText(SpaceViewActivity.this, \"Unreserved a \" + type, Toast.LENGTH_SHORT).show();\n finish();\n //btnReserve.setText(\"Reserve\");\n }", "public boolean RemoveSport(Sport sport){\n\n boolean noError = true;\n\n\n\n try {\n ConnectDB();\n\n\n preparedStatement=connection.prepareStatement(\"SELECT t_clubs.FK_Sport FROM t_clubs WHERE t_clubs.FK_Sport=?\");\n preparedStatement.setInt(1, sport.getPk_sport());\n result = preparedStatement.executeQuery();\n\n if(result.next()) {\n JOptionPane pane = new JOptionPane(\"le sport est affilié a un club impossible de le supprimer\", JOptionPane.ERROR_MESSAGE);\n JDialog dialog = pane.createDialog(null,\"error\");\n dialog.setAlwaysOnTop(true);\n dialog.setVisible(true);\n dialog.dispose();\n\n }else{\n\n preparedStatement = connection.prepareStatement(\"Delete FROM `t_sports` WHERE `PK_Sport`= ? \");\n preparedStatement.setInt(1, sport.getPk_sport());\n preparedStatement.executeUpdate();}\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n noError = false;\n } finally {\n CloseDB();\n }\n\n\n\n\n\n\n return noError;\n }", "public void actionPerformed(ActionEvent e) {\n JButton button = (JButton) e.getSource();\n if(button.getText().equals(removeButton.getText()))\n {\n if(textItemName.getText().length() == 0)\n {\n Item item = dep.getListProducts().getItemId(Integer.parseInt(textItemId.getText()));\n if(item == null)\n {\n noRemove.setVisible(true);\n noCorespondence.setVisible(false);\n }\n else\n {\n dep.getListProducts().remove(item);\n Notification notification = new Notification(depId,Integer.parseInt(textItemId.getText()),NotificationType.REMOVE);\n dep.NotifyRemove(notification);\n noRemove.setVisible(false);\n tableModel.fireTableDataChanged();\n dispose();\n }\n }\n if(textItemId.getText().length() == 0)\n {\n Item item = dep.getListProducts().getItemName(textItemName.getText());\n if(item == null)\n {\n noRemove.setVisible(true);\n noCorespondence.setVisible(false);\n }\n else\n {\n dep.getListProducts().remove(item);\n Notification notification = new Notification(depId,item.getId(),NotificationType.REMOVE);\n dep.NotifyRemove(notification);\n noRemove.setVisible(false);\n tableModel.fireTableDataChanged();\n dispose();\n }\n }\n if(textItemId.getText().length() != 0 && textItemId.getText().length() != 0)\n {\n Item item = dep.getListProducts().getItemId(Integer.parseInt(textItemId.getText()));\n if(item == null)\n {\n noRemove.setVisible(true);\n noCorespondence.setVisible(false);\n }\n else\n {\n if(item.getName().equals(textItemName.getText()))\n {\n dep.getListProducts().remove(item);\n Notification notification = new Notification(depId,Integer.parseInt(textItemId.getText()),NotificationType.MODIFY);\n dep.NotifyRemove(notification);\n noCorespondence.setVisible(false);\n tableModel.fireTableDataChanged();\n dispose();\n }\n else\n {\n noCorespondence.setVisible(true);\n }\n }\n }\n\n }\n }", "@Test\n\tpublic void execucaoDesafio_02() {\n\t\tgetPage().getAddCustomerPage().clickGoBackToList();\n\t\t\n\t\t//2. Clica na lupa e\n\t\tgetPage().clickSearch();\n\t\t\n\t\t//2(continuação). digite Teste Sicredi\n\t\tgetPage().searchText(customerData.getName());\n\t\t\n\t\t//3, Clica checkbox, abaixo da palavra actions\n\t\tgetPage().clickCheckBoxActions();\n\t\t\n\t\t//4. Clica botão delete\n\t\tgetPage().clickDeleteButton();\n\t\t\n\t\t//5. Valida por asserção a mensagem que pergunta se tem certeza que deseja deletar item\n\t\tString textPopup = getPage().getTextPopupDeleteAlert();\n\t\t\n\t\tboolean foundText = textPopup.contains(Messages.DELETE_ITEM);\t\t\n\t\tassertTrue(\"O texto [\"+Messages.DELETE_ITEM+\"] não foi encontrado.\", foundText);\n\t\t\n\t\t//6. Clica no botão Delete do Popup\n\t\tgetPage().clickOnDeleteButtonToConfirm();\n\t\t\n\t\t//7. Valide por asserção a mensage de que foi deletado os dados do BD\n\t\tgetPage().setLastTextAfterConfirmDelete();\t\t\n\t\tboolean foundDataDeletedFromDBText = getPage().getLastTextAfterDelete().contains(Messages.DATA_DELETED_FROM_DB);\n\t\tassertTrue(\"O texto [\"+Messages.DATA_DELETED_FROM_DB+\"] não foi encontrado.\", foundDataDeletedFromDBText);\n\t\t\n\t\t//8. Feche o driver web\n\t\tgetDriver().quit();\n\n\t\t//Aqui abaixo libera a memória do processo que é o driver selenium\n\t\tgetResource().killDriver();\n\t}", "private void deleteTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n boolean isDebtValid = true;\n if(mDbHelper.getCategory(mTransaction.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) { // Borrow\n List<Debt> debts = mDbHelper.getAllDebts();\n\n Double repayment = 0.0, borrow = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) { // Repayment\n repayment += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) { // Borrow\n borrow += debt.getAmount();\n }\n }\n\n if(borrow - mTransaction.getAmount() < repayment) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_delete_invalid));\n }\n }\n\n if(isDebtValid) {\n mDbHelper.deleteTransaction(mTransaction.getId());\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n\n cleanup();\n\n // Return to FragmentListTransaction\n getFragmentManager().popBackStackImmediate();\n LogUtils.logLeaveFunction(Tag);\n }\n }", "public void deletar() {\n if(Sessao.isConfirm()){\n Usuario use = new Usuario();\n use.setId(Sessao.getId());\n Delete_Banco del = new Delete_Banco();\n del.Excluir_Usuario(use);\n this.setVisible(false);\n Sessao.setId(0);\n tela_Principal prin = Sessao.getPrin();\n prin.atualizar_Tela();\n }\n }", "public void delFor(String idi) {\n\t\tourDatabase.delete(DATABASE_TABLE5, Sales_Id + \"=\" +idi, null);\n\t\t\n\t}", "private void deleteEmployeeBooking() {\n BookingModel bookingModel1 = new BookingModel();\n try {\n bookingModel1.deleteBooking(employeeID);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "private void deleteButton4ActionPerformed(ActionEvent e) {\n // TODO add your code here\n PlanBuffer.setBuffer(\"\");\n PlanBuffer.setBuffer(this.list.get(this.page*6 + 3).getPlanID());\n String planID = PlanBuffer.getBuffer();\n PlanFunction.DeletePlanByPlanID(planID);\n this.dispose();\n PlanHomeCoach.run();\n }", "private void deleteButton3ActionPerformed(ActionEvent e) {\n // TODO add your code here\n PlanBuffer.setBuffer(\"\");\n PlanBuffer.setBuffer(this.list.get(this.page*6 + 2).getPlanID());\n String planID = PlanBuffer.getBuffer();\n PlanFunction.DeletePlanByPlanID(planID);\n this.dispose();\n PlanHomeCoach.run();\n }", "@Override\r\n public void onClick(View view) {\n productsRef.child(selectedProduct.getProductId()).removeValue().addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n alertDialog.dismiss();\r\n }\r\n });\r\n }", "@FXML\r\n void onActionDeletePart(ActionEvent event) {\r\n\r\n Part part = TableView2.getSelectionModel().getSelectedItem();\r\n if(part == null)\r\n return;\r\n\r\n //EXCEPTION SET 2 REQUIREMENT\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setHeaderText(\"You are about to delete the product you have selected!\");\r\n alert.setContentText(\"Are you sure you wish to continue?\");\r\n\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.get() == ButtonType.OK){\r\n product.deleteAssociatedPart(part.getId());\r\n }\r\n }", "@Override\n public void actionPerformed(ActionEvent evt) \n {\n \n EvenementService service=new EvenementService();\n service.deleteEvenement(E);\n last.refreshTheme();\n last.show();\n \n }", "public void actionPerformed(ActionEvent ae) {\r\n int i = JOptionPane.showConfirmDialog(II, \"¿Seguro quiere eliminar esta cantidad de productos?\");\r\n if (i == 0) {\r\n eliminaBD();\r\n }\r\n }", "@Override\n\t\t\tpublic boolean onActionItemClicked(ActionMode mode, MenuItem item) {\n\t\t\n\t\t\t\t \n\t\t\t\tswitch (item.getItemId()) {\n\t\t\t\tcase R.id.delete:\n\t\t\t\t\t\n\t\t\t\t\tfor(messagewrapper obje:dummyList){\n\t\t\t\t\t\t\n\t\t\t\t\t\tmAdapter.remove(obje);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcheckedCount=0;\n\t\t\t\t\t\n\t\t\t\t\tmode.finish();\n\t\t\t\t\treturn true;\n\t\t\n\t\t\t\tdefault:\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public void deleteAlert(Alert a){\n final Alert up=a;\n new AsyncTask<Void, Void, Void>() {\n\n @Override\n protected Void doInBackground(Void... params) {\n try {\n mAlertTable.update(up).get();\n } catch (Exception exception) {\n Log.i(\"delete alert error: \",exception.getMessage());\n }\n return null;\n }\n }.execute();\n }", "@Override\n public void onClick(View view) {\n todoDBAdapter.open();\n todoDBAdapter.deleteContact(contactID);\n todoDBAdapter.close();\n Toast toast = Toast.makeText(context.getApplicationContext(), R.string.DetailTodo_info_successful_contact_delete, Toast.LENGTH_SHORT);\n toast.show();\n Intent overviewIntent = new Intent(context, Overview.class);\n context.startActivity(overviewIntent);\n }", "@Override\n\tpublic void deleteBourse(Bourse brs) {\n\t\t\n\t}", "@Override\r\n\tprotected boolean deleteDetail(Object curMaster) {\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean deleteInvigilate(Integer no) {\n\t\tif(invigilateMapper.deleteByPrimaryKey(no)>0){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void deleteBill()\n {\n tblOrderItems.removeAllViews();\n AlertDialog.Builder DineInTenderDialog = new AlertDialog.Builder(BillingCounterSalesActivity.this);\n LayoutInflater UserAuthorization = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n View vwAuthorization = UserAuthorization.inflate(R.layout.dinein_reprint, null);\n final ImageButton btnCal_reprint = (ImageButton) vwAuthorization.findViewById(R.id.btnCal_reprint);\n\n final EditText txtReprintBillNo = (EditText) vwAuthorization.findViewById(R.id.txtDineInReprintBillNumber);\n final TextView tv_inv_date = (TextView) vwAuthorization.findViewById(R.id.tv_inv_date);\n tv_inv_date.setText(tvDate.getText().toString());\n btnCal_reprint.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n DateSelection(tv_inv_date);\n }\n });\n\n DineInTenderDialog.setIcon(R.drawable.ic_launcher)\n .setTitle(\"Delete Bill\")\n /*.setMessage(\"Enter Bill Number\")*/\n .setView(vwAuthorization)\n .setNegativeButton(\"Cancel\", null)\n .setPositiveButton(\"Delete\", new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int which) {\n\n if (txtReprintBillNo.getText().toString().equalsIgnoreCase(\"\"))\n {\n messageDialog.Show(\"Warning\", \"Please enter Bill Number\");\n return;\n }\n else if (tv_inv_date.getText().toString().equalsIgnoreCase(\"\")) {\n messageDialog.Show(\"Warning\", \"Please enter Bill Date\");\n setInvoiceDate();\n return;\n } else {\n try {\n int InvoiceNo = Integer.valueOf(txtReprintBillNo.getText().toString());\n String date_reprint = tv_inv_date.getText().toString();\n tvDate.setText(date_reprint);\n Date date = new SimpleDateFormat(\"dd-MM-yyyy\").parse(date_reprint);\n Cursor result = db.getBillDetail_counter(InvoiceNo, String.valueOf(date.getTime()));\n if (result.moveToFirst()) {\n if (result.getInt(result.getColumnIndex(\"BillStatus\")) != 0) {\n VoidBill(InvoiceNo, String.valueOf(date.getTime()));\n } else {\n //Toast.makeText(BillingCounterSalesActivity.this, \"Bill is already voided\", Toast.LENGTH_SHORT).show();\n\n String msg = \"Bill Number \" + InvoiceNo + \" is already voided\";\n messageDialog.Show(\"Note\",msg);\n Log.d(\"VoidBill\", msg);\n }\n } else {\n //Toast.makeText(BillingCounterSalesActivity.this, \"No bill found with bill number \" + InvoiceNo, Toast.LENGTH_SHORT).show();\n String msg = \"No bill found with bill number \" + InvoiceNo;\n messageDialog.Show(\"Note\",msg);\n Log.d(\"VoidBill\", msg);\n }\n ClearAll();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }).show();\n }", "@Override\r\npublic int deleteByPrimaryKey(Integer possalesdetailid) {\n\treturn possalesdetail.deleteByPrimaryKey(possalesdetailid);\r\n}", "private void delete()\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnection con = Connector.DBcon();\n\t\t\tString query = \"select * from items where IT_ID=?\";\n\t\t\t\n\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\tpst.setString(1, txticode.getText());\n\t\t\tResultSet rs = pst.executeQuery();\n\t\t\t\n\t\t\tint count = 0;\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\n\t\t\tif(count == 1)\n\t\t\t{\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null, \"Are you sure you want to delete selected item data?\", \"ALERT\", JOptionPane.YES_NO_OPTION);\n\t\t\t\tif(choice==JOptionPane.YES_OPTION)\n\t\t\t\t{\n\t\t\t\t\tquery=\"delete from items where IT_ID=?\";\n\t\t\t\t\tpst = con.prepareStatement(query);\n\t\t\t\t\t\n\t\t\t\t\tpst.setString(1, txticode.getText());\n\t\t\t\t\t\n\t\t\t\t\tpst.execute();\n\t\t\t\t\t\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Deleted Successfully\", \"RESULT\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tloadData();\n\t\t\t\t\n\t\t\t\trs.close();\n\t\t\t\tpst.close();\n\t\t\t\tcon.close();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Record Not Found!\", \"Alert\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\n\t\t\trs.close();\n\t\t\tpst.close();\n\t\t\tcon.close();\n\t\t\t\n\t\t} \n\t\tcatch (Exception e)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t}\n\t}", "private void jButtonDeleteStageplaatsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDeleteStageplaatsActionPerformed\n\n Stageplaats s = (Stageplaats)jListStageplaatsen.getSelectedValue();\n if (s != null){\n int index = this.jListStageplaatsen.getSelectedIndex();\n Stageplaats sFromDB = this.dbFacade.getStageplaatsByID(s.getId());\n if (sFromDB != null){\n this.dbFacade.remove(sFromDB);\n refreshDataCache();\n refreshListbox();\n if (index > 0) index--;\n this.jListStageplaatsen.setSelectedIndex(index);\n }\n }\n enableButtons();\n }", "@Override\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\t\t\t\tdoDeleteAvailability(true);\t\t\t\t\t\t\t\t\t\n\n//\t\t\t\t\t\t\t\tif(ravail_id == null || ravail_id.equals(\"null\")) {\n//\t\t\t\t\t\t\t\t\tLog.d(CommonUtilities.TAG, \"Avail ID \" + avail_id + \" \");\n//\n//\t\t\t\t\t\t\t\t\tdoDeleteAvailability(true);\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t} else {\n//\t\t\t\t\t\t\t\t\tLog.d(CommonUtilities.TAG, \"Ravail ID \" + ravail_id + \" \");\n//\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\tdoDeleteAvailability(false);\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "@Override\n public int delete( J34SiscomexMercadoriaAdi j34SiscomexMercadoriaAdi ) {\n return super.doDelete(j34SiscomexMercadoriaAdi);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long l) {\n final Izdelek toDelete = (Izdelek) parent.getItemAtPosition(position);\n //Toast.makeText(NakupIzbranihIzdelkov.this,\"clicked product \" + toDelete.getName(), Toast.LENGTH_SHORT).show();\n\n AlertDialog.Builder deleteAlert = new AlertDialog.Builder(ZmNakupIzbranihIzdelkov.this);\n deleteAlert.setMessage(\"Ali ste prepricani da zelite odstraniti \"+toDelete.getName()+\" iz kosare?\")\n .setCancelable(false)\n .setPositiveButton(\"Da\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //finish();\n odstraniArtikel(toDelete);\n }\n }).setNegativeButton(\"Ne\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.cancel();\n }\n });\n AlertDialog alert = deleteAlert.create();\n alert.setTitle(\"Izbris artikla iz kosare\");\n alert.show();\n }", "private void deleteButton5ActionPerformed(ActionEvent e) {\n // TODO add your code here\n PlanBuffer.setBuffer(\"\");\n PlanBuffer.setBuffer(this.list.get(this.page*6 + 4).getPlanID());\n String planID = PlanBuffer.getBuffer();\n PlanFunction.DeletePlanByPlanID(planID);\n this.dispose();\n PlanHomeCoach.run();\n }", "public void desactivarRecursos() {\n\r\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n mAdapter.notifyItemRemoved(position); //item removed from recylcerview\n mAdapter.removeItem(position);\n dataList.remove(position); //then remove item\n mAdapter.notifyDataSetChanged();\n deleteEntry(dataList.get(position).getDocId());\n }", "void deleteAveria(Long idAveria) throws BusinessException;" ]
[ "0.67495126", "0.6207944", "0.6098762", "0.6077868", "0.6043151", "0.6032427", "0.6012356", "0.59362626", "0.5935657", "0.592056", "0.58997345", "0.58938885", "0.5873158", "0.5870135", "0.58628666", "0.58432096", "0.5835904", "0.58322525", "0.58281654", "0.5825792", "0.581194", "0.58099663", "0.5797174", "0.577664", "0.57672805", "0.57643676", "0.5759034", "0.575737", "0.57535356", "0.5752309", "0.5752297", "0.5721679", "0.57177246", "0.570043", "0.5695275", "0.5694988", "0.56807965", "0.56738937", "0.56699795", "0.5667214", "0.56663835", "0.5665567", "0.56555855", "0.5654351", "0.5650008", "0.5640062", "0.56346416", "0.5625714", "0.5623547", "0.5622958", "0.5621619", "0.562057", "0.561532", "0.56098866", "0.5609389", "0.5609048", "0.5607431", "0.5607431", "0.5604818", "0.55845284", "0.5583123", "0.5582748", "0.5575276", "0.55743384", "0.55683833", "0.5568018", "0.5566497", "0.55639714", "0.55631626", "0.556163", "0.55611503", "0.5560183", "0.55538344", "0.5552351", "0.5550636", "0.55492145", "0.55476177", "0.5546801", "0.5545867", "0.554326", "0.55420876", "0.55402654", "0.55365795", "0.5535891", "0.55281854", "0.5525532", "0.55236334", "0.55204517", "0.5520044", "0.5517557", "0.5517156", "0.5508183", "0.5507685", "0.5504701", "0.5504368", "0.5501132", "0.5499994", "0.5495011", "0.5494846", "0.5492941" ]
0.68052244
0
specific help button for marketing agent with general information
@FXML void help_btn_clicked(MouseEvent event) { Dialog<String> dia = new Dialog<>(); Stage stage = (Stage) dia.getDialogPane().getScene().getWindow(); DialogPane dialogPane = dia.getDialogPane(); dialogPane.getStylesheets().add(getClass().getResource("/client/boundry/dialog.css").toExternalForm()); dialogPane.getStyleClass().add("dialog"); dia.setTitle("Help Dialog"); dia.setHeaderText("Guide:"); dia.setGraphic(new ImageView(this.getClass().getResource("/icons8-info-48.png").toString())); // Add a custom icon. stage.getIcons().add(new Image(this.getClass().getResource("/icons8-help-24.png").toString())); dia.getDialogPane().getButtonTypes().addAll(ButtonType.OK); dia.setContentText( "Main Sale Pattern Screen\nIn this screen you can choose sale from table,add sale, delete and open\n" + "for full information, click on specific sale and choose an action, in addition you can click" + "on \"Statistics\" for statistic inforamtion"); dia.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n \t\t\t\tpublic void doHelp() {\n \n \t\t\t\t}", "@Override\n\tprotected void handleHelp(ClickEvent event) {\n\t\t\n\t}", "public void helpSpecificAction() {\n new Help(getSpecificHelpTitle(), getSpecificHelp());\n }", "public void showHelp();", "public void helpPressed() {\n Stage mainStage = (Stage)pane.getScene().getWindow();\n PresentationCtrl.getInstance().showNotification(\"Information\", \"Information\", null,\n \"- Click <Clear> button to clear the history\\n\\n- Click <Refresh> button to refresh the history\" +\n \"\\n\\n- Double clicks on a row to see the detailed information\", mainStage);\n }", "public void helpBtn( View v )\n {\n \t// Display help here \t\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder( this );\n\t\tbuilder.setMessage( R.string.help_manage_id )\n\t .setTitle( R.string.help_warning );\n\t\tbuilder.setPositiveButton( R.string.ok, new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int idx) {\n\t // User clicked OK button \n\t }\n\t });\t\t\n\t\tAlertDialog dialog = builder.create();\n\t\tdialog.show();\t\t\n }", "@Override\n\tpublic void sendHelp(ICommandSender sender) {\n\t}", "public void showHelp(CommandSender sender) {\n\t\t\n\t}", "@Override\r\n public void doHelpAction() {\n BIReportService.getInstance().traceHelpClick(project.getBasePath(), ConversionHelpEnum.PATH_SETTING);\r\n\r\n ApplicationManager.getApplication().invokeLater(() -> {\r\n BrowserUtil.browse(allianceDomain + HmsConvertorBundle.message(\"directory_url\"));\r\n }, ModalityState.any());\r\n }", "@Override\n public void help(CommandSender sender) {\n \n }", "String getHelpText();", "@Override\n public void help() {\n\n }", "protected void handleHelp(ActionEvent event) {\n\t}", "private void showHelpDialog() {\n\n view.helpDialog();\n }", "@Override\r\n\tprotected String getHelpInfor() {\n\t\treturn \"\";\r\n\t}", "public void HelpButtonClick(View view) {\n GeneralHelper.ShowHelpInWishActivity(\"step_test.html\", \"\", this);\n return;\n }", "@Override\n public void communicate(AgentImp agent) {\n CommunicateHelp.manageHelp(agent);\n }", "public abstract String getHelpInfo();", "@DISPID(-2147412099)\n @PropGet\n java.lang.Object onhelp();", "public void helpAboutAction() {\n new HelpAbout(this.parentFrame);\n }", "public void helpRequested(HelpEvent event) {\r\n }", "public void helpGenericAction() {\n new Help(getGenericHelpTitle(), getGenericHelp());\n }", "public String showHelp() {\r\n return ctrlDomain.getHidatoDescription();\r\n }", "public String getHelp();", "private void setGeneralHelpContent() {\n\t\tArrayList<String> contents = assist.generalHelp();\n\t\tsessionTitle.setText(contents.get(0));\n\t\tdetailedDescription.setText(contents.get(1));\n\t}", "String getHelpString();", "public void setHelp (String Help);", "public void help();", "protected String getHelp() {\r\n return UIManager.getInstance().localize(\"renderingHelp\", \"Help description\");\r\n }", "Help createHelp();", "public abstract String getHelpId();", "public void onClickHelp (View v)\n {\n int id = v.getId ();\n int textId = -1;\n switch (id) {\n case R.id.help_button1 :\n textId = R.string.topic_section1;\n break;\n case R.id.help_button2 :\n textId = R.string.topic_section2;\n break;\n case R.id.help_button3 :\n textId = R.string.topic_section3;\n break;\n case R.id.help_button4 :\n textId = R.string.topic_section4;\n break;\n default:\n break;\n }\n\n }", "private void help() {\n String border = \"=====================================================================================\";\n String title = \"AILearning API:\\n\";\n String template = \"arguments: numOfControls, controls..., quantityOfEach, hasHighContrast, hasDisabled, \" +\n \"hasNoise, isUnsorted\\n\";\n String numOfCon= \"numOfControls - integer number of controls (1 - 6)\\n\";\n String contrls = \"controls... - each control is string and number of strings equals numOfControls\";\n String namesOfControls = \"Every string is define symbol:\\nB - Button, TF - TextField, RB - RadioButton\" +\n \"Sp - Spinner, Sl - Slider, CB - CheckBox\\n\";\n String quantityOfEach = \"quantityOfEach - integer number of each control (0 - 1 000 000)\\n\";\n String highContrast = \"hasHighContrast - string (true or false)\\n\";\n String disabled = \"hasDisabled - string (true of false)\\nif true - some controls will be disabled\\n\";\n String noise = \"hasNoise - string (true or false)\\n\";\n String unsorted = \"isUnsorted - string (true or false)\\nif true - controls will be in one folder\\n\";\n String example = \"Example: 3 B TF RB 100 true true true false\";\n String meaning = \"It means that app will generate 100 Buttons, 100 TextFields, 100 RadioButtons \" +\n \"with high contrast, noise,\\nsome controls will be disabled and locate in different folders\";\n\n System.out.println(String.format(\"%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\", border, title, template, numOfCon,\n contrls, namesOfControls, quantityOfEach, highContrast, disabled, noise, unsorted, example, meaning));\n }", "private static void help() {\n\t\t\n\t\tTask[] taskList = createTaskList();\n\t\t\n\t\tSystem.out.println(\"\\n---------------------------------[ HELP ]--------\"\n\t\t\t\t+ \"------------------------------\\n\");\n\t\t\n\t\t// Post1 Display help (Polymorphism)\n\t\tfor (Task task : taskList) {\n\t\t\ttask.displayHelp();\n\t\t}\n\t\t\n\t}", "public void onHelp(View view)\n {\n // Instantiate a dialog box builder\n AlertDialog.Builder builder = new AlertDialog.Builder(view.getContext());\n\n // Parameterize the builder\n builder.setTitle(R.string.helpTitle);\n builder.setMessage(R.string.helpMessage);\n builder.setPositiveButton(android.R.string.ok, null);\n\n // Create the dialog box and show it\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "@Override\r\n\tprotected String getHelpId() {\n\t\treturn null;\r\n\t}", "private void actionOnClicHelp() {\r\n\t\ttry {\r\n\t\t\tGUIGeneralMethods.openWebPage(new URL(Constants.C_HELPING_URL));\r\n\t\t} catch (URISyntaxException | IOException e) {\r\n\t\t\tJOptionPane.showMessageDialog(frame, Constants.C_ERROR_WHILE_BROWSING_HELP, Constants.C_ERROR_DIALOG_TITLE,\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE); \r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t}", "private void doHelp()\r\n {\r\n Help.showHelp(page, ref, null);\r\n }", "private void showHelp(){\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this,R.style.MyDialogTheme);\n alertDialogBuilder.setMessage(\"Welcome to NBA Manager 2019\\n\\n\" +\n \"The purpose of the application is to simulate a basketball manager game and draft a team.\\n\\n\" +\n \"You can view your current roster by pressing the right arrow in the top right corner.\\n\\n\" +\n \"*Not all players will have a height or a weight.\");\n alertDialogBuilder.setPositiveButton(\"Ok\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface arg0, int arg1) {\n }\n });\n AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.show();\n }", "@Override\n public void printHelp() {\n\n }", "@FXML public void handleSentimentRelatedFeaturesHelp() {\n\t\t// Help.help(HelpConstants.FeaturesSets.BASIC_SENTIMENT_BASED_FEATURES);\n\t\ttry {\n\t\t\tRuntime.getRuntime().exec(\"hh.exe \" + Constants.helpFile + \"::1- Sentiment Features.html\");\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n helpPopUp();\n }", "public void displayHelpMenuView()\n {\n System.out.println(\"\\nHelp menu selected.\");\n }", "protected void ACTION_B_HELP(ActionEvent arg0) {\n\t\t\r\n\t\tString msg = \"Network Packet Sniffer is JAva packet capturing and traffic analysis application\"\r\n\t\t\t\t+ \"\\n CAPTURE : Start capturing packets on the interface\"\r\n\t\t\t\t+ \"\\nSTOP : Stop capturing packets on the interface\"\r\n\t\t\t\t+ \"\\n LIST : List Network Interfaces on the host\"\r\n\t\t\t\t+ \"\\n SELECT : Select Interface to capture Packets with\"\r\n\t\t\t\t+ \"\\n FILTER : Filter on the selected port when filtering is enabled\"\r\n\t\t\t\t+ \"\\n ENABLE : Enable Port Filtering\"\r\n\t\t\t\t+ \"\\n HELP : Displays the help screen\"\r\n\t\t\t\t+ \"\\n SAVE : Save the information about the packet\"\r\n\t\t\t\t+ \"\\n LOAD : Load the saved data on the interface \"\r\n\t\t\t\t+ \"\\n \";\r\n\t\t\r\n\t\tJOptionPane.showMessageDialog(null, msg);\r\n\t}", "private void helpAbout() {\n JOptionPane.showMessageDialog(this, new ConsoleWindow_AboutBoxPanel1(), \"About\", JOptionPane.PLAIN_MESSAGE);\n }", "@Override\n\tpublic String getHelp()\n\t{\n\t\treturn \"<html>Enter two before values and one after value<br>\"\n\t\t\t\t+ \"from the solution. Click the calculate button<br>\"\n\t\t\t\t+ \"to find the remaining after value.</html>\";\n\t}", "Menu getMenuHelp();", "public VRL getHelp()\n {\n return Global.getHelpUrl(this.getType()); \n }", "public abstract void clickHelp(FloodItWorld w, ACell topLeft);", "void help();", "protected String getHelpText() {\n return \"\";\n }", "public boolean isHelpMode();", "@Override\n public String showHelp()\n {\n return new String(ChatColour.RED + \"Usage: \" + ChatColour.AQUA + this.getName());\n }", "public void jMenuHelpAbout_actionPerformed(ActionEvent e) {\n }", "@Override\n\tprotected Response doHelp(SplashScreenSearcher searcher, PageModel page) {\n\t\treturn null;\n\t}", "public void help(View v) {\n\t // Do something in response to button\n\t\tIntent intent = new Intent(this, Help.class);\n\t startActivity(intent);\n\n\t}", "public void help() {\n\t\tString format = \"%-20s%s%n\";\n\t\tString[] commands = new String[5];\n\t\tcommands[0] = \"help\";\n\t\tcommands[1] = \"learn\";\n\t\tcommands[2] = \"alphabet:create\";\n\t\tcommands[3] = \"alphabet:destroy\";\n\t\tcommands[4] = \"alphabet:compose\";\n\n\t\tString[] explanation = new String[5];\n\t\texplanation[0] = \"display this message\";\n\t\texplanation[1] = \"starts a learning process. Note: with a large alphabet, this\\ncan take a \"\n\t\t\t\t+ \"very long time!\";\n\t\texplanation[2] = \"creates an alphabet. Currently only working for Android, the\\n\"\n\t\t\t\t+ \"creation of an iOS alphabet has to be done more or less manually\";\n\t\texplanation[3] = \"deletes an existing alphabet\";\n\t\texplanation[4] = \"composes an alphabet from existing window dumps.\";\n\n\t\tfor (int i = 0; i < commands.length; i++) {\n\t\t\tSystem.out.printf(format, commands[i], explanation[i]);\n\t\t}\n\t}", "private void setupHelpButton() {\n\t\tImageIcon help_button_image = new ImageIcon(parent_frame.getResourceFileLocation() + \"help.png\");\n\t\tJButton help_button = new JButton(\"\",help_button_image);\n\t\thelp_button.setBorderPainted(false);\n\t\thelp_button.setBounds(1216, 24, 100, 100);\n\t\thelp_button.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tHelp help_frame=new Help(PanelID.Quiz);\n\t\t\t\thelp_frame.setVisible(true);\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t}\n\t\t});\n\t\thelp_button.addMouseListener(new VoxMouseAdapter(help_button,null));\n\t\tadd(help_button);\n\t}", "@Override\n protected Response doHelp(AppNavigationSearcher searcher, PageModel page) {\n return null;\n }", "private void mnHelpActionPerformed(java.awt.event.ActionEvent evt) {\n\n }", "public void showHelp(OnClickListener cl) {\n\t\tBuilder adb = new AlertDialog.Builder(this);\n\t\tadb.setIcon(R.drawable.icon);\n \tadb.setTitle(\"Wallpaper Wizard\");\n \tadb.setMessage(Html.fromHtml(\"<b>Tap</b> the images you like, and I will \" + \n \t\t\t\"learn your preferences to suggest new images.<p>\" + \n \t\t\t\"<b>Press and Hold</b> an image to set it as your wallpaper \" + \n \t\t\t\"and save it to the 'wizard' directory on your SD card. \" + \n \t\t\t\"<p>All proceeds from ads will benefit the computer science \" + \n \t\t\t\"program at <b>Centenary College of Louisiana</b>.\"));\n \tadb.setPositiveButton(\"OK\", cl);\n \tadb.show(); \t\n }", "void printHelp();", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tg.printHelp(\"OthelloHelp.txt\");\n\t}", "@Override\n\tpublic String getHelp() {\n\n\t\treturn \"EXAMINE|EXAMINAR\";\n\t}", "public void HelpTopicsActionPerformed(java.awt.event.ActionEvent evt) {\n\n HelpWindow helpWindow = new HelpWindow(this);\n helpWindow.setVisible(true);\n\n\n // HTMLDisplay helpdisplay = new HTMLDisplay( str, \"TerpPaint Help\" );\n //\t helpdisplay.setVisible( true );\n // System.out.println(\"help topics\");\n }", "private void btn_HelpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_HelpActionPerformed\n // go to help screen\n SIHS = new HelpScreen(value);\n SIHS.setVisible(true);\n\n\n }", "protected void doHelp (RenderRequest request,\n\t\t RenderResponse response)\n throws PortletException, java.io.IOException\n {\n throw new PortletException(\"doHelp method not implemented\");\n\n }", "public static void printHelpGuide() {\n printDivider();\n System.out.println(\"Help arrives!\\n\");\n printUserGuide();\n printDivider();\n }", "public static void displayHelp() {\n\t\thelp = getInstance();\n\t\tUIMain.popUpHelp(commandList, inputCommand);\t\n\t\tLoggingLogic.logging(HELP_MESSAGE);\n\t}", "Argument help(String help);", "@Override\r\n\tpublic String getHelp() {\n\t\treturn \"QUIT|SALIR\";\r\n\t}", "private void helpService() {\n output.println(\"Help command\");\n output.println(\"-calc <number> \\t Calculates the value of pi based on <number> points; quit \\t Exit from program \");\n }", "public void showHelp(Player player) {\n\t\tplayer.sendMessage(ChatTools.formatTitle(\"General Towny Help\"));\n\t\tplayer.sendMessage(\"Try the following commands to learn more about towny.\");\n\t\tplayer.sendMessage(ChatTools.formatCommand(\"\", TownySettings.getFirstCommand(TownySettings.getResidentCommands()), \"?\", \"\")\n\t\t\t\t+ \", \" + ChatTools.formatCommand(\"\", TownySettings.getFirstCommand(TownySettings.getTownCommands()), \"?\", \"\") \n\t\t\t\t+ \", \" + ChatTools.formatCommand(\"\", TownySettings.getFirstCommand(TownySettings.getNationCommands()), \"?\", \"\")\n\t\t\t\t+ \", \" + ChatTools.formatCommand(\"\", TownySettings.getFirstCommand(TownySettings.getPlotCommands()), \"?\", \"\")\n\t\t\t\t+ \", \" + ChatTools.formatCommand(\"\", TownySettings.getFirstCommand(TownySettings.getTownyCommands()), \"?\", \"\"));\n\t\tplayer.sendMessage(ChatTools.formatCommand(\"\", TownySettings.getFirstCommand(TownySettings.getTownChatCommands()), \" [msg]\", \"Town Chat\")\n\t\t\t\t+ \", \" + ChatTools.formatCommand(\"\", TownySettings.getFirstCommand(TownySettings.getNationChatCommands()), \" [msg]\", \"Nation Chat\"));\n\t\tplayer.sendMessage(ChatTools.formatCommand(\"Admin\", TownySettings.getFirstCommand(TownySettings.getTownyAdminCommands()), \"?\", \"\"));\n\t}", "public void recordInProductHelpMenuItemClicked() {\n RecordUserAction.record(\"Android.ChromeHome.IPHMenuItemClicked\");\n }", "private void showHelp() {\n\t\tJOptionPane.showMessageDialog(this, \"Created by Mario Bobić\", \"About File Encryptor\", JOptionPane.INFORMATION_MESSAGE);\n\t}", "boolean addHelpInfo(PluginHelpInfo helpInfo);", "private void printHelp() \n {\n Logger.Log(\"You have somehow ended up in this strange, magical land. But really you just want to go home.\");\n Logger.Log(\"\");\n Logger.Log(\"Your command words are:\");\n parser.showCommands();\n Logger.Log(\"You may view your inventory or your companions\");\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\n\t\t\t\tKF5SDKConfig.INSTANCE.startHelpCenterActivity(MainActivity.this, HelpCenterType.HELPCENTERDEFAULT );\n\n\t\t\t}", "private void setHelp() {\n\t\tHelpOpt.add(\"-h\");\n\t\tHelpOpt.add(\"/h\");\n\t\tHelpOpt.add(\"help\");\n\t}", "public String getSpecificHelp() {\n return specificHelp;\n }", "@Override\n public HelpCtx getHelp() {\n return HelpCtx.DEFAULT_HELP;\n }", "@Override\n public String getHelp() {\n return name;\n }", "private static void help() {\n System.out.println(\"Supported Command List:\");\n System.out.println(\"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\");\n System.out.println(\"To draw canvas press: C <width> <height>\");\n System.out.println(\"To draw rectangle press: R <x1> <y1> <x2> <y2>\");\n System.out.println(\"To draw Line press : L <x1> <y1> <x2> <y2>\");\n System.out.println(\"To fill canvas press : B <x> <y> <c>\");\n System.out.println(\"To quit press: Q\");\n System.out.println(\"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\");\n System.out.println();\n }", "private void printHelp()//Method was given\n {\n System.out.println(\"Your command words are:\");\n parser.showCommands();\n }", "protected abstract void addHelpHandler(boolean hoverListener);", "private void help() {\n for (GameMainCommandType commandType : GameMainCommandType.values()) {\n System.out.printf(\"%-12s%s\\n\", commandType.getCommand(), commandType.getInfo());\n }\n System.out.println();\n }", "private static void displayHelp(){\n System.out.println(\"-host hostaddress: \\n\" +\n \" connect the host and run the game \\n\" +\n \"-help: \\n\" +\n \" display the help information \\n\" +\n \"-images: \\n\" +\n \" display the images directory \\n\" +\n \"-sound: \\n\" +\n \" display the sounds file directory \\n\"\n\n );\n }", "public String get_setupdefine_HelpMenu_HdrText() {\r\n\t\tWebElement setupdefine_HelpMenu = driver.findElementByAccessibilityId(\"helpHeader\");\r\n\t\treturn FetchText(setupdefine_HelpMenu);\r\n\t}", "private void showHelp() {\n System.out.println(\"new: \");\n System.out.println(\"new chess and throw the chess bevor away\");\n System.out.println(\"move from to:\");\n System.out.println(\"take the pawn from position from to position to \");\n System.out.println(\"print:\");\n System.out.println(\"print the chess now \");\n System.out.println(\"help:\");\n System.out.println(\"show help\");\n System.out.println(\"quit:\");\n System.out.println(\"quit out\");\n }", "void showHelp() {\n\t\tif (helpScreen == null) {\n\t\t helpScreen = new Form(\"Walking Help\");\n\t\t helpScreen.append(\"^ = walk forward\\n\");\n\t\t helpScreen.append(\"v = walk backwards\\n\");\n\t\t helpScreen.append(\"< = turn left\\n\");\n\t\t helpScreen.append(\"> = turn right\\n\");\n\t\t helpScreen.append(\"fire = change reverb manually\\n\");\n\t\t}\n\t\thelpScreen.addCommand(toggleCommand);\n\t\thelpScreen.setCommandListener(this);\n\t\tdisplay.setCurrent(helpScreen);\n }", "@DISPID(-2147412099)\n @PropPut\n void onhelp(\n java.lang.Object rhs);", "private void help() {\n System.out.println(\"PLACE X,Y,F #Placing the robot in (X,Y) facing F. \\n\" +\n \"\\tX and Y are numbers between 0 AND 5, F is NORTH, EAST, WEST, SOUTH directions\\n\" +\n \"MOVE #Move one position towards the current direction\\n\" +\n \"LEFT #Turn left\\n\" +\n \"RIGHT #Turn right\\n\" +\n \"REPORT #Prints current position and the direction\\n\" +\n \"HELP #Help menu\");\n }", "private void jMenu_HelpTabMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenu_HelpTabMouseClicked\n DigPopGUIUtilityClass.loadDefaultHelpGUIByScreenName(SCREEN_NAME);\n }", "public static void ShowHelpScreen() {\n ToggleVisibility(HelpPage.window);\n }", "public void clickHelpLink()\n\t{\n \telementUtils.performElementClick(wbHelpLink);\n\t}", "private static void showHelp(){\r\n JOptionPane.showMessageDialog(null, \"1. Choose the faculty.\\n\"\r\n + \"2. Type in the year when the school year started in format YYYY.\\n\"\r\n + \"3. Choose the semester.\\n\"\r\n + \"4. Enter subject codes separated by semicolon. You can add them all at once or add other subjects later.\\n\"\r\n + \"5. Press the Add button to load schedule options.\\n\"\r\n + \"6. Click on the loaded options you want to choose. Their color will turn red.\\n\"\r\n + \"7. Save the options you chose to the text file through File -> Save.\\n\",\r\n \"How-to\", JOptionPane.PLAIN_MESSAGE);\r\n }", "public static void help() {\n System.out.println(\"MENU : \");\n System.out.println(\"Step 1 to create a default character.\"); // create and display a character\n System.out.println(\"Step 2 to display characters.\");\n System.out.println(\"Step 3 to choice a character for list his details. \");\n System.out.println(\"Step 4 to start fight between 2 characters\");\n System.out.println(\"step 5 to remove a character.\");\n System.out.println(\"step 6 to create a Warrior.\");\n System.out.println(\"step 7 to create a Wizard.\");\n System.out.println(\"step 8 to create a Thief.\");\n System.out.println(\"Step 9 to exit the game. \");\n System.out.println(\"Step 0 for help ....\");\n\n }", "public void helpAbout_actionPerformed(ActionEvent e) {\n AboutDialog dlg = new AboutDialog(this, \"About InfoFilter Application\", true);\n Point loc = this.getLocation();\n\n dlg.setLocation(loc.x + 50, loc.y + 50);\n dlg.show();\n }", "private void openHelpDialog() {\r\n\t\t// Get view and put relevant information into the view.\r\n\t\tLayoutInflater li = LayoutInflater.from(this);\r\n\t\tView view = li.inflate(R.layout.archive_help_dialog, null);\r\n\r\n\t\tnew AlertDialog.Builder(this)\r\n\t\t\t\t.setTitle(\r\n\t\t\t\t\t\tgetResources().getString(R.string.action_archive)\r\n\t\t\t\t\t\t\t\t+ \" \"\r\n\t\t\t\t\t\t\t\t+ getResources()\r\n\t\t\t\t\t\t\t\t\t\t.getString(R.string.action_help))\r\n\t\t\t\t.setIcon(R.drawable.icon)\r\n\t\t\t\t.setView(view)\r\n\t\t\t\t.setNegativeButton(R.string.dialog_general_button_close,\r\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\tint whichButton) {\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}).show();\r\n\t}", "String getOnlineHelpLocation();" ]
[ "0.7268882", "0.72304994", "0.7029075", "0.6925896", "0.6902745", "0.6900158", "0.6888691", "0.68354344", "0.6788945", "0.6762405", "0.6715101", "0.66886276", "0.6662774", "0.6660458", "0.66302437", "0.66292125", "0.6603242", "0.65935063", "0.65824515", "0.6574453", "0.65624833", "0.6530275", "0.6526016", "0.6513868", "0.65010136", "0.6496339", "0.6469722", "0.6460275", "0.64461935", "0.6436679", "0.64292824", "0.64210546", "0.6414448", "0.64134836", "0.64085025", "0.6408362", "0.6404839", "0.63767827", "0.63560414", "0.6340111", "0.6334004", "0.6332761", "0.63294303", "0.63187313", "0.631656", "0.62981844", "0.6296409", "0.62869245", "0.6281586", "0.62772226", "0.6274888", "0.6269219", "0.6265914", "0.6264797", "0.6256107", "0.62482977", "0.6238295", "0.62317866", "0.62228054", "0.6167249", "0.61669445", "0.61569244", "0.6134642", "0.61301476", "0.6119615", "0.611643", "0.6115756", "0.6105274", "0.6091084", "0.60803175", "0.607779", "0.60726666", "0.6072634", "0.6063011", "0.6053433", "0.60430163", "0.60258305", "0.60149646", "0.60107094", "0.600333", "0.60016143", "0.6000857", "0.59909195", "0.59826946", "0.5981963", "0.59804195", "0.59754616", "0.5972997", "0.596829", "0.59599686", "0.5957946", "0.59577805", "0.59506094", "0.59501994", "0.5947871", "0.5945403", "0.59439343", "0.5938503", "0.593477", "0.59274894" ]
0.62531996
55
when logout button clicked, the system send a query to logout and switch to login scene
@FXML void logout_btn_clicked(MouseEvent event) { String quary = "UPDATE users SET connection_status = 0 WHERE userID = " + MainClientGUI.getUserID(); Message message = new Message(MessageType.LOGOUT, "MarketingAgentSalesMainController_logout_clicked", quary); MainClientGUI.client.handleMessageFromClientUI(message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void logout() {\n showLoginScreen();\n }", "@FXML\r\n private void handleButtonLogOut() {\r\n sessionContent.remove(\"activeId\");\r\n user = null;\r\n MobileApplication.getInstance().switchView(LOGIN_VIEW);\r\n }", "private void logout() {\n\t\tgetUI().get().navigate(\"login\");\r\n\t\tgetUI().get().getSession().close();\r\n\t}", "public void logout() {\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n //your actions\n Main.Logout();\n }", "public void logout(){\n\t\t\n\t\tcurrentUser.logout();\n\t\tcurrentUser = null;\n\t\tchangeViewPort(new GUI_Logout(\"\", \"\", this));\n\t}", "public void logoutButtonPushed(ActionEvent event) throws IOException\r\n {\r\n SceneChanger.setLoggedInUser(null);\r\n SceneChanger sc = new SceneChanger();\r\n sc.changeScenes(event, \"LoginView.fxml\",\"Login\");\r\n }", "void logout();", "void logout();", "public void logout() {\n\n if (WarehouseHelper.warehouse_reserv_context.getUser().getId() != null) {\n //Save authentication line in HisLogin table\n /*\n HisLogin his_login = new HisLogin(\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName()\n + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + WarehouseHelper.warehouse_reserv_context.getUser().getLogin(),\n GlobalVars.APP_HOSTNAME, GlobalMethods.getStrTimeStamp()));\n his_login.setCreateId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n his_login.setWriteId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n \n \n String str = String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName() + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + PackagingVars.context.getUser().getLogin(), GlobalVars.APP_HOSTNAME,\n GlobalMethods.getStrTimeStamp());\n his_login.setMessage(str);\n\n str = \"\";\n his_login.create(his_login);\n */\n //Reset the state\n state = new S001_ReservPalletNumberScan();\n\n this.clearContextSessionVals();\n\n connectedUserName_label.setText(\"\");\n\n this.setVisible(false);\n }\n\n }", "public void Logout() {\n \t\t\t\n \t\t}", "public static void Logout(){\n\t\tloginSystem();\r\n\t\t\r\n\t}", "private void checkToLogout() {\n logout();\n checkToHome();\n drawViewSideMenu();\n }", "public static void handleLogoutGUI()\n\t{\n\t\tOp logOp = new Op(Operations.LOGOUT,userLogin);\n\t\tclient.handleMessageFromClientUI(logOp);\n\t}", "@Override\n public void performLogout(){\n }", "@Override\r\n\tpublic void logout() {\n\t\t\r\n\t}", "private void logOut() {\n mApi.getSession().unlink();\n\n // Clear our stored keys\n clearKeys();\n // Change UI state to display logged out version\n setLoggedIn(false);\n }", "private void logout() {\n\t\tParseUser.logOut();\n\n\t\t// Go to the login view\n\t\tstartLoginActivity();\n\t}", "public void logout() {\n\n if (WarehouseHelper.warehouse_reserv_context.getUser().getId() != null) {\n //Save authentication line in HisLogin table\n HisLogin his_login = new HisLogin(\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName()\n + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + WarehouseHelper.warehouse_reserv_context.getUser().getLogin(),\n GlobalVars.APP_HOSTNAME, GlobalMethods.getStrTimeStamp()));\n his_login.setCreateId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n his_login.setWriteId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n\n String str = String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName() + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + PackagingVars.context.getUser().getLogin(), GlobalVars.APP_HOSTNAME,\n GlobalMethods.getStrTimeStamp());\n his_login.setMessage(str);\n\n str = \"\";\n his_login.create(his_login);\n\n //Reset the state\n state = new S001_ReservPalletNumberScan();\n\n this.clearContextSessionVals();\n\n connectedUserName_label.setText(\"\");\n }\n\n }", "void onLogout(boolean loggedIn);", "@Override\n public void onLogoutClick() {\n session.doLogout();\n addFragment();\n }", "@FXML\n private void logout(ActionEvent event) throws IOException {\n if (CurrentUser.getInstance().getUser() != null) {\n CurrentUser.getInstance().init(null); //Logs off\n App.setRoot(\"default\");\n }\n }", "public void logoutbuttonPressed(javafx.event.ActionEvent event) throws IOException {\r\n Parent logoutParent = FXMLLoader.load(getClass().getResource(\"Customer_login_Scene.fxml\"));\r\n Scene logoutScene = new Scene(logoutParent);\r\n Stage window = (Stage)((Node)event.getSource()).getScene().getWindow();\r\n window.setScene(logoutScene);\r\n window.show();\r\n }", "public void logout(){\n logger.debug(\"logout from the application\");\n driver.findElement(oLogout).click();\n new WebDriverWait(driver,10).until(\n ExpectedConditions.titleIs(\"Sign-on: Mercury Tours\"));\n\n }", "@FXML\n\tprivate void logoutPressed(ActionEvent event) {\n\t\tclient.goOffline();\n\t\tSystem.exit(0);\n\t}", "public static void logout() {\n click(MY_ACCOUNT_DROPDOWN);\n click(LOGOUT_BUTTON);\n }", "private void logout() {\n Utils.showConfirmationDialogCallBack(MainActivity.this, getString(R.string.logout_sure), this);\n }", "public void logout() {\n javafx.application.Platform.runLater(clientBar::logOut);\n }", "public void logout() {\n\t\tthis.setCurrentUser(null);\n\t\tthis.setUserLoggedIn(false);\t\t\n\t}", "private void logout() {\n userModel.setLoggedInUser(null);\n final Intent intent = new Intent(this, LoginActivity.class);\n startActivity(intent);\n finish();\n }", "public abstract void logout();", "public void logout() {\n\n $(logOutNavigator).click();\n driver = commonMethods.waitForElement(driver, logOffBtn);\n $(logOffBtn).click();\n $(loadingProgressIcon).should(disappear);\n }", "public void logOut(ActionEvent actionEvent) {\n\t\tLOGGER.info(\"Cerrando sesión de usuario\");\n\n\t\tchangeScene(getClass().getResource(\"/view/Login.fxml\"));\n\t}", "public void onLogout() {\n ParseUser.logOut();\n\n promptForLogin();\n }", "public void logOut() {\n\t\t//Inform the database that the user want to log out\n\t\tdc.logOutPlayer(activity);\n\t\t\n\t\t/*\n\t\t * Call is made to StartActivity, which surely is in the bottom of activity-stack. Add a flag to clear stack\n\t\t * and from StartActivity a call is made to the Login screen and StartActivity is finished. By doing this we\n\t\t * assure that Login screen is at the bottom of the activity-stack and a press on back button, while placed \n\t\t * on Login screen, will result in that the application is closed\n\t\t */\n\t\tIntent intent = new Intent(activity, StartActivity.class);\n\t\tintent.putExtra(\"finish\", true);\n\t\tintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\tactivity.startActivity(intent);\n\t\tactivity.finish();\n\t}", "@Step(\"Log out\")\n public void logOut() {\n open();\n sighOutButton.click();\n }", "@Override\n\tpublic void logout() {\n\t}", "@FXML\n private void logOut() throws IOException {\n App.clearManagerStatus();\n App.setRoot(\"/tom/sros/login/logInScreen\");\n }", "@FXML\n void OnActionLogout(ActionEvent event) {\n System.exit(0);\n }", "public void doLogout() {\n loggedIn = false;\r\n HttpSession session = (HttpSession) FacesContext.getCurrentInstance()\r\n .getExternalContext().getSession(false);\r\n session.invalidate(); \r\n String pag= \"/login.xhtml\";\r\n redireccionar(pag);\r\n }", "private void logout() {\n ((MyApplication)this.getApplication()).setLoggedIn(false);\n// Intent intent = new Intent(this, StartupActivity.class);\n// startActivity(intent);\n }", "public void logout() {\n\t\ttry {\n\t\t\tStage mainStage = (Stage) HomePagePane.getScene().getWindow();\n\t\t\tmainStage.close();\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/application/Main.FXML\"));\n\t\t\tAnchorPane pane = loader.load();\n\t\t\tScene scene = new Scene(pane, 700, 400);\n\t\t\tStage stage = new Stage();\n\t\t\tstage.setScene(scene);\n\t\t\tstage.show();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private void logout()\r\n {\r\n LogoutRequest request = new LogoutRequest();\r\n request.setUsername(username);\r\n this.sendRequest(request);\r\n }", "private void logoutUser() {\n\t\tsession.setLogin(false);\n\n\n\t\t// Launching the login activity\n\t\tIntent intent = new Intent(EnterActivity.this, LoginActivity.class);\n\t\tstartActivity(intent);\n\t\tfinish();\n\t}", "private void logout() {\n getSharedPreferences(HELP_CATEGORIES, MODE_PRIVATE).edit().clear().apply();\n getSharedPreferences(LOGIN, MODE_PRIVATE).edit().putBoolean(IS_LOGGED_IN, false).apply();\n\n OkHttpClient client = new OkHttpClient();\n Request request = new Request.Builder()\n .url(URL + \"/nuh/logout\")\n .build();\n AsyncTask.execute(() -> {\n try {\n client.newCall(request).execute();\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n }", "private void logoutHandler() {\n AlertDialog.Builder builder = new AlertDialog.Builder(context, android.R.style.Theme_DeviceDefault_Dialog);\n builder.setTitle(\"Logout?\");\n builder.setMessage(\"Are you sure you want to logout?\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n Util.setLoggedInFlag(false);\n\n HPIApp.getAppContext().stopService(new Intent(HPIApp.getAppContext(), StepService.class));\n\n Intent intent = new Intent(HomeActivity.this, SplashActivity.class);\n startActivity(intent);\n HomeActivity.this.finish();\n }\n });\n\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n\n builder.show();\n }", "void logoutDone();", "protected void userLoggedOut() {\n\t\tRuvego.userLoggedOut();\n\t\tResultsActivityMenu.userLoggedOut();\n\t\tHistory.newItem(\"homePage\");\n\t}", "public void return_logout_success() {\r\n\t\tMainClientGUI.loggedIn = false;\r\n\t\tswitchScenes(\"/client/boundry/LoginForm.fxml\", \"/client/boundry/MainCss.css\");\r\n\t}", "public String logout(){\r\n this.user = null;\r\n loggedIn = false;\r\n return \"/index?faces-redirect=true\";\r\n }", "void successLogout();", "public void logOutBtn(){\r\n\t\t\r\n\t\ttry{\r\n\t\t\tFXMLLoader loader = new FXMLLoader();\r\n\t\t\t\r\n\t\t\tloader.setLocation(getClass().getResource(\"/view/Login.fxml\"));\r\n\t\t\t\r\n\t\t\tAnchorPane root = (AnchorPane)loader.load();\r\n\t\t\t\r\n\t\t\tStage stage = new Stage();\r\n\t\t\t\r\n\t\t\tScene scene = new Scene(root);\r\n\t\t\t\r\n\t\t\tstage.setScene(scene);\r\n\t\t\tstage.setResizable(false);\r\n\t\t\tstage.setTitle(\"Codeflow\");\r\n\t\t\t\t\t\t\r\n\t\t\tstage.show(); // Pop-up login stage\r\n\t\t\t\r\n\t\t\tLoginController.dashboardStage.close(); // Close dashboard stage\r\n\t\t\t\r\n\t\t} catch (IOException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void signOut(){\n\t\tActions action_logout = new Actions(driver);\n\t\tWebElement UI = driver.findElement(By.id(\"UserNavigationTabsContainer\"));\n\t\taction_logout.moveToElement(UI).build().perform();\n\t\tdriver.findElement(By.linkText(\"Logout\")).click();\t\n\t\tpause(500);\n\t}", "private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(MainActivity.this, Login.class);\n startActivity(intent);\n finish();\n }", "@FXML\n private void handleLogoutButton(ActionEvent event)\n {\n Stage stage = (Stage) logoutButton.getScene().getWindow();\n stage.close();\n }", "public void logOut() {\n try {\n // getGlobalNavigation().clickSignOut();\n } catch (TimeoutException e) {\n Log.log(\"logOut\", \"page loads for more than 30 seconds\", true);\n }\n }", "public void logout() {\n // Mengambil method clear untuk menghapus data Shared Preference\n editor.clear();\n // Mengeksekusi perintah clear\n editor.commit();\n // Membuat intent untuk berpindah halaman\n Intent intent = new Intent(context, LoginActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n context.startActivity(intent);\n }", "public void Logout()\n {\n isLoggedIn = false;\n connection.Disconnect(); \n connection = null;\n }", "public void logout() {\n loggedIn = \"\";\n FacesContext.getCurrentInstance().getExternalContext()\n .getSessionMap().put(\"loggedIn\", \"\");\n }", "public void logout() {\n updateToken(\"\");\n startActivity(new Intent(GarageListActivity.this, LoginScreenActivity.class));\n updateToken(\"\");\n finish();\n }", "public static Result logout() {\n session().clear();\n flash(\"success\", Messages.get(\"youve.been.logged.out\"));\n return GO_HOME;\n }", "@FXML public void logoutBT_handler(ActionEvent e) throws Exception {\n\t\tmgUsr.conductSerializing();\n\t\t\n\t\tFXMLLoader loginScene = new FXMLLoader(getClass().getResource(\"/view/login.fxml\"));\n Parent parent = (Parent) loginScene.load();\n loginController login = loginScene.getController();\n Scene loginControllerScene = new Scene(parent);\n Stage window = (Stage)((Node)e.getSource()).getScene().getWindow();\n login.start(window);\n window.setScene(loginControllerScene);\n window.show();\n\t}", "private void logoutButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_logoutButtonActionPerformed\n boolean isLoggedIn = uL.isLoggedIn();\n boolean isLoggedInNew = na.isLoggedIn();\n //boolean found = uL.isFound();\n if (isLoggedIn || isLoggedInNew) {\n na.setIsLoggedIn(false);\n uL.setIsLoggedIn(false);\n uL.setIsFound(false);\n dm.messageUserLoggedOut();\n } else {\n dm.messageUserNotLoggedIn();\n }\n }", "private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(Activity_Main.this, Activity_Login.class);\n startActivity(intent);\n finish();\n }", "@FXML\r\n void ClickLogout(MouseEvent event) throws IOException {\r\n //Display confirmation alert\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setTitle(\"Exit Weechat\");\r\n alert.setHeaderText(\"Are you sure you want to Logout of Weechat\");\r\n //Add cancel button\r\n ButtonType confirmButton = new ButtonType(\"Don't Logout\", \r\n ButtonBar.ButtonData.CANCEL_CLOSE);\r\n //Wait for response\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if(result.get() == ButtonType.OK)\r\n {\r\n //If user selects okay, go to login\r\n Parent root = FXMLLoader.load(getClass().getResource(\"Login.fxml\"));\r\n Scene scene = new Scene(root);\r\n Stage stage = (Stage)\r\n ((Node)event.getSource()).getScene().getWindow();\r\n stage.setScene(scene);\r\n stage.show();\r\n }\r\n }", "protected void logout() {\n\t\tActiveUserModel userController = ActiveUserModel.getInstance();\n\t\tuserController.performLogout();\n\n\t\tIntent intent = new Intent(this, LoginActivity.class);\n\t\tstartActivityForResult(intent, LOGIN_ACTIVITY);\n\t}", "@Override\r\n\tpublic void userLogout(String login) {\n\r\n\t}", "public static void logout() {\n userId = -1;\n aisId = -1;\n \n name = \"\";\n role = \"\";\n roleFromDatabase = \"\";\n \n lastAction = LocalDateTime.now().minusYears(100);\n }", "@Override\r\n\t\t\tpublic void onLogout() {\n\t\t\t\tshowToast(\"onLogout---\");\r\n\t\t\t}", "@FXML\r\n\tpublic void logout() {\r\n\t\tcontroller.logoutUser();\r\n\t}", "public void logout()\r\n {\r\n loginForForm = \"\";\r\n passwordForForm = \"\";\r\n redirectSession(\"/logout\");\r\n }", "@Override\n public void Logout() {\n\t \n }", "public void logout() {\n \n FacesContext.getCurrentInstance().getExternalContext().invalidateSession();\n try {\n FacesContext.getCurrentInstance().getExternalContext()\n .redirect(\"/BookStorePelikSangat/faces/admin/loginadmin.xhtml\");\n } \n catch (IOException e) {}\n\t}", "@Override\r\n public void actionPerformed(ActionEvent e) {\n LogoutAbstract.Logout();\r\n }", "private void signOutUser() {\n mAuth.signOut();\n LoginManager.getInstance().logOut();\n Toast.makeText(ChatMessage.this, \"You have been logout\", Toast.LENGTH_SHORT).show();\n finishAffinity();\n proceed();\n }", "public void logoutUser() {\n editor.remove(Is_Login).commit();\n editor.remove(Key_Name).commit();\n editor.remove(Key_Email).commit();\n editor.remove(KEY_CUSTOMERGROUP_ID).commit();\n // editor.clear();\n // editor.commit();\n // After logout redirect user to Loing Activity\n\n }", "private void logout(){\n player.setName(\"(bot) \" + player.getName());\n botMode = true;\n System.out.println(\"bot made\");\n login = false;\n }", "private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(this, Login.class);\n startActivity(intent);\n finish();\n }", "@JavascriptInterface\n public void logout() {\n Login.logout();\n Intent intent = new Intent(mContext, LoginActivity.class);\n mContext.startActivity(intent);\n }", "public void doLogout() {\n mSingleton.getCookieStore().removeUser(mUser);\n mPreferences.setUser(null);\n new ActivityTable().flush();\n\n //update variables\n mUser = null;\n mLogin = false;\n\n //reset drawer\n restartActivity();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tlogOut();\n\t\t\t}", "public void logoutbutton(ActionEvent event) throws Exception{\n\t\tMain log = new Main();\n\t\tlog.start(Main.getPrimarystage());\n\t}", "@Override\n\tpublic String logout() {\n\t\treturn null;\n\t}", "public void attemptLogout() {\n spEditor.clear();\n spEditor.putBoolean(LOGGEDIN_KEY, false);\n spEditor.commit();\n }", "private void logout(){\r\n\t\ttry {\r\n\t\t\tserver.rmvClient(user);\r\n\t\t} catch (RemoteException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\tSystem.exit(0);\r\n\t}", "public String logout()\n\t{\n\t\tsession.remove(\"user_name\");\n\t\tsession.remove(\"password\");\n\t\tsession.clear();\n\t\tsession.invalidate();\t\n\t\taddActionMessage(\"You Have Been Successfully Logged Out\");\n\t\treturn SUCCESS;\n\t}", "public void logout() {\n getRequest().getSession().invalidate();\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tsession.logoutUser();\n\t\t\t\tToast.makeText(getApplicationContext(), \"Anda Sudah Keluar!\", Toast.LENGTH_LONG).show();\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t\tUserHandler.logOut();\n\t\t\t}", "public UserActivityDDL logoutFrominMD()throws Exception{\n click(UserProfileLinkBy);\n //Click Logout Button\n click(logoutButtonBy);\n return this;\n }", "public void logout() {\n\n clearData();\n Intent intent = new Intent(getContext(), LoginActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n\n\n }", "void logoutSuccessful();", "@FXML\n public void signOutButtonClicked(ActionEvent event) {\n try {\n // get current stage and load log in view\n Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();\n\n LoginView loginView = new LoginView();\n loginView.start(stage);\n } catch (Exception e) {\n logger.log(Level.SEVERE, e.toString());\n }\n }", "public void btnLogout(View view) {\n actionButton.collapse();\n\n SetSharedPreference setSharedPreference = new SetSharedPreference(this);\n // signout from app.\n setSharedPreference.setBooleanLogin(getString(R.string.boolean_login_sharedPref), \"false\");\n\n Intent intent = new Intent(this, StartupActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n finish();\n startActivity(intent);\n\n }", "@FXML\n public void logout(ActionEvent e)\n {\n //re open login window\n try\n {\n Stage login=new Stage();\n Stage admin=new Stage();\n Parent root2 = FXMLLoader.load(getClass().getResource(\"../View/login.fxml\"));\n login.setTitle(\"Login\");\n login.setScene(new Scene(root2, 960, 600));\n login.show();\n admin=(Stage) ((Node)e.getSource()).getScene().getWindow();\n admin.close();\n }\n catch(Exception ex)\n {\n a = new Alert(AlertType.ERROR);\n a.setContentText(ex.getMessage());\n a.show();\n }\n }", "public void logout() {\n editor.clear();\n editor.commit();\n\n }", "private void logout() {\n LogoutTask mAuthTask = new LogoutTask();\n mAuthTask.execute((Void) null);\n }", "private void logout(){\n showLoadingDialog();\n TwitterController.getInstance().logout(logoutCallback);\n }", "private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(EscolhaProjeto.this, LoginActivity.class);\n startActivity(intent);\n finish();\n }", "private void logout(){\n ParseUser.logOut();\n removeUserFromPrefs();\n Intent intent = LandingActivity.intent_factory(this);\n startActivity(intent);\n }" ]
[ "0.8038486", "0.7837762", "0.78089005", "0.7628017", "0.76135296", "0.75868094", "0.7554778", "0.7543264", "0.7543264", "0.75270706", "0.75063956", "0.75019395", "0.74988306", "0.7492724", "0.74058", "0.7405634", "0.7405529", "0.739918", "0.73951966", "0.7371091", "0.735319", "0.73491627", "0.7342627", "0.73385507", "0.7338213", "0.7307966", "0.7284735", "0.72829366", "0.7279415", "0.72535276", "0.725116", "0.72422725", "0.72329175", "0.7204395", "0.7201282", "0.72006816", "0.7193696", "0.7190135", "0.71864396", "0.7174156", "0.71720994", "0.7169715", "0.71631455", "0.71320194", "0.7101614", "0.7088819", "0.70767266", "0.70695525", "0.70506835", "0.70417887", "0.70397407", "0.70343196", "0.7025559", "0.7020645", "0.70187885", "0.70143956", "0.70085055", "0.7001687", "0.6996197", "0.69916284", "0.699066", "0.69887704", "0.69883245", "0.6982239", "0.69781286", "0.696704", "0.6963558", "0.69593996", "0.69585437", "0.695816", "0.6955783", "0.6944924", "0.6934491", "0.6933236", "0.6928661", "0.6928647", "0.6925113", "0.69243366", "0.6921981", "0.69109213", "0.6903294", "0.6898782", "0.68686336", "0.6867357", "0.686268", "0.686004", "0.6847269", "0.6837204", "0.6832707", "0.6828396", "0.6825104", "0.6821934", "0.6818941", "0.6816894", "0.68152297", "0.6812818", "0.6802191", "0.6800951", "0.67956734", "0.67918354" ]
0.7850396
1
not have implementation for now
@FXML void main_btn_clicked(MouseEvent event) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n protected void prot() {\n }", "@Override\n protected void getExras() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public abstract void mo70713b();", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\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\tprotected void doF4() {\n\t\t\r\n\t}", "protected abstract Set method_1559();", "@Override\n protected void init() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void method_4270() {}", "public void mo38117a() {\n }", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tprotected void logic() {\n\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo56925d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract void mo6549b();", "private static void iterator() {\n\t\t\r\n\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "public void smell() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "private void poetries() {\n\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}", "private void kk12() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tprotected void parseResult() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\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}", "@Override\r\n\tpublic void init() {}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "private void m50366E() {\n }", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\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 }", "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 void init() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n protected void initialize() {\n }" ]
[ "0.62420297", "0.6156516", "0.60647535", "0.6030221", "0.5954782", "0.5895229", "0.5895229", "0.58590066", "0.5847479", "0.5825338", "0.58094674", "0.58047247", "0.58047247", "0.5802421", "0.5757812", "0.57397026", "0.5716638", "0.5714169", "0.5712029", "0.57017857", "0.56963384", "0.56831783", "0.567753", "0.5677114", "0.5628036", "0.56153625", "0.5608143", "0.56057394", "0.56009597", "0.55937237", "0.55761063", "0.5568979", "0.5535429", "0.55309635", "0.55309635", "0.55288017", "0.55269897", "0.5513598", "0.5510184", "0.5503896", "0.5501352", "0.54901725", "0.5489968", "0.5483986", "0.5480262", "0.54649085", "0.5462125", "0.54564965", "0.54549843", "0.54519373", "0.54485005", "0.5447571", "0.54458183", "0.5444226", "0.5438015", "0.543051", "0.5426676", "0.5426372", "0.542141", "0.54210263", "0.5419285", "0.541862", "0.5414477", "0.5414477", "0.5413994", "0.54126126", "0.5412069", "0.5410679", "0.54086626", "0.5406786", "0.5404846", "0.54042614", "0.53958076", "0.53958076", "0.53958076", "0.53914165", "0.5387821", "0.5382686", "0.53797966", "0.5373956", "0.53596985", "0.5355227", "0.53451294", "0.5342375", "0.5342375", "0.5342375", "0.5342375", "0.5342375", "0.53407526", "0.53393126", "0.53393126", "0.53393126", "0.53393126", "0.53393126", "0.53393126", "0.53393126", "0.5334544", "0.5333687", "0.53320533", "0.53157413", "0.531266" ]
0.0
-1
not have implementation for now
@FXML void menu_btn_clicked(MouseEvent event) { switchScenes("/client/boundry/MarketingAgentMenuWelcomeForm.fxml", "/client/boundry/MarketingAgentMainCustomer.css"); }
{ "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\tprotected void interr() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n protected void prot() {\n }", "@Override\n protected void getExras() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public abstract void mo70713b();", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\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\tprotected void doF4() {\n\t\t\r\n\t}", "protected abstract Set method_1559();", "@Override\n protected void init() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void method_4270() {}", "public void mo38117a() {\n }", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tprotected void logic() {\n\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo56925d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract void mo6549b();", "private static void iterator() {\n\t\t\r\n\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "public void smell() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "private void poetries() {\n\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}", "private void kk12() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tprotected void parseResult() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\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}", "@Override\r\n\tpublic void init() {}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "private void m50366E() {\n }", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\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 }", "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 void init() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n protected void initialize() {\n }" ]
[ "0.62420297", "0.6156516", "0.60647535", "0.6030221", "0.5954782", "0.5895229", "0.5895229", "0.58590066", "0.5847479", "0.5825338", "0.58094674", "0.58047247", "0.58047247", "0.5802421", "0.5757812", "0.57397026", "0.5716638", "0.5714169", "0.5712029", "0.57017857", "0.56963384", "0.56831783", "0.567753", "0.5677114", "0.5628036", "0.56153625", "0.5608143", "0.56057394", "0.56009597", "0.55937237", "0.55761063", "0.5568979", "0.5535429", "0.55309635", "0.55309635", "0.55288017", "0.55269897", "0.5513598", "0.5510184", "0.5503896", "0.5501352", "0.54901725", "0.5489968", "0.5483986", "0.5480262", "0.54649085", "0.5462125", "0.54564965", "0.54549843", "0.54519373", "0.54485005", "0.5447571", "0.54458183", "0.5444226", "0.5438015", "0.543051", "0.5426676", "0.5426372", "0.542141", "0.54210263", "0.5419285", "0.541862", "0.5414477", "0.5414477", "0.5413994", "0.54126126", "0.5412069", "0.5410679", "0.54086626", "0.5406786", "0.5404846", "0.54042614", "0.53958076", "0.53958076", "0.53958076", "0.53914165", "0.5387821", "0.5382686", "0.53797966", "0.5373956", "0.53596985", "0.5355227", "0.53451294", "0.5342375", "0.5342375", "0.5342375", "0.5342375", "0.5342375", "0.53407526", "0.53393126", "0.53393126", "0.53393126", "0.53393126", "0.53393126", "0.53393126", "0.53393126", "0.5334544", "0.5333687", "0.53320533", "0.53157413", "0.531266" ]
0.0
-1
switch the screen to notification form
@FXML void notification_btn_clicked(MouseEvent event) { switchScenes("/client/boundry/MarketingAgentNotificationMainForm.fxml", "/client/boundry/MarketingAgentMainCustomer.css"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateScreen()\r\n\t{\r\n\t\tif (this.areRealmsNotificationsEnabled())\r\n\t\t{\r\n\t\t\tthis.realmsNotification.updateScreen();\r\n\t\t}\r\n\t}", "private void showNotification() {\n }", "private void showNotification() {\n\n }", "private void notificationButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_notificationButtonActionPerformed\n // TODO add your handling code here:\n this.setVisible(false);\n this.parentNavigationController.getNotificationController();\n }", "void goMainScreen(){\n\t\tcheckSavePwd();\n\t\tActionEvent e = new ActionEvent();\n\t\te.sender = this;\n\t\te.action = ActionEventConstant.ACTION_SWITH_TO_CATEGORY_SCREEN;\n\t\tUserController.getInstance().handleSwitchActivity(e);\n\t}", "private void showNotification() {\n // In this sample, we'll use the same text for the ticker and the expanded notification\n CharSequence text = \"Siguiendo el trayecto\";\n\n // The PendingIntent to launch our activity if the user selects this notification\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, InformacionServicio.class), 0);\n\n // Set the info for the views that show in the notification panel.\n Notification notification = new Notification.Builder(this)\n .setSmallIcon(R.drawable.estrella_full) // the status icon\n .setTicker(text) // the status text\n .setWhen(System.currentTimeMillis()) // the time stamp\n .setContentTitle(\"Conductor Serv\") // the label of the entry\n .setContentText(text) // the contents of the entry\n .setContentIntent(contentIntent) // The intent to send when the entry is clicked\n .build();\n\n // Send the notification.\n //mNM.notify(55, notification);\n //startForeground(56,notification);\n\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)\n startMyOwnForeground();\n else\n startForeground(1, notification);\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartActivity(openNotifications);\n\t\t\t\t//setContentView(R.layout.activity_timetable__gui);\n\t\t\t}", "@Override\n public void actionPerformed(ActionEvent e){\n \tframe.getNotif().update();\n ArrayList<Notification> newNotif;\n if (Application.getApplication().getCurrentUser() != null)\n newNotif = Application.getApplication().getCurrentUser().getNotifications();\n else\n newNotif = Application.getApplication().getAdmin().getNotifications();\n frame.getNotif().setNotifications(newNotif);\n this.frame.showPanel(\"notif\");\n }", "public void notificationspageButtonPressed(javafx.event.ActionEvent event) throws IOException {\r\n Parent notificationsParent = FXMLLoader.load(getClass().getResource(\"Notification.fxml\"));\r\n Scene notificationsScene = new Scene(notificationsParent);\r\n Stage window = (Stage)((Node)event.getSource()).getScene().getWindow();\r\n window.setScene(notificationsScene);\r\n window.show();\r\n }", "private void showNotification() {\n CharSequence text = \"Running\";\n\n // The PendingIntent to launch our activity if the user selects this notification\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, MainActivity.class), 0);\n\n // Set the info for the views that show in the notification panel.\n Notification notification = new Notification.Builder(this)\n //.setSmallIcon(R.drawable.stat_sample) // the status icon\n .setTicker(text) // the status text\n //.setWhen(System.currentTimeMillis()) // the time stamp\n .setContentTitle(\"PodcastFTPService\") // the label of the entry\n .setContentText(text) // the contents of the entry\n .setContentIntent(contentIntent) // The intent to send when the entry is clicked\n .build();\n\n // Send the notification.\n mNM.notify(0, notification);\n }", "private void showNotification() {\n\t\t\t\tPendingIntent contentIntent = PendingIntent.getActivity(this, 0, \n\t\t\t\t\t\tnew Intent(this, MainActivity.class), 0);\n\t\t\t\t\n\t\t// Use NotificationCompat.Builder to build the notification, display using mNM\n\t\tNotificationCompat.Builder mNotifyBuilder= new NotificationCompat.Builder(this)\n\t\t\t.setContentTitle(getText(R.string.notificationTitle))\n\t\t\t.setContentText(getText(R.string.notificationText))\n\t\t\t.setSmallIcon(R.drawable.ic_launcher)\n\t\t\t.setContentIntent(contentIntent);\n\t\t\n\t\tmNM.notify(notifyID, mNotifyBuilder.build());\n\t}", "@SuppressWarnings(\"deprecation\")\n\tprivate void showNotification() {\n\t\t// What happens when the notification item is clicked\n\t\tIntent contentIntent = new Intent(this, MainActivity.class);\n\n\t\tPendingIntent pending = PendingIntent.getActivity(\n\t\t\t\tgetApplicationContext(), 0, contentIntent,\n\t\t\t\tandroid.content.Intent.FLAG_ACTIVITY_NEW_TASK);\n\n\t\tNotification nfc = new Notification(R.drawable.ic_launcher, null,\n\t\t\t\tSystem.currentTimeMillis());\n\t\tnfc.flags |= Notification.FLAG_ONGOING_EVENT;\n\n\t\tString contentText = getString(R.string.service_label);\n\n\t\tnfc.setLatestEventInfo(getApplicationContext(), contentText,\n\t\t\t\tcontentText, pending);\n\n\t\tmNM.notify(NOTIFICATION, nfc);\n\t\tSession.setNotificationVisible(true);\n\t}", "private void showNotification(Notification notification) {\n notification.setDelayMsec(2000);\r\n notification.show(Page.getCurrent());\r\n }", "private void showNotification() {\n\n Intent intent = new Intent(this, DashboardActivity.class);\n TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);\n stackBuilder.addParentStack(DashboardActivity.class);\n stackBuilder.addNextIntent(intent);\n\n final NotificationCompat.Builder builder = new NotificationCompat.Builder(this);\n\n builder.setSmallIcon(R.drawable.ic_gps);\n builder.setContentText(getText(R.string.local_service_started));\n builder.setContentTitle(getText(R.string.local_service_label));\n builder.setOngoing(true);\n builder.setContentIntent(stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT));\n\n final Notification notification = builder.build();\n\n // Send the notification.\n mNotificationManager.notify(NOTIFICATION, notification);\n }", "@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tNotificationManager nm = (NotificationManager) getActivity().getSystemService(NOTIFICATION_SERVICE);\r\n\t\t\t\t\tIntent openIntent = new Intent(getActivity(),FullscreenActivity.class);\r\n\t\t\t\t\tPendingIntent contentIntent = PendingIntent.getActivity(getActivity(), 0, openIntent, 0);\r\n\t\t\t\t\tint icon = R.drawable.preferences_desktop_notification;\r\n\t\t\t\t\tNotification n = new Notification(icon,\"通知来了\",System.currentTimeMillis());\r\n\t\t\t\t\tn.flags |= Notification.FLAG_AUTO_CANCEL;//自动消失\r\n\t\t\t\t\tn.defaults = Notification.DEFAULT_SOUND;//声音默认\r\n\t\t\t\t\tn.setLatestEventInfo(getActivity(), \"通知标题\", \"通知正文\", contentIntent);\r\n\t\t\t\t\tnm.notify(0,n);\r\n\t\t\t\t}", "private void checkNewNotification() {\n toolbar.setTitle(R.string.notification);\n NotificationFragment notificationFragment = new NotificationFragment();\n displaySelectedFragment(notificationFragment);\n }", "private void onMainMenuLogin() {\n Intent intent = new Intent(this, MainMenu.class);\n intent.putExtra(Constants.SHOWNOTIFICATION, isNotification);\n startActivity(intent);\n }", "private void showNotification() {\r\n\t\t// In this sample, we'll use the same text for the ticker and the\r\n\t\t// expanded notification\r\n\t\tCharSequence text = getText(R.string.local_service_started);\r\n\r\n\t\t// Set the icon, scrolling text and timestamp\r\n\t\tNotification notification = new Notification(R.drawable.compass25,\r\n\t\t\t\ttext, System.currentTimeMillis());\r\n\t\tnotification.sound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\r\n\t\t// The PendingIntent to launch our activity if the user selects this\r\n\t\t// notification\r\n\t\tIntent intent = new Intent(this, TaskOverViewActivity.class);\r\n\t\t//intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);\r\n\t\tPendingIntent contentIntent = PendingIntent.getActivity(this, 0,\r\n\t\t\t\tintent, PendingIntent.FLAG_UPDATE_CURRENT);\r\n\r\n\t\t// Set the info for the views that show in the notification panel.\r\n\t\tnotification.setLatestEventInfo(this, getText(R.string.service_name),\r\n\t\t\t\ttext, contentIntent);\r\n\r\n\t\t// Send the notification.\r\n\t\t// We use a layout id because it is a unique number. We use it later to\r\n\t\t// cancel.\r\n\t\tmNM.notify(R.string.local_service_started, notification);\r\n\t}", "private void showNotification() {\r\n\t\t// In this sample, we'll use the same text for the ticker and the\r\n\t\t// expanded notification\r\n\t\tCharSequence text = getText(R.string.local_service_started);\r\n\r\n\t\t// Set the icon, scrolling text and timestamp\r\n\t\tNotification notification = new Notification(R.drawable.service_icon,\r\n\t\t\t\ttext, System.currentTimeMillis());\r\n\r\n\t\t// The PendingIntent to launch our activity if the user selects this\r\n\t\t// notification\r\n\t\tPendingIntent contentIntent = PendingIntent.getActivity(this, 0,\r\n\t\t\t\tnew Intent(this, stopServiceJ.class), 0);\r\n\r\n\t\t// Set the info for the views that show in the notification panel.\r\n\t\tnotification.setLatestEventInfo(this, getText(R.string.service_name),\r\n\t\t\t\ttext, contentIntent);\r\n\r\n\t\t// Send the notification.\r\n\t\t// We use a layout id because it is a unique number. We use it later to\r\n\t\t// cancel.\r\n\t\tmNM.notify(R.string.local_service_started, notification);\r\n\t}", "void redirectToNotification();", "private void showNotification() {\n Intent intent = new Intent(this, MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);\n Notification notification = new NotificationCompat.Builder(getApplicationContext())\n .setContentIntent(PendingIntent.getActivity(this, 0, intent, 0))\n .setSmallIcon(R.drawable.ic_launcher)\n .setContentText(getText(R.string.local_service_running))\n .setContentTitle(getText(R.string.local_service_notification)).build();\n notificationManager.notify(NOTIFICATION, notification);\n }", "public void btnpress(View view) {\n NewMessageNotification newMessageNotification = new NewMessageNotification();\n newMessageNotification.notify(MainActivity.this,\"Danger\",1);\n }", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tAddNotificationWizard wizard = new AddNotificationWizard(humanInteractions,notificationPage,domain,notficationViewer);\n\t\t\t\tWizardDialog wizardDialog = new WizardDialog(Display .getCurrent().getActiveShell(),wizard);\n\t\t\t\twizardDialog.create(); \n\t\t\t\twizardDialog.open();\n\t\t\t}", "private void showNotification() {\n // In this sample, we'll use the same text for the ticker and the expanded notification\n CharSequence text = getText(R.string.local_service_started);\n\n // Set the icon, scrolling text and timestamp\n Notification notification = new Notification(R.drawable.icon, text,\n System.currentTimeMillis());\n\n // The PendingIntent to launch our activity if the user selects this notification\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, ServiceActivity.class), 0);\n\n // Set the info for the views that show in the notification panel.\n notification.setLatestEventInfo(this, getText(R.string.local_service_label),\n text, contentIntent);\n\n // Send the notification.\n mNM.notify(NOTIFICATION, notification);\n }", "private void noti1(){\n\t\t/*Contenido de notificacion*/\n\t\tNotification notificacion = new Notification( \n R.drawable.metrans_logo,\n \"Metrans inicializando... Bienvenido\",\n System.currentTimeMillis() );\n\t\t/*Fin de contenido de la notificacion*/\n\t\tPendingIntent intencionPendiente = PendingIntent.getActivity(\n\t\t this, 0, new Intent(this, MainActivity.class), 0);\n\t\tnotificacion.setLatestEventInfo(this, \"Somos tan chingones\",\n\t\t \"que tenemos notificaciones aqui\", intencionPendiente);\n\t\n\t\t nm1.notify(ID_NOTIFICACION_CREAR, notificacion); //Enviamos la notificacion al status bar\n\t\tnotificacion.defaults |= Notification.DEFAULT_VIBRATE; //Agregando algo de vibracion... Espero y funcione\n\t\t\n\t}", "public void run() {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tAlertDialog.showInformMessage(message);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tUiApplication.getUiApplication().pushScreen(new HomeScreen());\n\t\t\t\t\t\t}", "public static void ChangeScreen(ScreenType t) {\n\t\tlayout.show(contentPanel, t.toString());\n\t}", "private void newGame()\r\n {\r\n //close the current screen\r\n screen.dispose();\r\n //start back at the set up menu\r\n SetupView screen = new SetupView();\r\n SetupController controller = new SetupController(screen);\r\n screen.registerObserver(controller);\r\n }", "public void createNotification(View view) {\n Intent intent = new Intent(this, Status1.class);\r\n PendingIntent pIntent = PendingIntent.getActivity(this, 0, intent, 0);\r\n\r\n // Build notification\r\n // Actions are just fake\r\n Notification noti = new Notification.Builder(this)\r\n .setContentTitle(\"RKC App \")\r\n .setContentText(\"Click To Enter \").setSmallIcon(R.drawable.arc)\r\n .setContentIntent(pIntent)\r\n .addAction(R.drawable.ironman, \"Back\", pIntent)\r\n .addAction(R.drawable.gun, \"More\", pIntent)\r\n .build();\r\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\r\n // hide the notification after its selected\r\n noti.flags |= Notification.FLAG_AUTO_CANCEL;\r\n\r\n notificationManager.notify(0, noti);\r\n\r\n }", "public void setNotification(String notif) {\n frame.setNotification(notif);\n }", "private void showNotification(LBSBundle lbs,int status){\n\t\tScenario scenario = (Scenario) EntityPool.instance(\r\n\t\t\t\t).forId(lbs.getParentId(), lbs.getParentTag());\r\n\t\t\r\n\t\t\r\n\t\t// Set the icon, scrolling text and timestamp\r\n\t\tNotification notification = new Notification(R.drawable.compass25,\r\n\t\t\t\tscenario.getName(), System.currentTimeMillis());\r\n\t\tnotification.flags |= Notification.FLAG_AUTO_CANCEL;\r\n\t\tnotification.sound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\r\n\t\t// The PendingIntent to launch our activity if the user selects this\r\n\t\t// notification\r\n\t\tIntent intent = new Intent(this, TaskOverViewActivity.class);\r\n\t\tintent.setAction(TaskOverViewActivity.TASK_OVERVIEWBY_SCENARIO);\r\n\t\tintent.putExtra(TaskOverViewActivity.IN_SCENAIRO_ID, scenario.getId());\r\n\t\t//intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);\r\n\t\tPendingIntent contentIntent = PendingIntent.getActivity(this, 0,\r\n\t\t\t\tintent, PendingIntent.FLAG_UPDATE_CURRENT);\r\n\r\n\t\tCharSequence text = getText(status);\r\n\t\t// Set the info for the views that show in the notification panel.\r\n\t\tnotification.setLatestEventInfo(this, scenario.getName(),\r\n\t\t\t\ttext, contentIntent);\r\n\r\n\t\t// Send the notification.\r\n\t\t// We use a layout id because it is a unique number. We use it later to\r\n\t\t// cancel.\r\n\t\tmNM.notify(\tstatus, notification);\r\n\t}", "public void switchToGameScreen() {\n \tCardLayout currLayout = (CardLayout) screens.getLayout();\n \tcurrLayout.show(screens, \"game\");\n \troom.reset();\n }", "private void showSuccess() {\n if (binder.isValid()){\n Notification notification = Notification.show(\"Your Advert Has Been Updated \");\n notification.addThemeVariants(NotificationVariant.LUMO_SUCCESS);\n UI.getCurrent().getPage().reload();\n }\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tmsgsnd(\"start\");\r\n\t\t\t\ttoppanel.setVisible(true);\r\n\t\t\t\tbottompanel.setVisible(true);\r\n\t\t\t\tanswer.requestFocus();\r\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, ApplicationSession.instance().getString(\"info\"), \"info\", JOptionPane.INFORMATION_MESSAGE, null);\t\n\t\t\t}", "private void switchScreen(int pScreen) {\r\n\t\tif (pScreen == START) {\r\n\t\t\tcontroller.close();\r\n\t\t\t\r\n\t\t\tcontroller = new StartController(model, display);\r\n\t\t\tcontroller.addObserver(this);\r\n\t\t\tview = new StartView(shell, model, controller);\r\n\t\t\tview.setLayoutData(gridData);\r\n\t\t\t\r\n\t\t\tshell.layout();\r\n\t\t} else if (pScreen == JOURNAL) {\r\n\t\t\tcontroller.close();\r\n\t\t\t\r\n\t\t\tcontroller = new JournalController(model, display);\r\n\t\t\tcontroller.addObserver(this);\r\n\t\t\tview = new JournalView(shell, model, (JournalController)controller);\r\n\t\t\tview.setLayoutData(gridData);\r\n\t\t\t\r\n\t\t\tshell.layout();\r\n\t\t} else if (pScreen == SETTINGS) {\r\n\t\t\tcontroller.close();\r\n\r\n\t\t\tcontroller = new SettingsController(model, display);\r\n\t\t\tcontroller.addObserver(this);\r\n\t\t\tview = new SettingsView(shell, model, (SettingsController)controller);\r\n\t\t\tview.setLayoutData(gridData);\r\n\t\t\t\r\n\t\t\tshell.layout();\r\n\t\t} else if (pScreen == EXAM) {\r\n\t\t\tcontroller.close();\r\n\r\n\t\t\tcontroller = new ExamController(model, display);\r\n\t\t\tcontroller.addObserver(this);\r\n\t\t\tview = new ExamView(shell, model, (ExamController)controller);\r\n\t\t\t\r\n\t\t\t/* Construction of ExamView may fail, in which case it is disposed at once. */\r\n\t\t\tif (!view.isDisposed()) {\r\n\t\t\t\tview.setLayoutData(gridData);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tshell.layout();\r\n\t\t} else if (pScreen == HELP) {\r\n\t\t\tcontroller.close();\r\n\r\n\t\t\tcontroller = new HelpController(model, display);\r\n\t\t\tcontroller.addObserver(this);\r\n\t\t\tview = new HelpView(shell, model, (HelpController)controller);\r\n\t\t\t\r\n\t\t\t/* Construction of HelpView may fail, in which case it is disposed at once. */\r\n\t\t\tif (!view.isDisposed()) {\r\n\t\t\t\tview.setLayoutData(gridData);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tshell.layout();\r\n\t\t} else if (pScreen == ABOUT) {\r\n\t\t\tcontroller.close();\r\n\t\r\n\t\t\tcontroller = new AboutController(model, display);\r\n\t\t\tcontroller.addObserver(this);\r\n\t\t\tview = new AboutView(shell, model, (AboutController)controller);\r\n\t\t\t\r\n\t\t\tview.setLayoutData(gridData);\r\n\t\t\tshell.layout();\r\n\t\t}\r\n\t}", "private void showNotification(String message) {\n // Prepare intent which is triggered if the\n // notification is selected\n Intent intent = new Intent(this, LoginActivity.class);\n int mNotificationId = (int) System.currentTimeMillis();\n PendingIntent pIntent =\n PendingIntent.getActivity(this,\n mNotificationId,\n intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_logo)\n .setContentTitle(getString(R.string.app_name))\n .setContentText(message)\n .setContentIntent(pIntent)\n .setAutoCancel(true);\n\n NotificationManager mNotifyMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n mNotifyMgr.notify(mNotificationId, mBuilder.build());\n }", "private void showEndOfTripNotification() {\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(\"End of trip\")\n .setContentText(\"Notification text has been sent to \" + myFriendObject.getName());\n int mNotificationId = 001;\n NotificationManager manager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n manager.notify(mNotificationId, mBuilder.build());\n }", "public void openSettingsScreen(View view) {\n// Intent intent = new Intent(this, RnluSettingsScreen.class);\n Intent intent = new Intent(this, pl.hubertkarbowy.androidrnlu.config.SettingsActivity.class);\n// EditText editText = findViewById(R.id.nlInput);\n// String message = editText.getText().toString();\n// intent.putExtra(EXTRA_MESSAGE, message);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n\n if (!prefs.getBoolean(Constants.KEY_IS_MINI_GUIDE_SHOWN, false)) {\n openMiniGuide1();\n } else {\n prefs.edit().putString(Constants.KEY_IS_FIRST_TIME, \"true\");\n startActivity(new Intent(SplashLandingActivity.this, SignUpActivity.class));\n finish();\n }\n\n }", "private void showForegroundControls(Class theActivity, String songName, int iconRes){\n PendingIntent pi = createActivityPendingIntent(theActivity);\n _currentNotification = new NotificationCompat.Builder(this)\n .setContentIntent(pi)\n .setSmallIcon(iconRes)\n .setTicker(songName)\n .setContentTitle(getApplicationInfo().loadLabel(getPackageManager()).toString())\n .setContentText(\"Playing: \" + songName)\n .build();\n _currentNotification.flags |= Notification.FLAG_ONGOING_EVENT;\n showNotification();\n }", "public void run() {\n String lg_ti = \"Test.\";\n String des_ti = \"The license valid until \";\n String ban_ti = \"Warning!\";\n getNotificationData();\n //notificationShow(des_ti,lg_ti,ban_ti);\n }", "public void switchToMenuScreen() {\n \tCardLayout currLayout = (CardLayout) screens.getLayout();\n \tcurrLayout.show(screens, \"menu\");\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t\t\t\tboolean approved = showLoginScreen();\n\t\t\t\tif(approved) {\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tGUIDriver.goToScreen(\"welcome\");\n\t\t\t\t} else {\n\t\t\t\t\tshowIncorrectMessage();\n\t\t\t\t}\n\t\t}", "@Override\n\tpublic void goToUiMantTipoNotificacionActualizar() {\n\t\tTipoNotificacion bean = grid.getSelectionModel().getSelectedObject();\n\t\tif (bean != null) {\n\t\t\tif (ui == null) {\n\t\t\t\tui = new UiMantTipoNotificacionImpl(this);\n\t\t\t\tui.setModo(UiMantenimiento.MODOUPDATE);\n\t\t\t\tui.setBean(bean);\n\t\t\t\tui.loadFields();\n\t\t\t\tui.show();\n\t\t\t} else {\n\t\t\t\tui.setModo(UiMantenimiento.MODOUPDATE);\n\t\t\t\tui.setBean(bean);\n\t\t\t\tui.loadFields();\n\t\t\t\tui.show();\n\t\t\t}\n\t\t} else {\n\t\t\tMaterialToast.fireToast(\"Seleccione una fila del grid\");\n\t\t}\n\t}", "int displayNotification(Message message);", "public void onMotdSent() {\r\n\t\tif (!loggedIn) {\r\n\t\t\tif (adminWindow != null) {\r\n\t\t\t\tadminWindow.setVisible(true);\r\n\t\t\t}\r\n\t\t\tdispose();\r\n\t\t\tloggedIn = true;\r\n\t\t}\r\n\t\t\r\n\t}", "private void showNotification(Intent intent) {\r\n\t\t// This is the 'title' of the notification\r\n\r\n\t\tString title = intent.getStringExtra(\"TITLE\");\r\n\r\n\t\t// This is the icon to use on the notification\r\n\t\tint icon = R.drawable.ic_popup_reminder;\r\n\t\t// This is the scrolling text of the notification\r\n\t\tString date = intent.getStringExtra(\"DATE\");\r\n\t\tString time = intent.getStringExtra(\"TIME\");\r\n\t\tLog.d(\"NILU\", \"SHOW NOTIFICATION::: \" + title + \" \" + date + \" \"\r\n\t\t\t\t+ time);\r\n\r\n\t\tCharSequence text = \"Due on \" + date + \" at \" + time;\r\n\t\t// What time to show on the notification\r\n\t\tlong when = System.currentTimeMillis();\r\n\r\n\t\tNotificationCompat.Builder mBuilder = new NotificationCompat.Builder(\r\n\t\t\t\tthis).setTicker(title + \" Due Soon\")\r\n\r\n\t\t.setContentTitle(title).setSmallIcon(icon).setWhen(when)\r\n\t\t\t\t.setContentText(text);\r\n\t\t// Creates an explicit intent for an Activity in your app\r\n\t\tIntent resultIntent = new Intent(this, NotificationDisplay.class);\r\n\r\n\t\t// The stack builder object will contain an artificial back stack for\r\n\t\t// the\r\n\t\t// started Activity.\r\n\t\t// This ensures that navigating backward from the Activity leads out of\r\n\t\t// your application to the Home screen.\r\n\t\tTaskStackBuilder stackBuilder = TaskStackBuilder.create(this);\r\n\t\t// Adds the back stack for the Intent (but not the Intent itself)\r\n\t\tstackBuilder.addParentStack(NotificationDisplay.class);\r\n\t\t// Adds the Intent that starts the Activity to the top of the stack\r\n\r\n\t\tstackBuilder.addNextIntent(resultIntent);\r\n\t\tPendingIntent resultPendingIntent = stackBuilder.getPendingIntent(0,\r\n\t\t\t\tPendingIntent.FLAG_UPDATE_CURRENT);\r\n\t\tmBuilder.setContentIntent(resultPendingIntent);\r\n\t\tNotification notification = mBuilder.build();\r\n\t\tnotification.flags |= Notification.FLAG_AUTO_CANCEL;\r\n\r\n\t\tmNM.notify(NOTIFICATION, notification);\r\n\r\n\t\t// Stop the service when we are finished\r\n\t\tstopSelf();\r\n\t}", "public void openPromotion() {\n myActivity.setContentView(R.layout.promotion);\n Button promotionButtonToGame = myActivity.findViewById(R.id.button6);\n\n promotionButtonToGame.setOnClickListener(\n new View.OnClickListener() {\n\n public void onClick(View v) {\n ShogiHumanPlayer.this.setAsGui(myActivity);\n usingRulesScreen = false;\n if (state != null) {\n receiveInfo(state);\n }\n }\n }\n\n\n );\n\n\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew Admin_Screen();\n\t\t\t\tADML.setVisible(false);\n\t\t\t}", "void showNotification() {\n Intent notificationIntent = new Intent(mContext, MainActivity.class);\n\n // Construct a task stack.\n TaskStackBuilder stackBuilder = TaskStackBuilder.create(mContext);\n\n // Add the main Activity to the task stack as the parent.\n stackBuilder.addParentStack(MainActivity.class);\n\n // Push the content Intent onto the stack.\n stackBuilder.addNextIntent(notificationIntent);\n\n // Get a PendingIntent containing the entire back stack.\n PendingIntent notificationPendingIntent =\n stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);\n\n Notification.Builder notificationBuilder = new Notification.Builder(mContext)\n .setContentTitle(getLocationResultTitle())\n .setContentText(getLocationResultText())\n .setSmallIcon(R.mipmap.ic_launcher)\n .setAutoCancel(true)\n .setContentIntent(notificationPendingIntent);\n\n getNotificationManager().notify(0, notificationBuilder.build());\n }", "public void notifyJoueurActif();", "@Override\n public void showSignInScreen() {\n Toast.makeText(this, \"Taking user to the sign in screen\", Toast.LENGTH_SHORT).show();\n }", "private void backToMenu() {\n game.setScreen(new StartScreen(game));\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n Main.switchViews();\n }", "private void displayNotification(final String id, final String name, final String detail, String title, final String url) {\n\n NotificationManager manager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n Notification notification = new Notification(R.drawable.noti, name + \" ตอนใหม่\", System.currentTimeMillis());\n notification.defaults |= Notification.DEFAULT_SOUND;\n notification.flags |= Notification.FLAG_AUTO_CANCEL;\n\n // The PendingIntent will launch activity if the user selects this notification\n Intent browserIntent = null;\n/*\t\tbrowserIntent = new Intent(Intent.ACTION_VIEW);\n\t\tUri data = Uri.parse(url+\"#story_body\");\n\t\tbrowserIntent.setData(data);*/\n if (Setting.getArrowSelectSetting(context).equals(\"0\")) {\n browserIntent = new Intent(Intent.ACTION_VIEW);\n Uri data = Uri.parse(url + \"#story_body\");\n browserIntent.setData(data);\n } else if (Setting.getArrowSelectSetting(context).equals(\"1\")) {\n browserIntent = new Intent(this, DekdeeBrowserActivity.class);\n browserIntent.putExtra(\"id\", id);\n browserIntent.putExtra(\"url\", url);\n browserIntent.putExtra(\"title\", name);\n } else {\n browserIntent = new Intent(this, TextReadActivity.class);\n browserIntent.putExtra(\"url\", url);\n }\n System.out.println(\"moti \" + url);\n\n //PendingIntent contentIntent = PendingIntent.getActivity(context, REQUEST_CODE,browserIntent, 0);\n PendingIntent contentIntent = PendingIntent.getActivity(getApplicationContext(), REQUEST_CODE, browserIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n notification.contentIntent = contentIntent;\n //notification.contentView = contentView;\n if (title.contains(\":\")) {\n title = \":\" + title;\n }\n if (title.indexOf(\":\") + 2 < title.length()) {\n notification.setLatestEventInfo(context, name, title.substring(title.indexOf(\":\") + 2) + \" (\" + detail + \")\", contentIntent);\n } else if (title.indexOf(\":\") + 1 < title.length()) {\n notification.setLatestEventInfo(context, name, title.substring(title.indexOf(\":\") + 1) + \" (\" + detail + \")\", contentIntent);\n } else if ((!title.contains(\":\")) && (title.indexOf(\":\") < title.length())) {\n notification.setLatestEventInfo(context, name, title.substring(title.indexOf(\":\")) + \" (\" + detail + \")\", contentIntent);\n } else {\n notification.setLatestEventInfo(context, name, title + \" (\" + detail + \")\", contentIntent);\n }\n manager.notify(REQUEST_CODE, notification);\n }", "public void showNotification(String msg) {\n Notification.show(msg);\n }", "private void onNotificationClick(MouseEvent event) {\n\t\thide();\n\t\tevent.consume();\n\t}", "public void show_dialog_box (){\n //show the message of turning on the location\n Dialog dialog = new Dialog(this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.location_message_r);\n dialog.show();\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tloadmsg();\n\t\t\t\t\tsm.toggle();\n\t\t\t\t\t\n\t\t\t\t}", "public void setTrayIcon()\n\t{\n\t\tImage image = new Image(display, PropertyManager.getInstance().getProperty(\"ICON_FOLDER\"));\n\t\tfinal Tray tray = display.getSystemTray();\n\n\t\tif (tray == null)\n\t\t{\n\t\t\tSystem.out.println(\"The system tray is not available\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfinal TrayItem item = new TrayItem(tray, SWT.NONE);\n\t\t\titem.setToolTipText(PropertyManager.getInstance().getProperty(\"SOFT_INFO\"));\n\n\t\t\tfinal Menu menu = new Menu(shell, SWT.POP_UP);\n\n\t\t\tMenuItem mi1 = new MenuItem(menu, SWT.PUSH);\n\t\t\tMenuItem mi2 = new MenuItem(menu, SWT.PUSH);\n\t\t\tMenuItem mi3 = new MenuItem(menu, SWT.PUSH);\n\t\t\tMenuItem mi4 = new MenuItem(menu, SWT.PUSH);\n\n\t\t\tmi1.setText(\"Show\");\n\t\t\tmi1.addListener(SWT.Selection, new Listener()\n\t\t\t{\n\t\t\t\tpublic void handleEvent(Event event)\n\t\t\t\t{\n\t\t\t\t\tshell.setVisible(true);\n\t\t\t\t\tSystem.out.println(\"selection \" + event.widget);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tmi2.setText(\"Hide\");\n\t\t\tmi2.addListener(SWT.Selection, new Listener()\n\t\t\t{\n\t\t\t\tpublic void handleEvent(Event event)\n\t\t\t\t{\n\t\t\t\t\tshell.setVisible(false);\n\t\t\t\t\tSystem.out.println(\"selection \" + event.widget);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tmi3.setText(\"Change Operator\");\n\t\t\tmi3.addListener(SWT.Selection, new Listener()\n\t\t\t{\n\t\t\t\tpublic void handleEvent(Event event)\n\t\t\t\t{\n\t\t\t\t\tlogin = \"\";\n\t\t\t\t\tpassword = \"\";\n\t\t\t\t\tInputDialog opDialog = new InputDialog(shell, SWT.DIALOG_TRIM);\n\t\t\t\t\tshell.setEnabled(!shell.getEnabled());\n\t\t\t\t\tshell.setCursor(new Cursor(display, SWT.CURSOR_WAIT));\n\t\t\t\t\tString credential = opDialog.createDialogArea();\n\t\t\t\t\tlogin = credential.substring(0, credential.indexOf(File.separator));\n\t\t\t\t\tpassword = credential.substring(credential.indexOf(File.separator));\n\t\t\t\t\tshell.setEnabled(true);\n\t\t\t\t\tshell.setCursor(new Cursor(display, SWT.CURSOR_ARROW));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tmi4.setText(\"Close\");\n\t\t\tmi4.addListener(SWT.Selection, new Listener()\n\t\t\t{\n\t\t\t\tpublic void handleEvent(Event event)\n\t\t\t\t{\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\tSystem.out.println(\"selection \" + event.widget);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\titem.addListener(SWT.MenuDetect, new Listener()\n\t\t\t{\n\t\t\t\tpublic void handleEvent(Event event)\n\t\t\t\t{\n\t\t\t\t\tmenu.setVisible(true);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\titem.setImage(image);\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tEnviarMailVisMed mail = new EnviarMailVisMed();\r\n\t\t\t\tmail.setVisible(true);\r\n\t\t\t}", "@Override\n public void handelNotification(String message) {\n if (message.equalsIgnoreCase(\"Change is successful\")) {\n Intent intent = null;\n if (actionType == 0) {\n intent = new Intent(UpdateIssueActivity.this, IssueMenuActivity.class);\n intent.putExtra(\"Order\", Header);\n message = \"Issue Updated\";\n } else if (actionType == 1) {\n intent = new Intent(UpdateIssueActivity.this, ApproveIssueActivity.class);\n intent.putExtra(\"Order\", Header);\n message = \"Issue Sent to Approval\";\n startActivity(intent);\n } else if (actionType == 2) {\n intent = new Intent(UpdateIssueActivity.this, IssueMenuActivity.class);\n intent.putExtra(\"Order\", Header);\n message = \"Issue Cancelled\";\n startActivity(intent);\n }\n\n //change Toast to snack bar\n customToastext.setText(Html.fromHtml(message));\n customToastLayout.setBackgroundColor(getResources().getColor(R.color.successMessage));\n // Toast...\n showCustomToast();\n } else {\n Log.d(\"mytag\", \"handelNotification: Change Failed\");\n customToastext.setText(Html.fromHtml(\"Change Failed\"));\n customToastLayout.setBackgroundColor(getResources().getColor(R.color.errorMessage));\n showCustomToast();\n }\n }", "private void showNotification(final CharSequence text) {\n if (DEBUG) {\n Log.v(TAG, \"showNotification:\" + text);\n }\n // Set the info for the views that show in the notification panel.\n final Notification notification = new Notification.Builder(this)\n .setSmallIcon(R.mipmap.ic_launcher) // the status icon\n .setTicker(text) // the status text\n .setWhen(System.currentTimeMillis()) // the time stamp\n .setContentTitle(getText(R.string.app_name)) // the label of the entry\n .setContentText(text) // the contents of the entry\n .setContentIntent(createPendingIntent()) // The intent to send when the entry is clicked\n .build();\n\n startForeground(NOTIFICATION, notification);\n // Send the notification.\n mNotificationManager.notify(NOTIFICATION, notification);\n }", "public void status_clicked(View view) {\n Intent intent = new Intent(this, StatusActivity.class);\n // EditText editText = (EditText) findViewById(R.id.editText);\n // String message = \"final data\";\n // intent.putExtra(EXTRA_MESSAGE, message);\n startActivity(intent);\n }", "private void showInboxDetails(){\r\n InboxDetailForm inboxDtlForm = null;\r\n try{\r\n if( ( inboxDtlForm = (InboxDetailForm)mdiForm.getFrame(\r\n \"Inbox\" ))!= null ){\r\n if( inboxDtlForm.isIcon() ){\r\n inboxDtlForm.setIcon(false);\r\n }\r\n inboxDtlForm.setSelected( true );\r\n return;\r\n }\r\n System.out.println(\"In showInboxDetails function\");\r\n inboxDtlForm = new InboxDetailForm(mdiForm);\r\n inboxDtlForm.setVisible(true);\r\n }catch(Exception exception){\r\n CoeusOptionPane.showInfoDialog(exception.getMessage());\r\n }\r\n }", "private void setNotification() {\n mBuilder.setProgress(updateMax, ++updateProgress, false)\n .setContentTitle(getResources().getString(R.string.notification_message));\n // Issues the notification\n nm.notify(0, mBuilder.build());\n }", "private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened\njam(); \nJOptionPane.showMessageDialog(rootPane, \"Welcome to REMINDER'S NOTE\");\n \n }", "@Override\r\n public void actionPerformed(ActionEvent el) {\n \r\n \r\n if(el.getSource()==b9)\r\n {\r\n adminsuccess l1=new adminsuccess();\r\n l1.setVisible(true);\r\n l1.setLocationRelativeTo(null);\r\n dispose();\r\n }\r\n \r\n \r\n }", "@Override\n public void onInput(MaterialDialog dialog, CharSequence input) {\n Intent myIntent = new Intent(getApplicationContext(), ConfirmActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(),\n 0, myIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n //notification body\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n NotificationCompat.Builder builder = new NotificationCompat.Builder(getApplicationContext());\n builder.setStyle(new NotificationCompat.BigTextStyle().bigText(input.toString())); //BigText\n builder.setOngoing(true); //Make persistent\n builder.setContentIntent(pendingIntent);\n builder.setSmallIcon(R.drawable.ic_small);\n builder.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.mipmap.ic_large));\n builder.setContentTitle(\"Remember!\");\n builder.setContentText(input.toString()); //Get text from dialog input\n notificationManager.notify(NOTIFICATION_ID, builder.build());\n\n //toast\n Toast.makeText(MainActivity.this, \"Done! Reminder has been set. Check your Notification Bar! :)\",\n Toast.LENGTH_LONG).show();\n\n //Close app when done entering in text\n finish();\n }", "@Override\n\tpublic void showServicePasswordNextScreen() {\n\t\tif(ParentActivity.AnimationRunningFlag == true)\n\t\t\treturn;\n\t\telse\n\t\t\tParentActivity.StartAnimationRunningTimer();\n\t\t\n\t\tParentActivity._MenuBaseFragment.showBodyESL();\n\t\t\n\t\tParentActivity.OldScreenIndex = Home.SCREEN_STATE_MENU_MODE_ETC_AUTOSHUTDOWN_PW;\n\t}", "@Override\n public void handleMessage(Message msg) {\n switch (msg.what) {\n case 1:\n //切换到主页面\n allFlipper.setDisplayedChild(1);\n break;\n }\n }", "private void showNotification() {\n // In this sample, we'll use the same text for the ticker and the expanded notification\n // Set the icon, scrolling text and timestamp\n Notification notification = new Notification(R.drawable.icon, \"Longitude is active\", System.currentTimeMillis());\n\n // The PendingIntent to launch our activity if the user selects this notification\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, LongitudeActivity.class), 0);\n\n // Set the info for the views that show in the notification panel.\n notification.setLatestEventInfo(this, \"Longitude\", \"Tracking your location\", contentIntent);\n\n // Send the notification.\n notificationManager.notify(NOTIFICATION, notification);\n }", "private void setNotificationViewed(Notification notification){\r\n\t\tnotification.setViewed(true);\r\n\t}", "public void factoryMainScreen()\n\t{\n\t\t\n\t}", "private void showDialog(String broad_message) {\n\t\tif (!ThermActivity.this.isFinishing()) {\n\t\t\tAlertDialog.Builder builder = new Builder(ThermActivity.this);\n\t\t\tbuilder.setTitle(getResources().getString(R.string.offline_notification)).setMessage(broad_message);\n\t\t\tbuilder.setPositiveButton(getResources().getString(R.string.confirm),\n\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tsendDataBle.sendData(\"0045\", macAddress);// 断开特定设备连接\n\t\t\t\t\t\t\tEMClient.getInstance().logout(true);\n\t\t\t\t\t\t\tAC.accountMgr().logout();\n\t\t\t\t\t\t\tLog.e(TAG, \"退出登录\");\n\t\t\t\t\t\t\tLong userid = PreferencesUtils.getLong(ThermActivity.this, \"userId\");\n\t\t\t\t\t\t\tPushAgent mPushAgent = MainApplication.push();\n\t\t\t\t\t\t\t//userId为用户ID,通过AbleCloud登录接口返回的ACUserInfo可以获取到userId;第二个参数写死ablecloud即可。\n\t\t\t\t\t\t\tmPushAgent.removeAlias(String.valueOf(userid), \"ablecloud\", new UTrack.ICallBack(){\n\t\t\t\t\t\t\t @Override\n\t\t\t\t\t\t\t public void onMessage(boolean isSuccess, String message) {\n\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\tdialog.dismiss();\n\t\t\t\t\t\t\tThermActivity.this.finish();\n\t\t\t\t\t\t\tIntent intent = new Intent(ThermActivity.this,\n\t\t\t\t\t\t\t\t\tLoginActivity.class);\n\t\t\t\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK\n\t\t\t\t\t\t\t\t\t| Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\tAlertDialog alert = builder.create();\n\t\t\talert.setCanceledOnTouchOutside(false);//dialog点击空白不消失\n\t\t\talert.setCancelable(false);//dialog点击返回键不消失\n\t\t\talert.show();\n\t\t}\n\t}", "private void updateUI(boolean isSignedIn) {\n \t//goNextScreen(false);\n }", "public void showTestDoneNotification() {\n Intent intent = new Intent(this, MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);\n Notification notification = new NotificationCompat.Builder(getApplicationContext())\n .setContentIntent(PendingIntent.getActivity(this, 0, intent, 0))\n .setSmallIcon(R.drawable.ic_launcher)\n .setContentText(getText(R.string.local_service_test_done))\n .setContentTitle(getText(R.string.local_service_notification)).build();\n notificationManager.notify(NOTIFICATION, notification);\n status = new Status(getString(R.string.ready), false);\n sendStatusMessage();\n }", "public void onActive() {\n Methods.showMessage(\"Warning\", \"Welcome Back!\", \"Please Continue Filling Out Your Questionanire!\");\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n frame.setVisible(false);//when user clicks health assistant button the visibility of the frame for the home screen will be set to false\n new HealthAssistant();//displays the health assistant page\n }", "private void goToMenu() {\n game.setScreen(new MainMenuScreen(game));\n\n }", "public static void showNotification(Project project, MessageType type, String text) {\n StatusBar statusBar = WindowManager.getInstance().getStatusBar(project);\n JBPopupFactory.getInstance()\n .createHtmlTextBalloonBuilder(text, type, null)\n .setFadeoutTime(7500)\n .createBalloon()\n .show(RelativePoint.getCenterOf(statusBar.getComponent()), Balloon.Position.atRight);\n }", "public void run(RegularUserAccountMenuController atc, SystemMessage sm, GUIDemo guiD){\n JFrame frame = new JFrame(\"SetYourOnVacationStatusWindow\");\n frame.setContentPane(new SetYourOnVacationStatusWindow(atc, sm, guiD).rootPanel);\n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n frame.pack();\n frame.setVisible(true);\n frame.setLocationRelativeTo(null);\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == info) {\r\n\t\t\t\t\tmenu.setVisible(false);\r\n\t\t\t\t\tJOptionPane\r\n\t\t\t\t\t\t\t.showMessageDialog(null,\r\n\t\t\t\t\t\t\t\t\t\"Dies ist eine Uhr mit einstellbaren Wecker\\nVersion 1.0\");\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\t\t public void launchApp(Context context, UMessage msg) {\n\t\t\t\t Toast.makeText(context, \"launchApp:\"+msg.custom, Toast.LENGTH_LONG).show();\n\t\t \t Intent it=new Intent(getApplicationContext(),MainActivity.class);//MenuActivity_VC\n\t\t \t\t it.putExtra(\"notify\", msg.custom);\n\t\t \t\t startActivity(it);\n\t\t\t }", "public void switchToInstructionScreen() {\n \tCardLayout currLayout = (CardLayout) screens.getLayout();\n \tcurrLayout.show(screens, \"insn\");\n }", "private void updateUI() {\n\t\t\tfinal TextView MessageVitesse = (TextView) findViewById(R.id.TextView01);\r\n\t\t\tfinal ProgressBar Progress = (ProgressBar) findViewById (R.id.ProgressBar01);\r\n\t\t\tfinal TextView MessageStatus = (TextView)findViewById (R.id.TextView02);\r\n\t\t\t\t\t\r\n\t\t\t//on affecte des valeurs aux composant\r\n\t\t\tMessageVitesse.setText(\"Vitesse Actuelle : \"+ Vitesse + \" Ko/s\");\r\n\t\t\tProgress.setProgress(Pourcent);\r\n\t\t\tMessageStatus.setText (Status);\r\n\t\t\tif (Status.equals(\"Télèchargement terminé!!!\")&&NotifDejaLancée==false){\r\n\t\t\t\tlanceNotification();\r\n\t\t\t\tNotifDejaLancée=true;\r\n\t\t\t}\r\n\t\t\t}", "private void showNotification() {\n\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.food_icon2)\n .setContentTitle(\"Let's eat\")\n .setContentText(\"Good morning, It's time to take your Breakfast :)\");\n\n int mNotificationId = 001;\n\n\n Intent contentIntent = new Intent(this, RecommendationActivity.class);\n contentIntent.putExtra(\"dePagi\", \"pagigan\");\n TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);\n stackBuilder.addParentStack(RecommendationActivity.class);\n stackBuilder.addNextIntent(contentIntent);\n\n PendingIntent resultPendingIntent =\n stackBuilder.getPendingIntent(\n 0,\n PendingIntent.FLAG_UPDATE_CURRENT\n );\n mBuilder.setContentIntent(resultPendingIntent);\n\n mBuilder.setVibrate(new long[] { 1000, 1000, 1000, 1000, 1000 });\n mBuilder.setLights(Color.YELLOW, 3000, 3000);\n\n mBuilder.setAutoCancel(true);\n\n mNM =(NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n mNM.notify(mNotificationId, mBuilder.build());\n\n stopSelf();\n\n }", "@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tshowSettingDialog(msg.what);\n\t\t\t// super.handleMessage(msg);\n\t\t}", "private void showPreference(){\r\n if(userPreferencesForm == null) {\r\n userPreferencesForm = new UserPreferencesForm(mdiForm,true);\r\n }\r\n userPreferencesForm.loadUserPreferences(mdiForm.getUserId());\r\n userPreferencesForm.setUserName(mdiForm.getUserName());\r\n userPreferencesForm.display();\r\n }", "public void showFormInstitucion(ActionEvent event) {\r\n\t\tlog.info(\"-------------------------------------Debugging showFormInstitucion-------------------------------------\");\r\n\t\tlog.info(\"blnShowFormInstitucion: \"+getBlnShowFormInstitucion());\r\n\t\tsetBlnShowFormInstitucion(true);\r\n\t\tsetOnNewDisabledInsti(true); //Deshabilita los controles por defecto cuando se desea crear un nuevo registro.\r\n\t\tsetRenderConfigN1(false);\r\n\t\tsetStrBtnAgregarN1(\"Agregar Configuración\");\r\n\t\tsetRenderProcesPlanillaN1(false);\r\n\t\tsetRenderAdministraN1(false);\r\n\t\tsetRenderCobChequesN1(false);\r\n\t\tlimpiarFormInstitucion();\r\n\t}", "protected void showNotify() {\n try {\n myJump.systemStartThreads();\n } catch (Exception oe) {\n myJump.errorMsg(oe);\n }\n }", "private void sendHeadlinerNotification() {\n startService(new Intent(this, ForegroundNotificationService.class));\n }", "protected void setNotificationView(View notificationView) {\n mNotificationView = notificationView;\n }", "public void helpPressed() {\n Stage mainStage = (Stage)pane.getScene().getWindow();\n PresentationCtrl.getInstance().showNotification(\"Information\", \"Information\", null,\n \"- Click <Clear> button to clear the history\\n\\n- Click <Refresh> button to refresh the history\" +\n \"\\n\\n- Double clicks on a row to see the detailed information\", mainStage);\n }", "private void showStatusBarNotification(String title, String sendMessage) {\n }", "private void showNotificationLocation(Context context) {\n // Set the Intent action to open Location Settings\n Intent gpsIntent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n\n // Create a PendingIntent to start an Activity\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, gpsIntent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Create a notification builder that's compatible with platforms >= version 4\n NotificationCompat.Builder builder =\n new NotificationCompat.Builder(context);\n\n // Set the title, text, and icon\n builder.setContentTitle(context.getString(R.string.app_name))\n .setContentText(context.getString(R.string.turn_on_GPS))\n .setSmallIcon(R.drawable.ic_notification)\n .setAutoCancel(true)\n // Get the Intent that starts the Location settings panel\n .setContentIntent(pendingIntent);\n\n // Get an instance of the Notification Manager\n NotificationManager notifyManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n // Build the notification and post it\n notifyManager.notify(0, builder.build());\n }", "public static void ShowCreateSchedule(){\n ToggleVisibility(CreateSchedule.window);\n }", "@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tsuper.handleMessage(msg);\n\t\t\t\tBundle bundle=msg.getData();\n\t\t\t\t\n\t\t\t\tif(bundle.getInt(\"ready\") == 1){\n\t\t\t\t\t//Receive info and assign to player\n\t\t\t\t\tIntent j = new Intent();\n\t\t\t\t\tj.setClassName(\"com.example.client\",\n\t\t\t\t\t\t\t\"com.example.client.GameScreen\");\n\t\t\t\t\tstartActivity(j);\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\t//Time out\n\t\t\t\t\t\talertMessage();\t\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}", "@Override\n\tpublic void showContents() {\n\t\tprogram.add(returnToMain);\n\t\tprogram.add(congratMessage);\n\t\tprogram.setBackground(Color.DARK_GRAY);\n\t\t\n\t}" ]
[ "0.68714154", "0.6852091", "0.67601895", "0.6757073", "0.6650222", "0.65029675", "0.64832175", "0.6469972", "0.63739365", "0.6303138", "0.62830234", "0.62192214", "0.62158674", "0.62049407", "0.6203007", "0.6182744", "0.6167206", "0.6154152", "0.6132495", "0.6123062", "0.61228776", "0.6104717", "0.6102283", "0.6090155", "0.60780543", "0.6064213", "0.6034167", "0.6001452", "0.5984369", "0.59316844", "0.59198666", "0.5912144", "0.5820512", "0.58199865", "0.5806341", "0.5804763", "0.5788074", "0.57870805", "0.5782165", "0.5769216", "0.5768374", "0.5766402", "0.5766081", "0.5748667", "0.57477057", "0.5746683", "0.5746351", "0.57460403", "0.5739159", "0.57323664", "0.5730559", "0.57294255", "0.57247365", "0.57230043", "0.5719316", "0.5717199", "0.5717143", "0.57119405", "0.5707908", "0.5706178", "0.5701652", "0.57015896", "0.5697347", "0.56939894", "0.5687668", "0.5684422", "0.56835634", "0.5681548", "0.5663223", "0.565816", "0.5657768", "0.5654394", "0.5653265", "0.56483316", "0.56474555", "0.56462055", "0.5642842", "0.56369925", "0.5634491", "0.5632166", "0.5629376", "0.56292826", "0.56266207", "0.5622028", "0.5621984", "0.5620561", "0.5614486", "0.5612549", "0.56050974", "0.5604551", "0.56016827", "0.56014895", "0.55995333", "0.55938727", "0.5592595", "0.55873543", "0.55851614", "0.5579693", "0.55796653", "0.55778944" ]
0.6075296
25
switch the scene to the same page for refreshing
@FXML void refresh_btn_clicked(MouseEvent event) { switchScenes("/client/boundry/MarketingAgentSalesMainForm.fxml", "/client/boundry/MarketingAgentMainCustomer.css"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void goToMainScene() {\n\n scenesSeen.clear();\n this.window.setScene(firstScene.createAndReturnScene());\n scenesSeen.add(firstScene);\n }", "public void refresh_and_back_to_tourspane() {\n\t\tSceneController.pop();\n\t\tSceneController.pop_title();\n\t\tFadeOutRight anim1 = new FadeOutRight(HomeController.instance.PANE);\n\t\tanim1.play();\n\t\tanim1.setResetOnFinished(true);\n\t\tanim1.setOnFinished(event1 -> {\n\t\t\tSelectedCity_ToursController LookupForm = new SelectedCity_ToursController();\n\n\t\t\ttry {\n\t\t\t\tLookupForm.start(HomeController.instance.PANE);\n\n\t\t\t\tclient.requestHandler.Catalog.getAllTours(GeneralValues.CITY);\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\n\t\t});\n\t\t\n\t}", "@Override\n\tpublic void changePage() {\n\t\tprimaryStage.setScene(balancer);\n\t}", "private void backButtonAction() {\n CurrentUI.changeScene(SceneNames.LOGIN);\n }", "public void switchScene(javafx.event.ActionEvent event) throws IOException {\n //clicking this button will go to main menu with all the command for the application.\n setscence(event,\"Main Menu.fxml\");\n\n\n }", "public void setNewScene() {\n switch (game.getCurrentRoomId()) {\n case 14:\n WizardOfTreldan.setFinishScene();\n break;\n\n }\n }", "public void switchScene(IsScene newScene) {\n\n window.setScene(newScene.createAndReturnScene());\n scenesSeen.push(newScene);\n currentScene = newScene;\n }", "@FXML\r\n void returnToMainMenu(ActionEvent event) throws Exception {\r\n \tGeneralMethods.ChangeScene(\"MainMenu\", \"MainMenu\");\r\n }", "public void backToMain(ActionEvent event) throws IOException{\n try {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"../view/main.fxml\"));\n root = loader.load();\n MainController controller = loader.getController();\n controller.selectTab(1);\n stage = (Stage)((Node)event.getSource()).getScene().getWindow();\n scene = new Scene(root);\n stage.setScene(scene);\n stage.show();\n } catch (IOException e) {\n showError(true, \"Can not load the protected page.\");\n }\n }", "private void refreshHomePage()\r\n {\r\n Stage currentStage = (Stage) viewCoinAnchorPane.getScene().getWindow();\r\n //currentStage.hide();\r\n FXMLLoader fxmlLoader = new FXMLLoader();\r\n String filePath = \"/com/jjlcollectors/fxml/homepage/HomePage.fxml\";\r\n URL location = HomePageController.class.getResource(filePath);\r\n fxmlLoader.setLocation(location);\r\n fxmlLoader.setBuilderFactory(new JavaFXBuilderFactory());\r\n try\r\n {\r\n Parent root = fxmlLoader.load(location.openStream());\r\n } catch (IOException ex)\r\n {\r\n MyLogger.log(Level.SEVERE, LOG_CLASS_NAME + \" couldn't load homepage to refresh coin update!\", ex);\r\n }\r\n HomePageController homePageController = (HomePageController) fxmlLoader.getController();\r\n homePageController.refreshCoinList();\r\n }", "protected void changeScene(ActionEvent event,String fxmlPage) throws IOException {\n\t\tParent root = FXMLLoader.load(getClass().getResource(fxmlPage));\n\t\tScene scene = new Scene(root);\n\t\tStage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\n\t\tstage.setScene(scene);\n\t}", "private void returnToMainScreen(ActionEvent event) throws IOException {\r\n\r\n Parent parent = FXMLLoader.load(getClass().getResource(\"../view/MainScreen.fxml\"));\r\n Scene scene = new Scene(parent);\r\n Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();\r\n stage.setScene(scene);\r\n stage.show();\r\n }", "@FXML private void transitionView(ActionEvent event) {\n\t\t// id button caller\n\t\tString btn = ((Button) event.getSource()).getId();\n\t\tNavigationController.PREVIOUS = NavigationController.STARTMENU;\n\t\t// send load request\n\t\tif (btn.equals(\"newgame\"))\n\t\t\tNavigationController.loadView(NavigationController.GAMECREATION);\n\t\tif (btn.equals(\"loadgame\"))\n\t\t\tNavigationController.loadView(NavigationController.SAVELOAD);\n\n\t\t// if this spot is reached: do nothing\n\t}", "public void setHomeScene(Scene scene) {\r\n scene1 = scene;\r\n }", "@FXML\n public void backPage() {\n LibrarySystem.setScene(new ReaderLogIn(readerlist, booklist));\n }", "@FXML\r\n\tpublic void goToMain() {\r\n\t\tViewNavigator.loadScene(\"Welcome to WatchPlace\", ViewNavigator.HOME_SCENE);\r\n\t}", "public void gotoVerReserva() {\n try {\n FXMLDatosReservaController verReserva = (FXMLDatosReservaController) replaceSceneContent(\"FXMLDatosReserva.fxml\");\n verReserva.setApp(this);\n //setTipoReserva(verReserva); //Setea el tipo de reserva\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@FXML\r\n\t\tpublic void back(ActionEvent event) {\r\n\t\t\tGuiBasedApp.launchHomeScreenScene();\r\n\t\t}", "@FXML\n public void buttonOnClick(ActionEvent event) {\n \tcurrentStage.setScene(previousScene);\n \tcurrentStage.show();\n }", "private void changeScene(String scene){\n switch (scene) {\n case \"Passwords\" -> {\n this.addNewScene.setVisible(false);\n this.generateScene.setVisible(false);\n this.passwordsScene.setVisible(true);\n }\n case \"Add New\" -> {\n this.generateScene.setVisible(false);\n this.passwordsScene.setVisible(false);\n this.addNewScene.setVisible(true);\n }\n case \"Generate\" -> {\n this.generateScene.setVisible(true);\n this.passwordsScene.setVisible(false);\n this.addNewScene.setVisible(true);\n }\n }\n }", "public void returnToMainScreen(ActionEvent event) throws IOException {\n Parent root = FXMLLoader.load(getClass().getResource(\"/view/MainScreen.fxml\"));\n Scene scene = new Scene(root);\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\n window.setScene(scene);\n window.show();\n }", "public void setCurrentScene(String name)\r\n\t{\r\n\t\t// Get the scene with the given name.\r\n\t\tScene scene = getScene(name);\r\n\r\n\t\t// Switch scenes, but only if the new scene is not null.\r\n\t\tsetCurrentScene(scene != null ? scene : _CurrentScene);\r\n\t}", "protected void changeScene(MouseEvent event,String fxmlPage) throws IOException {\n\t\tParent root = FXMLLoader.load(getClass().getResource(fxmlPage));\n\t\tScene scene = new Scene(root);\n\t\tStage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\n\t\tstage.setScene(scene);\n\t}", "@FXML\n private void switchHome(ActionEvent event) {\n setNode(mainForm);\n }", "public void gotoMyFlights(){\n try {\n FXMLMyFlightsController verMyFlights = (FXMLMyFlightsController) replaceSceneContent(\"FXMLMyFlights.fxml\");\n verMyFlights.setApp(this);\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void changeSceneTo(Parent node) {\n\t\tfinal Scene scene = new Scene(node);\n\t\tstage.setScene(scene);\n\t}", "public void changeScene(final View view) {\n try {\n Parent viewHierarchy = loadHierarchy(view.getFXMLPath());\n Scene scene = new Scene(viewHierarchy);\n currStage.setScene(scene);\n currStage.show();\n\n } catch (Exception e) {\n System.err.print(\"\");\n }\n }", "@FXML\r\n public void moveToMainScene(ActionEvent event) throws IOException {\r\n isRunning = false;\r\n cv.changeScene(\"/start/start.fxml\", event);\r\n }", "@FXML\n final void btnOnlineClick() {\n new Thread(() -> sceneHandler.setActiveScene(GameScene.MULTI_INTRO)).start();\n }", "public void goBackToPreviousScene() {\n\n scenesSeen.pop();\n currentScene = scenesSeen.peek();\n\n this.window.setScene(currentScene.createAndReturnScene());\n }", "public void goBack() throws IOException { DashboardController.dbc.loadHomeScene(); }", "public void goHome1(ActionEvent e) throws IOException {\n Stage stage=(Stage)gohome1.getScene().getWindow();\n Parent root = FXMLLoader.load(getClass().getResource(\"sample.fxml\"));\n stage.setScene(new Scene(root, 500, 500));\n stage.show();\n }", "public void setCurrentScene(Scene scene)\r\n\t{\r\n\t\t// If the scene has not been added yet, do so.\r\n\t\tif (!_Scenes.contains(scene))\r\n\t\t{\r\n\t\t\taddScene(scene);\r\n\t\t}\r\n\r\n\t\t// Switch to the scene.\r\n\t\t_CurrentScene = scene;\r\n\t\tDebugManager.getInstance().setPhysicsSimulator(_CurrentScene.getPhysicsSimulator());\r\n\t}", "public void refresh() {\n if (currentClient != null) {\n Page page = currentClient.getCurrentPage();\n if (page != null) {\n root.setCenter(page.getRoot());\n } else {\n root.setCenter(null);\n }\n }else{\n if (page != null) {\n root.setCenter(page.getRoot());\n } else {\n root.setCenter(null);\n }\n }\n root.setPrefWidth(1280);\n root.setPrefHeight(720);\n root.setTop(clientBar.getRoot());\n root.setRight(null); // remove any errors\n //this.mainStage.setScene(scene);\n mainStage.show();\n\n }", "@Override\n public void handle(ActionEvent event) \n {\n if(userRole == 1) {stage.setScene(ReporterPage(stage));}\n else if(userRole == 2) {stage.setScene(DeveloperPage(stage));}\n else if(userRole == 3) {stage.setScene(ReviewerPage(stage));}\n else if(userRole == 4) {stage.setScene(TriagerPage(stage));} \n }", "public void changeScene(Pane pane){\n Platform.runLater(()->{\n dynamicPane.getChildren().clear();\n dynamicPane.getChildren().add(pane);\n });\n }", "private void backToMenu() {\n game.setScreen(new StartScreen(game));\n }", "void chang_scene_method(String FXML_Name) {\n try {\n AnchorPane pane = FXMLLoader.load(getClass().getResource(FXML_Name));\n anchorPane.getChildren().setAll(pane);\n } catch (IOException e) {\n JOptionPane.showMessageDialog(null, \"Error: \" + e);\n }\n }", "private void loadMainAdminScene(javafx.event.ActionEvent event) throws Exception {\n stageManager.switchScene(FxmlView.ADMIN);\n }", "@Override\n public void handle(ActionEvent event) \n {\n if(userRole == 1)\n {\n stage.setScene(ReporterPage(stage));\n }\n else if(userRole == 2)\n {\n stage.setScene(DeveloperPage(stage));\n }\n else if(userRole == 3)\n {\n stage.setScene(ReviewerPage(stage));\n }\n else if(userRole == 4)\n {\n stage.setScene(TriagerPage(stage));\n }\n }", "public void transitionToHome() throws RemoteException{\n removeAll();\n mainPanel = new MainPanel(contr);\n add(mainPanel, \"span 1\");\n }", "public void refreshFrame() {\n switchWindow();\n this.switchToFrame(\"botFr\");\n }", "protected void changeScene(ActionEvent event,Parent root) throws IOException {\n\t\tScene scene = new Scene(root);\n\t\tStage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\n\t\tstage.setScene(scene);\n\t}", "public static void changeScreen(Parent screen) {\n mainStage.setScene( new Scene( screen ) );\n mainStage.show();\n }", "public void homeClicked() {\r\n Pane newRoot = loadFxmlFile(Home.getHomePage());\r\n Home.getScene().setRoot(newRoot);\r\n }", "protected void displayInitialScene() {\n stageManager.switchScene(FxmlView.SPLASH, StageStyle.UNDECORATED);\n }", "public void onBack(ActionEvent event) {\n try {\n Parent root = FXMLLoader.load(getClass().getResource(\"/Screens/playerScreen.fxml\"));\n Stage sourceStage = (Stage) ((Node) event.getSource()).getScene().getWindow();\n Scene scene = new Scene(root);\n sourceStage.setScene(scene);\n } catch (IOException e) {\n System.out.println(\"Error loading Previous Screen\" + e.getMessage());\n }\n }", "@FXML\r\n public void backButton(ActionEvent event) throws IOException{//back to main menu\r\n Parent Root = FXMLLoader.load(getClass().getResource(\"MainGUIFXML.fxml\"));\r\n \r\n\r\n Scene scene = new Scene(Root);\r\n\r\n Stage AddPageStage = (Stage) ((Node) event.getSource()).getScene().getWindow();\r\n AddPageStage.setTitle(\"Main Menu\");\r\n AddPageStage.setScene(scene);\r\n AddPageStage.setResizable(false);\r\n AddPageStage.show();\r\n }", "@FXML\r\n\tpublic void goToCheckout() {\r\n\t\tViewNavigator.loadScene(\"Checkout\", ViewNavigator.CHECKOUT_SCENE);\r\n\t}", "private void backRegionHandle(MouseEvent event) {\n try {\n // Change Scene\n Scene scene = stopRegion.getScene();\n FXMLLoader loader = new FXMLLoader( getClass().getResource(\"/Results.fxml\" ) );\n Pane pane = (Pane) loader.load();\n scene.setRoot(pane);\n\n // Add game to controller\n// PlayersController controller = loader.getController();\n// controller.setGame( game );\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@FXML\r\n private void goHomeScreen(ActionEvent event) {\n Stage stage = (Stage) mainGridPane.getScene().getWindow();\r\n\r\n //load up WelcomeScene FXML document\r\n Parent root = null;\r\n try {\r\n root = FXMLLoader.load(getClass().getResource(\"WelcomeChipScene.fxml\"));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n Scene scene = new Scene(root, 1024, 720);\r\n stage.setTitle(\"Restaurant Reservation System\");\r\n stage.setScene(scene);\r\n stage.show();\r\n }", "public void gotoLogin() {\n try {\n LoginController login = (LoginController) replaceSceneContent(\"Login.fxml\");\n login.setApp(this);\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void goToUserPage(ActionEvent event) throws IOException { //this is going to close the current window and open a new window\n\t\t//this should also display the User Page\n\t\tParent user_page = FXMLLoader.load(getClass().getResource(\"/view/User_Page.fxml\"));\n\t\tScene userpage_scene = new Scene(user_page);\n\t\tStage app_stage = (Stage) ((Node) (event.getSource())).getScene().getWindow();\n\t\tapp_stage.setScene(userpage_scene);\n\t\tapp_stage.setTitle(\"User Page\");\n\t\tapp_stage.show();\n\t}", "private void refreshScreen(){\n Intent thisIntent = getIntent();\n finish();\n startActivity(thisIntent);\n }", "@FXML\r\n void returnToNoteMenu(ActionEvent event) throws Exception {\r\n \tGeneralMethods.ChangeScene(\"NotesMenu\", \"NotesMenu\");\r\n }", "public void switchToGameScreen() {\n \tCardLayout currLayout = (CardLayout) screens.getLayout();\n \tcurrLayout.show(screens, \"game\");\n \troom.reset();\n }", "@FXML\n private void callCourseSelectPage(ActionEvent e) {\n\n CourseSelectPage.selectForRecordMode= false;\n\n Pageloader loader = new Pageloader();\n Parent root = loader.getPage(\"GUIcourseSelectPage\");\n Stage stage = new Stage();\n stage.setTitle(\"Add record for student\");\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.setScene(new Scene(root));\n stage.showAndWait();\n }", "public void transitionToNewParticipantPage(){\n removeAll();\n newParticipantPanel = new NewParticipantPanel(contr);\n add(newParticipantPanel, \"span 1\");\n }", "@FXML\n void doback(ActionEvent event) throws IOException{\n \tStage primaryStage = (Stage) ((Node)event.getSource()).getScene().getWindow();\n \tURL url = getClass().getResource(Globals.backLink);\n\t\tAnchorPane pane =FXMLLoader.load(url);\n\n\t\tScene scene = new Scene(pane);\n\t\tscene.getStylesheets().add(getClass().getResource(\"application.css\").toExternalForm());\n\t\tprimaryStage.setScene(scene);\n\t\tprimaryStage.setOnCloseRequest(e-> {\n\t\t\ttry {\n\t\t\t\tlogOut();\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\t\t});\n\t\tprimaryStage.show();\n }", "private void goToMenu() {\n game.setScreen(new MainMenuScreen(game));\n\n }", "public void backToStartScene(ActionEvent event) throws IOException {\r\n Parent startView = FXMLLoader.load(Main.class.getResource(\"fxml/StartScene.fxml\"));\r\n Scene startViewScene = new Scene(startView);\r\n\r\n // This line gets the Stage information (no Stage is passed in)\r\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\r\n\r\n window.setScene(startViewScene);\r\n window.show();\r\n }", "public void backToMainMenu() throws IOException {\n logLoadGame.log(Level.INFO, \"Switching Scene to Main Menu\");\n Parent mainMenu = FXMLLoader.load(getClass().getResource(\"/Gui_View/fxmlFiles/MainMenu.fxml\"));\n Main.primaryStage.setScene(new Scene(mainMenu));\n Main.primaryStage.show();\n }", "@Override\n\tpublic Scene giveScene() {\n\t\tLabel SignIn=new Label(\"SIGN IN\");\n\t\tLabel UserName=new Label(\"Username\");\n\t\tLabel Password=new Label(\"Password\");\n\t\tTextField Username=new TextField();\n\t\tTextField PassWord=new TextField();\n\t\tButton SubmitButton=new Button(\"SUBMIT\");\n\t\tButton BackButton=new Button(\"BACK\");\n\t\tBackButton.setOnAction(new EventHandler<ActionEvent>() {\t\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tmyGame.setPrimaryStage(myGame.GetLoginPageScene());\n\t\t\t}\n\t\t});\t\n\t\tSignIn.setId(\"SignInLabel\");\n\t\tUserName.setId(\"UserLabel\");\n\t\tPassword.setId(\"PasswordLabel\");\n\t\tUsername.setId(\"UserText\");\n\t\tPassWord.setId(\"PasswordText\");\n\t\tSubmitButton.setId(\"SubmitButton\");\n\t\tBackButton.setId(\"BackButton\");\n\t\tVBox SignInPageVb=new VBox(50,SignIn,UserName,Username,Password,PassWord,BackButton,SubmitButton);\n\t\tSignInPageVb.setTranslateY(100);\n\t\tSignInPageVb.setAlignment(Pos.TOP_CENTER);\n\t\tStackPane MainPageStackpane=new StackPane(SignInPageVb);\n\t\tMainPageStackpane.getStylesheets().add(getClass().getResource(\"SignInPage.css\").toString());\n\t\tmyScene= new Scene(MainPageStackpane,500,1000);\n\t\tmyScene.setFill(Color.BLACK);\n\t\tSubmitButton.setOnAction(new EventHandler<ActionEvent>() {\t\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tPlayer newPLayer = myGame.getMyDataBase().login(Username.getText(), PassWord.getText());\n\t\t\t\t//System.out.println(newPLayer);\n\t\t\t\tif (newPLayer != null) {\n\t\t\t\t\tmyGame.setCurrentPlayer(newPLayer);\n\t\t\t\t\tmyGame.setPrimaryStage(myGame.GetMainPageScene());\n\t\t\t\t}else {\n\t\t\t\t\tif(NoPlayer==null) {\n\t\t\t\t\t\tNoPlayer=new Label(\"Invalid User/Password\");\n\t\t\t\t\t\tSignInPageVb.getChildren().add(NoPlayer);\n\t\t\t\t\t}//System.out.println(\"katta\");\n\t\t\t\t//myGame.setPrimaryStage(myGame.GetGamePlayScene());\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\n\n\t\treturn myScene;\n\t}", "public void changeView(ActionEvent e) {\n\t\ttry {\n\t\t\t/* Loads the secondary FXML Scene */\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(\"/FXML/MainFXML.fxml\"));\n\t\t\tSystem.out.println(\"MainFXML.fxml has loaded successfully.\");\n\t\t\tScene scene = new Scene(root);\n\t\t\t// Capture the original stage\n\t\t\tStage window = (Stage) ((Node)e.getSource()).getScene().getWindow();\n\t\t\twindow.setScene(scene);\n\t\t\twindow.show();\n\t\t\tSystem.out.println(\"View has been changed successfully.\");\n\t\t} catch (IOException e1) {\n\t\t\tSystem.err.println(\"Error! IOException. (This should never happen)\");\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "public static final void refreshCurrentPage() {\r\n\t\tIWorkbenchWindow window\r\n\t\t\t= PlatformUI.getWorkbench().getActiveWorkbenchWindow();\r\n\t\tIWorkbenchPage page = window.getActivePage();\r\n\t\twindow.setActivePage( null );\r\n\t\twindow.setActivePage( page );\r\n\t}", "public void playAgainEvent() {\n\n\t \tStage stage = (Stage) playAgain.getScene().getWindow();\n\t stage.close();\n\t//loads scene A again\n\ttry {\n\t\tStage stage2 = new Stage();\n\t\tFXMLLoader loader2 = new FXMLLoader(getClass().getResource(\"SceneA.fxml\"));\n\t\n\t\tParent root2 = loader2.load();\n\t\tScene sceneA = new Scene(root2);\n\t\tstage2.setTitle(\"Hangman Game\");\n\t\tstage2.setScene(sceneA);\n\t\tcontrolA control = loader2.getController();\n\t\t\n\t\t // close Scene B\n\t\tstage2.show();\n\n\t\t}catch (IOException io) {\n\t\t\tio.printStackTrace();\n\t\t}\n\t}", "@FXML\n void goBack(ActionEvent event) throws IOException{\n loadMain(event, session);\n }", "@FXML\n void retour(ActionEvent event) {\n \tStage stage = (Stage) retour.getScene().getWindow();\n stage.close();\n }", "@FXML\n void startGame(ActionEvent event) {\n logic.viewUpdated();\n }", "@FXML\n private void onBackBtn(ActionEvent event) {\n \tStage stage = (Stage) mainPane.getScene().getWindow();\n \tloadScreen(stage, \"mainmenu.fxml\");\n }", "@FXML\r\n\tpublic void goToShoppingCart() {\r\n\t\tViewNavigator.loadScene(\"Your Shopping Cart\", ViewNavigator.SHOPPING_CART_SCENE);\r\n\t}", "@FXML private void backOut(ActionEvent event) {\n try {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/Views/mainScreen.fxml\"));\n mainScreen controller = new mainScreen(false);\n\n loader.setController(controller);\n Parent root = loader.load();\n Scene scene = new Scene(root);\n Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();\n stage.setScene(scene);\n stage.setResizable(false);\n stage.show();\n } catch (Exception e) {e.printStackTrace();}\n }", "@FXML\n protected void handleMenuButtonAction(ActionEvent event) {\n SceneLoader.loadScene(\"/mainScreen.fxml\");\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n Main.switchViews();\n }", "@FXML\n final void btnLoadGamePress() {\n new Thread(() -> sceneHandler.setActiveScene(GameScene.GAME)).start();\n }", "public void pageSwitch(ActionEvent event, String filename, Stage stage) throws IOException {\n //// PAGE SWITCHING ////\n //////////////////////////////////////////////////////\n Parent root;\n// Stage stage;\n// stage=(Stage) b.getScene().getWindow();\n FXMLLoader loader = new FXMLLoader();\n // System.out.println(new File(\"src/main/java/UI/WelcomePage.fxml\").toURI());\n // System.out.println(getClass().getResource(\"/src/main/java/UI/WelcomePage.fxml\"));\n\n //loader.setLocation(new File(\"src/main/java/UI/\" + filename).toURI().toURL());\n loader.setLocation(getClass().getResource(\"/\" + filename));\n\n AttributeContainer ac = AttributeContainer.getInstance();\n printStackTrace(filename, ac);\n ac.backlog.push(filename);\n root = loader.load();\n Scene scene = new Scene(root, 1360, 760);\n stage.setScene(scene);\n stage.show();\n stage.setResizable(false);\n //////////////////////////////////////////////////////\n //// DATA SHARING & CONTROLLER INITIALIZATION ////\n //////////////////////////////////////////////////////\n PageControllerUI controller = loader.getController();\n// controller.setStage_DontTouch(stage);\n AttributeContainer.getInstance().current_page = controller;\n controller.onLoad();\n }", "public void doNewGame(View view) {\n mainHelper.restart();\n }", "@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\tLabel label1 = new Label(\"Welcome to scene 1\");\n\t\tButton button1 = new Button(\"Go to scene 2\");\n\t\tbutton1.setOnAction(e -> primaryStage.setScene(scene2));\n\t\t\n\t\t// Layout for scene 1\n\t\tVBox layout1 = new VBox(20);\n\t\tlayout1.getChildren().addAll(label1, button1);\n\t\tscene1 = new Scene(layout1, 200, 200);\n\t\t\n\t\t// Content of scene 2\n\t\tButton button2 = new Button(\"Let's go back to scene 1\");\n\t\tbutton2.setOnAction(e -> primaryStage.setScene(scene1));\n\t\t\n\t\t// Layout for scene 2\n\t\tStackPane layout2 = new StackPane();\n\t\tlayout2.getChildren().add(button2);\n\t\tscene2 = new Scene(layout2, 600, 300);\n\t\t\n\t\t// Set first scene\n\t\tprimaryStage.setScene(scene1);\n\t\tprimaryStage.setTitle(\"Switching scenes\");\n\t\tprimaryStage.show();\n\t}", "@FXML\r\n\t void SendUsertoPrevPage(ActionEvent event) throws Exception {\n\t \tdcon.close();\r\n\t \tAnchorPane pane = FXMLLoader.load(getClass().getResource(\"../fxml/Options.fxml\"));\r\n\t \t\tbackgroundRootRoot.getChildren().setAll(pane);\r\n\t \t }", "public void setCurrentScene(int index)\r\n\t{\r\n\t\tsetCurrentScene(_Scenes.get(index));\r\n\t}", "public void goToFriendListPage(ActionEvent event) throws IOException { //this is going to close the current window and open a new window\n\t\t//this should also display the User Page\n\t\tParent user_page = FXMLLoader.load(getClass().getResource(\"/view/FriendList_Page.fxml\"));\n\t\tScene userpage_scene = new Scene(user_page);\n\t\tStage app_stage = (Stage) ((Node) (event.getSource())).getScene().getWindow();\n\t\tapp_stage.setScene(userpage_scene);\n\t\tapp_stage.setTitle(\"Friend List\");\n\t\tapp_stage.show();\n\t}", "public void finishScene() {\n\t\t//Nothing to do\n\t}", "@FXML\r\n\tvoid buttonRehakontaktClick(ActionEvent event) {\r\n\t\treha.setOnAction(e -> MobileApplication.getInstance().switchView(GluonApplication.REHAKONTAKT1_VIEW));\r\n\t}", "@FXML\n public void goToObst(ActionEvent event) throws IOException, SQLException { //PREVIOUS SCENE\n \tdoChecking();\n \t\n \ttry {\n\t \tif(checkIntPos && checkFloatPos && checkIntPosMatl && checkFloatPosMatl) {\n\t \t\t//store the values\n\t \t\tstoreValues();\n\t \t\t\n\t \t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"Obst.fxml\"));\n\t \t\tParent root = loader.load();\n\t \t\t\n\t \t\tObstController obstCont = loader.getController(); //Get the next page's controller\n\t \t\tobstCont.showInfo(); //Set the values of the page \n\t \t\tScene obstScene = new Scene(root);\n\t \t\tStage mainWindow = (Stage)((Node)event.getSource()).getScene().getWindow();\n\t \t\tmainWindow.setScene(obstScene);\n\t \t\tmainWindow.show();\n\t \t}\n \t} catch(Exception e) {\n\t\t\tValues.showError();\n\t\t}\n \t\n }", "@FXML\r\n public void goToTutorial(ActionEvent event) {\n\t\t\r\n\t\t\r\n\t\ttry {\r\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(\"../view/resources/Tutorial.fxml\"));\r\n \t\tScene scene = new Scene(root);\r\n \t\tMain.setScene(scene);\r\n\t\t}catch(IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "public void setScene(final Scene newScene) {\n }", "private void transitionTo(Scene scene) {\n for (EmptyGraphBoardFX g : toAnimate)\n g.stopAnimating();\n toAnimate.clear();\n theStage.setScene(scene);\n if (scene == mainGame)\n toAnimate.add(mGSelfBoard);\n if (scene == attackScene) {\n toAnimate.add(ene1.b);\n toAnimate.add(ene2.b);\n }\n if (scene == setShips)\n toAnimate.add(sSboard);\n if (scene == AIScene) {\n toAnimate.add(selfvsAI);\n toAnimate.add(ai.b);\n }\n for (EmptyGraphBoardFX g : toAnimate)\n g.startAnimating();\n }", "private void backToMenu(ActionEvent actionEvent) {\n try {\n ((UserController) changeScene(\"/gui/guiuser/UserUI-ATM.fxml\")).initData(userManager);\n } catch (IOException e) {\n e.printStackTrace();\n }\n displayScene(actionEvent);\n }", "public void backButtonClicked(ActionEvent actionEvent) {\n Stage current = (Stage) locationName.getScene().getWindow();\n\n current.setScene(getPreviousScreen());\n }", "public void setScene(Scene scene) {\n scene.getWindow().setOnCloseRequest((WindowEvent event) -> {\n if (timer != null) {\n timer.cancel();\n }\n });\n }", "private void changeScene(URL sceneFXML, Object controllerObject) {\n\t\ttry {\n\t\t\tUtilMethods.changeScene(sceneFXML, controller.getStage(), controllerObject);\n\t\t\tcontroller.getStage().setResizable(false);\n\t\t\tcontroller.getStage().setMaximized(false);\n\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\"Error al modifcar la ventana de JavaFX: {}\", e);\n\t\t}\n\t}", "public void back()\r\n\t{\r\n\t\tparentPanel.setState(GameState.Menu);\r\n parentPanel.initScene(GameState.Menu);\r\n\t\t\t\r\n\t}", "@FXML\r\n\tpublic void home(ActionEvent event) throws Exception {\r\n\t\tScene newScene;\r\n\t\tParent root;\r\n\t\ttry {\r\n\t\t\troot = FXMLLoader.load(getClass().getResource(hauptmenue()));\r\n\t\t\tnewScene = new Scene(root);\r\n\t\t\tStage stage = new Stage();\r\n\t\t\tstage.setTitle(\"ResLearn\");\r\n\t\t\tstage.setMaximized(true);\r\n\t\t\tstage.setScene(newScene);\r\n\t\t\tstage.show();\r\n\t\t\t((Node) (event.getSource())).getScene().getWindow().hide();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void startGame(){\n System.out.println(\"[SERVER]: Starting a new game\");\n mainPage = new MainPage();\n mainPage.setMatch(match);\n mainPage.setRemoteController(senderRemoteController);\n\n Platform.runLater( () -> {\n try {\n firstPage.closePrimaryStage();\n if(chooseMap != null)\n chooseMap.closePrimaryStage();\n mainPage.start(new Stage());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n );\n }", "public void goToMainMenuReservations() throws IOException {\n ApplicationDisplay.changeScene(\"/MainMenuReservations.fxml\");\n }", "private void returnHome() {\n parentPane.getChildren().clear();\n parentPane.setTop(mainMenu);\n parentPane.setCenter(imgHome);\n }", "public void goToLoginPage(ActionEvent event) throws IOException{\n\t\t//this should return to the Login Page\n\t\tParent user_page = FXMLLoader.load(getClass().getResource(\"/view/LoginPage.fxml\"));\n\t\tScene userpage_scene = new Scene(user_page);\n\t\tStage app_stage = (Stage) ((Node) (event.getSource())).getScene().getWindow();\n\t\tapp_stage.setScene(userpage_scene);\n\t\tapp_stage.setTitle(\"Login Page\");\n\t\tapp_stage.show();\n\t}", "@FXML\n void onLogin(ActionEvent event) throws IOException {\n System.out.println(\"inloggen\");\n Parent parent1 = FXMLLoader.load(getClass().getResource(\"/schermen/navigatie.fxml\"));\n Scene scene = new Scene(parent1);\n Stage app_stage = (Stage)((Node) event.getSource()).getScene().getWindow();\n app_stage.setScene(scene);\n app_stage.show();\n \n }", "public void startScene()\r\n\t{\r\n\t\tthis.start();\r\n\t}", "@FXML\n public void goToMult(ActionEvent event) throws IOException, SQLException { //NEXT SCENE\n \tdoChecking();\n \t\n \ttry {\n\t \tif(checkIntPos && checkFloatPos && checkIntPosMatl && checkFloatPosMatl) {\n\t \t\t//store the values\n\t \t\tstoreValues();\n\t \t\t\n\t \t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"Mult.fxml\"));\n\t \t\tParent root = loader.load();\n\t \t\t\n\t \t\tMultController multCont = loader.getController(); //Get the next page's controller\n\t \t\tmultCont.showInfo(); //Set the values of the page \n\t \t\tScene multScene = new Scene(root);\n\t \t\tStage mainWindow = (Stage)((Node)event.getSource()).getScene().getWindow();\n\t \t\tmainWindow.setScene(multScene);\n\t \t\tmainWindow.show();\n\t \t}\n \t}catch(Exception e) {\n\t\t\tValues.showError();\n\t\t}\n }" ]
[ "0.7024857", "0.6973204", "0.6967508", "0.67677474", "0.67182356", "0.66677785", "0.6646762", "0.6606816", "0.65792865", "0.6545597", "0.6494362", "0.6490413", "0.6463866", "0.645626", "0.6450677", "0.6381893", "0.637738", "0.635641", "0.63277894", "0.63218266", "0.6307776", "0.6277173", "0.62457085", "0.62394035", "0.62254184", "0.62115985", "0.61977094", "0.61975807", "0.61884284", "0.61314917", "0.6127395", "0.6125717", "0.6120372", "0.610296", "0.6101737", "0.6094217", "0.60939133", "0.60893905", "0.6064716", "0.6046382", "0.60441166", "0.6041711", "0.6037529", "0.6034376", "0.6014012", "0.60081184", "0.5973989", "0.59729105", "0.5965576", "0.59611815", "0.596001", "0.5959605", "0.59575933", "0.5954596", "0.5950891", "0.5950558", "0.5947455", "0.59378266", "0.5937785", "0.5933596", "0.5919429", "0.5917512", "0.5915", "0.59005386", "0.58921176", "0.5891981", "0.5888371", "0.5886686", "0.58862406", "0.58810776", "0.5860974", "0.5854431", "0.58507824", "0.5822527", "0.5819245", "0.58183545", "0.58175504", "0.58165723", "0.580563", "0.58053255", "0.5804105", "0.5802883", "0.57989866", "0.57934886", "0.5792065", "0.5788614", "0.5787482", "0.5781354", "0.57804734", "0.5771298", "0.57703716", "0.57688546", "0.576797", "0.5767453", "0.5744669", "0.57409024", "0.5733177", "0.5725667", "0.5719963", "0.5716066" ]
0.58464074
73
this method searches specific sale and put them at local list to show on table
@FXML void search_btn_clicked(MouseEvent event) { ObservableList<SalePattern> found_sales = FXCollections.observableArrayList(); try { if (!search_txt.getText().isEmpty()) { for (SalePattern sale : sale_patterns_list) { Integer search = new Integer(search_txt.getText()); if (search <= 0) { throw new Exception(); } if (sale.getGasStationTag().toString().startsWith(search.toString())) { found_sales.add(sale); } } sales_table.setItems(FXCollections.observableArrayList()); if (found_sales != null) { sales_table.getItems().addAll(found_sales); } } else { sales_table.setItems(sale_patterns_list); } search_txt.setStyle(null); } catch (Exception e) { search_txt.setStyle("-fx-text-box-border: #FF0000; -fx-focus-color: #FF0000;"); Alert alert = new Alert(AlertType.ERROR); alert.setTitle("Invalid input"); alert.setHeaderText(null); alert.setContentText("Input entered is not valid please try again"); alert.show(); return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<SaleVO> showSale() {\n\t\treturn sale.show();\r\n\t}", "@GetMapping(\"/sale\")\n public ResultEntity<List<ItemDTO>> getAllSale()\n {\n return itemService.getItemsBySubCategory(ConstantUtil.TYPE_SALE_RENT,\"Sale\");\n }", "@Override\n\tpublic List<Object> getSaleList(Search search) throws Exception {\n\t\treturn null;\n\t}", "public void retriveSearchSaleDataFromDB(String search1,String search2, String selection) throws SQLException {\r\n\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\r\n\r\n\r\n Character x = '\\'';\r\n String y = \"%\";\r\n ResultSet rs = null;\r\n ResultSet rs2 = null;\r\n\r\n String searchWord = x + y + search1 + y + x;\r\n String searchWord1 = x + search1 + x;\r\n String searchWord2 = x + search2 + x;\r\n\r\n\r\n try (Connection con = DBConnection.getconnection(); Statement stmt = con.createStatement()) {\r\n\r\n // selction of the SQL statment depending on RadioButton clicked by the user\r\n if (selection.equals(\"SaleNumber\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.SaleNumber>=\" + search1 + \" AND \" + \"Sales.SaleNumber<=\" + search2; // filters rows by Sale Number\r\n rs = stmt.executeQuery(SQL);\r\n\r\n\r\n } else if (selection.equals(\"dateSelected\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Date between \" + searchWord1 + \" AND \" + searchWord2; // filters rows by selected date\r\n rs = stmt.executeQuery(SQL);\r\n\r\n\r\n } else if (selection.equals(\"customerName\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Customer like \" + searchWord; // filters rows by typed Customer Name\r\n rs = stmt.executeQuery(SQL);\r\n } else if (selection.equals(\"productName\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Product like \" + searchWord; // filters rows by typed Product Name\r\n rs = stmt.executeQuery(SQL);\r\n } else if (selection.equals(\"category\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Category like \" + searchWord; // filters rows by typed Category\r\n rs = stmt.executeQuery(SQL);\r\n }\r\n\r\n while (rs.next()) {\r\n addSaleToTableList(new Sales(rs.getInt(\"SaleNumber\"), simpleDateFormat.format(rs.getDate(\"Date\")), rs.getString(\"Time\"), rs.getString(\"Customer\"),\r\n rs.getString(\"Product\"), rs.getString(\"Code\"), rs.getString(\"Size\"),\r\n rs.getString(\"Units\"), rs.getString(\"Category\"), rs.getString(\"Quantity\"), rs.getString(\"UnitPrice\"), rs.getString(\"SalePrice\")));\r\n\r\n }\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public void setSale(int sale) {\n\t\tthis.sale = sale;\r\n\t}", "private static void searchForItem() {\r\n\t\tSystem.out.println(\"******************************************************************************************\");\r\n\t\tSystem.out.println(\" Please type your search queries\");\r\n\t\tSystem.out.println();\r\n\t\tString choice = \"\";\r\n\t\tif (scanner.hasNextLine()) {\r\n\t\t\tchoice = scanner.nextLine();\r\n\t\t}\r\n\t\t//Currently only supports filtering by name\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" All products that matches your search are as listed\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Id|Name |Brand |Price |Total Sales\");\r\n\t\tint productId = 0;\r\n\t\tfor (Shop shop : shops) {\r\n\t\t\tint l = shop.getAllSales().length;\r\n\t\t\tfor (int j = 0; j < l; j++) {\r\n\t\t\t\tif (shop.getAllSales()[j].getName().contains(choice)) {\r\n\t\t\t\t\tprintProduct(productId, shop.getAllSales()[j]);\r\n\t\t\t\t}\r\n\t\t\t\tproductId++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "List<Salesman> findAll();", "public static ArrayList<HashMap<String, String>> getDoSalesmanListSearch(\r\n\t\t\tint start, int length, String order, int column, int doId,\r\n\t\t\tint foId, String search) {\r\n\t\tArrayList<HashMap<String, String>> list = new ArrayList<>();\r\n\t\tCallableStatement call = null;\r\n\t\tResultSet rs = null;\r\n\t\tHashMap<String, String> map = new HashMap<>();\r\n\r\n\t\ttry (Connection con = Connect.getConnection()) {\r\n\t\t\tcall = con\r\n\t\t\t\t\t.prepareCall(\"{CALL get_do_salesman_table_list_search(?,?,?,?,?,?,?)}\");\r\n\t\t\tcall.setInt(1, start);\r\n\t\t\tcall.setInt(2, length);\r\n\t\t\tcall.setString(3, order);\r\n\t\t\tcall.setInt(4, column);\r\n\t\t\tcall.setInt(5, doId);\r\n\t\t\tcall.setInt(6, foId);\r\n\t\t\tcall.setString(7, search);\r\n\r\n\t\t\trs = call.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tmap = new HashMap<>();\r\n\t\t\t\tmap.put(\"salesmanId\", rs.getInt(\"salesman_id\") + \"\");\r\n\t\t\t\tmap.put(\"salesmanName\", rs.getString(\"salesman_name\"));\r\n\t\t\t\tmap.put(\"salesmanCnic\", rs.getString(\"salesman_cnic\") + \"\");\r\n\t\t\t\tmap.put(\"salesmanAddress\", rs.getString(\"salesman_address\"));\r\n\r\n\t\t\t\tString number2 = UserBAL.getFormattedPhoneNumber(rs\r\n\t\t\t\t\t\t.getString(\"salesman_phone_no\"));\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * String number = rs.getString(\"salesman_phone_no\"); String\r\n\t\t\t\t * concat = \"+\"+number; String number2 = String.format(\r\n\t\t\t\t * \"(%s) %s-%s\", concat.substring(0, 3), concat.substring(3, 6),\r\n\t\t\t\t * concat.substring(6, 13));\r\n\t\t\t\t */\r\n\r\n\t\t\t\tmap.put(\"salesmanNumber\", number2);\r\n\t\t\t\tmap.put(\"salesmanSallery\",\r\n\t\t\t\t\t\t(NumberFormat.getNumberInstance(Locale.US).format((rs\r\n\t\t\t\t\t\t\t\t.getDouble(\"salesman_basic_sallery\")))) + \"\");\r\n\t\t\t\tmap.put(\"salesmanDateJoin\", rs.getDate(\"salesman_date_join\")\r\n\t\t\t\t\t\t+ \"\");\r\n\t\t\t\tmap.put(\"lateCustomer\", rs.getInt(\"late_cs\") + \"\");\r\n\t\t\t\tmap.put(\"totalSales\", rs.getInt(\"total_sales\") + \"\");\r\n\t\t\t\tmap.put(\"salesmanCommission\", rs.getInt(\"salesman_commission\")\r\n\t\t\t\t\t\t+ \"\");\r\n\t\t\t\tmap.put(\"commissionDate\", rs.getInt(\"commission_date\") + \"\");\r\n\t\t\t\tmap.put(\"totalCustomers\", rs.getInt(\"total_customers\") + \"\");\r\n\r\n\t\t\t\tlist.add(map);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}", "public List<Sale> saleListGenre() {\n List<Sale> saleList = new ArrayList<Sale>();\n\n try {\n conn = DBConnection.getConnection();\n stm = conn.createStatement();\n result = stm.executeQuery(\"SELECT * FROM disquera.sale \\n\"\n + \"join disquera.genre on sale.id_genre=genre.id_genre\");\n //result_album = stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n //result_artist=stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n while (result.next()) {\n Sale newSale = new Sale();\n newSale.setId_sale(result.getInt(1));\n newSale.setId_album(result.getInt(4));\n newSale.setId_user(result.getInt(5));\n newSale.setId_genre(result.getInt(6));\n //newSale.setSongName(result.getString(10));\n //newSale.setAlbumName(result_album.getString(8));\n newSale.setGenre(result.getString(8));\n\n System.out.println(\"\\n\\n Received data: \\n Id: \" + newSale.getId_sale() + \"\\nPrecio: \" + newSale.getPrice());\n saleList.add(newSale);\n /*\n System.out.println(\"No existe un usuario con esa contraseña\");\n conn.close();\n return null;\n */\n }\n result.close();\n stm.close();\n conn.close();\n } catch (SQLException ex) {\n ex.getStackTrace();\n return null;\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DAOGenre.class.getName()).log(Level.SEVERE, null, ex);\n }\n return saleList;\n }", "public final void getSaleDocList() {\n showLoadingIndicator(true);\n SaleDocListViewModel saleDocListViewModel = this.viewModel;\n if (saleDocListViewModel == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"viewModel\");\n }\n String authString = getAuthString();\n String deviceId = AppUtils.getDeviceId(this);\n Intrinsics.checkExpressionValueIsNotNull(deviceId, \"AppUtils.getDeviceId(this)\");\n saleDocListViewModel.getSaleDocList(authString, deviceId, \"android\", String.valueOf(BuildConfig.VERSION_CODE), getRequestBody());\n }", "public void initSalesList() {\n\n String sql = \"SELECT menu.id_product, menu.name, menu.price,size.size, COUNT(orders_menu.id_order) \"\n + \"FROM menu, orders_menu, orders, size WHERE menu.id_product=orders_menu.id_product \"\n + \"AND orders.id_order=orders_menu.id_order AND orders.id_status=4 \"\n + \"AND size.id_size=menu.id_size GROUP BY menu.id_product\";\n\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\n\n session.beginTransaction();\n List<Object[]> empDepts = session.createNativeQuery(sql).list();\n\n salesFxObservableList.clear();\n for (Object[] objects : empDepts) {\n SalesFx salesFx = new SalesFx();\n salesFx.setIdProduct((Integer) objects[0]);\n salesFx.setName((String) objects[1]);\n salesFx.setPrice((Integer) objects[2]);\n salesFx.setSize((String) objects[3]);\n BigInteger bigInteger = (BigInteger) objects[4];\n salesFx.setSale(bigInteger.intValue());\n salesFxObservableList.add(salesFx);\n }\n\n session.getTransaction().commit();\n }", "@Override\n\tpublic void update(Sale sale) {\n\t\tDefaultTableModel dtm = (DefaultTableModel)table.getModel();\n\t\tdtm.setRowCount(0);\n\n\t\tdouble totalPrice = 0;\n\t\tfor(int i=0;i<sale.items.size();i++){\n\t\t\tVector v1 = new Vector();\n\t\t\tv1.add(sale.items.get(i).getProdSpec().getTitle());\n\t\t\tv1.add(\"\"+sale.items.get(i).getCopies());\n\t\t\tdtm.addRow(v1);\t\t\t\n\t\t}\n\t\ttotalPrice += sale.getTotal();\n\t\tlblNewLabel.setText(\"\"+totalPrice);\n\t}", "@Override\r\n\tpublic List<CookVO> selectSale() throws Exception {\n\t\treturn session.selectList(\"com.mapper.cook.selectSale\");\r\n\t}", "public ArrayList<SaleVO> findSale(String message,String type) {\n\t\treturn sale.find(message, type);\r\n\t}", "public void startSale(){\n sale = new Sale();\n for(SaleObserver obs: saleObservers)\n sale.addSaleObserver(obs);\n }", "private void getAllItems() {\n\n try {\n double sellingPrice = 0;\n ArrayList<Item> allItems = ItemController.getAllItems();\n for (Item item : allItems) {\n double selling_margin = item.getSelling_margin();\n if (selling_margin > 0) {\n sellingPrice = item.getSellingPrice() - (item.getSellingPrice() * selling_margin / 100);\n } else {\n sellingPrice = item.getSellingPrice();\n }\n Object row[] = {item.getItemCode(), item.getDescription(), Validator.BuildTwoDecimals(item.getQuantity()), Validator.BuildTwoDecimals(sellingPrice)};\n tableModel.addRow(row);\n }\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "List<ProductPurchaseItem> getAllSupplierProductPurchaseItems(long suppId, String searchStr);", "public void updateInventory(SaleDTO sale) {\n\t\tfor (ItemListDTO itemS : sale.getItems()) {\n\t\t\tfor (ItemData item : items) {\n\t\t\t\tif (itemS.getIdItem() == item.idItem) {\n\t\t\t\t\titem.quantitySold = itemS.getQuantity()+item.quantitySold;\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic List<OrderVO> getListOrderBySaleIDWithSearchString(HashMap<String, Object> searchObj) throws Exception {\n\t\treturn sqlSession.selectList(namespaceOrder+\".getListOrderBySaleIDWithSearch\",searchObj);\r\n\t}", "public void startSale() {\n sale = new Sale();\n }", "public Sale find_Sale(Integer sale_id, Integer branch_id) {\n return sale_dao.find(sale_id, branch_id);\n }", "public static SalesManBean getFirstFilterSallesman(int salesmanId) {\r\n\r\n\t\tResultSet rs = null;\r\n\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tdateFormat.format(new Date());\r\n\t\tSystem.err.println(dateFormat.format(new Date()));\r\n\t\tSalesManBean bean = null;\r\n\t\tArrayList<SalesManBean> SallesmanList = new ArrayList<SalesManBean>();\r\n\r\n\t\tint salesman_id, latecustomer;\r\n\t\tdouble monthlyIncome;\r\n\t\tString sallesman_name, cnicNo, address, district, phone;\r\n\t\tDate datejoin;\r\n\r\n\t\t// First Filteration\r\n\t\tString query = \"SELECT salesman_name,\"\r\n\t\t\t\t+ \" salesman_cnic,\"\r\n\t\t\t\t+ \" salesman_address, \"\r\n\t\t\t\t+ \" salesman_district,\"\r\n\t\t\t\t+ \" salesman_address,\"\r\n\t\t\t\t+ \" salesman_basic_sallery,\"\r\n\t\t\t\t+ \" salesman_date_join,\"\r\n\t\t\t\t+ \" salesman_phone_no ,\"\r\n\t\t\t\t+ \" s.salesman_id ,\"\r\n\t\t\t\t+ \" SalesmanTotalLateCustomer(s.salesman_id) AS latecustomer\"\r\n\t\t\t\t+ \" FROM salesman s\"\r\n\t\t\t\t+ \" JOIN do_salesman ON s.salesman_id=do_salesman.salesman_id WHERE s.salesman_id=\"\r\n\t\t\t\t+ +salesmanId\r\n\t\t\t\t+ \" AND (DATEDIFF(s.salesman_date_join, CURDATE()) <= -30)\"\r\n\t\t\t\t+ \" ORDER BY salesman_id DESC;\";\r\n\t\ttry (Connection con = Connect.getConnection()) {\r\n\r\n\t\t\tPreparedStatement stmt = (PreparedStatement) con\r\n\t\t\t\t\t.prepareStatement(query);\r\n\t\t\trs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tsallesman_name = rs.getString(1);\r\n\t\t\t\tcnicNo = rs.getString(2);\r\n\t\t\t\taddress = rs.getString(3);\r\n\t\t\t\tdistrict = rs.getString(4);\r\n\t\t\t\taddress = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getDouble(6);\r\n\t\t\t\tdatejoin = rs.getDate(7);\r\n\t\t\t\tSystem.err.println(\"Date of Joining \" + datejoin);\r\n\t\t\t\tphone = rs.getString(8);\r\n\t\t\t\tsalesman_id = rs.getInt(9);\r\n\t\t\t\tlatecustomer = rs.getInt(10);\r\n\t\t\t\tbean = new SalesManBean();\r\n\t\t\t\tbean.setName(sallesman_name);\r\n\t\t\t\tbean.setCnic(cnicNo);\r\n\t\t\t\tbean.setAddress(address);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setDatejoin(datejoin);\r\n\t\t\t\tbean.setSallery(monthlyIncome);\r\n\t\t\t\tbean.setPhone_number(phone);\r\n\t\t\t\tbean.setSalesmanId(salesman_id);\r\n\t\t\t\tbean.setLateCustomer(latecustomer);\r\n\t\t\t\tSallesmanList.add(bean);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn bean;\r\n\t}", "public void fillTableFindByName(DefaultTableModel model_search){\n\t\tCashier cashierAllProductsByName = new Cashier();\r\n\t\tproductByLike = new Vector<Product>();\r\n\t\t\r\n\t\t//Remove rows from table\r\n\t\tfor (int i = model_search.getRowCount()-1; i >= 0; --i) {\r\n\t\t\tmodel_search.removeRow(i);\r\n\t\t}\r\n\t\t//Getting all products\r\n\t\tcashierAllProductsByName.getAllProductsByName(productByLike);\r\n\t\tif(productByLike.size() > 0){\r\n\t\t\tfor(int i = 0; i < productByLike.size(); i++){\r\n\t\t\t\tif(productBySearch.size() > 0){\r\n\t\t\t\t\tfor(int j = 0; j < productBySearch.size(); j++){\r\n\t\t\t\t\t\tif(productByLike.get(i).getID() == productBySearch.get(j).getID()){\r\n\t\t\t\t\t\t\tproductByLike.get(i).setQuantity(productBySearch.get(j).getQuantity());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t//No match\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\telse{\r\n\t\t\t\t\t//Printing it in the outside loop, the value doesn't alter here, values that alter will and will print them outside\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\ttxtpnsearch_2.setText(\"No product was found in inventory.\");\r\n\t\t}\r\n\t\tif(productByLike.size() > 0){\r\n\t\t\tfor(int k = 0; k < productByLike.size(); k++){\r\n\t\t\t\tmodel_search.addRow(new Object[]{k+1,productByLike.get(k).getName(),productByLike.get(k).getDescription(),productByLike.get(k).getQuantity(),productByLike.get(k).getSalePrice(),productByLike.get(k).getNotes()});\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static ArrayList<SalesManBean> getSallesman(int doId) {\r\n\t\tResultSet rs = null;\r\n\t\tSystem.out.println(\"CustomerBAL.get_do_salesman(?)\");\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tdateFormat.format(new Date());\r\n\t\tSalesManBean bean = null;\r\n\t\tArrayList<SalesManBean> SallesmanList = new ArrayList<SalesManBean>();\r\n\t\tint salesman_id, latecustomer, totalSales;\r\n\t\tdouble monthlyIncome;\r\n\t\tString sallesman_name, cnicNo, address, district, phone;\r\n\t\tDate datejoin;\r\n\t\ttry (Connection con = Connect.getConnection()) {\r\n\t\t\tif (con != null) {\r\n\t\t\t\t// Begin Stored Procedure Calling -- Jetander\r\n\t\t\t\tCallableStatement prepareCall = con\r\n\t\t\t\t\t\t.prepareCall(\"{call get_do_salesman(?)}\");\r\n\t\t\t\tprepareCall.setInt(1, doId);\r\n\t\t\t\trs = prepareCall.executeQuery();\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\tsallesman_name = rs.getString(1);\r\n\t\t\t\t\tcnicNo = rs.getString(2);\r\n\t\t\t\t\taddress = rs.getString(3);\r\n\t\t\t\t\tdistrict = rs.getString(4);\r\n\t\t\t\t\taddress = rs.getString(5);\r\n\t\t\t\t\tmonthlyIncome = rs.getDouble(6);\r\n\t\t\t\t\tdatejoin = rs.getDate(7);\r\n\t\t\t\t\t// System.err.println(\"Date of Joining \" + datejoin);\r\n\t\t\t\t\tphone = rs.getString(8);\r\n\t\t\t\t\tsalesman_id = rs.getInt(9);\r\n\t\t\t\t\tlatecustomer = rs.getInt(10);\r\n\t\t\t\t\ttotalSales = rs.getInt(11);\r\n\t\t\t\t\t// end procedure call.\r\n\t\t\t\t\tbean = new SalesManBean();\r\n\t\t\t\t\tbean.setName(sallesman_name);\r\n\t\t\t\t\tbean.setCnic(cnicNo);\r\n\t\t\t\t\tbean.setAddress(address);\r\n\t\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\t\tbean.setDatejoin(datejoin);\r\n\t\t\t\t\tbean.setSallery(monthlyIncome);\r\n\t\t\t\t\tbean.setPhone_number(phone);\r\n\t\t\t\t\tbean.setSalesmanId(salesman_id);\r\n\t\t\t\t\tbean.setLateCustomer(latecustomer);\r\n\t\t\t\t\tbean.setTotalSales(totalSales);\r\n\t\t\t\t\tbean.setFoname(rs.getString(\"fo_name\"));\r\n\t\t\t\t\tSallesmanList.add(bean);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn SallesmanList;\r\n\t}", "public void setSale_num(Integer sale_num) {\n this.sale_num = sale_num;\n }", "private void getBySearch(HttpServletRequest request, HttpServletResponse response, ArticleService artService) {\n\t\tString search = request.getParameter(\"search\");\n\t\tList<Article> list = new ArrayList<Article>();\n\t\tlist = artService.getAll(\"atitle\", search);\n\t\trequest.setAttribute(\"list\", list);\n\t\ttry {\n\t\t\trequest.getRequestDispatcher(\"/essay/other_essay.jsp\").forward(request, response);\n\t\t} catch (ServletException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void calculateSale()\n {\n double total = 0.00;\n int numTimbits = 0;\n int numDoughnuts = 0;\n int smallCoffee = 0;\n int mediumCoffee = 0;\n int largeCoffee = 0;\n String order;\n \n for(int i = 0; salesItem[i] != null && i < salesItem.length; i++)\n {\n if(salesItem[i] instanceof Timbit) \n {\n numTimbits = numTimbits + salesItem[i].getNumOfItems();\n }\n else if(salesItem[i] instanceof Doughnut)\n {\n numDoughnuts = numDoughnuts + salesItem[i].getNumOfItems();\n }\n else if(salesItem[i] instanceof Coffee)\n {\n if(salesItem[i].getNumOfItems()==1)\n {\n smallCoffee ++;\n }\n else if(salesItem[i].getNumOfItems()==2)\n {\n mediumCoffee ++;\n }\n else\n {\n largeCoffee ++;\n }\n }\n \n total += salesItem[i].getFinalPrice();\n }\n \n order = \"Timbits: \" + numTimbits + \"\\nDoughnuts: \" + numDoughnuts + \"\\nSmall Coffees: \" + smallCoffee + \"\\nMedium Coffees: \" + mediumCoffee + \"\\nLarge Coffees: \" + largeCoffee ; \n showText(order + String.format(\"\\nTotal Price: $%5.2f\", total), 150, 175);\n }", "public void SalesAcceptor(ArrayList<Sales> salse) {\r\n \tgetSaless = (ArrayList<Sales>)salse.clone();\r\n \tSystem.out.println(getSaless);\r\n \tListSales.addAll(getSaless);\r\n\t\t}", "public void ListSale(JTable table, String[] Columns) {\n\n List<SalesDetalil> sales = CONNECTION.queryObjects(\"from Sales_Detalil\");\n Object[] oc = new Object[Columns.length];\n\n DefaultTableModel dtm = new DefaultTableModel(null, Columns) {\n @Override\n public boolean isCellEditable(int rowIndex, int vColIndex) {\n return false;\n }\n };\n\n try {\n for (SalesDetalil v :sales ) {\n oc[0] = v.getIdSale();\n oc[1] = v.getClient();\n oc[2]=v.getVehicle();\n oc[3]=v.getDiscount()+\" %\";\n oc[4]=\"$ \"+v.getPriceSale()+\" MXN\";\n \n dtm.addRow(oc);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n table.setModel(dtm);\n table.getColumnModel().getColumn(0).setPreferredWidth(10);\n table.getColumnModel().getColumn(1).setPreferredWidth(90);\n table.getColumnModel().getColumn(2).setPreferredWidth(90);\n table.getColumnModel().getColumn(3).setPreferredWidth(50);\n table.getColumnModel().getColumn(4).setPreferredWidth(80);\n }", "public void setSalesLog(List<Sale> salesLogToSet) {\n salesLog = salesLogToSet;\n }", "public ArrayList<Sale> getAllSale() throws SQLException{\n\t\tSystem.out.println(\"Retrieving all sales record...\");\n\t\tConnection dbConnection = null;\n\t\tStatement statement = null;\n\t\tResultSet result = null;\n\t\t// query to retrieve all details from vehicles\n\t\tString query = \"SELECT * FROM vehicles;\";\n\t\tVehicle temp = null;\n\t\t// create an array list to store data\n\t\tArrayList<Sale> saleList = new ArrayList<>();\n\t\t\n\t\ttry{\n\t\t\t// Connect to database\n\t\t\tdbConnection = getDBConnection();\n\t\t\t// create a statement\n\t\t\tSystem.out.println(\"DBQuery = \"+query);\n\t\t\t// execute query and store the return value in result\n\t\t\tresult = statement.executeQuery(query);\n\t\t\t// loop through every row\n\t\t\twhile(result.next()){\n\t\t\t\tint vehicle_id = result.getInt(\"vehicle_id\");\n\t\t\t\tString sold_date = result.getString(\"sold_date\");\n\t\t\t\tint sold_price = result.getInt(\"sold_price\");\n\t\t\t\tString status = result.getString(\"status\");\n\t\t\t\t// add sale objects into array list\n\t\t\t\tsaleList.add(new Sale(vehicle_id, sold_date, sold_price, status));\n\t\t\t}\n\t\t} finally {\n\t\t\t// close the connection\n\t\t\tif (result != null){result.close();}\n\t\t\tif (statement != null){statement.close();}\n\t\t\tif (dbConnection != null){dbConnection.close();}\n\t\t}\n\t\treturn saleList;\n\t}", "@Override\r\n\tpublic SalesByDto querySalesBy(String OFFER_ID) {\n\t\tSalesByDto sales = new SalesByDto();\r\n\t\t\r\n\t\tMap<String, Object> map =new HashMap<String, Object>();\r\n\t\tmap.put(\"OFFER_ID\", OFFER_ID);\r\n\t\tList<SalesProDto> querySalesByID = salesMapper.querySalesByID(map);\r\n\t\tList<SalesProDto> querySalesPro = new ArrayList<SalesProDto>();\r\n\t\tfor (SalesProDto salesProDto : querySalesByID) {\r\n\t\t\t List<SalesProDto> querySalesByProID = salesMapper.querySalesByProID(salesProDto);\r\n\t\t\t if(querySalesByProID!=null){\r\n\t\t\t querySalesPro.addAll(querySalesByProID);}\r\n\t\t}\r\n\t\tquerySalesByID.addAll(querySalesPro);\r\n\t\tsales.setOFFER_ID(Integer.parseInt(OFFER_ID));\r\n\t\tsales.setProductList(querySalesByID);\r\n\t\treturn sales;\r\n\t}", "public void fill_table_sale_pattern(ArrayList<ArrayList<Object>> sale_pattern) {\r\n\t\tfor (ArrayList<Object> row : sale_pattern) {\r\n\t\t\tsale_patterns_list.add(new SalePattern((String) row.get(0), (String) row.get(1), (String) row.get(2),\r\n\t\t\t\t\t(String) row.get(3), (Float) row.get(4), (Integer) row.get(5), (String) row.get(6),\r\n\t\t\t\t\t(Integer) row.get(7), (String) row.get(8)));\r\n\t\t}\r\n\t\tsales_table.setItems(sale_patterns_list);\r\n\r\n\t}", "public List<Sale> saleListSong() {\n List<Sale> saleList = new ArrayList<Sale>();\n\n try {\n conn = DBConnection.getConnection();\n stm = conn.createStatement();\n result = stm.executeQuery(\"SELECT * FROM disquera.sale \"\n + \"join disquera.song on sale.id_song=song.id_song \"\n + \"join disquera.artist on song.id_artist=artist.id_artist \"\n + \"join disquera.album on song.id_album=album.id_album\");\n //result_album = stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.album on sale.id_album=album.id_album\");\n //result_artist=stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n while (result.next()) {\n Sale newSale = new Sale();\n newSale.setId_sale(result.getInt(1));\n newSale.setId_song(result.getInt(2));\n newSale.setPrice(result.getDouble(3));\n newSale.setId_album(result.getInt(4));\n newSale.setId_user(result.getInt(5));\n newSale.setId_genre(result.getInt(6));\n newSale.setSongName(result.getString(10));\n newSale.setArtistName(result.getString(14));\n newSale.setAlbumName(result.getString(20));\n\n System.out.println(\"\\n\\n Received data: \\n Id: \" + newSale.getId_sale() + \"\\nPrecio: \" + newSale.getPrice());\n saleList.add(newSale);\n /*\n System.out.println(\"No existe un usuario con esa contraseña\");\n conn.close();\n return null;\n */\n }\n result.close();\n stm.close();\n conn.close();\n } catch (SQLException ex) {\n ex.getStackTrace();\n return null;\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DAOGenre.class.getName()).log(Level.SEVERE, null, ex);\n }\n return saleList;\n }", "private void updateInventory(Sale newSale)\n {\n ArrayList<SaleItem> tempSaleItems = newSale.getSaleItems();\n for(int i = 0; i < tempSaleItems.size(); i++)\n {\n //Get saleItem quantity\n double saleNum = tempSaleItems.get(i).getQuantity();\n //Loop through ingredients\n ArrayList<Ingredient> tempIng = tempSaleItems.get(i).getIngredients();\n for(int j = 0; j < tempIng.size(); j++)\n {\n //get this ingredient name and quantity\n String thisName = tempIng.get(j).getName();\n double thisQty = tempIng.get(j).getQuantity();\n\n //get InventorySingleton qty\n double oldQty = InventorySingleton.get(this).getIngredientQuantity(thisName);\n double newQty = oldQty - (thisQty*saleNum);\n //Update Inventory Singleton and Database\n InventorySingleton.get(this).setIngredientQuantity(thisName, newQty);\n inventoryDBUpdate();\n }\n }\n }", "@Override\r\n\tpublic List<SalesDto> queryAllSales() {\n\t\treturn salesMapper.queryAllSales();\r\n\t}", "public void accountSale(long storeID, final SaleTO sale) throws ProductOutOfStockException, NotInDatabaseException, UpdateException;", "public List<SaleDetail> getAllSaleDetailsBySaleInvoice(int id) {\n SaleInvoice saleInvoice = saleInvoiceRepository.findById(id).orElseThrow(NullPointerException::new);\n return saleDetailRepository.findSaleDetailsBySaleInvoice(saleInvoice);\n }", "public void updateAccountingSystem(Sale sale)\n {\n \n }", "public List<Sale> getSalesLog() {\n return salesLog;\n }", "public String searchSalerOfPromotion() throws Exception {\n\t\tactionStartTime = new Date();\n\t\tif (promotionId == null || promotionId <= 0) {\n\t\t\treturn JSON;\n\t\t}\n\t\ttry {\n\t\t\tList<PromotionStaffVO> lst = promotionProgramMgr.getSalerInPromotionProgram(promotionId, code, name, quantity);\n\n\t\t\tList<TreeGridNode<PromotionStaffVO>> tree = new ArrayList<TreeGridNode<PromotionStaffVO>>();\n\t\t\tif (lst == null || lst.size() == 0) {\n\t\t\t\tresult.put(\"rows\", tree);\n\t\t\t\treturn JSON;\n\t\t\t}\n\n\t\t\t// Tao cay\n\t\t\tint i, sz = lst.size();\n\t\t\tPromotionStaffVO vo = null;\n\t\t\tLong shId = currentUser.getShopRoot().getShopId();\n\t\t\tfor (i = 0; i < sz; i++) {\n\t\t\t\tvo = lst.get(i);\n\t\t\t\tif (vo.getIsSaler() == 0 && shId.equals(vo.getId())) {\n\t\t\t\t\ti++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//PromotionStaffVO vo = lst.get(0);\n\t\t\tTreeGridNode<PromotionStaffVO> node = new TreeGridNode<PromotionStaffVO>();\n\t\t\tnode.setNodeId(\"sh\" + vo.getId());\n\t\t\tnode.setAttr(vo);\n\t\t\tnode.setState(ConstantManager.JSTREE_STATE_OPEN);\n\t\t\tnode.setText(vo.getCode() + \" - \" + vo.getName());\n\t\t\tList<TreeGridNode<PromotionStaffVO>> chidren = new ArrayList<TreeGridNode<PromotionStaffVO>>();\n\t\t\tnode.setChildren(chidren);\n\t\t\ttree.add(node);\n\n\t\t\tTreeGridNode<PromotionStaffVO> tmp;\n\t\t\tTreeGridNode<PromotionStaffVO> tmp2;\n\t\t\tfor (; i < sz; i++) {\n\t\t\t\tvo = lst.get(i);\n\n\t\t\t\ttmp2 = getNodeFromTree(tree, \"sh\" + vo.getParentId());\n\t\t\t\tif (tmp2 != null) {\n\t\t\t\t\ttmp = new TreeGridNode<PromotionStaffVO>();\n\t\t\t\t\ttmp.setAttr(vo);\n\t\t\t\t\tif (0 == vo.getIsSaler()) {\n\t\t\t\t\t\ttmp.setNodeId(\"sh\" + vo.getId());\n\t\t\t\t\t\ttmp.setState(ConstantManager.JSTREE_STATE_OPEN);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttmp.setNodeId(\"st\" + vo.getId());\n\t\t\t\t\t\ttmp.setState(ConstantManager.JSTREE_STATE_LEAF);\n\t\t\t\t\t}\n\t\t\t\t\ttmp.setText(vo.getCode() + \" - \" + vo.getName());\n\n\t\t\t\t\tif (tmp2.getChildren() == null) {\n\t\t\t\t\t\ttmp2.setChildren(new ArrayList<TreeGridNode<PromotionStaffVO>>());\n\t\t\t\t\t}\n\t\t\t\t\ttmp2.getChildren().add(tmp);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresult.put(\"rows\", tree);\n\t\t} catch (Exception ex) {\n\t\t\tLogUtility.logErrorStandard(ex, R.getResource(\"web.log.message.error\", \"vnm.web.action.program.PromotionCatalogAction.searchSalerOfPromotion\"), createLogErrorStandard(actionStartTime));\n\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_SYSTEM));\n\t\t\tresult.put(ERROR, true);\n\t\t}\n\t\treturn JSON;\n\t}", "public List<Product> getSales() {\n return sales;\n }", "public void startSale(){\n this.sale = new Sale();\n this.inventory = new Inventory();\n this.accounting = new Accounting();\n }", "@Override\n\tpublic List<RotateBIDSale> listSale(String bidId) {\n\t\treturn dao.listSale(bidId);\n\t}", "public static void searchAll(){\r\n try {\r\n singleton.dtm = new DefaultTableModel(); \r\n singleton.dtm.setColumnIdentifiers(general);\r\n home_RegisterUser.table.setModel(singleton.dtm);\r\n \r\n Statement stmt = singleton.conn.createStatement();\r\n ResultSet rs = stmt.executeQuery(\"SELECT * FROM articulos\");\r\n //SELECT a.*,c.nombre FROM articulos a,categorias c,prodcategoria p WHERE a.codigo = p.articulo AND c.categoria_id = p.categoria\r\n \r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectos(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2)); \r\n }\r\n } catch (SQLException ex) {\r\n System.err.println(\"SQL Error: \"+ex);\r\n }catch(Exception ex){\r\n System.err.println(\"Error: \"+ex);\r\n }\r\n }", "@Transactional\n @Override\n public StringBuffer addSalesOrder(String customerID, String cartIDs, String addressID, String paymentType,\n String orderAmount, String scoreAll, String memo, String itemCount, String itemID,\n String supplierID, String itemType, String orderType, String objID, String invoiceType,\n String invoiceTitle, String generateType, String orderID, String allFreight, String supplierFreightStr) throws Exception {\n \t\n String ids[] = cartIDs.split(\",\");\n List<ShoppingCartVO> shopCartList = new ArrayList<ShoppingCartVO>();\n for (String id : ids) {\n ShoppingCartVO shoppingCartVO = shoppingCartDAO.findShoppingCartByID(Long.valueOf(id));\n shopCartList.add(shoppingCartVO);\n }\n Map<String,List<ShoppingCartVO>> maps = new HashMap<String,List<ShoppingCartVO>>();\n for(ShoppingCartVO s:shopCartList){\n \tList<ShoppingCartVO> temp = new ArrayList<ShoppingCartVO>();\n \t String sid1= s.getSupplierID();\n String siname1= s.getSupplierName();\n for(ShoppingCartVO shoppingCartVO1 : shopCartList){\n \t//当前店铺对应的购物车集合\n \tString sid2 = shoppingCartVO1.getSupplierID();\n \tif(sid1.equals(sid2)){\n \t\ttemp.add(shoppingCartVO1);\n \t}\n }\n maps.put(sid1+\"_\"+siname1, temp);\n }\n \n //根据物流模板计算运费\n Map<String, Double> supplierFreightMap = new HashMap<String, Double>();\n String[] supplierFreightAll = supplierFreightStr.split(\"\\\\|\");\n for (int i = 0; i < supplierFreightAll.length; i++) {\n \tString[] supplierFreight = supplierFreightAll[i].split(\":\");\n \tsupplierFreightMap.put(supplierFreight[0], Double.parseDouble(supplierFreight[1]));\n\t\t} \n \n StringBuffer ordersList = new StringBuffer();\n// cachedClient.delete(customerID + orderID);\n Set<String> set = maps.keySet();\n\t\tfor(String string : set){\n\t\t List<ShoppingCartVO> temp1= maps.get(string);\n\t\t double supplierFreight = supplierFreightMap.get(string);\n\t\t Double amount = 0d;\n\t\t Integer count = 0;\n Integer score = 0;\n Double weight = 0d;\n\t\t for (ShoppingCartVO shoppingCartVO : temp1) {\n ItemVO itemVO = itemDAO.findItemById(shoppingCartVO.getItemID());\n count += shoppingCartVO.getItemCount();\n // weight += itemVO.getWeight();\n if (shoppingCartVO.getType() == 1) {\n amount += shoppingCartVO.getItemCount() * shoppingCartVO.getSalesPrice();\n } else if (shoppingCartVO.getType() == 2) {\n score += shoppingCartVO.getItemCount() * itemVO.getScore();\n } else if (shoppingCartVO.getType() == 3) {\n amount += shoppingCartVO.getItemCount() * itemVO.getScorePrice();\n score += shoppingCartVO.getItemCount() * shoppingCartVO.getSalesScore();\n }\n }\n\t\t //SalesOrderVO tempOrder = new SalesOrderVO();\n\t /*if (tempOrder == null) {\n\t throw new Exception(\"参数错误\");\n\t }\n\t if (\"012\".indexOf(invoiceType) == -1) {\n\t throw new Exception(\"参数错误\");\n\t }*/\n\t SalesOrderDTO salesOrderDTO = new SalesOrderDTO();\n\t salesOrderDTO.setMainID(randomNumeric());\n\t salesOrderDTO.setCustomerID(customerID);\n\t salesOrderDTO.setPaymentType(Integer.valueOf(paymentType));\n\t salesOrderDTO.setPaymentStatus(0);\n\n\t // salesOrderDTO.setExpressFee(tempOrder.getExpressFee());//运费\n\t salesOrderDTO.setProductAmount(amount);\n\t salesOrderDTO.setTotalAmount(amount + supplierFreight);\n\t salesOrderDTO.setPayableAmount(amount);\n\n\t salesOrderDTO.setOrderType(Integer.valueOf(orderType));\n\t salesOrderDTO.setMemo(memo);\n\t salesOrderDTO.setInvoiceType(Integer.parseInt(invoiceType));\n\t salesOrderDTO.setInvoiceTitle(invoiceTitle);\n\t salesOrderDTO.setSupplierID(string);\n\t salesOrderDTO.setExpressFee(supplierFreight);\n\t salesOrderDAO.addSalesOrder(salesOrderDTO);\n\t ordersList.append(salesOrderDTO.getMainID()+\",\");\n\t if(!paymentType.equals(\"3\")){\n\t \t CustomerDeliveryAddressVO customerDeliveryAddressVO = customerDeliveryAddressDAO.findAddressByID(Long.valueOf(addressID));\n\t \t if (customerDeliveryAddressVO != null) {\n\t \t SalesOrderDeliveryAddressDTO salesOrderDeliveryAddressDTO = new SalesOrderDeliveryAddressDTO();\n\t \t salesOrderDeliveryAddressDTO.setSalesOrderID(salesOrderDTO.getMainID());\n\t \t salesOrderDeliveryAddressDTO.setName(customerDeliveryAddressVO.getName());\n\t \t salesOrderDeliveryAddressDTO.setCountryID(customerDeliveryAddressVO.getCountryID());\n\t \t salesOrderDeliveryAddressDTO.setProvinceID(customerDeliveryAddressVO.getProvinceID());\n\t \t salesOrderDeliveryAddressDTO.setCityID(customerDeliveryAddressVO.getCityID());\n\t \t salesOrderDeliveryAddressDTO.setDisctrictID(customerDeliveryAddressVO.getDisctrictID());\n\t \t salesOrderDeliveryAddressDTO.setAddress(customerDeliveryAddressVO.getAddress());\n\t \t salesOrderDeliveryAddressDTO.setMobile(customerDeliveryAddressVO.getMobile());\n\t \t salesOrderDeliveryAddressDTO.setTelephone(customerDeliveryAddressVO.getTelephone());\n\t \t if (customerDeliveryAddressVO.getZip() != null) {\n\t \t salesOrderDeliveryAddressDTO.setZip(customerDeliveryAddressVO.getZip());\n\t \t }\n\t \t salesOrderDeliveryAddressDAO.insertSalesOrderDeliveryAddress(salesOrderDeliveryAddressDTO);\n\t \t }\n\t \t ShippingAddressVO shippingAddressVO = shippingAddressDAO.findDefaultShippingAddress();\n\t \t if (shippingAddressVO != null) {\n\t \t SalesOrderShippingAddressDTO salesOrderShippingAddressDTO = new SalesOrderShippingAddressDTO();\n\t \t salesOrderShippingAddressDTO.setSalesOrderID(salesOrderDTO.getMainID());\n\t \t salesOrderShippingAddressDTO.setName(shippingAddressVO.getName());\n\t \t salesOrderShippingAddressDTO.setCountryID(shippingAddressVO.getCountryID());\n\t \t salesOrderShippingAddressDTO.setProvinceID(shippingAddressVO.getProvinceID());\n\t \t salesOrderShippingAddressDTO.setCityID(shippingAddressVO.getCityID());\n\t \t salesOrderShippingAddressDTO.setDisctrictID(shippingAddressVO.getDisctrictID());\n\t \t salesOrderShippingAddressDTO.setAddress(shippingAddressVO.getAddress());\n\t \t salesOrderShippingAddressDTO.setMobile(shippingAddressVO.getMobile());\n\t \t salesOrderShippingAddressDTO.setTelephone(shippingAddressVO.getTelephone());\n\t \t salesOrderShippingAddressDTO.setZip(shippingAddressVO.getZip());\n\t \t salesOrderShippingAddressDAO.insertSalesOrderShippingAddress(salesOrderShippingAddressDTO);\n\t \t }\n\t }\n\t \n\t ItemDTO itemDTO = new ItemDTO();\n\t SupplierItemDTO supplierItemDTO = new SupplierItemDTO();\n\t SalesOrderLineDTO salesOrderLineDTO = new SalesOrderLineDTO();\n\t if (generateType.equals(\"quickBuy\")) {\n\t generateQuickBuyOrder(itemCount,cartIDs, itemID, supplierID, objID, salesOrderDTO, itemDTO, supplierItemDTO,\n\t salesOrderLineDTO);\n\n\t } else if (generateType.equals(\"oneKey\")) {\n\t generateOneKeyOrder(customerID, itemCount, itemType, objID, salesOrderDTO, itemDTO, supplierItemDTO,\n\t salesOrderLineDTO);\n\n\t } else if (generateType.equals(\"shoppingcart\")) {\n\t genarateShoppingCartOrder(customerID, cartIDs, itemCount, itemType, objID, salesOrderDTO, itemDTO,\n\t supplierItemDTO, salesOrderLineDTO);\n\t } else {\n\t throw new Exception(\"订单类型无法确定\");\n\t }\n\t\t}\n return ordersList;\n }", "public void saleAct() {\t\r\n\t\t\r\n\t\tif(createWine() != null) {\r\n\t\t\t\r\n\t\t\ttext_amount =String.valueOf( cus.saleTransaction(createWine()));\r\n\t\t\twine_name.setText(name.getText());\r\n\t\t\tamount.setText(\" £ \" + text_amount + \" \" );\r\n\t\t\tbalance.setText(\" £ \" + isCredit((double)cus.getAccount() / 100.00) + \" \");\r\n\t\t\t\r\n\t\t\t//reset all textfield\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t}", "public SaleVO SFindByID(String id) {\n\t\treturn sale.find(id);\r\n\t}", "void fetchForSaleHousesData();", "public void listGoods() {\n\t\tfor (String goodId : goods.keySet()) {\n\t\t\tBoolean value = goods.get(goodId).forSale();\n\t\t\tSystem.out.println(goodId + \" --> For sale: \" + value);\n\t\t}\n\t}", "void newSale(double totalWithTaxes);", "public synchronized static List<String> loadStoresByProfile(Connection c, String profil, int lim) throws SQLException {\r\n List<String> filteredShopList = new ArrayList<>();\r\n //The query which selects all the shops\r\n Statement myStmt = c.createStatement();\r\n //The query which selects all the shops matching the profile\r\n ResultSet myRs = myStmt.executeQuery(\"select magasin.* from magasin, magasin_has_type, type where magasin.idMagasin = magasin_has_type.magasin_idMagasin and magasin_has_type.type_idtype = type.idType and type.designation LIKE '\" + profil +\"%' limit \"+ lim);\r\n //Loop which adds a shop to the list.\r\n while (myRs.next()) {\r\n int id = myRs.getInt(\"idMagasin\");\r\n String designation = myRs.getString(\"designation\");\r\n String description = myRs.getString(\"description\");\r\n int rent = myRs.getInt(\"loyer\");\r\n int surface = myRs.getInt(\"superficie\");\r\n int floor = myRs.getInt(\"niveau\");\r\n String localization = myRs.getString(\"localisation\");\r\n //liste type \r\n// Statement myStmt2 = c.createStatement();\r\n// //The query which selects all the shops.\r\n// ResultSet myRs2 = myStmt2.executeQuery(\"SELECT designation,idType from magasin_has_type,type where magasin_has_type.type_idType=type.idType and magasin_has_type.magasin_idMagasin=\" + id);\r\n// List<TypeStore> list = new ArrayList<>();\r\n// while (myRs2.next()) {\r\n// int idtype = myRs2.getInt(\"idType\");\r\n// String designationType = myRs2.getString(\"designation\");\r\n// TypeStore T = new TypeStore(idtype, designationType);\r\n// list.add(T);\r\n// }\r\n filteredShopList.add(designation);\r\n }\r\n myStmt.close();\r\n return filteredShopList;\r\n }", "@Override\r\n public void setsaleId(int saleid) {\n this.saleId = saleid;\r\n }", "public List<Sale> saleListArtistCount() {\n List<Sale> saleList = new ArrayList<Sale>();\n\n try {\n conn = DBConnection.getConnection();\n stm = conn.createStatement();\n result = stm.executeQuery(\"SELECT name,\\n\"\n + \"COUNT (*) \\n\"\n + \"FROM disquera.artist JOIN disquera.sale ON artist.id_artist = sale.id_artist\\n\"\n + \"GROUP BY artist.name ORDER BY artist.name\");\n //result_album = stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.album on sale.id_album=album.id_album\");\n //result_artist=stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n while (result.next()) {\n Sale newSale = new Sale();\n\n newSale.setArtistName(result.getString(1));\n newSale.setCount(result.getInt(2));\n //System.out.println(\"\\n\\n Received data: \\n Id: \" + newSale.getId_sale() + \"\\nPrecio: \" + newSale.getPrice());\n saleList.add(newSale);\n /*\n System.out.println(\"No existe un usuario con esa contraseña\");\n conn.close();\n return null;\n */\n }\n result.close();\n stm.close();\n conn.close();\n } catch (SQLException ex) {\n ex.getStackTrace();\n return null;\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DAOGenre.class.getName()).log(Level.SEVERE, null, ex);\n }\n return saleList;\n }", "public int getSale() {\n\t\treturn sale;\r\n\t}", "public void startNewSale() {\n sale = new Sale(cashRegister);\n }", "@Override\r\n\tpublic List<webSale> findWeChatSaleRecordByQuery(String startDate, String endDate, String promoterId,\r\n\t\t\tString retailerName) {\n\t\treturn iSearchSaleRecordDao.findWeChatSaleRecordByQuery(startDate, endDate, promoterId, retailerName);\r\n\t}", "public List<Sale> saleListGenreCount() {\n List<Sale> saleList = new ArrayList<Sale>();\n\n try {\n conn = DBConnection.getConnection();\n stm = conn.createStatement();\n result = stm.executeQuery(\"SELECT musical_genre, COUNT (*) FROM disquera.genre \\n\"\n + \"JOIN disquera.sale ON genre.id_genre = sale.id_genre \\n\"\n + \"GROUP BY genre.musical_genre ORDER BY genre.musical_genre\");\n //result_album = stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.album on sale.id_album=album.id_album\");\n //result_artist=stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n while (result.next()) {\n Sale newSale = new Sale();\n\n newSale.setGenre(result.getString(1));\n newSale.setCount(result.getInt(2));\n //System.out.println(\"\\n\\n Received data: \\n Id: \" + newSale.getId_sale() + \"\\nPrecio: \" + newSale.getPrice());\n saleList.add(newSale);\n /*\n System.out.println(\"No existe un usuario con esa contraseña\");\n conn.close();\n return null;\n */\n }\n result.close();\n stm.close();\n conn.close();\n } catch (SQLException ex) {\n ex.getStackTrace();\n return null;\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DAOGenre.class.getName()).log(Level.SEVERE, null, ex);\n }\n return saleList;\n }", "public void search() {\n listTbagendamentos\n = agendamentoLogic.findAllTbagendamentoByDataAndPacienteAndFuncionario(dataSearch, tbcliente, tbfuncionario);\n }", "private void search(String product) {\n // ..\n }", "public static ArrayList<HashMap<String, String>> getDoCustomersWithSalesmanIdSearch(\r\n\t\t\tint start, int length, String search, int id) {\r\n\t\tArrayList<HashMap<String, String>> list = new ArrayList<>();\r\n\t\tHashMap<String, String> map = null;\r\n\t\tCallableStatement call = null;\r\n\t\tResultSet rs = null;\r\n\r\n\t\ttry (Connection con = Connect.getConnection()) {\r\n\t\t\tcall = con\r\n\t\t\t\t\t.prepareCall(\"{CALL get_do_customers_with_salesman_id_search(?,?,?,?)}\");\r\n\t\t\tcall.setInt(1, start);\r\n\t\t\tcall.setInt(2, length);\r\n\t\t\tcall.setString(3, search);\r\n\t\t\tcall.setInt(4, id);\r\n\t\t\trs = call.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tmap = new HashMap<>();\r\n\t\t\t\tmap.put(\"customerId\", rs.getInt(\"customer_id\") + \"\");\r\n\t\t\t\tmap.put(\"customerName\", rs.getString(\"customer_name\"));\r\n\t\t\t\tmap.put(\"customerCnic\", rs.getString(\"customer_cnic\"));\r\n\t\t\t\tmap.put(\"customerDateOfBirth\", rs.getDate(\"date_of_birth\") + \"\");\r\n\t\t\t\tmap.put(\"customerAddress\", rs.getString(\"customer_address\"));\r\n\t\t\t\tmap.put(\"customerCity\", rs.getInt(\"customer_city\") + \"\");\r\n\t\t\t\tmap.put(\"customerPhone\", rs.getString(\"customer_phone\"));\r\n\t\t\t\tmap.put(\"customerPhone2\", rs.getString(\"customer_phone2\"));\r\n\t\t\t\tmap.put(\"customerImage\", rs.getBlob(\"customr_image\") + \"\");\r\n\t\t\t\tmap.put(\"customerFatherName\", rs.getString(\"father_name\"));\r\n\t\t\t\tmap.put(\"customerMotherName\", rs.getString(\"mother_name\"));\r\n\t\t\t\t/* map.put(\"customerEmail\", rs.getString(\"email\")); */\r\n\t\t\t\tmap.put(\"customerGender\", rs.getString(\"gender\"));\r\n\t\t\t\tmap.put(\"customerAge\", rs.getInt(\"age\") + \"\");\r\n\t\t\t\tmap.put(\"customerCreated\", rs.getString(\"created_on\"));\r\n\t\t\t\tmap.put(\"customerOccupation\", rs.getString(\"occupation\"));\r\n\r\n\t\t\t\tlist.add(map);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}", "private void processRentals(ReturnDocument rdoc) {\r\n for (ReturnDetail rdetail : rdoc.getReturnDetails()) {\r\n if (rdetail.getCatalogItem().getStock().isRental()) {\r\n\r\n List<StagingRental> stagingRentals = rdetail.getReturnRentals();\r\n \r\n if (!MMUtil.isCollectionEmpty(stagingRentals)) {\r\n List<String> serialNumberList = new ArrayList<String>();\r\n for (StagingRental stagingRental : stagingRentals) {\r\n serialNumberList.add(stagingRental.getSerialNumber());\r\n }\r\n Collection<Rental> currentRentals = MMServiceLocator.getRentalService()\r\n .getCurrentNonReturnedRentalItems(rdetail.getCatalogItem().getStock(),\r\n serialNumberList);\r\n for(Rental rental : currentRentals) {\r\n rental.setReturnDetailId(rdetail.getReturnDetailId());\r\n rental.setReturnDetail(rdetail);\r\n rental.setReturnDate(KNSServiceLocator.getDateTimeService().getCurrentTimestamp());\r\n rental.setRentalStatusCode(MMConstants.Rental.RENTAL_STATUS_RETURNED);\r\n rdetail.getRentals().add(rental);\r\n }\r\n MMServiceLocator.getRentalService().saveRentalList(rdetail.getRentals());\r\n \r\n if(MMConstants.DispositionCode.RETURN_TO_SHELF.equals(rdetail.getDispostitionCode())) {\r\n List<Rental> backToShelfRentals = new ArrayList<Rental>();\r\n for(Rental rental : currentRentals) {\r\n Rental newRental = new Rental();\r\n newRental.setRentalStatusCode(MMConstants.Rental.RENTAL_STATUS_AVAILABLE);\r\n newRental.setRentalSerialNumber(rental.getRentalSerialNumber());\r\n newRental.setRentalTypeCode(rental.getRentalTypeCode());\r\n newRental.setRentalType(rental.getRentalType());\r\n newRental.setStockId(rental.getStockId());\r\n newRental.setStock(rental.getStock());\r\n backToShelfRentals.add(newRental);\r\n }\r\n MMServiceLocator.getRentalService().saveRentalList(backToShelfRentals);\r\n }\r\n\r\n } \r\n }\r\n }\r\n }", "@Override\r\n\tpublic List<SalesAnalysis> getSalesAnalysis(Date fromDate, Date toDate) {\r\n\t\t\r\n\t\tList<SalesAnalysis> salesAnalysisDetails=new ArrayList<>();\r\n\t\tSalesAnalysis salesAnalysis=new SalesAnalysis();\r\n\t\t\r\n\t\t//get orders placed in the given period\r\n\t\tList<Order> orderDetails=orderService.getOrdersBetween(fromDate, toDate);\r\n\t\t\r\n\t\tHashMap<String, Double> purchasePriceDetails=new HashMap<>();\r\n\t\tHashMap<String, Double> salesPriceDetails=new HashMap<>();\r\n\t\tint qty=0;\r\n\t\tdouble salesPrice=0;\r\n\t\tdouble purchasePrice=0;\r\n\t\t\r\n\t\t//get total revenue for period\r\n\t\tdouble totalRevenue=getTotalRevenueBetween(fromDate, toDate);\r\n\t\t\r\n\t\t//get best seller details for the products, category-wise(from PRODUCT table)\r\n\t\tList<Object[]> bestSellerDetails=productService.getBestSellerId();\r\n\t\tSystem.out.println(bestSellerDetails);\r\n\t\t\r\n\t\t\r\n\t\t//for each product category, check sales details\r\n\t\tfor(Object[] object:bestSellerDetails)\t{\r\n\t\t\tString productCategory=(String)object[0];\r\n\t\t\tsalesPrice=0;\r\n\t\t\tpurchasePrice=0;\r\n\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\r\n\t\t\t//for each order, check product category and add details to maps\r\n\t\t\tfor(Order order:orderDetails)\t{\r\n\t\t\t\t\r\n\t\t\t\t//get products in this order\r\n\t\t\t\tList<CartProduct> products=order.getCart().getCartProducts();\r\n\t\t\t\t\r\n\t\t\t\t//getting purchase price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tpurchasePrice=purchasePriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(product.getProduct().getQuantity()*product.getProduct().getProductPrice());\r\n\t\t\t\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//getting sales price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tqty=product.getQuantity();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsalesPrice=salesPriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(qty*(100-product.getProduct().getDiscount())*product.getProduct().getProductPrice())/100;\r\n\t\t\t\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\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\r\n\t\t\t//make SalesAnalysis object using obtained data\r\n\t\t\tsalesAnalysis.setProductCategory(productCategory);\r\n\t\t\tsalesAnalysis.setMerchant(merchantService.getMerchantName((Integer)object[1]));\r\n\t\t\tsalesAnalysis.setProductQuantity(purchasePriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setProductSales(salesPriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setSalesPercent((salesAnalysis.getProductSales()*100)/salesAnalysis.getProductQuantity());\r\n\t\t\tsalesAnalysis.setTotalRevenue(totalRevenue);\r\n\t\t\t\r\n\t\t\t//make a list of sales analysis performed\r\n\t\t\tsalesAnalysisDetails.add(salesAnalysis);\r\n\t\t}\r\n\t\t\r\n\t\treturn salesAnalysisDetails;\r\n\t}", "private void search(SearchRequest request) {\r\n\t\tif(request == null)return;\r\n\t\tList<Record> results = handler.search(request);\r\n\t\tlist.show(results);\r\n\t\tpanInfo.setNumRec(results.size());\r\n\t\tpanInfo.setTotalAmt(Record.sumBalance(results));\r\n\t}", "public boolean storeSale(Sale sale, int count) {\n boolean result = true;\n int numberOfOccurence = count;\n try {\n LinkedList<Sale> temp = storageSale.get(sale.getProductType());\n if (temp == null) {\n temp = new LinkedList<Sale>();\n }\n for (int i = 0; i < numberOfOccurence; i++) {\n result = temp.add(sale);\n if (!result)\n break;\n }\n storageSale.put(sale.getProductType(), temp);\n } catch (Exception e) {\n result = false;\n }\n return result;\n }", "public void bookSale(Sale sale)\n {\n //books the sale\n }", "public void searchProducts()\n {\n if(!searchBar1.getText().equals(\"\"))\n {\n if(searchBar1.getText().matches(\"[0-9]*\"))\n {\n int number = Integer.parseInt(searchBar1.getText());\n ObservableList<Product> newProductList = FXCollections.observableArrayList();\n Product product = Inventory.lookupProduct(number);\n newProductList.add(product);\n productTableView.setItems(newProductList);\n if(newProductList.contains(null)) {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"No Product with that Name or ID found.\");\n alert.show();\n }\n } else {\n ObservableList<Product> newProductList = FXCollections.observableArrayList();\n newProductList = Inventory.lookupProduct(searchBar1.getText());\n productTableView.setItems(newProductList);\n if(newProductList.isEmpty()) {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"No Product with that Name or ID found.\");\n alert.show();\n }\n }\n } else {\n productTableView.setItems(Inventory.getAllProducts());\n }\n }", "@Override\n\tpublic List<Mall> searchMall(Mall mall) {\n\t\treturn iMallDao.searchMall(mall);\n\t}", "public void listHomeForSale(String mlsNumber,double price) {\n\t\t\n\t\tthis.isActiveListing = true;\n this.mlsNumber = mlsNumber;\t\t\n\t\tthis.price = price;\n\t\t\n\t}", "@GetMapping(\"/{id}/sales\")\n public Iterable<Sale> getSalesByCustomer(@PathVariable long id){\n Customer b = customerRepository.findById(id);\n return b.getSales();\n }", "private void searchExec(){\r\n\t\tString key=jComboBox1.getSelectedItem().toString();\r\n\t\tkey=NameConverter.convertViewName2PhysicName(\"Discount\", key);\r\n\t\tString valueLike=searchTxtArea.getText();\r\n\t\tList<DiscountBean>searchResult=discountService.searchDiscountByKey(key, valueLike);\r\n\t\tjTable1.setModel(ViewUtil.transferBeanList2DefaultTableModel(searchResult,\"Discount\"));\r\n\t}", "public List<SalesItems> toListSalesItems(int vendaId){\n \n List<SalesItems> list = new ArrayList<>();\n String sql = \"select i.id, p.descricao, i.qtd, p.preco, \"\n + \"i.subtotal from tb_itensvendas as i \"\n + \"inner join tb_produtos as p on(i.produto_id = p.id) \"\n + \"where i.venda_id = ? \";\n \n try{\n \n PreparedStatement st = conn.prepareStatement(sql);\n \n st.setInt(1, vendaId);\n \n \n ResultSet rs = st.executeQuery();\n \n while(rs.next()){\n SalesItems item = new SalesItems();\n Product product = new Product();\n \n item.setId(rs.getInt(\"i.id\"));\n product.setDescricao(rs.getString(\"p.descricao\"));\n item.setQtd(rs.getInt(\"i.qtd\"));\n product.setPreco(rs.getDouble(\"p.preco\"));\n item.setSubtotal(rs.getDouble(\"i.subtotal\"));\n \n \n \n \n \n item.setProduto(product);\n \n list.add(item);\n \n }\n \n return list;\n \n }\n catch(SQLException error){\n JOptionPane.showMessageDialog(null, \"Erro: \" + error);\n return null;\n }\n }", "public ArrayList<SaleReturnVO> showSaleReturn() {\n\t\treturn saleReturn.show();\r\n\t}", "public void startSale() {\r\n System.out.println(\"[CashRegister] startSale\");\r\n System.out.println(\"\");\r\n\r\n //receipt = new Receipt(customerId); \r\n receipt = new Receipt(\"100\");\r\n\r\n //addItemToSale(productId, quantity);\r\n addItemToSale(\"A101\", 10);\r\n\r\n addItemToSale(\"B205\", 6);\r\n\r\n addItemToSale(\"C222\", 12);\r\n\r\n }", "public Sales getSaleById(Long id) {\r\n\t\treturn salesRepository.findById(id).orElse(null);\r\n\t}", "@Override\r\n\tpublic Page<StnLooseMt> searchAll(Integer limit, Integer offset, String sort, String order, String search) {\n\t\t\r\n\t\tQStnLooseMt qStnLooseMt = QStnLooseMt.stnLooseMt;\r\n\t\tBooleanExpression expression = null;\r\n\r\n\t\t\r\n\t\t\tif (search != null) {\r\n\t\t\t\texpression =qStnLooseMt.invNo.like(\"%\" + search + \"%\");\r\n\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif(limit == null){\r\n\t\t\tlimit=1000;\r\n\t\t}\r\n\t\tif(offset == null){\r\n\t\t\toffset = 0;\r\n\t\t}\r\n\t\t\r\n\t\tint page = (offset == 0 ? 0 : (offset / limit));\r\n\t\t\r\n\t\tif (sort == null) {\r\n\t\t\tsort = \"id\";\r\n\t\t} else if (sort.equalsIgnoreCase(\"invNo\")) {\r\n\t\t\tsort = \"invNo\";\r\n\t\t}\r\n\t\r\n\t\tPage<StnLooseMt> stnLooseMtList =(Page<StnLooseMt>) stnLooseMtRepository.findAll(\r\n\t\t\t\texpression, new PageRequest(page, limit, (order.equalsIgnoreCase(\"asc\") ? Direction.DESC: Direction.ASC),sort));\r\n\t\t\r\n\r\n\t\r\n\t\treturn stnLooseMtList;\r\n\t}", "public List<Sale> getSales() {\n if (sales == null) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SaleDao targetDao = daoSession.getSaleDao();\n List<Sale> salesNew = targetDao._queryTask_Sales(uuid);\n synchronized (this) {\n if(sales == null) {\n sales = salesNew;\n }\n }\n }\n return sales;\n }", "@RequestMapping(\"onSale\")\n @ResponseBody\n //sku上架,skuinfo保存至elasticsearch\n public void onSale(SkuInfo skuInfo){\n SkuLsInfo skuLsInfo = new SkuLsInfo();\n\n try {\n BeanUtils.copyProperties(skuLsInfo,skuInfo);\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n\n listService.saveSkuLsInfo(skuLsInfo);\n }", "public List<SalePurchase> viewAllSPEntries(){\n\t\tList<SalePurchase> list = new ArrayList<>(salePurchaseEntries.values());\n\t\treturn list;\n\t}", "public Sale getSaleAt(int position) {\n return sales.get(position);\n }", "@Transactional\n @Override\n public StringBuffer addSalesOrderTparts(String customerID, String cartIDs, String addressID, String paymentType,\n String orderAmount, String scoreAll, String memo, String itemCount, String itemID,\n String supplierID, String itemType, String orderType, String objID, String invoiceType,\n String invoiceTitle, String generateType, String orderID,String memoIDs,String allFreight, String supplierFreightStr) throws Exception {\n \t\n String ids[] = cartIDs.split(\",\");\n String memos[] = memoIDs.split(\",\");\n List<ShoppingCartVO> shopCartList = new ArrayList<ShoppingCartVO>();\n for (String id : ids) {\n ShoppingCartVO shoppingCartVO = shoppingCartDAO.findShoppingCartByID(Long.valueOf(id));\n shopCartList.add(shoppingCartVO);\n }\n Map<String,List<ShoppingCartVO>> maps = new HashMap<String,List<ShoppingCartVO>>();\n for(ShoppingCartVO s:shopCartList){\n \tList<ShoppingCartVO> temp = new ArrayList<ShoppingCartVO>();\n \t String sid1= s.getSupplierID();\n String siname1= s.getSupplierName();\n for(ShoppingCartVO shoppingCartVO1 : shopCartList){\n \t//当前店铺对应的购物车集合\n \tString sid2 = shoppingCartVO1.getSupplierID();\n \tif(sid1.equals(sid2)){\n \t\ttemp.add(shoppingCartVO1);\n \t}\n }\n maps.put(sid1+\"_\"+siname1, temp);\n }\n \n //根据物流模板计算运费\n Map<String, Double> supplierFreightMap = new HashMap<String, Double>();\n String[] supplierFreightAll = null;\n if(StringUtil.isNotEmpty(supplierFreightStr))\n {\n \tsupplierFreightAll = supplierFreightStr.split(\"\\\\|\");\n for (int i = 0; i < supplierFreightAll.length; i++) {\n \tString[] supplierFreight = supplierFreightAll[i].split(\":\");\n \tsupplierFreightMap.put(supplierFreight[0], Double.parseDouble(supplierFreight[1]));\n \t\t} \t\n }\n \n \n StringBuffer ordersList = new StringBuffer();\n int num = 0;\n// cachedClient.delete(customerID + orderID);\n Set<String> set = maps.keySet();\n\t\tfor(String string : set){\n\t\t List<ShoppingCartVO> temp1= maps.get(string);\n\t\t double supplierFreight = 0d;\n\t\t if(supplierFreightMap.size()>0)\n\t\t {\n\t\t\t supplierFreight = supplierFreightMap.get(string);\n\t\t }\n\t\t Double amount = 0d;\n\t\t Integer count = 0;\n Integer score = 0;\n Double weight = 0d;\n\t\t for (ShoppingCartVO shoppingCartVO : temp1) {\n ItemVO itemVO = itemDAO.findItemById(shoppingCartVO.getItemID());\n count += shoppingCartVO.getItemCount();\n // weight += itemVO.getWeight();\n if (shoppingCartVO.getType() == 1) {\n amount += shoppingCartVO.getItemCount() * shoppingCartVO.getSalesPrice();\n } else if (shoppingCartVO.getType() == 2) {\n score += shoppingCartVO.getItemCount() * itemVO.getScore();\n } else if (shoppingCartVO.getType() == 3) {\n amount += shoppingCartVO.getItemCount() * itemVO.getScorePrice();\n score += shoppingCartVO.getItemCount() * shoppingCartVO.getSalesScore();\n }\n }\n\t\t //SalesOrderVO tempOrder = new SalesOrderVO();\n\t /*if (tempOrder == null) {\n\t throw new Exception(\"参数错误\");\n\t }\n\t if (\"012\".indexOf(invoiceType) == -1) {\n\t throw new Exception(\"参数错误\");\n\t }*/\n\t SalesOrderDTO salesOrderDTO = new SalesOrderDTO();\n\t salesOrderDTO.setMainID(randomNumeric());\n\t salesOrderDTO.setCustomerID(customerID);\n\t salesOrderDTO.setPaymentType(Integer.valueOf(paymentType));\n\t salesOrderDTO.setPaymentStatus(0);\n\n\t // salesOrderDTO.setExpressFee(tempOrder.getExpressFee());//运费\n\t salesOrderDTO.setProductAmount(amount);\n\t salesOrderDTO.setTotalAmount(amount + supplierFreight);\n\t salesOrderDTO.setPayableAmount(amount);\n\n\t salesOrderDTO.setOrderType(Integer.valueOf(orderType));\n\t salesOrderDTO.setMemo(getMemoBySupplier(memos,string.split(\"_\")[0]));\n\t salesOrderDTO.setInvoiceType(Integer.parseInt(invoiceType));\n\t salesOrderDTO.setInvoiceTitle(invoiceTitle);\n\t salesOrderDTO.setSupplierID(string);\n\t salesOrderDTO.setExpressFee(supplierFreight);\n\t salesOrderDAO.addSalesOrder(salesOrderDTO);\n\t ordersList.append(salesOrderDTO.getMainID()+\",\");\n\t // 支付方式1:余额支付2:货到付款3:在线支付4:积分礼品5:线下汇款\n\t if(!paymentType.equals(\"3\")){\n\t \t//3:在线支付\n\t \t CustomerDeliveryAddressVO customerDeliveryAddressVO = customerDeliveryAddressDAO.findAddressByID(Long.valueOf(addressID));\n\t \t if (customerDeliveryAddressVO != null) {\n\t \t SalesOrderDeliveryAddressDTO salesOrderDeliveryAddressDTO = new SalesOrderDeliveryAddressDTO();\n\t \t salesOrderDeliveryAddressDTO.setSalesOrderID(salesOrderDTO.getMainID());\n\t \t salesOrderDeliveryAddressDTO.setName(customerDeliveryAddressVO.getName());\n\t \t salesOrderDeliveryAddressDTO.setCountryID(customerDeliveryAddressVO.getCountryID());\n\t \t salesOrderDeliveryAddressDTO.setProvinceID(customerDeliveryAddressVO.getProvinceID());\n\t \t salesOrderDeliveryAddressDTO.setCityID(customerDeliveryAddressVO.getCityID());\n\t \t salesOrderDeliveryAddressDTO.setDisctrictID(customerDeliveryAddressVO.getDisctrictID());\n\t \t salesOrderDeliveryAddressDTO.setAddress(customerDeliveryAddressVO.getAddress());\n\t \t salesOrderDeliveryAddressDTO.setMobile(customerDeliveryAddressVO.getMobile());\n\t \t salesOrderDeliveryAddressDTO.setTelephone(customerDeliveryAddressVO.getTelephone());\n\t \t if (customerDeliveryAddressVO.getZip() != null) {\n\t \t salesOrderDeliveryAddressDTO.setZip(customerDeliveryAddressVO.getZip());\n\t \t }\n\t \t salesOrderDeliveryAddressDAO.insertSalesOrderDeliveryAddress(salesOrderDeliveryAddressDTO);\n\t \t }\n\t \t ShippingAddressVO shippingAddressVO = shippingAddressDAO.findDefaultShippingAddress();\n\t \t if (shippingAddressVO != null) {\n\t \t SalesOrderShippingAddressDTO salesOrderShippingAddressDTO = new SalesOrderShippingAddressDTO();\n\t \t salesOrderShippingAddressDTO.setSalesOrderID(salesOrderDTO.getMainID());\n\t \t salesOrderShippingAddressDTO.setName(shippingAddressVO.getName());\n\t \t salesOrderShippingAddressDTO.setCountryID(shippingAddressVO.getCountryID());\n\t \t salesOrderShippingAddressDTO.setProvinceID(shippingAddressVO.getProvinceID());\n\t \t salesOrderShippingAddressDTO.setCityID(shippingAddressVO.getCityID());\n\t \t salesOrderShippingAddressDTO.setDisctrictID(shippingAddressVO.getDisctrictID());\n\t \t salesOrderShippingAddressDTO.setAddress(shippingAddressVO.getAddress());\n\t \t salesOrderShippingAddressDTO.setMobile(shippingAddressVO.getMobile());\n\t \t salesOrderShippingAddressDTO.setTelephone(shippingAddressVO.getTelephone());\n\t \t salesOrderShippingAddressDTO.setZip(shippingAddressVO.getZip());\n\t \t salesOrderShippingAddressDAO.insertSalesOrderShippingAddress(salesOrderShippingAddressDTO);\n\t \t }\n\t }\n\t \n\t ItemDTO itemDTO = new ItemDTO();\n\t SupplierItemDTO supplierItemDTO = new SupplierItemDTO();\n\t SalesOrderLineDTO salesOrderLineDTO = new SalesOrderLineDTO();\n\t if (generateType.equals(\"quickBuy\")) {\n\t generateQuickBuyOrder(itemCount,cartIDs, itemID, supplierID, objID, salesOrderDTO, itemDTO, supplierItemDTO,\n\t salesOrderLineDTO);\n\n\t } else if (generateType.equals(\"oneKey\")) {\n\t generateOneKeyOrder(customerID, itemCount, itemType, objID, salesOrderDTO, itemDTO, supplierItemDTO,\n\t salesOrderLineDTO);\n\n\t } else if (generateType.equals(\"shoppingcart\")) {\n\t \tgenarateShoppingCartOrderTparts(customerID, cartIDs, itemCount, itemType, objID, salesOrderDTO, itemDTO,\n\t supplierItemDTO, salesOrderLineDTO);\n\t } else {\n\t throw new Exception(\"订单类型无法确定\");\n\t }\n\t num++;\n\t\t}\n return ordersList;\n }", "public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}", "public void listar_saldoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaCorte(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }", "public List<Orders> getAllSalles(Roles role, Custvend custvend, int vendorTransaction, String view) {\n\n return ordersFacade.getAllSallesFromDB(role, custvend, vendorTransaction, view);\n }", "public static void searchDisplays(){\r\n try {\r\n \r\n singleton.dtm = new DefaultTableModel(); \r\n singleton.dtm.setColumnIdentifiers(displays);\r\n home_RegisterUser.table.setModel(singleton.dtm);\r\n \r\n Statement stmt = singleton.conn.createStatement();\r\n ResultSet rs = stmt.executeQuery(\"SELECT *,r.tam,r.resolucion FROM articulos a,mon r WHERE a.codigo = r.producto_id\");\r\n \r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n \r\n singleton.dtm.addRow(getArrayDeObjectosMon(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"tam\"),rs.getString(\"resolucion\")));\r\n\r\n }\r\n } catch (SQLException ex) {\r\n System.err.println(\"SQL Error: \"+ex);\r\n }catch(Exception ex){\r\n System.err.println(\"Error: \"+ex);\r\n }\r\n }", "public Cursor getSalesEntry(String id) {\n\t\tString countQuery = \"SELECT * FROM \" + DATABASE_TABLE2 +\" WHERE \"+Sales_Id+\" = \"+id;\n\n\t Cursor cursor = ourDatabase.rawQuery(countQuery, null);\n\t \n\t\treturn cursor;\n\t\n\t}", "public void setSalesProp(String salesProp) {\n this.salesProp = salesProp;\n }", "@Override\r\n\tpublic List<OrderVO> getListOrderBySaleIDWithOno(HashMap<String, Integer> searchObj) throws Exception {\n\t\treturn sqlSession.selectList(namespaceOrder+\".getListOrderBySaleIDWithSearchInt\",searchObj);\r\n\t}", "public List<Sale> saleListSongCount() {\n List<Sale> saleList = new ArrayList<Sale>();\n\n try {\n conn = DBConnection.getConnection();\n stm = conn.createStatement();\n result = stm.executeQuery(\"SELECT name,\\n\"\n + \"COUNT (*) \\n\"\n + \"FROM disquera.song JOIN disquera.sale ON song.id_song = sale.id_song\\n\"\n + \"GROUP BY song.name ORDER BY song.name\");\n //result_album = stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.album on sale.id_album=album.id_album\");\n //result_artist=stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n while (result.next()) {\n Sale newSale = new Sale();\n\n newSale.setSongName(result.getString(1));\n newSale.setCount(result.getInt(2));\n //System.out.println(\"\\n\\n Received data: \\n Id: \" + newSale.getId_sale() + \"\\nPrecio: \" + newSale.getPrice());\n saleList.add(newSale);\n /*\n System.out.println(\"No existe un usuario con esa contraseña\");\n conn.close();\n return null;\n */\n }\n result.close();\n stm.close();\n conn.close();\n } catch (SQLException ex) {\n ex.getStackTrace();\n return null;\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DAOGenre.class.getName()).log(Level.SEVERE, null, ex);\n }\n return saleList;\n }", "public void startSale()\n\t{\n\t\tpurchase.reset();\n\t}", "public void populateTable() {\n DefaultTableModel dtm = (DefaultTableModel)tblSalesPersonCommision.getModel();\n dtm.setRowCount(0);\n // for(OrderList orderlist:salesperson.getOrderlistcatalog().getSalesPersonOrder()){\n // for(Order order:salesperson.getOrderListSalesPerson().getOrderList()){ \n // for(OrderList orderlist:salesperson.getOrderlistcatalog().getOrCatalog()){\n // for(SalesPerson salesperson :business.getEmployeedirectory().getSalesPersonList()){\n \n for(OrderList orderlist:salesperson.getOrderlistcatalog().getOrCatalog()){\n Object [] row = new Object[4];\n // row[0]=.getCustomer().getCustomerId();\n // row[1]= market.getCustomer().getCustomerName();\n row[0]=orderlist;\n row[1]=orderlist.getOrdertotalprice();\n row[2]=orderlist.getSalespersoncomission();\n row[3]=orderlist.getTotalorderlistquantity();\n //3 tcomission = tcomission + orderlist.getSalespersoncomission();\n //3 totalquantity = totalquantity + orderlist.getTotalorderlistquantity();\n //3 totalorderprice = totalorderprice + orderlist.getOrdertotalprice();\n \n // row[0]=order;\n // row[1]=order.getAmountprice();\n \n dtm.addRow(row);\n // }\n // }\n } \n //2 salesperson.getOrderlistcatalog().setTotalquantitypersalesperson(totalquantity);\n //2 salesperson.getOrderlistcatalog().setTotalcommision(tcomission);\n //2 salesperson.getOrderlistcatalog().setTotalorderlistcsatalogprice(totalorderprice);\n}", "@Override\r\n\tpublic String makingMtListing(Integer limit, Integer offset, String sort, String order, String search,\r\n\t\t\tPrincipal principal) throws ParseException {\n\t\t\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\tPage<MakingMt> makingMtList = null; \r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\r\n\t\tUser user = userService.findByName(principal.getName());\r\n\t\tUserRole userRole = userRoleService.findByUser(user);\r\n\t\tMenuMast menuMast = menuMastService.findByMenuNm(\"makingMt\");\r\n\t\tRoleRights roleRights = roleRightsService.findByRoleMastAndMenuMast(userRole.getRoleMast(), menuMast);\r\n\r\n\t\tif ((search != null) && (search.trim().length() == 0)) {\r\n\t\t\tsearch = null;\r\n\t\t}\r\n\r\n\t\r\n\t\tmakingMtList = searchAll(limit, offset, sort, order, search, true);\r\n\r\n\t\tsb.append(\"{\\\"total\\\":\").append(makingMtList.getTotalElements()).append(\",\\\"rows\\\": [\");\r\n\r\n\t\tfor (MakingMt makingMt : makingMtList) {\r\n\t\t\tDate currdate = sdf.parse(sdf.format(new Date()));\r\n\t\t\tDate invDate = sdf.parse(sdf.format(makingMt.getInvDate()));\r\n\r\n\t\t\tsb.append(\"{\\\"id\\\":\\\"\")\r\n\t\t\t.append(makingMt.getId())\r\n\t\t\t.append(\"\\\",\\\"invNo\\\":\\\"\")\r\n\t\t\t.append(makingMt.getInvNo())\r\n\t\t\t.append(\"\\\",\\\"invDate\\\":\\\"\")\r\n\t\t\t.append(makingMt.getInvDateStr())\r\n\t\t\t.append(\"\\\",\\\"purity\\\":\\\"\")\r\n\t\t\t.append((makingMt.getPurity() != null ? makingMt.getPurity().getName() : \"\"))\r\n\t\t\t.append(\"\\\",\\\"color\\\":\\\"\")\r\n\t\t\t.append((makingMt.getColor() != null ? makingMt.getColor().getName() : \"\"));\r\n\t\t\tsb.append(\"\\\",\\\"action1\\\":\\\"\");\r\n\t\t\t\t\tif (userRole.getRoleMast().getRoleNm().equalsIgnoreCase(\"ADMINISTRATOR\")\r\n\t\t\t\t\t\t\t|| userRole.getRoleMast().getRoleNm().equalsIgnoreCase(\"ADMIN\")\r\n\t\t\t\t\t\t\t|| userRole.getRoleMast().getRoleNm().equalsIgnoreCase(\"ADMIN ROLE\")) {\r\n\t\t\r\n\t\t\t\t\t\tsb.append(\"<a href='/jewels/manufacturing/transactions/makingMt/edit/\")\r\n\t\t\t\t\t\t\t\t.append(makingMt.getId()).append(\".html'\");\r\n\t\t\r\n\t\t\t\t\t\tsb.append(\r\n\t\t\t\t\t\t\t\t\".html' class='btn btn-xs btn-warning' ><span class='glyphicon glyphicon-edit'></span>&nbsp;Edit</a>\");\r\n\t\t\r\n\t\t\t\t\t\tsb.append(\"\\\",\\\"action2\\\":\\\"\");\r\n\t\t\r\n\t\t\t\t\t\tsb.append(\"<a onClick='javascript:doDelete(event, this)' href='/jewels/manufacturing/transactions/makingMt/delete/\");\t\t\t\r\n\t\t\t\t\t\t\t\tsb.append(makingMt.getId());\r\n\t\t\r\n\t\t\t\t\t\tsb.append(\");' class='btn btn-xs btn-danger triggerRemove\").append(makingMt.getId())\r\n\t\t\t\t\t\t\t\t.append(\"'><span class='glyphicon glyphicon-trash'></span>&nbsp;Delete</a>\")\r\n\t\r\n\t\t\t\t\t\t.append(\"\\\"},\");\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif (roleRights.getCanEdit()) {\r\n\r\n\t\t\t\t\tsb.append(\"<a href='/jewels/manufacturing/transactions/makingMt/edit/\")\r\n\t\t\t\t\t.append(makingMt.getId()).append(\".html'\");\r\n\t\t\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsb.append(\"<a onClick='javascript:displayMsg(event, this)' href='javascript:void(0)'\");\r\n\t\t\t\t}\r\n\t\t\t\tsb.append(\r\n\t\t\t\t\t\t\".html' class='btn btn-xs btn-warning' ><span class='glyphicon glyphicon-edit'></span>&nbsp;Edit</a>\");\r\n\r\n\t\t\t\tsb.append(\"\\\",\\\"action2\\\":\\\"\");\r\n\t\t\t\tif (roleRights.getCanDelete()) {\r\n\r\n\t\t\t\t\tif (currdate.equals(invDate)) {\r\n\t\t\t\t\t\tsb.append(\"<a onClick='javascript:doDelete(event, this)' href='/jewels/manufacturing/transactions/makingMt/delete/\")\r\n\t\t\t\t\t\t.append(makingMt.getId()).append(\".html'\");\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsb.append(\"<a onClick='javascript:displayBackDatedMsg(event, this)' href='javascript:void(0)'\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsb.append(\"<a onClick='javascript:displayMsg(event, this)' href='javascript:void(0)'\");\r\n\t\t\t\t}\r\n\t\t\t\tsb.append(\".html' class='btn btn-xs btn-danger triggerRemove\").append(makingMt.getId())\r\n\t\t\t\t\t\t.append(\"'><span class='glyphicon glyphicon-trash'></span>&nbsp;Delete</a>\")\r\n\t\t\t\t\t\t.append(\"\\\"},\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString str = sb.toString();\r\n\t\tstr = (str.indexOf(\"},\") != -1 ? str.substring(0, str.length() - 1) : str);\r\n\t\tstr += \"]}\";\r\n\r\n\t\t\r\n\t\treturn str;\r\n\t}", "@Override\r\n\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\t\tString productNameInput = textField_search_input.getText();\r\n\t\t\t\t\t\t\t\tproductNameInput.trim();\r\n\t\t\t\t\t\t\t\tif(validateEmpty(productNameInput) == false){\r\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\"Search cannot be empty. Please enter a product name, description or notes.\");\t\t\r\n\t\t\t\t\t\t\t\t\tfillTableFindByName(model_search);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if(productNameInput.trim().matches(\"^[-0-9A-Za-z.,'() ]*$\")){\r\n\t\t\t\t\t\t\t\t\tCashier cashierProductByName = new Cashier();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tfor (int i = model_search.getRowCount()-1; i >= 0; --i) {\r\n\t\t\t\t\t\t\t\t\t\tmodel_search.removeRow(i);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tproductByLike = new Vector<Product>();\r\n\t\t\t\t\t\t\t\t\tcashierProductByName.findProductUsingLike(productNameInput.trim(),productByLike);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif(productByLike.size() > 0){\r\n\t\t\t\t\t\t\t\t\t\ttxtpnsearch_2.setText(\"\");\r\n\t\t\t\t\t\t\t\t\t\tfor(int i = 0; i < productByLike.size(); i++){\r\n\t\t\t\t\t\t\t\t\t\t\tif(productBySearch.size() > 0){\r\n\t\t\t\t\t\t\t\t\t\t\t\tfor(int j = 0; j < productBySearch.size(); j++){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(productByLike.get(i).getID() == productBySearch.get(j).getID()){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tproductByLike.get(i).setQuantity(productBySearch.get(j).getQuantity());\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//No match\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\t\t\t\t\t//Printing it in the outside loop, the value doesn't alter here, values that alter will and will print them outside\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\t\t\ttxtpnsearch_2.setText(\"No product was found in inventory.\");\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif(productByLike.size() > 0){\r\n\t\t\t\t\t\t\t\t\t\tfor(int k = 0; k < productByLike.size(); k++){\r\n\t\t\t\t\t\t\t\t\t\t\tmodel_search.addRow(new Object[]{k+1,productByLike.get(k).getName(),productByLike.get(k).getDescription(),productByLike.get(k).getQuantity(),productByLike.get(k).getSalePrice(),productByLike.get(k).getNotes()});\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}", "public void findUsers(String query)\n { \n if(searchtf.getText()!= null){\n ArrayList<StockOutBean> users = ListUsers(query);\n model = new DefaultTableModel() {\n @Override\n public boolean isCellEditable(int rowIndex, int mColIndex) {\n return false;\n }\n };\n \n model.setColumnIdentifiers(new Object[]{\"Invoice No.\", \"ProductId\", \"Barcode\", \"Product Name\", \n \"Product Description\", \"Category\", \"Quantity\", \"SellPrice\", \n \"Total\", \"Date\"});\n \n Object[] row = new Object[11];\n \n for(int i = 0; i < users.size(); i++)\n { \n row[0] = users.get(i).getInvoice();\n row[1] = users.get(i).getProductId();\n row[2] = users.get(i).getBarcode();\n row[3] = users.get(i).getPname();\n row[4] = users.get(i).getPdesc();\n row[5] = users.get(i).getCat();\n row[6] = users.get(i).getQty();\n row[7] = users.get(i).getSellPrice(); \n row[8] = users.get(i).getTotal();\n row[9] = users.get(i).getDate();\n \n model.addRow(row);\n }\n stable.setModel(model);\n \n }\n total.setText(\"TOTAL: \" + model.getRowCount());\n }", "public void performSearch() {\n OASelect<CorpToStore> sel = getCorpToStoreSearch().getSelect();\n sel.setSearchHub(getSearchFromHub());\n sel.setFinder(getFinder());\n getHub().select(sel);\n }", "public List getJpmProductSaleNews(JpmProductSaleNew jpmProductSaleNew);", "@Override\n public void endElement(String s, String s1, String element) throws SAXException {\n if (element.equalsIgnoreCase(\"sale\")) {\n\n //Add SaleSKU to Sale object\n sale.setSaleSKUSet(saleSKUSet);\n\n //check alterStatus and choose list\n\n /*if(alterStatus){\n\n // Add to the list\n salesUpdateData.add(sale);\n\n }else{*/\n\n // Add to the list\n\n //check the sale location null or zero\n try {\n\n if(sale !=null && (sale.getSalLocation() ==null || sale.getSalLocation().longValue() ==0L)){\n\n sale.setSalLocation(userLocation);\n }\n }catch (Exception e){\n\n log.info(\"Exception\"+e);\n\n }\n\n\n salesData.add(sale);\n/*\n }*/\n\n saleSKUSet=null;\n }\n\n\n // Check if the element is starting with the ITEM_CODE\n if ( element.equalsIgnoreCase(\"ITEM_CODE\")) {\n\n // Set the value read\n saleSKU.setSsuProductCode(tmpValue);\n\n }\n\n // Check if the element is starting with the ITEM_QTY\n if ( element.equalsIgnoreCase(\"ITEM_QTY\")) {\n\n // Set the value read\n saleSKU.setSsuQty(Double.parseDouble(tmpValue.equals(\"\")?\"0\":tmpValue));\n\n }\n\n\n // Check if the element is starting with the ITEM_PRICE\n if ( element.equalsIgnoreCase(\"ITEM_PRICE\")) {\n\n // Set the value read\n saleSKU.setSsuPrice(Double.parseDouble(tmpValue.equals(\"\")?\"0\":tmpValue));\n\n }\n\n // Check if the element is starting with the ITEM_DISCOUNT\n if ( element.equalsIgnoreCase(\"ITEM_DISCOUNT\")) {\n\n // Set the value read\n saleSKU.setSsuDiscountPercent(Double.parseDouble(tmpValue.equals(\"\")?\"0\":tmpValue));\n\n }\n\n\n\n\n // If the ending elenment is SALE_ITEM, then we need to add the saleSKU to the list\n if ( element.equalsIgnoreCase(\"SALE_ITEM\")) {\n\n saleSKUSet.add(saleSKU);\n\n saleSKU=null;\n\n }\n\n\n\n }", "private static void writeToSaleItems() throws IOException {\n FileWriter write = new FileWriter(path4, false);\n PrintWriter print_line = new PrintWriter(write);\n ArrayList<Product> stock = Inventory.getStock();\n for (int i = 0; i < stock.size(); i++) {\n Product product = (Product) stock.get(i);\n if (product.price.isOnSale()) {\n int UPC = product.getUpc();\n float price = product.price.getSalePrice();\n String period = product.price.getSalePeriod();\n\n textLine = UPC + \" \" + price + \" \" + period;\n\n print_line.printf(\"%s\" + \"%n\", textLine);\n\n }\n }\n print_line.close();\n\n }", "public void create(Sale sale) {\n sale_dao.create(sale);\n }", "public synchronized static List<Store> loadStores(Connection c, String profil) throws SQLException {\r\n List<Store> filteredShopList = new ArrayList<>();\r\n //The query which selects all the shops\r\n Statement myStmt = c.createStatement();\r\n //The query which selects all the shops matching the profile\r\n ResultSet myRs = myStmt.executeQuery(\"select magasin.* from magasin, magasin_has_type, type where magasin.idMagasin = magasin_has_type.magasin_idMagasin and magasin_has_type.type_idtype = type.idType and type.designation LIKE \" + profil);\r\n //Loop which adds a shop to the list.\r\n while (myRs.next()) {\r\n int id = myRs.getInt(\"idMagasin\");\r\n String designation = myRs.getString(\"designation\");\r\n String description = myRs.getString(\"description\");\r\n int rent = myRs.getInt(\"loyer\");\r\n int surface = myRs.getInt(\"superficie\");\r\n int floor = myRs.getInt(\"niveau\");\r\n String localization = myRs.getString(\"localisation\");\r\n //liste type \r\n Statement myStmt2 = c.createStatement();\r\n //The query which selects all the shops.\r\n ResultSet myRs2 = myStmt2.executeQuery(\"SELECT designation,idType from magasin_has_type,type where magasin_has_type.type_idType=type.idType and magasin_has_type.magasin_idMagasin=\" + id);\r\n List<TypeStore> list = new ArrayList<>();\r\n while (myRs2.next()) {\r\n int idtype = myRs2.getInt(\"idType\");\r\n String designationType = myRs2.getString(\"designation\");\r\n TypeStore T = new TypeStore(idtype, designationType);\r\n list.add(T);\r\n }\r\n Store s = new Store(id, designation, description, rent, surface, floor, localization, list);\r\n filteredShopList.add(s);\r\n }\r\n myStmt.close();\r\n return filteredShopList;\r\n }" ]
[ "0.65368545", "0.6524147", "0.65169966", "0.62561136", "0.61362594", "0.6089008", "0.60483074", "0.60201395", "0.5993272", "0.5982868", "0.59132844", "0.5897396", "0.58879715", "0.5883293", "0.5878297", "0.57895446", "0.5788542", "0.57883793", "0.576359", "0.5761063", "0.57252437", "0.5714819", "0.5706416", "0.5693195", "0.5689818", "0.5678916", "0.5663808", "0.5656704", "0.5647509", "0.564491", "0.56290776", "0.5625933", "0.56196", "0.560146", "0.55929315", "0.5591668", "0.55911916", "0.5566873", "0.5564836", "0.55597955", "0.5549838", "0.55200386", "0.5510591", "0.55099994", "0.5494626", "0.5492471", "0.54888195", "0.548842", "0.5481562", "0.54720294", "0.54650533", "0.5464179", "0.5462336", "0.5448641", "0.5446212", "0.54358417", "0.54328096", "0.5423737", "0.5417806", "0.5413666", "0.54102594", "0.5409655", "0.5406318", "0.53931713", "0.53886324", "0.5379247", "0.5376105", "0.53758687", "0.5373113", "0.53689903", "0.53625894", "0.5361247", "0.5357703", "0.53272694", "0.53262955", "0.53166646", "0.53107226", "0.5307317", "0.5306113", "0.530393", "0.530261", "0.52893925", "0.52885", "0.52764493", "0.527501", "0.5272226", "0.5268671", "0.52566564", "0.523662", "0.52348953", "0.5234846", "0.5232245", "0.5220225", "0.52119225", "0.52096945", "0.5183432", "0.51821035", "0.5175118", "0.51720494", "0.5160672" ]
0.5538666
41
open statistic data for make sale pattern by the analytic system
@FXML void statistics_btn_clicked(MouseEvent event) { switchScenes("/client/boundry/SaleStatisticsInformationForm.fxml", "/client/boundry/MarketingAgentMainCustomer.css"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic List<SalesAnalysis> getSalesAnalysis(Date fromDate, Date toDate) {\r\n\t\t\r\n\t\tList<SalesAnalysis> salesAnalysisDetails=new ArrayList<>();\r\n\t\tSalesAnalysis salesAnalysis=new SalesAnalysis();\r\n\t\t\r\n\t\t//get orders placed in the given period\r\n\t\tList<Order> orderDetails=orderService.getOrdersBetween(fromDate, toDate);\r\n\t\t\r\n\t\tHashMap<String, Double> purchasePriceDetails=new HashMap<>();\r\n\t\tHashMap<String, Double> salesPriceDetails=new HashMap<>();\r\n\t\tint qty=0;\r\n\t\tdouble salesPrice=0;\r\n\t\tdouble purchasePrice=0;\r\n\t\t\r\n\t\t//get total revenue for period\r\n\t\tdouble totalRevenue=getTotalRevenueBetween(fromDate, toDate);\r\n\t\t\r\n\t\t//get best seller details for the products, category-wise(from PRODUCT table)\r\n\t\tList<Object[]> bestSellerDetails=productService.getBestSellerId();\r\n\t\tSystem.out.println(bestSellerDetails);\r\n\t\t\r\n\t\t\r\n\t\t//for each product category, check sales details\r\n\t\tfor(Object[] object:bestSellerDetails)\t{\r\n\t\t\tString productCategory=(String)object[0];\r\n\t\t\tsalesPrice=0;\r\n\t\t\tpurchasePrice=0;\r\n\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\r\n\t\t\t//for each order, check product category and add details to maps\r\n\t\t\tfor(Order order:orderDetails)\t{\r\n\t\t\t\t\r\n\t\t\t\t//get products in this order\r\n\t\t\t\tList<CartProduct> products=order.getCart().getCartProducts();\r\n\t\t\t\t\r\n\t\t\t\t//getting purchase price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tpurchasePrice=purchasePriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(product.getProduct().getQuantity()*product.getProduct().getProductPrice());\r\n\t\t\t\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//getting sales price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tqty=product.getQuantity();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsalesPrice=salesPriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(qty*(100-product.getProduct().getDiscount())*product.getProduct().getProductPrice())/100;\r\n\t\t\t\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\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\r\n\t\t\t//make SalesAnalysis object using obtained data\r\n\t\t\tsalesAnalysis.setProductCategory(productCategory);\r\n\t\t\tsalesAnalysis.setMerchant(merchantService.getMerchantName((Integer)object[1]));\r\n\t\t\tsalesAnalysis.setProductQuantity(purchasePriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setProductSales(salesPriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setSalesPercent((salesAnalysis.getProductSales()*100)/salesAnalysis.getProductQuantity());\r\n\t\t\tsalesAnalysis.setTotalRevenue(totalRevenue);\r\n\t\t\t\r\n\t\t\t//make a list of sales analysis performed\r\n\t\t\tsalesAnalysisDetails.add(salesAnalysis);\r\n\t\t}\r\n\t\t\r\n\t\treturn salesAnalysisDetails;\r\n\t}", "@TaDaMethod(variablesToTrack = {\"ssn\", \"weekWage\", \"workWeeks\", \"ssn2\",\n\t\t\t\"capitalGains\", \"capitalLosses\", \"stockDividends\"}, \n\t\t\tcorrespondingDatabaseAttribute = {\"job.ssn\", \"job.WEEKWAGE\", \"job.WORKWEEKS\", \"investment.ssn\",\n\t\t\t\"investment.CAPITALGAINS\", \"investment.CAPITALLOSSES\", \"investment.STOCKDIVIDENDS\"})\n\tprivate void calculateSlopesAndIntercepts(){\n\t\tHashMap<Integer, Integer> ssnWeekWage = new HashMap<Integer, Integer>();\n\t\tHashMap<Integer, Integer> ssnWorkWeeks = new HashMap<Integer, Integer>();\n\t\tHashMap<Integer, Integer> ssnInvestmentIncome = new HashMap<Integer, Integer>();\n\t\t\n\t\ttry {\n\t\t\tstatement = Factory.getConnection().createStatement();\n\t results = statement.executeQuery(\"SELECT SSN, WEEKWAGE, WORKWEEKS from job\"); \n\t while(results.next()){\n\t \tif(results.getString(\"SSN\") == null || results.getString(\"WEEKWAGE\") == null || results.getString(\"WORKWEEKS\") == null){\n\t \t\tcontinue;\n\t \t}\n\t \tint ssn = results.getInt(\"SSN\");\n\t \tint weekWage = results.getInt(\"WEEKWAGE\");\n\t \tint workWeeks = results.getInt(\"WORKWEEKS\");\n\t \t\n\t \tssnWeekWage.put(ssn, weekWage);\n\t \tssnWorkWeeks.put(ssn, workWeeks);\n\t }\n\t \n\t results = statement.executeQuery(\"SELECT SSN, CAPITALGAINS, CAPITALLOSSES, STOCKDIVIDENDS from investment\");\n\t while(results.next()){\n\t \tif(results.getString(\"SSN\") == null || results.getString(\"CAPITALGAINS\") == null || results.getString(\"CAPITALLOSSES\") == null || results.getString(\"STOCKDIVIDENDS\") == null){\n\t \t\tcontinue;\n\t \t}\n\t \tint ssn2 = results.getInt(\"SSN\");\n\t \tint capitalGains = results.getInt(\"CAPITALGAINS\");\n\t \tint capitalLosses = results.getInt(\"CAPITALLOSSES\");\n\t \tint stockDividends = results.getInt(\"STOCKDIVIDENDS\");\n\t \tint investmentIncome = capitalGains + stockDividends + capitalLosses;\n\t \t\n\t \tssnInvestmentIncome.put(ssn2, investmentIncome);\n\t }\n\t \n\t // Calculate Cofficients\n\t // Build an array list of Work Weeks and an array list of Income;\n\t ArrayList<Integer> workWeeksList = new ArrayList<Integer>();\n\t ArrayList<Integer> incomeList = new ArrayList<Integer>();\n\t ArrayList<Integer> weeklyWageList = new ArrayList<Integer>();\n\t ArrayList<Integer> investmentList = new ArrayList<Integer>();\n\t ArrayList<Integer> incomeListForInvestment = new ArrayList<Integer>();\n\t \n\t for (Iterator<Integer> i = ssnWorkWeeks.keySet().iterator(); i.hasNext();){\n\t \tint SSNkey = (Integer) i.next();\n\t \tif(ssnWorkWeeks.get(SSNkey) != null && ssnWeekWage.get(SSNkey) != null){\n\t\t \tint workWeeks = (Integer) ssnWorkWeeks.get(SSNkey);\n\t\t \tint weekWage = (Integer) ssnWeekWage.get(SSNkey);\n\t\t \tif(workWeeks > 0 && weekWage > 0){\n\t\t \t\tworkWeeksList.add(workWeeks);\n\t\t\t \tincomeList.add(workWeeks * weekWage);\n\t\t\t \tweeklyWageList.add(weekWage);\n\t\t\t \tif(ssnInvestmentIncome.get(SSNkey) != null && ssnInvestmentIncome.get(SSNkey) != null){\n\t\t\t \t\tint investmentIncome = (Integer) ssnInvestmentIncome.get(SSNkey);\n\t\t\t \t\tinvestmentList.add(investmentIncome);\n\t\t\t \t\tincomeListForInvestment.add(workWeeks * weekWage);\n\t\t\t \t}\n\t\t \t}\n\t \t}\n\t }\n\t \n\t // Set the member variable for the cofficients for given Work Weeks find Income\n\t workWeeksFindIncome = new CalculateRegression().calculateRegressionNumbers(workWeeksList,incomeList);\n\t \n\t // Set the member variable for the cofficients for given Weekly Wage find Income\n\t weeklyWageFindIncome = new CalculateRegression().calculateRegressionNumbers(weeklyWageList,incomeList);\n\t \n\t // Set the member variable for the cofficients for given InvestmentIncome find Income \n\t investmentIncomeFindIncome = new CalculateRegression().calculateRegressionNumbers(investmentList,incomeListForInvestment);\n\t \n\t\t} catch (SQLException e) {\n\t while (e != null)\n\t {\n\t System.err.println(\"\\n----- SQLException -----\");\n\t System.err.println(\" SQL State: \" + e.getSQLState());\n\t System.err.println(\" Error Code: \" + e.getErrorCode());\n\t System.err.println(\" Message: \" + e.getMessage());\n\t // for stack traces, refer to derby.log or uncomment this:\n\t //e.printStackTrace(System.err);\n\t e = e.getNextException();\n\t }\n\t\t}\t\n\t\t\n\t}", "private void fnMeanSale() {\n }", "public void obtainDisObsr() {\n\n\t\tBufferedReader reader;\n\t\ttry {\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement rootElement = doc.createElement(\"Observations\");\n\t\t\tdoc.appendChild(rootElement);\n\n\t\t\treader = new BufferedReader(new FileReader(this.dSPath));\n\n\t\t\tString line;\n\t\t\tString id = null;\n\t\t\tString nextID;\n\t\t\tString siteID;\n\t\t\tString siteID_Old = null;\n\t\t\tStringBuilder obsr = null;\n\n\t\t\t/**\n\t\t\t * Data must be sorted by the user ID Data set Arrana=ged as the\n\t\t\t * following ID Time Site ID\n\t\t\t */\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString lineSplit[] = line.split(\",\");\n\n\t\t\t\tnextID = lineSplit[0].trim();\n\n\t\t\t\tif (id == null) {\n\t\t\t\t\tid = nextID;\n\t\t\t\t}\n\t\t\t\tsiteID = lineSplit[2].trim();\n\n\t\t\t\tif (siteID_Old == null) {\n\t\t\t\t\tsiteID_Old = siteID;\n\t\t\t\t} else if (siteID.equals(siteID_Old) && id.equals(nextID)) {\n\t\t\t\t\t// System.out.println(\"same id\");\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (!siteID.equals(siteID_Old)) {\n\t\t\t\t\tsiteID_Old = siteID;\n\t\t\t\t}\n\n\t\t\t\tif (obsr == null) {\n\t\t\t\t\tobsr = new StringBuilder(siteID);\n\t\t\t\t} else if (id.equals(nextID)) {\n\t\t\t\t\tobsr.append(\",\");\n\t\t\t\t\tobsr.append(siteID);\n\t\t\t\t} else {\n\t\t\t\t\t/**\n\t\t\t\t\t * User changed write the XL file Data Change the user ID ,\n\t\t\t\t\t * and record site with the new user\n\t\t\t\t\t */\n\n\t\t\t\t\tElement userElement = doc.createElement(\"user\");\n\t\t\t\t\trootElement.appendChild(userElement);\n\n\t\t\t\t\t// set attribute to staff element\n\t\t\t\t\tAttr attr = doc.createAttribute(\"id\");\n\t\t\t\t\tattr.setValue(id);\n\t\t\t\t\tuserElement.setAttributeNode(attr);\n\n\t\t\t\t\tattr = doc.createAttribute(\"sitesSequanace\");\n\t\t\t\t\tattr.setValue(obsr.toString());\n\t\t\t\t\tuserElement.setAttributeNode(attr);\n\n\t\t\t\t\tid = nextID;\n\t\t\t\t\tobsr = new StringBuilder(siteID);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\n\t\t\tStreamResult result = new StreamResult(new File(this.xmlPath));\n\n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\n\t\t\ttransformer.transform(source, result);\n\n\t\t\tSystem.out.println(\"File saved!\");\n\n\t\t} catch (FileNotFoundException ex) {\n\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t} catch (IOException ex) {\n\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t} catch (ParserConfigurationException | TransformerException pce) {\n\t\t}\n\t}", "public void displayReport() {\r\n\t\tint ticketsSold = 0;\r\n\t\tint aTicketsSold = 0;\r\n\t\tint cTicketsSold = 0;\r\n\t\tint sTicketsSold = 0;\r\n\t\tdouble totalSales = 0;\r\n\t\t\r\n\t\tTheaterSeat current = getFirst();\r\n\t\tif (current.getTicketType() == 'A') {\r\n\t\t\taTicketsSold++;\r\n\t\t\tticketsSold++;\r\n\t\t\ttotalSales += 10;\r\n\t\t}\r\n\t\tif (current.getTicketType() == 'C') {\r\n\t\t\tcTicketsSold++;\r\n\t\t\tticketsSold++;\r\n\t\t\ttotalSales += 5;\r\n\t\t}\r\n\t\tif (current.getTicketType() == 'S') {\r\n\t\t\tsTicketsSold++;\r\n\t\t\tticketsSold++;\r\n\t\t\ttotalSales += 7.5;\r\n\t\t}\r\n\t\tfor (int i=0; i<numRows - 1; i++) {\r\n\t\t\t\r\n\t\t\tfor (int j=1; j<numCols; j++) {\r\n\t\t\t\tcurrent = current.getRight();\r\n\t\t\t\tif (current.getTicketType() == 'A') {\r\n\t\t\t\t\taTicketsSold++;\r\n\t\t\t\t\tticketsSold++;\r\n\t\t\t\t\ttotalSales += 10;\r\n\t\t\t\t}\r\n\t\t\t\tif (current.getTicketType() == 'C') {\r\n\t\t\t\t\tcTicketsSold++;\r\n\t\t\t\t\tticketsSold++;\r\n\t\t\t\t\ttotalSales += 5;\r\n\t\t\t\t}\r\n\t\t\t\tif (current.getTicketType() == 'S') {\r\n\t\t\t\t\tsTicketsSold++;\r\n\t\t\t\t\tticketsSold++;\r\n\t\t\t\t\ttotalSales += 7.5;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int j=0; j<numCols - 1; j++) {\r\n\t\t\t\tcurrent = current.getLeft();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent = current.getDown();\r\n\t\t\tif (current.getTicketType() == 'A') {\r\n\t\t\t\taTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 10;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'C') {\r\n\t\t\t\tcTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 5;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'S') {\r\n\t\t\t\tsTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 7.5;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int j=1; j<numCols; j++) {\r\n\t\t\tcurrent = current.getRight();\r\n\t\t\tif (current.getTicketType() == 'A') {\r\n\t\t\t\taTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 10;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'C') {\r\n\t\t\t\tcTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 5;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'S') {\r\n\t\t\t\tsTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 7.5;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Total seats in theater: \" + numRows*numCols);\r\n\t\tSystem.out.println(\"Total tickets sold: \" + ticketsSold);\r\n\t\tSystem.out.println(\"Adult tickets sold: \" + aTicketsSold);\r\n\t\tSystem.out.println(\"Child tickets sold: \" + cTicketsSold);\r\n\t\tSystem.out.println(\"Senior tickets sold: \" + sTicketsSold);\r\n\t\tSystem.out.println(\"Total ticket sales: $\" + String.format(\"%.2f\", totalSales));\r\n\t}", "private void fillObservationsData() {\n\n // retrieve all oindex records\n// List<Oindex> oindexList = this.servicioApp.getMeasurementOindexListByStudy(workbookStudy.getStudy().getStudyid(), effectid);\n\n Integer studyId = this.workbookStudy.getStudy().getStudyid();\n\n int variateCount = this.workbookStudy.getVariates().size();\n\n List<Measurement> measurementList = new ArrayList<Measurement>();\n //todo quitar no se usa\n// int observationsCount = this.servicioApp.getObservationsCount(studyId);\n log.info(\"Getting Data Trial ...\");\n List<Object> dataList = this.servicioApp.getObservationsDataMeasurementEffect(studyId, effectid);\n log.info(\"Getting Data Trial Done...\");\n \n log.info(\"Getting List of Obsunit ...\");\n List<Obsunit> obsunits = this.servicioApp.getObsunitListByEffectid(studyId, effectid);\n log.info(\"Getting List of Obsunit...\");\n for (Obsunit obsUnit : obsunits){\n Measurement measurement = new Measurement();\n\n measurement.initMeasurementData(variateCount);\n\n assignMeasurementData(measurement, obsUnit, dataList);\n\n measurementList.add(measurement);\n }\n\n\n workbookStudy.setMeasurements(measurementList);\n\n List<String> factorsReturn = getFactoresReturnList();\n log.info(\"Getting Trial Randomization ...\");\n ResultSet rst = servicioApp.getTrialRandomization(studyId, 0, getFactoresKeyList(), factorsReturn, factorTrial.getFname());\n log.info(\"Getting Trial Randomization done\");\n fillFactorLabelData(rst, factorsReturn);\n }", "private static void analyse1() {\n\t\tList<String> twoYearIncomeInRateList2 = getTwoYearIncomeInRateList(BasicAnalyse.stockBasicMap.keySet(), 0, 10000, \"2016-4\", \"2015-4\");\r\n\t\tList<String> twoYearIncomeInRateList = getTwoYearIncomeInRateList(twoYearIncomeInRateList2, 0, 10000, \"2017-2\", \"2016-2\");\r\n\t\tList<String> twoYearProfitInRateList = getTwoYearProfitInRateList(twoYearIncomeInRateList, 0, 10000, \"2017-2\", \"2016-2\");\r\n\t\tList<String> twoSeasonIncomeInRateList = getTwoSeasonIncomeInRateList(twoYearProfitInRateList, 0, 10000, \"2017-2\", \"2017-1\");\r\n\t\tList<String> twoSeasonProfitInRateList = getTwoSeasonProfitInRateList(twoSeasonIncomeInRateList, 0, 10000, \"2017-2\", \"2017-1\");\r\n\t\tHashMap<String, List<HistoryDomain>> codeHisMap = HistoryAnalyse.getCodeHisMap(HistoryAnalyse.historyMap, twoSeasonProfitInRateList);\r\n\t\tHashMap<String, List<HistoryDomain>> orderDateMap = HistoryAnalyse.getOrderDateMap(codeHisMap);\r\n\t\tHashMap<String, String> dieTingTimeMap = PriceAnalyse.getDieTingLastTimeMap(orderDateMap, 5, -100, -20);\r\n\t\tHashMap<String, String> endDateMap = AnalyseUtil.getCodeDateMap(orderDateMap.keySet(), \"2017-10-13\");\r\n\t\tHashMap<String, List<HistoryDomain>> orderDateDTMap = HistoryAnalyse.getCodeHisMap(orderDateMap, dieTingTimeMap.keySet());\r\n\t\tHashMap<String, List<HistoryDomain>> afterDieTingHisMap = HistoryAnalyse.getHisMapByStartAndEndDateMap(orderDateDTMap, dieTingTimeMap, endDateMap);\r\n\t\tHashMap<String, Double> highestFlowInRate = PriceAnalyse.getHighestFlowInRate(afterDieTingHisMap, -2000, 20);\r\n\t\tHashMap<String, List<String>> conceptListMap = ConceptAnalyse.getConceptListMap(highestFlowInRate.keySet());\r\n\r\n\t\t\r\n\t\tSystem.out.println(conceptListMap);\r\n\t}", "@Override\n \tpublic double[] getdata(List<Pair<String, String>> alin, MoleculeManager manager, GapManager gap) {\n \n \n \tdouble S_max;\n \tdouble[][] p;\n \tdouble[] data;\n \tint N;\n \tint Len;\n \tint n_seqs=0;\n \n \tn_seqs = alin.size();\n \t\n \tLen = alin.get(0).getSecond().length();\n \tN = manager.alphabetSize();\n \t\n \tp = new double[Len][N];\n \t\n \tS_max = Math.log(N)/Math.log(2);\n \t\n \tp = getFreq(p,alin,n_seqs, manager.alphabet()); \n \n \tdata = new double[Len];\n \t\n \tfor (int i = 0; i < data.length; i++) {\n \t\t\n \t\tdouble s_obs=0;\n \t\t\n \t\tdouble freqSum = 0; \n \n \t\tfor (int j = 0; j < N; j++) {\n \t\t\t\n \t\t\tif (p[i][j]!= 0 ) { \n \t\t\t\t\n \t\t\t\ts_obs = s_obs + p[i][j] * Math.log(p[i][j]) / Math.log(2);\n \t\t\t\t\n \t\t\t\tfreqSum = gap.attempToSumFreq(freqSum, p[i][j]) ;\n \t\t\t\t\n \t\t\t}\n \t\t}\n \t\t\n \t\tdata[i] = (S_max + s_obs) * freqSum / S_max;\n \t}\n \n \treturn data;\n }", "public void createOscilloscopeData() {\n this.rmsSum = 0;\n int reactorFrequency = getReactorFrequency().intValue();\n int reactorAmplitude = getReactorAmplitude().intValue();\n double reactorPhase = getReactorPhase().doubleValue();\n int controlFrequency = getControlFrequency().intValue();\n int controlAmplitude = getControlAmplitude().intValue();\n double controlPhase = getControlPhase().doubleValue();\n XYChart.Series<Number, Number> dataSeriesOutput = new XYChart.Series<>();\n for (int i = 0; i < 40; i++) {\n createOscilloscopeDatapoint(dataSeriesOutput, reactorFrequency, reactorAmplitude, reactorPhase, \n controlFrequency, controlAmplitude, controlPhase, i);\n }\n dataSeriesOutput.setName(\"Reactor\" + number + \"OutputData\");\n this.outputData.addAll(dataSeriesOutput/*, dataSeriesReactor, dataSeriesControl */);\n \n \n if (this.online == true) {\n this.rms = Math.sqrt(this.rmsSum / 40);\n setOutputPower(100 - (this.rms));\n }\n }", "private void GetDetailAnalysisText() {\n\t\tMap<Integer, ArrayList<ReportPluDayComboModifier>> combMap = getCombItemMap(this.comb);\n\n\t\tComparatorPluDayItem comparatorPluDayItem = new ComparatorPluDayItem();\n\t\tCollections.sort(reportPluDayItems, comparatorPluDayItem);\n//\t\tList<ReportPluDayItem> cop = new ArrayList<ReportPluDayItem>();\n\t\tint allQty = 0;\n\t\tBigDecimal allAmount = BH.getBD(ParamConst.DOUBLE_ZERO);\n//\t\t\tboolean showMainCategory = true;\n//\t\t\tint mainCategoryId = 0;\n\t\tboolean lastLinePrinted = false;\n//\t\tBigDecimal categoryAmount = BH.getBD(ParamConst.DOUBLE_ZERO);\n//\t\tString name = \"\";\n//\t\tint id = 0;\n\t\tMap<Integer, ReportPluDayItem> map = new HashMap<Integer, ReportPluDayItem>();\n\t\tfor (int j = 0; j < reportPluDayItems.size(); j++) {\n\n\t\t\tReportPluDayItem reportPluDayItem = reportPluDayItems.get(j);\n\t\t\t//ObjectFactory.getInstance().getReportPluDayItem(reportPluDayItem);\n\t\t\tif(map.containsKey(reportPluDayItem.getItemMainCategoryId().intValue())){\n\t\t\t\tReportPluDayItem amountReportPluDayItem = map.get(reportPluDayItem.getItemMainCategoryId().intValue());\n\t\t\t\tBigDecimal amount = BH.add(BH.getBD(amountReportPluDayItem.getItemAmount()), BH.getBD(reportPluDayItem.getItemAmount()), false);\n\t\t\t\tamountReportPluDayItem.setItemAmount(amount.toString());\n\t\t\t}else{\n\t\t\t\tReportPluDayItem rr = new ReportPluDayItem();\n\t\t\t\trr.setItemMainCategoryId(reportPluDayItem.getItemMainCategoryId());\n\t\t\t\trr.setItemMainCategoryName(reportPluDayItem.getItemMainCategoryName());\n\t\t\t\trr.setItemAmount(BH.formatMoney(reportPluDayItem.getItemAmount()));\n\t\t\t\tmap.put(reportPluDayItem.getItemMainCategoryId().intValue(), rr);\n\t\t\t}\n//\t\t\t\tif(mainCategoryId == 0 || mainCategoryId == reportPluDayItem.getItemMainCategoryId().intValue()){\n//\t\t\t\t\tcategoryAmount = BH.add(categoryAmount,\n//\t\t\t\t\t\t\tBH.getBD(reportPluDayItem.getItemAmount()), true);\n//\t\t\t\t\tname = reportPluDayItem.getItemMainCategoryName();\n//\t\t\t\t\tid = reportPluDayItem.getItemMainCategoryId().intValue();\n//\n//\t\t\t\t\tif(mainCategoryId == 0)\n//\t\t\t\t\t\tmainCategoryId = id;\n//\n//\t\t\t\t\tif( j == reportPluDayItems.size() - 1){\n//\t\t\t\t\t\tReportPluDayItem rr = new ReportPluDayItem();\n//\t\t\t\t\t\trr.setItemMainCategoryId(id);\n//\t\t\t\t\t\trr.setItemMainCategoryName(name);\n//\t\t\t\t\t\trr.setItemAmount(categoryAmount.toString());\n//\t\t\t\t\t\tcop.add(rr);\n//\t\t\t\t\t}\n//\t\t\t\t}else{\n//\t\t\t\t\tReportPluDayItem rr = new ReportPluDayItem();\n//\t\t\t\t\trr.setItemMainCategoryId(id);\n//\t\t\t\t\trr.setItemMainCategoryName(name);\n//\t\t\t\t\trr.setItemAmount(categoryAmount.toString());\n//\t\t\t\t\tcop.add(rr);\n//\t\t\t\t\tname = reportPluDayItem.getItemMainCategoryName();\n//\t\t\t\t\tid = reportPluDayItem.getItemMainCategoryId().intValue();\n//\t\t\t\t\tmainCategoryId = id;\n//\t\t\t\t\tcategoryAmount = BH.getBD(ParamConst.DOUBLE_ZERO);\n//\t\t\t\t\tcategoryAmount = BH.add(categoryAmount,\n//\t\t\t\t\t\t\tBH.getBD(reportPluDayItem.getItemAmount()), true);\n//\n//\t\t\t\t}\n\t\t}\n\n\t\tIterator<Map.Entry<Integer, ReportPluDayItem>> entries = map.entrySet().iterator();\n\t\tboolean isFirst = true;\n\t\twhile (entries.hasNext()){\n\t\t\tMap.Entry<Integer, ReportPluDayItem> entry = entries.next();\n\t\t\tif(!isFirst){\n\t\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\t}\n\t\t\tisFirst = false;\n\t\t\tReportPluDayItem amontReportPluDayItem = entry.getValue();\n\t\t\tthis.AddItem(amontReportPluDayItem.getItemMainCategoryName(), \"\", \"\", BH.formatMoney(amontReportPluDayItem.getItemAmount()).toString(), 1);\n\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\tfor (int j = 0; j < reportPluDayItems.size(); j++) {\n\n\t\t\t\tReportPluDayItem reportPluDayItem = reportPluDayItems.get(j);\n\t\t\t\tif (amontReportPluDayItem.getItemMainCategoryId().intValue() == reportPluDayItem.getItemMainCategoryId().intValue()) {\n\t\t\t\t\t// Print comb modifier\n\t\t\t\t\tint itmId = reportPluDayItem.getItemDetailId().intValue();\n\t\t\t\t\tArrayList<ReportPluDayComboModifier> comItems = combMap.get(itmId);\n\t\t\t\t\tif (comItems != null && comItems.size() > 0) {\n\n\t\t\t\t\t\tint mm = 0;\n\t\t\t\t\t\tthis.AddItem(\" \"+reportPluDayItem.getItemName(), BH.formatMoney(reportPluDayItem.getItemPrice()),\n\t\t\t\t\t\t\t\treportPluDayItem.getItemCount().toString(),\n\t\t\t\t\t\t\t\tBH.formatThree(reportPluDayItem.getItemAmount()), 1);\n\t\t\t\t\t\tlastLinePrinted = false;\n\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\t\t\t\tfor (mm = 0; mm < comItems.size(); mm++) {\n\t\t\t\t\t\t\tReportPluDayComboModifier pluModifier = comItems.get(mm);\n\t\t\t\t\t\t\tint count = pluModifier.getModifierCount().intValue() - pluModifier.getVoidModifierCount().intValue() - pluModifier.getBillVoidCount().intValue();\n\t\t\t\t\t\t\tif (count > 0) {\n\t\t\t\t\t\t\t\tBigDecimal modifierAmount = BH.mul(BH.getBD(1.00), BH.getBD(pluModifier.getModifierPrice()), true);\n\t\t\t\t\t\t\t\tBigDecimal modifierPrice = BH.mul(BH.getBD(1.00), BH.getBD(pluModifier.getModifierItemPrice()), true);\n\t\t\t\t\t\t\t\tthis.AddItem(\" (\" + pluModifier.getModifierName() + \")\",\n\t\t\t\t\t\t\t\t\t\t\"(\" + BH.formatThree(modifierPrice.toString()) + \")\", \"(\" + String.valueOf(count) + \")\", \"(\" + BH.formatThree(modifierAmount.toString())+ \")\", 1);\n\t\t\t\t\t\t\t\tlastLinePrinted = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mm == comItems.size() && mm > 0) {\n\t\t\t\t\t\t\tif (!lastLinePrinted)\n\t\t\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\t\t\t\t\tlastLinePrinted = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tthis.AddItem(\" \"+reportPluDayItem.getItemName(), BH.formatMoney(reportPluDayItem.getItemPrice()),\n\t\t\t\t\t\t\t\treportPluDayItem.getItemCount().toString(), \"\" + BH.formatMoney(reportPluDayItem.getItemAmount()), 1);\n\t\t\t\t\t\tlastLinePrinted = false;\n\t\t\t\t\t}\n\t\t\t\t\t//END Comb modifier print\n\t\t\t\t\tallQty += reportPluDayItem.getItemCount();\n\t\t\t\t\tallAmount = BH.add(allAmount,\n\t\t\t\t\t\t\tBH.getBD(reportPluDayItem.getItemAmount()), true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n//\t\tfor(ReportPluDayItem category : cop) {\n//\t\t\t\tif(cop.indexOf(category) != 0){\n//\t\t\t\t\tthis.addHortionalLine(this.charSize);\n//\t\t\t\t}\n//\t\t\t\tthis.AddItem(category.getItemMainCategoryName(), \"\", \"\", category.getItemAmount(), 1);\n//\t\t\t\tthis.addHortionalLine(this.charSize);\n//\t\t\t\tfor (int j = 0; j < reportPluDayItems.size(); j++) {\n//\n//\t\t\t\t\tReportPluDayItem reportPluDayItem = reportPluDayItems.get(j);\n////\t\t\t\t\tif (mainCategoryId != reportPluDayItem.getItemMainCategoryId().intValue()) {\n////\t\t\t\t\t\tif (mainCategoryId != 0) {\n////\t\t\t\t\t\t\tif (!lastLinePrinted)\n////\t\t\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n////\t\t\t\t\t\t\tlastLinePrinted = true;\n////\t\t\t\t\t\t}\n////\t\t\t\t\t\tmainCategoryId = reportPluDayItem.getItemMainCategoryId().intValue();\n////\t\t\t\t\t\tshowMainCategory = true;\n////\t\t\t\t\t}\n////\t\t\t\t\tif (showMainCategory) {\n////\t\t\t\t\t\tthis.AddItem(reportPluDayItem.getItemMainCategoryName(), \"\", \"\", \"\", 1);\n////\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n////\t\t\t\t\t\tshowMainCategory = false;\n////\t\t\t\t\t\tlastLinePrinted = true;\n////\t\t\t\t\t}\n//\t\t\t\t\tif (category.getItemMainCategoryId().intValue() == reportPluDayItem.getItemMainCategoryId().intValue()) {\n//\t\t\t\t\t\t//Bob: Print comb modifier\n//\t\t\t\t\t\tint itmId = reportPluDayItem.getItemDetailId().intValue();\n//\t\t\t\t\t\tArrayList<ReportPluDayComboModifier> comItems = combMap.get(itmId);\n//\t\t\t\t\t\tif (comItems != null && comItems.size() > 0) {\n//\n//\t\t\t\t\t\t\tint mm = 0;\n//\t\t\t\t\t\t\tthis.AddItem(\" \"+reportPluDayItem.getItemName(), reportPluDayItem.getItemPrice(),\n//\t\t\t\t\t\t\t\t\treportPluDayItem.getItemCount().toString(),\n//\t\t\t\t\t\t\t\t\treportPluDayItem.getItemAmount(), 1);\n//\t\t\t\t\t\t\tlastLinePrinted = false;\n//\t\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n//\t\t\t\t\t\t\tfor (mm = 0; mm < comItems.size(); mm++) {\n//\t\t\t\t\t\t\t\tReportPluDayComboModifier pluModifier = comItems.get(mm);\n//\t\t\t\t\t\t\t\tint count = pluModifier.getModifierCount().intValue() - pluModifier.getVoidModifierCount().intValue() - pluModifier.getBillVoidCount().intValue();\n//\t\t\t\t\t\t\t\tif (count > 0) {\n//\t\t\t\t\t\t\t\t\tBigDecimal modifierAmount = BH.mul(BH.getBD(1.00), BH.getBD(pluModifier.getModifierPrice()), true);\n//\t\t\t\t\t\t\t\t\tBigDecimal modifierPrice = BH.mul(BH.getBD(1.00), BH.getBD(pluModifier.getModifierItemPrice()), true);\n//\t\t\t\t\t\t\t\t\tthis.AddItem(\" (\" + pluModifier.getModifierName() + \")\",\n//\t\t\t\t\t\t\t\t\t\t\t\"(\" + modifierPrice.toString() + \")\", \"(\" + String.valueOf(count) + \")\", \"(\" + modifierAmount.toString() + \")\", 1);\n//\t\t\t\t\t\t\t\t\tlastLinePrinted = false;\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\tif (mm == comItems.size() && mm > 0) {\n//\t\t\t\t\t\t\t\tif (!lastLinePrinted)\n//\t\t\t\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n//\t\t\t\t\t\t\t\tlastLinePrinted = true;\n//\t\t\t\t\t\t\t}\n//\n//\t\t\t\t\t\t} else {\n//\n//\t\t\t\t\t\t\tthis.AddItem(\" \"+reportPluDayItem.getItemName(), reportPluDayItem.getItemPrice(),\n//\t\t\t\t\t\t\t\t\treportPluDayItem.getItemCount().toString(), \"\" + reportPluDayItem.getItemAmount(), 1);\n//\t\t\t\t\t\t\tlastLinePrinted = false;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t//END Comb modifier print\n//\t\t\t\t\t\tallQty += reportPluDayItem.getItemCount();\n//\t\t\t\t\t\tallAmount = BH.add(allAmount,\n//\t\t\t\t\t\t\t\tBH.getBD(reportPluDayItem.getItemAmount()), true);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t}\n\t\tif (allQty != 0) {\n\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\tthis.AddItem(PrintService.instance.getResources().getString(R.string.total), \"\", allQty + \"\", BH.formatMoney(allAmount.toString()), 1);\n\t\t}\n\n\n\t}", "private void buildDaily(SummaryProvider.Summary summary, int log_id, String suffix,\n long midnight, int dataIndex, Bundle bundle) {\n ArrayList<DetailProvider.Detail> details = detailDB.getDetails(context, log_id);\n double[] raw_xdata = new double[details.size() + 2];\n double[] raw_ydata = new double[details.size() + 2];\n\n // set the first x and y values\n int xstart = bundle.getInt(\"xorigin\" + suffix, 0);\n raw_xdata[0] = xstart - 3600;\n switch (dataIndex) {\n case Constants.DATA_WATTHOURS :\n raw_ydata[0] = 0.0f; break;\n case Constants.DATA_WATTSNOW:\n raw_ydata[0] = 0.0f; break;\n case Constants.DATA_TEMPERATURE:\n raw_ydata[0] = details.get(0).getTemperature() - 273; break;\n case Constants.DATA_WIND:\n raw_ydata[0] = details.get(0).getWind_speed(); break;\n case Constants.DATA_CLOUDS:\n raw_ydata[0] = UtilsMisc.getValueinRange(details.get(0).getClouds(), 1.0f, 100.0f); break;\n default :\n break;\n }\n\n // set the y values from the detail records\n for (int i = 1; i < details.size() + 1; i++) {\n DetailProvider.Detail detail = details.get(i-1);\n raw_xdata[i] = UtilsDate.getTimeSeconds((detail.getTimestamp() * 1000) - midnight);\n switch (dataIndex) {\n case Constants.DATA_WATTHOURS :\n raw_ydata[i] = detail.getWatts_generated(); break;\n case Constants.DATA_WATTSNOW:\n raw_ydata[i] = detail.getWatts_now();break;\n case Constants.DATA_TEMPERATURE:\n raw_ydata[i] = detail.getTemperature() - 273; break;\n case Constants.DATA_WIND:\n raw_ydata[i] = detail.getWind_speed(); break;\n case Constants.DATA_CLOUDS:\n raw_ydata[i] = UtilsMisc.getValueinRange(detail.getClouds(), 1.0f, 100.0f); break;\n default :\n break;\n }\n }\n\n // set the last y value\n int xend = UtilsDate.getTimeSeconds(details.get(details.size()-1).getTimestamp()* 1000 - midnight);\n raw_xdata[details.size()+1] = xend + 1;\n switch (dataIndex) {\n case Constants.DATA_WATTHOURS :\n raw_ydata[details.size() + 1] = summary.getGenerated_watts(); break;\n case Constants.DATA_WATTSNOW:\n raw_ydata[details.size() + 1] = 0.0f; break;\n case Constants.DATA_TEMPERATURE:\n raw_ydata[details.size() + 1] = details.get(details.size()-1).getTemperature() - 273; break;\n case Constants.DATA_WIND:\n raw_ydata[details.size() + 1] = details.get(details.size()-1).getWind_speed(); break;\n case Constants.DATA_CLOUDS:\n raw_ydata[details.size() + 1] =\n UtilsMisc.getValueinRange(details.get(details.size()-1).getClouds(), 1.0f, 100.0f); break;\n default :\n break;\n }\n\n LinearInterpolation lp = new LinearInterpolation(raw_xdata, raw_ydata);\n int time = xstart;\n ArrayList<Integer> xList = new ArrayList<>();\n ArrayList<Float> yList = new ArrayList<>();\n while (time < xend) {\n float yval = (float) lp.interpolate(time);\n xList.add(time);\n yList.add(yval);\n time += Integer.parseInt(sharedPreferences.getString(Constants.MONITORING_FREQUENCY, \"5\")) * 60; // seconds\n }\n\n int[] xdata = Ints.toArray(xList);\n float[] ydata = Floats.toArray(yList);\n bundle.putIntArray(\"xdata\" + suffix, xdata);\n bundle.putFloatArray(\"ydata\" + suffix, ydata);\n\n switch (dataIndex) {\n case Constants.DATA_TEMPERATURE:\n case Constants.DATA_WIND:\n case Constants.DATA_CLOUDS:\n smooth_plot(bundle, true, suffix);\n }\n }", "static void createDataForGraph() {\n double x = 2;\n String fileName = \"./lab1part2docs/dataRec.csv\";\n createFile(fileName);\n writeToFile(\"k,halfCounter,oneCounter,x=\" + x + \"\\n\", fileName);\n for (int k = 1; k <= 10000; k++) {\n Raise.runBoth(x, k);\n writeToFile(k + \",\" + Raise.recHalfCounter + \",\" + Raise.recOneCounter + '\\n', fileName);\n Raise.recHalfCounter = 0;\n Raise.recOneCounter = 0;\n }\n System.out.println(\"Finished\");\n }", "private static void statACricri() {\n \tSession session = new Session();\n \tNSTimestamp dateRef = session.debutAnnee();\n \tNSArray listAffAnn = EOAffectationAnnuelle.findAffectationsAnnuelleInContext(session.ec(), null, null, dateRef);\n \tLRLog.log(\">> listAffAnn=\"+listAffAnn.count() + \" au \" + DateCtrlConges.dateToString(dateRef));\n \tlistAffAnn = LRSort.sortedArray(listAffAnn, \n \t\t\tEOAffectationAnnuelle.INDIVIDU_KEY + \".\" + EOIndividu.NOM_KEY);\n \t\n \tEOEditingContext ec = new EOEditingContext();\n \tCngUserInfo ui = new CngUserInfo(new CngDroitBus(ec), new CngPreferenceBus(ec), ec, new Integer(3065));\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"service\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"agent\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"contractuel\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"travaillees\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"conges\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"dues\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"restant\");\n \tsb.append(ConstsPrint.CSV_NEW_LINE);\n \t\n \n \tfor (int i = 0; i < listAffAnn.count(); i++) {\n \t\tEOAffectationAnnuelle itemAffAnn = (EOAffectationAnnuelle) listAffAnn.objectAtIndex(i);\n \t\t//\n \t\tEOEditingContext edc = new EOEditingContext();\n \t\t//\n \t\tNSArray array = EOAffectationAnnuelle.findSortedAffectationsAnnuellesForOidsInContext(\n \t\t\t\tedc, new NSArray(itemAffAnn.oid()));\n \t\t// charger le planning pour forcer le calcul\n \t\tPlanning p = Planning.newPlanning((EOAffectationAnnuelle) array.objectAtIndex(0), ui, dateRef);\n \t\t// quel les contractuels\n \t\t//if (p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())) {\n \t\ttry {p.setType(\"R\");\n \t\tEOCalculAffectationAnnuelle calcul = p.affectationAnnuelle().calculAffAnn(\"R\");\n \t\tint minutesTravaillees3112 = calcul.minutesTravaillees3112().intValue();\n \t\tint minutesConges3112 = calcul.minutesConges3112().intValue();\n \t\t\n \t\t// calcul des minutes dues\n \t\tint minutesDues3112 = /*0*/ 514*60;\n \t\t/*\tNSArray periodes = p.affectationAnnuelle().periodes();\n \t\tfor (int j=0; j<periodes.count(); j++) {\n \t\t\tEOPeriodeAffectationAnnuelle periode = (EOPeriodeAffectationAnnuelle) periodes.objectAtIndex(j);\n \t\tminutesDues3112 += periode.valeurPonderee(p.affectationAnnuelle().minutesDues(), septembre01, decembre31);\n \t\t}*/\n \t\tsb.append(p.affectationAnnuelle().structure().libelleCourt()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().nomComplet()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())?\"O\":\"N\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesConges3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesDues3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112 - minutesConges3112 - minutesDues3112)).append(ConstsPrint.CSV_NEW_LINE);\n \t\tLRLog.log((i+1)+\"/\"+listAffAnn.count() + \" (\" + p.affectationAnnuelle().individu().nomComplet() + \")\");\n \t\t} catch (Throwable e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tedc.dispose();\n \t\t//}\n \t}\n \t\n\t\tString fileName = \"/tmp/stat_000_\"+listAffAnn.count()+\".csv\";\n \ttry {\n\t\t\tBufferedWriter fichier = new BufferedWriter(new FileWriter(fileName));\n\t\t\tfichier.write(sb.toString());\n\t\t\tfichier.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tLRLog.log(\"writing \" + fileName);\n\t\t}\n }", "private void analyze() {\n\t\tdouble org = 0;\n\t\tdouble avgIndPerDoc = 0;\n\t\tdouble avgTotalPerDoc = 0;\n\n\t\tfor (Instance instance : instanceProvider.getInstances()) {\n\n\t\t\tint g = 0;\n\t\t\tSet<AbstractAnnotation> orgM = new HashSet<>();\n\n//\t\t\torgM.addAll(instance.getGoldAnnotations().getAnnotations());\n//\t\t\tg += instance.getGoldAnnotations().getAnnotations().size();\n\n\t\t\tfor (AbstractAnnotation instance2 : instance.getGoldAnnotations().getAnnotations()) {\n\n\t\t\t\tResult r = new Result(instance2);\n\n\t\t\t\t{\n////\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(r.getTrend());\n//\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(r.getInvestigationMethod());\n////\t\t\t\t\tList<AbstractAnnotation> aa = new ArrayList<>(\n////\t\t\t\t\t\t\tr.getDefinedExperimentalGroups().stream().map(a -> a.get()).collect(Collectors.toList()));\n//\n//\t\t\t\t\torgM.addAll(aa);\n//\t\t\t\t\tg += aa.size();\n\t\t\t\t}\n\n\t\t\t\t{\n\t\t\t\t\t/**\n\t\t\t\t\t * props of exp\n\t\t\t\t\t */\n\t\t\t\t\tfor (DefinedExperimentalGroup instance3 : r.getDefinedExperimentalGroups()) {\n\n//\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(instance3.getOrganismModel());\n//\t\t\t\t\tList<AbstractAnnotation> aa = new ArrayList<>(instance3.getTreatments());\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(instance3.getInjury());\n\n\t\t\t\t\t\tList<AbstractAnnotation> ab = Arrays.asList(instance3.getInjury());\n\n\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n\t\t\t\t\t\t\t\t.filter(i -> i != null).flatMap(i -> i.getDeliveryMethods().stream())\n\t\t\t\t\t\t\t\t.filter(i -> i != null).collect(Collectors.toList());\n\n\t\t\t\t\t\taa.addAll(instance3.getTreatments().stream().filter(i -> i != null)\n\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Treatment(et))\n\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getDeliveryMethod()).filter(i -> i != null)\n\t\t\t\t\t\t\t\t.collect(Collectors.toList()));\n\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).flatMap(i -> i.getAnaesthetics().stream())\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).collect(Collectors.toList());\n\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getInjuryDevice()).filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\t\t\t// List<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getInjuryLocation()).filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\t\t\torgM.addAll(aa);\n\t\t\t\t\t\tg += aa.size();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tavgIndPerDoc += orgM.size();\n\t\t\tavgTotalPerDoc += g;\n\n\t\t\torg += ((double) orgM.size()) / (g == 0 ? 1 : g);\n//\t\t\tSystem.out.println(((double) orgM.size()) / g);\n\n\t\t}\n\t\tSystem.out.println(\"avgTotalPerDoc = \" + avgTotalPerDoc / instanceProvider.getInstances().size());\n\t\tSystem.out.println(\"avgIndPerDoc = \" + avgIndPerDoc / instanceProvider.getInstances().size());\n\t\tSystem.out.println(\"org = \" + org);\n\t\tSystem.out.println(\"avg. org = \" + (org / instanceProvider.getInstances().size()));\n\t\tSystem.out.println(new DecimalFormat(\"0.00\").format(avgTotalPerDoc / instanceProvider.getInstances().size())\n\t\t\t\t+ \" & \" + new DecimalFormat(\"0.00\").format(avgIndPerDoc / instanceProvider.getInstances().size())\n\t\t\t\t+ \" & \" + new DecimalFormat(\"0.00\").format(org / instanceProvider.getInstances().size()));\n\t\tSystem.exit(1);\n\n\t\tStats.countVariables(0, instanceProvider.getInstances());\n\n\t\tint count = 0;\n\t\tfor (SlotType slotType : EntityType.get(\"Result\").getSlots()) {\n\n\t\t\tif (slotType.isExcluded())\n\t\t\t\tcontinue;\n\t\t\tcount++;\n\t\t\tSystem.out.println(slotType.name);\n\n\t\t}\n\t\tSystem.out.println(count);\n\t\tSystem.exit(1);\n\t}", "public HashMap<String, ArrayList[]> determineSale() {\n HashMap<String, ArrayList[]> ordersMap = new HashMap<>();\n ordersMap.put(\"ms\", new ArrayList<Integer>[2]);\n ordersMap.put(\"gs\", new ArrayList<Integer>[2]);\n ordersMap.put(\"xlf\", new ArrayList<Integer>[2]);\n ordersMap.put(\"wfc\", new ArrayList<Integer>[2]);\n ordersMap.put(\"bond\", new ArrayList<Integer>[2]);\n\n Integer temp;\n int ind = 0;\n ArrayList<Integer> prices = ordersMap.get(\"bond\")[0];\n ArrayList<Integer> quantities = ordersMap.get(\"bond\")[1];\n for (int i = 0; i < 3; i++) {\n temp = bondsBuy.poll();\n if (prices.get(ind).equals(temp)) {\n quantities.set(ind, quantities.get(ind) + 1);\n } else {\n prices.add(temp);\n quantities.add(1);\n ind++;\n }\n }\n ind = 0;\n prices = ordersMap.get(\"gs\")[0];\n quantities = ordersMap.get(\"gs\")[1];\n for (int i = 0; i < 2; i++) {\n temp = bondsBuy.poll();\n if (prices.get(ind).equals(temp)) {\n quantities.set(ind, quantities.get(ind) + 1);\n } else {\n prices.add(temp);\n quantities.add(1);\n ind++;\n }\n } \n ind = 0;\n prices = ordersMap.get(\"ms\")[0];\n quantities = ordersMap.get(\"ms\")[1]; \n for (int i = 0; i < 3; i++) {\n temp = bondsBuy.poll();\n if (prices.get(ind).equals(temp)) {\n quantities.set(ind, quantities.get(ind) + 1);\n } else {\n prices.add(temp);\n quantities.add(1);\n ind++;\n }\n }\n ind = 0;\n prices = ordersMap.get(\"wfc\")[0];\n quantities = ordersMap.get(\"wfc\")[1]; \n for (int i = 0; i < 2; i++) {\n temp = bondsBuy.poll();\n if (prices.get(ind).equals(temp)) {\n quantities.set(ind, quantities.get(ind) + 1);;\n } else {\n prices.add(temp);\n quantities.add(1);\n ind++;\n }\n }\n ind = 0;\n prices = ordersMap.get(\"xlf\")[0];\n quantities = ordersMap.get(\"xlf\")[1]; \n for (int i = 0; i < 10; i++) {\n temp = bondsBuy.poll();\n if (prices.get(ind).equals(temp)) {\n quantities.set(ind, quantities.get(ind) + 1);\n } else {\n prices.add(temp);\n quantities.add(1);\n ind++;\n }\n }\n return ordersMap;\n }", "public static void main(String[] a){\n\n try {\n log.info(\"loading..\");\n\n //ExonQuantSource qs = new ExonQuantSource(new FileInputStream(System.getProperty(\"exon.quant.source\")));\n //ExonEQTLSource es = new ExonEQTLSource(new FileInputStream(System.getProperty(\"exon.eqtl.source\")), qs);\n\n TransQuantSource qs = new TransQuantSource(new FileInputStream(System.getProperty(\"exon.quant.source\")));\n TransEQTLSource es = new TransEQTLSource(new FileInputStream(System.getProperty(\"exon.eqtl.source\")), qs);\n\n\n AggregatedDataSource aggregatedSource = new AggregatedDataSource(qs, es);\n\n log.info(\"loaded\");\n\n log.info(\" \" + ((GenericQuantDataSource)aggregatedSource.quantSource).getStats());\n log.info(\" \" + ((GenericEQTLDataSource)aggregatedSource.eQTLSource).getStats());\n\n String chr = \"1\";\n int start = 1628906;\n int stop = 1629906;\n\n log.info(\"selecting \" + chr + \":\" + start + \"-\" + stop);\n\n ArrayList<DataFeature> quantResult = null;\n ArrayList<DataFeature> eQTLResult = null;\n\n long startTime = System.currentTimeMillis();\n\n quantResult = aggregatedSource.locateQuantFeatures(chr, start, stop);\n eQTLResult = aggregatedSource.locateEQTLFeatures(chr, start, stop);\n\n //for(int i=9;i<1000;i++) {\n //}\n\n long estimatedTime = System.currentTimeMillis() - startTime;\n\n log.info(\"Estimated run time:\" + estimatedTime + \" Millis\");\n\n log.info(\"quantResult.size() = \" + quantResult.size());\n log.info(\"eQTLResult.size() = \" + eQTLResult.size());\n\n for (DataFeature f : quantResult) {\n log.info(\"1 f = \" + f.getId() + \" start:\" + f.getStart() +\n \" end:\" + f.getEnd() + \" score:\" + f.getScore() );\n }\n\n for (DataFeature f : eQTLResult) {\n log.info(\"f = \" + f.getId() + \" start:\" + f.getStart() +\n \" end:\" + f.getEnd() + \" score:\" + f.getScore());\n\n log.info(\"linked to :\");\n\n for (LinkedFeature l0 : f.getLinked()) {\n log.info(\" linked = \" + l0.getFeature().getId() + \" start:\" + l0.getFeature().getStart() +\n \" end:\" + l0.getFeature().getEnd() + \" link score:\" + l0.getLinkScore());\n }\n }\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// Auto-generated catch block\n\t\t\tlog.error(\"Error!\", e);\n\t\t} catch (Exception e) {\n\t\t\t// Auto-generated catch block\n log.error(\"Error!\", e);\n\t\t}\n\t}", "private XYDataset createDataset(int a, List<ExtractedMZ> extracteddata, List<ExtractedMZ> extracteddata2) {\r\n final XYSeriesCollection dataset = new XYSeriesCollection();\r\n \r\n \r\n for (int i = 0; i<extracteddata.size(); i++) {\r\n \r\n final XYSeries series = new XYSeries(extracteddata.get(i).getName());\r\n float max = 0;\r\n \r\n for (int j = 0; j< extracteddata.get(i).retentionTimeList.get(a).size(); j++) {\r\n max = extracteddata.get(i).intensityList.get(a).get(j);\r\n while (j<extracteddata.get(i).retentionTimeList.get(a).size()-1 && Math.abs(extracteddata.get(i).retentionTimeList.get(a).get(j) - extracteddata.get(i).retentionTimeList.get(a).get(j+1)) < 0.01) {\r\n if (extracteddata.get(i).intensityList.get(a).get(j) > max) {\r\n max = extracteddata.get(i).intensityList.get(a).get(j+1);\r\n }\r\n j++;\r\n \r\n }\r\n \r\n series.add(extracteddata.get(i).retentionTimeList.get(a).get(j)/60,max);\r\n }\r\n dataset.addSeries(series);\r\n }\r\n \r\n for (int i = 0; i<extracteddata2.size(); i++) {\r\n \r\n final XYSeries series = new XYSeries(extracteddata2.get(i).getName());\r\n float max = 0;\r\n \r\n for (int j = 0; j< extracteddata2.get(i).retentionTimeList.get(a).size(); j++) {\r\n max = extracteddata2.get(i).intensityList.get(a).get(j);\r\n while (j<extracteddata2.get(i).retentionTimeList.get(a).size()-1 && Math.abs(extracteddata2.get(i).retentionTimeList.get(a).get(j) - extracteddata2.get(i).retentionTimeList.get(a).get(j+1)) < 0.01) {\r\n if (extracteddata2.get(i).intensityList.get(a).get(j) > max) {\r\n max = extracteddata2.get(i).intensityList.get(a).get(j+1);\r\n }\r\n j++;\r\n \r\n }\r\n \r\n series.add(extracteddata2.get(i).retentionTimeList.get(a).get(j)/60,max);\r\n }\r\n dataset.addSeries(series);\r\n }\r\n\r\n \r\n \r\n \r\n \r\n return dataset;\r\n \r\n }", "private void sampleOfTheGeneratedWindowedAggregate() {\n Iterator<Integer[]> iterator = null;\n\n // builder3\n Integer[] rows = iterator.next();\n\n int prevStart = -1;\n int prevEnd = -1;\n\n for ( int i = 0; i < rows.length; i++ ) {\n // builder4\n Integer row = rows[i];\n\n int start = 0;\n int end = 100;\n if ( start != prevStart || end != prevEnd ) {\n // builder5\n int actualStart = 0;\n if ( start != prevStart || end < prevEnd ) {\n // builder6\n // recompute\n actualStart = start;\n // implementReset\n } else { // must be start == prevStart && end > prevEnd\n actualStart = prevEnd + 1;\n }\n prevStart = start;\n prevEnd = end;\n\n if ( start != -1 ) {\n for ( int j = actualStart; j <= end; j++ ) {\n // builder7\n // implementAdd\n }\n }\n // implementResult\n // list.add(new Xxx(row.deptno, row.empid, sum, count));\n }\n }\n // multiMap.clear(); // allows gc\n // source = Linq4j.asEnumerable(list);\n }", "public void run() {\n\n long startTime = System.nanoTime();\n\n /*\"*********************************\n * Getting data from the algorithm *\n ***********************************/\n\n // Posterior values, get them from memory instead of propagating again. Since this method is called write,\n // it should only write.\n HashMap<Variable, TablePotential> results = algorithm.getLastPosteriorValues();\n\n // Samples\n double[][] sampleStorage;\n try {\n sampleStorage = algorithm.getSamples();\n if (sampleStorage.length == 0) { // Case of empty database\n throw new NullPointerException();\n }\n\n } catch (NullPointerException e) { // Case of empty database and no database\n logger.error(\"No samples found to write\");\n LocalizedException NoDatabaseException =\n new LocalizedException(new OpenMarkovException(\"Exception.NoDatabase\"), this.dialog);\n NoDatabaseException.showException();\n return;\n }\n\n // Variables\n List<Variable> sampledVariables = algorithm.getVariablesToSample();\n\n // The maximum number of states defines the number of columns of the second sheet in Excel.\n int maxNStates = 0;\n for (Variable variable : sampledVariables) {\n if (variable.getNumStates() > maxNStates) {\n maxNStates = variable.getNumStates();\n }\n }\n\n // Evidence variables\n EvidenceCase evidence = algorithm.getFusedEvidence();\n List<Variable> evidenceVariables = evidence.getVariables();\n\n // Time measuring for this phase\n long elapsedMS = (System.nanoTime() - startTime) / 1000000;\n logger.info(\"Data obtained from the algorithm: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n System.out.println(\"Data obtained from the algorithm: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n\n /*\"***********************\n * Creating the workbook *\n *************************/\n\n SXSSFWorkbook workbook = new SXSSFWorkbook(1000);\n\n /* Styles */\n\n // Styles to convey graphically the weight\n\n // Weight = 0\n XSSFCellStyle incompatibleSample = (XSSFCellStyle) workbook.createCellStyle();\n incompatibleSample.setFillForegroundColor(new XSSFColor(INCOMPATIBLE_SAMPLE));\n incompatibleSample.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n\n // Weight = 1\n XSSFCellStyle compatibleSample = (XSSFCellStyle) workbook.createCellStyle();\n compatibleSample.setFillForegroundColor(new XSSFColor(COMPATIBLE_SAMPLE));\n compatibleSample.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n\n\n /// Font with big emphasis for the next styles\n XSSFFont bigBoldArial = (XSSFFont) workbook.createFont();\n bigBoldArial.setFontName(\"Arial\");\n bigBoldArial.setFontHeightInPoints((short) 11);\n bigBoldArial.setBold(true);\n\n // Header of table\n XSSFCellStyle topTable = (XSSFCellStyle) workbook.createCellStyle();\n\n topTable.setFillForegroundColor(new XSSFColor(HEADER_COLOR));\n topTable.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n topTable.setAlignment(HorizontalAlignment.LEFT);\n topTable.setFont(bigBoldArial);\n\n // Header of table centered\n XSSFCellStyle centeredTopTable = (XSSFCellStyle) workbook.createCellStyle();\n\n centeredTopTable.setFillForegroundColor(new XSSFColor(HEADER_COLOR_2));\n centeredTopTable.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n centeredTopTable.setAlignment(HorizontalAlignment.CENTER);\n centeredTopTable.setFont(bigBoldArial);\n\n\n /// Font with some emphasis\n XSSFFont bigArial = (XSSFFont) workbook.createFont();\n bigArial.setFontName(\"Arial\");\n bigArial.setFontHeightInPoints((short) 10);\n bigArial.setBold(true);\n\n // Chance node\n XSSFCellStyle chanceNode = (XSSFCellStyle) workbook.createCellStyle();\n\n chanceNode.setFillForegroundColor(new XSSFColor(CHANCE_NODE_COLOR));\n chanceNode.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n chanceNode.setFont(bigArial);\n\n // Algorithm name\n XSSFCellStyle subTopTable = (XSSFCellStyle) workbook.createCellStyle();\n\n subTopTable.setFont(bigArial);\n\n\n /// Font with some emphasis and white for contrast\n XSSFFont bigWhiteArial = (XSSFFont) workbook.createFont();\n bigWhiteArial.setFontName(\"Arial\");\n bigWhiteArial.setFontHeightInPoints((short) 11);\n bigWhiteArial.setColor(new XSSFColor(new Color(255, 255, 255)));\n\n // Node with finding\n XSSFCellStyle findingNode = (XSSFCellStyle) workbook.createCellStyle();\n\n findingNode.setFillForegroundColor(new XSSFColor(FINDING_NODE_COLOR));\n findingNode.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n findingNode.setFont(bigWhiteArial);\n\n\n\n // No more than four decimal places\n XSSFCellStyle smartDecimals = (XSSFCellStyle) workbook.createCellStyle();\n smartDecimals.setDataFormat(workbook.createDataFormat().getFormat(\"0.0000\"));\n\n // No more than two decimal places\n XSSFCellStyle smartFewDecimals = (XSSFCellStyle) workbook.createCellStyle();\n smartFewDecimals.setDataFormat(workbook.createDataFormat().getFormat(\"0.##\"));\n\n // Time measuring for this phase\n elapsedMS = (System.nanoTime() - startTime)/1000000;\n logger.info(\"Workbook styles created: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n System.out.println(\"Workbook styles created: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n\n /*\"******************\n * Sheet of samples *\n ********************/\n SXSSFSheet samples = workbook.createSheet(dialog.stringDatabase.getString(\"SheetNames.Samples\"));\n\n /* Title row */\n Row titlesRow = samples.createRow(0);\n titlesRow.createCell(0).setCellValue(dialog.stringDatabase.getString(\"ColumnTitles.SampleN\"));\n for (int colNum = 1; colNum < sampledVariables.size() + 1; colNum++) { // Names of variables\n titlesRow.createCell(colNum).setCellValue(sampledVariables.get(colNum - 1).toString());\n }\n titlesRow.createCell(sampledVariables.size() + 1).setCellValue(dialog.stringDatabase.\n getString(\"ColumnTitles.Weight\"));\n\n // Apply header style\n for (int colNum = 0; colNum < sampledVariables.size() + 2; colNum++) {\n titlesRow.getCell(colNum).setCellStyle(topTable);\n }\n\n // Auto-size columns of first sheet\n for (int colNum = 0; colNum < sampledVariables.size() + 2; colNum++) {\n samples.trackAllColumnsForAutoSizing();\n samples.autoSizeColumn(colNum);\n }\n\n elapsedMS = (System.nanoTime() - startTime)/1000000;\n logger.info(\"Header of samples sheet: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n System.out.println(\"Header of samples sheet: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n\n /* Sample's rows */\n int rowNum;\n\n // Sample's loop\n for (rowNum = 1; rowNum < algorithm.getSampleSize() + 1; rowNum++) {\n\n Row sampleRow = samples.createRow(rowNum);\n sampleRow.createCell(0).setCellValue(rowNum);\n double weight = sampleStorage[rowNum - 1][sampledVariables.size()];\n for (int colNum = 1; colNum < sampledVariables.size() + 2; colNum++) { // Sampled states\n sampleRow.createCell(colNum).setCellValue(sampleStorage[rowNum - 1][colNum - 1]);\n if (weight == 0) {\n sampleRow.getCell(colNum).setCellStyle(incompatibleSample);\n } else {\n sampleRow.getCell(colNum).setCellStyle(compatibleSample);\n }\n }\n }\n\n\n\n elapsedMS = (System.nanoTime() - startTime)/1000000;\n logger.info(\"Sample rows created: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n System.out.println(\"Sample rows created: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n\n /*\"************************\n * Sheet of general stats *\n **************************/\n\n SXSSFSheet generalStats = workbook.createSheet(dialog.stringDatabase.getString(\"SheetNames.GeneralStats\"));\n\n /* Rows of algorithm data */\n\n rowNum = 0;\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.Algorithm\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).setCellValue(dialog.algorithmName);\n generalStats.getRow(rowNum).getCell(1).setCellStyle(subTopTable);\n\n rowNum++; // Row 1\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.TotalSamples\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).setCellValue(algorithm.getSampleSize());\n\n rowNum++; // Row 2\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.RuntimePerSample\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).\n setCellValue(algorithm.getAlgorithmExecutionTime()/algorithm.getSampleSize());\n generalStats.getRow(rowNum).getCell(1).setCellStyle(smartDecimals);\n\n rowNum++; // Row 3\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.Runtime\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).\n setCellValue(algorithm.getAlgorithmExecutionTime());\n generalStats.getRow(rowNum).getCell(1).setCellStyle(smartFewDecimals);\n\n rowNum++; // Row 4\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.ValidSamples\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).setCellValue(algorithm.getNumPositiveSamples());\n\n rowNum++; // Row 5\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.AccumulatedWeight\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).setCellValue(algorithm.getAccumulatedWeight());\n generalStats.getRow(rowNum).getCell(1).setCellStyle(smartFewDecimals);\n\n rowNum++; // Row 6\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.ExactAlgorithmName\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).setCellValue(dialog.stringDatabase.getString(\"Algorithms.Hugin\"));\n\n // Empty row\n\n rowNum +=2; // rows written until now\n\n /* Row of titles */\n titlesRow = generalStats.createRow(rowNum);\n titlesRow.createCell(0).setCellValue(dialog.stringDatabase.getString(\"ColumnTitles.Variable\"));\n\n // Big long cell for state names\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n titlesRow.createCell(1).setCellValue(dialog.stringDatabase.getString(\"ColumnTitles.States\"));\n\n // Set header style\n for (int colNum = 0; colNum < 2; colNum++) {\n titlesRow.getCell(colNum).setCellStyle(centeredTopTable);\n }\n\n // Empty row for clarity\n if (evidenceVariables.size() > 0) {\n rowNum++ ;\n }\n\n // Write about evidence variables that have not been sampled\n for (Variable evidenceVariable : evidenceVariables) {\n if (!sampledVariables.contains(evidenceVariable)) {\n\n /* Row of names */\n Row namesRow = generalStats.createRow(rowNum);\n // Write the name of the variable\n Cell variableName = namesRow.createCell(0);\n variableName.setCellValue(evidenceVariable.toString());\n variableName.setCellStyle(findingNode); // The color marks it as a finding\n\n // and then the names of their states\n for (int colNum = 1; colNum < evidenceVariable.getNumStates() + 1; colNum++) {\n Cell stateName = namesRow.createCell(colNum);\n stateName.setCellValue(evidenceVariable.getStateName(colNum - 1));\n stateName.setCellStyle(findingNode);\n }\n\n /* Row of occurrences */\n // Write \"non-sampled\"\n Row occurrencesRow = generalStats.createRow(rowNum + 1);\n Cell nSamples = occurrencesRow.createCell(0);\n nSamples.setCellValue(dialog.stringDatabase.getString(\"RowTitles.Ocurrences\"));\n\n for (int colNum = 1; colNum < evidenceVariable.getNumStates() + 1; colNum++) {\n occurrencesRow.createCell(colNum)\n .setCellValue(dialog.stringDatabase.getString(\"NonSampled\"));\n }\n\n /* Row of finding */\n // Write the finding\n Row approxProbsRow = generalStats.createRow(rowNum + 2);\n Cell approximateProbs = approxProbsRow.createCell(0);\n approximateProbs.setCellValue(dialog.stringDatabase.getString(\"RowTitles.Finding\"));\n\n for (int colNum = 1; colNum < evidenceVariable.getNumStates() + 1; colNum++) {\n int value = 0;\n if (evidence.getState(evidenceVariable) == colNum - 1) {\n value = 1;\n }\n approxProbsRow.createCell(colNum).setCellValue(value);\n }\n\n // Empty row\n Row emptyRow = generalStats.createRow(rowNum + 4);\n emptyRow.setHeight((short) 120);\n\n rowNum += 4; // Go to the next variable (each variable uses 4 rows)\n }\n }\n\n rowNum++; // Empty row for clarity.\n\n // Write sampled variables\n for (int variablePosition = 0; variablePosition < sampledVariables.size(); variablePosition++) {\n\n Variable variableToWrite = sampledVariables.get(variablePosition);\n\n /* Row of names */\n Row namesRow = generalStats.createRow(rowNum);\n // Write the name of the variable\n Cell variableName = namesRow.createCell(0);\n variableName.setCellValue(sampledVariables.get(variablePosition).toString());\n\n // and then the names of its states\n for (int colNum = 1; colNum < variableToWrite.getNumStates() + 1; colNum++) {\n Cell stateName = namesRow.createCell(colNum);\n stateName.setCellValue(variableToWrite.getStateName(colNum - 1));\n }\n\n // In logical sampling, evidence variables are samples. If so, mark them as findings.\n if (evidenceVariables.contains(variableToWrite)) {\n for (int colNum = 0; colNum < variableToWrite.getNumStates() + 1; colNum++) {\n namesRow.getCell(colNum).setCellStyle(findingNode);\n }\n } else {\n for (int colNum = 0; colNum < variableToWrite.getNumStates() + 1; colNum++) {\n namesRow.getCell(colNum).setCellStyle(chanceNode);\n }\n }\n\n /* Row of occurrences */\n Row occurrencesRows = generalStats.createRow(rowNum + 1);\n // Write the title of the row\n Cell nSamples = occurrencesRows.createCell(0);\n nSamples.setCellValue(dialog.stringDatabase.getString(\"RowTitles.Ocurrences\"));\n // Write how many times each state has been sampled\n for (int colNum = 1; colNum < variableToWrite.getNumStates() + 1; colNum++) {\n occurrencesRows.createCell(colNum)\n .setCellValue(getStateOccurrences(sampleStorage, variablePosition,colNum - 1));\n }\n\n /* Row of approximate probabilities */\n Row approxProbsRow = generalStats.createRow(rowNum + 2);\n // Write the title of the row\n Cell approximateProbs = approxProbsRow.createCell(0);\n approximateProbs.setCellValue(dialog.stringDatabase.getString(\"RowTitles.ApproximateProbability\"));\n // Write the sampled probability\n for (int colNum = 1; colNum < variableToWrite.getNumStates() + 1; colNum++) {\n if (evidenceVariables.contains(variableToWrite)) {\n // Logic Sampling: in case of a sampled evidence variable, probability = 1 for the finding.\n int value = 0;\n if (evidence.getState(variableToWrite) == colNum - 1) {\n value = 1;\n }\n approxProbsRow.createCell(colNum).setCellValue(value);\n\n } else {\n approxProbsRow.createCell(colNum)\n .setCellValue(results.get(variableToWrite).getValues()[colNum - 1]);\n }\n approxProbsRow.getCell(colNum).setCellStyle(smartDecimals);\n }\n\n\n /* Row of exact probabilities */\n Row exactProbsRow = generalStats.createRow(rowNum + 3);\n // Write the title of the row\n Cell exactProbs = exactProbsRow.createCell(0);\n exactProbs.setCellValue(dialog.stringDatabase.getString(\"RowTitles.ExactProbability\"));\n // Write how many times each state has been sampled\n for (int colNum = 1; colNum < variableToWrite.getNumStates() + 1; colNum++) {\n exactProbsRow.createCell(colNum)\n .setCellValue(exactPosteriorValues.get(variableToWrite).getValues()[colNum - 1]);\n exactProbsRow.getCell(colNum).setCellStyle(smartDecimals);\n }\n\n // Empty row\n Row emptyRow = generalStats.createRow(rowNum + 4);\n emptyRow.setHeight((short) 120);\n\n rowNum += 5; // Go to the next variable (each variable uses 5 rows)\n\n }\n\n // Auto-size columns of second sheet (variable column + states columns)\n for (int colNum = 0; colNum <= 1 + maxNStates; colNum++) {\n generalStats.trackAllColumnsForAutoSizing();\n generalStats.autoSizeColumn(colNum);\n }\n\n // Time measuring for this phase\n elapsedMS = (System.nanoTime() - startTime)/1000000;\n logger.info(\"General stats added: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n System.out.println(\"General stats added: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n\n /*\"*****************\n * Output the file *\n *******************/\n try {\n FileOutputStream outputStream = new FileOutputStream(fileName);\n workbook.write(outputStream);\n // remember to close\n outputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n LocalizedException OutputException =\n new LocalizedException(new OpenMarkovException(\"Exception.Output\"), this.dialog);\n OutputException.showException();\n }\n\n // Time measuring for this phase\n elapsedMS = (System.nanoTime() - startTime)/1000000;\n logger.info(\"Writing done: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n System.out.println(\"Writing done: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n\n String conclusion = dialog.stringDatabase.getString(\"Conclusion\") + \"\\n\" + fileName;\n logger.info(conclusion);\n System.out.println(conclusion);\n JOptionPane.showMessageDialog(dialog, conclusion,\n dialog.stringDatabase.getString(\"ConclusionTitle\"), JOptionPane.DEFAULT_OPTION);\n }", "@Override\n public List<ExpenceSummary> getReportsForMonth(String owner,int year, int month) {\n\n AggregationResults<ExpenceSummary> results = operations.aggregate(newAggregation(Expence.class, //\n match(where(\"owner\").is(owner))\n // .andOperator(where(\"date\").lte(LocalDateTime.now())\n //.andOperator(where(\"year(date)\").is(year)\n // .andOperator(where(\"date\").regex(\"2016\")\n // .andOperator(where(\"owner\").is(\"admin\")))\n , //\n // unwind(\"items\"), //\n // project(\"id\", \"customerId\", \"items\") //\n // .andExpression(\"'$items.price' * '$items.quantity'\").as(\"lineTotal\"), //\n project()\n .andExpression(\"type\").as(\"type\")\n .andExpression(\"year(date)\").as(\"year\")\n .andExpression(\"month(date)\").as(\"month\")\n .andExpression(\"amount\").as(\"amount\")\n ,\n match(where(\"year\").is(year)\n .andOperator(where(\"month\").is(month))\n )\n // .andOperator(where(\"date\").lte(LocalDateTime.now())\n //.andOperator(where(\"year(date)\").is(year)\n ,\n group(\"type\",\"year\",\"month\")\n\n // .addToSet(\"type\").as(\"type\")//, //\n // .addToSet(\"year\").as(\"year\")//, //\n // .addToSet(\"month\").as(\"month\")//, //\n .sum(\"amount\").as(\"totalAmount\") //\n .count().as(\"count\")\n // project(\"id\", \"items\", \"netAmount\") //\n // .and(\"orderId\").previousOperation() //\n // .andExpression(\"netAmount * [0]\", 1).as(\"taxAmount\") //\n // .andExpression(\"netAmount * (1 + [0])\", 1).as(\"totalAmount\") //\n ), Expence.class,ExpenceSummary.class);\n logger.info(\"getReportsForMonth results.size=\"+results.getMappedResults().size());\n return results.getMappedResults();\n }", "@Override\n\tpublic void statCalculator() throws StateNotValid, DateNotValid, RangeNotValid, GenreNotValid, KeywordNotValid {\n\t\tJSONArray database = new JSONArray();\n\t\tdatabase = Database.getDatabaseFromFile();\n\t\tJSONObject state=(JSONObject) filter.get(\"state\");\n\t\t\n\t\tVector<String> in=(Vector<String>) state.get(\"in\");\n\t\tif(in.equals(null))\n\t\t\tthrow new StateNotValid();\n\t\telse {\n\t\t\tfor(String s:in) {\n\t\t\t\tJSONObject tempFilter1 = new JSONObject();\n\t\t\t\tJSONObject body1 = new JSONObject();\n\t\t\t\tbody1.put(\"$in\", s);\n\t\t\t\ttempFilter1.put(\"state\", body1);\n\t\t\t\tJSONArray temp = new JSONArray();\n\t\t\t\tfor(int i=0; i<12; i++) {\n\t\t\t\t\tJSONObject tempFilter = new JSONObject();\n\t\t\t\t\tJSONObject body = new JSONObject();\n\t\t\t\t\tString mese = new String();\n\t\t\t\t\tString dataini = new String();\n\t\t\t\t\tString datafin = new String();\n\t\t\t\t\tswitch(i) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\tmese = \"Gennaio\";\n\t\t\t\t\t\tdataini = \"2021:01:01\";\n\t\t\t\t\t\tdatafin = \"2021:01:31\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tmese = \"Febbraio\";\n\t\t\t\t\t\tdataini = \"2021:02:01\";\n\t\t\t\t\t\tdatafin = \"2021:02:28\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tmese = \"Marzo\";\n\t\t\t\t\t\tdataini = \"2021:03:01\";\n\t\t\t\t\t\tdatafin = \"2021:03:31\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tmese = \"Aprile\";\n\t\t\t\t\t\tdataini = \"2021:04:01\";\n\t\t\t\t\t\tdatafin = \"2021:04:30\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\tmese = \"Maggio\";\n\t\t\t\t\t\tdataini = \"2021:05:01\";\n\t\t\t\t\t\tdatafin = \"2021:05:31\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\tmese = \"Giugno\";\n\t\t\t\t\t\tdataini = \"2021:06:01\";\n\t\t\t\t\t\tdatafin = \"2021:06:30\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\tmese = \"Luglio\";\n\t\t\t\t\t\tdataini = \"2021:07:01\";\n\t\t\t\t\t\tdatafin = \"2021:07:31\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 7:\n\t\t\t\t\t\tmese = \"Agosto\";\n\t\t\t\t\t\tdataini = \"2021:08:01\";\n\t\t\t\t\t\tdatafin = \"2021:08:31\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 8:\n\t\t\t\t\t\tmese = \"Settembre\";\n\t\t\t\t\t\tdataini = \"2021:09:01\";\n\t\t\t\t\t\tdatafin = \"2021:09:30\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 9:\n\t\t\t\t\t\tmese = \"Ottobre\";\n\t\t\t\t\t\tdataini = \"2021:10:01\";\n\t\t\t\t\t\tdatafin = \"2021:10:31\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 10:\n\t\t\t\t\t\tmese = \"Novembre\";\n\t\t\t\t\t\tdataini = \"2021:11:01\";\n\t\t\t\t\t\tdatafin = \"2021:11:30\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 11:\n\t\t\t\t\t\tmese = \"Dicembre\";\n\t\t\t\t\t\tdataini = \"2021:12:01\";\n\t\t\t\t\t\tdatafin = \"2021:12:31\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tVector<String> dates = new Vector<String>();\n\t\t\t\t\tdates.add(dataini);\n\t\t\t\t\tdates.add(datafin);\n\t\t\t\t\tbody.put(\"$bt\", dates);\n\t\t\t\t\ttempFilter.put(\"date\", body);\n\t\t\t\t\t\n\t\t\t\t\tStateFilter filter1 = new StateFilter();\n\t\t\t\t\tdatabase = filter1.filter(database, tempFilter1);\n\t\t\t\t\tGenreFilter filter2 = new GenreFilter();\n\t\t\t\t\tdatabase = filter2.filter(database, filter);\n\t\t\t\t\tDateFilter filter3 = new DateFilter();\n\t\t\t\t\tdatabase = filter3.filter(database, tempFilter);\n\t\t\t\t\tKeywordFilter filter4 = new KeywordFilter();\n\t\t\t\t\tdatabase = filter4.filter(database, filter);\n\t\t\t\t\t\n\t\t\t\t\tJSONObject month = new JSONObject();\n\t\t\t\t\tmonth.put(\"name\", mese);\n\t\t\t\t\tmonth.put(\"value\", database.size());\n\t\t\t\t\ttemp.add(month);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tJSONObject render = new JSONObject();\n\t\t\t\trender.put(\"name\", s);\n\t\t\t\trender.put(\"min\", this.getMin(temp));\n\t\t\t\trender.put(\"max\", this.getMax(temp));\n\t\t\t\trender.put(\"avg\", this.getMedia(temp));\n\t\t\t\toutput.add(render);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void process () {\r\n\r\n ArrayList<String> anomaly;\r\n ArrayList<DataInfo> tmp = new ArrayList<>();\r\n int appState, screenState, screenOrientation, closeToObject, opID;\r\n long permissionCount;\r\n double scanDuration;\r\n String packageName, permission, accessTime;\r\n\r\n // get the data in the given scope (from offset, limit rows)\r\n Cursor cursor = sqliteDBHelper.get_data(\"SELECT \" + SqliteDBStructure.PACKAGE_NAME + \", \"\r\n + SqliteDBStructure.PERMISSION + \", \"\r\n + SqliteDBStructure.DATA_AGGREGATE + \".\" + SqliteDBStructure.ACCESS_TIME + \", \"\r\n + SqliteDBStructure.APP_STATE + \", \"\r\n + SqliteDBStructure.SCREEN_STATE + \", \"\r\n + SqliteDBStructure.SCREEN_ORIENTATION + \", \"\r\n + SqliteDBStructure.CLOSE_TO_OBJECT\r\n + \" FROM \" + SqliteDBStructure.DATA_AGGREGATE\r\n + \" JOIN \" + SqliteDBStructure.INFO_AT_ACCESSTIME + \" ON \"\r\n + SqliteDBStructure.DATA_AGGREGATE + \".\" + SqliteDBStructure.ACCESS_TIME + \" = \" + SqliteDBStructure.INFO_AT_ACCESSTIME + \".\" + SqliteDBStructure.ACCESS_TIME\r\n + \" LIMIT \" + limit + \" OFFSET \" + offset);\r\n\r\n try {\r\n if (cursor != null) {\r\n cursor.moveToFirst();\r\n\r\n while (!cursor.isAfterLast()) {\r\n packageName = cursor.getString(cursor.getColumnIndexOrThrow(SqliteDBStructure.PACKAGE_NAME));\r\n opID = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.PERMISSION));\r\n permission = Permission.opIDToName(opID);\r\n accessTime = cursor.getString(cursor.getColumnIndexOrThrow(SqliteDBStructure.ACCESS_TIME));\r\n appState = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.APP_STATE));\r\n screenState = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.SCREEN_STATE));\r\n screenOrientation = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.SCREEN_ORIENTATION));\r\n closeToObject = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.CLOSE_TO_OBJECT));\r\n\r\n permissionCount = DatabaseUtils.longForQuery(sqliteDBHelper.getReadableDatabase(), \"SELECT COUNT(*) FROM \" + SqliteDBStructure.DATA_AGGREGATE + \" WHERE \" + SqliteDBStructure.PACKAGE_NAME + \" = '\" + packageName + \"' \" + \" AND \" + SqliteDBStructure.PERMISSION + \" = '\" + opID + \"';\", null);\r\n\r\n //Scan duration in Minutes\r\n scanDuration = (((double) stop_scan_time.getTime() + (double) start_scan_time.getTime()) / 1000 )/ 60;\r\n //check for anomaly by ruleset class\r\n anomaly = RuleSet.checkForAnomaly(packageName, permission, permissionCount, appState, screenState, screenOrientation, closeToObject, scanDuration, context);\r\n\r\n //Send data to server or save it locally, if no valid internet connection is available\r\n if (networking) {\r\n sendRawData(packageName, permission, accessTime, appState, screenState, screenOrientation, closeToObject);\r\n if (anomaly.get(0).equals(\"1\"))\r\n MyClient.POST_Anomaly(packageName, permission, anomaly.get(1), \"0\");\r\n } else {\r\n saveRawData(packageName, permission, accessTime, appState, screenState, screenOrientation, closeToObject);\r\n if (anomaly.get(0).equals(\"1\"))\r\n saveAnomaliesImage(packageName, permission, anomaly.get(1), 0);\r\n }\r\n\r\n // create a info object which holds all the necessary information about that data block and store it temporarily in a list\r\n DataInfo info = new DataInfo(packageName, Permission.opIDToDescription(opID), accessTime, permissionCount, anomaly.get(0), anomaly.get(1), scanTime, 0);\r\n tmp.add(info);\r\n\r\n // should the size of the temporary list exceeds MaxBatchSize, write list to the local DB and clear the temp list afterwards \r\n // technically this cannot happen but we are working with threads here so better be safe than sorry\r\n // temp list should not be to big, because we have have to hold task amount of temp list, with each containing around MaxBatchSize entries, in memory at the same time\r\n if (tmp.size() > MaxBatchSize) {\r\n bulkInsertIntoDataAnalyzing(tmp);\r\n tmp.clear();\r\n }\r\n\r\n cursor.moveToNext();\r\n }\r\n\r\n }\r\n } finally {\r\n if (cursor != null) {\r\n cursor.close();\r\n }\r\n }\r\n\r\n // write the data stored in the temp list to the local DB \r\n if (tmp.size() > 0) {\r\n bulkInsertIntoDataAnalyzing(tmp);\r\n tmp.clear();\r\n }\r\n // inform the progress dialog that a task has been finished\r\n updateProgressDialog();\r\n // decrease the amount of ongoing tasks by 1\r\n decreaseTasks();\r\n }", "public void toPunish() {\n\n //// TODO: 24/03/2017 delete the following lines\n// dalDynamic.addRowToTable2(\"23/03/2017\",\"Thursday\",4,walkingLength,deviation)\n\n\n\n int dev,sum=0;\n long id;\n id=dalDynamic.getRecordIdAccordingToRecordName(\"minutesWalkTillEvening\");\n Calendar now = Calendar.getInstance();//today\n Calendar calendar = Calendar.getInstance();\n SimpleDateFormat dateFormat=new SimpleDateFormat(\"dd/MM/yyyy\");\n String date;\n for (int i = 0; i <DAYS_DEVIATION ; i++) {\n date=dateFormat.format(calendar.getTime());\n Log.v(\"Statistic\",\"date \"+date);\n dev = dalDynamic.getDeviationAccordingToeventTypeIdAnddate(id,date);\n sum+=dev;\n calendar.add(Calendar.DATE,-1);//// TODO: -1-i????\n }\n if(sum==DAYS_DEVIATION){\n Intent intent = new Intent(context,BlankActivity.class);\n context.startActivity(intent);\n //todo:punishment\n }\n\n }", "void newSale(double totalWithTaxes);", "public void startSale(){\n sale = new Sale();\n for(SaleObserver obs: saleObservers)\n sale.addSaleObserver(obs);\n }", "public void getPromoShare() {\n\t\tHashMap<String, DataStorage> items = this.getAllItems();\n\t\tfor(String key:items.keySet()) {\n\t\t\tHashtable<String, Double> sales = new Hashtable<String, Double>();\n\t\t\tsales.put(\"Total Sales\",items.get(key).getSales(thisPeriod));\n\t\t\tsales.put(\"Total Sales YA\", items.get(key).getSales(lastPeriod));\n\t\t\tsales.put(\"Any Promo Sales\", items.get(key).getAnyPromo(thisPeriod));\n\t\t\tsales.put(\"Any Promo Sales YA\", items.get(key).getAnyPromo(lastPeriod));\n\t\t\tsales.put(\"Feature\", items.get(key).getFeat(thisPeriod));\n\t\t\tsales.put(\"Feature YA\", items.get(key).getFeat(lastPeriod));\n\t\t\tsales.put(\"Display\", items.get(key).getDisplay(thisPeriod));\n\t\t\tsales.put(\"Display YA\", items.get(key).getDisplay(lastPeriod));\n\t\t\tsales.put(\"Quality\", items.get(key).getQual(thisPeriod));\n\t\t\tsales.put(\"Quality YA\", items.get(key).getQual(lastPeriod));\n\t\t\tsales.put(\"Price Disc.\", items.get(key).getPriceDisc(thisPeriod));\n\t\t\tsales.put(\"Price Disc.YA\", items.get(key).getPriceDisc(lastPeriod));\n\t\t\tthis.allocateValues(sales);\n\t\t}\n\t}", "private void fillObservationsDataFast() {\n\n Integer studyId = this.workbookStudy.getStudy().getStudyid();\n// int variateCount = this.workbookStudy.getVariates().size();\n \n List<String> factorsReturn = getFactoresReturnList();\n \n fillFactorLabelDataOptimized(studyId, 0, getFactoresKeyList(), factorsReturn, factorTrial.getFname());\n \n// List<Measurement> measurementList = workbookStudy.getMeasurements();\n \n// log.info(\"Getting Data Trial ...\");\n// List<Object> dataList;\n// if(! workbookStudy.getVariates().isEmpty()){\n// dataList = this.servicioApp.getObservationsDataMeasurementEffect(studyId, effectid);\n// }else{\n// dataList = new ArrayList<Object>();\n// }\n// log.info(\"Getting Data Trial Done...\");\n// \n// \n// log.info(\"Getting List of Obsunit ...\");\n// List<Obsunit> obsunits = this.servicioApp.getObsunitListByEffectid(studyId, effectid);\n// log.info(\"Getting List of Obsunit...\");\n// int rowIndex = 0;\n// for (Obsunit obsUnit : obsunits) {\n// Measurement measurement = measurementList.get(rowIndex);\n// measurement.initMeasurementData(variateCount);\n//\n// assignMeasurementData(measurement, obsUnit, dataList);\n// rowIndex++;\n// }\n }", "public static void topXSimpleLTVCustomer(int x,Data data){\n ArrayList<OutPut> outputlist = new ArrayList<OutPut>();\n HashMap<String, HashMap<Long, ArrayList<Order>>> hashmap = data.getOrderdata();;\n\n //getting all customers output and storing them in the arraylist\n for(String customers: hashmap.keySet()){\n //System.out.println(\"customers : \"+customers);\n HashMap<Long, ArrayList<Order>> hashmapweeknumber = hashmap.get(customers);\n double sum =0;\n double a = 0;\n int weekNumbersSize = hashmapweeknumber.size();\n double sumCustomerExpenditurePerVisit = 0;\n for(long weeknumbers: hashmapweeknumber.keySet()){\n //System.out.println(\"weeknumbers : \"+weeknumbers);\n ArrayList<Order> orders = hashmapweeknumber.get(weeknumbers);\n int size = orders.size();\n int i=0;\n double customerExpendituresPerVisit = 0;\n int totalNumberOfVisits= size;\n while(i<size) {\n sum = sum + orders.get(i).getTotal_amount();\n i++;\n }\n customerExpendituresPerVisit = sum/size;\n sumCustomerExpenditurePerVisit = sumCustomerExpenditurePerVisit + customerExpendituresPerVisit;\n //System.out.println(sum/size);\n }\n //a contains the average customer value per week\n a = sumCustomerExpenditurePerVisit/weekNumbersSize;\n //simpleLTF contains the life time customer value\n double simpleLTF = (52*a)*10;\n OutPut output = new OutPut();\n output.setCustomer_id(customers);\n output.setCustomer_ltf(simpleLTF);\n outputlist.add(output);\n }\n\n //Sorts all the custoemrs in the arraylist.\n Collections.sort(outputlist, new OutputSorter());\n //getting the top x customers from all the customers\n if(outputlist.size()<x){\n System.out.println(\"number of of customers in the data are less than x value, please provide smaller x value\");\n }else{\n System.out.println(\"\");\n System.out.println(\"Top \"+x+\" customers with highest Simple LTV are : \");\n\n for(int i=0; i<x;i++){\n System.out.println(outputlist.get(i).getCustomer_id()+\" : \"+outputlist.get(i).getCustomer_ltf());\n }\n }\n\n }", "private void buildMonthly(int year, int month, int numdays, int dataIndex, Bundle bundle) {\n\n double[] raw_xdata = new double[numdays + 2];\n double[] raw_ydata1 = new double[numdays + 2];\n double[] raw_ydata2 = new double[numdays + 2];\n double[] raw_ydata3 = null;\n if (dataIndex == Constants.DATA_MONTHLY_TEMPERATURE) {\n raw_ydata3 = new double[numdays + 2];\n Arrays.fill(raw_ydata1, Constants.DATA_INVALID);\n Arrays.fill(raw_ydata2, Constants.DATA_INVALID);\n Arrays.fill(raw_ydata3, Constants.DATA_INVALID);\n }\n\n // set the first y1 and y2 values\n int xstart = bundle.getInt(\"xorigin1\", 0);\n raw_xdata[0] = xstart;\n\n // set the y1 and y2 values for the month\n for (int i = 1; i < numdays + 1; i++) {\n raw_xdata[i] = i;\n String filename = UtilsMisc.getDecimalFormat(year, 4) + \"-\" +\n UtilsMisc.getDecimalFormat(month + 1, 2) + \"-\" +\n UtilsMisc.getDecimalFormat(i, 2);\n if (summaryDB.isInSummaryTable(context, filename)) {\n int log_id = summaryDB.getMonitorID(context, filename);\n SummaryProvider.Summary summary = summaryDB.getSummary(context, log_id);\n switch (dataIndex) {\n case Constants.DATA_PEAKWATTS:\n raw_ydata1[i] = summary.getPeak_watts();\n raw_ydata2[i] = summary.getGenerated_watts();\n break;\n case Constants.DATA_PEAKTIME:\n long midnight = UtilsDate.get_midNightTimestamp(summary.getStart_time(), lat, lon);\n raw_ydata1[i] = UtilsDate.getTimeSeconds(summary.getPeak_time() - midnight);\n raw_ydata2[i] = summary.getGenerated_watts();\n break;\n case Constants.DATA_SUNLIGHT:\n raw_ydata1[i] = UtilsDate.getTimeSeconds(summary.getEnd_time() - summary.getStart_time());\n raw_ydata2[i] = summary.getGenerated_watts();\n break;\n case Constants.DATA_READINGS:\n raw_ydata1[i] = summaryDB.getDetailCount(context, log_id);\n raw_ydata2[i] = summary.getGenerated_watts();\n break;\n case Constants.DATA_MONTHLY_TEMPERATURE:\n raw_ydata1[i] = summary.getMinTemperature();\n raw_ydata2[i] = summary.getMaxTemperature();\n raw_ydata3[i] = summary.getGenerated_watts();\n break;\n case Constants.DATA_MONTHLY_CLOUDS:\n raw_ydata1[i] = summary.getAvgClouds();\n raw_ydata2[i] = summary.getGenerated_watts();\n break;\n default:\n break;\n }\n } else {\n if (dataIndex != Constants.DATA_MONTHLY_TEMPERATURE) {\n raw_ydata1[i] = 0.0;\n raw_ydata2[i] = 0.0;\n }\n }\n }\n\n // set the first and last y1 and y2 values\n int xend = numdays;\n raw_xdata[numdays+1] = xend + 1;\n switch (dataIndex) {\n case Constants.DATA_PEAKWATTS :\n raw_ydata1[numdays+1] = raw_ydata1[numdays]; raw_ydata2[numdays+1] = raw_ydata2[numdays];\n raw_ydata1[0] = raw_ydata1[1]; raw_ydata2[0] = raw_ydata2[1]; break;\n case Constants.DATA_PEAKTIME :\n raw_ydata1[numdays+1] = raw_ydata1[numdays]; raw_ydata2[numdays+1] = raw_ydata2[numdays];\n raw_ydata1[0] = raw_ydata1[1]; raw_ydata2[0] = raw_ydata2[1]; break;\n case Constants.DATA_SUNLIGHT :\n raw_ydata1[numdays+1] = raw_ydata1[numdays]; raw_ydata2[numdays+1] = raw_ydata2[numdays];\n raw_ydata1[0] = raw_ydata1[1]; raw_ydata2[0] = raw_ydata2[1]; break;\n case Constants.DATA_READINGS :\n raw_ydata1[numdays+1] = raw_ydata1[numdays]; raw_ydata2[numdays+1] = raw_ydata2[numdays];\n raw_ydata1[0] = raw_ydata1[1]; raw_ydata2[0] = raw_ydata2[1]; break;\n case Constants.DATA_MONTHLY_CLOUDS :\n raw_ydata1[numdays+1] = raw_ydata1[numdays]; raw_ydata2[numdays+1] = raw_ydata2[numdays];\n raw_ydata1[0] = raw_ydata1[1]; raw_ydata2[0] = raw_ydata2[1]; break;\n case Constants.DATA_MONTHLY_TEMPERATURE :\n Number[] numbers = UtilsMisc.toNumber(raw_ydata1, -273); // convert from kelvin to centigrade\n numbers = UtilsMisc.fix_end_numbers(numbers, true);\n numbers = UtilsMisc.fix_mid_numbers(numbers);\n raw_ydata1 = UtilsMisc.toDouble(numbers);\n\n numbers = UtilsMisc.toNumber(raw_ydata2, -273);\n numbers = UtilsMisc.fix_end_numbers(numbers, true);\n numbers = UtilsMisc.fix_mid_numbers(numbers);\n raw_ydata2 = UtilsMisc.toDouble(numbers);\n\n numbers = UtilsMisc.toNumber(raw_ydata3);\n numbers = UtilsMisc.fix_end_numbers(numbers, true);\n numbers = UtilsMisc.fix_mid_numbers(numbers);\n raw_ydata3 = UtilsMisc.toDouble(numbers);\n default :\n break;\n }\n\n LinearInterpolation lp1 = new LinearInterpolation(raw_xdata, raw_ydata1);\n LinearInterpolation lp2 = new LinearInterpolation(raw_xdata, raw_ydata2);\n LinearInterpolation lp3 = (raw_ydata3 != null)? new LinearInterpolation(raw_xdata, raw_ydata3): null;\n int time = xstart;\n ArrayList<Integer> xList = new ArrayList<>();\n ArrayList<Float> yList1 = new ArrayList<>();\n ArrayList<Float> yList2 = new ArrayList<>();\n ArrayList<Float> yList3 = new ArrayList<>();\n while (time < (xend+1)) {\n xList.add(time);\n yList1.add((float) lp1.interpolate(time));\n yList2.add((float) lp2.interpolate(time));\n if (lp3 != null)\n yList3.add((float) lp3.interpolate(time));\n time += 1;\n }\n\n int[] xdata = Ints.toArray(xList);\n float[] ydata1 = Floats.toArray(yList1);\n float[] ydata2 = Floats.toArray(yList2);\n float[] ydata3 = Floats.toArray(yList3);\n bundle.putIntArray(\"xdata1\", xdata);\n bundle.putIntArray(\"xdata2\", xdata);\n bundle.putIntArray(\"xdata3\", xdata);\n bundle.putFloatArray(\"ydata1\", ydata1);\n bundle.putFloatArray(\"ydata2\", ydata2);\n bundle.putFloatArray(\"ydata3\", ydata3.length > 0? ydata3: null);\n\n switch (dataIndex) {\n case Constants.DATA_MONTHLY_TEMPERATURE:\n smooth_plot(bundle, true, \"1\");\n smooth_plot(bundle, true, \"2\");\n break;\n case Constants.DATA_MONTHLY_CLOUDS:\n smooth_plot(bundle, true, \"1\");\n break;\n }\n\n }", "private TimeSeries createEURTimeSeries(String WellID, String lang) {\n int count = 0;\n String precipitation = \"\";\n if(lang.equals(\"EN\")){\n precipitation = precipitation_en;\n }else{\n precipitation = precipitation_fr;\n }\n TimeSeries t1 = new TimeSeries(precipitation + \" (mm)\");\n //System.out.println (t1.getMaximumItemCount()); \n Hour begin = new Hour( 1, 1, 1, 2005);\n Hour end = new Hour(23, 31, 12, 2012);\n String endStr = end.toString();\n String str = begin.toString();\n \n for(Hour h1 = begin; !str.equals(endStr) ; h1 = (Hour) h1.next()){\n Second s = new Second(0, 0, h1.getHour(), h1.getDayOfMonth(), h1.getMonth(), h1.getYear());\n t1.addOrUpdate(s, new Double(Double.NaN)); \n str = h1.toString();\n }\n \n try {\n // Open the file that is the first \n // command line parameter\n FileInputStream fstream = new FileInputStream(\"Y:\\\\PGMN\\\\Precipitation\\\\\" + WellID + \".csv\");\n // Get the object of DataInputStream\n DataInputStream in = new DataInputStream(fstream);\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n String strLine;\n //Read File Line By Line\n int i = 0;\n while ((strLine = br.readLine()) != null) {\n if(i>0){ \n String [] temp = strLine.split(\",\");\n //System.out.println (i);\n String [] dateTimeAM = (temp[2]).split(\" \"); //08/20/2009 10:35:00 AM\n \n String [] dates = (dateTimeAM[0]).split(\"/\"); //6/10/2009\n int month = Integer.parseInt(dates[0]);\n int day = Integer.parseInt(dates[1]);\n int year = Integer.parseInt(dates[2]);\n //System.out.println (i);\n int hour = 0;\n int minute = 0;\n int second = 0; \n if (dateTimeAM.length > 1) {\n String [] temp3 = (dateTimeAM[1]).split(\":\"); //10:35:00\n hour = Integer.parseInt(temp3[0]);\n minute = Integer.parseInt(temp3[1]);\n second = Integer.parseInt(temp3[2]);\n //08/20/2009 10:35:00 AM\n if ((dateTimeAM[2]).equals(\"PM\")) {\n if (hour < 12) {\n hour = hour + 12;\n }\n }\n if ((dateTimeAM[2]).equals(\"AM\") && (hour == 12)) {\n hour = 0;\n }\n }\n Second s = new Second(second, minute, hour, day, month, year);\n //System.out.println(strLine);\n //System.out.println(year + \", \" + month + \", \" + day + \", \" + hour + \", \" + minute + \", \" + second);\n //Hour h = new Hour(hour, day, month, year);\n Double d = new Double(Double.NaN);\n //System.out.println(temp[2]);\n if (temp.length > 2){\n d = Double.parseDouble(temp[3]);// - depth;\n count ++;\n }\n t1.addOrUpdate(s, d);\n }\n i = i + 1;\n }\n in.close();\n \n }\n catch (Exception e) {\n System.err.println(e.getMessage());\n }\n \n return t1;\n }", "private XYDataset createDataset() {\n final XYSeriesCollection dataset = new XYSeriesCollection();\n //dataset.addSeries(totalDemand);\n dataset.addSeries(cerContent);\n //dataset.addSeries(cerDemand);\n dataset.addSeries(comContent);\n //dataset.addSeries(comDemand);\n dataset.addSeries(activation);\n dataset.addSeries(resolutionLevel);\n \n return dataset;\n }", "public salesDetail() throws SQLException {\n monthsVal=new HashMap();\n String months=\"Jan Feb Mar Apr May Jun Jul Aug Sept Oct Nov Dec\";\n String[] monthsList = months.split(\" \");\n int mthCount=1;\n \n for(String mthVal:monthsList)\n { String mth=\"1\";\n if(mthCount<10)\n mth=\"0\"+mthCount;\n else mth=mthCount+\"\";\n monthsVal.put(mthVal,mth);\n mthCount++;\n }\n dft=new DefaultTableModel();\n dft.addColumn(\"Date\");\n dft.addColumn(\"Bill No.\");\n dft.addColumn(\"Sales Man\");\n dft.addColumn(\"Item\");\n dft.addColumn(\"Quantity\");\n dft.addColumn(\"Rate\");\n dft.addColumn(\"Amount\");\n SalesModel sm = new SalesModel(); \n Vector<Vector<String>> resultSet=sm.getAllDetails();\n for(Vector<String> list : resultSet)\n {\n dft.addRow(list);\n }\n \n usr=new DefaultTableModel();\n usr.addColumn(\"User Name\");\n usr.addColumn(\"Amount(NRS)\");\n Calendar currentDate = Calendar.getInstance(); //Get the current date\n SimpleDateFormat formatter= new SimpleDateFormat(\"yyyy-MM-dd\"); //format it as per your requirement\n String dateStr = formatter.format(currentDate.getTime());\n resultSet=sm.userSalesRecord(dateStr);\n for(Vector<String> list : resultSet)\n {\n usr.addRow(list);\n } \ninitComponents();\ngraphPanel=new GraphPanel(); \ngraphPanel.setBackground(new java.awt.Color(204, 204, 204));\nthis.add(graphPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 340,700,350));\nthis.setVisible(true);\n }", "private XYDataset createDataset() {\n\t \tXYSeriesCollection dataset = new XYSeriesCollection();\n\t \t\n\t \t//Definir cada Estacao\n\t\t XYSeries aes1 = new XYSeries(\"Estação1\");\n\t\t XYSeries aes2 = new XYSeries(\"Estação2\");\n\t\t XYSeries aes3 = new XYSeries(\"Estação3\");\n\t\t XYSeries aes4 = new XYSeries(\"Estação4\");\n\t\t XYSeries aes5 = new XYSeries(\"Estação5\");\n\t\t XYSeries aes6 = new XYSeries(\"Estação6\");\n\t\t XYSeries aes7 = new XYSeries(\"Estação7\");\n\t\t XYSeries aes8 = new XYSeries(\"Estação8\");\n\t\t XYSeries aes9 = new XYSeries(\"Estação9\");\n\t\t XYSeries aes10 = new XYSeries(\"Estação10\");\n\t\t XYSeries aes11 = new XYSeries(\"Estação11\");\n\t\t XYSeries aes12 = new XYSeries(\"Estação12\");\n\t\t XYSeries aes13 = new XYSeries(\"Estação13\");\n\t\t XYSeries aes14 = new XYSeries(\"Estação14\");\n\t\t XYSeries aes15 = new XYSeries(\"Estação15\");\n\t\t XYSeries aes16 = new XYSeries(\"Estação16\");\n\t\t \n\t\t //Definir numero de utilizadores em simultaneo para aparece na Interface\n\t\t XYSeries au1 = new XYSeries(\"AU1\");\n\t\t XYSeries au2 = new XYSeries(\"AU2\");\n\t\t XYSeries au3 = new XYSeries(\"AU3\");\n\t\t XYSeries au4 = new XYSeries(\"AU4\");\n\t\t XYSeries au5 = new XYSeries(\"AU5\");\n\t\t XYSeries au6 = new XYSeries(\"AU6\");\n\t\t XYSeries au7 = new XYSeries(\"AU7\");\n\t\t XYSeries au8 = new XYSeries(\"AU8\");\n\t\t XYSeries au9 = new XYSeries(\"AU9\");\n\t\t XYSeries au10 = new XYSeries(\"AU10\");\n\t\t \n\t\t //Colocar estacoes no gráfico\n\t\t aes1.add(12,12);\n\t\t aes2.add(12,37);\n\t\t aes3.add(12,62);\n\t\t aes4.add(12,87);\n\t\t \n\t\t aes5.add(37,12);\n\t\t aes6.add(37,37);\n\t\t aes7.add(37,62);\n\t\t aes8.add(37,87);\n\t\t \n\t\t aes9.add(62,12); \n\t\t aes10.add(62,37);\n\t\t aes11.add(62,62);\n\t\t aes12.add(62,87);\n\t\t \n\t\t aes13.add(87,12);\n\t\t aes14.add(87,37);\n\t\t aes15.add(87,62);\n\t\t aes16.add(87,87);\n\t\t \n\t\t//Para a bicicleta 1\n\t\t \t\n\t\t\t for(Entry<String, String> entry : position1.entrySet()) {\n\t\t\t\t String key = entry.getKey();\n\t\t\t\t \n\t\t\t\t String[] part= key.split(\",\");\n\t\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t\t \n\t\t\t\t au1.add(keyX,keyY);\n\t\t\t }\n\t\t \n\t\t\t //Para a bicicleta 2\n\t\t for(Entry<String, String> entry : position2.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au2.add(keyX,keyY);\n\t\t }\n\t\t \n\t\t //Para a bicicleta 3\n\t\t for(Entry<String, String> entry : position3.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au3.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position4.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au4.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position5.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au5.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position6.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au6.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position7.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au7.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position8.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au8.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position9.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au9.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position10.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au10.add(keyX,keyY);\n\t\t }\n\t\t \n\t\t //Add series to dataset\n\t\t dataset.addSeries(au1);\n\t\t dataset.addSeries(au2);\n\t\t dataset.addSeries(au3);\n\t\t dataset.addSeries(au4);\n\t\t dataset.addSeries(au5);\n\t\t dataset.addSeries(au6);\n\t\t dataset.addSeries(au7);\n\t\t dataset.addSeries(au8);\n\t\t dataset.addSeries(au9);\n\t\t dataset.addSeries(au10);\n\t\t \n\t\t \n\t\t dataset.addSeries(aes1);\n\t\t dataset.addSeries(aes2);\n\t\t dataset.addSeries(aes3);\n\t\t dataset.addSeries(aes4);\n\t\t dataset.addSeries(aes5);\n\t\t dataset.addSeries(aes6);\n\t\t dataset.addSeries(aes7);\n\t\t dataset.addSeries(aes8);\n\t\t dataset.addSeries(aes9);\n\t\t dataset.addSeries(aes10);\n\t\t dataset.addSeries(aes11);\n\t\t dataset.addSeries(aes12);\n\t\t dataset.addSeries(aes13);\n\t\t dataset.addSeries(aes14);\n\t\t dataset.addSeries(aes15);\n\t\t dataset.addSeries(aes16);\n\t\t \n\t\t return dataset;\n\t }", "void getFreeStream () { \n /* MODS 19 Jan 00 whole routine*/\n double rgas = 1716.; /* ft2/sec2 R */\n double gama = 1.4;\n double height_m = alt_val/lconv;\n double mu0 = .000000362;\n double g0 = 32.2;\n\n switch (planet) {\n case 0: // Earth standard day\n if (height_m <= 36152.) { // Troposphere\n ts0 = 518.6 - 3.56 * height_m/1000.;\n ps0 = 2116. * Math.pow(ts0/518.6,5.256);\n } else if (height_m >= 36152. && height_m <= 82345.) { // Stratosphere\n ts0 = 389.98;\n ps0 = 2116. * .2236 *\n Math.exp((36000.-height_m)/(53.35*389.98));\n } else if (height_m >= 82345.) {\n ts0 = 389.98 + 1.645 * (height_m-82345)/1000.;\n ps0 = 2116. *.02456 * Math.pow(ts0/389.98,-11.388);\n }\n \n { \n double temf = ts0 - 459.6;\n if (temf <= 0.0) temf = 0.0; \n rho_EN = ps0/(rgas * ts0);\n rho_SI = 1.225; // kg/m3\n \n /* Eq 1:6A Domasch - effect of humidity \n */\n double pvap = rlhum*(2.685+.00354*Math.pow(temf,2.245))/100.;\n rho_EN = (ps0 - .379*pvap)/(rgas * ts0); \n viscos = mu0 * 717.408/(ts0 + 198.72)*Math.pow(ts0/518.688,1.5);\n }\n break;\n\n case 1: // Mars - curve fit of orbiter data\n rgas = 1149.; /* ft2/sec2 R */\n gama = 1.29;\n rlhum = 0.0;\n\n if (height_m <= 22960.) {\n ts0 = 434.02 - .548 * height_m/1000.;\n ps0 = 14.62 * Math.pow(2.71828,-.00003 * height_m);\n }\n if (height_m > 22960.) {\n ts0 = 449.36 - 1.217 * height_m/1000.;\n ps0 = 14.62 * Math.pow(2.71828,-.00003 * height_m);\n }\n rho_EN = ps0/(rgas*ts0);\n rho_SI = 515.378819 * rho_EN;\n viscos = mu0 * 717.408/(ts0 + 198.72)*Math.pow(ts0/518.688,1.5);\n break;\n\n case 2: // water -- constant density\n height_m = -alt_val/lconv;\n rlhum = 100.;\n\n ts0 = 520.;\n // for oceanic water (it is 1027 kg/m3). FoilSimIII has it as 1.9927 slug/ft3\n // One slug has a mass of 32.174049 lb or 14.593903 kg \n rho_EN = 1.9927; \n rho_SI = 1027; // this is rho_EN * 515.378819\n\n ps0 = (2116. - rho_EN * g0 * height_m);\n mu0 = .0000272;\n viscos = mu0 * 717.408/(ts0 + 198.72)*Math.pow(ts0/518.688,1.5);\n break;\n case 3: // specify air temp and pressure \n rho_EN = ps0/(rgas*ts0);\n // reiplot_trace_counto temf\n {\n double temf = ts0 - 459.6;\n double pvap = rlhum*(2.685+.00354*Math.pow(temf,2.245))/100.;\n rho_EN = (ps0 - .379*pvap)/(rgas * ts0); \n }\n\n rho_SI = 515.378819 * rho_EN;\n viscos = mu0 * 717.408/(ts0 + 198.72)*Math.pow(ts0/518.688,1.5);\n break;\n\n case 4: // specify fluid density and viscosity\n rlhum = 0.0;\n ps0 = 2116.;\n break;\n\n case 5: // Venus - surface conditions\n rgas = 1149.; \n gama = 1.29;\n rlhum = 0.0;\n\n ts0 = 1331.6;\n ps0 = 194672.;\n\n rho_EN = ps0/(rgas*ts0);\n rho_SI = 515.378819 * rho_EN;\n viscos = mu0 * 717.408/(ts0 + 198.72)*Math.pow(ts0/518.688,1.5);\n default:\n }\n\n set_q0();\n // pt0 = ps0 + q0_EN;\n\n return;\n }", "public void soin() {\n if (!autoriseOperation()) {\n return;\n }\n if (tamagoStats.getXp() >= 2) {\n incrFatigue(-3);\n incrHumeur(3);\n incrFaim(-3);\n incrSale(-3);\n incrXp(-2);\n\n if (tamagoStats.getPoids() == 0) {\n incrPoids(3);\n } else if (tamagoStats.getPoids() == TamagoStats.POIDS_MAX) {\n incrPoids(-3);\n }\n\n setEtatPiece(Etat.NONE);\n tamagoStats.setEtatSante(Etat.NONE);\n\n setChanged();\n notifyObservers();\n }\n }", "public void populateTable() {\n DefaultTableModel dtm = (DefaultTableModel)tblSalesPersonCommision.getModel();\n dtm.setRowCount(0);\n // for(OrderList orderlist:salesperson.getOrderlistcatalog().getSalesPersonOrder()){\n // for(Order order:salesperson.getOrderListSalesPerson().getOrderList()){ \n // for(OrderList orderlist:salesperson.getOrderlistcatalog().getOrCatalog()){\n // for(SalesPerson salesperson :business.getEmployeedirectory().getSalesPersonList()){\n \n for(OrderList orderlist:salesperson.getOrderlistcatalog().getOrCatalog()){\n Object [] row = new Object[4];\n // row[0]=.getCustomer().getCustomerId();\n // row[1]= market.getCustomer().getCustomerName();\n row[0]=orderlist;\n row[1]=orderlist.getOrdertotalprice();\n row[2]=orderlist.getSalespersoncomission();\n row[3]=orderlist.getTotalorderlistquantity();\n //3 tcomission = tcomission + orderlist.getSalespersoncomission();\n //3 totalquantity = totalquantity + orderlist.getTotalorderlistquantity();\n //3 totalorderprice = totalorderprice + orderlist.getOrdertotalprice();\n \n // row[0]=order;\n // row[1]=order.getAmountprice();\n \n dtm.addRow(row);\n // }\n // }\n } \n //2 salesperson.getOrderlistcatalog().setTotalquantitypersalesperson(totalquantity);\n //2 salesperson.getOrderlistcatalog().setTotalcommision(tcomission);\n //2 salesperson.getOrderlistcatalog().setTotalorderlistcsatalogprice(totalorderprice);\n}", "public void create_dataset(double sampling_rate, double freq, int n) {\n double amplitude = 10.0d;\n double constant = freq/sampling_rate*2.0d*Math.PI;\n double sumTWD=0.0d;\n\n for (int i = 0; i < n; i++) {\n NavigationTools.TWD.add((Math.sin((double)i*constant)+Math.random()*0.2d)*amplitude);\n sumTWD += NavigationTools.TWD.getLast();\n }\n\n NavigationTools.TWD_longAVG=sumTWD/(double)n;\n }", "public static void main(String[] args) throws HibernateException, SQLException, IOException {\n\t\tSystem.out.println(\"MainPeakPrice start\");\n\t\t\n\t\tfinal int companyId = Integer.valueOf(args[0]);\n\t\tfinal int scoringModelId = Integer.valueOf(args[1]);\n\t\tfinal int minDay = Integer.valueOf(args[2]); //minimum day after article publish date for window to search for extreme stock price\n\t\tfinal int maxDay = Integer.valueOf(args[3]); //maximum day after article publish date for window to search for extreme stock price\n\t\t\n\t\tSystem.out.println(\"companyId: \" + companyId);\n\t\tSystem.out.println(\"scoringModelId: \" + scoringModelId);\n\t\tSystem.out.println(\"minDay to maxDay: \" + minDay + \" - \" + maxDay);\n\t\t\n\t\tQuery query = SessionManager.createQuery(\"from StockData where company.id = :companyId order by dayIndex\");\n\t\tquery.setParameter(\"companyId\", companyId);\n\t\t\n\t\tList<StockData> stockDataList = Utilities.convertGenericList(query.list());\n\t\t\n\t\tSystem.out.println(\"found stock data. size: \" + stockDataList.size());\n\t\t\n\t\tList<Integer> dayIndexes = MainVolatility.getArticleDayIndexes(scoringModelId);\n\t\tSystem.out.println(\"found day indexes for scoring model. size: \" + dayIndexes.size());\n\t\t\n\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(outputFilePrefix + companyId + \"_\" + scoringModelId + \".csv\"));\n\t\twriter.write(\"article_day_index,stock_day_index,day_offset_high,log_change_high,day_offset_low,log_change_low\");\n\t\twriter.newLine();\n\t\t\n\t\tfor (Integer dayInd : dayIndexes) {\n\t\t\tListIterator<StockData> iter = ExtremaUtility.buildIteratorWithDayIndexEqualsOrGreater(dayInd, stockDataList);\n\t\t\tStockData startSd = iter.next();\n\t\t\t\n\t\t\tfinal int curMinDay = startSd.getDayIndex() + minDay;\n\t\t\tfinal int curMaxDay = startSd.getDayIndex() + maxDay;\n\t\t\tStockData[] minLowMaxHigh = ExtremaUtility.findMinLowAndMaxHigh(curMinDay, curMaxDay, iter);\n\t\t\tStockData minLow = minLowMaxHigh[0];\n\t\t\tStockData maxHigh = minLowMaxHigh[1];\n\t\t\t\n\t\t\tint maxHighOffset = maxHigh.getDayIndex() - startSd.getDayIndex();\n\t\t\tdouble adjustment = (maxHigh.getAdjustedClose() / maxHigh.getClose());\n\t\t\tdouble maxHighLogRatio = Math.log(adjustment * maxHigh.getHigh() / startSd.getAdjustedClose());\n\t\t\t\n\t\t\tint minLowOffset = minLow.getDayIndex() - startSd.getDayIndex();\n\t\t\tadjustment = (minLow.getAdjustedClose() / minLow.getClose());\n\t\t\tdouble minLowLogRatio = Math.log(adjustment * minLow.getLow() / startSd.getAdjustedClose());\n\t\t\t\n\t\t\twriter.write(dayInd + \",\" + startSd.getDayIndex() + \",\" + maxHighOffset + \",\" + maxHighLogRatio + \",\" \n\t\t\t\t\t+ minLowOffset + \",\" + minLowLogRatio);\n\t\t\twriter.newLine();\n\t\t}\n\t\t\n\t\twriter.close();\n\t\tSessionManager.closeAll();\n\t}", "@Test\n\tpublic void armarGananciasDeLosResultantes() {\n\t\t/*\n\t\t * me salieron 24 arboles, que me interesan los campos \n\t\t * NodeID_24 : para saber que hoja del arbol fue \n\t\t * PredictedProbability_2_24 : para saber que probabilidad de baja mas 2 fue \n\t\t * SampleAssignment_24 : para saber si fue tomado para test o train tengoq ue correr el script siguient para persistirlo en la DB\n\t\t * \n\t\t * los nombres de las variables van como anteriorlmente , el inicial no\n\t\t * tiene subindice, pero se lo cambi oy le pongo 0 cosa de que arranque\n\t\t * en 0\nIF (A_default_prob >= 0.025 AND clase_int=2) A_default_ganancia=7800. \nEXECUTE. \nRECODE A_default_ganancia (SYSMIS=-200). \nEXECUTE.\n\nSAVE TRANSLATE /TYPE=ODBC \n /CONNECT='DSN=dmkd-dmf;' \n /ENCRYPTED \n /MISSING=RECODE \n /SQL='CREATE TABLE historico_201503_default_tree_result (numero_de_cliente double , foto_mes double , A_default_node double , A_default_prob double, A_default_ganancia double )' \n /REPLACE \n /TABLE='SPSS_TEMP' \n /KEEP=numero_de_cliente, foto_mes, A_default_node, A_default_prob ,A_default_ganancia\n /SQL='INSERT INTO historico_201503_default_tree_result (numero_de_cliente, foto_mes, A_default_node, A_default_prob,A_default_ganancia) SELECT numero_de_cliente, foto_mes, A_default_node, A_default_prob,A_default_ganancia FROM SPSS_TEMP' \n /SQL='DROP TABLE SPSS_TEMP'. \nEXECUTE.\nDATASET CLOSE.\nEXECUTE.\n\n\nPredictedProbability_2_24\n\t\t * \n\t\t */\n\t\t// de 0 a 24\n\t\tString separator = System.getProperty(\"line.separator\");\n\t\tString outFolder = ArbolFileSources.userFolder + \"/Dropbox/julio_box/educacion/maestria_explotacion_datos_uba/materias/cuat_2_dm_finanzas/entregable/historia/\";\n\t\tString timeStampFolder = UtilidadesGenerales.getTimeStamp(null, null);\n\t\tStringBuilder build = new StringBuilder();\n\t\tfor (int i = 0; i < 25; i++) {\n\t\t\t\n\t\t\tString nombreProba = \"PredictedProbability_2_\"+i;\n\t\t\tString nombreGanancia= \"ganancia_\"+i;\n\t\t\tString nombreNodo= \"NodeID_\"+i;\n\t\t\tString nombreTrain= \"SampleAssignment_\"+i;\n\t\t\tString nombreTabla = \"corridaCiega_\"+i;\n\t\t\t\n\t\t\t/* recode de ganancia */\n\t\t\tbuild.append(\"IF (PredictedProbability_2_\").append(i).append(\" >= 0.025 AND clase_int=2 ) ganancia_\").append(i).append(\"=7800.\").append(separator);\n\t\t\tbuild.append(\"EXECUTE.\").append(separator);\n\t\t\tbuild.append(\"RECODE ganancia_\").append(i).append(\"(SYSMIS=-200).\").append(separator);\n\t\t\tbuild.append(\"EXECUTE.\").append(separator);\n\t\t\t\n\t\t\t \n\t\t\t/* save sql */\n\t\t\tbuild.append(\"SAVE TRANSLATE /TYPE=ODBC\").append(separator);\n\t\t\tbuild.append(\"/CONNECT='DSN=dmkd-dmf;'\").append(separator);\n\t\t\tbuild.append(\"/ENCRYPTED \").append(separator);\n\t\t\tbuild.append(\"/MISSING=RECODE \").append(separator);\n\t\t\tbuild.append(\"/SQL='CREATE TABLE \").append(nombreTabla).append(\" (numero_de_cliente double , foto_mes double , '+\").append(separator);\n\t\t\t\n\t\t\tbuild.append(\"' \").append(nombreProba).append(\" double , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreGanancia).append(\" double , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreNodo).append(\" double , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreTrain).append(\" double ) '\").append(separator);\n\t\t\t\n \n\t\t\tbuild.append(\"/REPLACE \").append(separator);\n\t\t\tbuild.append(\"/TABLE='SPSS_TEMP' \").append(separator);\n\t\t\tbuild.append(\"/KEEP=numero_de_cliente, foto_mes, \").append(separator);\n\t\t\tbuild.append(nombreProba).append(\" , \").append(separator);\n\t\t\tbuild.append(nombreGanancia).append(\" , \").append(separator);\n\t\t\tbuild.append(nombreNodo).append(\" , \").append(separator);\n\t\t\tbuild.append(nombreTrain).append(\" \").append(separator);\n\t\t\t\n\t\t\tbuild.append(\"/SQL='INSERT INTO \").append(nombreTabla).append(\" (numero_de_cliente, foto_mes, '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreProba).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreGanancia).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreNodo).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreTrain).append(\" '+\").append(separator);\n\t\t\tbuild.append(\"' ) SELECT numero_de_cliente, foto_mes, '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreProba).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreGanancia).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreNodo).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreTrain).append(\" '+\").append(separator);\n\t\t\tbuild.append(\"' FROM SPSS_TEMP'\").append(separator);\n\t\t\t\n\t\t\tbuild.append(\"/SQL='DROP TABLE SPSS_TEMP'.\").append(separator); \n\t\t\tbuild.append(\"EXECUTE.\").append(separator).append(separator);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tUtilidadesGenerales.writeToFile(build.toString(), \"UTF-8\", outFolder + timeStampFolder + \"_syntax_corridaCiega_.txt\");\n\t}", "double agression();", "void getData() throws SQLException, IOException {\n\t\tint i = 0;\n\t\twhile (cu.rst.next()) {\n\t\t\t\n\t\t\t\n\t\t\tcm[i].setDetails(cu.rst.getInt(1), cu.rst.getString(3),\n\t\t\t\t\tcu.rst.getString(4), cu.rst.getString(5), cu.rst.getString(6),\n\t\t\t\t\tcu.rst.getInt(7));\n\t\t\ti++;\n\n\t\t}\n\t\tSystem.out.println(\"**************************DETAILS TAKEN**************************\");\n\n\t}", "public XYDataset getLineDataset() {\n\n // Initialize some variables\n XYSeriesCollection dataset = new XYSeriesCollection();\n XYSeries series[][] = new XYSeries[rois.length][images.length];\n String seriesname[][] = new String[rois.length][images.length];\n int currentSlice = ui.getOpenMassImages()[0].getCurrentSlice();\n ArrayList<String> seriesNames = new ArrayList<String>();\n String tempName = \"\";\n map = new HashMap<String, Pair<MimsPlus, Roi>>();\n double stat;\n\n // Image loop\n for (int j = 0; j < images.length; j++) {\n MimsPlus image;\n if (images[j].getMimsType() == MimsPlus.HSI_IMAGE || images[j].getMimsType() == MimsPlus.RATIO_IMAGE) {\n image = images[j].internalRatio;\n } else {\n image = images[j];\n }\n // Roi loop\n for (int i = 0; i < rois.length; i++) {\n\n // Set the Roi to the image.\n Integer[] xy = ui.getRoiManager().getRoiLocation(rois[i].getName(), image.getCurrentSlice());\n rois[i].setLocation(xy[0], xy[1]);\n image.setRoi(rois[i]);\n\n // Stat loop\n for (int k = 0; k < stats.length; k++) {\n\n // Generate a name for the dataset.\n String prefix = \"\";\n if (image.getType() == MimsPlus.MASS_IMAGE || image.getType() == MimsPlus.RATIO_IMAGE) {\n prefix = \"_m\";\n }\n if (seriesname[i][j] == null) {\n tempName = \"mean\" + prefix + image.getRoundedTitle(true) + \"_r\" + rois[i].getName();\n int dup = 1;\n while (seriesNames.contains(tempName)) {\n tempName = \"mean\" + prefix + image.getRoundedTitle(true) + \"_r\" + rois[i].getName() + \" (\" + dup + \")\";\n dup++;\n }\n seriesNames.add(tempName);\n seriesname[i][j] = tempName;\n }\n series[i][j] = new XYSeries(seriesname[i][j]);\n ij.gui.ProfilePlot profileP = new ij.gui.ProfilePlot(image);\n double[] newdata = profileP.getProfile();\n for (int p = 0; p < newdata.length; p++) {\n series[i][j].add(p, newdata[p]);\n }\n Pair tuple = new Pair(images[j], rois[i]);\n map.put(seriesname[i][j], tuple);\n\n } // End of Stat\n } // End of Roi\n } // End of Image\n\n // Populate the final data structure.\n for (int i = 0; i < rois.length; i++) {\n for (int j = 0; j < images.length; j++) {\n dataset.addSeries(series[i][j]);\n }\n }\n\n ui.getOpenMassImages()[0].setSlice(currentSlice);\n\n return dataset;\n }", "protected abstract double getOLAmountSum( int OL_W_ID, int O_D_ID, int O_ID, Timestamp OL_DELIVERY_D );", "private void getSpendingData() {\n mort = 0;\n cred = 0;\n loan = 0;\n auto = 0;\n groc = 0;\n medi = 0;\n util = 0;\n ente = 0;\n othe = 0;\n for (int i = 0; i < remindersTable.getRowCount(); i++) {\n if (remindersTable.getValueAt(i, 0).toString().equals(\"true\")) {\n // do nothing...we want spending only\n } else {\n switch (remindersTable.getValueAt(i, 4).toString()) {\n case (\"mortgage\"):\n mort = mort + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"credit\"):\n cred = cred + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"loans\"):\n loan = loan + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"auto\"):\n auto = auto + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"utilities\"):\n util = util + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"grocery\"):\n groc = groc + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"medical\"):\n medi = medi + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"entertainment\"):\n ente = ente + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"other\"):\n othe = othe + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n default:\n // no match ... do nothing \n }\n }\n }\n }", "public double getSale()\n {\n return sale;\n }", "public void setDatasets(VerifiedSNP snp, String phenotype) {\r\n int overallMaxN = 0;\r\n double overallMaxSEM = 0;\r\n double overallMinSEM = -1;\r\n double overallMaxPercentile = 0;\r\n double overallMinPercentile = -1;\r\n double overallMaxMedian = 0;\r\n double overallMinMedian = -1;\r\n\r\n JsonObject snpDataObject = snp.getDataBaseEntry().getDataObject();\r\n \r\n //System.out.println(\"snpDataObject: \" + snpDataObject.toJson());\r\n \r\n Map <String, JsonObject> dataObjects = new HashMap();\r\n \r\n for (String sex : new String[] {\"female\", \"male\"}) {\r\n dataObject = Json.createObject();\r\n dataObjects.put(sex, dataObject);\r\n \r\n dataObject.put(\"sex\", sex);\r\n dataObject.put(\"SNP ID\", snp.getDataBaseEntry().getAnnotation().get(\"Id\"));\r\n dataObject.put(\"phenotype\", phenotype);\r\n \r\n for (String genotype : new String[] {\"AA\", \"AB\", \"BB\"}) { \r\n //System.out.println(\"phenotype: \" + phenotype);\r\n //System.out.println(\"phenotype: \" + phenotype + \", object: \" + snpDataObject.getObject(phenotype).getObject(sex));\r\n JsonObject genotypeObject = snpDataObject.getObject(phenotype).getObject(sex).getObject(genotype);\r\n //System.out.println(\"genotypeObject: \" + genotypeObject.toJson());\r\n if (snpDataObject.getObject(phenotype).getBoolean(\"longitudinal\")) {\r\n List <String> nData = converter.jsonArrayToList(genotypeObject.get(\"N\"));\r\n String nMin = converter.minInteger(nData);\r\n String nMax = converter.maxInteger(nData);\r\n \r\n if (genotypeObject.hasKey(\"median\")) {\r\n List <String> medianData = converter.jsonArrayToList(genotypeObject.get(\"median\"));\r\n double medianMax = Double.parseDouble(converter.maxDouble(medianData)); \r\n if (medianMax > overallMaxMedian) {\r\n overallMaxMedian = medianMax;\r\n }\r\n double medianMin = Double.parseDouble(converter.minDouble(medianData));\r\n if (medianMin < overallMinMedian || overallMinMedian < 0) {\r\n overallMinMedian = medianMin;\r\n } \r\n }\r\n \r\n if (genotypeObject.hasKey(\"upper SEM\")) {\r\n List <String> upperSEMData = converter.jsonArrayToList(genotypeObject.get(\"upper SEM\"));\r\n double semMax = Double.parseDouble(converter.maxDouble(upperSEMData));\r\n if (semMax > overallMaxSEM) {\r\n overallMaxSEM = semMax;\r\n } \r\n }\r\n if (genotypeObject.hasKey(\"lower SEM\")) {\r\n List <String> lowerSEMData = converter.jsonArrayToList(genotypeObject.get(\"lower SEM\"));\r\n double semMin = Double.parseDouble(converter.minDouble(lowerSEMData));\r\n if (semMin < overallMinSEM || overallMinSEM < 0) {\r\n overallMinSEM = semMin;\r\n }\r\n }\r\n if (genotypeObject.hasKey(\"97.5%\")) {\r\n List <String> upperPercentileData = converter.jsonArrayToList(genotypeObject.get(\"97.5%\"));\r\n double percentileMax = Double.parseDouble(converter.maxDouble(upperPercentileData));\r\n if (percentileMax > overallMaxPercentile) {\r\n overallMaxPercentile = percentileMax;\r\n }\r\n }\r\n if (genotypeObject.hasKey(\"2.5%\")) {\r\n List <String> lowerPercentileData = converter.jsonArrayToList(genotypeObject.get(\"2.5%\"));\r\n double percentileMin = Double.parseDouble(converter.minDouble(lowerPercentileData));\r\n if (percentileMin < overallMinPercentile || overallMinPercentile < 0) {\r\n overallMinPercentile = percentileMin;\r\n }\r\n }\r\n\r\n\r\n String info = \"\";\r\n\r\n if (!nMax.equals(\"<5\")) {\r\n int currMax = Integer.parseInt(nMax);\r\n if (currMax > overallMaxN) {\r\n overallMaxN = currMax; \r\n } \r\n } \r\n String separator = \"\";\r\n if (nMin.equals(\"0\") && nMax.equals(\"0\")) {\r\n info = \"(no individuals)\";\r\n separator = \" \";\r\n }\r\n else if (nMin.equals(\"<5\") && nMax.equals(\"<5\")) {\r\n info = \"(less than 5 individuals)\";\r\n separator = \" \";\r\n }\r\n else {\r\n info = \"n ∈ [\" + nMin + \", \" + nMax + \"]\";\r\n separator = \", \";\r\n }\r\n jsonHelper.put(genotypeObject, \"labels\", Arrays.asList(new String[] {genotype + separator + info}));\r\n }\r\n dataObject.put(genotype, genotypeObject); \r\n \r\n }\r\n \r\n JsonObject numberObject = Json.createObject();\r\n for (String genotype : new String[] {\"AA\", \"AB\", \"BB\"}) {\r\n numberObject.put(genotype, dataObject.getObject(genotype).getArray(\"N\"));\r\n }\r\n //numberPlot.sendData(numberObject);\r\n }\r\n \r\n // when SEM or percentile data is missing, medians might provide the extreme values\r\n if (overallMinSEM > overallMinMedian) {\r\n overallMinSEM = overallMinMedian;\r\n }\r\n if (overallMinPercentile > overallMinMedian) {\r\n overallMinPercentile = overallMinMedian;\r\n }\r\n if (overallMaxSEM < overallMaxMedian) {\r\n overallMaxSEM = overallMaxMedian;\r\n }\r\n if (overallMaxPercentile < overallMaxMedian) {\r\n overallMaxPercentile = overallMaxMedian;\r\n }\r\n \r\n //System.out.println(\"dataObjects: \" + dataObjects);\r\n \r\n // enter extreme values and send\r\n for (String sex : new String[] {\"female\", \"male\"}) {\r\n dataObjects.get(sex).put(\"SEM min\", overallMinSEM);\r\n dataObjects.get(sex).put(\"SEM max\", overallMaxSEM);\r\n dataObjects.get(sex).put(\"percentile max\", overallMaxPercentile);\r\n dataObjects.get(sex).put(\"percentile min\", overallMinPercentile);\r\n dataObjects.get(sex).put(\"n max\", overallMaxN);\r\n }\r\n femaleChart.sendData(dataObjects.get(\"female\"));\r\n maleChart.sendData(dataObjects.get(\"male\"));\r\n plotDataWindow.setTab(\"1\", dataObjects.get(\"female\").toJson(), \"female\");\r\n plotDataWindow.setTab(\"2\", dataObjects.get(\"male\").toJson(), \"male\"); \r\n }", "private void generateData(int popsize, int ntrials) {\n data = new double[ntrials][100];\n \n for (int i = 0; i < ntrials; i++) {\n Population pop = new Population(popsize, rand);\n for (int j = 0; j < 100; j++) {\n data[i][j] = pop.totalA();\n pop.advance();\n }\n }\n }", "private void updateComponents() {\n try {\n java.sql.Date cDate = new java.sql.Date(System.currentTimeMillis());\n java.sql.Date sDate = Date.valueOf(\"1971-01-01\");\n DefaultTableModel tData = or.getOrderData(sDate,cDate);\n oTable.setModel(tData);\n setSales(tData);\n } catch (Exception ex) {\n System.out.println(ex);\n }\n }", "private void getCal() {\n \t\t\n \t\tif(isnew) {\n \t\t\tString[] parts0, parts1, parts2, parts3, parts4, parts5, parts6;\n \t\t\t\n \t\t\tparts0 = asciiheader[9].split(\"\\t\");\n \t\t\tparts1 = asciiheader[10].split(\"\\t\");\n \t\t\tparts2 = asciiheader[11].split(\"\\t\");\n \t\t\tparts3 = asciiheader[12].split(\"\\t\");\n \t\t\tparts4 = asciiheader[13].split(\"\\t\");\n \t\t\tparts5 = asciiheader[14].split(\"\\t\");\n \t\t\tparts6 = asciiheader[15].split(\"\\t\");\n \t\t\t\n \t\t\tfor(int i = 0; i < 3; i++) {\n \t\t\t\tRGBcal[i] = Float.parseFloat(parts0[i]);\n \t\t\t\tvlam[i] = Float.parseFloat(parts1[i]);\n \t\t\t\tvp[i] = Float.parseFloat(parts2[i]);\n \t\t\t\tmel[i] = Float.parseFloat(parts3[i]);\n \t\t\t\tvmac[i] = Float.parseFloat(parts4[i]);\n \t\t\t\tsmac[i] = Float.parseFloat(parts5[i]);\n \t\t\t\tCLAcal[i] = Float.parseFloat(parts6[i]);\n \t\t\t}\n \t\t\tCLAcal[3] = Float.parseFloat(parts6[3]);\n \t\t\treturn;\n \n \t\t}\n \t\t\n \t\tint temp = 0;\n \t\tint j = 0;\n \t\tString workingDirectory = new String(System.getProperty(\"user.dir\")+ \"\\\\src\\\\data\");\n \t\t\n \t\tString[] s = loadStrings(workingDirectory + \"\\\\Day12_Cal_Values.txt\");\n \t\t\n \n \t\t//Scone/macula\n \t\tfor(int i = 0; i < s[1].length(); i++) {\n \t\t\tif(s[1].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\t//smac[j] = float(s[1].substring(temp, i));\n \t\t\t\t\tsmac[j] = Float.parseFloat(s[1].substring(temp, i));\n \t\t\t\t\tj++;\n \t\t\t\t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t\t}\n \t\tsmac[j] = Float.parseFloat(s[1].substring(temp, s[1].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \n \t\t//Vlamda/macula\n \t\tfor(int i = 0; i < s[2].length(); i++) {\n \t\t\tif(s[2].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\tvmac[j] = Float.parseFloat(s[2].substring(temp, i));\n \t\t\t\t\tj++;\n \t\t\t\t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t\t}\n \t\tvmac[j] = Float.parseFloat(s[2].substring(temp, s[2].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \n \t\t//Melanopsin\n \t\tfor(int i = 0; i < s[3].length(); i++) {\n \t\t\tif(s[3].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\tmel[j] = Float.parseFloat(s[3].substring(temp, i));\n \t\t\t\t\tj++;\n \t\t\t\t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t}\n \t\tmel[j] = Float.parseFloat(s[3].substring(temp, s[3].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \n \t\t//Vprime\n \t\tfor(int i = 0; i < s[4].length(); i++) {\n \t\t\tif(s[4].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\tvp[j] = Float.parseFloat(s[4].substring(temp, i));\n \t\t\t\t\tj++;\n \t\t\t\t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t\t}\n \t\tvp[j] = Float.parseFloat(s[4].substring(temp, s[4].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \n \t\t//Vlamda\n \t\tfor(int i = 0; i < s[5].length(); i++) {\n \t\t\tif(s[5].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\tvlam[j] = Float.parseFloat(s[5].substring(temp, i));\n \t\t\t\t\tj++;\n \t\t\t\t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t\t}\n \t\tvlam[j] = Float.parseFloat(s[5].substring(temp, s[5].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \n \t\t//CLA\n \t\tfor(int i = 0; i < s[8].length(); i++) {\n \t\t\tif(s[8].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\tCLAcal[j] = Float.parseFloat(s[8].substring(temp, i));\n \t\t\t\t\tj++;\n \t\t\t\t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t\t}\n \t\tCLAcal[j] = Float.parseFloat(s[8].substring(temp, s[8].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \n \t\t//RGBcal\n \t\ts = loadStrings(workingDirectory + \"\\\\Day12 RGB Values.txt\");\n \t\tfor(int i = 0; i < s[ID].length(); i++) {\n \t\t\tif(s[ID].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\tRGBcal[j] = Float.parseFloat(s[ID].substring(temp, i));\n \t\t\t\t\tj++;\n \t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t}\n \t\tRGBcal[j] = Float.parseFloat(s[ID].substring(temp, s[ID].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \t}", "public JSONObject getGSTR2Summary(JSONObject params) throws ServiceException, JSONException {\n JSONObject object = new JSONObject();\n JSONObject jMeta = new JSONObject();\n JSONArray jarrColumns = new JSONArray();\n JSONArray jarrRecords = new JSONArray();\n JSONArray dataJArr = new JSONArray();\n JSONArray array = new JSONArray();\n JSONArray array1 = new JSONArray();\n String start = params.optString(\"start\");\n String limit = params.optString(\"limit\");\n String companyId = params.optString(\"companyid\");\n Company company = null;\n KwlReturnObject companyResult = null;\n if (params.optBoolean(\"isforstore\", false)) {\n /**\n * If request for Section combo box\n */\n return object = getGSTR2ReportSectionCombo();\n }\n companyResult = accountingHandlerDAOobj.getObject(Company.class.getName(), companyId);\n company = (Company) companyResult.getEntityList().get(0);\n params.put(\"isPurchase\", true);\n JSONObject reqParams = params;\n /* * before starting sectional data need to get column no for Product Tax\n * Class (HSN)\n */\n int colnum = 0;\n HashMap fieldparams = new HashMap<>();\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_Product_Master_ModuleId, \"Custom_\" + Constants.HSN_SACCODE));\n KwlReturnObject kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n List<FieldParams> fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n }\n reqParams.put(\"hsncolnum\", colnum);\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_Product_Master_ModuleId, \"Custom_\" + Constants.GSTProdCategory));\n kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n }\n params.put(\"taxclasscolnum\", colnum);\n /**\n * get State column no for Invoice module\n */\n int colnumforstate = fieldManagerDAOobj.getColumnFromFieldParams(Constants.STATE, companyId, Constants.Acc_Vendor_Invoice_ModuleId, 0);\n params.put(\"statecolnum\", colnumforstate);\n /**\n * Get Local state Value\n */\n String entityId = params.optString(\"entityid\");\n params.put(\"companyid\", companyId);\n params.put(\"entityid\", entityId);\n String localState = fieldManagerDAOobj.getStateForEntity(params);\n params.put(\"localState\", localState);\n params.put(\"entityState\", localState);\n /**\n * Get Entity Value and its column no for invoice\n */\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_Vendor_Invoice_ModuleId, \"Custom_\" + Constants.ENTITY));\n String fieldid = \"\";\n kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n fieldid = fieldParams.getId();\n }\n String entityValue = params.optString(\"entity\");\n String ids = fieldManagerDAOobj.getIdsUsingParamsValueWithoutInsert(fieldid, entityValue);\n reqParams.put(\"invoiceentitycolnum\", colnum);\n reqParams.put(\"invoiceentityValue\", ids);\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_Make_Payment_ModuleId, \"Custom_\" + Constants.ENTITY));\n kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n fieldid = fieldParams.getId();\n }\n ids = fieldManagerDAOobj.getIdsUsingParamsValueWithoutInsert(fieldid, entityValue);\n reqParams.put(\"paymententitycolnum\", colnum);\n reqParams.put(\"paymententityValue\", ids);\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_Debit_Note_ModuleId, \"Custom_\" + Constants.ENTITY));\n kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n fieldid = fieldParams.getId();\n }\n ids = fieldManagerDAOobj.getIdsUsingParamsValueWithoutInsert(fieldid, entityValue);\n reqParams.put(\"cnentitycolnum\", colnum);\n reqParams.put(\"cnentityValue\", ids);\n\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_GENERAL_LEDGER_ModuleId, \"Custom_\" + Constants.ENTITY));\n kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n fieldid = fieldParams.getId();\n }\n ids = fieldManagerDAOobj.getIdsUsingParamsValueWithoutInsert(fieldid, entityValue);\n reqParams.put(\"jeentitycolnum\", colnum);\n reqParams.put(\"jeentityValue\", ids);\n \n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_Credit_Note_ModuleId, \"Custom_\" + Constants.ENTITY));\n kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n fieldid = fieldParams.getId();\n }\n ids = fieldManagerDAOobj.getIdsUsingParamsValue(fieldid, entityValue);\n reqParams.put(\"cnentitycolnum\", colnum);\n reqParams.put(\"cnentityValue\", ids);\n reqParams.put(\"Report_type\",\"gstr2\");\n reqParams.put(\"isGSTR1\",false);\n try {\n /**\n * Put Asset Disposal/ Acquire Invoice Dimension column number\n * details\n */\n putAssetInvoiceDimensionColumnDetails(params, reqParams);\n /**\n * Put Lease Sales Invoice Dimension column number details\n */\n putLeaseInvoiceDimensionColumnDetails(params, reqParams);\n getColumnModelForGSTSummary(jarrRecords, jarrColumns, params);\n \n JSONObject header= new JSONObject();\n header.put(\"typeofinvoice\", \"<b>\" + GSTRConstants.GSTR2_ToBeReconciledWithTheGSTPortal + \"</b>\");\n params.put(\"isViewRenderer\", false);\n dataJArr.put(header);\n \n reqParams.put(\"entitycolnum\", reqParams.optString(\"invoiceentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"invoiceentityValue\"));\n /**\n * Add Additional parameter to reqParams\n */\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"registrationType\", Constants.GSTRegType_Regular + \",\" + Constants.GSTRegType_Regular_ECommerce);\n params.put(\"CustomerType\", Constants.CUSTVENTYPE_NA + \",\" + Constants.CUSTVENTYPE_DEEMED_EXPORT + \",\" + Constants.CUSTVENTYPE_SEZ+ \",\" + Constants.CUSTVENTYPE_SEZWOPAY);\n params.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n// params.put(\"zerorated\", false);\n params.put(\"typeofjoinisleft\", true);\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_B2B);\n JSONObject b2bobj = getB2BInvoiceDetails(params, null);\n JSONObject B2B = new JSONObject();\n B2B = b2bobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(B2B);\n \n /**\n * CDN Invoices\n */\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"entitycolnum\", reqParams.optString(\"cnentitycolnum\"));\n params.put(\"registrationType\",Constants.GSTRegType_Regular+\",\"+Constants.GSTRegType_Regular_ECommerce);\n params.put(\"entityValue\", reqParams.optString(\"cnentityValue\"));\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_CDN);\n JSONObject cdnrobj = getCDNRInvoiceDetails(params, null);\n JSONObject CDNR = new JSONObject();\n CDNR = cdnrobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(CDNR);\n\n \n JSONObject header1= new JSONObject();\n header1.put(\"typeofinvoice\", \"<b>\" + GSTRConstants.GSTR2_ToBeUploadedOnTheGSTPortal + \"</b>\");\n dataJArr.put(header1); \n /**\n * B2B Unregistered Invoice\n */\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"registrationType\",Constants.GSTRegType_Unregistered);\n params.put(\"CustomerType\", Constants.CUSTVENTYPE_NA + \",\" + Constants.CUSTVENTYPE_DEEMED_EXPORT + \",\" + Constants.CUSTVENTYPE_SEZ+ \",\" + Constants.CUSTVENTYPE_SEZWOPAY);\n params.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n// params.put(\"zerorated\", false);\n params.put(\"typeofjoinisleft\", true);\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_B2B_unregister);\n b2bobj = getB2BInvoiceDetails(params, null);\n B2B = new JSONObject();\n B2B = b2bobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(B2B);\n /**\n * Import of Services\n */\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"CustomerType\", Constants.CUSTVENTYPE_Import);\n// params.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n params.put(\"isServiceProduct\", true);\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_ImpServices);\n params.put(GSTRConstants.ADD_LANDEDCOST_JOIN_FOR_IMPORT_INVOICES, true);\n params.put(\"excludetaxClassType\", true);\n params.put(\"typeofjoinisleft\", true);\n JSONObject exportobj = getB2BInvoiceDetails(params, null);\n JSONObject EXPORT = new JSONObject();\n EXPORT = exportobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(EXPORT);\n /**\n * Import of Goods\n */\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"CustomerType\", Constants.CUSTVENTYPE_Import);\n// params.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n params.put(\"isServiceProduct\", false);\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_ImpGoods);\n params.put(GSTRConstants.ADD_LANDEDCOST_JOIN_FOR_IMPORT_INVOICES, true);\n params.put(\"typeofjoinisleft\", true);\n params.put(\"excludetaxClassType\", true);\n exportobj = getB2BInvoiceDetails(params, null);\n EXPORT = new JSONObject();\n EXPORT = exportobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(EXPORT);\n \n\n /**\n * CDN Unregistered\n */\n JSONObject CDNUR = new JSONObject();\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"entitycolnum\", reqParams.optString(\"cnentitycolnum\"));\n params.put(\"registrationType\", Constants.GSTRegType_Unregistered);\n params.put(\"entityValue\", reqParams.optString(\"cnentityValue\"));\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_CDN_unregister);\n JSONObject cdnurobj = getCDNRInvoiceDetails(params, null);\n CDNUR = new JSONObject();\n CDNUR = cdnurobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(CDNUR);\n\n /**\n * NIL Rated\n */\n \n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"goodsreceiptentitycolnum\", reqParams.optString(\"invoiceentitycolnum\"));\n params.put(\"goodsreceiptentityValue\", reqParams.optString(\"invoiceentityValue\"));\n params.put(\"entitycolnum\", reqParams.optString(\"invoiceentitycolnum\"));\n params.put(\"entityValue\", reqParams.optString(\"invoiceentityValue\"));\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_nilRated);\n params.put(\"registrationType\", Constants.GSTRegType_Composition);\n params.put(\"typeofjoinisleft\", true);\n JSONObject exemptComposition = getExemptPurchaseInvoiceDetails(params);\n JSONObject exempComp = exemptComposition.getJSONArray(\"summaryArr\").getJSONObject(0);\n double sumTaxableAmt= 0.0,sumTotalAmt=0.0;\n int noOfInvoices=0;\n sumTaxableAmt = exempComp.optDouble(\"sumTaxableAmt\");\n sumTotalAmt = exempComp.optDouble(\"sumTotalAmt\");\n noOfInvoices=exempComp.optInt(\"numberofinvoices\");\n params.remove(\"registrationType\");\n params.put(\"taxClassType\", FieldComboData.TaxClass_Exempted + \",\" + FieldComboData.TaxClass_Non_GST_Product);\n params.put(\"typeofjoinisleft\", true);\n exportobj = getExemptPurchaseInvoiceDetails(params);\n JSONObject EXEMPT = new JSONObject();\n EXEMPT = exportobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n sumTaxableAmt += EXEMPT.optDouble(\"sumTaxableAmt\");\n sumTotalAmt += EXEMPT.optDouble(\"sumTotalAmt\");\n noOfInvoices += EXEMPT.optInt(\"numberofinvoices\");\n /**\n * For Product Tax Class 0%\n */\n params.put(\"taxClassType\", FieldComboData.TaxClass_ZeroPercenatge);\n params.put(\"typeofjoinisleft\", true);\n params.put(GSTRConstants.IS_PRODUCT_TAX_ZERO, true);\n exportobj = getExemptPurchaseInvoiceDetails(params);\n params.remove(GSTRConstants.IS_PRODUCT_TAX_ZERO);\n EXEMPT = new JSONObject();\n EXEMPT = exportobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n sumTaxableAmt += EXEMPT.optDouble(\"sumTaxableAmt\");\n sumTotalAmt += EXEMPT.optDouble(\"sumTotalAmt\");\n noOfInvoices += EXEMPT.optInt(\"numberofinvoices\");\n \n EXEMPT.put(\"sumTaxableAmt\", sumTaxableAmt);\n EXEMPT.put(\"sumTotalAmt\",sumTotalAmt);\n EXEMPT.put(\"numberofinvoices\", noOfInvoices);\n dataJArr.put(EXEMPT);\n\n// JSONObject summaryObj = new JSONObject();\n// summaryObj.put(\"numberofinvoices\", 0);\n// summaryObj.put(\"typeofinvoice\", \"ISD Credit\");\n// summaryObj.put(\"sumTaxableAmt\", 0);\n// summaryObj.put(\"sumTaxAmt\", 0);\n// summaryObj.put(\"sumTotalAmt\", 0);\n// dataJArr.put(summaryObj);\n\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"entitycolnum\", reqParams.optString(\"paymententitycolnum\"));\n params.put(\"entityValue\", reqParams.optString(\"paymententityValue\"));\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_AdvancePaid);\n JSONObject atobj = getTaxLiabilityOnAdvance(params);\n JSONObject AT = new JSONObject();\n AT = atobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(AT);\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_AdvanceAdjust);\n JSONObject atadjobj = getAdjustedAdvance(params);\n JSONObject ATADJ = new JSONObject();\n ATADJ = atadjobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(ATADJ);\n//\n// summaryObj = new JSONObject();\n// summaryObj.put(\"numberofinvoices\", 0);\n// summaryObj.put(\"typeofinvoice\", \"ITC Reversal\");\n// summaryObj.put(\"sumTaxableAmt\", 0);\n// summaryObj.put(\"sumTaxAmt\", 0);\n// summaryObj.put(\"sumTotalAmt\", 0);\n// dataJArr.put(summaryObj);\n// /**\n// * HSN summary of Inward supplies\n// */\n// params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n// params.put(\"entitycolnum\", reqParams.optString(\"invoiceentitycolnum\"));\n// params.put(\"entityValue\", reqParams.optString(\"invoiceentityValue\"));\n// params.put(\"typeofinvoice\", \"HSN summary of Inward supplies\");\n// exportobj = getHSNSummarydetails(params);\n// EXPORT = new JSONObject();\n// EXPORT = exportobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n// dataJArr.put(EXPORT);\n\n JSONArray pagedJson = new JSONArray();\n pagedJson = dataJArr;\n if (!StringUtil.isNullOrEmpty(start) && !StringUtil.isNullOrEmpty(limit)) {\n pagedJson = StringUtil.getPagedJSON(pagedJson, Integer.parseInt(start), Integer.parseInt(limit));\n }\n object.put(\"totalCount\", dataJArr.length());\n object.put(\"columns\", jarrColumns);\n object.put(\"coldata\", pagedJson);\n jMeta.put(\"totalProperty\", \"totalCount\");\n jMeta.put(\"root\", \"coldata\");\n jMeta.put(\"fields\", jarrRecords);\n object.put(\"metaData\", jMeta);\n if (params.optBoolean(\"isExport\")) {\n object.put(\"data\", dataJArr);\n object.put(\"columns\", jarrColumns);\n }\n } catch (JSONException ex) {\n throw ServiceException.FAILURE(ex.getMessage(), ex);\n }\n return object;\n }", "public void calculateSale()\n {\n double total = 0.00;\n int numTimbits = 0;\n int numDoughnuts = 0;\n int smallCoffee = 0;\n int mediumCoffee = 0;\n int largeCoffee = 0;\n String order;\n \n for(int i = 0; salesItem[i] != null && i < salesItem.length; i++)\n {\n if(salesItem[i] instanceof Timbit) \n {\n numTimbits = numTimbits + salesItem[i].getNumOfItems();\n }\n else if(salesItem[i] instanceof Doughnut)\n {\n numDoughnuts = numDoughnuts + salesItem[i].getNumOfItems();\n }\n else if(salesItem[i] instanceof Coffee)\n {\n if(salesItem[i].getNumOfItems()==1)\n {\n smallCoffee ++;\n }\n else if(salesItem[i].getNumOfItems()==2)\n {\n mediumCoffee ++;\n }\n else\n {\n largeCoffee ++;\n }\n }\n \n total += salesItem[i].getFinalPrice();\n }\n \n order = \"Timbits: \" + numTimbits + \"\\nDoughnuts: \" + numDoughnuts + \"\\nSmall Coffees: \" + smallCoffee + \"\\nMedium Coffees: \" + mediumCoffee + \"\\nLarge Coffees: \" + largeCoffee ; \n showText(order + String.format(\"\\nTotal Price: $%5.2f\", total), 150, 175);\n }", "public Double[][] calculatePaymentDetails(double princp, double irate, int mon, double pymt){\n Double[][] detail = new Double[mon][3];\n double intpaid = 0;\n double balance = princp;\n double prinpaid = 0;\n double payment = pymt;\n for(int i=0; i<mon; i++){\n intpaid = irate * balance ; detail[i][0] = intpaid ;\n prinpaid = payment - intpaid ; detail[i][1] = prinpaid ;\n balance = balance - prinpaid ; detail[i][2] = balance ;\n } // FOR\n return detail;\n }", "private void generateIncomingReport() {\r\n\r\n\t\tStringBuilder stringBuilder = new StringBuilder();\r\n\t\tstringBuilder.append(\"\\n----------------------------------------\\n\")\r\n\t\t\t\t.append(\" Incoming Daily Amount \\n\")\r\n\t\t\t\t.append(\"----------------------------------------\\n\")\r\n\t\t\t\t.append(\" Date | Trade Amount \\n\")\r\n\t\t\t\t.append(\"-----------------+----------------------\\n\");\r\n\t\tallIncomings.entrySet().forEach(\r\n\t\t\t\tkey -> stringBuilder.append(key.getKey() + \" | \" + key.getValue().get() + \"\\n\"));\r\n\t\tdataWriter.write(stringBuilder.toString());\r\n\t}", "public void updateOscilloscopeData() {\n rmsSum = 0;\n boolean overshoot = false;\n int reactorFrequency = getReactorFrequency().intValue();\n int reactorAmplitude = getReactorAmplitude().intValue();\n double reactorPhase = getReactorPhase().doubleValue();\n int controlFrequency = getControlFrequency().intValue();\n int controlAmplitude = getControlAmplitude().intValue();\n double controlPhase = getControlPhase().doubleValue();\n for (int i = 0; i < 40; i++) { \n Double reactorValue = reactorAmplitude * Math.sin(2 * Math.PI * reactorFrequency * ((double) i * 5 / 10000) + reactorPhase);\n Double controlValue = controlAmplitude * Math.sin(2 * Math.PI * controlFrequency * ((double) i * 5 / 10000) + controlPhase);\n if (reactorValue + controlValue > 150) {\n this.outputData.get(0).getData().get(i).setYValue(149);\n overshoot = true;\n } else if (reactorValue + controlValue < -150) {\n this.outputData.get(0).getData().get(i).setYValue(-149);\n overshoot = true;\n } else {\n this.outputData.get(0).getData().get(i).setYValue(reactorValue + controlValue);\n }\n if (this.online == true) {\n this.rmsSum = this.rmsSum + Math.pow(reactorValue + controlValue, 2);\n }\n }\n calculateOutputPower();\n checkForInstability(overshoot);\n }", "public static void main(String[] args) {\n\r\n\t\tCustomer customer0 = new Customer(2007, \"35621485268\", \"José Felipe Martins\", true, 590.9);\r\n\t\tCustomer customer1 = new Customer(1950, \"47821485297\", \"Maria Alice Barros\", true, 700);\r\n\t\tCustomer customer2 = new Customer(850, \"25521485858\", \"Carlos Eduardo\", true, 750);\r\n\t\tCustomer customer3 = new Customer(2150, \"32412587548\", \"Gev Alisson\", true, 400);\r\n\t\t\r\n\t\t//2 ­ Criar um programa que percorra uma lista de objetos do tipo \r\n\t\t//criado acima e calcule a média do campo ​vl_total​ apenas para os \r\n\t\t//itens que este valor seja maior que 560 e o capo id_customer​ \r\n\t\t//esteja entre 1500 e 2700.\r\n\t\t\r\n\t\tList<Customer> lista = new ArrayList<Customer>();\r\n\t\tlista.add(customer0);\r\n\t\tlista.add(customer1);\r\n\t\tlista.add(customer2);\r\n\t\tlista.add(customer3);\r\n\t\t\r\n\t\tCustomerControl control = new CustomerControl();\r\n\t\tdouble media = control.CalcMedia(lista);\r\n\r\n\t\t//3 ­ Exibir a média final.\r\n\t\tSystem.out.println(\"a media é: \"+ media);\r\n\t\t\r\n\t\t//4 ­ Imprima cada um dos obejtos selecionados para o cálculo da média. \r\n\t\tSystem.out.println(\"objetos selecionados para media\\n\");\r\n\t\tfor(Customer c : control.selecionarParaMedia(lista)){\r\n\t\t\tSystem.out.println(c.toString());\r\n\t\t}\r\n\t\t//5 - 5 ­ Ordene pelo campo vlTotal os objetos selecionados para o cálculo da média. \r\n\t\tList<Customer> listaOrdenada = control.Ordenar(control.selecionarParaMedia(lista));\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\\n resultado da lista ordenada\");\r\n\t\tfor(Customer c : listaOrdenada){\r\n\t\t\tSystem.out.println(c.toString());\r\n\t\t}\r\n\r\n\t}", "private void getCustomerData() {\r\n\t\t// get next customer data : from file or random number generator\r\n\t\t// set anyNewArrival and transactionTime\r\n\t\t// see readme file for more info\r\n\r\n\t\tif (dataSource == 1) { // file\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 0/1 random or file input\r\n\t\t\t\t\tif (dataFile.hasNextInt()) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// checks for a line of information\r\n\t\t\t\t\t\tint data1 = dataFile.nextInt();\t\t\t\t\t\t\t\t\t\t\t\t\t\t// every line has 2 numbers of info\r\n\t\t\t\t\t\tint data2 = dataFile.nextInt();\r\n\t\t\t\t\t\tanyNewArrival \t= (((data1%100)+1)<= chancesOfArrival);\t\t// computes anyNewArrival boolean\r\n\t\t\t\t transactionTime = (data2%maxTransactionTime)+1;\t\t\t\t\t// computes transactionTime integer\r\n\t\t\t\t\t}\r\n\t\t} else { // random\r\n\t\t\tdataRandom = new Random();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// generates random boolean and int\r\n\t\t\tanyNewArrival \t= ((dataRandom.nextInt(100) + 1) <= chancesOfArrival);\r\n\t\t\ttransactionTime = dataRandom.nextInt(maxTransactionTime) + 1;\r\n\t\t}\r\n\t}", "public Breakdown generateDiurnalReport(Date startDate, String[] demoArr) {\n\n Breakdown result = new Breakdown();\n AppUsageDAO auDAO = new AppUsageDAO();\n Date startHour = startDate;\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:00\");\n //for each hour (for 24 loop)\n for (int i = 0; i < 24; i++) {\n\n HashMap<String, Breakdown> miniMap = new HashMap<String, Breakdown>();\n result.addInList(miniMap);\n\n Date endHour = new Date(startHour.getTime() + 1000 * 60 * 60);\n miniMap.put(\"period\", new Breakdown(sdf.format(startHour) + \"-\" + sdf.format(endHour)));\n\n //get number of targetted users\n Date endDate = new Date(startDate.getTime() + 1000 * 60 * 60 * 24);\n ArrayList<User> targetList = auDAO.retrieveUserByDemo(startDate, endDate, demoArr);\n int targetCount = targetList.size();\n //get userList for this hour, filtered by demo\n ArrayList<User> userList = auDAO.retrieveUserByDemo(startHour, endHour, demoArr);\n double secondsThisHour = 0;\n\n //for each user\n for (User user : userList) {\n\n //retrieve appUsageList\n ArrayList<AppUsage> auList = auDAO.retrieveByUserHourly(user.getMacAddress(), startHour, endHour);\n\n Date oldTime = null;\n if (auList.size() > 0) {\n oldTime = auList.get(0).getDate();\n }\n\n //For each appusage in appUsageList\n for (int j = 1; j < auList.size(); j++) {\n Date newTime = auList.get(j).getDate();\n\n //calculate usageTime and add to secondsThisHour\n //difference between app usage timing\n long difference = Utility.secondsBetweenDates(oldTime, newTime);\n\n //If difference less than/equal 2 minutes\n if (difference <= 2 * 60) {\n // add difference to totalSeconds if <= 2 mins\n secondsThisHour += difference;\n } else {\n // add 10sec to totalSeconds if > 2 mins\n secondsThisHour += 10;\n }\n\n oldTime = newTime;\n\n }\n //Add 10 seconds for the last appusage in the list\n if (auList.size() > 0) {\n Date lastTime = auList.get(auList.size() - 1).getDate();\n\n long difference = Utility.secondsBetweenDates(lastTime, endHour);\n\n if (difference > 10) {\n difference = 10;\n }\n secondsThisHour += difference;\n\n }\n\n }\n //divide by all users in this hour to get average usage time in this hour\n if (targetCount > 0) {\n secondsThisHour /= targetCount;\n\n }\n\n //store in breakdown\n long time = Math.round(secondsThisHour);\n miniMap.put(\"duration\", new Breakdown(\"\" + time));\n\n startHour = endHour;\n }\n\n return result;\n }", "public static void gtDB() throws ClassNotFoundException, SQLException {\r\n Statement s1 = DBConnect.connection.createStatement();\r\n String selTable1 = \"SELECT COUNT(*) AS total FROM \" + StFrmNm;\r\n s1.execute(selTable1);\r\n ResultSet rs1 = s1.getResultSet();\r\n rs1.next();\r\n setCnt(rs1.getInt(\"total\"));\r\n \r\n for (int w = 1; w < getCnt() + 1; w++) {\r\n setCntRec(getCntRec() + 1);\r\n String selTable3 = \"SELECT Sku AS rslt, Qty As rslt2, Description1 As rslt3, \"\r\n + \"Orig_Sku As rslt4, Description2 As rslt5, Attribute2 As rslt6, Size2 As rslt7, Orig_Retail As rslt8, \"\r\n + \"Manuf_Inspection As rslt9, New_Used As rslt10, Reason As rslt11, Desc_Damage As rslt12, \"\r\n + \"Cust_Satisf As rslt13, Warranty As rslt14, Ln_Date As rslt15, Second_Cost As rslt16, Form_Name As rslt17, Second_Sku_Vendor As rslt18, \"\r\n + \"Second_Sku_VPNum As rslt19, Ord_C$ As rslt20, First_DCS As rslt21, Second_DCS As rslt22 \"\r\n + \"FROM \" + StFrmNm + \" WHERE Line = \" + w;\r\n s1.execute(selTable3);\r\n String sku;\r\n String qty;\r\n String descr1;\r\n String orgSku;\r\n String descr2;\r\n String attr;\r\n String size;\r\n String orgRt;\r\n String mnInsp;\r\n String nwusd;\r\n String reas;\r\n String ddamg;\r\n String custSat;\r\n String wrrnty;\r\n String lndate;\r\n String scost; \r\n String frmnme;\r\n String svendr;\r\n String svpn;\r\n String ordc;\r\n String fdcs;\r\n String sdcs;\r\n ResultSet rs3 = s1.getResultSet();\r\n rs3.next();\r\n sku = rs3.getString(\"rslt\");\r\n qty = rs3.getString(\"rslt2\");\r\n descr1 = rs3.getString(\"rslt3\");\r\n orgSku = rs3.getString(\"rslt4\");\r\n descr2 = rs3.getString(\"rslt5\");\r\n attr = rs3.getString(\"rslt6\");\r\n size = rs3.getString(\"rslt7\");\r\n orgRt = rs3.getString(\"rslt8\");\r\n mnInsp = rs3.getString(\"rslt9\");\r\n nwusd = rs3.getString(\"rslt10\");\r\n reas = rs3.getString(\"rslt11\");\r\n ddamg = rs3.getString(\"rslt12\");\r\n custSat = rs3.getString(\"rslt13\");\r\n wrrnty = rs3.getString(\"rslt14\");\r\n lndate = rs3.getString(\"rslt15\");\r\n scost = rs3.getString(\"rslt16\"); \r\n frmnme = rs3.getString(\"rslt17\");\r\n svendr = rs3.getString(\"rslt18\");\r\n svpn = rs3.getString(\"rslt19\");\r\n ordc = rs3.getString(\"rslt20\");\r\n fdcs = rs3.getString(\"rslt21\"); \r\n sdcs = rs3.getString(\"rslt22\");\r\n recLine[w] = sku + \";\" + qty + \"; \" + descr1 + \";\" + orgSku + \";\" + descr2 + \";\" + attr + \";\" + size + \";\" + orgRt + \";\" + mnInsp + \";\" +\r\n nwusd + \";\" + reas + \";\" + ddamg + \";\" + custSat + \";\" + wrrnty + \";\" + lndate+ \";\" + scost + \";\" + frmnme + \";\" + svendr + \";\" + \r\n svpn + \";\" + ordc + \";\" + fdcs + \";\" + sdcs;\r\n \r\n //System.out.println(sku + \";\" + qty + \"; \" + nwusd + \";\" + descr1 + \";\" + reas + \";\" + ddamg + \";\" + orgSku + \";\" + mnInsp + \";\" + custSat + \";\" + wrrnty + \";\" + lndate);\r\n }\r\n }", "private static void BicingsimulatedAnnealingSearch(int num, int n_est, int nbicis, int nfurgo, int d1, int cas, String Cas, String H, String D, int s) {\n\n\n try {\n\n double MedT = 0;\n //double MedN = 0;\n //double MedB = 0;\n int iteraciones = 100;\n Estado Bicing = new Estado(n_est,nbicis,nfurgo,d1,s,1);\n Bicing.setList_cdesp(iteraciones);\n long StartTime = System.nanoTime();\n Problem problem = new Problem(Bicing, new sucesoresA(), new isGoal(), new Heuristic_Function());\n SimulatedAnnealingSearch search = new SimulatedAnnealingSearch(iteraciones, 1000, 125, 0.00001D);\n SearchAgent agent = new SearchAgent(problem, search);\n List L = search.getPathStates();\n Properties properties = agent.getInstrumentation();\n long EndTime = System.nanoTime();\n Estado E = (Estado) search.getGoalState();\n long time = ((EndTime - StartTime) / 1000000);\n MedT += time;\n //MedB += E.getganancia();\n // MedN += Integer.parseInt(properties.getProperty((String)properties.keySet().iterator().next()));\n // MedB /= num;\n // MedN /= num;\n // MedT /= num;\n //MedB = (Math.round(MedB*100.0)/100.0);\n Writer output;\n output = new BufferedWriter(new FileWriter(\"Estadisticas_\" + Cas + \"_D\" + D + \"_H\" + H + \"S.txt\", true));\n double [] vec = E.getearnings();\n for (int i = 0 ; i < iteraciones; ++i) {\n String S = \"\" + vec[i];\n S = S + '\\n';\n output.append(S);\n }\n output.close();\n\n /*for (int i = 0; i < E.getN_furgo(); ++i) {\n System.out.println(\"Recorrido por furgoneta \" + i + \" \" + E.getIFurgo(i).getLong_t());\n }*/\n //printEstado(E);\n //System.out.println();\n //System.out.println(E.getganancia());\n //printActions(agent.getActions());\n //printInstrumentation(agent.getInstrumentation());\n } catch (Exception var4) {\n var4.printStackTrace();\n }\n\n }", "public void analyzeData(){\n\t\tlinewidth = rt.getValue(\"Mean\", 1) - rt.getValue(\"Mean\", 0);\n\t\tRMS_edge_roughness = Math.sqrt((Math.pow(rt.getValue(\"StdDev\", 1), 2) + Math.pow(rt.getValue(\"StdDev\", 0), 2))/2); // this is the correct form\n\t\tif(rt.getValue(\"Max\",1) - rt.getValue(\"Min\", 1) > rt.getValue(\"Max\", 0) - rt.getValue(\"Min\", 0)){\n\t\t\tpkpk_edge_roughness = rt.getValue(\"Max\", 1) – rt.getValue(\"Min\", 1);\n\t\t}\n\t\telse{\n\t\t\tpkpk_edge_roughness = (rt.getValue(\"Max\", 0) – rt.getValue(\"Min\", 0));\n\t\t}\n\t\treturn;\n\t}", "Measurement getAccumulation();", "private void summarizeTimeslot ()\n {\n if (null == brokers) {\n // first time through\n brokers = new ArrayList<>();\n stats = new HashMap<>();\n\n data.print(\"Broker Name,\");\n data.print(\"Power Type,\");\n data.print(\"Customers,\");\n data.print(\"Usage (kWh),\");\n data.println(\"Income Gained\");\n\n // set up the maps of brokers, and stats by power type\n for (Broker broker : brokerRepo.findRetailBrokers())\n {\n brokers.add(broker);\n stats.put(broker, new HashMap<>());\n for (PowerType type : powerTypes)\n {\n StatsTracked theseStats = new StatsTracked();\n HashMap<PowerType, StatsTracked> map = stats.get(broker);\n map.put(type, theseStats);\n stats.put(broker, map);\n }\n }\n\n // store customer statistics\n\n }\n\n if (ttx.size() > 0) {\n // there are some signups and withdraws here\n for (TariffTransaction tx : ttx) {\n Broker broker = tx.getBroker();\n PowerType type = tx.getTariffSpec().getPowerType();\n HashMap<PowerType, StatsTracked> brokerMap = stats.get(broker);\n StatsTracked theseStats = brokerMap.get(type);\n if (tx.getTxType() == TariffTransaction.Type.CONSUME ||\n tx.getTxType() == TariffTransaction.Type.PRODUCE) {\n theseStats.updateUsage(tx.getKWh());\n theseStats.updateProfit(tx.getCharge());\n }\n else if (tx.getTxType() == TariffTransaction.Type.SIGNUP)\n theseStats.updateCustomers(tx.getCustomerCount());\n\n // reupdate the tracking...\n brokerMap.put(type, theseStats);\n stats.put(broker, brokerMap);\n }\n }\n ttx.clear();\n }", "public double calculateSalesTest() {\n\t\tCommission commission = new Commission(lockPrice, stockPrice, barrelPrice);\n\t\tcommission.processNewSale(locks, stocks, barrels);\n\t\treturn commission.calculateSales();\n\t}", "public void logDose() {\n List<Double> standardPattern = new ArrayList<>();\n for (double point : CORTISOL_PATTERN) {\n standardPattern.add(point);\n }\n logDoseList = logarithmTable2(standardPattern);\n }", "public ArrayList<Fact> createFacts (MAcctSchema as)\r\n\t{\r\n\t\t// create Fact Header\r\n\t\tFact fact = new Fact(this, as, Fact.POST_Actual);\r\n\t\tsetC_Currency_ID (as.getC_Currency_ID());\r\n\r\n\t\t// Line pointer\r\n\t\tFactLine fl = null;\r\n\t\tX_M_Production prod = (X_M_Production)getPO();\r\n\t\tHashMap<String, BigDecimal> costMap = new HashMap<String, BigDecimal>();\r\n\r\n\t\tfor (int i = 0; i < p_lines.length; i++)\r\n\t\t{\r\n\t\t\tDocLine line = p_lines[i];\r\n\t\t\t//\tCalculate Costs\r\n\t\t\tBigDecimal costs = BigDecimal.ZERO;\r\n\t\t\t\r\n\t\t\tX_M_ProductionLine prodline = (X_M_ProductionLine)line.getPO();\r\n\t\t\tMProductionLineMA mas[] = MProductionLineMA.get(getCtx(), prodline.get_ID(), getTrxName());\r\n\t\t\tMProduct product = (MProduct) prodline.getM_Product();\r\n\t\t\tString CostingLevel = product.getCostingLevel(as);\r\n\r\n\t\t\tif (MAcctSchema.COSTINGLEVEL_BatchLot.equals(CostingLevel) ) \r\n\t\t\t{\r\n\t\t\t\tif (line.getM_AttributeSetInstance_ID() == 0 && (mas!=null && mas.length> 0 )) \r\n\t\t\t\t{\r\n\t\t\t\t\tfor (int j = 0; j < mas.length; j++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tMProductionLineMA ma = mas[j];\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tMCostDetail cd = MCostDetail.get (as.getCtx(), \"M_ProductionLine_ID=?\",\r\n\t\t\t\t\t\t\t\tline.get_ID(), ma.getM_AttributeSetInstance_ID(), as.getC_AcctSchema_ID(), getTrxName());\t\r\n\t\t\t\t\t\tif (cd != null)\r\n\t\t\t\t\t\t\tcosts = costs.add(cd.getAmt());\t\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tProductCost pc = line.getProductCost();\r\n\t\t\t\t\t\t\tpc.setQty(ma.getMovementQty());\r\n\t\t\t\t\t\t\tpc.setM_M_AttributeSetInstance_ID(ma.getM_AttributeSetInstance_ID());\r\n\t\t\t\t\t\t\tcosts = costs.add(line.getProductCosts(as, line.getAD_Org_ID(), false));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcostMap.put(line.get_ID()+ \"_\"+ ma.getM_AttributeSetInstance_ID(), costs);\r\n\t\t\t\t\t}\r\n\t\t\t\t} \r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tMCostDetail cd = MCostDetail.get (as.getCtx(), \"M_ProductionLine_ID=?\",\r\n\t\t\t\t\t\t\tline.get_ID(), line.getM_AttributeSetInstance_ID(), as.getC_AcctSchema_ID(), getTrxName());\r\n\t\t\t\t\tif (cd != null) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcosts = cd.getAmt();\r\n\t\t\t\t\t} \r\n\t\t\t\t\telse \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcosts = line.getProductCosts(as, line.getAD_Org_ID(), false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcostMap.put(line.get_ID()+ \"_\"+ line.getM_AttributeSetInstance_ID(), costs);\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t} \r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\r\n\t\t\t\t// MZ Goodwill\r\n\t\t\t\t// if Production CostDetail exist then get Cost from Cost Detail\r\n\t\t\t\tMCostDetail cd = MCostDetail.get (as.getCtx(), \"M_ProductionLine_ID=?\",\r\n\t\t\t\t\t\tline.get_ID(), line.getM_AttributeSetInstance_ID(), as.getC_AcctSchema_ID(), getTrxName());\r\n\t\t\t\tif (cd != null) \r\n\t\t\t\t{\r\n\t\t\t\t\tcosts = cd.getAmt();\r\n\t\t\t\t} \r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\tint ProductLabor_ID = MSysConfig.getIntValue(\"PRODUCT_LABOR\", -1, prod.getAD_Client_ID());\r\n\t\t\t\t\tBigDecimal laborPrice = (BigDecimal) prod.get_Value (\"PriceEntered\");\r\n\t\t\t\t\t//\r\n\t\t\t\t\tif (ProductLabor_ID > 0 \r\n\t\t\t\t\t\t\t&& line.getM_Product_ID() == ProductLabor_ID\r\n\t\t\t\t\t\t\t&& laborPrice != null && laborPrice.signum() == 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcosts = laborPrice.multiply(prod.getProductionQty().negate());\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcosts = line.getProductCosts(as, line.getAD_Org_ID(), false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcostMap.put(line.get_ID()+ \"_\"+ line.getM_AttributeSetInstance_ID(), costs);\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tBigDecimal bomCost = Env.ZERO;\t\r\n\t\t\tBigDecimal qtyProduced = null;\r\n\t\t\tif (line.isProductionBOM())\r\n\t\t\t{\r\n\t\t\t\tX_M_ProductionLine endProLine = (X_M_ProductionLine)line.getPO();\r\n\t\t\t\tObject parentEndPro = prod.isUseProductionPlan()?endProLine.getM_ProductionPlan_ID():endProLine.getM_Production_ID();\r\n\t\t\t\t\r\n\t\t\t\t//\tGet BOM Cost - Sum of individual lines\t\t\t\t\r\n\t\t\t\tfor (int ii = 0; ii < p_lines.length; ii++)\r\n\t\t\t\t{\r\n\t\t\t\t\tDocLine line0 = p_lines[ii];\r\n\t\t\t\t\tX_M_ProductionLine bomProLine = (X_M_ProductionLine)line0.getPO();\r\n\t\t\t\t\tObject parentBomPro = prod.isUseProductionPlan()?bomProLine.getM_ProductionPlan_ID():bomProLine.getM_Production_ID();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!parentBomPro.equals(parentEndPro))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tif (!line0.isProductionBOM()) {\r\n\t\t\t\t\t\tMProduct product0 = (MProduct) bomProLine.getM_Product();\r\n\t\t\t\t\t\tString CostingLevel0 = product0.getCostingLevel(as);\r\n\t\t\t\t\t\tif (MAcctSchema.COSTINGLEVEL_BatchLot.equals(CostingLevel0) )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (bomProLine.getM_AttributeSetInstance_ID() == 0 ) \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tMProductionLineMA bomLineMA[] = MProductionLineMA.get(getCtx(), line0.get_ID(), getTrxName());\r\n\t\t\t\t\t\t\t\tif (bomLineMA!=null && bomLineMA.length> 0 )\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t // get cost of children for batch costing level (auto generate)\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tBigDecimal costs0 = BigDecimal.ZERO ;\r\n\t\t\t\t\t\t\t\t\tfor (int j = 0; j < bomLineMA.length; j++)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tBigDecimal maCost = BigDecimal.ZERO ;\r\n\t\t\t\t\t\t\t\t\t\tMProductionLineMA ma = bomLineMA[j];\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// get cost of children\r\n\t\t\t\t\t\t\t\t\t\tMCostDetail cd0 = MCostDetail.get (as.getCtx(), \"M_ProductionLine_ID=?\",\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\tline0.get_ID(), ma.getM_AttributeSetInstance_ID(), as.getC_AcctSchema_ID(), getTrxName());\r\n\t\t\t\t\t\t\t\t\t\tif (cd0 != null) \r\n\t\t\t\t\t\t\t\t\t\t\tmaCost = cd0.getAmt();\r\n\t\t\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tProductCost pc = line0.getProductCost();\r\n\t\t\t\t\t\t\t\t\t\t\tpc.setQty(ma.getMovementQty());\r\n\t\t\t\t\t\t\t\t\t\t\tpc.setM_M_AttributeSetInstance_ID(ma.getM_AttributeSetInstance_ID());\r\n\t\t\t\t\t\t\t\t\t\t\tmaCost = line0.getProductCosts(as, line0.getAD_Org_ID(), false);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tcostMap.put(line0.get_ID()+ \"_\"+ ma.getM_AttributeSetInstance_ID(),maCost);\r\n\t\t\t\t\t\t\t\t\t\tcosts0 = costs0.add(maCost);\r\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tbomCost = bomCost.add(costs0.setScale(2,RoundingMode.HALF_UP));\r\n\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\tp_Error = \"Failed to post - No Attribute Set for line\";\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t// get cost of children for batch costing level \r\n\t\t\t\t\t\t\t\tMCostDetail cd0 = MCostDetail.get (as.getCtx(), \"M_ProductionLine_ID=?\",\r\n\t\t\t\t\t\t\t\t\t\tline0.get_ID(), line0.getM_AttributeSetInstance_ID(), as.getC_AcctSchema_ID(), getTrxName());\r\n\t\t\t\t\t\t\t\tBigDecimal costs0;\r\n\t\t\t\t\t\t\t\tif (cd0 != null) \r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tcosts0 = cd0.getAmt();\r\n\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tcosts0 = line0.getProductCosts(as, line0.getAD_Org_ID(), false);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcostMap.put(line0.get_ID()+ \"_\"+ line0.getM_AttributeSetInstance_ID(),costs0);\r\n\t\t\t\t\t\t\t\tbomCost = bomCost.add(costs0.setScale(2,RoundingMode.HALF_UP));\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t// get cost of children\r\n\t\t\t\t\t\t\tMCostDetail cd0 = MCostDetail.get (as.getCtx(), \"M_ProductionLine_ID=?\",\r\n\t\t\t\t\t\t\t\t\tline0.get_ID(), line0.getM_AttributeSetInstance_ID(), as.getC_AcctSchema_ID(), getTrxName());\r\n\t\t\t\t\t\t\tBigDecimal costs0;\r\n\t\t\t\t\t\t\tif (cd0 != null) \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tcosts0 = cd0.getAmt();\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tint ProductLabor_ID = MSysConfig.getIntValue(\"PRODUCT_LABOR\", -1, prod.getAD_Client_ID());\r\n\t\t\t\t\t\t\t\tBigDecimal laborPrice = (BigDecimal) prod.get_Value (\"PriceEntered\");\r\n\t\t\t\t\t\t\t\t//\r\n\t\t\t\t\t\t\t\tif (ProductLabor_ID > 0 \r\n\t\t\t\t\t\t\t\t\t\t&& line0.getM_Product_ID() == ProductLabor_ID\r\n\t\t\t\t\t\t\t\t\t\t&& laborPrice != null && laborPrice.signum() == 1)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tcosts0 = laborPrice.multiply(prod.getProductionQty().negate());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tcosts0 = line.getProductCosts(as, line0.getAD_Org_ID(), false);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcostMap.put(line0.get_ID()+ \"_\"+ line0.getM_AttributeSetInstance_ID(),costs0);\r\n\t\t\t\t\t\t\tbomCost = bomCost.add(costs0.setScale(2,RoundingMode.HALF_UP));\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\tqtyProduced = manipulateQtyProduced (mQtyProduced, endProLine, prod.isUseProductionPlan(), null);\r\n\t\t\t\tif (line.getQty().compareTo(qtyProduced) != 0) \r\n\t\t\t\t{\r\n\t\t\t\t\tBigDecimal factor = line.getQty().divide(qtyProduced, 12, RoundingMode.HALF_UP);\r\n\t\t\t\t\tbomCost = bomCost.multiply(factor).setScale(2,RoundingMode.HALF_UP);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (MAcctSchema.COSTINGLEVEL_BatchLot.equals(CostingLevel))\r\n\t\t\t\t{\r\n\t\t\t\t\t//post roll-up \r\n\t\t\t\t\tfl = fact.createLine(line, \r\n\t\t\t\t\t\t\tline.getAccount(ProductCost.ACCTTYPE_P_Asset, as),\r\n\t\t\t\t\t\t\tas.getC_Currency_ID(), bomCost.negate()); \r\n\t\t\t\t\tif (fl == null) \r\n\t\t\t\t\t{ \r\n\t\t\t\t\t\tp_Error = \"Couldn't post roll-up \" + line.getLine() + \" - \" + line; \r\n\t\t\t\t\t\treturn null; \r\n\t\t\t\t\t}\r\n\t\t\t\t\tfl.setQty(qtyProduced);\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tint precision = as.getStdPrecision();\r\n\t\t\t\t\tBigDecimal variance = (costs.setScale(precision, RoundingMode.HALF_UP)).subtract(bomCost.negate());\r\n\t\t\t\t\t// only post variance if it's not zero \r\n\t\t\t\t\tif (variance.signum() != 0) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//post variance \r\n//\t\t\t\t\t\tfl = fact.createLine(line, \r\n//\t\t\t\t\t\t\t\tline.getAccount(ProductCost.ACCTTYPE_P_RateVariance, as),\r\n//\t\t\t\t\t\t\t\tas.getC_Currency_ID(), variance.negate()); \r\n//\t\t\t\t\t\tif (fl == null) \r\n//\t\t\t\t\t\t{ \r\n//\t\t\t\t\t\t\tp_Error = \"Couldn't post variance \" + line.getLine() + \" - \" + line; \r\n//\t\t\t\t\t\t\treturn null; \r\n//\t\t\t\t\t\t}\r\n//\t\t\t\t\t\tfl.setQty(Env.ZERO);\r\n\t\t\t\t\t\tcosts = costs.add(variance.negate());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// end MZ\r\n\r\n\t\t\t// Inventory DR CR\r\n\t\t\tif (!(line.isProductionBOM() && MAcctSchema.COSTINGLEVEL_BatchLot.equals(CostingLevel)))\r\n\t\t\t{\r\n\t\t\t\tfl = fact.createLine(line,\r\n\t\t\t\t\tline.getAccount(ProductCost.ACCTTYPE_P_Asset, as),\r\n\t\t\t\t\tas.getC_Currency_ID(), costs);\r\n\t\t\t\tif (fl == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tp_Error = \"No Costs for Line \" + line.getLine() + \" - \" + line;\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\tfl.setM_Locator_ID(line.getM_Locator_ID());\r\n\t\t\t\tfl.setQty(line.getQty());\r\n\t\t\t}\r\n\r\n\t\t\t//\tCost Detail\r\n\t\t\tString description = line.getDescription();\r\n\t\t\tif (description == null)\r\n\t\t\t\tdescription = \"\";\r\n\t\t\tif (line.isProductionBOM())\r\n\t\t\t\tdescription += \"(*)\";\r\n\t\t\tif (MAcctSchema.COSTINGLEVEL_BatchLot.equals(CostingLevel)) \r\n\t\t\t{\r\n\t\t\t\tif (line.isProductionBOM())\r\n\t\t\t\t{\r\n\t\t\t\t\tif (!MCostDetail.createProduction(as, line.getAD_Org_ID(),\r\n\t\t\t\t\t\t\tline.getM_Product_ID(), line.getM_AttributeSetInstance_ID(),\r\n\t\t\t\t\t\t\tline.get_ID(), 0,\r\n\t\t\t\t\t\t\tbomCost.negate(), qtyProduced,\r\n\t\t\t\t\t\t\tdescription, getTrxName()))\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t p_Error = \"Failed to create cost detail record\";\r\n\t\t\t\t\t\t return null;\r\n\t\t\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\telse if (line.getM_AttributeSetInstance_ID() == 0 && (mas!=null && mas.length> 0 ))\r\n\t\t\t\t{\r\n\t\t\t\t\t for (int j = 0; j < mas.length; j++)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\tMProductionLineMA ma = mas[j];\r\n\t\t\t\t\t\tBigDecimal maCost = costMap.get(line.get_ID()+ \"_\"+ ma.getM_AttributeSetInstance_ID());\t\t\r\n\t\t\t\t\t\tif (!MCostDetail.createProduction(as, line.getAD_Org_ID(),\r\n\t\t\t\t\t\t\t\tline.getM_Product_ID(), ma.getM_AttributeSetInstance_ID(),\r\n\t\t\t\t\t\t\t\tline.get_ID(), 0,\r\n\t\t\t\t\t\t\t\tmaCost, ma.getMovementQty(),\r\n\t\t\t\t\t\t\t\tdescription, getTrxName()))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tp_Error = \"Failed to create cost detail record\";\r\n\t\t\t\t\t\t\treturn null;\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 else\r\n\t\t\t\t {\r\n\t\t\t\t\t \r\n\t\t\t\t\t if (!MCostDetail.createProduction(as, line.getAD_Org_ID(),\r\n\t\t\t\t\t\t\tline.getM_Product_ID(), line.getM_AttributeSetInstance_ID(),\r\n\t\t\t\t\t\t\tline.get_ID(), 0,\r\n\t\t\t\t\t\t\tcosts, line.getQty(),\r\n\t\t\t\t\t\t\tdescription, getTrxName()))\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t p_Error = \"Failed to create cost detail record\";\r\n\t\t\t\t\t\t return null;\r\n\t\t\t\t\t } \r\n\t\t\t\t }\r\n\t\t\t} \r\n\t\t\telse\r\n\t\t\t{\t\t\t \r\n\t\t\t\tif (!MCostDetail.createProduction(as, line.getAD_Org_ID(),\r\n\t\t\t\t\tline.getM_Product_ID(), line.getM_AttributeSetInstance_ID(),\r\n\t\t\t\t\tline.get_ID(), 0,\r\n\t\t\t\t\tcosts, line.getQty(),\r\n\t\t\t\t\tdescription, getTrxName()))\r\n\t\t\t\t{\r\n\t\t\t\t\tp_Error = \"Failed to create cost detail record\";\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//\r\n\t\tArrayList<Fact> facts = new ArrayList<Fact>();\r\n\t\tfacts.add(fact);\r\n\t\treturn facts;\r\n\t}", "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 static void main(String[] args) throws FileNotFoundException {\n String file = \"kiva_loans_small.csv\";\n \n // Creates an ArrayList to store the data and calls the readData() method. \n ArrayList<Loan> list = readData(file);\n \n // Loop to print out the existing data to see how it is structured.\n //for(int i = 0; i < list.size(); i++) {\n // System.out.println(list.get(i));\n //}\n \n //Use this code to test the methods in the ComputingStatistics class\n ComputingStatistics analysis = new ComputingStatistics(list);\n System.out.println(\"Total amount: \" + analysis.totalAmount()); //Level 1 Question 1\n System.out.println(\"Average loan amount: \" + analysis.avgLoan()); //Level 1 Question 2\n System.out.println(\"Largest loan amount: \" + analysis.largestLoan()); //Level 1 Question 3\n System.out.println(\"Smallest loan amount: \" + analysis.smallestLoan()); //Level 1 Question 4\n System.out.println(\"The country with the largest loan amount: \" + analysis.largestLoanCountry()); //Level 1 Question 5\n System.out.println(\"The country with smallest loan amount: \" + analysis.smallestLoanCountry()); //Level 1 Question 6\n \n System.out.println(\"Average days to fund loan request: \" + analysis.avgDaysToFund()); //Level 2 Question 1\n System.out.println(\"The largest loan funded in Vietnam: \" + analysis.largestLoan(\"Vietnam\")); //Level 2 Question 2\n System.out.println(\"Average loan amount in the Philippines: \" + analysis.avgLoan(\"Philippines\")); //Level 2 Question 3\n System.out.println(\"The country with the longest to fund loan: \" + analysis.longestToFundCountry()); //Level 2 Question 4\n String mostLoans = \"\";\n if (analysis.loansFunded(\"El Salvador\") > analysis.loansFunded(\"Kenya\"))\n mostLoans = \"El Salvador\";\n else\n mostLoans = \"Kenya\";\n System.out.println(\"The country with the most loans funded: \" + mostLoans); //Level 2 Question 5\n \n System.out.println(\"Variance: \" + analysis.variance()); //Level 3 Question 1\n System.out.println(\"Standard deviation: \" + analysis.standardDeviation()); //Level 3 Question 2\n// System.out.println(\"Empirical rule (yes/no): \" + analysis.empiricalRule()); //Level 3 Question 3\n }", "public void makeReport()\n\t{\n\t\tif (currentStage[currentSlice-1] > 1)\n\t\t{\n\t\t\tResultsTable rt = new ResultsTable();\n\t\t\tfor (int j=0;j<popSequence.N;j++)\n\t\t\t{\n\t\t\t\tpop = popSequence.PopList[j];\n\t\t\t\tint N = pop.N;\n\t\t\t\tfor (int i=0;i<N;i++)\n\t\t\t\t{\n\t\t\t\t\trt.incrementCounter();\n\t\t\t\t\tBalloon bal;\n\t\t\t\t\tbal = (Balloon)(pop.BallList.get(i));\n\t\t\t\t\tbal.mass_geometry();\n\t\t\t\t\trt.addValue(\"X\",bal.x0);\n\t\t\t\t\trt.addValue(\"Y\",bal.y0);\n\t\t\t\t\trt.addValue(\"Z\",j);\n\t\t\t\t\trt.addValue(\"ID\",bal.id);\n\t\t\t\t\trt.addValue(\"AREA\",bal.area);\n\t\t\t\t\trt.addValue(\"Ixx\",bal.Ixx);\n\t\t\t\t\trt.addValue(\"Iyy\",bal.Iyy);\n\t\t\t\t\trt.addValue(\"Ixy\",bal.Ixy);\n\t\t\t\t\trt.addValue(\"Lx\",bal.lx);\n\t\t\t\t\trt.addValue(\"Ly\",bal.ly);\n\t\t\t\t}\n\t\t\t}\n\t\t\trt.show(\"Report\");\n\t\t\tcurrentSlice = i1.getCurrentSlice();\n\t\t\tipWallSegment = (i1.getStack()).getProcessor(i1.getCurrentSlice());\n\t\t\tpop = popSequence.PopList[currentSlice-1];\n\t\t}\n\t}", "public void nodata();", "public int generate(OutputStream stream) throws Exception\n {\n BufferedWriter writer = null;\n Connection con = null;\n\tPreparedStatement stmt = null;\n\tResultSet rs = null;;\n \ttry \n {\n writer = new BufferedWriter(new OutputStreamWriter(stream));\n String type = \"\",\n state = \"\",\n council = \"\",\n local = \"\",\n localName = \"\",\n localAddress = \"\",\n localCity = \"\",\n localState = \"\",\n localZip = \"\",\n localZipPlus = \"\",\n termExpirationDate = \"\",\n termAvailableDate = \"\",\n officerLast = \"\",\n officerFirst = \"\",\n officerMiddle = \"\",\n officerAddress = \"\",\n officerCity = \"\",\n officerState = \"\",\n officerZip = \"\",\n officerZipPlus = \"\",\n officerTitle = \"\",\n currentState = \"\",\n currentCouncil = \"\",\n currentLocal = \"\",\n officerFullName = \"\", \n positionEndDate = \"\",\n currentOffice = \"\",\n office = \"\",\n saveOfficerTitle = \"\";\n int officerAddrBadFlag = 0,\n officerAddrPrivateFlag = 0,\n localTotalOfficer = 0,\n localFinalTotalOfficer = 0,\n totalNoOffice = 0,\n saveMaximumNoOffice = 0,\n maximumNoOffice = 0,\n i=0;\n int noOfficeVacancy =0;\n Date todaysDate = new Date();\n //The SQL that implements the report\n String sqlQuery = \n \"select \" +\n \"Aff_Organizations.aff_type as type, \" +\n \"Aff_Organizations.aff_statenat_type as state, \" + \n \"Aff_Organizations.aff_councilRetiree_chap as council, \" +\n \"Aff_Organizations.aff_localSubChapter as local, \" + \n \"aff_abbreviated_nm as local_name, \" + \n \"org_address.addr1 as local_address, \" +\n \"org_address.city as local_city, \" +\n \"org_address.state as local_state, \" +\n \"(org_address.zipcode) + (org_address.zip_plus) as local_zip, \" +\n \"convert(char(12), officer_history.pos_expiration_dt, 101) as term_expiration_date, \" +\n \"convert(char(12), dateadd(year, cast((select common_codes.com_cd_cd from common_codes where common_codes.com_cd_pk = aff_officer_groups.length_of_term) as int), officer_history.pos_expiration_dt), 101) as term_available_date, \" +\n \"person.last_nm as officer_last, \" +\n \"person.first_nm as officer_first, \" +\n \"substring(person.middle_nm,1,1) as officer_middle, \" +\n \"person_address.addr1 as officer_address, \" +\n \"person_address.city as officer_city, \" +\n \"person_address.state as officer_state, \" +\n \"person_address.zipcode as officer_zip, \" + \n \"person_address.zip_plus as officer_zip_plus, \" +\n \"afscme_offices.afscme_title_desc as officer_title, \" +\n \"person_address.addr_bad_fg as officer_address_bad_fg, \" +\n \"person_address.addr_private_fg as officer_address_private_fg, \" +\n \"convert(char(12), officer_history.pos_end_dt, 101) as enddt, \" +\n \"aff_officer_groups.max_number_in_office as maximum_no_office, \" +\n \"aff_officer_groups.afscme_office_pk as office, \" +\n \"cast((select common_codes.com_cd_sort_key \" +\n\t\t\"from common_codes \" + \n\t\t\"where common_codes.com_cd_cd = aff_organizations.aff_statenat_type \" +\n \"and common_codes.com_cd_type_key = 'affiliatestate') as int) \" +\n\t\t\"as sort_state, \" +\n \"case \" +\n \t\t\"when aff_type = 'c' then 1 \" +\n \t\t\"when aff_type = 'l' then 1 \" + \n \t\t\"when aff_type = 'u' then 1 \" + \n \t\t\"when aff_type = 'r' then 2 \" + \n \t\t\"when aff_type = 's' then 2 \" +\n \"end as sort_type, \" +\n \"cast(aff_councilRetiree_chap as int) as sort_council, \" +\n \"cast(aff_localSubChapter as int) as sort_local, \" +\n \"cast(aff_subunit as int) as sort_sublocal \" +\n \"from aff_organizations, \" + \n \"officer_history, \" +\n \"person, \" +\n \"person_address, \" +\n \"aff_officer_groups, \" +\n \"common_codes, \" +\n \"org_locations, \" +\n \"org_parent, \" +\n \"org_address, \" +\n \"afscme_offices \" +\n \"where Aff_Organizations.aff_pk = officer_history.aff_pk \" +\n \"and officer_history.person_pk = person.person_pk \" +\n \"and officer_history.office_group_id = aff_officer_groups.office_group_id \" +\n \"and afscme_offices.afscme_office_pk = aff_officer_groups.afscme_office_pk \" +\n \"and officer_history.aff_pk = aff_officer_groups.aff_pk \" +\n \"and officer_history.pos_end_dt is null \" +\n \"and person.person_pk = person_address.person_pk \" +\n \"and person_address.addr_prmry_fg = 1 \" +\n \"and person_address.addr_type = common_codes.com_cd_pk \" +\n \"and aff_organizations.aff_pk = org_parent.org_pk \" +\n \"and org_parent.org_pk = org_locations.org_pk \" +\n \"and location_primary_fg = 1 \" +\n \"and Org_Address.org_locations_pk = Org_Locations.org_locations_pk \" +\n \"order by sort_type, \" + \n \"Aff_Organizations.aff_statenat_type, \" +\n \"sort_council, \" + \n \"sort_local, \" +\n \"sort_sublocal, \" +\n \"afscme_offices.priority \";\n con = DBUtil.getConnection();\n stmt = con.prepareStatement(sqlQuery);\n rs = stmt.executeQuery();\n int count = 0;\n Calendar cal = Calendar.getInstance(TimeZone.getDefault());\n String DATE_FORMAT = \"MM/dd/yyyy\";\n java.text.SimpleDateFormat sdf = \n new java.text.SimpleDateFormat(DATE_FORMAT);\n printHeading(writer);\n // process rows\n while (rs.next()) \n {\n count++;\n localFinalTotalOfficer++; \n totalNoOffice++;\n officerFullName = \"\";\n type = rs.getString(\"type\");\n state = rs.getString(\"state\");\n council = rs.getString(\"council\");\n local = rs.getString(\"local\");\n localName = rs.getString(\"local_name\");\n localAddress = rs.getString(\"local_address\");\n localCity = rs.getString(\"local_city\");\n localState = rs.getString(\"local_state\");\n localZip = rs.getString(\"local_zip\");\n termExpirationDate = rs.getString(\"term_expiration_date\");\n termAvailableDate = rs.getString(\"term_available_date\");\n officerTitle = rs.getString(\"officer_title\");\n if (officerTitle.length() > 33)\n {\n officerTitle = officerTitle.substring(0, 32);\n }\n officerLast = rs.getString(\"officer_last\");\n officerFirst = rs.getString(\"officer_first\"); \n officerMiddle = rs.getString(\"officer_middle\");\n officerAddress = rs.getString(\"officer_address\");\n if (TextUtil.isEmpty(officerAddress)) officerAddress = \" \";\n if (officerAddress.length() > 30)\n {\n officerAddress = officerAddress.substring(0, 29);\n }\n officerCity = rs.getString(\"officer_city\");\n officerState = rs.getString(\"officer_state\");\n officerZip = rs.getString(\"officer_zip\");\n officerZipPlus = rs.getString(\"officer_zip_plus\");\n officerAddrBadFlag = rs.getInt(\"officer_address_bad_fg\");\n officerAddrPrivateFlag = rs.getInt(\"officer_address_private_fg\");\n positionEndDate = rs.getString(\"enddt\");\n office = rs.getString(\"office\");\n maximumNoOffice = rs.getInt(\"maximum_no_office\");\n\t\tif(!TextUtil.isEmpty(officerFirst)) \n {\n officerFullName += (officerFirst + \" \");\n\t\t}\n\t\tif(!TextUtil.isEmpty(officerMiddle)) \n {\n officerFullName += (officerMiddle+ \" \");\n\t\t}\n\t\tif(!TextUtil.isEmpty(officerLast)) \n {\n officerFullName += (officerLast);\n\t\t}\n if (officerFullName.length() > 25)\n {\n officerFullName = officerFullName.substring(0, 25);\n }\n if (officerFullName.length() > 25)\n {\n officerFullName = officerFullName.substring(0, 24);\n }\n if (TextUtil.isEmpty(officerFullName)) officerFullName = \" \";\n if (count == 1) currentType=type;\n if (!currentType.equals(type)) {\n currentType=type;\n printHeading(writer);\n }\n // Check for office break and if vacant office exists,\n // print vacant offices with the vacant title and blank officer\n // name and address.\n if (!currentOffice.equals(office))\n {\n if (count != 1)\n {\n noOfficeVacancy = saveMaximumNoOffice - totalNoOffice;\n if (noOfficeVacancy > 0)\n {\n // print office vacnacy\n for (i = 1; i <= noOfficeVacancy; i=i+1) \n { \n writeValue(writer, saveOfficerTitle, 33);\n writer.newLine();\n writer.newLine();\n writer.newLine();\n writer.newLine();\n } \n }\n }\n } // end of else current office = office\n // Check for st, council or local break\n if (!currentState.equals(state) \n || !currentCouncil.equals(council) \n || !currentLocal.equals(local))\n {\n // print total officer line\n if (count != 1)\n {\n writer.newLine();\n writer.write(\"Total Officer: \");\n writeValue(writer, Integer.toString(localTotalOfficer), 6);\n writer.newLine();\n }\n writer.newLine();\n writer.write(\"----------------------------------------\");\n writer.write(\"----------------------------------------\");\n writer.write(\"----\");\n writer.newLine(); \n writer.newLine(); \n writer.write(\"State: \");\n writeValue(writer, state, 2);\n writeColumnSpace(writer, 4);\n if (currentType.equals(\"L\")) writer.write(\"Council: \");\n else writer.write(\"Retiree: \"); \n writeValue(writer, council, 4);\n if (currentType.equals(\"L\")) writer.write(\"Local \");\n else writer.write(\"Retiree Sub Chapter \"); \n writeValue(writer, local, 4);\n writer.newLine(); \n writer.newLine(); \n writeValue(writer, localName, 30);\n writer.newLine();\n writeValue(writer, localAddress, 30);\n writer.newLine();\n writeValue(writer, localCity, 15);\n writeColumnSpace(writer, 1);\n writeValue(writer, localState, 2);\n writeColumnSpace(writer, 1);\n if(localZip == null) \n {\n writeValue(writer, \"\", 5);\n }\n else \n {\n writeValue(writer, localZip, 5);\n } \n writeColumnSpace(writer, 1);\n if(localZipPlus == null) \n {\n writeValue(writer, \"\", 4);\n }\n else \n {\n writeValue(writer, localZipPlus, 4);\n } \n writer.newLine();\n writer.newLine();\n writer.newLine();\n writer.newLine();\n writer.write(\"Title \" + \n \"Name \" +\n \"Expiration Available\");\n writer.newLine();\n writer.newLine();\n } // end of state, council or local break\n writeValue(writer, officerTitle, 33);\n writeColumnSpace(writer, 1);\n writeValue(writer, officerFullName, 25);\n // determine if the officer term has expired\n Date currentDate = new Date();\n Date expirationdate = sdf.parse(termExpirationDate);\n if (currentDate.after(expirationdate))\n {\n writeValue(writer, \"*\" + termExpirationDate, 10);\n }\n else\n {\n writeValue(writer, \" \" + termExpirationDate, 10);\n }\n writeValue(writer, termAvailableDate, 10);\n writer.newLine();\n // if officer address is private or bad, print local address\n if (officerAddrPrivateFlag == 1 || officerAddrBadFlag == 1)\n {\n writeColumnSpace(writer, 34);\n writeValue(writer, localAddress, 30);\n writer.newLine();\n writeColumnSpace(writer, 34);\n writeValue(writer, localCity, 15);\n writeColumnSpace(writer, 1);\n writeValue(writer, localState, 2);\n writeColumnSpace(writer, 1);\n if(localZip == null) \n {\n writeValue(writer, \"\", 5);\n }\n else \n {\n writeValue(writer, localZip, 5);\n }\n writeColumnSpace(writer, 1);\n if(localZipPlus == null) \n {\n writeValue(writer, \"\", 4);\n }\n else \n {\n writeValue(writer, localZipPlus, 4);\n } \n } // end of if officer address is private or bad\n else\n {\n writeColumnSpace(writer, 34);\n writeValue(writer, officerAddress, 30);\n writer.newLine();\n writeColumnSpace(writer, 34);\n writeValue(writer, officerCity, 15);\n writeColumnSpace(writer, 1);\n writeValue(writer, officerState, 2);\n writeColumnSpace(writer, 1);\n writeValue(writer, officerZip, 5);\n writeColumnSpace(writer, 1);\n if(officerZipPlus == null) \n {\n writeValue(writer, \"\", 4);\n }\n else \n {\n writeValue(writer, officerZipPlus, 4);\n } \n }\n writer.newLine();\n writer.newLine();\n if (!currentState.equals(state))\n {\n currentState=state;\n currentCouncil=council;\n currentLocal=local;\n localTotalOfficer = 0;\n totalNoOffice = 0;\n saveOfficerTitle = officerTitle;\n currentOffice = office;\n saveMaximumNoOffice = rs.getInt(\"maximum_no_office\");\n }\n if (!currentCouncil.equals(council))\n {\n currentCouncil=council;\n currentLocal=local;\n localTotalOfficer = 0;\n totalNoOffice = 0;\n saveOfficerTitle = officerTitle;\n currentOffice = office;\n saveMaximumNoOffice = rs.getInt(\"maximum_no_office\");\n } \n if (!currentLocal.equals(local))\n {\n currentLocal=local;\n localTotalOfficer = 0;\n totalNoOffice = 0;\n saveOfficerTitle = officerTitle;\n currentOffice = office;\n saveMaximumNoOffice = rs.getInt(\"maximum_no_office\");\n } \n if (!currentOffice.equals(office))\n {\n totalNoOffice = 0;\n saveOfficerTitle = officerTitle;\n currentOffice = office;\n saveMaximumNoOffice = rs.getInt(\"maximum_no_office\");\n } \n localTotalOfficer++;\n } // end of while block\n // write office vacancy(ies)\n noOfficeVacancy = maximumNoOffice - totalNoOffice;\n if (noOfficeVacancy > 0)\n {\n for (i = 1; i <= noOfficeVacancy; i=i+1) \n { \n writeValue(writer, saveOfficerTitle, 33);\n writer.newLine();\n writer.newLine();\n writer.newLine();\n writer.newLine();\n } \n }\n // write final officer total\n writer.newLine();\n writer.write(\"Total Officer: \");\n writeValue(writer, Integer.toString(localTotalOfficer), 6);\n writer.newLine();\n writer.write(\"----------------------------------------\");\n writer.write(\"----------------------------------------\");\n writer.write(\"----\");\n writer.newLine(); \n writer.newLine(); \n writer.newLine(); \n writer.newLine(); \n writer.write(\"Final Total Officer: \");\n writeValue(writer, Integer.toString(localFinalTotalOfficer), 6);\n writer.newLine();\n\t} // end of try block\n catch (SQLException e) \n {\n writer.write(\" \");\n writer.newLine();\n writer.newLine();\n writer.write(\"An error has occurred in program - OfficerExpirationReport.java\");\n writer.newLine();\n writer.write(\"Error message: \");\n writer.write(e.getMessage());\n writer.newLine();\n } \n finally \n {\n DBUtil.cleanup(con, stmt, rs);\n\t writer.flush();\n writer.close();\n\t} // end of finally block\n return 1;\n }", "@Override\n public void runOneExperiment(int numGoods, int numBidders, int k, double p, String distribution, SqlDB dbLogger) throws Exception {\n if (!dbLogger.checkIfRowExists(\"singleton_\" + distribution, numGoods, numBidders, p)) {\n System.out.print(\"\\t Adding data... \");\n HashMap<String, DescriptiveStatistics> stats = new HashMap<String, DescriptiveStatistics>();\n for (int i = 0; i < RunParameters.numTrials; i++) {\n // Generate Singleton random market.\n SingletonMarket<Goods, Bidder<Goods>> M = this.getSingletonMarket(numGoods, numBidders, p, distribution);\n // Optimal Utilitarian Allocation.\n MarketAllocation<Market<Goods, Bidder<Goods>>, Goods, Bidder<Goods>> utilitarianMaxAlloc = new WelfareMaxAllocationILP<Market<Goods, Bidder<Goods>>, Goods, Bidder<Goods>>().Solve(M);\n double optimalWelfare = utilitarianMaxAlloc.getValue();\n // Optimal Egalitarian Allocation.\n MarketAllocation<Market<Goods, Bidder<Goods>>, Goods, Bidder<Goods>> egalitarianMaxAlloc = new EgalitarianMaxAllocationILP<Market<Goods, Bidder<Goods>>, Goods, Bidder<Goods>>().Solve(M);\n double optimalEgalitarian = (double) egalitarianMaxAlloc.getNumberOfWinners();\n // Obtain statistics from all algorithms.\n this.populateStats(stats, new SingletonEVP(M).Solve(), \"ev\", optimalWelfare, optimalEgalitarian);\n this.populateStats(stats, this.getRevMaxMarketPrices(M, Allocations.GreedyWelfare), \"gw\", optimalWelfare, optimalEgalitarian);\n this.populateStats(stats, this.getRevMaxMarketPrices(M, Allocations.GreedyEgalitarian), \"ge\", optimalWelfare, optimalEgalitarian);\n this.populateStats(stats, this.getRevMaxMarketPrices(M, Allocations.OptimalWelfare), \"ow\", optimalWelfare, optimalEgalitarian);\n this.populateStats(stats, this.getRevMaxMarketPrices(M, Allocations.OptimalEgalitarian), \"oe\", optimalWelfare, optimalEgalitarian);\n this.populateStats(stats, this.getRevMaxMarketPrices(M, Allocations.WaterFall), \"wf\", optimalWelfare, optimalEgalitarian);\n this.populateStats(stats, this.getRevMaxMarketPrices(M, Allocations.MaxBidder), \"mb\", optimalWelfare, optimalEgalitarian);\n }\n System.out.println(\"done!\");\n dbLogger.saveSingleton(\"singleton_\" + distribution, numGoods, numBidders, p, stats);\n } else {\n System.out.println(\"\\t Already have data \");\n }\n }", "void fetchForSaleHousesData();", "public static double totalcommision(int salesman_id) {\r\n\r\n\t\tResultSet rs = null;\r\n\r\n\t\tdouble total_amount = 0;\r\n\r\n\t\tString query = \"SELECT DISTINCT(appliance_name) AS apname ,(SELECT CountNumberAppliance(apname,\"\r\n\t\t\t\t+ salesman_id + \")) FROM appliance\";\r\n\t\tint count;\r\n\t\tString name;\r\n\t\ttry (Connection con = Connect.getConnection()) {\r\n\r\n\t\t\tPreparedStatement stmt = (PreparedStatement) con\r\n\t\t\t\t\t.prepareStatement(query);\r\n\t\t\trs = stmt.executeQuery();\r\n\t\t\tSystem.out.println(query);\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tname = rs.getString(1);\r\n\t\t\t\tif (name.equalsIgnoreCase(\"5 wott\")) {\r\n\t\t\t\t\tcount = rs.getInt(2);\r\n\r\n\t\t\t\t\tif ((count >= 10) && (count <= 20)) {\r\n\t\t\t\t\t\ttotal_amount = count * 5;\r\n\t\t\t\t\t} else if ((count >= 21) && (count <= 35)) {\r\n\t\t\t\t\t\ttotal_amount = count * 10;\r\n\t\t\t\t\t} else if ((count >= 36) && (count <= 50)) {\r\n\t\t\t\t\t\ttotal_amount = count * 20;\r\n\t\t\t\t\t} else if ((count >= 51)) {\r\n\t\t\t\t\t\ttotal_amount = count * 30;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else if (name.equalsIgnoreCase(\"10 wott\")) {\r\n\t\t\t\t\tcount = rs.getInt(2);\r\n\r\n\t\t\t\t\tif ((count >= 10) && (count <= 20)) {\r\n\t\t\t\t\t\ttotal_amount = count * 15;\r\n\t\t\t\t\t} else if ((count >= 21) && (count <= 35)) {\r\n\t\t\t\t\t\ttotal_amount = count * 10;\r\n\t\t\t\t\t} else if ((count >= 36) && (count <= 50)) {\r\n\t\t\t\t\t\ttotal_amount = count * 20;\r\n\t\t\t\t\t} else if ((count >= 51)) {\r\n\t\t\t\t\t\ttotal_amount = count * 30;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else if (name.equalsIgnoreCase(\"15 wott\")) {\r\n\t\t\t\t\tcount = rs.getInt(2);\r\n\r\n\t\t\t\t\tif ((count >= 10) && (count <= 20)) {\r\n\t\t\t\t\t\ttotal_amount = count * 35;\r\n\t\t\t\t\t} else if ((count >= 21) && (count <= 35)) {\r\n\t\t\t\t\t\ttotal_amount = count * 45;\r\n\t\t\t\t\t} else if ((count <= 36) && (count <= 50)) {\r\n\t\t\t\t\t\ttotal_amount = count * 55;\r\n\t\t\t\t\t} else if ((count <= 51)) {\r\n\t\t\t\t\t\ttotal_amount = count * 65;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else if (name.equalsIgnoreCase(\"20 wott\")) {\r\n\t\t\t\t\tcount = rs.getInt(2);\r\n\r\n\t\t\t\t\tif ((count >= 10) && (count <= 20)) {\r\n\t\t\t\t\t\ttotal_amount = count * 45;\r\n\t\t\t\t\t} else if ((count >= 21) && (count <= 35)) {\r\n\t\t\t\t\t\ttotal_amount = count * 55;\r\n\t\t\t\t\t} else if ((count >= 36) && (count <= 50)) {\r\n\t\t\t\t\t\ttotal_amount = count * 65;\r\n\t\t\t\t\t} else if ((count >= 51)) {\r\n\t\t\t\t\t\ttotal_amount = count * 75;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn total_amount;\r\n\t}", "private void calculateAndShowStatistics() {\n Map<Country, Float> countryWithMinInternetUsers = findCountryWithMinInternetUsers();\n Map<Country, Float> countryWithMinLiteracyRate = findCountryWithMinLiteracyRate();\n Map<Country, Float> countryWithMaxInternetUsers = findCountryWithMaxInternetUsers();\n Map<Country, Float> countryWithMaxLiteracyRate = findCountryWithMaxLiteracyRate();\n\n // Output header\n System.out.println(\"\\nStatistics based on the data provided in the database\\n\");\n\n // Output minimums\n screenPrinter.outputMinOrMax(\"minimum\", \"amount of Internet Users\", countryWithMinInternetUsers);\n screenPrinter.outputMinOrMax(\"minimum\", \"Adult Literacy Rate\",countryWithMinLiteracyRate);\n\n // Output maximums\n screenPrinter.outputMinOrMax(\"maximum\", \"amount of Internet Users\",countryWithMaxInternetUsers);\n screenPrinter.outputMinOrMax(\"maximum\", \"Adult Literacy Rate\",countryWithMaxLiteracyRate);\n System.out.println();\n\n // Find countries that have all the data\n List<Country> countriesWithoutMissingData = findAllCountiesWithoutMissingData();\n\n // Form two separate lists with just indicators\n List<Float> listOfInternetUsersRates = getListOfInternetUsersRates(countriesWithoutMissingData);\n List<Float> listOfLiteracyRates = getListOfLiteracyRates(countriesWithoutMissingData);\n\n // Calculate the correlation coefficient\n double correlationCoefficient = calculateCorCoeff(listOfInternetUsersRates, listOfLiteracyRates);\n// double pearsonCoefficient = calculateCoeffThirdParty(listOfInternetUsersRates, listOfLiteracyRates);\n\n // output correlation coefficient\n screenPrinter.outputCorrelation(correlationCoefficient);\n }", "public void fill_table_sale_pattern(ArrayList<ArrayList<Object>> sale_pattern) {\r\n\t\tfor (ArrayList<Object> row : sale_pattern) {\r\n\t\t\tsale_patterns_list.add(new SalePattern((String) row.get(0), (String) row.get(1), (String) row.get(2),\r\n\t\t\t\t\t(String) row.get(3), (Float) row.get(4), (Integer) row.get(5), (String) row.get(6),\r\n\t\t\t\t\t(Integer) row.get(7), (String) row.get(8)));\r\n\t\t}\r\n\t\tsales_table.setItems(sale_patterns_list);\r\n\r\n\t}", "@Override\n public void newSale(double payment) {\n calculateTotalRevenue(payment);\n showTotalRevenue();\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}", "static int OPLOpenTable() {\n int s, t;\n double rate;\n int i, j;\n double pom;\n\n /* allocate dynamic tables */\n TL_TABLE = new IntArray(TL_MAX * 2);\n SIN_TABLE = new IntArray[SIN_ENT * 4];\n AMS_TABLE = new IntArray(AMS_ENT * 2);\n VIB_TABLE = new IntArray(VIB_ENT * 2);\n /* make total level table */\n for (t = 0; t < EG_ENT - 1; t++) {\n rate = ((1 << TL_BITS) - 1) / Math.pow(10, EG_STEP * t / 20);\n /* dB . voltage */\n\n TL_TABLE.write(t, (int) rate);\n TL_TABLE.write(TL_MAX + t, -TL_TABLE.read(t));\n /*Log(LOG_INF,\"TotalLevel(%3d) = %x\\n\",t,TL_TABLE[t]);*/\n }\n /* fill volume off area */\n for (t = EG_ENT - 1; t < TL_MAX; t++) {\n\n TL_TABLE.write(t, 0);\n TL_TABLE.write(TL_MAX + t, 0);//TL_TABLE[t] = TL_TABLE[TL_MAX + t] = 0;\n }\n\n /* make sinwave table (total level offet) */\n /* degree 0 = degree 180 = off */\n SIN_TABLE[0] = SIN_TABLE[SIN_ENT / 2] = new IntArray(TL_TABLE, EG_ENT - 1);\n for (s = 1; s <= SIN_ENT / 4; s++) {\n pom = Math.sin(2 * Math.PI * s / SIN_ENT);\n /* sin */\n\n pom = 20 * Math.log10(1 / pom);\n /* decibel */\n\n j = (int) (pom / EG_STEP);\n /* TL_TABLE steps */\n\n /* degree 0 - 90 , degree 180 - 90 : plus section */\n SIN_TABLE[s] = SIN_TABLE[SIN_ENT / 2 - s] = new IntArray(TL_TABLE, j);\n /* degree 180 - 270 , degree 360 - 270 : minus section */\n SIN_TABLE[SIN_ENT / 2 + s] = SIN_TABLE[SIN_ENT - s] = new IntArray(TL_TABLE, TL_MAX + j);\n /*\t\tLog(LOG_INF,\"sin(%3d) = %f:%f db\\n\",s,pom,(double)j * EG_STEP);*/\n }\n for (s = 0; s < SIN_ENT; s++) {\n SIN_TABLE[SIN_ENT * 1 + s] = s < (SIN_ENT / 2) ? SIN_TABLE[s] : new IntArray(TL_TABLE, EG_ENT);\n SIN_TABLE[SIN_ENT * 2 + s] = SIN_TABLE[s % (SIN_ENT / 2)];\n SIN_TABLE[SIN_ENT * 3 + s] = ((s / (SIN_ENT / 4)) & 1) != 0 ? new IntArray(TL_TABLE, EG_ENT) : SIN_TABLE[SIN_ENT * 2 + s];\n }\n /* envelope counter . envelope output table */\n for (i = 0; i < EG_ENT; i++) {\n /* ATTACK curve */\n pom = Math.pow(((double) (EG_ENT - 1 - i) / EG_ENT), 8) * EG_ENT;\n /* if( pom >= EG_ENT ) pom = EG_ENT-1; */\n ENV_CURVE[i] = (int) pom;\n /* DECAY ,RELEASE curve */\n ENV_CURVE[(EG_DST >> ENV_BITS) + i] = i;\n }\n /* off */\n ENV_CURVE[EG_OFF >> ENV_BITS] = EG_ENT - 1;\n /* make LFO ams table */\n for (i = 0; i < AMS_ENT; i++) {\n pom = (1.0 + Math.sin(2 * Math.PI * i / AMS_ENT)) / 2;\n /* sin */\n\n AMS_TABLE.write(i, (int) ((1.0 / EG_STEP) * pom));\n /* 1dB */\n\n AMS_TABLE.write(AMS_ENT + i, (int) ((4.8 / EG_STEP) * pom));\n /* 4.8dB */\n\n }\n /* make LFO vibrate table */\n for (i = 0; i < VIB_ENT; i++) {\n /* 100cent = 1seminote = 6% ?? */\n pom = (double) VIB_RATE * 0.06 * Math.sin(2 * Math.PI * i / VIB_ENT);\n /* +-100sect step */\n\n VIB_TABLE.write(i, (int) (VIB_RATE + (pom * 0.07)));\n /* +- 7cent */\n\n VIB_TABLE.write(VIB_ENT + i, (int) (VIB_RATE + (pom * 0.14)));\n /* +-14cent */\n /* Log(LOG_INF,\"vib %d=%d\\n\",i,VIB_TABLE[VIB_ENT+i]); */\n\n }\n return 1;\n }", "public static void main(String[] args) {\n Double rateOfSvi;\n Double rateOfEvi;\n Double rateOfIvi;\n Double rateOfShi;\n Double rateOfEhi;\n Double rateOfIhi;\n Double weeklyRateOfIhi;\n Double Ihi;\n int nextSvi;\n int nextEvi;\n int nextIvi;\n int nextShi;\n int nextEhi;\n int nextIhi;\n int week = 0;\n final int id = 69;\n String[] line;\n final int[] infectedPredictions = new int[53];\n double vectorPopulation; // 3times the Host population in the area\n// initializeMobility();\n int val = 0;\n double error = 1000;\n\n// for(int e = 3500; e < 4500; e++) {\n// mohSampleMob = e;\n\n// System.out.println(\"Mobility Initialized\");\n initializePopulation();\n// System.out.println(\"Population Initialized\");\n initializeInfected();\n// System.out.println(\"Infected Initialized\");\n setInitialConditions(id, 0);\n// System.out.println(\"Initial conditions created\");\n// System.out.println(\"betaVi,betaHi,scalingFactor = \" + betaVi + \",\" + betaHi + \",\" + scalingFactor);\n infectedPredictions[0] = currentIhi;\n// try {\n// writer = new CSVWriter(new FileWriter(\"/Users/Anushka/Documents/workspace/CSV/Colombo_MSE.csv\"));\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n// for (int bvi = 0; bvi<100 ; bvi++) {\n// betaVi = (bvi * 0.01);\n// for (int bhi = 0; bhi < 100; bhi++) {\n// betaHi = (bhi * 0.01);\n for (int i = 1; i <= 52; i++) {\n week = i;\n weeklyRateOfIhi = 0.0;\n\n setInitialConditions(69, week - 1);\n\n for (int j = 0; j < 7; j++) { // Do this for a week as we calculate daily figures.\n //Equations for the vectors\n rateOfSvi = muVi * scalingFactor * getMOHPopulation(id) - betaVi * getConnectivity(id, week) * currentSvi - muVi * currentSvi; // scalingFactor*HostPopulation = vectorPopulation\n rateOfEvi = betaVi * getConnectivity(id, week) * currentSvi - muVi * currentEvi - kappa * currentEvi;\n rateOfIvi = kappa * currentEvi - muVi * currentIvi;\n\n // Equations for the hosts\n rateOfShi = getMOHPopulation(id) - betaHi * getConnectivityWithinRegion(id) * currentShi - muHi * currentShi;\n rateOfEhi = betaHi * getConnectivityWithinRegion(id) * currentShi - lambda * currentEhi - muHi * currentEhi;\n rateOfIhi = lambda * currentEhi - delta * currentIhi - muHi * currentIhi;\n weeklyRateOfIhi += rateOfIhi;\n // Obtain next states\n\n// if (i == 0) {\n// currentSvi = rateOfSvi.intValue();\n// currentEvi = rateOfEvi.intValue();\n// currentIvi = rateOfIvi.intValue();\n// currentShi = rateOfShi.intValue();\n// currentEhi = rateOfEhi.intValue();\n// currentIhi = rateOfIhi.intValue();\n// }else{\n currentSvi += rateOfSvi.intValue();\n currentEvi += rateOfEvi.intValue();\n currentIvi += rateOfIvi.intValue();\n currentShi += rateOfShi.intValue();\n currentEhi += rateOfEhi.intValue();\n\n// if (rateOfIhi.intValue() > 0) {\n// currentIhi += rateOfIhi.intValue();\n// }\n// }\n\n\n }\n infectedPredictions[week] = weeklyRateOfIhi.intValue();\n //System.out.println(\"Week \" + week + \" Prediction \" + infectedPredictions[week] + \" Actual \" + infected[id][week]);\n //System.out.print(infectedPredictions[week] + \",\");\n //System.out.print(infected[id][week] + \",\");\n // Set current infected to actual value for next prediction\n currentIhi = infected[id][week];\n }\n System.out.println(Arrays.toString(infectedPredictions));\n System.out.println(Arrays.toString(infected[id]));\n\n// double er = calculateMSE(infectedPredictions, infected[id]);\n System.out.println(betaVi + \" \" + betaHi + \" \" + calculateMSE(infectedPredictions, infected[id]));\n\n// if(er < error){\n// error = er;\n// val = e;\n// }\n\n// DrawGraph provider = new DrawGraph();\n// DrawGraph.createAndShowGui();\n int[] actual = Arrays.copyOfRange(infected[id], 0, 52);\n int[] predict = Arrays.copyOfRange(infectedPredictions, 0, 52);\n\n// System.out.println();\n// }\n\n// System.out.println(val);\n// System.out.println(Arrays.toString(predict));\n// System.out.println(Arrays.toString(actual));\n\n XYLineChartExample temp = new XYLineChartExample(actual, predict);\n\n\n// BufferedWriter br = null;\n// try {\n// br = new BufferedWriter(new FileWriter(\"myfile.csv\"));\n//\n// StringBuilder sb = new StringBuilder();\n// for (int element : infectedPredictions) {\n// sb.append(element);\n// sb.append(\",\");\n// }\n// sb.append(\",\");\n//\n// for (int element : infected[id]) {\n// sb.append(element);\n// sb.append(\",\");\n// }\n//\n// br.write(String.valueOf(sb));\n// br.close();\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n\n\n //line = new String[]{Double.toString(betaVi), Double.toString(betaHi), Double.toString(calculateMSE(infectedPredictions, infected[id]))};\n //writer.writeNext(line);\n// }\n//\n// }\n// try {\n// writer.close();\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n }", "private DataSet normalDataSet(){\n //create normal distribution with mean .05 and sd .05/3 so that 99.7% of events are < .1\n NormalDistribution normalDistribution = new NormalDistribution(TARGET_MEAN, TARGET_MEAN/3D);\n DataSet dataSet = new DataSet();\n Task[] tasks = new Task[NUM_DISTINCT_TASKS];\n //generate costs from sampling from normal distribution\n for(int i=0; i < NUM_DISTINCT_TASKS; i++){\n UUID uuid = UUID.randomUUID();\n Long cost = (long) Math.max(1, normalDistribution.sample()); //make sure no 0 cost events\n tasks[i] = new Task(cost, uuid);\n }\n //generate task multiplities from sampling from uniform distribution\n for(int i=0; i < NUM_TASKS; i++){\n dataSet.getTasks().add(tasks[random.nextInt(NUM_DISTINCT_TASKS)]);\n }\n return dataSet;\n }", "public void calculateMetrics(){\n //precision\n precisionFinal = precision.stream().mapToDouble(f -> f).sum()/precision.size();\n System.out.print(\"Precision: \");\n System.out.println(precisionFinal);\n //recall\n recallFinal = recall.stream().mapToDouble(f -> f).sum()/recall.size();\n System.out.print(\"Recall: \");\n System.out.println(recallFinal);\n //fMeasures\n fMeausureFinal = fMeasures.stream().mapToDouble(f -> f).sum()/fMeasures.size();\n System.out.print(\"Fmeasure: \");\n System.out.println(fMeausureFinal);\n\n //MAP\n mapFinal = apRes.stream().mapToDouble(d->d).sum()/apRes.size();\n System.out.print(\"Mean Avarage Precision: \");\n System.out.println(mapFinal);\n \n mapLimitedFinal = apResRankedTopLimited.stream().mapToDouble(d->d).sum()/apResRankedTopLimited.size();\n System.out.print(\"Mean Precision at rank 10: \");\n System.out.println(mapLimitedFinal);\n \n //NDCG\n ndcgResultsFinal =0;\n ndcgResults.stream().forEach(l-> {\n //it is always true, only added to ensure that doesnt' break with another examples where some queries doens't have results.\n if(l.size()>0){\n ndcgResultsFinal= l.get(l.size()-1)+ndcgResultsFinal;\n }\n });\n ndcgResultsFinal=ndcgResultsFinal/ndcgResults.size();\n \n System.out.print(\"NDCG: \");\n System.out.println(ndcgResultsFinal);\n }", "public synchronized void updateTransdailyData() {\n Instant startTime = Instant.now();\n log.debug(\"start updateTransdailyData startTime:{}\", startTime.toEpochMilli());\n try {\n\n // query all group statistical info\n List<StatisticalGroupTransInfo> groupStatisticalList = groupService\n .queryLatestStatisticalTrans();\n\n // traverse group list\n traverseNetList(groupStatisticalList);\n\n } catch (Exception ex) {\n log.error(\"fail updateTransdailyData\", ex);\n }\n log.debug(\"end updateTransdailyData useTime:{}\",\n Duration.between(startTime, Instant.now()).toMillis());\n }", "public void initSalesList() {\n\n String sql = \"SELECT menu.id_product, menu.name, menu.price,size.size, COUNT(orders_menu.id_order) \"\n + \"FROM menu, orders_menu, orders, size WHERE menu.id_product=orders_menu.id_product \"\n + \"AND orders.id_order=orders_menu.id_order AND orders.id_status=4 \"\n + \"AND size.id_size=menu.id_size GROUP BY menu.id_product\";\n\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\n\n session.beginTransaction();\n List<Object[]> empDepts = session.createNativeQuery(sql).list();\n\n salesFxObservableList.clear();\n for (Object[] objects : empDepts) {\n SalesFx salesFx = new SalesFx();\n salesFx.setIdProduct((Integer) objects[0]);\n salesFx.setName((String) objects[1]);\n salesFx.setPrice((Integer) objects[2]);\n salesFx.setSize((String) objects[3]);\n BigInteger bigInteger = (BigInteger) objects[4];\n salesFx.setSale(bigInteger.intValue());\n salesFxObservableList.add(salesFx);\n }\n\n session.getTransaction().commit();\n }", "@Override\n\tpublic List<ProfitResult> profitStatistic(Request staticRequest) {\n\t\tList<ProfitResult> result = new ArrayList<>();\n\t\tMap<String, int[]> buySellMap = new TreeMap<String, int[]>();\n\t\tIterator<Map.Entry<String, Map<LocalDate, List <Transaction>>>> iterator = this.result.entrySet().iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tMap.Entry<String, Map<LocalDate, List <Transaction>>> entry = iterator.next();\n\t\t\tIterator<Map.Entry<LocalDate, List <Transaction>>> iterator2 = entry.getValue().entrySet().iterator();\n\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\tMap.Entry<LocalDate, List <Transaction>> entry2 = iterator2.next();\n\t\t\t\tfor (Transaction Tra : entry2.getValue()) {\n\t\t\t\t\tint buySellAmount [] = new int [] {0,0};\n\t\t\t\t\tif( Tra.getMode().equals(TransactionMode.BUY)) {\n\t\t\t\t\t\tif (buySellMap.containsKey(Tra.getCurrencyCode())) {\n\t\t\t\t\t\t\tbuySellAmount[1] = buySellMap.get(Tra.getCurrencyCode())[1];\n\t\t\t\t\t\t\tbuySellAmount[0] = buySellMap.get(Tra.getCurrencyCode())[0] + (int)(Tra.getAmount()*this.currencyMap.get(entry2.getKey()).get(Tra.getCurrencyCode())*1.005d);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tbuySellAmount[0] = (int)(Tra.getAmount()*this.currencyMap.get(entry2.getKey()).get(Tra.getCurrencyCode())*1.005d);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif( Tra.getMode().equals(TransactionMode.SELL)) {\n\t\t\t\t\t\tif (buySellMap.containsKey(Tra.getCurrencyCode())) {\n\t\t\t\t\t\t\tbuySellAmount[0] = buySellMap.get(Tra.getCurrencyCode())[0];\n\t\t\t\t\t\t\tbuySellAmount[1] = buySellMap.get(Tra.getCurrencyCode())[1] + (int)(Tra.getAmount()*this.currencyMap.get(entry2.getKey()).get(Tra.getCurrencyCode())*0.995d);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tbuySellAmount[1] = (int)(Tra.getAmount()*this.currencyMap.get(entry2.getKey()).get(Tra.getCurrencyCode())*0.995d);\n\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tbuySellMap.put(Tra.getCurrencyCode(), buySellAmount);\n\n\t\t\t\t\t}\n\t\t\t\tIterator<Map.Entry<String, int []>> iterator3 = buySellMap.entrySet().iterator();\n\t\t\t\twhile (iterator3.hasNext()) {\n\t\t\t\t\tMap.Entry<String, int []> entry3 = iterator3.next();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tresult.add(new ProfitResult(entry3.getValue()[0], entry3.getValue()[1], entry2.getKey(), entry.getKey(), entry3.getKey()));\n\t\t\t\t}\n\t\t\t\tbuySellMap.clear();\n\t\t\t}\n\t\t}\n\t\treturn result;\n\n\t}", "public static void main(String[] args) {\n\t\tString fileName =\"5 Mins_Bid_2003.05.04_2017.07.31.csv\";\r\n\t\t\t\t\t\t\r\n\t\tString pathEURUSD = \"C:\\\\fxdata\\\\EURUSD_UTC_\"+fileName;\r\n\t\tString pathGBPUSD = \"C:\\\\fxdata\\\\GBPUSD_UTC_\"+fileName;\r\n\t\tString pathAUDUSD = \"C:\\\\fxdata\\\\AUDUSD_UTC_\"+fileName;\r\n\t\tString pathUSDJPY = \"C:\\\\fxdata\\\\USDJPY_UTC_\"+fileName;\r\n\t\tString pathUSDCAD = \"C:\\\\fxdata\\\\USDCAD_UTC_\"+fileName;\r\n\t\tString pathNZDUSD = \"C:\\\\fxdata\\\\NZDUSD_UTC_\"+fileName;\r\n\t\tString pathEURJPY = \"C:\\\\fxdata\\\\EURJPY_UTC_\"+fileName;\r\n\t\tString pathEURGBP = \"C:\\\\fxdata\\\\EURGBP_UTC_\"+fileName;\r\n\t\tString pathEURAUD = \"C:\\\\fxdata\\\\EURAUD_UTC_\"+fileName;\r\n\t\tString pathCADJPY = \"C:\\\\fxdata\\\\CADJPY_UTC_\"+fileName;\r\n\t\tString pathAUDJPY = \"C:\\\\fxdata\\\\AUDJPY_UTC_\"+fileName;\r\n\t\tString pathNZDJPY = \"C:\\\\fxdata\\\\NZDJPY_UTC_\"+fileName;\r\n\t\tString pathGBPJPY = \"C:\\\\fxdata\\\\GBPJPY_UTC_\"+fileName;\r\n\t\tString pathGBPCAD = \"C:\\\\fxdata\\\\GBPCAD_UTC_\"+fileName;\r\n\t\tString pathGBPAUD = \"C:\\\\fxdata\\\\GBPAUD_UTC_\"+fileName;\r\n\t\t\r\n\t\tArrayList<String> paths = new ArrayList<String>();\r\n\t\tpaths.add(pathEURUSD);\r\n\t\tpaths.add(pathGBPUSD);\r\n\t\tpaths.add(pathAUDUSD);\r\n\t\tpaths.add(pathUSDJPY);\r\n\t\tpaths.add(pathEURJPY);\r\n\t\tpaths.add(pathEURAUD);\r\n\t\tpaths.add(pathGBPJPY);\r\n\t\tpaths.add(pathGBPAUD);\r\n\t\t\r\n\t\tint limit = paths.size()-1;\r\n\t\tint initial = 0;\r\n\t\tlimit = 0;\r\n\t\tArrayList<QuoteShort> dataI \t\t= null;\r\n\t\tArrayList<QuoteShort> dataS \t\t= null;\r\n\t\tfor (int i=initial;i<=limit;i++){\r\n\t\t\tString path = paths.get(i);\t\r\n\t\t\tString pairName = paths.get(i).split(\"\\\\\\\\\")[2].substring(0, 6);\r\n\t\t\tif (path.contains(\"UTC\")){\r\n\t\t\t\tdataI \t\t= DAO.retrieveDataShort5m(path, DataProvider.DUKASCOPY_FOREX3);\r\n\t\t\t}else{\r\n\t\t\t\tdataI \t\t= DAO.retrieveDataShort5m(path, DataProvider.DUKASCOPY_FOREX4);\r\n\t\t\t}\r\n\t\t\tTestLines.calculateCalendarAdjustedSinside(dataI);\r\n\t\t\t//TradingUtils.cleanWeekendDataSinside(dataI); \t\r\n\t\t\tdataS = TradingUtils.cleanWeekendDataS(dataI); \t\t\t\r\n\t\t\tArrayList<QuoteShort> data = null;\r\n\t\t\tdata = dataS;\r\n\t\t\t//System.out.println(\"total data: \"+data.size());\r\n\t\t\tArrayList<Integer> maxMins = TradingUtils.calculateMaxMinByBarShortAbsoluteInt(data);\r\n\t\t\t\r\n\t\t\tint begin = 4000000;\r\n\t\t\tint end = 5000000;\r\n\t\t\tint tp = 10;\r\n\t\t\tint sl = 20;\r\n\t\t\tdouble comm = 1.4;\r\n\t\t\t\r\n\t\t\tfor (int h1=0;h1<=0;h1+=1){\r\n\t\t\t\tint h2 = h1+9;\r\n\t\t\t\tfor (int thr=0;thr<=1000;thr+=100){\r\n\t\t\t\t\tfor (int diff=20;diff<=20;diff+=10){\r\n\t\t\t\t\t\tfor (tp=10;tp<=10;tp++){\r\n\t\t\t\t\t\t\tfor (sl=40000;sl<=40000;sl+=50){\r\n\t\t\t\t\t\t\t\tTestRetraces.testRetracev4(data, maxMins, begin, end, h1, h2, thr, tp,sl,diff);\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\t\r\n\t\t\t\r\n\t\t\t/*for (begin=1;begin<=1;begin+=100000){\r\n\t\t\t\tend = begin + 7000000;\r\n\t\t\t\tfor (int nBars=1000;nBars<=1000;nBars+=12){\r\n\t\t\t\t\tfor (int h1=16;h1<=16;h1+=1){\r\n\t\t\t\t\t\tint h2 = h1+7;\r\n\t\t\t\t\t//for (int nBars=120;nBars<=120;nBars++){\r\n\t\t\t\t\t\t//TestRetraces.testMaxRetracing(data, begin, end, h1, h2);\r\n\t\t\t\t\t\tfor (int thr=2000;thr<=2000;thr+=100){\r\n\t\t\t\t\t\t\t//TestRetraces.testMaxRetracingBars(data,maxMins, begin, end, h1, h2,thr,nBars);\r\n\t\t\t\t\t\t\tfor (int minPips=10;minPips<=10;minPips++){\r\n\t\t\t\t\t\t\t\tfor (int tries=10;tries<=10;tries++){\r\n\t\t\t\t\t\t\t\t\tfor (tp=10;tp<=10;tp++){\r\n\t\t\t\t\t\t\t\t\t\t//TestRetraces.testRetraceFailsInARow(data, maxMins, begin, end, h1, h2, thr, nBars, minPips, tp, tries);\r\n\t\t\t\t\t\t\t\t\t\tfor (sl=100;sl<=100;sl+=50){\r\n\t\t\t\t\t\t\t\t\t\t\tfor (int minDayLost=1;minDayLost<=10;minDayLost++){\r\n\t\t\t\t\t\t\t\t\t\t\t\tTestRetraces.testRetracev2(data, maxMins, begin, end, h1, h2, thr, nBars, minPips, tp,sl, minDayLost);\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\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\t\r\n\t\t}\r\n\t}", "private void remplirMaterielData() {\n\t}", "void openSuperMarketSimulation()\r\n\t{\n\t\t\r\n\t\tqueueManager = new QueueManager(shoppingQueue);\r\n\t\tdataManager = new DataCollector();\r\n\t\ttimerLoop.start();\r\n\t\tsuperMarketTime.timerStart();\r\n//\t\twhile(timerLoop.isRunning())\r\n//\t\t{\r\n//\t\t\t\r\n//\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//CLOSE THE MARKET :(((\r\n\t}", "private void analyseSamples(){\n EditText editTx;\n\n resetBackgrounds();\n\n MeasureSet measureSet;\n ArrayList<View> views = new ArrayList<View>();\n\n for(int y = 1; y <= rowCount; y++) {\n measureSet = new MeasureSet();\n views.clear();\n measureSet.copyUncertainty(measuredMag);\n for (int x = 1; x <= columnCount; x++) {\n editTx = (EditText) rootView.findViewById(Integer.parseInt(\"10\" + x + \"00\" + y)).findViewById(R.id.third_list_value);\n views.add(editTx);\n\n try {\n measureSet.add(Double.parseDouble(editTx.getText().toString()));\n } catch (Exception e) {\n editTx.setBackgroundResource(R.drawable.red_shape);\n Toast.makeText(getActivity(), getString(R.string.third_invalid_value), Toast.LENGTH_SHORT).show();\n return;\n }\n }\n\n if (!StatisticUtils.applyChauvenet(measureSet, views)) {\n Toast.makeText(getActivity(), getString(R.string.third_chauvenet_invalid_samples), Toast.LENGTH_SHORT).show();\n return;\n }\n\n measuredMag.addMeasureSet(measureSet);\n }\n\n ((MainActivity) getActivity()).callFragment(Constants.FINAL_STEP_FRAGMENT, mag1, mag2);\n }", "private void searchex()\n {\n try\n {\n this.dtm.setRowCount(0);\n \n String a = \"date(now())\";\n if (this.jComboBox1.getSelectedIndex() == 1) {\n a = \"DATE_ADD( date(now()),INTERVAL 10 DAY)\";\n } else if (this.jComboBox1.getSelectedIndex() == 2) {\n a = \"DATE_ADD( date(now()),INTERVAL 31 DAY)\";\n } else if (this.jComboBox1.getSelectedIndex() == 3) {\n a = \"DATE_ADD( date(now()),INTERVAL 90 DAY)\";\n } else if (this.jComboBox1.getSelectedIndex() == 4) {\n a = \"DATE_ADD( date(now()),INTERVAL 180 DAY)\";\n }\n ResultSet rs = this.d.srh(\"select * from stock inner join product on stock.product_id = product.id where exdate <= \" + a + \" and avqty > 0 order by exdate\");\n while (rs.next())\n {\n Vector v = new Vector();\n v.add(rs.getString(\"product_id\"));\n v.add(rs.getString(\"name\"));\n v.add(rs.getString(\"stock.id\"));\n v.add(Double.valueOf(rs.getDouble(\"buyprice\")));\n v.add(Double.valueOf(rs.getDouble(\"avqty\")));\n v.add(rs.getString(\"exdate\"));\n this.dtm.addRow(v);\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "private double calc_gain_ratio(String attrb,int partitonElem,HashMap<Integer, WeatherData> trainDataXMap,HashMap<Integer, WeatherData> trainDataYMap,double information_gain_System,int total_count_in_train)\n\t{\n\t\t\n\t\tHashMap<Integer,Integer> X_Train_attrb_part1 = new HashMap<Integer,Integer>();\n\t\tHashMap<Integer,Integer> X_Train_attrb_part2 = new HashMap<Integer,Integer>();\n\t\tHashMap<Integer,WeatherData> Y_Train_attrb_part1 = new HashMap<Integer,WeatherData>();\n\t\tHashMap<Integer,WeatherData> Y_Train_attrb_part2 = new HashMap<Integer,WeatherData>();\n\t\t//System.out.println(\"the partition elem is\"+partitonElem);\n\t\tfor(int i=1;i<=trainDataXMap.size();i++)\n\t\t{\n\t\t\tWeatherData wd = trainDataXMap.get(i);\n\t\t\t\n\t\t\tfor(Feature f: wd.getFeatures())\n\t\t\t{\n\t\t\t\tif(f.getName().contains(attrb))\n\t\t\t\t{\n\t\t\t\t\tint attrb_val = Integer.parseInt(f.getValues().get(0).toString());\n\t\t\t\t\tint xTRainKey = getKey(wd);\n\t\t\t\t\tif(attrb_val <= partitonElem)\n\t\t\t\t\t{\n\t\t\t\t\t\tX_Train_attrb_part1.put(xTRainKey,attrb_val);\n\t\t\t\t\t\tY_Train_attrb_part1.put(xTRainKey, trainDataYMap.get(xTRainKey));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tX_Train_attrb_part2.put(xTRainKey,attrb_val);\n\t\t\t\t\t\tY_Train_attrb_part2.put(xTRainKey, trainDataYMap.get(xTRainKey));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Size of first partition\n\t\tint Total_Count_attr_part1 = X_Train_attrb_part1.size();\n\t\t//System.out.println(\"the size of X first partition\"+Total_Count_attr_part1);\n\t\t//System.out.println(\"the size of Y first partition\"+Y_Train_attrb_part1.size());\n\t\t\n\t\t//Size of second partition\n\t\tint Total_Count_attr_part2 = X_Train_attrb_part2.size();\n\t\t//System.out.println(\"the size of X second partition\"+Total_Count_attr_part2);\n\t\t//System.out.println(\"the size of Y second partition\"+Y_Train_attrb_part2.size());\n\t\t\n\t\t//No of records in first partition where EVENT = RAIN \n\t\tint count_rain_yes_part1 = getCountsOfRain(Y_Train_attrb_part1,true,Total_Count_attr_part1);\n\t\t//System.out.println(\"count of rain in first part1\"+count_rain_yes_part1);\n\t\t\n\t\t//No of records in first partition where EVENT != RAIN Y_Train_attrb_part1\n\t\tint count_rain_no_part1 = getCountsOfRain(Y_Train_attrb_part1,false,Total_Count_attr_part1);\t\t\n\t\t//System.out.println(\"count of no rain in first part1\"+count_rain_no_part1);\n\t\t\n\t\t//Compute the Information Gain in first partition\n\t\t\n\t\tdouble prob_yes_rain_part1 = 0.0;\n\t\tdouble prob_no_rain_part1 = 0.0;\n\t\tdouble prob_yes_rain_part2 = 0.0;\n\t\tdouble prob_no_rain_part2 = 0.0;\n\t\tdouble getInfoGain_part1 = 0.0;\n\t double getInfoGain_part2 = 0.0;\n\t double gain_ratio_partition = 0.0;\n\t\tif(Total_Count_attr_part1!=0){\n\t\t\tprob_yes_rain_part1 = (count_rain_yes_part1/(double)Total_Count_attr_part1);\n\t\t\tprob_no_rain_part1 = (count_rain_no_part1/(double)Total_Count_attr_part1);\t\t\t\n\t\t}\n\t\tif((prob_yes_rain_part1!=0.0) && (prob_no_rain_part1!=0.0))\n\t\t{\n\t\t\tgetInfoGain_part1 = getInformationGain(prob_yes_rain_part1,prob_no_rain_part1);\n\t\t}\t\t\n\t\t\n\t\t//System.out.println(\"the info gain from part1\"+getInfoGain_part1);\n\t\t//No of records in second partition where EVENT = RAIN \n int count_rain_yes_part2 = getCountsOfRain(Y_Train_attrb_part2,true,Total_Count_attr_part2);\n\t\t\n //No of records in first partition where EVENT != RAIN\n\t\tint count_rain_no_part2 = getCountsOfRain(Y_Train_attrb_part2,false,Total_Count_attr_part2);\t\n\t\t\n\t\t//Compute the Information Gain in second partition\n\t\tif(Total_Count_attr_part2!=0)\n\t\t{\n\t\t\tprob_yes_rain_part2 = (count_rain_yes_part2/(double)Total_Count_attr_part2);\n\t\t\tprob_no_rain_part2 = (count_rain_no_part2/(double)Total_Count_attr_part2);\n\t\t\t\n\t\t}\n\t\tif((prob_yes_rain_part2!=0.0) && (prob_no_rain_part2!=0.0))\n\t\t{\n\t\t\tgetInfoGain_part2 = getInformationGain(prob_yes_rain_part2,prob_no_rain_part2);\n\t\t}\n\t\t//System.out.println(\"the info gain from part2\"+getInfoGain_part2);\n\t\t\n\t\t//Total Information from both partitions\n\t\tdouble infoGainFrom_Partition = getInfoGain_part1 + getInfoGain_part2;\n\t\t\n\t\t//Gain from the Partition\n\t\tdouble Gain_from_partition = information_gain_System - infoGainFrom_Partition;\n\t\t//System.out.println(\"The inf gain from system\"+information_gain_System);\n\t\t//System.out.println(\"The inf gain from part\"+infoGainFrom_Partition);\n\t\t//System.out.println(\"The gain from part\"+Gain_from_partition);\n\t\t\n\t\t//Split information of partition\n\t\tif((Total_Count_attr_part1!=0) && (Total_Count_attr_part2!=0))\n\t\t{\n\t\n\t\t\tdouble splitInfoFromPartition = getInformationGain(((double)Total_Count_attr_part1/total_count_in_train),\n ((double)Total_Count_attr_part2/total_count_in_train));\n\t\t\t\n\t\t\t//System.out.println(\"The split info from partition\"+splitInfoFromPartition);\n \n\t\t\t//Gain ratio of Partition\n gain_ratio_partition = Gain_from_partition/splitInfoFromPartition;\n\t\t}\n\t\t//System.out.println(\"The gain ratio info from partition\"+gain_ratio_partition);\n\t\treturn gain_ratio_partition;\n\t}", "public void salesReport(View view) {\n String dbString = dbHandler.databaseToString();\n// start a new intent an ddisplay the output there\n Intent saleseIntent = new Intent(this, DisplaySalesDetails.class);\n saleseIntent.putExtra(\"db\",dbString);\n startActivity(saleseIntent);\n }", "private void iterativeDataPropertyMetrics() {\n\t}", "private void doLine()\n\t{\n\t\tubisenseData = new UbisenseMockupData();\n\t\tDecimalFormat df = new DecimalFormat(\"#0,00\");\n\n\t\telapsedTime = 0;\n\t\t\n\t\tubisenseData.setTagID(Helper.DEFAULT_TAG_ID);\n\t\tubisenseData.setUnit(Helper.UBISENSE_UNIT);\n\t\tubisenseData.setOntology(Helper.LP_ONTOLOGY_URL);\n\t\tubisenseData.setVersion(Helper.UBISENSE_VERSION);\n\t\tubisenseData.setId(\"\");\n\t\tubisenseData.setSendTime(sendTime);\n\t\t\n\t\tlong millis = startDate.getMillis();\n\t\tmillis += offset.toStandardDuration().getMillis();\n//\t\tmillis += parentOffset.toStandardDuration().getMillis();\n\t\t\n\t\t// Steigung m und Achsenabschnitt b berechnen\n//\t\tdouble m = 0.;\n//\t\tif ((x2-x1)!=0)\n//\t\t\tm = (y2-y1)/(x2-x1);\n//\t\tdouble b = y1 - (m * x1);\n\t\t\n\t\t// Abstand zwischen beiden Koordinaten d\n\t\tdouble dsquare = Math.pow((x2-x1),2) + Math.pow((y2-y1),2);\n\t\tdouble d = Math.sqrt(dsquare);\n\n\t\t// Zeit t [s] berechnen, die für die Distanz d unter gegebener Geschwindigkeit benötigt wird.\n\t\tdouble t = d / toolSpeed;\n\t\tdouble steps = Math.ceil(t) +1;\n\t\t\n\t\twhile (steps>0 && !terminate)\n\t\t{\n\t\t\tdouble x,y, currentTime=0;\n\t\t\tif (t != 0)\n\t\t\tcurrentTime = elapsedTime / t;\n\t\t\t\n\t\t\tx = (x2-x1) * currentTime + x1;\n\t\t\ty = (y2-y1) * currentTime + y1;\n\t\t\tubisenseData.setPosition(new Point3D(\tDouble.parseDouble(df.format(x)),\n\t\t\t \tDouble.parseDouble(df.format(y)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t1.6));\n\t\t\tubisenseData.setId(String.valueOf(Helper.getRandomInt()));\n\t\t\tubisenseData.setTime(millis + (long)(elapsedTime*SLEEP_INTERVAL));\n\t\t\tEntryEvent event = new EntryEvent(this);\n\t\t\tnotifyListeners(event);\n\t\t\telapsedTime++;\n\t\t\tif (elapsedTime > t)\n\t\t\t\telapsedTime = t;\n\t\t\t\n\t\t\tsteps--;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (speed > 0)\n\t\t\t\t\tThread.sleep(SLEEP_INTERVAL/speed);\n\t\t\t}\n\t\t\tcatch (InterruptedException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void getDemoData(Vector data)\r\n {\r\n\r\n debug(\"getDemoData() - preparing to get Canned Data\");\r\n\r\n data.addElement(\r\n new StockData(\"ORCL\", \"Oracle Corp.\", 22.456, 23.285, 23.6875, 25.375, -1.6875, -6.42, 24976600, 0.0, 0.0));\r\n data.addElement(new StockData(\"EGGS\", \"Egghead.com\", 17.20, 17.43, 17.25, 17.4375, -0.1875, -1.43, 2146400, 0.0, 0.0));\r\n data.addElement(new StockData(\"T\", \"AT&T\", 65.078, 66, 65.1875, 66, -0.8125, -0.10, 554000, 0.0, 0.0));\r\n data.addElement(\r\n new StockData(\"LU\", \"Lucent Technology\", 64.625, 59.9375, 64.625, 59.9375, 4.6875, 9.65, 29856300, 0.0, 0.0));\r\n data.addElement(\r\n new StockData(\"FON\", \"Sprint\", 104.5625, 106.375, 104.5625, 106.375, -1.8125, -1.82, 1135100, 0.0, 0.0));\r\n data.addElement(new StockData(\"ENML\", \"Enamelon Inc.\", 4.875, 5, 4.875, 5, -0.125, 0, 35900, 0.0, 0.0));\r\n data.addElement(\r\n new StockData(\"CPQ\", \"Compaq Computers\", 30.875, 31.25, 30.875, 31.25, -0.375, -2.18, 11853900, 0.0, 0.0));\r\n data.addElement(\r\n new StockData(\"MSFT\", \"Microsoft Corp.\", 94.0625, 95.1875, 94.0625, 95.1875, -1.125, -0.92, 19836900, 0.0, 0.0));\r\n data.addElement(\r\n new StockData(\"DELL\", \"Dell Computers\", 46.1875, 44.5, 46.1875, 44.5, 1.6875, 6.24, 47310000, 0.0, 0.0));\r\n data.addElement(\r\n new StockData(\"SUNW\", \"Sun Microsystems\", 140.625, 130.9375, 140.625, 130.9375, 10, 10.625, 17734600, 0.0, 0.0));\r\n data.addElement(\r\n new StockData(\"IBM\", \"Intl. Bus. Machines\", 183, 183.125, 183, 183.125, -0.125, -0.51, 4371400, 0.0, 0.0));\r\n data.addElement(new StockData(\"HWP\", \"Hewlett-Packard\", 70, 71.0625, 70, 71.0625, -1.4375, -2.01, 2410700, 0.0, 0.0));\r\n data.addElement(new StockData(\"UIS\", \"Unisys Corp.\", 28.25, 29, 28.25, 29, -0.75, -2.59, 2576200, 0.0, 0.0));\r\n data.addElement(new StockData(\"SNE\", \"Sony Corp.\", 28.25, 29, 28.25, 29, -0.75, -2.59, 2576200, 0.0, 0.0));\r\n data.addElement(\r\n new StockData(\"NOVL\", \"Novell Inc.\", 24.0625, 24.375, 24.0625, 24.375, -0.3125, -3.02, 6047900, 0.0, 0.0));\r\n data.addElement(new StockData(\"HIT\", \"Hitachi, Ltd.\", 78.5, 77.625, 78.5, 77.625, 0.875, 1.12, 49400, 0.0, 0.0));\r\n\r\n debug(\"getDemoData() - complete\");\r\n }", "@Test()\n\tpublic void groupSales_US440_TC3481() throws InterruptedException,\n\t\t\tRowsExceededException, BiffException, WriteException, IOException, ParseException {\n\t\t/** Variable Section : **/\n\t\tGroupSalesPage groupSalesPage;\n\t\tAbstractTest.tcName=\"groupSales_US440_TC3481\";\n\t\tString password = LoginTestData.level1_SSO_Password;\n\t\tString userId = LoginTestData.level1_SSO_UserId;\n\t\tString storeId = LoginTestData.level1StoreId;\n\t\t/***********************************/\n\t\tHomePage homePage = PageFactory.initElements(driver, HomePage.class);\n\t\t// Navigate to Group sales page\n\t\tgroupSalesPage = homePage.selectUserWithSSOLogin(userId, password).selectLocation(storeId)\n\t\t\t\t.goToGroupSalesPage();\n\t\t//Click on edit button for first validated record\n\t\tJavascriptExecutor executor = (JavascriptExecutor)driver;\n\t\texecutor.executeScript(\"arguments[0].click();\",groupSalesPage.TextExemptSales_BaggedRecord_View_BT);\n\t\twait.until(ExpectedConditions.visibilityOf(groupSalesPage.EditTaxExemptSales_PopUp_Header));\n\t\tString headerText = groupSalesPage.TaxExemptSalesPopUp_HeaderText_Value.getText();\n\t\tSystem.out.println(\"Header Text \"+ headerText);\n\t\tString register = headerText.split(\"\\\\|\")[0].trim();\n\t\tString date = headerText.split(\"\\\\|\")[1].trim();\n\t\tString time = headerText.split(\"\\\\|\")[2].trim();\n\t\tString user = headerText.split(\"\\\\|\")[3].trim();\n\t\tif (date.matches(\"([0-9]{2})/([0-9]{2})/([0-9]{4})\")) {\n\t\t\tReporter.reportPassResult(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"user should be able to view auto pupulated date in view Tax Exempt Sales Page\",\n\t\t\t\t\t\"Pass\");\n\t\t} else {\n\t\t\tReporter.reportTestFailure(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"user should be able to view auto pupulated date in view Tax Exempt Sales Page\",\n\t\t\t\t\t\"Fail\");\n\t\t\tAbstractTest.takeSnapShot();\n\t\t}\n\t\tif (time.matches(\"([0-2]{1,}[0-9]{1,})(:)([0-5]{1,}[0-9]{1,})\")) {\n\t\t\tReporter.reportPassResult(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"user should be able to view auto pupulated time in view Tax Exempt Sales Page\",\n\t\t\t\t\t\"Pass\");\n\t\t} else {\n\t\t\tReporter.reportTestFailure(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"user should be able to view auto pupulated time in view Tax Exempt Sales Page\",\n\t\t\t\t\t\"Fail\");\n\t\t\tAbstractTest.takeSnapShot();\n\t\t}\n\t\tif(!register.isEmpty() & !user.isEmpty() & !groupSalesPage.EditTaxExemptSalesPopUp_Amount_TB.getAttribute(\"value\").isEmpty()){\n\t\t\tReporter.reportPassResult(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"user should be able to view auto pupulated Amount,Register #,User in view Tax Exempt Sales Page\",\n\t\t\t\t\t\"Pass\");\n\t\t} else {\n\t\t\tReporter.reportTestFailure(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"user should be able to view auto pupulated Amount,Register #,User in view Tax Exempt Sales Page\",\n\t\t\t\t\t\"Fail\");\n\t\t\tAbstractTest.takeSnapShot();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "private void estadoInicial(){\n double referencias[] = new double[sigmas.length];\n for(int i=0;i<sigmas.length;i++){\n referencias[i] = (ppl.limiteSuperiorR(i+1)+ppl.limiteInferiorR(i+1))/2;\n System.out.printf(\"limS:%g, limI:%g, Referencias[%d] = %g\\n\",ppl.limiteSuperiorR(i+1),ppl.limiteInferiorR(i+1),i,referencias[i]);\n }\n\n double Zc = ppl.Z(referencias[0],referencias[1]);\n TActual = Zc*0.2;\n System.out.printf(\"TActual:T%g \\n\",TActual);\n\n estadoMejor = new Estado(\n iteracionActual, \n TActual, \n referencias,\n Zc);\n\n calcularSoluciones(estadoMejor);\n calcularProbabilidadAceptacion(estadoMejor);\n\n historialEstados.add(estadoMejor);\n }", "public double getStockFinal(long pv) {\n float entree = 0 ;\n float sortie = 0 ;\n\n ArrayList<Produit> produits = null ;\n if (pv==0) produits = produitDAO.getAll();\n else produits = produitDAO.getAllByPv(pv) ;\n\n ArrayList<Mouvement> mouvements = null;\n\n double valeur = 0 ;\n double total = 0 ;\n double quantite = 0 ;\n double cmpu = 0 ;\n double restant = 0 ;\n double qsortie = 0 ;\n double qentree = 0 ;\n // Vente par produit\n Mouvement mouvement = null ;\n Operation operation = null ;\n\n for (int i = 0; i < produits.size(); i++) {\n try {\n mouvements = mouvementDAO.getManyByProductInterval(produits.get(i).getId_externe(),DAOBase.formatter2.parse(datedebut),DAOBase.formatter2.parse(datefin)) ;\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n if (mouvements != null){\n valeur = 0 ;\n quantite = 0 ;\n restant = 0 ;\n qentree = 0 ;\n cmpu = 0 ;\n qsortie = 0 ;\n\n for (int j = 0; j < mouvements.size(); j++) {\n mouvement = mouvements.get(j) ;\n operation = operationDAO.getOne(mouvement.getOperation_id()) ;\n if (operation==null || (operation.getAnnuler()==1 && operation.getDateannulation().before(new Date())) || operation.getTypeOperation_id().startsWith(OperationDAO.CMD)) continue;\n\n //if (pv!=0 && caisseDAO.getOne(operation.getCaisse_id()).getPointVente_id()!=pv) continue;\n if (j==0)\n if (mouvement.getRestant()==mouvement.getQuantite() && mouvement.getEntree()==0){\n restant = 0 ;\n }\n else restant = mouvement.getRestant() ;\n\n if (mouvement.getEntree()==0) {\n valeur -= mouvement.getPrixA() * mouvement.getQuantite() ;\n qentree += mouvement.getQuantite() ;\n cmpu = mouvement.getPrixA() ;\n }\n else {\n valeur += mouvement.getCmup() * mouvement.getQuantite() ;\n qsortie += mouvement.getQuantite() ;\n }\n /*\n if (restant!=0) cmpu = valeur / restant ;\n else cmpu = mouvement.getCmup() ;\n */\n }\n\n quantite = restant + qentree - qsortie ;\n total+=Math.abs(valeur) ;\n }\n }\n\n return total;\n }", "void generateMgiCrisprAlleleReport();", "private void extractDataFromOrders(List<Order> orders) {\n ArrayList<LocalDate> orderedListOfMapDays = new ArrayList<LocalDate>();\n HashMap<LocalDate, Integer> dateToCoffeeCaffeineMap = new HashMap<LocalDate, Integer>(), dateToTeaCaffeineMap = new HashMap<LocalDate, Integer>();\n HashMap<LocalDate, Double> dateToCoffeeExpenditureMap = new HashMap<LocalDate, Double>(), dateToTeaExpenditureMap = new HashMap<LocalDate, Double>();\n for (int i = 0; i < 8; i++) {\n LocalDate date = ONE_WEEK_AGO.plusDays(i);\n dateToCoffeeCaffeineMap.put(date, 0);\n dateToTeaCaffeineMap.put(date, 0);\n dateToCoffeeExpenditureMap.put(date, 0.0);\n dateToTeaExpenditureMap.put(date, 0.0);\n orderedListOfMapDays.add(date);\n }\n\n // loop through orders, comparing their days and adding values accordingly\n for (Order order : orders) {\n if (order == null) continue;\n // dates (in milliseconds) from orders are clocked to start of day and converted to dates\n LocalDateTime tempDateResetTime = order.getDate().toInstant()\n .atZone(ZoneId.systemDefault())\n .toLocalDate().atStartOfDay();\n LocalDate tempDate = tempDateResetTime.toLocalDate();\n Log.d(TAG, \"ORDER ON DAY: \" + tempDate);\n\n if (ONE_WEEK_AGO.isBefore(tempDate) || ONE_WEEK_AGO.isEqual(tempDate)) {\n // CAFFEINE\n // coffee caffeine\n int dailyCaffeineFromCoffee = 0;\n dailyCaffeineFromCoffee += (order.getTotalCaffeineFromCoffee(true) > 0 ? order.getTotalCaffeineFromCoffee(true) :\n order.getTotalCaffeineFromCoffee(false) > 0 ? order.getTotalCaffeineFromCoffee(false) : 0);\n dateToCoffeeCaffeineMap.put(tempDate, dateToCoffeeCaffeineMap.get(tempDate) + dailyCaffeineFromCoffee);\n // tea caffeine\n int dailyCaffeineFromTea = 0;\n dailyCaffeineFromTea += (order.getTotalCaffeineFromTea(true) > 0 ? order.getTotalCaffeineFromTea(true) :\n order.getTotalCaffeineFromTea(false) > 0 ? order.getTotalCaffeineFromTea(false) : 0);\n dateToTeaCaffeineMap.put(tempDate, dateToTeaCaffeineMap.get(tempDate) + dailyCaffeineFromTea);\n\n // EXPENDITURES\n // coffee cost\n double dailyExpenditureFromCoffee = 0.0;\n dailyExpenditureFromCoffee += (order.getTotalCostFromCoffee(true) > 0 ? order.getTotalCostFromCoffee(true) :\n order.getTotalCostFromCoffee(false) > 0 ? order.getTotalCostFromCoffee(false) : 0.0);\n dateToCoffeeExpenditureMap.put(tempDate, dateToCoffeeExpenditureMap.get(tempDate) + dailyExpenditureFromCoffee);\n // tea cost\n double dailyExpenditureFromTea = 0.0;\n dailyExpenditureFromTea += (order.getTotalCostFromTea(true) > 0 ? order.getTotalCostFromTea(true) :\n order.getTotalCostFromTea(false) > 0 ? order.getTotalCostFromTea(false) : 0.0);\n dateToTeaExpenditureMap.put(tempDate, dateToTeaExpenditureMap.get(tempDate) + dailyExpenditureFromTea);\n }\n }\n\n // CAFFEINE SERIES\n coffeeCaffeineSeries = new DateIntegerSeries(\"Coffee\");\n teaCaffeineSeries = new DateIntegerSeries(\"Tea\");\n // for formatting, add an empty value at FRONT of series\n coffeeCaffeineSeries.add(Date.from(ONE_WEEK_AGO.minusDays(1).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime(), 0);\n teaCaffeineSeries.add(Date.from(ONE_WEEK_AGO.minusDays(1).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime(), 0);\n for (int i = 0; i < orderedListOfMapDays.size(); i++) {\n LocalDate localDate = orderedListOfMapDays.get(i);\n Integer coffeeCaffeine = dateToCoffeeCaffeineMap.get(localDate);\n Integer teaCaffeine = dateToTeaCaffeineMap.get(localDate);\n\n Long date = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime();\n\n coffeeCaffeineSeries.add(date, coffeeCaffeine);\n teaCaffeineSeries.add(date, teaCaffeine);\n }\n // for formatting, add an empty value to BACK of series\n coffeeCaffeineSeries.add(Date.from(ONE_WEEK_AGO.plusDays(8).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime(), 0);\n teaCaffeineSeries.add(Date.from(ONE_WEEK_AGO.plusDays(8).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime(), 0);\n\n // EXPENDITURE SERIES\n coffeeExpenditureSeries = new DateDoubleSeries(\"Coffee\");\n teaExpenditureSeries = new DateDoubleSeries(\"Tea\");\n // for formatting, add an empty value at FRONT of series\n coffeeExpenditureSeries.add(Date.from(ONE_WEEK_AGO.minusDays(1).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime(), 0.0);\n teaExpenditureSeries.add(Date.from(ONE_WEEK_AGO.minusDays(1).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime(), 0.0);\n for (int i = 0; i < orderedListOfMapDays.size(); i++) {\n LocalDate localDate = orderedListOfMapDays.get(i);\n Double coffeeExpenditure = dateToCoffeeExpenditureMap.get(localDate);\n Double teaExpenditure = dateToTeaExpenditureMap.get(localDate);\n\n Long date = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime();\n\n coffeeExpenditureSeries.add(date, coffeeExpenditure);\n teaExpenditureSeries.add(date, teaExpenditure);\n }\n // for formatting, add an empty value to BACK of series\n coffeeExpenditureSeries.add(Date.from(ONE_WEEK_AGO.plusDays(8).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime(), 0.0);\n teaExpenditureSeries.add(Date.from(ONE_WEEK_AGO.plusDays(8).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()).getTime(), 0.0);\n }", "void genReport() {\n\n current_part.save_state(); \n\n JTextArea ta = text;\n\n ta.setText(\"\");\n\n if (!t_foil_name.equals(\"Test\"))\n ta.append(\"Hydrofoil: \" + t_foil_name);\n\n java.util.Date date = new java.util.Date();\n ta.append(\"\\n Date: \" + date);\n \n wing.print( \"Main Wing\", ta);\n stab.print( \"Stabilizer Wing\", ta);\n strut.print(\"Mast (a.k.a. Strut)\", ta);\n fuse.print( \"Fuselage\", ta);\n\n ta.append( \"\\n\\n\");\n // tail volume is LAElev * AreaElev / (MACWing * AreaWing)\n // LAElev : The elevator's Lever Arm measured at the wing's and elevator's quarter chord point\n double LAElev = stab.xpos + stab.chord_xoffs + 0.25*stab.chord - (wing.xpos + wing.chord_xoffs + 0.25*wing.chord);\n // MAC : The main wing's Mean Aerodynamic Chord\n // AreaWing : The main wing's area\n // AreaElev : The elevator's area\n \n ta.append( \"\\nTail Voulume: \" + LAElev*stab.span*stab.chord/(wing.chord*wing.chord*wing.span));\n \n\n ta.append( \"\\n\\n\");\n switch (planet) {\n case 0: { \n ta.append( \"\\n Standard Earth Atmosphere\" );\n break;\n }\n case 1: { \n ta.append( \"\\n Martian Atmosphere\" );\n break;\n }\n case 2: { \n ta.append( \"\\n Water\" );\n break;\n }\n case 3: { \n ta.append( \"\\n Specified Conditions\" );\n break;\n }\n case 4: { \n ta.append( \"\\n Specified Conditions\" );\n break;\n }\n }\n\n // ta.append( \"\\n Altitude = \" + filter0(alt_val) );\n // if (lunits == IMPERIAL) ta.append( \" ft ,\" );\n // else /*METRIC*/ ta.append( \" m ,\" );\n \n switch (lunits) {\n case 0: { /* English */\n ta.append( \"\\n Density = \" + filter5(rho_EN) );\n ta.append( \"slug/cu ft\" );\n ta.append( \"\\n Pressure = \" + filter3(ps0/144.) );\n ta.append( \"lb/sq in,\" );\n ta.append( \" Temperature = \" + filter0(ts0 - 460.) );\n ta.append( \"F,\" );\n break;\n }\n case 1: { /* Metric */\n ta.append( \" Density = \" + filter3(rho_EN*515.4) );\n ta.append( \"kg/cu m\" );\n ta.append( \"\\n Pressure = \" + filter3(101.3/14.7*ps0/144.) );\n ta.append( \"kPa,\" );\n ta.append( \" Temperature = \" + filter0(ts0*5.0/9.0 - 273.1) );\n ta.append( \"C,\" );\n break;\n }\n }\n\n ta.append( \"\\n Speed = \" + filter1(velocity * (lunits==IMPERIAL? 0.868976 : 0.539957 )) + \"Kts, or\" );\n ta.append( \" \" + filter1(velocity) );\n if (lunits == IMPERIAL) ta.append( \" mph ,\" );\n else /*METRIC*/ ta.append( \" km/hr ,\" );\n\n // if (out_aux_idx == 1)\n // ta.append( \"\\n Lift Coefficient = \" + filter3(current_part.cl) );\n // if (out_aux_idx == 0) {\n // if (Math.abs(lift) <= 10.0) ta.append( \"\\n Lift = \" + filter3(lift) );\n // if (Math.abs(lift) > 10.0) ta.append( \"\\n Lift = \" + filter0(lift) );\n // if (lunits == IMPERIAL) ta.append( \" lbs \" );\n // else /*METRIC*/ ta.append( \" Newtons \" );\n // }\n // if ( polarOut == 1)\n // ta.append( \"\\n Drag Coefficient = \" + filter3(current_part.cd) );\n // if (out_aux_idx == 0) {\n // ta.append( \"\\n Drag = \" + filter0(drag) );\n // if (lunits == IMPERIAL) ta.append( \" lbs \" );\n // else /*METRIC*/ ta.append( \" Newtons \" );\n // }\n\n ta.append( \"\\n Lift = \" + dash.outTotalLift.getText());\n ta.append( \"\\n Drag = \" + dash.outTotalDrag.getText());\n\n if (min_takeoff_speed_info != null) \n ta.append( \"\\n\\n\" + min_takeoff_speed_info);\n\n if (cruising_info != null) \n ta.append( \"\\n\\n\" + cruising_info);\n\n if (max_speed_info != null) \n ta.append( \"\\n\\n\" + max_speed_info);\n\n // ensure end ta.setCaretPosition(ta.getText().length());\n // ensure start\n ta.setCaretPosition(0);\n }", "private int creaSingoloAddebito(int cod, Date data) {\n /* variabili e costanti locali di lavoro */\n int nuovoRecord = 0;\n boolean continua;\n Dati dati;\n int codConto = 0;\n int codListino = 0;\n int quantita = 0;\n double prezzo = 0.0;\n Campo campoConto = null;\n Campo campoListino = null;\n Campo campoQuantita = null;\n Campo campoPrezzo = null;\n Campo campoData = null;\n Campo campoFissoConto = null;\n Campo campoFissoListino = null;\n Campo campoFissoQuantita = null;\n Campo campoFissoPrezzo = null;\n ArrayList<CampoValore> campi = null;\n Modulo modAddebito = null;\n Modulo modAddebitoFisso = null;\n\n try { // prova ad eseguire il codice\n\n modAddebito = Progetto.getModulo(Addebito.NOME_MODULO);\n modAddebitoFisso = Progetto.getModulo(AddebitoFisso.NOME_MODULO);\n\n /* carica tutti i dati dall'addebito fisso */\n dati = modAddebitoFisso.query().caricaRecord(cod);\n continua = dati != null;\n\n /* recupera i campi da leggere e da scrivere */\n if (continua) {\n\n /* campi del modulo Addebito Fisso (da leggere) */\n campoFissoConto = modAddebitoFisso.getCampo(Addebito.Cam.conto.get());\n campoFissoListino = modAddebitoFisso.getCampo(Addebito.Cam.listino.get());\n campoFissoQuantita = modAddebitoFisso.getCampo(Addebito.Cam.quantita.get());\n campoFissoPrezzo = modAddebitoFisso.getCampo(Addebito.Cam.prezzo.get());\n\n /* campi del modulo Addebito (da scrivere) */\n campoConto = modAddebito.getCampo(Addebito.Cam.conto.get());\n campoListino = modAddebito.getCampo(Addebito.Cam.listino.get());\n campoQuantita = modAddebito.getCampo(Addebito.Cam.quantita.get());\n campoPrezzo = modAddebito.getCampo(Addebito.Cam.prezzo.get());\n campoData = modAddebito.getCampo(Addebito.Cam.data.get());\n\n }// fine del blocco if\n\n /* legge i dati dal record di addebito fisso */\n if (continua) {\n codConto = dati.getIntAt(campoFissoConto);\n codListino = dati.getIntAt(campoFissoListino);\n quantita = dati.getIntAt(campoFissoQuantita);\n prezzo = (Double)dati.getValueAt(0, campoFissoPrezzo);\n dati.close();\n }// fine del blocco if\n\n /* crea un nuovo record in addebito */\n if (continua) {\n campi = new ArrayList<CampoValore>();\n campi.add(new CampoValore(campoConto, codConto));\n campi.add(new CampoValore(campoListino, codListino));\n campi.add(new CampoValore(campoQuantita, quantita));\n campi.add(new CampoValore(campoPrezzo, prezzo));\n campi.add(new CampoValore(campoData, data));\n nuovoRecord = modAddebito.query().nuovoRecord(campi);\n continua = nuovoRecord > 0;\n }// fine del blocco if\n\n /* aggiorna la data di sincronizzazione in addebito fisso */\n if (continua) {\n this.getModulo().query().registraRecordValore(cod, Cam.dataSincro.get(), data);\n }// fine del blocco if\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n /* valore di ritorno */\n return nuovoRecord;\n }" ]
[ "0.5719487", "0.5514344", "0.5379585", "0.52643156", "0.5185238", "0.5160591", "0.51219183", "0.5117341", "0.5110565", "0.50959486", "0.50860286", "0.5067791", "0.50611037", "0.5020054", "0.49758452", "0.49753213", "0.497276", "0.49650553", "0.49288768", "0.4928432", "0.4921729", "0.4921289", "0.49118686", "0.49094343", "0.4895324", "0.4889082", "0.48637813", "0.4853746", "0.4833858", "0.4826026", "0.482327", "0.48206133", "0.48149654", "0.48120767", "0.4804203", "0.47998744", "0.47996715", "0.47976187", "0.47904012", "0.4779761", "0.4765089", "0.4763545", "0.47611505", "0.4755182", "0.47511137", "0.4738112", "0.47380853", "0.47315398", "0.47269318", "0.47217965", "0.4721007", "0.4713064", "0.4709834", "0.4707928", "0.47076115", "0.47042125", "0.4702117", "0.47020078", "0.4701963", "0.4688135", "0.4687442", "0.46814233", "0.46772796", "0.46755698", "0.46744365", "0.46725625", "0.46702516", "0.4660807", "0.4659832", "0.46561188", "0.46530902", "0.465273", "0.46473894", "0.46472767", "0.46332818", "0.46306115", "0.46304592", "0.46281517", "0.4627214", "0.46254632", "0.46177697", "0.46116674", "0.46074468", "0.46072203", "0.46058384", "0.46056905", "0.46042523", "0.4600684", "0.4599452", "0.4590482", "0.45880997", "0.45837942", "0.45829976", "0.45825207", "0.45820382", "0.45804703", "0.45768127", "0.45670187", "0.45661557", "0.45560142", "0.45529604" ]
0.0
-1
initialize the screen, set the user name at the top of the page, and initialize table with the details of the sales
@Override public void initialize(URL location, ResourceBundle resources) { instance = this; user_fullname.setText("Hello ," + MainClientGUI.getUserFirstName() + " " + MainClientGUI.getUserLastName()); // set at the table nameColumn.setCellValueFactory(new PropertyValueFactory<SalePattern, String>("name")); fuelTypeColumn.setCellValueFactory(new PropertyValueFactory<SalePattern, String>("fuelType")); statusColumn.setCellValueFactory(new PropertyValueFactory<SalePattern, String>("status")); stationTagColumn.setCellValueFactory(new PropertyValueFactory<SalePattern, Integer>("gasStationTag")); discountColumn.setCellValueFactory(new PropertyValueFactory<SalePattern, Float>("discount")); // this query is for get from DB the details of the sales String query = "SELECT sp.name , f.fuelName, sp.startHour, sp.endHour, sp.discount,salePatternTag, sp.status, sp.stationTag, sp.description" + " FROM sale_pattern sp, fuels f" + " WHERE sp.fuelType = f.fuelType"; Message message = new Message(MessageType.REQUESTINFO, "MarketingAgentSalesMainController_initialize_table", query); MainClientGUI.client.handleMessageFromClientUI(message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initialScreen() {\n PortfolioStocksVOImpl vo = getPortfolioStocksVO();\n //Number numb = (Number)2;\n Number num = new Number(2);\n vo.setBindPortfolioID(2);\n vo.executeQuery();\n //System.out.println(\"\\n\\n\\n End initial screen method \\n\\n\");\n }", "public customer_table() {\n initComponents();\n getContentPane().setBackground(Color.pink);\n Toolkit tk=Toolkit.getDefaultToolkit();\n int w=(int)tk.getScreenSize().getWidth();\n int h=(int)tk.getScreenSize().getHeight();\n this.setSize(w, h);\n String ss=\"SELECT *FROM `customer`\";\n Showtable(ss);\n a.setText(\"\"+Autoid());\n d.setText(\"@gmail.com\");\n e.setText(\"+880 \");\n \n }", "public SetupScreen() \r\n { \r\n _userLabel = new LabelField(Ipoki._resources.getString(LBL_USER), DrawStyle.ELLIPSIS);\r\n add(_userLabel);\r\n _userEdit = new EditField(\"\", Ipoki._user, 20, Field.EDITABLE);\r\n add(_userEdit);\r\n _passLabel = new LabelField(Ipoki._resources.getString(LBL_PASSWORD), DrawStyle.ELLIPSIS);\r\n add(_passLabel);\r\n _passEdit = new PasswordEditField(\"\", Ipoki._pass, 20, Field.EDITABLE);\r\n add(_passEdit);\r\n _freqLabel = new LabelField(Ipoki._resources.getString(LBL_FREQ), DrawStyle.ELLIPSIS);\r\n add(_freqLabel);\r\n _freqEdit = new EditField(\"\", String.valueOf(Ipoki._freq), 20, Field.EDITABLE | EditField.FILTER_INTEGER);\r\n add(_freqEdit);\r\n }", "public SalesView() {\n initComponents();\n salesDetailTable.setAutoCreateColumnsFromModel(false);\n jdcTransaksi.setDate(new Date());\n enableForm(false);\n buttonConfig();\n salesDetailTable.getTableHeader().setFont(new Font(\"Segoe UI\", 0, 18)); \n }", "public SponsorManagement() {\n initComponents();\n init();\n tableload();\n }", "public UserView() {\n initComponents();\n new UserDaoImp().createTable();\n displayDataIntoTable();\n displayDataAtComboBox();\n\n }", "public MainUI() {\n initComponents();\n workoutTbl.setModel(model);\n// loggedInUserFld.setText(account.getLogin().getUsername());\n }", "public void startScreen()\n {\n onSales = false;\n \n numItemsAdded = 0; \n Menu guiMenu = new Menu(\"File\", \"NewSale\\nClose\\nExit\", 24, Color.BLACK, Color.WHITE, Color.BLACK,Color.WHITE, new FileCommands());\n clearScreen();\n addObject(guiMenu, 200, 50);\n }", "private void init(){\n this.firstNameTF.setText(user.getFirstName());\n this.nameTF.setText(user.getName());\n this.phoneTF.setText(user.getPhone());\n\n this.mailLabel.setText(user.getMail());\n this.roleLabel.setText(user.getFirstName());\n }", "@FXML\n private void initialize() {\n // Initialize the person table with the two columns.\n \t//ID.setText(user.getId());\n // password.setText(user.getPassword());\n \tshowLoginDetail(null);\n \n \n }", "public void initialize() {\n\n Employee emp = new Employee(\"jaden Williams\", \"abEFc123!\");\n\n //Widget newProductTest = new Widget(\"iPod45\", \"Apple\", ItemType.AUDIO); //Test widget\n\n System.out.println(\"Launched program\");\n loadDatabaseProducts();\n loadDatabaseRecords();\n tableViewSetup(); //Sets up table structure\n populateProductLineTabs(); //Populates item type dropdown\n populateItemQuantity(); //Populates quantity dropdown\n //testMultimedia(); //Testing\n //testProductionRecord(); //Testing text log on last page\n }", "public MainScreen()\n {\n initComponents();\n \n //Load the tables of the application with data from database\n loadClientTable();\n loadSupplierTable();\n loadStorageTable();\n loadPurchaseTable();\n loadSellTable();\n loadDeskPane();\n \n // Set window's location to the center of the screen\n setLocationRelativeTo(null);\n }", "public void salesScreen()\n {\n onSales = true;\n salesItem = new SalesItem[50];\n Button timbitAdd = new Button(24, \"button-blue.png\", \"button-green.png\", \"Add timbit:\");\n Button doughnutAdd = new Button(24, \"button-blue.png\", \"button-green.png\", \"Add doughnut:\");\n Button coffeeAdd = new Button(24, \"button-blue.png\", \"button-green.png\", \"Add coffee:\");\n \n addObject(timbitAdd, 400, 100);\n addObject(doughnutAdd, 400, 200);\n addObject(coffeeAdd, 400, 300);\n }", "public CustomerManagement() {\n initComponents();\n setLocationRelativeTo(null);\n loadTable();\n }", "public UsersInF() {\n initComponents();\n dao = new UsersDAO();\n loadTableUsers(dao.readAll());\n }", "public sear() {\n initComponents();\n findUsers();\n }", "private void myInit() {\n\n// System.setProperty(\"pool_host\", \"localhost\");\n// System.setProperty(\"pool_db\", \"db_cis_cosca\");\n// System.setProperty(\"pool_password\", \"password\");\n\n// MyUser.setUser_id(\"2\");\n tf_search.grabFocus();\n jPanel7.setVisible(false);\n init_key();\n hover();\n search();\n init();\n init_tbl_users();\n\n focus();\n jLabel3.setVisible(false);\n cb_lvl.setVisible(false);\n jPanel2.setVisible(false);\n\n init_tbl_user_default_previleges();\n data_cols_default();\n init_tbl_user_default_priveleges(tbl_user_default_priveleges);\n\n init_tbl_user_previleges();\n init_tbl_user_default_previlege_others(tbl_user_default_previlege_others);\n Field.Combo cb = (Field.Combo) tf_from_location1;\n cb.setText(\"Transactions\");\n cb.setId(\"1\");\n\n data_cols();\n }", "@FXML\r\n\tprivate void initialize() throws SQLException {\r\n\t\tGetUserID();\r\n\t\tregUsernameField.setText(\"\");\r\n\t\tregFirstNameField.setText(\"\");\r\n\t\tregLastNameField.setText(\"\");\r\n\t\tregPhoneField.setText(\"\");\r\n\t\tregAddressField.setText(\"\");\r\n\t\tregEmailField.setText(\"\");\r\n\t\tregPassField.setText(\"\");\r\n\t\tregConfField.setText(\"\");\r\n\t\tshowList();\r\n\t}", "public CustomerDetails() {\n initComponents();\n //connect to DB\n con = DbConnect.connect();\n this.setLocationRelativeTo(null);//middle\n // Load the table\n tableload();\n }", "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "public MyPage() {\n super(\"Home\");\n initComponents();\n conn=javaconnect.ConnecrDb();\n Calender();\n Account();\n Table1();\n Table2();\n }", "private void initTable() {\n \t\t// init table\n \t\ttable.setCaption(TABLE_CAPTION);\n \t\ttable.setPageLength(10);\n \t\ttable.setSelectable(true);\n \t\ttable.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX);\n \t\ttable.setColumnCollapsingAllowed(true);\n \t\ttable.setColumnReorderingAllowed(true);\n \t\ttable.setSelectable(true);\n \t\t// this class handles table actions (see handleActions method below)\n \t\ttable.addActionHandler(this);\n \t\ttable.setDescription(ACTION_DESCRIPTION);\n \n \t\t// populate Toolkit table component with test SQL table rows\n \t\ttry {\n \t\t\tQueryContainer qc = new QueryContainer(\"SELECT * FROM employee\",\n \t\t\t\t\tsampleDatabase.getConnection());\n \t\t\ttable.setContainerDataSource(qc);\n \t\t} catch (SQLException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\t// define which columns should be visible on Table component\n \t\ttable.setVisibleColumns(new Object[] { \"FIRSTNAME\", \"LASTNAME\",\n \t\t\t\t\"TITLE\", \"UNIT\" });\n \t\ttable.setItemCaptionPropertyId(\"ID\");\n \t}", "public void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.user_name);\n\t\t \n\t\tuser_name=(TextView) findViewById(R.id.user_name);\n\t\tplan=(Button) findViewById(R.id.plan);\n\t\tbooking_history=(Button) findViewById(R.id.booking_history);\n\t\t\n\t\t\n\t\t\n\t\tIntent intent = getIntent();\n\t\tfinal String cust_id = intent.getStringExtra(\"cust_id\");\n\t\tuser_name.setText(cust_id);\n\t\tplan.setOnClickListener(new View.OnClickListener() \n\t\t\n\t\t{\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) \n\t\t\t{\n\n\t\t\t\tIntent plan = new Intent(User_Home.this, Travel_Plan.class);\n\t\t\t\tplan.putExtra(\"cust_id\", cust_id);\n\t\t\t startActivity(plan);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbooking_history.setOnClickListener(new View.OnClickListener() \n\t\t\n\t\t{\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) \n\t\t\t{\n\n\t\t\t\tIntent booking_history = new Intent(User_Home.this, Booked_History.class);\n\t\t\t\tbooking_history.putExtra(\"cust_id\", cust_id);\n\t\t\t startActivity(booking_history);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tlogout=(Button) findViewById(R.id.logout);\n\t\tlogout.setOnClickListener(new View.OnClickListener() \n\t\t\n\t\t{\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) \n\t\t\t{\n\n\t\t\t\tIntent login = new Intent(User_Home.this, Login.class);\n\t\t\t\tToast.makeText(getApplicationContext(),cust_id+ \"\tis logged out\", Toast.LENGTH_SHORT).show();\n\t\t\t startActivity(login);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public companyDetails() {\n initComponents();\n showTableData();\n }", "public LMSHome() {\n setTitle(\"Home - [Logged In: \"+name+\"]\");\n setResizable(false);\n initComponents();\n date = getDate();\n jLabel5.setText(\"\"+acc_id);\n jLabel6.setText(name);\n jLabel13.setText(date);\n \n }", "@Override\n public void initialize(URL location, ResourceBundle resources) {\n list = FXCollections.observableArrayList();\n userID.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n tableID.setCellValueFactory(new PropertyValueFactory<>(\"table\"));\n status.setCellValueFactory(new PropertyValueFactory<>(\"status\"));\n\n try {\n list = bookingModel.getTableDetails();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n userTable.setItems(list);\n }", "public void populateUserInformation()\n {\n ViewInformationUser viewInformationUser = new ViewFXInformationUser();\n\n viewInformationUser.buildViewProfileInformation(clientToRegisteredClient((Client) user), nameLabel, surnameLabel, phoneLabel, emailLabel, addressVbox);\n }", "public login() {\n initComponents();\n setTitle(\"COLLAGE MANAGEMENT SYSTEM\");\n }", "private void init() {\n dao = new ProductDAO();\n model = new DefaultTableModel();\n \n try {\n showAll();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n \n }", "public User_accounts() {\n\n initComponents();\n tableModel = (DefaultTableModel) jTable1.getModel();\n loadUsers();\n\n }", "private void initData() {\n\t\tSetTopBarTitle(getString(R.string.os_jsh_wdj_add_ldss));\r\n\t\tregFliter();\r\n\t}", "public void initData(Customer customer) throws SQLException{\n this.selectedCustomer = customer ;\n this.fullnameLabel.setText(selectedCustomer.getFullname());\n this.username.setText(selectedCustomer.getUsername());\n this.phone.setText(selectedCustomer.getPhone());\n this.email.setText(selectedCustomer.getEmail());\n this.address.setText(selectedCustomer.getAddress());\n this.customer_id.setText(Integer.toString(selectedCustomer.getCustomer_id()));\n this.tableView.setItems(getOrders());\n }", "public FirstPage(User user1) {\n newUser = user1;\n initComponents();\n doThisAtStart();\n }", "private void initTable() {\n\t\tDefaultTableModel dtm = (DefaultTableModel)table.getModel();\n\t\tdtm.setRowCount(0);\t\t\n\t\tfor(int i=0;i<MainUi.controller.sale.items.size();i++){\n\t\t\tVector v1 = new Vector();\n\t\t\tv1.add(MainUi.controller.sale.items.get(i).getProdSpec().getTitle());\n\t\t\tv1.add(MainUi.controller.sale.items.get(i).getCopies());\n\t\t\tdtm.addRow(v1);\n\t\t}\n\t\tlblNewLabel.setText(\"\"+MainUi.controller.sale.getTotal());\n\t}", "@Override\n\tpublic void setUserScreenName(java.lang.String userScreenName) {\n\t\t_buySellProducts.setUserScreenName(userScreenName);\n\t}", "public Sales() {\n\n initComponents();\n //loadSales();\n fillComboTienda();\n fillComboTitulos();\n }", "public void init() {\n \t\tWindow main = new Window(\"Table demo\");\n \t\tsetMainWindow(main);\n \n \t\t// set the application to use Corporate -theme\n \t\tsetTheme(\"corporate\");\n \n \t\t// Add link back to index.html\n \t\tmain.addComponent(menuLink);\n \n \t\t// create demo database\n \t\tsampleDatabase = new SampleDatabase();\n \n \t\t// Main window contains heading, two buttons, table and label\n \t\tmain.addComponent(new Label(\"<h2>Table demo</h2>\" + ACTION_DESCRIPTION,\n \t\t\t\tLabel.CONTENT_XHTML));\n \t\tOrderedLayout layout = new OrderedLayout(\n \t\t\t\tOrderedLayout.ORIENTATION_HORIZONTAL);\n \t\tlayout.addComponent(tableVisibility);\n \t\tlayout.addComponent(tableEnabler);\n \t\tlayout.addComponent(tableCaption);\n \t\tmain.addComponent(layout);\n \t\tmain.addComponent(table);\n \t\tmain.addComponent(tableLastAction);\n \t\tmain.addComponent(embeddedToolkitLink);\n \t\tmain.addComponent(tableDemoLink);\n \n \t\t// initialize demo components\n \t\tinitTable();\n \t}", "private void fetchData() {\n mFirstNameLabel = \"First name:\";\n mFirstNameValue = \"Taylor\";\n mSurnameLabel = \"Surname:\";\n mSurnameValue = \"Swift\";\n\n initFields();\n }", "public void init(String userName){\r\n\r\n this.userName = userName;\r\n udb_FriendsListView.setStyle(\"-fx-font: 18pt 'Arial'\");\r\n udb_PostsTableView.setStyle(\"-fx-font-size: 18pt\");\r\n try{\r\n\r\n ObservableList<Profiles> prof = ProfilesDao.searchProfiles(userName);\r\n System.out.println(\"Running\");\r\n System.out.println(prof.get(0).getAge());\r\n System.out.println(prof.get(0).getFirstName());\r\n setFirstNameLabel(prof.get(0).getFirstName().toUpperCase());\r\n setLastNameLabel(prof.get(0).getLastName().toUpperCase());\r\n setAge(calculateAge(prof.get(0).getAge()));\r\n setEmail(prof.get(0).getEmail().toUpperCase());\r\n loadFriends();\r\n loadStatus();\r\n initTable();\r\n loadPosts();\r\n\r\n } catch(Exception e) {\r\n\r\n }\r\n }", "@FXML\r\n\tprivate void initialize() {\r\n\t\tcurUser = LoginController.getLoggedUser();\r\n\t\tString username = (\" \" + curUser.getUsername());\r\n\t\tusernameLabel.setText(username);\r\n\t\tString name = (\" \" + curUser.getName());\r\n\t\tnameLabel.setText(name);\r\n\t\tString mobile = (\" \" + curUser.getMobileNumber());\r\n\t\tmobileLabel.setText(mobile);\r\n\t\tString address = (\" \" + curUser.getHouseNumber() + \" \"\r\n\t\t\t\t+ curUser.getStreetName() + \", \" + curUser.getPostcode());\r\n\t\taddressLabel.setText(address);\r\n\t}", "public End_User_0_Controller() {\r\n\t\t// primaryStage = Users_Page_Controller.primaryStage;\r\n\t\t// this.Storeinfo = primaryStage.getTitle();\r\n\t}", "public UserPage()\n\t{\n\t\tPageFactory.initElements(driver, this);\n\t}", "private void myInit() {\n init_key();\n\n String business_name = System.getProperty(\"business_name\", \"Tyrol Restaurant\");\n jTextField1.setText(business_name);\n String operated_by = System.getProperty(\"operated_by\", \"Fely Romano Sanin\");\n jTextField2.setText(operated_by);\n String address = System.getProperty(\"address\", \"Mayfair place 12th Lacson St, Bacolod City\");\n jTextField3.setText(address);\n\n String tin_no = System.getProperty(\"tin_no\", \"161-107-778-000\");\n jTextField4.setText(tin_no);\n String serial_no = System.getProperty(\"serial_no\", \"\");\n jTextField5.setText(serial_no);\n String permit_no = System.getProperty(\"permit_no\", \"\");\n jTextField6.setText(permit_no);\n }", "public MainScreen(User user) {\n\t\tsuper();\n\t\tthis.user = user;\n\t\tthis.contentPane = getContentPane();\n\t\tpopulateUtilities();\n\t\tinitGUI(user);\n\t}", "public users() {\n initComponents();\n connect();\n autoID();\n loaduser();\n \n \n }", "@Override\n public void refresh() {\n Customer customer = (Customer) loggedInUser;\n txtUsername.setText(customer.getUsername());\n txtBalance.setText(String.format(\"£ %.2f\",\n customer.getAccountBalanceInPounds()));\n\n setTableContents(\n library.getTransactionRepository().getTransactions(customer),\n library.getFineRepository().getCustomerFines(customer));\n\n\n }", "private void initData() {\n ContractList conl = new ContractList();\n String iCard = txtindentify.getText().trim();\n if (conl.getacc(iCard) == 0) {\n txtAcc.setText(\"NEW CUSTOMER\");\n\n } else {\n Customer cus = new Customer();\n CustomerList cl = new CustomerList();\n cus = cl.getcus(iCard);\n txtAcc.setText(Integer.toString(cus.acc));\n\n }\n }", "private void initializeData() {\n lblItem.setText(product.getName());\n txtReference.setText(product.getTransaction().getReferenceNumber());\n txtItem.setText(product.getName());\n txtDescription.setText(product.getDescription());\n txtBrand.setText(product.getBrand());\n txtModel.setText(product.getModel());\n txtQuantity.setText(String.valueOf(product.getQuantity()));\n txtUnit.setText(product.getUnit());\n txtProductDate.setDate(product.getProduct_date());\n txtOrigPrice.setText(String.valueOf(product.getOriginalPrice()));\n txtAgent.setText(product.getAgent());\n txtContactPerson.setText(product.getContactPerson());\n try { \n txtSupplier.setText(((Supplier)product.getSuppliers().toArray()[0]).getName());\n } catch(ArrayIndexOutOfBoundsException ex) {\n System.out.println(ex.toString());\n }\n }", "private void loadNavHeader() {\n\t\t// name, Email\n\t\ttxtName.setText(\"Tester\");\n\t\ttxtEmail.setText(\"[email protected]\");\n\t}", "public EmployeePage() {\n initComponents();\n try {\n //Connects to database with an absolute path\n Path con = Paths.get(\"ScrumProject.FDB\").toRealPath(LinkOption.NOFOLLOW_LINKS);\n idb = new InfDB(con.toString());\n } catch (InfException | IOException e) {\n JOptionPane.showMessageDialog(null, e);\n }\n Validation val = new Validation();\n txtNameE.setText(val.getUserName(Validation.getIdInlogged()));\n txtPhoneE.setText(val.getUserTelefon(Validation.getIdInlogged()));\n txtEmailE.setText(val.getUserEmail(Validation.getIdInlogged()));\n }", "public void OrderHistoryInit() {\n orderId = -1;\n ArrayList<Orders> orders = new OrdersBean().getFromUsername(Global.getUsername());\n setDataModel(orders);\n orderTable.setModel(dtm);\n setVisible(true);\n }", "public void tableViewSetup() {\n nameColumn.setCellValueFactory(new PropertyValueFactory<>(\"Name\"));\n productTable.getColumns().add(nameColumn);\n\n manuColumn.setCellValueFactory(new PropertyValueFactory<>(\"Manufacturer\"));\n productTable.getColumns().add(manuColumn);\n\n typeColumn.setCellValueFactory(new PropertyValueFactory<>(\"Type\"));\n productTable.getColumns().add(typeColumn);\n }", "private void initObjects() {\n listUsers = new ArrayList<>();\n usersRecyclerAdapter = new UsersRecyclerAdapter(listUsers,UsersListActivity.this);\n RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());\n recyclerViewUsers.setLayoutManager(mLayoutManager);\n recyclerViewUsers.setItemAnimator(new DefaultItemAnimator());\n recyclerViewUsers.setHasFixedSize(true);\n recyclerViewUsers.setAdapter(usersRecyclerAdapter);\n\n databaseHelper = new HomeDatabaseHelper(activity);\n Intent extras = getIntent();\n emailFromIntent = extras.getStringExtra(\"EMAIL\");\n textViewRole = this.findViewById(R.id.textViewName);\n textViewRole.setText(emailFromIntent);\n getDataFromSQLite();\n }", "public UserInterface() {\n \t setTitle(\"The Cancer Specialist - Diagnostic Application\");\n initComponents();\n }", "private void initiateUI()\n\t{\n\t\t//Set List\n\t\tListView list = (ListView) findViewById(R.id.rewards_list);\n\t\trAdapter = new RowAdapter();\n\t\tlist.setAdapter(rAdapter);\n\t\t//Set Score\n\t\trewardPointsTV.setText(Integer.toString(fileIO.rewardPoints));\n\n\t}", "@Override\n public void init() // set up GUI\n {\n setLayout(new FlowLayout());\n\n customerView = new CustomerView(); // initialize customerView\n \n add(customerView); // add customerView to the GUI\n }", "public void saleAct() {\t\r\n\t\t\r\n\t\tif(createWine() != null) {\r\n\t\t\t\r\n\t\t\ttext_amount =String.valueOf( cus.saleTransaction(createWine()));\r\n\t\t\twine_name.setText(name.getText());\r\n\t\t\tamount.setText(\" £ \" + text_amount + \" \" );\r\n\t\t\tbalance.setText(\" £ \" + isCredit((double)cus.getAccount() / 100.00) + \" \");\r\n\t\t\t\r\n\t\t\t//reset all textfield\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void initData(Users user){\n \n this.selectedUser = user;\n String idValue = String.valueOf(selectedUser.getId());\n String expiresValue = String.valueOf(selectedUser.getExpires_at());\n String enabledValue = String.valueOf(selectedUser.getEnabled());\n String lastLoginValue = String.valueOf(selectedUser.getLast_login());\n email.setText(selectedUser.getEmail());\n password.setText(selectedUser.getPassword());\n role.setText(selectedUser.getRoles());\n idField.setText(idValue);\n expiresField.setText(expiresValue);\n enabledField.setText(enabledValue);\n lockedTextField.setText(lastLoginValue);\n lastLoginTextField.setText(idValue);\n System.out.println(user.toString());\n }", "public void setupDialog(Stage stage) {\n\t\tthis.stage = stage;\n\n\t\tcustomers = C195Application.getAllCustomers();\n\n\t\tcustomerTable.setItems(customers);\n\t}", "public SalesMethodsUI() {\n \n }", "public Aplikasi_Master_User() {\n initComponents();\n kon.setKoneksi();\n BacaTabelUser();\n tkd_user.setVisible(true);\n }", "public ViewCustomerKamera() {\n initComponents();\n connectDatabase();\n //updateTable();\n }", "public void initialize() {\r\n btShowUsers.setVisible(false);\r\n menu_principal.setShowTransitionFactory(v -> new FadeInLeftBigTransition(v));\r\n menu_principal.showingProperty().addListener((obs, oldValue, newValue) -> {\r\n if (newValue) {\r\n AppBar appBar = MobileApplication.getInstance().getAppBar();\r\n appBar.setTitleText(\"Menú\");\r\n }\r\n \r\n if (user == null)\r\n user = (User) sessionContent.get(\"activeId\");\r\n\r\n if (user instanceof Technician) {\r\n if (((Technician)user).getIsAdmin() != null)\r\n btShowUsers.setVisible(true);\r\n else\r\n btShowUsers.setVisible(false);\r\n } else {\r\n btShowUsers.setVisible(false);\r\n }\r\n });\r\n \r\n \r\n }", "private void initGUI(User user) {\n\t\ttry {\n\t\t\tthis.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n\t\t\tthis.setTitle(\"Warehouse Application\");\n\t\t\tthis.setIconImage(new ImageIcon(getClass().getClassLoader().getResource(ApplicationConstants.WAREHOUSE_LOGO)).getImage());\n\t\t\tthis.setResizable(false);\n\t\t\tthis.setFocusTraversalKeysEnabled(false);\n\t\t\tthis.setLocation(new java.awt.Point(100, 100));\n\t\t\t{\n\t\t\t\tChangeScreen.setBlankScreen(user);\n\t\t\t}\n\t\t\t{\n\t\t\t\tmnuMain = new WarehouseMenuBar(user, this);\n\t\t\t\tsetJMenuBar(mnuMain);\n\t\t\t}\n\t\t\tpack();\n\t\t\tthis.setSize(809, 577);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public salesDetail() throws SQLException {\n monthsVal=new HashMap();\n String months=\"Jan Feb Mar Apr May Jun Jul Aug Sept Oct Nov Dec\";\n String[] monthsList = months.split(\" \");\n int mthCount=1;\n \n for(String mthVal:monthsList)\n { String mth=\"1\";\n if(mthCount<10)\n mth=\"0\"+mthCount;\n else mth=mthCount+\"\";\n monthsVal.put(mthVal,mth);\n mthCount++;\n }\n dft=new DefaultTableModel();\n dft.addColumn(\"Date\");\n dft.addColumn(\"Bill No.\");\n dft.addColumn(\"Sales Man\");\n dft.addColumn(\"Item\");\n dft.addColumn(\"Quantity\");\n dft.addColumn(\"Rate\");\n dft.addColumn(\"Amount\");\n SalesModel sm = new SalesModel(); \n Vector<Vector<String>> resultSet=sm.getAllDetails();\n for(Vector<String> list : resultSet)\n {\n dft.addRow(list);\n }\n \n usr=new DefaultTableModel();\n usr.addColumn(\"User Name\");\n usr.addColumn(\"Amount(NRS)\");\n Calendar currentDate = Calendar.getInstance(); //Get the current date\n SimpleDateFormat formatter= new SimpleDateFormat(\"yyyy-MM-dd\"); //format it as per your requirement\n String dateStr = formatter.format(currentDate.getTime());\n resultSet=sm.userSalesRecord(dateStr);\n for(Vector<String> list : resultSet)\n {\n usr.addRow(list);\n } \ninitComponents();\ngraphPanel=new GraphPanel(); \ngraphPanel.setBackground(new java.awt.Color(204, 204, 204));\nthis.add(graphPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 340,700,350));\nthis.setVisible(true);\n }", "private void setupUI() {\n rbMale = findViewById(R.id.rb_male);\n rbFemale = findViewById(R.id.rb_female);\n spnStatus = findViewById(R.id.spn_status_create);\n rgGender = findViewById(R.id.rd_gender_register);\n btnCreateUser = findViewById(R.id.btn_create_user);\n edtLastName = findViewById(R.id.edt_last_name_create);\n edtEnterPin = findViewById(R.id.edt_enter_pin_create);\n edtFirstName = findViewById(R.id.edt_first_name_create);\n spnBloodGroup = findViewById(R.id.spn_blood_group_create);\n edtConfirmPin = findViewById(R.id.edt_confirm_pin_create);\n edtDateOfBirth = findViewById(R.id.edt_date_of_birth_create);\n edtMobileNumber = findViewById(R.id.edt_mobile_number_create);\n }", "public void init_store() {\r\n /* init inventory dictionary*/ \r\n System.out.println(\"Initializing Store\");\r\n dailyRollInventory.put(\"Egg roll\", MAX_ROLL_COUNT);\r\n dailyRollInventory.put(\"Jelly roll\", MAX_ROLL_COUNT);\r\n dailyRollInventory.put(\"Pastry roll\", MAX_ROLL_COUNT);\r\n dailyRollInventory.put(\"Sausage roll\", MAX_ROLL_COUNT);\r\n dailyRollInventory.put(\"Spring roll\", MAX_ROLL_COUNT);\r\n\r\n /* init totalRollSales for the month */\r\n totalRollSales.put(\"Egg roll\", 0.0);\r\n totalRollSales.put(\"Jelly roll\", 0.0);\r\n totalRollSales.put(\"Pastry roll\", 0.0);\r\n totalRollSales.put(\"Sausage roll\", 0.0);\r\n totalRollSales.put(\"Spring roll\", 0.0);\r\n\r\n /* init totalCustomerSales for the month */\r\n totalCustomerSales.put(\"Casual\", 0.0);\r\n totalCustomerSales.put(\"Business\", 0.0);\r\n totalCustomerSales.put(\"Catering\", 0.0);\r\n\r\n /* init daily customer sales */\r\n dailyCustomerSales.put(\"Casual\", 0.0);\r\n dailyCustomerSales.put(\"Business\", 0.0);\r\n dailyCustomerSales.put(\"Catering\", 0.0);\r\n \r\n }", "public Manager(String realName ) {\n initComponents();\n setLocationRelativeTo(null);\n // Last_Day_Salse_summery();//last day salse\n Show_jTable1();//last date salse save\n Show_jTable();//last day salary\n Last_Day_Inventory_cost();\n Show_jTable2();\n Show_jTable4();//EXP products\n Show_jTable5();//Exp items\n \n executeQuery();//send values to cost table\n \n Last_Day_Salse_save();//save data Salese_Summery table in last day\n Last_Day_Salary_save();//save data salary_Summery table in last day\n RealName=realName;\n jLabel_Realname.setText(realName);\n setIcon();\n \n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\n this.db = LoginController.db;\r\n this.loggedInUser = SidePaneController.employeeFullName; \r\n System.out.println(loggedInUser); \r\n refreshTable(); \r\n tblTrainingList.getColumns().get(2).setStyle(\"-fx-alignment: CENTER;\");\r\n initializedComboBox(); \r\n backgroundRefresh(); \r\n }", "public Student(String userName) {\n loggedUser = userName;\n initComponents();\n Toolkit toolKit = getToolkit();\n Dimension size = toolKit.getScreenSize();\n setLocation(size.width/2 - getWidth()/2, size.height/2 - getHeight()/2);\n }", "public SalesSystemUI(SalesDomainController domainController) {\n this.domainController = domainController;\n this.model = new SalesSystemModel(domainController);\n \n // Create singleton instances of the tab classes\n historyTab = new HistoryTab(model);\n stockTab = new StockTab(model);\n purchaseTab = new PurchaseTab(domainController, model);\n \n setTitle(\"Sales system\");\n \n // set L&F to the nice Windows style\n try {\n UIManager.setLookAndFeel(new WindowsLookAndFeel());\n \n } catch (UnsupportedLookAndFeelException e1) {\n log.warn(e1.getMessage());\n }\n \n drawWidgets();\n \n // size & location\n int width = 600;\n int height = 400;\n setSize(width, height);\n Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();\n setLocation((screen.width - width) / 2, (screen.height - height) / 2);\n \n addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n System.exit(0);\n }\n });\n }", "private void setUpScreen() {\n if (getView() != null) {\n setAmount(account.getArmedAmount());\n curIndex = 0;\n cvp.setPagingEnabled(false);\n if (account.getActiveCurrency() == CurrencyDAO.CURRENCY_BITCOIN) {\n // Bitcoin configurations are handled specially\n updateBitcoinDenominations();\n } else {\n new SetupArmImagesTask().execute(this);\n }\n }\n }", "public void initializeScreen() {\n mEditTextUsernameCreate = (EditText) findViewById(R.id.edit_text_username_create);\n mEditTextEmailCreate = (EditText) findViewById(R.id.edit_text_email_create);\n mEditTextPasswordCreate = (EditText) findViewById(R.id.edit_text_password_create);\n LinearLayout linearLayoutCreateAccountActivity = (LinearLayout) findViewById(R.id.linear_layout_create_account_activity);\n initializeBackground(linearLayoutCreateAccountActivity);\n\n /* Setup the progress dialog that is displayed later when authenticating with Firebase */\n mAuthProgressDialog = new ProgressDialog(this);\n mAuthProgressDialog.setTitle(getResources().getString(R.string.progress_dialog_loading));\n mAuthProgressDialog.setMessage(getResources().getString(R.string.progress_dialog_creating_user_with_firebase));\n mAuthProgressDialog.setCancelable(false);\n }", "public void initializeScreen() {\n mEditTextUsernameCreate = (EditText) findViewById(R.id.edit_text_username_create);\n mEditTextEmailCreate = (EditText) findViewById(R.id.edit_text_email_create);\n mEditTextPasswordCreate = (EditText) findViewById(R.id.edit_text_password_create);\n LinearLayout linearLayoutCreateAccountActivity = (LinearLayout) findViewById(R.id.linear_layout_create_account_activity);\n initializeBackground(linearLayoutCreateAccountActivity);\n\n /* Setup the progress dialog that is displayed later when authenticating with Firebase */\n mAuthProgressDialog = new ProgressDialog(this);\n mAuthProgressDialog.setTitle(getResources().getString(R.string.progress_dialog_loading));\n mAuthProgressDialog.setMessage(getResources().getString(R.string.progress_dialog_creating_user_with_firebase));\n mAuthProgressDialog.setCancelable(false);\n }", "public calsal() {\n initComponents(); \n //connect to DB\n con =DBconnect.connect();\n \n //load table\n tableload();\n tableloadfnl();\n }", "private void initObjects() {\n databaseHelper = new DatabaseHelper(activity);\n currentUser = databaseHelper.getAllUser().get(userIndex);\n\n textViewName.setText(userName);\n textViewEmail.setText(currentUser.getEmail());\n textViewPhone.setText(currentUser.getNumber());\n double rent = currentUser.getRent();\n String rentStr = new Double(rent).toString();\n textViewRent.setText(rentStr);\n textViewChores.setText(currentUser.getChores());\n\n /*for(int i=0; i<listUsers.size(); i++){\n TextView textView = new TextView(this);\n final int passingInt = i;\n textView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String testMsg = listUsers.get(passingInt).getName();\n Log.d(\"User Clicked: \", testMsg);\n\n Intent editUserIntent = new Intent(EditChosenUserActivity.this, EditChosenUserActivity.class);\n }\n });\n\n textView.setTextSize(60.0f);\n textView.setText(listUsers.get(i).getName());\n users_list.addView(textView);\n }*/\n }", "public MngCustomerJPanel(JPanel userProcessContainer, Business business, SalesPerson salesPerson) {\n initComponents();\n this.userProcessContainer = userProcessContainer;\n this.business = business;\n this.salesPerson = salesPerson;\n populateTable();\n }", "public void filluser(String User) throws ClassNotFoundException {\r\n\t\r\n\t\tthis.userid=User;\r\n\t\tidText.setText(userid);\r\n\t\tmessage = new ArrayList<String>();\r\n\t\tmessage.add(\"ShowStudentHistory\");\r\n\t\tmessage.add(userid);\r\n\t\tObject obj = (Object) message;\r\n\t\tObject obj1 = new Object();\r\n\t\tclientCon.execute(obj);\r\n\t\tArrayList<String> message = (ArrayList<String>) obj;\r\n\t\ttry {\r\n\t\t\tThread.currentThread().sleep(1200);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Exception At AddNewSubscriberController in Function addNew\");\r\n\t\t}\r\n\t\tobj1 = clientCon.Getrespond();\r\n\t\tif (obj1 == null) {\r\n\r\n\t\t\ttabel.setVisible(false);\r\n\t\t\tnohistory.setVisible(true);\r\n\t\t\tnohistory.setText(\"NoHistoryFound\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\ttabel.setVisible(true);\r\n\t\t\tArrayList<HistoryForStudent> message1 = (ArrayList<HistoryForStudent>) obj1;\r\n\t\t\tHistoryType.setCellValueFactory(new PropertyValueFactory<HistoryForStudent, String>(\"HistoryType\"));\r\n\t\t\tBOOKNAME.setCellValueFactory(new PropertyValueFactory<HistoryForStudent, String>(\"BookName\")); \r\n\t\t\tlate.setCellValueFactory(new PropertyValueFactory<HistoryForStudent, String>(\"WasLate\"));\r\n\t\t\tPickUpDate.setCellValueFactory(new PropertyValueFactory<HistoryForStudent, String>(\"PickUpDate\"));\r\n\t\t\treturnDate.setCellValueFactory(new PropertyValueFactory<HistoryForStudent, String>(\"ReturnDate\")); \r\n\t\t\tRequestDate.setCellValueFactory(new PropertyValueFactory<HistoryForStudent, String>(\"RequestedDate\")); \r\n\t\t\tObservableList<HistoryForStudent> toShow = FXCollections.observableArrayList();\r\n\t\t\ttoShow.addAll(message1);\r\n\t\t\ttabel.setItems(toShow);\r\n\r\n\t}\r\n }", "public static void initPlayer() {\n\t\tuser = game.getUsers().get(game.getUserTurn());\n\t\tlblBudgetText.setText(user.getBudget()+\"\");\n\t\tdisplayUserTeam();\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n people.addAll(sp.getAll());\n idP.setCellValueFactory(new PropertyValueFactory<>(\"path_photo\"));\n price1.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n\n tabble1.setItems(people);\n try {\n ResultSet rs = c.createStatement().executeQuery(\"select path_photo, price from shoppingcart\");\n while(rs.next()){\n data1.add(new ShoppingCart(rs.getString(\"path_photo\"), rs.getDouble(\"price\")));\n \n }\n \n\n// TODO\n } catch (SQLException ex) {\n Logger.getLogger(ShoppingCartController.class.getName()).log(Level.SEVERE, null, ex);\n }\n Item2.setCellValueFactory(new PropertyValueFactory<>(\"path_photo\"));\n Price2.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n table.setItems(data1);\n }", "public void startNewSale() {\n sale = new Sale(cashRegister);\n }", "@FXML\n\tprivate void initialize() {\n\t\t// Initialize the person table with the two columns.\n\t\t\n\t\tloadDataFromDatabase();\n\n\t\tsetCellTable();\n\n\t\tstagiereTable.setItems(oblist);\n\t\tshowPersonDetails(null);\n\n\t\t// Listen for selection changes and show the person details when\n\t\t// changed.\n\t\tstagiereTable\n\t\t\t\t.getSelectionModel()\n\t\t\t\t.selectedItemProperty()\n\t\t\t\t.addListener(\n\t\t\t\t\t\t(observable, oldValue, newValue) -> showPersonDetails(newValue));\n\t}", "public ViewAllManufacturer() {\n initComponents();\n \n //Make the JFrame run in the center of the screen\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);\n \n try {\n //get database connectin\n connection = (Connection) DBConnection.getConnection();\n } catch (SQLException ex) {\n Logger.getLogger(addBrand.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n loadAllManufacturesTable();\n }", "public MainScreen() {\n initComponents();\n setIconImage(screenUtil.getImage(\"/image/if_Twitter_1298770.png\"));\n statisticsService = new StatisticsService();\n txtProfiles.setText(\"\" + statisticsService.totalProfiles);\n txtTweets.setText(\"\" + statisticsService.totalTweets);\n txtRetweets.setText(\"\" + statisticsService.totalRetweets);\n }", "public SalesPanel() {\n initComponents();\n tblSalesDetail.setAutoCreateColumnsFromModel(false);\n jdcTransaction.setDate(new Date());\n enableForm(false);\n btnDelete.setEnabled(false);\n btnAdd.setEnabled(true);\n btnCancel.setEnabled(false);\n btnEdit.setEnabled(false);\n btnSave.setEnabled(false);\n }", "public void displayProfileData() {\n MimsJTable table = new MimsJTable(ui);\n table.setPlanes(planes);\n table.setStats(stats);\n table.setRois(rois);\n table.setImages(images);\n String[] columnnames = table.getColumnNames();\n //MimsJTable requires multi-dim array, so need to convert dataset\n Object[][] exportedData = FileUtilities.convertXYDatasetToArray(data);\n table.createCustomTable(exportedData, columnnames);\n table.showFrame();\n }", "public UserManagement() {\n initComponents();\n\n formatDate = new SimpleDateFormat(\"dd-MM-yyyy\");\n dc = new DBConnection();\n //dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n SetModel();\n }", "public void initData() {\n nameDetailOrder.setText(\"-\");\n tourDetailOrder.setText(\"-\");\n packDetailOrder.setText(\"-\");\n statusDetailOrder.setText(\"-\");\n }", "public void initScreen() {\n mScrollview = (ScrollView) findViewById(R.id.ScrollView01);\n \t\n \t// Handle on Header getting from Quote Server\n mHeader = (TextView) findViewById(R.id.header);\n \n // Handle on Quote TextView\n mQuoteTxt = (TextView) findViewById(R.id.quote);\n \n // Set Header to default\n if (mHeaderStr == null)\n \tmHeaderStr = getResources().getString(R.string.default_header_text);\n \n // Handle on ImageSwitcher\n mQuoteImage = (ImageSwitcher) findViewById(R.id.ImageSwitcher01);\n mQuoteImage.setFactory(new MyImageSwitcherFactory());\n \n // Handles on buttons\n\t\tView writeButton = findViewById(R.id.write_button);\n writeButton.setOnClickListener(this); \n View lessonsButton = findViewById(R.id.lessons_button);\n lessonsButton.setOnClickListener(this);\n View websiteButton = findViewById(R.id.website_button);\n websiteButton.setOnClickListener(this);\n View exitButton = findViewById(R.id.exit_button);\n exitButton.setOnClickListener(this);\n \n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n //Sets initial TableView Data\n ObservableList<customer> custData = Query.getAllCustomer();\n \n\n custId_col.setCellValueFactory(new PropertyValueFactory<>(\"customerId\"));\n custName_col.setCellValueFactory(new PropertyValueFactory<>(\"customerName\"));\n custPhone_col.setCellValueFactory(new PropertyValueFactory<>(\"customerPhone\"));\n custAddId_col.setCellValueFactory(new PropertyValueFactory<>(\"addressId\"));\n custAddress_col.setCellValueFactory(new PropertyValueFactory<>(\"address\"));\n custCity_col.setCellValueFactory(new PropertyValueFactory<>(\"city\"));\n custCountry_col.setCellValueFactory(new PropertyValueFactory<>(\"country\"));\n custZip_col.setCellValueFactory(new PropertyValueFactory<>(\"postalCode\"));\n \n customerTableView.setItems(custData);\n \n }", "private void populateUserTable() {\n DefaultTableModel model = (DefaultTableModel)userJTable.getModel();\n model.setRowCount(0);\n \n for(Network nw : system.getNetworkList()){\n for(Enterprise ep : nw.getEnterpriseDirectory().getEnterpriseList()){\n if(ep instanceof SupplierEnterpise){\n for (Organization org : ep.getOrganazDirectory().getOrganizationList()) {\n for (UserAccount ua : org.getUserAccountDirectory().getUserAccountList()) {\n Object[] row = new Object[3];\n row[0] = ep.getName();\n row[1] = nw.getName();\n row[2] = ua.getUsername();\n\n model.addRow(row);\n }\n } \n }else{\n for (UserAccount ua : ep.getUserAccountDirectory().getUserAccountList()) {\n Object[] row = new Object[3];\n row[0] = ep.getName();\n row[1] = nw.getName();\n row[2] = ua.getUsername();\n\n model.addRow(row);\n }\n }\n }\n }\n }", "public ViewStudent() {\n initComponents();\n DB_Connection();\n DisplayInitialValues();\n }", "public SalesReportView() {\n initComponents();\n }", "public static void displayUsers()\r\n\t{\n\t\tObservableList<Employee> employees = listEmployees();\r\n\t\t\r\n\t\t//create table\r\n\t\tTableView<Employee> table = Employee.createEmployeeTable();\r\n\t\t\r\n\t\t//menu\r\n\t\tMenuItem deleteUser = new MenuItem(\"Delete User\");\r\n\t\tMenuItem createUser = new MenuItem(\"Create User\");\r\n\t\tMenuItem demote = new MenuItem(\"Demote/Promote User\");\r\n\t\tMenu actions = new Menu(\"Actions\");\r\n\t\tMenuBar menu = new MenuBar();\r\n\t\t\r\n\t\t//create stage\r\n\t\tStage window = new Stage();\r\n\t\t\r\n\t\t//set menu\r\n\t\tmenu.prefWidthProperty().bind(window.widthProperty());\r\n\t\t\r\n\t\t//add items to menu\r\n\t\tactions.getItems().addAll(deleteUser, createUser, demote);\r\n\t\t\r\n\t\t//add menu to menu bar\r\n\t\tmenu.getMenus().add(actions);\r\n\t\t\r\n\t\t//set on action\r\n\t\tdemote.setOnAction(new EventHandler<ActionEvent>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t if(Integer.parseInt(Configs.getProperty(\"Privilege\")) == 3)\r\n\t\t\t {\r\n\t\t\t\t if(table.getSelectionModel().getSelectedItem() != null)\r\n\t\t\t\t {\t \r\n\t\t\t //promote user\r\n\t\t\t\t updatePrivilegeLevel(table.getSelectionModel().getSelectedItem().getUsername());\r\n\t\t\t\t } \r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t AlertBox.display(\"FASS Nova\", \"Select a user\");\t \r\n\t\t\t\t }\t \r\n\t\t\t }\t\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\t AlertBox.display(\"FASS Nova\", \"You do not have permission to perform this action\"); \r\n\t\t\t } \r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tcreateUser.setOnAction(new EventHandler<ActionEvent>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t if(Integer.parseInt(Configs.getProperty(\"Privilege\")) == 3)\r\n\t\t\t {\r\n\t\t\t UserDisplay.addUserDisplay(); \t \r\n\t\t\t }\t\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\t AlertBox.display(\"FASS Nova\", \"You do not have permission to perform this action\"); \r\n\t\t\t }\t \r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\tdeleteUser.setOnAction(new EventHandler<ActionEvent>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t if(Integer.parseInt(Configs.getProperty(\"Privilege\")) == 3)\r\n\t\t\t {\r\n\t\t\t\t if(table.getSelectionModel().getSelectedItem() != null)\r\n\t\t\t\t {\t \r\n\t\t\t //delete user\r\n\t\t\t\t User.deleteUser(table.getSelectionModel().getSelectedItem().getUsername());\r\n\t\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t AlertBox.display(\"FASS Nova\", \"You do not have permission to perform this action\");\t \r\n\t\t\t\t }\t \r\n\t\t\t }\t\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\t AlertBox.display(\"FASS Nova\", \"You do not have permission to perform this action\"); \r\n\t\t\t }\t \r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\t//root layout\r\n\t\tVBox root = new VBox();\r\n\t\t\r\n\t\t//set items\r\n\t\ttable.setItems(employees);\r\n\t\t\r\n\t\t//setup root\r\n\t\troot.setSpacing(10);\r\n\t\troot.setAlignment(Pos.TOP_CENTER);\r\n\t\t\r\n\t\t//add nodes to root\r\n\t\troot.getChildren().addAll(menu, table);\r\n\t\t\r\n\t\t//set id\r\n\t\troot.setId(\"border\");\r\n\t\t\r\n\t\t//load stylesheet\r\n\t\troot.getStylesheets().add(User.class.getResource(\"MainScreen.css\").toExternalForm());\r\n\t\t\r\n\t\t//create scene\r\n\t\tScene list = new Scene(root);\r\n\t\t\r\n\t\t//setup stage\r\n\t\twindow.setTitle(\"FASS Nova - \" + Configs.getProperty(\"StoreName\") + \" Employee List\");\r\n\t\twindow.setMinWidth(600);\r\n\t\twindow.centerOnScreen();\r\n\t\twindow.initModality(Modality.APPLICATION_MODAL);\r\n\t\twindow.setResizable(false);\r\n\t\twindow.centerOnScreen();\r\n\t\t\r\n\t\t//set scene and show\r\n\t\twindow.setScene(list);\r\n\t\twindow.showAndWait();\r\n\t}", "public void startSale() {\r\n System.out.println(\"[CashRegister] startSale\");\r\n System.out.println(\"\");\r\n\r\n //receipt = new Receipt(customerId); \r\n receipt = new Receipt(\"100\");\r\n\r\n //addItemToSale(productId, quantity);\r\n addItemToSale(\"A101\", 10);\r\n\r\n addItemToSale(\"B205\", 6);\r\n\r\n addItemToSale(\"C222\", 12);\r\n\r\n }", "private void createUserInterface()\n {\n // get content pane for attaching GUI components\n Container contentPane = getContentPane();\n\n // enable explicit positioning of GUI components \n contentPane.setLayout( null );\n\n // set up itemsSoldJLabel\n itemsSoldJLabel = new JLabel();\n itemsSoldJLabel.setBounds( 20, 20, 130, 20 );\n itemsSoldJLabel.setText( \"Number of items sold:\" );\n contentPane.add( itemsSoldJLabel );\n\n // set up itemsSoldJTextField\n itemsSoldJTextField = new JTextField();\n itemsSoldJTextField.setBounds( 170, 20, 90, 20 );\n itemsSoldJTextField.setHorizontalAlignment( JTextField.RIGHT );\n contentPane.add( itemsSoldJTextField );\n\n // set up priceJLabel\n priceJLabel = new JLabel();\n priceJLabel.setBounds( 20, 55, 130, 20 );\n priceJLabel.setText( \"Price of items:\" );\n contentPane.add( priceJLabel );\n\n // set up priceJTextField\n priceJTextField = new JTextField();\n priceJTextField.setBounds( 170, 55, 90, 20 );\n priceJTextField.setHorizontalAlignment( JTextField.RIGHT );\n contentPane.add( priceJTextField );\n\n // set up grossSalesJLabel\n grossSalesJLabel = new JLabel();\n grossSalesJLabel.setBounds( 20, 90, 80, 20 );\n grossSalesJLabel.setText( \"Gross sales:\" );\n contentPane.add( grossSalesJLabel );\n\n // set up grossSalesJTextField\n grossSalesJTextField = new JTextField();\n grossSalesJTextField.setBounds( 170, 90, 90, 20 );\n grossSalesJTextField.setEditable( false );\n grossSalesJTextField.setHorizontalAlignment( \n JTextField.RIGHT );\n contentPane.add( grossSalesJTextField );\n\n // set up commissionJLabel\n commissionJLabel = new JLabel();\n commissionJLabel.setBounds( 20, 130, 110, 20 );\n commissionJLabel.setText( \"Commission (%):\" );\n contentPane.add( commissionJLabel );\n\n // set up commissionJSpinner\n commissionJSpinner = new JSpinner( \n new SpinnerNumberModel( 1, 1, 10, 1 ) );\n commissionJSpinner.setBounds( 170, 130, 90, 20 );\n contentPane.add( commissionJSpinner );\n commissionJSpinner.addChangeListener(\n\n new ChangeListener() // anonymous inner class\n {\n // event handler called when value in \n // commissionJSpinner changes\n public void stateChanged( ChangeEvent event )\n {\n \n }\n\n } // end anonymous inner class\n\n ); // end call to addChangeListener\n \n // set up earningsJLabel\n earningsJLabel = new JLabel();\n earningsJLabel.setBounds( 20, 170, 90, 20 );\n earningsJLabel.setText( \"Earnings:\" );\n contentPane.add( earningsJLabel );\n \n // set up earningsJTextField\n earningsJTextField = new JTextField();\n earningsJTextField.setBounds( 170, 170, 90, 20 );\n earningsJTextField.setEditable( false );\n earningsJTextField.setHorizontalAlignment( JTextField.RIGHT );\n contentPane.add( earningsJTextField );\n\n // set up calculateJButton\n calculateJButton = new JButton();\n calculateJButton.setBounds( 170, 205, 90, 25 );\n calculateJButton.setText( \"Calculate\" );\n contentPane.add( calculateJButton );\n calculateJButton.addActionListener(\n\n new ActionListener() // anonymous inner class\n {\n // event handler called when calculateJButton is pressed\n public void actionPerformed( ActionEvent event )\n {\n \n }\n\n } // end anonymous inner class\n\n ); // end call to addActionListener\n\n // set properties of application's window\n setTitle( \"Sales Commission Calculator\" ); // set window title\n setSize( 285, 285 ); // set window size\n setVisible( true ); // show window\n\n }", "private void displayUserInfo(String name) {\n\t\tString username = null;\n\t\tPattern p = Pattern.compile(\"\\\\[(.*?)\\\\]\");\n\t\tMatcher m = p.matcher(name);\n\t\tif (m.find())\n\t\t{\n\t\t username = m.group(1);\n\t\t lastClickedUser = username;\n\t\t}\n\t\tUser u = jdbc.get_user(username);\n\t\ttextFirstName.setText(u.get_firstname());\n\t\ttextLastName.setText(u.get_lastname());\n\t\ttextUsername.setText(u.get_username());\n\t\tif (u.get_usertype() == 1) {\n\t\t\trdbtnAdminDetails.setSelected(true);\n\t\t} else if (u.get_usertype() == 2) {\n\t\t\trdbtnManagerDetails.setSelected(true);\n\t\t} else {\n\t\t\trdbtnWorkerDetails.setSelected(true);\n\t\t}\n\t\tif (u.get_email() != null) {textEmail.setText(u.get_email());} else {textEmail.setText(\"No Email Address in Database.\");}\n\t\tif (u.get_phone() != null) {textPhone.setText(u.get_phone());} else {textPhone.setText(\"No Phone Number in Database.\");}\t\t\t\t\n\t\tcreateQualLists(u.get_userID());\n\t}", "public void initTable() {\n\t\n\t\temployeeTableModel.clearTable();\n\t\tfor (buchungssystem.models.employee.Employee employee : currentUser.getAllEmployees()) {\n\t\t\tObject [] row = new Object[7];\n\t\t\tif (employee.isValid() == true) {\n\t\t\t\trow[0] = employee.getFirstName();\n\t\t\t\trow[1] = employee.getLastName();\n\t\t\t\trow[2] = employee.getEmail();\n\t\t\t\trow[3] = employee.getPhoneNumber();\t\t\t\n\t\t\t\trow[4] = currentUser.getEmployeeRoleByID(employee.getRoleID()).getRole();\n\t\t\t\tif (employee.getUserID() != null) {\n\t\t\t\t\trow[5] = currentUser.getUserByID(employee.getUserID()).getLogin();\n\t\t\t\t} else {\n\t\t\t\t\trow[5] = \"keinen User angelegt\";\n\t\t\t\t}\n\t\t\t\trow[6] = employee.getId();\n\t\t\t\temployeeTableModel.addRow(row);\n\t\t\t}\n\n\t\t}\n\t\t//hide the Column with the Employee ID\n\t\temployeeTable.getColumnModel().getColumn(6).setMinWidth(0);\n\t\temployeeTable.getColumnModel().getColumn(6).setMaxWidth(0);\n\t\t//employeeTable.removeColumn(employeeTable.getColumnModel().getColumn(6));\n\t}", "private void populateTable() {\n this.allLogs = this.auditLogService.getAllLogs();\n // Creat columns for users\n\n\n TableColumn<Map, String> actionColumn = new TableColumn<>(\"Action\");\n actionColumn.setCellValueFactory(new MapValueFactory<>(\"action\"));\n\n TableColumn<Map, String> actionByColumn = new TableColumn<>(\"By\");\n actionByColumn.setCellValueFactory(new MapValueFactory<>(\"actionByUserId\"));\n\n TableColumn<Map, String> actionAt = new TableColumn<>(\"At\");\n actionAt.setCellValueFactory(new MapValueFactory<>(\"createdAt\"));\n this.listOfLogs.getColumns().add(actionColumn);\n this.listOfLogs.getColumns().add(actionByColumn);\n this.listOfLogs.getColumns().add(actionAt);\n // Create an observable list to add customers to\n ObservableList<Map<String, Object>> items = FXCollections.<Map<String, Object>>observableArrayList();\n\n this.allLogs.forEach(log -> {\n Map<String, Object> obj = new HashMap<>();\n // Forces int to be string to be converted back to int\n obj.put(\"action\", log.getAction());\n obj.put(\"actionByUserId\", log.getActionByUserId().getName());\n obj.put(\"createdAt\", log.getCreatedAt());\n items.add(obj);\n });\n\n // Add all the users to the table\n this.listOfLogs.getItems().addAll(items);\n }", "@Override\n\tpublic void initialize(URL arg0, ResourceBundle arg1) {\n\t\t\n\t\tdaocustomerview check = new daocustomerview();\n\t\ttry {\n\t\t\tResultSet result = check.getResultSet(loginController.getUsername(),loginController.getPassword());\n\t\t\t\n\t\t\t\n\t\t\twhile(result.next()){\n\t\t\ttxtfield1.setText(result.getString(\"Cust_id\"));\n\t\t\ttxtfield2.setText(result.getString(\"Cust_fname\"));\n\t\t\ttxtfield3.setText(result.getString(\"Cust_lname\"));\n\t\t\ttxtfield4.setText(result.getString(\"Cust_phno\"));\n\t\t\ttxtfield5.setText(result.getString(\"cust_email\"));\n\t\t\ttxtfield6.setText(result.getString(\"cust_address\"));\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tsave.setVisible(false);\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\t\t\n\t}" ]
[ "0.64739573", "0.6351711", "0.63031846", "0.6201052", "0.6199339", "0.618119", "0.6167053", "0.60989594", "0.60802776", "0.60542774", "0.604131", "0.5967182", "0.5965995", "0.5963516", "0.59503055", "0.5948971", "0.5944496", "0.59434193", "0.5887525", "0.5887081", "0.5876587", "0.58748347", "0.58602446", "0.58342755", "0.5829824", "0.58250207", "0.58243847", "0.5814045", "0.580518", "0.5798562", "0.57919014", "0.57877773", "0.5781979", "0.57747906", "0.57662404", "0.5763789", "0.5738164", "0.57302785", "0.5727337", "0.5726911", "0.57242453", "0.5717166", "0.57065517", "0.57010937", "0.56967986", "0.5676677", "0.5672343", "0.56588256", "0.5647597", "0.5642727", "0.56244296", "0.5616359", "0.56159014", "0.5613707", "0.5610647", "0.55989134", "0.55885136", "0.5571504", "0.5567725", "0.5561244", "0.555721", "0.55560344", "0.555512", "0.5540541", "0.5539625", "0.5527541", "0.55157846", "0.55132854", "0.55095404", "0.5509158", "0.550915", "0.550867", "0.55049586", "0.55049586", "0.5492253", "0.54899114", "0.5488923", "0.54882747", "0.54863936", "0.5485946", "0.54794246", "0.54763544", "0.54762065", "0.5471217", "0.54667634", "0.5463371", "0.5459208", "0.5457996", "0.5454786", "0.5454687", "0.54536366", "0.5449745", "0.5448521", "0.5447274", "0.5434574", "0.54289764", "0.5427841", "0.5425007", "0.54184717", "0.54180914" ]
0.6244773
3
open the full report of the specific sale by put the sale at static parameter
@FXML void open_btn_clicked(MouseEvent event) { sale_selected = sales_table.getSelectionModel().getSelectedItem(); if (sale_selected != null) { switchScenes("/client/boundry/MarketingAgentSaleShowForm.fxml", "/client/boundry/MarketingAgentMainCustomer.css"); } else { Alert alert = new Alert(AlertType.ERROR); alert.setTitle("No sale pattern selected"); alert.setHeaderText(null); alert.setContentText("Please select sale pattern"); alert.show(); return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSale(int sale) {\n\t\tthis.sale = sale;\r\n\t}", "public void setSale_num(Integer sale_num) {\n this.sale_num = sale_num;\n }", "public void gotoDetailSalesOrder() {\n\t}", "public void salesReport(View view) {\n String dbString = dbHandler.databaseToString();\n// start a new intent an ddisplay the output there\n Intent saleseIntent = new Intent(this, DisplaySalesDetails.class);\n saleseIntent.putExtra(\"db\",dbString);\n startActivity(saleseIntent);\n }", "public void startSale() {\n sale = new Sale();\n }", "public void startNewSale() {\n sale = new Sale(cashRegister);\n }", "public void updateAccountingSystem(Sale sale)\n {\n \n }", "public void saleAct() {\t\r\n\t\t\r\n\t\tif(createWine() != null) {\r\n\t\t\t\r\n\t\t\ttext_amount =String.valueOf( cus.saleTransaction(createWine()));\r\n\t\t\twine_name.setText(name.getText());\r\n\t\t\tamount.setText(\" £ \" + text_amount + \" \" );\r\n\t\t\tbalance.setText(\" £ \" + isCredit((double)cus.getAccount() / 100.00) + \" \");\r\n\t\t\t\r\n\t\t\t//reset all textfield\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t}", "public int getSale() {\n\t\treturn sale;\r\n\t}", "public void sale(HashMap<String, String> params) {\n\t\tTRANSACTION_TYPE = \"SALE\";\n\t\tAMOUNT = params.get(\"amount\");\n\t\tAPI = \"bp10emu\";\n\t\tif (params.containsKey(\"transactionID\")) {\n\t\t\tRRNO = params.get(\"transactionID\");\n\t\t}\n\t}", "public void executeSale(double qty,double price,int pay,int sell) {\n\t\tboolean testing=false;\n\t\tif (testing|testAll) System.out.println(\"RETAILER \"+id+\". Execute sale. qty=\"+qty+\". price=\"+price+\". buy=\"+pay+\". sell=\"+sell);\n\t\tthis.increaseInventory(pay,qty*price);\n\t\tthis.increaseInventory(sell,-qty);\n\t\tif (pay==r_money) income=income+qty*price;\n\t\tif (pay==r_product) supply=supply+qty*price;\n\t\tif (sell==r_money) {\n\t\t\tif (this.getInventory()[r_money]<0.00001) cashouts++;\n\t\t}\n\t\tif (sell==r_product) {\n\t\t\tif (this.getInventory()[r_product]<0.00001) stockouts++;\n\t\t}\n\t\tdouble epsilon=0.000001;\n\t\tif (this.getInventory()[sell]<epsilon) Transactions.dividend(this,owner,sell,this.getInventory()[sell]);\n\t\tif (this.getInventory()[pay]<epsilon) Transactions.dividend(this,owner,pay,this.getInventory()[pay]);\n\t}", "public void bookSale(Sale sale)\n {\n //books the sale\n }", "public void accountSale(long storeID, final SaleTO sale) throws ProductOutOfStockException, NotInDatabaseException, UpdateException;", "@Override\n public void newSale(double payment) {\n calculateTotalRevenue(payment);\n showTotalRevenue();\n }", "public ArrayList<SaleVO> showSale() {\n\t\treturn sale.show();\r\n\t}", "@Override\r\n public void setsaleId(int saleid) {\n this.saleId = saleid;\r\n }", "public void setSales( String showInputDialog )\n\t{\n\n\t}", "public void setNumSales(int numSales){\r\n this.sales = numSales;\r\n }", "void newSale(double totalWithTaxes);", "public Sale find_Sale(Integer sale_id, Integer branch_id) {\n return sale_dao.find(sale_id, branch_id);\n }", "public void startSale(){\n sale = new Sale();\n for(SaleObserver obs: saleObservers)\n sale.addSaleObserver(obs);\n }", "public void startSale(){\n this.sale = new Sale();\n this.inventory = new Inventory();\n this.accounting = new Accounting();\n }", "public void setSaleAmount(double amount) {\n saleAmount = amount;\n }", "public void setSalesProp(String salesProp) {\n this.salesProp = salesProp;\n }", "public Integer getSale_num() {\n return sale_num;\n }", "public void act()\n {\n if(onSales == true)\n {\n calculateSale();\n }\n }", "public void startSale() {\r\n System.out.println(\"[CashRegister] startSale\");\r\n System.out.println(\"\");\r\n\r\n //receipt = new Receipt(customerId); \r\n receipt = new Receipt(\"100\");\r\n\r\n //addItemToSale(productId, quantity);\r\n addItemToSale(\"A101\", 10);\r\n\r\n addItemToSale(\"B205\", 6);\r\n\r\n addItemToSale(\"C222\", 12);\r\n\r\n }", "public int printSaleReportToConsole() {\n int result = 0;\n Enumeration<String> keyEnum = storageSale.keys();\n int totalNumberOfSalesOfProduct = 0;\n String key = null;\n float totalValue = 0;\n while (keyEnum.hasMoreElements()) {\n key = keyEnum.nextElement();\n totalNumberOfSalesOfProduct = getTotalNumberOfSales(key);\n totalValue = getValueOfSales(key);\n System.out.println(\"REPORT: SALE ---> Product: \" + key + \" total number of sales: \"\n + totalNumberOfSalesOfProduct + \" total value: \" + totalValue);\n result++;\n }\n return result;\n }", "public void estimateSale(Sale sale) throws ProcessingException, FrantishexCriteriaValidationException\n\t{\n\t\tif (getEntityManager().contains(sale)) {\n\t\t\tthrow new IllegalArgumentException(\"do not pass entity managed instance. We always expect a detached one!\");\n\t\t}\n\n\t\tList<Client> findByKey = clientService.findByKey(\"cardNumber\", sale.getCardNumber());\n\t\tif (findByKey.size() > 0) {\n\t\t\tClient client = findByKey.get(0);\n\t\t\tsale.setClient(client);\n\t\t}\n\n\t\tContext context = new Context(sale);\n\t\tif (sale.getSaleType() == SaleTypeEnum.RESERVATION) {\n\t\t\tbonusChain.invoke(context);\n\t\t} else {\n\t\t\tbonusChainOnlyPoints.invoke(context);\n\t\t}\n\n\t}", "@GetMapping(\"/sale\")\n public ResultEntity<List<ItemDTO>> getAllSale()\n {\n return itemService.getItemsBySubCategory(ConstantUtil.TYPE_SALE_RENT,\"Sale\");\n }", "public double getSale()\n {\n return sale;\n }", "@Override\r\n public int getsaleId() {\n return this.saleId;\r\n }", "void recordSale(Customer customer, Movie movie, SaleDetails saleDetails) {\n System.out.println(\"Connecting to Sales server\");\n AcmeSalesServer salesServer = AcmeSalesServer.connect();\n System.out.println(\"Adding sale to server\");\n salesServer.addSale(customer, movie, saleDetails);\n System.out.println(\"Sale added\");\n }", "public void create(Sale sale) {\n sale_dao.create(sale);\n }", "public void update(Sale sale) {\n sale_dao.update(sale);\n }", "public void startSale()\n\t{\n\t\tpurchase.reset();\n\t}", "public void completeSale() {\n\n }", "void setAnnualSales(int annualSales) {\n this.annualSales = annualSales;\n }", "public String completeSale(){\n updateEISAndEAS();\n return sale.printReceipt(paymentDTO);\n }", "public Sale(InventoryHandler inv){\n this.saleInfo = new SaleInfo();\n this.inventory = inv;\n }", "public void setSalesSum(Integer salesSum) {\n this.salesSum = salesSum;\n }", "public static JRViewer get_viewer_all_sales(Srpt_receipt to, String rpt_name) {\n try {\n return JasperUtil.getJasperViewer(\n compileJasper(rpt_name),\n JasperUtil.setParameter(to),\n JasperUtil.makeDatasource(to.fields));\n } catch (Exception e) {\n throw new RuntimeException(e);\n } finally {\n }\n }", "@Test\n public void testOrderFactoryDaySales() {\n OrderController orderController = orderFactory.getOrderController();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n // add a menu item to the menu\n menuFactory.getMenu().addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n\n // order 3 of the menu item\n HashMap<MenuItem, Integer> orderItems = new HashMap<>();\n HashMap<SetItem, Integer> setOrderItems = new HashMap<>();\n orderItems.put(menuFactory.getMenu().getMenuItem(1), 3);\n\n // create 2 of this order\n orderController.addOrder(STAFF_NAME, 1, false, orderItems, setOrderItems);\n orderController.addOrder(STAFF_NAME, 2, false, orderItems, setOrderItems);\n\n // create order invoices\n orderController.addOrderInvoice(orderController.getOrder(1));\n orderController.addOrderInvoice(orderController.getOrder(2));\n\n Calendar date = orderController.getOrderInvoice(1).getDate(); // lazy manually type\n int day = date.get(Calendar.DAY_OF_MONTH);\n int month = date.get(Calendar.MONTH);\n int year = date.get(Calendar.YEAR);\n\n // run the day sales report\n // total revenue should be 3 * MENU_PRICE * 2, and the service charge should be 0.1 * 3 * MENU_PRICE * 2\n assertEquals((double)(3 * MENU_PRICE * 2 + 3 * 2 * MENU_PRICE * 0.1), orderController.viewDaySalesReport(day, month, year));\n }", "public void setSalestatus(Boolean salestatus) {\n this.salestatus = salestatus;\n }", "@Override\n\tpublic void update(Sale sale) {\n\t\tDefaultTableModel dtm = (DefaultTableModel)table.getModel();\n\t\tdtm.setRowCount(0);\n\n\t\tdouble totalPrice = 0;\n\t\tfor(int i=0;i<sale.items.size();i++){\n\t\t\tVector v1 = new Vector();\n\t\t\tv1.add(sale.items.get(i).getProdSpec().getTitle());\n\t\t\tv1.add(\"\"+sale.items.get(i).getCopies());\n\t\t\tdtm.addRow(v1);\t\t\t\n\t\t}\n\t\ttotalPrice += sale.getTotal();\n\t\tlblNewLabel.setText(\"\"+totalPrice);\n\t}", "@Test\n public void testOrderFactoryDaySales2() {\n OrderController orderController = orderFactory.getOrderController();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n // add a menu item to the menu\n menuFactory.getMenu().addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n\n // order 3 of the menu item\n HashMap<MenuItem, Integer> orderItems = new HashMap<>();\n HashMap<SetItem, Integer> setOrderItems = new HashMap<>();\n orderItems.put(menuFactory.getMenu().getMenuItem(1), 3);\n\n // create 2 of this order\n orderController.addOrder(STAFF_NAME, 1, true, orderItems, setOrderItems);\n orderController.addOrder(STAFF_NAME, 2, false, orderItems, setOrderItems);\n\n // create order invoices\n orderController.addOrderInvoice(orderController.getOrder(1));\n orderController.addOrderInvoice(orderController.getOrder(2));\n\n Calendar date = orderController.getOrderInvoice(1).getDate(); // lazy manually type\n int day = date.get(Calendar.DAY_OF_MONTH);\n int month = date.get(Calendar.MONTH);\n int year = date.get(Calendar.YEAR);\n\n // run the day sales report\n // total revenue should be 3 * MENU_PRICE * 1.8, and the service charge should be 0.1 * 3 * MENU_PRICE * 0.8 + 0.1 * 3 * MENU_PRICE\n assertEquals((double)((3 * MENU_PRICE * 1.8) + (3 * MENU_PRICE * 0.1 * 0.8) + (3 * MENU_PRICE * 0.1)), orderController.viewDaySalesReport(day, month, year));\n }", "public static JasperReportBuilder generateReport(ExportData metaData,HttpServletRequest request){\n session = request.getSession(false);\n report = report(); // Creer le rapport\n \n //Logo\n// logoImg = cmp.image(inImg).setStyle(DynamicReports.stl.style().setHorizontalAlignment(HorizontalAlignment.LEFT)); \n //logoImg.setDimension(80,80); \n \n //Definit le style des colonnes d'entàte\n report.setColumnTitleStyle(getHeaderStyle(metaData));\n \n \n \n LinkedHashMap <String,String> criteria = metaData.getCriteria(); \n //Ajout la date d'àdition au critere d'impression\n String valDateProperty = getDateTxt(metaData.getLang()) ;\n String keyDateProperty = \"\" ;\n if ( session.getAttribute(\"activedLocale\").equals(\"fr\") ) {\n keyDateProperty = \"Edité le \" ;\n }\n else {\n keyDateProperty = \"Printed on \" ;\n }\n criteria.put(keyDateProperty,valDateProperty);\n \n StyleBuilder titleStyle = stl.style(boldStyle).setFontSize(16).setForegroundColor(new Color(0, 0, 0)).setHorizontalAlignment(HorizontalAlignment.RIGHT).setRightIndent(20);\n ComponentBuilder<?, ?> logoComponent = cmp.horizontalList(\n //cmp.image(Templates.class.getResource(\"/logopalm.png\")).setFixedDimension(150, 50).setStyle(stl.style().setLeftIndent(20)),\n cmp.verticalList(\n cmp.text(metaData.getTitle()).setStyle(titleStyle)\n )\n ).newRow()\n .add(cmp.horizontalList().add(cmp.hListCell(createCriteriaComponent(criteria,metaData)).heightFixedOnTop()))\n .newRow(); \n \n report.noData(logoComponent, cmp.text(\"Aucun enregistrement trouvà\").setStyle(stl.style().setHorizontalAlignment(HorizontalAlignment.CENTER).setTopPadding(30)));\n\n \n \n lblStyle = stl.style(Templates.columnStyle).setForegroundColor(new Color(60, 91, 31)); // Couleur du text \n colStyle = stl.style(Templates.columnStyle).setHorizontalAlignment(HorizontalAlignment.CENTER);\n \n groupStyle = stl.style().setForegroundColor(new Color(60, 91, 31)) \n .setBold(Boolean.TRUE)\n .setPadding(5)\n .setFontSize(13)\n .setHorizontalAlignment(HorizontalAlignment.CENTER); \n \n\n \n if(metaData.getTitle().equals(ITitle.PARCEL)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PARCEL_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SECTOR)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SECTOR_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.BLOCK)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.BLOCK_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.ATTACK_PHYTO)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TREATMENT)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TREATMENT_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVEST)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVEST_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SERVICING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SERVICING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_PLANTING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_PLANTING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.FERTILIZATION)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.FERTILIZATION_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.CONTROL_PHYTO)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.CONTROL_PHYTO_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_FOLDING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_FOLDING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.MORTALITY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.MORTALITY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVESTING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVESTING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.BUDGET)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.REPLACEMENT)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.REPLACEMENT_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.METEOROLOGY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.METEOROLOGY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING_MATERIAL)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING_MATERIAL_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLUVIOMETRY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLUVIOMETRY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.ETP)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.ETP_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HYGROMETRY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HYGROMETRY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TEMPERATURE)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TEMPERATURE_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.INSULATION)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.INSULATION_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.WORK)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.WORK_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }\n \n \n drColumns = new HashMap<String, TextColumnBuilder>(); \n groups = new ArrayList<String>();\n subtotals = new ArrayList<String>();\n \n //Definit la liste des colonnes du rapport\n ExportGenerator.getColumns(metaData); \n //Definit la liste des sous-totaux du rapport\n ExportGenerator.getSubTotals(metaData);\n \n \n //Genration des sous totaux\n for (String group : groups) {\n ColumnGroupBuilder group2 = grp.group(drColumns.get(group));\n report.groupBy(group2);\n for (String subtotal : subtotals) {\n report.subtotalsAtGroupFooter(group2,sbt.sum(drColumns.get(subtotal)));\n }\n }\n\n for (String subtotal : subtotals) {\n report.subtotalsAtSummary(sbt.sum(drColumns.get(subtotal))); \n }\n \n /*if(ExportGenerator.getColumnByNameField(\"plantingName\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL \"), ExportGenerator.getColumnByNameField(\"plantingName\"), Calculation.NOTHING));\n }*//*else if(ExportGenerator.getColumnByNameField(\"invoiceCode\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"invoiceCode\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"planterCode\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL\"), ExportGenerator.getColumnByNameField(\"planterCode\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"transportTicket\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"transportTicket\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"deliveryDate\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"deliveryDate\"), Calculation.NOTHING));\n }\n else if(ExportGenerator.getColumnByNameField(\"arroundPlantingTicketNumber\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"arroundPlantingTicketNumber\"), Calculation.NOTHING));\n }\n else if(ExportGenerator.getColumnByNameField(\"planterNumber\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"planterNumber\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"startPaymentDate\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"startPaymentDate\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"sectorCode\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"sectorCode\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"month\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL \"), ExportGenerator.getColumnByNameField(\"month\"), Calculation.NOTHING));\n }*/\n \n\n \n \n //Genere la source de donnàes du rapport\n report.setDataSource(metaData.getData());\n \n report.highlightDetailEvenRows(); \n \n \n // Definition de l'entete : valable uniquement pour la 1ere page\n HorizontalListBuilder hlb= null;\n \n hlb = cmp.horizontalList().add(\n cmp.hListCell(createCriteriaComponent(criteria,metaData)).heightFixedOnTop()\n );\n\n \n report.title(\n createCustomTitleComponent(metaData.getTitle()), // Titre\n hlb,// Liste Horizontal des Critàres \n cmp.verticalGap(12) // Marge de 12 px entre chaque critàre\n ); \n \n \n \n report.setPageMargin(DynamicReports.margin().setLeft(15).setTop(30).setRight(15).setBottom(30));\n report.setPageFormat(PageType.A3, PageOrientation.LANDSCAPE);\n report.pageFooter(DynamicReports.cmp.pageXslashY());\n return report;\n \n }", "public void retriveSearchSaleDataFromDB(String search1,String search2, String selection) throws SQLException {\r\n\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\r\n\r\n\r\n Character x = '\\'';\r\n String y = \"%\";\r\n ResultSet rs = null;\r\n ResultSet rs2 = null;\r\n\r\n String searchWord = x + y + search1 + y + x;\r\n String searchWord1 = x + search1 + x;\r\n String searchWord2 = x + search2 + x;\r\n\r\n\r\n try (Connection con = DBConnection.getconnection(); Statement stmt = con.createStatement()) {\r\n\r\n // selction of the SQL statment depending on RadioButton clicked by the user\r\n if (selection.equals(\"SaleNumber\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.SaleNumber>=\" + search1 + \" AND \" + \"Sales.SaleNumber<=\" + search2; // filters rows by Sale Number\r\n rs = stmt.executeQuery(SQL);\r\n\r\n\r\n } else if (selection.equals(\"dateSelected\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Date between \" + searchWord1 + \" AND \" + searchWord2; // filters rows by selected date\r\n rs = stmt.executeQuery(SQL);\r\n\r\n\r\n } else if (selection.equals(\"customerName\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Customer like \" + searchWord; // filters rows by typed Customer Name\r\n rs = stmt.executeQuery(SQL);\r\n } else if (selection.equals(\"productName\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Product like \" + searchWord; // filters rows by typed Product Name\r\n rs = stmt.executeQuery(SQL);\r\n } else if (selection.equals(\"category\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Category like \" + searchWord; // filters rows by typed Category\r\n rs = stmt.executeQuery(SQL);\r\n }\r\n\r\n while (rs.next()) {\r\n addSaleToTableList(new Sales(rs.getInt(\"SaleNumber\"), simpleDateFormat.format(rs.getDate(\"Date\")), rs.getString(\"Time\"), rs.getString(\"Customer\"),\r\n rs.getString(\"Product\"), rs.getString(\"Code\"), rs.getString(\"Size\"),\r\n rs.getString(\"Units\"), rs.getString(\"Category\"), rs.getString(\"Quantity\"), rs.getString(\"UnitPrice\"), rs.getString(\"SalePrice\")));\r\n\r\n }\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "@Test()\n\tpublic void groupSales_US440_TC3481() throws InterruptedException,\n\t\t\tRowsExceededException, BiffException, WriteException, IOException, ParseException {\n\t\t/** Variable Section : **/\n\t\tGroupSalesPage groupSalesPage;\n\t\tAbstractTest.tcName=\"groupSales_US440_TC3481\";\n\t\tString password = LoginTestData.level1_SSO_Password;\n\t\tString userId = LoginTestData.level1_SSO_UserId;\n\t\tString storeId = LoginTestData.level1StoreId;\n\t\t/***********************************/\n\t\tHomePage homePage = PageFactory.initElements(driver, HomePage.class);\n\t\t// Navigate to Group sales page\n\t\tgroupSalesPage = homePage.selectUserWithSSOLogin(userId, password).selectLocation(storeId)\n\t\t\t\t.goToGroupSalesPage();\n\t\t//Click on edit button for first validated record\n\t\tJavascriptExecutor executor = (JavascriptExecutor)driver;\n\t\texecutor.executeScript(\"arguments[0].click();\",groupSalesPage.TextExemptSales_BaggedRecord_View_BT);\n\t\twait.until(ExpectedConditions.visibilityOf(groupSalesPage.EditTaxExemptSales_PopUp_Header));\n\t\tString headerText = groupSalesPage.TaxExemptSalesPopUp_HeaderText_Value.getText();\n\t\tSystem.out.println(\"Header Text \"+ headerText);\n\t\tString register = headerText.split(\"\\\\|\")[0].trim();\n\t\tString date = headerText.split(\"\\\\|\")[1].trim();\n\t\tString time = headerText.split(\"\\\\|\")[2].trim();\n\t\tString user = headerText.split(\"\\\\|\")[3].trim();\n\t\tif (date.matches(\"([0-9]{2})/([0-9]{2})/([0-9]{4})\")) {\n\t\t\tReporter.reportPassResult(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"user should be able to view auto pupulated date in view Tax Exempt Sales Page\",\n\t\t\t\t\t\"Pass\");\n\t\t} else {\n\t\t\tReporter.reportTestFailure(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"user should be able to view auto pupulated date in view Tax Exempt Sales Page\",\n\t\t\t\t\t\"Fail\");\n\t\t\tAbstractTest.takeSnapShot();\n\t\t}\n\t\tif (time.matches(\"([0-2]{1,}[0-9]{1,})(:)([0-5]{1,}[0-9]{1,})\")) {\n\t\t\tReporter.reportPassResult(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"user should be able to view auto pupulated time in view Tax Exempt Sales Page\",\n\t\t\t\t\t\"Pass\");\n\t\t} else {\n\t\t\tReporter.reportTestFailure(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"user should be able to view auto pupulated time in view Tax Exempt Sales Page\",\n\t\t\t\t\t\"Fail\");\n\t\t\tAbstractTest.takeSnapShot();\n\t\t}\n\t\tif(!register.isEmpty() & !user.isEmpty() & !groupSalesPage.EditTaxExemptSalesPopUp_Amount_TB.getAttribute(\"value\").isEmpty()){\n\t\t\tReporter.reportPassResult(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"user should be able to view auto pupulated Amount,Register #,User in view Tax Exempt Sales Page\",\n\t\t\t\t\t\"Pass\");\n\t\t} else {\n\t\t\tReporter.reportTestFailure(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"user should be able to view auto pupulated Amount,Register #,User in view Tax Exempt Sales Page\",\n\t\t\t\t\t\"Fail\");\n\t\t\tAbstractTest.takeSnapShot();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public SoftwareSales(int qty){\n\t\tunitsSold = qty;\n\t\tbasePrice(RETAIL_PRICE, unitsSold);\n\t\tsalesTotal();\n\t\t}", "public void calculateSale()\n {\n double total = 0.00;\n int numTimbits = 0;\n int numDoughnuts = 0;\n int smallCoffee = 0;\n int mediumCoffee = 0;\n int largeCoffee = 0;\n String order;\n \n for(int i = 0; salesItem[i] != null && i < salesItem.length; i++)\n {\n if(salesItem[i] instanceof Timbit) \n {\n numTimbits = numTimbits + salesItem[i].getNumOfItems();\n }\n else if(salesItem[i] instanceof Doughnut)\n {\n numDoughnuts = numDoughnuts + salesItem[i].getNumOfItems();\n }\n else if(salesItem[i] instanceof Coffee)\n {\n if(salesItem[i].getNumOfItems()==1)\n {\n smallCoffee ++;\n }\n else if(salesItem[i].getNumOfItems()==2)\n {\n mediumCoffee ++;\n }\n else\n {\n largeCoffee ++;\n }\n }\n \n total += salesItem[i].getFinalPrice();\n }\n \n order = \"Timbits: \" + numTimbits + \"\\nDoughnuts: \" + numDoughnuts + \"\\nSmall Coffees: \" + smallCoffee + \"\\nMedium Coffees: \" + mediumCoffee + \"\\nLarge Coffees: \" + largeCoffee ; \n showText(order + String.format(\"\\nTotal Price: $%5.2f\", total), 150, 175);\n }", "public void displayReport() {\r\n\t\tint ticketsSold = 0;\r\n\t\tint aTicketsSold = 0;\r\n\t\tint cTicketsSold = 0;\r\n\t\tint sTicketsSold = 0;\r\n\t\tdouble totalSales = 0;\r\n\t\t\r\n\t\tTheaterSeat current = getFirst();\r\n\t\tif (current.getTicketType() == 'A') {\r\n\t\t\taTicketsSold++;\r\n\t\t\tticketsSold++;\r\n\t\t\ttotalSales += 10;\r\n\t\t}\r\n\t\tif (current.getTicketType() == 'C') {\r\n\t\t\tcTicketsSold++;\r\n\t\t\tticketsSold++;\r\n\t\t\ttotalSales += 5;\r\n\t\t}\r\n\t\tif (current.getTicketType() == 'S') {\r\n\t\t\tsTicketsSold++;\r\n\t\t\tticketsSold++;\r\n\t\t\ttotalSales += 7.5;\r\n\t\t}\r\n\t\tfor (int i=0; i<numRows - 1; i++) {\r\n\t\t\t\r\n\t\t\tfor (int j=1; j<numCols; j++) {\r\n\t\t\t\tcurrent = current.getRight();\r\n\t\t\t\tif (current.getTicketType() == 'A') {\r\n\t\t\t\t\taTicketsSold++;\r\n\t\t\t\t\tticketsSold++;\r\n\t\t\t\t\ttotalSales += 10;\r\n\t\t\t\t}\r\n\t\t\t\tif (current.getTicketType() == 'C') {\r\n\t\t\t\t\tcTicketsSold++;\r\n\t\t\t\t\tticketsSold++;\r\n\t\t\t\t\ttotalSales += 5;\r\n\t\t\t\t}\r\n\t\t\t\tif (current.getTicketType() == 'S') {\r\n\t\t\t\t\tsTicketsSold++;\r\n\t\t\t\t\tticketsSold++;\r\n\t\t\t\t\ttotalSales += 7.5;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int j=0; j<numCols - 1; j++) {\r\n\t\t\t\tcurrent = current.getLeft();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent = current.getDown();\r\n\t\t\tif (current.getTicketType() == 'A') {\r\n\t\t\t\taTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 10;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'C') {\r\n\t\t\t\tcTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 5;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'S') {\r\n\t\t\t\tsTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 7.5;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int j=1; j<numCols; j++) {\r\n\t\t\tcurrent = current.getRight();\r\n\t\t\tif (current.getTicketType() == 'A') {\r\n\t\t\t\taTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 10;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'C') {\r\n\t\t\t\tcTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 5;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'S') {\r\n\t\t\t\tsTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 7.5;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Total seats in theater: \" + numRows*numCols);\r\n\t\tSystem.out.println(\"Total tickets sold: \" + ticketsSold);\r\n\t\tSystem.out.println(\"Adult tickets sold: \" + aTicketsSold);\r\n\t\tSystem.out.println(\"Child tickets sold: \" + cTicketsSold);\r\n\t\tSystem.out.println(\"Senior tickets sold: \" + sTicketsSold);\r\n\t\tSystem.out.println(\"Total ticket sales: $\" + String.format(\"%.2f\", totalSales));\r\n\t}", "public void onReportClick(){\r\n\t\tmyView.advanceToReport();\r\n\t}", "@Override\n public void onClick(View v) {\n ((MakeSale) getActivity()).inicializeScan();\n }", "public void viewRecord(int pos){\n\n Intent i = new Intent(getApplicationContext(),addExpensesPage.class);\n\n Expenses _e = recordList.getMyRecords().get(pos);\n\n i.putExtra(\"Edit\",pos);\n i.putExtra(\"Date\",_e.getExpenseDate());\n i.putExtra(\"Amount\",_e.getAmount());\n i.putExtra(\"Category\",_e.getCategory());\n i.putExtra(\"Choice\",_e.getCategory_choice());\n i.putExtra(\"Payment\",_e.getpMethod());\n i.putExtra(\"Description\",_e.getDescription());\n\n startActivity(i);\n }", "Salesman() {\n super();\n super.setType(EMPLOYEE_TYPE);\n this.setAnnualSales(-1);\n }", "public static void getSalesInformation(Employee [] employee) {\n\t\tdouble total = 0;\n\t\tString report = \"-------List of employees with sales information-------\\n\";\n\t\tif (Employee.getEmployeeQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no Employee!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Employee.getEmployeeQuantity(); i++) {\n\t\t\t\ttotal += employee[i+1].getSales().getEachSales();\n\t\t\t\treport += ((i+1) + \" \" + employee[i+1].getName() + \" Sales: \" + employee[i+1].getSales().getEachSales() + \"\\n\"\n\t\t\t\t\t\t);\n\t\t\t}\n\t\t\treport += \"\\nTotal: \" + total;\n\t\t\tJOptionPane.showMessageDialog(null, report);\n\t\t}\n\t}", "public void action_call(ActionEvent actionEvent) {\n ViewObject searchVO=am.getPOCHeaderView1();\n ViewObject pocvo=am.getpocSearchVo1();\n String poc_id=null;\n int Buyer=0;\n int org=0;\n String orgname=null;\n try{\n poc_id=pocvo.getCurrentRow().getAttribute(\"PocId\").toString();\n }\n catch(Exception e) {\n poc_id=null;\n }\n \n int pram=1;\n am.getDBTransaction().commit();\n /***ViewObject oder=am.getOrderRecapSummary1();\n ViewObject oder=am.getorder_recap_new_view1();\n oder.setNamedWhereClauseParam(\"param\",pram);\n oder.setWhereClause(\"SEASON = '\"+season+\"' AND BUYER_ID = '\"+Buyer+\"' AND ORG_ID= '\"+org+\"'\");\n **/\n \n \n searchVO.setNamedWhereClauseParam(\"param\",pram);\n searchVO.setWhereClause(\"POC_ID = '\"+poc_id+\"'\");\n \n \n \n searchVO.executeQuery();\n \n \n AdfFacesContext.getCurrentInstance().addPartialTarget(pocTable); \n \n \n \n \n \n }", "public void setSalesID(final long newSalesID) {\n this.salesID = newSalesID;\n }", "public void openConsult(ClientData data) {\n\t\tString title = resourceManager.getString(\"process.view.consult.title\",\n\t\t\t\tnew Object[] {\n\t\t\t\t//FILL_IN_GENERATOR_CONSULT_TITLE_DATA\n\t\t\t\t});\n\n\t\t// Buscamos por todas las vistas de consultas abiertas, si está la que\n\t\t// queremos abrir\n\t\tint indexOfTab = -1;\n\t\tfor (Component c : tabbedPane.getComponents()) {\n\t\t\tif (c instanceof ConsultDataView) {\n\t\t\t\tif (((ConsultDataView) c).getData().equals(data)) {\n\t\t\t\t\tindexOfTab = tabbedPane.indexOfTab(title);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (indexOfTab >= 0) {\n\t\t\ttabbedPane.setSelectedIndex(indexOfTab);\n\t\t} else {\n\t\t\tConsultDataView cView = new ConsultDataView(resourceManager);\n\t\t\ttabbedPane.addTab(title, cView);\n\n\t\t\ttabbedPane.setTabComponentAt(tabbedPane.indexOfTab(title),\n\t\t\t\t\tnew ButtonTabComponent(tabbedPane, this, cView,\n\t\t\t\t\t\t\tresourceManager));\n\t\t\tindexOfTab = tabbedPane.indexOfTab(title);\n\t\t\ttabbedPane.setSelectedIndex(indexOfTab);\n\t\t\tloadConsultView(cView, data);\n\t\t}\n\t}", "void setShowReportAmount(String amount);", "public Object getSalesInstanceReport() {\n return salesInstanceReport;\n }", "private void fnMeanSale() {\n }", "public void setSales(Integer sales) {\n this.sales = this.sales + sales;\n }", "private static void writeToSaleItems() throws IOException {\n FileWriter write = new FileWriter(path4, false);\n PrintWriter print_line = new PrintWriter(write);\n ArrayList<Product> stock = Inventory.getStock();\n for (int i = 0; i < stock.size(); i++) {\n Product product = (Product) stock.get(i);\n if (product.price.isOnSale()) {\n int UPC = product.getUpc();\n float price = product.price.getSalePrice();\n String period = product.price.getSalePeriod();\n\n textLine = UPC + \" \" + price + \" \" + period;\n\n print_line.printf(\"%s\" + \"%n\", textLine);\n\n }\n }\n print_line.close();\n\n }", "public void showInvoiceNo(){\n\t}", "@RequestMapping(\"/test\")\n public ModelAndView showShops() {\n\n ModelAndView model = new ModelAndView(\"page\");\n\n model.addObject(\"userClickSales\", true);\n model.addObject(\"salesList\", salesDAO.getShopSales(null,null, null,\" total_order_sales DESC \",100,0,true,false).getOrderSalesStatsList());\n ShopEndPoint sales2=salesDAO.getShopSales(null,null,null,\" total_order_sales DESC \",100, 0,true,false);\n List<OrderSalesStats> stats=sales2.getOrderSalesStatsList();\n /* for (OrderSalesStats shop: stats){\n System.out.println(shop.getShopID()+\"-->\"+shop.getTotalOrderSales());\n }*/\n System.out.println(\"==========================================================================================Get Method Called\");\n return model;\n }", "public long getSalesID() {\n return salesID;\n }", "public Sales getSaleById(Long id) {\r\n\t\treturn salesRepository.findById(id).orElse(null);\r\n\t}", "public void setSalesPrice(int value) {\n this.salesPrice = value;\n }", "public org.paradyne.lib.ireportV2.ReportGenerator getReport(org.paradyne.lib.ireportV2.ReportGenerator rg, TaxChallan bean){\r\n\t\ttry {\r\n\t\t\tint toYear=Integer.parseInt(bean.getYear().substring(2))+1;\r\n\t\t\tString toYearStr =\"\";\r\n\t\t\tif(toYear < 10){\r\n\t\t\t\ttoYearStr = \"0\"+toYear;\r\n\t\t\t}else {\r\n\t\t\t\ttoYearStr =\"\"+toYear;\r\n\t\t\t}\r\n\t\t\tString assesmentYear = bean.getYear()+ \"-\"+ toYearStr;\r\n\t\t\tTableDataSet subtitleName = new TableDataSet();\r\n\t\t\tObject obj[][] = new Object[1][3];\r\n\t\t\t\r\n\t\t\tobj[0][0] = \"* Important : Please see notes \\noverleaf before filling up the challan\";\r\n\t\t\tobj[0][1] = \"T.D.S./TCS TAX CHALLAN\";\r\n\t\t\tobj[0][2] = \"Single Copy (to be sent to the ZAO)\";\r\n\t\t\tsubtitleName.setData(obj);\r\n\t\t\tsubtitleName.setCellAlignment(new int[] { 0, 1, 0 });\r\n\t\t\tsubtitleName.setCellWidth(new int[] { 30, 40, 30 });\r\n\t\t\tsubtitleName.setBorderDetail(3);\r\n\t\t\tsubtitleName.setHeaderTable(true);\r\n\t\t\trg.addTableToDoc(subtitleName);\r\n\t\t\t\r\n\t\t\tTableDataSet heading1 = new TableDataSet();\r\n\t\t\theading1.setData(new Object[][] { {\r\n\t\t\t\t\t\t\t\"CHALLAN NO./ \\nITNS \\n281\\n\\n\"+bean.getChallanNo(),\r\n\t\t\t\t\t\t\t\"Tax Applicable (Tick One)*\\nTAX DEDUCTED/COLLECTED AT SOURCE FROM\\n\\n(0020) COMPANY [__] \\t\\t\\t\\t(0021) NON-COMPANY [__] \\n\\n DEDUCTEES \\t\\t\\t\\t\\t\\t\\t DEDUCTEES\",\r\n\t\t\t\t\t\t\t\"Assesment Year \\n\\n\"+assesmentYear }});\r\n\t\t\theading1.setCellAlignment(new int[] { 1, 1, 1 });\r\n\t\t\theading1.setCellWidth(new int[] { 20, 60, 20 });\r\n\t\t\theading1.setBorderDetail(3);\r\n\t\t\trg.addTableToDoc(heading1);\r\n\t\t\t\r\n\t\t\tObject divAddress[][]=getSqlModel().getSingleResult(\"SELECT HRMS_DIVISION.DIV_NAME, NVL(HRMS_DIVISION.DIV_ADDRESS1,' '), NVL(HRMS_DIVISION.DIV_ADDRESS2,' '), NVL(HRMS_DIVISION.DIV_ADDRESS3,' '), NVL(HRMS_DIVISION.DIV_TANNO,' '), \"\r\n\t\t\t\t\t+\" HRMS_DIVISION.DIV_TELEPHONE, HRMS_DIVISION.DIV_PINCODE FROM HRMS_DIVISION WHERE HRMS_DIVISION.DIV_ID=\"+bean.getDivId());\r\n\t\t\t\r\n\t\t\tObject [][] empDataObj = new Object[4][1];\r\n \t\tempDataObj[0][0] = \"Tax Deduction Account No. (T.A.N.)\\n\"+divAddress[0][4];;\r\n \t\tempDataObj[1][0] = \"Full Name\\n\"+divAddress[0][0];\r\n \t\tempDataObj[2][0] = \"Complete Address with City & State\\n\"+divAddress[0][1]+\"\\n\"+\"\"+divAddress[0][2]+\"\\n\"+\"\"+divAddress[0][3];\r\n \t\tempDataObj[3][0] = \"Tel. No. : \"+checkNull(\"\"+divAddress[0][5])+\"\\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\\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\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\" +\r\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\\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 Pin : \"+checkNull(\"\"+divAddress[0][6]);\r\n \t\t\r\n \t\t\r\n \t\tTableDataSet empData = new TableDataSet();\r\n\t\t\tempData.setData(empDataObj);\r\n\t\t\tempData.setCellAlignment(new int[] { 0 });\r\n\t\t\tempData.setCellWidth(new int[] { 100 });\r\n\t\t\tempData.setBorderDetail(3);\r\n\t\t\trg.addTableToDoc(empData);\r\n \t\t\r\n \t\tTableDataSet table1 = new TableDataSet();\r\n \t\ttable1.setData(new Object[][] { { \"Type of Payment\", \"Code * \" } });\r\n \t\ttable1.setCellAlignment(new int[] { 0, 2});\r\n \t\ttable1.setCellWidth(new int[] { 50, 50 });\r\n \t\ttable1.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tTableDataSet table2 = new TableDataSet();\r\n\t\t\ttable2.setData(new Object[][] { {\"(Tick One)\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\" +\r\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\\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\\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\\t\\t\\t\\t\\t\\t\\t\\t\\t(Please see overleaf)\" +\r\n\t\t\t\t\t\"\\n\\n\\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\\t\\t\\t\\t\\t\\t\\t\\t\\tTDS/TCS Payable by Taxpayer\\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\\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 (200)\" +\r\n\t\t\t\t\t\"\\n\\n\\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\\t\\t\\t\\t TDS/TCS Regular Assessment (Raised by I.T. Deptt.)\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t(400)\\n\"}});\r\n\t\t\ttable2.setCellAlignment(new int[] {0});\r\n\t\t\ttable2.setCellWidth(new int[] { 100 });\r\n\t\t\ttable2.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map2 = rg.joinTableDataSet(table1, table2, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table3 = new TableDataSet();\r\n\t\t\ttable3.setData(new Object[][] { { \"DETAILS OF PAYMENTS\",\"Amount (in Rs. Only)\" }});\r\n\t\t\ttable3.setCellAlignment(new int[] { 0, 0});\r\n\t\t\ttable3.setCellWidth(new int[] { 50, 50});\r\n\t\t\ttable3.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map3 = rg.joinTableDataSet(map2, table3, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table4 = new TableDataSet();\r\n\t\t\ttable4.setData(new Object[][] { {\"Income Tax\",bean.getTax()},\r\n\t\t\t\t\t{\"Surcharge\",bean.getSurcharge()},\r\n\t\t\t\t\t{\"Education Cess\",bean.getEduCess()},\r\n\t\t\t\t\t{\"Interest\",bean.getIntAmt()},\r\n\t\t\t\t\t{\"Penalty\",bean.getOthrAmt()},\r\n\t\t\t\t\t{\"Total\",bean.getTotalTax()},\r\n\t\t\t\t\t{\"Total (in words)\",\"\"}});\r\n\t\t\ttable4.setCellAlignment(new int[] { 0, 0});\r\n\t\t\ttable4.setCellWidth(new int[] { 30, 70});\r\n\t\t\ttable4.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map4 = rg.joinTableDataSet(map3, table4, false, 100);\r\n\t\t\t\r\n\t\t\tString numberString [] = convert(Integer.parseInt(bean.getTotalTax().trim().replace(\".00\",\"\"))).split(\",\");\r\n\t\t\t\r\n\t\t\tObject totalInWord [][]= new Object [2][6];\r\n\t\t\ttotalInWord [0][0] = \"CRORE\";\r\n\t\t\ttotalInWord [0][1] = \"LACS\";\r\n\t\t\ttotalInWord [0][2] = \"THOUSAND\";\r\n\t\t\ttotalInWord [0][3] = \"HUNDRED\";\r\n\t\t\ttotalInWord [0][4] = \"TENS\";\r\n\t\t\ttotalInWord [0][5] = \"UNITS\";\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < numberString.length; i++) {\r\n\t\t\t\tif(numberString[i].equalsIgnoreCase(\"zero\")){\r\n\t\t\t\t\ttotalInWord [1][i] = \"Nil\";\r\n\t\t\t\t} else { \r\n\t\t\t\t\ttotalInWord [1][i] = numberString[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tTableDataSet table5 = new TableDataSet();\r\n\t\t\ttable5.setData(totalInWord);\r\n\t\t\ttable5.setCellAlignment(new int[] { 1, 1, 1, 1, 1, 1});\r\n\t\t\ttable5.setCellWidth(new int[] { 15, 15, 15, 15, 15, 15});\r\n\t\t\ttable5.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map5 = rg.joinTableDataSet(map4, table5, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table6 = new TableDataSet();\r\n\t\t\ttable6.setData(new Object[][] { {\"Paid in Cash/Debit to A/c /Cheque No.\"+bean.getChequeNo(), \"\", \"Dated\", bean.getChequeDate() }});\r\n\t\t\ttable6.setCellAlignment(new int[] { 1, 1, 1, 1});\r\n\t\t\ttable6.setCellWidth(new int[] { 50, 15, 20, 15});\r\n\t\t\ttable6.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map6 = rg.joinTableDataSet(map5, table6, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table7 = new TableDataSet();\r\n\t\t\ttable7.setData(new Object[][] { {\"Drawn on\", bean.getBank()}});\r\n\t\t\ttable7.setCellAlignment(new int[] { 0, 0});\r\n\t\t\ttable7.setCellWidth(new int[] { 50,50});\r\n\t\t\ttable7.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map7 = rg.joinTableDataSet(map6, table7, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table8 = new TableDataSet();\r\n\t\t\ttable8.setData(new Object[][] { {\"(Name of the Bank and Branch)\"}});\r\n\t\t\ttable8.setCellAlignment(new int[] { 2});\r\n\t\t\ttable8.setCellWidth(new int[] { 100 });\r\n\t\t\ttable8.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map8 = rg.joinTableDataSet(map7, table8, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table9 = new TableDataSet();\r\n\t\t\ttable9.setData(new Object[][] { {\"Date\", \"\"}});\r\n\t\t\ttable9.setCellAlignment(new int[] { 0, 0});\r\n\t\t\ttable9.setCellWidth(new int[] { 60, 40});\r\n\t\t\ttable9.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map9 = rg.joinTableDataSet(map8, table9, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table10 = new TableDataSet();\r\n\t\t\ttable10.setData(new Object[][] { {\"Signature of person making payment\"}});\r\n\t\t\ttable10.setCellAlignment(new int[] { 2 });\r\n\t\t\ttable10.setCellWidth(new int[] { 100});\r\n\t\t\ttable10.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map10 = rg.joinTableDataSet(map9, table10, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table11 = new TableDataSet();\r\n\t\t\ttable11.setData(new Object[][] { {\"Taxpayers Counterfoil (To be filled up by taxpayer)\"}});\r\n\t\t\ttable11.setCellAlignment(new int[] { 1 });\r\n\t\t\ttable11.setCellWidth(new int[] { 100});\r\n\t\t\ttable11.setBodyFontDetails(Font.FontFamily.HELVETICA, 8, Font.BOLD, new BaseColor(0, 0, 0));\r\n\t\t\ttable11.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map11 = rg.joinTableDataSet(map10, table11, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table12 = new TableDataSet();\r\n\t\t\ttable12.setData(new Object[][] { {\"TAN \"+divAddress[0][4]+\"\\n\\nReceived from \"+divAddress[0][0]}});\r\n\t\t\ttable12.setCellAlignment(new int[] { 0 });\r\n\t\t\ttable12.setCellWidth(new int[] { 100});\r\n\t\t\ttable12.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map12 = rg.joinTableDataSet(map11, table12, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table13 = new TableDataSet();\r\n\t\t\ttable13.setData(new Object[][] { {\"(Name)\"}});\r\n\t\t\ttable13.setCellAlignment(new int[] { 1 });\r\n\t\t\ttable13.setCellWidth(new int[] { 100 });\r\n\t\t\ttable13.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map13 = rg.joinTableDataSet(map12, table13, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table14 = new TableDataSet();\r\n\t\t\ttable14.setData(new Object[][] { {\"Cash/ Debit to A/c /Cheque No. :\"+bean.getChequeNo()+\"For Rs.\"+bean.getTotalTax().replace(\".00\", \"\")+\"/-\"}});\r\n\t\t\ttable14.setCellAlignment(new int[] { 1 });\r\n\t\t\ttable14.setCellWidth(new int[] { 100 });\r\n\t\t\ttable14.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map14 = rg.joinTableDataSet(map13, table14, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table15 = new TableDataSet();\r\n\t\t\ttable15.setData(new Object[][] { {\"Rs. (in words)\", Utility.convert(Integer.parseInt(bean.getTotalTax().trim().replace(\".00\", \"\")))}, {\"Drawn on\", bean.getBank()}});\r\n\t\t\ttable15.setCellAlignment(new int[] { 0, 1 });\r\n\t\t\ttable15.setCellWidth(new int[] { 30, 70 });\r\n\t\t\ttable15.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map15 = rg.joinTableDataSet(map14, table15, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table16 = new TableDataSet();\r\n\t\t\ttable16.setData(new Object[][] { {\"(Name of the Bank and Branch)\"}, \r\n\t\t\t\t\t{\"Company/Non-Company Deductees\"}, \r\n\t\t\t\t\t{\"on account of Tax Deducted at Source (TDS)/Tax Collected at Source (TCS) from____(Fill up Code)\"},\r\n\t\t\t\t\t{\"(Strike out whichever is not applicable)\"}});\r\n\t\t\ttable16.setCellAlignment(new int[] { 1 });\r\n\t\t\ttable16.setCellWidth(new int[] { 100 });\r\n\t\t\ttable16.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map16 = rg.joinTableDataSet(map15, table16, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table17 = new TableDataSet();\r\n\t\t\ttable17.setData(new Object[][] { {\"\\nfor the Assessment Year : \"+assesmentYear}});\r\n\t\t\ttable17.setCellAlignment(new int[] { 0});\r\n\t\t\ttable17.setCellWidth(new int[] { 100 });\r\n\t\t\ttable17.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map17 = rg.joinTableDataSet(map16, table17, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table18 = new TableDataSet();\r\n\t\t\ttable18.setData(new Object[][] { {\"\\n\\n\\n\\n\\n\\t\\t\\t\\t\\t\\t\\t\\tFOR USE IN RECEIVING BANK \\n\\n\\n\\n\\n\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tDebit to A/c/Cheque credited on\\n\\n\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tDD-MM-YY\\n\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tSPACE FOR BANK SEAL\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nRs.\"}});\r\n\t\t\ttable18.setCellAlignment(new int[] { 0 });\r\n\t\t\ttable18.setCellWidth(new int[] {100});\r\n\t\t\ttable18.setBorderDetail(3);\r\n\r\n\t\t\tTableDataSet table19 = new TableDataSet();\r\n\t\t\ttable19.setData(new Object[][] { {\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tSPACE FOR BANK SEAL\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nRs.\"}});\r\n\t\t\ttable19.setCellAlignment(new int[] { 0 });\r\n\t\t\ttable19.setCellWidth(new int[] {100});\r\n\t\t\ttable19.setBorderDetail(3);\r\n\t\t\t//rg.addTableToDoc(table11);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map18 = rg.joinTableDataSet(table18, table19, false, 100);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map19 = rg.joinTableDataSet(map17, map18, true, 70);\r\n\t\t\t\r\n\t\t\trg.addTableToDoc(map19);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn rg;\r\n\t}", "public void traverse(BusIfc bus)\n {\n SaleCargoIfc cargo = (SaleCargoIfc)bus.getCargo();\n SaleReturnLineItemIfc item = cargo.getLineItem();\n SaleReturnTransactionIfc transaction = cargo.getTransaction();\n\n //make a journal entry\n JournalManagerIfc journal =\n (JournalManagerIfc)Gateway.getDispatcher().getManager(JournalManagerIfc.TYPE);\n JournalFormatterManagerIfc formatter =\n (JournalFormatterManagerIfc)Gateway.getDispatcher().getManager(JournalFormatterManagerIfc.TYPE);\n if (journal != null)\n {\n if (!item.isKitComponent()) //KitComponentLineItems are journaled by their parent header\n {\n StringBuffer sb = new StringBuffer();\n EYSDate dob = transaction.getAgeRestrictedDOB();\n String itemID = null;\n if(item.getRelatedItemSequenceNumber() > -1)\n {\n itemID = transaction.getLineItems()[item.getRelatedItemSequenceNumber()].getItemID();\n }\n sb.append(formatter.toJournalString(item, dob, itemID));\n\n if (transaction.getTransactionType() == TransactionIfc.TYPE_ORDER_INITIATE) // add status\n {\n// sb.append(Util.EOL).append(\" Status: New\");\n//\n \tString transactionSaleStatus = I18NHelper.getString(I18NConstantsIfc.EJOURNAL_TYPE, JournalConstantsIfc.TRANSACTION_SALE_STATUS, null);\n \tsb.append(Util.EOL).append(transactionSaleStatus);\n }\n\n journal.journal(cargo.getOperator().getLoginID(),\n transaction.getTransactionID(),\n sb.toString());\n }\n }\n else\n {\n logger.error(\"No JournalManager found\");\n }\n\n //Show item on Line Display device\n POSDeviceActions pda = new POSDeviceActions((SessionBusIfc)bus);\n try\n {\n pda.lineDisplayItem(item);\n }\n catch (DeviceException e)\n {\n logger.warn(\"Unable to use Line Display: \" + e.getMessage() + \"\");\n }\n\n }", "public void testSalesmanWithTwoSales()\n {\n try {\n SalesFile t = new SalesFile(\"samples/data/in/base_4.dat\", AppConfig.fieldDelimiter);\n t.read();\n assertEquals(t.getTotalSalesman(), 2);\n assertEquals(t.getTotalCustomers(), 4);\n assertEquals(t.getMostExpensiveSaleId(), \"10\");\n assertEquals(t.getWorstSalesman(), \"Renato\");\n } catch(RecordInvalidTokenException ex) {\n assertTrue(\"This file is well formed, but something is wrong!\", false);\n } catch(FileNotFoundException e) {\n assertTrue(\"File must exist to complete the test!\", false);\n } catch(IOException e) {\n assertTrue(\"IO exception!\", false);\n }\n }", "@Override\r\n\tpublic List<SalesAnalysis> getSalesAnalysis(Date fromDate, Date toDate) {\r\n\t\t\r\n\t\tList<SalesAnalysis> salesAnalysisDetails=new ArrayList<>();\r\n\t\tSalesAnalysis salesAnalysis=new SalesAnalysis();\r\n\t\t\r\n\t\t//get orders placed in the given period\r\n\t\tList<Order> orderDetails=orderService.getOrdersBetween(fromDate, toDate);\r\n\t\t\r\n\t\tHashMap<String, Double> purchasePriceDetails=new HashMap<>();\r\n\t\tHashMap<String, Double> salesPriceDetails=new HashMap<>();\r\n\t\tint qty=0;\r\n\t\tdouble salesPrice=0;\r\n\t\tdouble purchasePrice=0;\r\n\t\t\r\n\t\t//get total revenue for period\r\n\t\tdouble totalRevenue=getTotalRevenueBetween(fromDate, toDate);\r\n\t\t\r\n\t\t//get best seller details for the products, category-wise(from PRODUCT table)\r\n\t\tList<Object[]> bestSellerDetails=productService.getBestSellerId();\r\n\t\tSystem.out.println(bestSellerDetails);\r\n\t\t\r\n\t\t\r\n\t\t//for each product category, check sales details\r\n\t\tfor(Object[] object:bestSellerDetails)\t{\r\n\t\t\tString productCategory=(String)object[0];\r\n\t\t\tsalesPrice=0;\r\n\t\t\tpurchasePrice=0;\r\n\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\r\n\t\t\t//for each order, check product category and add details to maps\r\n\t\t\tfor(Order order:orderDetails)\t{\r\n\t\t\t\t\r\n\t\t\t\t//get products in this order\r\n\t\t\t\tList<CartProduct> products=order.getCart().getCartProducts();\r\n\t\t\t\t\r\n\t\t\t\t//getting purchase price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tpurchasePrice=purchasePriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(product.getProduct().getQuantity()*product.getProduct().getProductPrice());\r\n\t\t\t\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//getting sales price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tqty=product.getQuantity();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsalesPrice=salesPriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(qty*(100-product.getProduct().getDiscount())*product.getProduct().getProductPrice())/100;\r\n\t\t\t\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\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\r\n\t\t\t//make SalesAnalysis object using obtained data\r\n\t\t\tsalesAnalysis.setProductCategory(productCategory);\r\n\t\t\tsalesAnalysis.setMerchant(merchantService.getMerchantName((Integer)object[1]));\r\n\t\t\tsalesAnalysis.setProductQuantity(purchasePriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setProductSales(salesPriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setSalesPercent((salesAnalysis.getProductSales()*100)/salesAnalysis.getProductQuantity());\r\n\t\t\tsalesAnalysis.setTotalRevenue(totalRevenue);\r\n\t\t\t\r\n\t\t\t//make a list of sales analysis performed\r\n\t\t\tsalesAnalysisDetails.add(salesAnalysis);\r\n\t\t}\r\n\t\t\r\n\t\treturn salesAnalysisDetails;\r\n\t}", "@Test\n public void getCatalogSalesTest() {\n Integer size = null;\n Integer page = null;\n String order = null;\n // PageResourceCatalogSale response = api.getCatalogSales(size, page, order);\n\n // TODO: test validations\n }", "@Override\r\n public void aceptarReporte() {\n if (rep_reporte.getReporteSelecionado().equals(\"Libro Diario\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n\r\n } else if (sec_rango_reporte.isVisible()) {\r\n String estado = \"\" + utilitario.getVariable(\"p_con_estado_comprobante_normal\") + \",\" + utilitario.getVariable(\"p_con_estado_comp_inicial\") + \",\" + utilitario.getVariable(\"p_con_estado_comp_final\");\r\n parametro.put(\"fecha_inicio\", sec_rango_reporte.getFecha1());\r\n parametro.put(\"fecha_fin\", sec_rango_reporte.getFecha2());\r\n\r\n parametro.put(\"ide_cneco\", estado);\r\n parametro.put(\"ide_cnlap_haber\", p_con_lugar_haber);\r\n parametro.put(\"ide_cnlap_debe\", p_con_lugar_debe);\r\n sec_rango_reporte.cerrar();\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath());\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sec_rango_reporte\");\r\n }\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Balance General Consolidado\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n fecha_fin = sec_rango_reporte.getFecha2String();\r\n fecha_inicio = con.getFechaInicialPeriodo(fecha_fin);\r\n if (fecha_inicio != null && !fecha_inicio.isEmpty()) {\r\n sec_rango_reporte.cerrar();\r\n sel_tab_nivel.dibujar();\r\n utilitario.addUpdate(\"sec_rango_reporte,sel_tab_nivel\");\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"El rango de fechas seleccionado no se encuentra en ningun Periodo Contable\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha final\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicial\");\r\n }\r\n } else if (sel_tab_nivel.isVisible()) {\r\n if (sel_tab_nivel.getValorSeleccionado() != null) {\r\n System.out.println(\"fecha fin \" + fecha_fin);\r\n parametro.put(\"p_activo\", utilitario.getVariable(\"p_con_tipo_cuenta_activo\"));\r\n parametro.put(\"p_pasivo\", utilitario.getVariable(\"p_con_tipo_cuenta_pasivo\"));\r\n parametro.put(\"p_patrimonio\", utilitario.getVariable(\"p_con_tipo_cuenta_patrimonio\"));\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n\r\n }\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin));\r\n TablaGenerica tab_balance = con.generarBalanceGeneral(true, fecha_inicio, fecha_fin, Integer.parseInt(sel_tab_nivel.getValorSeleccionado()));\r\n parametro.put(\"titulo\", \"BALANCE GENERAL CONSOLIDADO\");\r\n if (tab_balance.getTotalFilas() > 0) {\r\n List lis_totales = con.obtenerTotalesBalanceGeneral(true, fecha_inicio, fecha_fin);\r\n double tot_activo = Double.parseDouble(lis_totales.get(0) + \"\");\r\n double tot_pasivo = Double.parseDouble(lis_totales.get(1) + \"\");\r\n double tot_patrimonio = Double.parseDouble(lis_totales.get(2) + \"\");\r\n double utilidad_perdida = tot_activo - tot_pasivo - tot_patrimonio;\r\n double total = tot_pasivo + tot_patrimonio + utilidad_perdida;\r\n parametro.put(\"p_tot_activo\", tot_activo);\r\n parametro.put(\"p_total\", total);\r\n parametro.put(\"p_utilidad_perdida\", utilidad_perdida);\r\n parametro.put(\"p_tot_pasivo\", tot_pasivo);\r\n parametro.put(\"p_tot_patrimonio\", (tot_patrimonio));\r\n }\r\n sel_tab_nivel.cerrar();\r\n ReporteDataSource data = new ReporteDataSource(tab_balance);\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n\r\n utilitario.addUpdate(\"sel_rep,sel_tab_nivel\");\r\n }\r\n }\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Balance General\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n fecha_fin = sec_rango_reporte.getFecha2String();\r\n fecha_inicio = con.getFechaInicialPeriodo(fecha_fin);\r\n if (fecha_inicio != null && !fecha_inicio.isEmpty()) {\r\n sec_rango_reporte.cerrar();\r\n sel_tab_nivel.dibujar();\r\n utilitario.addUpdate(\"sec_rango_reporte,sel_tab_nivel\");\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"El rango de fechas seleccionado no se encuentra en ningun Periodo Contable\");\r\n }\r\n\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha final\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicial\");\r\n }\r\n } else if (sel_tab_nivel.isVisible()) {\r\n if (sel_tab_nivel.getValorSeleccionado() != null) {\r\n System.out.println(\"fecha fin \" + fecha_fin);\r\n parametro.put(\"p_activo\", utilitario.getVariable(\"p_con_tipo_cuenta_activo\"));\r\n parametro.put(\"p_pasivo\", utilitario.getVariable(\"p_con_tipo_cuenta_pasivo\"));\r\n parametro.put(\"p_patrimonio\", utilitario.getVariable(\"p_con_tipo_cuenta_patrimonio\"));\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n\r\n }\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin));\r\n TablaGenerica tab_balance = con.generarBalanceGeneral(false, fecha_inicio, fecha_fin, Integer.parseInt(sel_tab_nivel.getValorSeleccionado()));\r\n parametro.put(\"titulo\", \"BALANCE GENERAL\");\r\n if (tab_balance.getTotalFilas() > 0) {\r\n List lis_totales = con.obtenerTotalesBalanceGeneral(false, fecha_inicio, fecha_fin);\r\n double tot_activo = Double.parseDouble(lis_totales.get(0) + \"\");\r\n double tot_pasivo = Double.parseDouble(lis_totales.get(1) + \"\");\r\n double tot_patrimonio = Double.parseDouble(lis_totales.get(2) + \"\");\r\n double utilidad_perdida = tot_activo - tot_pasivo - tot_patrimonio;\r\n double total = tot_pasivo + tot_patrimonio + utilidad_perdida;\r\n parametro.put(\"p_tot_activo\", tot_activo);\r\n parametro.put(\"p_total\", total);\r\n parametro.put(\"p_utilidad_perdida\", utilidad_perdida);\r\n parametro.put(\"p_tot_pasivo\", tot_pasivo);\r\n parametro.put(\"p_tot_patrimonio\", (tot_patrimonio));\r\n }\r\n sel_tab_nivel.cerrar();\r\n ReporteDataSource data = new ReporteDataSource(tab_balance);\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n\r\n utilitario.addUpdate(\"sel_rep,sel_tab_nivel\");\r\n }\r\n }\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Estado de Resultados Consolidado\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n fecha_fin = sec_rango_reporte.getFecha2String();\r\n fecha_inicio = con.getFechaInicialPeriodo(fecha_fin);\r\n if (fecha_inicio != null && !fecha_inicio.isEmpty()) {\r\n sec_rango_reporte.cerrar();\r\n sel_tab_nivel.dibujar();\r\n utilitario.addUpdate(\"sec_rango_reporte,sel_tab_nivel\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha fin\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicio\");\r\n }\r\n } else if (sel_tab_nivel.isVisible()) {\r\n if (sel_tab_nivel.getValorSeleccionado() != null) {\r\n parametro.put(\"p_ingresos\", utilitario.getVariable(\"p_con_tipo_cuenta_ingresos\"));\r\n parametro.put(\"p_gastos\", utilitario.getVariable(\"p_con_tipo_cuenta_gastos\"));\r\n parametro.put(\"p_costos\", utilitario.getVariable(\"p_con_tipo_cuenta_costos\"));\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n }\r\n\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin));\r\n TablaGenerica tab_estado = con.generarEstadoResultados(true, fecha_inicio, fecha_fin, Integer.parseInt(sel_tab_nivel.getValorSeleccionado()));\r\n if (tab_estado.getTotalFilas() > 0) {\r\n List lis_totales = con.obtenerTotalesEstadoResultados(true, fecha_inicio, fecha_fin);\r\n double tot_ingresos = Double.parseDouble(lis_totales.get(0) + \"\");\r\n double tot_gastos = Double.parseDouble(lis_totales.get(1) + \"\");\r\n double tot_costos = Double.parseDouble(lis_totales.get(2) + \"\");\r\n double utilidad_perdida = tot_ingresos - (tot_gastos + tot_costos);\r\n parametro.put(\"p_tot_ingresos\", tot_ingresos);\r\n parametro.put(\"p_tot_gastos\", tot_gastos);\r\n parametro.put(\"p_tot_costos\", tot_costos);\r\n parametro.put(\"p_utilidad\", utilidad_perdida);\r\n }\r\n parametro.put(\"titulo\", \"ESTADO DE RESULTADOS CONSOLIDADO\");\r\n ReporteDataSource data = new ReporteDataSource(tab_estado);\r\n sel_tab_nivel.cerrar();\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sel_tab_nivel\");\r\n }\r\n }\r\n\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Estado de Resultados\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n fecha_fin = sec_rango_reporte.getFecha2String();\r\n fecha_inicio = con.getFechaInicialPeriodo(fecha_fin);\r\n if (fecha_inicio != null && !fecha_inicio.isEmpty()) {\r\n sec_rango_reporte.cerrar();\r\n sel_tab_nivel.dibujar();\r\n utilitario.addUpdate(\"sec_rango_reporte,sel_tab_nivel\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha fin\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicio\");\r\n }\r\n } else if (sel_tab_nivel.isVisible()) {\r\n if (sel_tab_nivel.getValorSeleccionado() != null) {\r\n parametro.put(\"p_ingresos\", utilitario.getVariable(\"p_con_tipo_cuenta_ingresos\"));\r\n parametro.put(\"p_gastos\", utilitario.getVariable(\"p_con_tipo_cuenta_gastos\"));\r\n parametro.put(\"p_costos\", utilitario.getVariable(\"p_con_tipo_cuenta_costos\"));\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n }\r\n\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin));\r\n TablaGenerica tab_estado = con.generarEstadoResultados(false, fecha_inicio, fecha_fin, Integer.parseInt(sel_tab_nivel.getValorSeleccionado()));\r\n if (tab_estado.getTotalFilas() > 0) {\r\n List lis_totales = con.obtenerTotalesEstadoResultados(false, fecha_inicio, fecha_fin);\r\n double tot_ingresos = Double.parseDouble(lis_totales.get(0) + \"\");\r\n double tot_gastos = Double.parseDouble(lis_totales.get(1) + \"\");\r\n double tot_costos = Double.parseDouble(lis_totales.get(2) + \"\");\r\n double utilidad_perdida = tot_ingresos - (tot_gastos + tot_costos);\r\n parametro.put(\"p_tot_ingresos\", tot_ingresos);\r\n parametro.put(\"p_tot_gastos\", tot_gastos);\r\n parametro.put(\"p_tot_costos\", tot_costos);\r\n parametro.put(\"p_utilidad\", utilidad_perdida);\r\n }\r\n ReporteDataSource data = new ReporteDataSource(tab_estado);\r\n parametro.put(\"titulo\", \"ESTADO DE RESULTADOS\");\r\n sel_tab_nivel.cerrar();\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sel_tab_nivel\");\r\n }\r\n }\r\n\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Libro Mayor\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n lis_ide_cndpc_sel.clear();\r\n lis_ide_cndpc_deseleccionados.clear();\r\n int_count_deseleccion = 0;\r\n int_count_seleccion = 0;\r\n sel_tab.getTab_seleccion().setSeleccionados(null);\r\n// utilitario.ejecutarJavaScript(sel_tab.getTab_seleccion().getId() + \".clearFilters();\");\r\n sel_tab.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sel_tab\");\r\n } else {\r\n if (sel_tab.isVisible()) {\r\n\r\n if (sel_tab.getSeleccionados() != null && !sel_tab.getSeleccionados().isEmpty()) {\r\n System.out.println(\"nn \" + sel_tab.getSeleccionados());\r\n parametro.put(\"ide_cndpc\", sel_tab.getSeleccionados());//lista sel \r\n sel_tab.cerrar();\r\n String estado = \"\" + utilitario.getVariable(\"p_con_estado_comprobante_normal\") + \",\" + utilitario.getVariable(\"p_con_estado_comp_inicial\") + \",\" + utilitario.getVariable(\"p_con_estado_comp_final\");\r\n parametro.put(\"ide_cneco\", estado);\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"sel_tab,sec_rango_reporte\");\r\n\r\n } else {\r\n utilitario.agregarMensajeInfo(\"Debe seleccionar al menos una cuenta contable\", \"\");\r\n }\r\n// if (lis_ide_cndpc_deseleccionados.size() == 0) {\r\n// System.out.println(\"sel tab lis \" + sel_tab.getSeleccionados());\r\n// parametro.put(\"ide_cndpc\", sel_tab.getSeleccionados());//lista sel \r\n// } else {\r\n// System.out.println(\"sel tab \" + utilitario.generarComillasLista(lis_ide_cndpc_deseleccionados));\r\n// parametro.put(\"ide_cndpc\", utilitario.generarComillasLista(lis_ide_cndpc_deseleccionados));//lista sel \r\n// }\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.isFechasValidas()) {\r\n parametro.put(\"fecha_inicio\", sec_rango_reporte.getFecha1());\r\n parametro.put(\"fecha_fin\", sec_rango_reporte.getFecha2());\r\n parametro.put(\"ide_cnlap_haber\", p_con_lugar_haber);\r\n parametro.put(\"ide_cnlap_debe\", p_con_lugar_debe);\r\n sec_rango_reporte.cerrar();\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath());\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sec_rango_reporte\");\r\n } else {\r\n utilitario.agregarMensajeInfo(\"Las fechas seleccionadas no son correctas\", \"\");\r\n }\r\n }\r\n }\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Balance de Comprobacion\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n\r\n } else {\r\n if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n String fecha_fin1 = sec_rango_reporte.getFecha2String();\r\n String fecha_inicio1 = sec_rango_reporte.getFecha1String();\r\n System.out.println(\"fecha fin \" + fecha_fin1);\r\n sec_rango_reporte.cerrar();\r\n\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n }\r\n String fechaPeriodoActivo = con.obtenerFechaInicialPeriodoActivo();\r\n// if (fechaPeriodoActivo != null && !fechaPeriodoActivo.isEmpty()) {\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio1));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin1));\r\n TablaGenerica tab_bal = con.generarBalanceComprobacion(fechaPeriodoActivo, fecha_fin1);\r\n double suma_debe = 0;\r\n double suma_haber = 0;\r\n double suma_deudor = 0;\r\n double suma_acreedor = 0;\r\n for (int i = 0; i < tab_bal.getTotalFilas() - 1; i++) {\r\n suma_debe = Double.parseDouble(tab_bal.getValor(i, \"debe\")) + suma_debe;\r\n suma_haber = Double.parseDouble(tab_bal.getValor(i, \"haber\")) + suma_haber;\r\n suma_deudor = Double.parseDouble(tab_bal.getValor(i, \"deudor\")) + suma_deudor;\r\n suma_acreedor = Double.parseDouble(tab_bal.getValor(i, \"acreedor\")) + suma_acreedor;\r\n }\r\n parametro.put(\"tot_debe\", suma_debe);\r\n parametro.put(\"tot_haber\", suma_haber);\r\n parametro.put(\"tot_deudor\", suma_deudor);\r\n parametro.put(\"tot_acreedor\", suma_acreedor);\r\n ReporteDataSource data = new ReporteDataSource(tab_bal);\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sec_rango_reporte\");\r\n }\r\n// }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha fin\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicio\");\r\n }\r\n }\r\n\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Comprobante Contabilidad\")) {\r\n if (rep_reporte.isVisible()) {\r\n if (tab_tabla1.getValor(\"ide_cnccc\") != null) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n parametro.put(\"ide_cnccc\", Long.parseLong(tab_tabla1.getValor(\"ide_cnccc\")));\r\n parametro.put(\"ide_cnlap_haber\", p_con_lugar_haber);\r\n parametro.put(\"ide_cnlap_debe\", p_con_lugar_debe);\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath());\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sel_rep\");\r\n } else {\r\n utilitario.agregarMensajeInfo(\"No se puede generar el reporte\", \"La fila seleccionada no tiene compraqbante de contabilidad\");\r\n }\r\n\r\n }\r\n }\r\n }", "public void setSalesAmount(Integer salesAmount) {\n this.salesAmount = salesAmount;\n }", "@Test()\n\tpublic void groupSales_US440_TC3480() throws InterruptedException,\n\t\t\tRowsExceededException, BiffException, WriteException, IOException, ParseException {\n\t\t/** Variable Section : **/\n\t\tGroupSalesPage groupSalesPage;\n\t\tAbstractTest.tcName=\"groupSales_US440_TC3480\";\n\t\tString password = LoginTestData.level1_SSO_Password;\n\t\tString userId = LoginTestData.level1_SSO_UserId;\n\t\tString storeId = LoginTestData.level1StoreId;\n\t\tString orgName = \"TestAutomation\"+ String.valueOf(Base.generateNdigitRandomNumber(3));\n\t\tString taxId = String.valueOf(Base.generateNdigitRandomNumber(5));\n\t\tString contactName = \"TestUser\"+ String.valueOf(Base.generateNdigitRandomNumber(3));\n\t\tString addressLine1 = \"HclTechnologies\" +String.valueOf(Base.generateNdigitRandomNumber(3));\n\t\tString addressLine2 = \"HclTechnologies\"+ String.valueOf(Base.generateNdigitRandomNumber(3));\n\t\tString city = \"Noida\"+String.valueOf(Base.generateNdigitRandomNumber(3));\n\t\tString zip = String.valueOf(Base.generateNdigitRandomNumber(5));\n\t\tString email = \"[email protected]\";\n\t\tString phoneNumber = String.valueOf(Base.generateNdigitRandomNumber(10));\n\t\tString state = \"AK\";\n\t\t/***********************************/\n\t\tHomePage homePage = PageFactory.initElements(driver, HomePage.class);\n\t\t// Navigate to Group sales page\n\t\tgroupSalesPage = homePage.selectUserWithSSOLogin(userId, password).selectLocation(storeId)\n\t\t\t\t.goToGroupSalesPage();\n\t\t//Click on edit button for first validated record\n\t\tGenericMethods.clickOnElement(groupSalesPage.TextExemptSales_ValidatedRecord_Edit_BT, \"Validated Record Edit Button\");\n\t\twait.until(ExpectedConditions.visibilityOf(groupSalesPage.EditTaxExemptSales_PopUp_Header));\n\t\t//Edit all editable values in pop up and submit\n\t\tgroupSalesPage.editTaxExemptSalesRecord(orgName, taxId, contactName, addressLine1, addressLine2, city,state, zip, email, phoneNumber);\n\t\t//Verify that new Organozation name and Tax id is displayed in Tax exempt sales landing page\n\t\tif (groupSalesPage.verifyTaxExemptSalesDetailsUpdated(orgName, taxId)) {\n\t\t\tReporter.reportPassResult(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"user should be able to edit and save values for manual entry fields in Tax Exempt Sales Page\",\n\t\t\t\t\t\"Pass\");\n\t\t\t\n\t\t} else {\n\t\t\tReporter.reportTestFailure(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"user should be able to edit and save values for manual entry fields in Tax Exempt Sales Page\",\n\t\t\t\t\t\"Fail\");\n\t\t\tAbstractTest.takeSnapShot();\n\t\t}\n\t\t//Click on edit button for first validated record\n\t\tGenericMethods.clickOnElement(groupSalesPage.TextExemptSales_ValidatedRecord_Edit_BT, \"Validated Record Edit Button\");\n\t\twait.until(ExpectedConditions.visibilityOf(groupSalesPage.EditTaxExemptSales_PopUp_Header));\n\t\tSelect select = new Select(groupSalesPage.EditTaxExemptSalesPopUp_State_DD);\n\t\t//Verify that all values are updated\n\t\tif(groupSalesPage.EditTaxExemptSalesPopUp_OrganizationName_TB.getAttribute(\"value\").equals(orgName)\n\t\t\t&& groupSalesPage.EditTaxExemptSalesPopUp_TaxId_TB.getAttribute(\"value\").equals(taxId)\n\t\t\t&& groupSalesPage.EditTaxExemptSalesPopUp_ContactName_TB.getAttribute(\"value\").equals(contactName)\n\t\t\t&& groupSalesPage.EditTaxExemptSalesPopUp_AddressLine1_TB.getAttribute(\"value\").equals(addressLine1)\n\t\t\t&& groupSalesPage.EditTaxExemptSalesPopUp_AddressLine2_TB.getAttribute(\"value\").equals(addressLine2)\n\t\t\t&& groupSalesPage.EditTaxExemptSalesPopUp_City_TB.getAttribute(\"value\").equals(city)\n\t\t\t&& groupSalesPage.EditTaxExemptSalesPopUp_Email_TB.getAttribute(\"value\").equals(email)\n\t\t\t&& groupSalesPage.EditTaxExemptSalesPopUp_Zip_TB.getAttribute(\"value\").equals(zip)\n\t\t\t&& groupSalesPage.EditTaxExemptSalesPopUp_PhoneNumber_TB.getAttribute(\"value\").replaceAll(\"[^a-zA-Z0-9]\", \"\").equals(phoneNumber)\n\t\t\t&& select.getFirstSelectedOption().getAttribute(\"value\").equals(state)){\n\t\t\tReporter.reportPassResult(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"user should be able to view updated values in edit Tax Exempt Sales Pop Up\",\n\t\t\t\t\t\"Pass\");\n\t\t\t\n\t\t} else {\n\t\t\tReporter.reportTestFailure(\n\t\t\t\t\tbrowser,\n\t\t\t\t\t\"user should be able to view updated values in edit Tax Exempt Sales Pop Up\",\n\t\t\t\t\t\"Fail\");\n\t\t\tAbstractTest.takeSnapShot();\n\t\t\t}\n\t\t//Click on Submit Button\n\t\tGenericMethods.clickOnElement(groupSalesPage.EditTaxExemptSalesPopUp_Submit_BT, \"EditTaxExemptSalesPopUp_Submit_BT\");\n\t\twait.until(ExpectedConditions.visibilityOf(groupSalesPage.TaxExemptSales_SalesSaved_Confirmation_MSG));\n\t}", "private Sale adjustSale(AdjustmentToSale adjSale, Sale sale) {\n float newVal = 0f;\n switch (adjSale.getOper()) {\n case SUM:\n newVal = sale.getValue() + adjSale.getValue();\n break;\n case MULTIPLY:\n newVal = sale.getValue() * adjSale.getValue();\n break;\n case SUBTRACT:\n newVal = sale.getValue() - adjSale.getValue();\n if (newVal < 0)\n newVal = 0.0f;\n break;\n default:\n newVal = sale.getValue();\n break;\n }\n return new Sale(sale.getProductType(), newVal);\n }", "@RequestMapping(value = \"/kartica\", method = RequestMethod.GET)\n public String printMyReport(HttpSession session, ModelMap modelMap) throws Exception {\n try {\n SimpleDateFormat sdf=new SimpleDateFormat(\"yyyy-MM-dd\");\n String datumDo=sdf.format(new Date());\n //Put the dataSource object against the key as mentioned in jasperCfg.properties\n User user = (User) session.getAttribute(\"loginUser\");\n log.info(\"datumDo=\" + datumDo + \" partner=\" + user.getWoUser().getOcpPoslovniPartner().getPoslovniPartner());\n modelMap.put(\"dataSource\", dataSource);\n log.info(\"set dataSource\");\n //Add the type of report that needs to be generated. Right now it is hard coded\n //to pdf. But this can be easily fetched as a parameter from the request.\n modelMap.addAttribute(\"partner\", user.getWoUser().getOcpPoslovniPartner().getPoslovniPartner() + \"\");\n modelMap.addAttribute(\"format\", \"pdf\");\n modelMap.addAttribute(\"datumDo\", datumDo);\n modelMap.addAttribute(\"oj\",session.getAttribute(\"oj\"));\n log.info(\"set partner\");\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n\n }\n\n //Return the view key as mentioned in jasperCfg.properties.\n return \"kartica\";\n }", "public void listHomeForSale(String mlsNumber,double price) {\n\t\t\n\t\tthis.isActiveListing = true;\n this.mlsNumber = mlsNumber;\t\t\n\t\tthis.price = price;\n\t\t\n\t}", "public void updateInventory(SaleDTO sale) {\n\t\tfor (ItemListDTO itemS : sale.getItems()) {\n\t\t\tfor (ItemData item : items) {\n\t\t\t\tif (itemS.getIdItem() == item.idItem) {\n\t\t\t\t\titem.quantitySold = itemS.getQuantity()+item.quantitySold;\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "@RequestMapping(value = \"/getpdfReport\", method = RequestMethod.GET)\n public ModelAndView doSalesReportPDF(HttpServletRequest request,\n \t\tHttpServletResponse response) \n\t\t {\n\t\t//logger.debug(\"Received request to download PDF report\");\n\t\t\n\t\t// Retrieve our data from a mock data provider\n\t\tMockDataFactory dataprovider = new MockDataFactory();\n\t\t\n\t\t// Assign the datasource to an instance of JRDataSource\n\t\t// JRDataSource is the datasource that Jasper understands\n\t\t// This is basically a wrapper to Java's collection classes\n\t\tJRDataSource categoryData = dataprovider.getCategoriesData();\n\n\t\t// parameterMap is the Model of our application\n\t\tMap<String,Object> parameterMap = new HashMap<String,Object>();\n\t\t\n\t\t// must have the empty data source!!!\n\t\tJREmptyDataSource emptyData = new JREmptyDataSource();\n\t\t\n\t\t//parameterMap.put(\"userList\", emptyData);\n\t\tList list = new ArrayList();\n\t\tCountry country = new Country();\n\t\tcountry.setName(\"tjw\");\n\t\tlist.add(country);\n\t\tcountry = new Country();\n\t\tcountry.setName(\"gkrong\");\n\t\tlist.add(country);\n\t\t//country.setLastUpdate(new Date());\n\t\t\n\t\tString uri = request.getRequestURI();\n\t\tString format = uri.substring(uri.lastIndexOf(\".\") + 1);\t\n\t\tparameterMap.put(\"datasource\", list);\n\t\tparameterMap.put(\"format\", format);\t\n\t\t//parameterMap.put(\"categoryData\", categoryData);\n\t\tparameterMap.put(\"Country\", country);\n\t\treturn new ModelAndView(\"simpleReport\", parameterMap);\t\t\n\t}", "private void GetDetailAnalysisText() {\n\t\tMap<Integer, ArrayList<ReportPluDayComboModifier>> combMap = getCombItemMap(this.comb);\n\n\t\tComparatorPluDayItem comparatorPluDayItem = new ComparatorPluDayItem();\n\t\tCollections.sort(reportPluDayItems, comparatorPluDayItem);\n//\t\tList<ReportPluDayItem> cop = new ArrayList<ReportPluDayItem>();\n\t\tint allQty = 0;\n\t\tBigDecimal allAmount = BH.getBD(ParamConst.DOUBLE_ZERO);\n//\t\t\tboolean showMainCategory = true;\n//\t\t\tint mainCategoryId = 0;\n\t\tboolean lastLinePrinted = false;\n//\t\tBigDecimal categoryAmount = BH.getBD(ParamConst.DOUBLE_ZERO);\n//\t\tString name = \"\";\n//\t\tint id = 0;\n\t\tMap<Integer, ReportPluDayItem> map = new HashMap<Integer, ReportPluDayItem>();\n\t\tfor (int j = 0; j < reportPluDayItems.size(); j++) {\n\n\t\t\tReportPluDayItem reportPluDayItem = reportPluDayItems.get(j);\n\t\t\t//ObjectFactory.getInstance().getReportPluDayItem(reportPluDayItem);\n\t\t\tif(map.containsKey(reportPluDayItem.getItemMainCategoryId().intValue())){\n\t\t\t\tReportPluDayItem amountReportPluDayItem = map.get(reportPluDayItem.getItemMainCategoryId().intValue());\n\t\t\t\tBigDecimal amount = BH.add(BH.getBD(amountReportPluDayItem.getItemAmount()), BH.getBD(reportPluDayItem.getItemAmount()), false);\n\t\t\t\tamountReportPluDayItem.setItemAmount(amount.toString());\n\t\t\t}else{\n\t\t\t\tReportPluDayItem rr = new ReportPluDayItem();\n\t\t\t\trr.setItemMainCategoryId(reportPluDayItem.getItemMainCategoryId());\n\t\t\t\trr.setItemMainCategoryName(reportPluDayItem.getItemMainCategoryName());\n\t\t\t\trr.setItemAmount(BH.formatMoney(reportPluDayItem.getItemAmount()));\n\t\t\t\tmap.put(reportPluDayItem.getItemMainCategoryId().intValue(), rr);\n\t\t\t}\n//\t\t\t\tif(mainCategoryId == 0 || mainCategoryId == reportPluDayItem.getItemMainCategoryId().intValue()){\n//\t\t\t\t\tcategoryAmount = BH.add(categoryAmount,\n//\t\t\t\t\t\t\tBH.getBD(reportPluDayItem.getItemAmount()), true);\n//\t\t\t\t\tname = reportPluDayItem.getItemMainCategoryName();\n//\t\t\t\t\tid = reportPluDayItem.getItemMainCategoryId().intValue();\n//\n//\t\t\t\t\tif(mainCategoryId == 0)\n//\t\t\t\t\t\tmainCategoryId = id;\n//\n//\t\t\t\t\tif( j == reportPluDayItems.size() - 1){\n//\t\t\t\t\t\tReportPluDayItem rr = new ReportPluDayItem();\n//\t\t\t\t\t\trr.setItemMainCategoryId(id);\n//\t\t\t\t\t\trr.setItemMainCategoryName(name);\n//\t\t\t\t\t\trr.setItemAmount(categoryAmount.toString());\n//\t\t\t\t\t\tcop.add(rr);\n//\t\t\t\t\t}\n//\t\t\t\t}else{\n//\t\t\t\t\tReportPluDayItem rr = new ReportPluDayItem();\n//\t\t\t\t\trr.setItemMainCategoryId(id);\n//\t\t\t\t\trr.setItemMainCategoryName(name);\n//\t\t\t\t\trr.setItemAmount(categoryAmount.toString());\n//\t\t\t\t\tcop.add(rr);\n//\t\t\t\t\tname = reportPluDayItem.getItemMainCategoryName();\n//\t\t\t\t\tid = reportPluDayItem.getItemMainCategoryId().intValue();\n//\t\t\t\t\tmainCategoryId = id;\n//\t\t\t\t\tcategoryAmount = BH.getBD(ParamConst.DOUBLE_ZERO);\n//\t\t\t\t\tcategoryAmount = BH.add(categoryAmount,\n//\t\t\t\t\t\t\tBH.getBD(reportPluDayItem.getItemAmount()), true);\n//\n//\t\t\t\t}\n\t\t}\n\n\t\tIterator<Map.Entry<Integer, ReportPluDayItem>> entries = map.entrySet().iterator();\n\t\tboolean isFirst = true;\n\t\twhile (entries.hasNext()){\n\t\t\tMap.Entry<Integer, ReportPluDayItem> entry = entries.next();\n\t\t\tif(!isFirst){\n\t\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\t}\n\t\t\tisFirst = false;\n\t\t\tReportPluDayItem amontReportPluDayItem = entry.getValue();\n\t\t\tthis.AddItem(amontReportPluDayItem.getItemMainCategoryName(), \"\", \"\", BH.formatMoney(amontReportPluDayItem.getItemAmount()).toString(), 1);\n\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\tfor (int j = 0; j < reportPluDayItems.size(); j++) {\n\n\t\t\t\tReportPluDayItem reportPluDayItem = reportPluDayItems.get(j);\n\t\t\t\tif (amontReportPluDayItem.getItemMainCategoryId().intValue() == reportPluDayItem.getItemMainCategoryId().intValue()) {\n\t\t\t\t\t// Print comb modifier\n\t\t\t\t\tint itmId = reportPluDayItem.getItemDetailId().intValue();\n\t\t\t\t\tArrayList<ReportPluDayComboModifier> comItems = combMap.get(itmId);\n\t\t\t\t\tif (comItems != null && comItems.size() > 0) {\n\n\t\t\t\t\t\tint mm = 0;\n\t\t\t\t\t\tthis.AddItem(\" \"+reportPluDayItem.getItemName(), BH.formatMoney(reportPluDayItem.getItemPrice()),\n\t\t\t\t\t\t\t\treportPluDayItem.getItemCount().toString(),\n\t\t\t\t\t\t\t\tBH.formatThree(reportPluDayItem.getItemAmount()), 1);\n\t\t\t\t\t\tlastLinePrinted = false;\n\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\t\t\t\tfor (mm = 0; mm < comItems.size(); mm++) {\n\t\t\t\t\t\t\tReportPluDayComboModifier pluModifier = comItems.get(mm);\n\t\t\t\t\t\t\tint count = pluModifier.getModifierCount().intValue() - pluModifier.getVoidModifierCount().intValue() - pluModifier.getBillVoidCount().intValue();\n\t\t\t\t\t\t\tif (count > 0) {\n\t\t\t\t\t\t\t\tBigDecimal modifierAmount = BH.mul(BH.getBD(1.00), BH.getBD(pluModifier.getModifierPrice()), true);\n\t\t\t\t\t\t\t\tBigDecimal modifierPrice = BH.mul(BH.getBD(1.00), BH.getBD(pluModifier.getModifierItemPrice()), true);\n\t\t\t\t\t\t\t\tthis.AddItem(\" (\" + pluModifier.getModifierName() + \")\",\n\t\t\t\t\t\t\t\t\t\t\"(\" + BH.formatThree(modifierPrice.toString()) + \")\", \"(\" + String.valueOf(count) + \")\", \"(\" + BH.formatThree(modifierAmount.toString())+ \")\", 1);\n\t\t\t\t\t\t\t\tlastLinePrinted = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mm == comItems.size() && mm > 0) {\n\t\t\t\t\t\t\tif (!lastLinePrinted)\n\t\t\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\t\t\t\t\tlastLinePrinted = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tthis.AddItem(\" \"+reportPluDayItem.getItemName(), BH.formatMoney(reportPluDayItem.getItemPrice()),\n\t\t\t\t\t\t\t\treportPluDayItem.getItemCount().toString(), \"\" + BH.formatMoney(reportPluDayItem.getItemAmount()), 1);\n\t\t\t\t\t\tlastLinePrinted = false;\n\t\t\t\t\t}\n\t\t\t\t\t//END Comb modifier print\n\t\t\t\t\tallQty += reportPluDayItem.getItemCount();\n\t\t\t\t\tallAmount = BH.add(allAmount,\n\t\t\t\t\t\t\tBH.getBD(reportPluDayItem.getItemAmount()), true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n//\t\tfor(ReportPluDayItem category : cop) {\n//\t\t\t\tif(cop.indexOf(category) != 0){\n//\t\t\t\t\tthis.addHortionalLine(this.charSize);\n//\t\t\t\t}\n//\t\t\t\tthis.AddItem(category.getItemMainCategoryName(), \"\", \"\", category.getItemAmount(), 1);\n//\t\t\t\tthis.addHortionalLine(this.charSize);\n//\t\t\t\tfor (int j = 0; j < reportPluDayItems.size(); j++) {\n//\n//\t\t\t\t\tReportPluDayItem reportPluDayItem = reportPluDayItems.get(j);\n////\t\t\t\t\tif (mainCategoryId != reportPluDayItem.getItemMainCategoryId().intValue()) {\n////\t\t\t\t\t\tif (mainCategoryId != 0) {\n////\t\t\t\t\t\t\tif (!lastLinePrinted)\n////\t\t\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n////\t\t\t\t\t\t\tlastLinePrinted = true;\n////\t\t\t\t\t\t}\n////\t\t\t\t\t\tmainCategoryId = reportPluDayItem.getItemMainCategoryId().intValue();\n////\t\t\t\t\t\tshowMainCategory = true;\n////\t\t\t\t\t}\n////\t\t\t\t\tif (showMainCategory) {\n////\t\t\t\t\t\tthis.AddItem(reportPluDayItem.getItemMainCategoryName(), \"\", \"\", \"\", 1);\n////\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n////\t\t\t\t\t\tshowMainCategory = false;\n////\t\t\t\t\t\tlastLinePrinted = true;\n////\t\t\t\t\t}\n//\t\t\t\t\tif (category.getItemMainCategoryId().intValue() == reportPluDayItem.getItemMainCategoryId().intValue()) {\n//\t\t\t\t\t\t//Bob: Print comb modifier\n//\t\t\t\t\t\tint itmId = reportPluDayItem.getItemDetailId().intValue();\n//\t\t\t\t\t\tArrayList<ReportPluDayComboModifier> comItems = combMap.get(itmId);\n//\t\t\t\t\t\tif (comItems != null && comItems.size() > 0) {\n//\n//\t\t\t\t\t\t\tint mm = 0;\n//\t\t\t\t\t\t\tthis.AddItem(\" \"+reportPluDayItem.getItemName(), reportPluDayItem.getItemPrice(),\n//\t\t\t\t\t\t\t\t\treportPluDayItem.getItemCount().toString(),\n//\t\t\t\t\t\t\t\t\treportPluDayItem.getItemAmount(), 1);\n//\t\t\t\t\t\t\tlastLinePrinted = false;\n//\t\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n//\t\t\t\t\t\t\tfor (mm = 0; mm < comItems.size(); mm++) {\n//\t\t\t\t\t\t\t\tReportPluDayComboModifier pluModifier = comItems.get(mm);\n//\t\t\t\t\t\t\t\tint count = pluModifier.getModifierCount().intValue() - pluModifier.getVoidModifierCount().intValue() - pluModifier.getBillVoidCount().intValue();\n//\t\t\t\t\t\t\t\tif (count > 0) {\n//\t\t\t\t\t\t\t\t\tBigDecimal modifierAmount = BH.mul(BH.getBD(1.00), BH.getBD(pluModifier.getModifierPrice()), true);\n//\t\t\t\t\t\t\t\t\tBigDecimal modifierPrice = BH.mul(BH.getBD(1.00), BH.getBD(pluModifier.getModifierItemPrice()), true);\n//\t\t\t\t\t\t\t\t\tthis.AddItem(\" (\" + pluModifier.getModifierName() + \")\",\n//\t\t\t\t\t\t\t\t\t\t\t\"(\" + modifierPrice.toString() + \")\", \"(\" + String.valueOf(count) + \")\", \"(\" + modifierAmount.toString() + \")\", 1);\n//\t\t\t\t\t\t\t\t\tlastLinePrinted = false;\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\tif (mm == comItems.size() && mm > 0) {\n//\t\t\t\t\t\t\t\tif (!lastLinePrinted)\n//\t\t\t\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n//\t\t\t\t\t\t\t\tlastLinePrinted = true;\n//\t\t\t\t\t\t\t}\n//\n//\t\t\t\t\t\t} else {\n//\n//\t\t\t\t\t\t\tthis.AddItem(\" \"+reportPluDayItem.getItemName(), reportPluDayItem.getItemPrice(),\n//\t\t\t\t\t\t\t\t\treportPluDayItem.getItemCount().toString(), \"\" + reportPluDayItem.getItemAmount(), 1);\n//\t\t\t\t\t\t\tlastLinePrinted = false;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t//END Comb modifier print\n//\t\t\t\t\t\tallQty += reportPluDayItem.getItemCount();\n//\t\t\t\t\t\tallAmount = BH.add(allAmount,\n//\t\t\t\t\t\t\t\tBH.getBD(reportPluDayItem.getItemAmount()), true);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t}\n\t\tif (allQty != 0) {\n\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\tthis.AddItem(PrintService.instance.getResources().getString(R.string.total), \"\", allQty + \"\", BH.formatMoney(allAmount.toString()), 1);\n\t\t}\n\n\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic boolean makeNewSale() throws PreconditionException {\n\t\t/* check precondition */\n\t\tif (true) \n\t\t{ \n\t\t\t/* Logic here */\n\t\t\t//return primitive type\t\n\t\t\tSale s = null;\n\t\t\ts = (Sale) EntityManager.createObject(\"Sale\");\n\t\t\ts.setBelongedCashDesk(currentCashDesk);\n\t\t\tcurrentCashDesk.addContainedSales(s);\n\t\t\ts.setIsComplete(false);\n\t\t\ts.setIsReadytoPay(false);\n\t\t\tthis.setCurrentSale(s);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new PreconditionException();\t\t\t\t\n\t\t}\n\t\t//all relevant vars : s this\n\t\t//all relevant entities : Sale \n\t}", "public SaleVO SFindByID(String id) {\n\t\treturn sale.find(id);\r\n\t}", "private void btnPrintPaymentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPrintPaymentActionPerformed\n if(searched == false){\n JOptionPane.showMessageDialog(rootPane, \"Please Perform a search on database first.\");\n return;\n }\n try {\n String report = \"IReports\\\\PaymentReport.jrxml\";\n JasperReport jReport = JasperCompileManager.compileReport(report);\n JasperPrint jPrint = JasperFillManager.fillReport(jReport, null, newHandler.getConnector());\n JasperViewer.viewReport(jPrint, false);\n } catch (JRException ex) {\n JOptionPane.showMessageDialog(rootPane, ex.getMessage());\n } \n }", "@Override\r\n\tpublic SalesByDto querySalesBy(String OFFER_ID) {\n\t\tSalesByDto sales = new SalesByDto();\r\n\t\t\r\n\t\tMap<String, Object> map =new HashMap<String, Object>();\r\n\t\tmap.put(\"OFFER_ID\", OFFER_ID);\r\n\t\tList<SalesProDto> querySalesByID = salesMapper.querySalesByID(map);\r\n\t\tList<SalesProDto> querySalesPro = new ArrayList<SalesProDto>();\r\n\t\tfor (SalesProDto salesProDto : querySalesByID) {\r\n\t\t\t List<SalesProDto> querySalesByProID = salesMapper.querySalesByProID(salesProDto);\r\n\t\t\t if(querySalesByProID!=null){\r\n\t\t\t querySalesPro.addAll(querySalesByProID);}\r\n\t\t}\r\n\t\tquerySalesByID.addAll(querySalesPro);\r\n\t\tsales.setOFFER_ID(Integer.parseInt(OFFER_ID));\r\n\t\tsales.setProductList(querySalesByID);\r\n\t\treturn sales;\r\n\t}", "public void setSalesLog(List<Sale> salesLogToSet) {\n salesLog = salesLogToSet;\n }", "@Test\n public void testOrderFactoryMonthSales2() {\n OrderController orderController = orderFactory.getOrderController();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n // add a menu item to the menu\n menuFactory.getMenu().addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n\n // order 3 of the menu item\n HashMap<MenuItem, Integer> orderItems = new HashMap<>();\n HashMap<SetItem, Integer> setOrderItems = new HashMap<>();\n orderItems.put(menuFactory.getMenu().getMenuItem(1), 3);\n\n // create 2 of this order\n orderController.addOrder(STAFF_NAME, 1, true, orderItems, setOrderItems);\n orderController.addOrder(STAFF_NAME, 2, false, orderItems, setOrderItems);\n\n // create order invoices\n orderController.addOrderInvoice(orderController.getOrder(1));\n orderController.addOrderInvoice(orderController.getOrder(2));\n\n Calendar date = orderController.getOrderInvoice(1).getDate(); // lazy manually type\n int day = date.get(Calendar.DAY_OF_MONTH);\n int month = date.get(Calendar.MONTH);\n int year = date.get(Calendar.YEAR);\n\n // run the month sales report\n // total revenue should be 3 * MENU_PRICE * 1.8, and the service charge should be 0.1 * 3 * MENU_PRICE * 0.8 + 0.1 * 3 * MENU_PRICE\n assertEquals((double)((3 * MENU_PRICE * 1.8) + (3 * MENU_PRICE * 0.1 * 0.8) + (3 * MENU_PRICE * 0.1)), orderController.viewMonthSalesReport(month, year));\n }", "@Test\n public void testOrderFactoryMonthSales() {\n OrderController orderController = orderFactory.getOrderController();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n // add a menu item to the menu\n menuFactory.getMenu().addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n\n // order 3 of the menu item\n HashMap<MenuItem, Integer> orderItems = new HashMap<>();\n HashMap<SetItem, Integer> setOrderItems = new HashMap<>();\n orderItems.put(menuFactory.getMenu().getMenuItem(1), 3);\n\n // create 2 of this order\n orderController.addOrder(STAFF_NAME, 1, false, orderItems, setOrderItems);\n orderController.addOrder(STAFF_NAME, 2, false, orderItems, setOrderItems);\n\n // create order invoices\n orderController.addOrderInvoice(orderController.getOrder(1));\n orderController.addOrderInvoice(orderController.getOrder(2));\n\n Calendar date = orderController.getOrderInvoice(1).getDate(); // lazy manually type\n int day = date.get(Calendar.DAY_OF_MONTH);\n int month = date.get(Calendar.MONTH);\n int year = date.get(Calendar.YEAR);\n\n // run the month sales report\n // total revenue should be 3 * MENU_PRICE * 2, and the service charge should be 0.1 * 3 * MENU_PRICE * 2\n assertEquals((double)(3 * MENU_PRICE * 2 + 3 * 2 * MENU_PRICE * 0.1), orderController.viewMonthSalesReport(month, year));\n }", "public SalesView() {\n initComponents();\n salesDetailTable.setAutoCreateColumnsFromModel(false);\n jdcTransaksi.setDate(new Date());\n enableForm(false);\n buttonConfig();\n salesDetailTable.getTableHeader().setFont(new Font(\"Segoe UI\", 0, 18)); \n }", "public void setSaleAvg(java.math.BigDecimal saleAvg) \n\t{\n\t\tthis.saleAvg = saleAvg;\n\t}", "@Test(dataProvider = \"getData\")\n\tpublic void SaleforceTest5(String Username, String Pass) throws IOException, InterruptedException {\n\t\tdriver.get(prop.getProperty(\"url\"));\n\n\t\t// Fill textboxes with correct credentials\n\t\tLoginPage lp = new LoginPage(driver);\n\t\tlp.getUsername().sendKeys(Username);\n\t\tlp.getPassword().sendKeys(Pass);\n\n\t\t// Clicks Login -- search for 'Services' and click it\n\t\tTabsPage tp = lp.getLogin();\n\n\t\ttp.getWaffle().click();\n\t\ttp.getServices().click();\n\t\t\n\t\tList<WebElement> tabs = tp.getFirstTab();\n\t\tfor (int x = 0; x < tabs.size(); x++) {\n\t\t\tif (tabs.get(x).getText().contains(\"Cuentas\")) {\n\t\t\t\ttabs.get(x).click();\n\t\t\t\tThread.sleep(3000L);\n\t\t\t}\n\t\t}\n\t\t\n\t\tEditRecordPage erp = new EditRecordPage(driver);\n\t\t\n\t\terp.getRecord().click();\n\t\t\n\t\tThread.sleep(3000L);\n\t\t\n\t\tWebDriverWait w = new WebDriverWait(driver,2);\n\t\t\n\t\terp.getMas().click();\n\t\t\n\t\tif(w.until(ExpectedConditions.elementToBeClickable(erp.getEdit()))!=null) \n\t\t{\n\t\t\terp.getEdit().click();\n\t\t}\n\t\t\n\t\tFillPage afp = new FillPage(driver);\n\t\t\n\t\tw.until(ExpectedConditions.elementToBeClickable(afp.getSubmit()));\n\t\t\n\t\tList<WebElement> le = afp.getEdits();\n\t\t\n\t\tList<WebElement> lf = afp.getFills();\n\t\t\n\t\tList<String> stringsPrevios = new ArrayList<String>();\n\t\t\n\t\tList<String> stringsNuevos = new ArrayList<String>();\n\t\t\n\t\tfor(int x = 0; x<le.size(); x++)\n\t\t{\n\t\t\tif(le.get(x).getText().equals(\"Valoración\") || le.get(x).getText().equals(\"Tipo\") || le.get(x).getText().equals(\"Upsell Opportunity\"))\n\t\t\t{\n\t\t\t\tfor(int y = 0; y<lf.size(); y++)\n\t\t\t\t{\n\t\t\t\t\tif(le.get(x).getAttribute(\"for\").equals(lf.get(y).getAttribute(\"id\")))\n\t\t\t\t\t{\n\t\t\t\t\t\tString s = lf.get(y).getAttribute(\"id\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tpointElement(lf.get(y));\n\t\t\t\t\t\t\n\t\t\t\t\t\tJavascriptExecutor js = (JavascriptExecutor) driver;\n\t\t\t\t js.executeScript(\"arguments[0].scrollIntoView();\", lf.get(y));\n\t\t\t\t\t\tlf.get(y).click();\n\t\t\t\t\t\t\n\t\t\t\t\t\tstringsPrevios.add(driver.findElement(By.xpath(\"//input[@id='\" + s + \"']/parent::div/following-sibling::div[1]/lightning-base-combobox-item[@aria-checked='true']\")).getText());\n\t\t\t\t\t\t\n\t\t\t\t\t\tWebElement we = driver.findElement(By.xpath(\"//input[@id='\" + s + \"']/parent::div/following-sibling::\"\n\t\t\t\t\t\t\t\t+ \"div[1]/lightning-base-combobox-item[3]\"));\n\t\t\t\t\t\t\n\t\t\t\t\t\tstringsNuevos.add(we.getText());\n\t\t\t\t\t\t\n\t\t\t\t\t\twe.click();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int x = 0; x<stringsNuevos.size(); x++)\n\t\t{\n\t\t\tAssert.assertNotEquals(stringsNuevos.get(x),stringsPrevios.get(x));\n\t\t}\n\t\t\n\t\tFillPage fp = new FillPage(driver);\n\t\tfp.getSubmit().click();\n\t}", "public static String sale(StoreProduct product) {\n\t\tdouble total;\n\t\tdouble subtotal;\n\t\tdouble tax;\n\t\t\n\t\tif(product.productAvailability()) {\n\t\t\t// calculate the total\n\t\t\tsubtotal = product.getPrice();\n\t\t\ttax = product.getPrice() * TAX;\n\t\t\ttotal = subtotal + tax;\n\t\t\t\n\t\t\t// return the subtotal, tax, and total cost to the user\n\t\t\treturn \"Subtotal: $\" + subtotal + \"\\nTax: $\" + tax + \"\\nTotal: $\" + total;\n\t\t} else {\n\t\t\treturn \"The product is not available for sale because of the lack of stock. Sorry!\";\n\t\t}\n\t}", "private void CheckToolSale(Shop shop, int toolId, int quantity) {\n if (shop.decreaseToolStock(toolId, quantity)) {\n System.out.println(\"Successfully sold item for: $\" + shop.getToolPrice(toolId)\n * quantity);\n } else if (shop.searchInventory(toolId)) {\n System.out.println(\"Cannot sell more than what is currently in stock.\");\n } else {\n System.out.println(\"Invalid toolId inputted.\");\n }\n }", "public void openOtherRecords()\n {\n Booking recBooking = (Booking)this.getRecord(Booking.BOOKING_FILE);\n Tour recTour = (Tour)((ReferenceField)recBooking.getField(Booking.TOUR_ID)).getReferenceRecord(this);\n super.openOtherRecords();\n }", "@OnClick(R.id.search_estate_ed_date_sale_1)\n public void onClickSaleDate1(View view) {\n mSaleDatePickerDialog1.show();\n }", "public Sale makeSale(Sale sale) throws ProcessingException, FrantishexCriteriaValidationException\n\t{\n\t\tif (getEntityManager().contains(sale)) {\n\t\t\tthrow new IllegalArgumentException(\"do not pass entity managed instance. We always expect a detached one!\");\n\t\t}\n\n\t\t/**\n\t\t * The Reservation only unique key is description\n\t\t */\n\t\tif (null != sale.getDescription() && !sale.getDescription().isEmpty()\n\t\t\t\t&& (null == sale.getId() || 0 == sale.getId()) && sale.getSaleType() == SaleTypeEnum.RESERVATION\n\t\t\t\t&& findByKey(\"description\", sale.getDescription()).size() > 0) {\n\t\t\tthrow new IllegalArgumentException(\"Sale duplicated\");\n\t\t}\n\n\t\t// determine the old client\n\t\tSale oldSale = sale.getId() != null ? findById(sale.getId()) : null;\n\t\tSale detachedOldSale = sale.getId() != null ? mapperUtils.map(findById(sale.getId()), Sale.class) : null;\n\t\tClient oldClien = oldSale != null ? oldSale.getClient() : null;\n\n\t\tsale = saveOrUpdate(sale);\n\n\t\tList<Client> findByKey = clientService.findByKey(\"cardNumber\", sale.getCardNumber());\n\t\tif (findByKey.size() > 0) {\n\t\t\tClient client = findByKey.get(0);\n\t\t\tsale.setClient(client);\n\t\t}\n\n\t\tContext context = new Context(sale, detachedOldSale);\n\t\tif (sale.getSaleType() == SaleTypeEnum.RESERVATION) {\n\t\t\tif (sale.getConfirmed()) {\n\t\t\t\tbonusChain.invoke(context);\n\t\t\t} else {\n\t\t\t\tbonusChainNoPoints.invoke(context);\n\t\t\t}\n\t\t} else {\n\t\t\tbonusChainOnlyPoints.invoke(context);\n\t\t}\n\t\tClient client = sale.getClient();\n\t\trecalculateClientPoints(client);\n\t\tif (oldClien == null || (oldClien != null && client == null) || (oldClien.getId() != client.getId())) {\n\t\t\trecalculateClientPoints(oldClien);\n\t\t}\n\n\t\treturn sale;\n\n\t}", "private void SummaryProfile() {\n //format the date & number\n DateFormat df = DateFormat.getDateInstance( DateFormat.LONG, Locale.ENGLISH );\n NumberFormat nf = NumberFormat.getCurrencyInstance( new Locale(\"id\",\"id\"));\n \n GregorianCalendar gregorian = new GregorianCalendar( );\n \n String[] displayMonths = new DateFormatSymbols().getMonths();\n \n //month and year variable ( month start from 0, so 0 is january, 11 is december )\n int gregorianmonth = gregorian.get(Calendar.MONTH);\n int gregorianyear = gregorian.get(Calendar.YEAR);\n \n \n //the title of the summary\n //ok, we must use temporary variable because of missmatch with db standard date\n int displaygregorianmonth = gregorianmonth;\n int displaygregorianyear = gregorianyear;\n \n //december watchout\n //if the current month is january ( 0 ) then we must display summary for \n //dec ( 11 ) last year ( current year - 1 )\n if(displaygregorianmonth==0) {\n displaygregorianmonth = 11;\n displaygregorianyear = gregorianyear - 1;\n }\n //if the current month is not january, then just minus it with one, current year is \n //same\n else {\n displaygregorianmonth -= 1;\n }\n DateLB.setText(\"Summary of the Company in \" + \n displayMonths[displaygregorianmonth] + \" \" + displaygregorianyear );\n \n //the summary report ( month start from 1 so no need minus anymore )\n SummarySaleLB.setText( \"Total Value of Sale Transaction : \" +\n nf.format( reportdb.TotalSaleValue( gregorianmonth,\n gregorianyear ) ) );\n SummaryPurchaseLB.setText( \"Total Value of Purchase Transaction : \" +\n nf.format( reportdb.TotalPurchaseValue( gregorianmonth,\n gregorianyear ) ) );\n SummarySalesmanCommisionLB.setText( \"Total Value of Salesman Commision Transaction : \" +\n nf.format( reportdb.TotalSalesmanCommisionValue( gregorianmonth,\n gregorianyear ) ) );\n SummarySalaryPaymentLB.setText( \"Total Value of Salary Payment Transaction : \" + \n nf.format( reportdb.TotalSalaryPaymentValue( gregorianmonth,\n gregorianyear ) ) );\n SummaryChargesLB.setText( \"Total Value of Outcome Payment Transaction : \" +\n nf.format( reportdb.TotalOutcomeValue( gregorianmonth,\n gregorianyear ) ) );\n \n }" ]
[ "0.67364615", "0.63056403", "0.6041384", "0.5950595", "0.59186864", "0.59176654", "0.5898841", "0.58386636", "0.5823155", "0.57962525", "0.5791852", "0.57809585", "0.5716045", "0.5707679", "0.56696004", "0.56635016", "0.56526077", "0.5635188", "0.5628064", "0.5591029", "0.553148", "0.55242467", "0.55044246", "0.545048", "0.543326", "0.5425225", "0.54043025", "0.5390604", "0.5385992", "0.53797317", "0.53721297", "0.5363586", "0.533951", "0.5306632", "0.5261375", "0.52167606", "0.52142423", "0.52050775", "0.5185174", "0.51663375", "0.51623946", "0.51563025", "0.5141089", "0.5136337", "0.51113623", "0.5108478", "0.51065135", "0.5103879", "0.5089581", "0.5073032", "0.5059277", "0.50581956", "0.50450444", "0.5037155", "0.5035151", "0.50340486", "0.49957943", "0.4983708", "0.4974851", "0.49716115", "0.49706867", "0.49688354", "0.49678358", "0.49657246", "0.49623695", "0.49622503", "0.49510556", "0.49486917", "0.49479383", "0.49438003", "0.4943318", "0.49362373", "0.4933676", "0.49333298", "0.49311477", "0.49243408", "0.49095583", "0.49021462", "0.4900387", "0.48988286", "0.4892011", "0.4884637", "0.48826158", "0.48819715", "0.48798504", "0.48781404", "0.48718217", "0.48703367", "0.48676425", "0.4840253", "0.4837337", "0.48315597", "0.48303208", "0.48273495", "0.482545", "0.48247245", "0.4817702", "0.48081005", "0.48014945", "0.47996372" ]
0.53555113
32
returned method after the user logout
public void return_logout_success() { MainClientGUI.loggedIn = false; switchScenes("/client/boundry/LoginForm.fxml", "/client/boundry/MainCss.css"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void performLogout(){\n }", "@Override\n\tpublic void onUserNeedLogout() {\n\t\t\n\t}", "@Override\n\tpublic void onUserNeedLogout() {\n\t\t\n\t}", "@Override\r\n\tpublic void logout() {\n\t\t\r\n\t}", "void logoutDone();", "public void logout() {\n \n }", "void logoutSuccessful();", "@Override\n\tpublic void logout() {\n\t}", "void successLogout();", "void onLogout(boolean loggedIn);", "public abstract void logout();", "@Override\r\n\tpublic void userLogout(String login) {\n\r\n\t}", "public void Logout() {\n \t\t\t\n \t\t}", "@Override\n public void Logout() {\n\t \n }", "void logout();", "void logout();", "@Override\r\n\t\t\tpublic void onLogout() {\n\t\t\t\tshowToast(\"onLogout---\");\r\n\t\t\t}", "public void onLogout() {\n ParseUser.logOut();\n\n promptForLogin();\n }", "@Override\r\n\t\t\t\t\t\t\t\tpublic void onLogoutSuccessed() {\n\t\t\t\t\t\t\t\t\tTypeSDKLogger.d(\"onLogoutSuccessed\");\r\n\t\t\t\t\t\t\t\t\tTypeSDKNotify_haima notify = new TypeSDKNotify_haima();\r\n\t\t\t\t\t\t\t\t\tnotify.Logout();\r\n\t\t\t\t\t\t\t\t}", "@Override\n\tpublic void logOutUser() {\n\t\t\n\t}", "default void onLogout(SessionID sessionID) {\n }", "@Override\r\n\t\t\t\t\tpublic void onLogoutSuccessed() {\n\t\t\t\t\t\tTypeSDKLogger.d(\"onLogoutSuccessed\");\r\n\t\t\t\t\t\tTypeSDKNotify_haima notify = new TypeSDKNotify_haima();\r\n\t\t\t\t\t\tnotify.Logout();\r\n\t\t\t\t\t}", "private void logout() {\n Utils.showConfirmationDialogCallBack(MainActivity.this, getString(R.string.logout_sure), this);\n }", "@Override\n\tpublic String logout() {\n\t\treturn null;\n\t}", "public void onOK() {\n\t\t\t\t\t\t\tlogout();\n\t\t\t\t\t\t}", "@Override\n public void logOut() {\n }", "@Override\n\tpublic void logout(user theUser) {\n\t}", "public void logout() {\n\n if (WarehouseHelper.warehouse_reserv_context.getUser().getId() != null) {\n //Save authentication line in HisLogin table\n HisLogin his_login = new HisLogin(\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName()\n + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + WarehouseHelper.warehouse_reserv_context.getUser().getLogin(),\n GlobalVars.APP_HOSTNAME, GlobalMethods.getStrTimeStamp()));\n his_login.setCreateId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n his_login.setWriteId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n\n String str = String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName() + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + PackagingVars.context.getUser().getLogin(), GlobalVars.APP_HOSTNAME,\n GlobalMethods.getStrTimeStamp());\n his_login.setMessage(str);\n\n str = \"\";\n his_login.create(his_login);\n\n //Reset the state\n state = new S001_ReservPalletNumberScan();\n\n this.clearContextSessionVals();\n\n connectedUserName_label.setText(\"\");\n }\n\n }", "public void logout() {\n\n if (WarehouseHelper.warehouse_reserv_context.getUser().getId() != null) {\n //Save authentication line in HisLogin table\n /*\n HisLogin his_login = new HisLogin(\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName()\n + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + WarehouseHelper.warehouse_reserv_context.getUser().getLogin(),\n GlobalVars.APP_HOSTNAME, GlobalMethods.getStrTimeStamp()));\n his_login.setCreateId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n his_login.setWriteId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n \n \n String str = String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName() + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + PackagingVars.context.getUser().getLogin(), GlobalVars.APP_HOSTNAME,\n GlobalMethods.getStrTimeStamp());\n his_login.setMessage(str);\n\n str = \"\";\n his_login.create(his_login);\n */\n //Reset the state\n state = new S001_ReservPalletNumberScan();\n\n this.clearContextSessionVals();\n\n connectedUserName_label.setText(\"\");\n\n this.setVisible(false);\n }\n\n }", "public void doLogout() {\n loggedIn = false;\r\n HttpSession session = (HttpSession) FacesContext.getCurrentInstance()\r\n .getExternalContext().getSession(false);\r\n session.invalidate(); \r\n String pag= \"/login.xhtml\";\r\n redireccionar(pag);\r\n }", "public static void Logout(){\n\t\tloginSystem();\r\n\t\t\r\n\t}", "void logoutRequest() throws Exception;", "@Override\n public void onLogoutClick() {\n session.doLogout();\n addFragment();\n }", "private void logout() {\n LogoutTask mAuthTask = new LogoutTask();\n mAuthTask.execute((Void) null);\n }", "private void doLogout() {\r\n\t\tdoctor.setOnline(0);\r\n\t\t// Set doctor as logged out\r\n\t\tdbAdapter.updateDoctor(doctor);\r\n\t\t// Release objects and notify observers\r\n\t\tloggedIn = false;\r\n\t\tnotifyObservers();\r\n\t\tdoctors = null;\r\n\t\tdoctor = null;\r\n\t}", "public Result logOut() {\n customerService().logout();\n return redirectToReturnUrl();\n }", "@Override\n\tpublic void logout(AuthentifizierungsErgebnisDummy aufrufkontext) {\n\t}", "@Override\r\n\t\t\t\t\t\t\tpublic void callback(Context arg0) {\n\t\t\t\t\t\t\t\tYKPlatform.logout(appContext);\r\n\t\t\t\t\t\t\t\tTypeSDKLogger.d(\"LOGOUT_SUCCESS\");\r\n\t\t\t\t\t\t\t\tTypeSDKNotify_youku notify = new TypeSDKNotify_youku();\r\n\t\t\t\t\t\t\t\tnotify.Logout();\r\n\t\t\t\t\t\t\t}", "private void logoutHandler() {\n AlertDialog.Builder builder = new AlertDialog.Builder(context, android.R.style.Theme_DeviceDefault_Dialog);\n builder.setTitle(\"Logout?\");\n builder.setMessage(\"Are you sure you want to logout?\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n Util.setLoggedInFlag(false);\n\n HPIApp.getAppContext().stopService(new Intent(HPIApp.getAppContext(), StepService.class));\n\n Intent intent = new Intent(HomeActivity.this, SplashActivity.class);\n startActivity(intent);\n HomeActivity.this.finish();\n }\n });\n\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n\n builder.show();\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n //your actions\n Main.Logout();\n }", "@Override\n\tpublic String logout_request() {\n\t\treturn null;\n\t}", "@Override\n\tpublic void logout()\n\t{\n\t\tthis.user = null;\n\t}", "private void logout(){\n showLoadingDialog();\n TwitterController.getInstance().logout(logoutCallback);\n }", "private void logout()\r\n {\r\n LogoutRequest request = new LogoutRequest();\r\n request.setUsername(username);\r\n this.sendRequest(request);\r\n }", "@Override\n public void onCanceled() {\n\n logOutNow();\n\n }", "public void logout() {\n showLoginScreen();\n }", "@Override\n public void doLogout() {\n // Toast.makeText(getApplicationContext(),\"Session Expired\",Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(getApplicationContext(), activity_Login.class);\n startActivity(intent);\n }", "protected void userLoggedOut() {\n\t\tRuvego.userLoggedOut();\n\t\tResultsActivityMenu.userLoggedOut();\n\t\tHistory.newItem(\"homePage\");\n\t}", "@Override\r\n\tpublic boolean checkLogout() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean checkLogout() {\n\t\treturn false;\r\n\t}", "public void logout() {\n javafx.application.Platform.runLater(clientBar::logOut);\n }", "@Override\r\n\tpublic void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication)\r\n\t\t\tthrows IOException, ServletException {\n\t\tHttpSession session = request.getSession();\r\n\t\tif(session!=null){\r\n\t\t\t//HttpSessionBindirListener remove ettigimizi dinleyecek unbound methodu calýscak\r\n\t\t\tsession.removeAttribute(\"user\");\r\n\t\t}\r\n\t\thandle(request, response,authentication);\r\n\t}", "@Override\n public void doLogout() {\n // Toast.makeText(getApplicationContext(),\"Session Expired\",Toast.LENGTH_SHORT).show();\n Intent intent=new Intent(getApplicationContext(), activity_Login.class);\n startActivity(intent);\n }", "@Override\r\n\tpublic void onLogout()\r\n\t{\n\r\n\t\tif (accountListener != null)\r\n\t\t{\r\n\t\t\taccountListener.onMmiHeartbeatLogout();\r\n\t\t}\r\n\t\tAirServices.getInstance().stopSelf();\r\n\t\tLog.e(AirAccountManager.class, \"MMI ======================== onLogout =======================\");\r\n\t}", "@CrossOrigin(origins = AppConstants.CORS)\n\t@RequestMapping(value = {UrlConstants.API_LOGOUT+\"org\"}, method = RequestMethod.POST)\n\tpublic void logOut() {\n\t\t try {\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"efregt\");\n\t\t}\n\t}", "@SuppressLint(\"StaticFieldLeak\")\n public void logout(View view) {\n new AsyncTask<Void, Void, Void>() {\n\n @Override\n protected Void doInBackground(Void... voids) {\n AppDataRepo repo = new AppDataRepo(MainActivity.this);\n User user = repo.getSignedUser();\n\n if (user != null) {\n repo.updateLoginStatus(user.getUserID(), false);\n }\n return null;\n }\n\n\n @Override\n protected void onPostExecute(Void aVoid) {\n super.onPostExecute(aVoid);\n finish();\n startActivity(new Intent(MainActivity.this, Login.class));\n\n }\n }.execute();\n }", "@Override\n\tpublic void userLogout(String userId) throws Exception {\n\n\t}", "public void logOutFunction(View view) {\n\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n\n logOutNow();\n\n }", "private void checkToLogout() {\n logout();\n checkToHome();\n drawViewSideMenu();\n }", "public static void handleLogoutGUI()\n\t{\n\t\tOp logOp = new Op(Operations.LOGOUT,userLogin);\n\t\tclient.handleMessageFromClientUI(logOp);\n\t}", "private void doLogout() {\n mRtmClient.logout(null);\n MessageUtil.cleanMessageListBeanList();\n }", "@Override\n\tpublic void logout() {\n\t\tsessionService.setCurrentUserId(null);\n\t}", "public void logOut() {\n try {\n // getGlobalNavigation().clickSignOut();\n } catch (TimeoutException e) {\n Log.log(\"logOut\", \"page loads for more than 30 seconds\", true);\n }\n }", "public void logoutUser() {\n editor.remove(Is_Login).commit();\n editor.remove(Key_Name).commit();\n editor.remove(Key_Email).commit();\n editor.remove(KEY_CUSTOMERGROUP_ID).commit();\n // editor.clear();\n // editor.commit();\n // After logout redirect user to Loing Activity\n\n }", "@Override\n\t@Transactional(propagation = Propagation.REQUIRED)\n\tpublic void logout() {\n\t\t\n\t\tMember member = UserConext.getCurrentMember();\n\t\tmember = this.get(member.getMember_id());\n\t\tThreadContextHolder.getSessionContext().removeAttribute(UserConext.CURRENT_MEMBER_KEY);\n\t\tthis.memberPluginBundle.onLogout(member);\n\t}", "public void logout() {\n loggedIn = \"\";\n FacesContext.getCurrentInstance().getExternalContext()\n .getSessionMap().put(\"loggedIn\", \"\");\n }", "@Override\n public void run() {\n LogoutHelper.logout(context, AppMessage.TOAST_MESSAGE_SESSION_EXPIRED);\n }", "private void signOutUser() {\n mAuth.signOut();\n LoginManager.getInstance().logOut();\n Toast.makeText(ChatMessage.this, \"You have been logout\", Toast.LENGTH_SHORT).show();\n finishAffinity();\n proceed();\n }", "private void logout() {\n\t\tgetUI().get().navigate(\"login\");\r\n\t\tgetUI().get().getSession().close();\r\n\t}", "@Override\r\n public void logoutAdmin() throws Exception {\n \r\n }", "@Override\r\n public void logoutAdmin() throws Exception {\n \r\n }", "@AfterTest\n\t\tpublic void logout(){\n//Calling method to logout from the account and verify logout message.\n//'**********************************************************\n\t\t\tLogOutPage accountLogoutPage =myWishlistPage.logout();\n\t\t\tAssert.assertTrue(accountLogoutPage.getlogoutMsg().equals(\"Account Logout\"), \"Account Logout message is not displayed\");\n\t\t\textentTest.log(LogStatus.PASS,\"Account Logout message is displayed and the user is signed out from the account\");\n//'**********************************************************\n//Close the report\n//'**********************************************************\n\t\t\textentReports.endTest(extentTest);\n\t\t\textentReports.flush();\n\t\t\textentReports.close();\n\t\t}", "public void attemptLogout() {\n spEditor.clear();\n spEditor.putBoolean(LOGGEDIN_KEY, false);\n spEditor.commit();\n }", "public void userLoggedOut(User user) \n\t\t{\n\t\t\tLog.i(\"OpenFeint\", \"User logged out\");\n\t\t\tMainActivity.this.userLoggedOut();\t\n\t\t}", "private void logout() {\n\t\tParseUser.logOut();\n\n\t\t// Go to the login view\n\t\tstartLoginActivity();\n\t}", "public void doLogout() {\n mSingleton.getCookieStore().removeUser(mUser);\n mPreferences.setUser(null);\n new ActivityTable().flush();\n\n //update variables\n mUser = null;\n mLogin = false;\n\n //reset drawer\n restartActivity();\n }", "public void userLoggedOut(User user) \n\t\t{\n\t\t\tLog.i(\"OpenFeint\", \"User logged out\");\n\t\t\tMainActivity.this.userLoggedOut();\n\t\t}", "public void logout() {\n \n FacesContext.getCurrentInstance().getExternalContext().invalidateSession();\n try {\n FacesContext.getCurrentInstance().getExternalContext()\n .redirect(\"/BookStorePelikSangat/faces/admin/loginadmin.xhtml\");\n } \n catch (IOException e) {}\n\t}", "public void logout(){\n\t\t\n\t\tcurrentUser.logout();\n\t\tcurrentUser = null;\n\t\tchangeViewPort(new GUI_Logout(\"\", \"\", this));\n\t}", "public void logout() {\n\t\tthis.setCurrentUser(null);\n\t\tthis.setUserLoggedIn(false);\t\t\n\t}", "private void logout() {\n getSharedPreferences(HELP_CATEGORIES, MODE_PRIVATE).edit().clear().apply();\n getSharedPreferences(LOGIN, MODE_PRIVATE).edit().putBoolean(IS_LOGGED_IN, false).apply();\n\n OkHttpClient client = new OkHttpClient();\n Request request = new Request.Builder()\n .url(URL + \"/nuh/logout\")\n .build();\n AsyncTask.execute(() -> {\n try {\n client.newCall(request).execute();\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n }", "public void onSuccess(Object result) {\n\t\t\t\t\t\tSingleton.getInstance().clearAllData();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinitializeDataWithMessage(\"Anda berhasil logout\");\t\t\n\t\t\t\t\t\tSingleton.getInstance().setIsLogin(false);\n\t\t\t\t\t}", "Boolean signOut();", "void loginDone();", "@Override\r\n\tpublic void ShowLogout(Context _in_context) {\n\t\tTypeSDKLogger.e( \"ShowLogout\");\r\n\t\tthis.haimaLogout();\r\n\t}", "private void logout() {\n ProgressDialog logoutProgressDialog = new ProgressDialog(ContributionsGalleryActivity.this);\n logoutProgressDialog.setMessage(getResources().getString(R.string.logging_out));\n logoutProgressDialog.setCancelable(false);\n logoutProgressDialog.show();\n ParseUser.logOutInBackground(e -> {\n logoutProgressDialog.dismiss();\n if (e != null) { // Logout has failed\n Snackbar.make(contributionsGalleryRelativeLayout, getResources().getString(R.string.logout_failed), Snackbar.LENGTH_LONG).show();\n }\n else { // Logout has succeeded\n goLoginSignupActivity();\n finish();\n }\n });\n }", "public abstract void endUserSession();", "public static void logout() {\n userId = -1;\n aisId = -1;\n \n name = \"\";\n role = \"\";\n roleFromDatabase = \"\";\n \n lastAction = LocalDateTime.now().minusYears(100);\n }", "@Override\r\n\t\t\t\t\t\t\t\tpublic void onLogoutFailed(ErrorInfoBean errorInfo) {\n\t\t\t\t\t\t\t\t\tTypeSDKLogger.e(\"onLogoutFailed:\" + errorInfo.getErrorMessage());\r\n\t\t\t\t\t\t\t\t}", "private String PerformLogout(String token){\n next_online.remove(token);\n current_online.remove(token);\n\n // rimuovo anche la callback dalla Hashtable\n cr.RemoveClient(token);\n return \"ok\";\n }", "boolean checkLogout(User user, HttpServletRequest request, HttpSession session);", "public void run() {\t\t\t\t\t\n\t\t\t \tcheckforLogout(false);\n\t\t\t \n\t\t\t }", "boolean userLogout(UserDTO user) throws UserException, SQLException,ConnectException;", "@Override\n\tpublic void exitSessionUser() {\n\t\tgetThreadLocalRequest().getSession().invalidate();\n\t\t\n\t}", "private void logout() {\n ((MyApplication)this.getApplication()).setLoggedIn(false);\n// Intent intent = new Intent(this, StartupActivity.class);\n// startActivity(intent);\n }", "public void endSession(){\n currentUser = null;\n ui.returnCard();\n }", "public String logout(){\r\n this.user = null;\r\n loggedIn = false;\r\n return \"/index?faces-redirect=true\";\r\n }", "@FXML\r\n private void handleButtonLogOut() {\r\n sessionContent.remove(\"activeId\");\r\n user = null;\r\n MobileApplication.getInstance().switchView(LOGIN_VIEW);\r\n }", "@Override\n public void onClick(View v) {\n Log.d(\"prof\",\"log_out\");\n vibrations(1);\n logoutPopup();\n }", "private void logout() {\n userModel.setLoggedInUser(null);\n final Intent intent = new Intent(this, LoginActivity.class);\n startActivity(intent);\n finish();\n }" ]
[ "0.8198749", "0.8166455", "0.8166455", "0.81619644", "0.8070826", "0.8046587", "0.8043287", "0.80285275", "0.7866557", "0.77433157", "0.7739584", "0.7697606", "0.7633905", "0.75794035", "0.75581837", "0.75581837", "0.75272906", "0.75018924", "0.74884295", "0.74678254", "0.74499613", "0.74466157", "0.7400251", "0.73985803", "0.73513144", "0.72665113", "0.7216752", "0.7192451", "0.7181801", "0.7151682", "0.704591", "0.7041714", "0.7028241", "0.70202595", "0.70119727", "0.70101947", "0.6986756", "0.69673", "0.69557565", "0.69556266", "0.6951375", "0.6950746", "0.6927514", "0.69244033", "0.69229037", "0.6920891", "0.6906612", "0.6895961", "0.68820685", "0.68820685", "0.6871313", "0.68672884", "0.68594927", "0.6850742", "0.68458074", "0.68451166", "0.68439806", "0.68289024", "0.68224657", "0.6817974", "0.6815836", "0.6784488", "0.6765099", "0.6759157", "0.67569447", "0.6747865", "0.6745568", "0.6740779", "0.6733969", "0.6730169", "0.6730017", "0.6730017", "0.6718719", "0.6716292", "0.67158663", "0.67099", "0.6706772", "0.66960746", "0.6694519", "0.6692392", "0.66886306", "0.6673759", "0.6672883", "0.6655935", "0.6653566", "0.66519606", "0.66519594", "0.6649578", "0.66481346", "0.66431", "0.66231626", "0.6621957", "0.6618358", "0.6614899", "0.66085404", "0.6596188", "0.659206", "0.6589038", "0.6582382", "0.6574155", "0.6572559" ]
0.0
-1
this method get the sale's details from DB and put them at list, , than set them at the table
public void fill_table_sale_pattern(ArrayList<ArrayList<Object>> sale_pattern) { for (ArrayList<Object> row : sale_pattern) { sale_patterns_list.add(new SalePattern((String) row.get(0), (String) row.get(1), (String) row.get(2), (String) row.get(3), (Float) row.get(4), (Integer) row.get(5), (String) row.get(6), (Integer) row.get(7), (String) row.get(8))); } sales_table.setItems(sale_patterns_list); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initSalesList() {\n\n String sql = \"SELECT menu.id_product, menu.name, menu.price,size.size, COUNT(orders_menu.id_order) \"\n + \"FROM menu, orders_menu, orders, size WHERE menu.id_product=orders_menu.id_product \"\n + \"AND orders.id_order=orders_menu.id_order AND orders.id_status=4 \"\n + \"AND size.id_size=menu.id_size GROUP BY menu.id_product\";\n\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\n\n session.beginTransaction();\n List<Object[]> empDepts = session.createNativeQuery(sql).list();\n\n salesFxObservableList.clear();\n for (Object[] objects : empDepts) {\n SalesFx salesFx = new SalesFx();\n salesFx.setIdProduct((Integer) objects[0]);\n salesFx.setName((String) objects[1]);\n salesFx.setPrice((Integer) objects[2]);\n salesFx.setSize((String) objects[3]);\n BigInteger bigInteger = (BigInteger) objects[4];\n salesFx.setSale(bigInteger.intValue());\n salesFxObservableList.add(salesFx);\n }\n\n session.getTransaction().commit();\n }", "public List<Sale> saleListGenre() {\n List<Sale> saleList = new ArrayList<Sale>();\n\n try {\n conn = DBConnection.getConnection();\n stm = conn.createStatement();\n result = stm.executeQuery(\"SELECT * FROM disquera.sale \\n\"\n + \"join disquera.genre on sale.id_genre=genre.id_genre\");\n //result_album = stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n //result_artist=stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n while (result.next()) {\n Sale newSale = new Sale();\n newSale.setId_sale(result.getInt(1));\n newSale.setId_album(result.getInt(4));\n newSale.setId_user(result.getInt(5));\n newSale.setId_genre(result.getInt(6));\n //newSale.setSongName(result.getString(10));\n //newSale.setAlbumName(result_album.getString(8));\n newSale.setGenre(result.getString(8));\n\n System.out.println(\"\\n\\n Received data: \\n Id: \" + newSale.getId_sale() + \"\\nPrecio: \" + newSale.getPrice());\n saleList.add(newSale);\n /*\n System.out.println(\"No existe un usuario con esa contraseña\");\n conn.close();\n return null;\n */\n }\n result.close();\n stm.close();\n conn.close();\n } catch (SQLException ex) {\n ex.getStackTrace();\n return null;\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DAOGenre.class.getName()).log(Level.SEVERE, null, ex);\n }\n return saleList;\n }", "public List<Sale> saleListSong() {\n List<Sale> saleList = new ArrayList<Sale>();\n\n try {\n conn = DBConnection.getConnection();\n stm = conn.createStatement();\n result = stm.executeQuery(\"SELECT * FROM disquera.sale \"\n + \"join disquera.song on sale.id_song=song.id_song \"\n + \"join disquera.artist on song.id_artist=artist.id_artist \"\n + \"join disquera.album on song.id_album=album.id_album\");\n //result_album = stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.album on sale.id_album=album.id_album\");\n //result_artist=stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n while (result.next()) {\n Sale newSale = new Sale();\n newSale.setId_sale(result.getInt(1));\n newSale.setId_song(result.getInt(2));\n newSale.setPrice(result.getDouble(3));\n newSale.setId_album(result.getInt(4));\n newSale.setId_user(result.getInt(5));\n newSale.setId_genre(result.getInt(6));\n newSale.setSongName(result.getString(10));\n newSale.setArtistName(result.getString(14));\n newSale.setAlbumName(result.getString(20));\n\n System.out.println(\"\\n\\n Received data: \\n Id: \" + newSale.getId_sale() + \"\\nPrecio: \" + newSale.getPrice());\n saleList.add(newSale);\n /*\n System.out.println(\"No existe un usuario con esa contraseña\");\n conn.close();\n return null;\n */\n }\n result.close();\n stm.close();\n conn.close();\n } catch (SQLException ex) {\n ex.getStackTrace();\n return null;\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DAOGenre.class.getName()).log(Level.SEVERE, null, ex);\n }\n return saleList;\n }", "public void populateTable() {\n DefaultTableModel dtm = (DefaultTableModel)tblSalesPersonCommision.getModel();\n dtm.setRowCount(0);\n // for(OrderList orderlist:salesperson.getOrderlistcatalog().getSalesPersonOrder()){\n // for(Order order:salesperson.getOrderListSalesPerson().getOrderList()){ \n // for(OrderList orderlist:salesperson.getOrderlistcatalog().getOrCatalog()){\n // for(SalesPerson salesperson :business.getEmployeedirectory().getSalesPersonList()){\n \n for(OrderList orderlist:salesperson.getOrderlistcatalog().getOrCatalog()){\n Object [] row = new Object[4];\n // row[0]=.getCustomer().getCustomerId();\n // row[1]= market.getCustomer().getCustomerName();\n row[0]=orderlist;\n row[1]=orderlist.getOrdertotalprice();\n row[2]=orderlist.getSalespersoncomission();\n row[3]=orderlist.getTotalorderlistquantity();\n //3 tcomission = tcomission + orderlist.getSalespersoncomission();\n //3 totalquantity = totalquantity + orderlist.getTotalorderlistquantity();\n //3 totalorderprice = totalorderprice + orderlist.getOrdertotalprice();\n \n // row[0]=order;\n // row[1]=order.getAmountprice();\n \n dtm.addRow(row);\n // }\n // }\n } \n //2 salesperson.getOrderlistcatalog().setTotalquantitypersalesperson(totalquantity);\n //2 salesperson.getOrderlistcatalog().setTotalcommision(tcomission);\n //2 salesperson.getOrderlistcatalog().setTotalorderlistcsatalogprice(totalorderprice);\n}", "public void ListSale(JTable table, String[] Columns) {\n\n List<SalesDetalil> sales = CONNECTION.queryObjects(\"from Sales_Detalil\");\n Object[] oc = new Object[Columns.length];\n\n DefaultTableModel dtm = new DefaultTableModel(null, Columns) {\n @Override\n public boolean isCellEditable(int rowIndex, int vColIndex) {\n return false;\n }\n };\n\n try {\n for (SalesDetalil v :sales ) {\n oc[0] = v.getIdSale();\n oc[1] = v.getClient();\n oc[2]=v.getVehicle();\n oc[3]=v.getDiscount()+\" %\";\n oc[4]=\"$ \"+v.getPriceSale()+\" MXN\";\n \n dtm.addRow(oc);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n table.setModel(dtm);\n table.getColumnModel().getColumn(0).setPreferredWidth(10);\n table.getColumnModel().getColumn(1).setPreferredWidth(90);\n table.getColumnModel().getColumn(2).setPreferredWidth(90);\n table.getColumnModel().getColumn(3).setPreferredWidth(50);\n table.getColumnModel().getColumn(4).setPreferredWidth(80);\n }", "public List<Sale> saleListArtistCount() {\n List<Sale> saleList = new ArrayList<Sale>();\n\n try {\n conn = DBConnection.getConnection();\n stm = conn.createStatement();\n result = stm.executeQuery(\"SELECT name,\\n\"\n + \"COUNT (*) \\n\"\n + \"FROM disquera.artist JOIN disquera.sale ON artist.id_artist = sale.id_artist\\n\"\n + \"GROUP BY artist.name ORDER BY artist.name\");\n //result_album = stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.album on sale.id_album=album.id_album\");\n //result_artist=stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n while (result.next()) {\n Sale newSale = new Sale();\n\n newSale.setArtistName(result.getString(1));\n newSale.setCount(result.getInt(2));\n //System.out.println(\"\\n\\n Received data: \\n Id: \" + newSale.getId_sale() + \"\\nPrecio: \" + newSale.getPrice());\n saleList.add(newSale);\n /*\n System.out.println(\"No existe un usuario con esa contraseña\");\n conn.close();\n return null;\n */\n }\n result.close();\n stm.close();\n conn.close();\n } catch (SQLException ex) {\n ex.getStackTrace();\n return null;\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DAOGenre.class.getName()).log(Level.SEVERE, null, ex);\n }\n return saleList;\n }", "public static ArrayList<SalesManBean> getSallesman(int doId) {\r\n\t\tResultSet rs = null;\r\n\t\tSystem.out.println(\"CustomerBAL.get_do_salesman(?)\");\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tdateFormat.format(new Date());\r\n\t\tSalesManBean bean = null;\r\n\t\tArrayList<SalesManBean> SallesmanList = new ArrayList<SalesManBean>();\r\n\t\tint salesman_id, latecustomer, totalSales;\r\n\t\tdouble monthlyIncome;\r\n\t\tString sallesman_name, cnicNo, address, district, phone;\r\n\t\tDate datejoin;\r\n\t\ttry (Connection con = Connect.getConnection()) {\r\n\t\t\tif (con != null) {\r\n\t\t\t\t// Begin Stored Procedure Calling -- Jetander\r\n\t\t\t\tCallableStatement prepareCall = con\r\n\t\t\t\t\t\t.prepareCall(\"{call get_do_salesman(?)}\");\r\n\t\t\t\tprepareCall.setInt(1, doId);\r\n\t\t\t\trs = prepareCall.executeQuery();\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\tsallesman_name = rs.getString(1);\r\n\t\t\t\t\tcnicNo = rs.getString(2);\r\n\t\t\t\t\taddress = rs.getString(3);\r\n\t\t\t\t\tdistrict = rs.getString(4);\r\n\t\t\t\t\taddress = rs.getString(5);\r\n\t\t\t\t\tmonthlyIncome = rs.getDouble(6);\r\n\t\t\t\t\tdatejoin = rs.getDate(7);\r\n\t\t\t\t\t// System.err.println(\"Date of Joining \" + datejoin);\r\n\t\t\t\t\tphone = rs.getString(8);\r\n\t\t\t\t\tsalesman_id = rs.getInt(9);\r\n\t\t\t\t\tlatecustomer = rs.getInt(10);\r\n\t\t\t\t\ttotalSales = rs.getInt(11);\r\n\t\t\t\t\t// end procedure call.\r\n\t\t\t\t\tbean = new SalesManBean();\r\n\t\t\t\t\tbean.setName(sallesman_name);\r\n\t\t\t\t\tbean.setCnic(cnicNo);\r\n\t\t\t\t\tbean.setAddress(address);\r\n\t\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\t\tbean.setDatejoin(datejoin);\r\n\t\t\t\t\tbean.setSallery(monthlyIncome);\r\n\t\t\t\t\tbean.setPhone_number(phone);\r\n\t\t\t\t\tbean.setSalesmanId(salesman_id);\r\n\t\t\t\t\tbean.setLateCustomer(latecustomer);\r\n\t\t\t\t\tbean.setTotalSales(totalSales);\r\n\t\t\t\t\tbean.setFoname(rs.getString(\"fo_name\"));\r\n\t\t\t\t\tSallesmanList.add(bean);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn SallesmanList;\r\n\t}", "public List<Sale> saleListGenreCount() {\n List<Sale> saleList = new ArrayList<Sale>();\n\n try {\n conn = DBConnection.getConnection();\n stm = conn.createStatement();\n result = stm.executeQuery(\"SELECT musical_genre, COUNT (*) FROM disquera.genre \\n\"\n + \"JOIN disquera.sale ON genre.id_genre = sale.id_genre \\n\"\n + \"GROUP BY genre.musical_genre ORDER BY genre.musical_genre\");\n //result_album = stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.album on sale.id_album=album.id_album\");\n //result_artist=stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n while (result.next()) {\n Sale newSale = new Sale();\n\n newSale.setGenre(result.getString(1));\n newSale.setCount(result.getInt(2));\n //System.out.println(\"\\n\\n Received data: \\n Id: \" + newSale.getId_sale() + \"\\nPrecio: \" + newSale.getPrice());\n saleList.add(newSale);\n /*\n System.out.println(\"No existe un usuario con esa contraseña\");\n conn.close();\n return null;\n */\n }\n result.close();\n stm.close();\n conn.close();\n } catch (SQLException ex) {\n ex.getStackTrace();\n return null;\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DAOGenre.class.getName()).log(Level.SEVERE, null, ex);\n }\n return saleList;\n }", "public void create(Sale sale) {\n sale_dao.create(sale);\n }", "@Override\n\tpublic void update(Sale sale) {\n\t\tDefaultTableModel dtm = (DefaultTableModel)table.getModel();\n\t\tdtm.setRowCount(0);\n\n\t\tdouble totalPrice = 0;\n\t\tfor(int i=0;i<sale.items.size();i++){\n\t\t\tVector v1 = new Vector();\n\t\t\tv1.add(sale.items.get(i).getProdSpec().getTitle());\n\t\t\tv1.add(\"\"+sale.items.get(i).getCopies());\n\t\t\tdtm.addRow(v1);\t\t\t\n\t\t}\n\t\ttotalPrice += sale.getTotal();\n\t\tlblNewLabel.setText(\"\"+totalPrice);\n\t}", "public ArrayList<SaleVO> showSale() {\n\t\treturn sale.show();\r\n\t}", "void fetchForSaleHousesData();", "@Override\r\n public void setsaleId(int saleid) {\n this.saleId = saleid;\r\n }", "public List<Sale> saleListSongCount() {\n List<Sale> saleList = new ArrayList<Sale>();\n\n try {\n conn = DBConnection.getConnection();\n stm = conn.createStatement();\n result = stm.executeQuery(\"SELECT name,\\n\"\n + \"COUNT (*) \\n\"\n + \"FROM disquera.song JOIN disquera.sale ON song.id_song = sale.id_song\\n\"\n + \"GROUP BY song.name ORDER BY song.name\");\n //result_album = stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.album on sale.id_album=album.id_album\");\n //result_artist=stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n while (result.next()) {\n Sale newSale = new Sale();\n\n newSale.setSongName(result.getString(1));\n newSale.setCount(result.getInt(2));\n //System.out.println(\"\\n\\n Received data: \\n Id: \" + newSale.getId_sale() + \"\\nPrecio: \" + newSale.getPrice());\n saleList.add(newSale);\n /*\n System.out.println(\"No existe un usuario con esa contraseña\");\n conn.close();\n return null;\n */\n }\n result.close();\n stm.close();\n conn.close();\n } catch (SQLException ex) {\n ex.getStackTrace();\n return null;\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DAOGenre.class.getName()).log(Level.SEVERE, null, ex);\n }\n return saleList;\n }", "public void populate(){\n salesRepRepository.save(new SalesRep(\"Maddy\"));\n salesRepRepository.save(new SalesRep(\"Jegor\"));\n salesRepRepository.save(new SalesRep(\"Natalia\"));\n salesRepRepository.save(new SalesRep(\"Joao\"));\n }", "public void setSale(int sale) {\n\t\tthis.sale = sale;\r\n\t}", "private void updateSoldProductInfo() { public static final String COL_SOLD_PRODUCT_CODE = \"sells_code\";\n// public static final String COL_SOLD_PRODUCT_SELL_ID = \"sells_id\";\n// public static final String COL_SOLD_PRODUCT_PRODUCT_ID = \"sells_product_id\";\n// public static final String COL_SOLD_PRODUCT_PRICE = \"product_price\";\n// public static final String COL_SOLD_PRODUCT_QUANTITY = \"quantity\";\n// public static final String COL_SOLD_PRODUCT_TOTAL_PRICE = \"total_price\";\n// public static final String COL_SOLD_PRODUCT_PENDING_STATUS = \"pending_status\";\n//\n\n for (ProductListModel product : products){\n soldProductInfo.storeSoldProductInfo(new SoldProductModel(\n printInfo.getInvoiceTv(),\n printInfo.getInvoiceTv(),\n product.getpCode(),\n product.getpPrice(),\n product.getpSelectQuantity(),\n printInfo.getTotalAmountTv(),\n paymentStatus+\"\"\n ));\n\n }\n }", "public void startSale(){\n sale = new Sale();\n for(SaleObserver obs: saleObservers)\n sale.addSaleObserver(obs);\n }", "public ArrayList<Sale> getAllSale() throws SQLException{\n\t\tSystem.out.println(\"Retrieving all sales record...\");\n\t\tConnection dbConnection = null;\n\t\tStatement statement = null;\n\t\tResultSet result = null;\n\t\t// query to retrieve all details from vehicles\n\t\tString query = \"SELECT * FROM vehicles;\";\n\t\tVehicle temp = null;\n\t\t// create an array list to store data\n\t\tArrayList<Sale> saleList = new ArrayList<>();\n\t\t\n\t\ttry{\n\t\t\t// Connect to database\n\t\t\tdbConnection = getDBConnection();\n\t\t\t// create a statement\n\t\t\tSystem.out.println(\"DBQuery = \"+query);\n\t\t\t// execute query and store the return value in result\n\t\t\tresult = statement.executeQuery(query);\n\t\t\t// loop through every row\n\t\t\twhile(result.next()){\n\t\t\t\tint vehicle_id = result.getInt(\"vehicle_id\");\n\t\t\t\tString sold_date = result.getString(\"sold_date\");\n\t\t\t\tint sold_price = result.getInt(\"sold_price\");\n\t\t\t\tString status = result.getString(\"status\");\n\t\t\t\t// add sale objects into array list\n\t\t\t\tsaleList.add(new Sale(vehicle_id, sold_date, sold_price, status));\n\t\t\t}\n\t\t} finally {\n\t\t\t// close the connection\n\t\t\tif (result != null){result.close();}\n\t\t\tif (statement != null){statement.close();}\n\t\t\tif (dbConnection != null){dbConnection.close();}\n\t\t}\n\t\treturn saleList;\n\t}", "public List<Sale> saleLisAlbumCount() {\n List<Sale> saleList = new ArrayList<Sale>();\n\n try {\n conn = DBConnection.getConnection();\n stm = conn.createStatement();\n result = stm.executeQuery(\"SELECT name,\\n\"\n + \"COUNT (*) \\n\"\n + \"FROM disquera.album JOIN disquera.sale ON album.id_album = sale.id_album\\n\"\n + \"GROUP BY album.name ORDER BY album.name\");\n //result_album = stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.album on sale.id_album=album.id_album\");\n //result_artist=stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n while (result.next()) {\n Sale newSale = new Sale();\n\n newSale.setAlbumName(result.getString(1));\n newSale.setCount(result.getInt(2));\n //System.out.println(\"\\n\\n Received data: \\n Id: \" + newSale.getId_sale() + \"\\nPrecio: \" + newSale.getPrice());\n saleList.add(newSale);\n /*\n System.out.println(\"No existe un usuario con esa contraseña\");\n conn.close();\n return null;\n */\n }\n result.close();\n stm.close();\n conn.close();\n } catch (SQLException ex) {\n ex.getStackTrace();\n return null;\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DAOGenre.class.getName()).log(Level.SEVERE, null, ex);\n }\n return saleList;\n }", "public void startSale(){\n this.sale = new Sale();\n this.inventory = new Inventory();\n this.accounting = new Accounting();\n }", "public void startSale() {\n sale = new Sale();\n }", "@Override\r\n\tpublic List<CookVO> selectSale() throws Exception {\n\t\treturn session.selectList(\"com.mapper.cook.selectSale\");\r\n\t}", "public void listar_saldoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaCorte(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }", "private void initDatas(){\r\n \t\r\n \tjTable1.setModel(ViewUtil.transferBeanList2DefaultTableModel(discountService.getAllDiscountInfo(),\"Discount\"));\r\n }", "public void setSale_num(Integer sale_num) {\n this.sale_num = sale_num;\n }", "public List<SalesItems> toListSalesItems(int vendaId){\n \n List<SalesItems> list = new ArrayList<>();\n String sql = \"select i.id, p.descricao, i.qtd, p.preco, \"\n + \"i.subtotal from tb_itensvendas as i \"\n + \"inner join tb_produtos as p on(i.produto_id = p.id) \"\n + \"where i.venda_id = ? \";\n \n try{\n \n PreparedStatement st = conn.prepareStatement(sql);\n \n st.setInt(1, vendaId);\n \n \n ResultSet rs = st.executeQuery();\n \n while(rs.next()){\n SalesItems item = new SalesItems();\n Product product = new Product();\n \n item.setId(rs.getInt(\"i.id\"));\n product.setDescricao(rs.getString(\"p.descricao\"));\n item.setQtd(rs.getInt(\"i.qtd\"));\n product.setPreco(rs.getDouble(\"p.preco\"));\n item.setSubtotal(rs.getDouble(\"i.subtotal\"));\n \n \n \n \n \n item.setProduto(product);\n \n list.add(item);\n \n }\n \n return list;\n \n }\n catch(SQLException error){\n JOptionPane.showMessageDialog(null, \"Erro: \" + error);\n return null;\n }\n }", "private void buscarProducto() {\n EntityManagerFactory emf= Persistence.createEntityManagerFactory(\"pintureriaPU\");\n List<Almacen> listaproducto= new FacadeAlmacen().buscarxnombre(jTextField1.getText().toUpperCase());\n DefaultTableModel modeloTabla=new DefaultTableModel();\n modeloTabla.addColumn(\"Id\");\n modeloTabla.addColumn(\"Producto\");\n modeloTabla.addColumn(\"Proveedor\");\n modeloTabla.addColumn(\"Precio\");\n modeloTabla.addColumn(\"Unidades Disponibles\");\n modeloTabla.addColumn(\"Localizacion\");\n \n \n for(int i=0; i<listaproducto.size(); i++){\n Vector vector=new Vector();\n vector.add(listaproducto.get(i).getId());\n vector.add(listaproducto.get(i).getProducto().getDescripcion());\n vector.add(listaproducto.get(i).getProducto().getProveedor().getNombre());\n vector.add(listaproducto.get(i).getProducto().getPrecio().getPrecio_contado());\n vector.add(listaproducto.get(i).getCantidad());\n vector.add(listaproducto.get(i).getLocalizacion());\n modeloTabla.addRow(vector);\n }\n jTable1.setModel(modeloTabla);\n }", "public void retriveSearchSaleDataFromDB(String search1,String search2, String selection) throws SQLException {\r\n\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\r\n\r\n\r\n Character x = '\\'';\r\n String y = \"%\";\r\n ResultSet rs = null;\r\n ResultSet rs2 = null;\r\n\r\n String searchWord = x + y + search1 + y + x;\r\n String searchWord1 = x + search1 + x;\r\n String searchWord2 = x + search2 + x;\r\n\r\n\r\n try (Connection con = DBConnection.getconnection(); Statement stmt = con.createStatement()) {\r\n\r\n // selction of the SQL statment depending on RadioButton clicked by the user\r\n if (selection.equals(\"SaleNumber\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.SaleNumber>=\" + search1 + \" AND \" + \"Sales.SaleNumber<=\" + search2; // filters rows by Sale Number\r\n rs = stmt.executeQuery(SQL);\r\n\r\n\r\n } else if (selection.equals(\"dateSelected\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Date between \" + searchWord1 + \" AND \" + searchWord2; // filters rows by selected date\r\n rs = stmt.executeQuery(SQL);\r\n\r\n\r\n } else if (selection.equals(\"customerName\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Customer like \" + searchWord; // filters rows by typed Customer Name\r\n rs = stmt.executeQuery(SQL);\r\n } else if (selection.equals(\"productName\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Product like \" + searchWord; // filters rows by typed Product Name\r\n rs = stmt.executeQuery(SQL);\r\n } else if (selection.equals(\"category\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Category like \" + searchWord; // filters rows by typed Category\r\n rs = stmt.executeQuery(SQL);\r\n }\r\n\r\n while (rs.next()) {\r\n addSaleToTableList(new Sales(rs.getInt(\"SaleNumber\"), simpleDateFormat.format(rs.getDate(\"Date\")), rs.getString(\"Time\"), rs.getString(\"Customer\"),\r\n rs.getString(\"Product\"), rs.getString(\"Code\"), rs.getString(\"Size\"),\r\n rs.getString(\"Units\"), rs.getString(\"Category\"), rs.getString(\"Quantity\"), rs.getString(\"UnitPrice\"), rs.getString(\"SalePrice\")));\r\n\r\n }\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "@Override\r\n public int getsaleId() {\n return this.saleId;\r\n }", "public void updateAccountingSystem(Sale sale)\n {\n \n }", "public salesDetail() throws SQLException {\n monthsVal=new HashMap();\n String months=\"Jan Feb Mar Apr May Jun Jul Aug Sept Oct Nov Dec\";\n String[] monthsList = months.split(\" \");\n int mthCount=1;\n \n for(String mthVal:monthsList)\n { String mth=\"1\";\n if(mthCount<10)\n mth=\"0\"+mthCount;\n else mth=mthCount+\"\";\n monthsVal.put(mthVal,mth);\n mthCount++;\n }\n dft=new DefaultTableModel();\n dft.addColumn(\"Date\");\n dft.addColumn(\"Bill No.\");\n dft.addColumn(\"Sales Man\");\n dft.addColumn(\"Item\");\n dft.addColumn(\"Quantity\");\n dft.addColumn(\"Rate\");\n dft.addColumn(\"Amount\");\n SalesModel sm = new SalesModel(); \n Vector<Vector<String>> resultSet=sm.getAllDetails();\n for(Vector<String> list : resultSet)\n {\n dft.addRow(list);\n }\n \n usr=new DefaultTableModel();\n usr.addColumn(\"User Name\");\n usr.addColumn(\"Amount(NRS)\");\n Calendar currentDate = Calendar.getInstance(); //Get the current date\n SimpleDateFormat formatter= new SimpleDateFormat(\"yyyy-MM-dd\"); //format it as per your requirement\n String dateStr = formatter.format(currentDate.getTime());\n resultSet=sm.userSalesRecord(dateStr);\n for(Vector<String> list : resultSet)\n {\n usr.addRow(list);\n } \ninitComponents();\ngraphPanel=new GraphPanel(); \ngraphPanel.setBackground(new java.awt.Color(204, 204, 204));\nthis.add(graphPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 340,700,350));\nthis.setVisible(true);\n }", "@GetMapping(\"/sale\")\n public ResultEntity<List<ItemDTO>> getAllSale()\n {\n return itemService.getItemsBySubCategory(ConstantUtil.TYPE_SALE_RENT,\"Sale\");\n }", "public void loadData() {\n String[] header = {\"Tên Cty\", \"Mã Cty\", \"Cty mẹ\", \"Giám đốc\", \"Logo\", \"Slogan\"};\n model = new DefaultTableModel(header, 0);\n List<Enterprise> list = new ArrayList<Enterprise>();\n list = enterpriseBN.getAllEnterprise();\n for (Enterprise bean : list) {\n Enterprise enterprise = enterpriseBN.getEnterpriseByID(bean.getEnterpriseParent()); // Lấy ra 1 Enterprise theo mã\n Person person1 = personBN.getPersonByID(bean.getDirector());\n Object[] rows = {bean.getEnterpriseName(), bean.getEnterpriseID(), enterprise, person1, bean.getPicture(), bean.getSlogan()};\n model.addRow(rows);\n }\n listEnterprisePanel.getTableListE().setModel(model);\n setupTable();\n }", "public void populateList()\r\n {\n Cursor c = sqLiteDatabase.query(Company_constant.TABLE_NAME, null, null, null, null, null, null);\r\n if (c != null && c.moveToFirst()) {\r\n do {\r\n\r\n int id = c.getInt(c.getColumnIndex(Company_constant.COL_ID));\r\n String name = c.getString(c.getColumnIndex(Company_constant.COL_NAME));\r\n int sal = c.getInt(c.getColumnIndex(Company_constant.COL_SALARY));\r\n // sb.append(id + \"\" + name + \"\" + sal + \"\");\r\n cp=new Company(name,id,sal);\r\n companylist.add(cp);\r\n\r\n\r\n }\r\n\r\n while (c.moveToNext());\r\n }\r\n // Toast.makeText(this, \"\" + sb.toString(), Toast.LENGTH_LONG).show();\r\n ArrayAdapter<Company>ad=new ArrayAdapter<Company>(this,android.R.layout.simple_list_item_1,companylist);\r\n listData.setAdapter(ad);\r\n c.close();\r\n }", "public void update(Sale sale) {\n sale_dao.update(sale);\n }", "public void saleAct() {\t\r\n\t\t\r\n\t\tif(createWine() != null) {\r\n\t\t\t\r\n\t\t\ttext_amount =String.valueOf( cus.saleTransaction(createWine()));\r\n\t\t\twine_name.setText(name.getText());\r\n\t\t\tamount.setText(\" £ \" + text_amount + \" \" );\r\n\t\t\tbalance.setText(\" £ \" + isCredit((double)cus.getAccount() / 100.00) + \" \");\r\n\t\t\t\r\n\t\t\t//reset all textfield\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t}", "@Transactional\n @Override\n public StringBuffer addSalesOrder(String customerID, String cartIDs, String addressID, String paymentType,\n String orderAmount, String scoreAll, String memo, String itemCount, String itemID,\n String supplierID, String itemType, String orderType, String objID, String invoiceType,\n String invoiceTitle, String generateType, String orderID, String allFreight, String supplierFreightStr) throws Exception {\n \t\n String ids[] = cartIDs.split(\",\");\n List<ShoppingCartVO> shopCartList = new ArrayList<ShoppingCartVO>();\n for (String id : ids) {\n ShoppingCartVO shoppingCartVO = shoppingCartDAO.findShoppingCartByID(Long.valueOf(id));\n shopCartList.add(shoppingCartVO);\n }\n Map<String,List<ShoppingCartVO>> maps = new HashMap<String,List<ShoppingCartVO>>();\n for(ShoppingCartVO s:shopCartList){\n \tList<ShoppingCartVO> temp = new ArrayList<ShoppingCartVO>();\n \t String sid1= s.getSupplierID();\n String siname1= s.getSupplierName();\n for(ShoppingCartVO shoppingCartVO1 : shopCartList){\n \t//当前店铺对应的购物车集合\n \tString sid2 = shoppingCartVO1.getSupplierID();\n \tif(sid1.equals(sid2)){\n \t\ttemp.add(shoppingCartVO1);\n \t}\n }\n maps.put(sid1+\"_\"+siname1, temp);\n }\n \n //根据物流模板计算运费\n Map<String, Double> supplierFreightMap = new HashMap<String, Double>();\n String[] supplierFreightAll = supplierFreightStr.split(\"\\\\|\");\n for (int i = 0; i < supplierFreightAll.length; i++) {\n \tString[] supplierFreight = supplierFreightAll[i].split(\":\");\n \tsupplierFreightMap.put(supplierFreight[0], Double.parseDouble(supplierFreight[1]));\n\t\t} \n \n StringBuffer ordersList = new StringBuffer();\n// cachedClient.delete(customerID + orderID);\n Set<String> set = maps.keySet();\n\t\tfor(String string : set){\n\t\t List<ShoppingCartVO> temp1= maps.get(string);\n\t\t double supplierFreight = supplierFreightMap.get(string);\n\t\t Double amount = 0d;\n\t\t Integer count = 0;\n Integer score = 0;\n Double weight = 0d;\n\t\t for (ShoppingCartVO shoppingCartVO : temp1) {\n ItemVO itemVO = itemDAO.findItemById(shoppingCartVO.getItemID());\n count += shoppingCartVO.getItemCount();\n // weight += itemVO.getWeight();\n if (shoppingCartVO.getType() == 1) {\n amount += shoppingCartVO.getItemCount() * shoppingCartVO.getSalesPrice();\n } else if (shoppingCartVO.getType() == 2) {\n score += shoppingCartVO.getItemCount() * itemVO.getScore();\n } else if (shoppingCartVO.getType() == 3) {\n amount += shoppingCartVO.getItemCount() * itemVO.getScorePrice();\n score += shoppingCartVO.getItemCount() * shoppingCartVO.getSalesScore();\n }\n }\n\t\t //SalesOrderVO tempOrder = new SalesOrderVO();\n\t /*if (tempOrder == null) {\n\t throw new Exception(\"参数错误\");\n\t }\n\t if (\"012\".indexOf(invoiceType) == -1) {\n\t throw new Exception(\"参数错误\");\n\t }*/\n\t SalesOrderDTO salesOrderDTO = new SalesOrderDTO();\n\t salesOrderDTO.setMainID(randomNumeric());\n\t salesOrderDTO.setCustomerID(customerID);\n\t salesOrderDTO.setPaymentType(Integer.valueOf(paymentType));\n\t salesOrderDTO.setPaymentStatus(0);\n\n\t // salesOrderDTO.setExpressFee(tempOrder.getExpressFee());//运费\n\t salesOrderDTO.setProductAmount(amount);\n\t salesOrderDTO.setTotalAmount(amount + supplierFreight);\n\t salesOrderDTO.setPayableAmount(amount);\n\n\t salesOrderDTO.setOrderType(Integer.valueOf(orderType));\n\t salesOrderDTO.setMemo(memo);\n\t salesOrderDTO.setInvoiceType(Integer.parseInt(invoiceType));\n\t salesOrderDTO.setInvoiceTitle(invoiceTitle);\n\t salesOrderDTO.setSupplierID(string);\n\t salesOrderDTO.setExpressFee(supplierFreight);\n\t salesOrderDAO.addSalesOrder(salesOrderDTO);\n\t ordersList.append(salesOrderDTO.getMainID()+\",\");\n\t if(!paymentType.equals(\"3\")){\n\t \t CustomerDeliveryAddressVO customerDeliveryAddressVO = customerDeliveryAddressDAO.findAddressByID(Long.valueOf(addressID));\n\t \t if (customerDeliveryAddressVO != null) {\n\t \t SalesOrderDeliveryAddressDTO salesOrderDeliveryAddressDTO = new SalesOrderDeliveryAddressDTO();\n\t \t salesOrderDeliveryAddressDTO.setSalesOrderID(salesOrderDTO.getMainID());\n\t \t salesOrderDeliveryAddressDTO.setName(customerDeliveryAddressVO.getName());\n\t \t salesOrderDeliveryAddressDTO.setCountryID(customerDeliveryAddressVO.getCountryID());\n\t \t salesOrderDeliveryAddressDTO.setProvinceID(customerDeliveryAddressVO.getProvinceID());\n\t \t salesOrderDeliveryAddressDTO.setCityID(customerDeliveryAddressVO.getCityID());\n\t \t salesOrderDeliveryAddressDTO.setDisctrictID(customerDeliveryAddressVO.getDisctrictID());\n\t \t salesOrderDeliveryAddressDTO.setAddress(customerDeliveryAddressVO.getAddress());\n\t \t salesOrderDeliveryAddressDTO.setMobile(customerDeliveryAddressVO.getMobile());\n\t \t salesOrderDeliveryAddressDTO.setTelephone(customerDeliveryAddressVO.getTelephone());\n\t \t if (customerDeliveryAddressVO.getZip() != null) {\n\t \t salesOrderDeliveryAddressDTO.setZip(customerDeliveryAddressVO.getZip());\n\t \t }\n\t \t salesOrderDeliveryAddressDAO.insertSalesOrderDeliveryAddress(salesOrderDeliveryAddressDTO);\n\t \t }\n\t \t ShippingAddressVO shippingAddressVO = shippingAddressDAO.findDefaultShippingAddress();\n\t \t if (shippingAddressVO != null) {\n\t \t SalesOrderShippingAddressDTO salesOrderShippingAddressDTO = new SalesOrderShippingAddressDTO();\n\t \t salesOrderShippingAddressDTO.setSalesOrderID(salesOrderDTO.getMainID());\n\t \t salesOrderShippingAddressDTO.setName(shippingAddressVO.getName());\n\t \t salesOrderShippingAddressDTO.setCountryID(shippingAddressVO.getCountryID());\n\t \t salesOrderShippingAddressDTO.setProvinceID(shippingAddressVO.getProvinceID());\n\t \t salesOrderShippingAddressDTO.setCityID(shippingAddressVO.getCityID());\n\t \t salesOrderShippingAddressDTO.setDisctrictID(shippingAddressVO.getDisctrictID());\n\t \t salesOrderShippingAddressDTO.setAddress(shippingAddressVO.getAddress());\n\t \t salesOrderShippingAddressDTO.setMobile(shippingAddressVO.getMobile());\n\t \t salesOrderShippingAddressDTO.setTelephone(shippingAddressVO.getTelephone());\n\t \t salesOrderShippingAddressDTO.setZip(shippingAddressVO.getZip());\n\t \t salesOrderShippingAddressDAO.insertSalesOrderShippingAddress(salesOrderShippingAddressDTO);\n\t \t }\n\t }\n\t \n\t ItemDTO itemDTO = new ItemDTO();\n\t SupplierItemDTO supplierItemDTO = new SupplierItemDTO();\n\t SalesOrderLineDTO salesOrderLineDTO = new SalesOrderLineDTO();\n\t if (generateType.equals(\"quickBuy\")) {\n\t generateQuickBuyOrder(itemCount,cartIDs, itemID, supplierID, objID, salesOrderDTO, itemDTO, supplierItemDTO,\n\t salesOrderLineDTO);\n\n\t } else if (generateType.equals(\"oneKey\")) {\n\t generateOneKeyOrder(customerID, itemCount, itemType, objID, salesOrderDTO, itemDTO, supplierItemDTO,\n\t salesOrderLineDTO);\n\n\t } else if (generateType.equals(\"shoppingcart\")) {\n\t genarateShoppingCartOrder(customerID, cartIDs, itemCount, itemType, objID, salesOrderDTO, itemDTO,\n\t supplierItemDTO, salesOrderLineDTO);\n\t } else {\n\t throw new Exception(\"订单类型无法确定\");\n\t }\n\t\t}\n return ordersList;\n }", "@Insert({\n \"insert into SALEORDERDETAIL (SOID, LINENO, \",\n \"MID, MNAME, STANDARD, \",\n \"UNITID, UNITNAME, \",\n \"NUM, BEFOREDISCOUNT, \",\n \"DISCOUNT, PRICE, \",\n \"TOTALPRICE, TAXRATE, \",\n \"TOTALTAX, TOTALMONEY, \",\n \"BEFOREOUT, ESTIMATEDATE, \",\n \"LEFTNUM, ISGIFT, \",\n \"FROMBILLTYPE, FROMBILLID)\",\n \"values (#{soid,jdbcType=VARCHAR}, #{lineno,jdbcType=DECIMAL}, \",\n \"#{mid,jdbcType=VARCHAR}, #{mname,jdbcType=VARCHAR}, #{standard,jdbcType=VARCHAR}, \",\n \"#{unitid,jdbcType=VARCHAR}, #{unitname,jdbcType=VARCHAR}, \",\n \"#{num,jdbcType=DECIMAL}, #{beforediscount,jdbcType=DECIMAL}, \",\n \"#{discount,jdbcType=DECIMAL}, #{price,jdbcType=DECIMAL}, \",\n \"#{totalprice,jdbcType=DECIMAL}, #{taxrate,jdbcType=DECIMAL}, \",\n \"#{totaltax,jdbcType=DECIMAL}, #{totalmoney,jdbcType=DECIMAL}, \",\n \"#{beforeout,jdbcType=DECIMAL}, #{estimatedate,jdbcType=TIMESTAMP}, \",\n \"#{leftnum,jdbcType=DECIMAL}, #{isgift,jdbcType=DECIMAL}, \",\n \"#{frombilltype,jdbcType=DECIMAL}, #{frombillid,jdbcType=VARCHAR})\"\n })\n int insert(Saleorderdetail record);", "private void prepareData() {\n mSalesPoint.add(new SalesPoint(\"Super U\", \"Malingo-street, Buea, Cameroon\", \"Clothes, Shoes , Perfumes, Cutlery, Make-up\",\"lorem lorem lorem lorem lorem lorem\"));\n mSalesPoint.add(new SalesPoint(\"Mahima\", \"Bonamussadi, Denver, Douala\", \"Food, divertisement, plessir\",\"Whether you're new to Android and need some fresh, new games to start building out your Google Play library or simply looking for the latest trendy games that are worthy of your time and attention, these are the best Android games you can find right now.\"));\n mSalesPoint.add(new SalesPoint(\"Le Mediterrane\", \"Bonamussadi, Denver, Douala\", \"Food, divertisement, plessir\",\"Whether you're new to Android and need some fresh, new games to start building out your Google Play library or simply looking for the latest trendy games that are worthy of your time and attention, these are the best Android games you can find right now.\"));\n mSalesPoint.add(new SalesPoint(\"Terific Coffee\", \"Bonamussadi, Denver, Douala\", \"Food, divertisement, plessir\",\"Whether you're new to Android and need some fresh, new games to start building out your Google Play library or simply looking for the latest trendy games that are worthy of your time and attention, these are the best Android games you can find right now.\"));\n mSalesPoint.add(new SalesPoint(\"Santa Lucia\", \"Bonamussadi, Denver, Douala\", \"Food, divertisement, plessir\",\"Whether you're new to Android and need some fresh, new games to start building out your Google Play library or simply looking for the latest trendy games that are worthy of your time and attention, these are the best Android games you can find right now.\"));\n\n mPointOfSalesRecyclerAdapter.notifyDataSetChanged();\n }", "public void setSales(DefaultTableModel tData){\n float totalAmount = 0;\n int count;\n for (count = 0; count < oTable.getRowCount(); count++){\n totalAmount = totalAmount + Float.parseFloat(oTable.getValueAt(count, 6).toString());\n }\n tAmount.setText(String.valueOf(totalAmount));\n oCount.setText(String.valueOf(count));\n }", "@Transactional\n @Override\n public StringBuffer addSalesOrderTparts(String customerID, String cartIDs, String addressID, String paymentType,\n String orderAmount, String scoreAll, String memo, String itemCount, String itemID,\n String supplierID, String itemType, String orderType, String objID, String invoiceType,\n String invoiceTitle, String generateType, String orderID,String memoIDs,String allFreight, String supplierFreightStr) throws Exception {\n \t\n String ids[] = cartIDs.split(\",\");\n String memos[] = memoIDs.split(\",\");\n List<ShoppingCartVO> shopCartList = new ArrayList<ShoppingCartVO>();\n for (String id : ids) {\n ShoppingCartVO shoppingCartVO = shoppingCartDAO.findShoppingCartByID(Long.valueOf(id));\n shopCartList.add(shoppingCartVO);\n }\n Map<String,List<ShoppingCartVO>> maps = new HashMap<String,List<ShoppingCartVO>>();\n for(ShoppingCartVO s:shopCartList){\n \tList<ShoppingCartVO> temp = new ArrayList<ShoppingCartVO>();\n \t String sid1= s.getSupplierID();\n String siname1= s.getSupplierName();\n for(ShoppingCartVO shoppingCartVO1 : shopCartList){\n \t//当前店铺对应的购物车集合\n \tString sid2 = shoppingCartVO1.getSupplierID();\n \tif(sid1.equals(sid2)){\n \t\ttemp.add(shoppingCartVO1);\n \t}\n }\n maps.put(sid1+\"_\"+siname1, temp);\n }\n \n //根据物流模板计算运费\n Map<String, Double> supplierFreightMap = new HashMap<String, Double>();\n String[] supplierFreightAll = null;\n if(StringUtil.isNotEmpty(supplierFreightStr))\n {\n \tsupplierFreightAll = supplierFreightStr.split(\"\\\\|\");\n for (int i = 0; i < supplierFreightAll.length; i++) {\n \tString[] supplierFreight = supplierFreightAll[i].split(\":\");\n \tsupplierFreightMap.put(supplierFreight[0], Double.parseDouble(supplierFreight[1]));\n \t\t} \t\n }\n \n \n StringBuffer ordersList = new StringBuffer();\n int num = 0;\n// cachedClient.delete(customerID + orderID);\n Set<String> set = maps.keySet();\n\t\tfor(String string : set){\n\t\t List<ShoppingCartVO> temp1= maps.get(string);\n\t\t double supplierFreight = 0d;\n\t\t if(supplierFreightMap.size()>0)\n\t\t {\n\t\t\t supplierFreight = supplierFreightMap.get(string);\n\t\t }\n\t\t Double amount = 0d;\n\t\t Integer count = 0;\n Integer score = 0;\n Double weight = 0d;\n\t\t for (ShoppingCartVO shoppingCartVO : temp1) {\n ItemVO itemVO = itemDAO.findItemById(shoppingCartVO.getItemID());\n count += shoppingCartVO.getItemCount();\n // weight += itemVO.getWeight();\n if (shoppingCartVO.getType() == 1) {\n amount += shoppingCartVO.getItemCount() * shoppingCartVO.getSalesPrice();\n } else if (shoppingCartVO.getType() == 2) {\n score += shoppingCartVO.getItemCount() * itemVO.getScore();\n } else if (shoppingCartVO.getType() == 3) {\n amount += shoppingCartVO.getItemCount() * itemVO.getScorePrice();\n score += shoppingCartVO.getItemCount() * shoppingCartVO.getSalesScore();\n }\n }\n\t\t //SalesOrderVO tempOrder = new SalesOrderVO();\n\t /*if (tempOrder == null) {\n\t throw new Exception(\"参数错误\");\n\t }\n\t if (\"012\".indexOf(invoiceType) == -1) {\n\t throw new Exception(\"参数错误\");\n\t }*/\n\t SalesOrderDTO salesOrderDTO = new SalesOrderDTO();\n\t salesOrderDTO.setMainID(randomNumeric());\n\t salesOrderDTO.setCustomerID(customerID);\n\t salesOrderDTO.setPaymentType(Integer.valueOf(paymentType));\n\t salesOrderDTO.setPaymentStatus(0);\n\n\t // salesOrderDTO.setExpressFee(tempOrder.getExpressFee());//运费\n\t salesOrderDTO.setProductAmount(amount);\n\t salesOrderDTO.setTotalAmount(amount + supplierFreight);\n\t salesOrderDTO.setPayableAmount(amount);\n\n\t salesOrderDTO.setOrderType(Integer.valueOf(orderType));\n\t salesOrderDTO.setMemo(getMemoBySupplier(memos,string.split(\"_\")[0]));\n\t salesOrderDTO.setInvoiceType(Integer.parseInt(invoiceType));\n\t salesOrderDTO.setInvoiceTitle(invoiceTitle);\n\t salesOrderDTO.setSupplierID(string);\n\t salesOrderDTO.setExpressFee(supplierFreight);\n\t salesOrderDAO.addSalesOrder(salesOrderDTO);\n\t ordersList.append(salesOrderDTO.getMainID()+\",\");\n\t // 支付方式1:余额支付2:货到付款3:在线支付4:积分礼品5:线下汇款\n\t if(!paymentType.equals(\"3\")){\n\t \t//3:在线支付\n\t \t CustomerDeliveryAddressVO customerDeliveryAddressVO = customerDeliveryAddressDAO.findAddressByID(Long.valueOf(addressID));\n\t \t if (customerDeliveryAddressVO != null) {\n\t \t SalesOrderDeliveryAddressDTO salesOrderDeliveryAddressDTO = new SalesOrderDeliveryAddressDTO();\n\t \t salesOrderDeliveryAddressDTO.setSalesOrderID(salesOrderDTO.getMainID());\n\t \t salesOrderDeliveryAddressDTO.setName(customerDeliveryAddressVO.getName());\n\t \t salesOrderDeliveryAddressDTO.setCountryID(customerDeliveryAddressVO.getCountryID());\n\t \t salesOrderDeliveryAddressDTO.setProvinceID(customerDeliveryAddressVO.getProvinceID());\n\t \t salesOrderDeliveryAddressDTO.setCityID(customerDeliveryAddressVO.getCityID());\n\t \t salesOrderDeliveryAddressDTO.setDisctrictID(customerDeliveryAddressVO.getDisctrictID());\n\t \t salesOrderDeliveryAddressDTO.setAddress(customerDeliveryAddressVO.getAddress());\n\t \t salesOrderDeliveryAddressDTO.setMobile(customerDeliveryAddressVO.getMobile());\n\t \t salesOrderDeliveryAddressDTO.setTelephone(customerDeliveryAddressVO.getTelephone());\n\t \t if (customerDeliveryAddressVO.getZip() != null) {\n\t \t salesOrderDeliveryAddressDTO.setZip(customerDeliveryAddressVO.getZip());\n\t \t }\n\t \t salesOrderDeliveryAddressDAO.insertSalesOrderDeliveryAddress(salesOrderDeliveryAddressDTO);\n\t \t }\n\t \t ShippingAddressVO shippingAddressVO = shippingAddressDAO.findDefaultShippingAddress();\n\t \t if (shippingAddressVO != null) {\n\t \t SalesOrderShippingAddressDTO salesOrderShippingAddressDTO = new SalesOrderShippingAddressDTO();\n\t \t salesOrderShippingAddressDTO.setSalesOrderID(salesOrderDTO.getMainID());\n\t \t salesOrderShippingAddressDTO.setName(shippingAddressVO.getName());\n\t \t salesOrderShippingAddressDTO.setCountryID(shippingAddressVO.getCountryID());\n\t \t salesOrderShippingAddressDTO.setProvinceID(shippingAddressVO.getProvinceID());\n\t \t salesOrderShippingAddressDTO.setCityID(shippingAddressVO.getCityID());\n\t \t salesOrderShippingAddressDTO.setDisctrictID(shippingAddressVO.getDisctrictID());\n\t \t salesOrderShippingAddressDTO.setAddress(shippingAddressVO.getAddress());\n\t \t salesOrderShippingAddressDTO.setMobile(shippingAddressVO.getMobile());\n\t \t salesOrderShippingAddressDTO.setTelephone(shippingAddressVO.getTelephone());\n\t \t salesOrderShippingAddressDTO.setZip(shippingAddressVO.getZip());\n\t \t salesOrderShippingAddressDAO.insertSalesOrderShippingAddress(salesOrderShippingAddressDTO);\n\t \t }\n\t }\n\t \n\t ItemDTO itemDTO = new ItemDTO();\n\t SupplierItemDTO supplierItemDTO = new SupplierItemDTO();\n\t SalesOrderLineDTO salesOrderLineDTO = new SalesOrderLineDTO();\n\t if (generateType.equals(\"quickBuy\")) {\n\t generateQuickBuyOrder(itemCount,cartIDs, itemID, supplierID, objID, salesOrderDTO, itemDTO, supplierItemDTO,\n\t salesOrderLineDTO);\n\n\t } else if (generateType.equals(\"oneKey\")) {\n\t generateOneKeyOrder(customerID, itemCount, itemType, objID, salesOrderDTO, itemDTO, supplierItemDTO,\n\t salesOrderLineDTO);\n\n\t } else if (generateType.equals(\"shoppingcart\")) {\n\t \tgenarateShoppingCartOrderTparts(customerID, cartIDs, itemCount, itemType, objID, salesOrderDTO, itemDTO,\n\t supplierItemDTO, salesOrderLineDTO);\n\t } else {\n\t throw new Exception(\"订单类型无法确定\");\n\t }\n\t num++;\n\t\t}\n return ordersList;\n }", "public List prices() {\n List ls = new ArrayList();\n try {\n\n Connection connection = DBUtil.getConnection();\n //PreparedStatement pst = connection.prepareStatement(\"select PriceId,VegetableId,GovernmentPrice,FarmerPrice,WholeSellerPrice,\"\n // + \"RetailerPrice from PriceDetails\");\n /*PreparedStatement pst = connection.prepareStatement(\"SELECT PriceDetails.PriceId,VegetableDetails.VegetableName,PriceDetails.GovernmentPrice,\"\n + \"PriceDetails.FarmerPrice,PriceDetails.WholeSellerPrice,PriceDetails.RetailerPrice\"\n + \" from PriceDetails INNER JOIN VegetableDetails \"\n + \"ON PriceDetails.VegetableId = VegetableDetails.VegetableId\");\n */\n\n PreparedStatement pst = connection.prepareStatement(\"select PriceDetails.PriceId,VegetableDetails.VegetableName,\"\n + \"PriceDetails.GovernmentPrice,PriceDetails.FarmerPrice,PriceDetails.WholeSellerPrice,\"\n + \"PriceDetails.RetailerPrice from PriceDetails INNER JOIN VegetableDetails ON PriceDetails.VegetableId = \"\n + \"VegetableDetails.VegetableId\");\n\n ResultSet rs = pst.executeQuery();\n while (rs.next()) {\n ViewPricesBean vpb = new ViewPricesBean();\n\n vpb.setPriceId(rs.getInt(1));\n vpb.setVegetableName(rs.getString(2));\n // vpb.setRegionName(rs.getString(3));\n vpb.setGovernmentPrice(rs.getFloat(3));\n vpb.setFarmerPrice(rs.getFloat(4));\n vpb.setWholeSellerPrice(rs.getFloat(5));\n vpb.setRetailerPrice(rs.getFloat(6));\n\n\n ls.add(vpb);\n\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return ls;\n\n }", "List<Salesman> findAll();", "public void startNewSale() {\n sale = new Sale(cashRegister);\n }", "public transact() {\n initComponents();\n //String type=jComboBox1.getSelectedItem().toString();\n//JOptionPane.showMessageDialog(null,type);\n try{\n javaconnect connect=new javaconnect();\n Connection conn=javaconnect.getConnection();\n //Connection conn=null;\n ResultSet rs=null;\n Statement stmt=null;\n PreparedStatement pst=null;\n \n String sql6=\"select `id` as 'id',name as 'Name',detail as 'Description',quantity as 'Quantity',supplier as 'Supplier',price as 'Cost (Ksh)' from product\";\n pst=conn.prepareStatement(sql6);\n rs=pst.executeQuery(); \n //JOptionPane.showMessageDialog(null,rs.getString(\"Quantity\"));\n jTable1.setModel(DbUtils.resultSetToTableModel(rs));\n String sql2=\"select * from cart\";\n pst=conn.prepareStatement(sql2);\n rs=pst.executeQuery();\n cart.setModel(DbUtils.resultSetToTableModel(rs));\n TableColumnModel tcm=jTable1.getColumnModel();\n tcm.removeColumn(tcm.getColumn(0));\n TableColumnModel tcm1=cart.getColumnModel();\n tcm1.removeColumn(tcm1.getColumn(0));\nResultSet rs2=null;\n PreparedStatement pst2=null;\n String sql4=\"select SUM(total_cost) from cart\";\n pst2=conn.prepareStatement(sql4);\n \n rs2=pst2.executeQuery();\n while (rs2.next()) \n \n{\n int std = rs2.getInt(1);\n total_l.setText(String.valueOf(std));\n}\n DateFormat dtf=new SimpleDateFormat(\"yyyy-MM-dd\");\n // Date date=new Date();\n Date date=new Date();\n dtf.format(date);\n sell_date.setDate(date);\nString sql_ps=\"select id,name,detail,quantity,total_cost,profit,date_sold,sold_by from sells where date_sold like '%\"+dtf.format(date)+\"%' order by date_sold desc\";\n pst=conn.prepareStatement(sql_ps);\n rs=pst.executeQuery();\n t_sold.setModel(DbUtils.resultSetToTableModel(rs));\n TableColumnModel tcm2=t_sold.getColumnModel();\n tcm2.removeColumn(tcm2.getColumn(0));\n \n }\n catch(Exception e){\n JOptionPane.showMessageDialog(null,e);\n }\n //DateFormat dtf=new SimpleDateFormat(\"yyyy/MM/dd\");\n //Date date=new Date();\n //dtf.format(date);\n // JOptionPane.showMessageDialog(null,dtf.format(date));\n // sell_date.setDate(dtf.format(date));\n \n \n }", "protected Sale(ArrayList<SaleItem> saleItemList){ \r\n\t\tthis.saleItemList = saleItemList;\r\n\t}", "@RequestMapping(\"onSale\")\n @ResponseBody\n //sku上架,skuinfo保存至elasticsearch\n public void onSale(SkuInfo skuInfo){\n SkuLsInfo skuLsInfo = new SkuLsInfo();\n\n try {\n BeanUtils.copyProperties(skuLsInfo,skuInfo);\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n\n listService.saveSkuLsInfo(skuLsInfo);\n }", "public List<SaleDetail> getAllSaleDetailsBySaleInvoice(int id) {\n SaleInvoice saleInvoice = saleInvoiceRepository.findById(id).orElseThrow(NullPointerException::new);\n return saleDetailRepository.findSaleDetailsBySaleInvoice(saleInvoice);\n }", "public List<String> getSalesMemoNo(String osOrderId) throws Exception{\n\t\tlogger.debug(\"getSalesMemoNo is called\");\n\t\tList<String> SmNoList = new ArrayList<String>();\n\t\tString SQL =\"SELECT SM_NUM \" \n\t\t\t\t+\"FROM Bomweb_St_Order_Pos_Assign \" \n\t\t\t\t+\"WHERE Order_Id = :osOrderId \" \n\t\t\t\t+\"AND sm_type_desc IN ('Normal Sales', 'Advance Sales' , 'Fast Track','Cash On Delivery')\";\n\n\t\tMapSqlParameterSource mapSql = new MapSqlParameterSource();\n\t\tmapSql.addValue(\"osOrderId\", osOrderId);\n\t\t\n\t\tParameterizedRowMapper<String> params = new ParameterizedRowMapper<String>() {\n\n\t\t\tpublic String mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\treturn rs.getString(\"SM_NUM\");\n\t\t\t}\n\t\t};\n\t\t\n\t\ttry {\n\t\t\tSmNoList = this.simpleJdbcTemplate.query(SQL, params, mapSql);\n\t\t\t\treturn SmNoList;\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Exception caught in getSalesMemoNo()\", e);\n\t\t\tthrow new DAOException(e.getMessage(), e);\n\t\t}\n\n/*\t\tParameterizedRowMapper<String> mapper = new ParameterizedRowMapper<String>() {\n\t\t\tpublic String mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tString smNo = new String();\n\t\t\t\tsmNo = rs.getString(\"SM_NUM\");\n\t\t\t\treturn smNo;\n\t\t\t}};\n\n\t\ttry {\n\t\t\tMapSqlParameterSource params = new MapSqlParameterSource();\n\t\t\tparams.addValue(\"orderId\", osOrderId);\n\t\t\tSmNoList = simpleJdbcTemplate.query(SQL, mapper,params);\n\t\t\treturn SmNoList;\n\t\t} catch (EmptyResultDataAccessException erdae) {\n\t\t\tSmNoList = null;\n\t\t\tthrow new AppRuntimeException(erdae);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Exception caught in getSalesMemoNo()\", e);\n\t\t\tthrow new Exception(e.getMessage(), e);\n\t\t}*/\n\t\t\n\t\t\n\t}", "public void listar_saldoMontadoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo_Montado.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaMontadoPorData(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }", "public List<Product> getSales() {\n return sales;\n }", "public int getSale() {\n\t\treturn sale;\r\n\t}", "public void getSavedRecord(MealVoucherConfiguration mealVoucher) {\n\r\n\t\tString query = \" SELECT MEAL_CONFIG_CASH, MEAL_CONFIG_FREQUENCY, MEAL_CONFIG_COUPEN, MEAL_CONFIG_DEBIT \"\r\n\t\t\t\t+ \" ,CASH.CREDIT_NAME,COUPEN.CREDIT_NAME,DEBIT_NAME , \" +\r\n\t\t\t\t\" MEAL_CONFIG_FROM, MEAL_CONFIG_TO, MEAL_CONFIG_AMT_LIMIT, MEAL_CONFIG_AMT_DECLARE, MEAL_FROM_PERIOD, MEAL_TO_PERIOD \"\r\n\t\t\t\t+ \" FROM HRMS_MEAL_VOUCHER_CONFIG \"\r\n\t\t\t\t+ \" INNER JOIN HRMS_CREDIT_HEAD CASH ON(CASH.CREDIT_CODE=HRMS_MEAL_VOUCHER_CONFIG.MEAL_CONFIG_CASH) \"\r\n\t\t\t\t+ \" INNER JOIN HRMS_CREDIT_HEAD COUPEN ON(COUPEN.CREDIT_CODE=HRMS_MEAL_VOUCHER_CONFIG.MEAL_CONFIG_COUPEN) \"\r\n\t\t\t\t+ \" INNER JOIN HRMS_DEBIT_HEAD ON(HRMS_DEBIT_HEAD.DEBIT_CODE=HRMS_MEAL_VOUCHER_CONFIG.MEAL_CONFIG_DEBIT) \";\r\n\r\n\t\tObject dataObj[][] = getSqlModel().getSingleResult(query);\r\n\r\n\t\tif (dataObj != null && dataObj.length > 0) {\r\n\t\t\t\r\n\t\t\tmealVoucher.setCreditCode(String.valueOf(dataObj[0][0]));\r\n\t\t\tmealVoucher.setFreqencyOfChange(String.valueOf(dataObj[0][1]));\r\n\t\t\tmealVoucher.setCoupenCode(String.valueOf(dataObj[0][2]));\r\n\t\t\tmealVoucher.setDebitCode(String.valueOf(dataObj[0][3]));\r\n\t\t\tmealVoucher.setCreditHead(String.valueOf(dataObj[0][4]));\r\n\t\t\tmealVoucher.setCoupenHead(String.valueOf(dataObj[0][5]));\r\n\t\t\tmealVoucher.setDebitHead(String.valueOf(dataObj[0][6]));\r\n\t\t\t\r\n\t\t\tmealVoucher.setFromYear(String.valueOf(dataObj[0][7]));\r\n\t\t\tmealVoucher.setToYear(String.valueOf(dataObj[0][8]));\r\n\t\t\tmealVoucher.setMealVoucherAmtLimit(String.valueOf(dataObj[0][9]));\r\n\t\t\tmealVoucher.setMealVoucherAmtDeclare(String.valueOf(dataObj[0][10]));\r\n\t\t\tmealVoucher.setFromPeriod(checkNull(String.valueOf(dataObj[0][11])));\r\n\t\t\tmealVoucher.setToPeriod(checkNull(String.valueOf(dataObj[0][12])));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "private void getAllItems() {\n\n try {\n double sellingPrice = 0;\n ArrayList<Item> allItems = ItemController.getAllItems();\n for (Item item : allItems) {\n double selling_margin = item.getSelling_margin();\n if (selling_margin > 0) {\n sellingPrice = item.getSellingPrice() - (item.getSellingPrice() * selling_margin / 100);\n } else {\n sellingPrice = item.getSellingPrice();\n }\n Object row[] = {item.getItemCode(), item.getDescription(), Validator.BuildTwoDecimals(item.getQuantity()), Validator.BuildTwoDecimals(sellingPrice)};\n tableModel.addRow(row);\n }\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static void loadSellTable()\n {\n final String QUERY = \"SELECT Sells.SellId, Sells.ProductId, Clients.FirstName, Clients.LastName, Products.ProductName, Sells.Stock, Sells.FinalPrice \"\n + \"FROM Sells, Products, Clients WHERE Sells.ProductId = Products.ProductId AND Sells.ClientId=Clients.clientId\";\n\n DefaultTableModel dtm = (DefaultTableModel) new SellDatabase().selectTable(QUERY);\n sellTable.setModel(dtm);\n }", "@Override\n\tpublic List<RotateBIDSale> listSale(String bidId) {\n\t\treturn dao.listSale(bidId);\n\t}", "private void getDataSemua(){\n try{\n ResultSet resultSet = database.getData(\"Select * from daftar_menu;\");\n list.clear();\n while (resultSet.next()) {\n list.add(\n new casher(\n resultSet.getString(1),\n resultSet.getString(2),\n resultSet.getString(3),\n resultSet.getInt(4),\n resultSet.getString(5),\n new Button(\"Tambah\"))\n );\n }\n }catch (SQLException e){\n System.out.println(e.getMessage());\n }\n }", "public void extractObjectDB() {\n\n\t\ttry {\n\t\t\t\n\t\t\tstatement = c.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(\"SELECT * FROM User WHERE id NOT IN (SELECT id FROM OrderManager)\");\n\t\t\tResultSet results = statement.executeQuery(\"select FirstName , LastName, Password,Phonenumber,AFM,User.id, Company,Regular,Season from User INNER JOIN OrderManager on User.id=OrderManager.Id\"); \n\t\t \n\n\t\t\twhile (rs.next()) {\n\t\t\t\n\t\t\t\tUser us = new User();\n\t\t\t\tus.setFirstName(rs.getString(\"FirstName\"));\n\t\t\t\tus.setSurName(rs.getString(\"LastName\"));\n\t\t\t\tus.setPassword(rs.getString(\"Password\"));\n\t\t\t\tus.setTelephone(rs.getString(\"Phonenumber\"));\n\t\t\t\tus.setAFM(rs.getString(\"AFM\"));\n\t\t\t\tus.setId(rs.getString(\"id\"));\n\t\t\t\tus.setCompany(rs.getString(\"Company\"));\n\t\t\t\tusers.add(us);\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(User u: users)\n\t\t\t{\n\t\t\t\tint index = users.indexOf(u);\n\t\t\t\tif (u instanceof Stockkeeper) {\n\t\t\t\t\tStockkeeper st = (Stockkeeper) u;\n\t\t\t\t\tusers.set(index,st);\n\t\t\t\t}\n\t\t\t\telse if(u instanceof Seller){\n\t\t\t\t\tSeller se = (Seller) u;\n\t\t\t\t\tusers.set(index, se);\n\t\t\t}\n\t\t\t}\n\t\t\twhile (results.next()) {\n\t\t\t\t\n\t\t\t\tOrderManager om = new OrderManager(\"\",\"\",\"\",\"\",\"\",\"\",true,\"\");\n\t\t\t\tom.setFirstName(results.getString(\"FirstName\"));\n\t\t\t\tom.setSurName(results.getString(\"LastName\"));\n\t\t\t\tom.setPassword(results.getString(\"Password\"));\n\t\t\t\tom.setTelephone(results.getString(\"Phonenumber\"));\n\t\t\t\tom.setAFM(results.getString(\"AFM\"));\n\t\t\t\tom.setId(results.getString(\"id\"));\n\t\t\t\tom.setCompany(results.getString(\"Company\"));\n\t\t\t\tif (results.getInt(\"Regular\")== 0) \n\t\t\t\t\tom.setRegular(true);\n\t\t\t\telse \n\t\t\t\t\tom.setRegular(false);\n\t\t\t\tom.setSeason(results.getString(\"Season\"));\n\t\t\t\tusers.add(om);\n\t\t\t\t\n\t\t\t}\n\t\t\tc.close();\n\t\t}catch(SQLException | ClassNotFoundException e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\n\t\t\n\t}", "public List<Sale> getSalesLog() {\n return salesLog;\n }", "private void loadAllToTable() {\n try {\n ArrayList<ItemDTO> allItems=ip.getAllItems();\n DefaultTableModel dtm=(DefaultTableModel) tblItems.getModel();\n dtm.setRowCount(0);\n \n if(allItems!=null){\n for(ItemDTO item:allItems){\n \n Object[] rowdata={\n item.getiId(),\n item.getDescription(),\n item.getQtyOnHand(),\n item.getUnitPrice()\n \n };\n dtm.addRow(rowdata);\n \n }\n }\n } catch (Exception ex) {\n Logger.getLogger(AddItem.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n }", "public void accountSale(long storeID, final SaleTO sale) throws ProductOutOfStockException, NotInDatabaseException, UpdateException;", "@Override\n public ArrayList<ArtDirectorRequestDetails> getArtDirectorRequestDetails(String orinNo) throws PEPPersistencyException{\n \tLOGGER.info(\"inside getArtDirectorRequestDetails() dao impl\");\n \tList<ArtDirectorRequestDetails> artDirectorList = new ArrayList<ArtDirectorRequestDetails>();\n \tSession session = this.sessionFactory.openSession();\n Query query = null;\n Transaction tx = session.beginTransaction();\n query = session.createSQLQuery(xqueryConstants.getArtDirectorRequestDetails());\n query.setParameter(\"orinNo\", orinNo); \n query.setFetchSize(10);\n List<Object[]> rows = query.list();\n try{\n for(Object[] row: rows){\n \t\n \tArtDirectorRequestDetails ardDetails = new ArtDirectorRequestDetails();\n \tardDetails.setOrinNo(row[0]!=null?row[0].toString():null); \t\n \tardDetails.setImageId(row[1]!=null?row[1].toString():null);\n \tardDetails.setImageType(\"\");\n \tif(row[2] != null){\n \t\tardDetails.setImageLocation(row[2]!=null?row[2].toString():null);\n \t}else {\n \t\tardDetails.setImageLocation\t(\"\");\n \t}\n \tif(row[3] !=null){\n \t\tardDetails.setImageDescription(row[3]!=null?row[3].toString():null);\n \t}else{\n \t\tardDetails.setImageDescription(\"\");\n \t}\n \tif(row[4]!=null){\n \t\tardDetails.setAdditionalInfo(row[4]!=null?row[4].toString():null);\n \t}else {\n \t\tardDetails.setAdditionalInfo(\"\");\n \t}\n \tif(row[5] !=null){\n \t\tardDetails.setImageUrlDesc(row[5]!=null?row[5].toString():null);\n \t}else {\n \t\tardDetails.setImageUrlDesc(\"\");\n \t} \n \tif(row[6] !=null){\n \t\tardDetails.setArdIndicator(row[6]!=null?row[6].toString():null);\n \t}else {\n \t\tardDetails.setArdIndicator(\"\");\n \t} \n \tif(row[7] !=null){\n \t\tardDetails.setArtDirectorNote((row[7]!=null?row[7].toString():null));\n \t}else {\n \t\tardDetails.setArtDirectorNote(\"\");\n \t} \n \tif(row[8] !=null){\n \t\tardDetails.setImageStatus((row[8]!=null?row[8].toString():null));\n \t}else {\n \t\tardDetails.setImageStatus(\"\"); \t} \n \t\n \tartDirectorList.add(ardDetails); \t\n \t\n }\n }catch(Exception e){\n \te.printStackTrace();\n }\n finally{\n tx.commit();\n session.close(); \n }\n \n LOGGER.info(\"exiting getArtDirectorRequestDetails() dao impl\");\n return (ArrayList<ArtDirectorRequestDetails>) artDirectorList;\n \n \n }", "public void setBorrowBookDetailsToTable() {\n\n try {\n Connection con = databaseconnection.getConnection();\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(\"select * from lending_book where status= '\" + \"pending\" + \"'\");\n\n while (rs.next()) {\n String id = rs.getString(\"id\");\n String bookName = rs.getString(\"book_name\");\n String studentName = rs.getString(\"student_name\");\n String lendingDate = rs.getString(\"borrow_date\");\n String returnDate = rs.getString(\"return_book_datte\");\n String status = rs.getString(\"status\");\n\n Object[] obj = {id, bookName, studentName, lendingDate, returnDate, status};\n\n model = (DefaultTableModel) tbl_borrowBookDetails.getModel();\n model.addRow(obj);\n\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Error\");\n }\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n people.addAll(sp.getAll());\n idP.setCellValueFactory(new PropertyValueFactory<>(\"path_photo\"));\n price1.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n\n tabble1.setItems(people);\n try {\n ResultSet rs = c.createStatement().executeQuery(\"select path_photo, price from shoppingcart\");\n while(rs.next()){\n data1.add(new ShoppingCart(rs.getString(\"path_photo\"), rs.getDouble(\"price\")));\n \n }\n \n\n// TODO\n } catch (SQLException ex) {\n Logger.getLogger(ShoppingCartController.class.getName()).log(Level.SEVERE, null, ex);\n }\n Item2.setCellValueFactory(new PropertyValueFactory<>(\"path_photo\"));\n Price2.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n table.setItems(data1);\n }", "public void tofetchAllRecords(){\n\t\tsetPaymentAmountPanel(false);\n\t\tlstPlaceOrderPendingTransction.clear();\n\t\tList<RatePlaceOrder> lstRatePlaceOrder=placeOrderPendingTransctionService.toFetchAllRecordsFromDb(getCustomerId());\n\t\tif(lstRatePlaceOrder.size()>0){\n\t\t\tfor (RatePlaceOrder ratePlaceOrder : lstRatePlaceOrder) {\n\t\t\t\tPlaceOrderPendingTransctionDataTable placeOrderPendingDT=new PlaceOrderPendingTransctionDataTable();\n\t\t\t\tplaceOrderPendingDT.setRateOfferedPk(ratePlaceOrder.getRatePlaceOrderId());\n\t\t\t\tplaceOrderPendingDT.setCustomerId(ratePlaceOrder.getCustomerId());\n\t\t\t\tString custmerName=null;\n\t\t\t\tBigDecimal custrRef=null;\n\t\t\t\tString BeneName=null;\n\t\t\t\tString beneBankName=null;\n\t\t\t\tString curQtyName=null;\n\t\t\t\t//to Fetch Customer reference and Name\n\t\t\t\tcustrRef=gSMPlaceOrderRateFeedService.toFetchCustomerRef(ratePlaceOrder.getCustomerId());\n\t\t\t\tcustmerName=generalService.getCustomerNameCustomerId(ratePlaceOrder.getCustomerId());\n\t\t\t\tplaceOrderPendingDT.setCustomerName(custmerName);\n\t\t\t\tplaceOrderPendingDT.setCustomerRefNo(custrRef);\n\t\t\t\tplaceOrderPendingDT.setCustomerRefAndName(custrRef+ \"-\" +custmerName);\n\t\t\t\tplaceOrderPendingDT.setDocumentNumber(ratePlaceOrder.getDocumentNumber());\n\t\t\t\t//to bene name\n\t\t\t\tplaceOrderPendingDT.setBeneficiaryMasterId(ratePlaceOrder.getBeneficiaryMasterId().getBeneficaryMasterSeqId());\n\t\t\t\tBeneName=gSMPlaceOrderRateFeedService.toFetchBeneficiaryName(ratePlaceOrder.getBeneficiaryMasterId().getBeneficaryMasterSeqId());\n\t\t\t\tplaceOrderPendingDT.setBeneficiaryName(BeneName);\n\t\t\t\t//bene bank name\n\t\t\t\tplaceOrderPendingDT.setBeneficiaryBankId(ratePlaceOrder.getBeneficiaryBankId());\n\t\t\t\tbeneBankName=generalService.getBankName(ratePlaceOrder.getBeneficiaryBankId());\n\t\t\t\tplaceOrderPendingDT.setBeneficiaryBankName(beneBankName);\n\t\t\t\tplaceOrderPendingDT.setRateOffered(ratePlaceOrder.getRateOffered());\n\t\t\t\tplaceOrderPendingDT.setTransctionAmount(ratePlaceOrder.getTransactionAmount());\n\t\t\t\tplaceOrderPendingDT.setCurrencyId(ratePlaceOrder.getDestinationCurrenyId());\n\t\t\t\t//currency name qty code\n\t\t\t\t//ratePlaceOrder.getBeneficiaryMasterId().getBeneficaryMasterSeqId(),ratePlaceOrder.getAccountSeqquenceId().getBeneficaryAccountSeqId()\n\t\t\t\t/*curQtyName=gSMPlaceOrderRateFeedService.toFetchCurrencyQtyName(ratePlaceOrder.getCurrencyId());\n\t\t\t\tplaceOrderPendingDT.setCurrencyQtyName(\"[\"+curQtyName+\"]\");\n\t\t\t\tplaceOrderPendingDT.setAmountAndQtyName(ratePlaceOrder.getTransactionAmount()+ \"-\" +curQtyName);*/\n\t\t\t\t//remittance and service , delivery\n\t\t\t\tplaceOrderPendingDT.setRemitServiceId(ratePlaceOrder.getServiceMasterId());\n\t\t\t\tplaceOrderPendingDT.setRemitRemittanceId(ratePlaceOrder.getRemittanceModeId());\n\t\t\t\tplaceOrderPendingDT.setRemitDeliveryId(ratePlaceOrder.getDeliveryModeId());\n\t\t\t\tplaceOrderPendingDT.setCreatedBy(ratePlaceOrder.getCreatedBy());\n\t\t\t\tplaceOrderPendingDT.setCreatedDate(ratePlaceOrder.getCreatedDate());\n\t\t\t\tplaceOrderPendingDT.setModifiedBy(ratePlaceOrder.getModifiedBy());\n\t\t\t\tplaceOrderPendingDT.setModifiedDate(ratePlaceOrder.getModifiedDate());\n\t\t\t\tplaceOrderPendingDT.setApprovedBy(ratePlaceOrder.getApprovedBy());\n\t\t\t\tplaceOrderPendingDT.setApprovedDate(ratePlaceOrder.getApprovedDate());\n\t\t\t\tplaceOrderPendingDT.setIsActive(ratePlaceOrder.getIsActive());\n\t\t\t\tplaceOrderPendingDT.setRoutingCountry(ratePlaceOrder.getRoutingCountryId());\n\t\t\t\tplaceOrderPendingDT.setRoutingBank(ratePlaceOrder.getRoutingBankId());\n\t\t\t\tplaceOrderPendingDT.setRemitDocumentNumber(ratePlaceOrder.getApplDocumentNumber());\n\t\t\t\tplaceOrderPendingDT.setRemitDocumentFinanceYear(ratePlaceOrder.getApplDocumentFinanceYear());\n\t\t\t\tplaceOrderPendingDT.setPaymentCode(ratePlaceOrder.getCollectionMode());\n\t\t\t\tplaceOrderPendingDT.setBeneficiaryCountryId(ratePlaceOrder.getBeneficiaryCountryId());\n\n\t\t\t\tList<RemittanceApplication> lstRemittanceApplication= placeOrderPendingTransctionService.getTransactionDetails(ratePlaceOrder.getRatePlaceOrderId());\n\n\t\t\t\tif(lstRemittanceApplication!=null && lstRemittanceApplication.size()>0)\n\t\t\t\t{\n\t\t\t\t\tBigDecimal equivalentRemitAmount= lstRemittanceApplication.get(0).getLocalNetTranxAmount();\n\t\t\t\t\tBigDecimal equivalentCurrencyId=lstRemittanceApplication.get(0).getExCurrencyMasterByForeignCurrencyId().getCurrencyId();\n\t\t\t\t\tBigDecimal equivalentForeignTranxAmount= lstRemittanceApplication.get(0).getForeignTranxAmount();\n\n\t\t\t\t\tList<PopulateData> lstofCurrency = new ArrayList<PopulateData>();\n\n\t\t\t\t\tlstofCurrency= iPlaceOnOrderCreationService.getBasedOnCountyCurrency(ratePlaceOrder.getBeneficiaryCountryId());\n\t\t\t\t\tif(lstofCurrency!=null && lstofCurrency.size()>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(lstofCurrency.get(0).getPopulateId().compareTo(ratePlaceOrder.getDestinationCurrenyId())==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurQtyName=gSMPlaceOrderRateFeedService.toFetchCurrencyQtyName(ratePlaceOrder.getDestinationCurrenyId());\n\t\t\t\t\t\t\tplaceOrderPendingDT.setCurrencyQtyName(\"[\"+curQtyName+\"]\");\n\t\t\t\t\t\t\tplaceOrderPendingDT.setAmountAndQtyName(ratePlaceOrder.getTransactionAmount()+ \"-\" +\"[\"+curQtyName+\"]\");\n\n\t\t\t\t\t\t\tplaceOrderPendingDT.setRemitLocalAmount(equivalentRemitAmount);\n\n\n\t\t\t\t\t\t}else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurQtyName=gSMPlaceOrderRateFeedService.toFetchCurrencyQtyName(equivalentCurrencyId);\n\t\t\t\t\t\t\tplaceOrderPendingDT.setAmountAndQtyName(equivalentForeignTranxAmount+ \"-\" +\"[\"+curQtyName+\"]\");\n\t\t\t\t\t\t\tplaceOrderPendingDT.setRemitLocalAmount(equivalentRemitAmount);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlstPlaceOrderPendingTransction.add(placeOrderPendingDT);\n\t\t\t}\n\t\t\tif(lstPlaceOrderPendingTransction.size()>0)\n\t\t\t{\n\t\t\t\tsetPaymentAmountPanel(true);\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic List<SalesAnalysis> getSalesAnalysis(Date fromDate, Date toDate) {\r\n\t\t\r\n\t\tList<SalesAnalysis> salesAnalysisDetails=new ArrayList<>();\r\n\t\tSalesAnalysis salesAnalysis=new SalesAnalysis();\r\n\t\t\r\n\t\t//get orders placed in the given period\r\n\t\tList<Order> orderDetails=orderService.getOrdersBetween(fromDate, toDate);\r\n\t\t\r\n\t\tHashMap<String, Double> purchasePriceDetails=new HashMap<>();\r\n\t\tHashMap<String, Double> salesPriceDetails=new HashMap<>();\r\n\t\tint qty=0;\r\n\t\tdouble salesPrice=0;\r\n\t\tdouble purchasePrice=0;\r\n\t\t\r\n\t\t//get total revenue for period\r\n\t\tdouble totalRevenue=getTotalRevenueBetween(fromDate, toDate);\r\n\t\t\r\n\t\t//get best seller details for the products, category-wise(from PRODUCT table)\r\n\t\tList<Object[]> bestSellerDetails=productService.getBestSellerId();\r\n\t\tSystem.out.println(bestSellerDetails);\r\n\t\t\r\n\t\t\r\n\t\t//for each product category, check sales details\r\n\t\tfor(Object[] object:bestSellerDetails)\t{\r\n\t\t\tString productCategory=(String)object[0];\r\n\t\t\tsalesPrice=0;\r\n\t\t\tpurchasePrice=0;\r\n\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\r\n\t\t\t//for each order, check product category and add details to maps\r\n\t\t\tfor(Order order:orderDetails)\t{\r\n\t\t\t\t\r\n\t\t\t\t//get products in this order\r\n\t\t\t\tList<CartProduct> products=order.getCart().getCartProducts();\r\n\t\t\t\t\r\n\t\t\t\t//getting purchase price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tpurchasePrice=purchasePriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(product.getProduct().getQuantity()*product.getProduct().getProductPrice());\r\n\t\t\t\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//getting sales price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tqty=product.getQuantity();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsalesPrice=salesPriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(qty*(100-product.getProduct().getDiscount())*product.getProduct().getProductPrice())/100;\r\n\t\t\t\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\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\r\n\t\t\t//make SalesAnalysis object using obtained data\r\n\t\t\tsalesAnalysis.setProductCategory(productCategory);\r\n\t\t\tsalesAnalysis.setMerchant(merchantService.getMerchantName((Integer)object[1]));\r\n\t\t\tsalesAnalysis.setProductQuantity(purchasePriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setProductSales(salesPriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setSalesPercent((salesAnalysis.getProductSales()*100)/salesAnalysis.getProductQuantity());\r\n\t\t\tsalesAnalysis.setTotalRevenue(totalRevenue);\r\n\t\t\t\r\n\t\t\t//make a list of sales analysis performed\r\n\t\t\tsalesAnalysisDetails.add(salesAnalysis);\r\n\t\t}\r\n\t\t\r\n\t\treturn salesAnalysisDetails;\r\n\t}", "public ArrayList<OrderDetail> getOrderDetailList(){\n \n ArrayList<OrderDetail> orderdetailList = new ArrayList<OrderDetail>();\n try { \n //connecting java with database\n Class.forName(\"com.mysql.jdbc.Driver\");\n Connection con = DriverManager.getConnection(\"jdbc:mysql://127.0.0.1/doki_electronics\", \"root\", \"\");\n String query = \"SELECT * FROM order_details WHERE OrderNumber = ?\";\n \n ps = con.prepareStatement(query);\n ps.setInt(1, order.getOrderNum()-1);\n rs = ps.executeQuery();\n OrderDetail orderdetail;\n \n while(rs.next()){\n orderdetail = new OrderDetail(rs.getInt(\"OrderNumber\"),rs.getInt(\"ProductID\"),rs.getDouble(\"UnitPrice\"),rs.getInt(\"Quantity\"),rs.getDouble(\"Discount\"));\n orderdetailList.add(orderdetail);\n }\n }\n catch (SQLException ex) {\n Logger.getLogger(CashierProgram.class.getName()).log(Level.SEVERE, null, ex);\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(CashierProgram.class.getName()).log(Level.SEVERE, null, ex);\n }\n return orderdetailList;\n }", "@SuppressWarnings(\"unchecked\")\n \n \n private void table(){\n \n int c;\n \n try{\n \n Connection con1 = ConnectionProvider.getConn();\n Statement stm = con1.createStatement();\n ResultSet rst = stm.executeQuery(\"select * from sales\");\n ResultSetMetaData rstm = rst.getMetaData();\n \n c = rstm.getColumnCount();\n \n DefaultTableModel dtm2 = (DefaultTableModel)jTable1.getModel();\n dtm2.setRowCount(0);\n \n while (rst.next()){\n \n Vector vec = new Vector();\n \n for(int a =1 ; a<=c; a++)\n {\n vec.add(rst.getString(\"CustomerName\"));\n vec.add(rst.getString(\"OrderNo\"));\n vec.add(rst.getString(\"TypeOfService\"));\n vec.add(rst.getString(\"OrderType\"));\n vec.add(rst.getString(\"Descript\"));\n vec.add(rst.getString(\"OrderConfirmation\"));\n vec.add(rst.getString(\"OrderHandledBy\"));\n vec.add(rst.getString(\"OrderDate\"));\n vec.add(rst.getString(\"WarrantyExpireDate\"));\n vec.add(rst.getString(\"FullAmount\"));\n vec.add(rst.getString(\"AmountPaid\"));\n vec.add(rst.getString(\"Balance\"));\n }\n \n dtm2.addRow(vec);\n }\n \n }\n catch(Exception e)\n {\n \n }\n \n \n }", "public void setAllValues() {\n//\t\tNewRestaurantDetailsByStoreId newRestaurantDetailsByStoreId = null;\n\t\t\n\t\tif (Constants.allthemes!=null){\n\t\t int length = Constants.allthemes.size();\n\t\t for(int i=0;i<length;i++){\n\t\t \tThemes currentTheme = Constants.allthemes.get(i);\n\t\t \tAddObjectToList(currentTheme.photo_url,\n\t\t \t\t\tcurrentTheme.title, \n\t\t\t\t\t\t\"~\"+currentTheme.content,\n\t\t\t\t\t\t\"\",\n\t\t\t\t\t\tcurrentTheme.themeIndex);\n\t\t }\n\t\t \n\t\t \n\t\t runOnUiThread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tprepareArrayLits();//CREATE LIST VIEW OF THE NEW RESTAURANTS\n\t\t\t\t}\n\t\t\t});\n\t\t}else{\n\t\t\tToast.makeText(SlyThemesActivity.this, \"無資料,請重開App.\",Toast.LENGTH_SHORT).show();\n\t\t}\n\t}", "public void startSale() {\r\n System.out.println(\"[CashRegister] startSale\");\r\n System.out.println(\"\");\r\n\r\n //receipt = new Receipt(customerId); \r\n receipt = new Receipt(\"100\");\r\n\r\n //addItemToSale(productId, quantity);\r\n addItemToSale(\"A101\", 10);\r\n\r\n addItemToSale(\"B205\", 6);\r\n\r\n addItemToSale(\"C222\", 12);\r\n\r\n }", "public void ShowOrderDetailInJTable(){\n ArrayList<OrderDetail> list = getOrderDetailList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getOrderNumber();\n row[1] = list.get(i).getProductID();\n row[2] = \"Rp. \" + list.get(i).getUnitPrice();\n row[3] = list.get(i).getQuantity();\n row[4] = list.get(i).getDiscount()==0.05 ? \"5%\" : \"30%\";\n //total price\n double tempDiscount = list.get(i).getUnitPrice()*list.get(i).getQuantity()*list.get(i).getDiscount();\n// System.out.println(String.format(\"%.2f\",tempDiscount));\n double tempTotal = list.get(i).getUnitPrice()*list.get(i).getQuantity() - tempDiscount;\n// System.out.println(String.format(\"%.2f\", tempTotal));\n total=tempTotal+total;\n \n \n model2.addRow(row);\n }\n }", "public final void getSaleDocList() {\n showLoadingIndicator(true);\n SaleDocListViewModel saleDocListViewModel = this.viewModel;\n if (saleDocListViewModel == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"viewModel\");\n }\n String authString = getAuthString();\n String deviceId = AppUtils.getDeviceId(this);\n Intrinsics.checkExpressionValueIsNotNull(deviceId, \"AppUtils.getDeviceId(this)\");\n saleDocListViewModel.getSaleDocList(authString, deviceId, \"android\", String.valueOf(BuildConfig.VERSION_CODE), getRequestBody());\n }", "private void addRows() {\n this.SaleList.forEach(Factura -> {\n this.modelo.addRow(new Object[]{\n Factura.getId_Factura(),\n Factura.getPersona().getNombre(),\n Factura.getFecha().getTimestamp(),\n Factura.getCorreo(),\n Factura.getGran_Total()});\n });\n }", "private void initTable() {\n\t\tDefaultTableModel dtm = (DefaultTableModel)table.getModel();\n\t\tdtm.setRowCount(0);\t\t\n\t\tfor(int i=0;i<MainUi.controller.sale.items.size();i++){\n\t\t\tVector v1 = new Vector();\n\t\t\tv1.add(MainUi.controller.sale.items.get(i).getProdSpec().getTitle());\n\t\t\tv1.add(MainUi.controller.sale.items.get(i).getCopies());\n\t\t\tdtm.addRow(v1);\n\t\t}\n\t\tlblNewLabel.setText(\"\"+MainUi.controller.sale.getTotal());\n\t}", "public List<TblPurchaseOrder>getAllDataPurchaseOrder(Date startDate,Date endDate,TblPurchaseOrder po,TblSupplier supplier);", "private void getdataFromDb() {\n\t\tdbAdapter.openDataBase();\n\n\t\tString query = \"select * from list_manager where isVis =1\";\n\t\tCursor cursor = dbAdapter.selectRecordsFromDB(query, null);\n\t\tarrayList.clear();\n\n\t\t// int mCount = cursor.getCount();\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tListManagerModel listManagerModel = new ListManagerModel();\n\t\t\t\tlistManagerModel.setId(String.valueOf(cursor.getInt(0)));\n\t\t\t\tlistManagerModel.setName(cursor.getString(1));\n\t\t\t\tlistManagerModel.setIsVis(cursor.getString(2));\n\t\t\t\tlistManagerModel.setIsCheck(\"1\");\n\t\t\t\tarrayList.add(listManagerModel);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\n\t\tdbAdapter.close();\n\n\t}", "private void loadShopping(JTable customerList) {\n\n\t\tint SelectedRow = customerList.getSelectedRow();\n\t\tString name = customerList.getValueAt(SelectedRow, 6).toString();\n\t\tString last_name = customerList.getValueAt(SelectedRow, 5).toString();\n\t\tString customerName = name + \" \" + last_name;\n\t\tint InvoiceNumber;\n\t\tfloat InvoiceCost;\n\t\tString DateAndTime;\n\n\t\t((DefaultTableModel) table.getModel()).setRowCount(0);\n\n\t\ttry {\n\t\t\tPreparedStatement statement = DBConnection.connection\n\t\t\t\t\t.prepareStatement(\"SELECT Invoice_Numebr,Invoice_Cost,Date_And_Time from customer_shopping_account WHERE Customer_Name = '\"\n\t\t\t\t\t\t\t+ customerName + \"'\");\n\n\t\t\tResultSet result = statement.executeQuery();\n\n\t\t\twhile (result.next()) {\n\n\t\t\t\tInvoiceNumber = result.getInt(1);\n\t\t\t\tInvoiceCost = result.getFloat(2);\n\t\t\t\tDateAndTime = result.getString(3);\n\n\t\t\t\t((DefaultTableModel) table.getModel()).addRow(new Object[] {\n\n\t\t\t\tDateAndTime, InvoiceCost, InvoiceNumber,\n\t\t\t\t\t\ttable.getRowCount() + 1 });\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n\tpublic List<AlmacenDTO> listarSalida() {\n\t\tList<AlmacenDTO> data = new ArrayList<AlmacenDTO>();\n\t\tAlmacenDTO obj = null;\n\t\tConnection cn = null;\n\t\tPreparedStatement pstm = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tcn = new MySqlDbConexion().getConexion();\n\t\t\tString sql = \"select me.codigo_salida,p.nombre_producto,me.cantidad_salida,me.fecha_salida\\r\\n\" + \n\t\t\t\t\t\"from material_salida me inner join producto p on me.codigo_producto=p.codigo_producto\";\n\n\t\t\tpstm = cn.prepareStatement(sql);\n\t\t\trs = pstm.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tobj = new AlmacenDTO();\n\t\t\t\tobj.setCodigo_salida(rs.getInt(1));\n\t\t\t\tobj.setNombre_producto(rs.getString(2));\n\t\t\t\tobj.setCantidad_salida(rs.getInt(3));\n\t\t\t\tobj.setFecha_salida(rs.getDate(4));\n\n\t\t\t\tdata.add(obj);\n\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn data;\n\t}", "private void updateSuiteItems(String rowDatas, CustomSuite newCustomSuite) {\n List<SuiteItem> suiteItems = newCustomSuite.suiteItems;\n //创建一个List容器记录原来的 明细ID\n List<Long> itemIds = new ArrayList<>();\n for (SuiteItem suiteItem : suiteItems) {\n if(!suiteItem.deleted)\n itemIds.add(suiteItem.id);\n }\n\n String[] rowData = rowDatas.split(\";\");\n SuiteItem suiteItem;\n CustomStockItem customStockItem;\n for (String data : rowData) {\n String[] datas = data.split(\",\");\n if (datas.length > 1) {\n long id = Long.valueOf(datas[0]);\n if (id != 0) {\n if(itemIds.contains(id)){\n //update\n suiteItem = suiteItemRepository.findOne(id);\n if (datas[2].equals(\"true\")) {\n suiteItem.times = -1;\n } else {\n suiteItem.times = Integer.valueOf(datas[3]);\n }\n suiteItem.cost = Double.valueOf(datas[4]);\n itemIds.remove(id);//更新一个后 从Id集合中移除\n }\n } else {\n //新增\n\n customStockItem = customStockItemRepository.findOne(Long.valueOf(datas[1]));\n\n List<SuiteItem> isHasOne = suiteItemRepository.findBySkuItemAndCostAndDeleted(customStockItem, Double.valueOf(datas[4]), true);\n if(isHasOne != null && isHasOne.size()>0 ){\n isHasOne.get(0).deleted = false;\n if (datas[2].equals(\"true\")) {\n isHasOne.get(0).times = -1;\n } else {\n isHasOne.get(0).times = Integer.valueOf(datas[3]);\n }\n }else{\n suiteItem = new SuiteItem();\n suiteItem.skuItem = customStockItem;\n if (datas[2].equals(\"true\")) {\n suiteItem.times = -1;\n } else {\n suiteItem.times = Integer.valueOf(datas[3]);\n }\n suiteItem.cost = Double.valueOf(datas[4]);\n suiteItems.add(suiteItem);\n suiteItemRepository.save(suiteItem);\n }\n }\n }\n }\n //rowData操作完成\n for (Long itemId : itemIds) {\n SuiteItem deleteOne = suiteItemRepository.findOne(itemId);\n deleteOne.deleted = true;\n }\n// return suiteItems;\n }", "public void bookSale(Sale sale)\n {\n //books the sale\n }", "public SalesView() {\n initComponents();\n salesDetailTable.setAutoCreateColumnsFromModel(false);\n jdcTransaksi.setDate(new Date());\n enableForm(false);\n buttonConfig();\n salesDetailTable.getTableHeader().setFont(new Font(\"Segoe UI\", 0, 18)); \n }", "public void calculateSale()\n {\n double total = 0.00;\n int numTimbits = 0;\n int numDoughnuts = 0;\n int smallCoffee = 0;\n int mediumCoffee = 0;\n int largeCoffee = 0;\n String order;\n \n for(int i = 0; salesItem[i] != null && i < salesItem.length; i++)\n {\n if(salesItem[i] instanceof Timbit) \n {\n numTimbits = numTimbits + salesItem[i].getNumOfItems();\n }\n else if(salesItem[i] instanceof Doughnut)\n {\n numDoughnuts = numDoughnuts + salesItem[i].getNumOfItems();\n }\n else if(salesItem[i] instanceof Coffee)\n {\n if(salesItem[i].getNumOfItems()==1)\n {\n smallCoffee ++;\n }\n else if(salesItem[i].getNumOfItems()==2)\n {\n mediumCoffee ++;\n }\n else\n {\n largeCoffee ++;\n }\n }\n \n total += salesItem[i].getFinalPrice();\n }\n \n order = \"Timbits: \" + numTimbits + \"\\nDoughnuts: \" + numDoughnuts + \"\\nSmall Coffees: \" + smallCoffee + \"\\nMedium Coffees: \" + mediumCoffee + \"\\nLarge Coffees: \" + largeCoffee ; \n showText(order + String.format(\"\\nTotal Price: $%5.2f\", total), 150, 175);\n }", "public interface SaleModelInterface {\n\n SaleEntity getSaleByID(int saleID);\n\n List<SaleDisplayEntity> getSaleByTime(Date fromTime, Date toTime);\n\n List<SaleEntity> getAllSale();\n\n boolean createSave(SaleEntity saleEntity);\n\n void updateSale(SaleEntity sale);\n\n SaleEntity getSaleByProductId(int productId,Date date);\n\n int countSaleRecordToday(Date date);\n}", "public ArrayList<Desserts> getAllDesserts() { \r\n\t ArrayList<Desserts> AllDesserts = new ArrayList<Desserts>();\r\n\t try {\r\n\t Class.forName(\"com.mysql.jdbc.Driver\");\r\n\t Connection conn = DriverManager.getConnection(url+dbName,userName,password);\r\n\t statement=conn.createStatement();\r\n\t resultSet=statement.executeQuery(\"select * from g13restaurant.Desserts\");\r\n\t \r\n\t while ( resultSet.next() ) {\r\n\t \t Desserts nextDesserts = new Desserts(\r\n\t \t\t\t resultSet.getInt(\"dessert_ID\"), \r\n\t \t\t\t resultSet.getString(\"dessert_Name\"),\r\n\t resultSet.getString(\"dessert_Description\"), \r\n\t resultSet.getFloat(\"dessert_Cost\"),\r\n\t resultSet.getString(\"dessert_Type\").toString() ); \r\n\t AllDesserts.add(nextDesserts);\r\n\t }\r\n\t conn.close();\r\n\t } \r\n\t catch (Exception e) {\r\n\t e.printStackTrace();\r\n\t }\r\n\t return AllDesserts; \r\n\t }", "@Override\n\tpublic List<Object> getSaleList(Search search) throws Exception {\n\t\treturn null;\n\t}", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "void setDataIntoSuppBusObj() {\r\n supplierBusObj.setValue(txtSuppId.getText(),txtSuppName.getText(), txtAbbreName.getText(),\r\n txtContactName.getText(),txtContactPhone.getText());\r\n }", "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 fill_table()\n {\n Secante secante = new Secante(GraficaSecanteController.a, GraficaSecanteController.b, GraficaSecanteController.ep, FuncionController.e);\n list = secante.algoritmo();\n }", "public void setNumSales(int numSales){\r\n this.sales = numSales;\r\n }", "public void startSale()\n\t{\n\t\tpurchase.reset();\n\t}", "@SuppressLint(\"Recycle\")\n public void getData() {\n SQLiteDatabase ReadData = MyDatabase.getReadableDatabase();\n Cursor cursor = ReadData.rawQuery(\"SELECT * FROM \" + DBSLC.Review.NamaTabelReview + \" ORDER BY IdReview DESC\", null);\n cursor.moveToFirst();//Memulai Cursor pada Posisi Awal\n //Melooping Sesuai Dengan Jumlan Data (Count) pada cursor\n for (int count = 0; count < cursor.getCount(); count++) {\n cursor.moveToPosition(count);//Berpindah Posisi dari no index 0 hingga no index terakhir\n ReviewModel reviewModel = new ReviewModel(cursor.getString(0), cursor.getString(1),\n cursor.getString(2), cursor.getString(3), cursor.getString(4), cursor.getString(5),\n cursor.getString(6));\n myReview.add(reviewModel);\n }\n }", "void recordSale(Customer customer, Movie movie, SaleDetails saleDetails) {\n System.out.println(\"Connecting to Sales server\");\n AcmeSalesServer salesServer = AcmeSalesServer.connect();\n System.out.println(\"Adding sale to server\");\n salesServer.addSale(customer, movie, saleDetails);\n System.out.println(\"Sale added\");\n }", "public void showData(){\n listName.setText(this.listName);\n listDescription.setText(this.description);\n Double Total = Lists.getInstance().getLists(this.listName).getTotal();\n listTotal.setText(pending.toString());\n\n this.data = FXCollections.observableArrayList(Lists.getInstance().getLists(this.listName).getItems());\n articleColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"name\")\n );\n quantityColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"quantity\")\n );\n priceColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"price\")\n );\n totalColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"total\")\n );\n stateColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"state\")\n );\n this.itemsTable.setItems(data);\n\n }", "public void setSalesLog(List<Sale> salesLogToSet) {\n salesLog = salesLogToSet;\n }", "void all_Data_retrieve_Price_Desc() {\n\t\t\tStatement stm=null;\n\t\t\tResultSet rs=null;\n\t\t\ttry{\n\t\t\t\t//Retrieve tuples by executing SQL command\n\t\t\t stm=con.createStatement();\n\t\t String sql=\"select * from \"+tableName+\" order by Price desc\";\n\t\t\t rs=stm.executeQuery(sql);\n\t\t\t DataGUI.model.setRowCount(0);\n\t\t\t //Add rows to table model\n\t\t\t while (rs.next()) {\n\t Vector<Object> newRow = new Vector<Object>();\n\t //Add cells to each row\n\t for (int i = 1; i <=colNum; i++) \n\t newRow.addElement(rs.getObject(i));\n\t DataGUI.model.addRow(newRow);\n\t }//end of while\n\t\t\t //Catch SQL exception\n\t }catch (SQLException e ) {\n\t \te.printStackTrace();\n\t\t } finally {\n\t\t \ttry{\n\t\t if (stm != null) stm.close(); \n\t\t }\n\t\t \tcatch (SQLException e ) {\n\t\t \t\te.printStackTrace();\n\t\t\t }\n\t\t }\n\t\t}", "public void setData(List<Business> list) {\n }", "public interface SaleRecordDao {\r\n\r\n List<SaleRecord> getList();\r\n\r\n /**\r\n * 新建\r\n * @param saleRecord\r\n * @return\r\n */\r\n int create(@Param(\"saleRecord\")SaleRecord saleRecord);\r\n}", "@Override\n\tpublic List<Sold> selectSoldListBySeller(int seller_id) {\n\t\tList<Sold> list = new ArrayList<>();\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"SELECT * FROM sold WHERE seller_id=?\";\n \n\t\ttry {\n\t\t\tconn = getConnection();\n\t\t\tpstmt = conn.prepareStatement(sql);\n\t\t\tpstmt.setInt(1, seller_id);\n\t\t\trs = pstmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tSold sd = new Sold();\n\t\t\t\t\n\t\t\t\tsd.setOrder_id(rs.getInt(\"order_id\"));\n\t\t\t\tsd.setSeller_id(rs.getInt(\"seller_id\"));\n\t\t\t\tsd.setBook_id(rs.getInt(\"book_id\"));\n\t\t\t\tsd.setSold_date(rs.getDate(\"sold_date\"));\n\t\t\t\tsd.setSold_price(rs.getInt(\"sold_price\"));\n\t\t\t\tsd.setBuyer_id(rs.getInt(\"buyer_id\"));\n\t\t\t\tsd.setSold_date_string(rs.getString(\"sold_date\"));\n\t\t\t\t\n\t\t\t\tlist.add(sd);\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} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t\tif (pstmt != null)\n\t\t\t\t\tpstmt.close();\n\t\t\t\tif(conn !=null)\n\t\t\t\t\tconn.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n \n\t\treturn list;\n\t}" ]
[ "0.7025911", "0.6832165", "0.6603225", "0.6582435", "0.636677", "0.6355414", "0.6204116", "0.6199193", "0.6186734", "0.61422473", "0.61400646", "0.6138237", "0.6108412", "0.610233", "0.6049329", "0.6042895", "0.6021659", "0.60211295", "0.60044646", "0.5997757", "0.59971", "0.59933054", "0.59903914", "0.59539217", "0.59469503", "0.59463364", "0.59460163", "0.5938903", "0.59298044", "0.5922432", "0.59197944", "0.5918586", "0.59155655", "0.5899986", "0.5863421", "0.58530796", "0.5844256", "0.584049", "0.5834288", "0.5819234", "0.5814196", "0.5813757", "0.5808292", "0.5806198", "0.58050054", "0.57586145", "0.575137", "0.5744358", "0.57251257", "0.5722847", "0.57172835", "0.57104", "0.57030517", "0.57023156", "0.57018477", "0.56990546", "0.5698546", "0.56949216", "0.56875366", "0.5685227", "0.56846976", "0.5677822", "0.56765443", "0.564686", "0.564375", "0.5642584", "0.56355304", "0.56275815", "0.5609334", "0.560692", "0.5591241", "0.5584884", "0.5584188", "0.55806756", "0.55648834", "0.55610967", "0.5558815", "0.55493784", "0.55451715", "0.5539722", "0.5537078", "0.5501387", "0.5498004", "0.54900044", "0.5489178", "0.54860765", "0.5483389", "0.54825526", "0.54786915", "0.5471444", "0.5460948", "0.54608864", "0.5456118", "0.5456019", "0.54533654", "0.5448513", "0.54393274", "0.54365504", "0.5431046", "0.54296863" ]
0.6240021
6
TODO Autogenerated method stub
@Override public void onClick(View arg0) { String ans1 = editbangundatar.getText().toString(); int answer = Integer.parseInt(editbangundatar.getText().toString()); if(answer == 16){ Toast.makeText(getActivity(), "True", Toast.LENGTH_LONG).show(); } else{ Toast.makeText(getActivity(), "Maaf, jawaban anda salah", Toast.LENGTH_LONG).show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void 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}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
System.err.println("glob: "+new String(pattern)+", "+pattern_index+" "+new String(name)+", "+name_index);
static private boolean glob(byte[] pattern, int pattern_index, byte[] name, int name_index) { int patternlen = pattern.length; if (patternlen == 0) return false; int namelen = name.length; int i = pattern_index; int j = name_index; while (i < patternlen && j < namelen) { if (pattern[i] == '\\') { if (i + 1 == patternlen) return false; i++; if (pattern[i] != name[j]) return false; i += skipUTF8Char(pattern[i]); j += skipUTF8Char(name[j]); continue; } if (pattern[i] == '*') { while (i < patternlen) { if (pattern[i] == '*') { i++; continue; } break; } if (patternlen == i) return true; byte foo = pattern[i]; if (foo == '?') { while (j < namelen) { if (glob(pattern, i, name, j)) { return true; } j += skipUTF8Char(name[j]); } return false; } else if (foo == '\\') { if (i + 1 == patternlen) return false; i++; foo = pattern[i]; while (j < namelen) { if (foo == name[j]) { if (glob(pattern, i + skipUTF8Char(foo), name, j + skipUTF8Char(name[j]))) { return true; } } j += skipUTF8Char(name[j]); } return false; } while (j < namelen) { if (foo == name[j]) { if (glob(pattern, i, name, j)) { return true; } } j += skipUTF8Char(name[j]); } return false; } if (pattern[i] == '?') { i++; j += skipUTF8Char(name[j]); continue; } if (pattern[i] != name[j]) return false; i += skipUTF8Char(pattern[i]); j += skipUTF8Char(name[j]); if (!(j < namelen)) { // name is end if (!(i < patternlen)) { // pattern is end return true; } if (pattern[i] == '*') { break; } } continue; } if (i == patternlen && j == namelen) return true; if (!(j < namelen) && // name is end pattern[i] == '*') { boolean ok = true; while (i < patternlen) { if (pattern[i++] != '*') { ok = false; break; } } return ok; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testCrazyPatterns() {\n assertEquals(\"java\\\\.\\\\{.*\\\\}\\\\.Array\", glob2Pattern(\"java.{**}.Array\").pattern());\n assertEquals(\"java\\\\./.*<>\\\\.Array\\\\$1\", glob2Pattern(\"java./**<>.Array$1\").pattern());\n assertEquals(\"\\\\+\\\\^\\\\$\", glob2Pattern(\"+^$\").pattern());\n }", "@Override\n public Path globVersionPattern() {\n return this.globPattern;\n }", "void extractGlobPatterns(CallExpression call) {\n if (call.getFunction() instanceof Identifier) {\n String functionName = ((Identifier) call.getFunction()).getName();\n if (!functionName.equals(\"glob\") && !functionName.equals(\"subpackages\")) {\n return;\n }\n\n Expression excludeDirectories = null;\n Expression include = null;\n ImmutableList<Argument> arguments = call.getArguments();\n for (int i = 0; i < arguments.size(); i++) {\n Argument arg = arguments.get(i);\n String name = arg.getName();\n if (name == null) {\n if (i == 0) { // first positional argument\n include = arg.getValue();\n }\n } else if (name.equals(\"include\")) {\n include = arg.getValue();\n } else if (name.equals(\"exclude_directories\")) {\n excludeDirectories = arg.getValue();\n }\n }\n if (include instanceof ListExpression) {\n for (Expression elem : ((ListExpression) include).getElements()) {\n if (elem instanceof StringLiteral) {\n String pattern = ((StringLiteral) elem).getValue();\n // exclude_directories is (oddly) an int with default 1.\n boolean exclude = true;\n if (excludeDirectories instanceof IntLiteral) {\n Number v = ((IntLiteral) excludeDirectories).getValue();\n if (v instanceof Integer && (Integer) v == 0) {\n exclude = false;\n }\n }\n if (functionName.equals(\"glob\")) {\n (exclude ? globs : globsWithDirs).add(pattern);\n } else {\n subpackages.add(pattern);\n }\n }\n }\n }\n }\n }", "public String toString() {\n/* 664 */ return this.pattern;\n/* */ }", "@Override\r\n\tpublic String globMultiLevel(String[] args) {\r\n\t\treturn globHelper(args);\r\n\t}", "@Override\r\n\tpublic String globOneFile(String[] args) {\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tfor (String arg : args) {\r\n\t\t\tbuilder.append(arg);\r\n\t\t\tbuilder.append(NEW_LINE);\r\n\t\t}\r\n\t\treturn builder.toString();\r\n\t}", "public WildcardPattern(String pattern) {\r\n this.pattern = pattern;\r\n }", "public String toString() {\n/* 666 */ return this.pattern;\n/* */ }", "private String convertGlobToRegEx(String line)\n {\n line = line.trim();\n int strLen = line.length();\n StringBuilder sb = new StringBuilder(strLen);\n // Remove beginning and ending * globs because they're useless\n if (line.startsWith(\"*\"))\n {\n line = line.substring(1);\n strLen--;\n }\n if (line.endsWith(\"*\"))\n {\n line = line.substring(0, strLen-1);\n strLen--;\n }\n boolean escaping = false;\n int inCurlies = 0;\n for (char currentChar : line.toCharArray())\n {\n switch (currentChar)\n {\n case '*':\n if (escaping)\n sb.append(\"\\\\*\");\n else\n sb.append(\".*\");\n escaping = false;\n break;\n case '?':\n if (escaping)\n sb.append(\"\\\\?\");\n else\n sb.append('.');\n escaping = false;\n break;\n case '.':\n case '(':\n case ')':\n case '+':\n case '|':\n case '^':\n case '$':\n case '@':\n case '%':\n sb.append('\\\\');\n sb.append(currentChar);\n escaping = false;\n break;\n case '\\\\':\n if (escaping)\n {\n sb.append(\"\\\\\\\\\");\n escaping = false;\n }\n else\n escaping = true;\n break;\n case '{':\n if (escaping)\n {\n sb.append(\"\\\\{\");\n }\n else\n {\n sb.append('(');\n inCurlies++;\n }\n escaping = false;\n break;\n case '}':\n if (inCurlies > 0 && !escaping)\n {\n sb.append(')');\n inCurlies--;\n }\n else if (escaping)\n sb.append(\"\\\\}\");\n else\n sb.append(\"}\");\n escaping = false;\n break;\n case ',':\n if (inCurlies > 0 && !escaping)\n {\n sb.append('|');\n }\n else if (escaping)\n sb.append(\"\\\\,\");\n else\n sb.append(\",\");\n break;\n default:\n escaping = false;\n sb.append(currentChar);\n }\n }\n return sb.toString();\n}", "public static void main(String[] args) {\n\n String[] split = \"hjhk***jklj,j\\nkl\".split(quote(\"***\") + \"|,\");\n for (String every : split)\n System.out.println(\"test slpit: \" + every);\n// Pattern p = Pattern.compile(\"\\\\[([^\\\\]]+)\\\\]\");\n// Matcher m = p.matcher(\"[***]\");\n// while(m.find()) {\n// System.out.println(m.group(0));\n// }\n }", "private static String globToRegex(final String glob) {\n return \"^\" + glob.replace(\".\", \"\\\\.\").replace(\"*\", \".*\") + \"$\";\n }", "String findMatches(String filePath, String pattern) {\n\t Pattern regexp = Pattern.compile(pattern);\n\t Matcher m = null;\n\t String output = \"\";\n\t Path path = Paths.get(filePath);\n\t try {\n\t \t\tBufferedReader reader = Files.newBufferedReader(path, m_oEncoding);\n\t \t\tLineNumberReader lineReader = new LineNumberReader(reader);\n\t \t\tString line = null;\n\t \t\twhile ((line = lineReader.readLine()) != null) {\n\t \t\t\tm = regexp.matcher(line); //reset the input\n\t \t\t\tif (m.find()) {\n\t \t\t\t\tm_nCount ++;\n\t \t\t\t\toutput = output + String.valueOf(m_nCount) +\" - \" + String.valueOf(lineReader.getLineNumber()) +\": \"+ line + \"\\n\";\n\t \t\t\t}\n\t \t\t}\n\t } catch (IOException ex){\n\t ex.printStackTrace();\n\t }\n\t return output;\n\t }", "public String getGlob() {\n return glob;\n }", "@Override\r\n\tpublic String globNoPaths(String[] args) {\r\n\t\treturn \"\";\r\n\t}", "private void checkForPattern(Pattern grepPattern, Path[] filePathArray, BufferedWriter writer) {\n for (int j = 0; j < filePathArray.length; j++) {\n try (BufferedReader reader = Files.newBufferedReader(filePathArray[j], Jsh.encoding)) {\n outputMatchedLines(grepPattern, reader, writer);\n } catch (IOException e) {\n throw new RuntimeException(\"grep: cannot open \" + filePathArray[j].getFileName());\n }\n }\n }", "public static void main(String[] args) {\n\t\t Pattern p = Pattern.compile(\"(a+)\");\r\n\t\t Matcher m = p.matcher(\"aaaaaba\");\r\n\t\t //System.out.println(m.matches())\r\n\t\t m.find();\t\t \r\n\t\t m.find();\r\n\t\t System.out.println(\"grCount \"+m.groupCount());\t \r\n\t\t MatchResult mr = m.toMatchResult();\r\n\t\t \r\n\t\t System.out.println(m.end());\r\n\t\t System.out.println(\"'\"+mr.group()+\"'\");\r\n\t\t System.out.println(\"start \"+mr.start(1));\r\n\t\t \r\n\t}", "public RegexFileFilter(Pattern pattern) {\n/* 104 */ if (pattern == null) {\n/* 105 */ throw new IllegalArgumentException(\"Pattern is missing\");\n/* */ }\n/* */ \n/* 108 */ this.pattern = pattern;\n/* */ }", "public void setPattern(String pattern)\n/* */ {\n/* 71 */ setPatterns(new String[] { pattern });\n/* */ }", "public String[] getPatterns()\n/* */ {\n/* 92 */ return this.patterns;\n/* */ }", "public int getPatternIndex(){\n\t\treturn this.indexPattern;\n\t}", "@DataBoundSetter\n public void setGlob(String glob) {\n this.glob = glob;\n }", "java.lang.String getResourcePatterns(int index);", "public String toString(){\n\t\tStringBuffer r = new StringBuffer();\n\t\tr.append(\"{\");\n\t\tr.append(indexPatternSet+\"(\"+indexPattern+\")\"+type);\n\t\tr.append(\"}\");\n\t\treturn r.toString();\n\t}", "public static void main(String[] args) {\n\t\tSingletonPattern singleton1 = SingletonPattern.getInstance();\n\t\tSystem.out.println(singleton1);\n\t\tSingletonPattern singleton2 = SingletonPattern.getInstance();\n\t\tSystem.out.println(singleton2);\n\t\tSingletonPattern singleton3 = SingletonPattern.getInstance();\n\t\tSystem.out.println(singleton3);\n\t\t\n\t\t//Builder Pattern\n\t\tBuilderPattern.Builder builder = new Builder();\n\t\t\n\t\tBuilderPattern builderPattern = builder.company(\"Company\").designation(\"Designation\").salary(10).name(\"Name\").build();\n\t\t\n\t\tSystem.out.println(builderPattern.toString());\n\t\t\n\t}", "@Test\n @Ignore\n public void testGlobExpansion() throws IOException {\n String container = \"test-container\" + randomUUID();\n BlobContainerClient blobContainerClient =\n azureBlobStoreFileSystem.getClient().createBlobContainer(container);\n\n // Create files\n List<String> blobNames = new ArrayList<>();\n blobNames.add(\"testdirectory/file1name\");\n blobNames.add(\"testdirectory/file2name\");\n blobNames.add(\"testdirectory/file3name\");\n blobNames.add(\"testdirectory/otherfile\");\n blobNames.add(\"testotherdirectory/file4name\");\n for (String blob : blobNames) {\n blobContainerClient.getBlobClient(blob).uploadFromFile(\"src/test/resources/in.txt\");\n }\n\n // Test patterns\n {\n AzfsResourceId pattern =\n AzfsResourceId.fromUri(\"azfs://account/\" + container + \"/testdirectory/file*\");\n List<String> expectedFiles =\n ImmutableList.of(\n \"azfs://account/\" + container + \"/testdirectory/file1name\",\n \"azfs://account/\" + container + \"/testdirectory/file2name\",\n \"azfs://account/\" + container + \"/testdirectory/file3name\");\n\n assertThat(\n expectedFiles, contains(toFilenames(azureBlobStoreFileSystem.expand(pattern)).toArray()));\n }\n\n {\n AzfsResourceId pattern =\n AzfsResourceId.fromUri(\"azfs://account/\" + container + \"/testdirectory/file[1-3]*\");\n List<String> expectedFiles =\n ImmutableList.of(\n \"azfs://account/\" + container + \"/testdirectory/file1name\",\n \"azfs://account/\" + container + \"/testdirectory/file2name\",\n \"azfs://account/\" + container + \"/testdirectory/file3name\");\n\n assertThat(\n expectedFiles, contains(toFilenames(azureBlobStoreFileSystem.expand(pattern)).toArray()));\n }\n\n {\n AzfsResourceId pattern =\n AzfsResourceId.fromUri(\"azfs://account/\" + container + \"/testdirectory/file?name\");\n List<String> expectedFiles =\n ImmutableList.of(\n \"azfs://account/\" + container + \"/testdirectory/file1name\",\n \"azfs://account/\" + container + \"/testdirectory/file2name\",\n \"azfs://account/\" + container + \"/testdirectory/file3name\");\n\n assertThat(\n expectedFiles, contains(toFilenames(azureBlobStoreFileSystem.expand(pattern)).toArray()));\n }\n\n {\n AzfsResourceId pattern =\n AzfsResourceId.fromUri(\"azfs://account/\" + container + \"/test*ectory/fi*name\");\n List<String> expectedFiles =\n ImmutableList.of(\n \"azfs://account/\" + container + \"/testdirectory/file1name\",\n \"azfs://account/\" + container + \"/testdirectory/file2name\",\n \"azfs://account/\" + container + \"/testdirectory/file3name\",\n \"azfs://account/\" + container + \"/testotherdirectory/file4name\");\n\n assertThat(\n expectedFiles, contains(toFilenames(azureBlobStoreFileSystem.expand(pattern)).toArray()));\n }\n\n // Clean up\n blobContainerClient.delete();\n }", "public SimpleGrep(ShellEnvironment env, String[] args) {\n\n super(env, args);\n if (args.length >2) {\n System.err.println(\"Can read only one file\");\n }else if (args.length<2){\n System.err.println(\"Need 2 arguments\");\n }\n\n\n File input = env.makeFile(args[1]);\n try {\n this.current = new BufferedReader(new FileReader(input));\n } catch (FileNotFoundException e) {\n caughtFatalException(\"Could not open file!\", e);\n }\n\n this.rawPattern=this.getRawPattern(args[0]);\n\n }", "protected boolean matchRegExpr(String input, GlobFilenameFilter pattern) {\n File file = new File(input);\n String path = file.toString();\n \n // On systems with a '\\' as pathseparator convert it to a forward slash '/'\n // That makes patterns platform independent\n if (File.separatorChar == '\\\\') {\n path = path.replace('\\\\', '/');\n }\n \n return pattern.accept(file, path);\n }", "public static void main (String ... args) {\n\n String titulo = \"simple\";\n String pattern = \"abc\";\n String source = \"avsfvasdfabcwefewafabc\";\n find(titulo, pattern, source);\n\n ////////////////////////\n titulo = \"Digitos...\";\n pattern = \"\\\\d\";\n source = \"9a8d70sd98f723708\";\n find(titulo, pattern, source);\n\n titulo = \"NO Digitos...\";\n pattern = \"\\\\D\";\n source = \"9a8d70sd98f723708\";\n find(titulo, pattern, source);\n\n titulo = \"\";\n pattern = \"a?\";\n source = \"aba\";\n find(titulo, pattern, source);\n\n titulo = \"dot methacharacter\";\n pattern = \"a.c\";\n source = \"ac abc a c\";\n find(titulo, pattern, source);\n\n titulo =\"Operator ^ carat\";\n pattern = \"proj1([^,])*\";\n source = \"proj3.txt,proj1sched.pdf,proj1,prof2,proj1.java\";\n find(titulo, pattern, source);\n\n }", "public String getPattern() {\r\n \treturn pattern;\r\n }", "@Override\r\n\tpublic String globFilesDirectories(String[] args) {\r\n\t\treturn globHelper(args);\r\n\t}", "public static void printAllCombinations(String pattern)\n {\n // create an empty stack (we can also use set, queue, vector\n // or any other container)\n Stack<String> stack = new Stack();\n stack.push(pattern); // push the pattern into the stack\n \n int index;\n \n // do till stack is not empty\n while (!stack.empty())\n {\n // pop string from stack and process it\n String curr = stack.pop();\n \n // index stores position of first occurrence of wildcard\n // pattern in curr\n if ((index = curr.indexOf('?')) != -1)\n {\n // replace '?' with 0 and 1 and push it to the stack\n for (char ch = '0'; ch <= '1'; ch++)\n {\n curr = curr.substring(0, index) + ch + \n curr.substring(index + 1);\n stack.push(curr);\n }\n }\n \n // If no wildcard pattern is found, print the string\n else\n System.out.println(curr);\n }\n }", "public final String getPattern() {\n/* 187 */ return this.m_pattern;\n/* */ }", "private JBurgPatternMatcher()\n\t{\n\t}", "public String listPatterns() {\n return \"Full list of patterns\";\n }", "static int getNumPatterns() { return 64; }", "public String getNamePattern() {\n return namePattern;\n }", "public static boolean isWildcard(String glob) {\n\t\treturn GLOB_META.matcher(glob).find();\n\t}", "@Test\n public void testMatches() {\n\n PathMatcher result = FileUtil.matcherForGlobExpression(FOLDER.toString());\n Assertions.assertThat(FileUtil.matches(FOLDER, result)).isTrue();\n\n result = FileUtil.matcherForGlobExpression(\"/temp\");\n Assertions.assertThat(FileUtil.matches(FOLDER, result)).isFalse();\n }", "public String getPattern() {\n\treturn pattern;\n }", "Pattern pattern() {\r\n\t\tArrayList<String> patternSpecs = new ArrayList<String>();\r\n\t\t\r\n\t\tif (delimiters.size() > 0) {\r\n\t\t delimiters.forEach(d -> patternSpecs.add(d.pattern().pattern()));\r\n\t\t} else {\r\n\t\t\tpatternSpecs.add(\"^.*$\");\r\n\t\t}\r\n\t\t\r\n\t\tString completeSpec = Joiner.on(\"|\").join(patternSpecs); // \r\n\t\t\r\n\t\tPattern pattern = Pattern.compile(completeSpec);\r\n\t\t\r\n\t\treturn pattern;\r\n\t}", "public static void main(String[] args) {\n splitRegex();\n\n }", "StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }", "public static void main(String[] args) {\n String s=\"a /*a*/ sd /*v*/\";\n Pattern p = Pattern.compile(\"(\\\\/\\\\*(\\\\w|\\r\\n)+\\\\*\\\\/)\");\n Matcher m = p.matcher(s);\n List<String> l = new ArrayList<>(100);\n\n while (m.find()) {\n System.out.println(\"tick\");\n l.add(s.substring(m.start()+2, m.end()-2));\n }\n\n System.out.println(l);\n }", "List<String> getFiles(String path, String searchPattern, String searchOption) throws IOException;", "public static void main(String[] args) {\n String pattern = \"orl\";\n String text = \"Hello World in Java\";\n\n searchPatternInText(pattern, text);\n\n //pattern = \"xyz\";\n //searchPatternInText(pattern, text);\n }", "public static void main(String[] args)\n {\n try\n {\n System.out.println(\"Regular expression [\"+args[0]+\"]\");\n NameParser parser = new NameParser();\n StringMatcher matcher = parser.parse(args[0]);\n for (int index = 1; index < args.length; index++)\n {\n String string = args[index];\n System.out.print(\"String [\"+string+\"]\");\n System.out.println(\" -> match = \"+matcher.matches(args[index]));\n }\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n }\n }", "public String getPattern() {\r\n return this.currPattern;\r\n }", "public static void main(String[] args) {\n String pat = args[0];\n String txt = args[1];\n char[] pattern = pat.toCharArray();\n char[] text = txt.toCharArray();\n\n KMP kmp1 = new KMP(pat);\n int offset1 = kmp1.search(txt);\n\n KMP kmp2 = new KMP(pattern, 256);\n int offset2 = kmp2.search(text);\n\n // print results\n StdOut.println(\"text: \" + txt);\n\n StdOut.print(\"pattern: \");\n for (int i = 0; i < offset1; i++)\n StdOut.print(\" \");\n StdOut.println(pat);\n\n StdOut.print(\"pattern: \");\n for (int i = 0; i < offset2; i++)\n StdOut.print(\" \");\n StdOut.println(pat);\n }", "List<String> getFiles(String path, String searchPattern) throws IOException;", "public void setPattern (String pattern) {\n this.pattern = pattern;\n }", "public Object[] getPattern(){\n return pattern;\n }", "public RegexFileFilter(String pattern, int flags) {\n/* 91 */ if (pattern == null) {\n/* 92 */ throw new IllegalArgumentException(\"Pattern is missing\");\n/* */ }\n/* 94 */ this.pattern = Pattern.compile(pattern, flags);\n/* */ }", "public static void main(String[] args) {\n\t\t\r\n\t\tpattern(5, 1, 1);\r\n\r\n\t}", "public GlobFilenameFilter(String regex, int options) {\n super(__CACHE, __MATCHER, regex, options);\n }", "public GlobFilenameFilter(String regex) {\n super(__CACHE, __MATCHER, regex);\n }", "public String getCommandLinePattern();", "public static String escapeGlob(String path) {\n\t\treturn GLOB_META.matcher(path).replaceAll(\"\\\\\\\\$1\");\n\t}", "public static Pattern globToRegex(String glob, char delimiter) {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tString nonDelimiter = \"[^\" + delimiter + \"]\";\n\t\tfor(int i =0; i<glob.length();i++) {\n\t\t\tchar c = glob.charAt(i);\n\t\t\tif(c == '*') {\n\t\t\t\tif(glob.charAt(i+1) == '*') {\n\t\t\t\t\ti++;\n\t\t\t\t\tbuilder.append(\".*\");\n\t\t\t\t} else {\n\t\t\t\t\tbuilder.append(nonDelimiter);\n\t\t\t\t\tbuilder.append('*');\n\t\t\t\t}\n\t\t\t} else if(c == delimiter) {\n\t\t\t\tbuilder.append(delimiter);\n\t\t\t} else if(c == '?') {\n\t\t\t\tbuilder.append(nonDelimiter);\n\t\t\t} else if(c == '\\\\') {\n\t\t\t\tbuilder.append(\"\\\\\\\\\");\n\t\t\t}\telse if(c == '.') {\n\t\t\t\tbuilder.append(\"\\\\.\");\n\t\t\t}else {\n\t\t\t\tbuilder.append(c);\n\t\t\t}\n\t\t}\n\t\tbuilder.append('$');\n\t\treturn Pattern.compile(builder.toString());\n\t}", "public static void main(String[] args) {\r\n\r\n\t\tString pattern = \"pattern\";\r\n\t\tString string = \"String used to search for patterns\";\r\n\t\tint sub = bruteForce(string, pattern);\r\n\t\tif (sub > -1) {\r\n\t\t\tSystem.out.println(\"Pattern found at index \" + sub + \": \" + string.substring(sub, sub + pattern.length()));\r\n\t\t} else {\r\n\t\t\tSystem.out.println(pattern + \" not found in \" + string);\r\n\t\t}\r\n\t\tsub = -1;\r\n\t\tsub = KMPSearch(string, pattern);\r\n\t\tif (sub > -1) {\r\n\t\t\tSystem.out.println(\"Pattern found at index \" + sub + \": \" + string.substring(sub, sub + pattern.length()));\r\n\t\t} else {\r\n\t\t\tSystem.out.println(pattern + \" not found in \\\"\" + string + \"\\\"\");\r\n\t\t}\r\n\t}", "public static List<Path> glob(String filePath, Path location) {\r\n List<Path> matched = new ArrayList<>();\r\n if (filePath != null && location != null) {\r\n Path globFilePath = Paths.get(location.toString(), filePath);\r\n if (!globFilePath.toFile().exists()) {\r\n String globPattern = String.format(\"glob:**%s\", filePath);\r\n walkFies(filePath, globPattern, location, matched);\r\n } else {\r\n matched.add(globFilePath);\r\n }\r\n }\r\n return matched;\r\n }", "public String getPattern () {\n return pattern;\n }", "public String getDefaultFilePattern();", "Pattern slotsPattern(ENodeBuilder b, Pattern optPrefix, String[] exports) {\n int offset = (null == optPrefix) ? 0 : 1;\n Pattern[] slotPatts = new Pattern[offset + exports.length];\n if (null != optPrefix) {\n slotPatts[0] = optPrefix;\n }\n for (int i = 0; i < exports.length; i++) {\n slotPatts[offset + i] = b.slotPattern(exports[i]);\n }\n return b.listPattern(slotPatts);\n }", "public String wild(String text, String pattern)\n {\n\t\tString result = \"\";\n\t\tif(pattern.contains(\"*\"))\n\t\t{\n\t\t\t\tArrayList<String> sb = new ArrayList<String>();\n\t\n\t\t\tString [] cards = pattern.split(\"\\\\*\");\n\t\t\tfor(int i=0;i<cards.length;i++)\n\t\t\t{\n\t\t\t\tif(!\"\".equalsIgnoreCase(cards[i]))\n\t\t\t\t\tsb.add(cards[i]);\n\t\t\t}\n\t\t\tboolean st=false,en=false;\n\t\n\t\t\tfor (String card : cards)\n\t\t\t{\n\t\t\t\tst = text.startsWith(card);\n\t\n\t\t\t\ten = text.endsWith(card);\n\t\t\t}\n\t\n\t\t\tif(st == true && sb.size() == 1)\n\t\t\t\ten = true;\n\t\t\tif(en == true && sb.size() == 1)\n\t\t\t\tst = true;\n\t\t\tif(st && en)\n\t\t\t\t//System.out.println(text);\n\t\t\t\tresult = text;\n\t\t}\n\t\telse if(pattern.contains(\"?\"))\n\t\t{\n\t\t\t\n\t\t\t//System.out.println(\"???\");\n\t\t\tint i=0;\n\t\t\tchar[] temp = pattern.toCharArray();\n\t\t\tString temp1=\"\",temp3=\"\";\n\t\t\t\n\t\t\tfor(char c : temp)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif(c == '?')\n\t\t\t\t\tbreak;\n\t\t\t\t\ti++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(i>0)\n\t\t\t{\n\t\t\t\ttemp1 = pattern.substring(0,i-1);\n\t\t\t\ttemp3 = pattern.charAt(i-1)+\"\";\n\t\t\t\t\t//System.out.println(temp1+\" ff \"+temp3);\n\t\t\t\t\t\n\t\t\t\t\tif(text.startsWith(temp1))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!\"\".equalsIgnoreCase(temp3))\n\t\t\t\t\t\t\t//System.out.println(text);\n\t\t\t\t\t\t\tresult = text;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t//System.out.println(text);\n\t\t\t\t\t\t\tresult = text;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t\ttemp3 = pattern.charAt(i+1)+\"\";\n\t\t\t\tif((i+2)<pattern.length())\n\t\t\t\t\ttemp1 = pattern.substring(i+2,pattern.length());\n\t\t\t\t//System.out.println(temp1+\" \"+temp3);\n\t\t\t\tif(text.startsWith(temp1))\n\t\t\t\t{\n\t\t\t\t\tif(!\"\".equalsIgnoreCase(temp3))\n\t\t\t\t\t\t//System.out.println(text);\n\t\t\t\t\t\tresult = text;\n\t\t\t\t\telse\n\t\t\t\t\t\tresult = text;\n\t\t\t\t\t//System.out.println(text);\n\t\t\t\t}\n\t\t\t\t//System.out.println(temp1);\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(text.equalsIgnoreCase(pattern))\n\t\t\t\t\t//System.out.println(text);\n\t\t\t\t\tresult = text;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\treturn result;\n\t\t}", "public String getPattern() {\r\n\t\treturn pattern;\r\n\t}", "public void setPattern(String pattern) {\r\n\t\tthis.pattern = pattern;\r\n\t}", "public static void main(String[] args) {\n\t \n\t System.out.println(\"Q3) a) The pattern 'BCD' found in text 'ABCADCBABABCDABCD' on index : \"+ search2(\"BCD\".toCharArray(),\"ABCADCBABABCDABCD\".toCharArray()));\n\t \n\t }", "private static String wildcardAsRegex( String wildcard ) {\n\t\tStringBuilder sb = new StringBuilder( wildcard.length() * 110 / 100 );\n\t\tfor ( int i = 0; i < wildcard.length(); i++ ) {\n\t\t\tfinal char c = wildcard.charAt( i );\n\t\t\tswitch (c) {\n\t\t\tcase '*':\n\t\t\t\tsb.append( \".*?\" );\n\t\t\t\tbreak;\n\n\t\t\tcase '?':\n\t\t\t\tsb.append( \".\" );\n\t\t\t\tbreak;\n\n\t\t\t// chars that have magic regex meaning. They need quoting to be taken\n\t\t\t// literally\n\t\t\tcase '$':\n\t\t\tcase '(':\n\t\t\tcase ')':\n\t\t\tcase '+':\n\t\t\tcase '-':\n\t\t\tcase '.':\n\t\t\tcase '[':\n\t\t\tcase '\\\\':\n\t\t\tcase ']':\n\t\t\tcase '^':\n\t\t\tcase '{':\n\t\t\tcase '|':\n\t\t\tcase '}':\n\t\t\t\tsb.append( '\\\\' );\n\t\t\t\tsb.append( c );\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tsb.append( c );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}", "default String getPattern() {\n return null;\n }", "private void compilePattern() {\r\n\r\n pattern_startOfPage = Pattern.compile(regex_startOfPage);\r\n pattern_headerAttribute = Pattern.compile(regex_headerAttribute);\r\n pattern_messageFirstLine = Pattern.compile(regex_messageFirstLine);\r\n pattern_messageContinuationLine = Pattern.compile(regex_messageContinuationLine);\r\n }", "public String getPattern() {\n\t\treturn pattern;\n\t}", "public String getPattern() {\n\t\treturn pattern;\n\t}", "public String getPattern() {\n return pattern;\n }", "public void getPatterns(int pack){\n FileHandle file = Gdx.files.internal(\"patterns.txt\");\n String text = file.readString();\n patternPacks = text.split(\";\");\n //System.out.println(patternPacks[pack]);\n }", "List<String> getFileSystemEntries(String path, String searchPattern) throws IOException;", "private String getPatterns()\n\t{\n\t\treturn (accepted ? FileSet.patternsToString(patternListPanel.getElements()) : null);\n\t}", "@Test\n public void findWithMaskIncorrectRegularExpression() throws Exception {\n List<File> fileList = fileFinder.find(path, \"?.txt\", fileFinder.getFILES());\n System.out.println(fileList.size());\n int sero = fileList.size();\n assertThat(sero == (fileList.size()), is(true));\n\n }", "public void processWildcards() {\n ws = new WildcardSegment();\n WildcardSegment next;\n int sw,mw; //Single Wildcard, Multi-Wildcard\n currIndex = 0;\n int ci = -1;\n Highlighter h = jta.getHighlighter();\n h.removeAllHighlights();\n String text = jtfFind.getText();\n \n String jText = jta.getText();\n if (text.equals(\"\")) {\n jtfFind.setBackground(Color.WHITE);\n }\n else {\n if (hasWildcards(text)) {\n int index = 0;\n int currIndex_w = currIndex;\n boolean tryAgain = false;\n text = processEscapeChars_w(text);\n text = validateWildcards(text);\n \n ws.setStart(0);\n next = ws.next;\n \n text = text.replace(\"^^\",\"~!~\");\n \n do {\n sw = text.indexOf(\"^#\");\n mw = text.indexOf(\"^*\");\n \n if ((sw != -1) && (mw != -1)) {\n if (sw < mw) {\n text = text.replaceFirst(\"\\\\Q^#\\\\E\",\"`#\");\n if (sw == 0) {\n ws.type = 1;\n }\n else {\n next.setStart(sw,1);\n index = next.start;\n next = next.next;\n }\n }\n else {\n text = text.replaceFirst(\"\\\\Q^*\\\\E\",\"`*\");\n if (mw == 0) {\n ws.type = 2;\n }\n else {\n next.setStart(mw,2);\n index = next.start;\n next = next.next;\n }\n }\n }\n else if (sw != -1) {\n text = text.replaceFirst(\"\\\\Q^#\\\\E\",\"`#\");\n if (sw == 0) {\n ws.type = 1;\n }\n else {\n next.setStart(sw,1);\n index = next.start;\n next = next.next;\n }\n }\n else {\n text = text.replaceFirst(\"\\\\Q^*\\\\E\",\"`*\");\n if (mw == 0) {\n ws.type = 2;\n }\n else {\n next.setStart(mw,2);\n index = next.start;\n next = next.next;\n }\n }\n \n sw = text.indexOf(\"^#\");\n mw = text.indexOf(\"^*\");\n if ((index != text.length() - 2) && (sw != (index + 2)) && (mw != (index + 2))) {\n next.setStart(index+2);\n index = next.start;\n next = next.next;\n }\n }\n while ((sw != -1) || (mw != -1));\n \n next = ws;\n while(next.start != -1) {\n switch (next.type) {\n case 0:\n if (next.next.type == -1) {\n next.seg = text.substring(next.start);\n }\n else {\n next.seg = text.substring(next.start,next.next.start);\n }\n break;\n case 1:\n next.seg = \"~`~\";\n break;\n case 2:\n next.seg = \"`~`\";\n break;\n default:\n //Do nothing\n break;\n }\n next = next.next;\n }\n //text = text.replace(\"~!~\",\"^\");\n next = ws;\n boolean keepLooking = true;\n int bSpace,bTab,bNewline,bIndex;\n while(next.start != -1) {\n switch (next.type) {\n case 0:\n index = jText.toLowerCase().indexOf(next.seg.toLowerCase(),currIndex_w);\n if (index == -1) {\n keepLooking = false;\n }\n else {\n if (next.start == 0) {\n //currIndex = index + 1;\n if (ci == -1) {\n ci = index + 1;\n }\n }\n if (ci == -1) {\n ci = index + 1;\n }\n if (next.next.start != -1) {\n currIndex_w = index + next.seg.length();\n }\n else {\n currIndex_w = index + 1;\n }\n }\n break;\n case 1:\n //index = jText.toLowerCase().indexOf(next.seg.toLowerCase(),currIndex_w);\n if (currIndex_w != jText.length()) {\n index = currIndex_w;\n }\n else {\n index = -1;\n }\n if (index == -1) {\n keepLooking = false;\n }\n else {\n if (next.start == 0) {\n //currIndex = index + 1;\n if (ci == -1) {\n ci = index + 1;\n }\n }\n if (ci == -1) {\n ci = index + 1;\n }\n if (next.next.start != -1) {\n next.seg = String.valueOf(jText.charAt(currIndex_w));\n currIndex_w = index + next.seg.length();\n }\n else {\n next.seg = String.valueOf(jText.charAt(currIndex_w));\n currIndex_w = index + 1;\n }\n }\n break;\n case 2:\n \n if (next.next.start != -1) {\n bIndex = jText.toLowerCase().indexOf(next.next.seg.toLowerCase(),currIndex_w);\n bSpace = jText.toLowerCase().indexOf(StringUtil.ASPACE,currIndex_w);\n bTab = jText.toLowerCase().indexOf(StringUtil.ATAB,currIndex_w);\n bNewline = jText.toLowerCase().indexOf(\"\\n\",currIndex_w);\n if ((bSpace != -1) && ((bSpace < bIndex) || (bIndex == -1))) {\n bIndex = -1;\n }\n \n if ((bTab != -1) && ((bTab < bIndex) || (bIndex == -1))) {\n bIndex = -1;\n }\n if ((bNewline != -1) && ((bNewline < bIndex) || (bIndex == -1))) {\n bIndex = -1;\n }\n index = bIndex;\n if ((currIndex_w != jText.length()) && (index == -1)) {\n tryAgain = true;\n }\n }\n else {\n bSpace = jText.toLowerCase().indexOf(StringUtil.ASPACE,currIndex_w);\n bTab = jText.toLowerCase().indexOf(StringUtil.ATAB,currIndex_w);\n bNewline = jText.toLowerCase().indexOf(\"\\n\",currIndex_w);\n \n bIndex = bSpace;\n if ((bTab != -1) && ((bTab < bIndex) || (bIndex == -1))) {\n bIndex = bTab;\n }\n if ((bNewline != -1) && ((bNewline < bIndex) || (bIndex == -1))) {\n bIndex = bNewline;\n }\n index = bIndex;\n if ((currIndex_w != jText.length()) && (index == -1)) {\n index = jText.length();\n }\n }\n \n if (index == -1) {\n keepLooking = false;\n }\n else {\n next.seg = jText.substring(currIndex_w,index);\n if (next.start == 0) {\n //currIndex = index + 1;\n if (ci == -1) {\n ci = index + 1;\n }\n }\n if (ci == -1) {\n ci = index + 1;\n }\n if (next.next.start != -1) {\n currIndex_w = index + next.seg.length();\n }\n else {\n currIndex_w = index + next.seg.length();\n }\n }\n break;\n default:\n //Do nothing\n break;\n }\n if (keepLooking) {\n next = next.next;\n }\n else {\n if (tryAgain) {\n next = ws;\n tryAgain = false;\n keepLooking = true;\n }\n else {\n break;\n }\n }\n }\n /*\n TestInfo.testWriteLn(\"Find String: \" + ws.makeFindString());\n TestInfo.testWriteLn(\"Find Type: \" + ws.makeFindType());\n TestInfo.testWriteLn(\"Find Start: \" + ws.makeFindStart());\n */\n if (keepLooking) {\n TestInfo.testWriteLn(\"String Found!\");\n }\n else {\n TestInfo.testWriteLn(\"String Not Found!\");\n }\n \n //Do search\n text = ws.makeFindString();\n index = jText.toLowerCase().indexOf(text.toLowerCase(),currIndex);\n if (index == -1) {\n jtfFind.setBackground(Color.RED);\n }\n else {\n try {\n currIndex = ci;\n // An instance of the private subclass of the default highlight painter\n Highlighter.HighlightPainter myHighlightPainter = new MyHighlightPainter(Color.YELLOW);\n oldHighlightPainter = myHighlightPainter;\n h.addHighlight(index,index+text.length(),myHighlightPainter);\n jtfFind.setBackground(Color.WHITE);\n jta.setSelectionColor(Color.CYAN);\n //jta.selectAll();\n jta.select(index,index+text.length());\n lastHighlight[0] = index;\n lastHighlight[1] = index + text.length();\n //jta.setSelectionEnd(index + text.length());\n }\n catch (BadLocationException e) {\n //Do nothing\n }\n }\n }\n else {\n text = processEscapeChars(text);\n \n int index = jText.toLowerCase().indexOf(text.toLowerCase());\n if (index == -1) {\n jtfFind.setBackground(Color.RED);\n }\n else {\n try {\n currIndex = index + 1;\n // An instance of the private subclass of the default highlight painter\n Highlighter.HighlightPainter myHighlightPainter = new MyHighlightPainter(Color.YELLOW);\n oldHighlightPainter = myHighlightPainter;\n h.addHighlight(index,index+text.length(),myHighlightPainter);\n jtfFind.setBackground(Color.WHITE);\n jta.setSelectionColor(Color.CYAN);\n //jta.selectAll();\n jta.select(index,index+text.length());\n lastHighlight[0] = index;\n lastHighlight[1] = index + text.length();\n //jta.setSelectionEnd(index + text.length());\n }\n catch (BadLocationException e) {\n //Do nothing\n }\n }\n }\n }\n }", "UsagePattern getUsagePattern();", "@Test\n public void testMatcherForGlobExpressionTrue() {\n\n PathMatcher result = FileUtil.matcherForGlobExpression(FOLDER.toFile().getPath());\n Assertions.assertThat(FileUtil.matches(FOLDER, result)).isTrue();\n }", "public void setPattern(Pattern pattern) {\n this.pattern = pattern;\n }", "@Test\n public void testMatcherForGlobExpressionFalse() {\n\n PathMatcher result = FileUtil.matcherForGlobExpression(\"/temp\");\n Assertions.assertThat(FileUtil.matches(FOLDER, result)).isFalse();\n }", "private void seekBy() {\n Queue<File> queue = new LinkedList<>();\n queue.offer(new File(root));\n while (!queue.isEmpty()) {\n File file = queue.poll();\n File[] list = file.listFiles();\n if (file.isDirectory() && list != null) {\n for (File tempFile : list) {\n queue.offer(tempFile);\n }\n } else {\n if (args.isFullMatch() && searchingFile.equalsIgnoreCase(file.getName())) {\n result.add(file);\n }\n if (args.isMask() && searchingFile.replaceAll(\"\\\\*\", \".*\").equalsIgnoreCase(file.getName())) {\n result.add(file);\n }\n if (args.isRegex() && file.getName().matches(args.getName())) {\n result.add(file);\n }\n }\n }\n this.writeLog(output, result);\n }", "public static void RE( String s){\n \tString path = \"txt\";\t\n\t\tFile file = new File(path);\t\t\n\t\tFile[] fs = file.listFiles();\n\t\tString A [ ] = new String [fs.length];\n\t\tfor(int i=0;i<fs.length;i++) {\n\t\t\tA[i]=fs[i].toString();\t\t\n\t\t\tlib.In myfile=new lib.In (A[i]);\n\t\t\tString f=myfile.readAll();\n\t\t\tmyfile.close();\n \n//\t\t\tString pattern =\"[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\\\.[a-zA-Z0-9_-]+)+\";\n//\t\t\tString pattern2 = \"(\\\\()?(\\\\d){3}(\\\\))?[- ](\\\\d){3}-(\\\\d){4}\";\n//\t\t\tString pattern3=\"([a-zA-Z0-9_-]+\\\\.)+w3.org\";\n//\t\t\tString pattern8=\"www.w3.org(/[a-zA-Z0-9_-]+)+/\";\n//\t\t\tString pattern9=\"www.w3.org(/[a-zA-Z0-9_-]+)+/#[a-zA-Z0-9_-]+\";\n//\t\t\tString pattern5=\"([a-zA-Z0-9_-]+\\\\.)+com\";\n//\t\t\tString pattern6=\"([a-zA-Z0-9_-]+\\\\.)+net\";\n//\t\t\tString pattern7=\"([a-zA-Z0-9_-]+\\\\.)+org\";\n\t\t\t\n\t\n\t\t\tString pattern10=s;\n\t\t\tPattern r = Pattern.compile(pattern10);\n\t\n\t\t\n\t\t\t// Now create matcher object.\n\t\t\tMatcher m = r.matcher(f);\n\t\t\twhile (m.find( )) {\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t\tSystem.out.println(\"Found value: \" + m.group(0) + \" at \" + m.start(0));\n\t\t\t} \n\t\t}\n }", "public void testFilenameCharacters () throws Throwable {\n assertEquals(\"/a%23b\", Uri.fromFile(new File(\"/a#b\")).getEncodedPath());\n\n //final AndroidFileSystem fs = (AndroidFileSystem)FileSystems.getDefault();\n Log.i(TAG, \"tree uri: \"+fs.getTreeDocumentUri(selected.resolve(\"a#b\")));\n\n final Path base = selected.resolve(getName());\n try {\n Files.createDirectory(base);\n assertTrue(Files.isDirectory(base));\n\n final Path a = Files.createFile(base.resolve(\"a.b\"));\n assertTrue(a.toString(), Files.isRegularFile(a));\n\n final Path b = Files.createFile(base.resolve(\"a#b\"));\n assertTrue(b.toString(), Files.isRegularFile(b));\n\n final Path c = Files.createFile(base.resolve(\"a%b\"));\n assertTrue(c.toString(), Files.isRegularFile(c));\n\n try (final DirectoryStream<Path> ds = Files.newDirectoryStream(base)) {\n final Set<Path> actual = new HashSet<>();\n for (final Path path : ds)\n assertTrue(\"duplicate: \"+path, actual.add(path));\n final Set<Path> expected = new HashSet<>(Arrays.asList(a, b, c));\n assertEquals(\"\", expected, actual);\n }\n }\n finally {\n Files.walkFileTree(base, Utils.DELETE_FILE_VISITOR);\n }\n }", "public GrepMain Grep (List<String> commandline) {\n if (commandline.size()>3 || commandline.size() < 2){\n System.out.println(\"what input in commandline don not obey format, check it please\");\n }\n // save information from commandline to command, word, fileNames\n String command = (commandline.size() == 2)? \"\":commandline.get(0);\n String word = (commandline.size() == 2)? commandline.get(0):commandline.get(1);\n String fileNames = (commandline.size() == 2)? commandline.get(1):commandline.get(2);\n try {\n //open file if fail print file not found\n BufferedReader readerTxt = new BufferedReader(new InputStreamReader(\n new FileInputStream(fileNames)));\n //[-v] [-i] [-r]\n for (String line = readerTxt.readLine(); line != null; line = readerTxt.readLine()) {\n if (command.contains(\"[-v]\")){\n if (command.contains(\"[-r]\")){\n if (command.contains(\"[-i]\")){\n if (!checkReg(word.toLowerCase(),line.toLowerCase())){\n System.out.println(line);\n }\n }else {\n if (!checkReg(word,line)){\n System.out.println(line);\n }\n }\n }else {\n if (command.contains(\"[-i]\")){\n if (!checkWord(word.toLowerCase(),line.toLowerCase())){\n System.out.println(line);\n }\n }else {\n if (!checkWord(word,line)){\n System.out.println(line);\n }\n }\n }\n }else {\n if (command.contains(\"[-r]\")){\n if (command.contains(\"[-i]\")){\n if (checkReg(word.toLowerCase(),line.toLowerCase())){\n System.out.println(line);\n }\n }else {\n if (checkReg(word,line)){\n System.out.println(line);\n }\n }\n }else {\n if (command.contains(\"[-i]\")){\n if (checkWord(word.toLowerCase(),line.toLowerCase())){\n System.out.println(line);\n }\n }else {\n if (checkWord(word,line)){\n System.out.println(line);\n }\n }\n }\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(\"file not found\");\n }\n return null;\n }", "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 }", "public static void main(String[] args) {\n String pattern = \"aabe\";\n String text = \"aabaacdeaaabe\";\n\n List<Integer> foundIndexes = KnuthMorrisPrattPatternSearch.performKMPSearch(text, pattern);\n\n if (foundIndexes.isEmpty()) {\n System.out.println(\"Pattern not found in the given text String\");\n } else {\n System.out.println(\"Pattern found in the given text String at positions: \"+\n foundIndexes.stream().map(Object::toString).collect(Collectors.joining(\", \")));\n }\n }", "public static void main(String[] args) {\n RegExp_final_version obj=new RegExp_final_version();\n BufferedReader br = null;\n\n\t\ttry {\n\n\t\t\tString sCurrentLine;\n \n\t\t\tbr = new BufferedReader(new FileReader(\"E:\\\\NetBeans Project workspace\\\\RegExp_final_version\\\\src\\\\regexp_final_version\\\\Inputs\"));\n\n System.out.println(\"Reading of Regular Exps: \");\n \n String [] exps=new String[Integer.parseInt(br.readLine())];\n for(int c1=0;c1<exps.length;c1++){\n System.out.println(exps[c1]=br.readLine());\n }\n System.out.println(\"\\n\\nReading The test Strings: \");\n String [] strs=new String[Integer.parseInt(br.readLine())];\n for(int c1=0;c1<strs.length;c1++){\n System.out.println(strs[c1]=br.readLine());\n }\n for (int i = 0; i < strs.length; i++) {\n for (int j = 0; j < exps.length; j++) {\n try{\n// System.out.println(\"CHECKER: i: \"+i+\": \"+exps[j]+\" , j: \"+j+\": \"+strs[i] );\n System.out.println(\"\\n-----------------------\"\n + \"\\n RESULTS: \"+\"i=\"+i+\" , j=\"+j+\"\\n ||\"\n + obj.supports(exps[j], strs[i])\n +\"||\\n---------------------\");\n\n }\n catch(Exception e){\n System.out.println(\"\\n_-___----__-\\nEXCEPTION: i: \"+i+\": \"+exps[i]+\" , j: \"+j+\": \"+strs[j] );\n// e.printStackTrace();\n }\n }\n }\n \n//\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n//\t\t\t obj.fullCode=obj.fullCode+sCurrentLine;\n// System.out.println(sCurrentLine);\n//\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null)br.close();\n\t\t\t} catch (IOException ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n \n }", "@Override public RebaseSearcher findSymbols(String pattern,String kind)\n{\n RebaseJavaSearch search = new RebaseJavaSearch(this);\n\n findSymbols(search,pattern,kind);\n\n return search;\n}", "@Override\n public Traversal<Vertex, Long> get_pattern_16_test() {\n return g.V().match(\n __.as(\"a\").out(\"KNOWS\").out(\"KNOWS\").as(\"c\"),\n __.as(\"a\").out(\"KNOWS\").as(\"c\"))\n .select(\"a\", \"c\")\n .by(\"firstName\")\n .by(\"firstName\")\n .count();\n }", "public Pattern getPattern(){\n\t\treturn pattern;\n\t}", "private void prepareInstance(String arg) {\n pattern = arg;\n }", "private static void loadPattern(String[] args) throws Exception {\n\t\t\n\t\tpattern = args[0];\n\t\t\n\t\tif (pattern.equals(\"\")) {\n\t\t\tthrow new EmptyStringException(\"Please provide a non-empty string to be searched.\");\n\t\t}\n\t\t\n\t\tif(pattern.matches(\"\\\\A\\\\p{ASCII}*\\\\z\") == false) {\n\t\t\tthrow new NonASCIIPattern(\"Please give an ASCII string to be searched.\") ;\n\t\t}\n\t}", "static private Pattern getInstantPattern() {\n if (instantPattern == null) {\n instantPattern = Pattern.compile(\"Z.*$\");\n }\n return instantPattern;\n }", "public int getPattern() {\n return this.pattern;\n }", "java.lang.String getFileNames(int index);", "java.lang.String getFileNames(int index);", "@Override\r\n\tpublic Node visitPatternExpr(PatternExprContext ctx) {\n\t\treturn super.visitPatternExpr(ctx);\r\n\t}", "public void runForEachSample(String dirName, String fnamePattern){\n System.out.println(\"Getting all files with reads per transcripts counts. Files names finish with \" + fnamePattern);\n File dir = new File(dirName);\n for (File ch : dir.listFiles()) {\n if (ch.isDirectory())\n for (File child : ch.listFiles()){\n if (child.getName().matches(fnamePattern)){\n try {\n getSNPStatisticsPerSample(child.getPath());\n } catch (IOException ex) {\n Logger.getLogger(GetAllStatisticsRNAseq.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n }\n }" ]
[ "0.62716496", "0.6105274", "0.59387225", "0.58973044", "0.5882337", "0.58676183", "0.58506346", "0.5817834", "0.5771393", "0.56655025", "0.56443095", "0.5542059", "0.5527174", "0.55227554", "0.54983723", "0.5443507", "0.54255325", "0.5388454", "0.5372047", "0.53616434", "0.5360156", "0.53590286", "0.53055704", "0.5300468", "0.5290867", "0.52788883", "0.5277587", "0.5242968", "0.5234045", "0.52142274", "0.52026707", "0.5200959", "0.5186439", "0.5184397", "0.5180448", "0.51711375", "0.5167942", "0.51649183", "0.5158547", "0.5153407", "0.51519084", "0.51464456", "0.51361287", "0.5127991", "0.512322", "0.5119892", "0.5111066", "0.509829", "0.5092731", "0.509102", "0.5090629", "0.5085178", "0.5080441", "0.50684035", "0.50670576", "0.50641024", "0.50348", "0.50180846", "0.5011176", "0.5008845", "0.5008066", "0.49944118", "0.49836025", "0.49808043", "0.49663746", "0.49643454", "0.4957957", "0.4949312", "0.49452537", "0.4925936", "0.4902148", "0.4902148", "0.48984808", "0.48943767", "0.48878738", "0.48767188", "0.48701182", "0.48577213", "0.48574543", "0.48486975", "0.48468944", "0.48454332", "0.48442373", "0.48404828", "0.48273128", "0.48184106", "0.48179147", "0.48131862", "0.4806441", "0.480408", "0.47970203", "0.4785012", "0.4781438", "0.47785306", "0.47722793", "0.4768403", "0.47651982", "0.47651982", "0.47608212", "0.4759099" ]
0.63597316
0
Constructs a new BaseNetHandler instance.
public BaseNetHandler(String name) { this.name = name; this.packets = new ArrayList<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GeneralNettyHandler() {\n\t\tthis(1024 * 8);\n\t}", "public GenericHandler() {\n\n }", "public PacketHandler() {}", "abstract public TelnetServerHandler createHandler(TelnetSocket s);", "EthHandler create(EthVersion version);", "CreateHandler()\n {\n }", "public Gateway() {\n genClient = new GenericClient<Gateway>(this);\n }", "public InternalConnectionHandler() {\r\n\t\tthis.setPacketProcessor(InternalPacketProcessor.getInstance());\r\n\t}", "public DefaultCniNetworkInner() {\n }", "public static Class<?> getNetHandlerClass() {\n \t\treturn getMinecraftClass(\"NetHandler\", \"Connection\");\n \t}", "public static NetworkTagManager create()\n {\n return new ForgeNetworkTagManager();\n }", "ByteHandler getInstance();", "public static HandlerBuilder newHandlerBuilder() {\n return new HandlerBuilder();\n }", "@Override\n public Http2ConnectionHandler build() {\n return super.build();\n }", "private HandlerBuilder() {\n }", "public ConfigParserHandler() {\n\t}", "protected BaseLdpHandler(final TrellisRequest request, final ServiceBundler services,\n final Map<String, IRI> extensions, final String baseUrl) {\n this.request = requireNonNull(request, \"request may not be null!\");\n this.services = requireNonNull(services, \"services may not be null!\");\n this.extensions = requireNonNull(extensions, \"extensions may not be null!\");\n this.requestBaseUrl = getRequestBaseUrl(request, baseUrl);\n }", "private NettyServerHandler createHandler(ServerTransportListener transportListener) {\n return NettyServerHandler.newHandler(\n transportListener, streamTracerFactories, maxStreams,\n flowControlWindow, maxHeaderListSize, maxMessageSize,\n keepAliveTimeInNanos, keepAliveTimeoutInNanos,\n maxConnectionIdleInNanos,\n maxConnectionAgeInNanos, maxConnectionAgeGraceInNanos,\n permitKeepAliveWithoutCalls, permitKeepAliveTimeInNanos);\n }", "static SecurityHandler create() {\n return DEFAULT_INSTANCE;\n }", "public Network () {\n buildNetwork();\n }", "protected CommunicationsHandler(){}", "public InternalNameServiceHandler() {\n }", "public ModuliHandler() {\n\t}", "public TrackClientPacketHandler() \n {\n super(Constants.DEVICE_CODE);\n }", "default Handler asHandler() {\n return new HandlerBuffer(this);\n }", "public HttpHandler createProxyHandler() {\n return ProxyHandler.builder()\n .setProxyClient(container.getProxyClient())\n .setMaxRequestTime(maxRequestTime)\n .setMaxConnectionRetries(maxRetries)\n .setReuseXForwarded(reuseXForwarded)\n .build();\n }", "public BaseContract() {}", "private AbstractPhysicalNetwork() {\r\n super(IAbstractPhysicalNetwork.TYPE_ID);\r\n }", "public SocketHandler createSocketHandler (String host, int port) {\r\n\t\t\t\t\t\t\t\r\n\t\tSocketHandler socketHandler = null;\r\n\r\n\t\ttry {\r\n\t\t\t\t\t\t \t\r\n\t\t\tsocketHandler = new SocketHandler(host, port);\r\n\t\t\t\t\t\t\t\t\r\n\t\t} catch (SecurityException | IOException e) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\t\t\t\t \r\n\t\treturn socketHandler;\r\n\t}", "public static IProtocolHandler createHandler(String type) {\n if (type==null) {\n return new RestHandler(); //use REST by default\n } else if (type.equalsIgnoreCase(\"rest\")) {\n return new RestHandler();\n } else if (type.equalsIgnoreCase(\"soap\")) {\n //for future use\n return null;\n } else {\n throw new IllegalArgumentException(\"Unknown protocol type: \" + type);\n }\n }", "public GatewayInfo() {\n\n\t}", "public NetworkSource() {\n }", "protected FedoraContentModelHandler() {\r\n }", "public NetInterface.NetHandler getNetProxy() {\n return (NetInterface.NetHandler) self;\n }", "public DefaultNashRequestImpl() {\n\t\t\n\t}", "private HttpDataSource.Factory buildHttpDataSourceFactory(DefaultBandwidthMeter bandwidthMeter) {\n return new DefaultHttpDataSourceFactory(userAgent, bandwidthMeter);\n }", "protected Proxy(InvocationHandler h) { }", "public HttpGetSocket(SocketHandler h)\r\n {\r\n super(h);\r\n }", "public ConnectionHandler(int bufferSize) {\r\n\t\ttcp = new TCPConnectionHandler(this, bufferSize);\r\n\t}", "public NetworkAdapter() {\n }", "private MultibinderFactory() { }", "public BaseLogic()\n {\n this(new EventBus());\n }", "public CallAppAbilityConnnectionHandler createHandler() {\n EventRunner create = EventRunner.create();\n if (create != null) {\n return new CallAppAbilityConnnectionHandler(create);\n }\n HiLog.error(LOG_LABEL, \"createHandler: no runner.\", new Object[0]);\n return null;\n }", "public interface EndpointBase {\n\n boolean isIdleNow();\n\n /**\n * @param connectionTimeout\n * @param methodTimeout\n */\n void setTimeouts(int connectionTimeout, int methodTimeout);\n\n /**\n * @param alwaysMainThread\n */\n void setCallbackThread(boolean alwaysMainThread);\n\n /**\n * @param flags\n */\n void setDebugFlags(int flags);\n\n int getDebugFlags();\n\n /**\n * @param delay\n */\n void setDelay(int delay);\n\n void addErrorLogger(ErrorLogger logger);\n\n void removeErrorLogger(ErrorLogger logger);\n\n void setOnRequestEventListener(OnRequestEventListener listener);\n\n\n void setPercentLoss(float percentLoss);\n\n int getThreadPriority();\n\n void setThreadPriority(int threadPriority);\n\n\n ProtocolController getProtocolController();\n\n void setUrlModifier(UrlModifier urlModifier);\n\n /**\n * No log.\n */\n int NO_DEBUG = 0;\n\n /**\n * Log time of requests.\n */\n int TIME_DEBUG = 1;\n\n /**\n * Log request content.\n */\n int REQUEST_DEBUG = 2;\n\n /**\n * Log response content.\n */\n int RESPONSE_DEBUG = 4;\n\n /**\n * Log cache behavior.\n */\n int CACHE_DEBUG = 8;\n\n /**\n * Log request code line.\n */\n int REQUEST_LINE_DEBUG = 16;\n\n /**\n * Log request and response headers.\n */\n int HEADERS_DEBUG = 32;\n\n /**\n * Log request errors\n */\n int ERROR_DEBUG = 64;\n\n /**\n * Log cancellations\n */\n int CANCEL_DEBUG = 128;\n\n /**\n * Log cancellations\n */\n int THREAD_DEBUG = 256;\n\n /**\n * Log everything.\n */\n int FULL_DEBUG = TIME_DEBUG | REQUEST_DEBUG | RESPONSE_DEBUG | CACHE_DEBUG | REQUEST_LINE_DEBUG | HEADERS_DEBUG | ERROR_DEBUG | CANCEL_DEBUG;\n\n int INTERNAL_DEBUG = FULL_DEBUG | THREAD_DEBUG;\n\n /**\n * Created by Kuba on 17/07/14.\n */\n interface UrlModifier {\n\n String createUrl(String url);\n\n }\n\n interface OnRequestEventListener {\n\n void onStart(Request request, int requestsCount);\n\n void onStop(Request request, int requestsCount);\n\n }\n}", "public Http2MultiplexHandler(ChannelHandler inboundStreamHandler) {\n/* 115 */ this(inboundStreamHandler, (ChannelHandler)null);\n/* */ }", "public PacketHandler getDefaultHandler() {\n return hDefault;\n }", "public JsonHttpChannel() {\n this.defaultConstructor = new JsonHttpEventFactory();\n }", "public ConnectionHandler createConnectionHandler() throws Exception {\n SimpleConnectionHandler handler = new SimpleConnectionHandler();\n handler.setLogger(m_logger);\n return handler;\n }", "private static Handler buildChain() {\n Handler ForAbroad = new ForAbroad();\n\n //chain.XmlHandler is the successor of chain.Mp3Handler.\n Handler ForCountry = new ForCountry(ForAbroad);\n\n return new ForCity(ForCountry);\n }", "@Override\n public void buildNetwork() {\n }", "public static Class<?> getNetServerHandlerClass() {\n \t\treturn getMinecraftClass(\"NetServerHandler\", \"PlayerConnection\");\n \t}", "protected Server() {\n super(\"Ublu Server\");\n }", "@Override\n protected Http2ConnectionHandler build(\n Http2ConnectionDecoder decoder,\n Http2ConnectionEncoder encoder,\n Http2Settings initialSettings) {\n decoder.frameListener(new Http2Handler(encoder, maxPayloadBytes, corsHandler));\n\n return new ConnectionHandler(decoder, encoder, initialSettings);\n }", "public RequestHandler(DatagramPacket requestPacket) {\n this.requestPacket = requestPacket;\n }", "public RESTWorkItemHandler() {\n\t}", "public IoHandler getHandler()\n {\n return new MRPClientProtocolHandler();\n }", "public ProxyHandlerRegistry build() {\n checkNotNull(finder, \"No channel finder defined\");\n\n ProxyServerCallHandler<InputStream, InputStream> proxyHandler =\n new ProxyServerCallHandler<>(finder, CallOptions.DEFAULT);\n\n Map<String, ServerMethodDefinition<?, ?>> methods = new HashMap<>();\n for (ServerServiceDefinition service : services.values()) {\n for (ServerMethodDefinition<?, ?> method : service.getMethods()) {\n String methodName = method.getMethodDescriptor().getFullMethodName();\n methods.put(\n methodName,\n createProxyServerMethodDefinition(\n method.getMethodDescriptor(),\n proxyHandler)\n );\n }\n }\n return new ProxyHandlerRegistry(\n Collections.unmodifiableMap(methods));\n }", "protected Gateway(boolean noInit) {\n genClient = null;\n }", "void createHandler(final String handlerClassName);", "public static EthProtocolOptions create() {\n return new EthProtocolOptions();\n }", "public PacketBuilder() {\n\t\tthis(1024);\n\t}", "private ServerConnectionParser() {\n }", "private NetHead(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "@Nonnull\n static SocketHandler from(@Nonnull String name, @Nonnull BiConsumer<WebSocket, String> rawHandler) {\n return new SocketHandlerImpl(name, rawHandler);\n }", "public StreetBrawlerState(PocketHandler handler){\n\t\tsuper(handler);\n\n\t}", "private TelemetryMessageHandler(){\n super();\n messageList = new TelemetryMessageList();\n telemetryArrivalMap = new TelemetryArrivalMap();\n }", "protected GPIB_NI() throws IOException {\n\n // init Logger to inherit Logger level from Parent Logger\n m_Logger.setLevel(null);\n\n // instantiate iC_Properties\n m_iC_Properties = new iC_Properties();\n\n // allocate memory for the ReceiveBuffer\n if (m_ReceiveBuffer == null) {\n int dummy = RECEIVE_BUFFER_SIZE;\n\n // prevent runtime errors\n if (dummy < 1) {\n dummy = 1;\n m_Logger.severe(\"RECEIVE_BUFFER_SIZE was smaller than 1.\\n\");\n }\n\n // allocate the memory\n m_ReceiveBuffer = ByteBuffer.allocate(dummy);\n \n // The Buffer created with allocate will be backed by an array\n // so the following should never be true\n if ( !m_ReceiveBuffer.hasArray() ) {\n m_Logger.severe(\"m_ReceiveBuffer is NOT backed by an array.\\n\");\n }\n }\n \n // load the native library\n LoadNative();\n\n }", "public DefaultHttpRequest() {\n }", "public PSProviderCatalogHandler()\n {\n super();\n }", "public static NetworkHandling getTCPHandler() {\r\n\t\treturn networkHandling;\r\n\t}", "public NioDatagramChannel() {\n/* 116 */ this(newSocket(DEFAULT_SELECTOR_PROVIDER));\n/* */ }", "private SourceRconPacketFactory() {\n }", "private PersonHandler() {\n }", "public ExLoggingHandler() {\n super();\n }", "public NetworkData() {\n }", "public static void init() {\r\n try {\r\n defaultImplementation = new LinkLayer_Impl_PC();\r\n } catch (IOException e) {\r\n Log.e(TAG, e, \"Failed in creating defaultImplementation!\");\r\n }\r\n }", "public MessageHandler() {\n }", "Network_Resource createNetwork_Resource();", "public ConnectionHandler(Socket controlSocket, Socket dataSocket) {\n\t\tnetwork = new NetworkHandler(controlSocket, dataSocket);\n\t}", "public Handler(Socket socket) {\n this.socket = socket;\n }", "public Handler(Socket socket) {\n this.socket = socket;\n }", "@Override\n public Restlet createInboundRoot() {\n Router router = new Router(getContext());\n\n // Attach the handlers to the root router\n router.attach(\"/pipelines\", Pipelines.class);\n router.attach(\"/pipelines/{id}\", Pipeline.class);\n router.attach(\"/pipelines/{id}/inputs/{port}\", Input.class);\n router.attach(\"/pipelines/{id}/outputs/{port}\", Output.class);\n router.attach(\"/pipelines/{id}/options\", Options.class);\n router.attach(\"/pipelines/{id}/options/{option}\", Option.class);\n router.attach(\"/pipelines/{id}/parameters\", Parameters.class);\n router.attach(\"/pipelines/{id}/parameters/{port}\", Parameters.class);\n router.attach(\"/pipelines/{id}/parameters/{port}/{param}\", Parameter.class);\n router.attach(\"/pipelines/{id}/run\", Run.class);\n router.attach(\"/pipelines/{id}/reset\", Reset.class);\n router.attach(\"/status\", Status.class);\n router.attach(\"/help\", Help.class);\n router.attach(\"/stop\", Stop.class);\n router.attach(\"/\", Help.class);\n\n // Return the root router\n return router;\n }", "protected BlobByteArrayTypeHandler(LobHandler lobHandler) {\r\n super(lobHandler);\r\n logger.debug(\"BlobByteArrayTypeHandler created,LobHander is [{}]\", lobHandler);\r\n }", "public NetworkManager() {\n okHttpClient = new OkHttpClientProvider().getClient();\n retrofit = new RetrofitInstanceProvider(new RelatedTopicTypeAdapterFactory(), okHttpClient).getRetrofitInstance();\n }", "private MockClientNetworkModule() {\n\t\t// TODO complete this constructor\n\t}", "public HttpHandler createProxyHandler(HttpHandler next) {\n return ProxyHandler.builder()\n .setProxyClient(container.getProxyClient())\n .setNext(next)\n .setMaxRequestTime(maxRequestTime)\n .setMaxConnectionRetries(maxRetries)\n .setReuseXForwarded(reuseXForwarded)\n .build();\n }", "@Override\n public java.lang.AutoCloseable createInstance() {\n logger.info(\"Creating the Registry Handler Implementation Instance...\");\n\n DataBroker dataBrokerService = getDataBrokerDependency();\n RpcProviderRegistry rpcProviderRegistry = getRpcRegistryDependency();\n RegistryHandlerProvider provider = new RegistryHandlerProvider(dataBrokerService, rpcProviderRegistry);\n\n logger.info(\"Creating the Registry Handler Implementation created...\");\n\n return provider;\n }", "Handle newHandle();", "public void establishConnection() {\n httpNetworkService = new HTTPNetworkService(handler);\n }", "private NetUtils() {\r\n\t}", "public DefaultHttpRequestRetryHandler() {\n this(3);\n }", "public ZABEMobileNetwork build() {\n return new ZABEMobileNetwork(buildUnknownFields());\n }", "public RequestHandler getRequestHandlerInstance() {\n Object obj;\n try {\n obj = klass.newInstance();\n } catch (Exception e) {\n throw new RuntimeException(\"Problem during the Given class instanciation please check your contribution\", e);\n }\n if (obj instanceof RequestHandler) {\n RequestHandler rh = (RequestHandler) obj;\n rh.init(properties);\n return rh;\n }\n\n throw new RuntimeException(\"Given class is not a \" + RequestHandler.class + \" implementation\");\n }", "private BlocksPool() {\n this(DEFAULT_BLOCK_SIZE_BYTES);\n }", "public HGDClient() {\n \n \t}", "NetThread(){}", "public LanterneFactoryImpl() {\n\t\tsuper();\n\t}", "public ArtNet() {\n address = DEFAULT_ADDRESS;\n port = DEFAULT_PORT;\n operating = false;\n listeners = new ArrayList<ArtNetListener>();\n }", "public static String getNetServerHandlerName() {\n \t\treturn getNetServerHandlerClass().getSimpleName();\n \t}", "@SuppressWarnings(\"unused\")\n\tprivate InboxControllerFactory() {\n\t\tsuper();\n\t}" ]
[ "0.6112263", "0.6006961", "0.59740216", "0.5845544", "0.5829143", "0.57860994", "0.5712504", "0.5576943", "0.55750906", "0.55650187", "0.55343956", "0.54708236", "0.5452268", "0.54520375", "0.5378092", "0.5368131", "0.53635645", "0.5354096", "0.5305472", "0.52817935", "0.5277236", "0.52768344", "0.52764976", "0.5270893", "0.5248269", "0.5220653", "0.5190008", "0.5176103", "0.5173656", "0.5173272", "0.51728225", "0.5141522", "0.51149285", "0.51091564", "0.50680226", "0.5048158", "0.50309247", "0.50266933", "0.50193846", "0.50193125", "0.500379", "0.4999642", "0.49893525", "0.49808636", "0.4959747", "0.49593985", "0.4959133", "0.49443185", "0.49166554", "0.49140593", "0.4910997", "0.4898275", "0.48907575", "0.48873335", "0.48859942", "0.48808414", "0.4873412", "0.48712575", "0.48561138", "0.48558497", "0.48553255", "0.48549116", "0.4852487", "0.48497215", "0.48447937", "0.48397395", "0.4834037", "0.48256326", "0.48201978", "0.48069975", "0.48049197", "0.47933537", "0.47929624", "0.477845", "0.47696126", "0.47668958", "0.47617817", "0.47537062", "0.47468632", "0.47407866", "0.47407866", "0.47375962", "0.47332877", "0.47293752", "0.47282138", "0.4709979", "0.47082457", "0.4707765", "0.4707729", "0.47076058", "0.47015974", "0.4690567", "0.4681526", "0.46784124", "0.46758395", "0.46741667", "0.46733317", "0.46632293", "0.4662684", "0.46581447" ]
0.6729224
0
Register your packet with the pipeline. Discriminators are automatically set. If more than 256 packet classes are registered, the packet is not registered.
public void registerPacket(Class<? extends ECPacket> clazz) { if (this.postInitialized) { throw new IllegalStateException("Cannot register packet after post initialization"); } if (this.packets.size() > 255) { throw new IllegalStateException("Cannot register packet - packet class '" + clazz + "' already registered"); } else if (this.packets.contains(clazz)) { throw new IllegalStateException("Cannot register packet - too many discriminators in use"); } this.packets.add(clazz); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void registerPacketClass(Object classInstance){\n\t\tWrappedFieldArray<PacketType> array = new WrappedFieldArray<>(classInstance, PacketType.class);\n\n\t\ttry{\n\t\t\tfor(Field f : array.getFields()){\n\t\t\t\tpacketLookup.add((PacketType) f.get(null));\n\t\t\t}\n\t\t}\n\t\tcatch(IllegalAccessException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void register(Protocol1_11To1_10 protocol) {\n protocol.registerOutgoing(State.PLAY, 0x16, 0x16, new PacketRemapper() {\n @Override\n public void registerMap() {\n map(Type.BYTE); // 0 - Window ID\n map(Type.SHORT); // 1 - Slot ID\n map(Type.ITEM); // 2 - Slot Value\n\n handler(new PacketHandler() {\n @Override\n public void handle(PacketWrapper wrapper) throws Exception {\n Item stack = wrapper.get(Type.ITEM, 0);\n EntityIdRewriter.toClientItem(stack);\n }\n });\n }\n });\n\n // Window items packet\n protocol.registerOutgoing(State.PLAY, 0x14, 0x14, new PacketRemapper() {\n @Override\n public void registerMap() {\n map(Type.UNSIGNED_BYTE); // 0 - Window ID\n map(Type.ITEM_ARRAY); // 1 - Window Values\n\n handler(new PacketHandler() {\n @Override\n public void handle(PacketWrapper wrapper) throws Exception {\n Item[] stacks = wrapper.get(Type.ITEM_ARRAY, 0);\n for (Item stack : stacks)\n EntityIdRewriter.toClientItem(stack);\n }\n });\n }\n });\n\n // Entity Equipment Packet\n protocol.registerOutgoing(State.PLAY, 0x3C, 0x3C, new PacketRemapper() {\n @Override\n public void registerMap() {\n map(Type.VAR_INT); // 0 - Entity ID\n map(Type.VAR_INT); // 1 - Slot ID\n map(Type.ITEM); // 2 - Item\n\n handler(new PacketHandler() {\n @Override\n public void handle(PacketWrapper wrapper) throws Exception {\n Item stack = wrapper.get(Type.ITEM, 0);\n EntityIdRewriter.toClientItem(stack);\n }\n });\n }\n });\n\n // Plugin message Packet -> Trading\n protocol.registerOutgoing(State.PLAY, 0x18, 0x18, new PacketRemapper() {\n @Override\n public void registerMap() {\n map(Type.STRING); // 0 - Channel\n\n handler(new PacketHandler() {\n @Override\n public void handle(PacketWrapper wrapper) throws Exception {\n if (wrapper.get(Type.STRING, 0).equalsIgnoreCase(\"MC|TrList\")) {\n wrapper.passthrough(Type.INT); // Passthrough Window ID\n\n int size = wrapper.passthrough(Type.UNSIGNED_BYTE);\n for (int i = 0; i < size; i++) {\n EntityIdRewriter.toClientItem(wrapper.passthrough(Type.ITEM)); // Input Item\n EntityIdRewriter.toClientItem(wrapper.passthrough(Type.ITEM)); // Output Item\n\n boolean secondItem = wrapper.passthrough(Type.BOOLEAN); // Has second item\n if (secondItem)\n EntityIdRewriter.toClientItem(wrapper.passthrough(Type.ITEM)); // Second Item\n\n wrapper.passthrough(Type.BOOLEAN); // Trade disabled\n wrapper.passthrough(Type.INT); // Number of tools uses\n wrapper.passthrough(Type.INT); // Maximum number of trade uses\n }\n }\n }\n });\n }\n });\n \n /*\n Incoming packets\n */\n\n // Click window packet\n protocol.registerIncoming(State.PLAY, 0x07, 0x07, new PacketRemapper() {\n @Override\n public void registerMap() {\n map(Type.UNSIGNED_BYTE); // 0 - Window ID\n map(Type.SHORT); // 1 - Slot\n map(Type.BYTE); // 2 - Button\n map(Type.SHORT); // 3 - Action number\n map(Type.VAR_INT); // 4 - Mode\n map(Type.ITEM); // 5 - Clicked Item\n\n handler(new PacketHandler() {\n @Override\n public void handle(PacketWrapper wrapper) throws Exception {\n Item item = wrapper.get(Type.ITEM, 0);\n EntityIdRewriter.toServerItem(item);\n }\n });\n }\n }\n );\n\n // Creative Inventory Action\n protocol.registerIncoming(State.PLAY, 0x18, 0x18, new PacketRemapper() {\n @Override\n public void registerMap() {\n map(Type.SHORT); // 0 - Slot\n map(Type.ITEM); // 1 - Clicked Item\n\n handler(new PacketHandler() {\n @Override\n public void handle(PacketWrapper wrapper) throws Exception {\n Item item = wrapper.get(Type.ITEM, 0);\n EntityIdRewriter.toServerItem(item);\n }\n });\n }\n }\n );\n }", "public AbstractPacketizer()\n {\n addControl(new PSC());\n }", "public static void register () {\n channel = NetworkRegistry.newSimpleChannel(CHANNEL_NAME, ()->PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals);\n\n cprCartSchedule.register();\n cprStationOrders.register();\n }", "public PacketHandler() {}", "@Override\n public void register() {\n }", "@Override\r\n\tpublic void register() {\n\t\t\r\n\t}", "public <K, V> void registerInheritableTile(Class<K> clazz, ICapabilityConstructor<?, V, V> constructor) {\n checkNotBaked();\n capabilityConstructorsTileSuper.add(\n Pair.<Class<?>, ICapabilityConstructor<?, ?, ?>>of(clazz, constructor));\n\n if (!registeredTileEventListener) {\n registeredTileEventListener = true;\n MinecraftForge.EVENT_BUS.register(new TileEventListener());\n }\n }", "public void registerPeer(Packet packet) {\r\n\t\tpeerClientListeningPort = packet.peerClientListenPort;\r\n\t\tpeerClientID = assignID();\r\n\t\tpeerClientNodeConnectionList.add(this);\r\n\t\tjava.util.Date date = new java.util.Date();\r\n\t\tSystem.out.println(date + \": Peer Node ID: \" + peerClientID + \" connected to the Server Node...\");\r\n\t\tpeerClientNodeConnectionList.sort(Comparator.comparing(PeerToPeerConnection::getID));\r\n\t\t//printNodeConnections();\r\n\t\t\r\n\t\t// Send peerID to registered peer\r\n\t\tPacket regPacket = new Packet();\r\n\t\tregPacket.eventCode = 0;\r\n\t\tregPacket.peerClientID = peerClientID;\r\n\t\ttry {\r\n\t\t\toutStream.writeObject(regPacket);\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}\r\n\t\t\r\n\t\t// Send peerClientNodeConnectionList to ALL peers\r\n\t\tsendPeerListToAll();\r\n\t}", "public void setPacketProcessor(MaplePacketProcessor processor);", "static public void register(EndPoint point) {\n Kryo kryo = point.getKryo();\n // Register all kryo classes here\n kryo.register(PlayerMove.class);\n kryo.register(PlayerJail.class);\n kryo.register(PlayerUpdate.class);\n kryo.register(PlayerJail.class);\n kryo.register(PlayerNew.class);\n kryo.register(ZombieNew.class);\n kryo.register(ZombieMove.class);\n kryo.register(PowerupNew.class);\n kryo.register(PowerupRemove.class);\n kryo.register(ZombieDie.class);\n kryo.register(java.util.LinkedList.class);\n kryo.register(java.util.ArrayList.class);\n kryo.register(ActionStart.class);\n kryo.register(GameEnd.class);\n kryo.register(PowerupPickup.class);\n kryo.register(UsePowerup.class);\n kryo.register(ZombieMoveList.class);\n kryo.register(PlayerMessage.class);\n }", "public <T extends BlockEntity> void registerTile(Class<T> clazz, ICapabilityConstructor<?, T, T> constructor) {\n checkNotBaked();\n List<ICapabilityConstructor<?, ? extends BlockEntity, ? extends BlockEntity>> constructors = capabilityConstructorsTile.get(clazz);\n if (constructors == null) {\n constructors = Lists.newArrayList();\n capabilityConstructorsTile.put(clazz, constructors);\n }\n constructors.add(constructor);\n\n if (!registeredTileEventListener) {\n registeredTileEventListener = true;\n MinecraftForge.EVENT_BUS.register(new TileEventListener());\n }\n }", "public void registerProtocol(Protocol protocol);", "public <T> void registerInheritableItem(Class<T> clazz, ICapabilityConstructor<?, ?, ? extends ItemStack> constructor) {\n checkNotBaked();\n capabilityConstructorsItemSuper.add(\n Pair.<Class<?>, ICapabilityConstructor<?, ?, ?>>of(clazz, constructor));\n\n if (!registeredItemStackEventListener) {\n registeredItemStackEventListener = true;\n MinecraftForge.EVENT_BUS.register(new ItemStackEventListener());\n }\n }", "static public void register (EndPoint endPoint) {\n\t\tKryo kryo = endPoint.getKryo();\n\t\t// Classes within the project\n\t\tkryo.register(LoginRequest.class);\n\t\tkryo.register(LoginResponse.class);\n\t\tkryo.register(RegisterRequest.class);\n\t\tkryo.register(RegisterResponse.class);\n\t\tkryo.register(UnregisterRequest.class);\n\t\tkryo.register(UnregisterResponse.class);\n\t\tkryo.register(UserRequest.class);\n\t\tkryo.register(UserResponse.class);\n\t\tkryo.register(InviteRequest.class);\n\t\tkryo.register(InviteResponse.class);\n\t\tkryo.register(Set.class);\n\t\tkryo.register(User.class);\n\t\tkryo.register(HashSet.class);\n\t\tkryo.register(UserStatus.class);\n\t\tkryo.register(GameMessage.class);\n\t\tkryo.register(GameMessageType.class);\n\t\tkryo.register(GameInstance.class);\n\t\tkryo.register(GameRecord.class);\n\t\tkryo.register(Color.class);\n\t\tkryo.register(Timestamp.class);\n\t\tkryo.register(GameInstance[].class);\n\t\tkryo.register(TournamentMessage.class);\n\t\tkryo.register(TournamentMessageType.class);\n\t\t// Add any classes that we want to send as we develop the project\n\t}", "@SuppressWarnings(\"unchecked\")\r\n public static void register(FranticMod controller) {\r\n\r\n if (registered) {\r\n return;\r\n }\r\n registered = true;\r\n\r\n Packet3FModChat.controller = controller;\r\n\r\n try {\r\n \t\r\n \tField nmFielda[] = Packet.class.getDeclaredFields();\r\n \r\n// for(int i=0; i < nmFielda.length; i++) {\r\n// \tSystem.out.println(\"Field Number: \"+i+ \"; Real name:\" +nmFielda[i].getName());\r\n// }\r\n Field idstoclassesfield = nmFielda[0];\r\n Field classestoidsfield = nmFielda[1];\r\n\r\n idstoclassesfield.setAccessible(true);\r\n classestoidsfield.setAccessible(true);\r\n\r\n IntHashMap idstoclasses = (IntHashMap) idstoclassesfield.get(null);\r\n Map<Class<?>, Integer> classestoids = (Map<Class<?>, Integer>) classestoidsfield.get(null);\r\n idstoclasses.addKey(3, Packet3FModChat.class);\r\n //Obfuscation.putToMCHash(idstoclasses, 3, Packet3CUIChat.class);\r\n classestoids.put(Packet3FModChat.class, 3);\r\n\r\n } catch (Exception e) {\r\n throw new RuntimeException(\"Error inserting chat handler!\", e);\r\n }\r\n\r\n System.out.println(\"Incoming chat handler registered.\");\r\n }", "public void register(){\n }", "public abstract void register();", "public <T extends Item> void registerItem(Class<T> clazz, ICapabilityConstructor<?, T, ItemStack> constructor) {\n checkNotBaked();\n List<ICapabilityConstructor<?, ? extends Item, ? extends ItemStack>> constructors = capabilityConstructorsItem.get(clazz);\n if (constructors == null) {\n constructors = Lists.newArrayList();\n capabilityConstructorsItem.put(clazz, constructors);\n }\n constructors.add(constructor);\n\n if (!registeredItemStackEventListener) {\n registeredItemStackEventListener = true;\n MinecraftForge.EVENT_BUS.register(new ItemStackEventListener());\n }\n }", "public Register() {\n\t\tsuper();\n\t}", "public void register(RegistrationData d) {}", "void registerPlayer() throws IOException;", "void registerReceiver(IReceiver receiver);", "private void register() {\n\t\tInetAddress iNA;\n\t\ttry {\n\t\t\tiNA = InetAddress.getLocalHost();\n\t\t\tmyIPAddress = iNA.getAddress();\n\t\t\tOverlayNodeSendsRegistration register = new OverlayNodeSendsRegistration(\n\t\t\t\t\tmyIPAddress, myServerThreadPortNum);\n\t\t\tthis.registry.getSender().sendData(register.getBytes());\n\t\t} catch (UnknownHostException e1) {\n\t\t\tSystem.out.println(e1.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t}\n\t}", "public void register(Class<? extends Command> c) {\n CommandInfo info = c.getAnnotation(CommandInfo.class);\n if (info == null) return;\n \n try {\n commands.put(info.pattern(), c.newInstance());\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "@SuppressWarnings(\"unchecked\")\n public void register()\n {\n this.phpProcessor.registerProcessorExtension(this);\n \n // Register the node type if specified\n if (this.nodeType != null)\n {\n try\n {\n QName type = QName.createQName(this.nodeType);\n Class clazz = Class.forName(this.extensionClass); \n this.nodeFactory.addNodeType(type, clazz);\n }\n catch (ClassNotFoundException exception)\n {\n throw new PHPProcessorException(\"Unable to load node type (\" + this.extensionClass + \")\", exception);\n }\n }\n }", "void register(byte[] imageData, ObjectImageType imageType, String uuid);", "public CapsPacketExtension()\n {\n }", "public void addPacket(ITransmissible packet){\n\t\tif(!curPackets.contains(packet)){\n\t\t\tthis.curPackets.add(packet);\n\t\t\t\n\t\t\t\n\t\t\tif(packet instanceof Agent){\n\t\t\t\t//System.out.println(\"@addPacket() at edge \" + this.getEdgeId());\n\t\t\t\tthis.firePropertyChange(IConstants.PROPERTY_CHANGE_AGENT_AT_EDGE, null,\n\t\t\t\t\tthis);\n\t\t\t}\n\t\t}\n\t}", "public void register(IObserver obj);", "private void registerPlayers(SantaConfig sc) {\n // Second try.\n Set<String> keys = sc.getBaseKeys(\"registered\");\n for(String key : keys) {\n String name = sc.getBaseString(\"registered.\" + key);\n UUID id = UUID.fromString(key);\n playerRegistry.put(id, name);\n }\n }", "public void register() {\n IntentFilter intentFilter = new IntentFilter();\n intentFilter.addAction(\"android.intent.action.AIRPLANE_MODE\");\n if (this.dispatcher.scansNetworkChanges) {\n intentFilter.addAction(\"android.net.conn.CONNECTIVITY_CHANGE\");\n }\n this.dispatcher.context.registerReceiver(this, intentFilter);\n }", "void publishDistributedLayer(Class<? extends LayerInterface> layerClass, String implName, String regex);", "protected void __register()\n {\n }", "protected void __register()\n {\n }", "public interface IPacket {\n /**\n * Array of all known packets\n */\n public static Class<?>[] knownPackets = new Class<?>[] {AdminChatPacket.class,\n InfractionPacket.class, ReportPacket.class};\n\n /**\n * Reads input from a DataInputStream\n * \n * @param in DataInputStream stram\n * @throws IOException\n */\n public void read(DataInputStream in) throws IOException;\n\n /**\n * Writes out data through a DataOutputStream\n * \n * @param out DataOutputStream stream\n * @throws IOException\n */\n public void write(DataOutputStream out) throws IOException;\n}", "<T> void register(Class<T> messageType, Destination<T> destination);", "public void register(IPartType partType, Collection<IAspect> aspects);", "@Override\n public void registerForMessage(CommReceiver recClass) {\n commSender.registerForMessage(recClass);\n }", "static public void register (EndPoint endPoint) {\n\t\tKryo kryo = endPoint.getKryo();\n kryo.register(CommandMessage.class);\n\t}", "private void registerAll() {\n\t// register decoders\n\tregister(new KeepAliveEventDecoder());\n\tregister(new CharacterDesignEventDecoder());\n\tregister(new WalkEventDecoder());\n\tregister(new ChatEventDecoder());\n\tregister(new ButtonEventDecoder());\n\tregister(new CommandEventDecoder());\n\tregister(new SwitchItemEventDecoder());\n\tregister(new FirstObjectActionEventDecoder());\n\tregister(new SecondObjectActionEventDecoder());\n\tregister(new ThirdObjectActionEventDecoder());\n\tregister(new EquipEventDecoder());\n\tregister(new FirstItemActionEventDecoder());\n\tregister(new SecondItemActionEventDecoder());\n\tregister(new ThirdItemActionEventDecoder());\n\tregister(new FourthItemActionEventDecoder());\n\tregister(new FifthItemActionEventDecoder());\n\tregister(new ClosedInterfaceEventDecoder());\n\tregister(new EnteredAmountEventDecoder());\n\tregister(new DialogueContinueEventDecoder());\n\n\t// register encoders\n\tregister(new IdAssignmentEventEncoder());\n\tregister(new RegionChangeEventEncoder());\n\tregister(new ServerMessageEventEncoder());\n\tregister(new MobSynchronizationEventEncoder());\n\tregister(new PlayerSynchronizationEventEncoder());\n\tregister(new OpenInterfaceEventEncoder());\n\tregister(new CloseInterfaceEventEncoder());\n\tregister(new SwitchTabInterfaceEventEncoder());\n\tregister(new LogoutEventEncoder());\n\tregister(new UpdateItemsEventEncoder());\n\tregister(new UpdateSlottedItemsEventEncoder());\n\tregister(new UpdateSkillEventEncoder());\n\tregister(new OpenInterfaceSidebarEventEncoder());\n\tregister(new EnterAmountEventEncoder());\n\tregister(new SetInterfaceTextEventEncoder());\n\tregister(new OpenDialogueInterfaceEventEncoder());\n\tregister(new MobModelOnInterfaceEventEncoder());\n\tregister(new InterfaceModelAnimationEventEncoder());\n\tregister(new InterfaceItemModelEventEncoder());\n\n\t// register handlers\n\tregister(new CharacterDesignEventHandler());\n\tregister(new WalkEventHandler());\n\tregister(new ChatEventHandler());\n\tregister(new CommandEventHandler());\n\tregister(new SwitchItemEventHandler());\n\tregister(new EquipEventHandler());\n\tregister(new ClosedInterfaceEventHandler());\n\tregister(new EnteredAmountEventHandler());\n\tregister(new DialogueContinueEventHandler());\n\n\t// world handlers\n\tregister(new ObjectEventHandler(world));\n\tregister(new ButtonEventHandler(world));\n\tregister(new ItemActionEventHandler(world));\n }", "protected PacketFactory(int code) {\n packetFactories.put(Integer.valueOf(code), this);\n }", "public <T extends Entity> void registerEntity(Class<T> clazz, ICapabilityConstructor<?, T, T> constructor) {\n checkNotBaked();\n List<ICapabilityConstructor<?, ? extends Entity, ? extends Entity>> constructors = capabilityConstructorsEntity.get(clazz);\n if (constructors == null) {\n constructors = Lists.newArrayList();\n capabilityConstructorsEntity.put(clazz, constructors);\n }\n constructors.add(constructor);\n\n if (!registeredEntityEventListener) {\n registeredEntityEventListener = true;\n MinecraftForge.EVENT_BUS.register(new EntityEventListener());\n }\n }", "public static void register(Class<?> c) {\r\n\t\tassert c != null;\t\t\r\n\t\tclasses.add(c);\t//appends c to the end of the list\r\n\t}", "@SubscribeEvent\n public static void registerContainer(final RegistryEvent.Register<ContainerType<?>> event){\n walletBlockContainerType = IForgeContainerType.create(WalletBlockContainer::createForClientSide);\n walletBlockContainerType.setRegistryName(\"wallet_block_container\");\n event.getRegistry().register(walletBlockContainerType);\n }", "public Packet() {\n\t}", "void register();", "@Override\n public void onRegister(String serviceName, RegisterResult result) {\n if (result == RegisterResult.FAILED && basePlugin.getEnvironment() != Environment.PRODUCTION)\n System.out.println(String.format(ConsoleColor.RED + \"Packet listener %s could not be registered\" + ConsoleColor.RESET, ConsoleColor.YELLOW + serviceName + ConsoleColor.RED));\n }", "public boolean registerPlayer(Player p);", "private void registerNetworServiceComponent(final PlatformComponentProfile platformComponentProfileToRegister, final FermatPacket receiveFermatPacket, final WebSocket clientConnection, final ECCKeyPair serverIdentity){\n\n System.out.println(\"ComponentRegistrationRequestPacketProcessor - registerNetworkServiceComponent\");\n\n Map<NetworkServiceType, List<PlatformComponentProfile>> networkServiceRegistered = getWsCommunicationCloudServer().getRegisteredNetworkServicesCache();\n\n /*\n * Validate if contain a list for the NetworkServiceType\n */\n if (networkServiceRegistered.containsKey(platformComponentProfileToRegister.getNetworkServiceType())){\n\n /*\n * Add to the list\n */\n networkServiceRegistered.get(platformComponentProfileToRegister.getNetworkServiceType()).add(platformComponentProfileToRegister);\n\n }else {\n\n /*\n * Create new list by the NetworkServiceType and add the profile\n */\n List<PlatformComponentProfile> newListPCP = new ArrayList<>();\n newListPCP.add(platformComponentProfileToRegister);\n\n networkServiceRegistered.put(platformComponentProfileToRegister.getNetworkServiceType(), newListPCP);\n\n }\n\n\n /*\n * Construct a fermat packet whit the same platform component profile and different FermatPacketType\n */\n FermatPacket fermatPacketRespond = FermatPacketCommunicationFactory.constructFermatPacketEncryptedAndSinged(receiveFermatPacket.getSender(), //Destination\n serverIdentity.getPublicKey(), //Sender\n platformComponentProfileToRegister.toJson(), //Message Content\n FermatPacketType.COMPLETE_COMPONENT_REGISTRATION, //Packet type\n serverIdentity.getPrivateKey()); //Sender private key\n\n /*\n * Send the encode packet to the server\n */\n clientConnection.send(FermatPacketEncoder.encode(fermatPacketRespond));\n\n System.out.println(\"ComponentRegistrationRequestPacketProcessor - Total Network Service Component Registered (\"+platformComponentProfileToRegister.getNetworkServiceType()+\") = \" + networkServiceRegistered.get(platformComponentProfileToRegister.getNetworkServiceType()).size());\n\n }", "@Override\n public void register(@Nonnull IModRegistry registry)\n {\n registry.addRecipes(WorldTransmuteRecipeCategory.getAllTransmutations(), WorldTransmuteRecipeCategory.UID);\n registry.getRecipeTransferRegistry().addRecipeTransferHandler(PhilosStoneContainer.class, VanillaRecipeCategoryUid.CRAFTING, 1, 9, 10, 36);\n\n registry.addRecipeCatalyst(new ItemStack(ObjHandler.philosStone), VanillaRecipeCategoryUid.CRAFTING);\n registry.addRecipeCatalyst(new ItemStack(ObjHandler.philosStone), WorldTransmuteRecipeCategory.UID);\n registry.addRecipeCatalyst(new ItemStack(ObjHandler.collectorMK1), CollectorRecipeCategory.UID);\n registry.addRecipeCatalyst(new ItemStack(ObjHandler.collectorMK2), CollectorRecipeCategory.UID);\n registry.addRecipeCatalyst(new ItemStack(ObjHandler.collectorMK3), CollectorRecipeCategory.UID);\n\n mappers.add(new JEIFuelMapper());\n }", "static void register() {\n }", "@Override\n public void register(@Nonnull IModRegistry registry)\n {\n registry.addRecipes(WorldTransmutations.getWorldTransmutations(), WorldTransmuteRecipeCategory.UID);\n registry.getRecipeTransferRegistry().addRecipeTransferHandler(PhilosStoneContainer.class, VanillaRecipeCategoryUid.CRAFTING, 1, 9, 10, 36);\n }", "public <K, V> void registerInheritableEntity(Class<K> clazz, ICapabilityConstructor<?, V, V> constructor) {\n checkNotBaked();\n capabilityConstructorsEntitySuper.add(\n Pair.<Class<?>, ICapabilityConstructor<?, ?, ?>>of(clazz, constructor));\n\n if (!registeredEntityEventListener) {\n registeredEntityEventListener = true;\n MinecraftForge.EVENT_BUS.register(new EntityEventListener());\n }\n }", "public void registerObject(NetObject object);", "public static void register(Protocol protocol) {\n\t\tprotocol.registerOutgoing(State.PLAY, 0x21, 0x21, new PacketRemapper() {\n\t\t\t@Override\n\t\t\tpublic void registerMap() {\n\t\t\t\thandler(packetWrapper -> {\n\t\t\t\t\tClientWorld world = packetWrapper.user().get(ClientWorld.class);\n\t\t\t\t\tChunk chunk = packetWrapper.read(new Chunk1_8Type(world));\n\t\t\t\t\tpacketWrapper.write(new Chunk1_7_10Type(world), chunk);\n\t\t\t\t\tfor (ChunkSection section : chunk.getSections()){\n\t\t\t\t\t\tif (section == null) continue;\n\t\t\t\t\t\tfor (int i = 0; i < section.getPaletteSize(); i++) {\n\t\t\t\t\t\t\tint block = section.getPaletteEntry(i);\n\t\t\t\t\t\t\tint replacedBlock = ReplacementRegistry1_7_6_10to1_8.replace(block);\n\t\t\t\t\t\t\tsection.setPaletteEntry(i, replacedBlock);\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\n\t\t//Multi Block Change\n\t\tprotocol.registerOutgoing(State.PLAY, 0x22, 0x22, new PacketRemapper() {\n\t\t\t@Override\n\t\t\tpublic void registerMap() {\n\t\t\t\tmap(Type.INT);\n\t\t\t\tmap(Type.INT);\n\t\t\t\thandler(packetWrapper -> {\n\t\t\t\t\tfinal BlockChangeRecord[] records = packetWrapper.read(Type.BLOCK_CHANGE_RECORD_ARRAY);\n\t\t\t\t\tpacketWrapper.write(Type.SHORT, (short) records.length);\n\t\t\t\t\tpacketWrapper.write(Type.INT, records.length * 4);\n\t\t\t\t\tfor (BlockChangeRecord record : records) {\n\t\t\t\t\t\tshort data = (short) (record.getSectionX() << 12 | record.getSectionZ() << 8 | record.getY());\n\t\t\t\t\t\tpacketWrapper.write(Type.SHORT, data);\n\t\t\t\t\t\tint replacedBlock = ReplacementRegistry1_7_6_10to1_8.replace(record.getBlockId());\n\t\t\t\t\t\tpacketWrapper.write(Type.SHORT, (short) replacedBlock);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\t//Block Change\n\t\tprotocol.registerOutgoing(State.PLAY, 0x23, 0x23, new PacketRemapper() {\n\t\t\t@Override\n\t\t\tpublic void registerMap() {\n\t\t\t\thandler(packetWrapper -> {\n\t\t\t\t\tPosition position = packetWrapper.read(Type.POSITION);\n\t\t\t\t\tpacketWrapper.write(Type.INT, position.getX());\n\t\t\t\t\tpacketWrapper.write(Type.UNSIGNED_BYTE, position.getY());\n\t\t\t\t\tpacketWrapper.write(Type.INT, position.getZ());\n\t\t\t\t});\n\t\t\t\thandler(packetWrapper -> {\n\t\t\t\t\tint data = packetWrapper.read(Type.VAR_INT);\n\n\t\t\t\t\tint blockId = data >> 4;\n\t\t\t\t\tint meta = data & 0xF;\n\n\t\t\t\t\tReplacement replace = ReplacementRegistry1_7_6_10to1_8.getReplacement(blockId, meta);\n\n\t\t\t\t\tif (replace != null) {\n\t\t\t\t\t\tblockId = replace.getId();\n\t\t\t\t\t\tmeta = replace.replaceData(meta);\n\t\t\t\t\t}\n\n\t\t\t\t\tpacketWrapper.write(Type.VAR_INT, blockId);\n\t\t\t\t\tpacketWrapper.write(Type.UNSIGNED_BYTE, (short) meta);\n\t\t\t\t}); //Block Data\n\t\t\t}\n\t\t});\n\n\t\t//Block Action\n\t\tprotocol.registerOutgoing(State.PLAY, 0x24, 0x24, new PacketRemapper() {\n\t\t\t@Override\n\t\t\tpublic void registerMap() {\n\t\t\t\thandler(packetWrapper -> {\n\t\t\t\t\tPosition position = packetWrapper.read(Type.POSITION);\n\t\t\t\t\tpacketWrapper.write(Type.INT, position.getX());\n\t\t\t\t\tpacketWrapper.write(Type.SHORT, position.getY());\n\t\t\t\t\tpacketWrapper.write(Type.INT, position.getZ());\n\t\t\t\t});\n\t\t\t\tmap(Type.UNSIGNED_BYTE);\n\t\t\t\tmap(Type.UNSIGNED_BYTE);\n\t\t\t\tmap(Type.VAR_INT);\n\t\t\t}\n\t\t});\n\n\t\t//Block Break Animation\n\t\tprotocol.registerOutgoing(State.PLAY, 0x25, 0x25, new PacketRemapper() {\n\t\t\t@Override\n\t\t\tpublic void registerMap() {\n\t\t\t\tmap(Type.VAR_INT); //Entity Id\n\t\t\t\thandler(packetWrapper -> {\n\t\t\t\t\tPosition position = packetWrapper.read(Type.POSITION);\n\t\t\t\t\tpacketWrapper.write(Type.INT, position.getX());\n\t\t\t\t\tpacketWrapper.write(Type.INT, (int) position.getY());\n\t\t\t\t\tpacketWrapper.write(Type.INT, position.getZ());\n\t\t\t\t});\n\t\t\t\tmap(Type.BYTE); //Progress\n\t\t\t}\n\t\t});\n\n\t\t//Map Chunk Bulk\n\t\tprotocol.registerOutgoing(State.PLAY, 0x26, 0x26, new PacketRemapper() {\n\t\t\t@Override\n\t\t\tpublic void registerMap() {\n\t\t\t\thandler(ChunkPacketTransformer::transformChunkBulk);\n\t\t\t}\n\t\t});\n\n\t\t//Effect\n\t\tprotocol.registerOutgoing(State.PLAY, 0x28, 0x28, new PacketRemapper() {\n\t\t\t@Override\n\t\t\tpublic void registerMap() {\n\t\t\t\tmap(Type.INT);\n\t\t\t\thandler(packetWrapper -> {\n\t\t\t\t\tPosition position = packetWrapper.read(Type.POSITION);\n\t\t\t\t\tpacketWrapper.write(Type.INT, position.getX());\n\t\t\t\t\tpacketWrapper.write(Type.BYTE, (byte) position.getY());\n\t\t\t\t\tpacketWrapper.write(Type.INT, position.getZ());\n\t\t\t\t});\n\t\t\t\tmap(Type.INT);\n\t\t\t\tmap(Type.BOOLEAN);\n\t\t\t}\n\t\t});\n\n\t\t//Particle\n\t\tprotocol.registerOutgoing(State.PLAY, 0x2A, 0x2A, new PacketRemapper() {\n\t\t\t@Override\n\t\t\tpublic void registerMap() {\n\t\t\t\thandler(packetWrapper -> {\n\t\t\t\t\tint particleId = packetWrapper.read(Type.INT);\n\t\t\t\t\tParticle particle = Particle.find(particleId);\n\t\t\t\t\tif (particle == null) particle = Particle.CRIT;\n\t\t\t\t\tpacketWrapper.write(Type.STRING, particle.name);\n\n\t\t\t\t\tpacketWrapper.read(Type.BOOLEAN);\n\t\t\t\t});\n\t\t\t\tmap(Type.FLOAT);\n\t\t\t\tmap(Type.FLOAT);\n\t\t\t\tmap(Type.FLOAT);\n\t\t\t\tmap(Type.FLOAT);\n\t\t\t\tmap(Type.FLOAT);\n\t\t\t\tmap(Type.FLOAT);\n\t\t\t\tmap(Type.FLOAT);\n\t\t\t\tmap(Type.INT);\n\t\t\t\thandler(packetWrapper -> {\n\t\t\t\t\tString name = packetWrapper.get(Type.STRING, 0);\n\t\t\t\t\tParticle particle = Particle.find(name);\n\n\t\t\t\t\tif (particle == Particle.ICON_CRACK || particle == Particle.BLOCK_CRACK || particle == Particle.BLOCK_DUST) {\n\t\t\t\t\t\tint id = packetWrapper.read(Type.VAR_INT);\n\t\t\t\t\t\tint data = particle == Particle.ICON_CRACK ? packetWrapper.read(Type.VAR_INT) : 0;\n\t\t\t\t\t\tif (id >= 256 && id <= 422 || id >= 2256 && id <= 2267) { //item\n\t\t\t\t\t\t\tparticle = Particle.ICON_CRACK;\n\t\t\t\t\t\t} else if (id >= 0 && id <= 164 || id >= 170 && id <= 175) {\n\t\t\t\t\t\t\tif (particle == Particle.ICON_CRACK) particle = Particle.BLOCK_CRACK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpacketWrapper.cancel();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tname = particle.name + \"_\" + id + \"_\" + data;\n\t\t\t\t\t}\n\n\t\t\t\t\tpacketWrapper.set(Type.STRING, 0, name);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\t//Update Sign\n\t\tprotocol.registerOutgoing(State.PLAY, 0x33, 0x33, new PacketRemapper() {\n\t\t\t@Override\n\t\t\tpublic void registerMap() {\n\t\t\t\thandler(packetWrapper -> {\n\t\t\t\t\tPosition position = packetWrapper.read(Type.POSITION);\n\t\t\t\t\tpacketWrapper.write(Type.INT, position.getX());\n\t\t\t\t\tpacketWrapper.write(Type.SHORT, position.getY());\n\t\t\t\t\tpacketWrapper.write(Type.INT, position.getZ());\n\t\t\t\t});\n\t\t\t\thandler(packetWrapper -> {\n\t\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\t\tString line = packetWrapper.read(Type.STRING);\n\t\t\t\t\t\tline = ChatUtil.jsonToLegacy(line);\n\t\t\t\t\t\tline = ChatUtil.removeUnusedColor(line, '0');\n\t\t\t\t\t\tif (line.length() > 15) {\n\t\t\t\t\t\t\tline = ChatColor.stripColor(line);\n\t\t\t\t\t\t\tif (line.length() > 15) line = line.substring(0, 15);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpacketWrapper.write(Type.STRING, line);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\t//Map\n\t\tprotocol.registerOutgoing(State.PLAY, 0x34, 0x34, new PacketRemapper() {\n\t\t\t@Override\n\t\t\tpublic void registerMap() {\n\t\t\t\thandler(packetWrapper -> {\n\t\t\t\t\tpacketWrapper.cancel();\n\t\t\t\t\tint id = packetWrapper.read(Type.VAR_INT);\n\t\t\t\t\tbyte scale = packetWrapper.read(Type.BYTE);\n\n\t\t\t\t\tint count = packetWrapper.read(Type.VAR_INT);\n\t\t\t\t\tbyte[] icons = new byte[count * 4];\n\t\t\t\t\tfor (int i = 0; i < count; i++) {\n\t\t\t\t\t\tint j = packetWrapper.read(Type.BYTE);\n\t\t\t\t\t\ticons[i * 4] = (byte) (j >> 4 & 0xF);\n\t\t\t\t\t\ticons[i * 4 + 1] = packetWrapper.read(Type.BYTE);\n\t\t\t\t\t\ticons[i * 4 + 2] = packetWrapper.read(Type.BYTE);\n\t\t\t\t\t\ticons[i * 4 + 3] = (byte) (j & 0xF);\n\t\t\t\t\t}\n\t\t\t\t\tshort columns = packetWrapper.read(Type.UNSIGNED_BYTE);\n\t\t\t\t\tif (columns > 0) {\n\t\t\t\t\t\tshort rows = packetWrapper.read(Type.UNSIGNED_BYTE);\n\t\t\t\t\t\tshort x = packetWrapper.read(Type.UNSIGNED_BYTE);\n\t\t\t\t\t\tshort z = packetWrapper.read(Type.UNSIGNED_BYTE);\n\t\t\t\t\t\tbyte[] data = packetWrapper.read(Type.BYTE_ARRAY_PRIMITIVE);\n\n\t\t\t\t\t\tfor (int column = 0; column < columns; column++) {\n\t\t\t\t\t\t\tbyte[] columnData = new byte[rows + 3];\n\t\t\t\t\t\t\tcolumnData[0] = 0;\n\t\t\t\t\t\t\tcolumnData[1] = (byte) (x + column);\n\t\t\t\t\t\t\tcolumnData[2] = (byte) z;\n\n\t\t\t\t\t\t\tfor (int i = 0; i < rows; i++) {\n\t\t\t\t\t\t\t\tcolumnData[i + 3] = data[column + i * columns];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tPacketWrapper columnUpdate = new PacketWrapper(0x34, null, packetWrapper.user());\n\t\t\t\t\t\t\tcolumnUpdate.write(Type.VAR_INT, id);\n\t\t\t\t\t\t\tcolumnUpdate.write(Type.SHORT, (short) columnData.length);\n\t\t\t\t\t\t\tcolumnUpdate.write(new CustomByteType(columnData.length), columnData);\n\n\t\t\t\t\t\t\tPacketUtil.sendPacket(columnUpdate, Protocol1_7_6_10TO1_8.class, true, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (count > 0) {\n\t\t\t\t\t\tbyte[] iconData = new byte[count * 3 + 1];\n\t\t\t\t\t\ticonData[0] = 1;\n\t\t\t\t\t\tfor (int i = 0; i < count; i++) {\n\t\t\t\t\t\t\ticonData[i * 3 + 1] = (byte) (icons[i * 4] << 4 | icons[i * 4 + 3] & 0xF);\n\t\t\t\t\t\t\ticonData[i * 3 + 2] = icons[i * 4 + 1];\n\t\t\t\t\t\t\ticonData[i * 3 + 3] = icons[i * 4 + 2];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tPacketWrapper iconUpdate = new PacketWrapper(0x34, null, packetWrapper.user());\n\t\t\t\t\t\ticonUpdate.write(Type.VAR_INT, id);\n\t\t\t\t\t\ticonUpdate.write(Type.SHORT, (short) iconData.length);\n\t\t\t\t\t\tCustomByteType customByteType = new CustomByteType(iconData.length);\n\t\t\t\t\t\ticonUpdate.write(customByteType, iconData);\n\t\t\t\t\t\tPacketUtil.sendPacket(iconUpdate, Protocol1_7_6_10TO1_8.class, true, true);\n\t\t\t\t\t}\n\n\t\t\t\t\tPacketWrapper scaleUpdate = new PacketWrapper(0x34, null, packetWrapper.user());\n\t\t\t\t\tscaleUpdate.write(Type.VAR_INT, id);\n\t\t\t\t\tscaleUpdate.write(Type.SHORT, (short) 2);\n\t\t\t\t\tscaleUpdate.write(new CustomByteType(2), new byte[] {2, scale});\n\t\t\t\t\tPacketUtil.sendPacket(scaleUpdate, Protocol1_7_6_10TO1_8.class, true, true);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\t//Update Block Entity\n\t\tprotocol.registerOutgoing(State.PLAY, 0x35, 0x35, new PacketRemapper() {\n\t\t\t@Override\n\t\t\tpublic void registerMap() {\n\t\t\t\thandler(packetWrapper -> {\n\t\t\t\t\tPosition position = packetWrapper.read(Type.POSITION);\n\t\t\t\t\tpacketWrapper.write(Type.INT, position.getX());\n\t\t\t\t\tpacketWrapper.write(Type.SHORT, position.getY());\n\t\t\t\t\tpacketWrapper.write(Type.INT, position.getZ());\n\t\t\t\t});\n\t\t\t\tmap(Type.UNSIGNED_BYTE); //Action\n\t\t\t\tmap(Type.NBT, Types1_7_6_10.COMPRESSED_NBT);\n\t\t\t}\n\t\t});\n\n\t\t//Server Difficulty\n\t\tprotocol.registerOutgoing(State.PLAY, 0x41, -1, new PacketRemapper() {\n\t\t\t@Override\n\t\t\tpublic void registerMap() {\n\t\t\t\thandler(packetWrapper -> packetWrapper.cancel());\n\t\t\t}\n\t\t});\n\n\t\t//Combat Event\n\t\tprotocol.registerOutgoing(State.PLAY, 0x42, -1, new PacketRemapper() {\n\t\t\t@Override\n\t\t\tpublic void registerMap() {\n\t\t\t\thandler(packetWrapper -> packetWrapper.cancel());\n\t\t\t}\n\t\t});\n\n\t\t//World Border\n\t\tprotocol.registerOutgoing(State.PLAY, 0x44, -1, new PacketRemapper() {\n\t\t\t@Override\n\t\t\tpublic void registerMap() {\n\t\t\t\thandler(packetWrapper -> {\n\t\t\t\t\tint action = packetWrapper.read(Type.VAR_INT);\n\t\t\t\t\tWorldBorder worldBorder = packetWrapper.user().get(WorldBorder.class);\n\t\t\t\t\tif (action == 0) {\n\t\t\t\t\t\tworldBorder.setSize(packetWrapper.read(Type.DOUBLE));\n\t\t\t\t\t} else if (action == 1) {\n\t\t\t\t\t\tworldBorder.lerpSize(packetWrapper.read(Type.DOUBLE), packetWrapper.read(Type.DOUBLE), packetWrapper.read(VarLongType.VAR_LONG));\n\t\t\t\t\t} else if (action == 2) {\n\t\t\t\t\t\tworldBorder.setCenter(packetWrapper.read(Type.DOUBLE), packetWrapper.read(Type.DOUBLE));\n\t\t\t\t\t} else if (action == 3) {\n\t\t\t\t\t\tworldBorder.init(\n\t\t\t\t\t\t\t\tpacketWrapper.read(Type.DOUBLE), packetWrapper.read(Type.DOUBLE),\n\t\t\t\t\t\t\t\tpacketWrapper.read(Type.DOUBLE), packetWrapper.read(Type.DOUBLE),\n\t\t\t\t\t\t\t\tpacketWrapper.read(VarLongType.VAR_LONG),\n\t\t\t\t\t\t\t\tpacketWrapper.read(Type.VAR_INT),\n\t\t\t\t\t\t\t\tpacketWrapper.read(Type.VAR_INT), packetWrapper.read(Type.VAR_INT)\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if (action == 4) {\n\t\t\t\t\t\tworldBorder.setWarningTime(packetWrapper.read(Type.VAR_INT));\n\t\t\t\t\t} else if (action == 5) {\n\t\t\t\t\t\tworldBorder.setWarningBlocks(packetWrapper.read(Type.VAR_INT));\n\t\t\t\t\t}\n\n\t\t\t\t\tpacketWrapper.cancel();\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t}", "public void addResourceCard(HexType type){\n \n }", "public interface Packet {\n /**\n * Read body from byte buffer\n * @param bb \n * @throws java.lang.Exception \n */\n void readBody(ByteBuf bb, TranscoderContext context) throws Exception;\n \n /**\n * Write body to byte buffer\n * @param bb \n * @param context \n * @throws java.lang.Exception \n */\n void writeBody(ByteBuf bb, TranscoderContext context) throws Exception;\n \n /**\n * Calculate and return body size in bytes\n * @param context\n * @return \n */\n int calculateBodyLength(TranscoderContext context);\n \n /**\n * Calculate and set field with body length\n * @param context\n */\n void calculateAndSetBodyLength(TranscoderContext context);\n \n /**\n * Get body length from field\n * @return \n */\n int getBodyLength();\n\n /**\n * Get sequence number field value\n * @return \n */\n int getSequenceNumber();\n \n /**\n * Set sequence number field value\n * @param sequenceNumber \n */\n void setSequenceNumber(int sequenceNumber); \n}", "protected abstract void registerSuperTypes();", "@SubscribeEvent\n public static void registerTileEntity(final RegistryEvent.Register<TileEntityType<?>> event){\n walletBlockTileEntityType = TileEntityType.Builder.create(WalletBlockTileEntity::new, walletBlock).build(null);\n walletBlockTileEntityType.setRegistryName(\"bitcoinmod:wallet_block_tile_entity\");\n event.getRegistry().register(walletBlockTileEntityType);\n }", "public void registerObject(NetObject object, String channel);", "public void addPipe()\n {\n pipe = new PipeComponent();\n pipes.add(pipe);\n }", "@Override\n\t\t\t\t\tprotected void initChannel(SocketChannel ch)\n\t\t\t\t\t{\n\t\t\t\t\t\tch.pipeline().addLast(new LengthFieldPrepender(2));\n\t\t\t\t\t\tch.pipeline().addLast(new LengthFieldBasedFrameDecoder(0xFFFF, 0, 2));\n\t\t\t\t\t\tch.pipeline().addLast(new PacketCodec());\n\t\t\t\t\t\tch.pipeline().addLast(new ServerChannelHandler(instance));\n\t\t\t\t\t}", "public interface IPacketRegistry {\n <REQ extends IMessage, REPLY extends IMessage> IPacketRegistry register(\n Class<? extends IMessageHandler<REQ, REPLY>> messageHandler,\n Class<REQ> requestMessageType,\n Side side\n );\n}", "@Override\n\tpublic void registerPet(PetVO vo) {\n\t\t\n\t}", "@Test\n @Ignore\n public void testRegistration() {\n ROIAwareWarpDescriptor.register();\n ScaleDescriptor.register();\n AffineDescriptor.register();\n }", "private void register()\n {\n ScControlRegistry r = getRegistry();\n\n _key = r.getNextKey();\n r.register(this);\n }", "int register(String clazz, String method, String branch);", "protected void register(String data){\n }", "public void addPacket(Packet packet, String algo) {\n\n if((packet.getPacketHeight() <= getBinCapacityLeft())) {\n packets.add(packet);\n } else {\n System.err.print(\"Packet cant exceed binHeight\");\n System.err.println(\", Algo :\" + algo);\n }\n\n\n }", "private void registerCommunicationsCloudServerComponent(final PlatformComponentProfile platformComponentProfileToRegister, final FermatPacket receiveFermatPacket, final WebSocket clientConnection, final ECCKeyPair serverIdentity){\n\n System.out.println(\"ComponentRegistrationRequestPacketProcessor - registerCommunicationsCloudServerComponent\");\n\n /* TODO: Do it in data base is better\n * Add to the cache\n */\n getWsCommunicationCloudServer().getRegisteredCommunicationsCloudServerCache().put(clientConnection.hashCode(), platformComponentProfileToRegister);\n\n /*\n * Construct a fermat packet whit the same platform component profile and different FermatPacketType\n */\n FermatPacket fermatPacketRespond = FermatPacketCommunicationFactory.constructFermatPacketEncryptedAndSinged(receiveFermatPacket.getSender(), //Destination\n serverIdentity.getPublicKey(), //Sender\n platformComponentProfileToRegister.toJson(), //Message Content\n FermatPacketType.COMPLETE_COMPONENT_REGISTRATION, //Packet type\n serverIdentity.getPrivateKey()); //Sender private key\n\n /*\n * Send the encode packet to the server\n */\n clientConnection.send(FermatPacketEncoder.encode(fermatPacketRespond));\n\n System.out.println(\"ComponentRegistrationRequestPacketProcessor - Total Communications Cloud Server Component Registered = \"+getWsCommunicationCloudServer().getRegisteredCommunicationsCloudServerCache().size());\n\n }", "void register() {\n Thread patientLoaderThread = new Thread(new RegistrationRunnable(true));\n patientLoaderThread.start();\n }", "public void register(String name, Pipe pipe) throws Exception {\n pool.put(name, pipe);\n }", "public Register()\n {\n // initialise instance variables\n star = new AllMedia();\n\n }", "public Register() {\n }", "public FrontendPacketReader(FrontendPacket packet) {\n\t\tthis.packet = packet;\n\t}", "public void registerPlayer(BlackjackPlayer player) {\r\n getPlayers().add(player);\r\n }", "private void configurarCodec(){\n\n\t\t// Necessario para utilizar o Processor como um Player.\n\t\tprocessor.setContentDescriptor(null);\n\n\n\t\tfor (int i = 0; i < processor.getTrackControls().length; i++) {\n\n\t\t\tif (processor.getTrackControls()[i].getFormat() instanceof VideoFormat) {\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Instantiate and set the frame access codec to the data flow path.\n\t\t\t\t\tTrackControl videoTrack = processor.getTrackControls()[i];\n\t\t\t\t\tCodec codec[] = { new CodecVideo() };\n\t\t\t\t\tvideoTrack.setCodecChain(codec);\n\t\t\t\t\tbreak;\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\n\t\t\t}\n\t\t}\n\n\t\tprocessor.prefetch();\n\n\t}", "public void register(T t);", "public Register_Command(ExchangeWrapper exchange)\n\t{\n\t\tsuper(exchange);\n\t\t//here we will deserialize the JSON into a Register_Input object\n\t}", "private void registerOtherComponent(final PlatformComponentProfile platformComponentProfileToRegister, final FermatPacket receiveFermatPacket, final WebSocket clientConnection, final ECCKeyPair serverIdentity){\n\n System.out.println(\" ============================================================================ \");\n System.out.println(\"ComponentRegistrationRequestPacketProcessor - registerOtherComponent\");\n\n\n Map<PlatformComponentType, List<PlatformComponentProfile>> registeredPlatformComponentProfile = getWsCommunicationCloudServer().getRegisteredPlatformComponentProfileCache();\n\n /*\n * Validate if contain a list for the NetworkServiceType\n */\n if (registeredPlatformComponentProfile.containsKey(platformComponentProfileToRegister.getPlatformComponentType())){\n\n /*\n * Add to the list\n */\n registeredPlatformComponentProfile.get(platformComponentProfileToRegister.getPlatformComponentType()).add(platformComponentProfileToRegister);\n\n }else {\n\n /*\n * Create new list by the PlatformComponentType and add the profile\n */\n List<PlatformComponentProfile> newListPCP = new ArrayList<>();\n newListPCP.add(platformComponentProfileToRegister);\n\n registeredPlatformComponentProfile.put(platformComponentProfileToRegister.getPlatformComponentType(), newListPCP);\n\n }\n\n /*\n * Construct a fermat packet whit the same platform component profile and different FermatPacketType\n */\n FermatPacket fermatPacketRespond = FermatPacketCommunicationFactory.constructFermatPacketEncryptedAndSinged(receiveFermatPacket.getSender(), //Destination\n serverIdentity.getPublicKey(), //Sender\n platformComponentProfileToRegister.toJson(), //Message Content\n FermatPacketType.COMPLETE_COMPONENT_REGISTRATION, //Packet type\n serverIdentity.getPrivateKey()); //Sender private key\n\n /*\n * Send the encode packet to the server\n */\n clientConnection.send(FermatPacketEncoder.encode(fermatPacketRespond));\n\n System.out.println(\"ComponentRegistrationRequestPacketProcessor - Total (\" + platformComponentProfileToRegister.getPlatformComponentType() + \") Component Registered = \" + registeredPlatformComponentProfile.get(platformComponentProfileToRegister.getPlatformComponentType()).size());\n\n }", "@BeforeEach\n void setupBeforeEach() {\n this.registry = new SimplePacketRegistry();\n }", "public void registerWithServer();", "void sendRawPacket(UUID uuid, ByteBuf packet) throws IllegalArgumentException;", "public void registerReceiver(Channel.Receiver receiver);", "private void setupNextEncoder() {\n channel.outboundPipeline().replace(this, outboundHandlers);\n }", "private static void sendSpecialPacket(ProfilingPacketType packet){\r\n\r\n try{\r\n clientObjectOutputStream.writeObject(packet);\r\n clientObjectOutputStream.flush();\r\n }catch (IOException ioe){\r\n ioe.printStackTrace();\r\n //TODO - log and stuff\r\n }\r\n }", "private void registerNeurons(){\n\t\tneurons.add(new ObstaclesDetectionNeuron(this));\n\t\tneurons.add(new AreaLimitDetectionNeuron(this));\n\t\tneurons.add(new ButtonHandlerNeuron(this));\n\t\tneurons.add(new BeeperNeuron(this));\n\t}", "@Override\n public void queueDeviceWrite(IpPacket packet) {\n\n deviceWrites.add(packet.getRawData());\n }", "public PacketType(Sender sender, String className, int id){\n\t\tthis.sender = sender;\n\t\tthis.id = id;\n\n\t\tString packetType = \"PacketPlay\" + ((sender == Sender.CLIENT) ? \"In\" : \"Out\");\n\t\tthis.className = packetType + className;\n\t}", "@Override\n\tpublic void onPacketData(NetworkManager network, Packet250CustomPayload packet, Player player)\n\t{\n\n\t}", "void registerIDCard(IDCard idCard) {\n registeredIDCardList.add(idCard);\n }", "public void register() {\r\n\t\tHandlerSet hs = HandlerSet.getHandlerSet();\r\n\t\ths.addHandler(this);\r\n\t}", "void registerPart(String uniqueName, Object part, Class<?>... implementedInterfaces);", "void SendPacket(int packetIdentifier);", "void registerPart(Object part, Class<?>... implementedInterfaces);", "@Override\n public void register(Asciidoctor asciidoctor) {\n }", "public PacketAssembler()\n {\n \tthis.theTreeMaps = new TreeMap<Integer, TreeMap<Integer,String>>();\n \tthis.countPerMessage = new TreeMap<Integer,Integer>();\n }", "@Override\n public void register(Computer computer) throws RemoteException {\n final ComputerProxy computerProxy = new ComputerProxy(computer);\n computerProxies.put(computer, computerProxy);\n computerProxy.start();\n System.out.printf(\"Computer %d registered.%n\", computerProxy.computerId);\n }", "public void deliver(Packet packet) {\n \n }" ]
[ "0.60286313", "0.54191834", "0.5327711", "0.5166656", "0.5151634", "0.5149641", "0.51462626", "0.513211", "0.51297885", "0.5129507", "0.51069367", "0.50655776", "0.5036347", "0.50082284", "0.49971977", "0.4976877", "0.4970329", "0.49471682", "0.4946114", "0.49399936", "0.48797262", "0.48738843", "0.48588207", "0.48570266", "0.48094484", "0.48058647", "0.48040572", "0.48035693", "0.4803069", "0.48028174", "0.47878182", "0.47766235", "0.47658196", "0.47564128", "0.47564128", "0.4751186", "0.47456327", "0.47444877", "0.47372597", "0.4727558", "0.47268188", "0.47075224", "0.4703019", "0.47016358", "0.4695783", "0.4689917", "0.46828344", "0.46802205", "0.4649436", "0.46436462", "0.46420166", "0.4632531", "0.4630701", "0.46217722", "0.4617547", "0.46023318", "0.45962727", "0.45953774", "0.45899644", "0.4587065", "0.45718464", "0.45714924", "0.4569097", "0.45647335", "0.45628703", "0.45547664", "0.45539322", "0.4552942", "0.45494926", "0.4548358", "0.45425713", "0.45395833", "0.45296684", "0.45110765", "0.45061886", "0.45004386", "0.44961625", "0.44943613", "0.44930884", "0.44883403", "0.44758925", "0.44681165", "0.44625494", "0.4459309", "0.44519892", "0.44511485", "0.4448844", "0.444017", "0.44352624", "0.4434142", "0.4432615", "0.442629", "0.44249657", "0.44225553", "0.44222033", "0.44204763", "0.4416165", "0.44128314", "0.44003412", "0.43902752" ]
0.68997407
0
Ensures that packet discriminators are common between server and client by using logical sorting
public void postInit() { if (!this.initialized) { ECLog.warning( "The net handler " + this.name + " is attempting to post-init, but it hasn't been initialised yet."); } if (this.postInitialized) { return; } this.postInitialized = true; Collections.sort(this.packets, new Comparator<Class>() { @Override public int compare(Class clazz1, Class clazz2) { String canon1 = clazz1.getCanonicalName(); String canon2 = clazz2.getCanonicalName(); int com = String.CASE_INSENSITIVE_ORDER.compare(canon1, canon2); if (com == 0) { com = canon1.compareTo(canon2); } return com; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sortClients()\n {\n System.out.println(\"clients items (alphabetically):\");\n Set<Client> clients = ctrl.sortClientsAlphabetically();\n clients.stream().forEach(System.out::println);\n }", "private void processPacket(DatagramPacket packet) {\n String data = new String(packet.getData());\n if (data.startsWith(\"/c/\")) {\n int ID = UniqueIdentifier.getIdentifier();\n clients.add(new ServerClient(data.split(\"/c/|/e/\")[1], packet.getAddress(), packet.getPort(), ID));\n System.out.println(\"Client connected with the name: '\" + data.split(\"/c/|/e/\")[1] + \"' @ \" + packet.getAddress() + \":\" + packet.getPort() + \" and is now using the ID: \" + ID);\n send((\"/c/\" + ID + \"/e/\").getBytes(), packet.getAddress(), packet.getPort());\n } else if (data.startsWith(\"/d/\")) {\n disconnect(Integer.parseInt(data.split(\"/d/|/e/\")[1]), true);\n } else if (data.startsWith(\"/sa/\")) {\n sendToAll((\"/m/\" + data.split(\"/sa/|/e/\")[1] + \"/e/\").getBytes());\n } else if (data.startsWith(\"/s/\")) { //TODO - FIX INDIVIDUAL PACKET SENDING\n String decodedData = data.split(\"/s/|/e/\")[1];\n String targetID = decodedData;\n targetID = targetID.substring(targetID.indexOf(\"&\") + 1);\n targetID = targetID.substring(0, targetID.indexOf(\"&\"));\n int id = Integer.parseInt(targetID);\n decodedData = decodedData.replace(\"&\" + id + \"&\", \"\");\n ServerClient targetClient = null;\n for (ServerClient item : clients) {\n if (item.getID() == id) {\n targetClient = item;\n break;\n }\n }\n assert targetClient != null;\n send(decodedData.getBytes(), targetClient.getAddress(), targetClient.getPort());\n } else if (data.startsWith(\"/p/\")) {\n clientResponse.add(Integer.parseInt(data.split(\"/p/|/e/\")[1]));\n } else if (data.startsWith(\"/dp/\")) {\n sendToAll(data.substring(0, data.length() - 3).getBytes());\n } else {\n System.out.println(packet.getAddress() + \":\" + packet.getPort() + \" sent an unknown packet: \" + data);\n }\n }", "private static void compareForIdenticalKeys() {\n Integer[] identical = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\n\n Insertion insertion = new Insertion();\n insertion.analyzeSort(identical);\n insertion.getStat().printReport();\n\n Selection selection = new Selection();\n selection.analyzeSort(identical);\n selection.getStat().printReport();\n }", "@Test\n public void testOrderInNegotiation() {\n Player l_player = new Player();\n l_player.setD_playerName(\"user2\");\n l_player.setD_negotiatePlayer(d_player.getD_playerName());\n\n Country l_country2 = new Country();\n l_country2.setD_continentIndex(1);\n l_country2.setD_countryIndex(3);\n l_country2.setD_countryName(\"nepal\");\n List<Country> l_countryList = new ArrayList();\n l_countryList.add(l_country2);\n l_player.setD_ownedCountries(l_countryList);\n\n d_gameData.getD_playerList().add(l_player);\n\n d_orderProcessor.processOrder(\"negotiate user2\".trim(), d_gameData);\n d_gameData.getD_playerList().get(0).issue_order();\n Order l_order = d_gameData.getD_playerList().get(0).next_order();\n\n d_orderProcessor.processOrder(\"advance india nepal 5\".trim(), d_gameData);\n d_gameData.getD_playerList().get(0).issue_order();\n Order l_order1 = d_gameData.getD_playerList().get(0).next_order();\n assertEquals(false, l_order1.executeOrder());\n }", "private boolean compareBaseHeaderFields(HeaderMsg requestHeader, HeaderMsg responseHeader) {\n return requestHeader.getRequestId() == responseHeader.getRequestId() &&\n requestHeader.getEpoch() == responseHeader.getEpoch() &&\n requestHeader.getClientId().equals(responseHeader.getClientId()) &&\n requestHeader.getClusterId().equals(responseHeader.getClusterId());\n }", "@Override\n public int compare(Host h1, Host h2) {\n return (h1.getMaxAvailableMips() + h1.getRam()) > (h2.getMaxAvailableMips() + h2.getRam()) ? -1 : ((h1.getMaxAvailableMips() + h1.getRam()) < (h2.getMaxAvailableMips() + h2.getRam()) ? 1 : 0);\n }", "private static int compartTo(IPAddress4Sort IP1, IPAddress4Sort IP2) {\n\t\tint ipCompareResult = compareIP(IP1.IP, IP2.IP);\r\n\t\tif (ipCompareResult == 0) {\r\n\t\t\treturn compareNetmask(IP1.NetMask, IP2.NetMask);\r\n\t\t} else {\r\n\t\t\treturn ipCompareResult;\r\n\t\t}\r\n\t}", "private SeqIter addSortedServer(final SeqIter it1, final SeqIter it2) {\r\n if(it1 == null && it2 != null) return it2;\r\n if(it2 == null && it1 != null) return it1;\r\n \r\n final SeqIter tmp = new SeqIter();\r\n Item i1 = it1.next(), i2 = it2.next();\r\n while(i1 != null && i2 != null) {\r\n if(i1.score < i2.score) {\r\n tmp.add(i2);\r\n i2 = it2.next();\r\n } else if(i1.score > i2.score) {\r\n tmp.add(i1);\r\n i1 = it1.next();\r\n } else {\r\n tmp.add(i2);\r\n i1 = it1.next();\r\n i2 = it2.next();\r\n }\r\n \r\n }\r\n while((i1 = it1.next()) != null) tmp.add(i1);\r\n while((i2 = it2.next()) != null) tmp.add(i2);\r\n return tmp;\r\n }", "@Override\n public List<Client> sortByNameAndID(){\n return null;\n }", "public interface ISortServer extends Remote {\n \n\t/**\n\t * Register a new sort client. Clients can only register successfully if sort()\n\t * has not been called.\n\t * @param client client to register\n\t * @return if the client was registered\n\t * @throws RemoteException\n\t */\n\tpublic boolean registerClient(ISortClient client) throws RemoteException;\n\t\n\t/**\n\t * Add a new item to the \"to be sorted\" data\n\t * @param element\n\t */\n\tpublic abstract void add(String element) throws RemoteException;\n\n\t/**\n\t * Initiates the sort operation\n\t * @throws RemoteException \n\t */\n\tpublic abstract void sort() throws RemoteException;\n\t\n\tpublic Iterator<String> iterator() throws RemoteException;\n\n\n}", "@Override\n public int compare(Card card1, Card card2) {\n return card2.getId().compareTo\n (card1.getId());\n }", "public static void doHighLatencyPeers(ArrayList<PEPeer> peers_to_choke, ArrayList<PEPeer> peers_to_unchoke, boolean allow_snubbed) {\n\n if (peers_to_choke.size() == 0) {\n\n return;\n }\n\n // System.out.println( \"doHLP: \" + peers_to_choke + \", \" + peers_to_unchoke );\n\n Iterator<PEPeer> choke_it = peers_to_choke.iterator();\n\n int to_remove = 0;\n\n while (choke_it.hasNext()) {\n\n PEPeer peer = choke_it.next();\n\n if (AENetworkClassifier.categoriseAddress(peer.getIp()) != AENetworkClassifier.AT_PUBLIC) {\n\n if (isUnchokable(peer, allow_snubbed)) {\n\n // System.out.println( \" removed \" + peer );\n\n choke_it.remove();\n\n to_remove++;\n\n } else {\n\n // it isn't unchokable so we need to choke it whatever\n\n }\n }\n }\n\n // if we've removed any chokes then we need to balance things by removing an equal number\n // of unchokes\n\n if (to_remove > 0) {\n\n ListIterator<PEPeer> unchoke_it = peers_to_unchoke.listIterator(peers_to_unchoke.size());\n\n // preferrably balance with high latency peers\n\n while (unchoke_it.hasPrevious()) {\n\n PEPeer peer = unchoke_it.previous();\n\n if (AENetworkClassifier.categoriseAddress(peer.getIp()) != AENetworkClassifier.AT_PUBLIC) {\n\n // System.out.println( \" balanced with \" + peer );\n\n unchoke_it.remove();\n\n to_remove--;\n\n if (to_remove == 0) {\n\n return;\n }\n }\n }\n\n if (to_remove > 0) {\n\n unchoke_it = peers_to_unchoke.listIterator(peers_to_unchoke.size());\n\n while (unchoke_it.hasPrevious()) {\n\n PEPeer peer = unchoke_it.previous();\n\n unchoke_it.remove();\n\n to_remove--;\n\n if (to_remove == 0) {\n\n return;\n }\n }\n }\n }\n }", "private RouteMode getCommMode(MacAddress src, MacAddress dst) {\n\t\tif ((src.equals(H1) && dst.equals(H2)) || (src.equals(H2) && dst.equals(H1))) {\n\t\t\tlog.info(\"pair: H1 <--> H2 : Direct\");\n\t\t\treturn RouteMode.ROUTE_DIRECT;\n\t\t}\n\n\t\t// H1 <--> PX : Drop\n\t\telse if ((src.equals(H1) && dst.equals(PX)) || (src.equals(PX) && dst.equals(H1))) {\n\t\t\tlog.info(\"pair: H1 <--> PX : Drop\");\n\t\t\treturn RouteMode.ROUTE_DROP;\n\t\t}\n\n\t\t// H1 <--> H3 : Proxy\n\t\telse if ((src.equals(H1) && dst.equals(H3)) || (src.equals(H3) && dst.equals(H1))) {\n\t\t\tlog.info(\"pair: H1 <--> H3 : Proxy\");\n\t\t\treturn RouteMode.ROUTE_PROXY;\n\t\t}\n\n\t\t// H2 <--> PX : Drop\n\t\telse if ((src.equals(H2) && dst.equals(PX)) || (src.equals(PX) && dst.equals(H2))) {\n\t\t\tlog.info(\"pair: H2 <--> PX : Drop\");\n\t\t\treturn RouteMode.ROUTE_DROP;\n\t\t}\n\n\t\t// H2 <--> H3 : Proxy\n\t\telse if ((src.equals(H2) && dst.equals(H3)) || (src.equals(H3) && dst.equals(H2))) {\n\t\t\tlog.info(\"pair: H2 <--> H3 : Proxy\");\n\t\t\treturn RouteMode.ROUTE_PROXY;\n\t\t}\n\n\t\t// H3 <--> PX : Drop\n\t\telse if ((src.equals(H3) && dst.equals(PX)) || (src.equals(PX) && dst.equals(H3))) {\n\t\t\tlog.info(\"pair: H3 <--> PX : Drop\");\n\t\t\treturn RouteMode.ROUTE_DROP;\n\t\t} else {\n\t\t\treturn RouteMode.ROUTE_DROP;\n\t\t}\n\t}", "@Override\n public List<Client> clientsSortedAlphabetically(){\n log.trace(\"clientsSortedAlphabetically -- method entered\");\n Iterable<Client> clients = clientRepository.findAll();\n List<Client> result = StreamSupport.stream(clients.spliterator(),false).sorted(Comparator.comparing(Client::getName)).collect(Collectors.toList());\n log.trace(\"clientsSortedAlphabetically: result={}\", result);\n return result;\n\n }", "public interface NetworkType {\n\n /**\n * Vehicletypes in the order they are send in info packets.\n */\n public enum NetworkVehicleType {\n NETWORK_VEH_TRAIN,\n NETWORK_VEH_LORRY,\n NETWORK_VEH_BUS,\n NETWORK_VEH_PLANE,\n NETWORK_VEH_SHIP,\n NETWORK_VEH_END;\n\n public static int length() {\n return Arrays\n .asList(NetworkVehicleType.values())\n .indexOf(NetworkVehicleType.NETWORK_VEH_END);\n }\n };\n\n public enum DestType {\n DESTTYPE_BROADCAST, // /< Send message/notice to all clients (All)\n DESTTYPE_TEAM, // /< Send message/notice to everyone playing the same company (Team)\n DESTTYPE_CLIENT, // /< Send message/notice to only a certain client (Private)\n };\n\n /**\n * Actions that can be used for NetworkTextMessage\n */\n public enum NetworkAction {\n NETWORK_ACTION_JOIN,\n NETWORK_ACTION_LEAVE,\n NETWORK_ACTION_SERVER_MESSAGE,\n NETWORK_ACTION_CHAT,\n NETWORK_ACTION_CHAT_COMPANY,\n NETWORK_ACTION_CHAT_CLIENT,\n NETWORK_ACTION_GIVE_MONEY,\n NETWORK_ACTION_NAME_CHANGE,\n NETWORK_ACTION_COMPANY_SPECTATOR,\n NETWORK_ACTION_COMPANY_JOIN,\n NETWORK_ACTION_COMPANY_NEW,\n NETWORK_ACTION_KICKED,\n NETWORK_ACTION_EXTERNAL_CHAT,\n };\n\n public enum NetworkErrorCode {\n NETWORK_ERROR_GENERAL, // Try to use this one like never\n\n /* Signals from clients */\n NETWORK_ERROR_DESYNC,\n NETWORK_ERROR_SAVEGAME_FAILED,\n NETWORK_ERROR_CONNECTION_LOST,\n NETWORK_ERROR_ILLEGAL_PACKET,\n NETWORK_ERROR_NEWGRF_MISMATCH,\n /* Signals from servers */\n NETWORK_ERROR_NOT_AUTHORIZED,\n NETWORK_ERROR_NOT_EXPECTED,\n NETWORK_ERROR_WRONG_REVISION,\n NETWORK_ERROR_NAME_IN_USE,\n NETWORK_ERROR_WRONG_PASSWORD,\n NETWORK_ERROR_COMPANY_MISMATCH, // Happens in CLIENT_COMMAND\n NETWORK_ERROR_KICKED,\n NETWORK_ERROR_CHEATER,\n NETWORK_ERROR_FULL,\n NETWORK_ERROR_TOO_MANY_COMMANDS,\n NETWORK_ERROR_TIMEOUT_PASSWORD,\n NETWORK_ERROR_TIMEOUT_COMPUTER,\n NETWORK_ERROR_TIMEOUT_MAP,\n NETWORK_ERROR_TIMEOUT_JOIN,\n NETWORK_ERROR_INVALID_CLIENT_NAME,\n NETWORK_ERROR_END;\n\n public static NetworkErrorCode valueOf(int order) {\n for (NetworkErrorCode value : values()) {\n if (value.ordinal() == order) {\n return value;\n }\n }\n return null;\n }\n };\n\n}", "private boolean linkMappingCoreSeparate( VirtualLink vLink, SubstrateSwitch edgeSwitch1,\n\t\t\tSubstrateSwitch edgeSwitch2, Topology topo) {\n\t\tMap<SubstrateSwitch, LinkedList<SubstrateSwitch>> listAggConnectEdge = topo.getListAggConnectEdge();\n\t\tMap<SubstrateSwitch, LinkedList<SubstrateSwitch>> listCoreConnectAggMap = topo.getListCoreConnectAgg();\t\n\t\tLinkedList<LinkPhyEdge> listPhyEdge = topo.getListLinkPhyEdge();\n\t\tLinkedList<SubstrateLink> listLinkBandwidth = topo.getLinkBandwidth();\n\t\tLinkedList<SubstrateSwitch> listAggSort1 = new LinkedList<>();\n\t\tLinkedList<SubstrateSwitch> listAggSort2 = new LinkedList<>();\n\t\tLinkedList<SubstrateSwitch> listCoreSort1 = new LinkedList<>();\n\t\tLinkedList<SubstrateSwitch> listCoreSort2 = new LinkedList<>();\n\t\t\n\t\tService sService = vLink.getsService();\n\t\tService dService = vLink.getdService();\n\t\t\n\t\tdouble bandwidthDemand = vLink.getBandwidthRequest();\n\t\tint count = 0;\n\t\t\n\t\tSubstrateSwitch edge1 = null, edge2 = null;\n\t\tSubstrateSwitch agg1 = null, agg2 = null;\n\t\tSubstrateSwitch core = null;\n\t\t\n\t\tLinkPhyEdge linkEdge1 = null, linkEdge2 = null;\n\t\t\n\t\tSubstrateLink linkAggEdge1a = null, linkAggEdge1b = null;\n\t\tSubstrateLink linkAggEdge2a = null, linkAggEdge2b = null;\n\t\tSubstrateLink linkCoreAgg1a = null, linkCoreAgg1b = null;\n\t\tSubstrateLink linkCoreAgg2a = null, linkCoreAgg2b = null;\n\t\t//===get edge switch connect to server=====================================//\n\t\tfor (LinkPhyEdge linkPhyEdge: listPhyEdge) { \n\t\t\t\n\t\t\tif(linkPhyEdge.getPhysicalServer().equals(sService.getBelongToServer())){\n\t\t\t\tedge1 = linkPhyEdge.getEdgeSwitch();\n\t\t\t\tif(linkPhyEdge.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\treturn false;\n\t\t\t\t}else {\n\t\t\t\t\tlinkEdge1 = linkPhyEdge;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\tif(linkPhyEdge.getPhysicalServer().equals(dService.getBelongToServer())) {\n\t\t\t\tedge2 = linkPhyEdge.getEdgeSwitch();\n\t\t\t\tif(linkPhyEdge.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\treturn false;\n\t\t\t\t}else {\n\t\t\t\t\tlinkEdge2 = linkPhyEdge;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tlistAggSort1 = sortListSwitch(listAggConnectEdge.get(edge1));\n\t\tlistAggSort2 = sortListSwitch(listAggConnectEdge.get(edge2));\n\t\n\t\t//=== find link connect Agg to Edge ======================================//\n\t\tAGG_EDGE_LOOP1:\n\t\tfor(int index = 0; index < listAggSort1.size(); index++) {\n\t\t\tagg1 = listAggSort1.get(index);\n\t\t\tfor (SubstrateLink link : listLinkBandwidth) {\n\t\t\t\tif(link.getStartSwitch() == edge1 && link.getEndSwitch() == agg1) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkAggEdge1a = link;\n\t\t\t\t\t\tcount ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(link.getStartSwitch() == agg1 && link.getEndSwitch() == edge1) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkAggEdge1b = link;\n\t\t\t\t\t\tcount ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(count == 2) break AGG_EDGE_LOOP1;\n\t\t\t}\t\n\t\t} // end for loop 1\n\t\tcount = 0;\n\t\tAGG_EDGE_LOOP2:\n\t\tfor(int index = 0; index < listAggSort2.size(); index++) {\n\t\t\tagg2 = listAggSort2.get(index);\n\t\t\tfor (SubstrateLink link : listLinkBandwidth) {\n\t\t\t\tif(link.getStartSwitch() == edge2 && link.getEndSwitch() == agg2) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkAggEdge2a = link;\n\t\t\t\t\t\tcount ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(link.getStartSwitch() == agg2 && link.getEndSwitch() == edge2) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkAggEdge2b = link;\n\t\t\t\t\t\tcount ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(count == 2) break AGG_EDGE_LOOP2;\n\t\t\t}\t\n\t\t} // end for loop 2\n\t\t//=== find link connect Agg to Core ======================================//\n\t\tlistCoreSort1 = sortListSwitch(listCoreConnectAggMap.get(agg1));\n\t\tlistCoreSort2 = sortListSwitch(listCoreConnectAggMap.get(agg2));\n\t\t\n\t\tif(!listCoreSort1.equals(listCoreSort2)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor(int index = 0; index < listCoreSort1.size(); index++) {\n\t\t\tcore = listCoreSort1.get(index);\n\t\t\tfor (SubstrateLink link : listLinkBandwidth) {\n\t\t\t\tif(link.getStartSwitch() == agg1 && link.getEndSwitch() == core) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkCoreAgg1a = link;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(link.getStartSwitch() == core && link.getEndSwitch() == agg1) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkCoreAgg1b = link;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(link.getStartSwitch() == agg2 && link.getEndSwitch() == core) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkCoreAgg2a = link;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(link.getStartSwitch() == core && link.getEndSwitch() == agg2) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkCoreAgg2b = link;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//===set up bandwidth for all found links above ========//\n\t\tlinkEdge1.setBandwidth(linkEdge1.getBandwidth() - bandwidthDemand);\n\t\tlinkEdge1.getEdgeSwitch().setPort(linkEdge1.getEdgeSwitch(), bandwidthDemand);\n\t\tlinkEdge2.setBandwidth(linkEdge2.getBandwidth() - bandwidthDemand);\n\t\tlinkEdge2.getEdgeSwitch().setPort(linkEdge2.getEdgeSwitch(), bandwidthDemand);\n\t\tvLink.getLinkPhyEdge().add(linkEdge1);\n\t\tvLink.getLinkPhyEdge().add(linkEdge2);\n\t\tlinkAggEdge1a.setBandwidth(linkAggEdge1a.getBandwidth() - bandwidthDemand);\n\t\tlinkAggEdge1a.getStartSwitch().setPort(linkAggEdge1a.getEndSwitch(), bandwidthDemand);\n\t\tlinkAggEdge1b.setBandwidth(linkAggEdge1b.getBandwidth() - bandwidthDemand);\n\t\tlinkAggEdge1b.getStartSwitch().setPort(linkAggEdge1b.getEndSwitch(), bandwidthDemand);\n\t\tlinkAggEdge2a.setBandwidth(linkAggEdge2a.getBandwidth() - bandwidthDemand);\n\t\tlinkAggEdge2a.getStartSwitch().setPort(linkAggEdge2a.getEndSwitch(), bandwidthDemand);\n\t\tlinkAggEdge2b.setBandwidth(linkAggEdge2b.getBandwidth() - bandwidthDemand);\n\t\tlinkAggEdge2b.getStartSwitch().setPort(linkAggEdge2b.getEndSwitch(), bandwidthDemand);\n\t\tlinkCoreAgg1a.setBandwidth(linkCoreAgg1a.getBandwidth() - bandwidthDemand);\n\t\tlinkCoreAgg1a.getStartSwitch().setPort(linkCoreAgg1a.getEndSwitch(), bandwidthDemand);\n\t\tlinkCoreAgg1b.setBandwidth(linkCoreAgg1b.getBandwidth() - bandwidthDemand);\n\t\tlinkCoreAgg1b.getStartSwitch().setPort(linkCoreAgg1b.getEndSwitch(), bandwidthDemand);\n\t\tlinkCoreAgg2a.setBandwidth(linkCoreAgg2a.getBandwidth() - bandwidthDemand);\n\t\tlinkCoreAgg2a.getStartSwitch().setPort(linkCoreAgg2a.getEndSwitch(), bandwidthDemand);\n\t\tlinkCoreAgg2b.setBandwidth(linkCoreAgg2b.getBandwidth() - bandwidthDemand);\n\t\tlinkCoreAgg2b.getStartSwitch().setPort(linkCoreAgg2b.getEndSwitch(), bandwidthDemand);\n\t\tvLink.getLinkSubstrate().add(linkAggEdge1a);\n\t\tvLink.getLinkSubstrate().add(linkAggEdge1b);\n\t\tvLink.getLinkSubstrate().add(linkAggEdge2a);\n\t\tvLink.getLinkSubstrate().add(linkAggEdge2b);\n\t\tvLink.getLinkSubstrate().add(linkCoreAgg1a);\n\t\tvLink.getLinkSubstrate().add(linkCoreAgg1b);\n\t\tvLink.getLinkSubstrate().add(linkCoreAgg2a);\n\t\tvLink.getLinkSubstrate().add(linkCoreAgg2b);\n\t\treturn true;\n\t}", "public void sortCompetitors(){\n\t\t}", "@Override\r\n public int compareTo(Object o) {\r\n ClienteEntity pCliente= (ClienteEntity)o;\r\n return this.envios.size()<pCliente.envios.size()?-1:this.envios.size()>pCliente.envios.size()?1:0; }", "public void testSenderOrderWithMultipleSiteMasters() throws Exception {\n MyReceiver<Object> rx=new MyReceiver<>().rawMsgs(true).verbose(true),\n ry=new MyReceiver<>().rawMsgs(true).verbose(true), rz=new MyReceiver<>().rawMsgs(true).verbose(true);\n final int NUM=512;\n final String sm_picker_impl=SiteMasterPickerImpl.class.getName();\n a=createNode(LON, \"A\", LON_CLUSTER, 2, sm_picker_impl, null);\n b=createNode(LON, \"B\", LON_CLUSTER, 2, sm_picker_impl, null);\n c=createNode(LON, \"C\", LON_CLUSTER, 2, sm_picker_impl, null);\n Util.waitUntilAllChannelsHaveSameView(10000, 1000, a,b,c);\n\n x=createNode(SFO, \"X\", SFO_CLUSTER, 2, sm_picker_impl, rx);\n y=createNode(SFO, \"Y\", SFO_CLUSTER, 2, sm_picker_impl, ry);\n z=createNode(SFO, \"Z\", SFO_CLUSTER, 2, sm_picker_impl, rz);\n Util.waitUntilAllChannelsHaveSameView(10000, 1000, x,y,z);\n\n waitForBridgeView(4, 10000, 1000, a,b,x,y);\n\n // C in LON sends messages to the site master of SFO (via either SM A or B); everyone in SFO (x,y,z)\n // must receive them in correct order\n SiteMaster target_sm=new SiteMaster(SFO);\n System.out.printf(\"%s: sending %d messages to %s:\\n\", c.getAddress(), NUM, target_sm);\n for(int i=1; i <= NUM; i++) {\n Message msg=new BytesMessage(target_sm, i); // the seqno is in the payload of the message\n c.send(msg);\n }\n\n boolean running=true;\n for(int i=0; running && i < 10; i++) {\n for(MyReceiver<Object> r: Arrays.asList(rx,ry,rz)) {\n if(r.size() >= NUM) {\n running=false;\n break;\n }\n }\n Util.sleep(1000);\n }\n\n System.out.printf(\"X: size=%d\\nY: size=%d\\nZ: size=%d\\n\", rx.size(), ry.size(), rz.size());\n assert rx.size() == NUM || ry.size() == NUM;\n assert rz.size() == 0;\n }", "@Override\n\t public int compare(Player p1, Player p2) {\n\t boolean desc = sortField.startsWith(\"-\");\n\t String fieldToUse = desc ? sortField.substring(1): sortField; \n\n\t try {\n\t String field1 = BeanUtils.getProperty(p1, fieldToUse);\n\t String field2 = BeanUtils.getProperty(p2, fieldToUse);\n\t return (desc) ? field2.compareTo(field1) : field1.compareTo(field2);\n\t } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t// Again just for test purposes. Since we are in the service layer \n\t\t\t\t\t\t// and beyond the API. We will throw a Business Logic Exception.\n\t\t\t\t\t\tthrow new BusinessLogicException(e.getMessage(), \n\t\t\t\t\t\t\t\tBusinessErrorCodeEnum.INTERNAL_PROCESSING_ERROR);\n\t\t\t\t\t}\n\t\t\t\t}", "@Test\n public void doubleSortWithExchangeUnbalancedNodes() {\n ExternalSort es1 = new ExternalSort(OpProps.prototype(0, Long.MAX_VALUE).cloneWithMemoryExpensive(true).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), ARBTRIARY_LEAF, Collections.emptyList(), false);\n SingleSender ss = new SingleSender(OpProps.prototype(1, Long.MAX_VALUE).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), Mockito.mock(BatchSchema.class), es1, 0,\n MinorFragmentIndexEndpoint.newBuilder().setMinorFragmentId(0).build());\n Fragment f1 = new Fragment();\n f1.addOperator(ss);\n Wrapper w1 = new Wrapper(f1, 0);\n w1.overrideEndpoints(Arrays.asList(N1, N2));\n\n UnorderedReceiver or = new UnorderedReceiver(OpProps.prototype(1, Long.MAX_VALUE), Mockito.mock(BatchSchema.class), 0, Collections.emptyList(), false);\n ExternalSort es2 = new ExternalSort(OpProps.prototype(0, Long.MAX_VALUE).cloneWithMemoryExpensive(true).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), or, Collections.emptyList(), false);\n Fragment f2 = new Fragment();\n f2.addOperator(es2);\n Wrapper w2 = new Wrapper(f2, 0);\n w2.overrideEndpoints(Collections.singletonList(N1));\n\n\n MemoryAllocationUtilities.setMemory(options, ImmutableMap.of(f1, w1, f2, w2), 10 + adjustReserve);\n assertEquals(3L, es1.getProps().getMemLimit());\n assertEquals(3L, es2.getProps().getMemLimit());\n }", "@Override\n\tpublic int compare(IIntercepter in1, IIntercepter in2) {\n\t\treturn in2.getOrder().compareTo(in1.getOrder());\n\t}", "@Test\n public void firstPacket() throws Exception {\n int[] data = Utils.textToHexArr(\"Test\");\n packet.setFlag(Flag.SYN);\n packet.setData(data);\n\n assertEquals(Flag.SYN.value,packet.getFlags());\n assertEquals(0,packet.getSeqNumber());\n assertEquals(1,packet.getNextSeqNumber());\n assertEquals(0,packet.getAckNumber());\n assertEquals(Utils.arrayToString(data),packet.getData());\n assertEquals(60 + data.length, packet.getSize());\n\n //Build expected packet\n String ipv6Header = \"6\" +\"00\" + Utils.HexToString(0,20/4)\n + Utils.HexToString(24,16/4) + \"fd\" + \"ff\"\n + Utils.parseAddress(SOURCE_ADDR) + Utils.parseAddress(DEST_ADDR);\n String tcpHeader = \"244c\" + \"1e1e\" + \"00000000\" + \"00000000\" + \"50\"\n + Utils.HexToString(Flag.SYN.value,2) + \"1000\" + \"0000\" + \"0000\";\n String dataAsString = Utils.arrayToString(data);\n assertEquals(ipv6Header + tcpHeader + dataAsString, Utils.arrayToString(packet.getPkt()));\n\n int pkt[] = Utils.stringToHexArr(ipv6Header + tcpHeader + dataAsString);\n assertArrayEquals(pkt,packet.getPkt());\n }", "@Override\r\n\t\t\t\tpublic int compare(Comparendo o1, Comparendo o2) \r\n\t\t\t\t{\n\t\t\t\t\treturn o1.codigoInfraccion.compareTo(o2.codigoInfraccion);\r\n\t\t\t\t}", "@Override\n public List<StaticPacketTrace> pingAll(EtherType type) {\n ImmutableList.Builder<StaticPacketTrace> tracesBuilder = ImmutableList.builder();\n hostNib.getHosts().forEach(host -> {\n List<IpAddress> ipAddresses = getIpAddresses(host, type, false);\n if (ipAddresses.size() > 0) {\n //check if the host has only local IPs of that ETH type\n boolean onlyLocalSrc = ipAddresses.size() == 1 && ipAddresses.get(0).isLinkLocal();\n hostNib.getHosts().forEach(hostToPing -> {\n List<IpAddress> ipAddressesToPing = getIpAddresses(hostToPing, type, false);\n //check if the other host has only local IPs of that ETH type\n boolean onlyLocalDst = ipAddressesToPing.size() == 1 && ipAddressesToPing.get(0).isLinkLocal();\n boolean sameLocation = Sets.intersection(host.locations(), hostToPing.locations()).size() > 0;\n //Trace is done only if they are both local and under the same location\n // or not local and if they are not the same host.\n if (((sameLocation && onlyLocalDst && onlyLocalSrc) ||\n (!onlyLocalSrc && !onlyLocalDst && ipAddressesToPing.size() > 0))\n && !host.equals(hostToPing)) {\n tracesBuilder.addAll(trace(host.id(), hostToPing.id(), type));\n }\n });\n }\n });\n return tracesBuilder.build();\n }", "@Override\n\t\t\t\tpublic int compare(RestDynamicSemanticVersion o1, RestDynamicSemanticVersion o2)\n\t\t\t\t{\n\t\t\t\t\tif (((RestDynamicSemanticNid)o1.dataColumns.get(0)).getNid() == ((RestDynamicSemanticNid)o2.dataColumns.get(0)).getNid())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (o1.semanticChronology != null) //If one chronology is here, they both should be here\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (o1.semanticChronology.assemblage.nid.intValue() == MetaData.US_ENGLISH_DIALECT____SOLOR.getNid())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (o2.semanticChronology.assemblage.nid.intValue() == MetaData.US_ENGLISH_DIALECT____SOLOR.getNid())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (o1.semanticChronology.assemblage.nid.intValue() == MetaData.GB_ENGLISH_DIALECT____SOLOR.getNid())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (o2.semanticChronology.assemblage.nid.intValue() == MetaData.GB_ENGLISH_DIALECT____SOLOR.getNid())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn 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{\n\t\t\t\t\t\t\t\t//Some other dialect... just sort on the dialect text\n\t\t\t\t\t\t\t\treturn AlphanumComparator.compare(Util.readBestDescription(o1.semanticChronology.assemblage.nid),\n\t\t\t\t\t\t\t\t\t\tUtil.readBestDescription(o2.semanticChronology.assemblage.nid), true);\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\t//If chronology isn't populated, I can't sort here\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (((RestDynamicSemanticNid)o1.dataColumns.get(0)).getNid() == MetaData.PREFERRED____SOLOR.getNid())\n\t\t\t\t\t{\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}\n\t\t\t\t\telse if (((RestDynamicSemanticNid)o2.dataColumns.get(0)).getNid() == MetaData.PREFERRED____SOLOR.getNid())\n\t\t\t\t\t{\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//should be impossible - not the same, and neither is preferred - must be invalid data.\n\t\t\t\t\t\tLogManager.getLogger().warn(\"Unexpected sort case\");\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}", "public int compareTo(Object aChannelHandler)\r\n\t{\r\n\r\n\t\treturn this.getChannelId().compareTo(((GenericChannelHandler) aChannelHandler).getChannelId());\r\n\t}", "public int compare(mess m){\n if (m.get_avail()!=this.get_avail()){\r\n \t//System.out.println(\"yes\");\r\n if (m.get_avail()>this.get_avail())return 1;\r\n else return -1;\r\n }\r\n else if (m.get_nutrition()!=this.get_nutrition()){\r\n \t//System.out.println(m.get_nutrition()+\" \"+this.get_nutrition());\r\n if (m.get_nutrition()>this.get_nutrition())return 1;\r\n else return -1;\r\n }\r\n else if (m.get_hygiene()!=this.get_hygiene()){\r\n if (m.get_hygiene()>this.get_hygiene())return 1;\r\n else return -1;\r\n }\r\n else{\r\n if (m.get_deliv()<this.get_deliv())return 1;\r\n else return -1;\r\n }\r\n }", "private void decodeHeader(Packet p){\n \t// Client parent isn't null so client is authenticated\n \tif (client != null)\n \t\tp.header = client.getCrypt().decrypt(p.header);\n \t\n \tif(realm.getVersion() < Versions.VERSION_MOP){\n \t\tByteBuffer toHeader = ByteBuffer.allocate(6);\n \ttoHeader.order(ByteOrder.LITTLE_ENDIAN);\n \ttoHeader.put(p.header);\n \ttoHeader.position(0);\n \t\t\tp.size = (short) (toHeader.get() << 8);\n \t\t\tp.size |= toHeader.get() & 0xFF;\n \t\t\tp.size -= 4;\n \t\t\tp.nOpcode = (short) toHeader.getInt();\n \t p.header = toHeader.array();\n \t} else{\n \t\tif(client != null){\n \t\t\tByteBuffer toHeader = ByteBuffer.allocate(4);\n \ttoHeader.order(ByteOrder.LITTLE_ENDIAN);\n \ttoHeader.put(p.header,0, 4);\n \ttoHeader.position(0);\n \tint header = toHeader.getInt();\n \t\tint size = ((header >> 13));\n \t\tint opcode = (header & 0x1FFF);\n \t \tp.header[0] = (byte)(0xFF & size);\n \t \tp.header[1] = (byte)(0xFF & (size >> 8));\n \t \tp.header[2] = (byte)(0xFF & opcode);\n \t \tp.header[3] = (byte)(0xFF & (opcode >> 8));\n \t\t}\n \t\t\n \t\tByteBuffer toHeader = ByteBuffer.allocate((realm.getVersion() <= Versions.VERSION_CATA) ? 6 : 4);\n \ttoHeader.order(ByteOrder.LITTLE_ENDIAN);\n \ttoHeader.put(p.header, 0, (realm.getVersion() <= Versions.VERSION_CATA) ? 6 : 4);\n \ttoHeader.position(0);\n \n \t p.size = toHeader.getShort();\n \tp.nOpcode = toHeader.getShort();\n \tp.header = toHeader.array();\n \t}\n \n }", "public int compare(SearchNode sn1, SearchNode sn2) {\n int hp1 = sn1.dist + sn1.board.hamming();\n int hp2 = sn2.dist + sn2.board.hamming();\n \n if (hp1 > hp2) return 1;\n if (hp1 < hp2) return -1;\n return 0;\n }", "@Test\r\n public void testGroupSimilarity() throws Exception {\r\n final List<ICluster> originalCLuster = ClusteringTestUtilities.readSpectraClustersFromResource();\r\n Collections.sort(originalCLuster);\r\n List<ICluster> l1 = new ArrayList<ICluster>(originalCLuster);\r\n\r\n final List<ICluster> originalCLuster2 = ClusteringTestUtilities.readSpectraClustersFromResource();\r\n Collections.sort(originalCLuster2);\r\n List<ICluster> l2 = new ArrayList<ICluster>(originalCLuster2);\r\n\r\n ClusterListSimilarity cd = new ClusterListSimilarity(distanceMeasure);\r\n final List<ICluster> identical = cd.identicalClusters(l1, l2);\r\n\r\n Assert.assertEquals(originalCLuster.size(), identical.size());\r\n Assert.assertTrue(l1.isEmpty());\r\n Assert.assertTrue(l2.isEmpty());\r\n }", "private static ArrayList<IC> sortICsByDependency(ArrayList<IC> list, ArrayList<Wire> wires, ArrayList<Resistor> resistors)\r\n {\n if(list.size()==0) return list;\r\n \r\n Breadboard b = list.get(0).getBase();\r\n \r\n if(conMatrix==null) // speed-optimization, do not recalculate: conMatrix is set to null each time simulateCircuit is called [whenever circuit changes]\r\n {\r\n conMatrix=getDirectHoleConnectionsMatrix(b,wires,resistors);\r\n }\r\n \r\n // Convert to array\r\n IC array[] = new IC[list.size()];\r\n for(int i=0; i<array.length; i++) array[i]=list.get(i);\r\n \r\n // Step-1: Create the adjacency matrix of all IC output->input connections\r\n if(IODependencyMatrix==null) // Speed-optimization\r\n { \r\n IODependencyMatrix=new boolean[array.length][array.length];\r\n\r\n for(int i=0; i<array.length; i++)\r\n {\r\n int pcI = array[i].getPinCount();\r\n\r\n for(int j=0; j<array.length; j++)\r\n {\r\n //if(i==j) continue;\r\n\r\n int pcJ = array[j].getPinCount();\r\n for(int pc1=1; pc1<=pcI; pc1++)\r\n {\r\n if(array[i].isInputPin(pc1)) continue;\r\n for(int pc2=1; pc2<=pcJ; pc2++)\r\n {\r\n if(array[j].isOutputPin(pc2)) continue;\r\n\r\n if(i==j && pc1==pc2) continue; // can be same IC but cannot be same pin of the same IC simultaneously\r\n \r\n if(areConnectedInOrder(array[i],pc1,array[j],pc2,wires,resistors))\r\n {\r\n IODependencyMatrix[i][j]=true;\r\n isHalfCyclic=true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n // Check if cyclic\r\n for(int i=0; i<IODependencyMatrix.length; i++)\r\n {\r\n for(int j=0; j<IODependencyMatrix[i].length; j++)\r\n {\r\n if(IODependencyMatrix[i][j] && IODependencyMatrix[j][i])\r\n {\r\n isCyclic=true;\r\n return list;\r\n }\r\n }\r\n }\r\n }\r\n \r\n // ------------ DIAGNOSTICS -------------\r\n /*\r\n for(int i=0; i<IODependencyMatrix.length; i++)\r\n {\r\n for(int j=0; j<IODependencyMatrix[i].length; j++)\r\n {\r\n System.out.print(IODependencyMatrix[i][j]+\"\\t\");\r\n }\r\n System.out.println();\r\n }\r\n */\r\n // ---------------------------------------\r\n \r\n \r\n // Step-2: Compute in-degrees\r\n int inDegree[]=new int[array.length];\r\n for(int i=0; i<array.length; i++)\r\n {\r\n for(int j=0; j<array.length; j++)\r\n {\r\n if(IODependencyMatrix[i][j]) inDegree[j]++;\r\n }\r\n }\r\n \r\n // Step-3: Initialize visited to 0, push into queue all those vertices which have indegree=0\r\n int visitCounter=0;\r\n HashSet<Integer> visited = new HashSet<Integer>(array.length);\r\n ArrayList<IC> sorted = new ArrayList<IC>(list.size());\r\n Queue<Integer> queue = new LinkedList<Integer>();\r\n for(int i=0; i<inDegree.length; i++)\r\n {\r\n if(inDegree[i]==0) queue.add(i);\r\n }\r\n \r\n // Step-4\r\n while(!queue.isEmpty())\r\n {\r\n int index=queue.remove(); // pop from queue\r\n visitCounter++; // increment visited counter\r\n visited.add(index); // add the popped index to hashset\r\n sorted.add(list.get(index)); // add to sorted list\r\n \r\n for(int j=0; j<IODependencyMatrix[index].length; j++)\r\n {\r\n if(IODependencyMatrix[index][j] && !visited.contains(j)) // neighbour\r\n {\r\n inDegree[j]--; // decrement in-degree of neighbour\r\n if(inDegree[j]==0) queue.add(j); // if in-degree reaches 0, add it to queue\r\n }\r\n }\r\n }\r\n \r\n if(visitCounter!=array.length)\r\n return list; // Cyclic dependency, so return the original list itself\r\n else\r\n return sorted; // Topological sort complete, return the sorted list\r\n }", "boolean canBeCompared(short controlType, short testType);", "public Boolean getUseClientSorting() {\r\n return getAttributeAsBoolean(\"useClientSorting\");\r\n }", "public int compare(SearchNode sn1, SearchNode sn2) {\n int hp1 = sn1.dist + sn1.board.manhattan();\n int hp2 = sn2.dist + sn2.board.manhattan();\n \n if (hp1 > hp2) return 1;\n if (hp1 < hp2) return -1;\n return 0;\n }", "public void createDistributedObjectsPolicy(){\n\t\t\n\t\tint size = 0;\n\t\t\n\t\tIterator<CacheObject> cst = candidateStableOnlyList.iterator();\n\t\t\n\t\twhile(cst.hasNext()){\n\t\t\t\n\t\t\tCacheObject ct = cst.next();\n\t\t\t\n\t\t\tIterator<String> it1 = serverList.keySet().iterator();\n\t\t\t\n\t\t\twhile(it1.hasNext()){\n\t\t\t\t\n\t\t\t\tString serverId = it1.next();\n\t\t\t\tHashMap<String, CacheObject> htemp = individualMap.get(serverId); \n\t\t\t\t\n\t\t\t\tif(htemp.containsKey(ct.cacheKey)){\n\t\t\t\t\t\n\t\t\t\t\tInteger sz = serverList.get(serverId);\n\t\t\t\t\t\n\t\t\t\t\tif(sz.intValue() < STABLE_SIZE){\n\t\t\t\t\t\tArrayList<String> lt = new ArrayList<String>();\n\t\t\t\t\t\tlt.add(serverId);\n\t\t\t\t\t\tRuleList rl = new RuleList(serverId, RuleList.MOVE , RuleList.LONG_TTL, lt);\n\t\t\t\t\t\tListKey lk = new ListKey();\n\t\t\t\t\t\tlk.addtoListKey(ct.cacheKey);\n\t\t\t\t\t\tASPolicyMap.get(serverId).addNewPolicy(lk, rl);\n\t\t\t\t\t\tsz = sz + ct.size;\n\t\t\t\t\t\tsize += ct.size;\n\t\t\t\t\t\tserverList.put(serverId, sz);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tIterator<String> it2 = serverList.keySet().iterator();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile(it2.hasNext()){\n\t\t\t\t\t\t\tString serverId2 = it2.next();\n\t\t\t\t\t\t\tInteger sz2 = serverList.get(serverId2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(sz2.intValue() < STABLE_SIZE){\n\t\t\t\t\t\t\t\tArrayList<String> lt = new ArrayList<String>();\n\t\t\t\t\t\t\t\tlt.add(serverId2);\n\t\t\t\t\t\t\t\tRuleList rl = new RuleList(serverId2, RuleList.MOVE , RuleList.LONG_TTL, lt);\n\t\t\t\t\t\t\t\tListKey lk = new ListKey();\n\t\t\t\t\t\t\t\tlk.addtoListKey(ct.cacheKey);\n\t\t\t\t\t\t\t\tASPolicyMap.get(serverId2).addNewPolicy(lk, rl);\n\t\t\t\t\t\t\t\tsz2 = sz2 + ct.size;\n\t\t\t\t\t\t\t\tsize += ct.size;\n\t\t\t\t\t\t\t\tserverList.put(serverId2, sz2);\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\t}\n\t\t\t\t\t\t\n\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\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(size >= (STABLE_SIZE*NO_SERVERS) ){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Test\n public void shouldMapSymmetrically() {\n for (NetworkParameters params: NetworkResolver.getParameters()) {\n final String name = NetworkResolver.getName(params);\n final NetworkResolver.NetworkCode code = NetworkResolver.getCode(params);\n assertEquals(params, NetworkResolver.getParameter(name));\n assertEquals(params, NetworkResolver.getParameter(code));\n }\n }", "@Test(groups = {NETWORK_INTEGRATION_TESTS})\n public void getPrivateNetworkIPsByVirtualDatacenterOrderByVlan()\n {\n RemoteService rs = remoteServiceGenerator.createInstance(RemoteServiceType.DHCP_SERVICE);\n VirtualDatacenter vdc = vdcGenerator.createInstance(rs.getDatacenter());\n setup(vdc.getDatacenter(), rs, vdc.getEnterprise(), vdc.getNetwork(), vdc);\n VLANNetwork vlan = vlanGenerator.createInstance(vdc.getNetwork(), rs, \"255.255.255.0\");\n setup(vlan.getConfiguration(), vlan);\n\n IPAddress ip = IPAddress.newIPAddress(vlan.getConfiguration().getAddress()).nextIPAddress();\n IPAddress lastIP =\n IPNetworkRang.lastIPAddressWithNumNodes(\n IPAddress.newIPAddress(vlan.getConfiguration().getAddress()),\n IPNetworkRang.masktoNumberOfNodes(vlan.getConfiguration().getMask()));\n\n persistIP(ip, lastIP, vdc, vlan);\n\n String validURI = resolveVirtualDatacenterActionGetIPsURI(vdc.getId());\n validURI = validURI + \"?by=vlan\";\n\n ClientResponse response =\n get(validURI, SYSADMIN, SYSADMIN, IpsPoolManagementDto.MEDIA_TYPE);\n assertEquals(response.getStatusCode(), Status.OK.getStatusCode());\n }", "@Override\n\t\t\t\t\tpublic int compare(HidenMachines machine1,\n\t\t\t\t\t\t\tHidenMachines machine2) {\n\t\t\t\t\t\treturn machine1.name.compareTo(machine2.name);\n\t\t\t\t\t}", "public void sortPassing(){\n\t\tpassing.sort(PlayingCard.PlayingCardComparator_ACEHIGH);\n\t}", "public void sortMatches();", "@Override\n public int compare(String str1, String str2) {\n int count1 = mSSIDMatchCounts.containsKey(str1) ? mSSIDMatchCounts.get(str1) : 0;\n int count2 = mSSIDMatchCounts.containsKey(str2) ? mSSIDMatchCounts.get(str2) : 0;\n\n\n int result = -Integer.valueOf(count1).compareTo(count2);\n if (result == 0) {\n // Secondary order: lexicographical, ascending\n result = str1.compareTo(str2);\n }\n return result;\n }", "@Test\n public void codonCompare1(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(b);\n int expected = 0;\n assertEquals(expected, first.codonCompare(second));\n }", "private void sort() {\n final Comparator<Slave> c = Comparator.comparing(Slave::getNodeName);\n this.slaves.sort(c);\n }", "@VisibleForTesting\n Stream<Host> getPrioritizedHostStream(Stream<Host> hostStream, Capabilities capabilities) {\n //TODO for the moment, we're not going to operate on the Stream that was passed in--we need to\n // alter and futz with the contents, so the stream isn't the right place to operate. This\n // will likely be optimized back into the algo, but not yet\n Set<Host> filteredHostSet = hostStream.collect(Collectors.toSet());\n\n //A \"bucket\" is a list of hosts that can use a particular browser. The \"edge\" bucket is the\n // complete list of Hosts that support \"edge\". By separating Hosts into buckets, we will\n // know which browsers have fewer nodes available for the browsers we're not interested in, and\n // can prioritize based on the browsers that have more availability\n Map<String, Set<Host>> hostBuckets = sortHostsToBucketsByBrowser(filteredHostSet);\n\n //First, check to see if all buckets are the same size. If they are, just send back the full list of hosts\n // (i.e. the hosts are all \"balanced\" with regard to browser priority)\n if (allBucketsSameSize(hostBuckets)) {\n return hostBuckets.values().stream().distinct().flatMap(Set::stream);\n }\n\n //Then, starting with the smallest bucket that isn't the current browser being prioritized,\n // remove all hosts in that bucket from consideration, then rebuild the buckets. Then do the\n // \"same size\" check again, and keep doing this until either a) there is only one bucket, or b)\n // all buckets are the same size\n\n //Note: there should never be a case where a bucket will have *more* nodes available for the\n // given browser than the one being requested. The first filter in this check looks for\n // \"equal\", not \"equal-or-greater\" as a result of this assumption\n\n //There might be unforeseen cases that challenge this assumption. TODO Create unit tests to prove it\n\n //TODO a List of Map.Entry is silly. whatever this structure needs to be needs to be returned by\n // the sortHostsToBucketsByBrowser method in a way that we don't have to sort it separately like this\n final List<Map.Entry<String, Set<Host>>> sorted = hostBuckets.entrySet().stream().sorted(\n Comparator.comparingInt(v -> v.getValue().size())\n ).collect(Collectors.toList());\n\n // Until the buckets are the same size, keep removing hosts that have more \"rare\" browser capabilities\n Map<String, Set<Host>> newHostBuckets;\n for (Map.Entry<String, Set<Host>> entry: sorted) {\n //Don't examine the bucket containing the browser in question--we're prioritizing the other browsers\n //TODO This shouldn't be necessary, because if the list is sorted by size, this won't be possible until\n // they're all the same size. Create a unit test to prove it\n if (entry.getKey().equals(capabilities.getBrowserName())) {\n continue;\n }\n\n //Remove all hosts from this bucket from the full set of eligible hosts\n final Set<Host> filteredHosts = filteredHostSet.stream().filter(host -> !entry.getValue().contains(host)).collect(Collectors.toSet());\n\n //Rebuild the buckets by browser\n newHostBuckets = sortHostsToBucketsByBrowser(filteredHosts);\n\n //Check the bucket sizes--if they're the same, then we're done\n if (allBucketsSameSize(newHostBuckets)) {\n LOG.fine(\"Hosts have been balanced according to browser priority\");\n return newHostBuckets.values().stream().distinct().flatMap(Set::stream);\n }\n }\n\n return hostBuckets.values().stream().distinct().flatMap(Set::stream);\n }", "public static boolean testSort() {\r\n Manager inst;\r\n try {\r\n inst = new PokemonTable();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n return false;\r\n }\r\n LinkedList<Pokemon> list;\r\n list = inst.sortByAttack(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getAttack() < list.get(i).getAttack()) {\r\n System.out.println(\"attack sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByAttack(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getAttack() > list.get(i).getAttack()) {\r\n System.out.println(\"attack sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByDefense(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getDefense() < list.get(i).getDefense()) {\r\n System.out.println(\"defense sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByDefense(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getDefense() > list.get(i).getDefense()) {\r\n System.out.println(\"defense sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByFavorite(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (!list.get(i - 1).getFavorite() && list.get(i).getFavorite()) {\r\n System.out.println(\"favorite sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByFavorite(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getFavorite() && !list.get(i).getFavorite()) {\r\n System.out.println(\"favorite sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByHp(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getHp() < list.get(i).getHp()) {\r\n System.out.println(\"hp sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByHp(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getHp() > list.get(i).getHp()) {\r\n System.out.println(\"hp sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByLegendary(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (!list.get(i - 1).isLegendary() && list.get(i).isLegendary()) {\r\n System.out.println(\"legendary sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByLegendary(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).isLegendary() && !list.get(i).isLegendary()) {\r\n System.out.println(\"legendary sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByName(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getName().compareTo(list.get(i).getName()) > 0) {\r\n System.out.println(\"name sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByName(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getName().compareTo(list.get(i).getName()) < 0) {\r\n System.out.println(\"name sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortBySpAttack(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getSpAttack() < list.get(i).getSpAttack()) {\r\n System.out.println(\"spAttack sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortBySpAttack(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getSpAttack() > list.get(i).getSpAttack()) {\r\n System.out.println(\"spAttack sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortBySpDefense(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getSpDefense() < list.get(i).getSpDefense()) {\r\n System.out.println(\"spDefense sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortBySpDefense(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getSpDefense() > list.get(i).getSpDefense()) {\r\n System.out.println(\"spDefense sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortBySpeed(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getSpeed() < list.get(i).getSpeed()) {\r\n System.out.println(\"speed sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortBySpeed(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getSpeed() > list.get(i).getSpeed()) {\r\n System.out.println(\"speed sort\");\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "private static void multipleSortOfFinalPlayerList() {\n\n sortedFinalPlayerList = new ArrayList<>();\n\n Comparator<Player> byLastName = (e1, e2) -> e1\n .getLastName().compareTo(e2.getLastName());\n\n Comparator<Player> byFirstName = (e1, e2) -> e1\n .getFirstName().compareTo(e2.getFirstName());\n\n Comparator<Player> byCountry = (e1, e2) -> e1\n .getCountry().compareTo(e2.getCountry());\n\n streamPlayerList.stream().sorted(byLastName.thenComparing(byFirstName).thenComparing(byCountry))\n .forEach(e -> System.out.print(e));\n Stream<Player> f = streamPlayerList.stream().sorted(byLastName.thenComparing(byFirstName).thenComparing(byCountry));\n f.forEach(r -> sortedFinalPlayerList.add(r));\n }", "private ArrayList<IPlayer> sortPlayerAfterPoints() {\n ArrayList<IPlayer> arrlist = new ArrayList<>();\n\n iPlayerList.entrySet().stream().map((pair) -> (IPlayer) pair.getValue()).forEachOrdered((ip) -> {\n arrlist.add(ip);\n });\n\n Collections.sort(arrlist, (IPlayer p1, IPlayer p2) -> {\n try {\n if (p1.getPoints() == p2.getPoints()) {\n return 0;\n } else if (p1.getPoints() > p2.getPoints()) {\n return -1;\n } else {\n return 1;\n }\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n return 0;\n });\n\n return arrlist;\n }", "public synchronized Set<MatchingStrategy> getStrategyList() throws DictConnectionException {\n Set<MatchingStrategy> set = new LinkedHashSet<>();\n // DONE Add your code here\n\n String userInput;\n String fromServer;\n\n try {\n userInput = \"Show STRAT\";\n //out.println(\"Client: \" + userInput);\n output.println(userInput);\n\n String check = input.readLine();\n //out.println(\"Server: \" + check);\n\n if (check.contains(\"555\")) { // 555: no strategies available\n return set ;\n }\n if ( check.contains(\"111\")) { // 111: n strategies available\n\n while ((fromServer = input.readLine()) != null) {\n\n if (fromServer.contains(\"250 ok\")) {\n //out.println(\"Server: Successfully shown STRAT\");\n break;\n }\n if (fromServer.contains(\" \")) { // lines that contain spaces (\" \") represent strategies\n String[] temp = DictStringParser.splitAtoms(fromServer);\n MatchingStrategy ms = new MatchingStrategy(temp[0], temp[1]);\n set.add(ms);\n }\n }\n }else {\n throw new DictConnectionException(); // all other status codes throw exceptions\n }\n }catch (IOException e){\n throw new DictConnectionException(e) ;\n }\n\n return set;\n }", "@Override\n public int compareTo(PhysicalNode other) {\n if(other == null) {\n return 1;\n }\n if(other instanceof PhysicalPort) {\n if (owner.get() != ((PhysicalPort)other).owner.get()) {\n //Comparing ports that don't belong to the same device makes no sense.\n return -1;\n }\n }\n\n return super.compareTo(other);\n }", "@Override\n public int compare(Object mMailPersonItem1, Object mMailPersonItem2) {\n Conversation tem1 = (Conversation) mMailPersonItem1;\n Conversation tem2 = (Conversation) mMailPersonItem2;\n String[] array = new String[2];\n int cr = 0;\n int a = tem2.mPriority - tem1.mPriority;\n if (a != 0) {\n cr = (a > 0) ? 2 : -1;\n } else {\n //按薪水降序排列\n array[0] = ((Conversation) mMailPersonItem1).mTime;\n array[1] = ((Conversation) mMailPersonItem2).mTime;\n if (array[0].equals(array[1])) {\n cr = 0;\n }\n Arrays.sort(array);\n if (array[0].equals(((Conversation) mMailPersonItem1).mTime)) {\n cr = -2;\n } else if (array[0].equals(((Conversation) mMailPersonItem2).mTime)) {\n cr = 1;\n }\n }\n return cr;\n }", "@Test\n public void codonCompare2(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(d);\n int expected = 1;\n assertEquals(expected, first.codonCompare(second));\n\n }", "@Override\r\n\tpublic boolean equals(Object obj){\r\n\t\tClientPacket otherPacket = (ClientPacket)obj;\r\n\t\t\r\n\t\tif (otherPacket != null){\r\n\t\t\tif(type != otherPacket.type){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tif(dataSize != otherPacket.dataSize){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!Arrays.equals(data, otherPacket.data)){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\treturn super.equals(obj);\r\n\t}", "@Test\n void queryWithMultipleSortersReturnsAppropriateOrder() {\n final RecordSorter<Munro> designationSorter = new RecordSorter<>(Munro::getDesignation,\n SortOrder.ASCENDING);\n final RecordSorter<Munro> heightSorter = new RecordSorter<>(Munro::getHeight,\n SortOrder.ASCENDING);\n\n final List<Comparator<Munro>> sorters =\n Arrays.asList(designationSorter, heightSorter);\n\n final List<Munro> munroes = this.store.query(\n new MunroQuerySpecification(null, null, null, null, sorters));\n\n // Tracking designation and last height across results.\n Designation currentType = Designation.MUN;\n double lastHeight = Double.MIN_VALUE;\n boolean isFirstOfNewType = true;\n\n for (final Munro munro : munroes) {\n if (currentType != munro.getDesignation()) {\n if (isFirstOfNewType) {\n // One swap of type is allowed. Any more swaps and they weren't sorted by type\n // first.\n currentType = munro.getDesignation();\n\n // Reset the last height when changing types, since height was a secondary\n // ordering.\n lastHeight = Double.MIN_VALUE;\n\n isFirstOfNewType = false;\n } else {\n // More than one swap, the sorting didn't work.\n Assertions.fail(\"Expected ordering by type\");\n }\n }\n\n Assertions.assertEquals(currentType, munro.getDesignation());\n Assertions.assertTrue(munro.getHeight() >= lastHeight);\n lastHeight = munro.getHeight();\n }\n }", "public int compare(TestMessage m1, TestMessage m2) {\n return m1.publisher.getUuid().compareTo(m2.publisher.getUuid());\n }", "public abstract void sort() throws RemoteException;", "public void sortSubstrateSwitchByResource() {\n\t\tCollections.sort(this.listNode, new Comparator<SubstrateSwitch>() {\n\t\t\t@Override\n\t\t\tpublic int compare(SubstrateSwitch o1, SubstrateSwitch o2) {\n\n\t\t\t\tif (o1.getCpu() < o2.getCpu()) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\tif (o1.getCpu() > o2.getCpu()) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t}", "public abstract void compare();", "public void testCompareTo()\n {\n // first, let's make sure calling compareTo with null\n // throws the appropriate NullPointerException \n try\n {\n // the 'null EthernetAddress' will be fine\n NULL_ETHERNET_ADDRESS.compareTo(null);\n fail(\"Expected exception not thrown\");\n }\n catch (NullPointerException ex)\n {\n // good, we caught the expected exception, so we passed\n }\n catch (Exception ex)\n {\n fail(\"Caught an unexpected exception: \" + ex);\n }\n \n // now we'll test some simple base cases\n // 2 null EthernetAddresses always compare to 0\n assertEthernetAddressEqualOrderHelper(NULL_ETHERNET_ADDRESS,\n new EthernetAddress(0L));\n \n // 2 of the same value EthernetAddresses are always 0\n assertEthernetAddressEqualOrderHelper(MAC0_ETHERNET_ADDRESS,\n new EthernetAddress(MAC0_ETHERNET_ADDRESS.toLong()));\n \n // the 'null EthernetAddress' always comes first in the ordering\n assertEthernetAddressGreaterOrderHelper(MAC0_ETHERNET_ADDRESS,\n NULL_ETHERNET_ADDRESS);\n \n // EthernetAddresses will always sort\n // with the 'numerically' greater MAC addresses coming later\n assertEthernetAddressGreaterOrderHelper(MAC4_ETHERNET_ADDRESS,\n MAC0_ETHERNET_ADDRESS); \n assertEthernetAddressGreaterOrderHelper(MAC9_ETHERNET_ADDRESS,\n MAC4_ETHERNET_ADDRESS);\n assertEthernetAddressGreaterOrderHelper(MAC9_ETHERNET_ADDRESS,\n MAC0_ETHERNET_ADDRESS);\n \n // now we will test a bigger case of the compareTo functionality\n // of the EthernetAddress class\n // easiest way to do this is to create an array of EthernetAddresses\n // and sort it then test that this array is in the expected order\n \n // before sort, the array contains (in psudo-random order)\n // 15 EthernetAddresses of this distribution:\n // 1 - null EthernetAddress\n // 2 - mac0\n // 1 - mac1\n // 1 - mac2\n // 2 - mac3\n // 2 - mac4\n // 2 - mac5\n // 1 - mac6\n // 1 - mac7\n // 1 - mac8\n // 1 - mac9\n EthernetAddress ethernet_address_array[] = new EthernetAddress[15];\n ethernet_address_array[0] = MAC4_ETHERNET_ADDRESS;\n ethernet_address_array[1] = MAC6_ETHERNET_ADDRESS;\n ethernet_address_array[2] = MAC0_ETHERNET_ADDRESS;\n ethernet_address_array[3] = MAC5_ETHERNET_ADDRESS;\n ethernet_address_array[4] = MAC3_ETHERNET_ADDRESS;\n ethernet_address_array[5] = MAC5_ETHERNET_ADDRESS;\n ethernet_address_array[6] = MAC0_ETHERNET_ADDRESS;\n ethernet_address_array[7] = NULL_ETHERNET_ADDRESS;\n ethernet_address_array[8] = MAC8_ETHERNET_ADDRESS;\n ethernet_address_array[9] = MAC3_ETHERNET_ADDRESS;\n ethernet_address_array[10] = MAC4_ETHERNET_ADDRESS;\n ethernet_address_array[11] = MAC7_ETHERNET_ADDRESS;\n ethernet_address_array[12] = MAC1_ETHERNET_ADDRESS;\n ethernet_address_array[13] = MAC9_ETHERNET_ADDRESS;\n ethernet_address_array[14] = MAC2_ETHERNET_ADDRESS;\n \n Arrays.sort(ethernet_address_array);\n // now we should be able to see that the array is in order\n assertEthernetAddressesMatchHelper(\n NULL_ETHERNET_ADDRESS, ethernet_address_array[0]);\n assertEthernetAddressesMatchHelper(\n MAC0_ETHERNET_ADDRESS, ethernet_address_array[1]);\n assertEthernetAddressesMatchHelper(\n MAC0_ETHERNET_ADDRESS, ethernet_address_array[2]);\n assertEthernetAddressesMatchHelper(\n MAC1_ETHERNET_ADDRESS, ethernet_address_array[3]);\n assertEthernetAddressesMatchHelper(\n MAC2_ETHERNET_ADDRESS, ethernet_address_array[4]);\n assertEthernetAddressesMatchHelper(\n MAC3_ETHERNET_ADDRESS, ethernet_address_array[5]);\n assertEthernetAddressesMatchHelper(\n MAC3_ETHERNET_ADDRESS, ethernet_address_array[6]);\n assertEthernetAddressesMatchHelper(\n MAC4_ETHERNET_ADDRESS, ethernet_address_array[7]);\n assertEthernetAddressesMatchHelper(\n MAC4_ETHERNET_ADDRESS, ethernet_address_array[8]);\n assertEthernetAddressesMatchHelper(\n MAC5_ETHERNET_ADDRESS, ethernet_address_array[9]);\n assertEthernetAddressesMatchHelper(\n MAC5_ETHERNET_ADDRESS, ethernet_address_array[10]);\n assertEthernetAddressesMatchHelper(\n MAC6_ETHERNET_ADDRESS, ethernet_address_array[11]);\n assertEthernetAddressesMatchHelper(\n MAC7_ETHERNET_ADDRESS, ethernet_address_array[12]);\n assertEthernetAddressesMatchHelper(\n MAC8_ETHERNET_ADDRESS, ethernet_address_array[13]);\n assertEthernetAddressesMatchHelper(\n MAC9_ETHERNET_ADDRESS, ethernet_address_array[14]);\n }", "public void testSortedList() {\r\n List<InfoNode> sortedList = MapUtils.sortByDistance(exampleList, node3.getTitle());\r\n assertTrue(sortedList.size() == 2);\r\n assertTrue(sortedList.get(0) == node2);\r\n assertTrue(sortedList.get(1) == node1);\r\n assertTrue(sortedList.contains(node1));\r\n assertTrue(sortedList.contains(node2));\r\n assertFalse(sortedList.contains(node3));\r\n\r\n sortedList = MapUtils.sortByDistance(exampleList, node1.getTitle());\r\n assertTrue(sortedList.size() == 2);\r\n assertTrue(sortedList.get(0) == node2);\r\n assertTrue(sortedList.get(1) == node3);\r\n assertFalse(sortedList.contains(node1));\r\n assertTrue(sortedList.contains(node2));\r\n assertTrue(sortedList.contains(node3));\r\n\r\n sortedList = MapUtils.sortByDistance(exampleList, \" \");\r\n assertTrue(sortedList.equals(exampleList));\r\n }", "@Override\n public int compare(Airplane o1, Airplane o2) {\n return o1.getManufacturer().compareTo(o2.getManufacturer());\n }", "@Override\n\t\tpublic int compare(PerformanceInfo o1, PerformanceInfo o2) {\n\t\t\treturn 1;\n\t\t}", "public int compare(Object o1, Object o2) {\n/* 25 */ Alphabet a1 = (Alphabet)o1;\n/* 26 */ Alphabet a2 = (Alphabet)o2;\n/* */ \n/* 28 */ return a2.order - a1.order;\n/* */ }", "@Override\n\t\t\t\t\tpublic int compare(messagewrapper lhs, messagewrapper rhs) {\n\t\t\t\t\t\treturn rhs.get_id()-lhs.get_id();\n\t\t\t\t\t}", "public void sortHand(){\n\t\thand.sort(PlayingCard.PlayingCardComparator_ACEHIGH);\n\t}", "@Override\n public int compare(Integer a, Integer b) {\n if (base.get(a) >= base.get(b)) {\n return 1;\n } else {\n return -1;\n } // returning 0 would merge keys\n }", "public void sortSubstrateSwitch() {\n\t\tCollections.sort(this.listNode, new Comparator<SubstrateSwitch>() {\n\t\t\t@Override\n\t\t\tpublic int compare(SubstrateSwitch o1, SubstrateSwitch o2) {\n\n\t\t\t\tif (o1.getType() > o2.getType())\n\t\t\t\t\treturn -1;\n\t\t\t\tif (o1.getType() < o2.getType())\n\t\t\t\t\treturn 1;\n\t\t\t\tif (o1.getType() == o2.getType()) {\n\t\t\t\t\tif (o1.getCpu() < o2.getCpu()) {\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t\tif (o1.getCpu() > o2.getCpu()) {\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t}", "public void logic(){\n servers.sort(Comparator.comparing(Server::getSlotsTaken).reversed());\n servers.sort(Comparator.comparing(Server::getCapacity).reversed());\n\n slots = new Slot[rowsLength][slotsLength];\n for(int i=0;i<rowsLength;i++){\n for(int j=0;j<slotsLength;j++){\n slots[i][j] = new Slot(i, j);\n }\n }\n\n //Unavailable Slots\n for (Slot slot: unavailableSlots){\n slots[slot.getX()][slot.getY()].setAvailable(false);\n }\n\n\n //luam pe rand si verificam daca e liber randul si poolul\n nextServer:\n for (Server server: servers) {\n\n //line by line\n Map<Integer, Integer> linesPerformanceMap = new HashMap<>();\n Map<Integer, Integer> poolsPerformanceMap = new HashMap<>();\n\n //lines orderd by performance de la cel mai mic la cel mai mare\n for(int currentLine=0; currentLine<slots.length; currentLine++){\n linesPerformanceMap.put(currentLine, getServersPerformanceOfTheLine(slots[currentLine]));\n }\n linesPerformanceMap = linesPerformanceMap.entrySet().stream()\n .sorted(Map.Entry.<Integer, Integer>comparingByValue())\n .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,\n (e1, e2) -> e1, LinkedHashMap::new));\n\n //pool ordered by performance\n for(Pool pool: pools){\n poolsPerformanceMap.put(pool.getId(), getPoolPerformance(pool));\n }\n poolsPerformanceMap = poolsPerformanceMap.entrySet().stream()\n .sorted(Map.Entry.<Integer, Integer>comparingByValue())\n .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,\n (e1, e2) -> e1, LinkedHashMap::new));\n\n\n\n for (Map.Entry<Integer, Integer> linePerformance : linesPerformanceMap.entrySet()) {\n Integer line = linePerformance.getKey();\n\n for (int column = 0; column < slots[line].length; column++) {\n //slot available\n if (slots[line][column].isAvailable() && slots[line][column].getServer() == null) {\n //is space\n Integer slotsAvailable = getSlotsAvailable(line, column);\n if(slotsAvailable>=server.getSlotsTaken()){\n //add\n Pool pool = getPoolWithLessServersFromTheLine(poolsPerformanceMap, line);\n\n server.setSlot(slots[line][column]);\n pools.get(pool.getId()).getServers().add(server);\n server.setPool(pools.get(pool.getId()));\n slots[line][column].setOffset(true);\n for(int k=0; k<server.getSlotsTaken(); k++){\n slots[line][column+k].setAvailable(false);\n slots[line][column+k].setServer(server);\n }\n showSlots();\n\n continue nextServer;\n }\n }\n }\n }\n }\n\n\n System.out.println();\n }", "private void sortEntities(){\n for (int i = 1; i < sorted.size; i++) {\n for(int j = i ; j > 0 ; j--){\n \tEntity e1 = sorted.get(j);\n \tEntity e2 = sorted.get(j-1);\n if(getRL(e1) < getRL(e2)){\n sorted.set(j, e2);\n sorted.set(j-1, e1);\n }\n }\n }\n }", "@Override\n public int compare(Hive o1, Hive o2) {\n if ((o1 == null) && (o2 != null))\n return -1;\n else if ((o1 != null) && (o2 == null))\n return 1;\n else if ((o1 == null) && (o2 == null))\n return 0;\n\n int m1 = 0;\n int m2 = 0;\n\n if ((o1.getPublicChat() != null) && (o1.getPublicChat().getConversation() != null))\n m1 = o1.getPublicChat().getConversation().getCount();\n if ((o2.getPublicChat() != null) && (o2.getPublicChat().getConversation() != null))\n m2 = o2.getPublicChat().getConversation().getCount();\n\n int res = m2-m1;\n\n return ((res==0)?o1.getNameUrl().compareToIgnoreCase(o2.getNameUrl()):res);\n }", "@Override\n public int compare(Pair<Channel, Double> lhs, Pair<Channel, Double> rhs) {\n return rhs.second.compareTo(lhs.second);\n }", "@Test\n public void aminoCompareTest2() {\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(c);\n int expected = 0;\n assertEquals(expected, first.aminoAcidCompare(second));\n }", "public static Set<NetworkNode.TYPE> getConnectedHosts(NetworkNode.TYPE source){\n Set<NetworkNode.TYPE> connectedHosts = new HashSet<>();\n if(source.equals(NetworkNode.TYPE.ADVERSARY)){\n connectedHosts.add(NetworkNode.TYPE.ROUTER);\n connectedHosts.add(NetworkNode.TYPE.WEBSERVER);\n connectedHosts.add(NetworkNode.TYPE.ADMINPC);\n return connectedHosts;\n }else if (source.equals(NetworkNode.TYPE.ROUTER)){\n connectedHosts.add(NetworkNode.TYPE.WEBSERVER);\n connectedHosts.add(NetworkNode.TYPE.ADMINPC);\n connectedHosts.add(NetworkNode.TYPE.DATABASE);\n return connectedHosts;\n }else if (source.equals(NetworkNode.TYPE.WEBSERVER)){\n connectedHosts.add(NetworkNode.TYPE.ROUTER);\n connectedHosts.add(NetworkNode.TYPE.ADMINPC);\n connectedHosts.add(NetworkNode.TYPE.DATABASE);\n return connectedHosts;\n }else if (source.equals(NetworkNode.TYPE.ADMINPC)){\n connectedHosts.add(NetworkNode.TYPE.ROUTER);\n connectedHosts.add(NetworkNode.TYPE.WEBSERVER);\n connectedHosts.add(NetworkNode.TYPE.DATABASE);\n return connectedHosts;\n }else if (source.equals(NetworkNode.TYPE.DATABASE)){\n connectedHosts.add(NetworkNode.TYPE.ROUTER);\n connectedHosts.add(NetworkNode.TYPE.WEBSERVER);\n connectedHosts.add(NetworkNode.TYPE.ADMINPC);\n return connectedHosts;\n }else {\n return connectedHosts;\n }\n }", "@Override\n public List<Client> clientsSortedByMoneySpent(){\n log.trace(\"clientsSortedByMoneySpent -- method entered\");\n Iterable<Client> clients = clientRepository.findAll();\n List<Client> result = StreamSupport.stream(clients.spliterator(),false).sorted(Comparator.comparing(Client::getMoneySpent).reversed()).collect(Collectors.toList());\n log.trace(\"clientsSortedByMoneySpent: result={}\", result);\n return result;\n }", "public int compare(Object card1, Object card2) throws ClassCastException{\n if (!((card1 instanceof Card) && (card2 instanceof Card))){\r\n throw new ClassCastException(\"A Card object was expeected. Parameter 1 class: \" + card1.getClass() \r\n + \" Parameter 2 class: \" + card2.getClass());\r\n }\r\n\r\n short rank1 = ((Card)card1).getRank();\r\n short rank2 = ((Card)card2).getRank();\r\n\r\n return rank1 - rank2;\r\n }", "@Override\n\t\tpublic int compare(EventPacket lhs, EventPacket rhs) {\n\t\t\tif (lhs.level < rhs.level) {\n\t\t\t\treturn 1;\n\t\t\t} else if (lhs.level == rhs.level) {\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}", "public int compare(AlleleTypeDTO dto1, AlleleTypeDTO dto2) {\n int nReturn = 0;\n switch(nColumn) {\n case AlleleTypeDAO.ID__ALLELETYPE_KEY:\n if (dto1.getAlleleTypeKey() == null && dto2.getAlleleTypeKey() != null) {\n nReturn = -1;\n } else if (dto1.getAlleleTypeKey() == null && dto2.getAlleleTypeKey() == null) {\n nReturn = 0;\n } else if (dto1.getAlleleTypeKey() != null && dto2.getAlleleTypeKey() == null) {\n nReturn = 1;\n } else { \n nReturn = dto1.getAlleleTypeKey().compareTo(dto2.getAlleleTypeKey());\n }\n break;\n case AlleleTypeDAO.ID__ALLELEGROUPTYPE_KEY:\n if (dto1.getAlleleGroupTypeKey() == null && dto2.getAlleleGroupTypeKey() != null) {\n nReturn = -1;\n } else if (dto1.getAlleleGroupTypeKey() == null && dto2.getAlleleGroupTypeKey() == null) {\n nReturn = 0;\n } else if (dto1.getAlleleGroupTypeKey() != null && dto2.getAlleleGroupTypeKey() == null) {\n nReturn = 1;\n } else { \n nReturn = dto1.getAlleleGroupTypeKey().compareTo(dto2.getAlleleGroupTypeKey());\n }\n break;\n case AlleleTypeDAO.ID_TYPE:\n if (dto1.getType() == null && dto2.getType() != null) {\n nReturn = -1;\n } else if (dto1.getType() == null && dto2.getType() == null) {\n nReturn = 0;\n } else if (dto1.getType() != null && dto2.getType() == null) {\n nReturn = 1;\n } else { \n nReturn = dto1.getType().compareTo(dto2.getType());\n }\n break;\n case AlleleTypeDAO.ID_SORTORDER:\n if (dto1.getSortOrder() == null && dto2.getSortOrder() != null) {\n nReturn = -1;\n } else if (dto1.getSortOrder() == null && dto2.getSortOrder() == null) {\n nReturn = 0;\n } else if (dto1.getSortOrder() != null && dto2.getSortOrder() == null) {\n nReturn = 1;\n } else { \n nReturn = dto1.getSortOrder().compareTo(dto2.getSortOrder());\n }\n break;\n case AlleleTypeDAO.ID_CREATE_USER:\n if (dto1.getCreateUser() == null && dto2.getCreateUser() != null) {\n nReturn = -1;\n } else if (dto1.getCreateUser() == null && dto2.getCreateUser() == null) {\n nReturn = 0;\n } else if (dto1.getCreateUser() != null && dto2.getCreateUser() == null) {\n nReturn = 1;\n } else { \n nReturn = dto1.getCreateUser().compareTo(dto2.getCreateUser());\n }\n break;\n case AlleleTypeDAO.ID_CREATE_DATE:\n if (dto1.getCreateDate() == null && dto2.getCreateDate() != null) {\n nReturn = -1;\n } else if (dto1.getCreateDate() == null && dto2.getCreateDate() == null) {\n nReturn = 0;\n } else if (dto1.getCreateDate() != null && dto2.getCreateDate() == null) {\n nReturn = 1;\n } else { \n nReturn = dto1.getCreateDate().compareTo(dto2.getCreateDate());\n }\n break;\n case AlleleTypeDAO.ID_UPDATE_USER:\n if (dto1.getUpdateUser() == null && dto2.getUpdateUser() != null) {\n nReturn = -1;\n } else if (dto1.getUpdateUser() == null && dto2.getUpdateUser() == null) {\n nReturn = 0;\n } else if (dto1.getUpdateUser() != null && dto2.getUpdateUser() == null) {\n nReturn = 1;\n } else { \n nReturn = dto1.getUpdateUser().compareTo(dto2.getUpdateUser());\n }\n break;\n case AlleleTypeDAO.ID_UPDATE_DATE:\n if (dto1.getUpdateDate() == null && dto2.getUpdateDate() != null) {\n nReturn = -1;\n } else if (dto1.getUpdateDate() == null && dto2.getUpdateDate() == null) {\n nReturn = 0;\n } else if (dto1.getUpdateDate() != null && dto2.getUpdateDate() == null) {\n nReturn = 1;\n } else { \n nReturn = dto1.getUpdateDate().compareTo(dto2.getUpdateDate());\n }\n break;\n default: \n throw new IllegalArgumentException(\"Type passed for the field is not supported\");\n }\n\n return bReverse ? (-1 * nReturn) : nReturn;\n }", "protected Object getReplierID(){\n IGroup g = getLocalGroup();\n\n int range = g.getGroupSize();\n\n Object sortedReplierID = null;\n /* While a replier has not been selected.*/\n while(sortedReplierID == null){\n\n /* Sort a process */\n int pindex = (int) (Math.random()* range);\n\n IProcess p = (IProcess) g.getMembers().get(pindex);\n\n /* If the selected process isn't the primary and isn't the local replica then it'll be selected.*/\n if(!isPrimary(p) && !p.getID().equals(getLocalServerID())){\n sortedReplierID = p.getID();\n }\n }\n return sortedReplierID;\n }", "@Test\n public void testPlayerInNegotiateCommand() {\n d_orderProcessor.processOrder(\"negotiate user3\".trim(), d_gameData);\n d_gameData.getD_playerList().get(0).issue_order();\n Order l_order = d_gameData.getD_playerList().get(0).next_order();\n assertEquals(false, l_order.executeOrder());\n }", "@Override\n\tpublic int compareTo(IntPair IP) {\n\t\tSystem.out.println(\"inside map sort\");\n\t\tint comp = id.compareTo(IP.id);\n\t\tif (comp != 0)\n\t\t\treturn comp;\n\t\tcomp = tag.compareTo(IP.tag);\n\t\treturn comp;\n\t}", "@Test\n public void aminoCompareTest1(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(d);\n int expected = 1;\n assertEquals(expected, first.aminoAcidCompare(second));\n }", "@Override\r\n\tpublic int compareTo(ChunkID chunk) {\r\n\r\n\t\tInteger spareRepDegree = this.actualRepDegree - this.desiredRepDegree;\r\n\t\tInteger chunkSpareRepDegree = chunk.actualRepDegree - chunk.desiredRepDegree;\r\n\r\n\t\treturn -spareRepDegree.compareTo(chunkSpareRepDegree);\r\n\r\n\t}", "private void botLogic(){\n synchronized (lock){Collections.sort(playerList);}\n botTrading();\n botVoting();\n waitPrint();\n await();\n }", "@Override\n public void sort(IAlg algorithm, boolean decrescent){}", "void updateSortingComparators(Comparator<ReadOnlyEntry> eventComparator,\n Comparator<ReadOnlyEntry> deadlineComparator,\n Comparator<ReadOnlyEntry> floatingTaskComparator);", "private void sort() {\n\t\tCollections.sort(this.entities, comparator);\n\t}", "public void createOnlyDistributedObjectsPolicy(){\n\t\t\n\t\tint size = 0;\n\t\t\n\t\tIterator<CacheObject> cst = candidateStableOnlyList.iterator();\n\t\tCollection<String> it1 = serverList.keySet();\n\t\tArrayList<String> server = new ArrayList<String>(it1);\n\t\tint counter = 0;\t\t\n\t\t\n\t\twhile(cst.hasNext()){\n\t\t\t\n\t\t\tCacheObject ct = cst.next();\n\t\t\tif(size <= (STABLE_SIZE * NO_SERVERS)){\n\t\t\t\t\n\t\t\t\tArrayList<String> lt = new ArrayList<String>();\n\t\t\t\tString serId = server.get( (counter++) % NO_SERVERS );\n\t\t\t\tlt.add(serId);\n\t\t\t\tRuleList rl = new RuleList(serId, RuleList.MOVE , RuleList.STABLE_TTL, lt);\n\t\t\t\tListKey lk = new ListKey();\n\t\t\t\tlk.addtoListKey(ct.cacheKey);\n\t\t\t\tASPolicyMap.get(serId).addNewPolicy(lk, rl);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\r\n public Collection<Player> getSortedPlayersHandler(String sortingParameter) {\r\n if(sortingParameter.equals(ID_SORTING_PARAM_STRING)){\r\n // the sorting param is by id - return current TreeSet\r\n return playerByIdTreeSet;\r\n }else if(successor!=null){\r\n // sorting param not by id - pass the request to the next handler\r\n return successor.getSortedPlayersHandler(sortingParameter);\r\n }else{\r\n // no more handlers - return current TreeSet\r\n return playerByIdTreeSet;\r\n }\r\n }", "@Override\n protected String getConnectionTypes() {\n // <connection type>:<connection number>,...\n return String.format(\"%s:1,%s:*\", FEDERATED_NETWORK, ORIGINAL_NETWORK);\n }", "@Override public int compare(Item a, Item b) {\n\t\t return a.get_id().compareTo(b.get_id());\n\t}", "public int compare(City s1, City s2) {\n// if ( s1.getNeighbours() > s2.getNeighbours().values())\n// return 1;\n// else if ((s1.getHeuristic()+s1.getDistance()) < (s2.getHeuristic() + s2.getDistance()))\n// return -1;\n return 0;\n }", "public int compare(Object o1, Object o2) {\r\n Node n1 = (Node) o1;\r\n Node n2 = (Node) o2;\r\n\t\tDouble n1wD = n1.getWeightValueUnsynchronized(\"value\"); // used to be n1.getWeightValue(\"value\");\r\n\t\tDouble n2wD = n2.getWeightValueUnsynchronized(\"value\"); // used to be n2.getWeightValue(\"value);\r\n\t\tdouble n1w = n1wD == null ? 1.0 : n1wD.doubleValue();\r\n\t\tdouble n2w = n2wD == null ? 1.0 : n2wD.doubleValue();\r\n\t\tif (n1w>n2w) return -1;\r\n\t\telse if (Double.compare(n2w, n1w)==0) {\r\n\t\t\tdouble n1sz = n1.getNborsUnsynchronized().size();\r\n\t\t\tdouble n2sz = n2.getNborsUnsynchronized().size();\r\n\t\t\ttry {\r\n\t\t\t\tdouble n1szaux = n1.getNborWeights(\"value\");\r\n\t\t\t\tdouble n2szaux = n2.getNborWeights(\"value\");\r\n\t\t\t\tn1sz = n1szaux;\r\n\t\t\t\tn2sz = n2szaux;\r\n\t\t\t}\r\n\t\t\tcatch (ParallelException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tif (n1sz < n2sz) return -1;\r\n\t\t\telse if (n1sz == n2sz) {\r\n\t\t\t\tif (n1.getId() < n2.getId())return -1;\r\n\t\t\t\telse if (n1.getId() == n2.getId())return 0;\r\n\t\t\t\telse return 1;\r\n\t\t\t}\r\n\t\t\telse return 1;\r\n\t\t}\r\n\t\telse return 1;\r\n }", "@Override\r\n public int compare(Effect o1, Effect o2) {\n return o1.unparseForPromise().compareTo(o2.unparseForPromise());\r\n }", "public int compare(Object o1, Object o2) {\r\n Node n1 = (Node) o1;\r\n Node n2 = (Node) o2;\r\n\t\tDouble n1wD = n1.getWeightValueUnsynchronized(\"value\"); // used to be n1.getWeightValue(\"value\");\r\n\t\tDouble n2wD = n2.getWeightValueUnsynchronized(\"value\"); // used to be n2.getWeightValue(\"value);\r\n\t\tdouble n1w = n1wD == null ? 1.0 : n1wD.doubleValue();\r\n\t\tdouble n2w = n2wD == null ? 1.0 : n2wD.doubleValue();\r\n\t\tif (n1w<n2w) return -1;\r\n\t\telse if (Double.compare(n2w, n1w)==0) {\r\n\t\t\tdouble n1sz = n1.getNborsUnsynchronized().size();\r\n\t\t\tdouble n2sz = n2.getNborsUnsynchronized().size();\r\n\t\t\ttry {\r\n\t\t\t\tdouble n1szaux = n1.getNborWeights(\"value\");\r\n\t\t\t\tdouble n2szaux = n2.getNborWeights(\"value\");\r\n\t\t\t\tn1sz = n1szaux;\r\n\t\t\t\tn2sz = n2szaux;\r\n\t\t\t}\r\n\t\t\tcatch (ParallelException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tif (n1sz > n2sz) return -1;\r\n\t\t\telse if (n1sz == n2sz) {\r\n\t\t\t\tif (n1.getId() < n2.getId())return -1;\r\n\t\t\t\telse if (n1.getId() == n2.getId())return 0;\r\n\t\t\t\telse return 1;\r\n\t\t\t}\r\n\t\t\telse return 1;\r\n\t\t}\r\n\t\telse return 1;\r\n }", "private int compareZOrder(ProcessorDistributionKey key)\n {\n int z1 = myZOrder;\n int z2 = key.getZOrder();\n return z1 < z2 ? -1 : z1 == z2 ? 0 : 1;\n }", "public static void main(String[] args) {\n Client clientIP = new IndividualEntrepreneur(100000);\n System.out.println(clientIP);\n// client.deposit(555);\n// System.out.println(client);\n// client.deposit(1234);\n// System.out.println(client);\n// client.withdraw(1498);\n// System.out.println(client);\n\n Client clientOOO= new legalEntity(200000);\n System.out.println(clientOOO);\n// client1.deposit(1234);\n// System.out.println(client1);\n// client1.withdraw(10000);\n// System.out.println(client1);\n clientOOO.send(clientIP,2000);\n System.out.println(clientIP);\n System.out.println(clientOOO);\n clientIP.getInformation();\n clientOOO.getInformation();\n\n System.out.println(\"Hah Set \" + clientIP.getClientSet());\n System.out.println(clientIP.getClientSet());\n clientIP.getClientSet().clear();\n System.out.println(clientIP.getClientSet());\n Client clientInd = new Individual(50000);\n System.out.println(clientIP.getClientSet());\n clientIP.getClientSet().add(clientInd);\n clientIP.getClientSet().add(clientInd);\n System.out.println(clientIP.getClientSet());\n\n }", "public int compare(Message o1, Message o2)\n {\n\n if (o1.priority <o2.priority)\n {\n return -1;\n }\n if (o1.priority > o2.priority)\n {\n return 1;\n }\n if(o1.priority == o2.priority)\n {\n if (o1.port <= o2.port)\n {\n return -1;\n }\n if (o1.port > o2.port)\n {\n return 1;\n }\n }\n return 0;\n }", "public static boolean syncUp(ClientResponsePacket res_packet)throws IOException\n {\n Socket mem_conn = null;\n ClientResponsePacket data = null;\n MemNodeSyncHelper sync_nodes_list = res_packet.getMemNodeSyncHelper();\n ClientRequestPacket req_packet = new ClientRequestPacket();\n for(MemNodeSyncDetails node : sync_nodes_list.syncIps)\n {\n req_packet.setCommand(ProjectConstants.SYNC_MEM_NODE);\n req_packet.setStart_range(node.getStart_range());\n req_packet.setEnd_range(node.getEnd_range());\n req_packet.setStorage_type(node.getStorage_type());\n mem_conn = new Socket(node.getIp_Address(),ProjectConstants.MN_LISTEN_PORT);\n PacketTransfer.sendRequest(req_packet,mem_conn);\n data = PacketTransfer.recv_response(mem_conn);\n System.out.println(\"Loading DS with status : \" + data.getResponse_code() + \" and size : \" + data.getSync_data().size() +\n \" and range \" + node.getStart_range() + \":\" + node.getEnd_range() + \" and ip : \" + node.getIp_Address());\n if(data.getResponse_code() != ProjectConstants.SUCCESS)\n return false;\n loadSyncData(data.getSync_data(),node.getStorage_type());\n }\n return true;\n }", "public int compare(PSRelationshipInfo o1, PSRelationshipInfo o2)\n {\n String l1 = o1.getLabel();\n String l2 = o2.getLabel();\n return l1.compareToIgnoreCase(l2);\n }", "@Override\n\t public void process(PacketContext context) {\n\t InboundPacket pkt = context.inPacket();\n Ethernet ethPkt = pkt.parsed();\n HostId id = HostId.hostId(ethPkt.getDestinationMAC());\n/*\n InboundPacket pkt = context.inPacket();\n Ethernet ethPkt = pkt.parsed();\n\t MacAddress hostId = ethPkt.getSourceMAC();\n HostId id = HostId.hostId(ethPkt.getDestinationMAC());\n\t DeviceId apId = pkt.receivedFrom().deviceId();\n*/\n // Do we know who this is for? If not, flood and bail.\n\t //log.info(\"Host id : {}\",id);\n\n Host dst = hostService.getHost(id);\n\n\t\n if (dst == null) {\n ipv6process(context, pkt);\n\t \n return;\n\t }\n/*\n\t if (pkt.receivedFrom().deviceId().equals(dst.location().deviceId())) {\n if (!context.inPacket().receivedFrom().port().equals(dst.location().port())) {\n\t\t log.info(\"Rule is installed.-1\");\n\t\t log.info(\"DeviceID: dst={}\", pkt.receivedFrom().deviceId(), dst.location().deviceId());\n installRule(context, dst.location().port());\n }\n return;\n }\n\t\t\t\t\n*/\t\n \t if((stPreApId.equals(stNowApId) && stype ==1) || (stPreApId.equals(stNowApId) && stype ==2)){\n\t\t log.info(\"##############test same ap -------------[ok]\\n\");\n\t\t log.info(\"checking preApId ={}, nowApId={} \\n\",stPreApId, stNowApId);\n\t\t //TODO ::\t\t\t\n\t Set<Path> paths = topologyService.getPaths(topologyService.currentTopology(), pkt.receivedFrom().deviceId(), dst.location().deviceId()); \n\t\t if (paths.isEmpty()) {\n\t\t // If there are no paths, flood and bail.\n\t\t //flood(context);\n\t\t return;\n\t\t }\n\t\t \n\t\t Path path = pickForwardPathIfPossible(paths,pkt.receivedFrom().port());\n\t\t if (path == null) {\n\t\t log.warn(\"Don't know where to go from here {} for {} -> {}\",\n\t\t pkt.receivedFrom(), ethPkt.getSourceMAC(), ethPkt.getDestinationMAC());\n\t\t //flood(context);\n\t\t return;\n\t\t }\n\t\t log.info(\"Rule is installed.-2\");\n\t\t log.info(\"port()={}, path()={}\", pkt.receivedFrom().port(), path);\n\t\t mkList(hostId, apId, flowNum, pkt.receivedFrom().port(), ethPkt.getSourceMAC(), ethPkt.getDestinationMAC(), stype);\n\t\t saveFlowInfo(ethPkt.getDestinationMAC(),pkt.receivedFrom().deviceId(), stype);\n\t\t // stype = 0;\n\n\t }\n\n\n\t if(! stPreApId.equals(stNowApId) && stype ==3){\n\t\tif(! stNowApId.equals(\"\")){\n\t\t\tlog.info(\"##############test handover -------------[ok]\\n\");\n\t\t\tlog.info(\"checking preApId ={}, nowApId={} \\n\",stPreApId, stNowApId);\n\t\t\tlog.info(\"test : {}\",destList2.size());\n\n\t\t\t/*for(int i =0; i<destList2.size();i++){\n\t\t\t\tlog.info(\"test type 2 cnt: {}\",i);\n\t\t\t\t//if(((DeviceId)desApList2.get(i)).equals(dst.location().deviceId())){\n\t\t\t\t\t Set<Path> paths = topologyService.getPaths(topologyService.currentTopology(), pkt.receivedFrom().deviceId(), dst.location().deviceId()); \n\t\t\t\t if (paths.isEmpty()){\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t Path path = pickForwardPathIfPossible(paths, pkt.receivedFrom().port());\n\t\t\t\t if (path == null) {\n\t\t\t\t\tlog.warn(\"Don't know where to go from here\");\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t log.info(\"Rule is installed.-3\");\n\t\t\t\t log.info(\"port()={}, path()={}\", pkt.receivedFrom().port(), path);\t\n\t\t\t\t // }\n\t\t\t}*/\n\n\t\t\tfor(int i =0; i<destList1.size();i++){\n\t\t\t\tlog.info(\"test type 1 cnt: {}\",i);\n\t\t\t\t//if(((DeviceId)desApList1.get(i)).equals(dst.location().deviceId())){\n\t\t\t\t\t Set<Path> paths = topologyService.getPaths(topologyService.currentTopology(), pkt.receivedFrom().deviceId(), dst.location().deviceId());\n\t\t\t\t if (paths.isEmpty()){\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t Path path = pickForwardPathIfPossible(paths, pkt.receivedFrom().port());\n\t\t\t\t if (path == null) {\n\t\t\t\t\tlog.warn(\"Don't know where to go from here\");\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t log.info(\"Rule is installed.-4\");\n\t\t\t\t log.info(\"port()={}, path()={}\", pkt.receivedFrom().port(), path);\t\n\t\t\t\t // }\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif (stype ==0) {\n\t\t\tlog.info(\"###-----------what is packet?\\n\");\n\t\t}\n\t\t\n\t }\n\t\tlog.info(\"#############-------------[waitting]\\n\");\n\t\t\n\t}" ]
[ "0.5672387", "0.5353603", "0.5322718", "0.52516913", "0.5249936", "0.52125686", "0.52123296", "0.51594394", "0.5141674", "0.51255494", "0.5021764", "0.5020583", "0.50170827", "0.49903736", "0.49779257", "0.49553943", "0.4943338", "0.49126527", "0.49095976", "0.4900601", "0.48959172", "0.48912308", "0.48731318", "0.48648927", "0.4852628", "0.4825309", "0.48200414", "0.48150083", "0.48112962", "0.48075652", "0.47955245", "0.47884732", "0.47792187", "0.47701907", "0.47649533", "0.4754207", "0.47451067", "0.47334248", "0.4725161", "0.47175175", "0.47043797", "0.47029534", "0.4702504", "0.46916014", "0.46732312", "0.46698204", "0.4668804", "0.46678755", "0.4664984", "0.46645477", "0.46636748", "0.46606654", "0.4644811", "0.46406543", "0.46341544", "0.46340176", "0.46327284", "0.46281916", "0.4626186", "0.4617971", "0.4617857", "0.4609458", "0.4609048", "0.46034014", "0.45967343", "0.4593975", "0.45930934", "0.45852143", "0.45849836", "0.45843032", "0.457265", "0.4572555", "0.45693606", "0.45686647", "0.4568415", "0.45565116", "0.45556927", "0.4555618", "0.4554373", "0.45538837", "0.4551959", "0.4545772", "0.4543248", "0.45430186", "0.4542648", "0.4541206", "0.45395577", "0.4537185", "0.45354643", "0.45324254", "0.45308027", "0.45303112", "0.45283586", "0.4522009", "0.45203963", "0.45198515", "0.45184362", "0.4511791", "0.45042259", "0.45024416" ]
0.48156342
27
Intelligently decides where the message should be sent. If this is called from a clientside thread, the message is sent to the server. Otherwise, it is sent to all players on the server.
public void send(ECPacket message) { if (FMLCommonHandler.instance().getEffectiveSide().isClient()) { this.sendToServer(message); } else { this.sendToAll(message); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendMessage() {\n\t\tString myPosition=this.agent.getCurrentPosition();\n\t\tif (myPosition!=null){\n\t\t\t\n\t\t\tList<String> wumpusPos = ((CustomAgent)this.myAgent).getStenchs();\n\t\t\t\n\t\t\tif(!wumpusPos.isEmpty()) {\n\t\t\t\tList<String> agents =this.agent.getYellowpage().getOtherAgents(this.agent);\n\t\t\t\t\n\t\t\t\tACLMessage msg=new ACLMessage(ACLMessage.INFORM);\n\t\t\t\tmsg.setSender(this.myAgent.getAID());\n\t\t\t\tmsg.setProtocol(\"WumpusPos\");\n\t\t\t\tmsg.setContent(wumpusPos.get(0)+\",\"+myPosition);\n\t\t\t\t\n\t\t\t\tfor(String a:agents) {\n\t\t\t\t\tif(this.agent.getConversationID(a)>=0) {\n\t\t\t\t\t\tif(a!=null) msg.addReceiver(new AID(a,AID.ISLOCALNAME));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.agent.sendMessage(msg);\n\t\t\t\tthis.lastPos=myPosition;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}", "@Override\n public void sendChatMessage(EntityPlayer player) {\n }", "public abstract void handleClientSide(T message, EntityPlayer player);", "public abstract void handleServerSide(T message, EntityPlayer player);", "public void doSendMsg() {\n FacesContext fctx = FacesContext.getCurrentInstance();\n HttpSession sess = (HttpSession) fctx.getExternalContext().getSession(false);\n SEHRMessagingListener chatHdl = (SEHRMessagingListener) sess.getAttribute(\"ChatHandler\");\n if (chatHdl.isSession()) {\n //TODO implement chat via sehr.xnet.DOMAIN.chat to all...\n if (room.equalsIgnoreCase(\"public\")) {\n //send public inside zone\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PUBLIC, moduleCtrl.getLocalZoneID(), -1, -1);\n } else {\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PRIVATE_USER, moduleCtrl.getLocalZoneID(), -1, curUserToChat.getUsrid());\n }\n this.text = \"\";\n }\n //return \"pm:vwChatRoom\";\n }", "public void sendToCurrClient ( String message ){\n currClient.send( message );\n ServerConnection[] clients = new ServerConnection[]{client1, client2, client3};\n for(ServerConnection c: clients){\n if(c != currClient && c != null )\n if ( !message.contains(\"You won\") )\n c.send(\"Wait for \" + currClient.getName() + \" to end his turn\" );\n else c.send(\"You lost the match. \" + currClient.getName() + \" won the game.\");\n }\n }", "private void sendMessage(CommandSender p, String msg) {\n\t\tif (p instanceof Player) {\n\t\t\tif (!((Player) p).isOnline()) return;\n\t\t}\n\t\t_.msg(p, GameMode.Sonic, msg);\n\t}", "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 broadcast(String message)\n \t{\n \t\tfor(int i = 0; i < players.length; i++)\n \t\t{\n // PROTOCOL\n \t\t\tplayers[i].sendMessage(message);\n // PROTOCOL\n \t\t}\n \t}", "void sendPacketToPlayer(Player player, Object packet);", "@Override\n\tpublic void sendMessage() {\n\t\t\n\t}", "public void sendMessage(String msg) {\n\t\tplayer.sendMessage(msg);\n\t}", "private void sendMessageToClient(String messageToClient){\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n output.println(\"\\n\" + \"Server: \" + messageToClient);\n output.flush();\n }\n });\n }", "@Override\n\tpublic void tellPlayer(String message) {\n\t\tSystem.out.println(message);\n\t}", "public void sendMessage()\r\n {\r\n MessageScreen messageScreen = new MessageScreen(_lastMessageSent);\r\n pushScreen(messageScreen);\r\n }", "private void sendMessage(String message){\n try{\n output.writeObject(nickname+\" : \" + message);\n output.flush();\n showMessage(\"\\n\"+nickname+\" : \" + message);\n }catch(IOException ioException){\n chatWindow.append(\"\\n Oops! Something went wrong!\");\n }\n }", "void messageSent();", "public abstract void sendPrivateMessage(String nickname, String message);", "public void sendMessage(Message message) {\n if (accepted || !ended || message.type.equals(\"register\") || message.type.equals(\"lobby\")) {\n message.packetNum = packetNum;\n ByteBuffer buffer = ByteBuffer.wrap(SerializationUtils.serialize(message));\n SocketAddress addr = null;\n try {\n addr = client.getLocalAddress();\n log(\"sending [\" + message + \"] to \" + addr);\n client.write(buffer);\n reconciliation.add(message);\n packetNum++;\n } catch (IOException e) {\n error(\"Failed to send message to:\" + addr);\n e.printStackTrace();\n }\n }\n }", "@Override\r\n\tpublic void sendMessage(String message) {\n\t\t\r\n\t}", "void sendMessage() {\n\n\t}", "public void messageToAll(String s) {\n\t\tfor(ClientThread player: players) {\n\t\t\tplayer.send(new Package(\"MESSAGE\",s));\n\t\t}\n\t\t\n\t}", "void sendPacket(Player player, Object packet);", "static synchronized void SendMessage(String message, ClientHandler user, boolean same) throws IOException\r\n {\r\n String mes = message;\r\n if(!same)\r\n mes = user.username + \": \" + mes;\r\n //System.out.println(mes);\r\n\r\n chatLogWriter.write(mes + \"\\n\");\r\n chatLogWriter.flush();\r\n\r\n for (ClientHandler ch : users)\r\n {\r\n if(!ch.equals(user))\r\n ch.WriteCypherMessage(mes);\r\n else if(same)\r\n ch.WriteCypherMessage(message);\r\n }\r\n }", "public void sendMessage(String msg) {\n Player player = RegionOwn.server.getPlayer(name);\n if (player != null) {\n player.sendMessage(msg);\n } else if (RegionOwn.pm.isPluginEnabled(\"TextPlayer\")) {\n User user = TextPlayer.findUser(name);\n user.sendText(\"Region Security System\", msg);\n }\n }", "@Override\n public boolean onCommand(CommandSender sender, Command command, String alias, String[] args) {\n if (sender instanceof Player)\n switch (args.length) {\n case 0 -> {\n //send to all players\n Bukkit.broadcastMessage(WorldUtils.Messages.positionMessage(\n sender.getName(), ((Player) sender).getLocation()));\n return true;\n }\n case 1 -> {\n //send to one player\n try {\n Objects.requireNonNull(Bukkit.getPlayer(args[0])).sendMessage(WorldUtils.Messages.positionMessage(\n sender.getName(), ((Player) sender).getLocation()));\n } catch (NullPointerException e) {\n WorldUtils.Messages.playerNotFound(sender);\n }\n return true;\n }\n }\n else {\n WorldUtils.Messages.notConsole(sender);\n return true;\n }\n return false;\n }", "@OnMessage\r\n\tpublic void onMessage(String message) {\r\n\r\n\t\tSystem.out.println(\"Message from \" + session.getId() + \": \" + message);\r\n\t\tthis.sendClient(\"Message from server: session ID : \" + session.getId()\r\n\t\t\t\t+ \" you sent \" + message);\r\n\t\tEchoServer socket = this.sockets.get(message);\r\n\t\tif (socket != null) {\r\n\t\t\tsocket.sendClient(this.uniqueId + \" send to \" + socket.uniqueId\r\n\t\t\t\t\t+ \" a message\");\r\n\t\t}else{\r\n\t\t\tSystem.out.println(\"Invalid Message from \" + session.getId());\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * try { session.getBasicRemote().sendText(\r\n\t\t * \"Message from server: session ID : \" + session.getId() + \" you sent \"\r\n\t\t * + message); } catch (IOException ex) { ex.printStackTrace(); }\r\n\t\t */\r\n\t}", "private void individualSend(UserLogic t) {\n if(t != UserLogic.this && t != null && ((String)UI.getContacts().getSelectedValue()).equals(t.username)){\r\n if(((String)t.UI.getContacts().getSelectedValue()).equals(username)) { //If both users are directly communicating\r\n t.UI.getProperList().addElement(username + \"> \" + UI.getMessage().getText()); //Send message\r\n t.UI.getContacts().setCellRenderer(clearNotification); //Remove notification\r\n }\r\n else{ //If the user are not directly communicating\r\n t.UI.getContacts().setCellRenderer(setNotification); //Set notification\r\n }\r\n if(t.chats.containsKey(username)){ //Store chats in other users database (When database exists)\r\n ArrayList<String> arrayList = t.chats.get(username); //Get data\r\n arrayList.add(username + \"> \" + UI.getMessage().getText()); //Add new message to the database\r\n t.chats.put(username, arrayList); //Store data\r\n }\r\n else { //When database doesn't exist\r\n ArrayList<String> arrayList = new ArrayList<>(); //create new database\r\n arrayList.add(username + \"> \" + UI.getMessage().getText()); //Add new message to the database\r\n t.chats.put(username, arrayList); //Store data\r\n }\r\n }\r\n //This writes on my screen\r\n if(t == UserLogic.this && t!=null){ //On the current user side\r\n UI.getProperList().addElement(\"Me> \" + UI.getMessage().getText()); //Write message to screen\r\n String currentChat = (String) UI.getContacts().getSelectedValue(); //Get selected user\r\n if(chats.containsKey(currentChat)){ //check if database exists\r\n ArrayList<String> arrayList = chats.get(currentChat);\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(currentChat, arrayList);\r\n }\r\n else { //When database doesn't exist\r\n ArrayList<String> arrayList = new ArrayList<>();\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(currentChat, arrayList);\r\n }\r\n }\r\n }", "public void sendMessageToClient(Object message, String username) {\n\n }", "public void sendGameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDGM\" + lobby.getGameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}", "public void doChatMessage(GameServer gameServer, User user, String name, String message) {\n if (message.startsWith(\"/\")) {\n String toSend = \"\";\n if (message.startsWith(\"/help\")) {\n //Todo: do help\n toSend = \"List of all inner chat commands:\\n\" +\n \"/help (Command) --> Gets help for that command\\n\" +\n \"/list [all, online, RankName, lobby, clients, propertys] --> get a list of users that meet the criteria\\n\" +\n \"/ping --> Pong!\";\n }\n if (message.startsWith(\"/list all\")) {\n List<String> toSendList = Authenticate.getUserList();\n //toSend = Authenticate.getUserList();\n for (String string: toSendList) {\n toSend += string + \"\\n\";\n }\n }\n else if (message.startsWith(\"/ping\")) {\n toSend = \"Pong\";\n }\n else if (message.startsWith(\"/list lobby\")) {\n Lobby lobby = user.getCurrentLobby();\n if (lobby != null) {\n List<User> users = lobby.getUsers();\n for (User u: users) {\n toSend += u.chatFormatDisplay() + \"\\n\";\n }\n }\n }\n else if (message.startsWith(\"/list clients\")) {\n if (Authenticate.checkRank(user.getRank(), Rank.Op)) {\n for (ClientWorker w: gameServer.getClients()) {\n toSend += w.toString() + \"\\n\";\n }\n }\n }\n else if (message.startsWith(\"/list propertys\")) {\n if (Authenticate.checkRank(user.getRank(), Rank.Op)) {\n toSend = Settings.listPropertys();\n }\n }\n else if (message.startsWith(\"/changeproperty\")) {\n if (Authenticate.checkRank(user.getRank(), Rank.Op)) {\n String[] split = message.split(\" \");\n Settings.setProperty(split[1], split[2]);\n toSend = \"Changed property: \" + split[1] + \" to \" + split[2] + \".\\n\" + Settings.listPropertys();\n }\n }\n else if (message.startsWith(\"/loadpropertys\")) {\n if (Authenticate.checkRank(user.getRank(), Rank.Op)) {\n Settings.load();\n toSend = \"Loaded propertys.\\n\" + Settings.listPropertys();\n }\n }\n\n else if (message.startsWith(\"/snake\")) {\n if (user.getCurrentLobby() == null) {\n SingleUserChatContext chatContext = new SingleUserChatContext(user, \"Snake-->\" + user.getName(), \"Snake\");\n addNewContext(chatContext);\n SnakeLobby snakeLobby = new SnakeLobby(user, chatContext);\n user.setCurrentLobby(snakeLobby);\n gameServer.lobbys.addNewLobby(snakeLobby);\n snakeLobby.start();\n }\n }\n\n else if (message.startsWith(\"/statesnake\")) {\n if (user.getCurrentLobby() == null) {\n SingleUserChatContext chatContext = new SingleUserChatContext(user, \"Snake-->\" + user.getName(), \"Snake\");\n addNewContext(chatContext);\n StateSnakeLobby snakeLobby = new StateSnakeLobby(user, chatContext);\n user.setCurrentLobby(snakeLobby);\n gameServer.lobbys.addNewLobby(snakeLobby);\n snakeLobby.start();\n }\n }\n\n else if (message.startsWith(\"/leavelobby\")) {\n Lobby lobby = user.getCurrentLobby();\n if (lobby != null) {\n gameServer.lobbys.removeUser(lobby, user);\n toSend = \"Left the lobby\";\n }\n }\n\n// else if (message.startsWith(\"/load\")) {\n// String[] split = message.split(\" \");\n// File file = new File(split[1]);\n// System.out.println(file.exists());\n// if (file.exists()) {\n// try {\n// String in = \"\";\n// BufferedReader reader = new BufferedReader(new FileReader(file));\n// while ((in = reader.readLine()) != null) {toSend += in + \"\\n\";}\n// reader.close();\n// //toSend = in;\n// //Get the chat context, if it exists send the chat message\n// ChatContext chatContext = getContext(name);\n// if (chatContext == null) return;\n// chatContext.sendMessage(toSend);\n// toSend = \"\";\n// }\n// catch (Exception e) {\n// e.printStackTrace();\n// }\n// }\n// }\n\n if (!toSend.isEmpty()) {\n StringWriter stringWriter = new StringWriter();\n new JSONWriter(stringWriter).object()\n .key(\"argument\").value(\"chatmessage\")\n .key(\"name\").value(\"Server-->\" + user.getName())\n .key(\"displayname\").value(\"Server\")\n .key(\"message\").value(toSend)\n .endObject();\n user.clientWorker.sendMessage(stringWriter.toString());\n }\n\n }\n else {\n //Get the chat context, if it exists send the chat message\n ChatContext chatContext = getContext(name);\n if (chatContext == null) return;\n chatContext.sendMessage(user.chatFormatDisplay() + \" \" + message);\n }\n }", "public void send(Message msg);", "@Override\n public void sendMessage(Message m) {\n commSender.sendMessage(m);\n }", "public void sendPacket() throws IOException {\n\t\tbyte[] buf = playerList.toString().getBytes();\n\n\t\t// send the message to the client to the given address and port\n\t\tInetAddress address = packet.getAddress();\n\t\tint port = packet.getPort();\n\t\tpacket = new DatagramPacket(buf, buf.length, address, port);\n\t\tsocket.send(packet);\n\t}", "private void sendMessagetoRespectivePlayer(int num) {\n Message msg1;\n if(flag == \"player1\"){\n prevP1 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p1Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p1Handler.obtainMessage(4);\n }\n else{\n msg1 = p1Handler.obtainMessage(5);\n }\n p1Handler.sendMessage(msg1);\n }\n else{\n prevP2 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p2Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p2Handler.obtainMessage(4);\n }\n else{\n msg1 = p2Handler.obtainMessage(5);\n }\n p2Handler.sendMessage(msg1);\n }\n }", "public abstract void sendConfirmationMessage(Player player);", "public void send(Object message) {\n try {\n if (message.equals(startTurnMessage)) {\n myTurn = true;\n }\n else if (message.equals(endTurnMessage)) {\n myTurn = false;\n }\n else {\n socketOut.reset();\n socketOut.writeObject(message);\n socketOut.flush();\n }\n } catch (IOException | NullPointerException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void sendMessage(String message) {\n if(\"YOURMOVE\".equals(message)) {\n makeMove();\n }\n }", "public void serverSendMessageToUser(String username, String message) {\r\n \t\tServerCommand serverCommand = new PrivateMessageServerCommand(message, \"server\", username, null);\r\n \r\n \t\tRoMClient userClient = this.clients.getClientByUsername(username);\r\n \r\n \t\tthis.sendCommandToClient(userClient, serverCommand);\r\n \t}", "@Override\n\tpublic void requestHandle(IPlayer player, IMessage message) {\n\t\t\n\t}", "@Override\n\tpublic void send(String msg) {\n\t\t\n\t\t\n\t\n\t}", "public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}", "public void sendChat(String client, String message) {\n\t\t//enqueue(\"PRIVMSG #\"+myself+\" :.w \"+client + \" imGlitch \" + message); //whisper\n\t\tenqueue(\"PRIVMSG #\"+Executable.targetChannel+\" :imGlitch (@\"+client + \") \" + message);\n\t}", "private void sendMessage(Space jSpace, int playerID, String msg) throws InterruptedException {\n\t\tsendHeader(jSpace, playerID, ServerCommands.message);\n\t\tjSpace.put(playerID, msg);\n\t}", "public void clientToServerChatMessage(String message){\n String chatMessage = message;\n System.out.println(\"chatmessage\" + chatID + \" \" + chatMessage);\n toServer.println(\"chatmessage\" + chatID + \" \" + chatMessage);\n toServer.flush();\n }", "public synchronized void sendMessage (String msg, ServerThread current) {\n\t\tcurrent.send (msg);\n\t}", "public void tellServer(String message)\n\t{\n\t\ttoServer.println(message);\n\t\ttoServer.flush();\n\t}", "public void send_message(){\n logical_clock++;\n System.out.println(\"Send Message Clock:\" +logical_clock);\n encrypt(logical_clock);\n\n }", "boolean send(String message, PlayerID from, PlayerID to) {\n\t\tfor (Player player : players) {\n\t\t\tif (player.id().equals(to)) {\n\t\t\t\tplayer.sendMsg(\"P\" + from.toString() + \": \" + message);\n\t\t\t\tlog.add(new String[] { from.toString(), message, String.valueOf(System.currentTimeMillis()) });\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public void run() {\n if (pendingTeleports.containsKey(sender.getName())) {\n pendingTeleports.remove(sender.getName(),originalSender);\n if (senderPlayer.dimension != teleportee.dimension) {\n TeleportHelper.transferPlayerToDimension(teleportee,senderPlayer.dimension,server.getPlayerList());\n }\n teleportee.setPositionAndUpdate(senderPlayer.posX,senderPlayer.posY,senderPlayer.posZ);\n sender.addChatMessage(new TextComponentString(TextFormatting.GREEN+\"Teleport successful.\"));\n teleportee.addChatMessage(new TextComponentString(TextFormatting.GREEN+\"Teleport successful.\"));\n } //if not, the teleportee moved\n }", "private void sendMessage(String mPos) {\n Log.d(\"sender\", \"Broadcasting message\");\n Intent intent = new Intent(\"adapter action\");\n // You can also include some extra data.\n intent.putExtra(\"song position\", mPos);\n LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent);\n }", "public void sendMessageToSpecific() {\n try {\n if (socket == null){\n JOptionPane.showMessageDialog(null, \"SSLSocket is not connected to server. Connect before sending message.\",Env.ChatClientMessageBoxTitle, JOptionPane.ERROR_MESSAGE);\n return;\n }\n String usernameSendTo = JOptionPane.showInputDialog(null, \"Enter username to send message to\");\n String msg = JOptionPane.showInputDialog(null, \"Enter message to send to client with username: \" + usernameSendTo);\n if (usernameSendTo.trim().equals(user.getUsername().trim())){\n JPanel jp = new JPanel();\n jp.setLayout(new BorderLayout());\n JLabel jl = new JLabel(\n \"<html><font color=red><b>Are you sure that you want to send a message to yourself? </font>:\"\n + \"</b><br><br></html>\");\n Font font = new Font(\"Arial\", java.awt.Font.PLAIN, 14);\n jl.setFont(font);\n jp.add(jl, BorderLayout.NORTH);\n if (JOptionPane.showConfirmDialog(null, jp, Env.ChatClientMessageBoxTitle,\n JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null) == 0) {\n PrintWriter writer = new PrintWriter(new OutputStreamWriter(socket.getOutputStream(), \"UTF-8\"), true);\n writer.println(passUtil.toHexString(\"msgspecific|split|\" + usernameSendTo + \"|split|\" + user.getUsername() + \"|split|\" + msg));\n writer.flush();\n chatClientController.appendToPane(new Date(System.currentTimeMillis()) + \": You (\" + user.getUsername() + \"): To: \" + usernameSendTo + \": \" + msg, \"BLUE\", null);\n } else {\n System.out.println(\"Input cancelled\");\n }\n } else {\n PrintWriter writer = new PrintWriter(new OutputStreamWriter(socket.getOutputStream(), \"UTF-8\"), true);\n writer.println(passUtil.toHexString(\"msgspecific|split|\" + usernameSendTo + \"|split|\" + user.getUsername() + \"|split|\" + msg));\n writer.flush();\n chatClientController.appendToPane(new Date(System.currentTimeMillis()) + \": You (\" + user.getUsername() + \"): To: \" + usernameSendTo + \": \" + msg, \"BLUE\", null);\n }\n } catch (Exception ex){\n ex.printStackTrace();\n if (ex.toString().toLowerCase().contains(\"socket output is already shutdown\")){\n disconnectFromServer(false);\n }\n JOptionPane.showMessageDialog(null, \"Error sending message: \" + ex.toString(),Env.ChatClientMessageBoxTitle, JOptionPane.ERROR_MESSAGE);\n }\n }", "public void send() {\n\t}", "public void sendMessageToPlayer(JSONObject msg, Player receiver)\n {\n if (mEnable && msg != null && receiver != null) {\n Log.d(LOGTAG,\"Sending message to receiver at pos \" + receiver.getPosition());\n\n // TODO: Check if device ok?\n BluetoothDevice recDevice = receiver.getBDevice();\n mBS.send(recDevice, MessageFactory.msgToBytes(msg));\n\n } else Log.d(LOGTAG,\"There is a problem sending a message to a receiver\");\n }", "void sendMsg(String msg) {\n if (this.server.getOwnClientName().equals(username)) {\n StringJoiner joiner = new StringJoiner(Constants.MSG_DELIMETER);\n joiner.add(MsgType.UNICAST.toString());\n joiner.add(msg);\n toClient.println(joiner.toString());\n }\n }", "public void handle(EntityPlayerMP player, GUIUpdatePacket message) {\n Container container = player.openContainer;\n if(container != null){\n if(container instanceof SyncableContainer){\n SyncableContainer synCont = (SyncableContainer) container;\n SyncableTileEntity tileSyncable = synCont.getSyncableTileEntity();\n tileSyncable.doSync(message.toSync);\n // We have adjusted the clientside values for at least one client. We need to send these updated\n // values to all players so that they can all see it\n TileEntity tile = (TileEntity) tileSyncable;\n for(EntityPlayerMP pl : player.getServerWorld().getPlayers(EntityPlayerMP.class, new Predicate<EntityPlayerMP>() {\n @Override\n public boolean apply(@Nullable EntityPlayerMP input) {\n if(Math.sqrt(input.getPosition().distanceSq(tile.getPos().getX(), tile.getPos().getY(), tile.getPos().getZ())) < 5D){\n if(input.openContainer != null){\n if(input.openContainer instanceof SyncableContainer){\n return true;\n }\n }\n }\n return false;\n }\n })){\n TonePacketHandler.sendTo(new PlayerGuiSyncMessage(message.toSync), pl);\n }\n }\n }\n }", "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}", "@Override\n public void sendMessage(String from, String to, Message message){\n this.sendingPolicy.sendViaPolicy(from, to, message);\n //local persistence\n updateMessage(message);\n }", "public void sendMessage(String message) {}", "@Override\n\tpublic void send(String msg) {\n\t}", "private static PluginMessageRecipient getThroughWhomSendMessage() {\n\t\treturn Remain.getOnlinePlayers().isEmpty() ? Bukkit.getServer() : Remain.getOnlinePlayers().iterator().next();\n\t}", "@FXML\n private void sendMessage(ActionEvent actionEvent) {\n String playerName = RiskMain.getInstance().getDomain().getPlayerName();\n System.out.println(messageInput.getText());\n String text = playerName + \": \" + messageInput.getText();\n if (RiskMain.getInstance().getDomain().isServer()) {\n this.serverInterface = RiskMain.getInstance().getDomain().getServer();\n this.serverInterface\n .sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n } else {\n this.clientPlayerInterface = RiskMain.getInstance().getDomain().getClient();\n this.clientPlayerInterface.sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n }\n }", "public synchronized void sendPrivateMessageToPlayer(Player player, String message) {\n SlackUser user;\n if (isTestingMode) {\n user = session.findUserByUserName(testingModeUserName);\n } else {\n user = session.findUserByUserName(player.getUserName());\n }\n SlackMessageHandle<SlackChannelReply> openDirectHandle = session.openDirectMessageChannel(user);\n SlackChannel directChannel = openDirectHandle.getReply().getSlackChannel();\n session.sendMessage(directChannel, message, null);\n }", "public void clientShout(String message) {\n\t\tfor (final Player player : this.players) {\n\t\t\tplayer.sendMessage(message);\n\t\t}\n\t}", "public void sendNameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDNM\" + lobby.getNameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}", "public synchronized void sendPublicMessageToPlayer(Player recipient, String message) {\n session.sendMessage(gameChannel, recipient.getUserName() + \", \" + message,null);\n }", "public void sendStartGame (){\n connect();\n try{\n doStream.writeUTF(\"GAME_START\");\n doStream.writeUTF(currentUser.getUserName());\n\n } catch (IOException e){\n e.printStackTrace();\n }\n disconnect();\n }", "public void sendMove (Move m){\n connect();\n try{\n doStream.writeUTF(\"MOVE\");\n doStream.writeUTF(currentUser.getUserName());\n doStream.writeUTF(m.toString());\n } catch (IOException e){\n e.printStackTrace();\n }\n\n disconnect();\n }", "private void processPacket(Packet msg, int sourceClientID)\n\t{\n\t\tif (msg.getPacketID() == 1)\n\t\t{\n\t\t\t// Position updates, broadcast to everyone else\n\t\t\tPCSPosRotUpdate posUpdate = (PCSPosRotUpdate)msg;\n\t\t\t\n\t\t\t// CSPosRotUpdate\n\t\t\t// Get the specific entity to update\n\t\t\tEntityPlayer player = (EntityPlayer) entityMap.getEntity(posUpdate.clientID, EntityPlayer.class);\n\t\t\t\n\t\t\t// If non-existant, move on (probably a stale id)\n\t\t\tif (player == null)\n\t\t\t\treturn;\n\t\t\t\n\t\t\tSystem.out.printf(\"\\t Ply%d-Pos: (%f, %f, %f) - (%f, %f)\\n\", posUpdate.clientID, posUpdate.xPos, posUpdate.yPos, posUpdate.zPos, posUpdate.pitch, posUpdate.yaw);\n\t\t\tplayer.setPos(posUpdate.xPos, posUpdate.yPos, posUpdate.zPos);\n\t\t\tplayer.setVelocity(posUpdate.xVel, posUpdate.yVel, posUpdate.zVel);\n\t\t\tplayer.setOrientation(posUpdate.pitch, posUpdate.yaw);\n\t\t\tplayer.xAccel = posUpdate.xAccel;\n\t\t\tplayer.zAccel = posUpdate.zAccel;\n\t\t\t\n\t\t\tplayer.isFlying = posUpdate.isFlying;\n\t\t\tplayer.isSneaking = posUpdate.isSneaking;\n\t\t\tplayer.isSprinting = posUpdate.isSprinting;\n\t\t\t\n\t\t\tclientChannels.write(posUpdate);\n\t\t}\n\t\telse if (msg.getPacketID() == 5)\n\t\t{\n\t\t\t// Block place, handle that\n\t\t\tPCSPlaceBlock blockPlace = (PCSPlaceBlock)msg;\n\t\t\tRaycastResult lastHit = blockPlace.hitResult;\n\t\t\tBlock block = blockPlace.placingBlock;\n\t\t\t\n\t\t\t// If the block can't be placed, don't place it\n\t\t\tif(!block.canPlaceBlock(\n\t\t\t\t\tinstance.world,\n\t\t\t\t\tlastHit.blockX + lastHit.face.getOffsetX(),\n\t\t\t\t\tlastHit.blockY + lastHit.face.getOffsetY(),\n\t\t\t\t\tlastHit.blockZ + lastHit.face.getOffsetZ()))\n\t\t\t\treturn;\n\t\t\t\n\t\t\tinstance.world.setBlock(\n\t\t\t\t\tlastHit.blockX + lastHit.face.getOffsetX(),\n\t\t\t\t\tlastHit.blockY + lastHit.face.getOffsetY(),\n\t\t\t\t\tlastHit.blockZ + lastHit.face.getOffsetZ(),\n\t\t\t\t\tblock);\n\t\t\tblock.onBlockPlaced(\n\t\t\t\t\tinstance.world,\n\t\t\t\t\tlastHit.blockX + lastHit.face.getOffsetX(),\n\t\t\t\t\tlastHit.blockY + lastHit.face.getOffsetY(),\n\t\t\t\t\tlastHit.blockZ + lastHit.face.getOffsetZ());\n\t\t\t\n\t\t\t// Broadcast to the other players\n\t\t\t// TODO: Correct for misplaces\n\t\t\tclientChannels.write(blockPlace);\n\t\t}\n\t\telse if (msg.getPacketID() == 6)\n\t\t{\n\t\t\t// Block break, handle that\n\t\t\tPCSBreakBlock blockBreak = (PCSBreakBlock)msg;\n\t\t\tRaycastResult lastHit = blockBreak.hitResult;\n\t\t\t\n\t\t\t// Break the block, with the appropriate block callbacks being called\n\t\t\tBlock block = instance.world.getBlock(lastHit.blockX, lastHit.blockY, lastHit.blockZ);\n\t\t\tblock.onBlockBroken(instance.world, lastHit.blockX, lastHit.blockY, lastHit.blockZ);\n\t\t\tinstance.world.setBlock(lastHit.blockX, lastHit.blockY, lastHit.blockZ, Blocks.AIR);\n\t\t\t\n\t\t\t// Broadcast to the other players\n\t\t\t// TODO: Correct for mis-breaks\n\t\t\tclientChannels.write(blockBreak);\n\t\t}\n\t\telse if (msg.getPacketID() == 7)\n\t\t{\n\t\t\t// Load the requested chunk column\n\t\t\tPCLoadChunkColumn loadRequest = (PCLoadChunkColumn)msg;\n\t\t\t// Get the channel id\n\t\t\tChannelId channelId = clientToChannelId.get(sourceClientID);\n\t\t\t\n\t\t\t// No id found means stale id\n\t\t\tif (channelId == null)\n\t\t\t\treturn;\n\t\t\t\n\t\t\tChannel clientChannel = clientChannels.find(channelId);\n\t\t\t\n\t\t\t// Null channel means stale id\n\t\t\tif (clientChannel == null)\n\t\t\t\treturn;\n\t\t\t\n\t\t\t// Send back the chunk column\n\t\t\tif (sendChunkColumnTo(loadRequest.columnX, loadRequest.columnZ, clientChannel))\n\t\t\t{\n\t\t\t\t// TODO: Queue up requests\n\t\t\t\tSystem.out.println(\"Fulfilled rq for \" + loadRequest.columnX + \", \" + loadRequest.columnZ + \" to Ply\" + sourceClientID);\n\t\t\t\t// Flush pending requests\n\t\t\t\tclientChannel.flush();\n\t\t\t}\n\t\t}\n\t}", "public synchronized void sendMove(String s, ServerPlayer player) {\n if (player == current) {\n \tcurrent = current.getOpponent();\n System.out.println(current.getColor().toString());\n current.otherPlayerMoved(s);\n }\n }", "private void sendNetMessage(Connect4MoveMessage message) {\n\t\tSystem.out.println(\"sending move over network\");\n\t\tSystem.out.println(\"sending row: \"+message.getRow());\n\t\tSystem.out.println(\"sending col: \"+message.getColumn());\n\t\tSystem.out.println(\"sending player: \"+message.getColor());\n\t\ttry {\n\t\t\toutput.writeObject(message);\n\t\t\toutput.flush();\n\t\t} catch (Exception x) {\n\t\t\tx.printStackTrace();\n\t\t}\n\t}", "public void sendRequest() {\r\n\t\t\r\n\t\tclient.join(this, isHost, gameCode, playerName, playerNumber);\r\n\t\t\r\n\t}", "public void sendMessage(NetMessage message) {\n ClientDirector.getDataManager().sendMessage(message);\n }", "public void serverSendMessageToAllUsers(String message) {\r\n \t\tServerCommand serverCommand = new MessageServerCommand(message, \"server\", null);\r\n \r\n \t\tthis.sendCommandToClient(this.clients.getClients(), serverCommand);\r\n \t}", "void sendMessage(String msg);", "@Override\n\tpublic void SendMessage(String message) {\n\t\t\n\t\ttry\n\t\t{\n\t\tprintWriters.get(clients.get(0)).println(message);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\n\t}", "public void tellEveryone(String message) \r\n\t{\r\n\t\tIterator it = Output_Streams_Client.iterator();\r\n\t\twhile (it.hasNext()) \r\n\t\t{\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tPrintWriter writer = (PrintWriter) it.next();\r\n\t\t\t\twriter.println(message);\r\n\t\t\t\tChat.append(\"Sending : \" + message + \"\\n\");\r\n\t\t\t\twriter.flush();\r\n\t\t\t\tChat.setCaretPosition(Chat.getDocument().getLength());\r\n\r\n\t\t\t} \r\n\t\t\tcatch (Exception ex) \r\n\t\t\t{\r\n\t\t\t\tChat.append(\"Mistake to tell everyone \\n\");\r\n\t\t\t}\r\n\t\t} \r\n\t}", "@Override\n\tprotected void handleMessageFromClient(Object arg0, ConnectionToClient arg1)\n\t{\n\t\t\n\t\t\n\t\tif (arg0 instanceof LoginData)\n\t\t{\n\t\t\tlog.append(\"Log In info from Client \" + arg1.getId() + \"\\n\");\n\n\t\t\tLoginData loginData = (LoginData)arg0;\n\n\t\t\tPlayer user = new Player(loginData.getUsername(), loginData.getPassword());\n\n\t\t\tdatabase.findUser(user);\n\n\t\t\t//If can't find user, send error msg to client\n\t\t\tif (!database.getFoundUser())\n\t\t\t{\n\t\t\t\tlog.append(\"Cannot find Client \" + arg1.getId() + \"\\n\");\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\targ1.sendToClient(\"Cannot find log in info. Check username/password or create an account.\");\n\t\t\t\t} catch (IOException e)\n\t\t\t\t{\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}\n\n\t\t\t//If user found\n\t\t\telse \n\t\t\t{\n\t\t\t\tlog.append(\"Log in for Client \" + arg1.getId() + \" successful\\n\");\n//\t\t\t\tif (logincount < 1)\n//\t\t\t\t{\n//\t\t\t\t\tlogincount++;\n//\t\t\t\t\ttry\n//\t\t\t\t\t{\n//\t\t\t\t\t\targ2 = arg1;\n//\t\t\t\t\t\targ1.wait();\n//\t\t\t\t\t} catch (InterruptedException e)\n//\t\t\t\t\t{\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}\n//\t\t\t\tthis.send\n//\t\t\t\tif (logincount == 2)\n//\t\t\t\t{\n//\t\t\t\t\tthis.notifyAll();\n\t\t\t\tlogincount++;\n\t\t\t\tif(logincount == 2) {\n\n\t\t\t\t\tGame game = new PacmanGame();\n\t\t\t\t\tthis.sendToAllClients(game);\n\t\t\t\t}\n\t\t\t\t\t\n\n//\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//If client sends create account info to server, check if username exists\n\t\telse if (arg0 instanceof CreateAccountData)\n\t\t{\n\t\t\tlog.append(\"Create Account info from Client \" + arg1.getId() + \"\\n\");\n\t\t\tCreateAccountData createData = (CreateAccountData)arg0;\n\n\t\t\tPlayer user = new Player(createData.getUsername(), createData.getPassword());\n\n\t\t\tlog.append(\"Create Account for Client \" + arg1.getId() + \" successful\\n\");\n\t\t\tuser.setID();\n\t\t\tdatabase.addUser(user);\n\n\t\t\t//If can't find username, send CreateAccountData instance to client\n\t\t\tif (!database.getFoundUser())\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\targ1.sendToClient(createData);\n\t\t\t\t} catch (IOException e)\n\t\t\t\t{\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}\n\n\t\t\t//If username found, send error msg to client\n\t\t\telse \n\t\t\t{\n\t\t\t\tlog.append(\"Username already existed\\n\");\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\targ1.sendToClient(\"Username already existed.\");\n\t\t\t\t} catch (IOException e)\n\t\t\t\t{\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}\n\t\t}\n\t}", "void sendMessage(Message m) throws IOException {\n String msg = m.toString();\n\n buffer = msg.getBytes(\"Windows-1256\");\n toServer = new DatagramPacket(buffer, buffer.length,\n InetAddress.getByName(sendGroup), port);\n if (m.getType() == Message.DATA) {\n manager.mManager.addMessage(m);\n }\n\n System.out.println(getName() + \"-->\" + m);\n serverSocket.send(toServer);\n }", "public void sendToWard(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "public void requestChat(String otherUsername) {\n System.out.println(\"Requesting chat with \" + otherUsername);\n toServer.println(\"newchat\" + \" \" + username + \" \" + otherUsername);\n toServer.flush();\n }", "static void sendMsg(String msg){\r\n for(ServerThread t: threads){\r\n t.sendMsgToClient(msg);\r\n }\r\n }", "private synchronized void sendToClient(PrintWriter pw, String message)\n {\n pw.write(message + \"\\n\");\n pw.flush();\n }", "private static Player getThroughWhomSendMessage() {\n\t\treturn Remain.getOnlinePlayers().isEmpty() ? null : Remain.getOnlinePlayers().iterator().next();\n\t}", "public void sendMessage(String msg, int client) throws Exception{\n \tlastMessageSent = new String(msg);\n \tif(client == Constants.ROBOT){\n \t\trobotHandler.sendMessage(msg);\n \t} else {\n \t\tHumanClientHandler.sendMessage(msg);\n \t}\n }", "void send(String message);", "private void sendGMToAll(String msg){\r\n for(ClientHandler ch: clientThreads){\r\n try{\r\n //Get the client's ObjectOutputStream\r\n ObjectOutputStream oos = ch.getOOS();\r\n //Print the message to the client\r\n oos.writeObject(new DataWrapper(0, msg, true));\r\n } catch(IOException ioe) {\r\n System.out.println(\"IOException occurred: \" + ioe.getMessage());\r\n ioe.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void processPacket(UUID playerUUID, PacketBase packet) {\n System.out.println();\n System.out.println(\"Processing packet @ \" + packet);\n System.out.println();\n if(packet instanceof ClientSendInputPacket) {\n Direction direction = ((ClientSendInputPacket) packet).getClientInputType().getDirection();\n Player movingPlayer = currentPlayers.get(playerUUID);\n movingPlayer.getPlayerEntity().move(movingPlayer.getPlayerEntity().getLocation().getOffsetDirectionLocation(direction), EntityMovementType.WALKING);\n }\n }", "@Override\r\n public void setupMove(double localTime) {\n if (mEntityMap.containsKey(mLocalCharId)) {\r\n Character localChar = (Character)mEntityMap.get(mLocalCharId);\r\n localChar.setController(Game.mCamera);\r\n ((Client)mEndPoint).sendUDP(localChar.getControl());\r\n\r\n ChatMessage chat = localChar.getChat();\r\n if (chat != null && chat.s != null) {\r\n System.err.println(\"Sending chat to server:\" + chat.s);\r\n ((Client)mEndPoint).sendTCP(chat);\r\n chat.s = null;\r\n }\r\n }\r\n\r\n // receive world state from server\r\n TransmitPair pair;\r\n for (;;) {\r\n pair = pollHard(localTime, 0);\r\n if (pair == null)\r\n break;\r\n\r\n if (pair.object instanceof StateMessage) {\r\n // Server updates client with state of all entities\r\n StateMessage state = (StateMessage) pair.object;\r\n applyEntityChanges(state.timestamp, state.data);\r\n\r\n // update clock correction based on packet timestamp, arrival time\r\n if (mClockCorrection == Double.MAX_VALUE) {\r\n mClockCorrection = state.timestamp - localTime;\r\n } else {\r\n mClockCorrection = Config.CORRECTION_WEIGHT * (state.timestamp - localTime)\r\n + (1 - Config.CORRECTION_WEIGHT) * mClockCorrection;\r\n }\r\n } else if (pair.object instanceof StartMessage) {\r\n // Server tells client which character the player controls\r\n mLocalCharId = ((StartMessage) pair.object).characterEntity;\r\n System.err.println(\"Client sees localid, \" + mLocalCharId);\r\n } else if (pair.object instanceof ChatMessage) {\r\n ChatMessage chat = (ChatMessage) pair.object;\r\n mChatDisplay.addChat(localTime, chat.s, Color.white);\r\n } else if (pair.object instanceof ChunkMessage) {\r\n ChunkMessage chunkMessage = (ChunkMessage) pair.object;\r\n ChunkModifier.client_putModified(chunkMessage);\r\n }\r\n }\r\n\r\n // move local char\r\n if (mEntityMap.containsKey(mLocalCharId)) {\r\n Character localChar = (Character)mEntityMap.get(mLocalCharId);\r\n localChar.setupMove(localTime);\r\n }\r\n }", "private void sendMessage(WeakReference<Messenger> client, int msgCode, int requestCode, String message){\n \tLog.v(TAG,\"sendMessage: The message was: \" + message + \" (\" + msgCode + \")\" + \" requestCode was \" + requestCode);\n try {\n \t\tclient.get().send(Message.obtain(null, msgCode, requestCode, mState.ordinal(), message));\n } catch (RemoteException e) {\n // The client is dead. \n \t\tLog.e(TAG,\"sendMessage: The client is dead. Message was: \" + message + \" (\" + msgCode + \")\");\n } catch (NullPointerException e) {\n // The reply to client is does not exist. \n \t\tLog.e(TAG,\"sendMessage: client was null. Message was: \" + message + \" (\" + msgCode + \")\");\n }\n }", "public void sendJoiningPlayer() {\r\n Player p = nui.getPlayerOne();\r\n XferJoinPlayer xfer = new XferJoinPlayer(p);\r\n nui.notifyJoinConnected();\r\n networkPlayer.sendOutput(xfer);\r\n }", "public synchronized void broadcast(String message, String username)\r\n {\r\n\r\n\r\n if (username == \"server\")\r\n {\r\n\r\n }\r\n //this was for private chat\r\n else\r\n {\r\n int k = 0;\r\n while (k < clientList.size())\r\n {\r\n if(clientList.get(k).username.equals(username))\r\n {\r\n try \r\n {\r\n OutputStream os = clientList.get(k).socket.getOutputStream();\r\n OutputStreamWriter osw = new OutputStreamWriter(os);\r\n BufferedWriter bw = new BufferedWriter(osw);\r\n bw.write(message);\r\n bw.flush();\r\n }\r\n catch(IOException e)\r\n {\r\n System.out.println(\"Error setting up private chat\");\r\n }\r\n }\r\n }\r\n }\r\n String messageLf = \" \" + message + \"\\n\";\r\n\r\n\r\n System.out.print(messageLf);\r\n for(int i = clientList.size(); --i >= 0;)\r\n {\r\n ClientProcess ct = clientList.get(i);\r\n\r\n if(!ct.writeMessage(messageLf))\r\n {\r\n clientList.remove(i);\r\n displayMessage(\"Disconnected Client \" + ct.username + \" removed from list.\");\r\n }\r\n }\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}", "@Override\n\tpublic void sendMessage(Message message) {\n\t\tterminal.println(\"Sending Message to: \" + message.getUserTo());\n\t\tDatagramPacket packet = null;\n\t\tString routerDestination = table.getRouterToSendTo(message.getUserTo());\n\t\tRouter routerToSendTo = null;\n\t\tfor(Router routerToSend: listOfRouters) {\n\t\t\tif(routerToSend.getName().equals(routerDestination)) {\n\t\t\t\trouterToSendTo = routerToSend;\n\t\t\t}\n\t\t}\n\n\t\tif(routerToSendTo == null) {\n\t\t\tterminal.println(\"User not found on network.\");\n\t\t}\telse {\n\t\t\t/*\n\t\t\t * need to change the message to include the router that needs to receive the message as well!!!!!!!!!!!!!!\n\t\t\t */\n\t\t\tInetSocketAddress dstAddress = new InetSocketAddress(DEFAULT_DST_NODE, routerToSendTo.getPort());\n\t\t\tpacket = message.toDatagramPacket();\n\t\t\tpacket.setSocketAddress(dstAddress);\n\t\t\ttry {\n\t\t\t\tsocket.send(packet);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private boolean sendMessage(Message m){\r\n\t\tAllocation alloc = client.getAllocation();\r\n\t\tEndPoint main = getBattlefieldFor(alloc.getMain());\r\n\t\ttry {\r\n\t\t\tIMessageReceivedHandler remoteReceiver = (IMessageReceivedHandler) main.connect();\r\n\t\t\tremoteReceiver.onMessageReceived(m);\r\n\t\t} catch (MalformedURLException | RemoteException | NotBoundException e) {\r\n\t\t\tEndPoint backup = getBattlefieldFor(alloc.getBackup());\r\n\t\t\tIMessageReceivedHandler remoteReceiver;\r\n\t\t\ttry {\r\n\t\t\t\tremoteReceiver = (IMessageReceivedHandler) backup.connect();\r\n\t\t\t\tremoteReceiver.onMessageReceived(m);\r\n\t\t\t} catch (MalformedURLException | RemoteException\r\n\t\t\t\t\t| NotBoundException e1) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "void sendMessage(String msg) {\n\t\ttry {\n\t\t\tout.writeObject(msg);\n\t\t\tout.flush();\n\t\t\tSystem.out.println(\"Sending to client => \" + msg);\n\t\t} catch (IOException ioException) {\n\t\t\tioException.printStackTrace();\n\t\t}\n\t}", "public void sendMessage(String message);", "public void sendMessage(ChatMessage msg) {\n try{\n loginOutput.writeObject(msg);\n }\n catch(IOException e){\n display(\"Exception on send message to server: \" + e);\n }\n }", "public void talk() throws IOException, InterruptedException{\n\t\ttoServer.println(\"PICKUP\");\n\t\ttoServer.println(\"HELLO\");\n\t\ttoServer.println(\"LOOK\");\n\t\twhile (!gameOver){\n\t\t\tThread.sleep(500);\n\t\t\ttoServer.println(queue.take());\n\t\t\ttoServer.println(\"LOOK\");\n\t\t}\n\t}", "protected void sendMessageToServer(MessageSecure m)\r\n\t{\r\n\t\tnew MessageSenderThread(m).start();\r\n\t}", "private void sendWinnerMessage(RaceTrackMessage playerDisconnectsMessage) {\n\t\tif(playerDisconnectsMessage != null)\n\t\t\ttry{\n\n\t\t\t\tint playerWhoWon = getPlayerWhoWonByPlayerID(((DisconnectMessage) playerDisconnectsMessage).getNextPlayerToMove()); \n\t\t\t\tint playerWhoWonID = getPlayerIDWhoWonByPlayerID(((DisconnectMessage) playerDisconnectsMessage).getNextPlayerToMove());\n\t\t\t\tif(playerWhoWon != -1){\n\t\t\t\t\tPoint2D lastVec = null;\n\t\t\t\t\tif(getPlayerMap().get(playerWhoWonID) != null)\n\t\t\t\t\t\tlastVec = getPlayerMap().get(playerWhoWonID).getCurrentPosition();\n\n\n\t\t\t\t\tPlayerWonMessage answer;\n\n\t\t\t\t\tanswer = VectorMessageServerHandler.generatePlayerWonMessage(playerWhoWon, playerWhoWon, lastVec);\n\n\t\t\t\t\tcloseGameByPlayerID(playerWhoWon);\n\n\t\t\t\t\tanswer.addClientID(playerWhoWonID);\n\n\t\t\t\t\tsendMessage(answer);\n\t\t\t\t\t\n\t\t\t\t\t//inform the AIs that game is over!!\n\n\t\t\t\t}\n\t\t\t}catch(ClassCastException e){\n\n\t\t\t}\n\t}" ]
[ "0.6869059", "0.67909783", "0.6742695", "0.6734871", "0.6631", "0.6561462", "0.6510273", "0.63245887", "0.62895924", "0.6242994", "0.6211907", "0.6203183", "0.6155999", "0.6114471", "0.6100207", "0.60958695", "0.6081346", "0.6078271", "0.60775733", "0.6062153", "0.60528094", "0.60409826", "0.60252774", "0.60157573", "0.6007203", "0.60039127", "0.5995755", "0.59927446", "0.5991781", "0.59821826", "0.59727955", "0.59713244", "0.5967518", "0.595777", "0.59486973", "0.5943306", "0.5936529", "0.593594", "0.5932172", "0.5924909", "0.59202754", "0.5911513", "0.5905837", "0.5905669", "0.5904619", "0.5900691", "0.5897834", "0.5896998", "0.5890886", "0.5881184", "0.58714736", "0.5860609", "0.5857899", "0.58565956", "0.58460766", "0.5844758", "0.584203", "0.5825423", "0.58228004", "0.5822614", "0.5820734", "0.5818581", "0.58185416", "0.58181053", "0.5814375", "0.58143324", "0.5808795", "0.58079964", "0.58022106", "0.57980454", "0.57974946", "0.5797136", "0.5791544", "0.57810116", "0.5780521", "0.57777125", "0.57674336", "0.5763274", "0.57549167", "0.57513833", "0.57500225", "0.57498497", "0.5749464", "0.57472324", "0.57444406", "0.57438403", "0.57400584", "0.57335675", "0.57219976", "0.5712893", "0.5712695", "0.570829", "0.5703147", "0.5702358", "0.5696634", "0.5692691", "0.5692217", "0.5690661", "0.5689374", "0.5688126", "0.56840044" ]
0.0
-1
Stores a pair of x and y integer values for quantities such as coordinates, sizes and distances on Board.
public interface Pair { /** * @return the x value from the pair */ public int getX(); /** * @return the y value from the pair */ public int getY(); /** * @param other the pair to add to this pair * @return a pair with the given pair's x and y values added onto this one's */ public Pair add(Pair other); /** * @param other the pair to subtract this pair * @return a pair with the given pair's x and y values subtracted from this one's */ public Pair subtract(Pair other); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void storeValues(int posx, int posy, int piece) {\n\t\tprevPosX = posx;\n\t\tprevPosY = posy;\n\t\tprevName = \"\" + prevPosX + \"\" + prevPosY;\n\t\tprevComp = (JLabel) curComp;\n\t\tprevPiece = piece;\n\t\tpiece = Logic.arr[posx][posy];\n\t}", "public Coordinates(int x, int y){\n this.x = x;\n this.y = y;\n }", "public void setCoordinates(int x, int y) {\n\t\t\n\t\txPosition = x;\t\t\t// Assigns the x integer\n\t\tyPosition = y;\t\t\t// Assigns the y integer\n\t}", "public void setCoordinates(final int x, final int y) {\n this.x = x;\n this.y = y;\n }", "public void setToCoordinates(int toX, int toY);", "public Coordinates(int x, int y)\r\n {\r\n xCoord = x;\r\n yCoord = y;\r\n }", "private String coords(int x, int y) {\n return String.format(\"%d,%d\", x, y);\n }", "public int[][] place(){\r\n\t\treturn coords(pos);\r\n\t}", "private SquareCoordinate(int x, int y)\n {\n \tthis.x = x;\n \tthis.y = y;\n }", "public void put(int x, int y, int value) {\r\n table[y - 1][x - 1] = value;\r\n }", "long getCoordinates();", "long getCoordinates();", "public void setPosition(double x, double y) {\r\n this.x = x;\r\n this.y = y;\r\n }", "void setPosition(double xPos, double yPos);", "public void setLoc(int x, int y) {\n locX = x;\n locY = y;\n }", "posXY(int x, int y){\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}", "public void setPosition(double x, double y)\n {\n mPosition = new Point2D.Double(x, y);\n }", "private Point getTileCoordinates(int x, int y)\n {\n int tileWidth = this.tileset.getTileWidth() + 1;\n int tileHeight = this.tileset.getTileHeight() + 1;\n int tileCount = this.tileset.getTileCount();\n int rows = tileCount / TILES_PER_ROW + \n (tileCount % TILES_PER_ROW > 0 ? 1 : 0);\n \n int tileX = Math.max(0, Math.min(x / tileWidth, TILES_PER_ROW - 1));\n int tileY = Math.max(0, Math.min(y / tileHeight, rows - 1));\n \n return new Point(tileX, tileY);\n }", "public XYValue(int x, int y) {\n this.x = x;\n this.y = y;\n }", "public int getXCoordinate ()\n {\n return xCoordinate;\n }", "public Coordinates(int x, int y) {\n\t\t\n\t\txPosition = x;\t\t\t// Assigns the x integer\n\t\tyPosition = y;\t\t\t// Assigns the y integer\n\t}", "void setLocation(int x, int y);", "public void setStreets(int numx, int numy);", "public void setPosition(double x, double y) {\n this.x = x;\n this.y = y;\n }", "public Position(int x, int y) {\n this.x = x;\n this.y = y;\n }", "public void set(int x, int y)\r\n\t{\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}", "void setXandY(double x, double y){\r\n\t\tthis.x=x;\r\n\t\tthis.y=y;\r\n\t}", "private void computeXY(int x, int y){\n\n for (int x1 = x-1; x1 <= x+1; x1++) {\n for (int y1 = y-1; y1 <= y+1; y1++) {\n switch ((int)generator.cellHashes.get(ccells.cell2Hash(x1,y1))){\n case 3:\n ncells.set(x1,y1,false);\n break;\n case 1:\n ncells.set(x1,y1,true);\n break;\n case 0:\n ncells.set(x1,y1,ccells.get(x1,y1));\n break;\n }\n }\n }\n }", "public PointItem(int x, int y) {\r\n\r\n\t\tthis.x = (int) x;\r\n\t\tthis.y = (int) y;\r\n\t\t\r\n\r\n\t}", "public void setCoord(short xPos , short yPos ){\n this.xPos = xPos;\n this.yPos = yPos;\n }", "public void setCoords(int x, int y) {\n\t\t setLayoutX(x);\n\t setLayoutY(y);\n\t}", "public void setX(int x){ xPosition = x; }", "public void setPosition(int x, int y) {\n this.coordX = x;\n this.coordY = y;\n }", "private void addSaveTile(int x, int y) {\n\t\ttry {\n\t\t\tthis.solver.addClause(new VecInt(new int[]{-tileToIntMapperB(x, y)}));\n\t\t\tthis.solver.addClause(new VecInt(new int[]{-tileToIntMapperS(x, y)}));\n\t\t\tthis.kb.add(new int[]{-tileToIntMapperB(x, y)});\n\t\t\tthis.kb.add(new int[]{-tileToIntMapperS(x, y)});\n\t\t} catch (ContradictionException e) {\n\t\t\tLog.error(\"Initialization of the KB failed\");\n\t\t}\n\t}", "public void setLocation(float x, float y);", "public void setLocation(int x,int y)\n\t{\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t}", "public int getX(){ return xPosition; }", "public void setPosition(int x, int y){\n\t\t\n\t\tif(x>=ColumnNumber.firstColumn.ordinal() && x<=ColumnNumber.eightColumn.ordinal()){\n\t\t\txPosition=x;\n\t\t}\n\t\tif(y>=RowNumber.firstRow.ordinal() && y<=RowNumber.eightRow.ordinal()){\n\t\t\tyPosition=y;\n\t\t}\n\t\t\n\t}", "public Point getTileCoordinates(int x, int y) {\n int tileWidth = this.board.getTileSet().getTileWidth() + 1;\n int tileHeight = this.board.getTileSet().getTileHeight() + 1;\n\n int tileX = Math.max(0, Math.min(x / tileWidth, this.board.getWidth() - 1));\n int tileY = Math.max(0, Math.min(y / tileHeight, this.board.getHeight() - 1));\n\n return new Point(tileX, tileY);\n }", "public void setXY(int x, int y)\n\t{\n\t\tthis.x = x;\t\t\t\t\t\t\t\t\t\t\t\t\t// Update point's x-coordinate \n\t\tthis.y = y;\t\t\t\t\t\t\t\t\t\t\t\t\t// Update point's y-coordinate \n\t}", "public void setPosition(float x, float y);", "public void setLocation(int x, int y) {\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}", "public void setPosition(int x, int y) {\n this.x = x;\n this.y = y;\n }", "public Position( int xCoordinate, int yCoordinate ) {\n xPosition = xCoordinate;\n yPosition = yCoordinate;\n }", "public void setLocXY(int x, int y) {\n locX = x;\n locY = y;\n }", "@Override\n public Position setPosition(double x, double y) {\n this.x = x;\n this.y = y;\n\n return new Position(x, y);\n }", "public Position(int x, int y) {\n this.x = x;\n this.y = y;\n }", "public Coordinate(int x, int y, int data){\r\n this.x = x;\r\n this.y = y;\r\n this.data = data;\r\n }", "public void setSijainti(int x, int y) {\n this.x = x;\n this.y = y;\n }", "void setPos(float x, float y);", "public void setCoordinates(int pos){\n if(this.pIndex<2){\n this.coordinates[0]=TILE_SIZE*15-DICE_SIZE-pos;}\n else{\n this.coordinates[0]=pos;}\n if(this.pIndex%3==0){\n this.coordinates[1]=pos;}\n else{\n this.coordinates[1]=TILE_SIZE*15-DICE_SIZE-pos;}\n }", "@Override\n public String toString()\n {\n return TAG + \"[x:\" + x + \",y:\" + y + \"]\";\n }", "public int getY() { return (int)y; }", "public Coordinate(int x,int y)\n {\n this.x = x;\n this.y = y;\n }", "default int gridToSlot(int x, int y) {\n return y * 9 + x;\n }", "public int[] getCoords() {\n return coords;\n }", "Coordinate(int Xposition, int Yposition) {\n\t\tthis.X = Xposition;\n\t\tthis.Y = Yposition;\n\n\t}", "private void intElementCoordinates() throws InvalidLevelCharacterException, NoGhostSpawnPointException, NoPacmanSpawnPointException, NoItemsException {\n\n\t\tint ps = 0;// player spawn point counter\n\t\tint gs = 0;// ghost spawn point counter\n\t\tint item = 0;// item counter\n\t\t\n\t\t\tfor (int i = 0; i < height; i++) {\n\t\t\t\tfor (int j = 0; j < width; j++) {\n\t\t\t\t\t// j*MAPDENSITY as x coordinate, i*MAPDENSITY as y\n\t\t\t\t\t// coordinate\n\t\t\t\t\tfloat[] xy = { j * MAPDENSITY, i * MAPDENSITY };\n\t\t\t\t\t// add coordinates in to right category\n\t\t\t\t\tif (mapElementStringArray[i][j].equals(\"X\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new Wall(new Vector2f(xy), getWallType(\n\t\t\t\t\t\t\t\ti, j));\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\" \")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new Dot(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tdots.add((Dot)mapElementArray[i][j]);\n\t\t\t\t\t\titem++;\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\"P\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new PlayerSpawnPoint(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tplayerSpawnPoints.add((PlayerSpawnPoint)mapElementArray[i][j]);\n\t\t\t\t\t\taPlayerSpawnPointRow=i;\n\t\t\t\t\t\taPlayerSpawnPointCol=j;\n\t\t\t\t\t\tps++;\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\"G\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new GhostSpawnPoint(new Vector2f(xy),getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tghostSpawnPoints.add((GhostSpawnPoint)mapElementArray[i][j]);\n\t\t\t\t\t\tgs++;\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\"B\"))\n\t\t\t\t\t\tmapElementArray[i][j] = new InvisibleWall(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\telse if (mapElementStringArray[i][j].equals(\"S\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new SpeedUp(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tspeedUps.add((SpeedUp)mapElementArray[i][j]);\n\t\t\t\t\t\titem++;\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\"T\")){\n\t\t\t\t\t\tmapElementArray[i][j] = new Teleporter(new Vector2f(xy),getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tteleporters.add((Teleporter)mapElementArray[i][j]);\n\t\t\t\t\t}\n\t\t\t\t\telse if (mapElementStringArray[i][j].equals(\"U\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new PowerUp(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tpowerUps.add((PowerUp)mapElementArray[i][j]);\n\t\t\t\t\t\titem++;\n\t\t\t\t\t} else\n\t\t\t\t\t\t// thrwo invalidLevelCharacterException\n\t\t\t\t\t\tthrow new InvalidLevelCharacterException(\n\t\t\t\t\t\t\t\tmapElementStringArray[i][j].charAt(0));\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t// check for PacmanSpawnPoint, GhostSpawnPoint and item exceptions\n\t\t\tif (gs == 0)\n\t\t\t\tthrow new NoGhostSpawnPointException();\n\t\t\tif (ps == 0)\n\t\t\t\tthrow new NoPacmanSpawnPointException();\n\t\t\tif (item == 0)\n\t\t\t\tthrow new NoItemsException();\n\t\t\n\t}", "@Override\r\n\tpublic void setCell(Integer x, Integer y, Integer value) {\n\t\tgame[x][y] = value;\r\n\t}", "public Position2D(double x, double y) {\n this.x = x;\n this.y = y;\n }", "public void editCoordinatesInArtifact(int x, int y, int id) {\n Artifact artifact = dataModel.getArtifact(id);\n Coordinates coordinates = dataModel.createCoords(x, y);\n dataModel.setCoordinatesToArtifact(coordinates, artifact);\n }", "public void setPosition(int x, int y) {\r\n\t\tmyX = x;\r\n\t\tmyY = y;\r\n\t}", "public double getXCoordinates() { return xCoordinates; }", "public Point(int x,int y){\r\n\t\tthis.pos = x;\r\n\t\tthis.id = y;\r\n\t}", "public zCoordinates(int x, int y){\n this.x = x;\n this.y = y;\n }", "public void setFromCoordinates(int fromX, int fromY);", "Point(int x_, int y_){\n x = x_;\n y = y_;\n }", "public void setX(int xPos){\t\t\n\t\tx = new Integer(xPos);\n\t}", "public int getXY(int x, int y);", "public GridPosition(int x, int y) {\n this.posX = x;\n this.posY = y;\n }", "public void setPosicion(double x, double y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "public void setPosition(int x, int y) {\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}", "public void setY(int y) { loc.y = y; }", "public int getY() { return loc.y; }", "public int getX()\r\n {\r\n return xCoord;\r\n }", "public void setCoords(int[] coords) {\n this.coords = coords;\n }", "public int getxCoordinate() {\n return xCoordinate;\n }", "public int getxCoordinate() {\n return xCoordinate;\n }", "public int getX() { return position.x; }", "public int getY() { return y; }", "public int getY() { return y; }", "public Point getLocation() {\r\n return new Point((int)x,(int)y);\r\n }", "public void setCoordinates(double[] pos) {\n \tthis.currentX = pos[0];\n \tthis.currentY = pos[1];\n }", "public int getY() { return y;}", "public int getY() { return y;}", "public void setStuff(int x, int y, int w, int h)\n {\n\t xPos = x;\n\t yPos = y;\n\t width = w;\n\t height = h;\n }", "public Point2D setPoint(int i, double x, double y);", "public int getY() {\r\n return ypos;\r\n }", "public int getYCoordinate ()\n {\n return yCoordinate;\n }", "public abstract int[] getCoords();", "public int getY(){ return yPosition; }", "public Vector2f getCoordinates() {\r\n return new Vector2f(tileColumn, tileRow);\r\n }", "public void setX (int index, int x) { coords[index][0] = x; }", "public int getX() { return loc.x; }", "public void setLocation(int X, int Y){\n \tlocation = new Point(X,Y);\n }", "public void set(double x, double y) {\n \n _x = x;\n _y = y;\n \n }", "int getX_coordinate(){\n return x_coordinate;\n }", "public Location(int x, int y)\n {\n this.x = x;\n this.y = y;\n }", "public int getLocation(int x, int y) {\n\t\treturn grid[x][y];\n\t}", "public void addLocation(int x, int y){\n locations[loc][0] = x;\n locations[loc][1] = y;\n loc++;\n }", "public int getYint(){\n return (int) y;\n }" ]
[ "0.6201974", "0.6036498", "0.60306984", "0.6002377", "0.5949957", "0.58880264", "0.5852175", "0.5805871", "0.57809186", "0.57526827", "0.57507056", "0.57507056", "0.57457525", "0.5742483", "0.5711121", "0.57064945", "0.5705684", "0.56927395", "0.5686061", "0.5671516", "0.5669697", "0.5667738", "0.56655335", "0.5641924", "0.5639897", "0.56373274", "0.56235045", "0.56215733", "0.5614411", "0.56051004", "0.56006515", "0.559187", "0.55915767", "0.558776", "0.5579173", "0.55787224", "0.55771136", "0.5573256", "0.5551588", "0.5551223", "0.5550262", "0.55421543", "0.5538999", "0.55384433", "0.55319756", "0.55282724", "0.55154246", "0.5509474", "0.5506781", "0.5504903", "0.55039686", "0.5502492", "0.55015606", "0.55014974", "0.54953265", "0.5488701", "0.54868376", "0.54793644", "0.5478174", "0.54722875", "0.5470733", "0.54655254", "0.54642636", "0.5461851", "0.54615116", "0.5451189", "0.54505837", "0.54494274", "0.54461414", "0.5444162", "0.543565", "0.5429621", "0.54269433", "0.5426556", "0.54217523", "0.5421479", "0.5420722", "0.5420722", "0.5419055", "0.5417554", "0.5417554", "0.5417524", "0.54136574", "0.5412935", "0.5412935", "0.5404748", "0.5401046", "0.54005", "0.53968436", "0.53956366", "0.53946686", "0.53923917", "0.5388653", "0.53847444", "0.53753036", "0.53639895", "0.53562903", "0.53543526", "0.53453106", "0.534228", "0.5333081" ]
0.0
-1
Return element from collection.
T get(int position);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <T> T getSingleElement(Collection<T> collection) {\n\t\tif (collection.size() != 1)\n\t\t\tthrow new IndexOutOfBoundsException(String.format(\n\t\t\t\t\t\"Expected collection to contain a single element, but observed %d elements: %s\", collection.size(),\n\t\t\t\t\tcollection.toString()));\n\t\treturn collection.iterator().next();\n\t}", "public E first() {\n if (isEmpty()) return null;\n return first.item;\n }", "@Override\n public Object getElement(int index){\n return gameCollection.elementAt(index);\n }", "public E element();", "public T first() throws EmptyCollectionException;", "public T first() throws EmptyCollectionException;", "public Object peek() {return collection.get(collection.size() - 1);}", "@Override\n public E element() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n return (E) array[0];\n }", "public T first() throws EmptyCollectionException{\n if (front == null){\n throw new EmptyCollectionException(\"list\");\n }\n return front.getElement();\n }", "Object element();", "Object element();", "public Object peek() {\n\t\tcheckIfStackIsEmpty();\n\t\tint indexOfLastElement = collection.size() - 1;\n\t\tObject lastElement = collection.get(indexOfLastElement);\n\t\t\n\t\treturn lastElement;\n\t}", "public E element() {\r\n\t\tif (isEmpty()) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t}\r\n\t\treturn (E) data.get(0);\r\n\t}", "public T getElement();", "Optional<X> elem();", "@Override\n\tpublic E get(int idx) {\n\t\tE element = null;\n\t\tif (idx < 0 || idx >= size)\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\telement = list[idx];\n\t\treturn element;\n\t}", "public <T> T getElement(String name) {\n return elements.get(name);\n }", "public E element() {\n if (size == 0){\n return null;\n }\n return (E)queue[0];\n }", "@Override\n\t@TimeComplexity(\"O(1)\")\n\tpublic E element()\n\t{\n\t\treturn element;\n\t}", "public E peek() {\n E item;\n try {\n item = element();\n } catch (NoSuchElementException e) {\n return null;\n }\n return item;\n }", "public E getFirst() {\r\n\t\t// element checks to see if the list is empty\r\n\t\treturn element();\r\n\t}", "private Item getItem(Collection<Item> c, Position p) {\n for (Item i : c) {\n if (i.position.equals(p))\n return i;\n }\n return null;\n }", "E get( int index );", "public E element () throws NoSuchElementException;", "public E get(int index) {\n return this.elements[index];\n }", "private E element() {\n if (startPos >= queue.length || queue[startPos] == null) throw new NoSuchElementException();\n return (E) queue[startPos];\n }", "Object getElementAt(int index);", "public Object element() {\n return queue.element();\n }", "public T getElement() {\n return element;\n }", "public T get() {\n return element;\n }", "public static <T> T getByClass(Collection<?> collection, Class<T> clazz) {\n for (Object elem : collection) {\n if (clazz.isInstance(elem)) return (T) elem;\n }\n return null;\n }", "public Object getObject(int pos) {\n return elements.get(pos);\n }", "public Object elementAt(int index);", "public Object firstElement();", "public E getElement(int index) {\t//O(1)\r\n\t\t//checks if the index is valid\r\n\t\tif (index>=0 && index<size)\r\n\t\t\treturn (E) list[index];\t//returns element at particular index\r\n\t\treturn null;\r\n\t}", "public E get(int i) {\n\n\t if (i < 0 && i > num_elements)\n\t return null;\n\t \n\t return(elements[i]);\n\t }", "private E getElement(int index) {\n if (index >= contents.size()) {\n return null;\n } else {\n return contents.get(index);\n }\n }", "public T getElement()\n {\n\n return element;\n }", "public E atIndex(int index) {\n\t\tif(index < numElements) {\n\t\t\treturn elements[index];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public Object getElement();", "public Object get(int index) {\r\n return entry(index).element;\r\n }", "public E get(int index) {\r\n return items.get(index);\r\n }", "public DomainElement elementForIndex(int index);", "public E get(int index) { \n return (E)list[index];\n }", "@Override\r\n\tpublic Object getElement(Object elementKey) {\n\t\treturn elements.get(elementKey);\r\n\t}", "@Override\n public int element() {\n isEmptyList();\n return first.value;\n }", "public T getElement() {\r\n\t\t\r\n\t\treturn element;\r\n\t\r\n\t}", "public O first()\r\n {\r\n if (isEmpty()) return null; \r\n return first.getObject();\r\n }", "@MethodContract(post = @Expression(\"result != null ? contains(result\"))\n public PropertyException getAnElement() {\n if (isEmpty()) {\n return null;\n }\n else {\n Iterator<Set<PropertyException>> iter1 = getElementExceptions().values().iterator();\n Set<PropertyException> s = iter1.next();\n Iterator<PropertyException> iter2 = s.iterator();\n return iter2.next();\n }\n }", "public E getElement() { return element; }", "public T find(T element);", "public T peek() throws EmptyCollectionException;", "public T peek() throws EmptyCollectionException;", "public T getElement() {\n\t\treturn element;\n\t}", "public E getFirst();", "public T first(int x)throws EmptyCollectionException, \n InvalidArgumentException;", "default V get() {\n V item = orElseNull();\n if ( item == null )\n throw new IllegalArgumentException(\"No item at the targeted position!\");\n return item;\n }", "public Object firstElement() {\n return _queue.firstElement();\n }", "public E first() {\n if (this.isEmpty()) return null;\r\n return this.head.getElement();\r\n }", "public Object getNext() { \t\n\t\t\tcurrIndex++;\t \n\t\t\treturn collection.elementAt(currIndex);\n\t\t}", "public E get(int index) {\n\t\tif (index < 0 || index >= size) {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\treturn elements[index];\n\t}", "Object getArrayElement(int index);", "Object getArrayElement(int index);", "public E get(int index)\r\n {\r\n checkValidIndex(index);\r\n return listIterator(index).next();\r\n }", "public Object get(int index) {\n\t\tif (index < 0 || index > (size - 1)) {\n\t\t\tthrow new IndexOutOfBoundsException(\n\t\t\t\t\t\"Cannot get the element with invalid index from the ArrayIndexedCollection.\");\n\t\t}\n\n\t\treturn elements[index];\n\t}", "public Object nextElement() {\n/* 75 */ return this.iterator.next();\n/* */ }", "public synchronized T get(){\n if (list.isEmpty()) return null;\n return list.remove(0);\n }", "public Item getFirst();", "T getElementFromIndex(int index) throws ListException;", "public T getRandomElement() {\n\t\treturn this.itemList.get(this.getRandomIndex());\n\t}", "E get(int i) throws IndexOutOfBoundsException;", "public RTWElementRef getAsElement(int i);", "public T item() throws IOException, NoSuchElementException;", "public E get(String key) {\r\n Integer index = keys.get(key);\r\n if (index == null || index >= items.size()) {\r\n return null;\r\n }\r\n return items.get(index);\r\n }", "public static IDescribable getFirst( Collection<? extends IDescribable> results )\r\n\t{\r\n\t if(( results == null ) || ( results.size() == 0 ))\r\n\t return null;\r\n\t return results.iterator().next();\r\n\t}", "public E first() {\n\r\n if (head == null) {\r\n return null;\r\n } else {\r\n return head.getItem();\r\n }\r\n\r\n }", "public Object getFirst()\n {\n if (first == null)\n {\n throw new NoSuchElementException();\n }\n else\n return first.getValue();\n }", "public Unit first()\n\t{\n\t\tif (size() == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn iterator().next();\n\t}", "public T getValue(){\n \treturn element;\n }", "public E element() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\t\treturn mHead.next.data;\n\t}", "public E first() \n throws NoSuchElementException {\n if (entries != null && \n size > 0 ) {\n position = 0;\n E element = entries[position]; \n position++;\n return element;\n } else {\n throw new NoSuchElementException();\n }\n }", "public T getElement(T equalElement) {\n\t\tIterator<T> iter = iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tT element = iter.next();\n\t\t\tif (element.equals(equalElement))\n\t\t\t\treturn element;\n\t\t}\n\t\treturn null;\n\t}", "public static <T> T getFirstNotNullValue(final Collection<T> collection) {\n\n if (isNotEmpty(collection)) {\n for (T element : collection) {\n if (element != null) {\n return element;\n }\n }\n }\n return null;\n }", "public Object getElement()\r\n\t\t{ return element; }", "@Override\n\tpublic Object peek() {\n\t\treturn list.getFirst();\n\t}", "@Override\n public E element() {\n if (size == 0){\n throw new NoSuchElementException();\n }\n return heap[0];\n }", "public E next() {\n int index = 0;\n\n // iterating over collections\n for (Collection<E> coll : collectionList) {\n // checking if current collection contains the desired element (i.e. itrCounter falls in coll)\n if (coll.size() <= itrCounter - index)\n // desired index doesn't lie in current collection -> skipping all elements\n index += coll.size();\n // current collection contains desired element\n else {\n // finding desired element; iterating over coll\n for (E element : coll){\n // desired index found -> increment itrCounter and return element\n if (index == itrCounter) {\n itrCounter++;\n return element;\n }\n // desired index not reached yet -> increment index\n else index++;\n }\n }\n }\n // could not find next element\n throw new NoSuchElementException();\n }", "public T getNext() {\n\n // Create a new item to return\n T nextElement = getInstance();\n\n // Check if there are any more items from the list\n if (cursor <= arrayLimit) {\n nextElement = collection.get(cursor);\n cursor++;\n } else {\n // There are no more items - set to null\n nextElement = null;\n }\n\n // Return the derived item (will be null if not found)\n return nextElement;\n }", "public E poll() {\n E item;\n try {\n item = remove();\n } catch (NoSuchElementException e) {\n return null;\n }\n return item;\n }", "public E peek() {\n if(head == null) {\n // The list is empty\n throw new NoSuchElementException();\n } else {\n return head.item;\n }\n }", "@SuppressWarnings(\"unchecked\")\n public E get(int index) {\n checkIndex(index);\n return (E) list[index];\n }", "public U getFirst(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls get\r\n\t \treturn get(0);\r\n\t }", "public E getCurrent()\n {\n if (size != 0)\n {\n return current.data();\n }\n else\n {\n throw new NoSuchElementException(\"The list is empty\");\n }\n }", "public synchronized WModelObject elementAt(int index)\n\t{\n\t\treturn (WModelObject)m_elements.elementAt(index);\n\t}", "public Object element() { return e; }", "public E queryFirst() {\n ValueHolder<E> result = ValueHolder.of(null);\n limit(1);\n doIterate(r -> {\n result.set(r);\n return false;\n });\n\n return result.get();\n }", "public E get(int i) {\n\t\tif (size == 0) {\n\t\t\tthrow new IllegalArgumentException(\"List is empty, cannot retrieve item.\");\n\t\t}\n\n\t\tif (i < 0 || i >= size) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Requested index is out of bounds.\");\n\t\t}\n\n\t\treturn list[i];\n\n\t}", "String first(String collection);", "Object get(int index);", "Object get(int index);", "public T peek() throws NoSuchElementException\n\t{\n\t\tcheckEmpty();\n\t\treturn list.get(0);\n\t}" ]
[ "0.68764234", "0.6730466", "0.67214155", "0.66213953", "0.66182524", "0.66182524", "0.6615811", "0.65920925", "0.65790457", "0.656255", "0.656255", "0.6532577", "0.6525858", "0.652442", "0.6506664", "0.6462901", "0.6462647", "0.6446148", "0.6408218", "0.63999313", "0.639782", "0.6383262", "0.63781506", "0.6364946", "0.63637125", "0.63518476", "0.6343411", "0.6321606", "0.6317761", "0.63128436", "0.6296082", "0.62873375", "0.62680155", "0.62677133", "0.6261752", "0.624538", "0.6226062", "0.622512", "0.62194675", "0.6211982", "0.6209047", "0.61981916", "0.61981905", "0.61924475", "0.61866605", "0.6175376", "0.6173585", "0.6161741", "0.61591923", "0.6152406", "0.6135307", "0.61240965", "0.61240965", "0.6110765", "0.60920435", "0.6091947", "0.60868096", "0.60809857", "0.6075659", "0.60668856", "0.6064414", "0.6057937", "0.6057937", "0.6055556", "0.6054792", "0.60538787", "0.6047789", "0.60416514", "0.60355186", "0.60150784", "0.60032713", "0.5999945", "0.5994536", "0.5974976", "0.59739566", "0.59733665", "0.59600484", "0.5955961", "0.5955517", "0.5937607", "0.59341884", "0.5934118", "0.5931346", "0.59254795", "0.59251446", "0.59242475", "0.59233", "0.5917854", "0.59124774", "0.59122753", "0.5910959", "0.59102017", "0.59090203", "0.59080553", "0.5905172", "0.5901803", "0.5888054", "0.5881542", "0.58742875", "0.58742875", "0.5868437" ]
0.0
-1
Add new element to collection.
boolean add(T value);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void add(Object element);", "public void add(E element) {\n\t\t// your code here\n\t}", "public boolean add(Object element);", "public @Override boolean add(E element) {\n \tappend(element);\n \treturn true;\n }", "@Override\r\n\tpublic void add(T element) {\n\t\tthis._list.add(element);\r\n\t}", "public void add(T element);", "public void add(T element);", "public void add (T element);", "public void add(Object obj) { \n\t\tcollection.addElement(obj);\n\t}", "@Override\n public void add(T element) {\n add(size(), element);\n }", "public void add(Object value) {\n verifyModifiable();\n\n elements.add(value);\n }", "public abstract void add(T element);", "public abstract void add(T element);", "void add(T element);", "void add(T element);", "void add(int index, Object element);", "public void addElement(Integer e){\n list.add(e);\n }", "public void add() {\n }", "public void add() {\n\t\t\n\t}", "public void addElement(Object obj);", "public void add(int index, E element);", "public void push(Object value) {\n this.collection.add(value);\n }", "public void add(int element);", "public static void add(Collection collection) {\n\t\t\n\t}", "@Override\n\tpublic void add() {\n\t\t\n\t}", "public void add(E item);", "private void add() {\n\n\t}", "public void add();", "public void addElement(Expression element){\n\t\telements.add(element);\n\t}", "void add(E item);", "void add(E item);", "void add(E item);", "public void add(Object e)\n {\n if(numElements == maxElements)\n doubleCapacity();\n \n // Add element\n if(!contains(e))\n elements[numElements++] = e;\n }", "public void add(E elem) {\n if (!list.contains(elem))\n list.insertLast(elem);\n }", "@Override\n public void add(Object o) {\n gameCollection.addElement(o);\n }", "public void add(T element) {\r\n if (element == null) {\r\n throw new IllegalArgumentException(); \r\n } \r\n if (size == elements.length) { \r\n resize(elements.length * 2); \r\n }\r\n elements[size()] = element; \r\n size++; \r\n }", "public void addElement(Replicated obj)\r\n\t{\n\t\tinsert(obj, seq.size());\r\n\t}", "@Override\n\tpublic boolean add(T element) {\n\t\titemProbs_.put(element, 1d);\n\t\telementArray_ = null;\n\t\tklSize_ = 0;\n\t\treturn true;\n\t}", "public void add() {\n\n }", "void add(int index, T element);", "void add(int index, T element);", "public void addElement(Integer elem){\n\t\tlist.add(elem);\n\t}", "public void add(E s) {\n expandCapacity();\n this.elements[this.size] = s;\n this.size += 1;\n }", "public abstract void add(String element) throws RemoteException;", "public void add(T element, int pos);", "public void push(E element) {\r\n items.add(0, element);\r\n }", "public void add(X elem);", "public void add(GuiElementBase element)\n\t\t{ insert(children.size(), element); }", "@Override\n public synchronized void add(E element) {\n if (this.pointer == this.capacity) {\n int newCapacity = this.capacity + (this.capacity >> 1);\n Object[] arr = Arrays.copyOf(this.container, newCapacity);\n this.capacity = newCapacity;\n this.container = arr;\n }\n this.container[this.pointer++] = element;\n }", "public void addExisting(SelectableGraphElement element)\n {\n elements.add(element);\n }", "@Override\n public boolean add(E e) {\n notNull(e);\n if (size >= elementData.length) {\n int newCapacity = (elementData.length << 1);\n elementData = Arrays.copyOf(elementData, newCapacity);\n }\n elementData[size++] = e;\n return true;\n }", "public abstract void add(T element, int index);", "public void push(Object element) {\r\n\t\tal.add(element, al.listSize);\r\n\t}", "public void add(E e) {\n\t\tentities.add(e);\n\t}", "@Override\n public boolean add(T e) {\n if (numElements == maxElements) {\n doubleCapacity();\n }\n\n // Add element\n elements[numElements++] = e;\n return true;\n }", "public boolean add(T element) {\n if (this.position >= this.container.length) {\n this.enlargeCapacity();\n }\n this.container[this.position++] = element;\n return true;\n }", "void append(E element);", "public void add(String element) {\n\t\tslist.add(element);\n\t}", "public ElementsBag add(HTMLElement element) {\n iterable.elements.push(element);\n return that();\n }", "public void addElement(final FeatureElement newElement)\n\t{\n\t\tfeatureElements.add(newElement);\n\t}", "public void add(E element){\n if(size==capacity){\n capacity *=2;\n E[] array2 = (E[]) new Object[capacity];\n if (size >= 0) System.arraycopy(array, 0, array2, 0, size);\n array2[size]=element;\n array=array2;\n }else{\n array[size]=element;\n }\n size++;\n }", "@Override\n public boolean add(T e) {\n if (elements.add(e)) {\n ordered.add(e);\n return true;\n } else {\n return false;\n }\n }", "public void insert(E element) {\n // TODO: YOUR CODE HERE\n if (contains(element)) {\n throw new IllegalArgumentException();\n } else {\n setElement(size() + 1, element);\n size += 1;\n bubbleUp(size());\n }\n }", "public void push(T element) {\n\t\t//add the new element\n\t\telements.add(element);\n\n\t}", "@Override\n\tpublic void add(Object o) {\n\t}", "public void add(String element){\n\t\tif(!contains(element)){\n\t\t\tlist.addLast(element);\n\t\t}\n\t}", "boolean add(T element);", "boolean add(T element);", "@Override\n public boolean add(final T element) {\n if (this.size > this.data.length - 1) {\n this.doubleArraySizeBy(2);\n }\n\n this.data[this.size++] = element;\n return true;\n }", "public boolean add(Element element) {\n if (addNoNotify(element)) {\n setChanged();\n Message message = Message.makeAdded(element);\n notifyObservers(message);\n return true;\n } else {\n return false;\n }\n\n }", "public void add(E element) {\n\n\t\tif (size == capacity) {\n\t\t\tgrowArray();\n\t\t}\n\n\t\tlist[size] = element;\n\t\tsize++;\n\t}", "void add(ByteString element);", "public void add(E element){\n\t\tArrayQueue<E> temp = new ArrayQueue<E>();\n\t\ttemp.enqueue(element);\n\t\tQ.enqueue(temp);\n\t}", "public void add(Object o);", "@Override\n\t\tpublic void add(int index, Community element) {\n\t\t\t\n\t\t}", "public void add(E entity);", "public void add(T element){\r\n if (element == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n \r\n // If array is full, double the size\r\n if (size == elements.length) {\r\n resize(elements.length * 2);\r\n }\r\n \r\n elements[size] = element;\r\n size++;\r\n }", "public boolean add(ElementType element){\n if(this.contains(element)){\n return false;\n }\n else{\n if(size==capacity){\n reallocate();\n }\n elements[size]=element;\n size++;\n }\n return true;\n }", "public void append(T element);", "public void append(T element);", "public void add(E element) {\n\t\tif (element == null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\n\t\tif (size < elements.length) {\n\t\t\telements[size] = element;\n\t\t\tsize++;\n\t\t} else {\n\t\t\t// grow array\n\t\t\tint currentSize = elements.length;\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tE[] temp = (E[]) new Object[currentSize * 2];\n\t\t\tfor (int i = 0; i < size(); i++) {\n\t\t\t\ttemp[i] = elements[i];\n\t\t\t}\n\t\t\telements = temp;\n\t\t\telements[size] = element;\n\t\t\tsize++;\n\t\t}\n\n\t}", "@Override\r\n\tpublic void add(Object object) {\n\t\t\r\n\t}", "public abstract void add(E e);", "@Override\n public void add(Integer element) {\n if (this.contains(element) != -1) {\n return;\n }\n // when already in use\n int index = this.getIndex(element);\n if(this.data[index] != null && this.data[index] != this.thumbstone){\n int i = index + 1;\n boolean foundFreePlace = false;\n while(!foundFreePlace && i != index){\n if(this.data[i] == null && this.data[i] == this.thumbstone){\n foundFreePlace = true;\n }else{\n if(i == this.data.length - 1){\n // start at beginning.\n i = 0;\n }else{\n i++;\n }\n }\n }\n if(foundFreePlace){\n this.data[i] = element;\n }else{\n throw new IllegalStateException(\"Data Structre Full\");\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic void push(Object element) {\n\t\tif(size == capacity) {\n\t\t\tthrow new IllegalArgumentException(\"Capacity has been reached.\");\n\t\t}\n\t\tlist.add(0, (E) element);\n\t\tsize++;\n\t\t\n\t}", "public void addElement(ThingNode element)\n\t{\n\t\tsuper.addElement(element);\n\t\telements.add(element);\n\t}", "@Override\n\tpublic boolean insert(E e) {\n\t\treturn add(e);\n\t}", "void addElement(String name, Element element) {\n if (elementMap.containsKey(name)) {\n elementMap.get(name).add(element);\n } else {\n List<Element> newList = new ArrayList<Element>();\n newList.add(element);\n elementMap.put(name, newList);\n }\n }", "public void add(E e) {\n resize();\n list[size] = e;\n size++;\n }", "public void add(Object value) {\n\n\t}", "public void newElement() {\r\n }", "public void push (E element);", "public void push(E element);", "public abstract boolean addDataTo(Element element);", "@Override\n <T> void add(T object);", "public void add(Object element) {\n queue.put( new DelayedElement( element ) );\n }", "public void add(T e){\n ensureCapacity(size + 1);\n data[size++] = e;\n }", "@Override\n\tpublic void add(T e) {\n\t\t\n\t}", "@Override\n\tpublic boolean add(E e) {\n\t\treturn false;\n\t}", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "public void add(E val){\n if(structure.size() < capacity){\n structure.addLast(val);\n }\n else{\n structure.removeFirst();\n structure.addLast(val);\n }\n }" ]
[ "0.75069565", "0.75035554", "0.74293923", "0.7295888", "0.72158325", "0.71672136", "0.71672136", "0.714006", "0.7109686", "0.7097551", "0.6990513", "0.69456446", "0.69456446", "0.6925442", "0.6925442", "0.6852147", "0.68351394", "0.6827585", "0.6787604", "0.67726624", "0.6768266", "0.67667294", "0.6742197", "0.67164433", "0.6703173", "0.66801983", "0.6671959", "0.66584396", "0.6623747", "0.66125697", "0.66125697", "0.66125697", "0.6609046", "0.65966785", "0.6588097", "0.6581561", "0.65699446", "0.6563518", "0.65560555", "0.65191466", "0.65191466", "0.65061665", "0.6497501", "0.6496634", "0.64901525", "0.6489993", "0.6485093", "0.64810455", "0.6479729", "0.6461163", "0.6459924", "0.64475554", "0.6434606", "0.64114594", "0.6410308", "0.63922465", "0.63886607", "0.63791394", "0.63713545", "0.6367818", "0.6366619", "0.6364362", "0.635845", "0.63464963", "0.6322412", "0.63096786", "0.6307071", "0.6307071", "0.62971735", "0.628744", "0.6275653", "0.62724906", "0.62682605", "0.6263936", "0.6256766", "0.6251012", "0.62389094", "0.62286955", "0.6225224", "0.6225224", "0.62176114", "0.6214716", "0.62009174", "0.6199428", "0.6190794", "0.6187006", "0.61776054", "0.6171655", "0.61679703", "0.61645", "0.6164419", "0.6159084", "0.6156637", "0.6151886", "0.6151429", "0.6142824", "0.6141608", "0.6127579", "0.61225533", "0.6117841", "0.61151737" ]
0.0
-1
Check that given object contains at the collection.
boolean contains(Object o);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean contains(Object o);", "public boolean contains(Object o);", "public boolean contains(T obj) {\r\n\t\tlogger.trace(\"Enter contains\");\r\n\t\tlogger.trace(\"Exit contains\");\r\n\t\treturn data.contains(obj);\r\n\t}", "@Override\r\n\tpublic boolean contains(Object o) {\n\t\treturn set.contains(o);\r\n\t}", "public boolean containsObject(T obj);", "public boolean containsObject(T obj);", "public boolean contains(E obj){\n\t\tif (obj == null)\n\t\t\tthrow new IllegalArgumentException(\"The given item is null.\");\n\t\tfor(E val : this) {\n\t\t\tif(val.equals(obj))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public abstract boolean contains(Object item);", "public boolean contains(Object elem);", "public boolean containsObject(AdvObject obj) {\n\t\treturn objects.contains(obj); // Replace with your code\n\t}", "boolean\tcontains(Object o);", "@Override\n\t\tpublic boolean contains(Object o) {\n\t\t\treturn false;\n\t\t}", "@Override\n\tpublic boolean contains(Object o) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean contains(Object o) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean contains(Object o) {\n\t\treturn false;\n\t}", "public boolean evaluate(T obj) {\n\t\treturn set.contains(obj);\n\t}", "public boolean contains(WModelObject object)\n\t{\n\t\treturn m_elements.contains(object);\n\t}", "@Ignore\r\n @Test\r\n public void testContainsCollection() {\r\n System.out.println(\"containsCollection\");\r\n NumberCollection nc = null;\r\n NumberCollection instance = new NumberCollection();\r\n boolean expResult = false;\r\n boolean result = instance.containsCollection(nc);\r\n assertEquals(expResult, result);\r\n \r\n }", "@Test\n public void testContains_Contain() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n instance.add(2);\n instance.add(3);\n\n boolean expResult = true;\n boolean result = instance.contains(1);\n assertEquals(expResult, result);\n }", "boolean contains(T o);", "@Test\n public void testContainsAll_Contains() {\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(4);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.containsAll(c);\n assertEquals(expResult, result);\n }", "public abstract boolean ContainsContactObjects();", "@Override\n public boolean contains(Object o) {\n return indexOf(o) >= 0;\n }", "@Override\n public boolean contains(Object o) {\n return indexOf(o) >= 0;\n }", "@Override\n public boolean contains(Object o) {\n for (int i = 0; i < currentSize; i++) {\n if (container[i] == o) {\n return true;\n }\n }\n return false;\n }", "@Override\n public boolean contains(T object) {\n for (int i = 0; i < this.size; i++) {\n if (array[i].equals(object)) {\n return true;\n }\n }\n return false;\n }", "@Override\n @SuppressWarnings(\"unchecked\")\n public boolean contains(Object o) {\n return search((E) o) != null;\n }", "public boolean contains ( Object o ){\n\n \tboolean doesContain = false;\n\n \tfor(int i = 0; i < list.size(); i++){\n\n if(list.get(i).equals(o)){\n doesContain = true;\n }\n\n }\n\n \treturn doesContain;\n\n }", "@Test\r\n public void testContains() {\r\n System.out.println(\"contains\");\r\n ModeloListaOrganizadores instance = new ModeloListaOrganizadores(e.getListaOrganizadores());\r\n Organizador o =new Organizador(new Utilizador(\"teste\", \"[email protected]\", \"teste\", \"teste\", true, 5));\r\n instance.addElement(o);\r\n boolean expResult = true;\r\n boolean result = instance.contains(o);\r\n assertEquals(expResult, result);\r\n \r\n }", "@Override\n\tpublic boolean contains(Object entity) {\n\t\treturn false;\n\t}", "public boolean contains( T obj )\n {\n if(nodes.containsKey(obj)){\n \treturn true;\n }\n return false;\n }", "@Override\n public final boolean contains(final Object o) {\n return Collections.exists(getComponents(),\n new Assertion<PriorityList<? extends _PriorityElement_>>() {\n public boolean isTrueFor(PriorityList<? extends _PriorityElement_> s) {\n return s.contains(o);\n }\n });\n }", "public abstract boolean contains(E e);", "@Override\n public boolean contains(Object o) {\n return contains(root, o);\n }", "public boolean contains(T instance);", "@Test\r\n public void testContains() {\r\n Grocery entry1 = new Grocery(\"Mayo\", \"Dressing / Mayo\", 1, 2.99f, 1);\r\n\r\n // Test element does not exist case\r\n assertFalse(instance.contains(entry1));\r\n\r\n instance.add(entry1);\r\n\r\n // Test element exists case\r\n assertTrue(instance.contains(entry1));\r\n }", "@Override\n public boolean contains(Object o) {\n if (indexOf(o) == -1) {\n return false;\n } else {\n return true;\n }\n }", "public boolean contains(E obj){\r\n //simple binary search to see if object is there\r\n //best case: O(1), ave case: O(logn), worst case: O(n)\r\n int lo = 0;\r\n int hi = currentSize - 1;\r\n\r\n while(lo <= hi) {\r\n int mid = (lo + hi) / 2;\r\n if(((Comparable<E>)queue[mid]).compareTo(obj) < 0)\r\n hi = mid - 1;\r\n else if(((Comparable<E>)queue[mid]).compareTo(obj) > 0)\r\n lo = mid + 1;\r\n else\r\n return true;\r\n }\r\n return false;\r\n }", "public synchronized boolean contains(\n Object oObject)\n {\n if (oObject == null || !this.m_GenericClass.isInstance(oObject))\n {\n return false;\n }\n\n // Assert: object != null && object instanceOf E\n E element = this.m_GenericClass.cast(oObject);\n\n return findNode(element).m_NodePointer != null;\n }", "public boolean contains(Object o) {\n for(int i = 0; i < size; i++) {\n if(list[i].equals(o)) return true;\n }\n return false;\n }", "@Override\n public boolean contains(Object object) {\n T value = (T) object;\n boolean result = false;\n for (int index = 0; index < this.values.length; index++) {\n T data = (T) this.values[index];\n if (data != null) {\n if (value.equals(data)) {\n result = true;\n }\n }\n }\n\n return result;\n }", "boolean hasContains();", "@Override\n\tpublic boolean contains(T obj) {\n\t\tif (cache.contains(obj))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "@Override\n\tpublic boolean contains(Object o) {\n\t\tNode tempRoot = root;\n\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tE e = (E) o;\n\t\treturn helper(e,tempRoot);\n\t}", "boolean containsAll(Collection<?> c);", "boolean contains();", "@Test\n public void testContains_Contain_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(3, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n boolean expResult = true;\n boolean result = instance.contains(4);\n assertEquals(expResult, result);\n }", "public boolean contains(Object o) {\r\n return indexOf(o) != -1;\r\n }", "public boolean contains(T obj) {\r\n return lastIndexOf(obj) != -1;\r\n }", "@Override\n public boolean contains(Object o) {\n return map.containsKey(o);\n }", "public boolean contains(Object o) {\n\n Object value = elements.get(o);\n return value != null;\n }", "@Test\r\n\tpublic void testContains() {\r\n\t\tAssert.assertTrue(list.contains(new Munitions(2, 3, \"iron\")));\r\n\t\tAssert.assertFalse(list.contains(new Munitions(2, 5, \"ferrum\")));\r\n\t}", "public boolean contains (T target);", "public boolean contains (T target);", "public boolean contains(E obj)\n {\n Node m = head;\n while( m.getNext() != null)\n {\n m = m.getNext();\n if(m.getValue().equals(obj))\n {\n return true; \n }\n }\n return false;\n }", "public boolean contains(T target);", "@Test\n public void testContains_Contain_Overflow_Boundary() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n boolean expResult = true;\n boolean result = instance.contains(6);\n assertEquals(expResult, result);\n }", "public boolean containsElement(int i, T obj);", "@Override\r\n public boolean contains(E target) {\r\n if(find(target) != null) return true;\r\n return false;\r\n }", "@Override\n\tpublic boolean contains(E e) {\n\t\treturn false;\n\t}", "boolean containsInstance(Instance instance);", "public boolean contains(Object arg0) {\n\t\treturn false;\n\t}", "@Override\n public boolean isOwningCollection(Item item, Collection c)\n {\n Collection collection = item.getOwningCollection();\n\n if (collection != null && c.getID() == collection.getID())\n {\n return true;\n }\n\n // not the owner\n return false;\n }", "Collection<? extends WrappedIndividual> getContains();", "public boolean contains(Object element) {\n\n\t\tif (element == null) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"ArrayList cannot contain a null element.\");\n\t\t}\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tObject object = this.storedObjects[i];\n\t\t\tif (object.equals(element)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Test\n public void testContainsAll_Not_Contain() {\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(4);\n\n Collection c = Arrays.asList(1, 2, 5);\n\n boolean expResult = false;\n boolean result = instance.containsAll(c);\n assertEquals(expResult, result);\n }", "public boolean contains(E value);", "Boolean contains(X x);", "public void verificaContem(Object obj, Set<?> set, String mensagem) {\n if (set.contains(obj)) {\n throw new IllegalArgumentException(this.msgGeral + mensagem);\n }\n }", "public boolean containsAll(Collection<?> arg0) {\n\t\treturn false;\n\t}", "public boolean contains(E element);", "public boolean contains (Object obj) {\n\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\tif (obj.equals (p.myItem)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean contains (Object obj) {\n\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\tif (obj.equals (p.myItem)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean contains (Object obj) {\n\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\tif (obj.equals (p.myItem)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean contains (Object obj) {\n\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\tif (obj.equals (p.myItem)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public boolean contains(T o) {\n if(o == null) return false;\n int hcode = hash(o);\n hcode %= array.length;\n\n if(array[hcode].empty()) return false;\n array[hcode].reset();\n while (!array[hcode].endpos()) {\n if (eqals(o, array[hcode].elem())) {\n return true;\n } else array[hcode].advance();\n }\n return false;\n }", "@Override\n public boolean containsAll(final Collection<?> collection) {\n this.checkCollectionNotNull(collection);\n final Iterator<?> iterator = collection.iterator();\n\n while (iterator.hasNext()) {\n if (!this.contains(iterator.next())) {\n return false;\n }\n }\n\n return true;\n }", "public boolean contains(Object value) {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean containsAll(Collection<?> c) {\n\t\treturn set.containsAll(c);\r\n\t}", "public boolean isMember(T o)\n {\n return (objectSet.search(o) != null);\n }", "public boolean contains(Object o) {\n\t\treturn map.containsKey(o);\n\t}", "public boolean contains(Object object){\n\t\tQueue queue = new Queue();\n\t\t\n\t\tqueue.enqueue(this);\n\t\t\n\t\twhile(!queue.isEmpty()){\n\t\t\tBinaryTree tree = (BinaryTree) queue.dequeue();\n\t\t\t\n\t\t\tif((object).equals(tree.getElement())){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\tif(!tree.isLeaf()){\n\t\t\t\tif(!tree.leftTree().isEmpty())\n\t\t\t\t\tqueue.enqueue(tree.left);\n\t\t\t\tif(!tree.rightTree().isEmpty())\n\t\t\t\t\tqueue.enqueue(tree.right);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean contains(Course c) {\n return courseList.contains(c); \n }", "public boolean containsAll(Collection coll) {\n\n return elements.keySet().containsAll(coll);\n }", "private boolean isIdInCollectionOfSingleIDVOs (int id, Collection vos)\n\t{\n\t\tboolean found = false;\n\t\t\n\t\tfor (Iterator i = vos.iterator(); !found && i.hasNext(); ) {\n\t\t\tSingleIdVO sivo = (SingleIdVO) i.next();\n\t\t\tfound = (sivo.getId() == id);\n\t\t}\n\t\t\n\t\treturn found;\n\t}", "@Test\n public void testContains_Not_Contain() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n instance.add(2);\n\n boolean expResult = false;\n boolean result = instance.contains(3);\n assertEquals(expResult, result);\n }", "protected boolean isValid() {\n return COLLECTION.getList().contains(this);\n }", "@Override\n public boolean contains(Object o) {\n return theMap.keySet().contains(o);\n }", "public static final boolean collectionContainsAny(\n Collection collection,\n Object[] array)\n {\n for (int i = 0, max = array.length; i < max; i++)\n {\n if (collection.contains(array[i]))\n return true;\n }\n return false;\n }", "@Test\n public void testContainsAll_Contains_Overflow() {\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(4);\n instance.add(5);\n instance.add(4);\n instance.add(7);\n\n Collection c = Arrays.asList(3, 4, 5, 7);\n\n boolean expResult = true;\n boolean result = instance.containsAll(c);\n assertEquals(expResult, result);\n }", "public boolean inside(final Point p)\n\t\t{\n\t\t\tif(obj.contains(p))\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}" ]
[ "0.7393392", "0.7393392", "0.7236778", "0.7181101", "0.7119776", "0.7119776", "0.70301104", "0.7025098", "0.70090854", "0.69639474", "0.69634116", "0.69285613", "0.68921983", "0.68921983", "0.68921983", "0.686308", "0.6815819", "0.67485464", "0.67199725", "0.66746116", "0.6661226", "0.6658476", "0.66434145", "0.66434145", "0.66400975", "0.6587399", "0.65867996", "0.65844536", "0.65591365", "0.65591085", "0.65531576", "0.65363705", "0.6519566", "0.6516545", "0.64976645", "0.6465136", "0.6458792", "0.6440589", "0.640244", "0.63920003", "0.6388138", "0.63860273", "0.6368852", "0.63576466", "0.63576466", "0.63576466", "0.63576466", "0.63576466", "0.63576466", "0.63576466", "0.6345147", "0.633749", "0.6336486", "0.6330577", "0.63228714", "0.63192284", "0.63088715", "0.6308276", "0.63071394", "0.63008827", "0.63008827", "0.6271185", "0.6254096", "0.62259376", "0.62226033", "0.6211957", "0.62085617", "0.6193436", "0.6173857", "0.61704993", "0.61687034", "0.6163451", "0.61534613", "0.6151702", "0.6151034", "0.61487794", "0.6140502", "0.6138552", "0.6135965", "0.6135342", "0.6135342", "0.6135342", "0.6126362", "0.61246514", "0.61231357", "0.6121975", "0.61052346", "0.6094206", "0.60760987", "0.6066537", "0.60657316", "0.60636556", "0.60484004", "0.6041162", "0.60345125", "0.6020124", "0.60174656", "0.60167587" ]
0.723054
5
Return size of collection.
int size();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int size() {\n return collection.size();\n }", "public int size() {\n\t\treturn collection.size();\n\t}", "public int size() {\n return this.collection.size();\n }", "public int getSize() {\n\t\treturn collection.size();\n\t\t\n\t}", "public int size() {\n maintain();\n return collection.size();\n }", "public int size() {return collection.size();}", "public int getLength() {\n return collection.size();\n }", "@Override\n public int size() {\n int totalSize = 0;\n // iterating over collectionList\n for (Collection<E> coll : collectionList)\n totalSize += coll.size();\n return totalSize;\n }", "@Override\n\tpublic int size() {\n\t\treturn util.iterator.IteratorUtilities.size(iterator());\n\t}", "public int getLength() {\r\n int length = 0;\r\n \r\n Iterator it = collection.iterator();\r\n \r\n while(it.hasNext()) {\r\n length += ((Chunk)it.next()).getSize();\r\n }\r\n \r\n return length;\r\n }", "public final int size() {\n int size = 0;\n final Iterator iterator = this.iterator();\n while (iterator.hasNext()) {\n size++;\n iterator.next();\n }\n return size;\n }", "public int size() {\n // DO NOT MODIFY THIS METHOD!\n return size;\n }", "public int size()\r\n\t{\r\n\t\treturn count;\r\n\t}", "public int size()\r\n {\r\n return count;\r\n }", "public int size() {\n return doSize();\n }", "@Override\r\n\tpublic int getCollectionCount() {\n\t\treturn data != null && data.list != null ? data.list.size() : 0;\r\n\t}", "public int size() {\n // DO NOT MODIFY!\n return size;\n }", "public int size() {\n\t\treturn count;\n\t}", "public int size() {\n\t\treturn count;\n\t}", "public int size() {\n\t\treturn count;\n\t}", "public int size() \r\n\t{\r\n\t\treturn getCounter();\r\n\t}", "public int size() {\n return count;\n }", "public int size() {\r\n if (NumItems > Integer.MAX_VALUE) {\r\n return Integer.MAX_VALUE;\r\n }\r\n return NumItems;\r\n }", "public int size()\n {\n return count;\n }", "public int size() {\n return numItems;\n }", "public final int size()\n {\n return m_count;\n }", "public int size()\r\n\t{\r\n\t\treturn numItems;\r\n\r\n\t}", "public synchronized int size() {\n return count;\n }", "public int size() {\n \tint currentSize = 0;\n \t\n \tIterator<E> iterateSet = this.iterator();\n \t\n \t// calculates number of elements in this set\n \twhile(iterateSet.hasNext()) {\n \t\titerateSet.next();\n \t\tcurrentSize++;\t\t\n \t}\n \t\n \treturn currentSize;\n \t\n }", "public long size();", "public int size()\r\n\t{\r\n\t\treturn this.size;\r\n\t}", "@Override\n\tpublic int size() {\n\n\t\treturn this.numOfItems;\n\t}", "public int size() {\n\n return size;\n }", "public int size() {\n return this.container.length;\n }", "public static int size() \r\n\t{\r\n\t\treturn m_count;\r\n }", "public int size()\r\n {\r\n return size;\r\n }", "public int size()\r\n {\r\n return size;\r\n }", "public int size()\r\n {\r\n return size;\r\n }", "public int size() {\n // TODO: Implement this method\n return size;\n }", "public int size() {\n return _size;\n }", "public int size() {\r\n return size;\r\n }", "@Override\r\n\tpublic int size() {\n\t\treturn count;\r\n\t}", "public int size()\n\t{\n\t\treturn size;\n\t}", "public int size()\n\t{\n\t\treturn size;\n\t}", "public int size()\n {\n return size;\n }", "public int size() {\r\n return size;\r\n }", "public int size() {\r\n return size;\r\n }", "public int size() {\r\n return size;\r\n }", "public int size() {\r\n return size;\r\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() { return count; }", "public int size() {\n return size;\r\n }", "@Override\n\tpublic int size() {\n\t\treturn numItems;// numItems represents size\n\t}", "public int size()\n {\n return size;\n }", "public int size()\n {\n return size;\n }" ]
[ "0.8805773", "0.8772008", "0.87578076", "0.8690244", "0.86485904", "0.8614789", "0.8573273", "0.83600175", "0.8014422", "0.7958934", "0.79570156", "0.78075486", "0.7795024", "0.7759983", "0.7757619", "0.77405304", "0.77277046", "0.77151114", "0.77151114", "0.77151114", "0.77045965", "0.7685534", "0.767722", "0.7674189", "0.76672125", "0.7661119", "0.76462305", "0.7638863", "0.76285416", "0.7628115", "0.76248115", "0.7616656", "0.7613314", "0.76128334", "0.76123774", "0.7611759", "0.7611759", "0.7611759", "0.7605958", "0.75811964", "0.7580834", "0.7579365", "0.75793386", "0.75793386", "0.7573452", "0.7569317", "0.7569317", "0.7569317", "0.7569317", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567728", "0.7567673", "0.75670344", "0.7564182", "0.7560583", "0.7560583" ]
0.0
-1
Your code here calculate the mask
public void gaussianSmooth(Img i, double sigma) { int half = (int) (sigma * Math.sqrt(6 * Math.log(10))); int size = 1 + 2 * half; System.out.printf("Size: %d\n", size); double[] mask = new double[size]; double mask_sum = 0; for (int k = 0; k <= half; k++) { double value = Math.exp(-k * k / (2 * sigma * sigma)) / (sigma * Math.sqrt(2 * Math.PI)); mask_sum += (k == 0) ? value : value * 2; mask[half + k] = value; mask[half - k] = value; } // normalize the mask for (int k = 0; k < size; k++) { mask[k] = mask[k] / mask_sum; } System.out.printf("Mask: %s\n", Arrays.toString(mask)); // 2D convolution using 1D mask in x double[] i_temp = new double[i.img.length]; for (int x = 0; x < i.img.length; x++) { i_temp[x] = (double) (i.img[x] & 0xFF); } for (int x = half; x < i.height - half; x++) { for (int y = half; y < i.width - half; y++) { i_temp[x * i.width + y] = 0; for (int s = -half; s <= half; s++) { i_temp[x * i.width + y] += (double) (i.img[(x + s) * i.width + y] & 0xFF) * mask[half - s]; } } } // 2D convolution using 1D mask in y for (int x = half; x < i.height - half; x++) { for (int y = half; y < i.width - half; y++) { double f = 0; for (int s = -half; s <= half; s++) { f += i_temp[x * i.width + y + s] * mask[half - s]; } i.img[x * i.width + y] = (byte) f; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Long getResultMaskBoundary();", "byte[] networkMask();", "IntExpression implicitMask(Expression p) {\n\t\treturn p.join(mask).sum();\n\t}", "private static synchronized int nextMask() {\n return (int) Math.pow(2, maskCount++);\n }", "private android.graphics.Bitmap getMaskBitmap() {\n /*\n r20 = this;\n r0 = r20;\n r1 = r0.f5066b;\n if (r1 == 0) goto L_0x0009;\n L_0x0006:\n r1 = r0.f5066b;\n return r1;\n L_0x0009:\n r1 = r0.f5069f;\n r2 = r20.getWidth();\n r1 = r1.m6537a(r2);\n r2 = r0.f5069f;\n r3 = r20.getHeight();\n r2 = r2.m6539b(r3);\n r3 = m6543a(r1, r2);\n r0.f5066b = r3;\n r4 = new android.graphics.Canvas;\n r3 = r0.f5066b;\n r4.<init>(r3);\n r3 = com.facebook.shimmer.ShimmerFrameLayout.C18663.f5049a;\n r5 = r0.f5069f;\n r5 = r5.f5059i;\n r5 = r5.ordinal();\n r3 = r3[r5];\n r5 = 4611686018427387904; // 0x4000000000000000 float:0.0 double:2.0;\n r7 = 2;\n if (r3 == r7) goto L_0x0074;\n L_0x003b:\n r3 = com.facebook.shimmer.ShimmerFrameLayout.C18663.f5050b;\n r8 = r0.f5069f;\n r8 = r8.f5051a;\n r8 = r8.ordinal();\n r3 = r3[r8];\n r8 = 0;\n switch(r3) {\n case 2: goto L_0x0055;\n case 3: goto L_0x0051;\n case 4: goto L_0x004f;\n default: goto L_0x004b;\n };\n L_0x004b:\n r9 = r1;\n r3 = 0;\n L_0x004d:\n r10 = 0;\n goto L_0x0058;\n L_0x004f:\n r3 = r2;\n goto L_0x0053;\n L_0x0051:\n r8 = r1;\n r3 = 0;\n L_0x0053:\n r9 = 0;\n goto L_0x004d;\n L_0x0055:\n r10 = r2;\n r3 = 0;\n r9 = 0;\n L_0x0058:\n r19 = new android.graphics.LinearGradient;\n r12 = (float) r8;\n r13 = (float) r3;\n r14 = (float) r9;\n r15 = (float) r10;\n r3 = r0.f5069f;\n r16 = r3.m6538a();\n r3 = r0.f5069f;\n r17 = r3.m6540b();\n r18 = android.graphics.Shader.TileMode.REPEAT;\n r11 = r19;\n r11.<init>(r12, r13, r14, r15, r16, r17, r18);\n r3 = r19;\n goto L_0x009c;\n L_0x0074:\n r3 = r1 / 2;\n r8 = r2 / 2;\n r16 = new android.graphics.RadialGradient;\n r10 = (float) r3;\n r11 = (float) r8;\n r3 = java.lang.Math.max(r1, r2);\n r8 = (double) r3;\n r12 = java.lang.Math.sqrt(r5);\n r8 = r8 / r12;\n r12 = (float) r8;\n r3 = r0.f5069f;\n r13 = r3.m6538a();\n r3 = r0.f5069f;\n r14 = r3.m6540b();\n r15 = android.graphics.Shader.TileMode.REPEAT;\n r9 = r16;\n r9.<init>(r10, r11, r12, r13, r14, r15);\n r3 = r16;\n L_0x009c:\n r8 = r0.f5069f;\n r8 = r8.f5052b;\n r9 = r1 / 2;\n r9 = (float) r9;\n r10 = r2 / 2;\n r10 = (float) r10;\n r4.rotate(r8, r9, r10);\n r9 = new android.graphics.Paint;\n r9.<init>();\n r9.setShader(r3);\n r5 = java.lang.Math.sqrt(r5);\n r3 = java.lang.Math.max(r1, r2);\n r10 = (double) r3;\n r5 = r5 * r10;\n r3 = (int) r5;\n r3 = r3 / r7;\n r5 = -r3;\n r6 = (float) r5;\n r1 = r1 + r3;\n r7 = (float) r1;\n r2 = r2 + r3;\n r8 = (float) r2;\n r5 = r6;\n r4.drawRect(r5, r6, r7, r8, r9);\n r1 = r0.f5066b;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.shimmer.ShimmerFrameLayout.getMaskBitmap():android.graphics.Bitmap\");\n }", "public long getMask() {\r\n\t\treturn this.mask;\r\n\t}", "public long getSourceMask()\r\n { return srcmask; }", "private long mask(int n) {\n\t\treturn 1L << n;\n\t}", "protected boolean[] getMask() {\n\t\treturn this.mask;\n\t}", "protected int getMaskValue(int i, int j, int band) {\r\n\t\treturn 1;\r\n\t}", "public ShortProcessor distanceMap(ImageProcessor mask) {\n\n\t\t// size of image\n\t\twidth = mask.getWidth();\n\t\theight = mask.getHeight();\n\t\t\n\t\t// update mask\n\t\tthis.maskProc = mask;\n\n\t\t// create new empty image, and fill it with black\n\t\tbuffer = new ShortProcessor(width, height);\n\t\tbuffer.setValue(0);\n\t\tbuffer.fill();\n\t\t\n\t\t// initialize empty image with either 0 (background) or Inf (foreground)\n\t\tfor (int i = 0; i < width; i++) {\n\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\t\tint val = mask.get(i, j) & 0x00ff;\n\t\t\t\tbuffer.set(i, j, val == 0 ? 0 : backgroundValue);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Two iterations are enough to compute distance map to boundary\n\t\tforwardIteration();\n\t\tbackwardIteration();\n\n\t\t// Normalize values by the first weight\n\t\tif (this.normalizeMap) {\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\t\t\tif (maskProc.getPixel(i, j) != 0) {\n\t\t\t\t\t\tbuffer.set(i, j, buffer.get(i, j) / weights[0]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Compute max value within the mask\n\t\tshort maxVal = 0;\n\t\tfor (int i = 0; i < width; i++)\n\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\t\tif (maskProc.getPixel(i, j) != 0)\n\t\t\t\t\tmaxVal = (short) Math.max(maxVal, buffer.get(i, j));\n\t\t\t}\n\n\t\t// calibrate min and max values of result imaeg processor\n\t\tbuffer.setMinAndMax(0, maxVal);\n\n\t\t// Forces the display to non-inverted LUT\n\t\tif (buffer.isInvertedLut())\n\t\t\tbuffer.invertLut();\n\t\t\n\t\treturn buffer;\n\t}", "public int getCoverMask()\r\n/* 192: */ {\r\n/* 193:150 */ return this.CoverSides;\r\n/* 194: */ }", "public void calculate() {\n float xoff = 0;\n for (int i = 0; i < cols; i++)\n { \n float yoff = 0;\n for (int j = 0; j < rows; j++)\n {\n z[i][j] = map(noise(xoff, yoff,zoff), 0, 1, -120, 120);\n yoff += 0.1f;\n }\n xoff += 0.1f;\n }\n zoff+=0.01f;\n }", "int[][] applyMask(\n int[][] mask, int[][] pixelV);", "MaskTree getProjectionMask();", "private void applyMask(int lin,int col){\n double pos1 = data[lin-1][col-1];\r\n double pos2 = data[lin][col-1]*2;\r\n double pos3 = data[lin+1][col+1];\r\n //POS 2 4 2\r\n double pos4 = data[lin-1][col]*2;\r\n double pos5 = data[lin][col]*4;\r\n double pos6 = data[lin+1][col]*2;\r\n //POS 1 2 1\r\n double pos7 = data[lin+1][col-1]*1;\r\n double pos8 = data[lin+1][col]*2;\r\n double pos9 = data[lin+1][col+1]*1;\r\n double resultMatriz = (pos1+pos2+pos3+pos4+pos5+pos6+pos7+pos8+pos9);\r\n data[lin][col]=data[lin][col]/resultMatriz;\r\n if(data[lin][col]> max)\r\n max = data[lin][col];\r\n if(data[lin][col]< min)\r\n min = data[lin][col];\r\n }", "void example8() {\n\n\t\t// setup some data\n\t\t\n\t\tIndexedDataSource<Float64Member> list = ArrayStorage.allocate(G.DBL.construct(), 9);\n\t\t\n\t\t// fill it with random values\n\t\t\n\t\tFill.compute(G.DBL, G.DBL.random(), list);\n\t\t\n\t\t// build a mask\n\t\t\n\t\tIndexedDataSource<BooleanMember> mask =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(\n\t\t\t\t\t\tG.BOOL.construct(), \n\t\t\t\t\t\tnew boolean[] {true, false, false, true, false, false, true, true, true});\n\t\t\n\t\t// make the filter\n\t\t\n\t\tIndexedDataSource<Float64Member> maskedData = new MaskedDataSource<>(list, mask);\n\t\t\n\t\t// do some computations\n\t\t\n\t\tmaskedData.size(); // equals 5\n\t\t\n\t\t// 3rd value in the masked data = the 7th value of the original list\n\t\t\n\t\tFloat64Member value = G.DBL.construct();\n\t\t\n\t\tmaskedData.get(3, value);\n\t\t\n\t\t// compute a value on data only where the mask is true in the original dataset\n\t\t\n\t\tMean.compute(G.DBL, maskedData, value);\n\t}", "static long getMask(int pos) {\n if(pos < W) {\n int mod = pos%W;\n if(H > 1 && W > 1 && mod == 0) {\n return CROSS >>> W-pos & ~(1L << W-1);\n } else if(H > 1 && W > 1 && mod == W-1) {\n return CROSS >>> W-pos & ~(1L << W);\n } else {\n return CROSS >>> W-pos;\n }\n } else {\n int mod = pos%W;\n if(H > 1 && W > 1 && mod == 0) {\n return CROSS << pos-W & ~(1L << W-1);\n } else if(H > 1 && W > 1 && mod == W-1) {\n return CROSS << pos-W & ~(1L << W);\n } else {\n return CROSS << pos-W;\n }\n }\n }", "public BitSet getMask() {\r\n return mask;\r\n }", "public int getTurnCode(){\n return mask;\n }", "static int modifiedCalcCircularRefElementOffset(long index, long mask) {\n/* 93 */ return (int)(index & mask) >> 1;\n/* */ }", "public static void make(int x, int y, int d1, int d2) {\n\t\tmask[x][y] = 5;\n int add1=1, add2=1;\t\n \n//\t\tint row = x, col = y;\n//\t\tint width = d1, height = d2;\n\t\t\n while(add1 <= d1) {\n \tmask[x+add1][y-add1] = 5;\n \tadd1++;\n }\n while(add2 <= d2) {\n \tmask[x+add2][y+add2] = 5;\n \tadd2++;\n }\n \n add1=1;\n add2=1;\n while(add2 <= d2) {\n \tmask[x+d1+add2][y-d1+add2] = 5;\n \tadd2++;\n }\n while(add1 <= d1) {\n \tmask[x+d2+add1][y+d2-add1] = 5;\n \tadd1++;\n }\n \n //경계선과 경계선의 안에 포함되어있는 5번 선거구이다.\n for(int i=1; i<=N; i++) {\n \tint left=1; \n \tint right = N;\n \twhile(left <=N && mask[i][left] != 5)\n \t\tleft++;\n \twhile(right >=1 && mask[i][right] !=5 ) \n \t\tright--;\n \tif(left != right && left-right != N+1) {//left가 오른쪽 끝에 왔으면 n+1, right가 왼쪽끝에왔으면 0\n \t\tfor(int j=left+1; j<right; j++) { // 따라서 양쪽끝에있다면 n+1 - 0 = n+1\n \t\t\tmask[i][j]=5;\n \t\t}\n \t}\n }\n\t}", "private int[] setMatrixConvo(int whatMask , int size) {\n int[] res = new int[size*size];\n\n // Prewitt\n if (whatMask == 3) {\n res[0] = -1;\n res[1] = -1;\n res[2] = -1;\n res[6] = 1;\n res[7] = 1;\n res[8] = 1;\n }\n\n // Gaussian\n else if (whatMask == 2) {\n int aoe = (size - 1)/2;\n for (int maskLine = 0; maskLine < size; maskLine++) {\n for (int n = 0; n < size; n++) {\n res[maskLine + size * n] = (int) gauss((Math.abs(aoe-maskLine)+Math.abs(aoe-n))/(size*size), size);\n }\n }\n }\n\n //Prewitt\n else if (whatMask == 0) {\n res[0] = -1;\n res[2] = 1;\n res[3] = -1;\n res[5] = 1;\n res[6] = -1;\n res[8] = 1;\n }\n\n //Blur by average\n else if (whatMask == 1) {\n for (int i = 0; i < size*size; i++){\n res[i] = 1;\n }\n }\n\n // Sharpening contours\n else if (whatMask == 4) {\n res[1] = -1;\n res[3] = -1;\n res[4] = 5;\n res[5] = -1;\n res[7] = -1;\n }\n return res;\n }", "IntExpression explicitMask(Expression p) {\n\t\treturn ones.shl(implicitMask(p));\n\t}", "void setResultMaskBoundary(Long resultMaskBoundary);", "public Function<Matcher, String> getApplyMaskFn() {\n return applyMaskFn;\n }", "long getCollideBits();", "private Mask$MaskMode() {\n void var2_-1;\n void var1_-1;\n }", "private void m6550c(Canvas canvas) {\n Bitmap maskBitmap = getMaskBitmap();\n if (maskBitmap != null) {\n canvas.clipRect(this.f5078o, this.f5079p, this.f5078o + maskBitmap.getWidth(), this.f5079p + maskBitmap.getHeight());\n super.dispatchDraw(canvas);\n canvas.drawBitmap(maskBitmap, (float) this.f5078o, (float) this.f5079p, this.f5068e);\n }\n }", "private void resetMask() {\n maskArray = new int [][]{\n {0,0,0,0},\n {0,0,0,0},\n {0,0,0,0},\n {0,0,0,0}\n };\n }", "public void updateOnMaskChange() {\n if(maskList != null) {\n int[] displayMaskData = resolveMasks();\n maskRaster.setDataElements(0, 0, imgWidth, imgHeight, displayMaskData);\n maskImage.setData(maskRaster);\n }\n }", "public int getPartsMask()\r\n/* 62: */ {\r\n/* 63: 52 */ return this.CoverSides | 0x20000000;\r\n/* 64: */ }", "public BufferedImage LoG(BufferedImage timg) {\n int width = timg.getWidth();\n int height = timg.getHeight();\n\n BufferedImage timg3 = GreayscaleImg(timg);\n\n int [][][] ImageArray1 = convertToArray(timg3);\n int [][][] ImageArray2 = convertToArray(timg);\n int [][][] ImageArray3 = convertToArray(timg);\n\n // Mask for convolution = [0 0 -1 0 0; 0 -1 -2 -1 0; -1 -2 16 -2 -1; 0 -1 -2 -1 0; 0 0 -1 0 0]\n int[][] mask = {\n {0, 0, -1, 0, 0},\n {0, -1, -2, -1, 0},\n {-1, -2, 16, -2, -1},\n {0, -1, -2, -1, 0},\n {0, 0, -1, 0, 0},\n };\n System.out.println();\n System.out.println(\"Laplacian of Gaussian mask of 5*5 array\");\n for (int i = 0; i < mask.length; ++i) {\n for (int j = 0; j < mask[i].length; ++j) {\n System.out.print(mask[i][j] + \" \");\n }\n System.out.println();\n }\n\n //for Mask of size 5x5\n for(int y=2; y<height-2; y++){\n for(int x=2; x<width-2; x++){\n // //r = 0; g = 0; b = 0;\n // // int r = ImageArray1[x][y][1]; //r\n // int g = ImageArray1[x][y][2]; //g\n // int b = ImageArray1[x][y][3]; //b\n\n int r = 0; int g = 0; int b = 0;\n for(int s=0; s<=4; s++){\n for(int t=0; t<=4; t++){\n r = r + mask[s][t]*ImageArray1[x-s+2][y-t+2][1];\n g = g + mask[s][t]*ImageArray1[x-s+2][y-t+2][2];\n b = b + mask[s][t]*ImageArray1[x-s+2][y-t+2][3];\n }\n }\n ImageArray2[x][y][1] = r; //r\n ImageArray2[x][y][2] = g; //g\n ImageArray2[x][y][3] = b; //b\n }\n }\n for(int y=1; y<height-1; y++){\n for(int x=1; x<width-1; x++){\n ImageArray3[x][y][1] = Math.max(ImageArray2[x][y][1],0);\n ImageArray3[x][y][2] = Math.max(ImageArray2[x][y][2],0);\n ImageArray3[x][y][3] = Math.max(ImageArray2[x][y][3],0);\n }\n }\n return convertToBimage(ImageArray3);\n }", "public int getAnalysisBits();", "int[][]\n getVerticalMask();", "public int [] getResultArr() {\n return maskResultArray;\n }", "private int mediePixeli(int pixel1, int pixel2) {\n\t return (int) (((((pixel1) ^ (pixel2)) & 0xfffefefeL) >> 1) + ((pixel1) & (pixel2)));\n\t }", "private int moda(Raster subImage, FiltroMascara mask, int centralX, int centralY, int k) {\r\n\t\tint[] valores = new int[mask.getMask().length * mask.getMask()[0].length];\r\n\t\tint horizontalDistance = mask.getHorizontalDistance();\r\n\t\tint verticalDistance = mask.getVerticalDistance();\r\n\t\tint valoresIndex = 0;\r\n\t\tfor(int i=-horizontalDistance; i<= horizontalDistance; i++) {\r\n\t\t\tfor(int j=-verticalDistance; j<=verticalDistance; j++) {\r\n\t\t\t\tvalores[valoresIndex++] = subImage.getPixel((centralX-i),(centralY-j),new int[]{0,0,0})[k];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Arrays.sort(valores);\r\n\t\treturn maiorOcorrencia(valores);\r\n\t}", "private long bottom_mask(int col) {\r\n return (long)1 << col*(height+1);\r\n }", "public static Mat createMask(Mat inputMat) {\n Mat mask = new Mat();\n // Green colour range.\n // Hue, sat, lum\n final Scalar lowerb = new Scalar (30, 91, 56);\n final Scalar upperb = new Scalar (68, 255, 198);\n Mat imgHSV = new Mat();\n cvtColor(inputMat, imgHSV, COLOR_BGR2HSV);\n Core.inRange(imgHSV, lowerb, upperb, mask);\n erode(mask, mask, getStructuringElement(MORPH_ELLIPSE, new Size(5, 5)));\n dilate(mask, mask, getStructuringElement(MORPH_ELLIPSE, new Size(5, 5)));\n dilate(mask, mask, getStructuringElement(MORPH_ELLIPSE, new Size(5, 5)));\n erode(mask, mask, getStructuringElement(MORPH_ELLIPSE, new Size(5, 5)));\n return mask;\n }", "public static long getElanMaskForReg() {\n return METADATA_MASK_SERVICE.toJava().shiftRight(24).longValue();\n }", "public void spriteClipping(int var1, int var2, int var3, int var4, int var5) {\n try {\n int var6 = this.field_736[var5];\n int var7 = this.field_737[var5];\n int var8 = 0;\n int var9 = 0;\n int var10 = (var6 << 16) / var3;\n int var11 = (var7 << 16) / var4;\n int var12;\n int var13;\n if(this.field_742[var5]) {\n var12 = this.spriteWidthFull[var5];\n var13 = this.field_741[var5];\n var10 = (var12 << 16) / var3;\n var11 = (var13 << 16) / var4;\n var1 += (this.field_738[var5] * var3 + var12 - 1) / var12;\n var2 += (this.field_739[var5] * var4 + var13 - 1) / var13;\n if(this.field_738[var5] * var3 % var12 != 0) {\n var8 = (var12 - this.field_738[var5] * var3 % var12 << 16) / var3;\n }\n\n if(this.field_739[var5] * var4 % var13 != 0) {\n var9 = (var13 - this.field_739[var5] * var4 % var13 << 16) / var4;\n }\n\n var3 = var3 * (this.field_736[var5] - (var8 >> 16)) / var12;\n var4 = var4 * (this.field_737[var5] - (var9 >> 16)) / var13;\n }\n\n var12 = var1 + var2 * this.field_723;\n var13 = this.field_723 - var3;\n int var14;\n if(var2 < this.field_743) {\n var14 = this.field_743 - var2;\n var4 -= var14;\n var2 = 0;\n var12 += var14 * this.field_723;\n var9 += var11 * var14;\n }\n\n if(var2 + var4 >= this.field_744) {\n var4 -= var2 + var4 - this.field_744 + 1;\n }\n\n if(var1 < this.field_745) {\n var14 = this.field_745 - var1;\n var3 -= var14;\n var1 = 0;\n var12 += var14;\n var8 += var10 * var14;\n var13 += var14;\n }\n\n if(var1 + var3 >= this.field_746) {\n var14 = var1 + var3 - this.field_746 + 1;\n var3 -= var14;\n var13 += var14;\n }\n\n byte var16 = 1;\n if(this.interlace) {\n var16 = 2;\n var13 += this.field_723;\n var11 += var11;\n if((var2 & 1) != 0) {\n var12 += this.field_723;\n --var4;\n }\n }\n\n this.method_249(this.pixels, this.spritePixels[var5], 0, var8, var9, var12, var13, var3, var4, var10, var11, var6, var16);\n } catch (Exception var15) {\n System.out.println(\"error in sprite clipping routine\"); // authentic System.out.println\n }\n }", "private int Maj(int x, int y, int z) {\n return (x & y) ^ (x & z) ^ (y & z);\n }", "public short[] findSeed(ImageProcessor input) {\n int bx = 0, by = 0;\n if (bounds != null) {\n bounds = checkBounds(bounds);\n input.setRoi(bounds);\n bx = bounds.x;\n by = bounds.y;\n }\n ImageProcessor mask = input.crop();\n mask.invert();\n EDM edm = new EDM();\n edm.toEDM(mask);\n int[] max = Utils.findImageMaxima(mask);\n// IJ.saveAs((new ImagePlus(\"\", mask)), \"PNG\", \"C:/users/barryd/adapt_debug/edm.png\");\n if (!(max[0] < 0.0 || max[1] < 0.0)) {\n return new short[]{(short) (max[0] + bx), (short) (max[1] + by)};\n } else {\n return null;\n }\n }", "public void negative(BufferedImage img, int startX, int startY, int endX, int endY) throws IOException{\r\n int pixels[] = new int[3];\r\n double ww[]=new double[3];\r\n WritableRaster raster = img.getRaster();\r\n \r\n for(int i=startX;i<endX;i++) {\r\n for(int j=startY;j<endY;j++){\r\n \r\n \r\n raster.getPixel(i, j, pixels);\r\n \r\n ww[0] = 255-pixels[0];\r\n ww[1] = 255-pixels[1];\r\n ww[2] = 255-pixels[2];\r\n \r\n raster.setPixel(i, j, ww);\r\n \r\n }\r\n \r\n }\r\n\r\n \r\n\r\n }", "@Override public Bitmap transform(Bitmap source) {\n int width = source.getWidth(); //Width of source\n int height = source.getHeight(); //Height of source\n\n Bitmap result = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n\n Drawable mask = getMaskDrawable(mContext, mMaskId); //Init mask from resources\n\n //Using mask\n Canvas canvas = new Canvas(result);\n mask.setBounds(0, 0, width, height);\n mask.draw(canvas);\n canvas.drawBitmap(source, 0, 0, mMaskingPaint);\n\n source.recycle();\n\n //Return bitmap of cropped image\n return result;\n }", "@SuppressLint(\"WrongCall\")\n private void drawMask() {\n clear(mMaskCanvas);\n draw(mMaskCanvas, mPaintTransparent);\n }", "public static int getMaskFor(final Target target, final ElementType...minus) {\n \tint m = 0;\n \tfor(ElementType et: target.value()) {\n \t\tm = m | ElementTypeMapping.valueOf(et.name()).mask;\n \t}\n \tfor(ElementType et: minus) {\n \t\tm = m & ~ElementTypeMapping.valueOf(et.name()).mask; \n \t}\n \treturn m;\n }", "public int getSolidPartsMask()\r\n/* 67: */ {\r\n/* 68: 56 */ return this.CoverSides | 0x20000000;\r\n/* 69: */ }", "public BitSet getBitSetMask() {\r\n return newMask;\r\n }", "public Boolean maskText();", "private static int getMaskAsInt(int nrBits) {\n return 0xFFFFFFFF >>> (32 - nrBits);\n }", "@Override\n\t\t\t public void getData(final int length) throws Exception {\n\t\t\t if (self.state.masked) {\n\t\t\t /*self.expectHeader(4, function(data) {\n\t\t\t var mask = data;\n\t\t\t self.expectData(length, function(data) {\n\t\t\t opcodes['1'].finish.call(self, mask, data);\n\t\t\t });\n\t\t\t });*/\n\t\t\t \t self.expectHeader(4, new PacketHandler(){\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onPacket(ByteBuffer data) throws Exception {\n final byte[] mask = new byte[4]; ///data.array();\n mask[0] = data.get(0);\n mask[1] = data.get(1);\n mask[2] = data.get(2);\n mask[3] = data.get(3);\n \n Log.d(TAG, \"mask: \"+mask[0]+\" \"+mask[1]+\" \"+mask[2]+\" \"+mask[3]);\n\n self.expectData(length, new PacketHandler(){\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onPacket(ByteBuffer data2) throws Exception {\n finish(mask, data2);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n \t\n });\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\t else {\n\t\t\t /*self.expectData(length, function(data) {\n\t\t\t opcodes['1'].finish.call(self, null, data);\n\t\t\t });*/\n self.expectData(length, new PacketHandler(){\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onPacket(ByteBuffer data) throws Exception {\n finish(null, data);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n \t \n });\n\t\t\t }\n\t\t\t }", "private static int mask(int bit) {\n return MSB >>> bit;\n }", "private int mcHelper(int[][] arr, int[][] g, int i, int j) {\n int mcsum = 0;\n for (int k = 0; k < 4; k++) {\n int a = g[i][k] ^ 0x42;\n int b = arr[k][j];\n mcsum ^= mcCalc(a, b);\n }\n return mcsum;\n }", "MaskTree getMetadataProjectionMask();", "public void convolution (Bitmap bmp, int whatMask, int area) {\n int outh = bmp.getHeight();\n int outw = bmp.getWidth();\n int[] pixels = new int [outw*outh];\n int[] pixelsf = new int [outw*outh];\n bmp.getPixels(pixels, 0, outw, 0, 0, outw, outh);\n bmp.getPixels(pixelsf, 0, outw, 0, 0, outw, outh);\n int matrixWidth = 2 * area + 1;\n int[] matrixConvo = setMatrixConvo(whatMask, matrixWidth);\n int matrixLen = matrixConvo.length;\n int[] matrixConvoContour = new int[matrixLen]; // Contouring\n if (whatMask == 3) {\n matrixConvoContour = setMatrixConvo(0, matrixWidth);\n toGray(bmp);\n }\n int[] currentPixel = new int [matrixLen];\n for (int numLine = area; numLine < outw - area; numLine++) {\n for (int numColumn = area; numColumn < outh - area; numColumn++) {\n float param1 = 0;\n float param2 = 0;\n float param3 = 0;\n int weight = 0;\n\n // Isolating the area we are going to work on\n for (int maskLine = 0; maskLine < matrixWidth; maskLine++) {\n for (int maskColumn = 0; maskColumn < matrixWidth; maskColumn++) {\n currentPixel[matrixWidth * maskLine + maskColumn] = pixels[numLine - area + maskColumn + (numColumn + maskLine - area) * outw];\n }\n }\n\n // Case: Contouring\n if (whatMask == 3) {\n for (int n = 0; n < 9; n++) {\n param1 += Color.red(currentPixel[n]) * matrixConvo[n];\n param2 += Color.red(currentPixel[n]) * matrixConvoContour[n];\n }\n int norm = (int) Math.min(Math.sqrt(param1 * param1 + param2 * param2), 255);\n pixelsf[numLine + numColumn * outw] = Color.rgb(norm, norm, norm);\n }\n\n // Other whatMask\n else {\n for (int n = 0; n < matrixLen; n++) {\n param1 += Color.red(currentPixel[n]) * matrixConvo[n];\n param2 += Color.green(currentPixel[n]) * matrixConvo[n];\n param3 += Color.blue(currentPixel[n]) * matrixConvo[n];\n weight += matrixConvo[n];\n }\n pixelsf[numLine + numColumn * outw] = Color.rgb((int) param1/weight, (int) param2/weight, (int) param3/weight);\n }\n\n }\n }\n bmp.setPixels(pixelsf, 0, outw, 0, 0, outw, outh);\n }", "public static ImagePlus[] normalizeBeforeComputation(ImagePlus []imgsEchoes,ImagePlus imgMask) {\n\t\tImagePlus []tabRet=VitimageUtils.imageTabCopy(imgsEchoes);\n\t\tImagePlus imgSum=VitimageUtils.sumOfImages(imgsEchoes);\n\t\timgSum=VitimageUtils.makeOperationBetweenTwoImages(imgSum, imgMask, 2, true);\n\t\tint Z=imgSum.getNSlices();\n\t\tint X=VitimageUtils.getDimensions(imgSum)[0];\n\t\tint Y=VitimageUtils.getDimensions(imgSum)[1];\n\t\tint[][]coords=new int[Z][3];\n\t\tdouble[]meanOverAll=new double[Z];\n\t\tdouble[]meanOverCap=new double[Z];\n\t\tdouble[]meanOverRest=new double[Z];\n\t\tdouble globalMeanOverCap;\n\t\tdouble globalMeanOverRest;\n\t\tint radiusAroundCapillary=(int)Math.round(VitimageUtils.bionanoCapillaryRadius*1.5/VitimageUtils.getVoxelSizes(imgSum)[0]);\n\t\t//Pour chaque Z\n\t\tfor(int z=0;z<Z;z++) {\n\t\t\tImagePlus sliceTemp=new Duplicator().run(imgSum,1,1,z+1,z+1,1,1);\n\t\t\t//Pour cette image, localiser le capillaire, sur chaque Z\n\t\t\tcoords[z]=VitimageUtils.findCapillaryCenterInSlice(sliceTemp, VitimageUtils.bionanoCapillaryRadius);\n\t\t\tif(coords[z][0]<radiusAroundCapillary+5 || coords[z][1]<radiusAroundCapillary+5 || coords[z][0]>(X-radiusAroundCapillary-5) || coords[z][0]>(Y-radiusAroundCapillary-5) ) {\n\t\t\t\tIJ.showMessage(\"Warning in normalizeBeforeComputation : unsteady mean computation at z=\"+z+\" because capillary is detected near the border, at coordinates \"+coords[z][0]+\" , \"+coords[z][1]+\" with an indicated security radius of \"+radiusAroundCapillary);\n\t\t\t}\n\t\t\t\n\t\t\t//Mesurer la moyenne autour du capillaire\n\t\t\tmeanOverCap[z]=VitimageUtils.meanValueofImageAround(sliceTemp, coords[z][0], coords[z][1], 0,radiusAroundCapillary);\n\t\t\t\n\t\t\t\n\t\t\t//Mesurer la moyenne de l'image\n\t\t\tint radiusImg=Math.min(X/2,Y/2)-2;\n\t\t\tmeanOverAll[z]=VitimageUtils.meanValueofImageAround(sliceTemp, X/2, Y/2, 0,radiusImg);\n\t\t\t\n\t\t\t//Oter l'un à l'autre\n\t\t\tmeanOverRest[z]=meanOverAll[z]*(2*radiusImg+1)*(2*radiusImg+1) - meanOverCap[z]*(2*radiusAroundCapillary+1)*(2*radiusAroundCapillary+1);\n\t\t\tmeanOverRest[z]=meanOverRest[z]/( (2*radiusImg+1)*(2*radiusImg+1) - (2*radiusAroundCapillary+1)*(2*radiusAroundCapillary+1) );\n\n\t\t}\n\t\t//Faire la moyenne des valeurs mesurées along Z\n\t\tglobalMeanOverRest=VitimageUtils.statistics1D(meanOverRest)[0];\n\t\tglobalMeanOverCap=VitimageUtils.statistics1D(meanOverCap)[0];\n\n\t\tint radiusSq=radiusAroundCapillary*radiusAroundCapillary;\n\t\tdouble distSq;\n\t\t//Pour chaque Z\n\t\tfor(int im=0;im<tabRet.length;im++) {\n\t\t\tIJ.run(tabRet[im],\"32-bit\",\"\");\n\t\t\tfor(int z=0;z<Z;z++) {\n\t\t\t\tfloat[]tabData=(float[])tabRet[im].getStack().getProcessor(z+1).getPixels();\n\t\t\t\tdouble factorMultCap=globalMeanOverCap/meanOverCap[z];\n\t\t\t\tdouble factorMultRest=globalMeanOverRest/meanOverRest[z];\n\t\t\t\tfor(int x=0;x<X;x++) {\n\t\t\t\t\tfor(int y=0;y<Y;y++) {\n\t\t\t\t\t\tdistSq=(coords[z][0]-x)*(coords[z][0]-x) + (coords[z][1]-y)*(coords[z][1]-y);\n\t\t\t\t\t\t//Multiplier par moy / facteur 1(Z) sauf dans cap ou on multiplie par moy / facteur 2(Z) \n\t\t\t\t\t\tif(distSq<radiusSq)tabData[X*y+x]*=(factorMultCap);\n\t\t\t\t\t\telse tabData[X*y+x]*=(factorMultRest);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\t\t\t\n\t\treturn tabRet;\n\t}", "private Mat segmentRedColor(Mat bgr) {\n Mat mask1 = new Mat();\n Mat mask2 = new Mat();\n Mat normal = new Mat();\n Mat hsv = new Mat();\n Imgproc.cvtColor(bgr, hsv, Imgproc.COLOR_BGR2HSV, 3);\n inRange(hsv, new Scalar(0, 120, 50), new Scalar(MAX_COLOR_CHANNEL_OFFSET, 255, 255), mask1);\n inRange(hsv, new Scalar(170, 120, 50), new Scalar(180, 255, 255), mask2);\n Core.bitwise_or(mask1, mask2, normal);\n return mask1;\n }", "public long FC( int row, int col){\n\treturn (filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3);\n}", "private static int _getMask(final int bitIndex) {\n return (1 << bitIndex);\n }", "private int mcCalc(int a, int b) {\n if (a == 1) {\n return b;\n } else if (a == 2) {\n return mc2[b / 16][b % 16] ^ 0x42;\n } else if (a == 3) {\n return mc3[b / 16][b % 16] ^ 0x42;\n }\n return 0;\n }", "public abstract boolean[] calculate();", "public static int computeTemplateMask(final String src) {\n int currentMask = 0;\n for (TemplateElement templateElt : availableTemplateElements) {\n currentMask = templateElt.markIfNecessary(src, currentMask);\n }\n return currentMask;\n }", "private long computeCheckSum(final byte[] buf) {\n long sum = 0;\n for (byte aBuf : buf) {\n sum += 255 & aBuf;\n }\n return sum;\n }", "public void editImage(Mask m, boolean bNw) {\t\r\n\t\tfor (int i = 0; i < m.mask.length; i++) {\r\n\t\t\tfor (int j = 0; j < m.mask[0].length; j++) {\r\n\t\t\t\tif (m.mask[i][j] == false && bNw == false) {\r\n\t\t\t\t\t\tupdatePixel(m,i,j);\r\n\t\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif (bNw) {\r\n\t\t\t\t\t\tbnwPixel(m,i,j);\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}\r\n\t}", "private double processImg() {\n\n\t\ttry {\n\t\t\timgPreview.setVisibility(View.VISIBLE);\n\n\t\t\t// bitmap factory\n\t\t\tBitmapFactory.Options options = new BitmapFactory.Options();\n\n\t\t\t// downsizing image as it throws OutOfMemory Exception for larger\n\t\t\t// images\n\t\t\toptions.inSampleSize = 8;\n\n\t\t\tbitmap_ref = BitmapFactory.decodeFile(fileUriSafe.getPath(),\n\t\t\t\t\toptions);\n\n\t\t\tbitmap_sample = BitmapFactory.decodeFile(fileUriMole.getPath(),\n\t\t\t\t\toptions);\n\n\t\t\t//convert from bitmap to Mat\n\t\t\tMat ref = new Mat(bitmap_ref.getHeight(), bitmap_ref.getWidth(), CvType.CV_8UC4);\n\t\t\tMat sample = new Mat(bitmap_sample.getHeight(), bitmap_sample.getWidth(), CvType.CV_8UC4);\n\t\t\tMat mask = new Mat(bitmap_sample.getHeight(),bitmap_sample.getWidth(),CvType.CV_8UC4);\n\t\t\tMat sample2calcgrad = new Mat(bitmap_sample.getHeight(), bitmap_sample.getWidth(), CvType.CV_8UC4);\n\n\t\t\tUtils.bitmapToMat(bitmap_ref, ref);\n\t\t\tUtils.bitmapToMat(bitmap_sample, sample);\n\t\t\tUtils.bitmapToMat(bitmap_sample,sample2calcgrad);\n\n\t\t\t//normalize image based on reference\t\t\t\n\t\t\t//sample = normalizeImg(sample, ref);\n\n\t\t\t//Using Sobel filter to calculate gradient\n\t\t\tMat grad_x = new Mat();\n\t\t\tMat grad_y = new Mat();\n\t\t\tMat abs_grad_x = new Mat();\n\t\t\tMat abs_grad_y = new Mat();\n\t\t\tMat gradVals = new Mat();\n\t\t\tMat sample_gray = new Mat(bitmap_sample.getHeight(),bitmap_sample.getWidth(),CvType.CV_8UC1);\n\t\t\tImgproc.cvtColor(sample2calcgrad, sample_gray, Imgproc.COLOR_BGRA2GRAY);\n\t\t\tImgproc.GaussianBlur(sample_gray, sample_gray, new Size(5,5), 0);\n\n\t\t\t//Gradient X\n\t\t\tImgproc.Sobel(sample_gray, grad_x, CvType.CV_8UC1, 1, 0);\n\t\t\tCore.convertScaleAbs(grad_x, abs_grad_x,10,0);\n\n\t\t\t//Gradient Y\n\t\t\tImgproc.Sobel(sample_gray, grad_y, CvType.CV_8UC1, 0, 1);\n\t\t\tCore.convertScaleAbs(grad_y,abs_grad_y, 10, 0);\n\n\t\t\t//combine with grad = sqrt(gx^2 + gy^2)\n\t\t\tCore.addWeighted(abs_grad_x, .5, abs_grad_y, .5, 0, gradVals);\n\n\n\t\t\t//Using CANNY to further smooth Gaussian blurred image; extract contours\n\t\t\tImgproc.Canny(sample_gray, mIntermediateMat, 80, 90);\n\n\t\t\t//find contours of filtered image\n\t\t\tList <MatOfPoint> contours = new ArrayList<MatOfPoint>();\n\t\t\tImgproc.findContours(mIntermediateMat, contours, mHierarchy, Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE);\n\n\t\t\t// Find max contour area\n\t\t\tdouble maxArea = 0;\n\t\t\tIterator<MatOfPoint> each = contours.iterator();\n\t\t\twhile (each.hasNext()) {\n\t\t\t\tMatOfPoint wrapper = each.next();\n\t\t\t\tdouble area = Imgproc.contourArea(wrapper);\n\t\t\t\tif (area > maxArea)\n\t\t\t\t\tmaxArea = area;\n\t\t\t}\n\n\t\t\t// Filter contours by area and only keep those above thresh value\n\t\t\tmContours.clear();\n\t\t\teach = contours.iterator();\n\t\t\twhile (each.hasNext()) {\n\t\t\t\tMatOfPoint contour = each.next();\n\t\t\t\tif (Imgproc.contourArea(contour) > mMinContourArea*maxArea) {\n\t\t\t\t\tmContours.add(contour);\n\t\t\t\t\tborder.addAll(contour.toList());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//segment border into 8 parts \n\t\t\t//calc gradient along contour segment & normalize based on number of points in border\n\t\t\t//upto 7 points at end of border list ignored\n\t\t\tdouble [] seg_val = new double [8];\n\t\t\tint seg_len = border.size()/8;\n\t\t\tfor(int i = 0; i<8; i++){\n\t\t\t\tdouble contourGradientSum = 0;\n\t\t\t\tfor(int j=i*seg_len; j<(i+1)*seg_len;j++){\n\t\t\t\t\tPoint pt = border.get(j);\n\t\t\t\t\tint x = (int) pt.x;\n\t\t\t\t\tint y = (int) pt.y;\t\t\t\n\t\t\t\t\tcontourGradientSum += Core.mean(gradVals.submat(y-1, y+1, x-1, x+1)).val[0];\n\t\t\t\t}\n\t\t\t\tseg_val[i]=contourGradientSum/seg_len;\n\t\t\t}\n\n\n\t\t\tLog.v(TAG, \"grad vals: [\" + seg_val[0] + \",\" + seg_val[1] + \",\" \n\t\t\t\t\t+ seg_val[2] + \",\"+ seg_val[3] + \",\"\n\t\t\t\t\t+ seg_val[4] + \",\"+ seg_val[5] + \",\"\n\t\t\t\t\t+ seg_val[6] + \",\"+ seg_val[7] + \"]\");\n\t\t\t\n\t\t\tdouble thresh = 140;\n\t\t\tdouble score = 0;\n\n\t\t\tfor(double val:seg_val){\n\t\t\t\tif (val<=thresh){\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(score<8){\n\t\t\t\tscore += mContours.size()/7;\n\t\t\t\tscore = Math.min(8,score);\n\t\t\t}\n\n\n\n\t\t\tLog.v(TAG, \"score: \" +score);\n\t\t\tLog.v(TAG, \"Contours count: \" + mContours.size());\n\t\t\tLog.v(TAG, \"Border size: \" + border.size());\n\t\t\tImgproc.drawContours(sample, mContours, -1, CONTOUR_COLOR);\n\t\t\tImgproc.drawContours(mask, mContours, -1, COLOR_WHITE, -1);\n\t\t\tborders = mask;\n\n\t\t\t//display image with contours\n\t\t\tUtils.matToBitmap(sample, bitmap_sample);\n\t\t\timgPreview.setImageBitmap(bitmap_sample);\n\t\t\timgPreview.setFocusable(true);\n\n\t\t\treturn score;\n\n\t\t\t//\t\t\t\n\t\t} catch (NullPointerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn -1;\n\t}", "public interface AvatarMask {\n public void drawMask(Canvas canvas, int bk_color);\n}", "public static int offsetBits_sum_e() {\n return 104;\n }", "private long top_mask(int col) {\r\n return (long)1 << height - 1 << col*(height+1);\r\n }", "public static int getWithMask(final int source, final int mask) {\n int target = 0;\n for (int sourcePosition = 0; sourcePosition < BYTE_LENGTH; sourcePosition++) {\n if (bitIsSet(mask, Bits.getBit(sourcePosition))) {\n target = setFlag(target, Bits.getBit(sourcePosition), bitIsSet(source, Bits.getBit(sourcePosition)));\n }\n }\n return target;\n }", "public long column_mask(int col) {\r\n return (((long)1 << height)-1) << col*(height+1);\r\n }", "private void decorateBitmap() {\n\n RectF roundedRect = new RectF(2, 2, mBitmap.getWidth() - 2, mBitmap.getHeight() - 2);\n float cornerRadius = mBitmap.getHeight() * CORNER_RADIUS_SIZE;\n\n // Alpha canvas with white rounded rect\n Bitmap maskBitmap = Bitmap.createBitmap(mBitmap.getWidth(), mBitmap.getHeight(),\n Bitmap.Config.ARGB_8888);\n Canvas maskCanvas = new Canvas(maskBitmap);\n maskCanvas.drawColor(Color.TRANSPARENT);\n Paint maskPaint = new Paint(Paint.ANTI_ALIAS_FLAG);\n maskPaint.setColor(Color.BLACK);\n maskPaint.setStyle(Paint.Style.FILL);\n maskCanvas.drawRoundRect(roundedRect, cornerRadius, cornerRadius, maskPaint);\n\n Paint paint = new Paint();\n paint.setFilterBitmap(false);\n\n // Draw mask onto mBitmap\n Canvas canvas = new Canvas(mBitmap);\n\n paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN));\n canvas.drawBitmap(maskBitmap, 0, 0, paint);\n\n // Now re-use the above bitmap to do a shadow.\n paint.setXfermode(null);\n\n maskBitmap.recycle();\n }", "public void dilation(RasterImage src, RasterImage dst, boolean[][] kernel) {\n\t\tArrays.fill(dst.argb, 0xffffffff);\n\t\tint radius = kernel.length / 2;\n\t\tfor (int picY = 0; picY < src.height; picY++) {\n\t\t\tfor (int picX = 0; picX < src.width; picX++) {\n\t\t\t\tint[] colour = src.getRGB(src.argb[picY * src.width + picX]);\n\t\t\t\tif (colour[0] == 0) {\n\t\t\t\t\tfor (int j = 0; j < kernel.length; j++) {\n\t\t\t\t\t\tfor (int k = 0; k < kernel[j].length; k++) {\n\t\t\t\t\t\t\tint stampY = picY;\n\t\t\t\t\t\t\tint stampX = picX;\n\t\t\t\t\t\t\tif (kernel[j][k]) {\n\t\t\t\t\t\t\t\tstampX = picX - radius + k;\n\t\t\t\t\t\t\t\tstampY = picY - radius + j;\n\t\t\t\t\t\t\t\tif (stampX >= 0 && stampX < dst.width && stampY >= 0 && stampY < dst.height) {\n\t\t\t\t\t\t\t\t\tdst.argb[stampY * dst.width + stampX] = 0xff000000;\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}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "private void computeDirect() {\n\t\t\tif (startY > 0) {\n\t\t\t\toffset = (startY - 1) * width;\n\t\t\t} else {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tendY = endY == height ? endY - 1 : endY;\n\n\t\t\tfor (int y = startY; y <= endY; y++) {\n\t\t\t\tfor (int x = 0; x < width; x++) {\n\t\t\t\t\tfinal Point3D moveX = xAxis.scalarMultiply(x * horizontal / (width - 1));\n\t\t\t\t\tfinal Point3D moveY = yAxis.scalarMultiply(y * vertical / (height - 1));\n\t\t\t\t\tfinal Point3D screenPoint = screenCorner.add(moveX).sub(moveY);\n\n\t\t\t\t\tfinal Ray ray = Ray.fromPoints(eye, screenPoint);\n\n\t\t\t\t\tRayCasterUtil.tracer(scene, ray, rgb);\n\t\t\t\t\tred[offset] = rgb[0] > 255 ? 255 : rgb[0];\n\t\t\t\t\tgreen[offset] = rgb[1] > 255 ? 255 : rgb[1];\n\t\t\t\t\tblue[offset] = rgb[2] > 255 ? 255 : rgb[2];\n\n\t\t\t\t\toffset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public static void main (String[] args) throws FitsException, IOException, ClassNotFoundException {\n inFits = FileLoader.loadFits(ImageDataTest.class , fileName);\n frArray = FitsRead.createFitsReadArray(inFits);\n rangeValues = FitsRead.getDefaultRangeValues();\n ImageData imageData = new ImageData(frArray, IMAGE_TYPE,COLROID, rangeValues, 0,0, 100, 100, true );\n BufferedImage bufferedImage = imageData.getImage(frArray);\n File outputfile = new File(FileLoader.getDataPath(ImageDataTest.class)+\"imageDataTest.png\");\n ImageIO.write(bufferedImage, \"png\", outputfile);\n\n\n\n //test ImageData with mask\n imageData = new ImageData(frArray, IMAGE_TYPE,imageMasks,rangeValues, 0,0, 100, 100, true );\n bufferedImage = imageData.getImage(frArray);\n outputfile = new File(FileLoader.getDataPath(ImageDataTest.class)+\"imageDataWithMaskTest.png\");\n ImageIO.write(bufferedImage, \"png\", outputfile);\n\n }", "private static native void niBlackThreshold_0(long _src_nativeObj, long _dst_nativeObj, double maxValue, int type, int blockSize, double k, int binarizationMethod);", "void calcComplement()\r\n { \r\n // check if this is a negative number\r\n if ( this.value > 0.5*Math.pow(16, this.digits) )\r\n {\r\n this.complement = this.value - (int)Math.pow(16, this.digits);\r\n }\r\n else\r\n {\r\n this.complement = this.value;\r\n }\r\n return;\r\n }", "public Mat getSkinMask(Mat sourceMat){\n Mat skinMask = new Mat();\n if(!isCalibrated) {\n skinMask = Mat.zeros(sourceMat.rows(), sourceMat.cols(), CvType.CV_8UC1);\n return skinMask;\n }\n Mat hsvInput = new Mat();\n Imgproc.cvtColor(sourceMat,hsvInput,Imgproc.COLOR_RGB2HSV);\n Core.inRange(hsvInput , new Scalar(hLowThreshold, sLowThreshold, vLowThreshold), new Scalar(hHighThreshold, sHighThreshold, vHighThreshold),skinMask);\n performOpening(skinMask, MORPH_ELLIPSE, new Size(3, 3));\n Imgproc.dilate(skinMask, skinMask, new Mat(),new Point(-1, -1), 3);\n return skinMask;\n\n }", "public static int mask(int crc) {\n // Rotate right by 15 bits and add a constant.\n return ((crc >>> 15) | (crc << 17)) + MASK_DELTA;\n }", "public void testFindBorders() {\n System.out.println(\"findBorders\");\n RasterImage rImage = new RasterImage(20,21);\n int expResult[] = {16777215, 0, 0, 0, 0, 0, 0, 16777215, 16777215,\n 16777215, 16777215, 16777215, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 16777215, 16777215, 16777215, 16777215, 0, 16777215, 16777215, 16777215,\n 16777215, 16777215, 0, 0, 0, 16777215, 16777215, 16777215, 0, 16777215,\n 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 0, 0, 16777215, 16777215,\n 0, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 0,\n 16777215, 16777215, 0, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215,\n 16777215, 0, 0, 16777215, 0, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215,\n 16777215, 16777215, 0, 0, 16777215, 0, 16777215, 16777215, 16777215, 16777215, 16777215,\n 16777215, 16777215, 16777215, 0, 0, 16777215, 0, 16777215, 16777215, 16777215, 16777215,\n 16777215, 16777215, 16777215, 16777215, 0, 0, 16777215, 0, 16777215, 16777215, 16777215,\n 16777215, 16777215, 16777215, 16777215, 16777215, 0, 0, 16777215, 0, 16777215, 16777215,\n 16777215, 16777215, 16777215, 16777215, 16777215, 0, 0, 16777215, 16777215, 0, 16777215,\n 16777215, 16777215, 16777215, 16777215, 16777215, 0, 0, 0, 16777215, 0, 0, 0, 16777215,\n 16777215, 16777215, 0, 0, 0, 0, 16777215, 16777215, 0, 0, 0, 0, 0, 0, 0, 0, 16777215,\n 16777215, 16777215, 16777215};\n int pixels[] = {16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,0,0,0,\n 0,0,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,0,0,0,\n 0,0,0,0,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,0,0,0,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,0,0,0,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,0,16777215,16777215,\n 16777215,0,0,0,0,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,0,0,0,\n 0,0,0,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215};\n for(int i=0;i<420;i++){\n int x = i%20;\n int y = i/20;\n rImage.setRGB(x, y, pixels[i]);\n }\n\n\n\n RasterImage result = CutCharacter.findBorders(rImage);\n for(int i=0;i<168;i++)\n assertEquals(expResult[i], result.getRGB(i));\n \n }", "public static byte[] mask(byte[] ip, int maskbits)\n {\n int nrbytes=(maskbits+7)/8; // Upper(bits/8) \n int len=ip.length; \n \n for (int i=0;i<nrbytes;i++)\n {\n int mask=0; \n // first byte, start with lowest byte (last one)\n if (maskbits>=8)\n mask=0x0000; // erase network bits \n else\n {\n mask=(0x0001<<maskbits)-1; // 0xffff....\n mask=0x00ff-(mask&0x00ff); // reverse mask; \n }\n \n ip[len-i-1]=(byte)(ip[len-i-1]&mask);\n maskbits-=8; // next byte \n }\n \n return ip; \n }", "private long getSleepMask()\n {\n return sleepMask;\n }", "public int letterMask(){\n\t\t\treturn letter_mask;\n\t\t}", "private void markBitmap(int frameNo){\n int bit = frameNo/32;\n int mask = frameNo%32;\n bitMap[bit] = bitMap[bit]|MASK[mask];\n }", "private void sumbit(String ip){\n }", "public static int getBitMask(int[] x) {\n int rc = 0;\n for(int xVal : x) {\n rc |= getBitMask(xVal);\n }\n\n return rc;\n }", "public static int method_2686(int var0) {\r\n return var0 & 7;\r\n }", "public void filterImage() {\n\n if (opIndex == lastOp) {\n return;\n }\n\n lastOp = opIndex;\n switch (opIndex) {\n case 0:\n biFiltered = bi; /* original */\n return;\n case 1:\n biFiltered = ImageNegative(bi); /* Image Negative */\n return;\n\n case 2:\n biFiltered = RescaleImage(bi);\n return;\n\n case 3:\n biFiltered = ShiftImage(bi);\n return;\n\n case 4:\n biFiltered = RescaleShiftImage(bi);\n return;\n\n case 5:\n biFiltered = Add(bi, bi1);\n return;\n\n case 6:\n biFiltered = Subtract(bi, bi1);\n return;\n\n case 7:\n biFiltered = Multiply(bi, bi1);\n return;\n\n case 8:\n biFiltered = Divide(bi, bi1);\n return;\n\n case 9:\n biFiltered = NOT(bi);\n return;\n\n case 10:\n biFiltered = AND(bi, bi1);\n return;\n\n case 11:\n biFiltered = OR(bi, bi1);\n return;\n\n case 12:\n biFiltered = XOR(bi, bi1);\n return;\n\n case 13:\n biFiltered = ROI(bi);\n return;\n\n case 14:\n biFiltered = Negative_Linear(bi);\n return;\n\n case 15:\n biFiltered= Logarithmic_function(bi);\n return;\n\n case 16:\n biFiltered = Power_Law(bi);\n return;\n\n case 17:\n biFiltered = LUT(bi);\n return;\n\n case 18:\n biFiltered = Bit_planeSlicing(bi);\n return;\n\n case 19:\n biFiltered = Histogram(bi1,bi2);\n return;\n\n case 20:\n biFiltered = HistogramEqualisation(bi,bi3);\n return;\n\n case 21:\n biFiltered = Averaging(bi1);\n return;\n\n case 22:\n biFiltered = WeightedAveraging(bi1);\n return;\n\n case 23:\n biFiltered = fourNeighbourLaplacian(bi1);\n return;\n\n case 24:\n biFiltered= eightNeighbourLaplacian(bi1);\n return;\n\n case 25:\n biFiltered = fourNeighbourLaplacianEnhancement(bi1);\n return;\n\n case 26:\n biFiltered = eightNeighbourLaplacianEnhancement(bi1);\n return;\n\n case 27:\n biFiltered = Roberts(bi1);\n return;\n\n case 28:\n biFiltered = SobelX(bi1);\n return;\n\n case 29:\n biFiltered = SobelY(bi1);\n return;\n\n case 30:\n biFiltered = Gaussian(bi1);\n return;\n\n case 31:\n biFiltered = LoG (bi1);\n return;\n\n case 32:\n biFiltered = saltnpepper(bi4);\n return;\n\n case 33:\n biFiltered = minFiltering(bi4);\n return;\n\n case 34:\n biFiltered = maxFiltering(bi4);\n return;\n\n case 35:\n biFiltered = maidpointFiltering(bi4);\n return;\n\n case 36:\n biFiltered = medianFiltering(bi4);\n return;\n\n case 37:\n biFiltered = simpleThresholding(bi5);\n return;\n\n case 38:\n biFiltered = automatedThresholding(bi6);\n return;\n\n case 39:\n biFiltered = adaptiveThresholding(bi7);\n return;\n }\n }", "public final void mo56977b() {\n /*\n r2 = this;\n com.ss.android.ugc.aweme.common.e r0 = r2.f67572c\n com.ss.android.ugc.aweme.feed.ui.masklayer2.a.i r0 = (com.p280ss.android.ugc.aweme.feed.p1238ui.masklayer2.p1239a.C28951i) r0\n if (r0 == 0) goto L_0x001a\n com.ss.android.ugc.aweme.common.a r1 = r2.f67571b\n com.ss.android.ugc.aweme.feed.ui.masklayer2.a.d r1 = (com.p280ss.android.ugc.aweme.feed.p1238ui.masklayer2.p1239a.C28944d) r1\n if (r1 == 0) goto L_0x0014\n java.lang.Object r1 = r1.getData()\n java.lang.String r1 = (java.lang.String) r1\n if (r1 != 0) goto L_0x0016\n L_0x0014:\n java.lang.String r1 = \"\"\n L_0x0016:\n r0.mo74240a(r1)\n return\n L_0x001a:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.feed.p1238ui.masklayer2.p1239a.C28946e.mo56977b():void\");\n }", "public int[][] RdB() {\t\t\t\t\t\t\t\t// cherche les 4 points noirs\n\t\tint[][] pixNoirs = new int[img.getWidth()*img.getHeight()][2];\n\n\t\tint i=0;\n\t\tint radius=8;\t\t\t\t\t\t\t\t\t// 19= limite de detection de checkCircle\n\t\tfor (int ty=0; ty<img.getHeight();ty++) {\n\t\t\tfor (int tx=0;tx<img.getWidth();tx++) {\n\n\t\t\t\tColor tmp=new Color(img.getRGB(tx, ty));\n\t\t\t\tif (tmp.getGreen()<20) { \t\t\t\t//si le pixel est noir\n\t\t\t\t\tif (checkCircle(tx,ty,radius) ) {\t//verifie si un cercle de radius entoure le pixel\n\t\t\t\t\t\tpixNoirs[i][0]=tx;\n\t\t\t\t\t\tpixNoirs[i][1]=ty;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\"fin\");\n\t\tint tmp=1;\n\t\tint centreX[][]=new int [img.getWidth()*img.getHeight()][2];\n\t\tcentreX[0]=pixNoirs[0];\n\t\tfor (int l=0;l<img.getHeight()*img.getWidth() && (pixNoirs[l][1]!=0 || pixNoirs[l][0]!=0);l++) {\n\t\t\tif((pixNoirs[l][0]-centreX[tmp-1][0])<5 || pixNoirs[l][1]-centreX[tmp-1][1]<5 ){\t\t//x-(x-1)>5 ou y-(y-1)>5\n\t\t\t\tcentreX[tmp][0]=pixNoirs[l][0];\t\t\t//efface le precedent roar2 si il était a 1 pixel de diff\n\t\t\t\tcentreX[tmp][1]=pixNoirs[l][1];\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttmp++;\n\t\t\t\tcentreX[tmp]=pixNoirs[l];\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//boucle de determination des points noirs\n\t\t//System.out.println(\"roar2debut\");\n\t\tint points[][]=new int [4][2];\n\t\tint centres[][]=new int [centreX.length][2]; int boucl=0; int lasti=0;\n\t\tint t=0;\n\t\tfor (int l=1;l<=img.getHeight()*img.getWidth() && (centreX[l-1][1]!=0 || centreX[l-1][0]!=0);l++) {\n\n\n\t\t\t\n\t\t\tint diffx=centreX[l][0]-centreX[l-1][0];\n\t\t\tint diffy=centreX[l][1]-centreX[l-1][1];\n\t\t\tint diff=Math.abs(diffx)+Math.abs(diffy);\n\t\t\tif (diff>img.getWidth()*0.85)\n\t\t\t{\n\t\t\t\tpoints[t]=centreX[l];\n\t\t\t\tt++;\n\t\t\t}\n\t\t\t\n\t\t\tif (diffx<10 && diffy<10) {\n\t\t\t\tboucl++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcentres[lasti][0]=centreX[l-boucl/2][0];\n\t\t\t\tcentres[lasti][1]=centreX[l-boucl/2][1];\n\t\t\t\tlasti++;boucl=0;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tfor (int l=0;l<=centres.length && (centres[l][1]!=0 || centres[l][0]!=0);l++) {\t\n\t\t\tboolean test=true;\n\t\t\tint maxPoint=0;\n\t\t\tfor (int li=0;li<=points.length && (points[li][1]!=0 || points[li][0]!=0);li++) {\n\t\t\t\tint diffx=\tMath.abs(centres[l][0]-points[li][0]);\n\t\t\t\tint diffy=\tMath.abs(centres[l][1]-points[li][1]);\n\t\t\t\tboolean testx=\t\tdiffx>img.getWidth()*0.85 \t|| diffx<img.getWidth()*0.2;\t//diff <0.1 ou >0.8 x la largeur de feuille\n\t\t\t\tboolean testy=\t\tdiffy>img.getHeight()*0.8 \t|| diffy<img.getWidth()*0.2;\n\t\t\t\tboolean Repeat=\tdiffx+diffy>img.getWidth()*0.2;\t //si point deja présent\n\n\t\t\t\tif (!Repeat || (!testx || !testy) )\t// si 0.2>diffx>0.8 ou \"diffy\" et \n\t\t\t\t{\n\t\t\t\t\ttest=false;\n\t\t\t\t}\n\t\t\t\tmaxPoint=li;\n\t\t\t}\n\t\t\t\n\t\t\tif(test && maxPoint<2) {\n\t\t\t\t//System.out.println(lastRoar[l][0]+\" \"+lastRoar[l][1]);\n\t\t\t\tpoints[maxPoint+1][0]=centres[l][0];\n\t\t\t\tpoints[maxPoint+1][1]=centres[l][1];\n\t\t\t}\n\t\t}\n\t\treturn points;\n\n\t}", "public short[] getShortMask() {\r\n return newShortMask;\r\n }", "public List<Mask> getMasks() {\n return Collections.unmodifiableList(masks);\n }", "public void directCompute() {\r\n\t\t\tshort[] rgb = new short[3];\r\n\t\t\tint offset = yMin * width;\r\n\t\t\tfor (int y = yMin; y < yMax; y++) {\r\n\t\t\t\tfor (int x = 0; x < width; x++) {\r\n\t\t\t\t\tPoint3D screenPoint = screenCorner.add(xAxis.scalarMultiply(x * 1.0 / (width - 1) * horizontal))\r\n\t\t\t\t\t\t\t.sub(yAxis.scalarMultiply(y * 1.0 / (height - 1) * vertical));\r\n\r\n\t\t\t\t\tRay ray = Ray.fromPoints(eye, screenPoint);\r\n\t\t\t\t\ttracer(scene, ray, rgb);\r\n\t\t\t\t\t// applying color to pixel\r\n\t\t\t\t\tred[offset] = rgb[0] > 255 ? 255 : rgb[0];\r\n\t\t\t\t\tgreen[offset] = rgb[1] > 255 ? 255 : rgb[1];\r\n\t\t\t\t\tblue[offset] = rgb[2] > 255 ? 255 : rgb[2];\r\n\r\n\t\t\t\t\toffset++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public static int offsetBits_sum_a() {\n return 72;\n }", "@Override\n public Color getRegionColor(double[] offset, double[] size) {\n double[] sums = new double[4];\n double area = 0;\n\n int leftIntInside = (int)offset[0];\n if (leftIntInside < offset[0]) leftIntInside++;\n int topIntInside = (int)offset[1];\n if (topIntInside < offset[1]) topIntInside++;\n int rightIntInside = (int)(size[0] + offset[0]);\n int botIntInside = (int)(size[1] + offset[1]);\n \n // Whole internal pixels\n for (int y = topIntInside; y < botIntInside; y++) {\n for (int x = leftIntInside; x < rightIntInside; x++) {\n int[] pix = MeUtils.intToARGB(getPixel(x, y));\n for (int i = 0; i < 4; i++) {\n sums[i] += pix[i];\n }\n }\n }\n // Assuming non-negative area....\n area += (rightIntInside - leftIntInside) * (botIntInside - topIntInside);\n \n // Left edge\n for (int y = topIntInside; y < botIntInside; y++) {\n double x = offset[0];\n double width = leftIntInside - x;\n int[] pix = MeUtils.intToARGB(getPixel((int)x, y));\n for (int i = 0; i < 4; i++) {\n sums[i] += (pix[i] * width);\n }\n } \n // Assuming non-negative area....\n area += (leftIntInside - offset[0]) * (botIntInside - topIntInside);\n\n // Right edge\n for (int y = topIntInside; y < botIntInside; y++) {\n double x = rightIntInside;\n double width = (offset[0] + size[0]) - x;\n int[] pix = MeUtils.intToARGB(getPixel((int)x, y));\n for (int i = 0; i < 4; i++) {\n sums[i] += (pix[i] * width);\n }\n } \n // Assuming non-negative area....\n area += (offset[0] + size[0] - rightIntInside) * (botIntInside - topIntInside);\n\n // Top edge\n for (int x = leftIntInside; x < rightIntInside; x++) {\n double y = offset[1];\n double height = topIntInside - y;\n int[] pix = MeUtils.intToARGB(getPixel(x, (int)y));\n for (int i = 0; i < 4; i++) {\n sums[i] += (pix[i] * height);\n }\n } \n // Assuming non-negative area....\n area += (rightIntInside - leftIntInside) * (topIntInside - offset[1]);\n\n // Bottom edge\n for (int x = leftIntInside; x < rightIntInside; x++) {\n double y = botIntInside;\n double height = (offset[1] + size[1]) - y;\n int[] pix = MeUtils.intToARGB(getPixel(x, (int)y));\n for (int i = 0; i < 4; i++) {\n sums[i] += (pix[i] * height);\n }\n } \n // Assuming non-negative area....\n area += (rightIntInside - leftIntInside) * (offset[1] + size[1] - botIntInside);\n \n // Top left corner\n {\n double x = offset[0];\n double y = offset[1];\n double width = leftIntInside - x;\n double height = topIntInside - y;\n int[] pix = MeUtils.intToARGB(getPixel((int)x, (int)y));\n for (int i = 0; i < 4; i++) {\n sums[i] += (pix[i] * width * height);\n }\n }\n // Assuming non-negative area....\n area += (leftIntInside - offset[0]) * (topIntInside - offset[1]);\n\n // Top right corner\n {\n double x = rightIntInside;\n double y = offset[1];\n double width = (offset[0] + size[0]) - x;\n double height = topIntInside - y;\n int[] pix = MeUtils.intToARGB(getPixel((int)x, (int)y));\n for (int i = 0; i < 4; i++) {\n sums[i] += (pix[i] * width * height);\n }\n }\n // Assuming non-negative area....\n area += (offset[0] + size[0] - rightIntInside) * (topIntInside - offset[1]);\n \n // Bottom left corner\n {\n double x = offset[0];\n double y = botIntInside;\n double width = leftIntInside - x;\n double height = (offset[1] + size[1]) - y;\n int[] pix = MeUtils.intToARGB(getPixel((int)x, (int)y));\n for (int i = 0; i < 4; i++) {\n sums[i] += (pix[i] * width * height);\n }\n }\n // Assuming non-negative area....\n area += (leftIntInside - offset[0]) * (offset[1] + size[1] - botIntInside);\n\n // Bottom right corner\n {\n double x = rightIntInside;\n double y = botIntInside;\n double width = (offset[0] + size[0]) - x;\n double height = (offset[1] + size[1]) - y;\n int[] pix = MeUtils.intToARGB(getPixel((int)x, (int)y));\n for (int i = 0; i < 4; i++) {\n sums[i] += (pix[i] * width * height);\n }\n }\n // Assuming non-negative area....\n area += (offset[0] + size[0] - rightIntInside) * (offset[1] + size[1] - botIntInside);\n \n float[] avg = new float[sums.length];\n for (int i = 0; i < 4; i++) {\n // Also scaling to [0,1]\n avg[i] = (float)((sums[i] / area) / 0xFF);\n }\n \n return new Color(MeMath.bound(avg[1], 0, 1), MeMath.bound(avg[2], 0, 1), MeMath.bound(avg[3], 0, 1), MeMath.bound(avg[0], 0, 1));\n }", "public WavelengthMask getMask() {\r\n\t\treturn this.mask;\r\n\t}", "int getHeatCode(int x, int y);", "public static long getVpnIdMaskForReg() {\n return METADATA_MASK_VRFID.toJava().shiftRight(1).longValue();\n }", "public int updateBit(int i,int j, boolean set){\n int value=(set)?1:0;\n int mask=~(1<<j);\n int clear=mask&i;\n return clear|(1<<value);\n\n}", "private static byte[] decode(byte[] adder, byte[] mask, byte[] bytes) {\n byte[] buf = new byte[bytes.length];\n for (int i = 0; i < bytes.length; i++)\n buf[i] = (byte)(\n (mask[i % mask.length] ^ bytes[i])\n - adder[i % adder.length]);\n return buf;\n }" ]
[ "0.69404143", "0.6556282", "0.6438727", "0.6375797", "0.6231888", "0.61662227", "0.6114166", "0.6076276", "0.5986424", "0.5926584", "0.59169745", "0.5903705", "0.59010404", "0.58893347", "0.5824921", "0.58088416", "0.57827127", "0.57741505", "0.57596374", "0.57462204", "0.5737283", "0.5726344", "0.57164633", "0.56816304", "0.56616026", "0.5647513", "0.5643265", "0.5642714", "0.5624762", "0.56144935", "0.5599773", "0.5555169", "0.5553019", "0.5547045", "0.55390435", "0.55002886", "0.5490185", "0.5477723", "0.538256", "0.5369667", "0.5368164", "0.53569376", "0.5355521", "0.5338717", "0.5336512", "0.533623", "0.533458", "0.52844185", "0.5279171", "0.52673125", "0.52352047", "0.5233684", "0.5221963", "0.5207733", "0.52075183", "0.5200496", "0.5196978", "0.51862794", "0.5184697", "0.5182209", "0.5166593", "0.5166468", "0.5162186", "0.51492757", "0.51392555", "0.5138223", "0.5132733", "0.51279896", "0.51248604", "0.51166415", "0.51137024", "0.5106841", "0.5106069", "0.5105071", "0.5104989", "0.5092438", "0.50861317", "0.5085667", "0.5084162", "0.5077844", "0.5077453", "0.5073175", "0.5066013", "0.50583553", "0.50527906", "0.50518835", "0.505168", "0.50496984", "0.5047029", "0.50445664", "0.5040977", "0.50346625", "0.50276417", "0.5027446", "0.5018422", "0.49990556", "0.49935454", "0.49895942", "0.49882662", "0.49867022", "0.49815905" ]
0.0
-1
Created by Fyj on 2016/6/6.
public interface MainContract { interface Model extends BaseModel { ArrayList<CustomTabEntity> getTabs(); ArrayList<Fragment> getFragments(); String[] getTitles(); } interface View extends BaseView { void updataListView(ArrayList<CustomTabEntity> tabs,ArrayList<Fragment> fragments,String[] titles); } abstract class Presenter extends BasePresenter<Model,View> { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\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}", "public final void mo51373a() {\n }", "@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\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void init() {\n\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\r\n\tpublic void rozmnozovat() {\n\t}", "private void kk12() {\n\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\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\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void einkaufen() {\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 mo6081a() {\n }", "@Override\n public void init() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public int describeContents() { return 0; }", "@Override\n void init() {\n }", "private void init() {\n\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\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\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 public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@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 void mo55254a() {\n }", "private Rekenhulp()\n\t{\n\t}", "public void mo12628c() {\n }", "public void mo12930a() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n public void init() {}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "public void m23075a() {\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 }", "@Override\n protected void init() {\n }", "static void feladat4() {\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "public void mo21877s() {\n }", "public void Tyre() {\n\t\t\r\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}" ]
[ "0.61093843", "0.5976348", "0.588363", "0.58776504", "0.5856281", "0.5856281", "0.58463436", "0.57764745", "0.5752658", "0.5744669", "0.5730157", "0.57172984", "0.5709257", "0.56927115", "0.56724346", "0.56668144", "0.566238", "0.5653472", "0.5632274", "0.56050503", "0.5579137", "0.5571689", "0.5558975", "0.5558705", "0.555454", "0.5548335", "0.554624", "0.5544189", "0.5539847", "0.5539847", "0.5539847", "0.5539847", "0.5539847", "0.5538207", "0.5520778", "0.5518378", "0.551779", "0.551779", "0.551779", "0.551779", "0.551779", "0.551779", "0.551779", "0.5508533", "0.5508294", "0.5495865", "0.54925174", "0.54907596", "0.54831046", "0.54824", "0.54620934", "0.54543144", "0.54543144", "0.54526985", "0.54499006", "0.5447781", "0.5447533", "0.54467225", "0.5429695", "0.5422651", "0.5418046", "0.5418046", "0.5418046", "0.5399619", "0.5394403", "0.5394403", "0.5394214", "0.5392476", "0.5387349", "0.5387349", "0.5387349", "0.5383794", "0.5383794", "0.5383294", "0.5383294", "0.5383294", "0.53828144", "0.5381402", "0.5380589", "0.53778756", "0.5370663", "0.537055", "0.5368256", "0.5356782", "0.53544855", "0.5346819", "0.534012", "0.53395784", "0.53395784", "0.53395784", "0.53395784", "0.53395784", "0.53395784", "0.53328705", "0.5332381", "0.53298414", "0.5329465", "0.5326775", "0.5323523", "0.5323307", "0.53187335" ]
0.0
-1
Set the default command for a subsystem here. setDefaultCommand(new MySpecialCommand());
public void initDefaultCommand() { setDefaultCommand(new articulateIntake()); //Make sure to only set the doublesolenoid to off if the last position of the intake was down /*if (downPosition == 1){ setDefaultCommand(new articulateIntake("down")); } else { setDefaultCommand(new articulateIntake("up")); }*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n }", "@Override\n public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n }", "@Override\n /**\n * Set the default command for a subsystem here\n */\n public void initDefaultCommand() \n {\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n }", "public void initDefaultCommand() {\r\n // Set the default command for a subsystem here.\r\n //setDefaultCommand(new MySpecialCommand());\r\n }", "public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n }", "public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n //setDefaultCommand(new MySpecialCommand());\n }", "public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n //setDefaultCommand(new MySpecialCommand());\n }", "public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n //setDefaultCommand(new MySpecialCommand());\n }", "public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n //setDefaultCommand(new MySpecialCommand());\n }", "public void initDefaultCommand() {\n\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n\n }", "public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n //setDefaultCommand(new MySpecialCommand());\n \t\n }", "@Override\n public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n setDefaultCommand(new tankDrive());\n }", "public void initDefaultCommand() {\r\n // Set the default command for a subsystem here.\r\n //setDefaultCommand\r\n }", "public void initDefaultCommand() {\n // Set the default command, if any, for a subsystem here. Example:\n // setDefaultCommand(new MySpecialCommand());\n }", "@Override\n public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n setDefaultCommand(new HatchExtend());\n setDefaultCommand(new HatchRetract());\n }", "public void initDefaultCommand() {\n \tsetDefaultCommand(new SetCanMove());\n // Set the default command for a subsystem here.\n //setDefaultCommand(new MySpecialCommand());\n }", "public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n //setDefaultCommand(new MySpecialCommand());\n \tsetDefaultCommand(new VelocityDriveCommand());\n }", "public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n //setDefaultCommand(new MySpecialCommand());\n \tsetDefaultCommand(new DriveWithJoyStickCommand()); // TBD for Commandbased programming\n }", "public void initDefaultCommand() {\n \tsetDefaultCommand(new SetPlungerMove());\n // Set the default command for a subsystem here.\n //setDefaultCommand(new MySpecialCommand());\n }", "public void initDefaultCommand() {\n\t\t// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\n\n\n\t\t// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\n\n\t\t// Set the default command for a subsystem here.\n\t\t// setDefaultCommand(new MySpecialCommand());\n\t}", "public void initDefaultCommand() {\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\n\t\n // Set the default command for a subsystem here.\n //setDefaultCommand(new MySpecialCommand());\n }", "public void initDefaultCommand() {\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\n\t\n // Set the default command for a subsystem here.\n //setDefaultCommand(new MySpecialCommand());\n }", "public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n \tsetDefaultCommand(new DriveWithJoystick());\n }", "public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n setDefaultCommand(new GearPickupClampIn());\n }", "public void initDefaultCommand() {\r\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\r\n setDefaultCommand(new drive_w_joysticks());\r\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\r\n\t\r\n // Set the default command for a subsystem here.\r\n //setDefaultCommand(new MySpecialCommand());\r\n }", "public void initDefaultCommand() {\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\n\n setDefaultCommand(new EnableLight());\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\n\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n }", "protected void initDefaultCommand() {\n\t\tsetDefaultCommand(CommandBase.scs);\r\n\t}", "@Override\n public void initDefaultCommand() {\n Robot.driveTrain.setDefaultCommand(new xboxDrive());\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n }", "public void initDefaultCommand() {\n\t\tsetDefaultCommand(new HatchExtenderCommand());\n\t}", "public void initDefaultCommand() {\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\n setDefaultCommand(new joystickDrive());\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\n\t\n // Set the default command for a subsystem here.\n //setDefaultCommand(new MySpecialCommand());\n \n \n \n }", "@Override\r\n public void initDefaultCommand() {\r\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\r\n\r\n setDefaultCommand(new joystick_lift_upAndDown());\r\n\r\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\r\n\r\n // Set the default command for a subsystem here.\r\n // setDefaultCommand(new MySpecialCommand());\r\n }", "@Override\n public void initDefaultCommand() {\n\n setDefaultCommand(new UserDrive());\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\n\n // Set the default command for a subsystem here.\n }", "public void initDefaultCommand() {\n setDefaultCommand(new shooterStart());\n }", "public void initDefaultCommand() {\r\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\r\n\r\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\r\n\t\r\n // Set the default command for a subsystem here.\r\n //setDefaultCommand(new MySpecialCommand());\r\n \tisPID = true;\r\n \trampingCoeff = 20;\r\n }", "@Override\n public void initDefaultCommand() {\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\n\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\n \t\n setDefaultCommand(new VariableIntake());\n \n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n }", "@Override\n public void initDefaultCommand() {\n setDefaultCommand(new operateClimber());\n }", "public void initDefaultCommand() {\n super.setDefaultCommand(new DriveJoystick());\n }", "@Override\n public void initDefaultCommand() {\n setDefaultCommand(new Climb());\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\r\n setDefaultCommand(new TankDrive());\r\n }", "public void initDefaultCommand() {\n setDefaultCommand(new TankDrive());\n }", "@Override\n public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n\t\tsetDefaultCommand(new JoystickLiftCommand());\n\t}", "public void initDefaultCommand() {\n\t\tsetDefaultCommand(new Intake());\n\t}", "@Override\n public void initDefaultCommand() \n {\n }", "public void initDefaultCommand() {\n\t\tsetDefaultCommand(new UserDriveCommand());\n\t}", "@Override\n\tprotected void initDefaultCommand() {\n\t\t\n\t}", "@Override\n\tprotected void initDefaultCommand() {\n\t\t\n\t}", "@Override\n\tprotected void initDefaultCommand() {\n\t\t\n\t}", "@Override\r\n\tprotected void initDefaultCommand() {\n\t\t\r\n\t}", "@Override\n public void initDefaultCommand() {\n setDefaultCommand(new DriveWithJoy());\n }", "@Override\n public void initDefaultCommand() {\n\n }", "public void initDefaultCommand() {\n \tsetDefaultCommand(new Drive());\n }", "@Override\n\tprotected void initDefaultCommand() {\n\n\t}", "@Override\n\tprotected void initDefaultCommand() {\n\n\t}", "public void initDefaultCommand() {\n \tsetDefaultCommand(new boxChange());\n }", "public void initDefaultCommand()\n\t{\n\t}", "public void initDefaultCommand() {\n\t}", "public void initDefaultCommand() {\n \n }", "protected void initDefaultCommand() {\n \t\t\n \t}", "@Override\r\n\tprotected void initDefaultCommand() {\n\t\tsetDefaultCommand(new DriveWithJoysticks());\r\n\t}", "public void initDefaultCommand() {\n \tsetDefaultCommand(new ArmManual());\n }", "public void initDefaultCommand()\n {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n \tsetDefaultCommand(new TestCommandEye());\n }" ]
[ "0.9324153", "0.9324153", "0.9176814", "0.9145523", "0.9120177", "0.91201586", "0.91201586", "0.91201586", "0.91201586", "0.9078301", "0.90563947", "0.89595234", "0.8956215", "0.88660914", "0.8796251", "0.8682107", "0.8648125", "0.864615", "0.85777426", "0.84162575", "0.84021956", "0.8400012", "0.8374024", "0.82794154", "0.8255146", "0.8227877", "0.822712", "0.8163958", "0.80587816", "0.8017798", "0.7983663", "0.79335815", "0.7891184", "0.7886477", "0.7872803", "0.7865667", "0.7817611", "0.77398515", "0.77258176", "0.77258176", "0.77258176", "0.77258176", "0.77258176", "0.77258176", "0.77129143", "0.77129143", "0.77129143", "0.77129143", "0.77129143", "0.77129143", "0.77129143", "0.77053726", "0.7696634", "0.7680675", "0.766486", "0.7648777", "0.76426077", "0.76327", "0.7610836", "0.7610836", "0.7610836", "0.7607253", "0.7606904", "0.75841904", "0.7578112", "0.7576927", "0.7576927", "0.7554525", "0.75516325", "0.7534068", "0.7532316", "0.75295734", "0.75226396", "0.7518108", "0.7516911", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.75087553", "0.7484459" ]
0.0
-1
TO DO: need CSV data provider
@DataProvider public Object[][] correctData() { return new Object[][]{ {"nikol344265", "NikolR4551"} }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CSV createCSV();", "public void createCSV() {\n\t\t// Need to integrate CSV calling logic\n\t}", "public interface CSVDataRow\n{\n String toLine();\n}", "@Override\n DBO consume(String csv) throws TransformerException;", "@Override\n\tpublic void parseCSV(String csv) {\n\t\t\n\t}", "public void ach_doc_type_csv_test () {\n\t\t\n\t}", "void createCsv(String location);", "@Test\r\n\tpublic void readCsvTest() throws IOException {\r\n\t\t\tfail(\"Not yet implemented\");\r\n\t}", "@Override\n\tpublic void exportToCSV() {\n\n\t}", "@Override\n\tpublic void configuration(String csv) {\n\n\t}", "public interface DboCsvTransformer<DBO extends DatabaseObject<?>> extends DboFileTransformer<DBO> {\n\n String COMMA_IN_QUOTES_REGEX = \",(?=(?:[^\\\\\\\"]*\\\\\\\"[^\\\\\\\"]*\\\\\\\")*[^\\\\\\\"]*$)\";\n\n /**\n * This method consumes a single line of CSV to produce a DatabaseObject.\n *\n * @param csv the single line of CSV representing a single DatabaseObject\n * @return the DatabaseObject represented\n * @throws TransformerException if the object cannot be produced\n */\n @Override\n DBO consume(String csv) throws TransformerException;\n\n /**\n * This method consumes a DatabaseObject to produce a String in CSV format.\n *\n * @param object the DatabaseObject\n * @return a String in CSV format\n * @throws TransformerException if the object cannot be consumed\n */\n @Override\n String produce(DBO object) throws TransformerException;\n\n}", "public void openCSVStream() {\n\t\ttry {\n\t\t\twriter = new CSVWriter(new FileWriter(getCSVFolder() + File.separator + getFileName() + \".csv\"), ',');\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@DataProvider(name=\"dataset\")\r\n\tpublic static Object[][] getdata() throws IOException{\r\n\t\tObject [][] ob= new IO().getdataset(\"./dataset.csv\");\t\r\n\treturn ob;\r\n\t}", "public String getCSVData()\n {\n return (Integer.toString(this.getID()) + \",\" +\n this.getName());\n }", "public void exportToCSV();", "private static CSVData getReader(){\n\t\tCSVData csv = null;\n\t\ttry {\n\t\t\tcsv = new CSVData();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn csv;\n\t}", "@Override\n\tprotected Object csvRecordToObject(String cvsRecord) {\n\t\t \n String[] arrOfStr = cvsRecord.split(\",\");\n\t\t Item item =new Item();\n\t\t item.setItemno(Integer.parseInt(arrOfStr[0]));\n\t\t item.setItemName(arrOfStr[1]);\n\t\t item.setUnitPrice(arrOfStr[2]);\n\t\t return item;\n\t\t\n\t}", "public CSVHarvester() {\r\n super(\"csv\", \"CSV Harvester\");\r\n }", "@Override\n public void importCSV(File file) {\n System.out.println(\"oi\");\n System.out.println(file.isFile()+\" \"+file.getAbsolutePath());\n if(file.isFile() && file.getPath().toLowerCase().contains(\".csv\")){\n System.out.println(\"Entro\");\n try {\n final Reader reader = new FileReader(file);\n final BufferedReader bufferReader = new BufferedReader(reader);\n String[] cabecalho = bufferReader.readLine().split(\",\");\n int tipo;\n if(cabecalho.length == 3){\n if(cabecalho[2].equalsIgnoreCase(\"SIGLA\")){\n tipo = 1;\n System.out.println(\"TIPO PAIS\");\n }\n else {\n tipo = 2;\n System.out.println(\"TIPO CIDADE\");\n }\n }else {\n tipo = 3;\n System.out.println(\"TIPO ESTADO\");\n }\n \n while(true){\n String linha = bufferReader.readLine();\n if(linha == null){\n break;\n }\n String[] row = linha.split(\",\");\n switch (tipo) {\n case 1:\n Pais pais = new Pais();\n pais.setId(Long.parseLong(row[0]));\n pais.setNome(row[1]);\n pais.setSigla(row[2]);\n new PaisDaoImpl().insert(pais);\n break;\n case 2:\n Cidade cidade = new Cidade();\n cidade.setId(Long.parseLong(row[0]));\n cidade.setNome(row[1]);\n cidade.setEstado(Long.parseLong(row[2]));\n new CidadeDaoImpl().insert(cidade);\n break;\n default:\n Estado estado = new Estado();\n estado.setId(Long.parseLong(row[0]));\n estado.setNome(row[1]);\n estado.setUf(row[2]);\n estado.setPais(Long.parseLong(row[3]));\n new EstadoDaoImpl().insert(estado);\n break;\n }\n }\n \n } catch (FileNotFoundException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "@Override\n public String getDataInCSV() {\n return String.format(Locale.US, \"%d,%s\", this.timestamp, this.getStatusString());\n }", "private void openCsvDialog(){\n JFileChooser aFileChooser = new JFileChooser();\n aFileChooser.setFileFilter(new MyFileFilterCSV());\n if (lastUsedFileCSV != null){\n aFileChooser.setCurrentDirectory(lastUsedFileCSV.getParentFile());\n aFileChooser.setSelectedFile(lastUsedFileCSV);\n }else{\n File file = new File(aFileChooser.getCurrentDirectory(), dataset.getName()+\".csv\");\n aFileChooser.setSelectedFile(file);\n }\n int r = aFileChooser.showSaveDialog(this);\n if (r == JFileChooser.APPROVE_OPTION){\n setCursor(new Cursor(Cursor.WAIT_CURSOR));\n File file = aFileChooser.getSelectedFile();\n if(!MyUtilities.isCSVFile(file)){\n file = MyUtilities.getCSVFile(file);\n }\n lastUsedFileCSV = file;\n String sep = getCSVSeparator();\n PrintWriter writer = null;\n try{\n writer = new PrintWriter(new BufferedWriter (new OutputStreamWriter(new FileOutputStream(file), \"utf-8\")));\n // header\n String s = \"\";\n for(int j=0; j<dataset.getListDataHeader().length; j++){\n s += dataset.getListDataHeader()[j] == null? \"\" : dataset.getListDataHeader()[j].getValue();\n if(j <dataset.getListDataHeader().length -1)\n s+= sep;\n }\n writer.println(s);\n // data\n Data[][] data = dataset.getData();\n int nbR = dataset.getNbRows();\n int nbC = dataset.getNbCol();\n for(int i=0; i<nbR; i++){\n s = \"\";\n for(int j=0; j<nbC; j++){\n if(data[i][j] != null){\n if(data[i][j].isDoubleValue()){\n if(!Double.isNaN(data[i][j].getDoubleValue()))\n s += NumberFormat.getNumberInstance(getLocale()).format(data[i][j].getDoubleValue());\n }else{\n s += data[i][j].getValue();\n }\n }\n if(j <nbC -1)\n s+= sep;\n }\n writer.println(s);\n }\n //log\n\t\tdataProcessToolPanel.logExportCSV(dataset, file.getPath());\n }catch (IOException e){\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n displayError(new CopexReturn(getBundleString(\"MSG_ERROR_CSV\"), false), getBundleString(\"TITLE_DIALOG_ERROR\"));\n }\n finally{\n if (writer != null)\n try{\n writer.close();\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }catch (Exception e){\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n displayError(new CopexReturn(getBundleString(\"MSG_ERROR_CSV\"), false), getBundleString(\"TITLE_DIALOG_ERROR\"));\n }\n }\n }\n }", "private Iterable<CSVRecord> obtainCsvIterable()\n throws FileNotFoundException, IOException {\n return CSVFormat.RFC4180\n .withFirstRecordAsHeader()\n .parse(this.fileReader);\n\n }", "public void loadCSVData() throws IOException, SQLException {\r\n //SQL statement to load csv information into data table\r\n String insertvaluesSQL = \"INSERT INTO data\"\r\n + \"(InvoiceNo, StockCode, Description, Quantity, InvoiceDate, UnitPrice, CustomerID, Country)\"\r\n + \" VALUES (?,?,?,?,?,?,?,?);\";\r\n\r\n //code to read csv file taken from W03 practical\r\n BufferedReader br = new BufferedReader(new FileReader(filePath));\r\n String line = br.readLine();\r\n String[] informationArray;\r\n while (line != null) {\r\n informationArray = line.split(\",\");\r\n PreparedStatement preparedStatement = connection.prepareStatement(insertvaluesSQL);\r\n //the first '?' corresponds to the 0th term in the information array\r\n //the second '?' corresponds to the 1st term in the information array\r\n for (int i = 1; i < 9; i++) {\r\n preparedStatement.setString(i, informationArray[i - 1]);\r\n }\r\n preparedStatement.executeUpdate();\r\n line = br.readLine();\r\n }\r\n Statement statement = connection.createStatement();\r\n statement.executeUpdate(\"DELETE FROM data WHERE InvoiceNo = 'InvoiceNo';\");\r\n statement.close();\r\n }", "public interface CSVBean{\n \n}", "public interface CSVSerializable\n{\n\t//Parse string arguments to this object\n\tvoid parse(String[] args) throws Exception;\n\n\t//Return CSV format string\n\tString[] toCSV() throws Exception;\n\n\t//Get number of arguments or variables\n\tint getNumberOfArguments();\n}", "public ValidationInfo createCsv() {\n LocaleModule lm = LocaleManager.getInstance().getModule(LocaleModuleResource.Main);\n\n ValidationInfo vi = new ValidationInfo();\n if (_rows == null || _rows.size() == 0) {\n vi.setMessageWarning(lm.getString(\"general_export_nothing\"));\n return vi;\n }\n\n String fullFilePath = getFileName();\n\n StringBuilder sb = new StringBuilder();\n\n //create header\n String headerRow = _rows.get(0).createCsvRow(true);\n\n sb.append(headerRow + System.lineSeparator());\n\n try {\n //create rows\n for (Exportable e : _rows) {\n String rowString = e.createCsvRow(false);\n sb.append(rowString + System.lineSeparator());\n }\n\n //Output\n String strContent = sb.toString();\n Utils.writeFile(strContent, fullFilePath);\n\n vi.setMessageSuccess(String.format(lm.getString(\"general_export_success\"),\n _rows.size(), fullFilePath));\n } catch (Exception ex) {\n vi.setMessageError(lm.getString(\"general_export_error\"));\n }\n\n //open\n Utils.openFolder(fullFilePath);\n\n return vi;\n }", "String toCSVString();", "@Override\n public ToDoList readCSV(String csvPath) throws InvalidArgumentException {\n this.csvPath = csvPath;\n this.toDoList = new ToDoList();\n\n BufferedReader inputFile = null;\n try {\n inputFile = new BufferedReader(new FileReader(this.csvPath));\n\n String line = inputFile.readLine();\n if (line == null) {\n inputFile.close();\n return this.toDoList;\n } // Empty CSV file, no need for processing.\n this.processHeader(line);\n while ((line = inputFile.readLine()) != null) {\n this.processToDoItem(line);\n }\n inputFile.close();\n return this.toDoList;\n } catch (FileNotFoundException fnfe) {\n throw new InvalidArgumentException(\"OOPS! File not found!\");\n } catch (IOException ioe) {\n throw new InvalidArgumentException(\"There is somthing wrong!\");\n }\n }", "private Result outputCsv(Request request, Entry entry) throws Exception {\r\n Result result = getCsvResult(request, entry);\r\n result.setReturnFilename(\r\n IOUtil.stripExtension(getStorageManager().getFileTail(entry))\r\n + \".csv\");\r\n result.setMimeType(\"text/csv\");\r\n\r\n return result;\r\n }", "public void dataFileCreate() {\r\n\t\tString COMMA_DELIMITER = \",\";\r\n\t\tString NEW_LINE_SEPERATOR = \"\\n\";\r\n\t\tString FILE_HEADER = \"Title,First Name,Last Name,Email,Phone Number\";\r\n\t\ttry {\r\n\t\t\tList<Customer> dataList = new ArrayList<Customer>();\r\n\t\t\tdataList.add(\r\n\t\t\t\t\tnew Customer(title, customerFirstName, customerLastName, custromerEmailId, customerPhoneNumber));\r\n\r\n\t\t\tFileWriter fileWriter = new FileWriter(\"CustomerDetails.csv\");\r\n\t\t\tBufferedWriter bufferWriter = new BufferedWriter(fileWriter);\r\n\t\t\tbufferWriter.append(FILE_HEADER);\r\n\r\n\t\t\tfor (Customer c : dataList) {\r\n\t\t\t\tbufferWriter.write(NEW_LINE_SEPERATOR);\r\n\t\t\t\tbufferWriter.write(c.getTitle());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(c.getFirstName());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(c.getLastName());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(c.getEmailAddress());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(String.valueOf(c.getPhone()));\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t}\r\n\r\n\t\t\tbufferWriter.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "public String[] toCsv();", "String[] toCSV() throws Exception;", "@Test\n public void testCSVHandlerForEmployees() throws IOException, URISyntaxException {\n val csvHandler = TestInjector.create(CSVHandler.class);\n // todo clean this up but also keep it working on windows\n val input = Paths.get(getClass().getResource(\"PrototypeEmployees.csv\").toURI()).toString();\n val output = \"build/Employees.csv\";\n csvHandler.importEmployees(input);\n csvHandler.exportEmployees(output);\n val inputLines = Files.readAllLines(Paths.get(input));\n val outputLines = Files.readAllLines(Paths.get(output));\n assertEquals(inputLines.size(), outputLines.size());\n assertEquals(inputLines.get(0), outputLines.get(0)); // make sure header lines are the same\n assertTrue(outputLines.containsAll(inputLines));\n assertTrue(inputLines.containsAll(outputLines));\n }", "private <T> CsvToBean<T> getData(Reader reader, Class<T> type) {\n return new CsvToBeanBuilder<T>(reader)\n .withSeparator(',')\n .withIgnoreLeadingWhiteSpace(true)\n .withIgnoreEmptyLine(true)\n .withType(type)\n .build();\n }", "public void readEntityCSV(String line) {\n List<String> items = Arrays.asList(line.split(\",\"));\n this.setId(Long.valueOf(items.get(0)));\n this.noOfRounds = Integer.parseInt(items.get(1));\n this.caliber = Float.parseFloat(items.get(2));\n this.manufacturer = items.get(3);\n this.price = Float.parseFloat(items.get(4));\n }", "private void readData () throws SQLException {\n int currentFetchSize = getFetchSize();\n setFetchSize(0);\n close();\n setFetchSize(currentFetchSize);\n moveToInsertRow();\n\n CSVRecord record;\n\n for (int i = 1; i <= getFetchSize(); i++) {\n lineNumber++;\n try {\n\n if (this.records.iterator().hasNext()) {\n record = this.records.iterator().next();\n\n for (int j = 0; j <= this.columnsTypes.length - 1; j++) {\n\n switch (this.columnsTypes[j]) {\n case \"VARCHAR\":\n case \"CHAR\":\n case \"LONGVARCHAR\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateString(j + 1, record.get(j));\n break;\n case \"INTEGER\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateInt(j + 1, Integer.parseInt(record.get(j)));\n break;\n case \"TINYINT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateByte(j + 1, Byte.parseByte(record.get(j)));\n break;\n case \"SMALLINT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateShort(j + 1, Short.parseShort(record.get(j)));\n break;\n case \"BIGINT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateLong(j + 1, Long.parseLong(record.get(j)));\n break;\n case \"NUMERIC\":\n case \"DECIMAL\":\n /*\n * \"0\" [0,0]\n * \"0.00\" [0,2]\n * \"123\" [123,0]\n * \"-123\" [-123,0]\n * \"1.23E3\" [123,-1]\n * \"1.23E+3\" [123,-1]\n * \"12.3E+7\" [123,-6]\n * \"12.0\" [120,1]\n * \"12.3\" [123,1]\n * \"0.00123\" [123,5]\n * \"-1.23E-12\" [-123,14]\n * \"1234.5E-4\" [12345,5]\n * \"0E+7\" [0,-7]\n * \"-0\" [0,0]\n */\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateBigDecimal(j + 1, new BigDecimal(record.get(j)));\n break;\n case \"DOUBLE\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateDouble(j + 1, Double.parseDouble(record.get(j)));\n break;\n case \"FLOAT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateFloat(j + 1, Float.parseFloat(record.get(j)));\n break;\n case \"DATE\":\n // yyyy-[m]m-[d]d\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateDate(j + 1, Date.valueOf(record.get(j)));\n break;\n case \"TIMESTAMP\":\n // yyyy-[m]m-[d]d hh:mm:ss[.f...]\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateTimestamp(j + 1, Timestamp.valueOf(record.get(j)));\n break;\n case \"TIME\":\n // hh:mm:ss\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateTime(j + 1, Time.valueOf(record.get(j)));\n break;\n case \"BOOLEAN\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateBoolean(j + 1, convertToBoolean(record.get(j)));\n break;\n default:\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateString(j + 1, record.get(j));\n break;\n }\n }\n\n insertRow();\n incrementRowCount();\n }\n } catch (Exception e) {\n LOG.error(\"An error has occurred reading line number {} of the CSV file\", lineNumber, e);\n throw e;\n }\n }\n\n moveToCurrentRow();\n beforeFirst(); \n }", "public void Read_Csv() {\n\t\t\n\t\tFile file = new File(\"Faucets.csv\");\n\t\tif(file.exists() == false) {\n\t\t\ttry {\n\t\t\t\t if (file.createNewFile()) {\n\t\t\t\t System.out.println(\"File created: \" + file.getName());\n\t\t\t\t } else {\n\t\t\t\t System.out.println(\"File already exists... Error\");\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\tFileWriter myWriter = new FileWriter(\"Faucets.csv\");\n\t\t\t\tmyWriter.write(\"Freebitco.in,3600,228,\");\n\t\t\t\tmyWriter.close();\n\t\t\t\t\n\t\t\t\t\n\t\t\t}catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//Reading the file\n\t\tString line = null;\n\t\ttry {\n\t\t\tFileReader fileReader = new FileReader(\"Faucets.csv\");\n\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\t\t\t\n\t\t\tint x = 0;\n\t\t\tint commacounter = 0;\n\t\t\tint commaposition[] = new int[3];\n\t\t\twhile((line = bufferedReader.readLine()) != null) {\n\t\t\t\t\n\t\t\t\twhile(x < line.length()) {\n\t\t\t\t\t\n\t\t\t\t\tif(line.charAt(x) == ',') {\n\t\t\t\t\t\tcommaposition[commacounter] = x;\n\t\t\t\t\t\tcommacounter +=1;\n\t\t\t\t\t}\n\t\t\t\t\tif(commacounter == 3) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tFaucets.site[amount_counter] = line.substring(0, commaposition[0]);\n\t\t\t\t\t\tFaucets.time[amount_counter] = Integer.parseInt(line.substring(commaposition[0]+1, commaposition[1]));\n\t\t\t\t\t\tFaucets.amount[amount_counter] = Integer.parseInt(line.substring(commaposition[1]+1, commaposition[2]));\n\t\t\t\t\t\tamount_counter += 1;\n\t\t\t\t\t\tcommacounter=0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tx+=1;\n\t\t\t\t}\n\t\t\t\tx=0;\n\t\t\t}\n\t\t\tbufferedReader.close();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\n\t\t\t\n\t}", "static public List<Product> productReader() throws IOException {\n BufferedReader csvReader = new BufferedReader(new FileReader(PRODUCTS_REFERENCE_FILE));\n String row;\n List<Product> dataList = new ArrayList<>();\n\n row = csvReader.readLine();\n while ((row = csvReader.readLine()) != null){\n\n Product data = new Product();\n //I separate the row data by a separator, a coma in this case and add all the data in the class\n String[] datas = row.split(SEPARATOR_COLON);\n\n data.setProduct_id(Integer.parseInt(datas[0]));\n data.setName(datas[1]);\n data.setDescription(datas[2]);\n data.setCategory_id(Integer.parseInt(datas[3]));\n\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"MM/dd/yyyy\");\n\n //Since some dates had just one number for the month, I had to use this to add a 0\n //to make all the dates the same length after getting rid of the 0:01 that was not necessary\n String[] creationDate = datas[4].split(\" \");\n if(creationDate[0].length() == 9){\n creationDate[0] = \"0\"+ creationDate[0];\n }\n data.setCreation_date(LocalDate.parse(creationDate[0], formatter));\n\n creationDate = datas[5].split(\" \");\n if(creationDate[0].length() == 9){\n creationDate[0] = \"0\"+ creationDate[0];\n }\n data.setUpdate_date(LocalDate.parse(creationDate[0], formatter));\n\n creationDate = datas[6].split(\" \");\n if(creationDate[0].length() == 9){\n creationDate[0] = \"0\"+ creationDate[0];\n }\n data.setLast_purchased_date(LocalDate.parse(creationDate[0], formatter));\n\n dataList.add(data);\n\n }\n return dataList;\n\n }", "public Instances openCSV(String path)\n\t{\n\t\ttry\n\t\t{\n\t\t\tCSVLoader loader = new CSVLoader();\n\t\t\tloader.setSource(new File(path));\n\t\t\tdataset = loader.getDataSet();\n\t\t\t\n\t\t\t//VERIFICA QUE HAYA UNA CLASE, SI NO LO HAY LO ESTABLECE\n\t\t\tif (dataset.classIndex() == -1)\n\t\t\t\tdataset.setClassIndex(dataset.numAttributes() - 1);\n\t\t}\n\t\tcatch(IOException ex)\n\t\t{\n\t\t\tSystem.out.println(ex);\n\t\t}\n\t\t\n\t\treturn this.dataset;\n\t}", "public void loadListFromCsv() {\n List<Publication> list = new ArrayList<>();\n String line;\n try(BufferedReader bufferedReader = new BufferedReader(new FileReader(\"saves/data.csv\"))){\n while ((line = bufferedReader.readLine()) != null){\n String[] attributes = line.split(\",(?=([^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\n String[] formattedAttributes = formatAttributes(attributes);\n Publication book = createPublicationFromAttributes(formattedAttributes);\n list.add(book);\n }\n } catch (IOException e){\n System.out.println(\"IOException occurred: \" + e.getMessage());\n }\n\n this.library = list;\n }", "public void csv() throws IOException {\n\t\t\n\t\tSystem.out.println(); //spacing\\\n\t\tFileWriter f;\n\t\t\n\t\tif (bundle.getString(\"csvName\").endsWith(\".csv\")) {\n\t\t\tf = new FileWriter(bundle.getString(\"csvName\"));\n\t\t}\n\t\t\n\t\telse {\n\t\t\tf = new FileWriter(bundle.getString(\"csvName\") + \".csv\");\n\t\t}\n\t\t\n\t\tPrintWriter p = new PrintWriter(f);\n\t\tObject[][] input = {revisionsToo, flowOfTime};\n\t\tCSVWork(input, p, f);\n\t\t\n\t\tObject[][] nextInput = {revisions, ratings};\n\t\tCSVWork(nextInput, p, f);\n\t\t\n\t\tnextInput[1] = irrelevants;\n\t\tCSVWork(nextInput, p, f);\n\t\t\n\t\tnextInput[1] = relevants;\n\t\tCSVWork(nextInput, p, f);\n\t\t\n\t\tnextInput[0] = intervals;\n\t\tnextInput[1] = commits;\n\t\tCSVWork(nextInput, p, f);\n\t\t\n\t\tspecialCSV(existsHere, p);\n\t\t\n\t\tp.flush();\n\t\tp.close();\n\t\tf.close();\n\t}", "public RegistroCsv(String rutaArchivo) throws IOException {\n super(rutaArchivo);\n }", "@SuppressWarnings(\"resource\")\r\n\tpublic static ArrayList<UserInfo> getUserDataFromCsvFile()\r\n\t{\r\n\t\t\r\n\t\tArrayList<UserInfo> unfList=null;\r\n\t\ttry{\r\n\t\t\tFile myObj= new File(\"E:\\\\Selenium Setup\\\\datadriven.csv\");\r\n\t\t\tunfList = new ArrayList<UserInfo>();\r\n\t\t\tScanner myReader= new Scanner(myObj);\r\n\t\t\tint count=0;\r\n\t\t\twhile (myReader.hasNextLine()) \r\n\t\t\t{\r\n\t\t\t\tString data= myReader.nextLine();\r\n\t\t\t\tif (count !=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tString[] info =data.split(\"\\\\,\");\r\n\t\t\t\t\tunfList.add(new UserInfo(info[0],info[1]));\r\n\t\t\t\t\t//unfList.add(new UserInfo(info[0], info[1]));\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t++count;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}catch (Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t}\r\n\t\t\treturn unfList;\r\n\t}", "public void LoadFromCSV(){\n InputStream inputStream = getResources().openRawResource(R.raw.movielist);\n CSVinput csVinput = new CSVinput(inputStream);\n final List<String[]> movList = csVinput.read();\n\n for(String[] data : movList) {\n itemArrAdapt.add(data);\n }\n }", "public CSVExporter() {\n super(NAME, CONTENTTYPE);\n }", "static CsvParser getCsvParser(){\n CsvParserSettings settings = new CsvParserSettings();\n settings.getFormat().setLineSeparator(\"\\n\");\n return new CsvParser(settings);\n }", "public void createArrayList() throws IOException,ParseException\r\n\t {\n\t \t\r\n\t try(ICsvBeanReader beanReader = new CsvBeanReader(new FileReader(CSV_FILENAME), \r\n\t \t\tCsvPreference.STANDARD_PREFERENCE))\r\n\t {\r\n\t // the header elements are used to map the values to the bean\r\n\t final String[] headers = beanReader.getHeader(true);\r\n\t final CellProcessor[] processors = getProcessors();\r\n\t Complete customer;\r\n\t String gender,fullname;\r\n\t while ((customer = beanReader.read(Complete.class, headers, processors)) != null)\r\n\t {\r\n\t fullname = customer.getFirstname() + \" \" + customer.getLastname();\r\n\t if(customer.getGender().equals(\"f\"))\r\n\t \t gender = \"female\";\r\n\t \telse\r\n\t gender = \"male\";\r\n\t Date dob=new SimpleDateFormat(\"MM/dd/yyyy\").parse(customer.getDob()); \r\n\t String pattern = \"dd/MM/yyyy\";\r\n\t SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\r\n \tString date = simpleDateFormat.format(dob);\r\n\t String age = calcAge(date);\r\n\t if(customer.getCategory().equals(\"student\"))\r\n\t {\r\n\t \tString grade = calcGrade(customer.getSec_percent());\r\n\t \tstudentList.add(new Student(customer.getId(),fullname,gender,date,age,customer.getAadhar_number(),customer.getCity(),\r\n\t \tcustomer.getContact_number(),Integer.parseInt(customer.getRoll_no()),customer.getClass_no(),Integer.parseInt(customer.getTotal_marks())\r\n\t \t,grade,Integer.parseInt(customer.getSec_percent()),customer.getHs_stream()));\r\n\t \t\t\r\n\t } \r\n\t else //for teacher\r\n\t {\r\n\t \tDate doj=new SimpleDateFormat(\"MM/dd/yyyy\").parse(customer.getDoj()); \r\n\t \tString pattern1 = \"dd/MM/yyyy\";\r\n\t SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat(pattern);\r\n \tString join_date = simpleDateFormat.format(doj);\r\n\t \tString str_sub_teachers = customer.getSubject_teaches();\r\n\t \tString service_period = calService(join_date);\r\n\t \tList<String> sub_teachers = new ArrayList<String>(Arrays.asList(str_sub_teachers.split(\"-\")));\r\n\t \t\t\t\r\n\t \t\tteacherList.add(new Teacher(customer.getId(),fullname,gender,date,age,customer.getAadhar_number(),customer.getCity(),\r\n \t\t\t\tcustomer.getContact_number(),customer.getEmp_no(),customer.getClass_teacher_of(),join_date,service_period\r\n \t\t\t\t,customer.getPrevious_school(),customer.getPost(),Integer.parseInt(customer.getSalary()),sub_teachers));\r\n }\r\n\t \r\n\t } //while\r\n\t }\r\n\t System.out.println(\"ArrayList Sucessfully Created\");\t\r\n\t \t\r\n\t }", "public static StockSetData getStockSetDataFromCSV(String filePath) {\r\n int TOP_HEADER_ROW_INDEX = 4;\r\n // Create our BuyOptionObject\r\n StockSetData stockSetData = new StockSetData();\r\n // Get all the data as records\r\n List<List<String>> records = getCSV2(filePath);\r\n // Label the columns\r\n List<String> topHeader = records.get(TOP_HEADER_ROW_INDEX);\r\n List<String> nameHeader = records.get(TOP_HEADER_ROW_INDEX + 1);\r\n\r\n // loop horizontally through the elements in the top header\r\n for (int i = 0; i < topHeader.size(); i++) {\r\n // decide the type of column\r\n\r\n if (topHeader.get(i).equals(\"l\")) {\r\n ArrayList<String> loaderArray = new ArrayList<>();\r\n for (int j = TOP_HEADER_ROW_INDEX + 2; j < records.size(); j++) {\r\n loaderArray.add(records.get(j).get(i));\r\n }\r\n ColumnAndName columnAndName = new ColumnAndName(loaderArray ,nameHeader.get(i));\r\n stockSetData.getLabelValues().add(columnAndName);\r\n }\r\n if (topHeader.get(i).equals(\"s\")) {\r\n ArrayList<String> loaderArray = new ArrayList<>();\r\n for (int j = TOP_HEADER_ROW_INDEX + 2; j < records.size(); j++) {\r\n loaderArray.add(records.get(j).get(i));\r\n }\r\n ColumnAndName columnAndName = new ColumnAndName(loaderArray ,nameHeader.get(i));\r\n stockSetData.getSortingValues().add(columnAndName);\r\n }\r\n if (topHeader.get(i).equals(\"f\")) {\r\n ArrayList<String> loaderArray = new ArrayList<>();\r\n for (int j = TOP_HEADER_ROW_INDEX + 2; j < records.size(); j++) {\r\n loaderArray.add(records.get(j).get(i));\r\n }\r\n ColumnAndName columnAndName = new ColumnAndName(loaderArray ,nameHeader.get(i));\r\n stockSetData.getFitnessValues().add(columnAndName);\r\n }\r\n\r\n\r\n }\r\n\r\n return stockSetData;\r\n }", "@Override\n\tprotected String objectToCSVRecord(Object object) {\n\t\tStringBuilder str = new StringBuilder();\n\t\tstr.append(((Item) object).getItemno());\n\t\tstr.append(\",\");\n\t\tstr.append(((Item) object).getItemName());\n\t\tstr.append(\",\");\n\t\tstr.append(((Item) object).getUnitPrice());\n\t\tstr.append(\",\");\n \tString one=str.toString();\n \treturn one;\n\t\t\n\t\t \n\t}", "@Override\r\n\tpublic ArrayList<String> importCsv(File file) {\r\n\t\t\tFileReader monFichier = null;\r\n\t\t\tBufferedReader tampon = null;\r\n\t\t\tArrayList<String> aLImport = new ArrayList<String>();\r\n\t\t\tString[] tabString ;\r\n\t\t\tint sizeLine;\r\n\t\t\r\n\t\t\ttry {\r\n\t\t\t\t// file path\r\n\t\t\t\tmonFichier = new FileReader(file.getAbsolutePath());\r\n\t\t\t\ttampon = new BufferedReader(monFichier);\r\n\r\n\t\t\t\t// read the first line of the file .csv\r\n\t\t\t\tString ligneTemp = tampon.readLine();\r\n\t\t\t\ttabString = ligneTemp.split(\";\");\r\n\t\t\t\tthis.setNbColumnsRead(tabString.length);\r\n\t\t\t\t\r\n\t\t\t\t//Start of the actual content (first line only acting as a header)\r\n\t\t\t\tligneTemp = tampon.readLine();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\t// faire la gestion des erreurs \r\n\t\t\t\t\t\t/*JOptionPane.showMessageDialog(this, \"Le fichier .csv n'est pas valide\", \"Erreur !\",\r\n\t\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);*/\r\n\t\t\t\t\r\n\t\t\t\t// read all the lines one by one and split them to keep the\r\n\t\t\t\t// structure's name\r\n\t\t\t\twhile (ligneTemp != null) {\t\t\t\t\t\r\n\t\t\t\t\ttabString = ligneTemp.split(\";\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tsizeLine = tabString.length;\r\n\t\t\t\t\t//This for start at 1 in order to skip the first cell, assuming it is always \"Start\" and is therefore not required in the ArrayList\r\n\t\t\t\t\tfor (int i = 1; i < sizeLine; i+=2) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!tabString[i].contains(\"End\")){\r\n\t\t\t\t\t\t\taLImport.add(tabString[i]);\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\tligneTemp = tampon.readLine();\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (IOException exception) {\r\n\t\t\t\texception.printStackTrace();\r\n\t\t\t\treturn null;\r\n\t\t\t} finally {\r\n\t\t\t\ttry {\r\n\t\t\t\tif (tampon != null)\r\n\t\t\t\t{\r\n\t\t\t\t\ttampon.close();\r\n\t\t\t\t}\r\n\t\t\t\tif (monFichier != null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmonFichier.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (IOException exception1) {\r\n\t\t\t\t\texception1.printStackTrace();\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\treturn aLImport;\t\r\n\t}", "private String getCSVSeparator(){\n DecimalFormatSymbols s = new DecimalFormatSymbols(getLocale());\n if(s.getDecimalSeparator() == ',')\n return \";\";\n else\n return \",\";\n }", "protected String getExcelCSVData(HttpServletRequest request, RecordSet inputRecords, String layerId) {\r\n Logger l = LogUtils.getLogger(getClass());\r\n if (l.isLoggable(Level.FINER)) {\r\n l.entering(getClass().getName(), \"getExcelCSVData\", new Object[]{request, inputRecords, layerId});\r\n }\r\n String delimiter = \"\\\"\";\r\n String comma = \",\";\r\n setDataBean(request, inputRecords);\r\n loadGridHeader(request, getAnchorColumnName(), layerId);\r\n\r\n XMLGridHeader header = (XMLGridHeader) request.getAttribute(\"gridHeaderBean\");\r\n BaseResultSet data = (BaseResultSet) request.getAttribute(\"dataBean\");\r\n\r\n StringBuffer excelString = new StringBuffer(\"\");\r\n OasisFields fieldsMap = (OasisFields) request.getAttribute(IOasisAction.KEY_FIELDS);\r\n // Store the visible fields.\r\n List visibleFields = new ArrayList();\r\n if (fieldsMap.hasLayer(layerId)) {\r\n List layerFields = fieldsMap.getLayerFields(layerId);\r\n Iterator layerIt = layerFields.iterator();\r\n // Get column title, the fields have been sorted.\r\n while (layerIt.hasNext()) {\r\n OasisFormField field = (OasisFormField) (layerIt.next());\r\n if (field.getIsVisible()) {\r\n visibleFields.add(field);\r\n excelString.append(delimiter).append(field.getLabel()).append(delimiter).append(comma);\r\n }\r\n }\r\n excelString.append(\"\\n\");\r\n // Get fields\r\n boolean bDateInd, bDateTimeInd, bUrlInd, isDataPresent;\r\n int colCount = data.getColumnCount();\r\n // Process columns.\r\n header.processDataColumns(data);\r\n data.beforeFirst();\r\n // Start loop through rows.\r\n while (data.next()) {\r\n // Start loop through visible columns.\r\n int headerIdx = 0;\r\n Iterator fieldIdIt = visibleFields.iterator();\r\n while (fieldIdIt.hasNext()) {\r\n OasisFormField visibleField = (OasisFormField) (fieldIdIt.next());\r\n String visibleFieldName = visibleField.getFieldId();\r\n visibleFieldName = visibleFieldName.substring(0, visibleFieldName.indexOf(header.getGridHeaderFieldnameSuffix()));\r\n for (int i = 1; i <= colCount; i++) {\r\n // System handles the visible fields only.\r\n String dataColumnName = data.getColumnName(i);\r\n if (!visibleFieldName.equalsIgnoreCase(dataColumnName)) {\r\n continue;\r\n }\r\n // skip xxxLOVLABEL columns\r\n if (dataColumnName.endsWith(\"LOVLABEL\"))\r\n continue;\r\n // skip xxx_FORMATTED columns\r\n if (dataColumnName.endsWith(FormatUtils.DISPLAY_FIELD_EXTENTION))\r\n continue;\r\n\r\n bDateInd = false;\r\n bDateTimeInd = false;\r\n bUrlInd = false;\r\n\r\n headerIdx = header.getHeaderIndex(dataColumnName).intValue();\r\n String dataItem = data.getString(dataColumnName, \"\");\r\n isDataPresent = (dataItem != null && dataItem.trim().length() > 0);\r\n HashMap headerMap = header.getHeaderMap(headerIdx);\r\n int type = ((Integer) headerMap.get(XMLGridHeader.CN_TYPE)).intValue();\r\n Integer id = (Integer) headerMap.get(XMLGridHeader.CN_DISPLAY);\r\n int display = (id == null) ? 0 : id.intValue();\r\n String name = (String) headerMap.get(XMLGridHeader.CN_NAME);\r\n ArrayList lov = (ArrayList) headerMap.get(XMLGridHeader.CN_LISTDATA);\r\n String iDec = (String) headerMap.get(XMLGridHeader.CN_DECIMALPLACES);\r\n boolean isProtected = ((Boolean) headerMap.get(XMLGridHeader.CN_PROTECTED)).booleanValue();\r\n\r\n // If this field is protected, set the data item to null as it should not appear in the xml\r\n if (isProtected)\r\n dataItem = \"\";\r\n if (!StringUtils.isBlank(iDec))\r\n if (!FormatUtils.isLong(iDec))\r\n iDec = null;\r\n\r\n // Start visible items\r\n if (!headerMap.get(XMLGridHeader.CN_VISIBLE).equals(\"N\")) {\r\n excelString.append(delimiter);\r\n switch (type) {\r\n //Percentage field type\r\n case XMLGridHeader.TYPE_PERCENTAGE:\r\n case XMLGridHeader.TYPE_UPDATEONLYPERCENTAGE:\r\n if (iDec == null)\r\n excelString.append(FormatUtils.formatPercentage(dataItem));\r\n else\r\n excelString.append(FormatUtils.formatPercentage(dataItem, Integer.parseInt(iDec)));\r\n break;\r\n case XMLGridHeader.TYPE_PHONE:\r\n case XMLGridHeader.TYPE_UPDATEONLYPHONE:\r\n excelString.append(FormatUtils.formatPhoneNumberForDisplay(dataItem));\r\n name += FormatUtils.DISPLAY_FIELD_EXTENTION;\r\n break;\r\n case XMLGridHeader.TYPE_FORMATMONEY:\r\n case XMLGridHeader.TYPE_UPDATEONLYMONEY:\r\n if (iDec == null)\r\n excelString.append(FormatUtils.formatCurrency(dataItem));\r\n else\r\n excelString.append(FormatUtils.formatCurrency(dataItem, Integer.parseInt(iDec)));\r\n break;\r\n case XMLGridHeader.TYPE_FORMATDATE:\r\n case XMLGridHeader.TYPE_DATE:\r\n case XMLGridHeader.TYPE_UPDATEONLYDATE:\r\n java.util.Date dte = data.getDate(i);\r\n excelString.append(OasisTagHelper.formatDateAsXml(dte));\r\n if (!FormatUtils.isDateFormatUS()) {\r\n excelString.append(OasisTagHelper.formatCustomDateAsXml(dte));\r\n name += FormatUtils.DISPLAY_FIELD_EXTENTION;\r\n }\r\n bDateInd = true;\r\n break;\r\n case XMLGridHeader.TYPE_FORMATDATETIME:\r\n case XMLGridHeader.TYPE_UPDATEONLYDATETIME:\r\n java.util.Date dtTime = data.getDate(i);\r\n excelString.append(OasisTagHelper.formatDateTimeAsXml(dtTime));\r\n if (!FormatUtils.isDateFormatUS()) {\r\n excelString.append(OasisTagHelper.formatCustomDateTimeAsXml(dtTime));\r\n name += FormatUtils.DISPLAY_FIELD_EXTENTION;\r\n }\r\n bDateTimeInd = true;\r\n break;\r\n case XMLGridHeader.TYPE_URL:\r\n case XMLGridHeader.TYPE_UPDATEONLYURL:\r\n bUrlInd = true;\r\n if (isDataPresent) {\r\n if (display == XMLGridHeader.DISPLAY_MONEY) {\r\n if (iDec == null)\r\n excelString.append(ResponseUtils.filter(FormatUtils.formatCurrency(dataItem)));\r\n else\r\n excelString.append(ResponseUtils.filter(FormatUtils.formatCurrency(dataItem, Integer.parseInt(iDec))));\r\n }\r\n else\r\n excelString.append(ResponseUtils.filter(dataItem));\r\n }\r\n break;\r\n case XMLGridHeader.TYPE_UPDATEONLYDROPDOWN:\r\n if (isDataPresent) {\r\n excelString.append(ResponseUtils.filter(dataItem));\r\n }\r\n if (OasisTagHelper.displayReadonlyCodeLookupAsLabel() && lov != null) {\r\n String decodedValue = CollectionUtils.getDecodedValue(lov, dataItem);\r\n if (CodeLookupManager.getInstance().getSelectOptionLabel().equals(decodedValue)) {\r\n decodedValue = \"\";\r\n }\r\n excelString.append(ResponseUtils.filter(decodedValue));\r\n name += \"LOVLABEL\";\r\n }\r\n // Populate url column in data island if there's href defined for this drop down list field\r\n if (!StringUtils.isBlank((String) headerMap.get(XMLGridHeader.CN_FIELD_HREF))) {\r\n bUrlInd = true;\r\n }\r\n break;\r\n case XMLGridHeader.TYPE_UPDATEONLY_MULTIPLE_DROPDOWN:\r\n if (isDataPresent) {\r\n excelString.append(ResponseUtils.filter(dataItem));\r\n }\r\n if (OasisTagHelper.displayReadonlyCodeLookupAsLabel() && lov != null) {\r\n String decodedValue = CollectionUtils.getDecodedValues(lov, dataItem.split(\",\"));\r\n if (CodeLookupManager.getInstance().getSelectOptionLabel().equals(decodedValue)) {\r\n decodedValue = \"\";\r\n }\r\n excelString.append(ResponseUtils.filter(decodedValue));\r\n name += \"LOVLABEL\";\r\n }\r\n if (!StringUtils.isBlank((String) headerMap.get(XMLGridHeader.CN_FIELD_HREF))) {\r\n bUrlInd = true;\r\n }\r\n break;\r\n default:\r\n if (isDataPresent) {\r\n // if a list of values is present for a readonly field, decode\r\n if (type == XMLGridHeader.TYPE_DEFAULT && lov != null)\r\n excelString.append(ResponseUtils.filter(CollectionUtils.getDecodedValue(lov, dataItem)));\r\n else if (!FormatUtils.isDateFormatUS() && FormatUtils.isDate(dataItem))\r\n excelString.append(ResponseUtils.filter(FormatUtils.formatDateForDisplay(dataItem)));\r\n else\r\n excelString.append(ResponseUtils.filter(dataItem));\r\n }\r\n break;\r\n }\r\n excelString.append(delimiter).append(comma);\r\n }\r\n }\r\n } // End Visible items\r\n // Append \"\\n\" to the every line.\r\n excelString.append(\"\\n\");\r\n }\r\n }\r\n if (l.isLoggable(Level.FINER)) {\r\n l.exiting(getClass().getName(), \"getExcelCSVData\", excelString);\r\n }\r\n return excelString.toString();\r\n }", "List<String[]> readCsv(String inputFilePath, char separator)throws IOException;", "public void openPlayerDataFromCSV() throws FileNotFoundException {\n csvReader = new BufferedReader(new FileReader(PATH_TO_CSV));\n }", "public List<Utilisateur> generateData() throws FileNotFoundException, IOException {\n Reader reader = new FileReader(\"F:\\\\Bibliothèques\\\\Documents\\\\MIAGE M1\\\\WEB\\\\TPWeb\\\\src\\\\main\\\\webapp\\\\data.csv\");\n\n CSVReader<Utilisateur> csvPersonReader = new CSVReaderBuilder<Utilisateur>(reader).entryParser(new UtilisateurEntryParser()).build();\n\n List<Utilisateur> persons = csvPersonReader.readAll();\n\n return persons;\n\n }", "public void saveAsCsv() {\n\n try(BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(\"saves/data.csv\"))){\n for(Publication book : library){\n StringBuilder stringBuilder = new StringBuilder();\n\n stringBuilder.append(\"\\\"\").append(book.getClass().getSimpleName()).append(\"\\\"\"); // type\n stringBuilder.append(\",\"); // delimiter\n stringBuilder.append(\"\\\"\").append(book.getTitle()).append(\"\\\"\"); // title\n stringBuilder.append(\",\");\n stringBuilder.append(\"\\\"\").append(book.getAuthor().toString()).append(\"\\\"\"); // author\n stringBuilder.append(\",\");\n stringBuilder.append(\"\\\"\").append(book.getPages()).append(\"\\\"\"); // pages\n stringBuilder.append(\",\");\n stringBuilder.append(\"\\\"\").append(book.getIsbn()).append(\"\\\"\"); // isbn\n stringBuilder.append(\",\");\n stringBuilder.append(\"\\\"\").append(book.getReleaseYear()).append(\"\\\"\"); // year\n stringBuilder.append(\"\\n\");\n\n bufferedWriter.write(stringBuilder.toString()); // creates a line of one publication information and puts it to file\n }\n } catch (IOException e){\n System.out.println(\"IOException occurred: \" + e.getMessage());\n }\n }", "public static LinkedList<Patient> CSVImport(String str) {\n\t\treturn CSVImport(new File(str));\n\t}", "public interface ICsvListWriter extends ICsvWriter {\n\t\n\t/**\n\t * Writes a List of Objects as columns of a CSV file. <tt>toString()</tt> will be called on each element prior to\n\t * writing.\n\t * \n\t * @param columns\n\t * the columns to write\n\t * @throws IllegalArgumentException\n\t * if columns.size == 0\n\t * @throws IOException\n\t * If an I/O error occurs\n\t * @throws NullPointerException\n\t * if columns is null\n\t * @throws SuperCsvException\n\t * if there was a general exception while writing\n\t * @since 1.0\n\t */\n\tvoid write(List<?> columns) throws IOException;\n\t\n\t/**\n\t * Writes a List of Objects as columns of a CSV file, performing any necessary processing beforehand.\n\t * <tt>toString()</tt> will be called on each (processed) element prior to writing.\n\t * \n\t * @param columns\n\t * the columns to write\n\t * @param processors\n\t * an array of CellProcessors used to further process data before it is written (each element in the\n\t * processors array corresponds with a CSV column - the number of processors should match the number of\n\t * columns). A <tt>null</tt> entry indicates no further processing is required (the value returned by\n\t * toString() will be written as the column value).\n\t * @throws IllegalArgumentException\n\t * if columns.size == 0\n\t * @throws IOException\n\t * If an I/O error occurs\n\t * @throws NullPointerException\n\t * if columns or processors is null\n\t * @throws SuperCsvConstraintViolationException\n\t * if a CellProcessor constraint failed\n\t * @throws SuperCsvException\n\t * if there was a general exception while writing/processing\n\t * @since 1.0\n\t */\n\tvoid write(List<?> columns, CellProcessor[] processors) throws IOException;\n\t\n\t/**\n\t * Writes a array of Objects as columns of a CSV file. <tt>toString()</tt> will be called on each element prior to\n\t * writing.\n\t * \n\t * @param columns\n\t * the columns to write\n\t * @throws IllegalArgumentException\n\t * if columns.length == 0\n\t * @throws IOException\n\t * If an I/O error occurs\n\t * @throws NullPointerException\n\t * if columns is null\n\t * @throws SuperCsvException\n\t * if there was a general exception while writing\n\t * @since 1.0\n\t */\n\tvoid write(Object... columns) throws IOException;\n\t\n\t/**\n\t * Writes an array of strings as columns of a CSV file.\n\t * \n\t * @param columns\n\t * the columns to write\n\t * @throws IllegalArgumentException\n\t * if columns.length == 0\n\t * @throws IOException\n\t * If an I/O error occurs\n\t * @throws NullPointerException\n\t * if columns is null\n\t * @throws SuperCsvException\n\t * if there was a general exception while writing\n\t * @since 1.0\n\t */\n\tvoid write(String... columns) throws IOException;\n\t\n}", "public String getCSVString() {\n return getId() + \",\" + noOfRounds + \",\" + caliber + \",\" + manufacturer + \",\" + price;\n }", "private void openCSVDataResult(DataResult dataResult) {\n try {\n onPopupClickListenner.openCSVFile(CSVHelper.createFile(dataResult));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@SelectProvider(type = CsvFileSqlProvider.class, method = \"selectByExample\")\n\t@Results({ @Result(column = \"id\", property = \"id\", jdbcType = JdbcType.INTEGER, id = true),\n\t\t\t@Result(column = \"pid\", property = \"pid\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"filename\", property = \"filename\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"start_time\", property = \"startTime\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"end_time\", property = \"endTime\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"length\", property = \"length\", jdbcType = JdbcType.INTEGER),\n\t\t\t@Result(column = \"density\", property = \"density\", jdbcType = JdbcType.DOUBLE),\n\t\t\t@Result(column = \"machine\", property = \"machine\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"ar\", property = \"ar\", jdbcType = JdbcType.BIT),\n\t\t\t@Result(column = \"path\", property = \"path\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"size\", property = \"size\", jdbcType = JdbcType.BIGINT),\n\t\t\t@Result(column = \"uuid\", property = \"uuid\", jdbcType = JdbcType.CHAR),\n\t\t\t@Result(column = \"header_time\", property = \"headerTime\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"last_update\", property = \"lastUpdate\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"conflict_resolved\", property = \"conflictResolved\", jdbcType = JdbcType.BIT),\n\t\t\t@Result(column = \"status\", property = \"status\", jdbcType = JdbcType.INTEGER),\n\t\t\t@Result(column = \"comment\", property = \"comment\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"width\", property = \"width\", jdbcType = JdbcType.INTEGER),\n\t\t\t@Result(column = \"start_version\", property = \"startVersion\", jdbcType = JdbcType.INTEGER),\n\t\t\t@Result(column = \"end_version\", property = \"endVersion\", jdbcType = JdbcType.INTEGER) })\n\tList<CsvFile> selectByExampleWithRowbounds(CsvFileExample example, RowBounds rowBounds);", "@SelectProvider(type = CsvFileSqlProvider.class, method = \"selectByExample\")\n\t@Results({ @Result(column = \"id\", property = \"id\", jdbcType = JdbcType.INTEGER, id = true),\n\t\t\t@Result(column = \"pid\", property = \"pid\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"filename\", property = \"filename\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"start_time\", property = \"startTime\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"end_time\", property = \"endTime\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"length\", property = \"length\", jdbcType = JdbcType.INTEGER),\n\t\t\t@Result(column = \"density\", property = \"density\", jdbcType = JdbcType.DOUBLE),\n\t\t\t@Result(column = \"machine\", property = \"machine\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"ar\", property = \"ar\", jdbcType = JdbcType.BIT),\n\t\t\t@Result(column = \"path\", property = \"path\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"size\", property = \"size\", jdbcType = JdbcType.BIGINT),\n\t\t\t@Result(column = \"uuid\", property = \"uuid\", jdbcType = JdbcType.CHAR),\n\t\t\t@Result(column = \"header_time\", property = \"headerTime\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"last_update\", property = \"lastUpdate\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"conflict_resolved\", property = \"conflictResolved\", jdbcType = JdbcType.BIT),\n\t\t\t@Result(column = \"status\", property = \"status\", jdbcType = JdbcType.INTEGER),\n\t\t\t@Result(column = \"comment\", property = \"comment\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"width\", property = \"width\", jdbcType = JdbcType.INTEGER),\n\t\t\t@Result(column = \"start_version\", property = \"startVersion\", jdbcType = JdbcType.INTEGER),\n\t\t\t@Result(column = \"end_version\", property = \"endVersion\", jdbcType = JdbcType.INTEGER) })\n\tList<CsvFile> selectByExample(CsvFileExample example);", "private ArrayList<CSVRecord> processCsvData(String csvFile) {\n ArrayList<CSVRecord> records = new ArrayList<>();\n\n File csvData = new File(\"src/main/resources/csv/\" + csvFile + \".csv\");\n\n try {\n CSVParser parser = CSVParser.parse(csvData, Charset.defaultCharset(), CSVFormat.EXCEL);\n records.addAll(parser.getRecords());\n } catch (IOException exception) {\n logger.error(\"Unable to parse CSV file: \" + exception.getMessage());\n }\n\n return records;\n }", "public static void main(String[] args) throws FileNotFoundException, IOException {\r\n \r\n Directory d = new Directory();\r\n \r\n if (args.length != 1) {\r\n System.out.println(\"Usage: java CSVReaderTest <filename>\");\r\n }\r\n else {\r\n FileReader fr = new FileReader(args[0]);\r\n BufferedReader c = new BufferedReader(fr);\r\n\r\n int lineNum = 0;\r\n boolean eof = false;\r\n \r\n while (!eof) {\r\n String line = c.readLine();\r\n \r\n if (line == null) {\r\n eof = true;\r\n }\r\n else{\r\n // Allocate an array of the necessary size to return the strings\r\n String[] values = new String[4];\r\n // Start beginIndex at the beginning of the String, position 0\r\n int beginIndex = 0;\r\n\r\n for (int i = 0; i < 3; i++) {\r\n int endIndex;\r\n endIndex = line.indexOf(',', beginIndex);\r\n\r\n // if the argument begins and ends with quotes, remove them\r\n if (line.charAt(beginIndex) == '\"' && line.charAt(endIndex - 1) == '\"') {\r\n values[i] = line.substring(beginIndex + 1, endIndex - 1);\r\n\r\n } else {\r\n values[i] = line.substring(beginIndex, endIndex);\r\n }\r\n\r\n beginIndex = endIndex + 1;\r\n }\r\n\r\n if (line.charAt(beginIndex) == '\"' && line.charAt(line.length() - 1) == '\"') {\r\n values[3] = line.substring(beginIndex + 1, line.length() - 1);\r\n } else {\r\n values[3] = line.substring(beginIndex, line.length());\r\n }\r\n \r\n if (lineNum > 1) {\r\n lineNum = lineNum + 1;\r\n Student s = new Student(values[0]);\r\n s.setFirstName(values[1]);\r\n s.setLastName(values[2]);\r\n s.setPhoneNumber(values[3]);\r\n d.addStudent(s);\r\n System.out.println(s);\r\n }\r\n\r\n }\r\n }\r\n c.close();\r\n }\r\n \r\n Student c = new Student(\"mengl1\");\r\n c.setFirstName(\"Meng\");\r\n c.setLastName(\"Li\");\r\n c.setPhoneNumber(\"412-807-0153\");\r\n \r\n Student a = new Student(\"mengl2\");\r\n a.setFirstName(\"Mengl\");\r\n a.setLastName(\"Li\");\r\n a.setPhoneNumber(\"412-807-0154\");\r\n \r\n Student b = new Student(\"terryhong\");\r\n b.setFirstName(\"terry\");\r\n b.setLastName(\"hong\");\r\n b.setPhoneNumber(\"412-464-475\");\r\n\r\n d.addStudent(c);\r\n d.addStudent(a);\r\n d.addStudent(b);\r\n \r\n //System.out.println(d.searchByAndrewId(\"mengl2\"));\r\n //d.deleteStudent(\"terryhong\");\r\n System.out.println(d.size());\r\n // System.out.println(d.searchByLastName(\"Li\"));\r\n\r\n }", "@Override\n public File importCSV(String query) {\n String retorno = executeQuery(query);\n File file = new File(\"export.csv\");\n try {\n file.createNewFile();\n if(file.exists()){\n try (Writer writer = new FileWriter(file)) {\n writer.append(retorno);\n writer.flush();\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n }\n return file;\n }", "List<String[]> readCsv(String inputFilePath)throws IOException;", "@Override\r\n public void init() throws HarvesterException {\r\n JsonSimple options = new JsonSimple(getJsonConfig().getObject(\"harvester\", \"csv\"));\r\n \r\n String filePath = options.getString(null, \"fileLocation\");\r\n if (filePath == null) {\r\n throw new HarvesterException(\"No data file provided!\");\r\n }\r\n File csvDataFile = new File(filePath);\r\n if (csvDataFile == null || !csvDataFile.exists()) {\r\n throw new HarvesterException(\"Could not find CSV file '\" + filePath + \"'\");\r\n }\r\n filename = csvDataFile.getName();\r\n \r\n idPrefix = options.getString(\"\", \"recordIDPrefix\");\r\n maxRows = options.getInteger(-1, \"maxRows\");\r\n ignoredFields = getStringList(options, \"ignoreFields\");\r\n includedFields = getStringList(options, \"includedFields\");\r\n payloadId = options.getString(DEFAULT_PAYLOAD_ID, \"payloadId\");\r\n batchSize = options.getInteger(DEFAULT_BATCH_SIZE, \"batchSize\");\r\n hasMore = true;\r\n \r\n try {\r\n // open the CSV file for reading\r\n Reader fileReader = new InputStreamReader(new FileInputStream(csvDataFile), \"UTF-8\");\r\n char delimiter = options.getString(String.valueOf(DEFAULT_DELIMITER), \"delimiter\").charAt(0);\r\n csvReader = new CSVReader(fileReader, delimiter);\r\n \r\n // configure the data fields\r\n if (options.getBoolean(true, \"headerRow\")) {\r\n dataFields = Arrays.asList(csvReader.readNext());\r\n } else {\r\n dataFields = getStringList(options, \"headerList\");\r\n }\r\n \r\n // check that the specified id column is valid\r\n idColumn = options.getString(null, \"idColumn\");\r\n if (idColumn != null && !dataFields.contains(idColumn)) {\r\n throw new HarvesterException(\"'\" + idColumn + \"' is invalid!\");\r\n }\r\n } catch (IOException ioe) {\r\n throw new HarvesterException(ioe);\r\n }\r\n }", "public Object[][]dataArrayLength8(String CSVName, String dataProviderName){\n List<Object[]> objects = testCsvDataDriven(CSVName, dataProviderName);\n Object[][] dataProvider = new Object[objects.size()][8];\n int currentPosition = 0;\n for (Object[] testObject: objects) {\n testObject = FormatString(testObject);\n ObjectMapper mapper = new ObjectMapper();\n try {\n dataProvider[currentPosition][0] = testObject[1].toString();\n dataProvider[currentPosition][1] = mapper.readValue(testObject[2].toString(), User.class);\n dataProvider[currentPosition][2] = testObject[3].toString();\n dataProvider[currentPosition][3] = testObject[4].toString();\n dataProvider[currentPosition][4] = testObject[5].toString();\n dataProvider[currentPosition][5] = testObject[6].toString();\n dataProvider[currentPosition][6] = testObject[7].toString();\n dataProvider[currentPosition][7] = testObject[8].toString();\n } catch (Exception e) {\n e.printStackTrace();\n }\n currentPosition ++;\n }\n return dataProvider;\n }", "protected List<String[]> readCsvFile(byte[] bytes, String separator, String quote) {\n\t\ttry (CharSequenceReader seq = new CharSequenceReader(new String(bytes, Charset.forName(DynamoConstants.UTF_8)));\n\t\t CSVReader reader = new CSVReader(seq, separator.charAt(0), quote.charAt(0))) {\n\t\t\treturn reader.readAll();\n\t\t} catch (IOException ex) {\n\t\t\tthrow new OCSImportException(ex.getMessage(), ex);\n\t\t}\n\t}", "public Object[][]dataArrayLength6(String CSVName, String dataProviderName){\n List<Object[]> objects = testCsvDataDriven(CSVName, dataProviderName);\n Object[][] dataProvider = new Object[objects.size()][6];\n int currentPosition = 0;\n for (Object[] testObject: objects) {\n testObject = FormatString(testObject);\n ObjectMapper mapper = new ObjectMapper();\n try {\n dataProvider[currentPosition][0] = testObject[1].toString();\n dataProvider[currentPosition][1] = mapper.readValue(testObject[2].toString(), User.class);\n dataProvider[currentPosition][2] = testObject[3].toString();\n dataProvider[currentPosition][3] = testObject[4].toString();\n dataProvider[currentPosition][4] = testObject[5].toString();\n dataProvider[currentPosition][5] = testObject[6].toString();\n } catch (Exception e) {\n e.printStackTrace();\n }\n currentPosition ++;\n }\n return dataProvider;\n }", "public List<Lender> readCSVFile(String path){\r\n\r\n List<Lender> inputList = new ArrayList<>();\r\n try{\r\n File inputF = new File(path);\r\n InputStream inputFS = new FileInputStream(inputF);\r\n BufferedReader br = new BufferedReader(new InputStreamReader(inputFS));\r\n // skip the header of the csv\r\n inputList = br.lines().skip(1).map(mapToItem).collect(Collectors.toList());\r\n br.close();\r\n } catch (IOException e) {\r\n throw new QuoteException(\"Error reading the csv file\", e);\r\n }\r\n\r\n return inputList ;\r\n }", "@ParameterizedTest\n @CsvFileSource(files = \"src/test/resources/params/shoppinglist3.csv\",\n numLinesToSkip = 1, delimiterString = \"___\") // Delimiter string in this case.\n public void csvFileSource_StringDoubleIntStringString3(String name,\n double price, int qty, String uom,\n String provider){\n System.out.println(\"name = \" + name + \", price = \" + price + \", qty = \" + qty\n + \", uom = \" + uom + \", provider = \" + provider);\n }", "public interface CSVSearch {\n public CSVRecord find(String query);\n}", "@ParameterizedTest\n @CsvFileSource(files = \"src/test/resources/params/shoppinglist.csv\",\n numLinesToSkip = 1) // The first line in .csv is a header, this is to skip that line\n public void csvFileSource_StringDoubleIntStringString(String name,\n double price, int qty, String uom,\n String provider){\n System.out.println(\"name = \" + name + \", price = \" + price + \", qty = \" + qty\n + \", uom = \" + uom + \", provider = \" + provider);\n }", "@Bean\r\n public ItemWriter<OrderEntity> databaseCsvItemWriter() {\r\n LOG.debug(\"=== databaseCsvItemWriter\");\r\n FlatFileItemWriter<OrderEntity> csvFileWriter = new FlatFileItemWriter<>();\r\n\r\n // Extracting column names from properties file\r\n ArrayList<String> columns = (ArrayList<String>) fileProperties.getColumns();\r\n String columnsHeaders = \"\";\r\n for (int i = 0; i < columns.size(); i++) {\r\n columnsHeaders += columns.get(i);\r\n if (i < (columns.size() - 1)) {\r\n columnsHeaders += \",\";\r\n }\r\n }\r\n LOG.debug(\"=== columnsHeaders=>\" + columnsHeaders);\r\n\r\n StringHeaderWriter headerWriter = new StringHeaderWriter(columnsHeaders);\r\n csvFileWriter.setHeaderCallback(headerWriter);\r\n\r\n // Extracting destination file from properties file, adding de suffix Processed\r\n String exportFilePath =\r\n fileProperties.getName().substring(0, fileProperties.getName().lastIndexOf('.'))\r\n + \"Processed.csv\";\r\n LOG.debug(\"=== exportFilePath=>\" + exportFilePath);\r\n csvFileWriter.setResource(new FileSystemResource(exportFilePath));\r\n\r\n LineAggregator<OrderEntity> lineAggregator = createOrderLineAggregator();\r\n csvFileWriter.setLineAggregator(lineAggregator);\r\n\r\n return csvFileWriter;\r\n }", "public LoadCSV(String file_position){\r\n this.file_position = file_position;\r\n }", "@Test public void testEuropeanComma() {\n char comma = ';';\n int n = random.nextInt(10) + 10;\n String[] src = new String[n];\n for (int i = 0; i < n; i++) {\n src[i] = randomString();\n }\n println(Arrays.toString(src));\n try (CSVUtil.Writer writer = CSVUtil.newWriter(path, comma)) {\n for (String s : src) {\n writer.write(s);\n }\n } catch (IOException e) {\n e.printStackTrace();\n assert false;\n }\n\n try {\n List<String[]> strings = CSVUtil.read(path, comma);\n assert strings.size() == 1;\n println(Arrays.toString(strings.get(0)));\n assert Arrays.toString(src).equals(Arrays.toString(strings.get(0)));\n } catch (IOException e) {\n e.printStackTrace();\n assert false;\n }\n\n try {\n List<String[]> strings = CSVUtil.read(path);\n assert strings.size() == 1;\n println(Arrays.toString(strings.get(0)));\n assert Arrays.toString(src).equals(Arrays.toString(strings.get(0)));\n } catch (IOException e) {\n e.printStackTrace();\n assert false;\n }\n }", "public void readCsvFile(String path) {\n\n // make sure the ArrayList is empty before you start recording the data\n if (!Records.isEmpty()) {\n Records.clear();\n }\n try {\n // read data from the .csv file\n System.out.println(\"Reading array list....\");\n BufferedReader br = new BufferedReader(new FileReader(path));\n // Skip the first line\n String line = br.readLine();\n while ((line = br.readLine()) != null) {\n\n String[] fields = line.split(\",\");\n Record record = new Record( // the fields in .csv are jumbled\n Integer.parseInt(fields[2]), // skierID\n Integer.parseInt(fields[3]), // liftID\n Integer.parseInt(fields[1]), // dayNum\n Integer.parseInt(fields[4])); // time\n Records.add(record);\n }\n\n br.close();\n System.out.println(\"!!Reading completed!!\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public TreeSet<Product> readCSV() throws IOException, NumberFormatException {\n\r\n TreeSet<Product> products = new TreeSet<>();\r\n\r\n try (BufferedReader reader = new BufferedReader(new FileReader(\"src/Collection/file.csv_2.txt\"));) {\r\n while ((line = reader.readLine()) != null) {\r\n String[] row = line.split(\",\");\r\n\r\n Location location = new Location(\r\n Double.parseDouble(row[14]),\r\n Integer.parseInt(row[15]),\r\n Float.parseFloat(row[16]),\r\n row[17]);\r\n Address address = new Address(\r\n row[12],\r\n row[13],\r\n location\r\n );\r\n Organization organization = new Organization(\r\n Integer.parseInt(row[8]),\r\n row[9],\r\n row[10],\r\n OrganizationType.valueOf(row[11]),\r\n address\r\n );\r\n Coordinates coordinates = new Coordinates(\r\n Float.parseFloat(row[3]),\r\n Double.parseDouble(row[4])\r\n );\r\n try {\r\n\r\n\r\n Product product = new Product (\r\n Integer.parseInt(row[0]),\r\n row[1],\r\n LocalDate.parse(row[2].replace(\"/\", \"-\")),\r\n coordinates,\r\n Integer.parseInt(row[5]),\r\n row[6],\r\n UnitOfMeasure.valueOf(row[7]),\r\n organization\r\n );\r\n products.add(product);}\r\n catch (NumberFormatException e){\r\n System.out.println(\"wrong format\");\r\n }\r\n\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n products.forEach(System.out::println);\r\n return products;\r\n }", "public Object[][]dataArrayLength7(String CSVName, String dataProviderName){\n List<Object[]> objects = testCsvDataDriven(CSVName, dataProviderName);\n Object[][] dataProvider = new Object[objects.size()][7];\n int currentPosition = 0;\n for (Object[] testObject: objects) {\n testObject = FormatString(testObject);\n ObjectMapper mapper = new ObjectMapper();\n try {\n dataProvider[currentPosition][0] = testObject[1].toString();\n dataProvider[currentPosition][1] = mapper.readValue(testObject[2].toString(), User.class);\n dataProvider[currentPosition][2] = testObject[3].toString();\n dataProvider[currentPosition][3] = testObject[4].toString();\n dataProvider[currentPosition][4] = testObject[5].toString();\n dataProvider[currentPosition][5] = testObject[6].toString();\n dataProvider[currentPosition][6] = testObject[7].toString();\n } catch (Exception e) {\n e.printStackTrace();\n }\n currentPosition ++;\n }\n return dataProvider;\n }", "@Override\n\tprotected String objectToCSVRecord(Object object) {\n\t\tStringBuilder str = new StringBuilder();\n\t\tstr.append(((Customer) object).getCustomerId());\n\t\tstr.append(\",\");\n\t\tstr.append(((Customer) object).getCustomerName());\n\t\tstr.append(\",\");\n\t\tstr.append(((Customer) object).getCustomerAddress());\n\t\tstr.append(\",\");\n\t\tstr.append(((Customer) object).getCustomeremail());\n \tString one=str.toString();\n \treturn one;\n\t}", "private InvoiceCSVHelper() {\n }", "public List<String[]> readCSV() {\n\t\tCSVReader reader;\n\t\tList<String[]> myEntries = new ArrayList<String[]>();\n\t\ttry {\n\t\t\treader = new CSVReader(new FileReader(getCSVFolder() + File.separator + getFileName() + \".csv\"));\n\t\t\tmyEntries = reader.readAll();\n\t\t\treader.close();\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn myEntries;\n\t}", "@ParameterizedTest\n @CsvFileSource(files = {\"src/test/resources/params/shoppinglist.csv\",\n \"src/test/resources/params/shoppinglist2.csv\"},\n numLinesToSkip = 1) // The first line in .csv is a header, this is to skip that line\n public void csvFileSource_StringDoubleIntStringString2(String name,\n double price, int qty, String uom,\n String provider){\n System.out.println(\"name = \" + name + \", price = \" + price + \", qty = \" + qty\n + \", uom = \" + uom + \", provider = \" + provider);\n }", "@Override\n\tpublic void createCSVOutput() {\n\t\tFile file = new File(\"rejectedByEsteticalRestructurationRejector.csv\"); \n\t\t\n\t\t//test if the file already exist\n\t\tif(file.exists()) {\n\t\t\tSystem.out.println(\"le fichier rejectedByEstheticalRestructurationRejector.csv existe deja\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t\t//create the different column for the CSV file\n\t\tString[] titles = { \"before\" , \"after\", \"id\"};\n\t\ttry {\n\t\t\toutputFile = new CsvFileWriter(file, '\\t', titles);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}", "@Test\n public void testOutputCsvStream() throws Throwable {\n testOutputCSV(true);\n }", "@Test\n public void testOutputCSV() throws Throwable {\n testOutputCSV(false);\n }", "List<String[]> readCsv(String inputFilePath,int skipLine,char separator)throws IOException;", "@Test\n public void doImport_doesNotModifyOriginalCsv() {\n ExternalDataReader externalDataReader = new ExternalDataReaderImpl(null);\n externalDataReader.doImport(formDefToCsvMedia);\n\n assertThat(dbFile.exists(), is(true));\n assertThat(csvFile.exists(), is(true));\n }", "public interface IFileDataTypeReader {\n\t\n\t Map<String, String> getColumnAndDataType(String fileName, ExtendedDetails dbDetails) throws ZeasException;\n\t\n\t List<List<String>> getColumnValues() throws ZeasException;\n}", "@Test\n @Ignore(\"Need to implement\")\n public void testOutputDynamicCsvMode() throws Throwable {\n testOutputDynamic(true);\n }", "@Test\n public void testConvertDataKeysToCsvString() {\n List<String> dataKeys = new ArrayList<>();\n dataKeys.add(\"First\");\n dataKeys.add(\"Second\");\n String expResult = \"First,Second\";\n String result = dataModelConverter.convertDataKeysToCsvString(dataKeys);\n assertEquals(expResult, result);\n }", "public static void csvMake() throws ClassNotFoundException, SQLException, IOException{\n\t\tClass.forName(\"org.h2.Driver\");\n\t\tConnection conn = DriverManager.getConnection(DB, user, pass);\n\t\tCSV newFile = new CSV();\n\t\tnewFile.make(conn);\n\t\tconn.close();\n\t}", "public interface CsvParser extends Iterator<CsvLine>, Closeable {\n}", "public CSVFile(String path)\n\t{\n\t\tthis.filePath = path;\n\t\t File fl = new File(path);\n\t\t FileInputStream fin;\n\t\t\ttry {\n\t\t\t\t\t\tfin = new FileInputStream(fl);\n\t\t\t\t\t BufferedReader reader = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\t \n\t\t\t\t\t String line = null;\n\t\t\t\t\t while ((line = reader.readLine()) != null) \n\t\t\t\t\t {\n\t\t\t\t\t \tif(line.contains(\";\"))\n\t\t\t\t\t \t{\n\t\t\t\t\t\t\t CSVItem item = new CSVItem(line);\n\t\t\t\t\t\t\t itemList.add(item);\n\t\t\t\t\t \t}\n\t\t\t\t\t }\n\t\t\t\t\t reader.close();\n\t\t\t\t\t \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\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t }\n\t\t\n\t}", "public static void readCSV() throws IOException {\n\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\tString line;\n\t\tif((line = br.readLine()) != null) {\n\t\t\tsetCSVorder(line);\n\t\t}\n\t\t\n\t\twhile((line = br.readLine()) != null) {\n\t\t\tFlightState fs = getStateFromCSV(line);\n\t\t\tsendToKafka(fs);\n\t\t}\n\t\t\n\t\tbr.close();\n\t}", "@Override\n protected void processLine(String line) {\n String[] lines = line.split(\",\");\n for (String l : lines) {\n data.add(l);\n }\n }", "public static ConnectorCSV getConnectorCSV(int index, String name) throws IOException {\n // walk resources package to make a selection on which csv file should be used\n // for the demo\n Stream<Path> paths = Files.walk(Paths.get(PREFIX + CSV));\n List<Path> files = paths.collect(Collectors.toList());\n paths.close();\n\n return new ConnectorCSV(files.get(index).toString(), \",\", \"\\n\", name, false);\n\n }", "public String getCSVString() {\n StringBuilder builder = new StringBuilder();\n\n // key / value header\n builder.append(\"key,\\tvalue\");\n builder.append(System.getProperty(\"line.separator\").toString());\n\n // key / value pairs\n for (Entry<String, String> entry : results.entrySet()) {\n builder.append(entry.getKey());\n builder.append(\",\");\n builder.append(entry.getValue());\n builder.append(System.getProperty(\"line.separator\").toString());\n }\n\n builder.deleteCharAt(builder.length() - 1);\n return builder.toString();\n }", "public void tester() {\n FileResource fr = new FileResource();\n CSVParser parser = fr.getCSVParser();\n //listExporters(parser, \"coffee\");\n //System.out.println(countryInfo(parser, \"Nauru\"));\n //listExportersTwoProducts(parser, \"cotton\",\"flowers\");\n //System.out.println(numberOfExporters(parser, \"cocoa\"));\n bigExporters(parser, \"$999,999,999,999\");\n }", "private ArrayList<String> getFileData(InputStream is) {\n ArrayList<String> restaurantData = new ArrayList<>();\n\n // Initialize the reader for the csv file\n BufferedReader reader = new BufferedReader(new InputStreamReader(is,\n Charset.forName(\"UTF-8\")));\n\n // Read each line into the ArrayList\n try {\n // Read the file\n String row;\n while ((row = reader.readLine()) != null) {\n restaurantData.add(row);\n }\n } catch (IOException ex) {\n Log.i(TAG, \"Error reading line\", ex);\n } finally {\n try {\n // Close the file\n reader.close();\n } catch (IOException ex) {\n Log.i(TAG, \"Error closing file\", ex);\n }\n }\n\n // Return data\n return restaurantData;\n }" ]
[ "0.7344425", "0.72588205", "0.6924708", "0.6810622", "0.67159146", "0.6708786", "0.6688337", "0.6494188", "0.6477533", "0.6437457", "0.6430327", "0.637003", "0.6368264", "0.6361407", "0.6331905", "0.63183814", "0.62928", "0.6285145", "0.6262981", "0.62581897", "0.62411535", "0.6193709", "0.61545223", "0.6117178", "0.6106056", "0.6090875", "0.60902375", "0.60876364", "0.60729593", "0.60624206", "0.5962535", "0.596249", "0.5932287", "0.5904272", "0.5877844", "0.58724195", "0.58684087", "0.58657646", "0.58615327", "0.58610255", "0.585151", "0.5847119", "0.5841845", "0.58413655", "0.5840312", "0.58246166", "0.5805609", "0.580054", "0.5796394", "0.5791019", "0.57727176", "0.5770016", "0.5763115", "0.5758304", "0.5755905", "0.5750849", "0.57478696", "0.57424515", "0.5730519", "0.5713955", "0.5713721", "0.5713721", "0.5710787", "0.57073087", "0.57064164", "0.56989133", "0.56868345", "0.5677282", "0.56650555", "0.5655089", "0.56495476", "0.5643902", "0.5634387", "0.563154", "0.5628801", "0.56280285", "0.5617923", "0.5597083", "0.55940044", "0.55901057", "0.5589865", "0.55833006", "0.55829084", "0.5582893", "0.5575259", "0.5572348", "0.55721444", "0.5571069", "0.55681837", "0.55669713", "0.5556634", "0.5554777", "0.55526054", "0.5550453", "0.5549405", "0.55411124", "0.55394906", "0.5537895", "0.55345434", "0.5534187", "0.5532938" ]
0.0
-1
filter out all deprecated images
@Override public boolean apply(Image input) { return !(input.deprecated() != null && input.deprecated().state() != null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String removeImageStyle();", "@Test\n public void testImageFiltering()\n { \n String html = header + \"<img src=\\\"file://path/to/local/image.png\\\"/>\" + footer;\n Document doc = wysiwygHTMLCleaner.clean(new StringReader(html));\n NodeList nodes = doc.getElementsByTagName(\"img\");\n Assert.assertEquals(1, nodes.getLength());\n Element image = (Element) nodes.item(0);\n Node startComment = image.getPreviousSibling();\n Node stopComment = image.getNextSibling();\n Assert.assertEquals(Node.COMMENT_NODE, startComment.getNodeType());\n Assert.assertEquals(\"startimage:false|-|attach|-|Missing.png\", startComment.getNodeValue());\n Assert.assertEquals(\"Missing.png\", image.getAttribute(\"src\"));\n Assert.assertEquals(Node.COMMENT_NODE, stopComment.getNodeType());\n Assert.assertTrue(stopComment.getNodeValue().equals(\"stopimage\"));\n }", "protected static Collection getImagePatterns(@SuppressWarnings(\"unused\") WikiEngine engine) {\n\t\tthrow new InternalWikiException(\"No longer supported - please use JSPWikiMarkupParser\");\n\t}", "private List<? extends Image> getIconImages(String imgunnamedjpg) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Test\n public void testNotRegenerateImage() throws Exception {\n assertFalse(\n \"This flag should not be committed as true\", ImageSimilarity.REGENERATE_EXPECTED_IMAGES);\n }", "default boolean isDeprecated() {\n return false;\n }", "static void disableImageViews() {\n\t\tfor (int i=0; i<Play.NUM[TOTAL]; i++) {\n\t\t\tPlay.pieceViews.get(i).setEnabled(false);\n\t\t}\n\t}", "@Deprecated\n public int removeDeletedImageFiles() {\n int numRemoved = 0;\n int i = 0;\n File fd;\n\n while(i < imageFiles.size()) {\n fd = new File(imageFiles.get(i).getPath());\n if(!fd.exists()) {\n imageFiles.remove(i);\n numRemoved++;\n }\n else\n i++;\n }\n return numRemoved;\n }", "boolean ignoreExternal();", "public void testStripReadOnlyRemoveAlsoImages() {\n String fileName = \"read_only_strippedImagesRemoved.docx\";\n String fileInput = inputDirectory + \"read_only_with_image_inside.docx\";\n String expectedResult = expectedDirectory + fileName;\n ZipFile zipFileSource1;\n try {\n zipFileSource1 = new ZipFile(fileInput);\n Package packSource1 = Package.open(zipFileSource1, PackageAccess.ReadWrite);\n WordDocument docxSource1 = new WordDocument(packSource1);\n docxSource1.stripReadOnlyPartOfDocument();\n File destFile = new File(outputDirectory + fileName);\n assertTrue(docxSource1.save(destFile));\n OpenXmlAssert.assertEquals(new File(outputDirectory + fileName), new File(expectedResult));\n } catch (IOException e) {\n logger.error(e);\n fail(\"cannot open:\" + fileInput);\n } catch (OpenXML4JException e) {\n logger.error(e);\n fail(\"fail\" + e.getMessage());\n }\n }", "public native MagickImage despeckleImage() throws MagickException;", "private void filterUnsupportedOptions(PreferenceGroup group,\n ListPreference pref, List<String> supported) {\n if (supported == null || supported.size() <= 1) {\n \tif (pref instanceof IconListPreference){\n ((IconListPreference) pref).setAvailable(false);\n \t} else {\n \t\tremovePreference(group, pref.getKey());\n \t}\n return;\n }\n\n pref.filterUnsupported(supported);\n if (pref.getEntries().length <= 1 && !(pref instanceof IconListPreference \n \t\t) && !pref.getKey().equals(CameraSettings.KEY_PICTURE_SIZE)) {\n removePreference(group, pref.getKey());\n return;\n }\n\n resetIfInvalid(pref);\n }", "private List<ImageInfo> scanForImageInfo(CharSequence source) {\n return null; \n }", "private void scanForIcons() {\n\t\t\ttry {\n\t\t\t\tFile graphicDir = new File(helpIconBase + File.separator);\n\t\t\t\tlist = filter(graphicDir.listFiles(), \"tip\", \".png\");\n\t\t\t} catch (NullPointerException npe) {\n\t\t\t\tSystem.err.println(npe);\n\t\t\t\tlist = null;\n\t\t\t}\n\t\t}", "@Override\n public void updateImages()\n {\n image = ThemeManager.getInstance().getObstacleImage();\n blackedOutImage = ThemeManager.getInstance().getDisabledImage(\"obstacle\");\n }", "private Protos.Offer filterBadResources(Protos.Offer offer) {\n Collection<Protos.Resource> goodResources = new ArrayList<>();\n Collection<Protos.Resource> badResources = new ArrayList<>();\n for (Protos.Resource resource : offer.getResourcesList()) {\n if (ResourceUtils.isProcessable(resource, frameworkRolesWhitelist)) {\n goodResources.add(resource);\n } else {\n badResources.add(resource);\n }\n }\n if (badResources.isEmpty()) {\n // Common shortcut: All resources are good. Just return the original offer.\n return offer;\n }\n\n // Build a new offer which only contains the good resources. Log the bad resources.\n LOGGER.info(\n \"Filtered {} resources from offer {}:\",\n badResources.size(),\n offer.getId().getValue());\n for (Protos.Resource badResource : badResources) {\n LOGGER.info(\" {}\", TextFormat.shortDebugString(badResource));\n }\n return offer.toBuilder()\n .clearResources()\n .addAllResources(goodResources)\n .build();\n }", "private List<S3ObjectSummary> findObsoleteProgspecFiles() {\n // Get the current local program specification state.\n Properties localProgspec = getProgSpecETags();\n\n // Compare the actual state to the state cached lcoally.\n Map<String, S3ObjectSummary> currentProgspec = Authenticator.getInstance().getProjectsHelper().getProgSpecInfo(getProgramId());\n List<S3ObjectSummary> result = new ArrayList<>();\n for (Map.Entry<String, S3ObjectSummary> e : currentProgspec.entrySet()) {\n // If we don't have the file locally, or if the eTag doesn't match, add to the result list.\n String localTag = localProgspec.containsKey(e.getKey()) ? localProgspec.get(e.getKey()).toString() : \"\";\n if (!e.getValue().getETag().equalsIgnoreCase(localTag))\n result.add(e.getValue());\n }\n return result;\n }", "public void testShaderWithoutExcludesShouldRemoveReferencesOfOriginalPattern() throws Exception {\n shaderWithPattern(\"org/shaded/plexus/util\", new File(\"target/foo-custom-without-excludes.jar\"), new String[]{});\n }", "private ImageUtils() {}", "public native MagickImage minifyImage() throws MagickException;", "public List<CMMedia> getPicturesUnfiltered() {\n return super.getMedia();\n }", "boolean hasImageByTransform();", "public void filterImage() {\n\n if (opIndex == lastOp) {\n return;\n }\n\n lastOp = opIndex;\n switch (opIndex) {\n case 0:\n biFiltered = bi; /* original */\n return;\n case 1:\n biFiltered = ImageNegative(bi); /* Image Negative */\n return;\n\n case 2:\n biFiltered = RescaleImage(bi);\n return;\n\n case 3:\n biFiltered = ShiftImage(bi);\n return;\n\n case 4:\n biFiltered = RescaleShiftImage(bi);\n return;\n\n case 5:\n biFiltered = Add(bi, bi1);\n return;\n\n case 6:\n biFiltered = Subtract(bi, bi1);\n return;\n\n case 7:\n biFiltered = Multiply(bi, bi1);\n return;\n\n case 8:\n biFiltered = Divide(bi, bi1);\n return;\n\n case 9:\n biFiltered = NOT(bi);\n return;\n\n case 10:\n biFiltered = AND(bi, bi1);\n return;\n\n case 11:\n biFiltered = OR(bi, bi1);\n return;\n\n case 12:\n biFiltered = XOR(bi, bi1);\n return;\n\n case 13:\n biFiltered = ROI(bi);\n return;\n\n case 14:\n biFiltered = Negative_Linear(bi);\n return;\n\n case 15:\n biFiltered= Logarithmic_function(bi);\n return;\n\n case 16:\n biFiltered = Power_Law(bi);\n return;\n\n case 17:\n biFiltered = LUT(bi);\n return;\n\n case 18:\n biFiltered = Bit_planeSlicing(bi);\n return;\n\n case 19:\n biFiltered = Histogram(bi1,bi2);\n return;\n\n case 20:\n biFiltered = HistogramEqualisation(bi,bi3);\n return;\n\n case 21:\n biFiltered = Averaging(bi1);\n return;\n\n case 22:\n biFiltered = WeightedAveraging(bi1);\n return;\n\n case 23:\n biFiltered = fourNeighbourLaplacian(bi1);\n return;\n\n case 24:\n biFiltered= eightNeighbourLaplacian(bi1);\n return;\n\n case 25:\n biFiltered = fourNeighbourLaplacianEnhancement(bi1);\n return;\n\n case 26:\n biFiltered = eightNeighbourLaplacianEnhancement(bi1);\n return;\n\n case 27:\n biFiltered = Roberts(bi1);\n return;\n\n case 28:\n biFiltered = SobelX(bi1);\n return;\n\n case 29:\n biFiltered = SobelY(bi1);\n return;\n\n case 30:\n biFiltered = Gaussian(bi1);\n return;\n\n case 31:\n biFiltered = LoG (bi1);\n return;\n\n case 32:\n biFiltered = saltnpepper(bi4);\n return;\n\n case 33:\n biFiltered = minFiltering(bi4);\n return;\n\n case 34:\n biFiltered = maxFiltering(bi4);\n return;\n\n case 35:\n biFiltered = maidpointFiltering(bi4);\n return;\n\n case 36:\n biFiltered = medianFiltering(bi4);\n return;\n\n case 37:\n biFiltered = simpleThresholding(bi5);\n return;\n\n case 38:\n biFiltered = automatedThresholding(bi6);\n return;\n\n case 39:\n biFiltered = adaptiveThresholding(bi7);\n return;\n }\n }", "Boolean getDeprecated();", "List<List<Pixel>> filter(Image img, int multiplier, String operation);", "public void removeAllImgTag(String img) {\n\t\tif (imgToTag.containsKey(img))\n\t\t\t// Check if image has tags to remove\n\t\t\tif (!imgToTag.get(img).isEmpty()) {\n\t\t\t\tHashSet<String> tagsToRemove = new HashSet<String>();\n\t\t\t\tfor (String tag : tagToImg.keySet()) {\n\t\t\t\t\t// Going to remove the image from each of the tags image map\n\t\t\t\t\tif (tagToImg.get(tag).contains(img))\n\t\t\t\t\t\ttagsToRemove.add(tag);\n\t\t\t\t}\n\t\t\t\t// Remove them\n\t\t\t\tfor (String tag : tagsToRemove)\n\t\t\t\t\tremoveTag(img, tag);\n\t\t\t}\n\t}", "void disableAutomaticHeaderImage();", "String getDeprecated();", "private void enhanceImage(){\n }", "@Override\n\tpublic boolean isMyImage() {\n\t\treturn false;\n\t}", "public native int getFilter() throws MagickException;", "void deleteUnusedTags();", "private Images() {}", "public BufferedImage NOT(BufferedImage timg) {\n int width = timg.getWidth();\n int height = timg.getHeight();\n\n int[][][] ImageArray1 = convertToArray(timg);\n int[][][] ImageArray2 = convertToArray(timg);\n\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n\n int r = ImageArray1[x][y][1]; //r\n int g = ImageArray1[x][y][2]; //g\n int b = ImageArray1[x][y][3]; //b\n\n ImageArray2[x][y][1] = (~r) & 0xFF; //r\n ImageArray2[x][y][2] = (~g) & 0xFF; //g\n ImageArray2[x][y][3] = (~b) & 0xFF; //b\n\n }\n }\n return convertToBimage(ImageArray2);\n\n }", "private void filter(BufferedImageOp op)\n { \n if (image == null) return;\n BufferedImage filteredImage \n = new BufferedImage(image.getWidth(), image.getHeight(), image.getType());\n op.filter(image, filteredImage);\n image = filteredImage;\n repaint();\n }", "private void searchImages()\n {\n searchWeb = false;\n search();\n }", "private BufferedImage deAlpha(BufferedImage img, String format) {\n if (EqualsUtil.equalsNoneIgnoreCase(format, \"png\", \"gif\")) {\n var fixedImg = new BufferedImage(img.getWidth(), img.getHeight(),\n BufferedImage.TYPE_INT_RGB);\n fixedImg.createGraphics().drawImage(\n img, 0, 0, Color.WHITE, null);\n return fixedImg;\n }\n return img;\n }", "void removeAllRawLicenses();", "public static NodeList findAllImages(DocumentFragment df)\n throws Exception {\n // troubble with expath in some dfs\n // do it the hard way:\n try {\n String domstring = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?><\"+WXTROOT+\"></\"+WXTROOT+\">\";\n Document doc = makeDomFromString(domstring,true,null);\n doc.getDocumentElement().appendChild(doc.importNode(df, true));\n return doc.getElementsByTagName(\"img\");\n } catch (Exception ex) {\n throw new Exception(reporter.getBundleString(\"Could_not_extract_images\", ex.getMessage()));\n }\n }", "private static String removeVisibleHTMLTags(String str) {\n str = stripLineBreaks(str);\n StringBuffer result = new StringBuffer(str);\n StringBuffer lcresult = new StringBuffer(str.toLowerCase());\n \n // <img should take care of smileys\n String[] visibleTags = {\"<img\"}; // are there others to add?\n int stringIndex;\n for ( int j = 0 ; j < visibleTags.length ; j++ ) {\n while ( (stringIndex = lcresult.indexOf(visibleTags[j])) != -1 ) {\n if ( visibleTags[j].endsWith(\">\") ) {\n result.delete(stringIndex, stringIndex+visibleTags[j].length() );\n lcresult.delete(stringIndex, stringIndex+visibleTags[j].length() );\n } else {\n // need to delete everything up until next closing '>', for <img for instance\n int endIndex = result.indexOf(\">\", stringIndex);\n if (endIndex > -1) {\n // only delete it if we find the end! If we don't the HTML may be messed up, but we\n // can't safely delete anything.\n result.delete(stringIndex, endIndex + 1 );\n lcresult.delete(stringIndex, endIndex + 1 );\n }\n }\n }\n }\n \n // TODO: This code is buggy by nature. It doesn't deal with nesting of tags properly.\n // remove certain elements with open & close tags\n String[] openCloseTags = {\"li\", \"a\", \"div\", \"h1\", \"h2\", \"h3\", \"h4\"}; // more ?\n for (int j = 0; j < openCloseTags.length; j++) {\n // could this be better done with a regular expression?\n String closeTag = \"</\"+openCloseTags[j]+\">\";\n int lastStringIndex = 0;\n while ( (stringIndex = lcresult.indexOf( \"<\"+openCloseTags[j], lastStringIndex)) > -1) {\n lastStringIndex = stringIndex;\n // Try to find the matching closing tag (ignores possible nesting!)\n int endIndex = lcresult.indexOf(closeTag, stringIndex);\n if (endIndex > -1) {\n // If we found it delete it.\n result.delete(stringIndex, endIndex+closeTag.length());\n lcresult.delete(stringIndex, endIndex+closeTag.length());\n } else {\n // Try to see if it is a self-closed empty content tag, i.e. closed with />.\n endIndex = lcresult.indexOf(\">\", stringIndex);\n int nextStart = lcresult.indexOf(\"<\", stringIndex+1);\n if (endIndex > stringIndex && lcresult.charAt(endIndex-1) == '/' && (endIndex < nextStart || nextStart == -1)) {\n // Looks like it, so remove it.\n result.delete(stringIndex, endIndex + 1);\n lcresult.delete(stringIndex, endIndex + 1);\n \n }\n }\n }\n }\n \n return result.toString();\n }", "@Test(enabled = false)\n public void testRemoveLaunchPermissionsFromImage() {\n }", "public static void hideWarnings() {\n\t\tenableWarn = false;\n\t}", "public void unsetWeatherImage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(WEATHERIMAGE$2, 0);\n }\n }", "java.util.List<com.google.wireless.android.sdk.stats.BuildAttributionPluginIdentifier>\n getIncompatiblePluginsList();", "public Image getHotImage () {\r\n\tcheckWidget();\r\n\treturn hotImage;\r\n}", "public void removeOverlay() {\n MimsPlus[] openImages = ui.getAllOpenImages();\n for (MimsPlus image : openImages) {\n for (Roi roi : rois) {\n Overlay overlay = image.getGraphOverlay();\n int index = overlay.getIndex(roi.getName() + graphID);\n if (index > -1) {\n overlay.remove(index);\n }\n image.setOverlay(overlay);\n }\n }\n }", "@Override\n\tpublic Image[] getStaticImages() {\n\t\treturn null;\n\t}", "private static void stripUnlikelyCandidates(Document doc) {\n if (true) {\n return; // Temporarily disabled; see comment above.\n }\n\n for (Element child : doc.select(\"body\").select(\"*\")) {\n String className = child.className().toLowerCase();\n String id = child.id().toLowerCase();\n if (ExtractionHelpers.NEGATIVE_CSS_CLASSES_AND_IDS.matcher(className).find() || ExtractionHelpers.NEGATIVE_CSS_CLASSES_AND_IDS.matcher(id).find()) {\n Log.printAndRemove(child, \"stripUnlikelyCandidates\");\n }\n }\n }", "private void excludeFromWarPackaging() {\n getLog().info(\"excludeFromWarPackaging\");\n String pluginGroupId = \"org.apache.maven.plugins\";\n String pluginArtifactId = \"maven-war-plugin\";\n if (project.getBuildPlugins() != null) {\n for (Object o : project.getBuildPlugins()) {\n Plugin plugin = (Plugin) o;\n\n if (pluginGroupId.equals(plugin.getGroupId()) && pluginArtifactId.equals(plugin.getArtifactId())) {\n Xpp3Dom dom = (Xpp3Dom) plugin.getConfiguration();\n if (dom == null) {\n dom = new Xpp3Dom(\"configuration\");\n plugin.setConfiguration(dom);\n }\n Xpp3Dom excludes = dom.getChild(\"packagingExcludes\");\n if (excludes == null) {\n excludes = new Xpp3Dom(\"packagingExcludes\");\n dom.addChild(excludes);\n excludes.setValue(\"\");\n } else if (excludes.getValue().trim().length() > 0) {\n excludes.setValue(excludes.getValue() + \",\");\n }\n\n Set<Artifact> dependencies = getArtifacts();\n getLog().debug(\"Size of getArtifacts: \" + dependencies.size());\n String additionalExcludes = \"\";\n for (Artifact dependency : dependencies) {\n getLog().debug(\"Dependency: \" + dependency.getGroupId() + \":\" + dependency.getArtifactId() + \"type: \" + dependency.getType());\n if (!dependency.isOptional() && Types.JANGAROO_TYPE.equals(dependency.getType())) {\n getLog().debug(\"Excluding jangaroo dependency form war plugin [\" + dependency.toString() + \"]\");\n // Add two excludes. The first one is effective when no name clash occurs\n additionalExcludes += \"WEB-INF\" + File.separator + \"lib\" + File.separator + dependency.getArtifactId() + \"-\" + dependency.getVersion() + \".jar,\";\n // the second when a name clash occurs (artifact will hav groupId prepended before copying it into the lib dir)\n additionalExcludes += \"WEB-INF\" + File.separator + \"lib\" + File.separator + dependency.getGroupId() + \"-\" + dependency.getArtifactId() + \"-\" + dependency.getVersion() + \".jar,\";\n }\n }\n excludes.setValue(excludes.getValue() + additionalExcludes);\n }\n }\n }\n }", "@Test void compareToNaive() {\n\t\tfor (var type : new ImageType[]{ImageType.SB_U8, ImageType.SB_U16, ImageType.SB_F32, ImageType.SB_F64}) {\n\t\t\tvar src = (ImageGray)type.createImage(width, height);\n\t\t\tvar dst = (ImageGray)type.createImage(1, 1);\n\n\t\t\tGImageMiscOps.fillUniform(src, rand, 0, 100);\n\n\t\t\tdouble mean = GImageStatistics.mean(src);\n\t\t\tGeometricMeanFilter.filter(src, radiusX, radiusY, mean, dst);\n\n\t\t\tassertEquals(width, dst.width);\n\t\t\tassertEquals(height, dst.height);\n\n\t\t\tfor (int y = 0; y < dst.height; y++) {\n\t\t\t\tfor (int x = 0; x < dst.width; x++) {\n\t\t\t\t\tdouble found = GeneralizedImageOps.get(dst, x, y);\n\t\t\t\t\tassertEquals(naiveMean(src, x, y, radiusX, radiusY), found, 1.0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean hasImageCaptureBug() {\n // list of known devices that have the bug\n ArrayList<String> devices = new ArrayList<String>();\n devices.add(\"android-devphone1/dream_devphone/dream\");\n devices.add(\"generic/sdk/generic\");\n devices.add(\"vodafone/vfpioneer/sapphire\");\n devices.add(\"tmobile/kila/dream\");\n devices.add(\"verizon/voles/sholes\");\n devices.add(\"google_ion/google_ion/sapphire\");\n\n return devices.contains(android.os.Build.BRAND + \"/\" + android.os.Build.PRODUCT + \"/\"\n + android.os.Build.DEVICE);\n }", "@Override\r\n\tpublic ImageDescriptor getImageDescriptor() {\n\t\treturn null;\r\n\t}", "private void purgeObsoleteExposureIDs( long now) {\n\t\tassert( this.getAppType() == Beacon.AppType.APPLE_GOOGLE_CONTACT_TRACING);\n\t\tlong beforeTS = now - getDurationKeepExposureIDs();\n\t\tif ( !this.idStore.purge( new Date( beforeTS))) {\n\t\t\tlogger.warning( \"failure to purge old exposures\");\n\t\t} else {\n\t\t\tsetPurgedObsoleteExposureIDsTS( now);\n\t\t}\n\t}", "public boolean hasImageByTransform() {\n return ((bitField0_ & 0x00000800) == 0x00000800);\n }", "@Override\n\tpublic ImageDescriptor getImageDescriptor() {\n\t\treturn null;\n\t}", "@Override\r\n protected String[] getImageNames()\r\n {\n return new String[] {\r\n \"\", // empty string allows to disable element image\r\n MaruSpacecraftResources.SPACECRAFT_DEFAULT_1.getName(),\r\n MaruSpacecraftResources.SPACECRAFT_DEFAULT_2.getName(),\r\n MaruSpacecraftResources.SPACECRAFT_DEFAULT_3.getName(),\r\n MaruSpacecraftResources.SPACECRAFT_ISS_1.getName(),\r\n MaruSpacecraftResources.SPACECRAFT_ISS_2.getName(),\r\n MaruSpacecraftResources.SPACECRAFT_ASTRONAUT_1.getName(),\r\n MaruSpacecraftResources.SPACECRAFT_ROCKET_1.getName(),\r\n MaruSpacecraftResources.SPACECRAFT_SHUTTLE_1.getName(),\r\n MaruSpacecraftResources.SPACECRAFT_SHUTTLE_2.getName(),\r\n };\r\n }", "public boolean isDeprecated()\n {\n if (m_deprecated.equals(\"yes\"))\n return true;\n\n return false;\n }", "@java.lang.Deprecated\n java.lang.String getAnnotationsFilter();", "public static void filter_old() throws IOException {\n\t\tHashSet<String> wikimid = new HashSet<String>();\r\n\t\t{\r\n\t\t\tDelimitedWriter dw = new DelimitedWriter(Main.file_mid2wid);\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_fbdump_2_len4);\r\n\t\t\tString[] l;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\tif (l[1].equals(\"/type/object/key\") && l[2].equals(\"/wikipedia/en_id\")) {\r\n\t\t\t\t\tdw.write(l[0], l[3]);\r\n\t\t\t\t\twikimid.add(l[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdr.close();\r\n\t\t\tdw.close();\r\n\t\t\tD.p(\"wiki id size is\", wikimid.size());\r\n\t\t}\r\n\t\tDelimitedWriter dw = new DelimitedWriter(Main.file_visible + \".filter\");\r\n\t\t{\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_visible);\r\n\t\t\tString[] l;\r\n\t\t\tint count = 0, write = 0;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\tcount++;\r\n\t\t\t\tif (count % 100000 == 0) {\r\n\t\t\t\t\tD.p(\"count vs write\", count, write);\r\n\t\t\t\t}\r\n\t\t\t\tString rel = l[2];\r\n\t\t\t\tif (rel.startsWith(\"/type\") || rel.startsWith(\"/user\") || rel.startsWith(\"/common\")\r\n\t\t\t\t\t\t|| rel.startsWith(\"/base\")) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"s\") && !wikimid.contains(l[1])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"j\") && (!wikimid.contains(l[1]) || !wikimid.contains(l[3]))) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tdw.write(l);\r\n\t\t\t\twrite++;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tdw.close();\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[1].compareTo(arg1[1]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid2\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[3].compareTo(arg1[3]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbrel\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[2].compareTo(arg1[2]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t}", "void removeMatching(MetricFilter filter);", "@Override\n\t\tpublic ImageDescriptor getImageDescriptor() {\n\t\t\treturn null;\n\t\t}", "public static void disableWarning() {\n try {\n Field theUnsafe = Unsafe.class.getDeclaredField(\"theUnsafe\");\n theUnsafe.setAccessible(true);\n Unsafe u = (Unsafe) theUnsafe.get(null);\n\n Class<?> c = Class.forName(\"jdk.internal.module.IllegalAccessLogger\");\n Field logger = c.getDeclaredField(\"logger\");\n u.putObjectVolatile(c, u.staticFieldOffset(logger), null);\n } catch (ClassNotFoundException e) {\n // do nothing\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public boolean hasNoImages() {\n return noImages;\n }", "public Image getTrebleClef();", "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 }", "@Test\n public void testNoImageTypesRGBWithCMYKProfile() throws IOException {\n JPEGImageReader reader = createReader();\n reader.setInput(ImageIO.createImageInputStream(getClassLoaderResource(\"/jpeg/no-image-types-rgb-us-web-coated-v2-ms-photogallery-exif.jpg\")));\n\n assertEquals(1743, reader.getWidth(0));\n assertEquals(2551, reader.getHeight(0));\n\n ImageReadParam param = reader.getDefaultReadParam();\n param.setSourceRegion(new Rectangle(0, 0, 1743, 16)); // Save some memory\n BufferedImage image = reader.read(0, param);\n\n assertNotNull(image);\n assertEquals(1743, image.getWidth());\n assertEquals(16, image.getHeight());\n\n // TODO: Need to test colors!\n\n assertTrue(reader.hasThumbnails(0)); // Should not blow up!\n }", "public static Image filtroGrisVerde(Image img){\n WritableImage resultImg = new WritableImage((int)img.getWidth(),(int)img.getHeight());\n PixelReader pixelr = img.getPixelReader();\n PixelWriter pixelw = resultImg.getPixelWriter();\n \n for (int i = 0; i < img.getHeight(); i++) {\n for (int j = 0; j < img.getWidth(); j++) {\n Color color = pixelr.getColor(j, i);\n double green;\n green = color.getGreen();\n green *= 255;\n pixelw.setColor(j, i, Color.rgb((int)green, (int)green, (int)green));\n }\n }\n \n return resultImg;\n }", "@Override\n public boolean getObsolete()\n {\n return false;\n }", "public List<Image> parseBestOfImagesResult(Document doc) {\n\n ArrayList<Image> bestOfImages = new ArrayList<>();\n Elements htmlImages = doc.select(CSS_BEST_OF_IMAGE_QUERY);\n Timber.i(\"Best OfImages: %s\", htmlImages.toString());\n String href;\n Image bestOfImage;\n for (Element image : htmlImages) {\n href = image.attr(\"src\");\n Timber.i(\"Image src: %s\", href);\n bestOfImage = new Image(href);\n bestOfImages.add(bestOfImage);\n }\n return bestOfImages;\n }", "protected void setIncompatibleWithSkymeld() {\n addOptions(\"--noexperimental_merged_skyframe_analysis_execution\");\n }", "boolean isNotAllMedia();", "private String[] getArrayOfMissingImages (String[] imageNames)\t{\n\n\t\tString missingImagesString =\"\";\n\n\t\tfor(String item : imageNames)\t{\n\t\t\t\n\t\t\tString formattedImageName = item.replaceFirst(\"/\", \"\").trim();\n\n\t\t\tContextWrapper cw = new ContextWrapper(getApplicationContext());\n\t\t\t// path to /data/data/yourapp/app_data/imageDir\n\t\t\tFile directory = cw.getDir(\"imageDir\", Context.MODE_PRIVATE);\t//readable is just for testing\n\t\t\t// Create imageDir\n\t\t\tFile mypath=new File(directory, formattedImageName.replaceFirst(\"/\", \"\")+\".jpg\");\n\n//\t\t\tFile f = new File(item);\n\t\t\t\n\t\t\t\n\n\t\t\tif(!mypath.exists())\t{\n\n\t\t\t\tmissingImagesString = missingImagesString + item + \",\";\n\t\t\t}\n\n\t\t}\n\n\t\tString[] missingImagesArray = missingImagesString.split(\",\");\n\n\t\t\n\t\tif(missingImagesArray[0].equals(\"\") && missingImagesArray.length == 1)\t{\n\n\t\t\tString[] empty = new String[0];\n\t\t\treturn empty;\n\n\t\t} else {\n\n\t\t\treturn missingImagesArray;\n\n\t\t}\n\n\n\t}", "@Test\n public void filter() throws IOException {\n Layer newTestLayer = ImageUtil.readJPEGPNG(\"spencer.jpeg\");\n Layer newTestLayerBlur = ImageUtil.readJPEGPNG(\"spencer.jpeg\");\n new Blur().filter(newTestLayerBlur);\n assertTrue(newTestLayer.getPixels() != newTestLayerBlur.getPixels());\n }", "protected void createIgnoreAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/2007/ImpactAnalysis/Ignore\";\t\n\t\taddAnnotation\n\t\t (architectureAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceImplementationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceUseEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (providedInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (requiredInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (actorCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\n\t}", "public void disableMonsters(){\n enabled = false;\n }", "public void removeAllOfficialFileWebpage() {\r\n\t\tBase.removeAll(this.model, this.getResource(), OFFICIALFILEWEBPAGE);\r\n\t}", "public void hidePics(){\n\t\t\tfor (int i = 0; i < 3; i++)\n\t\t\t\tfor (int j = 0; j < 3; j++)\n\t\t\t\t\tpics[i][j].setVisible(false);\n\t\t}", "public void removeAllOfficialAudioSourceWebpage() {\r\n\t\tBase.removeAll(this.model, this.getResource(), OFFICIALAUDIOSOURCEWEBPAGE);\r\n\t}", "public Image getDisabledImage () {\r\n\tcheckWidget();\r\n\treturn disabledImage;\r\n}", "public static void main(String args[]){\n String[] formatNames = ImageIO.getWriterFormatNames();\n formatNames = unique(formatNames);\n for (int n=0; n<formatNames.length; n++){\n System.out.println(formatNames[n]);\n }\n }", "public void cleanup(Set<String> currentImages) {\n if (currentImages.size() == 0) return;\n\n Set<String> currentFiles = new HashSet<String>(currentImages.size());\n for (String url : currentImages) currentFiles.add(getFileName(url));\n File[] files = cacheDir.listFiles();\n if (files == null) return;\n for (File f : files) {\n long timestamp = f.lastModified();\n if ((System.currentTimeMillis() > (timestamp + MAX_FILE_AGE_MILLIS)) ||\n (!currentFiles.contains(f.getName()))) {\n f.delete();\n }\n }\n }", "public boolean hasImage() {\n return !getImageResourceIds().equals(\"\");\n }", "private void removeOldMouseGrabber() {\n Object oldLogger = ReflectionUtil.changeIllegalAccessLogger(null);\n AppContext context = AppContext.getAppContext();\n try {\n Field field = BasicPopupMenuUI.class.getDeclaredField(\"MOUSE_GRABBER_KEY\");\n field.setAccessible(true);\n Object value = field.get(null);\n Object mouseGrabber = context.get(value);\n if (mouseGrabber != null) {\n Method method = mouseGrabber.getClass().getDeclaredMethod(\"uninstall\");\n method.setAccessible(true);\n method.invoke(mouseGrabber);\n }\n context.put(value, null);\n } catch (NoSuchFieldException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {\n e.printStackTrace();\n } finally {\n ReflectionUtil.changeIllegalAccessLogger(oldLogger);\n }\n }", "public void resetFilterIcon() {\n removeStyleName(\"appliedfilter\");\n icon.setSource(defaultTheam);\n\n }", "public Image getBassClef();", "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 }", "boolean hasDeprecatedHadithNo();", "void removeDeprecatedHadithNo(Object oldDeprecatedHadithNo);", "boolean isBlurred(String imageLocation) {\n\t\t\tBitmapFactory.Options opt = new BitmapFactory.Options();\n\t\t\topt.inDither = true;\n\t\t\topt.inPreferredConfig = Bitmap.Config.ARGB_8888;\n\t\t\tFile f = new File(imageLocation);\n\t\t\tFile f1 = new File(Environment.getExternalStorageDirectory(),\n\t\t\t\t\t\"Flash/raw/raw01.jpg/\");\n\n\t\t\tBitmap image = BitmapFactory.decodeFile(f.getAbsolutePath());\n\t\t\tBitmap image1 = BitmapFactory.decodeFile(f.getAbsolutePath());\n\t\t\tint l = CvType.CV_8UC1; // 8-bit grey scale image\n\t\t\tMat matImage = new Mat();\n\t\t\tUtils.bitmapToMat(image, matImage);\n\t\t\tMat matImageGrey = new Mat();\n\t\t\tImgproc.cvtColor(matImage, matImageGrey, Imgproc.COLOR_BGR2GRAY);\n\n\t\t\tBitmap destImage;\n\t\t\tdestImage = Bitmap.createBitmap(image);\n\t\t\tMat dst2 = new Mat();\n\t\t\tUtils.bitmapToMat(destImage, dst2);\n\t\t\tMat laplacianImage = new Mat();\n\t\t\tdst2.convertTo(laplacianImage, l);\n\t\t\tImgproc.Laplacian(matImageGrey, laplacianImage, CvType.CV_8U);\n\t\t\tMat laplacianImage8bit = new Mat();\n\t\t\tlaplacianImage.convertTo(laplacianImage8bit, l);\n\n\t\t\tBitmap bmp = Bitmap.createBitmap(laplacianImage8bit.cols(),\n\t\t\t\t\tlaplacianImage8bit.rows(), Bitmap.Config.ARGB_8888);\n\n\t\t\tUtils.matToBitmap(laplacianImage8bit, bmp);\n\t\t\tint[] pixels = new int[bmp.getHeight() * bmp.getWidth()];\n\t\t\tbmp.getPixels(pixels, 0, bmp.getWidth(), 0, 0, bmp.getWidth(),\n\t\t\t\t\tbmp.getHeight());\n\n\t\t\tint maxLap = -16777216;\n\n\t\t\tfor (int i = 0; i < pixels.length; i++) {\n\t\t\t\tif (pixels[i] > maxLap)\n\t\t\t\t\tmaxLap = pixels[i];\n\t\t\t}\n\n\t\t\tint soglia = -8500000;// -6118750; -93492394; //\n\t\t\t// blurred: -12500671\n\t\t\t// nonblurred: -8487298\n\t\t\t// medium blurred: -8947849\n\t\t\tif (maxLap < soglia || maxLap == soglia) {\n\t\t\t\tString result = \"Blurred\";\n\t\t\t\tSystem.out.println(\"img is: \" + maxLap + \" blurred\");\n\t\t\t\tLog.d(\"DEBUG\", \"\" + maxLap);\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tString result = \"Not blurred\";\n\t\t\t\tLog.d(\"DEBUG\", \"\" + maxLap);\n\t\t\t\tSystem.out.println(\"img is: \" + maxLap + \" not blurred\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "protected abstract boolean checkUnSupportedFeatures(TrafficSelector selector, TrafficTreatment treatment);", "private void updateBoardNoImageChange() {\r\n\t\tafterReceivedBoardURL(boardImageURL);\r\n\t}", "@Test(groups={\"it\"})\r\n\tpublic void testUnusedCaptureAreDeleted() throws Exception {\r\n\t\t\r\n\t\texecuteSubTest(1, new String[] {\"com.seleniumtests.it.stubclasses.StubTestClassForDriverTest\"}, ParallelMode.METHODS, new String[] {\"testDriverNativeActions\"});\r\n\t\t\r\n\t\t// if a file belongs to a step, it's renamed\r\n\t\tfor (File htmlFile: Paths.get(SeleniumTestsContextManager.getGlobalContext().getOutputDirectory(), \"testDriverNativeActions\", \"htmls\").toFile().listFiles()) {\r\n\t\t\tAssert.assertTrue(htmlFile.getName().startsWith(\"testDriver\"));\r\n\t\t}\r\n\t\tfor (File imgFile: Paths.get(SeleniumTestsContextManager.getGlobalContext().getOutputDirectory(), \"testDriverNativeActions\", \"screenshots\").toFile().listFiles()) {\r\n\t\t\tAssert.assertTrue(imgFile.getName().startsWith(\"testDriver\"));\r\n\t\t}\r\n\t}", "@Override\n public boolean isConcurrentWritableImageManagementSupported() {\n return false;\n }", "com.google.wireless.android.sdk.stats.BuildAttributionPluginIdentifier getIncompatiblePlugins(int index);", "public Boolean getDeprecated()\n {\n return deprecated;\n }", "public void hideMultipleImages(boolean hide){\n this.hideMultipleImages = hide;\n }", "protected Boolean hasImageName(Object value) {\n\t return true;\n }", "public List<String> getIgnoreFilePatterns() {\n if (!ignoreFilePatterns.isEmpty()) {\n if (!ignoreFileRes.isEmpty()) {\n throw new InvalidProject(\n \"ignore_file_res is a deprecated configuration field. it is replaced with \"\n + \"ignore_file_patterns. Only one of these should be set.\");\n }\n return ignoreFilePatterns;\n }\n return ignoreFileRes;\n }", "@Override\n\tpublic void desenhar() {\n\t\tSystem.out.println(\"desenhar imagem png\");\n\t\t\n\t}", "public native MagickImage flopImage() throws MagickException;" ]
[ "0.6010135", "0.58008325", "0.56348425", "0.5627484", "0.54871416", "0.5336974", "0.5323418", "0.5320059", "0.51700187", "0.5164348", "0.5162703", "0.5068896", "0.5058625", "0.50416714", "0.5017555", "0.49791542", "0.49686792", "0.49667284", "0.49497998", "0.49392965", "0.4928249", "0.49217087", "0.49173367", "0.48936582", "0.48620856", "0.48353457", "0.48224843", "0.48182687", "0.48171648", "0.48111737", "0.4794218", "0.47841635", "0.47826195", "0.47670004", "0.476391", "0.476263", "0.4758715", "0.4745904", "0.4745461", "0.4742465", "0.4736956", "0.47337425", "0.47287995", "0.47278282", "0.47257045", "0.47212914", "0.46894792", "0.46881354", "0.466377", "0.46507424", "0.46500474", "0.4646483", "0.4644918", "0.46442485", "0.4629372", "0.46169168", "0.46075657", "0.4600112", "0.45941082", "0.458139", "0.4577864", "0.45776066", "0.45762613", "0.45741588", "0.45630294", "0.4561688", "0.45614386", "0.45576242", "0.45575577", "0.45501065", "0.4549626", "0.45419696", "0.45411465", "0.45406273", "0.4537731", "0.45335326", "0.4531448", "0.45225337", "0.4521991", "0.4518933", "0.4511542", "0.45042115", "0.45039767", "0.4501611", "0.44928765", "0.44915023", "0.44910344", "0.44873652", "0.44834048", "0.44827908", "0.44813854", "0.44794092", "0.44687784", "0.44679818", "0.44673824", "0.44630176", "0.44587314", "0.44526732", "0.4452234", "0.44489667" ]
0.62335485
0
need to insert the network first
@Test(groups = "live") public void testInsertInstanceWindows() { assertOperationDoneSuccessfully(api.networks().createInIPv4Range (INSTANCE_NETWORK_NAME, IPV4_RANGE)); assertOperationDoneSuccessfully(diskApi().create(DISK_NAME, new DiskCreationOptions.Builder().sizeGb(DEFAULT_DISK_SIZE_GB).build())); assertOperationDoneSuccessfully(api().create(instance)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testNetworkCreationValid() {\n\t\tassertEquals(N_TESTNODES, testNet.nodeCount());\n\t\tfor (int i = 0; i < testNodes.length; i++) {\n\t\t\tassertTrue(testNet.nodes().contains(testNodes[i]));\n\t\t\tassertEquals(i, testNodes[i].getSimulationId());\n\t\t}\n\n\t\t// Test that link insertion works.\n\t\tfinal int N_LINKS = N_TESTNODES * (N_TESTNODES - 1) / 2;\n\t\tfor (INodeImpl node : testNodes) {\n\n\t\t\tfor (INodeImpl neighbour : testNodes) {\n\n\t\t\t\tif (node != neighbour && !node.isNeighbour(neighbour)) {\n\t\t\t\t\ttestNet.createLink(node, neighbour, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tassertEquals(N_LINKS, testNet.linkCount());\n\n\t\tfor (INodeImpl node : testNodes) {\n\n\t\t\tfor (INodeImpl neighbour : testNodes) {\n\n\t\t\t\tif (node != neighbour) {\n\t\t\t\t\tassertTrue(node.isNeighbour(neighbour));\n\t\t\t\t\tassertTrue(neighbour.isNeighbour(node));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void buildNetwork() {\n }", "@Override\n\tpublic void ConstructNetwork() {\n\t\t\n\t\tAddUnit add_r_t=new AddUnit();\n\t\tUnitIterator ui=new UnitIterator();\n\t\tui.unit=add_r_t;\n\n\t\tnetwork=new UnitList();\n\t\tnetwork.unitList.add(ui);\n\t\tnetwork.unitList.add(new AddUnit());\n\t\t\t\n\t}", "public void buildNetwork() {\n \t\tnetwork.finalizeStructure();\n \t}", "public void loadEdge()\r\n {\r\n town.createConnection();\r\n }", "private void insertCheckedInNetworkService(NetworkServiceProfile networkServiceProfile) throws CantInsertRecordDataBaseException, CantReadRecordDataBaseException {\n\n if (!getDaoFactory().getCheckedInNetworkServiceDao().exists(networkServiceProfile.getIdentityPublicKey())) {\n\n /*\n * Create the checkedInNetworkService\n */\n CheckedInNetworkService checkedInNetworkService = new CheckedInNetworkService();\n checkedInNetworkService.setIdentityPublicKey(networkServiceProfile.getIdentityPublicKey());\n checkedInNetworkService.setClientIdentityPublicKey(networkServiceProfile.getClientIdentityPublicKey());\n checkedInNetworkService.setNetworkServiceType(networkServiceProfile.getNetworkServiceType().getCode());\n\n //Validate if location are available\n if (networkServiceProfile.getLocation() != null) {\n checkedInNetworkService.setLatitude(networkServiceProfile.getLocation().getLatitude());\n checkedInNetworkService.setLongitude(networkServiceProfile.getLocation().getLongitude());\n } else {\n checkedInNetworkService.setLatitude(0.0);\n checkedInNetworkService.setLongitude(0.0);\n }\n\n /*\n * Save into the data base\n */\n getDaoFactory().getCheckedInNetworkServiceDao().create(checkedInNetworkService);\n }\n }", "void add_to_network(Town town, List<Town> connectedTowns);", "private void fourNodesTopo() {\n ReadWriteTransaction tx = dataBroker.newReadWriteTransaction();\n n(tx, true, \"n1\", Stream.of(pB(\"n1:1\"), pB(\"n1:2\"), pI(\"n1:3\"), pO(\"n1:4\"), pO(\"n1:5\")));\n n(tx, true, \"n2\", Stream.of(pB(\"n2:1\"), pB(\"n2:2\"), pO(\"n2:3\"), pI(\"n2:4\"), pI(\"n2:5\")));\n n(tx, true, \"n3\", Stream.of(pB(\"n3:1\"), pB(\"n3:2\"), pO(\"n3:3\"), pO(\"n3:4\"), pI(\"n3:5\")));\n n(tx, true, \"n4\", Stream.of(pB(\"n4:1\"), pB(\"n4:2\"), pI(\"n4:3\"), pI(\"n4:4\"), pO(\"n4:5\")));\n l(tx, \"n1\", \"n1:5\", \"n2\", \"n2:5\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n1\", \"n1:4\", \"n4\", \"n4:4\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n2\", \"n2:3\", \"n4\", \"n4:3\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n3\", \"n3:4\", \"n2\", \"n2:4\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n4\", \"n4:5\", \"n3\", \"n3:5\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n try {\n tx.submit().checkedGet();\n } catch (TransactionCommitFailedException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n protected void finishUp() {\r\n super.finishUp();\r\n printWarnings(emptyFields, \"empty fields\", 0, lineNumber);\r\n printWarnings(badFields, \"field parsing warnings\", 10, lineNumber);\r\n printWarnings(shortLines, \"missing fields\", 10, lineNumber);\r\n printWarnings(lineErrors, \"uncaught errors\", 10, lineNumber);\r\n Transaction transaction = neo.beginTx();\r\n try {\r\n if (networkHeader != null) {\r\n networkHeader.saveStatistic(network);\r\n }\r\n network.setProperty(\"site_count\", siteNumber);\r\n network.setProperty(INeoConstants.SECTOR_COUNT, sectorNumber);\r\n network.setProperty(\"bsc_count\", bsc_s.size());\r\n network.setProperty(\"city_count\", city_s.size());\r\n network.setProperty(INeoConstants.PROPERTY_STRUCTURE_NAME, getLevelsFound());\r\n \r\n saveFileStructure();\r\n \r\n transaction.success();\r\n } finally {\r\n transaction.finish();\r\n }\r\n // add network to project and gis node to catalog\r\n super.cleanupGisNode();\r\n \r\n if (!isTest()) {\r\n showNetworkTree();\r\n }\r\n }", "void onCreateNewNetSuccess();", "void insert(CTelnetServers record);", "public void ajouter() {\n position = graph.edges.ajouterElement(this);\n origine.successeurs.inserer(destination);\n destination.predecesseurs.inserer(origine);\n origine.aretes_sortantes.inserer(this);\n destination.aretes_entrantes.inserer(this);\n }", "public void insertTripleDistributedByObject(Triple triple) {\n\r\n }", "public void connectNodes(){\n for(int i = 0; i < inputSize; i++){\n network.get(0).add(new InputNode());\n }\n \n for(int i = 1; i < layers; i++){\n \n for(int j = 0; j < layerSize; j++){\n \n network.get(i).add(new Node(network.get(i-1)));\n }\n \n }\n \n }", "public void create(NetworkNode networkNode);", "@Override\n public Uri insert(Uri uri, ContentValues values) {\n String key = values.getAsString(ATTR_key);\n Log.i(taginsert, \"Message generated with key, value = \"+key+\", \"+values.getAsString(ATTR_value)+\" at node \"+myPort);\n try {\n String hashKey = genHash(key);\n// Log.i(\"PoRTS\", myPort+\",\"+predPort+\",\"+succPort);\n if (predPort.equals(succPort) && predPort.equals(myPort) && succPort.equals(myPort)) {\n Log.i(taggeneral, \"Isolated CP Test for \"+myPort);\n String filePath = getContext().getFilesDir().getAbsolutePath();\n try {\n FileWriter fw = new FileWriter(new File(filePath, key));\n fw.write(values.getAsString(ATTR_value));\n fw.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return uri;\n }\n if (checkIfHeadNode()) {\n if ((hashKey.compareTo(genHash(predPort)) > 0) || (hashKey.compareTo(myNodeHashId) <= 0)) {\n Log.i(taginsert, \"Inserting at head node --> \"+key + \" with hashkey = \"+hashKey);\n String filePath = getContext().getFilesDir().getAbsolutePath();\n try {\n FileWriter fw = new FileWriter(new File(filePath, key));\n fw.write(values.getAsString(ATTR_value));\n fw.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return uri;\n }\n }\n if ((hashKey.compareTo(myNodeHashId) <= 0) && (hashKey.compareTo(genHash(predPort)) > 0)) { //insert in mynode\n Log.i(taginsert, \"Inserting at \" + myPort + \" --> \"+key + \" with hashkey = \"+hashKey);\n String filePath = getContext().getFilesDir().getAbsolutePath();\n try {\n FileWriter fw = new FileWriter(new File(filePath, key));\n fw.write(values.getAsString(ATTR_value));\n fw.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return uri;\n } else {\n try {\n Socket socket = null;\n socket = new Socket(InetAddress.getByAddress(new byte[]{10, 0, 2, 2}),\n Integer.parseInt(String.valueOf((Integer.parseInt(succPort) * 2))));\n Log.i(taginsert, \"Forwarding insert request message to successor Node to \"+succPort);\n MessagePacket msgToSend = generateInsertRequestForwardMessage(values);\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())); //write the message received to the output stream\n bw.write(serializeMessage(msgToSend));\n bw.flush(); //force invoke flush to send message and clear buffer.\n socket.close(); //close the socket.\n } catch (UnknownHostException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n return null;\n }", "public void addLast(Packets packet) {\t\t \n\t\t \n\t\t/* Updating the current node of the packet */\n\t\tpacket.setCurNode(getNodeId()); \n\t\t\n\t\t/* Add packet at the end of the neighboring nodes queue */\n\t\tqueue.addLast(packet);\n\t\t \t\t\n\t\t/* We need to record packet is sent into the queue \n\t\t * Packets.dumpStatistics(packet);\n\t\t * */\n\t\tPackets.dumpStatistics(packet,\"ENQUEUE\");\n\t\t\n\t\t/* Calling router activate every time a packet is added to its queue to make sure its on the scheduling queue */\t \n\t\tCCNRouter rtr = Grid.getRouter(getNodeId());\n\t\trtr.Activate();\t \n\t}", "public Network() {\n\t\tnodes.put(\"192.168.0.0\", new NetNode(\"192.168.0.0\"));\n\t\tnodes.put(\"192.168.0.1\", new NetNode(\"192.168.0.1\"));\n\t\tnodes.put(\"192.168.0.2\", new NetNode(\"192.168.0.2\"));\n\t\tnodes.put(\"192.168.0.3\", new NetNode(\"192.168.0.3\"));\n\t\tnodes.put(\"192.168.0.4\", new NetNode(\"192.168.0.4\"));\n\t\t//manually entering ports\n\t\t//0 to 1 and 2\n\t\tnodes.get(\"192.168.0.0\").addPort(nodes.get(\"192.168.0.1\"));\n\t\tnodes.get(\"192.168.0.0\").addPort(nodes.get(\"192.168.0.2\"));\n\t\t//1 to 0 and 3\n\t\tnodes.get(\"192.168.0.1\").addPort(nodes.get(\"192.168.0.0\"));\n\t\tnodes.get(\"192.168.0.1\").addPort(nodes.get(\"192.168.0.3\"));\n\t\t//2 to 0 and 3 and 4\n\t\tnodes.get(\"192.168.0.2\").addPort(nodes.get(\"192.168.0.0\"));\n\t\tnodes.get(\"192.168.0.2\").addPort(nodes.get(\"192.168.0.3\"));\n\t\tnodes.get(\"192.168.0.2\").addPort(nodes.get(\"192.168.0.4\"));\n\t\t//3 to 1 and 2 and 4\n\t\tnodes.get(\"192.168.0.3\").addPort(nodes.get(\"192.168.0.1\"));\n\t\tnodes.get(\"192.168.0.3\").addPort(nodes.get(\"192.168.0.2\"));\n\t\tnodes.get(\"192.168.0.3\").addPort(nodes.get(\"192.168.0.4\"));\n\t\t//4 to 2 and 3\n\t\tnodes.get(\"192.168.0.4\").addPort(nodes.get(\"192.168.0.2\"));\n\t\tnodes.get(\"192.168.0.4\").addPort(nodes.get(\"192.168.0.3\"));\n\t}", "@Override\r\n public void insertTripleDistributedBySubject(Triple triple) {\n\r\n }", "public Network () {\n buildNetwork();\n }", "@Override\n\tpublic boolean saveNetwork(){\n\t\ttry{\n\t\t\tif(network==null)\n\t\t\t\treturn false;\n\t\t\tFile networkFile=new File(Properties.BUB_HOME, Properties.NETWORK_FILE);\n\t\t\tObjectOutputStream stream=new ObjectOutputStream(new FileOutputStream(networkFile));\n\t\t\tstream.writeObject(network);\n\t\t\tstream.close();\n\t\t\treturn true;\n\t\t}catch(IOException | ClassCastException e){\n\t\t\t//Mostly for debugging\n\t\t\t//e.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "private void newNetworkDialogCreateButton(){\n //Create new networkData object here based on the field info\n LabData.NetworkData newNetworkData = new LabData.NetworkData(\n NetworkAddDialogNameTextfield.getText().toUpperCase(),\n NetworkAddDialogMaskTextfield.getText(),\n NetworkAddDialogGatewayTextfield.getText(),\n (int)NetworkAddDialogMacVLanExtSpinner.getValue(),\n (int)NetworkAddDialogMacVLanSpinner.getValue(),\n NetworkAddDialogIPRangeTextfield.getText(),\n NetworkAddDialogTapRadioButton.isSelected()\n );\n \n // Update the list of labs in the current UI data object\n labDataCurrent.getNetworks().add(newNetworkData);\n \n // Add the network into the UI \n addNetworkPanel(newNetworkData);\n \n // Update the Container Config dialogs to include the new network\n updateNetworkReferenceInContainerConfigDialogs(\"Add\", NetworkAddDialogNameTextfield.getText().toUpperCase(), null);\n }", "@Override\n\tpublic boolean insertOneEdge(NodeRelation nodeRelation) {\n\t\treturn false;\n\t}", "int insert(TLinkman record);", "void insertSelective(CTelnetServers record);", "int insertSelective(Online record);", "private void addArbitraryDataToDatabase() {\n\n try (Transaction tx = graphDatabaseService.beginTx()) {\n Node arbitraryNode = graphDatabaseService.createNode(DynamicLabel.label(\"NotAClass\"));\n arbitraryNode.setProperty(\"name\", \"Colin\");\n Node otherNode = graphDatabaseService.createNode(DynamicLabel.label(\"NotAClass\"));\n otherNode.setProperty(\"age\", 39);\n arbitraryNode.createRelationshipTo(otherNode, DynamicRelationshipType.withName(\"TEST\"));\n\n tx.success();\n }\n }", "void addNode(Entity entity) {\n\t\tProcessing.nodeSet.add(entity);\n\t\tSystem.out.println(\"the entity was successfully added to the network.\");\n\t}", "private void fiveNodesTopo() {\n ReadWriteTransaction tx = dataBroker.newReadWriteTransaction();\n n(tx, true, \"n1\", Stream.of(pI(\"n1:1\"), pB(\"n1:2\"), pI(\"n1:3\"), pO(\"n1:4\")));\n n(tx, true, \"n2\", Stream.of(pI(\"n2:1\"), pB(\"n2:2\"), pO(\"n2:3\"), pI(\"n2:4\")));\n n(tx, true, \"n3\", Stream.of(pO(\"n3:1\"), pB(\"n3:2\"), pO(\"n3:3\"), pI(\"n3:4\")));\n n(tx, true, \"n4\", Stream.of(pO(\"n4:1\"), pI(\"n4:2\"), pB(\"n4:3\"), pB(\"n4:4\")));\n n(tx, true, \"n5\", Stream.of(pI(\"n5:1\"), pB(\"n5:2\"), pB(\"n5:3\"), pO(\"n5:4\")));\n l(tx, \"n2\", \"n2:3\", \"n3\", \"n3:4\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n3\", \"n3:1\", \"n1\", \"n1:1\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n3\", \"n3:3\", \"n5\", \"n5:1\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n4\", \"n4:1\", \"n1\", \"n1:3\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n1\", \"n1:4\", \"n2\", \"n2:4\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n5\", \"n5:4\", \"n4\", \"n4:2\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n try {\n tx.submit().checkedGet();\n } catch (TransactionCommitFailedException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n protected Node getStoringNode(Integer key) {\r\n return getNetworkNode();\r\n }", "@Override\n @POST\n @Path(\"/networks\")\n public Response createNetwork() throws Exception {\n URI resourceUri = new URI(\"/1\");\n return Response.created(resourceUri).build();\n }", "public boolean insert(Panier nouveau) {\n\t\treturn false;\r\n\t}", "int insert(Online record);", "public void initializeNetwork() {\n if (DataHelper.isNull(searchDTO.getNetwork())) {\n //If no Network is set we have to see which network applies for this user\n this.searchDTO.setNetwork(obtainCurrentUserNetwork());\n }\n }", "private void go(Network n1) {\n\t\t\n\t\tNetwork n2 = new Network(2, n1);\n\t\tNetwork n3 = new Network(2, n2);\n\t\tSystem.out.println(\"\\tn3.p.p.id = \" + n3.p.p.id);\n\t}", "public void addNeuron(){\n neurons.add(new Neuron(neurons.size(), layerIndex));\n for (Neuron n: upStream.getNeurons()){\n Connection con = new Connection(n, neurons.get(neurons.size()-1));\n n.addDownStream(con);\n neurons.get(neurons.size()-1).addUpStream(con);\n }\n for (Neuron n: downStream.neurons){\n Connection con = new Connection(neurons.get(neurons.size()-1), n);\n n.addUpStream(con);\n neurons.get(neurons.size()-1).addDownStream(con);\n }\n }", "private void createNetwork(Attributes attributes) throws SAXException {\n Network newNetwork;\n try {\n newNetwork = (Network) lookupNode(attributes);\n } catch (ClassCastException e) {\n throw new SAXException(\"Node \" + attributes.getValue(\"type\") + \" is not a network.\");\n }\n if (currentNetwork == null) {\n rootNetwork = newNetwork;\n } else {\n currentNetwork.add(newNetwork);\n }\n currentNode = currentNetwork = newNetwork;\n parseNodeFlags(currentNetwork, attributes);\n expressionMap = new HashMap<Parameter, String>();\n }", "org.landxml.schema.landXML11.LanesDocument.Lanes insertNewLanes(int i);", "int insertSelective(TLinkman record);", "private void createGraph() {\n \t\t\n \t\t// Check capacity\n \t\tCytoscape.ensureCapacity(nodes.size(), edges.size());\n \n \t\t// Extract nodes\n \t\tnodeIDMap = new OpenIntIntHashMap(nodes.size());\n \t\tginy_nodes = new IntArrayList(nodes.size());\n \t\t// OpenIntIntHashMap gml_id2order = new OpenIntIntHashMap(nodes.size());\n \n \t\tfinal HashMap gml_id2order = new HashMap(nodes.size());\n \n \t\tSet nodeNameSet = new HashSet(nodes.size());\n \n \t\tnodeMap = new HashMap(nodes.size());\n \n \t\t// Add All Nodes to Network\n \t\tfor (int idx = 0; idx < nodes.size(); idx++) {\n \t\t\t\n \t\t\tif (taskMonitor != null) {\n \t\t\t\ttaskMonitor.setPercentCompleted(percentUtil.getGlobalPercent(1,\n \t\t\t\t\t\tidx, nodes.size()));\n \t\t\t}\n \n \t\t\t// Get a node object (NOT a giny node. XGMML node!)\n \t\t\tfinal cytoscape.generated2.Node curNode = (cytoscape.generated2.Node) nodes\n \t\t\t\t\t.get(idx);\n \t\t\tfinal String nodeType = curNode.getName();\n \t\t\tfinal String label = (String) curNode.getLabel();\n \n \t\t\treadAttributes(label, curNode.getAtt(), NODE);\n \n \t\t\tnodeMap.put(curNode.getId(), label);\n \n \t\t\tif (nodeType != null) {\n \t\t\t\tif (nodeType.equals(\"metaNode\")) {\n \t\t\t\t\tfinal Iterator it = curNode.getAtt().iterator();\n \t\t\t\t\twhile (it.hasNext()) {\n \t\t\t\t\t\tfinal Att curAttr = (Att) it.next();\n \t\t\t\t\t\tif (curAttr.getName().equals(\"metanodeChildren\")) {\n \t\t\t\t\t\t\tmetanodeMap.put(label, ((Graph) curAttr.getContent()\n \t\t\t\t\t\t\t\t\t.get(0)).getNodeOrEdge());\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\tif (nodeNameSet.add(curNode.getId())) {\n \t\t\t\tfinal Node node = (Node) Cytoscape.getCyNode(label, true);\n \n \t\t\t\tginy_nodes.add(node.getRootGraphIndex());\n \t\t\t\tnodeIDMap.put(idx, node.getRootGraphIndex());\n \n \t\t\t\t// gml_id2order.put(Integer.parseInt(curNode.getId()), idx);\n \n \t\t\t\tgml_id2order.put(curNode.getId(), Integer.toString(idx));\n \n \t\t\t\t// ((KeyValue) node_root_index_pairs.get(idx)).value = (new\n \t\t\t\t// Integer(\n \t\t\t\t// node.getRootGraphIndex()));\n \t\t\t} else {\n \t\t\t\tthrow new XGMMLException(\"XGMML id \" + nodes.get(idx)\n \t\t\t\t\t\t+ \" has a duplicated label: \" + label);\n \t\t\t\t// ((KeyValue)node_root_index_pairs.get(idx)).value = null;\n \t\t\t}\n \t\t}\n \t\tnodeNameSet = null;\n \n \t\t// Extract edges\n \t\tginy_edges = new IntArrayList(edges.size());\n \t\tSet edgeNameSet = new HashSet(edges.size());\n \n \t\tfinal CyAttributes edgeAttributes = Cytoscape.getEdgeAttributes();\n \n \t\t// Add All Edges to Network\n \t\tfor (int idx = 0; idx < edges.size(); idx++) {\n \n \t\t\tif (taskMonitor != null) {\n \t\t\t\ttaskMonitor.setPercentCompleted(percentUtil.getGlobalPercent(2,\n \t\t\t\t\t\tidx, edges.size()));\n \t\t\t}\n \t\t\tfinal cytoscape.generated2.Edge curEdge = (cytoscape.generated2.Edge) edges\n \t\t\t\t\t.get(idx);\n \n \t\t\tif (gml_id2order.containsKey(curEdge.getSource())\n \t\t\t\t\t&& gml_id2order.containsKey(curEdge.getTarget())) {\n \n \t\t\t\tString edgeName = curEdge.getLabel();\n \n \t\t\t\tif (edgeName == null) {\n \t\t\t\t\tedgeName = \"N/A\";\n \t\t\t\t}\n \n \t\t\t\tint duplicate_count = 1;\n \t\t\t\twhile (!edgeNameSet.add(edgeName)) {\n \t\t\t\t\tedgeName = edgeName + \"_\" + duplicate_count;\n \t\t\t\t\tduplicate_count += 1;\n \t\t\t\t}\n \n \t\t\t\tEdge edge = Cytoscape.getRootGraph().getEdge(edgeName);\n \n \t\t\t\tif (edge == null) {\n \n \t\t\t\t\tfinal String sourceName = (String) nodeMap.get(curEdge\n \t\t\t\t\t\t\t.getSource());\n \t\t\t\t\tfinal String targetName = (String) nodeMap.get(curEdge\n \t\t\t\t\t\t\t.getTarget());\n \n \t\t\t\t\tfinal Node node_1 = Cytoscape.getRootGraph().getNode(\n \t\t\t\t\t\t\tsourceName);\n \t\t\t\t\tfinal Node node_2 = Cytoscape.getRootGraph().getNode(\n \t\t\t\t\t\t\ttargetName);\n \n \t\t\t\t\tfinal Iterator it = curEdge.getAtt().iterator();\n \t\t\t\t\tAtt interaction = null;\n \t\t\t\t\tString itrValue = \"unknown\";\n \t\t\t\t\twhile (it.hasNext()) {\n \t\t\t\t\t\tinteraction = (Att) it.next();\n \t\t\t\t\t\tif (interaction.getName().equals(\"interaction\")) {\n \t\t\t\t\t\t\titrValue = interaction.getValue();\n \t\t\t\t\t\t\tif (itrValue == null) {\n \t\t\t\t\t\t\t\titrValue = \"unknown\";\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \n \t\t\t\t\tedge = Cytoscape.getCyEdge(node_1, node_2,\n \t\t\t\t\t\t\tSemantics.INTERACTION, itrValue, true);\n \n \t\t\t\t\t// Add interaction to CyAttributes\n \t\t\t\t\tedgeAttributes.setAttribute(edge.getIdentifier(),\n \t\t\t\t\t\t\tSemantics.INTERACTION, itrValue);\n \t\t\t\t}\n \n \t\t\t\t// Set correct ID, canonical name and interaction name\n \t\t\t\tedge.setIdentifier(edgeName);\n \n \t\t\t\treadAttributes(edgeName, curEdge.getAtt(), EDGE);\n \n \t\t\t\tginy_edges.add(edge.getRootGraphIndex());\n \t\t\t\t// ((KeyValue) edge_root_index_pairs.get(idx)).value = (new\n \t\t\t\t// Integer(\n \t\t\t\t// edge.getRootGraphIndex()));\n \t\t\t} else {\n \t\t\t\tthrow new XGMMLException(\n \t\t\t\t\t\t\"Non-existant source/target node for edge with gml (source,target): \"\n \t\t\t\t\t\t\t\t+ nodeMap.get(curEdge.getSource()) + \",\"\n \t\t\t\t\t\t\t\t+ nodeMap.get(curEdge.getTarget()));\n \t\t\t}\n \t\t}\n \t\tedgeNameSet = null;\n \n \t\tif (metanodeMap.size() != 0) {\n \t\t\tfinal Iterator it = metanodeMap.keySet().iterator();\n \t\t\twhile (it.hasNext()) {\n \t\t\t\tfinal String key = (String) it.next();\n \t\t\t\tcreateMetaNode(key, (List) metanodeMap.get(key));\n \t\t\t}\n \t\t}\n \t}", "public void addNetlist(Netlist nl){\r\n if(!nl.keySet().isEmpty()){\r\n netlists.add(nl);\r\n \r\n // Repopulate the Component tree\r\n ComponentSelectionTree.setModel(getTreeValues());\r\n }\r\n }", "void createGraphForDistributedSingleLoad();", "@Override\n public boolean addConnection(String firstNodeName, String secondNodeName) throws NodeException {\n\n try {\n if (containsNode(getSingleNode(firstNodeName)) && containsNode(getSingleNode(secondNodeName))) {\n getSingleNode(firstNodeName).newNeighbour(getSingleNode(secondNodeName));\n getSingleNode(secondNodeName).newNeighbour(getSingleNode(firstNodeName));\n return true;\n }\n } catch (NodeException e) {\n throw new NodeException(\"Jeden z Vámi zadaných prvků neexistuje!\");\n }\n\n return false;\n }", "@Override\r\n\tpublic boolean insert(LabelArticle model) {\n\t\treturn false;\r\n\t}", "public long wsadd_node(NodeWS node)\r\n\t\t\t\t{ \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tlong id = 0; //id de la tabla user (único) \r\n\t\t\t\t Node nodeC = new Node(node.getNode_name(),node.getMAC_address(),node.getPort_number());\r\n\t\t\t\t \r\n\t\t\t\t //User cliente1 = new User(\"[email protected]\", \"gutie33\", 1, \"Luis\",\"677899876\", \"Informatica\"); \r\n\t\t\t\t \r\n\t\t\t\t try \r\n\t\t\t\t { \r\n\t\t\t\t iniciaOperacion(); \r\n\t\t\t\t \r\n\t\t\t\t id= (Long) sesion.createQuery(\"SELECT u.id_company FROM Company u WHERE u.company_name ='\"+node.getName_company()+\"'\").uniqueResult();\r\n\t\t\t\t Company x = (Company) sesion.load(Company.class, id);\r\n\t\t\t\t x.addNodo(nodeC);\r\n\t\t\t\t \r\n\t\t\t\t\t nodeC.setCompany(x);\r\n\t\t\t\t \r\n\t\t\t\t //sesion.update(compx);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t //metodo para guardar cliente (del objeto hibernate.sesion) \r\n\t\t\t\t tx.commit(); \r\n\t\t\t\t }catch(HibernateException he) \r\n\t\t\t\t { \r\n\t\t\t\t manejaExcepcion(he);\r\n\t\t\t\t throw he; \r\n\t\t\t\t }finally \r\n\t\t\t\t { \r\n\t\t\t\t \t//Busqueda del id con qu elo ha introducido a la BBDD\r\n\t\t\t\t \tid= (Long) sesion.createQuery(\"SELECT u.id_node FROM Node u WHERE u.node_name ='\"+node.getNode_name()+\"'\").uniqueResult();\r\n\t\t\t\t sesion.close(); \r\n\t\t\t\t } \r\n\t\t\t\t return id; \r\n\t\t\t\t}", "@Override\n\tpublic void preInsert() {\n\n\t}", "@Override\n\tpublic boolean loadNetwork(){\n\t\tFile networkFile=new File(Properties.BUB_HOME, Properties.NETWORK_FILE);\n\t\ttry{\n\t\t\tif(!networkFile.exists())\n\t\t\t\treturn false;\n\t\t\tObjectInputStream stream=new ObjectInputStream(new FileInputStream(networkFile));\n\t\t\tnetwork=(Network) stream.readObject();\n\t\t\tif(network != null)\n\t\t\t\tnetwork.init();\n\t\t\tstream.close();\n\t\t\treturn network != null;\n\t\t}catch(InvalidClassException e){\n\t\t\tSystem.out.println(\"Save format changed!\");\n\t\t\tnetworkFile.delete();\n\t\t} catch (IOException e) {\n\t\t\t//e.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t//e.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}", "org.landxml.schema.landXML11.LanesDocument.Lanes addNewLanes();", "@Override\n\tpublic void insert() {\n\t\t\n\t}", "@Override\r\n public void handleEvent(NetworkAddedEvent arg0) {\n \tCyNetwork network = arg0.getNetwork();\r\n \t\r\n \t// check if it is a TRONCO network by its information field\r\n \tif (!isTroncoNetwork(network)) {\r\n \t\treturn;\r\n \t}\r\n \t\r\n \t// add the TRONCO view\r\n \tCyNetworkView view = networkViewFactory.createNetworkView(network);\r\n networkViewManager.addNetworkView(view, true);\r\n\r\n // get the visual style\r\n VisualStyle visualStyle = null;\r\n for (VisualStyle tempVisualStyle : visualMappingManager.getAllVisualStyles()) {\r\n\t\t\tif (tempVisualStyle.getTitle().equals(\"TRONCO\")) {\r\n\t\t\t\tvisualStyle = tempVisualStyle;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n \r\n // create the visual style if it is the first added network\r\n if (visualStyle == null) {\r\n \tvisualStyle = visualStyleFactory.createVisualStyle(\"TRONCO\");\r\n\t\t\r\n\t // remove the lock of nodes' height-width and set the arrow color\r\n\t for (VisualPropertyDependency visualPropertyDependency : visualStyle.getAllVisualPropertyDependencies()) {\r\n\t\t\t\tif (visualPropertyDependency.getIdString().equals(\"nodeSizeLocked\")) {\r\n\t\t\t\t\tvisualPropertyDependency.setDependency(false);\r\n\t\t\t\t} else if (visualPropertyDependency.getIdString().equals(\"arrowColorMatchesEdge\")) {\r\n\t\t\t\t\tvisualPropertyDependency.setDependency(true);\r\n\t\t\t\t}\r\n\t }\r\n\t \r\n\t // set node width\r\n\t PassthroughMapping widthMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"width\", Color.class, BasicVisualLexicon.NODE_WIDTH);\r\n\t visualStyle.addVisualMappingFunction(widthMapping);\r\n\t \r\n\t // set node height\r\n\t PassthroughMapping heightMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"height\", Color.class, BasicVisualLexicon.NODE_HEIGHT);\r\n\t visualStyle.addVisualMappingFunction(heightMapping);\r\n\t \r\n\t // set node shape\r\n\t DiscreteMapping<String, NodeShape> shapeMapping = (DiscreteMapping<String, NodeShape>) visualMappingFunctionFactoryDiscrete.createVisualMappingFunction(\"shape\", String.class, BasicVisualLexicon.NODE_SHAPE);\r\n\t shapeMapping.putMapValue(\"ellipse\", NodeShapeVisualProperty.ELLIPSE);\r\n\t shapeMapping.putMapValue(\"diamond\", NodeShapeVisualProperty.DIAMOND);\r\n\t shapeMapping.putMapValue(\"hexagon\", NodeShapeVisualProperty.HEXAGON);\r\n\t shapeMapping.putMapValue(\"octagon\", NodeShapeVisualProperty.OCTAGON);\r\n\t shapeMapping.putMapValue(\"parallelogram\", NodeShapeVisualProperty.PARALLELOGRAM);\r\n\t shapeMapping.putMapValue(\"rectangle\", NodeShapeVisualProperty.RECTANGLE);\r\n\t shapeMapping.putMapValue(\"round rectangle\", NodeShapeVisualProperty.ROUND_RECTANGLE);\r\n\t shapeMapping.putMapValue(\"triangle\", NodeShapeVisualProperty.TRIANGLE);\r\n\t visualStyle.addVisualMappingFunction(shapeMapping);\r\n\t \r\n\t // set nodes color\r\n\t PassthroughMapping colorMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"fillcolor\", Color.class, BasicVisualLexicon.NODE_FILL_COLOR);\r\n\t visualStyle.addVisualMappingFunction(colorMapping);\r\n\t\r\n\t // set nodes label\r\n\t PassthroughMapping labelMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"label\", String.class, BasicVisualLexicon.NODE_LABEL);\r\n\t visualStyle.addVisualMappingFunction(labelMapping);\r\n\t \r\n\t // set nodes label color\r\n\t PassthroughMapping fontColorMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"fontcolor\", Color.class, BasicVisualLexicon.NODE_LABEL_COLOR);\r\n\t visualStyle.addVisualMappingFunction(fontColorMapping);\r\n\t\r\n\t // set nodes border color\r\n\t PassthroughMapping borderColorMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"bordercolor\", Paint.class, BasicVisualLexicon.NODE_BORDER_PAINT);\r\n\t visualStyle.addVisualMappingFunction(borderColorMapping);\r\n\t \r\n\t // set node border width\r\n\t PassthroughMapping borderWidthMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"borderwidth\", Double.class, BasicVisualLexicon.NODE_BORDER_WIDTH);\r\n\t visualStyle.addVisualMappingFunction(borderWidthMapping);\r\n\t\r\n\t // set edges arrow\r\n\t DiscreteMapping<String, ArrowShape> arrowMapping = (DiscreteMapping<String, ArrowShape>) visualMappingFunctionFactoryDiscrete.createVisualMappingFunction(\"arrow\", String.class, BasicVisualLexicon.EDGE_TARGET_ARROW_SHAPE);\r\n\t arrowMapping.putMapValue(\"True\", ArrowShapeVisualProperty.ARROW);\r\n\t arrowMapping.putMapValue(\"False\", ArrowShapeVisualProperty.NONE);\r\n\t visualStyle.addVisualMappingFunction(arrowMapping);\r\n\t\r\n\t // set edges color\r\n\t PassthroughMapping edgeColorMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"color\", Color.class, BasicVisualLexicon.EDGE_UNSELECTED_PAINT);\r\n\t visualStyle.addVisualMappingFunction(edgeColorMapping);\r\n\t \r\n\t // set edges label\r\n\t PassthroughMapping edgeLabelMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"edgelabel\", String.class, BasicVisualLexicon.EDGE_LABEL);\r\n\t visualStyle.addVisualMappingFunction(edgeLabelMapping);\r\n\t\r\n\t // set edges label color\r\n\t PassthroughMapping edgeFontColorMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"labelcolor\", Color.class, BasicVisualLexicon.EDGE_LABEL_COLOR);\r\n\t visualStyle.addVisualMappingFunction(edgeFontColorMapping);\r\n\t\r\n\t // set edges thickness\r\n\t PassthroughMapping edgeThicknessMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"width\", Double.class, BasicVisualLexicon.EDGE_WIDTH);\r\n\t visualStyle.addVisualMappingFunction(edgeThicknessMapping);\r\n\t\r\n\t // set edges line type\r\n\t DiscreteMapping<String, LineType> edgeLineTypeMapping = (DiscreteMapping<String, LineType>) visualMappingFunctionFactoryDiscrete.createVisualMappingFunction(\"line\", String.class, BasicVisualLexicon.EDGE_LINE_TYPE);\r\n\t edgeLineTypeMapping.putMapValue(\"dash\", LineTypeVisualProperty.EQUAL_DASH);\r\n\t edgeLineTypeMapping.putMapValue(\"solid\", LineTypeVisualProperty.SOLID);\r\n\t visualStyle.addVisualMappingFunction(edgeLineTypeMapping);\r\n \r\n }\r\n \r\n // get the rescaling factor\r\n Double currentScaleMaximum = 50d;\r\n Double maximumSize = 0d;\r\n CyTable table = network.getDefaultNodeTable();\r\n for (View<CyNode> nodeView : view.getNodeViews()) {\r\n \tMap<String, Object> rowValues = table.getRow(nodeView.getModel().getSUID()).getAllValues();\r\n \t\r\n \tDouble width = (Double) rowValues.get(\"width\");\r\n \tif (width != null && width > maximumSize) {\r\n\t\t\t\tmaximumSize = width;\r\n\t\t\t}\r\n \t\r\n \tDouble height = (Double) rowValues.get(\"height\");\r\n \tif (height != null && height > maximumSize) {\r\n\t\t\t\tmaximumSize = height;\r\n\t\t\t}\r\n }\r\n final Double rescalingFactor = maximumSize/currentScaleMaximum;\r\n \r\n // set the new size\r\n for (View<CyNode> nodeView : view.getNodeViews()) {\r\n \tCyRow row = table.getRow(nodeView.getModel().getSUID());\r\n \tMap<String, Object> rowValues = row.getAllValues();\r\n \t\r\n \tDouble width = (Double) rowValues.get(\"width\");\r\n \trow.set(\"width\", width/rescalingFactor);\r\n \t\r\n \tDouble height = (Double) rowValues.get(\"height\");\r\n \trow.set(\"height\", height/rescalingFactor);\r\n }\r\n \r\n // correct the triple / in the label\r\n CyTable edgeTable = network.getDefaultEdgeTable();\r\n for (View<CyEdge> edgeView : view.getEdgeViews()) {\r\n \tCyRow row = edgeTable.getRow(edgeView.getModel().getSUID());\r\n \tMap<String, Object> rowValues = row.getAllValues();\r\n \t\r\n \tString label = (String) rowValues.get(\"edgelabel\");\r\n \tif (label != null) {\r\n \t\trow.set(\"edgelabel\", label.replace(\"\\\\\", \"\"));\r\n\t\t\t} \t\r\n }\r\n \r\n // apply the visual style\r\n visualMappingManager.setVisualStyle(visualStyle, view);\r\n }", "private MetaSparqlRequest createInsertMT1() {\n\t\tString sparqlStr = \"\"+\n\t\t\t\t\"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\\r\\n\" + \n\t\t\t\t\"PREFIX ub: \"+_ontology+\"\\r\\n\" + \n\t\t\t\t\"INSERT DATA { GRAPH \"+_graph+\" { \"+\n\t\t\t\tbuilderBindInsert\n\t\t\t\t+\" } }\";\n\t\t\n\t\tSparqlObj sparql= new SparqlObj(sparqlStr) ;\n\t\tEndPoint endPointHost= new EndPoint(_protocol,_host,_port,\"/update\");\n\t\tMetaSparqlRequest msr = new MetaSparqlRequest(new SparqlRequest(sparql,endPointHost));\n\t\tmsr.setTripleInsert(createTripleBaseMT1());\n\t\treturn msr;\n\t}", "@Test\n public void createNeighbourWithSuccess() {\n Neighbour newNeighbour = new Neighbour(13, \"Toto\", \"https://i.pravatar.cc/150?u=a042581f4e29026704d\", \"Saint-Pierre-du-Mont ; 5km\",\n \"+33 6 00 00 00 00 \", \"Bonjour !Je souhaiterais faire de la marche nordique...\");\n //when: I add the newNeighbour to the neighbourList\n service.addNeighbour(newNeighbour);\n List<Neighbour> neighbours = service.getNeighbours();\n assertTrue(neighbours.contains(newNeighbour));\n }", "@Override\n\tpublic void insertProcess() {\n\t\t\n\t}", "private Node createAddNetwork(String name, double v1, double v2) {\n Node number1 = numberNode.extend()\n .withName(\"number1\")\n .withInputValue(\"number\", v1);\n Node number2 = numberNode.extend()\n .withName(\"number2\")\n .withInputValue(\"number\", v2);\n return Node.NETWORK\n .withName(name)\n .withChildAdded(number1)\n .withChildAdded(number2)\n .withChildAdded(addNode)\n .withRenderedChild(addNode)\n .connect(\"number1\", \"add\", \"v1\")\n .connect(\"number2\", \"add\", \"v2\");\n }", "private void initializeNodes() {\n for (NasmInst inst : nasm.listeInst) {\n Node newNode = graph.newNode();\n inst2Node.put(inst, newNode);\n node2Inst.put(newNode, inst);\n if (inst.label != null) {\n NasmLabel label = (NasmLabel) inst.label;\n label2Inst.put(label.toString(), inst);\n }\n }\n }", "public void insert()\n\t{\n\t}", "public void addNode() {\r\n \r\n Nod nod = new Nod(capacitate_noduri);\r\n numar_noduri++;\r\n noduri.add(nod);\r\n }", "int insertSelective(WayShopCateRoot record);", "private void establishPetriNetStructure(PetriNet net) {\n\t\t// establish the same petri net structure like in the given model\n\t\tHashMap mapping = new HashMap();\n\t\t// arraylist for all nodes in the petri net\n\t\tArrayList nodeList = new ArrayList();\n\t\tSubgraph graph = net.getGrappaVisualization().getSubgraph().getGraph();\n\t\t// get all the nodes that are in a cluster\n\t\tEnumeration subGraphElts = graph.subgraphElements();\n\t\twhile (subGraphElts.hasMoreElements()) {\n\t\t\tElement e1 = (Element) subGraphElts.nextElement();\n\t\t\tif (e1 instanceof Subgraph) {\n\t\t\t\tSubgraph subgraph = (Subgraph) e1;\n\t\t\t\tEnumeration enumerationNodes = subgraph.nodeElements();\n\t\t\t\t// put all the nodeElements in nodeList\n\t\t\t\twhile (enumerationNodes.hasMoreElements()) {\n\t\t\t\t\tElement enumNode = (Element) enumerationNodes.nextElement();\n\t\t\t\t\tif (enumNode != null && enumNode.object instanceof ModelGraphVertex) {\n\t\t\t\t\t\tnodeList.add(enumNode);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// add the nodes that are not in a cluster to the list of all nodes\n\t\tEnumeration nodeElts = graph.nodeElements();\n\t\twhile (nodeElts.hasMoreElements()) {\n\t\t\tElement e1 = (Element) nodeElts.nextElement();\n\t\t\tif (e1.object != null && e1.object instanceof ModelGraphVertex) {\n\t\t\t\tnodeList.add(e1);\n\t\t\t}\n\t\t}\n\t\t// convert the ordinary transitions to simulated transitions\n\t\tIterator transitions = nodeList.iterator();\n\t\twhile (transitions.hasNext()) {\n\t\t\tElement e1 = (Element) transitions.next();\n\t\t\tif (e1.object != null && e1.object instanceof Transition) {\n\t\t\t\tNode n = (Node) e1;\n\t\t\t\tint x = (int) n.getCenterPoint().getX() * ManagerLayout.getInstance().getScaleFactor();\n\t\t\t\tint y = -(int) n.getCenterPoint().getY() * ManagerLayout.getInstance().getScaleFactor();\n\t\t\t\tint width = (int) (((Double) n.getAttributeValue(Grappa.WIDTH_ATTR)).doubleValue() *\n\t\t\t\t\t\tManagerLayout.getInstance().getStretchFactor());\n\t\t\t\tint height = (int) (((Double) n.getAttributeValue(Grappa.HEIGHT_ATTR)).doubleValue() *\n\t\t\t\t\t\tManagerLayout.getInstance().getStretchFactor());\n\t\t\t\tColoredTransition simTransition = new ColoredTransition((Transition) e1.object, this,\n\t\t\t\t\t\tx, y, width, height);\n\t\t\t\tthis.addTransition(simTransition);\n\t\t\t\t\n\t\t\t\t// keep the mapping until the edges have been established\n\t\t\t\tmapping.put((Transition) e1.object, simTransition);\n\t\t\t}\n\t\t}\n\t // convert the ordinary places to simulated places\n\t\tIterator places = nodeList.iterator();\n\t\twhile (places.hasNext()) {\n\t\t\tElement e1 = (Element) places.next();\n\t\t\tif (e1.object != null && e1.object instanceof Place) {\n\t\t\t\tNode n = (Node) e1;\n\t\t\t\tint x = (int) n.getCenterPoint().getX() * ManagerLayout.getInstance().getScaleFactor();\n\t\t\t\tint y = -(int) n.getCenterPoint().getY() * ManagerLayout.getInstance().getScaleFactor();\n\t\t\t\tint width = (int) (((Double) n.getAttributeValue(Grappa.WIDTH_ATTR)).doubleValue() *\n\t\t\t\t\t\tManagerLayout.getInstance().getStretchFactor());\n\t\t\t\tint height = (int) (((Double) n.getAttributeValue(Grappa.HEIGHT_ATTR)).doubleValue() *\n\t\t\t\t\t\tManagerLayout.getInstance().getStretchFactor());\n\t\t\t\tColoredPlace simPlace = new ColoredPlace((Place) e1.object, this,\n\t\t\t\t\t\t\t\t\t\t x, y, width, height);\n\t\t\t\tthis.addPlace(simPlace);\n\t\t\t}\n\t\t}\n // convert the ordinary edges to simulated edges\n\t\tIterator edges = net.getEdges().iterator();\n\t\twhile (edges.hasNext()) {\n\t\t\tPNEdge edge = (PNEdge) edges.next();\n\t\t\tColoredEdge simEdge;\n\t\t\t// if place is source\n\t\t\tif (edge.isPT()) {\n\t\t\t\tPlace p = (Place) edge.getSource();\n\t\t\t\t// find respective place in this net (place names are assumed to be unique)\n\t\t\t\tPlace myPlace = this.findPlace(p.getIdentifier());\n\t\t\t\tTransition t = (Transition) edge.getDest();\n\t\t\t\t// find respective transition in this net\n\t\t\t\tTransition myTransition = (Transition) mapping.get(t);\n\t\t\t\t// reproduce edge\n\t\t\t\tsimEdge = new ColoredEdge(myPlace, myTransition);\n\t\t\t\tthis.addEdge(simEdge);\n\t\t\t} else {\n\t\t\t\t// if transition is source\n\t\t\t\tPlace p = (Place) edge.getDest();\n\t\t\t\t// find respective place in this net (place names are assumed to be unique)\n\t\t\t\tPlace myPlace = (Place)this.findPlace(p.getIdentifier());\n\t\t\t\tTransition t = (Transition) edge.getSource();\n\t\t\t\t// find respective transition in this net\n\t\t\t\tTransition myTransition = (Transition) mapping.get(t);\n\t\t\t\t// reproduce edge\n\t\t\t\tsimEdge = new ColoredEdge(myTransition, myPlace);\n\t\t\t\tthis.addEdge(simEdge);\n\t\t\t}\n\t\t}\n\t\tIterator clusters = net.getClusters().iterator();\n\t\twhile (clusters.hasNext()) {\n\t\t\tTransitionCluster currentCluster = (TransitionCluster) clusters.next();\n\t\t\tthis.addCluster(new TransitionCluster(currentCluster));\n\t\t}\n\t}", "public boolean insertNews() {\n\t\treturn false;\n\t}", "public void insert() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry { myData.record.save(background.getClient()); }\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "@Override\n\tprotected void onNetworkConnected(NetType type) {\n\n\t}", "private void insertNodesCatalogTransactionsPendingForPropagation(NodesCatalogTransaction transaction) throws CantInsertRecordDataBaseException {\n\n /*\n * Save into the data base\n */\n getDaoFactory().getNodesCatalogTransactionsPendingForPropagationDao().create(transaction);\n }", "boolean insert(Machine machine);", "public void insertnode ()\n\t// insert an empty node\n\t{\n\t\tif (Pos.haschildren() && !GF.askInsert()) return;\n\t\tNode n = new Node(Pos.node().number());\n\t\tPos.insertchild(new TreeNode(n));\n\t\tn.main(Pos);\n\t\tgetinformation();\n\t\tPos = Pos.lastChild();\n\t\tsetlast();\n\t\tshowinformation();\n\t\tcopy();\n\t}", "int insert(NjOrderWork2 record);", "protected void mutateAddLink() {\n\t\t// Make sure network is not fully connected\n\n\t\t// Sum number of connections\n\t\tint totalconnections = numGenes();\n\n\t\t// Find number of each type of node\n\t\tint in = population.numInputs;\n\t\tint out = population.numOutputs;\n\t\tint hid = numNodes() - (in + out);\n\n\t\t// Find the number of possible connections.\n\t\t// Links cannot end with an input\n\t\tint fullyconnected = 0;\n\t\tfullyconnected = (in + out + hid) * (out + hid);\n\n\t\tif (totalconnections == fullyconnected)\n\t\t\treturn;\n\n\t\t// Pick 2 nodes for a new connection and submit it\n\t\tNNode randomstart;\n\t\tNNode randomend;\n\t\tdo {\n\t\t\trandomstart = getRandomNode();\n\t\t\trandomend = getRandomNode();\n\t\t} while (randomend.type == NNode.INPUT\n\t\t\t\t|| hasConnection(randomstart.ID, randomend.ID));\n\n\t\tint newgeneinno = population\n\t\t\t\t.getInnovation(randomstart.ID, randomend.ID);\n\t\tGene newgene = new Gene(newgeneinno, randomstart.ID, randomend.ID,\n\t\t\t\tBraincraft.randomWeight(), true);\n\t\tpopulation.registerGene(newgene);\n\t\tsubmitNewGene(newgene);\n\n\t\tif (Braincraft.gatherStats)\n\t\t\tBraincraft.genetics.add(\"link creation mutation \" + ID + \" \"\n\t\t\t\t\t+ newgene.innovation + \" \" + randomstart.ID + \" \"\n\t\t\t\t\t+ randomend.ID);\n\t}", "int insert(NjProductTaticsRelation record);", "int insertSelective(Computer record);", "int insert(WayShopCateRoot record);", "private void insertCheckedInNetworkServiceHistory(NetworkServiceProfile networkServiceProfile) throws CantInsertRecordDataBaseException {\n\n /*\n * Create the ClientsRegistrationHistory\n */\n CheckedNetworkServicesHistory checkedNetworkServicesHistory = new CheckedNetworkServicesHistory();\n checkedNetworkServicesHistory.setIdentityPublicKey(networkServiceProfile.getIdentityPublicKey());\n checkedNetworkServicesHistory.setClientIdentityPublicKey(networkServiceProfile.getClientIdentityPublicKey());\n checkedNetworkServicesHistory.setNetworkServiceType(networkServiceProfile.getNetworkServiceType().getCode());\n checkedNetworkServicesHistory.setCheckType(CheckedNetworkServicesHistory.CHECK_TYPE_IN);\n\n //Validate if location are available\n if (networkServiceProfile.getLocation() != null) {\n checkedNetworkServicesHistory.setLastLatitude(networkServiceProfile.getLocation().getLatitude());\n checkedNetworkServicesHistory.setLastLongitude(networkServiceProfile.getLocation().getLongitude());\n }\n\n /*\n * Save into the data base\n */\n getDaoFactory().getCheckedNetworkServicesHistoryDao().create(checkedNetworkServicesHistory);\n\n }", "private void createNeuralNet() {\n\t\tMSimulationConfig simConfig;\n\t\tHashMap<Integer, MNeuron> neuronMap = new HashMap<Integer, MNeuron>();\n\t\tArrayList<MNeuron> neurons = new ArrayList<MNeuron>();\n\t\tArrayList<MSynapse> synapses = new ArrayList<MSynapse>();\n\n\t\tNeatGenome genome = (NeatGenome) geneticObject;\n\t\t/* Create neurons. */\n\t\tfor (NeatNode nn : genome.getNodes()) {\n\t\t\tint id = nn.getId();\n\t\t\tMNeuronParams params = nn.getParams();\n\t\t\tMNeuronState state =\n\t\t\t\t\tMFactory.createInitialRSNeuronState();\n\n\t\t\t/* Create a neuron. */\n\t\t\tMNeuron neuron = new MNeuron(params, state, id);\n\n\t\t\t/* Add it to temporary NID->Neuron map. */\n\t\t\tneuronMap.put(id, neuron);\n\n\t\t\t/* Add neuron to the list. */\n\t\t\tneurons.add(neuron);\n\t\t}\n\n\t\t/* Create synapses. */\n\t\tfor (GenomeEdge<NeatNode> g : genome.getGene()) {\n\t\t\t/* Get the synapse information. */\n\t\t\tNeatNode preNode = g.getIn();\n\t\t\tNeatNode postNode = g.getOut();\n\t\t\tdouble weight = g.getWeight();\n\t\t\tint delay = g.getDelay();\n\t\t\tInteger preNid = new Integer(preNode.getId());\n\t\t\tInteger postNid = new Integer(postNode.getId());\n\n\t\t\t/* Find the pre and post neurons. */\n\t\t\tMNeuron preNeuron = neuronMap.get(preNid);\n\t\t\tMNeuron postNeuron = neuronMap.get(postNid);\n\n\t\t\t/* Create the synapse. */\n\t\t\tMSynapse synapse = new MSynapse(preNeuron, postNeuron,\n\t\t\t\t\tweight, delay);\n\t\t\t/*\n\t\t\tAdd the synapse to the pre and post neuron synapse list\n\t\t\t */\n\t\t\tArrayList<MSynapse> postSynapses\n\t\t\t= preNeuron.getPostSynapses();\n\t\t\tArrayList<MSynapse> preSynapses\n\t\t\t= postNeuron.getPreSynapses();\n\n\t\t\tpostSynapses.add(synapse);\n\t\t\tpreSynapses.add(synapse);\n\n\t\t\tpreNeuron.setPostSynapses(postSynapses);\n\t\t\tpostNeuron.setPreSynapses(preSynapses);\n\n\t\t\t/* Add the synapse to the list. */\n\t\t\tsynapses.add(synapse);\n\t\t}\n\n\t\t/* Create the network. */\n\t\tthis.mnetwork = new MNetwork(neurons, synapses);\n\n\t\t/* Create and set the simulation configuration parameters. */\n\t\tsimConfig = new MSimulationConfig(20);\n\n\t\t/* Create the simulation instance with our network. */\n\t\tthis.msimulation = new MSimulation(this.mnetwork, simConfig);\n\t}", "private Node insert(Order ord2) {\n\t\treturn null;\n\t}", "@Override\n protected void postConnect() {\n super.postConnect();\n //creates arrays list for buildings, roads and refuges of the world model\n \n buildingIDs = new ArrayList<EntityID>();\n roadIDs = new ArrayList<EntityID>();\n refugeIDs = new ArrayList<EntityID>();\n \n \n //assign values to buildings, roads and refuges according to model\n for (StandardEntity next : model) {\n if (next instanceof Building) {\n buildingIDs.add(next.getID());\n }\n if (next instanceof Road) {\n roadIDs.add(next.getID());\n }\n if (next instanceof Refuge) {\n refugeIDs.add(next.getID());\n }\n \n }\n \n /**\n * sets communication via radio\n */\n boolean speakComm = config.getValue(Constants.COMMUNICATION_MODEL_KEY).equals(ChannelCommunicationModel.class.getName());\n\n int numChannels = this.config.getIntValue(\"comms.channels.count\");\n \n if((speakComm) && (numChannels > 1)){\n \tthis.channelComm = true;\n }else{\n \tthis.channelComm = false;\n }\n \n /*\n * Instantiate a new SampleSearch\n * Sample Search creates a graph for the world model\n * and implements a bread first search for use as well.\n */\n search = new SampleSearch(model);\n\n neighbours = search.getGraph();\n useSpeak = config.getValue(Constants.COMMUNICATION_MODEL_KEY).equals(SPEAK_COMMUNICATION_MODEL);\n Logger.debug(\"Modelo de Comunicação: \" + config.getValue(Constants.COMMUNICATION_MODEL_KEY));\n Logger.debug(useSpeak ? \"Usando modelo SPEAK\" : \"Usando modelo SAY\");\n }", "Boolean insertClient(Client client){\n return true;\n }", "public void insert(Node newNode)\r\n {\n newNode.prev = prev;\r\n prev.next = newNode;\r\n prev = newNode;\r\n System.out.println(\"Node with Traffic Data \" + Arrays.toString(newNode.trafficEntry.toStringArray()) + \" Inserted before Node with Traffic Data \" + Arrays.toString(trafficEntry.toStringArray()));\r\n }", "public MyNode(Station station){\r\n this.station=station;\r\n this.neighbors=new LinkedList<MyNode>();\r\n }", "void addNode(CommunicationLink communicationLink)\n {\n int nodeId = communicationLink.getInfo().hashCode();\n assert !nodeIds.contains(nodeId);\n nodeIds.add(nodeId);\n allNodes.put(nodeId, communicationLink);\n }", "public void insertatFirst(String bookName) {\n \tNode2 link = new Node2(bookName);\n \t if(size() == 0) {\n \t //make it the last link\n \t \t//System.out.println(\"I got there once\");\n \t last = link;\n \t }\n\t link.nextLink = first;\n\t link.prevLink = null;\n\t first = link;\n\t \n\t \n }", "public void tunnel() {\r\n\t\tboolean status = true;\r\n\t\tfor (CellStorage i : node) {\r\n\t\t\tif (i.getCell().tunnelTo != null) {\r\n\t\t\t\tCellStorage tunnelTo = null;\r\n\t\t\t\t// Searching for destinated node from the tunnel\r\n\t\t\t\tfor (int k = 0; k < node.size(); k++) {\r\n\t\t\t\t\tif (node.get(k).getCell() == i.getCell().tunnelTo) {\r\n\t\t\t\t\t\ttunnelTo = node.get(k);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ti.setTunnel(tunnelTo);\r\n\r\n\t\t\t\t// Calling validateConnection method to make sure that no duplicated connection\r\n\t\t\t\t// is made.\r\n\t\t\t\t// Create new connection if no duplicate.\r\n\r\n\t\t\t\tstatus = validateConnection(i, tunnelTo);\r\n\t\t\t\tif (status == false) {\r\n\t\t\t\t\tHashMapConnectedNodes tunnelSet = new HashMapConnectedNodes();\r\n\t\t\t\t\ttunnelSet.hmConnectedNodesObj.put(i.getIndex(), i);\r\n\t\t\t\t\ttunnelSet.hmConnectedNodesObj.put(tunnelTo.getIndex(), tunnelTo);\r\n\t\t\t\t\thshMConnectedNodes.add(tunnelSet);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void phaseOne(){\r\n\r\n\t\twhile (allNodes.size() < endSize){\r\n\r\n\t\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t\t//Pick a random node from allNodes\r\n\t\t\t\tint idx = random.nextInt(allNodes.size());\r\n\t\t\t\tNode node = allNodes.get(idx);\r\n\r\n\t\t\t\t//Get all relationships of node\t\t\t\t\r\n\t\t\t\tIterable<Relationship> ite = node.getRelationships(Direction.BOTH);\r\n\t\t\t\tList<Relationship> tempRels = new ArrayList<Relationship>();\r\n\r\n\t\t\t\t//Pick one of the relationships uniformly at random.\r\n\t\t\t\tfor (Relationship rel : ite){\r\n\t\t\t\t\ttempRels.add(rel);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tidx = random.nextInt(tempRels.size());\r\n\t\t\t\tRelationship rel = tempRels.get(idx);\r\n\t\t\t\tNode neighbour = rel.getOtherNode(node);\r\n\r\n\t\t\t\t//Add the neighbour to allNodes\r\n\t\t\t\tif (!allNodes.contains(neighbour)){\r\n\t\t\t\t\tallNodes.add(neighbour);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.success();\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\t//If reached here, then phase one completed successfully.\r\n\t\treturn;\r\n\t}", "@Override\n\tpublic void insert(Computer computer) {\n\t\t\n\t}", "@Override\n\t\tpublic void insert() {\n\t\t\tSystem.out.println(\"새로운 등록\");\n\t\t}", "int insert(ProxiesPriv record);", "@Override\n\tpublic void addNode(node_data n) {\n\t\tif (Nodes.keySet().contains(n.getKey())) {\n\t\t\tSystem.err.println(\"Err: key already exists, add fail\");\n\t\t\treturn;\n\t\t}\n\t\tif(n.getWeight()<=0)\n\t\t{\n\t\t\tSystem.err.println(\"The weight must be positive! . The node hadn't been added successfully..\");\n\t\t\treturn;\n\t\t}\n\t\tthis.Nodes.put(n.getKey(), n);//n used to be casted into (node)\n\t\tthis.Edges.put(n.getKey(), new HashMap<Integer,edge_data>());\n\t\tMC++;\n\n\t}", "int insertSelective(MessageRelation record);", "public static void Deepmodelinsert (int id,int p_id,String FQN,String name, String container,String table )\n { \n\t mysqlhost=Login.textmysqlhostx();\n\t\t mysqluser=Login.textuserx();\n\t mysqlpassword=Login.textpasswordx();\n\t sqldatabase=\"jdbc:mysql://\"+mysqlhost;\n \n \ttry \n { \n Statement stmt=null; \n ResultSet res=null; \n Class.forName(\"com.mysql.jdbc.Driver\"); \n Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n stmt = (Statement)conn.createStatement(); \n res= stmt.executeQuery(\"SELECT * from deepmodel \"); \n\n\n // 增加数据\n Statement stm = (Statement) conn.createStatement();// 提交查巡\n String sql = \"select * from deepmodel\";\n ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n// sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n \n int n = stm.executeUpdate(\"insert into \"+table+\"(id,p_id,FQN,name, container) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+p_id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"+\")\"); // 增加数据 \n if (n > 0) {\n// JOptionPane.showMessageDialog(null, \"成功\");\n \n \n } else {\n// JOptionPane.showMessageDialog(null, \"失败\");\n }\n //增加数据结束\n\n while (res.next()) \n { \n \n } \n } \n \n catch(Exception ex) \n { \n ex.printStackTrace(); \n } \n}", "public int addNetwork(long id) {\n int nextIndex = networkIds.length;\n\n long [] newIds = new long[networkIds.length+1];\n System.arraycopy(networkIds, 0, newIds, 0, networkIds.length);\n newIds[nextIndex] = id;\n\n networkIds = newIds;\n reverseMap = null; // force rebuild next time\n return nextIndex;\n }", "boolean insertLink(Link link);", "public NeuronalNetwork(){\n // wie viele Schichten?\n // wie viele Neuronen pro Schicht?\n // welche Gewichte Je neuron je Schicht...\n }", "@Override\r\n\tpublic void insert(FollowUp followup) {\n\t\t\r\n\t}", "int insert(CommunityInform record);", "synchronized public Uri insert(Uri uri, ContentValues values) // FIXME-- raja made it synchronized \n {\n \t/**\n \t * will synchronize the inserts -- going to others nodes --> replication --> replication\n \t * SYNCHRONIZED \n \t * \t-- to order concurrent insert requests coming in from\n \t * -- C1 C2 C3 C4 C5 ..............CN\t\n \t * Gets insert_order from Clients()\n \t * {\n \t * \t\t-- find owner --> send to owner\n \t * \t\t-- waits <using _insert_lock> ------ to make sure that system of replicas are in consistent shape\n \t * \t\t\t-- owner+1 replicates\n \t * \t\t\t-- owner+2 replicates\n \t * \t\t\t\t-- owner+2 responds to me \n \t * \t\t-- wait ends\n \t * } \n \t */\n \t\n \tString[] KV_pair ={(String)values.get(KEY_FIELD),(String)values.get(VALUE_FIELD)};\n \tString hashedKey = null;\n \tnode owner = null; \n \t\n \tLog.e(\"window_shopper\",\"Tester msg::insert::\"+KV_pair[0]+\"::\"+KV_pair[1]);\n \t\n \ttry\n \t{\n \t\thashedKey =\tChordMaster.genHash(KV_pair[0]);\n \t\towner = chord.getOwner(hashedKey);\n \t}\n \tcatch(NoSuchAlgorithmException nsa)\n \t{\n \t\tnsa.printStackTrace();\n \t}\n \t\n \tif(owner == null)\n \t{\n \t\tLog.e(\"window_shopper\",\"owner is null OH! GOD!\");\n \t}\n \telse\n \t{\n \t\tLog.e(\"window_shopper\",\"The owner is::\"+owner.avdNum);\n \t}\n \t\n \t// synchronize DB_WRITELOCK HERE\n \t// problem I lock and i get request for replication\n \t// what to do\n \t\n\t\tif(!owner.avdNum.equals(myDetails.avdNum))\n \t{\n \t\t//send to owner\n \t\tMessage.sendMessage(MessageType.objectInsertMessage,null,myAVDnum,KV_pair,owner.portNum);\n \t}\n \telse // i am the owner\n \t{\n \t\t\tLog.e(\"window_shopper\",\"I am the owner of this key\");\n \t\tthis.insert(KV_pair,null);\n \t\tMessage.sendMessage(MessageType.objectReplicationMessage,null,myAVDnum,KV_pair,chord.mysucc.portNum);\n\t\t}\n\t\n \t// waiting for chain replication to complete\n \t// only then shall i respond\n\t\tsynchronized (_insert_Lock)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t/**\n\t\t\t\t * wait for 100 milli seconds\n\t\t\t\t * if i don't get response then do something\n\t\t\t\t */\n\t\t\t\t//_insert_Lock.wait(); // means someone did not respond\n\t\t\t\tLog.e(\"window_shopper\",\"----------- WAITING FOR OBJECT INSERT RETURN -------------------\");\n\t\t\t\t_insert_Lock.wait(1500); // means someone did not respond\n\t\t\t}\n\t\t\tcatch(InterruptedException iex)\n\t\t\t{\n\t\t\t\tLog.e(\"window_shopper\",\"\\n\\n Insert wait has thrown this error have encountered an exception when waiting\\n\\n\");\n\t\t\t\tiex.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\tgetContext().getContentResolver().notifyChange(uri, null);\n return simpleDHTURI;\n }", "public boolean addTopology(Topology top);", "private MetaSparqlRequest createPrepareInsertMT3() {\n\t\t\tString sparqlStr = \"\"+\n\t\t\t\t\t\"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\\r\\n\" + \n\t\t\t\t\t\"PREFIX ub: \"+_ontology+\"\\r\\n\" + \n\t\t\t\t\t\"INSERT DATA { GRAPH \"+_graph+\" { \"+\n\t\t\t\t\tbuilderBindInsert\n\t\t\t\t\t+\" } }\";\n\t\t\t\n\t\t\tSparqlObj sparql= new SparqlObj(sparqlStr) ;\n\t\t\tEndPoint endPointHost= new EndPoint(_protocol,_host,_port,\"/update\");\n\t\t\tMetaSparqlRequest msr = new MetaSparqlRequest(new SparqlRequest(sparql,endPointHost));\n\t\t\tmsr.setTripleInsert(createTripleBaseMT3A());\n\t\t\treturn msr;\n\t\t}", "public NodeNetwork() {\n\t\tnodes = new ArrayList<>();\n\t\tconnections = new ArrayList<>();\n\t}", "@Override\n\tpublic void insert() {\n\t\tSystem.out.println(\"insert coin\");\n\t\tmachine.setState(machine.getHascoin());\n\t}", "int insertSelective(NjOrderWork2 record);", "public boolean add(Node n) {\n\t\t\n\t\t//Validate n is not null\n\t\tif (n == null) { \n\t\t\tSystem.out.println(\"Enter a valid node\");\n\t\t\treturn false; \n\t\t} \n\t\t\n\t\t//If the node is present in the network return\n\t\tif (nodes.contains(n)) {\n\t\t\tSystem.out.println(\"Node name already exists\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t//Add the node to the network, with a new array for its neighbors\n\t\tnodes.add(n);\n\t\t\n\t\t//Successfully added\n\t\treturn true;\n\t}", "@Override\r\n\tpublic Ngo insert(Ngo obj) {\n\t\treturn null;\r\n\t}", "int insert(Computer record);" ]
[ "0.6092745", "0.60609806", "0.5941872", "0.593269", "0.5769822", "0.5767407", "0.5760132", "0.5730199", "0.57219875", "0.5712728", "0.5692875", "0.56907666", "0.56868", "0.5663361", "0.5661651", "0.5642575", "0.56002253", "0.5592729", "0.5591315", "0.5584356", "0.55777436", "0.55729663", "0.55663383", "0.5556103", "0.5552348", "0.5543056", "0.5529474", "0.55228233", "0.5520725", "0.5514753", "0.55126905", "0.55064064", "0.5504643", "0.54838413", "0.5481998", "0.5477488", "0.54735297", "0.5470044", "0.54574096", "0.5455423", "0.5454674", "0.5435674", "0.5429032", "0.5426559", "0.5425215", "0.54039127", "0.540317", "0.54026294", "0.5393855", "0.5391587", "0.5387061", "0.53831196", "0.5376946", "0.5375406", "0.534428", "0.534088", "0.5340672", "0.5337195", "0.5336942", "0.5333743", "0.53301764", "0.5328325", "0.53281105", "0.5310775", "0.5307604", "0.5306638", "0.53024197", "0.5301341", "0.52847695", "0.5283988", "0.52838767", "0.52821755", "0.52753925", "0.5272316", "0.5271991", "0.5271527", "0.5271164", "0.5267285", "0.52668446", "0.5266772", "0.5260874", "0.52604717", "0.52576625", "0.5256575", "0.52498883", "0.5249441", "0.52486175", "0.5248136", "0.52474135", "0.5247021", "0.52386045", "0.5235523", "0.5231747", "0.5230865", "0.5224437", "0.5221576", "0.521855", "0.5218104", "0.52175677", "0.521079", "0.5210774" ]
0.0
-1
Dijkstra Shortest Path Algorithm
public int[] getDijkstraSP(int source) { int[] distance = new int[this.v]; Arrays.fill(distance, Integer.MAX_VALUE); distance[source] = 0; Queue<Distance> q = new LinkedList<>();//new PriorityQueue<>(); q.add(new Distance(source, 0)); boolean[] visited = new boolean[this.v]; while(!q.isEmpty()) { Distance e = q.poll(); if(visited[e.vertex]) { continue; } visited[e.vertex] = true; List<Edge> list = this.edges.get(e.vertex); for(Edge adjEdge : list) { if((long)distance[adjEdge.from] + adjEdge.weight < distance[adjEdge.to]) { distance[adjEdge.to] = distance[adjEdge.from] + adjEdge.weight; q.add(new Distance(adjEdge.to, distance[adjEdge.to])); //System.out.println(Arrays.toString(distance)); } } } return distance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void computeShortestPath(){\n T current = start;\n boolean atEnd = false;\n while (!unvisited.isEmpty()&& !atEnd){\n int currentIndex = vertexIndex(current);\n LinkedList<T> neighbors = getUnvisitedNeighbors(current); // getting unvisited neighbors\n \n //what is this doing here???\n if (neighbors.isEmpty()){\n \n }\n \n // looping through to find distances from start to neighbors\n for (T neighbor : neighbors){ \n int neighborIndex = vertexIndex(neighbor); \n int d = distances[currentIndex] + getEdgeWeight(current, neighbor);\n \n if (d < distances[neighborIndex]){ // if this distance is less than previous distance\n distances[neighborIndex] = d;\n closestPredecessor[neighborIndex] = current; // now closest predecessor is current\n }\n }\n \n if (current.equals(end)){\n atEnd = true;\n }\n else{\n // finding unvisited node that is closest to start node\n T min = getMinUnvisited();\n if (min != null){\n unvisited.remove(min); // remove minimum neighbor from unvisited\n visited.add(min); // add minimum neighbor to visited\n current = min;\n }\n }\n }\n computePath();\n totalDistance = distances[vertexIndex(end)];\n }", "private void calculateShortestDistances (GraphStructure graph,int startVertex,int destinationVertex) {\r\n\t\t//traverseRecursively(graph, startVertex);\r\n\t\tif(pathList.contains(destinationVertex)) {\r\n\t\t\tdistanceArray = new int [graph.getNumberOfVertices()];\r\n\t\t\tint numberOfVertices=graph.getNumberOfVertices();\r\n\t\t\tSet<Integer> spanningTreeSet = new HashSet<Integer>();\r\n\t\t\tArrays.fill(distanceArray,Integer.MAX_VALUE);\r\n\t\t\tdistanceArray[startVertex]=0;\r\n\t\t\tadjacencyList = graph.getAdjacencyList();\r\n\t\t\tList<Edge> list;\r\n\t\t\tlist = graph.getAdjacencyList()[startVertex];\r\n\t\t\tif(startVertex==destinationVertex) {\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\tfor(Edge value : list) {\r\n\t\t\t\t\tif(! isVisited[value.getVertex()]) {\r\n\t\t\t\t\t\tint sumOfWeightAndSourceVertexDistanceValue = distanceArray[startVertex] + value.getWeight();\r\n\t\t\t\t\t\tint distanceValueOfDestinationVertex = distanceArray[value.getVertex()];\r\n\t\t\t\t\t\tif( sumOfWeightAndSourceVertexDistanceValue < distanceValueOfDestinationVertex ) {\r\n\t\t\t\t\t\t\tdistanceArray[value.getVertex()] = sumOfWeightAndSourceVertexDistanceValue;\r\n\t\t\t\t\t\t\tshortestPathList.add(value.getVertex());\r\n\t\t\t\t\t\t\tcalculateShortestDistances(graph,value.getVertex(), distanceValueOfDestinationVertex);\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\t\r\n\t\t\t/*for(Integer value : spanningTreeSet) {\r\n\t\t\t\tSystem.out.print(value+\" \");\r\n\t\t\t}*/\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No route is present between given vertices !\");\r\n\t\t}\r\n\t}", "@Override\n public List dijkstrasShortestPath(T start, T end) {\n Vertex<T> origin = new Vertex<>(start);\n Vertex<T> destination = new Vertex<>(end);\n List<Vertex<T>> path;\n\n settledNodes = new HashSet<>();\n unSettledNodes = new HashSet<>();\n distancesBetweenNodes = new HashMap<>();\n predecessors = new HashMap<>();\n\n distancesBetweenNodes.put(origin,0);\n unSettledNodes.add(origin);\n\n while(unSettledNodes.size() > 0){\n Vertex<T> minimumWeightedVertex = getMinimum(unSettledNodes);\n settledNodes.add(minimumWeightedVertex);\n unSettledNodes.remove(minimumWeightedVertex);\n findMinimumDistance(minimumWeightedVertex);\n }\n path = getPath(destination);\n return path;\n\n }", "public List<Node> computeDijkstraShortestPath(Node source, Node destination) {\n\n source.minDistance = 0.;\n PriorityQueue<Node> nodeQueue = new PriorityQueue<Node>();\n nodeQueue.add(source);\n\n int destinationGroup = destination._groupID;\n\n while (!nodeQueue.isEmpty()) {\n Node v = nodeQueue.poll();\n\n Log.i(\"bbb\", \"In dijsk node name \"+ v._waypointName);\n //Stop searching when reach the destination node\n\n\n if(destinationGroup!=0){\n\n if(v._groupID==destinationGroup){\n destination = navigationGraph.get(navigationGraph.size()-1).nodesInSubgraph.get(v._waypointID);\n Log.i(\"bbb\", \"destination is: \"+destination._waypointName);\n\n break;\n }\n\n }\n\n if (v._waypointID.equals(destination._waypointID))\n break;\n\n\n // Visit each edge that is adjacent to v\n for (Edge e : v._edges) {\n Node a = e.target;\n Log.i(\"bbb\", \"node a \"+a._waypointName);\n double weight = e.weight;\n double distanceThroughU = v.minDistance + weight;\n if (distanceThroughU < a.minDistance) {\n nodeQueue.remove(a);\n a.minDistance = distanceThroughU;\n a.previous = v;\n Log.i(\"bbb\", \"set previous\");\n nodeQueue.add(a);\n }\n }\n }\n\n Log.i(\"bbb\", \"destination is: \"+destination._waypointName);\n\n return getShortestPathToDestination(destination);\n }", "public int doDijkstras(String startVertex, String endVertex, ArrayList<String> shortestPath)\r\n\t{\r\n\t\tif(!this.dataMap.containsKey(startVertex) || !this.dataMap.containsKey(endVertex))\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Vertex does not exist in the graph!\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tSet<String> visited = new HashSet<String>();\r\n\t\t\r\n\t\tPriorityQueue<Vertex> minDist = new PriorityQueue<Vertex>();\r\n\t\t\r\n\t\tVertex firstV = new Vertex(startVertex,startVertex,0);\r\n\t\tminDist.add(firstV);\r\n\t\t\r\n\t\tfor(String V : this.adjacencyMap.get(startVertex).keySet())\r\n\t\t{\r\n\t\t\tminDist.add(new Vertex(V,startVertex,this.getCost(startVertex, V)));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//map of vertexName --> VertexObject\r\n\t\tHashMap<String, Vertex> mapV = new HashMap<String,Vertex>();\r\n\t\tmapV.put(startVertex, firstV);\t\r\n\t\t\r\n\t\t/*\r\n\t\t * Init keys-->costs\r\n\t\t */\r\n\t\tfor(String key : this.getVertices())\r\n\t\t{\r\n\t\t\tif(key.equals(startVertex))\r\n\t\t\t{\r\n\t\t\t\tmapV.put(key, new Vertex(key,null,0));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmapV.put(key, new Vertex(key,null,Integer.MAX_VALUE));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\t/*\r\n\t\t * Init List for shortest path\r\n\t\t */\r\n\t\tLinkedList<String> list = new LinkedList<String>();\r\n\t\tlist.add(startVertex);\r\n\r\n\t\tHashMap<String,List<String>> path = new HashMap<String,List<String>>();\r\n\t\tpath.put(startVertex, list);\r\n\t\t\r\n\t\twhile(!minDist.isEmpty())\r\n\t\t{\r\n\t\t\tVertex node = minDist.poll();\r\n\t\t\tString V = node.current;\r\n\t\t\tint minimum = node.cost;\r\n\t\t\tSystem.out.println(minDist.toString());\r\n\t\t\t\r\n\t\t\t\tvisited.add(V);\r\n\t\t\t\t\r\n\t\t\t\tTreeSet<String> adj = new TreeSet<String>(this.adjacencyMap.get(V).keySet());\r\n\t\t\t\t\r\n\t\t\t\tfor(String successor : adj)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(!visited.contains(successor) && !V.equals(successor))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint newCost = this.getCost(V, successor)+minimum;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(newCost < mapV.get(successor).cost)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tminDist.remove(mapV.get(successor));\r\n\t\t\t\t\t\t\t\tminDist.add(new Vertex(successor,V,newCost));\r\n\t\t\t\t\t\t\t\tmapV.put(successor, new Vertex(successor,V,newCost));\r\n\r\n\t\t\t\t\t\t\t\tLinkedList<String> newList = new LinkedList<String>(path.get(V));\r\n\t\t\t\t\t\t\t\tnewList.add(successor);\r\n\t\t\t\t\t\t\t\tpath.put(successor, newList);\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\t\r\n\t\t}\r\n\t\t\r\n\t\tint smallestPath = mapV.get(endVertex).cost == Integer.MAX_VALUE ? -1 : mapV.get(endVertex).cost;\r\n\t\t\r\n\t\tif(smallestPath == -1)\r\n\t\t{\r\n\t\t\tshortestPath.add(\"None\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor(String node : path.get(endVertex))\r\n\t\t\t{\r\n\t\t\t\tshortestPath.add(node);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn smallestPath;\r\n\t}", "@Override\n\tpublic List<node_data> shortestPath(int src, int dest) {\n\t\tfor(node_data vertex : dwg.getV()) {\n\t\t\tvertex.setInfo(\"\"+Double.MAX_VALUE);\n\t\t}\n\t\tint[] prev = new int[dwg.nodeSize()];\n\t\tnode_data start = dwg.getNode(src);\n\t\tstart.setInfo(\"0.0\");\n\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\tq.add(start);\n\t\tprev[src%dwg.nodeSize()] = -1;\n\t\twhile(!q.isEmpty()) {\n\t\t\tnode_data v = q.poll();\n\t\t\tCollection<edge_data> edgesV = dwg.getE(v.getKey());\n\t\t\tfor(edge_data edgeV : edgesV) {\n\t\t\t\tdouble newSumPath = Double.parseDouble(v.getInfo()) +edgeV.getWeight();\n\t\t\t\tint keyU = edgeV.getDest();\n\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\tif(newSumPath < Double.parseDouble(u.getInfo())) {\n\t\t\t\t\tu.setInfo(\"\"+newSumPath);\n\t\t\t\t\tq.remove(u);\n\t\t\t\t\tq.add(u);\n\t\t\t\t\tprev[u.getKey()%dwg.nodeSize()] = v.getKey();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tList<node_data> ans = new ArrayList<node_data>();\n\t\tint run = dest;\n\t\twhile(run != src) {\n\t\t\tans.add(0,dwg.getNode(run));\n\t\t\trun = prev[run%dwg.nodeSize()];\n\t\t}\n\t\tans.add(0, dwg.getNode(src));\n\n\t\treturn ans;\n\t}", "private static void disjkstraAlgorithm(Node sourceNode, GraphBuilder graph){\n PriorityQueue<Node> smallestDisQueue = new PriorityQueue<>(graph.nodeArr.size(), new Comparator<Node>() {\n @Override\n public int compare(Node first, Node sec) {\n if(first.distance == Integer.MAX_VALUE && sec.distance == Integer.MAX_VALUE){\n return 0;\n }\n else if(first.distance == Integer.MAX_VALUE && sec.distance != Integer.MAX_VALUE){\n return 1;\n } else if(first.distance != Integer.MAX_VALUE && sec.distance == Integer.MAX_VALUE){\n return -1;\n }\n else\n return (int) (first.distance - sec.distance);\n }\n });\n\n smallestDisQueue.add(sourceNode); //add the node to the queue\n\n // until all vertices are know get the vertex with smallest distance\n\n while(!smallestDisQueue.isEmpty()) {\n\n Node currNode = smallestDisQueue.poll();\n// System.out.println(\"Curr: \");\n// System.out.println(currNode);\n if(currNode.known)\n continue; //do nothing if the currNode is known\n\n currNode.known = true; // otherwise, set it to be known\n\n for(Edge connectedEdge : currNode.connectingEdges){\n Node nextNode = connectedEdge.head;\n if(!nextNode.known){ // Visit all neighbors that are unknown\n\n long weight = connectedEdge.weight;\n if(currNode.distance == Integer.MAX_VALUE){\n continue;\n }\n else if(nextNode.distance == Integer.MAX_VALUE && currNode.distance == Integer.MAX_VALUE) {\n continue;\n }\n\n else if(nextNode.distance> weight + currNode.distance){//Update their distance and path variable\n smallestDisQueue.remove(nextNode); //remove it from the queue\n nextNode.distance = weight + currNode.distance;\n\n smallestDisQueue.add(nextNode); //add it again to the queue\n nextNode.pathFromSouce = currNode;\n\n// System.out.println(\"Next: \");\n// System.out.println(nextNode);\n }\n }\n }\n// System.out.println(\"/////////////\");\n }\n }", "@Override\n public List<node_data> shortestPath(int src, int dest) {\n reset();\n for (node_data node : G.getV()) {\n node.setWeight(Double.POSITIVE_INFINITY);\n }\n\n DWGraph_DS.Node currentNode = (DWGraph_DS.Node) G.getNode(src);\n currentNode.setWeight(0);\n PriorityQueue<node_data> unvisitedNodes = new PriorityQueue(G.nodeSize(), weightComperator);\n unvisitedNodes.addAll(G.getV());\n HashMap<Integer, node_data> parent = new HashMap<>();\n parent.put(src, null);\n\n while (currentNode.getWeight() != Double.POSITIVE_INFINITY) {\n if (G.getNode(dest).getTag() == 1) {\n break;\n }\n for (edge_data edge : G.getE(currentNode.getKey())) {\n DWGraph_DS.Node neighbor = (DWGraph_DS.Node) G.getNode(edge.getDest());\n double tmpWeight = currentNode.getWeight() + edge.getWeight();\n if (tmpWeight < neighbor.getWeight()) {\n neighbor.setWeight(tmpWeight);\n unvisitedNodes.remove(neighbor);\n unvisitedNodes.add(neighbor);\n parent.put(neighbor.getKey(), currentNode);\n }\n }\n currentNode.setTag(1);\n if(currentNode.getKey()==dest) break;\n unvisitedNodes.remove(currentNode);\n currentNode = (DWGraph_DS.Node) unvisitedNodes.poll();\n }\n /*\n Rebuild the path list\n */\n if (!parent.keySet().contains(dest)) return null;\n List<node_data> pathList = new ArrayList<>();\n currentNode = (DWGraph_DS.Node) G.getNode(dest);\n while (parent.get(currentNode.getKey()) != null) {\n pathList.add(currentNode);\n currentNode = (DWGraph_DS.Node) parent.get(currentNode.getKey());\n }\n Collections.reverse(pathList);\n return pathList;\n }", "ShortestPath(UndirectedWeightedGraph graph, String startNodeId, String endNodeId) throws NotFoundNodeException {\r\n\t\t\r\n\t\tif (!graph.containsNode(startNodeId)) {\r\n\t\t\tthrow new NotFoundNodeException(graph, startNodeId);\r\n\t\t}\t\t\r\n\t\tif (!graph.containsNode(endNodeId)) {\r\n\t\t\tthrow new NotFoundNodeException(graph, endNodeId);\r\n\t\t}\t\r\n\r\n\t\tsrc = startNodeId;\r\n\t\tdst = endNodeId;\r\n\t\t\r\n\t\tif (endNodeId.equals(startNodeId)) {\r\n\t\t\tlength = 0;\r\n\t\t\tnumOfPath = 1;\r\n\t\t\tArrayList<String> path = new ArrayList<String>();\r\n\t\t\tpath.add(startNodeId);\r\n\t\t\tpathList.add(path);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// create a HashMap of updated distance from the starting node to every node\r\n\t\t\t// initially it is 0, inf, inf, inf, ...\r\n\t\t\tHashMap<String, Double> distance = new HashMap<String, Double>();\t\r\n\t\t\tfor (String nodeId : graph.getNodeList().keySet()) {\r\n\t\t\t\tif (nodeId.equals(startNodeId)) {\r\n\t\t\t\t\t// the starting node will always have 0 distance from itself\r\n\t\t\t\t\tdistance.put(nodeId, 0.0);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// the others have initial distance is infinity\r\n\t\t\t\t\tdistance.put(nodeId, Double.MAX_VALUE);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// a HashMap of preceding node of each node\r\n\t\t\tHashMap<String, HashSet<String>> precedence = new HashMap<String, HashSet<String>>();\r\n\t\t\tfor (String nodeId : graph.getNodeList().keySet()) {\r\n\t\t\t\tif ( nodeId.equals(startNodeId) ) {\r\n\t\t\t\t\tprecedence.put(nodeId, null);\t// the start node will have no preceding node\r\n\t\t\t\t}\r\n\t\t\t\telse { \r\n\t\t\t\t\tprecedence.put(nodeId, new HashSet<String>());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//\r\n\t\t\tSet<String> unvisitedNode = new HashSet<String>();\r\n\t\t\tfor (String nodeId : graph.getNodeList().keySet()) {\r\n\t\t\t\tunvisitedNode.add(nodeId);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdouble minUnvisitedLength;\r\n\t\t\tString minUnvisitedNode;\r\n\t\t\t// run loop while not all node is visited\r\n\t\t\twhile ( unvisitedNode.size() != 0 ) {\r\n\t\t\t\t// find the unvisited node with minimum current distance in distance list\r\n\t\t\t\tminUnvisitedLength = Double.MAX_VALUE;\r\n\t\t\t\tminUnvisitedNode = \"\";\r\n\t\t\t\tfor (String nodeId : unvisitedNode) {\r\n\t\t\t\t\tif (distance.get(nodeId) < minUnvisitedLength) {\r\n\t\t\t\t\t\tminUnvisitedNode = nodeId;\r\n\t\t\t\t\t\tminUnvisitedLength = distance.get(nodeId); \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// if there are no node that can be visited from the unvisitedNode, break the loop \r\n\t\t\t\tif (minUnvisitedLength == Double.MAX_VALUE) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// remove the node from unvisitedNode\r\n\t\t\t\tunvisitedNode.remove(minUnvisitedNode);\r\n\t\t\t\t\r\n\t\t\t\t// update the distance of its neighbors\r\n\t\t\t\tfor (Node neighborNode : graph.getNodeList().get(minUnvisitedNode).getNeighbors().keySet()) {\r\n\t\t\t\t\tdouble distanceFromTheMinNode = distance.get(minUnvisitedNode) + graph.getNodeList().get(minUnvisitedNode).getNeighbors().get(neighborNode).getWeight();\r\n\t\t\t\t\t// if the distance of the neighbor can be shorter from the current node, change \r\n\t\t\t\t\t// its details in distance and precedence\r\n\t\t\t\t\tif ( distanceFromTheMinNode < distance.get(neighborNode.getId()) ) {\r\n\t\t\t\t\t\tdistance.replace(neighborNode.getId(), distanceFromTheMinNode);\r\n\t\t\t\t\t\t// renew the precedence of the neighbor node\r\n\t\t\t\t\t\tprecedence.put(neighborNode.getId(), new HashSet<String>());\r\n\t\t\t\t\t\tprecedence.get(neighborNode.getId()).add(minUnvisitedNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (distanceFromTheMinNode == distance.get(neighborNode.getId())) {\r\n\t\t\t\t\t\t// unlike dijkstra's algorithm, multiple path should be update into the precedence\r\n\t\t\t\t\t\t// if from another node the distance is the same, add it to the precedence\r\n\t\t\t\t\t\tprecedence.get(neighborNode.getId()).add(minUnvisitedNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// if the current node in the process is the end node, we can stop the while loop here\r\n\t\t\t\tif (minUnvisitedNode == endNodeId) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (distance.get(endNodeId) == Double.MAX_VALUE) {\r\n\t\t\t\t// in case there is no shortest path between the 2 nodes\r\n\t\t\t\tlength = 0;\r\n\t\t\t\tnumOfPath = 0;\r\n\t\t\t\tpathList = null;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// other wise we have these information\r\n\t\t\t\tlength = distance.get(endNodeId);\r\n\t\t\t\t//numOfPath = this.getNumPath(precedence, startNodeId, endNodeId);\r\n\t\t\t\tpathList = this.findPathList(precedence, startNodeId, endNodeId);\r\n\t\t\t\tnumOfPath = pathList.size();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\t// END ELSE\t\t\r\n\t}", "@Override\n public List<node_info> shortestPath(int src, int dest) {\n int counter=0;//counter for index of listPath\n List<node_info> listPath=new ArrayList<node_info>();//The reverse list that is returned\n List<node_info> listResult=new ArrayList<node_info>();//the returned list\n if(!DijkstraHelp(src,dest)) return null;//if there is no path from src to dest\n if(src==dest) {\n listPath.add(this.ga.getNode(src));\n return listPath;\n }\n //the other case:\n node_info d=this.ga.getNode(dest);\n listPath.add(counter,d);//insert the dest in order to go from destination to source\n //counter++;\n weighted_graph gCopy=copy();\n Iterator<node_info> it=gCopy.getV().iterator();//run on the whole graph\n while(it.hasNext()){\n if(listPath.get(counter).getKey()==src) break;//if we finished\n if(gCopy.getV(listPath.get(counter).getKey()).contains(it.next())) {//remove the nodes that we were already checked if\n //they need to be insert to listPath\n continue;\n }\n Iterator<node_info> currentIt=gCopy.getV(listPath.get(counter).getKey()).iterator();//iterator on the ni-list of the\n //last node were insert to the listPath\n if(currentIt!=null) {\n node_info min=null;\n while (currentIt.hasNext()){\n node_info currentLoop=currentIt.next();\n if(currentLoop.getTag()+gCopy.getEdge(listPath.get(counter).getKey(),currentLoop.getKey())==\n listPath.get(counter).getTag()){//check if this is the node that appropriate to the shortest path\n min=currentLoop;\n }\n }\n listPath.add(min);//insert to listPath\n counter++;\n }\n }\n for(int i=listPath.size()-1;i>=0;i--){\n listResult.add(listPath.size()-i-1,listPath.get(i));//reverse the list\n }\n return listResult;\n }", "private static void computePaths(Vertex source) {\n source.minDistance = 0;\n // retrieves with log(n) time\n PriorityQueue<Vertex> vertexPriorityQueue = new PriorityQueue<>();\n\n //BFS traversal\n vertexPriorityQueue.add(source);\n\n // O((v + e) * log(v))\n while (!vertexPriorityQueue.isEmpty()) {\n // this poll always returns the shortest distance vertex at log(v) time\n Vertex vertex = vertexPriorityQueue.poll();\n\n //visit each edge exiting vertex (adjacencies)\n for (Edge edgeInVertex : vertex.adjacencies) {\n // calculate new distance between edgeInVertex and target\n Vertex targetVertex = edgeInVertex.target;\n double edgeWeightForThisVertex = edgeInVertex.weight;\n double distanceThruVertex = vertex.minDistance + edgeWeightForThisVertex;\n if (distanceThruVertex < targetVertex.minDistance) {\n // modify the targetVertex with new calculated minDistance and previous vertex\n // by removing the old vertex and add new vertex with updates\n vertexPriorityQueue.remove(targetVertex);\n targetVertex.minDistance = distanceThruVertex;\n // update previous with the shortest distance vertex\n targetVertex.previous = vertex;\n vertexPriorityQueue.add(targetVertex);// adding takes log(v) time because needs to heapify\n }\n }\n }\n }", "private static void simpleDijikstra(final DirectedGraph directedGraph,\n final Map<String, Integer> currentShortestPaths,\n final String start, final Set<String> visitedSet, final String destination) {\n // Terminate when we have visited all the nodes or if our start value isn't in our dijikstra table\n if (containsAndNotNull(currentShortestPaths, start) && visitedSet.size() != currentShortestPaths.keySet().size()) {\n compareDistanceAndReplace(directedGraph, currentShortestPaths, start);\n visitedSet.add(start);\n // Calculate the next current smallest node that hasn't been visited and not infinity\n final Optional<Map.Entry<String, Integer>> optionalSmallest =\n currentShortestPaths.entrySet().stream()\n .filter(node -> !visitedSet.contains(node.getKey()) && node.getValue() != null)\n .min(Comparator.comparingInt(Map.Entry::getValue));\n // Continue to next node if there is one available\n optionalSmallest.ifPresent(smallest -> {\n // No need to continue if the next smallest node is our destination\n if (!smallest.getKey().equals(destination)) {\n simpleDijikstra(directedGraph, currentShortestPaths, smallest.getKey(), visitedSet, destination);\n }\n });\n }\n }", "private void dijkstra(final NavigableSet<Node> queue) {\n Node firstNode, neighbor;\n while (!queue.isEmpty()) {\n // vertex with shortest distance (first iteration will return source)\n firstNode = queue.pollFirst();\n assert firstNode != null;\n if (!explored.contains(firstNode.coordinate)) {\n explored.add(firstNode.coordinate);\n }\n if (firstNode.dist == Integer.MAX_VALUE)\n // we can ignore u (and any other remaining vertices) since they are unreachable\n break;\n //look at distances to each neighbour\n for (Map.Entry<Node, Integer> temp : firstNode.neighbours.entrySet()) {\n neighbor = temp.getKey(); //the neighbour in this iteration\n if (!explored.contains(neighbor.coordinate)) {\n explored.add(neighbor.coordinate);\n }\n final int alternateDist = firstNode.dist + temp.getValue();\n if (alternateDist < neighbor.dist) { // shorter path to neighbour found\n queue.remove(neighbor);\n neighbor.dist = alternateDist;\n neighbor.previous = firstNode;\n queue.add(neighbor);\n }\n }\n }\n }", "public void findShortestPath(String startName, String endName) {\n checkValidEndpoint(startName);\n checkValidEndpoint(endName);\n\n Vertex<String> start = vertices.get(startName);\n Vertex<String> end = vertices.get(endName);\n\n double totalDist; // totalDist must be update below\n\n Map<Vertex<String>, Double> distance = new HashMap<>();\n Map<Vertex<String>, Vertex<String>> previous = new HashMap<>();\n Set<Vertex<String>> explored = new HashSet<>();\n PriorityQueue<VertexDistancePair> pq = new PriorityQueue<>();\n\n\n\n addPQ(distance, start, pq, previous);\n\n\n\n dijkstraHelper(pq, end, explored, distance, previous);\n\n\n\n\n\n\n totalDist = distance.get(end);\n List<Edge<String>> path = getPath(end, start);\n printPath(path, totalDist);\n }", "@Override\n public Double calculateShortestPathFromSource(String from, String to) {\n Node source = graph.getNodeByName(from);\n Node destination = graph.getNodeByName(to);\n source.setDistance(0d);\n Set<Node> settledNodes = new HashSet<>();\n PriorityQueue<Node> unsettledNodes = new PriorityQueue<>(Comparator.comparing(Node::getDistance));\n unsettledNodes.add(source);\n while (unsettledNodes.size() != 0) {\n Node currentNode = unsettledNodes.poll();\n for (Map.Entry<Node, Double> adjacencyPair : currentNode.getAdjacentNodes().entrySet()) {\n Node adjacentNode = adjacencyPair.getKey();\n Double distance = adjacencyPair.getValue();\n if (!settledNodes.contains(adjacentNode)) {\n calculateMinimumDistance(adjacentNode, distance, currentNode);\n unsettledNodes.add(adjacentNode);\n }\n }\n settledNodes.add(currentNode);\n }\n return destination.getDistance() == Double.MAX_VALUE ? -9999d : destination.getDistance();\n }", "public void Djkstra(int source) {\n\t\tfor (int i = 0; i < vertices; i++) {\n\t\t\tdist[i] = Integer.MAX_VALUE; // added infinity to all ,\n\t\t}\n\t\t\n\t\tdist[source] = 0;\n\n\t\t// add source vertex to priority queue\n\t\tq.add(new Node(source, 0));\n\n\n\t\t// while my all vertices are not selected as a min among smallest one time\n\t\t// refracted in visited\n\t\twhile (visited.size() != vertices) {\n\n\t\t\t// pick from priority queue the smallest/min distance\n\t\t\tint i = q.remove().node;\n\n\t\t\t// once node is removed from queue add to set\n\t\t\tvisited.add(i);\n\n\t\t\t// relax adjacent vertex of this node;\n\t\t\t// And add the new node to queue bcoz distance has got updated so add new node as i dont have any method to update \n\t\t\t// already present node and its distance\n\t\t\t\n\n\t\t\tfor (Node v : graph[i]) {\n\t\t\t\tif (!visited.contains(v.node)) {\n\t\t\t\t\tif (dist[i] + v.cost < dist[v.node]) {\n\t\t\t\t\t\tdist[v.node] = dist[i] + v.cost;\n\t\t\t\t\t\tq.add(new Node(v.node, dist[v.node]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "@Override\n\tpublic List<node_data> shortestPath(int src, int dest) {\n\t\tList<node_data> ans = new ArrayList<>();\n\t\tthis.shortestPathDist(src, dest);\n\t\tif(this.GA.getNode(src).getWeight() == Integer.MAX_VALUE || this.GA.getNode(dest).getWeight() == Integer.MAX_VALUE){\n\t\t\tSystem.out.print(\"There is not a path between the nodes.\");\n\t\t\treturn null;\n\t\t}\n\t\tgraph copied = this.copy();\n\t\ttransPose(copied);\n\t\tnode_data first = copied.getNode(dest);\n\t\tans.add(first);\n\t\twhile (first.getKey() != src) {\n\t\t\tCollection<edge_data> temp = copied.getE(first.getKey());\n\t\t\tdouble check= first.getWeight();\n\t\t\tif(temp!=null) {\n\t\t\t\tfor (edge_data edge : temp) {\n\t\t\t\t\tif (copied.getNode(edge.getDest()).getWeight() + edge.getWeight() == check) {\n\t\t\t\t\t\tfirst = copied.getNode(edge.getDest());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tans.add(first);\n\t\t}\n\t\tList<node_data> ans2 = new ArrayList<>();\n\t\tfor (int i = ans.size()-1;i>=0;i--){\n\t\t\tans2.add(ans.get(i));\n\t\t}\n\t\treturn ans2;\n\t}", "public Path getShortestPath() {\n\t\tNodeRecord startRecord = new NodeRecord(start, null, 0.0f, (float) heuristic.estimate(start), Category.OPEN);\n\n\t\t// Initialize the open list\n\t\tPathFindingList open = new PathFindingList();\n\t\topen.addRecordByEstimatedTotalCost(startRecord);\n\t\trecords.set(Integer.parseInt(startRecord.node.id), startRecord);\n\t\tNodeRecord current = null;\n\t\t\n\t\t// Iterate through processing each node\n\t\twhile (!open.isEmpty()) {\n\t\t\t// Find smallest element in the open list using estimatedTotalCost\n\t\t\tcurrent = open.getSmallestNodeRecordByEstimatedTotalCost();\n\n\t\t\t// If its the goal node, terminate\n\t\t\tif (current.node.equals(end)) break;\n\n\t\t\t// Otherwise get its outgoing connections\n\t\t\tArrayList<DefaultWeightedEdge> connections = g.getConnections(current.node);\n\t\t\t\n\t\t\t// Loop through each connection\n\t\t\tfor (DefaultWeightedEdge connection : connections) {\n\t\t\t\t// Get the cost and other information for end node\n\t\t\t Vertex endNode = g.graph.getEdgeTarget(connection);\n\t\t\t int endNodeRecordIndex = Integer.parseInt(endNode.id);\n NodeRecord endNodeRecord = records.get(endNodeRecordIndex); // this is potentially null but we handle it\n\t\t\t\tdouble newEndNodeCost = current.costSoFar + g.graph.getEdgeWeight(connection);\n\t\t\t\tdouble endNodeHeuristic = 0;\n\t\t\t\t\n\t\t\t\t// if node is closed we may have to skip, or remove it from closed list\t\n\t\t\t\tif( endNodeRecord != null && endNodeRecord.category == Category.CLOSED ){ \n\t\t\t\t\t// Find the record corresponding to the endNode\n\t\t\t\t\tendNodeRecord = records.get(endNodeRecordIndex);\n\n\t\t\t\t\t// If we didn't find a shorter route, skip\n\t\t\t\t\tif (endNodeRecord.costSoFar <= newEndNodeCost) continue;\n\n\t\t\t\t\t// Otherwise remove it from closed list\n\t\t\t\t\trecords.get(endNodeRecordIndex).category = Category.OPEN;\n\n\t\t\t\t\t// Use node's old cost values to calculate its heuristic to save computation\n\t\t\t\t\tendNodeHeuristic = endNodeRecord.estimatedTotalCost - endNodeRecord.costSoFar;\n\n\t\t\t\t// Skip if node is open and we've not found a better route\n\t\t\t\t} else if( endNodeRecord != null && endNodeRecord.category == Category.OPEN ){ \n\t\t\t\t\t// Here we find the record in the open list corresponding to the endNode\n\t\t\t\t\tendNodeRecord = records.get(endNodeRecordIndex);\n\n\t\t\t\t\t// If our route isn't better, skip\n\t\t\t\t\tif (endNodeRecord.costSoFar <= newEndNodeCost) continue;\n\n\t\t\t\t\t// Use the node's old cost values to calculate its heuristic to save computation\n\t\t\t\t\tendNodeHeuristic = endNodeRecord.estimatedTotalCost - endNodeRecord.costSoFar;\n\n\t\t\t\t// Otherwise we know we've got an unvisited node, so make a new record\n\t\t\t\t} else { // if endNodeRecord.category == Category.UNVISITED\n\t\t\t\t endNodeRecord = new NodeRecord();\n\t\t\t\t\tendNodeRecord.node = endNode;\n\t\t\t\t\trecords.set(endNodeRecordIndex, endNodeRecord);\n\n\t\t\t\t\t// Need to calculate heuristic since this is new\n\t\t\t\t\tendNodeHeuristic = heuristic.estimate(endNode);\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t// We're here if we need to update the node\n\t\t\t\t// update the cost, estimate, and connection\n\t\t\t\tendNodeRecord.costSoFar = newEndNodeCost;\n\t\t\t\tendNodeRecord.edge = connection;\n\t\t\t\tendNodeRecord.estimatedTotalCost = newEndNodeCost + endNodeHeuristic;\n\n\t\t\t\t// Add it to the open list\n\t\t\t\tif ( endNodeRecord.category != Category.OPEN ) {\n\t\t\t\t\topen.addRecordByEstimatedTotalCost(endNodeRecord);\n\t\t\t\t\tendNodeRecord.category = Category.OPEN;\n\t\t\t\t\trecords.set(endNodeRecordIndex, endNodeRecord);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t// We’ve finished looking at the connections for\n\t\t\t// the current node, so add it to the closed list\n\t\t\t// and remove it from the open list\n\t\t\topen.removeRecord(current);\n\t\t\tcurrent.category = Category.CLOSED;\n\t\t\trecords.set(Integer.parseInt(current.node.id), current);\n\t\t}\n\t\t\n\t\t// We’re here if we’ve either found the goal, or\n\t\t// if we’ve no more nodes to search, find which.\n\t\tif (!current.node.equals(end)) {\n\t\t\t// Ran out of nodes without finding the goal, no solution\n\t\t\treturn null;\n\t\t} else {\n\t\t // Compile the list of connections in the path\n\t\t\tArrayList<DefaultWeightedEdge> path = new ArrayList<>();\n\n\t\t\twhile (!current.node.equals(start)) {\n\t\t\t\tpath.add(current.edge);\n\t\t\t\t// Set current (NodeRecord) to is source.\n\t\t\t\tcurrent = records.get( Integer.parseInt(g.graph.getEdgeSource(current.edge).id) );\n\t\t\t}\n\n\t\t\t// Reverse the path, and return it\n\t\t\tCollections.reverse(path);\n\t\t\treturn new Path(g, path);\n\t\t}\n\n\t}", "private Path findShortestPath(Address start, Address destination) throws Exception{\n HashMap<Intersection, Segment> pi = dijkstra(start);\n Segment seg = pi.get(destination);\n if(seg == null){\n throw new Exception();\n }\n LinkedList<Segment> newPathComposition = new LinkedList<>();\n Path newPath = new Path(start, destination, newPathComposition);\n newPathComposition.add(seg);\n while (!seg.getOrigin().equals(start)) {\n Intersection s = seg.getOrigin();\n seg = pi.get(s);\n if(seg == null){\n throw new Exception();\n }\n newPathComposition.add(seg);\n }\n Collections.reverse(newPathComposition);\n newPath.setSegmentsOfPath(newPathComposition);\n return newPath;\n }", "void shortestPaths( Set<Integer> nodes );", "public List<node_info> shortestPath(int src, int dest);", "void dijkstra(int[][] graph){\r\n int dist[] = new int[rideCount];\r\n Boolean sptSet[] = new Boolean[rideCount];\r\n\r\n for(int i = 0; i< rideCount; i++){\r\n dist[i] = Integer.MAX_VALUE;\r\n sptSet[i] = false;\r\n }\r\n\r\n dist[0] = 0;\r\n\r\n for(int count = 0; count< rideCount -1; count++){\r\n int u = minWeight(dist, sptSet);\r\n sptSet[u] = true;\r\n for(int v = 0; v< rideCount; v++){\r\n if (!sptSet[v] && graph[u][v] != 0 && dist[u] + graph[u][v] < dist[v]){\r\n dist[v] = dist[u] + graph[u][v];\r\n }\r\n }\r\n }\r\n printSolution(dist);\r\n }", "public void dijkstra(int graphWeight[][], int source){\r\n\t\t\r\n\t\tint queue[] = new int[vertices]; //The array which will hold the shortest distance from source to node i\r\n\t\tboolean set[] = new boolean[vertices]; //It will store true for node i if the shortest path to that vertex or node is found\r\n\t\t\r\n\t\t//Initialize distances to infinity and set[] array to false \r\n\t\tfor(int i=0;i<vertices;i++){\r\n\t\t\tqueue[i] = Integer.MAX_VALUE; \r\n\t\t\tset[i] = false;\r\n\t\t}\r\n\t\t\r\n\t\t//Distance of source vertex from itself is always 0\r\n\t\tqueue[source] = 0;\r\n\r\n\t\t//Find shortest path of all the vertices\r\n\t\tfor(int count=0;count<vertices-1;count++){\r\n\t\t\t\r\n\t\t\t//Pick the minimum distance vertex from the from the set of vertices \r\n\t\t\t//not processed. u is equal to source in first iteration\r\n\t\t\tint u = extractMinDistance(queue, set);\r\n\t\t\t\r\n\t\t\t//Mark the picked vertex processed\r\n\t\t\tset[u] = true;\r\n\t\t\t//Update queue value of the adjacent vertices of the picked vertex\r\n\t\t\tfor(int v=0;v<vertices;v++)\r\n\t\t\t{\r\n\t\t\t\t//Update queue[v] only if\r\n\t\t\t\t// 1. It is not in set true in the Set Array\r\n\t\t\t\t// 2. There is an edge from u to v\r\n\t\t\t\t// 3. Total weight of path from source to v through u is smaller than current value of queue[v]\r\n\t\t\t\tif((graphWeight[u][v] > 0) && set[v] == false){\r\n\t\t\t\t\t\tif(queue[u] + graphWeight[u][v] < queue[v]){\r\n\t\t\t\t\t\t\tqueue[v] = queue[u] + graphWeight[u][v];\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//printSolution(queue, vertices);\r\n\t\t}\r\n\t\t//Print the constructed distance array\r\n\t\tprintSolution(queue, vertices);\r\n\t}", "void dijkstra(int graph[][], int src) {\n int dist[] = new int[V]; // The output array. dist[i] will hold\n // the shortest distance from src to i\n\n // sptSet[i] will true if vertex i is included in shortest\n Boolean sptSet[] = new Boolean[V];\n\n for (int i = 0; i < V; i++) {\n dist[i] = Integer.MAX_VALUE;\n sptSet[i] = false;\n }\n\n dist[src] = 0;\n\n // Find shortest path for all vertices\n for (int count = 0; count < V-1; count++) {\n\n int u = minDistance(dist, sptSet);\n\n // Mark the picked vertex as processed\n sptSet[u] = true;\n\n // Update dist value of the adjacent vertices of the\n // picked vertex.\n for (int v = 0; v < V; v++)\n\n\n if (!sptSet[v] && graph[u][v]!=0 &&\n dist[u] != Integer.MAX_VALUE &&\n dist[u]+graph[u][v] < dist[v])\n dist[v] = dist[u] + graph[u][v];\n }\n\n printSolution(dist, V);\n }", "private static ArrayList<Connection> pathFindDijkstra(Graph graph, int start, int goal) {\n\t\tNodeRecord startRecord = new NodeRecord();\r\n\t\tstartRecord.setNode(start);\r\n\t\tstartRecord.setConnection(null);\r\n\t\tstartRecord.setCostSoFar(0);\r\n\t\tstartRecord.setCategory(OPEN);\r\n\t\t\r\n\t\tArrayList<NodeRecord> open = new ArrayList<NodeRecord>();\r\n\t\tArrayList<NodeRecord> close = new ArrayList<NodeRecord>();\r\n\t\topen.add(startRecord);\r\n\t\tNodeRecord current = null;\r\n\t\tdouble endNodeCost = 0;\r\n\t\twhile(open.size() > 0){\r\n\t\t\tcurrent = getSmallestCSFElementFromList(open);\r\n\t\t\tif(current.getNode() == goal){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tGraphNode node = graph.getNodeById(current.getNode());\r\n\t\t\tArrayList<Connection> connections = node.getConnection();\r\n\t\t\tfor( Connection connection :connections){\r\n\t\t\t\t// get the cost estimate for end node\r\n\t\t\t\tint endNode = connection.getToNode();\r\n\t\t\t\tendNodeCost = current.getCostSoFar() + connection.getCost();\r\n\t\t\t\tNodeRecord endNodeRecord = new NodeRecord();\r\n\t\t\t\t// if node is closed skip it\r\n\t\t\t\tif(listContains(close, endNode))\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t// or if the node is in open list\r\n\t\t\t\telse if (listContains(open,endNode)){\r\n\t\t\t\t\tendNodeRecord = findInList(open, endNode);\r\n\t\t\t\t\t// print\r\n\t\t\t\t\t// if we didn't get shorter route then skip\r\n\t\t\t\t\tif(endNodeRecord.getCostSoFar() <= endNodeCost) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// else node is not visited yet\r\n\t\t\t\telse {\r\n\t\t\t\t\tendNodeRecord = new NodeRecord();\r\n\t\t\t\t\tendNodeRecord.setNode(endNode);\r\n\t\t\t\t}\r\n\t\t\t\t//update the node\r\n\t\t\t\tendNodeRecord.setCostSoFar(endNodeCost);\r\n\t\t\t\tendNodeRecord.setConnection(connection);\r\n\t\t\t\t// add it to open list\r\n\t\t\t\tif(!listContains(open, endNode)){\r\n\t\t\t\t\topen.add(endNodeRecord);\r\n\t\t\t\t}\r\n\t\t\t}// end of for loop for connection\r\n\t\t\topen.remove(current);\r\n\t\t\tclose.add(current);\r\n\t\t}// end of while loop for open list\r\n\t\tif(current.getNode() != goal)\r\n\t\t\treturn null;\r\n\t\telse { //get the path\r\n\t\t\tArrayList<Connection> path = new ArrayList<>();\r\n\t\t\twhile(current.getNode() != start){\r\n\t\t\t\tpath.add(current.getConnection());\r\n\t\t\t\tint newNode = current.getConnection().getFromNode();\r\n\t\t\t\tcurrent = findInList(close, newNode);\r\n\t\t\t}\r\n\t\t\tCollections.reverse(path);\r\n\t\t\treturn path;\r\n\t\t}\r\n\t}", "private void calculateShortestRoute(String strSourceTerminal){\n\t\tshortestTravelTime = new HashMap<>();\n\n //stores parent of every terminal in shortest travel time\n parent = new HashMap<>();\n \n //heap + map data structure\n MinimumHeap<BaggageTerminal> minHeap = new MinimumHeap<>();\n\n //initialize all terminal with infinite distance from source terminal\n for(BaggageTerminal baggageTerminal : graph.getTerminals()){\n minHeap.add(Integer.MAX_VALUE, baggageTerminal);\n }\n \n BaggageTerminal sourceTerminal = graph.getTerminal(strSourceTerminal);\n \n //set distance of source terminal to itself 0\n minHeap.decrease(sourceTerminal, 0);\n\n //put it in map\n shortestTravelTime.put(sourceTerminal, 0);\n\n //source terminal parent is null\n parent.put(sourceTerminal, null);\n\n //iterate till heap is not empty\n while(!minHeap.empty()){\n //get the min value from heap node which has vertex and distance of that vertex from source vertex.\n MinimumHeap<BaggageTerminal>.Node heapNode = minHeap.extractMinNode();\n BaggageTerminal currentTerminal = heapNode.key;\n\n //update shortest distance of current vertex from source vertex\n shortestTravelTime.put(currentTerminal, heapNode.weight);\n\n //iterate through all connections of current terminal\n for(Connection connection : currentTerminal.getConnections()){\n\n //get the adjacent terminal\n BaggageTerminal adjacent = getConnectingTerminal(currentTerminal, connection);\n\n //if heap does not contain adjacent vertex means adjacent vertex already has shortest distance from source vertex\n if(!minHeap.containsData(adjacent)){\n continue;\n }\n\n //add distance of current vertex to edge weight to get distance of adjacent vertex from source vertex\n //when it goes through current vertex\n int newDistance = shortestTravelTime.get(currentTerminal) + connection.getWeight();\n\n //see if this above calculated distance is less than current distance stored for adjacent vertex from source vertex\n if(minHeap.getWeight(adjacent) > newDistance) {\n minHeap.decrease(adjacent, newDistance);\n parent.put(adjacent, currentTerminal);\n }\n }\n }\n return;\n }", "@Override\n\tpublic List<Path> getShortestRoute(Location src, Location dest, String edgePropertyName) {\n\t\t//array to keep track of visited vertexes\n\t\tboolean[] visited = new boolean[locations.size()];\n\t\t//array to store weights\n\t\tdouble[] weight = new double[locations.size()];\n\t\t//array to store predecessors\n\t\tLocation[] pre = new Location[locations.size()];\n\t\t//creates priority queue\n\t\tPriorityQueue<LocWeight> pq = new PriorityQueue<LocWeight>();\n\t\t// initializes every vertex misted mark to false\n\t\tfor (int i = 0; i < visited.length; i++)\n\t\t\tvisited[i] = false;\n\t\t// initializes every vertex's total weight to infinity\n\t\tfor (int i = 0; i < weight.length; i++)\n\t\t\tweight[i] = Double.POSITIVE_INFINITY;\n\t\t// initializes every vertex's predecessor to null\n\t\tfor (int i = 0; i < pre.length; i++)\n\t\t\tpre[i] = null;\n\t\t//sets start vertex's total weight to 0\n\t\tweight[locations.indexOf(src)] = 0;\n\t\t//insert start vertex in priroty queue\n\t\tpq.add(new LocWeight(src, 0.0));\n\t\t\n\t\tString[] edgeNames = getEdgePropertyNames();\n\t\tint indexProp = 0;\n\t\tfor (int i = 0; i < edgeNames.length; i++) {\n\t\t\tif (edgeNames[i].equalsIgnoreCase(edgePropertyName))\n\t\t\t\tindexProp = i;\n\t\t}\n\t\twhile (!pq.isEmpty()) {\n\t\t\tLocWeight c = pq.remove();\n\t\t\t//set C's visited mark to true\n\t\t\tvisited[locations.indexOf(c)] = true;\n\n\t\t\tList<Location> neighbors = getNeighbors(c.getLocation());\n\t\t\t//for each unvisited successor adjacent to C\n\t\t\tfor (int i = 0; i < neighbors.size(); i++) {\n\t\t\t\tif (visited[locations.indexOf(neighbors.get(i))] == false) {\n\t\t\t\t\t//change successor's total weight to equal C's weight + edge weight from C to successor\n\t\t\t\t\tweight[locations.indexOf(neighbors.get(i))] = c.getWeight() + getEdgeIfExists(c.getLocation(), neighbors.get(i)).getProperties().get(indexProp);\n\t\t\t\t\tpre[locations.indexOf(neighbors.get(i))] = c.getLocation();\n\t\t\t\t\tLocWeight succ = new LocWeight(neighbors.get(i), weight[locations.indexOf(neighbors.get(i))]);\n\t\t\t\t\t//if successor is already in pq, update its total weight\n\t\t\t\t\tif (pq.contains(succ)) {\n\t\t\t\t\t\tpq.remove(succ);\n\t\t\t\t\t}\n\t\t\t\t\t//if not already there, add\n\t\t\t\t\tpq.add(succ);\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t\n\n\n\t\t}\n\t\t\n\t\tArrayList<Path> path = new ArrayList<Path>();\n\t\t//find predecessor of each vertex and construct shortest path then return it\n\t\tLocation curr1 = dest;\n\t\twhile (pre[locations.indexOf(curr1)] != null) {\n\t\t\tpath.add(getEdgeIfExists(pre[locations.indexOf(curr1)], curr1));\n\t\t\tcurr1 = pre[locations.indexOf(curr1)];\n\t\t}\n\t\t//to show path from the start\n\t\tfor (int i = path.size() - 1; i >= 0; i--)\n\t\t\tpath.add(path.remove(i));\n\n\n\t\treturn path;\n\t}", "@Test\n void testShortestPath(){\n weighted_graph g = new WGraph_DS();\n for(int i = 1; i <= 7; i++){\n g.addNode(i);\n }\n g.connect(1,2,20);\n g.connect(1,5,15);\n g.connect(2,3,20);\n g.connect(5,6,15);\n g.connect(3,4,20);\n g.connect(6,4,15);\n g.connect(1,7,2);\n g.connect(7,4,1);\n weighted_graph_algorithms ga = new WGraph_Algo();\n ga.init(g);\n LinkedList<node_info> expectedPath = new LinkedList<>(Arrays.asList(g.getNode(1),g.getNode(7),g.getNode(4)));\n assertNull(ga.shortestPath(1,10));\n assertEquals(expectedPath,ga.shortestPath(1,4));\n assertEquals(1,ga.shortestPath(1,1).size());\n }", "public static <V> Dictionary<V, DijkstraResult<V>> getShortestPathDijkstra(Graph<V> graph, V value) {\n V[] vertices = graph.getValuesAsArray();\n double[][] matriz = graph.getGraphStructureAsMatrix();\n\n double[] distancias = new double[vertices.length];\n V[] camino = (V[]) new Object[vertices.length];\n int pos = buscarPosicion(value, vertices);\n\n for (int x = 0; x < vertices.length; x++) { // Se llenan los arreglos con la informacion de sus adyacentes.\n if (pos == x) {\n distancias[x] = 0;\n camino[x] = null;\n } else {\n if (matriz[pos][x] == -1) {\n distancias[x] = Integer.MAX_VALUE - 1;\n camino[x] = vertices[pos];\n } else {\n distancias[x] = matriz[pos][x];\n camino[x] = vertices[pos];\n }\n }\n }\n\n Set<V> revisados = new LinkedListSet<>();\n revisados.put(value);\n while (revisados.size() < vertices.length) {\n double menor = Integer.MAX_VALUE;\n V actual = null;\n for (int x = 0; x < vertices.length; x++) {\n if (distancias[x] < menor) {\n if (!revisados.isMember(vertices[x])) {\n menor = distancias[x];\n actual = vertices[x];\n }\n }\n }\n\n pos = buscarPosicion(actual, vertices);\n for (int x = 0; x < vertices.length; x++) { // Se recorre la matriz para buscar adyacencias.\n if (matriz[pos][x] != -1) { // Si existe arist\n if (menor + matriz[pos][x] < distancias[x]) {\n distancias[x] = menor + matriz[pos][x];\n camino[x] = actual;\n }\n }\n }\n revisados.put(actual);\n }\n Dictionary<V, DijkstraResult<V>> diccionario = new Hashtable<>();\n for (int x = 0; x < vertices.length; x++) {\n DijkstraResult<V> aux = new DijkstraResult<>(vertices[x], camino[x], distancias[x]);\n diccionario.put(vertices[x], aux);\n }\n return diccionario;\n }", "public void computeAllPaths(String source)\r\n {\r\n Vertex sourceVertex = network_topology.get(source);\r\n Vertex u,v;\r\n double distuv;\r\n\r\n Queue<Vertex> vertexQueue = new PriorityQueue<Vertex>();\r\n \r\n \r\n // Switch between methods and decide what to do\r\n if(routing_method.equals(\"SHP\"))\r\n {\r\n // SHP, weight of each edge is 1\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + 1;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n else if (routing_method.equals(\"SDP\"))\r\n {\r\n // SDP, weight of each edge is it's propagation delay\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + u.adjacentVertices.get(key).propDelay;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n } \r\n }\r\n }\r\n else if (routing_method.equals(\"LLP\"))\r\n {\r\n // LLP, weight each edge is activeCircuits/AvailableCircuits\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = Math.max(u.minDistance,u.adjacentGet(key).load());\r\n //System.out.println(u.adjacentGet(key).load());\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n }\r\n }\r\n }", "private void computeShortestPathsFromSource(V source) {\n\t\tBFSDistanceLabeler<V, E> labeler = new BFSDistanceLabeler<V, E>();\n\t\tlabeler.labelDistances(mGraph, source);\n\t\tdistances = labeler.getDistanceDecorator();\n\t\tMap<V, Number> currentSourceSPMap = new HashMap<V, Number>();\n\t\tMap<V, E> currentSourceEdgeMap = new HashMap<V, E>();\n\n\t\tfor (V vertex : mGraph.getVertices()) {\n\n\t\t\tNumber distanceVal = distances.get(vertex);\n\t\t\t// BFSDistanceLabeler uses -1 to indicate unreachable vertices;\n\t\t\t// don't bother to store unreachable vertices\n\t\t\tif (distanceVal != null && distanceVal.intValue() >= 0) {\n\t\t\t\tcurrentSourceSPMap.put(vertex, distanceVal);\n\t\t\t\tint minDistance = distanceVal.intValue();\n\t\t\t\tfor (E incomingEdge : mGraph.getInEdges(vertex)) {\n\t\t\t\t\tfor (V neighbor : mGraph\n\t\t\t\t\t\t\t.getIncidentVertices(incomingEdge)) {\n\t\t\t\t\t\tif (neighbor.equals(vertex))\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t// V neighbor = mGraph.getOpposite(vertex,\n\t\t\t\t\t\t// incomingEdge);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tNumber predDistanceVal = distances.get(neighbor);\n\n\t\t\t\t\t\tint pred_distance = predDistanceVal.intValue();\n\t\t\t\t\t\tif (pred_distance < minDistance && pred_distance >= 0) {\n\t\t\t\t\t\t\tminDistance = predDistanceVal.intValue();\n\t\t\t\t\t\t\tcurrentSourceEdgeMap.put(vertex, incomingEdge);\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\tmDistanceMap.put(source, currentSourceSPMap);\n\t\tmIncomingEdgeMap.put(source, currentSourceEdgeMap);\n\t}", "public List<GeographicPoint> dijkstra(GeographicPoint start, \n\t\t\t\t\t\t\t\t\t\t GeographicPoint goal, Consumer<GeographicPoint> nodeSearched)\n\t{\n\t\t// TODO: Implement this method in WEEK 4\n\n\t\t// Hook for visualization. See writeup.\n\t\t//nodeSearched.accept(next.getLocation());\n\t\t\n\t\t//initialize distance of each MapNode from start to infinity\n\t\t\n\t\tSet<GeographicPoint> visited = new HashSet<GeographicPoint>();\n\t\tPriorityQueue<MapNode> queue = new PriorityQueue<MapNode>();\n\t\tHashMap<GeographicPoint, List<GeographicPoint>> path = new HashMap<GeographicPoint, List<GeographicPoint>>();\n\t\tint count = 0;\n\t\t\n\t\tif (!map.containsKey(start) || !map.containsKey(goal))\n\t\t\treturn null;\n\t\t\n\t\tfor (GeographicPoint temp : map.keySet())\n\t\t\tpath.put(temp, new ArrayList<GeographicPoint>());\n\t\t\n\t\tMapNode startNode = map.get(start);\n\t\tstartNode.setTimeToStart(0.0);\n\t\tstartNode.setDistanceToStart(0.0);\n\t\tqueue.add(startNode);\n\t\t\n\t\twhile (!queue.isEmpty()) {\n\t\t\tMapNode currNode = queue.poll();\n\t\t\tnodeSearched.accept(currNode.getLocation());\n\t\t\t\n\t\t\tif (!visited.contains(currNode.getLocation())) {\n\t\t\t\tvisited.add(currNode.getLocation());\n\t\t\t\tcount++;\n\t\t\t\t\n\t\t\t\tif (currNode.getLocation().equals(goal))\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tHashMap<MapEdge, GeographicPoint> neighbours = currNode.getNeighbours();\n\t\t\t\tfor (MapEdge edge : neighbours.keySet()) {\n\t\t\t\t\t\n\t\t\t\t\tif (!visited.contains(edge.getEnd())) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tMapNode addNode = map.get(neighbours.get(edge));\n\t\t\t\t\t\tdouble tempTime = currNode.getTimeToStart() + ((edge.getDistance())/(edge.getSpeedLimit()));\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tempTime < addNode.getTimeToStart()) {\n\t\t\t\t\t\t\taddNode.setTimeToStart(tempTime);\n\t\t\t\t\t\t\tqueue.add(addNode);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tList<GeographicPoint> temp = path.get(neighbours.get(edge));\n\t\t\t\t\t\t\ttemp.add(currNode.getLocation());\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\tSystem.out.println(\"Dijkstra: \" + count);\n\t\treturn backTrack(path,goal);\n\t}", "public static void computePaths(Vertex source){\n\t\tsource.minDistance=0;\n\t\t//visit each vertex u, always visiting vertex with smallest minDistance first\n\t\tPriorityQueue<Vertex> vertexQueue=new PriorityQueue<Vertex>();\n\t\tvertexQueue.add(source);\n\t\twhile(!vertexQueue.isEmpty()){\n\t\t\tVertex u = vertexQueue.poll();\n\t\t\tSystem.out.println(\"For: \"+u);\n\t\t\tfor (Edge e: u.adjacencies){\n\t\t\t\tVertex v = e.target;\n\t\t\t\tSystem.out.println(\"Checking: \"+u+\" -> \"+v);\n\t\t\t\tdouble weight=e.weight;\n\t\t\t\t//relax the edge (u,v)\n\t\t\t\tdouble distanceThroughU=u.minDistance+weight;\n\t\t\t\tif(distanceThroughU<v.minDistance){\n\t\t\t\t\tSystem.out.println(\"Updating minDistance to \"+distanceThroughU);\n\t\t\t\t\tv.minDistance=distanceThroughU;\n\t\t\t\t\tv.previous=u;\n\t\t\t\t\t//move the vertex v to the top of the queue\n\t\t\t\t\tvertexQueue.remove(v);\n\t\t\t\t\tvertexQueue.add(v);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static void shortestPath(Map<Integer, DistanceInfo> distanceTable,\n int source, int destination)\n {\n // Backtrack using a stack, using the destination node\n Stack<Integer> stack = new Stack<>();\n stack.push(destination);\n\n // Backtrack by getting the previous node of every node and putting it on the stack.\n // Start at the destination.\n int previousVertex = distanceTable.get(destination).getLastVertex();\n while (previousVertex != -1 && previousVertex != source)\n {\n stack.push(previousVertex);\n previousVertex = distanceTable.get(previousVertex).getLastVertex();\n }\n\n if (previousVertex ==-1)\n {\n System.err.println(\"No path\");\n }\n else\n {\n System.err.println(\"Shortest path: \");\n while (! stack.isEmpty())\n {\n System.err.println(stack.pop());\n }\n }\n }", "@Override\r\n\tpublic void Dijkstra(E src) {\r\n\t\tPriorityQueue<Vertex<E>> pq = new PriorityQueue<Vertex<E>>();\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tlastSrc = vertices.get(src);\r\n\t\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\t\tu.setDistance(Integer.MAX_VALUE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t\tpq.offer(u);\r\n\t\t\t});\r\n\t\t\tpq.remove(lastSrc);\r\n\t\t\tlastSrc.setDistance(0);\r\n\t\t\tpq.offer(lastSrc);\r\n\t\t\twhile(!pq.isEmpty()) {\r\n\t\t\t\tVertex<E> u = pq.poll();\r\n\t\t\t\tfor(Edge<E> ale : adjacencyLists.get(u.getElement())) {\r\n\t\t\t\t\tVertex<E> s = vertices.get(ale.getSrc());\r\n\t\t\t\t\tVertex<E> d = vertices.get(ale.getDst());\r\n\t\t\t\t\tif(d.getDistance() > (long)s.getDistance() + (long)ale.getWeight()) {\r\n\t\t\t\t\t\tpq.remove(ale.getDst());\r\n\t\t\t\t\t\td.setDistance(s.getDistance() + ale.getWeight());\r\n\t\t\t\t\t\td.setPredecessor(s);\r\n\t\t\t\t\t\tpq.offer(d);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void findShortestPathHeap( Graph gr,String sourceName, String destName)\n {\n \tint vertex_size = gr.vertexMap.values().size();\n \tHeapImpl mh = new HeapImpl(vertex_size);\n Vertex v = getVertex( sourceName );\n Vertex processing;\n for(Vertex ver: gr.vertexMap.values()){\n \tver.reset();\n }\n v.dist=0;\n v.prev=null;\n mh.insert(v);\n while (mh!=null && !mh.isEmpty()){\n \t processing= mh.HeapExtractMin();\n \t if(processing.dist==Integer.MAX_VALUE){\n \t\t break;\n \t }\n \t for(Edge adjEdge: processing.adjEdge.values()){\n \t\t \n \t\t if(!adjEdge.isDown && !adjEdge.adjVertex.isDown ){\n \t\t\t if(adjEdge.adjVertex.dist>(processing.dist+adjEdge.dist)){\n \t\t\t\t //Q.delete(adjEdge.adjVertex);\n \t\t\t\t adjEdge.adjVertex.dist= processing.dist+adjEdge.dist;\n \t\t\t\t adjEdge.adjVertex.prev=processing;\n \t\t\t\t if(adjEdge.adjVertex.vertexPosition==0)\n \t\t\t\t\t adjEdge.adjVertex.vertexPosition= mh.insert( adjEdge.adjVertex);\n \t\t\t\t else\n \t\t\t\t\t mh.decreaseKey(adjEdge.adjVertex.vertexPosition-1, adjEdge.adjVertex);\n \t\t\t\t \n \t\t\t }\n \t\t }\n \t\t \n \t\t \n \t }\n }\n }", "public static void djikstra(int[][] graph, int src) {\n\t\t/* output array */\n\t\tint[] dist = new int[graph.length];\n\t\tboolean[] visited = new boolean[graph.length];\n\n\t\tfor (int i = 0; i < graph.length; i++) {\n\t\t\tdist[i] = Integer.MAX_VALUE;\n\t\t\tvisited[i] = false;\n\t\t}\n\n\t\tdist[src] = 0;\n\n\t\tfor (int i = 0; i < graph.length - 1; i++) {\n\n\t\t\t// Pick the minimum distance vertex from the set of vertices not\n\t\t\t// yet processed. u is always equal to src in first iteration.\n\t\t\tint u = findMinDistanceVertex(dist, visited);\n\t\t\t// Mark the picked vertex as processed\n\t\t\tvisited[u] = true;\n\t\t\t\n\t\t\tfor(int j = 0; j < graph.length; j++) {\n\t\t\t\t\n\t\t\t\t// Update dist[v] only if is not in sptSet, there is an edge from \n\t\t // u to v, and total weight of path from src to v through u is \n\t\t // smaller than current value of dist[v]\n\t\t\t\tif(!visited[j] && graph[u][j] != 0\n\t\t\t\t\t\t&& dist[u] != Integer.MAX_VALUE\n\t\t\t\t\t\t&& dist[u] + graph[u][j] < dist[j]) {\n\t\t\t\t\tdist[j] = dist[u] + graph[u][j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tprintSolution(dist, graph.length);\n\t}", "@Test\n void testShortestPathDist(){\n weighted_graph g = new WGraph_DS();\n for(int i = 1; i <= 7; i++){\n g.addNode(i);\n }\n g.connect(1,2,20);\n g.connect(1,5,15);\n g.connect(2,3,20);\n g.connect(5,6,15);\n g.connect(3,4,20);\n g.connect(6,4,15);\n g.connect(1,7,2);\n g.connect(7,4,50);\n weighted_graph_algorithms ga = new WGraph_Algo();\n ga.init(g);\n assertTrue(Double.compare(45,ga.shortestPathDist(1,4)) == 0);\n assertEquals(0,ga.shortestPathDist(1,1));\n assertEquals(-1,ga.shortestPathDist(1,200));\n }", "private double dijkstraSingleTarget(Map<Integer, List<Node>> graph, int vertices, int source, int target) {\n Queue<Node> minHeap = new PriorityQueue<>(\n Comparator.comparingDouble(a -> a.weight)\n );\n\n double[] dist = new double[vertices + 1]; //shortest distance for each vertex\n Arrays.fill(dist, 0.0);\n\n boolean visited[] = new boolean[vertices + 1];\n\n // Distance for starting node is 0\n dist[source] = -1;\n minHeap.add((new Node(-1,source)));\n\n while (!minHeap.isEmpty()) {\n Node topPair = minHeap.remove();\n int currNode = topPair.vertex;\n double currDistance = topPair.weight;\n\n if (!graph.containsKey(currNode)) {\n continue;\n }\n\n if (visited[currNode]) continue;\n visited[currNode] = true;\n\n\n for (Node edge : graph.get(currNode)) {\n double weight = edge.weight;\n int neighborNode = edge.vertex;\n double nextDist = currDistance * weight;\n\n if (!visited[neighborNode] && nextDist < dist[neighborNode]) {\n dist[neighborNode] = nextDist;\n minHeap.add((new Node(nextDist, neighborNode)));\n\n }\n\n }\n\n\n }\n\n return -dist[target];\n }", "public ShortestPathMatrix<V,E> allPairsShortestPaths();", "@Nullable\n private NodeWithCost<V, A> findShortestPath(@Nonnull DirectedGraph<V, A> graph,\n V start, V goal, @Nonnull ToDoubleFunction<A> costf) {\n PriorityQueue< NodeWithCost<V, A>> frontier = new PriorityQueue<>(61);\n Map<V, NodeWithCost<V, A>> frontierMap = new HashMap<>(61);\n // Size of explored is the expected number of nextArrows that we need to explore.\n Set<V> explored = new HashSet<>(61);\n return doFindShortestPath(start, frontier, frontierMap, goal, explored, graph, costf);\n }", "public ArrayList<Integer> path2Dest(int s, int t, int k, int method){\n double INFINITY = Double.MAX_VALUE;\n boolean[] SPT = new boolean[intersection];\n double[] d = new double[intersection];\n int[] parent = new int[intersection];\n\n for (int i = 0; i <intersection ; i++) {\n d[i] = INFINITY;\n parent[i] = -1;\n }\n d[s] = 0;\n\n MinHeap minHeap = new MinHeap(k);\n for (int i = 0; i <intersection ; i++) {\n minHeap.add(i,d[i]);\n }\n while(!minHeap.isEmpty()){\n int extractedVertex = minHeap.extractMin();\n\n if(extractedVertex==t) {\n break;\n }\n SPT[extractedVertex] = true;\n\n LinkedList<Edge> list = g.adjacencylist[extractedVertex];\n for (int i = 0; i <list.size() ; i++) {\n Edge edge = list.get(i);\n int destination = edge.destination;\n if(SPT[destination]==false ) {\n double newKey =0;\n double currentKey=0;\n if(method==1) { //method 1\n newKey = d[extractedVertex] + edge.weight;\n currentKey = d[destination];\n }\n else{ //method 2\n newKey = d[extractedVertex] + edge.weight + coor[destination].distTo(coor[t])-coor[extractedVertex].distTo(coor[t]);\n currentKey = d[destination];\n }\n if(currentKey>=newKey){\n if(currentKey==newKey){ //if equal need to compare the value of key\n if(extractedVertex<parent[destination]){\n minHeap.updateKey(newKey, destination, d[destination]);\n parent[destination] = extractedVertex;\n d[destination] = newKey;\n }\n }\n else {\n minHeap.updateKey(newKey, destination, d[destination]);\n parent[destination] = extractedVertex;\n d[destination] = newKey;\n }\n }\n }\n }\n }\n //trace back the path using parent properties\n ArrayList<Integer> path = new ArrayList<>();\n if(parent[t]!=-1){\n path.add(t);\n while(parent[t]!= s) {\n path.add(0,parent[t]);\n t = parent[t];\n }\n path.add(0,s);\n }\n else\n path = null;\n return path;\n }", "private double dijkstrasAlgo(String source, String dest) {\r\n\r\n\t\tclearAll(); // running time: |V|\r\n\t\tint count = 0; // running time: Constant\r\n\t\tfor (Vertex v : vertexMap.values()) // running time: |V|\r\n\t\t\tif (v.isStatus())\r\n\t\t\t\tcount++;\r\n\r\n\t\tVertex[] queue = new Vertex[count]; // running time: Constant\r\n\t\tVertex start = vertexMap.get(source); // running time: Constant\r\n\t\tstart.dist = 0; // running time: Constant\r\n\t\tstart.prev = null; // running time: Constant\r\n\r\n\t\tint index = 0; // running time: Constant\r\n\t\tfor (Vertex v : vertexMap.values()) { // running time: |V|\r\n\t\t\tif (v.isStatus()) {\r\n\t\t\t\tqueue[index] = v;\r\n\t\t\t\tv.setHandle(index);\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbuildMinHeap(queue, count); // running time: |V|\r\n\r\n\t\twhile (count != 0) { // running time: |V|\r\n\t\t\tVertex min = extractMin(queue, count); // running time: log |V|\r\n\t\t\tcount--; // running time: Constant\r\n\r\n\t\t\tfor (Iterator i = min.adjacent.iterator(); i.hasNext();) { // running time: |E|\r\n\t\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\t\tif (edge.isStatus()) {\r\n\t\t\t\t\tVertex adjVertex = vertexMap.get(edge.getDestination());\r\n\t\t\t\t\tif (adjVertex.dist > (min.dist + edge.getCost()) && adjVertex.isStatus()) {\r\n\t\t\t\t\t\tadjVertex.dist = (min.dist + edge.getCost());\r\n\t\t\t\t\t\tadjVertex.prev = min;\r\n\t\t\t\t\t\tint pos = adjVertex.getHandle();\r\n\t\t\t\t\t\tHeapdecreaseKey(queue, pos, adjVertex); // running time: log |V|\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn vertexMap.get(dest).dist; // running time: Constant\r\n\t}", "private int[] runDijkstra(int graph[][], int source) {\r\n\r\n // Stores the best estimate of the shortest distance from\r\n // the source to each node \r\n int d[] = new int[graph.length];\r\n \r\n // Initialized with infinite value.\r\n // Value of -1 means the node has been settled \r\n int dC[] = new int[graph.length];\r\n \r\n // Stores the predecessor of each node on the shortest path \r\n // from the source\r\n int p[] = new int[graph.length];\r\n\r\n // Initialize\r\n for (int i = 0; i < graph.length; i++ ) {\r\n d[i] = this.INFINITE;\r\n dC[i] = this.INFINITE;\r\n p[i] = -1;\r\n }\r\n \r\n // We start knowning the distance of the source from itself (zero)\r\n d[source] = 0;\r\n dC[source] = 0;\r\n\r\n int i = 0;\r\n int min = this.INFINITE;\r\n int pos = 0;\r\n\r\n while (i < graph.length) {\r\n //extract minimum distance\r\n for (int j = 0; j < dC.length; j++ ){\r\n if( min > d[j] && dC[j] != -1 ){\r\n min = d[j];\r\n pos = j;\r\n }\r\n }\r\n // This node is settled\r\n dC[pos] = -1;\r\n\r\n // relax its neighbours\r\n for (int j = 0; j < graph.length; j++ ) {\r\n if ( (graph[pos][j] != -1) && (d[j] > graph[pos][j] + d[pos]) ) {\r\n d[j] = graph[pos][j] + d[pos];\r\n p[j] = pos;\r\n }\r\n }\r\n i++;\r\n min = this.INFINITE;\r\n }\r\n\r\n return p;\r\n }", "public void shortestPathsNodes() {\n for (int sourceNode = 0; sourceNode < wordGraph.V(); sourceNode++) {\n BreadthFirstDirectedPaths bfs = new BreadthFirstDirectedPaths(wordGraph, sourceNode);\n\n for (int goalNode = 0; goalNode < wordGraph.V(); goalNode++) {\n Iterable<Integer> shortestPath = bfs.pathTo(goalNode);\n int pathLength = -1;\n if (shortestPath != null) {\n for (int edge : shortestPath) {\n pathLength++;\n }\n }\n if (pathLength != -1) {\n }\n System.out.println(pathLength);\n }\n }\n }", "public void findShortestPath() {\r\n\t\t\r\n\t\t//Create a circular array that will store the possible next tiles in the different paths.\r\n\t\tOrderedCircularArray<MapCell> path = new OrderedCircularArray<MapCell>();\r\n\t\t\r\n\t\t//Acquire the starting cell.\r\n\t\tMapCell starting = cityMap.getStart();\r\n\t\t\r\n\t\t//This variable is to be updated continuously with the cell with the shortest distance value in the circular array.\r\n\t\tMapCell current=null;\r\n\t\t\r\n\t\t//This variable is to check if the destination has been reached, which is initially false.\r\n\t\tboolean destination = false;\r\n\t\t\r\n\t\t//Add the starting cell into the circular array, and mark it in the list.\r\n\t\tpath.insert(starting, 0);\r\n\t\t\r\n\t\tstarting.markInList(); \r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//As long as the circular array isn't empty, and the destination hasn't been reached, run this loop.\r\n\t\t\twhile(!path.isEmpty()&&!destination) {\r\n\t\t\t\t\r\n\t\t\t\t//Take the cell with the shortest distance out of the circular array, and mark it accordingly.\r\n\t\t\t\tcurrent = path.getSmallest();\r\n\t\t\t\tcurrent.markOutList();\r\n\t\t\t\t\r\n\t\t\t\tMapCell next;\r\n\t\t\t\tint distance;\r\n\t\t\t\t\r\n\t\t\t\tif(current.isDestination()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tdestination = true; //If the current cell is the destination, end the loop.\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t\tnext = nextCell(current); //Acquire the next possible neighbour of the current cell.\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Don't run if next is null, meaning there is no other possible neighbour in the path for the current cell.\r\n\t\t\t\t\twhile(next!=null) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = current.getDistanceToStart() + 1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//If the distance of the selected neighbouring cell is currently more than 1 more than the current cell's \r\n\t\t\t\t\t\t//distance, update the distance of the neighbouring cell. Then, set the current cell as its predecessor.\r\n\t\t\t\t\t\tif(next.getDistanceToStart()>distance) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tnext.setDistanceToStart(distance);\r\n\t\t\t\t\t\t\tnext.setPredecessor(current);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = next.getDistanceToStart(); \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(next.isMarkedInList() && distance<path.getValue(next)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.changeValue(next, distance); //If the neighbouring cell is in the circular array, but with a \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //larger distance value than the new updated distance, change its value.\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else if(!next.isMarkedInList()){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.insert(next, distance); //If the neighbouring cell isn't in the circular array, add it in.\r\n\t\t\t\t\t\t\tnext.markInList();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tnext = nextCell(current); //Look for the next possible neighbour, if any.\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}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Catch all the possible exceptions that might be thrown by the method calls. Print the appropriate messages.\r\n\t\t} catch (EmptyListException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidNeighbourIndexException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"The program tried to access an invalid neighbour of a tile.\");\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidDataItemException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage()+\" Path finding execution has stopped.\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//If a path was found, print the number of tiles in the path.\r\n\t\tif(destination) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Number of tiles in path: \" + (current.getDistanceToStart()+1));\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"No path found.\"); //Otherwise, indicate that a path wasn't found.\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "void shortestPath( final VertexType fromNode, Integer node );", "private void computePaths(Vertex source, Vertex target, ArrayList<Vertex> vs)\n {\n \tfor (Vertex v : vs)\n \t{\n \t\tv.minDistance = Double.POSITIVE_INFINITY;\n \t\tv.previous = null;\n \t}\n source.minDistance = 0.;\t\t// distance to self is zero\n IndexMinPQ<Vertex> vertexQueue = new IndexMinPQ<Vertex>(vs.size());\n \n for (Vertex v : vs) vertexQueue.insert(Integer.parseInt(v.id), v);\n\n\t\twhile (!vertexQueue.isEmpty()) \n\t\t{\n\t \t// retrieve vertex with shortest distance to source\n\t \tVertex u = vertexQueue.minKey();\n\t \tvertexQueue.delMin();\n\t\t\tif (u == target)\n\t\t\t{\n\t\t\t\t// trace back\n\t\t\t\twhile (u.previous != null)\n\t\t\t\t{;\n\t\t\t\t\tu = u.previous;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n \t// Visit each edge exiting u\n \tfor (Edge e : u.adjacencies)\n \t\t{\n \t\tVertex v = e.target;\n\t\t\t\tdouble weight = e.weight;\n \tdouble distanceThroughU = u.minDistance + weight;\n\t\t\t\tif (distanceThroughU < v.minDistance) \n\t\t\t\t{\n\t\t\t\t\tint vid = Integer.parseInt(v.id);\n\t\t \t\tvertexQueue.delete(vid);\n\t\t \t\tv.minDistance = distanceThroughU;\n\t\t \t\tv.previous = u;\n\t\t \t\tvertexQueue.insert(vid,v);\n\t\t\t\t}\n\t\t\t}\n }\n }", "public void dijkstra(List<List<Node> > adj, int src){ \n this.adj = adj; \n \n for (int i = 0; i < V; i++) \n dist[i] = Integer.MAX_VALUE; \n \n // Add source node to the priority queue \n pq.add(new Node(src, 0)); \n \n // Distance to the source is 0 \n dist[src] = 0; \n while (settled.size() != V) { \n \n // remove the minimum distance node from the priority queue \n int u = pq.remove().node; \n \n // adding the node whose distance is finalized \n settled.add(u); \n \n e_Neighbours(u); \n } \n }", "public void shortestPaths(int source) {\n\n\t\tlong start = 0;\n\t\tlong stop;\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tedgeList[v] = new Edge(vertexList[v].id, rand, 5000);\n\t\t}\n\t\t// creating object of fibonacci\n\t\tFHeap pq = new FHeap();\n\t\t// creating a map for checking\n\t\tMap<Integer, FHeap.Node> check = new HashMap<Integer, FHeap.Node>();\n\t\t// storing the mst costs\n\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tcheck.put(vertexList[v].id,\n\t\t\t\t\tpq.enqueue(vertexList[v].id, Double.POSITIVE_INFINITY));\n\t\t}\n\t\tstart = System.currentTimeMillis();\n\t\t// allot cost 0 to initial node\n\t\tpq.decreaseKey(check.get(vertexList[source].id), 0.0);\n\n\t\twhile (!pq.isEmpty()) {\n\t\t\t// take the current node and get its minimum cost\n\t\t\tFHeap.Node current = pq.dequeueMin();\n\n\t\t\t// store the values in the table\n\t\t\tresult.put(current.getValue(), current.getCost());\n\n\t\t\t// update the costs\n\t\t\tfor (Neighbor nbr = vertexList[current.getValue()].adjList; nbr != null; nbr = nbr.next) {\n\n\t\t\t\t// edge is not added if shortest cost is known\n\t\t\t\tif (result.containsKey(vertexList[nbr.vertexNumber].id))\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// update cost to shortest\n\t\t\t\tFHeap.Node finalCost = check\n\t\t\t\t\t\t.get(vertexList[nbr.vertexNumber].id);\n\t\t\t\tif (nbr.weight < finalCost.getCost())\n\t\t\t\t\tpq.decreaseKey(finalCost, nbr.weight);\n\t\t\t}\n\t\t}\n\t\tstop = System.currentTimeMillis();\n\t\t// computing the time\n\t\ttime = stop - start;\n\n\t\t// calculate the MST cost\n\t\tfor (int i = 0; i < vertexList.length; i++) {\n\t\t\tsumHeapCost = (int) (sumHeapCost + result.get(i));\n\t\t}\n\t\t// for printing in case of input from file in fibonacci mode\n\t\n\t\t// System.out.println(sumHeapCost);\n\t}", "public Queue<Station> approxShortestPath(Station start, Station end)\n {\n //Create a hash from station IDs to extra data needed for this algorithm.\n HashMap<String, ApproxSearchExtra> station_extras =\n new HashMap<String, ApproxSearchExtra>();\n for (Station station : getStations())\n station_extras.put(station.getId(), new ApproxSearchExtra());\n\n HashSet<Station> closed = new HashSet<Station>();\n HashSet<Station> open = new HashSet<Station>();\n open.add(start);\n\n while (open.size() > 0)\n {\n //Current is the item in the open set with the lowest estimated cost.\n Station current = null;\n ApproxSearchExtra current_extra = null;\n for (Station element : open)\n {\n if (current == null && current_extra == null)\n {\n current = element;\n current_extra = station_extras.get(element.getId());\n }\n else\n {\n ApproxSearchExtra extra = station_extras.get(element.getId());\n if (extra.estimated_cost < current_extra.estimated_cost)\n {\n current = element;\n current_extra = extra;\n }\n }\n }\n\n //If the current station is the end station, then we're done.\n if (current == end)\n return buildApproxShortestPathResult(end, station_extras);\n\n //Station is no longer in the open set and is now in the closed set\n //because it was traversed.\n open.remove(current);\n closed.add(current);\n\n for (Station neighbour : getAdjacentStations(current))\n {\n //Do nothing if neighbour is already in the closed set.\n if (closed.contains(neighbour))\n continue;\n\n ApproxSearchExtra neighbour_extra =\n station_extras.get(neighbour.getId());\n\n //Cost of movement to this neighbour.\n float attempt_cost = current_extra.cost + current.distance(neighbour);\n\n //If not in the open set, add the neighbour to the open set so that it\n //will be traversed later.\n if (!open.contains(neighbour))\n open.add(neighbour);\n //If this path is more costly than another path to this station, then\n //this path cannot be optimal.\n else if (attempt_cost >= neighbour_extra.cost)\n continue;\n\n //This is now the best path to this neighbour. Store this information.\n neighbour_extra.came_from = current;\n neighbour_extra.cost = attempt_cost;\n neighbour_extra.estimated_cost = attempt_cost +\n neighbour.distance(end);\n }\n }\n\n return null;\n }", "public static ArrayList<edges<String, Double>> Dijkstra(String CHAR1, String CHAR2, graph<String,Float> g) {\n\t\tPriorityQueue<ArrayList<edges<String, Double>>> active = \n\t\t\tnew PriorityQueue<ArrayList<edges<String, Double>>>(10,new Comparator<ArrayList<edges<String, Double>>>() {\n\t\t\t\tpublic int compare(ArrayList<edges<String, Double>> path1, ArrayList<edges<String, Double>> path2) {\n\t\t\t\t\tedges<String, Double> dest1 = path1.get(path1.size() - 1);\n\t\t\t\t\tedges<String, Double> dest2 = path2.get(path2.size() - 1);\n\t\t\t\t\tif (!(dest1.getLabel().equals(dest2.getLabel())))\n\t\t\t\t\t\treturn dest1.getLabel().compareTo(dest2.getLabel());\n\t\t\t\t\treturn path1.size() - path2.size();\n\t\t\t\t}\n\t\t\t});\n\t\t\tSet<String> known = new HashSet<String>();\n\t\t\tArrayList<edges<String, Double>> begin = new ArrayList<edges<String, Double>>();\n\t\t\tbegin.add(new edges<String, Double>(CHAR1, 0.0));\n\t\t\tactive.add(begin);\t\t\n\t\t\twhile (!active.isEmpty()) {\n\t\t\t\tArrayList<edges<String, Double>> minPath = active.poll();\n\t\t\t\tedges<String, Double> endOfMinPath = minPath.get(minPath.size() - 1);\n\t\t\t\tString minDest = endOfMinPath.getDest();\n\t\t\t\tdouble minCost = endOfMinPath.getLabel();\n\t\t\t\tif (minDest.equals(CHAR2)) {\n\t\t\t\t\treturn minPath;\n\t\t\t\t}\n\t\t\t\tif (known.contains(minDest))\n\t\t\t\t\tcontinue;\n\t\t\t\tSet<edges<String,Float>> children = g.childrenOf(minDest);\n\t\t\t\tfor (edges<String, Float> e : children) {\n\t\t\t\t\tif (!known.contains(e.getDest())) {\n\t\t\t\t\t\tdouble newCost = minCost + e.getLabel();\n\t\t\t\t\t\tArrayList<edges<String, Double>> newPath = new ArrayList<edges<String, Double>>(minPath); \n\t\t\t\t\t\tnewPath.add(new edges<String, Double>(e.getDest(), newCost));\n\t\t\t\t\t\tactive.add(newPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tknown.add(minDest);\n\t\t\t}\n\t\t\treturn null;\n\t}", "private static void findShortestPath(ArrayList<WeightedEdge> edges, int start, int dest, int nNodes) {\n int costs[] = new int[nNodes];\n int parents[] = new int[nNodes];\n boolean doneWithNode[] = new boolean[nNodes];\n\n // cost[i] has the cost of getting to node number i or is UNKNOWN if no cost figure out yet.\n // parent[i] contains the parent (or the way) we got to node i.\n // done[i] is true if we've already worked on all the children of node i.\n\n // Initialize the arrays.\n for (int i = 0; i<nNodes; i++) {\n costs[i] = UNKNOWN;\n parents[i] = UNKNOWN;\n doneWithNode[i] = false;\n }\n\n int node = start; // This is the node we are working on. Let's start with start node.\n costs[node] = 0; // The cost of getting to the start node is 0!\n\n // While not done processing all the nodes...\n\n // Loop through all the edges (edges array list).\n // Skip those edges whose source is doesn't match the node we're working on.\n\n // For edge (that has source of current node) figure out potential to\n // get it. (How much does it cost to get to node we're on? Add to\n // that the cost of the edge. That's the new price to set to dest of edge.\n\n // Is that a new low cost for that dest edge node?\n // Or is the dest edge node cost currently UNKNOWN? That means we have no cost.\n // If so, store the cost. Store the parent.\n\n // Once done with all the edges, mark the current node as\n // done being processed.\n doneWithNode[node] = true;\n\n // Get next node to work on.\n node = getLowestCostUnprocessedNode(costs, doneWithNode);\n\n // Done with while loop\n\n for (int i=0; i<parents.length; i++) {\n System.out.println(\"Node: \" + i + \" Cost: \" + costs[i] + \" Backtrace Parent: \" + parents[i]);\n }\n\n backtrace(dest, parents);\n }", "private void calculate() {\n\t\tList<Edge> path = new ArrayList<>();\n\t\tPriorityQueue<Vert> qv = new PriorityQueue<>();\n\t\tverts[s].dist = 0;\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tif (e.w==0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist < L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t} else if (verts[t].dist == L) {\n\t\t\tok = true;\n\t\t\tfor (int i=0; i<m; i++) {\n\t\t\t\tif (edges[i].w == 0) {\n\t\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// replace 0 with 1, adding to za list\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (edges[i].w == 0) {\n\t\t\t\tza[i] = true;\n\t\t\t\tedges[i].w = 1;\n\t\t\t} else {\n\t\t\t\tza[i] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// looking for shortest path from s to t with 0\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tif (i != s) {\n\t\t\t\tverts[i].dist = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tqv.clear();\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist > L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t}\n\t\tVert v = verts[t];\n\t\twhile (v.dist > 0) {\n\t\t\tlong minDist = MAX_DIST;\n\t\t\tVert vMin = null;\n\t\t\tEdge eMin = null;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(v.idx)];\n\t\t\t\tif (vo.dist+e.w < minDist) {\n\t\t\t\t\tvMin = vo;\n\t\t\t\t\teMin = e;\n\t\t\t\t\tminDist = vMin.dist+e.w;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tv = vMin;\t\n\t\t\tpath.add(eMin);\n\t\t}\n\t\tCollections.reverse(path);\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (za[i]) {\n\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tlong totLen=0;\n\t\tboolean wFixed = false;\n\t\tfor (Edge e : path) {\n\t\t\ttotLen += (za[e.idx] ? 1 : e.w);\n\t\t}\n\t\tfor (Edge e : path) {\n\t\t\tif (za[e.idx]) {\n\t\t\t\tif (!wFixed) {\n\t\t\t\t\te.w = L - totLen + 1;\n\t\t\t\t\twFixed = true;\n\t\t\t\t} else {\n\t\t\t\t\te.w = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tok = true;\n\t}", "public static Graph dijkstra(Graph graph, Node source) {\n source.distance = 0;\n Set<Node> settledNodes = new HashSet<>();\n Set<Node> unsettledNodes = new HashSet<>();\n unsettledNodes.add(source);\n \n while (unsettledNodes.size() != 0) {\n Node currentNode = Graph.getLowestDistanceNode(unsettledNodes);\n unsettledNodes.remove(currentNode);\n for (Map.Entry<Node, Integer> adjacencyPair: \n currentNode.adjacentNodes.entrySet()) {\n Node adjacentNode = adjacencyPair.getKey();\n Integer edgeWeight = adjacencyPair.getValue();\n if (!settledNodes.contains(adjacentNode)) {\n Graph.calculateMinimumDistance(adjacentNode, edgeWeight, currentNode);\n unsettledNodes.add(adjacentNode);\n }\n }\n settledNodes.add(currentNode);\n }\n return graph;\n }", "private String getShortestPath(final Pair<Long, Long> src, final Pair<Long, Long> dst,\n final String passCode, final boolean first) {\n final var queue = new LinkedList<Node>();\n final var seen = new HashSet<Node>();\n //start from source\n final var srcNode = new Node( src, \"\" );\n queue.add( srcNode );\n seen.add( srcNode );\n\n int max = 0;\n while ( !queue.isEmpty() ) {\n final var curr = queue.remove();\n if ( curr.pos.equals( dst ) ) {\n if ( first ) {\n //shortest path\n return curr.path;\n } else {\n //store path length\n max = curr.path.length();\n //stop this path\n }\n } else {\n for ( final var neighbour : getNeighbours( curr, passCode ) ) {\n //unseen neighbour\n if ( seen.add( neighbour ) ) {\n //add to the queue\n queue.add( neighbour );\n }\n }\n }\n }\n\n return itoa( max );\n }", "private int[] shrtst_Path_Dijkstra_Algo(int[][] matrx, int sNode, int[] forward_tab_dist, int[] list_Prevoius_Nodes) \n\t{\n\t\tArrayList<Integer> visitedNodes_M = new ArrayList<>(); //3. set of visited vertices is initially empty\n\t\tArrayList<Integer> unvisitedNodes_Q = new ArrayList<>(); //4. the queue initially contains all vertices\n\t\t\n\t\t//1. Distance to source vertex = 0\n\t\tforward_tab_dist[sNode] = 0;\n\n\t\t//2. Initialize: Set all other distances to infinity\n\t\tint k=0;\n\t\twhile(k < matrx.length)\n\t\t{\n\t\t\tunvisitedNodes_Q.add(k);\n\t\t\tif(k != sNode)\n\t\t\t{\n\t\t\t\tforward_tab_dist[k] = INFINITE_DIST;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\t\t\n\t\t//list of previous nodes, to traverse back\n\t\tlist_Prevoius_Nodes[sNode] = sNode;\n\t\t\n\t\t//5. While queue is not empty\n\t\twhile(!unvisitedNodes_Q.isEmpty())\n\t\t{\n\t\t\tint minDist = INFINITE_DIST;\n\t\t\tint u_minDistNode = -1;\n\t\t\t\n\t\t\t//6. select the element of Q with min distance\n\t\t\tint l = 0;\n\t\t\twhile(l < unvisitedNodes_Q.size())\n\t\t\t{\n\t\t\t\tint n = unvisitedNodes_Q.get(l);\n\t\t\t\tif(!(forward_tab_dist[n] <= minDist))\n\t\t\t\t{\n\t\t\t\t\tl++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tu_minDistNode = n;\n\t\t\t\t\tminDist = forward_tab_dist[n];\n\t\t\t\t}\n\t\t\t\tl++;\n\t\t\t}\n\t\t\t//No minimum distance node found then return\n\t\t\tif(u_minDistNode == -1)\n\t\t\t{\tbreak;\t}\n\t\t\t\n\t\t\t//7. add u to list of visited vertices\n\t\t\tvisitedNodes_M.add(u_minDistNode);\n\t\t\t\n\t\t\tint index = unvisitedNodes_Q.indexOf(u_minDistNode);\t//remove this node from unvisited nodes\n\t\t\tunvisitedNodes_Q.remove(index);\n\t\t\t\n\t\t\t//8.0 algo - consider neighbor as direct distance nodes except source\n\t\t\tfor(int v=0; v<matrx.length; v++)\n\t\t\t{\n\t\t\t\t//matrix[minDistNode_u][v] > 0 ensures it is not source node\n\t\t\t\t//unvisitedNodes_Q.contains(v) only check for unvisited nodes\n\t\t\t\t\n\t\t\t\tif(unvisitedNodes_Q.contains(v) && matrx[u_minDistNode][v] > 0)\n\t\t\t\t{\n\t\t\t\t\tint val = forward_tab_dist[u_minDistNode] + matrx[u_minDistNode][v];\n\t\t\t\t\tif(val < forward_tab_dist[v])\n\t\t\t\t\t{\n\t\t\t\t\t\t//stores shortest distance\n\t\t\t\t\t\tforward_tab_dist[v] = val;\n\t\t\t\t\t\t//stores last node for back traversal to find path\n\t\t\t\t\t\tlist_Prevoius_Nodes[v] = u_minDistNode;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn forward_tab_dist;\n\t}", "List<V> getShortestPath(V vertex);", "@Override\n public List<Node> findShortestPath(Node s, Node t)\n {\n nodeDists.clear(); //clear previously calculated distances\n\n recordNodeDistances(s, t); //record node distances to target\n\n LinkedList<Node> shortestPath = new LinkedList<Node>();\n\n shortestPath.addLast(s);\n\n boolean reachedEnd = false;\n\n if(s==t) reachedEnd = true; // \"That was easy\"\n\n while(!reachedEnd)\n {\n //get the neighbors from the most recent step on the path\n Collection<? extends Node> neighbors = shortestPath.getLast().getNeighbors();\n\n //minimum cost from neighbors\n Node minNode = null;\n\n for(Node n: neighbors)\n {\n if(minNode == null || nodeDists.get(n) < nodeDists.get(minNode))\n {\n minNode = n;\n\n if(nodeDists.get(n) == 0)\n {\n reachedEnd = true;\n break;\n }\n }\n }\n\n if(nodeDists.get(minNode) == Integer.MAX_VALUE) return null; //no path\n else shortestPath.addLast(minNode);\n }\n\n return shortestPath;\n }", "public ArrayQueue<T> getShortestPath(T vertex1, T vertex2){\n DijkstraShortestPath p = new DijkstraShortestPath(vertex1, vertex2);\n return p.getMinPath();\n }", "public Dijkstra(EdgeWeightedDigraph G, int s) {\r\n int V = G.V();\r\n distTo = new double[V];\r\n edgeTo = new DirectedEdge[V];\r\n distTo[0] = 0.0;\r\n for (int i = 1; i < V; i++) {\r\n distTo[i] = Double.POSITIVE_INFINITY;\r\n }\r\n pq.insert(s, 0.0);\r\n while (!pq.isEmpty()) {\r\n int v = pq.deleteMin();\r\n for (DirectedEdge e : G.adj(v)) {\r\n relax(e);\r\n }\r\n }\r\n }", "DijkstraSP(EdgeWeightedDigraph G, int s)\n\t{\n\t\tdistTo=new double[G.V()];\n\t\tedgeTo=new DirectedEdge[G.V()];\n\t\tpq=new IndexMinPQ<>(G.V());\n\t\tfor(int v=0;v<G.V();v++)\n\t\t\tdistTo[v]=Double.POSITIVE_INFINITY;\n\t\tdistTo[s]=0.0;\n\t\t\n\t\tpq.insert(s, 0.0);\n\t\twhile(!pq.isEmpty()) \n\t\t{\n\t\t\tint v=pq.delMin();\n\t\t\tfor(DirectedEdge e: G.adj(v))\n\t\t\t\trelax(e);\n\t\t}\n\t}", "@Override\n\tpublic double shortestPathDist(int src, int dest) {\n\t\tfor(node_data vertex : dwg.getV()) {\n\t\t\tvertex.setInfo(\"\"+Double.MAX_VALUE);\n\t\t}\n\t\tnode_data start = dwg.getNode(src);\n\t\tstart.setInfo(\"0.0\");\n\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\tq.add(start);\n\t\twhile(!q.isEmpty()) {\n\t\t\tnode_data v = q.poll();\n\t\t\tCollection<edge_data> edgesV = dwg.getE(v.getKey());\n\t\t\tfor(edge_data edgeV : edgesV) {\n\t\t\t\tdouble newSumPath = Double.parseDouble(v.getInfo()) +edgeV.getWeight();\n\t\t\t\tint keyU = edgeV.getDest();\n\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\tif(newSumPath < Double.parseDouble(u.getInfo())) {\n\t\t\t\t\tu.setInfo(\"\"+newSumPath);\n\t\t\t\t\tq.remove(u);\n\t\t\t\t\tq.add(u);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn Double.parseDouble(dwg.getNode(dest).getInfo());\n\t}", "public double shortestPathDist(int src, int dest);", "public List<PathResult> findShortestPathsToEveryNode(final String rootNode, final Graph graph) {\n final List<String> vertices = graph.getVertices();\n final List<String> visitedVertices = startingVisitedNodes(rootNode);\n final Map<String, DijkstraEntry> table = createInitialTable(rootNode, vertices);\n\n for (int i = 0; i < visitedVertices.size(); i++) {\n final String currentVertex = visitedVertices.get(i);\n final List<String> unvisitedAdjacentVertices = getUnvisitedAdjacentVertices(\n currentVertex,\n graph,\n visitedVertices);\n\n unvisitedAdjacentVertices.forEach(vertex -> {\n final DijkstraEntry previousNodeEntry = table.get(currentVertex);\n\n final Integer cost =\n graph.getWeight(currentVertex, vertex) + previousNodeEntry\n .getShortestDistance();\n\n final DijkstraEntry entry = table.get(vertex);\n final Integer currentShortestDistance = entry.getShortestDistance();\n\n if (Objects.isNull(currentShortestDistance) || cost < currentShortestDistance) {\n final DijkstraEntry updatedEntry = entry.withDistance(cost)\n .withPreviousVertex(currentVertex);\n table.put(vertex, updatedEntry);\n }\n });\n\n final String unvisitedWithSmallestDistance = unvisitedWithSmallestDistance(\n unvisitedAdjacentVertices, table);\n\n if (unvisitedAdjacentVertices.isEmpty()) {\n break;\n }\n visitedVertices.add(unvisitedWithSmallestDistance);\n }\n\n return createPathResultsFromTable(rootNode, table, vertices);\n }", "public void calcSP(Graph g, Vertex source){\n // Algorithm:\n // 1. Take the unvisited node with minimum weight.\n // 2. Visit all its neighbours.\n // 3. Update the distances for all the neighbours (In the Priority Queue).\n // Repeat the process till all the connected nodes are visited.\n\n // clear existing info\n// System.out.println(\"Calc SP from vertex:\" + source.name);\n g.resetMinDistance();\n source.minDistance = 0;\n PriorityQueue<Vertex> queue = new PriorityQueue<Vertex>();\n queue.add(source);\n\n while(!queue.isEmpty()){\n Vertex u = queue.poll();\n for(Edge neighbour:u.neighbours){\n// System.out.println(\"Scanning vector: \"+neighbour.target.name);\n Double newDist = u.minDistance+neighbour.weight;\n\n // get new shortest path, empty existing path info\n if(neighbour.target.minDistance>newDist){\n // Remove the node from the queue to update the distance value.\n queue.remove(neighbour.target);\n neighbour.target.minDistance = newDist;\n\n // Take the path visited till now and add the new node.s\n neighbour.target.path = new ArrayList<>(u.path);\n neighbour.target.path.add(u);\n// System.out.println(\"Path\");\n// for (Vertex vv: neighbour.target.path) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n\n// System.out.println(\"Paths\");\n neighbour.target.pathCnt = 0;\n neighbour.target.paths = new ArrayList<ArrayList<Vertex>>();\n if (u.paths.size() == 0) {\n ArrayList<Vertex> p = new ArrayList<Vertex>();\n p.add(u);\n neighbour.target.paths.add(p);\n neighbour.target.pathCnt++;\n } else {\n for (ArrayList<Vertex> p : u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n// for (Vertex vv : p1) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n }\n\n //Reenter the node with new distance.\n queue.add(neighbour.target);\n }\n // get equal cost path, add into path list\n else if (neighbour.target.minDistance == newDist) {\n queue.remove(neighbour.target);\n for(ArrayList<Vertex> p: u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n queue.add(neighbour.target);\n }\n }\n }\n }", "public int[] djekstra(Router root, Router destination){\n //if router and destination same\n if (root.getID() == destination.getID()){\n int[] result = new int[2];\n result[0] = root.getID();\n result[1] = 0;\n hops.add(0);\n return result;\n }\n\n //Storing shortest path currently known\n int[] shortestPath = new int[size];\n //Storing the weights of the current router's connection to neighbors\n int[] currentNeighborConnectionWeight = new int[size];\n\n //First set all of the positions to 9999 (pseudo infinity)\n for (int i = 0; i < shortestPath.length;i++){\n shortestPath[i] = 9999;\n }\n\n // Set the distance to itself as 0, mark as visited\n shortestPath[root.getID()-1] = 0;\n root.visit();\n\n //For each connection the root has, set the shortestPath available to the weight to the neighbor\n for (Connection c : root.getConnections()){\n shortestPath[c.getDestination().getID()-1] = c.getWeight();\n }\n\n //Find the smallest router to start the algorithm\n //ID of smallest router, start the value with the first available option\n int smallestRouterID = 0;\n int smallestRouterWeight = 9999;\n //Router used for iterating\n Router current = null;\n //Storing path length\n int totalPathLength = 0;\n\n\n //Find the shortest available path link to start with\n for (int k = 0; k < shortestPath.length; k++){\n if ((shortestPath[k] < smallestRouterWeight) && (shortestPath[k] != 0)){\n // Check to see if dead end\n if (routers.get(k).getConnections().size() > 1){\n // id is pos+1\n smallestRouterID = k + 1;\n smallestRouterWeight = shortestPath[k];\n } else if (routers.get(k).getID() == destination.getID()){ //edge case\n // id is pos+1\n smallestRouterID = k + 1;\n smallestRouterWeight = shortestPath[k];\n }\n }\n }\n // add its weight\n totalPathLength += smallestRouterWeight;\n\n //This is where we start our first step\n current = getRouter(smallestRouterID);\n hops.add(current.getID());\n current.visit();\n //System.out.println(\"First step--> Router:\" + smallestRouterID + \" Weight to router from root:\" + smallestRouterWeight);\n //Now we loop\n Router firstRouter = current;\n boolean done = false;\n while (done == false){\n //Break case 1, we found the router\n if (current.getID() == destination.getID()){\n // check if root has available connections\n\n // set current to root and store totalPathLength to new variable && store hops in new array ArrayList\n // compare totals and store the one that's lower ++ hops list too\n // could we recursively call djekstra?\n done = true;\n // System.out.println(\"Router found\");\n break;\n }\n\n //Break case 2, all of the connections have been visited already\n boolean destinationAvailable = hasAvailableConnections(current);\n if (destinationAvailable == false){\n if(hasAvailableConnections(root)){\n current = root;\n hops.clear();\n totalPathLength= 0;\n } else {\n done = true;\n // System.out.println(\"v-- No more routers available\");\n break;\n }\n }\n\n //set all to 9999 to assume we cant see\n for (int a = 0; a < currentNeighborConnectionWeight.length; a++){\n currentNeighborConnectionWeight[a] = 9999;\n }\n\n //Recalculate for new path lengths\n for (Connection c : current.getConnections()){\n //Only calculate path for routers that havent been visited\n if (c.getDestination().getVisit() == false){\n currentNeighborConnectionWeight[c.getDestination().getID()-1] = c.getWeight();\n }\n }\n\n //Find the next step to take\n //Find the shortest available path link to start with\n smallestRouterID = 0;\n smallestRouterWeight = 9999;\n for (int b = 0; b < currentNeighborConnectionWeight.length; b++){\n if ((currentNeighborConnectionWeight[b] < smallestRouterWeight)){\n // id is pos+1\n smallestRouterID = b + 1;\n smallestRouterWeight = currentNeighborConnectionWeight[b];\n }\n }\n\n // add its weight\n totalPathLength += smallestRouterWeight;\n current = getRouter(smallestRouterID);\n hops.add(current.getID());\n current.visit();\n // System.out.println(\"Next shortest path--> Router: \" + current.getID() + \" Length from root:\" + totalPathLength);\n\n\n } // <--------------------------------------------------------------------------------End of while loop\n\n // returns <lasthop, pathcost>\n int[] result = new int[2];\n //Check and see if the path length is smaller then the original\n if (totalPathLength <= shortestPath[destination.getID()-1]){\n //System.out.println(\"Case new \" + firstRouter.getID());\n shortestPath[destination.getID()-1] = totalPathLength;\n result[0] = firstRouter.getID();\n result[1] = shortestPath[destination.getID()-1];\n } else {\n //root was shorter\n //System.out.println(\"Case old \" + root.getID());\n result[0] = root.getID();\n result[1] = shortestPath[destination.getID()-1];\n }\n // System.out.println(\"Next hop:\" + current.getID() + \" Total Distance:\" + shortestPath[destination.getID()-1]);\n\n //reset the visited list\n for (Router r: routers){\n r.unvisit();\n }\n return result;\n }", "public DijkstraSP(EdgeWeightedDigraph G, int s){\n edgeTo = new DirectedEdge[G.V()];\n distTo = new double[G.V()];\n pq = new IndexMinPQ<>(G.V());\n\n for (int v=0; v<G.V(); v++)\n distTo[v] = Double.POSITIVE_INFINITY;\n distTo[s] = 0;\n\n pq.insert(s, 0.0);\n // relax vertices in order of distance from s\n while (!pq.isEmpty())\n relax(G, pq.delMin());\n }", "public HashMap<Nodo, Integer> dijkstra() {\r\n\r\n\t\tPriorityQueue<NodoDijkstra> aVisitar = new PriorityQueue<NodoDijkstra>();\r\n\t\tHashMap<Nodo, Integer> distancias = new HashMap<Nodo, Integer>();\r\n\t\tHashMap<Nodo, Integer> retorno = new HashMap<Nodo, Integer>();\r\n\t\tHashSet<Nodo> visitados = new HashSet<Nodo>();\r\n\r\n\t\tNodoDijkstra nodoOrigen = new NodoDijkstra(this, 0);\r\n\t\tnodoOrigen.setCamino(new Camino(this));\r\n\t\taVisitar.add(nodoOrigen);\r\n\t\tdistancias.put(this, new Integer(0));\r\n\t\tretorno.put(this, new Integer(0));\r\n\r\n\t\twhile (!aVisitar.isEmpty()) {\r\n\t\t\tNodoDijkstra dNodo = aVisitar.poll();\r\n\t\t\tNodo actual = dNodo.getNodo();\r\n\t\t\tCamino camino = dNodo.getCamino();\r\n\r\n\t\t\tif (visitados.contains(actual))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tvisitados.add(actual);\r\n\r\n\t\t\tfor (CanalOptico canal : actual.canales) {\r\n\t\t\t\tNodo vecino = canal.getOtroExtremo(actual);\r\n\t\t\t\tint costo = canal.getCosto();\r\n\r\n\t\t\t\t/* Restriccion del Dijkstra */\r\n\t\t\t\tif (visitados.contains(vecino))\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\tif (canal.estaBloqueado())\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\tif (vecino.estaBloqueado())\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\tif (distancias.containsKey(vecino)) {\r\n\t\t\t\t\tint dActual = distancias.get(vecino);\r\n\r\n\t\t\t\t\tif (dActual <= dNodo.getDistancia() + costo)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\taVisitar.remove(vecino);\r\n\t\t\t\t\t\tdistancias.remove(vecino);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tNodoDijkstra nuevoNodo = new NodoDijkstra(vecino,\r\n\t\t\t\t\t\tdNodo.getDistancia() + costo);\r\n\t\t\t\tCamino caminoNuevo = new Camino(camino);\r\n\t\t\t\tcaminoNuevo.addSalto(new Salto(camino.getSaltos().size() + 1,\r\n\t\t\t\t\t\tcanal));\r\n\t\t\t\tnuevoNodo.setCamino(caminoNuevo);\r\n\t\t\t\taVisitar.add(nuevoNodo);\r\n\t\t\t\tdistancias.put(nuevoNodo.getNodo(), nuevoNodo.getDistancia());\r\n\t\t\t\tretorno.put(nuevoNodo.getNodo(), nuevoNodo.getDistancia());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn retorno;\r\n\t}", "public DijkstraSP(EdgeWeightedDigraph G, int s)\n {\n edgeTo = new DirectedEdge[G.V()];\n distTo = new double[G.V()];\n pq = new IndexMinPQ<Double>(G.V());\n for (int v = 0; v < G.V(); v++)\n distTo[v] = Double.POSITIVE_INFINITY;\n distTo[s] = 0.0;\n pq.insert(s, 0.0);\n while (!pq.isEmpty())\n relax(G, pq.delMin());\n }", "public static void dijkstra_function(graph G, int s) throws IOException\n { \t\t\t\t\t// s is the index of the starting vertex\n \t// declare variables\n\tint nVerts, u, v;\n\tint [] dist;\n\n nVerts = G.vertices(); \t\t\t// get number of vertices in the graph class\n\n // initialize array\n dist = new int[nVerts];\n\n for(v=0; v<nVerts; v++) \t\t\t// initializations\n {\n \tdist[v] = 99999; \t\t\t\t// 99999 represents infinity\n\n }// end for\n\n dist[s] = 0;\n\n PriorityQueue Q = new PriorityQueue(dist); \t\t\n\n while(Q.Empty() == 0) \t\t\t// if heap is not empty\n {\n\n u = Q.Delete_root();\n v = G.nextneighbor(u);\n\n while(v != -1) \t\t\t// for each neighbor of u\n {\n \tif(dist[v] > dist[u] + G.edgeLength(u,v)) {\n \t\tdist[v] = dist[u] + G.edgeLength(u,v);\n\t\t\t\tQ.Update(v, dist[v]);\n }\n\n \tv = G.nextneighbor(u); \t// get the next neighbor of u\n\n }// end while\n\n }// end while\n\n System.out.println(\"\"); \t\t\t// display the array dist\n for(int row=0; row<nVerts; row++)\n \t{\n \t\tSystem.out.print(dist[row] + \" \");\n \t \tSystem.out.println(\"\");\n \t}// end for\n\n }", "public boolean DijkstraHelp(int src, int dest) {\n PriorityQueue<Entry>queue=new PriorityQueue();//queue storages the nodes that we will visit by the minimum tag\n //WGraph_DS copy = (WGraph_DS) (copy());//create a copy graph that the algorithm will on it\n initializeTag();\n initializeInfo();\n node_info first=this.ga.getNode(src);\n first.setTag(0);//distance from itself=0\n queue.add(new Entry(first,first.getTag()));\n while(!queue.isEmpty()) {\n Entry pair=queue.poll();\n node_info current= pair.node;\n if (current.getInfo() != null) continue;//if we visit we can skip to the next loop because we have already marked\n current.setInfo(\"visited\");//remark the info\n Collection<node_info> listNeighbors = this.ga.getV(current.getKey());//create a collection for the neighbors list\n LinkedList<node_info> Neighbors = new LinkedList<>(listNeighbors);//create the neighbors list\n if (Neighbors == null) continue;\n for(node_info n:Neighbors) {\n\n if(n.getTag()>ga.getEdge(n.getKey(),current.getKey())+current.getTag())\n {\n n.setTag(current.getTag() + ga.getEdge(n.getKey(), current.getKey()));//compute the new tag\n }\n queue.add(new Entry(n,n.getTag()));\n }\n }\n Iterator<node_info> it=this.ga.getV().iterator();\n while(it.hasNext()){\n if(it.next().getInfo()==null) return false;\n }\n return true;\n }", "public ArrayList<Vertex> dijkstraPath(int sourceIndex, int sinkIndex) {\r\n \tArrayList<Vertex> locationcopy;\r\n \tlocationcopy=new ArrayList<Vertex>(location);\r\n \tArrayList<Vertex> dijpath;\r\n \tdijpath= new ArrayList<Vertex>(0);\r\n \t//dijpath.add(locationcopy.get(sourceIndex));\r\n \tint i,j,maxdist=locationcopy.size()+1;\r\n \tint[] DistArray=new int[locationcopy.size()], PreArray=new int[locationcopy.size()]; \r\n \tint[][] AdjArray=new int[locationcopy.size()][locationcopy.size()];\r\n \t\r\n \r\n \t\r\n \tfor(i=0;i<locationcopy.size();i++)\r\n \t\tfor(j=i;j<locationcopy.size();j++)\r\n \t\t\tif(locationcopy.get(i).distance(locationcopy.get(j))<=transmissionRange)\r\n \t\t\t{\r\n \t\t\t\tAdjArray[i][j]=1;\r\n \t\t\t\tAdjArray[j][i]=1;\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tAdjArray[i][j]=maxdist;\r\n \t\t\t\tAdjArray[j][i]=maxdist;\r\n \t\t\t}\r\n \t\r\n \tfor(i=0;i<locationcopy.size();i++)\r\n \t\tAdjArray[i][i]=0;\r\n \t\t\r\n\t\t\r\n \tint mdistindex,mindist;\r\n\r\n \t for(i=0;i<locationcopy.size();i++)\r\n \t { \r\n \t\t DistArray[i]=AdjArray[sourceIndex][i];\r\n \t if(DistArray[i]<maxdist) PreArray[i]=sourceIndex;\r\n \t else PreArray[i]=-1;\r\n \t }\r\n \t PreArray[sourceIndex]=-1; AdjArray[sourceIndex][sourceIndex]=1;\r\n \t for(j=0;j<(locationcopy.size()-1);j++)\r\n \t { \r\n \t\t mindist=maxdist; \r\n \t\t mdistindex=-1;\r\n \t for(i=0;i<locationcopy.size();i++)\r\n \t if((AdjArray[i][i]==0)&&(DistArray[i]<mindist))\r\n \t { \r\n \t \t mdistindex=i;\r\n \t \t mindist=DistArray[i];\r\n \t }\r\n \t if(mdistindex==-1) return new ArrayList<Vertex>(0);\r\n \t else\r\n \t { \r\n \t \t AdjArray[mdistindex][mdistindex]=1;\r\n \t for(i=0;i<locationcopy.size();i++)\r\n \t {\r\n \t if(AdjArray[i][i]==0)\r\n \t {\r\n \t if(DistArray[mdistindex]+AdjArray[mdistindex][i]<DistArray[i])\r\n \t { \r\n \t \t DistArray[i]=DistArray[mdistindex]+AdjArray[mdistindex][i];\r\n \t PreArray[i]=mdistindex;\r\n \t }\r\n \t }\r\n \t }\r\n \t }\r\n \t if(AdjArray[sinkIndex][sinkIndex]==1) break;\r\n \t }\r\n \t Stack<Integer> s=new Stack<Integer>();\r\n \t i=sinkIndex;\r\n \t s.push(i);\r\n \t while(PreArray[i]!=-1)\r\n \t {\r\n \t\t s.push(PreArray[i]);\r\n \t\t i=PreArray[i];\r\n \t }\r\n \t while(!s.isEmpty())\r\n \t {\r\n \t\t dijpath.add(locationcopy.get(s.pop()));\r\n \t }\r\n \treturn dijpath;\r\n }", "public InTree<V,E> weightedShortestPaths(V source)\n\t\tthrows NegativeWeightEdgeException, DisconnectedGraphException;", "public ShortestPath(IWeightedGraph<N,E> graph, int startNode) {\n\t\tthis.graph = graph;\n\t\tthis.startNode = startNode;\n\t\tthis.shortestPaths = new double[graph.numberOfNodes()];\n\t\tthis.previousNode = new int[graph.numberOfNodes()];\n\t\tbellmanFord(this.graph, this.startNode);\n\t}", "private HashMap<String, Integer> getShortestPathBetweenDifferentNodes(Node start, Node end) {\n HashMap<Node, Node> parentChildMap = new HashMap<>();\n parentChildMap.put(start, null);\n\n // Shortest path between nodes\n HashMap<Node, Integer> shortestPathMap = new HashMap<>();\n\n for (Node node : getNodes()) {\n if (node == start)\n shortestPathMap.put(start, 0);\n else shortestPathMap.put(node, Integer.MAX_VALUE);\n }\n\n for (Edge edge : start.getEdges()) {\n shortestPathMap.put(edge.getDestination(), edge.getWeight());\n parentChildMap.put(edge.getDestination(), start);\n }\n\n while (true) {\n Node currentNode = closestUnvisitedNeighbour(shortestPathMap);\n\n if (currentNode == null) {\n return null;\n }\n\n // Save path to nearest unvisited node\n if (currentNode == end) {\n Node child = end;\n String path = end.getName();\n while (true) {\n Node parent = parentChildMap.get(child);\n if (parent == null) {\n break;\n }\n\n // Create path using previous(parent) and current(child) node\n path = parent.getName() + \"\" + path;\n child = parent;\n }\n HashMap<String,Integer> hm= new HashMap<>();\n hm.put(path, shortestPathMap.get(end));\n return hm;\n }\n currentNode.visit();\n\n // Go trough edges and find nearest\n for (Edge edge : currentNode.getEdges()) {\n if (edge.getDestination().isVisited())\n continue;\n\n if (shortestPathMap.get(currentNode) + edge.getWeight() < shortestPathMap.get(edge.getDestination())) {\n shortestPathMap.put(edge.getDestination(), shortestPathMap.get(currentNode) + edge.getWeight());\n parentChildMap.put(edge.getDestination(), currentNode);\n }\n }\n }\n }", "private static void shortestPath(Graph graph, Character startNode, int algorithm) {\n Node currentNode = graph.getNode(startNode);\n\n // keep track of the nodes visited\n List<Character> nodesVisited = new ArrayList<>();\n\n // add the current node\n nodesVisited.add(currentNode.getName());\n\n // breadth first search to help keep track of the nodes we have already visited\n // helps with backtracking\n Stack<Node> visitingNodes = new Stack<>();\n\n // loop through the graph\n while (currentNode != graph.getNode('Z')) {\n // we have visited a node\n // add it to the stack\n // set true to since its been visited and it will be in the shortest path\n visitingNodes.add(currentNode);\n currentNode.setNodeVisited(true);\n currentNode.setInShortestPath(true);\n\n // get all the edges that are connected to the current node we are on\n List<Edge> adjacentNodes = currentNode.getNeighbors();\n\n // temp for next node\n Node nextNode = null;\n int weightDistanceTotal = Integer.MAX_VALUE;\n\n for (Edge i: adjacentNodes) {\n // testing\n // System.out.println(i.destination.getName());\n // System.out.println(i.destination.getDistanceToZ());\n\n // 1. always check to see if we have visited the node\n if (i.destination.isNodeVisited()) {\n // System.out.println(i.destination.getName() + \" is already in the path\");\n continue;\n }\n\n // 2. assign the next node to the destination\n if (nextNode == null) {\n nextNode = i.destination;\n }\n\n // compare distances\n if (algorithm == 1) {\n nextNode = updateNextNodeAlgo1(nextNode, i.destination);\n } else {\n NodeWithWeightDistanceTotal nodeWithWeightDistanceTotal = updateNextNodeAlgo2(nextNode, i, weightDistanceTotal);\n nextNode = nodeWithWeightDistanceTotal.node;\n weightDistanceTotal = nodeWithWeightDistanceTotal.weightDistanceTotal;\n }\n //if (nextNode.getDistanceToZ() > i.destination.getDistanceToZ()) {\n // nextNode = i.destination;\n //}\n }\n\n // next has no other edges\n if (nextNode == null) {\n // System.out.println(\"There no place to go from \" + currentNode.getName());\n // pop off the node we just visited\n nextNode = visitingNodes.pop();\n // its not in the shortest path to Z\n nextNode.setInShortestPath(false);\n // set the next node to the previous node\n nextNode = visitingNodes.pop();\n }\n\n // add the nodes we visit to keep track of the path\n nodesVisited.add(nextNode.getName());\n\n // System.out.println(Arrays.toString(nodesVisited.toArray()));\n // testing purposes to see if the node is on the shortest path\n\n// for (Character node: nodesVisited) {\n// Node boolVisit = graph.getNode(node);\n// System.out.println(boolVisit.isInShortestPath());\n// }\n\n // progress to the next node\n currentNode = nextNode;\n // when visiting the last node mark z in the shortest path\n if (currentNode.getName() == 'Z') {\n currentNode.setInShortestPath(true);\n }\n // testing\n // System.out.println(\"next node = \" + currentNode.getName());\n }\n\n // keep track of the path visited and the total addition of weights\n int pathCounter = 0;\n\n // construct the shortest path\n List<Node> shortestPath = new ArrayList<>();\n\n for (Character nodeVisitor: nodesVisited) {\n // get the node\n Node node = graph.getNode(nodeVisitor);\n\n // add to the shortest path\n if (node.isInShortestPath() && !shortestPath.contains(node)) {\n shortestPath.add(node);\n }\n }\n\n // print the shortest path\n for (int i = 0; i < shortestPath.size() - 1; i++) {\n currentNode = shortestPath.get(i);\n Node nextNode = shortestPath.get(i + 1);\n\n // find the weight of that node\n int weight = currentNode.findWeight(nextNode);\n pathCounter += weight;\n\n // System.out.println(\"weight \" + weight);\n // System.out.println(\"path total \" + pathCounter);\n }\n\n // final output\n String fullPathSequence = \"\";\n String shortestPathSequence = \"\";\n\n for (int i = 0; i < nodesVisited.size(); i++) {\n if (i != nodesVisited.size() - 1) {\n fullPathSequence += nodesVisited.get(i) + \" -> \";\n }\n }\n\n fullPathSequence += nodesVisited.get(nodesVisited.size() - 1);\n\n for (int i = 0; i < shortestPath.size(); i++) {\n if (i != shortestPath.size() - 1) {\n shortestPathSequence += shortestPath.get(i).getName() + \" -> \";\n }\n }\n\n if (currentNode.getName() == 'Z') {\n shortestPathSequence += \"Z\";\n } else {\n shortestPathSequence += shortestPath.get(shortestPath.size() - 1).getName();\n }\n\n System.out.println(\"Algorithm \" + algorithm + \" : \");\n System.out.println(\"Sequence of all nodes \" + fullPathSequence);\n System.out.println(\"Shortest path: \" + shortestPathSequence);\n System.out.println(\"Shortest path length: \" + pathCounter);\n System.out.println(\"\\n\");\n\n // reset the graph\n graph.graphReset();\n\n }", "@Test\n public void testShortestDistance() {\n Vertex v1 = new Vertex(1, \"A\");\n Vertex v2 = new Vertex(2, \"B\");\n Vertex v3 = new Vertex(3, \"C\");\n\n Edge<Vertex> e1 = new Edge<>(v1, v2, 1);\n Edge<Vertex> e2 = new Edge<>(v2, v3, 3);\n Edge<Vertex> e3 = new Edge<>(v1, v3, 2);\n\n Graph<Vertex, Edge<Vertex>> g = new Graph<>();\n g.addVertex(v1);\n g.addVertex(v2);\n g.addVertex(v3);\n g.addEdge(e1);\n g.addEdge(e2);\n g.addEdge(e3);\n\n List<Vertex> expectedPath = new ArrayList<>();\n expectedPath.add(v1);\n expectedPath.add(v3);\n assertEquals(expectedPath, g.shortestPath(v1, v3));\n\n assertEquals(6, g.edgeLengthSum());\n }", "public List<Long> getPath(Long start, Long finish){\n \n \n List<Long> res = new ArrayList<>();\n // auxiliary list\n List<DeixtraObj> serving = new ArrayList<>();\n// nearest vertexes map \n Map<Long,DeixtraObj> optimMap = new HashMap<>();\n// thread save reading \n synchronized (vertexes){ \n // preparation\n for (Map.Entry<Long, Vertex> entry : vertexes.entrySet()) {\n Vertex userVertex = entry.getValue();\n // If it`s start vertex weight = 0 and the nereast vertex is itself \n if(userVertex.getID().equals(start)){\n serving.add(new DeixtraObj(start, 0.0, start));\n }else{\n // For other vertex weight = infinity and the nereast vertex is unknown \n serving.add(new DeixtraObj(userVertex.getID(), Double.MAX_VALUE, null));\n }\n\n } \n // why auxiliary is not empty \n while(serving.size()>0 ){\n // sort auxiliary by weight \n Collections.sort(serving);\n\n \n // remove shortes fom auxiliary and put in to answer \n DeixtraObj minObj = serving.remove(0);\n optimMap.put(minObj.getID(), minObj);\n\n Vertex minVertex = vertexes.get(minObj.getID());\n\n // get all edges from nearest \n for (Map.Entry<Long, Edge> entry : minVertex.allEdges().entrySet()) {\n Long dest = entry.getKey();\n Double wieght = entry.getValue().getWeight();\n // by all remain vertexes \n for(DeixtraObj dx : serving){\n if(dx.getID().equals(dest)){\n // if in checking vertex weight more then nearest vertex weight plus path to cheking \n // then change in checking weight and nearest\n if( (minObj.getWeight()+wieght) < dx.getWeight()){\n dx.setNearest(minVertex.getID());\n dx.setWeight((minObj.getWeight()+wieght));\n }\n }\n }\n }\n\n }\n }\n \n // create output list\n res.add(finish);\n Long point = finish;\n while(!point.equals(start)){\n \n point = ((DeixtraObj)optimMap.get(point)).getNearest();\n res.add(point);\n }\n \n Collections.reverse(res);\n \n \n return res;\n \n }", "public Pair<Integer, Map<Vertex, Vertex>> ShortestDistance(Vertex source, Vertex zink) {\n Map<Vertex, Vertex> PredecessorMap = new HashMap<>();\n Map<Vertex, Integer> DistanceMap = new HashMap<>();\n Vertex a;\n // initialize arrays\n for (Vertex v : Vertices) {\n DistanceMap.put(v, 1000); //We initialize the array in infinite\n PredecessorMap.put(v, null);\n }\n DistanceMap.put(source, 0); //We put the source in 0\n for (Vertex v : Vertices) {\n while (!DistanceMap.isEmpty()) { //And we iterate until the distance map is empty\n a = getmin(DistanceMap); //we get the minimum vertex\n if(a==null) {\n return (new Pair<Integer, Map<Vertex, Vertex>>(DistanceMap.get(zink), PredecessorMap));\n }\n\n ArrayList<Edge> edges = a.getOutEdges(); //we get de edges connected to this vertex\n for (Edge e : edges) { //we iterate getting the vertex of each edge\n if (DistanceMap.containsKey(e.tovertex)) { //if the vertex is in the distance map:\n Integer alt = DistanceMap.get(a) + e.distance; //we get it value and plus the distance of the edge\n\n System.out.println(\"This is the distance going out from that Vertex: \" + alt + \", with previous distance: \" + DistanceMap.get(e.tovertex));\n if (alt < DistanceMap.get(e.tovertex)) { //if it is less, we put it in the arrays\n DistanceMap.put(e.tovertex, alt);\n PredecessorMap.put(e.tovertex, a);\n\n }\n }\n }\n DistanceMap.remove(a); //and we remove it of the array\n }\n }\n return (new Pair<Integer, Map<Vertex, Vertex>>(DistanceMap.get(zink), PredecessorMap));\n }", "public Dijkstra(Graph graph, int firstVertexPortNum)\n {\n this.graph = graph;\n Set<String> vertexKeys = this.graph.vertexKeys();\n \n this.initialVertexPortNum = firstVertexPortNum;\n this.predecessors = new HashMap<String, String>();\n this.distances = new HashMap<String, Integer>();\n this.availableVertices = new PriorityQueue<Vertex>(vertexKeys.size(), new Comparator<Vertex>()\n {\n // compare weights of these two vertices.\n public int compare(Vertex v1, Vertex v2)\n {\n \t// errors are here.\n int weightOne = Dijkstra.this.distances.get(v1.convertToString(v1.getVertexPortNum())); // distances stored by portnum in string form.\n int weightTwo = Dijkstra.this.distances.get(v2.convertToString(v2.getVertexPortNum())); // distances stored by portnum in string form.\n return weightOne - weightTwo; // return the modified weight of the two vertices.\n }\n });\n \n this.visitedVertices = new HashSet<Vertex>();\n \n // for each Vertex in the graph\n for(String key: vertexKeys)\n {\n this.predecessors.put(key, null);\n this.distances.put(key, Integer.MAX_VALUE); // assuming that the distance of this is infinity.\n }\n \n \n //the distance from the initial vertex to itself is 0\n this.distances.put(convertToString(initialVertexPortNum), 0); \n \n //and seed initialVertex's neighbors\n Vertex initialVertex = this.graph.getVertex(convertToString(initialVertexPortNum)); // converted portnum to String to make this work.\n ArrayList<Edge> initialVertexNeighbors = initialVertex.getSquad();\n for(Edge e : initialVertexNeighbors)\n {\n Vertex other = e.getNeighbor(initialVertex);\n this.predecessors.put(convertToString(other.getVertexPortNum()), convertToString(initialVertexPortNum));\n this.distances.put(convertToString(other.getVertexPortNum()), e.getWeight()); // converted portnum to String to make this work.\n this.availableVertices.add(other); // add to available vertices.\n }\n \n this.visitedVertices.add(initialVertex); // add to list of visited vertices.\n \n // apply Dijkstra's algorithm to the overlay.\n processOverlay();\n \n }", "public static <G extends BaseWeightedGraph<V,E,W>,V,E extends WeightedEdge<V,W>, W extends Number & Comparable<W>> List<E> findShortestPathInt(G graph, V source, V sink){\r\n\t\t// check graph contains source and sink\r\n\t\tSet<V> vertecies = graph.getVertices();\r\n\t\tif( !(vertecies.contains(source) && vertecies.contains(sink)) ){\r\n\t\t\tthrow new IllegalArgumentException(\"BaseGraph must contain both source and sink\");\r\n\t\t}\r\n\t\t\r\n\t\tPriorityQueue<WeightedPathChain<V,E,W,Integer>> pq = new PriorityQueue<WeightedPathChain<V,E,W,Integer>>(); \r\n\t\tHashSet<V> checked = new HashSet<V>();\r\n\t\tHashMap<V,WeightedPathChain<V,E,W,Integer>> map = new HashMap<V,WeightedPathChain<V,E,W,Integer>>();\r\n\t\taddOrUpdate(map,pq,source,Integer.valueOf(0));\r\n\t\twhile(!pq.isEmpty()&&!sink.equals(pq.peek().vertex)){\r\n\t\t\tWeightedPathChain<V,E,W,Integer> current = pq.poll(); // poll lowest level vertex\r\n\t\t\tchecked.add(current.vertex); // add vertex to checked set\r\n\t\t\tfor (E edge :graph.getOutgoingEdges(current.vertex)){\t// for each outgoing edge \r\n\t\t\t\tif(!checked.contains(edge.getOpposingVertex(current.vertex))){\t\t// if opposing vertex has not been checked \r\n\t\t\t\t\taddOrUpdate(map,\r\n\t\t\t\t\t\t\t\tpq,\r\n\t\t\t\t\t\t\t\tedge.getOpposingVertex(current.vertex),\r\n\t\t\t\t\t\t\t\tInteger.valueOf(map.get(current.vertex).val+edge.getWeight().intValue() ) ,\r\n\t\t\t\t\t\t\t\tedge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tArrayList<V> path = new ArrayList<V>(); // vertex path \r\n\t\tArrayList<E> edgePath = new ArrayList<E>(); // edge path\r\n\t\tboolean run = true; \r\n\t\tif(!pq.isEmpty()&&pq.peek().vertex.equals(sink)) { // \r\n\t\t\tWeightedPathChain<V,E,W,Integer> vv = pq.poll();\r\n\t\t\tpath.add(vv.vertex);\r\n\t\t\tedgePath.add(vv.edge);\r\n\t\t\twhile(run) {\r\n\t\t\t\tvv = map.get(vv.edge.getOpposingVertex(vv.vertex));\r\n\t\t\t\tif(vv.vertex.equals(source)) {\r\n\t\t\t\t\trun=false;\r\n\t\t\t\t\tpath.add(vv.vertex);\r\n\t\t\t\t}\r\n\t\t\t\telse {\t\r\n\t\t\t\t\tedgePath.add(vv.edge);\r\n\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return path;\r\n\t\t\r\n\t\tCollections.reverse(edgePath);\r\n\t\treturn edgePath;\r\n\t}", "public void shortestRouteDijkstra(){\n int landmark1 = l1.getSelectionModel().getSelectedIndex();\n int landmark2 = l2.getSelectionModel().getSelectedIndex();\n GraphNodeAL<MapPoint> lm1 = landmarkList.get(landmark1);\n GraphNodeAL<MapPoint> lm2 = landmarkList.get(landmark2);\n\n shortestRouteDij(lm1, lm2);\n }", "@Test public void testPublic14() {\n Graph<String> graph= TestGraphs.testGraph2();\n List<String> shortestPath= new ArrayList<String>();\n\n assertEquals(1, graph.Dijkstra(\"apple\", \"banana\", shortestPath));\n assertEquals(\"apple banana\", TestGraphs.listToString(shortestPath));\n\n assertEquals(2, graph.Dijkstra(\"apple\", \"cherry\", shortestPath));\n assertEquals(\"apple banana cherry\",\n TestGraphs.listToString(shortestPath));\n\n assertEquals(3, graph.Dijkstra(\"apple\", \"date\", shortestPath));\n assertEquals(\"apple banana cherry date\",\n TestGraphs.listToString(shortestPath));\n\n assertEquals(4, graph.Dijkstra(\"apple\", \"elderberry\", shortestPath));\n assertEquals(\"apple banana cherry date elderberry\",\n TestGraphs.listToString(shortestPath));\n\n assertEquals(5, graph.Dijkstra(\"apple\", \"fig\", shortestPath));\n assertEquals(\"apple banana cherry date elderberry fig\",\n TestGraphs.listToString(shortestPath));\n\n assertEquals(6, graph.Dijkstra(\"apple\", \"guava\", shortestPath));\n assertEquals(\"apple banana cherry date elderberry fig guava\",\n TestGraphs.listToString(shortestPath));\n }", "private void expandNode() {\r\n\t\t\t// Dijkstra's algorithm to handle separately\r\n\t\t\tif (dijkstra.isSelected()) {\r\n\t\t\t\tCell u;\r\n\t\t\t\t// 11: while Q is not empty:\r\n\t\t\t\tif (graph.isEmpty()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// 12: u := vertex in Q (graph) with smallest distance in dist[]\r\n\t\t\t\t// ;\r\n\t\t\t\t// 13: remove u from Q (graph);\r\n\t\t\t\tu = graph.remove(0);\r\n\t\t\t\t// Add vertex u in closed set\r\n\t\t\t\tclosedSet.add(u);\r\n\t\t\t\t// If target has been found ...\r\n\t\t\t\tif (u.row == targetPos.row && u.col == targetPos.col) {\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// Counts nodes that have expanded.\r\n\t\t\t\texpanded++;\r\n\t\t\t\t// Update the color of the cell\r\n\t\t\t\tgrid[u.row][u.col] = CLOSED;\r\n\t\t\t\t// 14: if dist[u] = infinity:\r\n\t\t\t\tif (u.dist == INFINITY) {\r\n\t\t\t\t\t// ... then there is no solution.\r\n\t\t\t\t\t// 15: break;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t\t// 16: end if\r\n\t\t\t\t}\r\n\t\t\t\t// Create the neighbors of u\r\n\t\t\t\tArrayList<Cell> neighbors = createSuccesors(u, false);\r\n\t\t\t\t// 18: for each neighbor v of u:\r\n\t\t\t\tfor (Cell v : neighbors) {\r\n\t\t\t\t\t// 20: alt := dist[u] + dist_between(u, v) ;\r\n\t\t\t\t\tint alt = u.dist + distBetween(u, v);\r\n\t\t\t\t\t// 21: if alt < dist[v]:\r\n\t\t\t\t\tif (alt < v.dist) {\r\n\t\t\t\t\t\t// 22: dist[v] := alt ;\r\n\t\t\t\t\t\tv.dist = alt;\r\n\t\t\t\t\t\t// 23: previous[v] := u ;\r\n\t\t\t\t\t\tv.prev = u;\r\n\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\tgrid[v.row][v.col] = FRONTIER;\r\n\t\t\t\t\t\t// 24: decrease-key v in Q;\r\n\t\t\t\t\t\t// (sort list of nodes with respect to dist)\r\n\t\t\t\t\t\tCollections.sort(graph, new CellComparatorByDist());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// The handling of the other four algorithms\r\n\t\t\t} else {\r\n\t\t\t\tCell current;\r\n\t\t\t\tif (dfs.isSelected() || bfs.isSelected()) {\r\n\t\t\t\t\t// Here is the 3rd step of the algorithms DFS and BFS\r\n\t\t\t\t\t// 3. Remove the first state, Si, from OPEN SET ...\r\n\t\t\t\t\tcurrent = openSet.remove(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Here is the 3rd step of the algorithms A* and Greedy\r\n\t\t\t\t\t// 3. Remove the first state, Si, from OPEN SET,\r\n\t\t\t\t\t// for which f(Si) ≤ f(Sj) for all other\r\n\t\t\t\t\t// open states Sj ...\r\n\t\t\t\t\t// (sort first OPEN SET list with respect to 'f')\r\n\t\t\t\t\tCollections.sort(openSet, new CellComparatorByF());\r\n\t\t\t\t\tcurrent = openSet.remove(0);\r\n\t\t\t\t}\r\n\t\t\t\t// ... and add it to CLOSED SET.\r\n\t\t\t\tclosedSet.add(0, current);\r\n\t\t\t\t// Update the color of the cell\r\n\t\t\t\tgrid[current.row][current.col] = CLOSED;\r\n\t\t\t\t// If the selected node is the target ...\r\n\t\t\t\tif (current.row == targetPos.row && current.col == targetPos.col) {\r\n\t\t\t\t\t// ... then terminate etc\r\n\t\t\t\t\tCell last = targetPos;\r\n\t\t\t\t\tlast.prev = current.prev;\r\n\t\t\t\t\tclosedSet.add(last);\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// Count nodes that have been expanded.\r\n\t\t\t\texpanded++;\r\n\t\t\t\t// Here is the 4rd step of the algorithms\r\n\t\t\t\t// 4. Create the successors of Si, based on actions\r\n\t\t\t\t// that can be implemented on Si.\r\n\t\t\t\t// Each successor has a pointer to the Si, as its predecessor.\r\n\t\t\t\t// In the case of DFS and BFS algorithms, successors should not\r\n\t\t\t\t// belong neither to the OPEN SET nor the CLOSED SET.\r\n\t\t\t\tArrayList<Cell> succesors;\r\n\t\t\t\tsuccesors = createSuccesors(current, false);\r\n\t\t\t\t// Here is the 5th step of the algorithms\r\n\t\t\t\t// 5. For each successor of Si, ...\r\n\t\t\t\tfor (Cell cell : succesors) {\r\n\t\t\t\t\t// ... if we are running DFS ...\r\n\t\t\t\t\tif (dfs.isSelected()) {\r\n\t\t\t\t\t\t// ... add the successor at the beginning of the list\r\n\t\t\t\t\t\t// OPEN SET\r\n\t\t\t\t\t\topenSet.add(0, cell);\r\n\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t// ... if we are runnig BFS ...\r\n\t\t\t\t\t} else if (bfs.isSelected()) {\r\n\t\t\t\t\t\t// ... add the successor at the end of the list OPEN SET\r\n\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t// ... if we are running A* or Greedy algorithms (step 5\r\n\t\t\t\t\t\t// of A* algorithm) ...\r\n\t\t\t\t\t} else if (aStar.isSelected() || guloso.isSelected()) {\r\n\t\t\t\t\t\t// ... calculate the value f(Sj) ...\r\n\t\t\t\t\t\tint dxg = current.col - cell.col;\r\n\t\t\t\t\t\tint dyg = current.row - cell.row;\r\n\t\t\t\t\t\tint dxh = targetPos.col - cell.col;\r\n\t\t\t\t\t\tint dyh = targetPos.row - cell.row;\r\n\t\t\t\t\t\tif (diagonal.isSelected()) {\r\n\t\t\t\t\t\t\t// with diagonal movements\r\n\t\t\t\t\t\t\t// calculate 1000 times the Euclidean distance\r\n\t\t\t\t\t\t\tif (guloso.isSelected()) {\r\n\t\t\t\t\t\t\t\t// especially for the Greedy ...\r\n\t\t\t\t\t\t\t\tcell.g = 0;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcell.g = current.g + (int) ((double) 1000 * Math.sqrt(dxg * dxg + dyg * dyg));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcell.h = (int) ((double) 1000 * Math.sqrt(dxh * dxh + dyh * dyh));\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// without diagonal movements\r\n\t\t\t\t\t\t\t// calculate Manhattan distances\r\n\t\t\t\t\t\t\tif (guloso.isSelected()) {\r\n\t\t\t\t\t\t\t\t// especially for the Greedy ...\r\n\t\t\t\t\t\t\t\tcell.g = 0;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcell.g = current.g + Math.abs(dxg) + Math.abs(dyg);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcell.h = Math.abs(dxh) + Math.abs(dyh);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcell.f = cell.g + cell.h;\r\n\t\t\t\t\t\t// ... If Sj is neither in the OPEN SET nor in the\r\n\t\t\t\t\t\t// CLOSED SET states ...\r\n\t\t\t\t\t\tint openIndex = isInList(openSet, cell);\r\n\t\t\t\t\t\tint closedIndex = isInList(closedSet, cell);\r\n\t\t\t\t\t\tif (openIndex == -1 && closedIndex == -1) {\r\n\t\t\t\t\t\t\t// ... then add Sj in the OPEN SET ...\r\n\t\t\t\t\t\t\t// ... evaluated as f(Sj)\r\n\t\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t\t// Else ...\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// ... if already belongs to the OPEN SET, then ...\r\n\t\t\t\t\t\t\tif (openIndex > -1) {\r\n\t\t\t\t\t\t\t\t// ... compare the new value assessment with the\r\n\t\t\t\t\t\t\t\t// old one.\r\n\t\t\t\t\t\t\t\t// If old <= new ...\r\n\t\t\t\t\t\t\t\tif (openSet.get(openIndex).f <= cell.f) {\r\n\t\t\t\t\t\t\t\t\t// ... then eject the new node with state\r\n\t\t\t\t\t\t\t\t\t// Sj.\r\n\t\t\t\t\t\t\t\t\t// (ie do nothing for this node).\r\n\t\t\t\t\t\t\t\t\t// Else, ...\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t// ... remove the element (Sj, old) from the\r\n\t\t\t\t\t\t\t\t\t// list\r\n\t\t\t\t\t\t\t\t\t// to which it belongs ...\r\n\t\t\t\t\t\t\t\t\topenSet.remove(openIndex);\r\n\t\t\t\t\t\t\t\t\t// ... and add the item (Sj, new) to the\r\n\t\t\t\t\t\t\t\t\t// OPEN SET.\r\n\t\t\t\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// ... if already belongs to the CLOSED SET,\r\n\t\t\t\t\t\t\t\t// then ...\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// ... compare the new value assessment with the\r\n\t\t\t\t\t\t\t\t// old one.\r\n\t\t\t\t\t\t\t\t// If old <= new ...\r\n\t\t\t\t\t\t\t\tif (closedSet.get(closedIndex).f <= cell.f) {\r\n\t\t\t\t\t\t\t\t\t// ... then eject the new node with state\r\n\t\t\t\t\t\t\t\t\t// Sj.\r\n\t\t\t\t\t\t\t\t\t// (ie do nothing for this node).\r\n\t\t\t\t\t\t\t\t\t// Else, ...\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t// ... remove the element (Sj, old) from the\r\n\t\t\t\t\t\t\t\t\t// list\r\n\t\t\t\t\t\t\t\t\t// to which it belongs ...\r\n\t\t\t\t\t\t\t\t\tclosedSet.remove(closedIndex);\r\n\t\t\t\t\t\t\t\t\t// ... and add the item (Sj, new) to the\r\n\t\t\t\t\t\t\t\t\t// OPEN SET.\r\n\t\t\t\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t\t\t}\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}", "public Path shortestPath(Vertex a, Vertex b) {\n // If a or b aren't present in the set of vertices throw an exception\n if (!myGraph.containsKey(b) || !myGraph.containsKey(a)) {\n throw new IllegalArgumentException(\"One of the vertices isn't valid\");\n }\n /* Create a map of Vertices to VertexInfos. Fill it with VertexInfos for all\n vertices that each have no previous vertex and and a cost of INFINITY */\n Map<Vertex, VertexInfo> vertInfos = new HashMap<Vertex, VertexInfo>();\n for (Vertex v : vertices()) {\n vertInfos.put(v, new VertexInfo(v, null, INFINITY));\n }\n /* Create a PriorityQueue for VertexInfos */\n PriorityQueue<VertexInfo> viQueue = new PriorityQueue<VertexInfo>();\n /* Create a VertexInfo for the start Vertex 'a' with a cost of 0. This uses a copy of Vertex a&b for immutability */\n Vertex copyA = new Vertex(a.getLabel());\n Vertex copyB = new Vertex(b.getLabel());\n\n VertexInfo vi_a = new VertexInfo(copyA, null, 0);\n /* Add VerxtexInfo for a to PQ and map it to it's VertexInfo */\n viQueue.add(vi_a);\n vertInfos.put(a, vi_a);\n while(!viQueue.isEmpty()) {\n /* Remove the VertexInfo with lowest cost */\n Vertex curr = viQueue.poll().getVertex();\n /* Check all adjacent Vertices of curr Vertex */\n for (Vertex v : adjacentVertices(curr)) {\n /* Calculate cost to get to v through curr */\n int cost = vertInfos.get(curr).getCost() + edgeCost(curr, v);\n /* If cost through curr is lower than previous */\n if (cost < vertInfos.get(v).getCost()) {\n /* Remove v's VertexInfo from PQ */\n viQueue.remove(vertInfos.get(v));\n /* Overwrite previous value of v in map\n Add updated VerexInfo to PQ */\n VertexInfo vi = new VertexInfo(v, curr, cost);\n vertInfos.put(v,vi);\n viQueue.add(vi);\n }\n }\n }\n /* Create ArrayList for path */\n List<Vertex> path = new ArrayList<Vertex>();\n \n /* Add each vertex and it's previous vertex to path until a null vertex is reached */\n for (Vertex vert = copyB; vert != null; vert = vertInfos.get(vert).getPrev()) {\n path.add(vert);\n }\n\n /* Reverse order of path */ \n Collections.reverse(path);\n /* Create new Path object with corresponding parameters */\n if(path.contains(copyA)){\n Path pathToB = new Path(path, vertInfos.get(copyB).getCost());\n return pathToB;\n } else {\n return null;\n }\n }", "public List<Node> findShortestPath(Node s, Node t);", "private void buildPath( PriorityQueue<SearchNode<T>> nodes ) {\n\t\tNode<T> v;\n\t\tSearchNode<T> su, sv;\n\t\tWeightedEdge<T> we;\n\n\t\twhile ( ! nodes.isEmpty() ) { // while Q is not empty:\n\t\t\tsu = nodes.poll(); // u = Q.min()\n\t\t\tif ( su.isUnreachable() ) { break; } //\n\n\t\t\tfor ( Edge<T> edge : su.getEdges() ) { // for each\n\t\t\t\twe = (WeightedEdge<T>)edge; //\n\t\t\t\tv = we.getOtherNode( su.getNode() ); // neighbor v of u\n\t\t\t\tsv = getSearchNode( v ); //\n\t\t\t\tint uToV = su.getDistance() + we.getWeight();// alt = dist[u] + length(u, v)\n\t\t\t\tif (uToV < sv.getDistance() ) { // if alt < dist[v]\n\t\t\t\t\tnodes.remove( sv ); // ( force recalc )\n\t\t\t\t\tsv.setDistance( uToV ); // dist[v] <- alt\n\t\t\t\t\tsv.setPrevious( su.getNode() ); // prev[v] <- u\n\t\t\t\t\tnodes.add( sv ); // Q.decrease_priority(v, alt) (dist recalc)\n\t\t\t\t} // end if\n\t\t\t} // end for\n\t\t} // end while\n\t}", "public Stack<Point> shortestPath() {\n\t\tresetVisited();\n\t\tStack <Point> shortestPath = new Stack<Point>();\n\t\tprev = new HashMap<Point,Point>();\n\t\tCompass[] direction = Compass.values();\n\t\tQueue <Point> path = new LinkedList<Point>();\n\t\tpath.add(playerStart);\n\t\twhile(!path.isEmpty()) {\n\t\t\tPoint current = path.poll();\n\t\t\tfor (Compass pointing: direction) {\n\t\t\t\tif (current.equals(goal)) {\n\t\t\t\t\tshortestPath.push(current);\n\t\t\t\t\twhile (prev.containsKey(shortestPath.peek()) && !shortestPath.peek().equals(playerStart)){\n\t\t\t\t\t\tshortestPath.push(prev.get(shortestPath.peek()));\n\t\t\t\t\t}\n\t\t\t\t\treturn shortestPath;\n\t\t\t\t}\n\t\t\t\tint nextW = (int)current.getX() + pointing.mapX;\n\t\t\t\tint nextH = (int)current.getY() + pointing.mapY;\n\t\t\t\tPoint nextPoint = new Point(nextW, nextH);\n\t\t\t\tif (arrayBounds(nextW, width) && arrayBounds (nextH, height) && maze[nextW][nextH] == 0 && !visited.contains(nextPoint)) {\n\t\t\t\t\tpath.add(nextPoint);\n\t\t\t\t\tvisited.add(nextPoint);\n\t\t\t\t\tprev.put(nextPoint, current);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn shortestPath;\t\t\n\t}", "public int shortestPath(Village startVillage, Village targetVillage) {\n// setting the initial point 's minimum distance to zera\n startVillage.setMinDistance(0);\n// accourting to bellman ford if there are n number of dots then n-1 iterations to be done to find the minimum distances of every dot from one initial dot\n int length = this.villageList.size();\n// looping n-1 times\n for (int i = 0; i < length - 1; i++) {\n// looping through all the roads and mark the minimum distances of all the possible points\n for (Road road : roadList) {\n\n\n// if the road is a main road then skip the path\n if (road.getWeight() == 900)\n continue; //why 900 ? : just a random hightest number as a minimum distance and same 900 is used as a mix number\n Village v = road.getStartVertex();\n Village u = road.getTargetVertex();\n// if the newly went path is less than the path it used to be the update the min distance of the reached vertex\n int newLengtha = v.getMinDistance() + road.getWeight();\n if (newLengtha < u.getMinDistance()) {\n u.setMinDistance(newLengtha);\n u.setPreviousVertex(v);\n }\n int newLengthb = u.getMinDistance() + road.getWeight();\n if (newLengthb < v.getMinDistance()) {\n v.setMinDistance(newLengthb);\n v.setPreviousVertex(v);\n }\n }\n }\n// finally return the minimum distance\n return targetVillage.getMinDistance();\n }", "private int BFS() {\n adjList.cleanNodeFields();\n\n //Queue for storing current shortest path\n Queue<Node<Integer, Integer>> q = new LinkedList<>();\n\n //Set source node value to 0\n q.add(adjList.getNode(startNode));\n q.peek().key = 0;\n q.peek().d = 0;\n q.peek().visited = true;\n\n //Helper variables\n LinkedList<Pair<Node<Integer, Integer>, Integer>> neighbors;//Array of pairs <neighborKey, edgeWeight>\n Node<Integer, Integer> neighbor, u;\n long speed = (long) (cellSideLength * 1.20);\n\n while (!isCancelled() && q.size() != 0) {\n u = q.poll();\n\n //Marks node as checked\n checkedNodesGC.fillRect((u.value >> 16) * cellSideLength + 0.5f,\n (u.value & 0x0000FFFF) * cellSideLength + 0.5f,\n (int) cellSideLength - 1, (int) cellSideLength - 1);\n\n //endNode found\n if (u.value == endNode) {\n //Draws shortest path\n Node<Integer, Integer> current = u, prev = u;\n\n while ((current = current.prev) != null) {\n shortestPathGC.strokeLine((prev.value >> 16) * cellSideLength + cellSideLength / 2,\n (prev.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2,\n (current.value >> 16) * cellSideLength + cellSideLength / 2,\n (current.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2);\n prev = current;\n }\n return u.d;\n }\n\n //Wait after checking node\n try {\n Thread.sleep(speed);\n } catch (InterruptedException interrupted) {\n if (isCancelled())\n break;\n }\n\n //Checking Neighbors\n neighbors = adjList.getNeighbors(u.value);\n for (Pair<Node<Integer, Integer>, Integer> neighborKeyValuePair : neighbors) {\n neighbor = neighborKeyValuePair.getKey();\n //Relaxation step\n //Checks if neighbor hasn't been checked, if so the assign the shortest path\n if (!neighbor.visited) {\n //Adds checked neighbor to queue\n neighbor.key = u.d + 1;\n neighbor.d = u.d + 1; //Assign shorter path found to neighbor\n neighbor.prev = u;\n neighbor.visited = true;\n q.add(neighbor);\n }\n }\n }\n return Integer.MAX_VALUE;\n }", "@Override\r\n public List<node_info> shortestPath(int src, int dest) {\r\n double i = shortestPathDist(src, dest);\r\n double j, k, s, mark = 1;\r\n ArrayList<node_info> Rlist = new ArrayList<>();\r\n ArrayList<node_info> Llist = new ArrayList<>();\r\n Rlist.clear();\r\n Llist.clear();\r\n j = i;\r\n for (node_info curr : this.Graph.getV()) {\r\n curr.setInfo(\"clear\");\r\n }\r\n this.Graph.getNode(src).setInfo(\"tmp\");\r\n Rlist.add(this.Graph.getNode(dest));\r\n node_info nd = this.Graph.getNode(dest);\r\n node_info temp = this.Graph.getNode(dest);\r\n while (j != 0 && j > 0) {\r\n for (node_info curr0 : this.Graph.getV(nd.getKey())) {\r\n if (curr0.getInfo() != null) {\r\n temp = curr0;\r\n k = this.Graph.getEdge(nd.getKey(), curr0.getKey());\r\n s = j - k;\r\n if ((s - curr0.getTag() < 0.001 && s - curr0.getTag() > -0.001) && nd.getInfo() != null) {\r\n Rlist.add(curr0);\r\n j = curr0.getTag();\r\n curr0.setInfo(\"tmp\");\r\n mark = 1;\r\n nd = curr0;\r\n }\r\n }\r\n }\r\n if (mark == 0) {\r\n i = j;\r\n temp.setInfo(null);\r\n Rlist.clear();\r\n Rlist.add(this.Graph.getNode(dest));\r\n mark = 1;\r\n }\r\n mark = 0;\r\n }\r\n for (int t = (Rlist.size() - 1); t >= 0; t--) {\r\n Llist.add(Rlist.get(t));\r\n }\r\n return Llist;\r\n }", "private static void compareDistanceAndReplace(final DirectedGraph directedGraph,\n final Map<String, Integer> currentShortestPaths,\n final String start) {\n final Map<String, Integer> possibleDestinations = directedGraph.get(start);\n if (possibleDestinations != null) {\n // For each possible edge to this node, check if the distance of this edge plus the value of how\n // we arrived at the start node is smaller than the current value in the table, if so then replace it\n possibleDestinations.forEach((toNode, distance) -> {\n final int valueToCompare = currentShortestPaths.get(start) + distance;\n final Integer currentShortest = currentShortestPaths.get(toNode);\n final boolean currentInfinity = currentShortestPaths.containsKey(toNode) && (currentShortest == null || currentShortest == 0);\n // If the to node we are currently looking at is infinity in our table, then always replace\n // or if there is a real value then compare it\n // and if the new route is shorter then replace it\n if (currentInfinity\n || (containsAndNotNull(currentShortestPaths, toNode) && (currentShortest > valueToCompare))) {\n currentShortestPaths.put(toNode, valueToCompare);\n }\n });\n }\n }", "public double dijkstra(NodoArista[][] adjacencyMatrix, int startVertex, int nodoBuscado, ListaEnlazada lista) {\n int nVertices = adjacencyMatrix[0].length;\n // shortestDistances[i] will hold the shortest distance from src to i\n double[] shortestDistances = new double[nVertices];\n double[] precios = new double[nVertices];\n // added[i] will true if vertex i is included / in shortest path tree or shortest distance from src to i is finalized \n boolean[] added = new boolean[nVertices];\n\n // Initialize all distances as INFINITE and added[] as false \n for (int vertexIndex = 0; vertexIndex < nVertices; vertexIndex++) {\n shortestDistances[vertexIndex] = Integer.MAX_VALUE;\n precios[vertexIndex] = Integer.MAX_VALUE;\n added[vertexIndex] = false;\n }\n // Distance of source vertex from itself is always 0 \n shortestDistances[startVertex] = 0;\n precios[startVertex] = 0;\n // Parent array to store shortest path tree \n int[] parents = new int[nVertices];\n // The starting vertex does not have a parent \n parents[startVertex] = NO_PARENT;\n\n // Find shortest path for all vertices \n for (int i = 1; i < nVertices; i++) {\n // Pick the minimum distance vertex from the set of vertices not yet processed. nearestVertex is always equal to startNode in first iteration. \n int nearestVertex = -1;\n double shortestDistance = Integer.MAX_VALUE;\n double precio = Integer.MAX_VALUE;\n for (int vertexIndex = 0; vertexIndex < nVertices; vertexIndex++) {\n if (!added[vertexIndex] && shortestDistances[vertexIndex] < shortestDistance) {\n nearestVertex = vertexIndex;\n shortestDistance = shortestDistances[vertexIndex];\n precio = precios[vertexIndex];\n }\n }\n\n // Mark the picked vertex as processed \n added[nearestVertex] = true;\n\n // Update dist value of the adjacent vertices of the picked vertex. \n for (int vertexIndex = 0; vertexIndex < nVertices; vertexIndex++) {\n double edgeDistance = adjacencyMatrix[nearestVertex][vertexIndex].getPeso();\n double precioActual = adjacencyMatrix[nearestVertex][vertexIndex].getPrecio();\n double edgePrice = adjacencyMatrix[nearestVertex][vertexIndex].getPrecio();\n if (edgeDistance > 0 && ((shortestDistance + edgeDistance) < shortestDistances[vertexIndex])) {\n parents[vertexIndex] = nearestVertex;\n shortestDistances[vertexIndex] = shortestDistance + edgeDistance;\n precios[vertexIndex] = precio + precioActual;\n }\n if (edgePrice > 0 && ((shortestDistance + edgeDistance) < shortestDistances[vertexIndex])) {\n parents[vertexIndex] = nearestVertex;\n shortestDistances[vertexIndex] = shortestDistance + edgeDistance;\n precios[vertexIndex] = precio + precioActual;\n }\n }\n }\n printSolution(startVertex, shortestDistances, parents);\n printSolutionPara(startVertex, shortestDistances, parents, nodoBuscado, lista);\n\n return precios[nodoBuscado];\n }", "public void computeShortestPath() throws IllegalStateException;", "private List<Pair<Integer, Integer>> getBestPath(Pair<Integer, Integer> curLocation, Pair<Integer, Integer> dest) {\n\t\tList<Pair<Integer, Integer>> path = new LinkedList<Pair<Integer, Integer>>();\n\t\t\n\t\t\n\t\tNode current = new Node(curLocation.getX(), curLocation.getY(), getHitProbability(curLocation.getX(), curLocation.getY()));\n\t\tNode target = new Node(dest.getX(), dest.getY(), getHitProbability(dest.getX(), dest.getY()));\n\t\tList<Node> openSet = new ArrayList<>();\n List<Node> closedSet = new ArrayList<>();\n \n \n while (true) {\n openSet.remove(current);\n List<Node> adjacent = getAdjacentNodes(current, closedSet, target);\n\n // Find the adjacent node with the lowest heuristic cost.\n for (Node neighbor : adjacent) {\n \tboolean inOpenset = false;\n \tList<Node> openSetCopy = new ArrayList<>(openSet);\n \tfor (Node node : openSetCopy) {\n \t\tif (neighbor.equals(node)) {\n \t\t\tinOpenset = true;\n \t\t\tif (neighbor.getAccumulatedCost() < node.getAccumulatedCost()) {\n \t\t\t\topenSet.remove(node);\n \t\t\t\topenSet.add(neighbor);\n \t\t\t}\n \t\t}\n \t}\n \t\n \tif (!inOpenset) {\n \t\topenSet.add(neighbor);\n \t}\n }\n\n // Exit search if done.\n if (openSet.isEmpty()) {\n System.out.printf(\"Target (%d, %d) is unreachable from position (%d, %d).\\n\",\n target.getX(), target.getY(), curLocation.getX(), curLocation.getY());\n return null;\n } else if (/*isAdjacent(current, target)*/ current.equals(target)) {\n break;\n }\n\n // This node has been explored now.\n closedSet.add(current);\n\n // Find the next open node with the lowest cost.\n Node next = openSet.get(0);\n for (Node node : openSet) {\n if (node.getCost(target) < next.getCost(target)) {\n next = node;\n }\n }\n// System.out.println(\"Moving to node: \" + current);\n current = next;\n }\n \n // Rebuild the path using the node parents\n path.add(new Pair<Integer, Integer>(curLocation.getX(), curLocation.getY()));\n while(current.getParent() != null) {\n \tcurrent = current.getParent();\n \tpath.add(0, new Pair<Integer, Integer>(current.getX(), current.getY()));\n }\n \n if (path.size() > 1) {\n \tpath.remove(0);\n }\n \n\t\treturn path;\n\t}", "public String findShortestRoute(char start, char finish) {\r\n PriorityQueue<Vertex> Q = new PriorityQueue<>(new Comparator<Vertex>() {\r\n @Override\r\n public int compare(Vertex v1, Vertex v2) {\r\n return Integer.compare(v1.getDistanceFromStart(), v2.getDistanceFromStart());\r\n }\r\n });\r\n\r\n Vertex startVert = null;\r\n for(Vertex v : listOfVertices) {\r\n if(v.getName() == start) {\r\n v.setDistanceFromStart(0);\r\n v.setPrevious(v);\r\n startVert = v;\r\n }\r\n else {\r\n v.setDistanceFromStart(Integer.MAX_VALUE);\r\n v.setPrevious(null);\r\n }\r\n Q.add(v);\r\n }\r\n if(startVert == null) {\r\n throw new IllegalArgumentException(\"start vertex is not in graph\");\r\n }\r\n\r\n Vertex finishVert = null;\r\n while(!Q.isEmpty()) {\r\n Vertex v = Q.remove(); // remove first vertex in queue, the shortest path has been found to this vertex\r\n if(v.getName() == finish) {\r\n finishVert = v;\r\n break; // finish quicker\r\n }\r\n for(Edge incidentEdge : v.getIncidentEdges()) {\r\n Vertex adjacentVertex = incidentEdge.getOppositeVertex(v);\r\n int alt = v.getDistanceFromStart() + incidentEdge.getDistance();\r\n if(alt < adjacentVertex.getDistanceFromStart()) { // if going through this edge shortens the route to adjacentVertex\r\n adjacentVertex.setDistanceFromStart(alt);\r\n adjacentVertex.setPrevious(v);\r\n Q.remove(adjacentVertex); // increase the priority of adjacent vertices if this vertex shortens their route\r\n Q.add(adjacentVertex);\r\n }\r\n }\r\n }\r\n \r\n // throw exception if finish vertex not found\r\n if(finishVert == null) {\r\n throw new IllegalArgumentException(\"finish vertex is not in graph\");\r\n }\r\n \r\n // build the return value by adding vertex names from finish to start,\r\n // reversing the string, then concatenating the distance\r\n StringBuilder sb = new StringBuilder();\r\n for(Vertex v = finishVert; v != startVert; v = v.getPrevious()) {\r\n sb.append(v.getName());\r\n }\r\n return sb.append(start).reverse().append(finishVert.getDistanceFromStart()).toString();\r\n }", "public static <G extends BaseWeightedGraph<V,E,W>,V,E extends WeightedEdge<V,W>, W extends Number & Comparable<W>> List<E> findShortestPathDouble(G graph, V source, V sink){\r\n\t\t// check graph contains source and sink\r\n\t\tSet<V> vertecies = graph.getVertices();\r\n\t\tif( !(vertecies.contains(source) && vertecies.contains(sink)) ){\r\n\t\t\tthrow new IllegalArgumentException(\"BaseGraph must contain both source and sink\");\r\n\t\t}\r\n\t\t\r\n\t\tPriorityQueue<WeightedPathChain<V,E,W,Double>> pq = new PriorityQueue<WeightedPathChain<V,E,W,Double>>(); \r\n\t\tHashSet<V> checked = new HashSet<V>();\r\n\t\tHashMap<V,WeightedPathChain<V,E,W,Double>> map = new HashMap<V,WeightedPathChain<V,E,W,Double>>();\r\n\t\taddOrUpdate(map,pq,source,Double.valueOf(0));\r\n\t\twhile(!pq.isEmpty()&&!sink.equals(pq.peek().vertex)){\r\n\t\t\tWeightedPathChain<V,E,W,Double> current = pq.poll(); // poll lowest level vertex\r\n\t\t\tchecked.add(current.vertex); // add vertex to checked set\r\n\t\t\tfor (E edge :graph.getOutgoingEdges(current.vertex)){\t// for each outgoing edge \r\n\t\t\t\tif(!checked.contains(edge.getOpposingVertex(current.vertex))){\t\t// if opposing vertex has not been checked \r\n\t\t\t\t\taddOrUpdate(map,\r\n\t\t\t\t\t\t\t\tpq,\r\n\t\t\t\t\t\t\t\tedge.getOpposingVertex(current.vertex),\r\n\t\t\t\t\t\t\t\tDouble.valueOf(map.get(current.vertex).val+edge.getWeight().doubleValue() ) ,\r\n\t\t\t\t\t\t\t\tedge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tArrayList<V> path = new ArrayList<V>(); // vertex path \r\n\t\tArrayList<E> edgePath = new ArrayList<E>(); // edge path\r\n\t\tboolean run = true; \r\n\t\tif(!pq.isEmpty()&&pq.peek().vertex.equals(sink)) { // \r\n\t\t\tWeightedPathChain<V,E,W,Double> vv = pq.poll();\r\n\t\t\tpath.add(vv.vertex);\r\n\t\t\tedgePath.add(vv.edge);\r\n\t\t\twhile(run) {\r\n\t\t\t\tvv = map.get(vv.edge.getOpposingVertex(vv.vertex));\r\n\t\t\t\tif(vv.vertex.equals(source)) {\r\n\t\t\t\t\trun=false;\r\n\t\t\t\t\tpath.add(vv.vertex);\r\n\t\t\t\t}\r\n\t\t\t\telse {\t\r\n\t\t\t\t\tedgePath.add(vv.edge);\r\n\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return path;\r\n\t\t\r\n\t\tCollections.reverse(edgePath);\r\n\t\treturn edgePath;\r\n\t}", "@Test\n void shortestPath() {\n directed_weighted_graph g0 = new DW_GraphDS();\n dw_graph_algorithms ag0 = new DWGraph_Algo();\n node_data n0 = new NodeData(0);\n node_data n1 = new NodeData(1);\n node_data n2 = new NodeData(2);\n node_data n3 = new NodeData(3);\n g0.addNode(n1);\n g0.addNode(n2);\n g0.addNode(n3);\n g0.connect(1, 2, 5);\n g0.connect(2, 3, 3);\n g0.connect(1, 3, 15);\n g0.connect(3, 2, 1);\n ag0.init(g0);\n\n List<node_data> list0 = ag0.shortestPath(1, 1); //should go from 1 -> 1\n int[] list0Test = {1, 1};\n int i = 0;\n for (node_data n : list0) {\n\n assertEquals(n.getKey(), list0Test[i]);\n i++;\n }\n\n List<node_data> list1 = ag0.shortestPath(1, 2); //should go 1 -> 2\n int[] list1Test = {1, 2};\n i = 0;\n for (node_data n : list1) {\n\n assertEquals(n.getKey(), list1Test[i]);\n i++;\n }\n g0.connect(1, 3, 2);\n List<node_data> list2 = ag0.shortestPath(1, 2); //should go 1 -> 3 -> 2\n int[] list2Test = {1, 3, 2};\n i = 0;\n for (node_data n : list2) {\n\n assertEquals(n.getKey(), list2Test[i]);\n i++;\n }\n\n g0.connect(1, 3, 10);\n List<node_data> list3 = ag0.shortestPath(1,3);\n int[] list3Test = {1, 2, 3};\n i = 0;\n for(node_data n: list3) {\n\n assertEquals(n.getKey(), list3Test[i]);\n i++;\n }\n/*\n\n List<node_data> list4 = ag0.shortestPath(1,4);\n int[] list4Test = {1, 4};\n i = 0;\n for(node_data n: list4) {\n\n assertEquals(n.getKey(), list4Test[i]);\n i++;\n }\n\n List<node_data> list5 = ag0.shortestPath(4,1);\n int[] list5Test = {4, 1};\n i = 0;\n for(node_data n: list5) {\n\n assertEquals(n.getKey(), list5Test[i]);\n i++;\n }\n*/\n }", "public static List<GraphEdge<String, String>> shortestPath(Graph<String, String> graph, String src, String dest) {\n // ... implement BFS as described in HW6 ...\n\t Queue<GraphNode<String>> q = new LinkedList<GraphNode<String>>();\n\t \n\t // Each key in m is a visited node\n\t // Each value is a list containing the shortest path from start\n\t Map<GraphNode<String>, List<GraphEdge<String, String>>> m = new HashMap<GraphNode<String>, List<GraphEdge<String, String>>>();\n\t \n\t q.add(graph.getNode(src));\n\t m.put(graph.getNode(src), new ArrayList<GraphEdge<String, String>>());\n\t \n\t //{{Inv: m has a key for every node added to q so far\n\t //\t\t (even those that have since been removed)\n\t //\t The value associated with each key is the shortest path to that node}}\n\t while (!q.isEmpty()) {\n\t\t GraphNode<String> temp = q.remove();\n\t\t if (temp.getData().equals(dest)) {\n\t\t\t return m.get(temp);\n\t\t }\n\t\t \n\t\t Set<GraphEdge<String, String>> set = new TreeSet<GraphEdge<String, String>>();\n\t\t set.addAll(graph.getChildren(temp));\n\t\t \n\t\t for (GraphEdge<String, String> edge : set) {\n\t\t\t if (!m.containsKey(edge.getDestination())) {\n\t\t\t\t List<GraphEdge<String, String>> list = new ArrayList<GraphEdge<String, String>>(m.get(temp));\n\t\t\t\t list.add(edge);\n\t\t\t\t m.put(edge.getDestination(), list);\n\t\t\t\t q.add(edge.getDestination());\n\t\t\t }\n\t\t }\n\t }\n\t \n\t return null;\n }", "static void FindPath(vertex s, vertex[] array){\r\n\t\tvertex v; \r\n\t\tint min = Integer.MAX_VALUE;\r\n\t\t//node wN; vertex wV; //wN= adjacent node in LinkedList; wV= find the values in the vertices for wL\r\n\t\tint j =0;\r\n\t\ts.known = true;\r\n\t\ts.dist = 0;\r\n\t\tShortestPath(s, array);\r\n\t\r\n\t\twhile(j<array.length-1 ){ //&& array[j].known== false){\r\n\t\t\tint count = 0; \r\n\t\t\tmin = Integer.MAX_VALUE;\r\n\t\t\tfor(int i = 0; i<array.length; i++){\r\n\t\t\t\tif(array[i].known== false && array[i].dist < min){\r\n\t\t\t\t\tmin = array[i].dist;\r\n\t\t\t\t\tcount = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tv = array[count];\r\n //System.out.println(\"count: \" + count + \"Next v: \" + v.name);\r\n\t\t\tShortestPath(v, array);\r\n\t\t\tj++; \t\t\r\n }\r\n\t}" ]
[ "0.79563457", "0.7915737", "0.79086435", "0.78188735", "0.7649311", "0.7638876", "0.76002276", "0.75538284", "0.75527674", "0.7529396", "0.7483125", "0.7477229", "0.7460363", "0.7440352", "0.7374221", "0.7351855", "0.73455614", "0.73260343", "0.73044074", "0.73016614", "0.7289658", "0.72747815", "0.7273791", "0.7259484", "0.7247814", "0.7238579", "0.72115636", "0.7164737", "0.7162003", "0.7161573", "0.7147601", "0.7141156", "0.71275187", "0.71265304", "0.7122522", "0.71115047", "0.7096673", "0.70859766", "0.70823467", "0.7068078", "0.70520425", "0.7043681", "0.7036383", "0.702888", "0.701925", "0.7015704", "0.7004215", "0.6999029", "0.69956565", "0.6994166", "0.6970709", "0.69649494", "0.69643474", "0.6956413", "0.6954458", "0.6949888", "0.6944814", "0.6943199", "0.6941856", "0.69350225", "0.69200146", "0.6916803", "0.69077784", "0.6906967", "0.6906206", "0.6903835", "0.69031036", "0.69004655", "0.6880602", "0.6876375", "0.68719417", "0.6868496", "0.6859815", "0.6838944", "0.6829971", "0.6825908", "0.6824071", "0.68225354", "0.68134433", "0.68098414", "0.6802723", "0.6798596", "0.67946774", "0.67894274", "0.67886794", "0.67857915", "0.6773", "0.6767364", "0.6763263", "0.6762199", "0.67590755", "0.6758243", "0.6757341", "0.6743879", "0.67435247", "0.67432725", "0.67430586", "0.6740548", "0.6740086", "0.6737597", "0.6735427" ]
0.0
-1
Creates new form Usuario
public ViewPerfil() { initComponents(); carregaperfil(); setLocationRelativeTo(null); habilitarDesabilitarCampos(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Usuario() {\r\n }", "public Usuario() {\r\n }", "public Usuario () {\r\n\t\t\r\n\t\t\r\n\t}", "public UsuarioControlador() {\n }", "@RequestMapping( method = RequestMethod.GET )\n\tpublic String showUserForm( ModelMap model, HttpServletRequest request ) {\n\t\tUsuario usuario = new Usuario();\n\t\tmodel.addAttribute( \"usuario\", usuario );\n\t\treturn \"Formulario\";\n\t}", "@Override\n\tpublic Usuario createUsuario(Usuario usr) {\n\t\treturn null;\n\t}", "public void cadastrarUsuario(View view){\n String textoNome= campoNome.getText().toString();\n String textoEmail= campoEmail.getText().toString();\n String textoSenha= campoSenha.getText().toString();\n\n\n if(!textoNome.isEmpty()){\n if(!textoEmail.isEmpty()){\n if(!textoSenha.isEmpty()){\n Usuario usuario = new Usuario();\n usuario.setNome(textoNome);\n usuario.setEmail(textoEmail);\n usuario.setSenha(textoSenha);\n salvarUsuario(usuario);\n\n home();\n finish();\n }else{ exibirMensagem(\"preencha sua senha\"); }\n }else{ exibirMensagem(\"preencha seu email\"); }\n }else{ exibirMensagem(\"Digite seu nome\"); }\n }", "public CrearCuenta(UsuarioVO usu) {\r\n\t\tsuper();\r\n\t\tlogger.trace(\"Constructor CrearCuenta\");\r\n\t\tinitialize();\r\n\t\tthis.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tusuario = usu;\r\n\t}", "public frmUsuarios() {\n initComponents();\n mostrar(\"\");\n inhabilitar();\n }", "@Override\n\tpublic Usuario create(Usuario obj) {\n\t\treturn null;\n\t}", "private void newUser(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\ttry {\n\t\t\tPrintWriter out = res.getWriter();\n\t\t\tString name = req.getParameter(Constants.NAME_USER);\n\t\t\tUserDB.introduceUser(name);\n\t\t\tlong id = UserDB.getUserId(name);\n\t\t\tUsuario u = new Usuario(name, Long.toString(id));\n\t\t\tout.print(gson.toJson(u));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tres.setStatus(HttpServletResponse.SC_BAD_REQUEST);\n\t\t}\n\t}", "@FXML\n\tpublic void createUser(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString name = txtUserNames.getText();\n\t\tString lastName = txtUserSurnames.getText();\n\t\tString id = txtUserId.getText();\n\t\tString username = txtUserUsername.getText();\n\t\tString password = PfUserPassword.getText();\n\n\t\tif (!name.equals(empty) && !lastName.equals(empty) && !id.equals(empty) && !username.equals(empty)\n\t\t\t\t&& !password.equals(empty)) {\n\t\t\tcreateSystemUser(name, lastName, id, username, password);\n\t\t\ttxtUserNames.setText(\"\");\n\t\t\ttxtUserSurnames.setText(\"\");\n\t\t\ttxtUserId.setText(\"\");\n\t\t\ttxtUserUsername.setText(\"\");\n\t\t\tPfUserPassword.setText(\"\");\n\t\t\t// labelUserMessage.setText(\"The user has been created\");\n\t\t} else if (name.equals(empty) && lastName.equals(empty) && id.equals(empty) && username.equals(empty)\n\t\t\t\t&& password.equals(empty)) {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.setContentText(\"Todos los campos de texto deben ser llenados\");\n\t\t\tdialog.show();\n\t\t}\n\t}", "@Override\n\tpublic void crearUsuario(UsuarioEntity Usuario) {\n\t\treposUsuarios.save(Usuario);\n\t}", "public ControladorUsuario() {\n }", "@PostMapping(\"/users\")\n public Transportador createUser(@Valid @RequestBody Transportador user) {\n return transportadorRepository.save(user);\n }", "public Usuario(String usuario, String contrasena) {\n \tthis.usuario = usuario;\n \tthis.contrasena = contrasena;\n }", "public Usuario(int idUsuario, String nome, String email, String telefone, int motorista){\n\t\tthis.idUsuario = idUsuario;\n\t\tthis.nome = nome;\n\t\tthis.email = email;\n\t\tthis.telefone = telefone;\n\t\tthis.motorista = motorista;\n\t}", "public VentanaDialogRegister(ListadoUsuarios listadoUsuarios) {\n\t\tgetContentPane().setLayout(null);\n\t\t\n\t\tthis.listadoUsuarios = listadoUsuarios;\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBackground(new Color(0, 139, 139));\n\t\tpanel.setBounds(0, 0, 444, 271);\n\t\tgetContentPane().add(panel);\n\t\tpanel.setLayout(null);\n\t\t\n\t\ttxtContrasea = new JPasswordField();\n\t\ttxtContrasea.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtContrasea.setBounds(183, 114, 113, 23);\n\t\tpanel.add(txtContrasea);\n\t\ttxtContrasea.setColumns(10);\n\t\t\n\t\ttxtNombreDeUsuario = new JTextField();\n\t\ttxtNombreDeUsuario.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtNombreDeUsuario.setBounds(183, 73, 113, 30);\n\t\tpanel.add(txtNombreDeUsuario);\n\t\ttxtNombreDeUsuario.setColumns(10);\n\t\t\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Registrar\");\n\t\t\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\n\t\t\t\t\tauxUsuario = listadoUsuarios.buscarUnUsuario(txtNombreDeUsuario.getText());\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(auxUsuario==null){\n\t\t\t\t\tauxUsuario= new Usuario();\n\t\t\t\t\tauxUsuario.setAdmin(false);\n\t\t\t\t\tauxUsuario.setNombreU(txtNombreDeUsuario.getText());\n\t\t\t\t\tauxUsuario.setClave(txtContrasea.getText());\n\t\t\t\t\tlistadoUsuarios.agregarUsuario(auxUsuario);\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"USUARIO REGISTRADO\");\n\t\t\t\t\tdispose();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\"ERROR! ESE NOMBRE DE USUARIO YA EXISTE\");\n\t\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(172, 205, 124, 30);\n\t\tpanel.add(btnNewButton);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"REGISTRO DE USUARIOS\");\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tlblNewLabel.setBounds(134, 11, 196, 37);\n\t\tpanel.add(lblNewLabel);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Nombre de Usuario:\");\n\t\tlblNewLabel_1.setFont(new Font(\"Trebuchet MS\", Font.BOLD, 14));\n\t\tlblNewLabel_1.setBounds(54, 76, 128, 23);\n\t\tpanel.add(lblNewLabel_1);\n\t\t\n\t\tJLabel lblNewLabel_1_1 = new JLabel(\"Clave:\");\n\t\tlblNewLabel_1_1.setFont(new Font(\"Trebuchet MS\", Font.BOLD, 14));\n\t\tlblNewLabel_1_1.setBounds(119, 113, 79, 23);\n\t\tpanel.add(lblNewLabel_1_1);\n\t}", "public Usuario(){\n nombre = null;\n apellidos = null;\n dni = null;\n email = null;\n tlf = null;\n nombreUsuario = null;\n tarjetaCredito = null;\n hashPasswd = null; \n fotoPerfil = null;\n direccion = null;\n valoracionMedia = -1;\n }", "@PostMapping(value=\"/usuarios\")\n\t@Transactional //gera transacao no banco de dados\n\tpublic String cria(@RequestBody @Valid NovoUsuarioRequest request) {\n\t\tUsuario novoUsuario = request.toUsuario();\n\t\tmanager.persist(novoUsuario);//insere no banco de dados\n\t\treturn novoUsuario.toString();\n\t}", "public void crearUsuario(String cedula,String name ,String lastname ,String phone , String city ,String email,String password) throws BLException;", "@Secured(\"ROLE_ADMIN\")\n\t@PostMapping(value= \"/usuario\")\n public ResponseEntity<Profesional> createUsuario(@RequestBody Registro registro,BindingResult bindingResult){\n \tRole rol = roleService.findOne((long) 3);\n \tProfesional profesional = registro.getProfesional();\n try {\n \tprofesional.setEstado_profesional(estadoProfService.findOne((long) 1));// se le da el estado habilitado\n \tprofesionalService.save(profesional);\n \tregistro.getUsuario().setPassword(passwordEncoder.encode(registro.getUsuario().getPassword()));\n \tregistro.getUsuario().setEnable(true);\n \tusuarioService.save(registro.getUsuario());\n \t usuarioService.saveUsuario_Roles(registro.getUsuario().getId_Usuario(),rol.getId_Role() );\n }catch(DataAccessException e) {\n return new ResponseEntity<Profesional>(HttpStatus.INTERNAL_SERVER_ERROR);\n }\n return new ResponseEntity<Profesional>(profesional,HttpStatus.CREATED);\n }", "public Usuario(String idUsuario, String contrasena) {\n\t\tsuper();\n\t\tthis.idUsuario = idUsuario;\n\t\tthis.contrasena = contrasena;\n\t}", "@RequestMapping(value = \"/registro\", method = RequestMethod.POST)\r\n public @ResponseBody InfoEntity añadirUsuario(@RequestBody Usuario usuario) {\r\n\r\n if (this.usuarioRepository.findById(usuario.getUsername()).isPresent()) { return new InfoEntity(HttpStatus.NOT_FOUND,\"Usuario duplicado\"); }\r\n\r\n this.usuarioRepository.save(usuario);\r\n\r\n return new InfoEntity(HttpStatus.OK,\"Usuario creado\", usuario);\r\n\r\n }", "public login() {\n\n initComponents();\n \n usuarios.add(new usuarios(\"claudio\", \"claudioben10\"));\n usuarios.get(0).setAdminOno(true);\n \n }", "public FrmCadUsuario() {\n initComponents();\n Connection conexao = new Conexao().getConnection();\n\n txtId.setEnabled(false);\n lista = usuarioController.getUsuarios();\n if (lista.isEmpty()) {\n JOptionPane.showMessageDialog(null, \"Ainda não foram cadastrados usuários\");\n } else {\n mostrarDados();\n }\n }", "public void createUser() {\r\n\t\tif(validateUser()) {\r\n\t\t\t\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"INSERT INTO t_user (nom,prenom,userName,pass,tel,type,status) values(?,?,?,?,?,?,?)\");\r\n\t\t\t\tps.setString(1, this.getNom());\r\n\t\t\t\tps.setString(2, this.getPrenom());\r\n\t\t\t\tps.setString(3, this.getUserName());\r\n\t\t\t\tps.setString(4, this.getPassword());\r\n\t\t\t\tps.setInt(5, Integer.parseInt(this.getTel().trim()));\r\n\t\t\t\tps.setString(6, this.getType());\r\n\t\t\t\tps.setBoolean(7, true);\r\n\t\t\t\tps.executeUpdate();\r\n\t\t\t\tnew Message().error(\"Fin d'ajout d'utilisateur\");\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tnew Message().error(\"Echec d'ajout d'utilisateur\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closePrepareStatement(ps);\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public UsuarioControlador() {\r\n\t\tsuper(Usuario.class);\r\n\t}", "private void inserirUsuario(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tString nome = request.getParameter(\"nome\");\n\t\tString email = request.getParameter(\"email\");\n\t\tint telefone = Integer.parseInt (request.getParameter(\"telefone\"));\n\t\tString nacionalidade = request.getParameter(\"nacionalidade\");\n\t\tUsuario novoUsuario = new Usuario(nome, email, telefone, nacionalidade);\n\t\tdao.inserirUsuario(novoUsuario);\n\t\tresponse.sendRedirect(\"lista\");\n\t}", "public void createUser() throws ServletException, IOException {\n\t\tString fullname = request.getParameter(\"fullname\");\n\t\tString password = request.getParameter(\"password\");\n\t\tString email = request.getParameter(\"email\");\n\t\tUsers getUserByEmail = productDao.findUsersByEmail(email);\n\t\t\n\t\tif(getUserByEmail != null) {\n\t\t\tString errorMessage = \"we already have this email in database\";\n\t\t\trequest.setAttribute(\"message\", errorMessage);\n\t\t\t\n\t\t\tString messagePage = \"message.jsp\";\n\t\t\tRequestDispatcher requestDispatcher = request.getRequestDispatcher(messagePage);\n\t\t\trequestDispatcher.forward(request, response);\n\t\t}\n\t\t// create a new instance of users class;\n\t\telse {\n\t\t\tUsers user = new Users();\n\t\t\tuser.setPassword(password);\n\t\t\tuser.setFullName(fullname);\n\t\t\tuser.setEmail(email);\n\t\t\tproductDao.Create(user);\n\t\t\tlistAll(\"the user was created\");\n\t\t}\n\n\t\t\n\t}", "public void registrarUsuario(String cedula, String nombre, String apellido, String correo, String contrasena) {\n\n usuario = new Usuario(cedula, nombre, apellido, correo, contrasena);\n usuarioDAO.create(usuario);\n\n }", "public UsuarioForm(java.awt.Frame parent, boolean modal, Usuarios usuario) {\n super(parent, modal);\n initComponents(); \n this.usuario = usuario;\n llenarDatos();\n }", "@RequestMapping(\"/newuser\")\r\n\tpublic ModelAndView newUser() {\t\t\r\n\t\tRegister reg = new Register();\r\n\t\treg.setUser_type(\"ROLE_INDIVIDUAL\");\r\n\t\treg.setEmail_id(\"[email protected]\");\r\n\t\treg.setFirst_name(\"First Name\");\r\n\t\treg.setCity(\"pune\");\r\n\t\treg.setMb_no(new BigInteger(\"9876543210\"));\r\n\t\treturn new ModelAndView(\"register\", \"rg\", reg);\r\n\t}", "public CadastroUsuario() {\n initComponents();\n }", "public M6_UsuarioNuevo() {\n initComponents();\n }", "@Override\n\tpublic Usuario mostrar() {\n\t\tLOG.info(\"Mostrar los datos del usuario\");\n\t\treturn usuario;\n\t}", "public Usuario() {\n initComponents();\n setLocationRelativeTo(null);\n refrescar();\n }", "@PostMapping(\"/user/new/\")\n\tpublic userprofiles createUser(@RequestParam String firstname, @RequestParam String lastname, @RequestParam String username, @RequestParam String password, @RequestParam String pic) {\n\t\treturn this.newUser(firstname, lastname, username, password, pic);\n\t}", "public void createUtilisateur(UtilisateurBean u) {\n\t}", "public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}", "Utilizator createUser(String username, String password, String nume,\n\t\t\tString prenume, String tip, String aux);", "public Usuarios() {\n initComponents();\n setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);\n panel_usuarios a = new panel_usuarios();\n a.setSize(this.getSize());\n this.add(a);\n this.setLocationRelativeTo(null);\n this.cargarUsuarios();\n usuario.requestFocus();\n }", "public editarUsuarioBean() {\r\n }", "@RequestMapping(value = \"/crearusuario\", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)\n public CommonsResponse createuser(@RequestParam String llave_seguridad, @RequestBody NewUserInputDTO request, HttpServletRequest requestTransaction)\n {\n CommonsResponse response = new CommonsResponse();\n Map<String, String> mapConfiguration = null;\n try\n {\n logger.debug(\"Se valida la licencia si puede consumir los procesos.\");\n mapConfiguration = GatewayBaseBean.validateLicenceToWS(llave_seguridad, webUtils.getClientIp(requestTransaction));\n\n userServices.createUser(mapConfiguration, request);\n }\n catch (ParamsException ex)\n {\n response.toParamsWarn(messageSource, KEY_ERRORS_GENERIC + ex.getCode());\n logger.error(\"Parametros de Licencia Errados WS [crearusuarioisoft], key[\"+llave_seguridad+\"].\", ex);\n return response;\n }\n catch (LicenseException ex)\n {\n response.toLicenceWarn(messageSource, KEY_ERRORS_GENERIC + ex.getCode(), llave_seguridad);\n logger.error(\"Parametros de Licencia Errados WS [consultarusuariossistema], key[\"+llave_seguridad+\"].\", ex);\n return response;\n }\n catch (ServiceException ex)\n {\n response.toParamsWarn(messageSource, KEY_ERRORS_GENERIC + ex.getCode());\n logger.warn(\"Error de Servicio WS [crearusuarioisoft].\", ex);\n return response;\n }\n catch (Exception ex)\n {\n logger.error(\"Error Generico en WS [crearusuarioisoft].\", ex);\n GatewayBaseBean.matchToResponses(response);\n return response;\n }\n logger.info(\"Se retorna respuesta efectiva del WS [crearusuario].\");\n return response.toOk();\n }", "public Usuario(String nome, String email, String celular, String classe,String identificacao,String status) {\n\t\t\n\t\tthis.nome = nome;\n\t\tthis.email = email;\n\t\tthis.celular = celular;\n\t\tthis.classe = classe;\n\t\tthis.identificacao = identificacao;\n\t\tthis.status = status;\n\t\t\n\t}", "@Override\n public void onClick(View v) {\n trasferisci_utente();\n\n // controlla se tutti i dati sono inseriti\n if (checkInput())\n {\n creaUser();\n NOME = username.getText().toString();\n CHIAVE = password.getText().toString();\n\n // controlla se l'utente USER con i dati inseriti negli edit_text è gia presente\n if (checkUser(persone, NOME, CHIAVE)) {\n\n errore_utente.setVisibility(View.GONE);\n\n // impedisce a due utenti di avere lo stesso username\n if(checkUsername(persone, NOME)) {\n\n errore_duplicato_username.setVisibility(View.GONE);\n\n persone.add(user);\n\n Intent showResult = new Intent(Registration.this, MainActivity.class);\n showResult.putExtra(PERSONA_PATH, persone);\n //showResult.putExtra(UTENTE_PATH, user);\n startActivity(showResult);\n } else {\n errore_duplicato_username.setVisibility(View.VISIBLE);\n }\n } else {\n errore_utente.setVisibility(View.VISIBLE);\n }\n }\n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tUsuarioPojo user = null;\r\n\t\t\t\tUsuarioPersistencia up = new UsuarioPersistencia();\r\n\r\n\t\t\t\t//int id = up.obtenerIdEmple();\r\n\t\t\t\tString usuarioMail = txtUsuario.getText();\r\n\t\t\t\tString password = new String(pwdPass.getPassword()); // DNI de momento\r\n\t\t\t\tString passwordC = new String(pwdConfPass.getPassword());\r\n\t\t\t\tString apenom = txtApenom.getText();\r\n\t\t\t\tString dni = txtDni.getText();\r\n\t\t\t\tint numSS = Integer.parseInt(txtSegSoc.getText());\r\n\t\t\t\tString cuenta = txtCuenta.getText();\r\n\r\n\t\t\t\tif (password.equals(passwordC)) {\r\n\t\t\t\t\t// creamos un objeto usuario si coinciden las contraseñas\r\n\t\t\t\t\tuser = new UsuarioPojo(apenom, numSS, cuenta, dni, usuarioMail, password);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (user != null) {\r\n\t\t\t\t\t// insertaremos el usuario si coinciden las contraseñas\r\n\t\t\t\t\tup = new UsuarioPersistencia();\r\n\t\t\t\t\tint res = up.insertarUser(user);\r\n\r\n\t\t\t\t\tif (res == 1) { // se habrá registrado al usuario\r\n\t\t\t\t\t\tSystem.out.println(\"Insertado correctamente\");\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Registro insertado correctamente\",\r\n\t\t\t\t\t\t\t\t\"Resultado del Registro\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\t\tdispose(); // dispose cierra ventana actual, System.exit(0) sale del programa\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// mostramos msg si no coinciden las contraseñas, manteniendo el control en dreg\r\n\t\t\t\t\tSystem.out.println(\"No insertado\");\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Contraseñas introducidas no coinciden\", \"Error de contraseña\",\r\n\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\t// limpiamos campos de contraseña\r\n\t\t\t\t}\r\n\t\t\t}", "public ListaUsuario() {\n initComponents();\n\n exibir();\n }", "public Login() {\n usuario = new Usuario2();\n }", "public Registro_Usuario() {\r\n System.out.println(\"hola mundo \");\r\n initComponents();\r\n System.out.println(\"hola\");\r\n }", "@RequestMapping(value = \"/create\", method = { RequestMethod.POST })\r\n\tpublic ModelAndView create(HttpServletRequest request,\r\n\t\t\t@Valid @ModelAttribute(\"registerForm\") final UserRegisterForm form, final BindingResult errors,\r\n\t\t\tfinal @RequestParam CommonsMultipartFile[] fileUpload) {\r\n\t\tthis.userValidator.validate(form, errors);\r\n\t\tif (errors.hasErrors()) {\r\n\t\t\treturn register(form);\r\n\t\t}\r\n\t\t/*\r\n\t\t * Recoger los datos\r\n\t\t */\r\n\t\tInteger idTipo = null;\r\n\t\tString avatarTipo = \"\";\r\n\t\ttry {\r\n\t\t\tavatarTipo = request.getParameter(\"avatar_tipo\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tavatarTipo = \"0\";\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tidTipo = Integer.valueOf(avatarTipo);\r\n\t\t} catch (NumberFormatException ex) {\r\n\t\t\tidTipo = 0;\r\n\t\t}\r\n\t\t/*\r\n\t\t * Crear el usuario\r\n\t\t */\r\n\t\tUser user = us.createUser(form.getTelf(), form.getEmail(), form.getCity(), form.getCountry(), form.getCode(),\r\n\t\t\t\tform.getUsername(), passwordEncoder.encode(form.getPassword()), form.getDireccion(), idTipo, \"\",\r\n\t\t\t\tfileUpload, form.getLat(), form.getLon());\r\n\t\t/*\r\n\t\t * Comprovar el login del usuario\r\n\t\t */\r\n\t\tboolean login = false;\r\n\t\ttry {\r\n\t\t\tlogin = autoLogin(form.getUsername(), form.getPassword(), request);\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn (new ModelAndView(\"error\"))\r\n\t\t\t\t\t.addObject(\"body\",\r\n\t\t\t\t\t\t\tmessageSource.getMessage(\"error.403.title\", null, LocaleContextHolder.getLocale()))\r\n\t\t\t\t\t.addObject(\"title\",\r\n\t\t\t\t\t\t\tmessageSource.getMessage(\"error.403.body\", null, LocaleContextHolder.getLocale()));\r\n\t\t}\r\n\t\tif (login) {\r\n\t\t\treturn new ModelAndView(\"redirect:/users/\" + user.getUserId());\r\n\t\t}\r\n\t\treturn new ModelAndView(\"redirect:/users/login\");\r\n\t}", "@Generated\n public Usuarios() {\n }", "public Cliente registroUsuario(Ventana vis, Modelo mod) {\n\t\tJTextField dni = vis.panelLogin.textFieldDNI;\n\t\tJTextField nombre = vis.panelLogin.textFieldNombre;\n\t\tJTextField apellido = vis.panelLogin.textFieldApellido;\n\t\tDate fechaNac = vis.panelLogin.calendarioFechaNac.getDate();\n\t\tchar sexo = cambiarSexoAChar(vis.panelLogin.cmbBoxSexo);\n\t\tfinal char[] contra = vis.panelLogin.passFieldContrasenia.getPassword();\n\t\tif (validarSoloLetras(nombre) && validarSoloLetras(apellido) && (nombre.getText().length() > 0) && (apellido.getText().length() > 0) && validarDNI(dni) && validarFecha(fechaNac) && validarContrasenia(contra)) {\n\t\t\tif (comprobarDNIenBD(vis.panelLogin.textFieldDNI.getText(), mod) == false) {\n\t\t\t\treturn (new Cliente(dni.getText(), nombre.getText(), apellido.getText(), fechaNac, sexo, encriptarContra(contra)));\n\t\t\t} else {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"El usuario introducido ya esta registrado, porfavor inicie sesion\", \"Usuario ya registrado\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public TelaCadastrarUsuarios() {\n initComponents();\n carregarTabela();\n carregarComboBoxFuncionarios();\n carregarImagens();\n }", "public VistaUsuarioContenido() {\n initComponents();\n }", "@PostMapping(value = \"/utilisateur/create\")\n public String saveNewUtilisateur(Model model, @Valid Utilisateur utilisateur, BindingResult bindingResult){\n if (utilisateurRepository.findByUsername(utilisateur.getUsername())==null && utilisateurRepository.findByEmail(utilisateur.getEmail())==null){\n utilisateur.getRoles().add(RoleEnum.ROLE_USER);\n utilisateurRepository.save(utilisateur);\n model.addAttribute(\"utilisateur\",utilisateur);\n logger.info(\"L'utilisateur \"+utilisateur.getUsername()+\" a été ajouté a la DB\");\n return \"confirmationUtilisateur\";\n }else{\n if (utilisateurRepository.findByUsername(utilisateur.getUsername().toLowerCase())!=null ){\n bindingResult.rejectValue(\"username\",\"utilisateur.username\", \"ce pseudo est déjà utilisé :(\");\n }\n if (utilisateurRepository.findByEmail(utilisateur.getEmail().toLowerCase())!=null){\n bindingResult.rejectValue(\"email\",\"utilisateur.email\", \"cet e-mail est déjà associé à un autre compte :(\");\n }\n model.addAttribute(\"utilisateur\",utilisateur);\n return \"inscription\";\n }\n }", "public Usuario(String nickUsuario, String nombreUsuario, String correoUsuario) {\r\n this.nickUsuario = nickUsuario;\r\n this.nombreUsuario = nombreUsuario;\r\n this.correoUsuario = correoUsuario;\r\n }", "public UsuarioMB() {\n }", "public ResultadoDTO crearUsuario(UsuarioDTO UsuarioDTO)throws EntityExistsException, IllegalArgumentException;", "public void creatUser(String name, String phone, String email, String password);", "public UsuariosBean() {\n }", "public void altaUsuario();", "@POST\n\t@Path(\"/verificar\")\n\t@Consumes(MediaType.APPLICATION_FORM_URLENCODED)\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic RespuestaDTO login(@FormParam(value = \"usuario\") String usuario,\n\t\t\t@FormParam(value = \"contrasenia\") String contrasenia) {\n\t\tUsuario u = loginEJB.buscarUsuario(usuario, contrasenia);\n\t\tif (u != null) {\n\t\t\tString token = UUID.randomUUID().toString();\n\t\t\ttokens.put(token, u.getId());\n\t\t\tLoginOutDTO obj = new LoginOutDTO(token, usuario, u.getId() + \"\");\n\t\t\treturn new RespuestaDTO(obj);\n\t\t} else {\n\t\t\treturn new RespuestaDTO(null, \"Usuario o contraseņa incorrectos\", \"-1\");\n\t\t}\n\t}", "public void setUsuarioCreacion(\n\t\t\tec.com.smx.frameworkv2.security.dto.UserDto usuarioCreacion1) {\n\t\tthis.usuarioCreacion = usuarioCreacion1;\n\t}", "@PostMapping(\"/usuarios\")\n\t public void add(@RequestBody Usuario usuarios) {\n\t service.save(usuarios);\n\t }", "public User createUser() {\n printer.println(\"Welcome! Enter you name and surname:\");\n printer.println(\"Name:\");\n String name = input.nextString();\n printer.println(\"Surname:\");\n String surname = input.nextString();\n return new User(name, surname);\n }", "public void createUser() {\n try {\n conn = dao.getConnection();\n\n ps = conn.prepareStatement(\"INSERT INTO Users(username, password) VALUES(?, ?)\");\n ps.setString(1, this.username);\n ps.setString(2, this.password);\n\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public OmsUsuario() {\n\t}", "private void entrar() {\n\n Connection con = Conexao.abrirConexao();\n UsuarioDAO ud = new UsuarioDAO(con);\n String login = txtLOGIN.getText();\n String senha = txtSENHA.getText();\n String nome;\n\n if (txtLOGIN.getText().equals(\"admin\")) {\n nome = \"Administrador\";\n } else {\n nome = ud.retornarUsuario(login);\n }\n\n if (/*ud.logar(login, senha) == 0 ||*/ login.equals(\"admin\") && senha.equals(\"admin\")) {\n lblERRO.setText(\"\");\n JFrame principal = new frm_PRINCIPAL(login, nome);\n this.dispose();\n principal.setVisible(true);\n\n } else {\n\n lblERRO.setText(\"Usuário e/ou Senha Inválidos!\");\n }\n Conexao.fecharConexao(con);\n }", "public void setUsuario(String usuario) {\r\n this.usuario = usuario;\r\n \r\n }", "@RequestMapping(value = \"/createUser\", method = RequestMethod.GET)\n\tpublic ModelAndView createUser(ModelMap model) throws CustomException {\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\t\tCollection<EndUser> endUsers = endUserDAOImpl.getList();\n\t\tList<Role> roles = endUserDAOImpl.findAll();\n\t\tmodel.put(\"roles\", roles);\n\n\t\tmodel.put(\"endUsers\", endUsers);\n\t\treturn new ModelAndView(\"createUser\", \"model\", model);\n\t}", "public void register(String form /* should be a Form from GUI */){\n String email = \"email\";\n String nome_completo = \"full_name\";\n Date data_nascimento = new Date(1996-10-21);\n String password = getMd5(\"password\");\n String nif = \"nif\";\n String morada = \"morada\";\n String telemovel = \"telemovel\";\n User user = new User(email);\n if (!user.exists()){\n user.setNome_completo(nome_completo);\n user.setData_nascimento(data_nascimento);\n user.setPassword(password);\n user.setNif(nif);\n user.setMorada(morada);\n user.setTelemovel(telemovel);\n user.setAdmin(FALSE);\n //System registers person\n //db.register(user)\n }\n }", "public void setUsuario(String usuario) {\r\n this.usuario = usuario;\r\n }", "public void setUsuario(String usuario) {\r\n this.usuario = usuario;\r\n }", "private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }", "public String nuevo() {\n\n\t\tLOG.info(\"Submitado formulario, accion nuevo\");\n\t\tString view = \"/alumno/form\";\n\n\t\t// las validaciones son correctas, por lo cual los datos del formulario estan en\n\t\t// el atributo alumno\n\n\t\t// TODO simular index de la bbdd\n\t\tint id = this.alumnos.size();\n\t\tthis.alumno.setId(id);\n\n\t\tLOG.debug(\"alumno: \" + this.alumno);\n\n\t\t// TODO comprobar edad y fecha\n\n\t\talumnos.add(alumno);\n\t\tview = VIEW_LISTADO;\n\t\tmockAlumno();\n\n\t\t// mensaje flash\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\tExternalContext externalContext = facesContext.getExternalContext();\n\t\texternalContext.getFlash().put(\"alertTipo\", \"success\");\n\t\texternalContext.getFlash().put(\"alertMensaje\", \"Alumno \" + this.alumno.getNombre() + \" creado con exito\");\n\n\t\treturn view + \"?faces-redirect=true\";\n\t}", "public Usuario(String nickUsuario, String nombreUsuario, String correoUsuario, String passUsuario) {\r\n this.nickUsuario = nickUsuario;\r\n this.nombreUsuario = nombreUsuario;\r\n this.correoUsuario = correoUsuario;\r\n this.passUsuario = passUsuario;\r\n }", "public vistaEjemplo() {\n initComponents();\n con=new Conexion();\n data = new Datas(con);\n usuario = new Usuario();\n jTApellido.setEnabled(false);\n jTMail.setEnabled(false);\n jTNombre.setEnabled(false);\n jTPassword.setEnabled(false);\n JdcFechaDeEntrada.setEnabled(false);\n jBPdf.setEnabled(false);\n }", "public String guardarUsuario() {\n\t\terror=\"\";\n\t\tUsuario nuevoUsuario = new Usuario();\n\t\tnuevoUsuario.setPassword(password);\n\t\tnuevoUsuario.setEmail(email);\n\t\tTokenGenerator miToken = new TokenGenerator();\n\t\tnuevoUsuario.setToken(miToken.generateToken());\n\t\t\n\t\tif(usuarioService.validaUsuarioEmail(nuevoUsuario)==true && usuarioService.validaUsuarioPassword(nuevoUsuario)==true && usuarioService.contraseñasComunes(nuevoUsuario)==true) {\n\t\t\terror=null;\n\t\t\tusuarioService.guardarUsuario(nuevoUsuario);//se guarda usuairo\n\t\t\tUsuario usuarioDb = usuarioService.buscarUsuarioPorEmailyContraseña(nuevoUsuario.getEmail(), nuevoUsuario.getPassword());\n\t\t\tif (usuarioDb != null) {\n\t\t\t\tString accion = \"Usuario \"+ usuarioDb.getEmail() + \" registrado.\";\n\t\t\t\tauditoriaService.registrarAuditoria(usuarioDb,accion);\n\t\t\t}\n\t\t\terror=\"Se envio un correo a su cuenta.\";\n\t\t\treturn \"index\";\n\t\t}\n\t\tUsuario usuarioDb = usuarioService.buscarUsuarioPorEmailyContraseña(nuevoUsuario.getEmail(), nuevoUsuario.getPassword());\n\t\tif(usuarioDb==null) {\n\t\t\tString accion = \"Error al registrar usuario \"+email;\n\t\t\tauditoriaService.registrarAuditoria(usuarioDb,accion);\n\t\t}\n\t\terror=\"Email o Contraseña no validos\";\n\t\treturn \"registro\";\n\t}", "public void registrarUsuarioFinal(){\r\n Usuario nuevoUsuario= new Usuario();\r\n nuevoUsuario.setNombreUsuario(nuevoNombreUsuario);\r\n nuevoUsuario.setPassword(nuevoPasswordUsuario);\r\n nuevoUsuario.setTipoUsuario(\"final\");\r\n \r\n IUsuarioDAO iusuarioDAO = new UsuarioDAOImp();\r\n iusuarioDAO.agregarUsuario(nuevoUsuario);\r\n FacesMessage facesMessage = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Usuario registrado\", \"Usuario registrado exitosamente\");\r\n FacesContext.getCurrentInstance().addMessage(null, facesMessage);\r\n\r\n }", "public NewUser() {\n initComponents();\n }", "private void btnAgregarUsuarioActionPerformed(java.awt.event.ActionEvent evt) {\n String v_nombre=\" \";\n\n if(txtNombreAU.getText().length()==0){\n Utilidades.mensajeInformacion(\"Digite un nombre, por favor\", \"Informacion\");\n return;\n }\n v_nombre=txtNombreAU.getText(); \n //Valido la contrasenia\n if(txtContraseniaAU.getText().length()==0){\n Utilidades.mensajeInformacion(\"Es obligatorio ingresar una contraseña\", \"Informacion\");\n return;\n }\n if(!validarContraseniaUsuario(txtContraseniaAU.getText())){\n return;\n }\n String v_contrasenia=txtContraseniaAU.getText();\n //Valido nombre completo\n if(txtNombreCompletoAU.getText().length()==0){\n Utilidades.mensajeInformacion(\"Es obligatorio ingresar el nombre completo\", \"Informacion\");\n return;\n }\n String v_nombreCompleto=txtNombreCompletoAU.getText();\n \n //Valido que se escogio un valor para el cargo\n int v_cargo=0;\n //10 = Administrador, 20=Funcionario\n if(rbtnAdministradorAU.isSelected()){\n v_cargo=10;\n }else if(rbtnFuncionarioAU.isSelected()){\n v_cargo=20;\n }else{\n Utilidades.mensajeInformacion(\"Escoga un cargo\", \"Informacion\");\n return;\n }\n \n //Creo y agreggo un usuario dependiendo del cargo escogido (Administrador o funcionario)\n try{\n boolean agregado=false;\n if(v_cargo==10){\n Administrador nuevoUsuario=new Administrador(v_nombre, v_contrasenia, v_nombreCompleto, null);\n agregado = administrador.agregarUsuario(nuevoUsuario);\n\n } \n if(v_cargo==20){\n Funcionario nuevoUsuario=new Funcionario(v_nombre, v_contrasenia, v_nombreCompleto, null);\n agregado = administrador.agregarUsuario(nuevoUsuario);\n }\n\n\n if(agregado){\n Utilidades.mensajeExito(\"Se agrego el Usuario\", \"Agregacion Exitosa\");\n limpiarCamposAgregarUsuario();\n }else{\n Utilidades.mensajeError(\"El Usuario a agregar ya existe\", \"Error\");\n }\n\n }catch (IOException ex) {\n Logger.getLogger(Funcionario.class.getName()).log(Level.SEVERE, null, ex);\n Utilidades.mensajeAdvertencia(\"Se ha interrumpido la conexion con el servidor\", \"Error\");\n }\n \n }", "public String createUserAction()throws Exception{\n\t\tString response=\"\";\n\t\tresponse=getService().getUserMgmtService().createNewUser(\n\t\t\t\tgetAuthBean().getUserName(),\n\t\t\t\tgetAuthBean().getFirstName(),\n\t\t\t\tgetAuthBean().getLastName(),\n\t\t\t\tgetAuthBean().getEmailId(),\n\t\t\t\tgetAuthBean().getRole()\n\t\t);\n\t\tgetAuthBean().setResponse(response);\n\t\tinputStream = new StringBufferInputStream(response);\n\t\tinputStream.close();\n\t\treturn SUCCESS;\n\t}", "public void createPersonalInfos(JFrame jFrame, ControllerAdmin controllerAdminPersonalInfos){\n JLabel jLabelAcount = new JLabel(\"Compte\");\n jLabelAcount.setBounds(20, 20, 100, 28);\n\n JLabel jLabelId = new JLabel(\"Identifiant :\");\n jLabelId.setBounds(40, 50, 300, 28);\n JTextField jTextFieldId = new JTextField(controllerAdminPersonalInfos.getUser().getId());\n jTextFieldId.setBounds(40, 80, 300, 28);\n\n JLabel jLabelLastName = new JLabel(\"Nom :\");\n jLabelLastName.setBounds(40, 110, 300, 28);\n JTextField jTextFieldLastName = new JTextField(controllerAdminPersonalInfos.getUser().getLastName());\n jTextFieldLastName.setBounds(40, 140, 300, 28);\n\n JLabel jLabelFirstName = new JLabel(\"Prenom :\");\n jLabelFirstName.setBounds(40, 170, 300, 28);\n JTextField jTextFieldFirstName = new JTextField(controllerAdminPersonalInfos.getUser().getFirstName());\n jTextFieldFirstName.setBounds(40, 200, 300, 28);\n\n JLabel jLabelEmail = new JLabel(\"Email :\");\n jLabelEmail.setBounds(40, 230, 300, 28);\n JTextField jTextFieldEmail = new JTextField(controllerAdminPersonalInfos.getUser().getEmail());\n jTextFieldEmail.setBounds(40, 260, 300, 28);\n\n JLabel jLabelPassword = new JLabel(\"Mot de passe :\");\n jLabelPassword.setBounds(40, 290, 300, 28);\n JPasswordField jPasswordFieldPassword = new JPasswordField(controllerAdminPersonalInfos.getUser().getPassword());\n jPasswordFieldPassword.setBounds(40, 320, 300, 28);\n\n JButton jButtonModifPassword = new JButton(\"Modifier le mot de passe\");\n jButtonModifPassword.setBounds(350, 320, 200, 28);\n\n //set editabilite\n jTextFieldId.setEditable(false);\n jTextFieldLastName.setEditable(false);\n jTextFieldFirstName.setEditable(false);\n jTextFieldEmail.setEditable(false);\n jPasswordFieldPassword.setEditable(false);\n\n // Ajout des element à la JFrame\n jFrame.add(jLabelAcount);\n jFrame.add(jLabelId);\n jFrame.add(jTextFieldId);\n jFrame.add(jLabelLastName);\n jFrame.add(jTextFieldLastName);\n jFrame.add(jLabelFirstName);\n jFrame.add(jTextFieldFirstName);\n jFrame.add(jLabelEmail);\n jFrame.add(jTextFieldEmail);\n jFrame.add(jLabelPassword);\n jFrame.add(jButtonModifPassword);\n jFrame.add(jPasswordFieldPassword);\n\n jButtonModifPassword.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n createModifPassword(jFrame, controllerAdminPersonalInfos);\n jFrame.repaint();\n }\n });\n\n jFrame.setLayout(null);\n jFrame.setVisible(true);\n }", "public Usuario(String nombreUsuario, String correo, String telefono) {\n\t\tsuper();\n\t\tthis.nombreUsuario = nombreUsuario;\n\t\tthis.correo = correo;\n\t\tthis.telefono = telefono;\n\t}", "public Usuario(String nombre, int edad) {\n this.rvNombreUsuario = nombre;\n this.rvEdadUsuario = edad;\n }", "public void crearUsuario(UsuarioDTO usuarioNuevo) throws Exception;", "@Override\n public void handle(ActionEvent event) {\n Usuarios u = new Usuarios();\n u.setNome(txtNome.getText());\n u.setLogin(txtLogin.getText());\n u.setSenha(txtSenha.getText());\n usuario.inserir(u);\n limpar();\n listar();\n }", "@RequestMapping(value = { \"/newuser\" }, method = RequestMethod.GET)\n\t@PreAuthorize(\"hasRole('ADMIN')\")\n\tpublic String newUser(ModelMap model) {\n\t\tUser user = new User();\n\t\tmodel.addAttribute(\"user\", user);\n\t\tmodel.addAttribute(\"edit\", false);\n\t\treturn \"registration\";\n\t}", "private void NuevoUsuario(String IDFacebook, Usuarios nuevo)\n {\n final String szIDFacebook = IDFacebook;\n\n // Guardamos los datos del nombre del usuario\n Helpers.setNombre(getActivity(), nuevo.NOMBRE);\n\n // Datos de la solicitud\n cliente.post(getActivity(), Helpers.URLApi(\"nuevousuario\"), Usuarios.ToStringEntity(nuevo), \"application/json\", new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n super.onSuccess(statusCode, headers, responseBody);\n\n try\n {\n // Obtenemos el objeto JSON\n JSONObject objeto = Helpers.ResponseBodyToJSON(responseBody);\n\n // Si está OK\n if (objeto.isNull(\"Error\"))\n {\n // Guardamos el token del usuario\n Helpers.setTokenAcceso(getActivity(), objeto.getJSONObject(\"usuario\").getString(\"token\"));\n\n // Guardamos el nombre del usuario\n Helpers.setNombre(getActivity(), objeto.getJSONObject(\"usuario\").getString(\"nombre\"));\n\n // Subimos la foto del usuario\n GetPictureFacebook(szIDFacebook, objeto.getJSONObject(\"usuario\").getString(\"imagen\"));\n }\n else\n {\n // Mostramos la ventana de error\n Helpers.MostrarError(getActivity(), objeto.getString(\"Error\"));\n }\n } catch (JSONException ex) {\n // Mostramos la ventana de error\n Helpers.MostrarError(getActivity(), getString(R.string.notcreateuser));\n }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n // Mostramos la ventana de error\n Helpers.MostrarError(getActivity(), getString(R.string.notcreateuser));\n }\n });\n }", "@Override\r\n\tpublic boolean createUser(Utilisateur u) {\n\t\treturn false;\r\n\t}", "public static void create(Formulario form){\n daoFormulario.create(form);\n }", "@RequestMapping(\"altaUsuario\")\n public ModelAndView altaUsuario(@ModelAttribute(\"usuario\")Usuario usuario){\n ModelAndView model = new ModelAndView(\"paginaInicio\");\n setUsuario(usuario);\n model.addObject(\"usuario\",usuario);\n return model;\n }", "public Login() {\n initComponents();\n this.setTitle(\"Login\");\n this.setLocationRelativeTo(null);\n this.pack();\n // Asignanado objecto\n adminUsers = new usuarioAdmin();\n \n // No hay inicializacion de usuarios\n sys.us[0] = new Usuario();\n sys.us[0].setId(\"admin\");\n sys.us[0].setNombre(\"admin\");\n sys.us[0].setApellido(\"admin\");\n sys.us[0].setUser(\"admin\");\n sys.us[0].setPassword(\"admin\");\n sys.us[0].setRol(\"admin\");\n }", "public CriarEditarUsuarioView() {\n initComponents();\n }", "public void addUsuario(Usuario usuario) {\n\t\t\n\t}", "@GetMapping(\"/createRegistro\")\n\tpublic String crearValidacion(Model model) {\n\t\tList<Barrio> localidades = barrioService.obtenerBarrios();\n\t\tmodel.addAttribute(\"localidades\",localidades);\n\t\tmodel.addAttribute(\"persona\",persona);\n\t\tmodel.addAttribute(\"validacion\",validacion);\n\t\tmodel.addAttribute(\"registro\",registro);\n\t\tmodel.addAttribute(\"barrio\",barrio);\n\t\treturn \"RegistroForm\";\n\t}", "private void metodoSalvarUsuarioFirebase(final Usuarios variavelClasseUsuarios) {\n\n refAutenticacaofb = ConfiguracaoFirebase.metodoAutenticacaoFirebase();\n refAutenticacaofb.createUserWithEmailAndPassword(variavelClasseUsuarios.getEmail(),\n variavelClasseUsuarios.getSenha()).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if(task.isSuccessful()){\n\n idUsuario = task.getResult().getUser().getUid();\n variavelClasseUsuarios.setId(idUsuario);\n variavelClasseUsuarios.salvarUsuario();\n\n if(pegarTipoUsuarioSwitch() == \"Cliente\"){\n\n startActivity(new Intent(CadastroUsuario.this, Home.class));\n finish();\n Toast.makeText(CadastroUsuario.this, \"Usuário salvo com sucesso\", Toast.LENGTH_LONG).show();\n }else{\n\n startActivity(new Intent(CadastroUsuario.this, PainelEmpresa.class));\n finish();\n Toast.makeText(CadastroUsuario.this, \"Empresa inserida com sucesso!\", Toast.LENGTH_LONG).show();\n }\n\n\n }\n\n\n\n }\n });\n\n }", "public void registro(View v) {\n\t\tsubeUsuario();\n\t\tif (userId == -1) { // si es nuevo\n\t\t\tfinish(); // hay que dejar que el server devuelva el id y leerlo\n\t\t}\n\t}", "@RequestMapping(\"/createnewuser\")\r\n\tpublic ModelAndView userCreated(@ModelAttribute(\"rg\") Register reg) {\r\n\t\t\r\n\t\tBigInteger num = reg.getMb_no();\r\n\t\tSystem.out.println(\"mbno=\"+num.toString());\r\n\t\t//Doing the entry of New User in Spring_Users table\r\n\t\t\r\n\t\tString username = reg.getEmail_id();\r\n\t\tString password = reg.getPassword();\r\n\t\tSpringUsers su = new SpringUsers();\r\n\t\tsu.setUsername(username);\r\n\t\tsu.setPassword(password);\r\n\t\tsu.setEnabled(1);\r\n\t\tSystem.out.println(\"username=\"+username);\r\n\t\tSystem.out.println(\"password=\"+password);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString r = reg.getUser_type();\r\n\t\t\r\n\t\t//if(r.equals(\"ROLE_INDIVIDUAL\"))\r\n\t\t\t//return new ModelAndView(\"individualhomepage\");\r\n\t\t//if(r.equals(\"ROLE_BROKER\"))\r\n\t//\t\treturn new ModelAndView(\"brokerhomepage\");\r\n\t\t//if(r.equals(\"ROLE_BUILDER\"))\r\n\t\t//\treturn new ModelAndView(\"builderhomepage\");\r\n\t\t\r\n\t//\tint i = susvc.entryOfNewUser(su);\r\n\t\t\r\n\t\tint j = regsvc.registerNewUser(reg);\r\n\t\t \r\n\t\treturn new ModelAndView(\"usercreated\");\r\n\r\n\t}", "@GetMapping(\"register\")\n public String registerForm(Model model){\n model.addAttribute(\"user\", new User());\n return \"register_form\";\n }" ]
[ "0.7110446", "0.7110446", "0.68567115", "0.6853482", "0.6830427", "0.67445874", "0.6741504", "0.66978693", "0.6686097", "0.66764826", "0.6663584", "0.6646601", "0.6638224", "0.6635426", "0.65903383", "0.65716696", "0.6555039", "0.65482056", "0.6537012", "0.65044236", "0.6483085", "0.64613926", "0.6460811", "0.6435056", "0.64160675", "0.64119667", "0.63863623", "0.6385582", "0.6384735", "0.638312", "0.6375482", "0.63602746", "0.63519466", "0.6350921", "0.6330367", "0.6318665", "0.63170004", "0.63138163", "0.6307411", "0.6292174", "0.6272536", "0.6241535", "0.62389815", "0.6215761", "0.6211237", "0.62109363", "0.6194484", "0.61877495", "0.6187253", "0.61835575", "0.6174138", "0.6169503", "0.6154921", "0.61493915", "0.61457044", "0.6142291", "0.6138821", "0.6138652", "0.6130715", "0.61290455", "0.61282474", "0.6114181", "0.61134857", "0.6095312", "0.6090208", "0.60849637", "0.60767543", "0.60714066", "0.6067179", "0.605186", "0.60509855", "0.6043339", "0.60412264", "0.60412264", "0.604077", "0.6039533", "0.6036655", "0.60335153", "0.6026383", "0.60260373", "0.6024324", "0.6020415", "0.6019418", "0.60180044", "0.6009856", "0.60087466", "0.6007376", "0.5990079", "0.59880763", "0.5986178", "0.59859574", "0.59833056", "0.5979248", "0.5979092", "0.5967974", "0.5966008", "0.5962065", "0.5961238", "0.5953344", "0.5953085", "0.59525335" ]
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() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jtfCodigo = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); jtfNome = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); jtUsuario = new javax.swing.JTable(); jbSalvar = new javax.swing.JButton(); jbAlterar = new javax.swing.JButton(); jbNovo = new javax.swing.JButton(); jbCancelar = new javax.swing.JButton(); jbExcluir = new javax.swing.JButton(); jLabel7 = new javax.swing.JLabel(); jtfPesquisa = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Usuario"); jLabel1.setText("Código"); jtfCodigo.setEditable(false); jLabel2.setText("Nome"); jtUsuario.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null}, {null, null}, {null, null}, {null, null} }, new String [] { "Código", "Nome" } ) { Class[] types = new Class [] { java.lang.Integer.class, java.lang.String.class }; boolean[] canEdit = new boolean [] { false, false }; public Class getColumnClass(int columnIndex) { return types [columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); jScrollPane1.setViewportView(jtUsuario); if (jtUsuario.getColumnModel().getColumnCount() > 0) { jtUsuario.getColumnModel().getColumn(0).setMinWidth(50); jtUsuario.getColumnModel().getColumn(0).setPreferredWidth(50); jtUsuario.getColumnModel().getColumn(0).setMaxWidth(50); } jbSalvar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/imagens/if_save_2561379.png"))); // NOI18N jbSalvar.setText("Salvar"); jbSalvar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbSalvarActionPerformed(evt); } }); jbAlterar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/imagens/if_new-24_103173.png"))); // NOI18N jbAlterar.setText("Alterar"); jbAlterar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbAlterarActionPerformed(evt); } }); jbNovo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/imagens/if_new10_216291.png"))); // NOI18N jbNovo.setText("Novo"); jbNovo.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbNovoActionPerformed(evt); } }); jbCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/imagens/if_cancel_216128.png"))); // NOI18N jbCancelar.setText("Cancelar"); jbCancelar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbCancelarActionPerformed(evt); } }); jbExcluir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/imagens/if_cross-24_103181.png"))); // NOI18N jbExcluir.setText("Excluir"); jbExcluir.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbExcluirActionPerformed(evt); } }); jLabel7.setText("Pesquisar"); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/imagens/if_70_111121.png"))); // NOI18N jButton1.setText("Pesquisar"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jLabel7) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jtfPesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, 342, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton1)) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jtfCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jtfNome, javax.swing.GroupLayout.PREFERRED_SIZE, 235, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel1) .addGap(63, 63, 63) .addComponent(jLabel2)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jbCancelar) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jbNovo) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jbAlterar) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jbSalvar) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jbExcluir))) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(jLabel2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jtfCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jtfNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel7) .addComponent(jtfPesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jbCancelar) .addComponent(jbNovo) .addComponent(jbAlterar) .addComponent(jbSalvar) .addComponent(jbExcluir)) .addContainerGap(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(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); 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 }", "public kunde() {\n initComponents();\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 MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\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 frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\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 Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\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 POS1() {\n initComponents();\n }", "public Carrera() {\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.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "0.6944929", "0.6942576", "0.69355655", "0.6931378", "0.6927896", "0.69248974", "0.6924723", "0.69116884", "0.6910487", "0.6892381", "0.68921053", "0.6890637", "0.68896896", "0.68881863", "0.68826133", "0.68815064", "0.6881078", "0.68771756", "0.6875212", "0.68744373", "0.68711984", "0.6858978", "0.68558776", "0.6855172", "0.6854685", "0.685434", "0.68525875", "0.6851834", "0.6851834", "0.684266", "0.6836586", "0.6836431", "0.6828333", "0.68276715", "0.68262815", "0.6823921", "0.682295", "0.68167603", "0.68164384", "0.6809564", "0.68086857", "0.6807804", "0.6807734", "0.68067646", "0.6802192", "0.67943805", "0.67934304", "0.6791657", "0.6789546", "0.6789006", "0.67878324", "0.67877173", "0.6781847", "0.6765398", "0.6765197", "0.6764246", "0.6756036", "0.6755023", "0.6751404", "0.67508715", "0.6743043", "0.67387456", "0.6736752", "0.67356426", "0.6732893", "0.6726715", "0.6726464", "0.67196447", "0.67157453", "0.6714399", "0.67140275", "0.6708251", "0.6707117", "0.670393", "0.6700697", "0.66995865", "0.66989213", "0.6697588", "0.66939527", "0.66908985", "0.668935" ]
0.0
-1
Database queires for get todos
public List<TodoItemEntity> findAll(){ return todoItemRepository.findAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Todo> getAllTodos() {\n List<Todo> todos = new ArrayList<>();\n\n String TASKS_SELECT_QUERY = String.format(\"SELECT * FROM %s\", TABLE_TODOS);\n\n // \"getReadableDatabase()\" and \"getWriteableDatabase()\" return the same object (except under low\n // disk space scenarios)\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(TASKS_SELECT_QUERY, null);\n try {\n if (cursor.moveToFirst()) {\n do {\n long id = cursor.getLong(cursor.getColumnIndex(KEY_TODO_ID));\n String value = cursor.getString(cursor.getColumnIndex(KEY_TODO_VALUE));\n String dueDate = cursor.getString(cursor.getColumnIndex(KEY_TODO_DUE_DATE));\n boolean status = cursor.getInt(cursor.getColumnIndex(KEY_TODO_STATUS)) == 1;\n String notes = cursor.getString(cursor.getColumnIndex(KEY_TODO_NOTES));\n int priority = cursor.getInt(cursor.getColumnIndex(KEY_TODO_PRIORITY));\n todos.add(new Todo(id, value, dueDate, status, notes, priority));\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n Log.d(TAG, \"Error while trying to get todos from database\");\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n return todos;\n }", "public ArrayList<Todo> getAllTodos() throws SQLException{\n \n ArrayList<Todo> resultList = new ArrayList<>();\n \n try {\n \n\n String sql = \"SELECT * FROM todos\";\n\n Statement statement = conn.createStatement();\n ResultSet result = statement.executeQuery(sql); //SQLException\n\n while (result.next()){\n \n int id = result.getInt(\"id\");\n String task = result.getString(\"task\");\n int difficulty = result.getInt(\"difficulty\");\n Date dueDate = result.getDate(\"dueDate\");\n Status status = Status.valueOf(result.getString(\"status\"));\n\n \n resultList.add(new Todo(id, task, difficulty, dueDate, status));\n \n }\n } catch (InvalidDataException | IllegalArgumentException ex) {\n throw new SQLException(\"Error getting todo from database\", ex.getMessage());\n }\n return resultList;\n }", "List<O> obtenertodos() throws DAOException;", "public java.util.List<Todo> findAll();", "public void readToDos(Context context) {\n ToDoListDbHelper dbHelper = new ToDoListDbHelper(context);\n dbHelper.readAll(toDoListList);\n }", "private void getTodoItemsFromDatabase(){\n Cursor result = todoDatabaseHelper.getAllData();\n if(result.getCount() > 0){\n //there is some data\n while(result.moveToNext()){\n TodoItem todoItem = new TodoItem(result.getInt(0) ,result.getString(1), result.getString(2));\n todoItem.setSelected(false);\n todoItem.setCollapsed(true);\n todoItems.add(todoItem);\n }\n }\n }", "public static List<Task> getTaskFromDb() {\n List<Task> taskList = new ArrayList<>();\n try {\n // taskList = Task.listAll(Task.class);\n taskList= Select.from(Task.class).orderBy(\"due_date Desc\").where(\"status=?\", new String[] {\"0\"}).list();\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n return taskList;\n\n }", "List<Entidade> listarTodos();", "public static TodoItemList getTodoItems(){\n TodoItemList todoItemList = new TodoItemList();\n ArrayList<TodoItem> todoItems = new ArrayList<>();\n\n try(Statement statement = connection.createStatement()){\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM todo_items\");\n while(resultSet.next()){\n String title, description, bit;\n boolean isCompleted;\n title = resultSet.getString(\"title\");\n description = resultSet.getString(\"description\");\n bit = resultSet.getString(\"completed\");\n if(bit.equals(\"1\")){\n isCompleted = true;\n }else{\n isCompleted = false;\n }\n TodoItem todoItem = new TodoItem(title, description, isCompleted);\n todoItems.add(todoItem);\n }\n }catch (SQLException exc){\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, \"Attempting to get todo items.\", exc);\n }\n\n todoItemList.setTodoItems(todoItems);\n return todoItemList;\n }", "public java.util.Collection getTodos();", "public java.util.List<Todo> findByTodoId(long todoId);", "@Dao\n@TypeConverters({DateConverter.class})\npublic interface DAO {\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insert(DatabaseModel databaseModels);\n\n @Query(\"Select *from todoitem\")\n LiveData<List<DatabaseModel>> getAllTask();\n\n @Query(\"Select * from todoitem where id = :id\")\n LiveData<DatabaseModel> getTaskById(int id);\n\n @Query(\"Select * from todoitem where tag = :tag\")\n LiveData<List<DatabaseModel>> getTaskByTag(String tag);\n\n @Query(\"Select * from todoitem where priority = :priority\")\n LiveData<List<DatabaseModel>> getTaskByPriority(String priority);\n\n @Query(\"Select * from todoitem where isTaskDone = :isDone\")\n LiveData<List<DatabaseModel>> getTaskByStatus(Boolean isDone);\n\n @Query(\"Delete from todoitem where id = :id\")\n void deleteById(int id);\n\n @Delete\n void delete(DatabaseModel databaseModel);\n\n\n}", "WsTodo[] getTodosByTodoList(String listId);", "public List<GrauParentesco> getListTodos();", "public ArrayList<Libro> recuperaTodos();", "public ToDo[] listTodos(Map<String, String[]> queryParams) {\n ToDo[] filteredtodos = allTodos;\n\n // Filter status if defined\n if (queryParams.containsKey(\"status\")) {\n String targetStatus = queryParams.get(\"status\")[0];\n filteredtodos = filterTodosByStatus(filteredtodos, targetStatus);\n }\n\n if (queryParams.containsKey(\"contains\")) {\n String targetBody = queryParams.get(\"contains\")[0];\n filteredtodos = filterTodosByBody(filteredtodos, targetBody);\n }\n\n if (queryParams.containsKey(\"limit\")) {\n int targetLimit = Integer.parseInt(queryParams.get(\"limit\")[0]);\n filteredtodos = limitTodos(filteredtodos, targetLimit);\n }\n\n if (queryParams.containsKey(\"owner\")) {\n String targetOwner = queryParams.get(\"owner\")[0];\n filteredtodos = filterTodosByOwner(filteredtodos, targetOwner);\n }\n\n if (queryParams.containsKey(\"category\")) {\n String targetCategory = queryParams.get(\"category\")[0];\n filteredtodos = filterTodosByCategory(filteredtodos, targetCategory);\n }\n return filteredtodos;\n\n }", "public List<Todo> getAllToDosByTag(String tag_name) {\n List<Todo> todos = new ArrayList<Todo>();\n \n String selectQuery = \"SELECT * FROM \" + TABLE_TODO + \" td, \"\n + TABLE_TAG + \" tg, \" + TABLE_TODO_TAG + \" tt WHERE tg.\"\n + KEY_TAG_NAME + \" = '\" + tag_name + \"'\" + \" AND tg.\" + KEY_ID\n + \" = \" + \"tt.\" + KEY_TAG_ID + \" AND td.\" + KEY_ID + \" = \"\n + \"tt.\" + KEY_TODO_ID;\n \n Log.e(LOG, selectQuery);\n \n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n \n // prechadza vsetky riadky a pridava do listu\n if (c.moveToFirst()) {\n do {\n \tTodo td = new Todo();\n td.setId(c.getInt((c.getColumnIndex(KEY_ID))));\n td.setPoznamka((c.getString(c.getColumnIndex(KEY_TODO))));\n td.setStatus((c.getInt(c.getColumnIndex(KEY_STATUS))));\n td.setPriority((c.getInt(c.getColumnIndex(KEY_PRIORITY))));\n td.setDateRealized((c.getString(c.getColumnIndex(KEY_DATE))));\n td.setCreated(c.getString(c.getColumnIndex(KEY_CREATED_AT)));\n \n todos.add(td);\n } while (c.moveToNext());\n }\n \n return todos;\n }", "WsTodoList[] getAllTodoLists();", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Empresa> listarTodos() {\n\t\tList<Empresa> lista = new ArrayList<Empresa>();\n\t\t\n\t\ttry {\n\t\t\tlista = empresaDAO.listarTodosDesc();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn lista;\n\t}", "void setTodos(ArrayList<Task> tasks);", "@Override\r\n public List<Concursando> consultarTodosConcursando() throws Exception {\n return rnConcursando.consultarTodos();\r\n }", "@GetMapping(\"/api/todoItems\")\n\t public ResponseEntity<?> fetchAllTodoItems (){\n\t\t \n\t\t \n\t\t \n\t\t \n\t }", "@Override\r\n public List<Assunto> buscarTodas() {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n Query query = em.createQuery(\"FROM Assunto As a\");\r\n return query.getResultList();\r\n }", "@Override\n\tpublic ResultWrapper<List<Todos>> getAll() {\n\t\tResultWrapper<List<Todos>> rs = new ResultWrapper<List<Todos>>();\n\t\tList<Todos> todosList = todosRepo.findAllTodos();\n\t\tif (todosList.size() > 0) {\n\t\t\trs.succeedGet(todosList);\n\t\t\treturn rs;\n\t\t} else {\n\t\t\trs.setResult(todosList);\n\t\t\trs.setStatus(Result.SUCCESS);\n\t\t\trs.setMessage(\"List is empty\");\n\t\t\treturn rs;\n\t\t}\n\t}", "public List<TodoDto> getAllTodos()\n {\n List<Todo> models = dao.getAllTodos();\n List<TodoDto> dtos = new ArrayList<TodoDto>();\n for(Todo model : models){\n TodoDto dto = new TodoDto();\n dto.setTotal_quantity(model.getTotal_quantity());\n dto.setTitle(model.getTitle());\n dto.setDescription(model.getDescription());\n dto.setId(model.getId());\n dtos.add(dto);\n }\n return dtos;\n }", "public List<Permiso> obtenerTodosActivos();", "@Override\n\tpublic List<Materia> recuperarTodo() throws DataAccessException {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Produto> listarTodos() throws ControleEstoqueSqlException {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<ReservaBean> traeTodos() throws Exception {\n\t\treturn null;\r\n\t}", "private List<ToDoItem> refreshItemsFromMobileServiceTable() throws ExecutionException, InterruptedException {\n //List list = mToDoTable.where ( ).field (\"complete\").eq(val(false)).execute().get();\n return mToDoTable.where ().field (\"userId\").eq (val (userId)).and(mToDoTable.where ( ).field (\"complete\").eq(val(false))).execute().get();\n }", "public abstract List<Usuario> seleccionarTodos();", "public java.util.List<Todo> findByUserId(long userId);", "private void getAllNewsFromDatabase() {\n new GetAllNewsAsyncTask(newsDao).execute(newsList);\n }", "public List<Todo> getAllTodos(String sortOrder)\n {\n return null;\n }", "public List<Aluno> buscarTodos() {\n\t\treturn null;\n\t}", "public List<Aplicativo> buscarTodos() {\n return repositorio.findAll();\n }", "public java.util.Collection getTodo();", "@Override\r\n\tpublic List<Conta> RecuperTodos() {\n\t\treturn null;\r\n\t}", "public List<GrupoLocalResponse> buscarTodos();", "public Todo fetchByPrimaryKey(long todoId);", "public void cacheResult(java.util.List<Todo> todos);", "public List<TodoItem> getAllTodoItems() {\n List<TodoItem> result = todoItemRepository.findByOrderByTargetDateAsc();\n\n if (result.size() > 0) {\n return result;\n } else {\n return new ArrayList<>();\n }\n }", "public List<Todos> fetchTodos(User user) {\n\t\treturn null;\n\t}", "@Query(\"SELECT * from task_table ORDER BY task ASC\")\n LiveData<List<Task>> getAllTasks();", "@Override\r\n public List<QuestaoDiscursiva> consultarTodosQuestaoDiscursiva()\r\n throws Exception {\n return rnQuestaoDiscursiva.consultarTodos();\r\n }", "public List<Todo> getTodosByUserId(Long userId) {\n return todoRepository.findByCreatedById(userId);\n }", "private List<Produto> todosProdutos() {\n\t\treturn produtoService.todosProdutos();\n\t}", "@Test\n public void deleteTasksAndGettingTasks() {\n mDatabase.taskDao().insertTask(TASK);\n\n //When deleting all tasks\n mDatabase.taskDao().deleteTasks();\n\n //When getting the tasks\n List<Task> tasks = mDatabase.taskDao().getTasks();\n // The list is empty\n assertThat(tasks.size(), is(0));\n }", "public List<PerfilTO> buscarTodos();", "public ArrayList<Todo> getAllTodo() {\n todos = new ArrayList<>();\n todos.add(new Todo(\"Homework\", \"Not Done\", \"High\", \"20/10/2018\", \"12:00 PM\"));\n layoutManager = new LinearLayoutManager(this);\n return todos;\n }", "@Dao\npublic interface TaskDao {\n\n @Query(\"Select * from Task\")\n List<Task> getAll();\n\n @Query(\"Select * from Task where id = :taskId \")\n Task findById(String taskId);\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void addTask(Task task);\n\n @Update(onConflict = OnConflictStrategy.REPLACE)\n void updateTask(Task task);\n\n @Delete\n void delete(Task byId);\n}", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public Cursor fetchAllTodos() {\n\t\treturn database.query(DATABASE_TABLE, new String[] { KEY_COMPANYID,\n\t\t\t\tKEY_COMPANYNAME, KEY_COMPANYDESCRIPTION, KEY_WEBSITE, KEY_COMPANYIMG }, null, null, null,\n\t\t\t\tnull, null);\n\t}", "public void listarQuartos() {\n System.out.println(\"Quartos: \\n\");\n\n if (quartosCadastrados.size() > 0) {\n String esta = quartosCadastrados.toString();\n System.out.println(esta);\n } else {\n System.err.println(\"Não existem quartos cadastrados\");\n }\n\n }", "public interface IToDoListDAO<T> {\r\n /**\r\n * generic - add an object type of Item or User to the DB\r\n * @param ob\r\n * @throws ToDoListException\r\n */\r\n public void add(T ob) throws ToDoListException;\r\n\r\n /**\r\n * generic - update an object type of Item or user in the DB\r\n * @param ob\r\n * @throws ToDoListException\r\n */\r\n public void update(T ob) throws ToDoListException;\r\n\r\n /**\r\n * generic - delete an object type of Item or User from the DB\r\n * @param ob\r\n * @throws ToDoListException\r\n */\r\n public void delete(T ob) throws ToDoListException;\r\n\r\n /**\r\n * get all the items in the DB which connceted to the specific user with the exact id\r\n * @param id\r\n * @return array of items from the DB\r\n * @throws ToDoListException\r\n */\r\n public Item[] getItems(Long id) throws ToDoListException;\r\n\r\n /**\r\n * get the user from the DB with the same id\r\n * @param id\r\n * @return User object\r\n * @throws ToDoListException\r\n */\r\n public User getUser(Long id) throws ToDoListException;\r\n\r\n}", "public List<Producto> traerTodos () {\n \n return jpaProducto.findProductoEntities();\n \n \n \n }", "public List<ViajeroEntity> findAll() {\n LOGGER.log(Level.INFO, \"Consultando todos\");\n TypedQuery<ViajeroEntity> query = em.createQuery(\"select u from ViajeroEntity u\", ViajeroEntity.class);\n return query.getResultList();\n }", "public List<Tutores> readAllJPQL() throws SecurityException{ \n String sql=\"Select tu from Tutores tu\";\n \n Query q=em.createQuery(sql); \n return q.getResultList();\n }", "List<Task> selectByExample(TaskExample example) throws DataAccessException;", "@Override\r\n public List<Prova> consultarTodosProva() throws Exception {\n return rnProva.consultarTodos();\r\n }", "public List<Tripulante> buscarTodosTripulantes();", "public static boolean checkTaskInDb() {\n\n List<Task> taskList = new ArrayList<>();\n try {\n // taskList = Task.listAll(Task.class);\n taskList= Select.from(Task.class).orderBy(\"due_date Desc\").where(\"status=?\", new String[] {\"0\"}).list();\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n if(taskList!=null && taskList.size()>0)\n return true;\n return false;\n }", "@Dao\npublic interface TaskDao {\n /**\n * The name of the table tasks are stored in.\n */\n String TABLE = \"task\";\n\n /**\n * Queries the database for all of its Tasks and returns them in a LiveData object.\n *\n * @return a LiveData containing a List with all of the table's Tasks\n */\n @Query(\"SELECT * FROM \" + TABLE)\n LiveData<List<Task>> getAll();\n\n /**\n * Queries the database for all of its Tasks and returns them in a List, synchronously.\n * Should never be used in the UI, only in tests.\n *\n * @return a List containing all of the table's Tasks\n */\n @Query(\"SELECT * FROM \" + TABLE)\n List<Task> getAllSync();\n\n /**\n * Queries the database for a Task with id id.\n *\n * @param id the id to search for\n * @return a Task with id id or null if none was found\n */\n @Query(\"SELECT * FROM \" + TABLE + \" WHERE mId == :id\")\n @Nullable\n Task get(long id);\n\n /**\n * Inserts task into the database. Returns its id, which is automatically assigned\n * if it didn't already have one.\n *\n * @param task the task to insert into the database\n * @return the id of the task that has been inserted\n */\n @Insert\n long insert(Task task);\n\n /**\n * Inserts all of the tasks into the database.\n *\n * @param tasks the tasks to insert\n * @return an array containing the ids of the tasks that have been inserted\n */\n @Insert\n long[] insertAll(Task... tasks);\n\n /**\n * Deletes all of the Tasks passed in from the database.\n *\n * @param task the tasks to delete\n */\n @Delete\n void delete(Task... task);\n}", "@Override\n\tpublic List<ExamenDTO> obtenerTodos() {\n\t\tList<ExamenDTO> examenes= new ArrayList<ExamenDTO>();\n\t\tdao.findAll().forEach(e -> examenes.add(Mapper.getDTOFromEntity(e)));\n\t\treturn examenes;\n\t}", "public List<Profesor> consultarTodos() {\n\t\treturn daoProfesor.consultarTodos();\n\t}", "List<Persona> obtenerTodasLasPersona();", "public List<TodoItem> findByTodoListId(Long todoListId);", "public List<Task> getAllTasks() {\n List<Task> tasks = new ArrayList<Task>();\n String selectQuery = \"SELECT * FROM \" + TABLE_TASKS+\" ORDER BY \"+KEY_DATE;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Task tk = new Task();\n tk.setId(c.getLong((c.getColumnIndex(KEY_ID))));\n tk.setTaskName((c.getString(c.getColumnIndex(KEY_TASKNAME))));\n tk.setDateAt(c.getString(c.getColumnIndex(KEY_DATE)));\n tk.setStatus(c.getInt(c.getColumnIndex(KEY_STATUS)));\n\n // adding to todo list\n tasks.add(tk);\n } while (c.moveToNext());\n }\n c.close();\n return tasks;\n }", "List<Todo> findByUser(String user);", "public abstract ToDoDao toDoDao();", "public List<Note> findAllNotes() {\n\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\n\t\tString sql = \"SELECT * FROM todo\";\n\n\t\tList<Note> result = getInstance().namedParameterJdbcTemplate.query(sql, params, new UserMapper());\n\t\tfor (Note project : result) {\n\t\t\tSystem.out.println(\"id:\" + project.getId() + \", name:\" + project.getName() + \", shortcut:\" + project.getAbbreviation() + \", description:\" + project.getDescription());\n\t\t}\n\n\t\tsetNotes(result);\n\n\t\treturn getNotes();\n\t\t// return\n\t\t// this.getHibernateTemplate().findByNamedQuery(\"project.findAllProjects\");\n\t}", "public Faq[] findAll() throws FaqDaoException;", "public List<TaskMaster> retrieveAllTaskByUserId(Long userId);", "@GET(\"pomodorotasks/todo\")\n Call<List<PomodoroTask>> pomodorotasksTodoGet(\n @Query(\"user\") String user\n );", "public ArrayList<ToDoList> getAllItems() {\n ArrayList<ToDoList> itemsList = new ArrayList<ToDoList>();\n String selectQuery = \"SELECT * FROM \" + TABLE_NAME;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n ToDoList item = new ToDoList(cursor.getString(1), cursor.getString(2), cursor.getInt(0));\n itemsList.add(item);\n } while (cursor.moveToNext());\n }\n return itemsList;\n }", "@Override\n\tpublic List<CLIENTE> listarTodos() {\n\t\t\n\t\tString sql = \"SELECT * FROM CLIENTE\";\n\t\t\n\t\tList<CLIENTE> listaCliente = new ArrayList<CLIENTE>();\n\t\t\n\t\tConnection conexao;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tconexao = JdbcUtil.getConexao();\n\t\t\t\n\t\t\tPreparedStatement ps = conexao.prepareStatement(sql);\n\t\t\t\n\t\t\tResultSet res = ps.executeQuery();\n\t\t\t\n\t\t\twhile(res.next()){\n\t\t\t\t\n\t\t\t\tcliente = new CLIENTE();\n\t\t\t\tcliente.setNomeCliente(res.getString(\"NOME_CLIENTE\"));\n\t\t\t\t\n\t\t\t\tlistaCliente.add(cliente);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tps.close();\n\t\t\tconexao.close();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn listaCliente;\n\t}", "public void listarQuartos(JTable table) {\r\n\t\ttry {\r\n\t\t\tStatement st = conexao.createStatement();\r\n\t\t\tResultSet rs = st.executeQuery(\"SELECT idQuartos,tipo FROM quartos\");\r\n\t\t\ttable.setModel(DbUtils.resultSetToTableModel(rs));\r\n\t\t}\r\n\t\tcatch (SQLException e) {}\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<ItemMedicamentoEntity> listaTodos(){\r\n\r\n\t\treturn this.entityManager.createQuery(\"SELECT * FROM ItemMedicamentoEntity ORDER BY codigo\").getResultList();\r\n\t}", "@Override\n public void onChanged(@Nullable List<Todo> todos) {\n adapter.submitList(todos);\n }", "@Test\n\tpublic void testConsultarTodos() {\n\t\tList<Dispositivo> dispositivos = new ArrayList<Dispositivo>();\n\t\ttry {\n\t\t\tdispositivos = dispositivoBL.consultarTodos();\n\t\t\tassertTrue(dispositivos.size() > 0);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Query(\"SELECT * FROM \" + TABLE)\n LiveData<List<Task>> getAll();", "@GetMapping (\"/servicos\")\n\t\tpublic List<ServicoModel> pegarTodos() {\t\t\n\t\t\treturn repository.findAll();\n\t\t}", "@Override\n\t@Transactional(readOnly = true)\n\tpublic List<ProdutoPedido> buscarTodos() {\n\t\treturn dao.findAll();\n\t}", "public interface PersonalToDoRepository extends CrudRepository<PersonalToDo, String> {\n\n public List<PersonalToDo> findBySetBy(String user);\n public PersonalToDo findById(int id);\n\n\n\n}", "public interface TodoService {\n\n List<TodoItem> getTodosList();\n\n public void addTodoItem(TodoItem todoItem);\n\n public TodoItem updateTodoItem(TodoItem todoItem);\n\n public void deleteTodoItem(int todoItemId);\n}", "public void marcarTodos() {\r\n\t\tfor (int i = 0; i < listaPlantaCargoDto.size(); i++) {\r\n\t\t\tPlantaCargoDetDTO p = new PlantaCargoDetDTO();\r\n\t\t\tp = listaPlantaCargoDto.get(i);\r\n\t\t\tif (!obtenerCategoria(p.getPlantaCargoDet())\r\n\t\t\t\t\t.equals(\"Sin Categoria\"))\r\n\t\t\t\tp.setReservar(true);\r\n\t\t\tlistaPlantaCargoDto.set(i, p);\r\n\t\t}\r\n\t\tcantReservados = listaPlantaCargoDto.size();\r\n\t}", "@Override\n public List<Caja> buscarMovimientos(){\n List<Caja> listaCaja= cajaRepository.findAll();\n\n return listaCaja;\n\n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n BdLivro d = new BdLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\");\n\n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "@Test\n public void deleteTaskByIdAndGettingTasks() {\n mDatabase.taskDao().insertTask(TASK);\n\n //When deleting a task by id\n mDatabase.taskDao().deleteTaskById(TASK.getId());\n\n //When getting the tasks\n List<Task> tasks = mDatabase.taskDao().getTasks();\n // The list is empty\n assertThat(tasks.size(), is(0));\n }", "public void borrarTodosTripulantes();", "public List<Ejemplar> getAll();", "List<Task> getAllTasks();", "@Test\n public void deleteCompletedTasksAndGettingTasks() {\n mDatabase.taskDao().insertTask(TASK);\n\n //When deleting completed tasks\n mDatabase.taskDao().deleteCompletedTasks();\n\n //When getting the tasks\n List<Task> tasks = mDatabase.taskDao().getTasks();\n // The list is empty\n assertThat(tasks.size(), is(0));\n }", "public interface ChecklistItemDAOQuery {\n public final static String UUID = \"select REPLACE(UUID(),'-','')\";\n public final static String CREATE_ITEM = \"insert into checklist_items (id, taskid, title) \"+\n \"values (unhex(?), unhex(?), ?)\";\n public final static String CHECK_ITEM = \"update checklist_items set checked=TRUE WHERE id=unhex(?)\";\n public final static String GET_ITEM_BY_ID = \"select hex(i.id) as id, hex(i.taskid) as taskid, i.user_checked as user_checked, i.title, i.checked from checklist_items i where i.id=unhex(?)\";\n public final static String GET_ITEMS_FROM_TASK = \"select hex(i.id) as id, hex(i.taskid) as taskid, i.user_checked as user_checked, i.title, i.checked from checklist_items i where i.taskid=unhex(?)\";\n}", "public interface PreguntaDao {\n\n\t/** Devuelve las preguntas mas recientes, ordenadas desde la mas reciente hacia la mas antigua.\n\t * @param page La pagina de preguntas (comienza de la 1)\n\t * @param pageSize El numero de resultados a devolver por pagina. */\n\tpublic List<Pregunta> getPreguntasRecientes(int page, int pageSize);\n\n\t/** Devuelve las preguntas hechas por el usuario indicado. */\n\tpublic List<Pregunta> getPreguntasUsuario(Usuario user);\n\n\t/** Devuelve las preguntas que contienen el tag especificado. */\n\tpublic List<Pregunta> getPreguntasConTag(TagPregunta tag);\n\n\t/** Devuelve todas las preguntas que tengan al menos uno de los tags especificados. */\n\tpublic List<Pregunta> getPreguntasConTags(Set<TagPregunta> tags);\n\n\t/** Devuelve las preguntas que contienen el tag especificado. */\n\tpublic List<Pregunta> getPreguntasConTag(String tag);\n\n\t/** Devuelve los tags mas utilizados en preguntas.\n\t * @param limit El numero maximo de tags a devolver. */\n\tpublic List<TagPregunta> getTagsPopulares(int limit);\n\n\t/** Devuelve la pregunta con el id especificado. */\n\tpublic Pregunta getPregunta(int id);\n\n\t/** Devuelve las respuestas a la pregunta especificada.\n\t * @param pageSize El numero maximo de preguntas a devolver.\n\t * @param page El numero de pagina a devolver (la primera pagina es 1)\n\t * @param crono Indica si se deben ordenar las respuestas en orden cronologico, en vez de por votos\n\t * (default es por votos). */\n\tpublic List<Respuesta> getRespuestas(Pregunta q, int pageSize, int page, boolean crono);\n\n\t/** Devuelve la lista de preguntas con mas votos positivos.\n\t * @param limit El numero maximo de preguntas a devolver. */\n\tpublic List<Pregunta> getPreguntasMasVotadas(int limit);\n\n\t/** Devuelve la lista de preguntas que no tienen ni una sola respuesta. */\n\tpublic List<Pregunta> getPreguntasSinResponder(int limit);\n\n\t/** Devuelve la lista de preguntas cuyo autor no ha elegido una respuesta. */\n\tpublic List<Pregunta> getPreguntasSinResolver(int limit);\n\n\t/** Registra un voto que un usuario hace a una pregunta.\n\t * @param user El usuario que hace el voto\n\t * @param pregunta La pregunta a la cual se aplica el voto\n\t * @param up Indica si el voto es positivo (true) o negativo (false).\n\t * @throws PrivilegioInsuficienteException si el usuario no tiene reputacion suficiente para dar un voto negativo. */\n\tpublic VotoPregunta vota(Usuario user, Pregunta pregunta, boolean up) throws PrivilegioInsuficienteException;\n\n\t/** Registra un voto que un usuario hace a una respuesta que se hizo a una pregunta.\n\t * @param user El usuario que hace el voto.\n\t * @param resp La respuesta a la cual se aplica el voto.\n\t * @param up Indica si el voto es positivo (true) o negativo (false).\n\t * @throws PrivilegioInsuficienteException si el usuario no tiene reputacion suficiente para dar un voto negativo. */\n\tpublic VotoRespuesta vota(Usuario user, Respuesta resp, boolean up) throws PrivilegioInsuficienteException;\n\n\t/** Busca y devuelve el voto realizado por el usuario indicado a la pregunta especificada, si es que existe. */\n\tpublic VotoPregunta findVoto(Usuario user, Pregunta pregunta);\n\n\t/** Busca y devuelve el voto hecho por el usuario indicado a la respuesta especificada, si es que existe. */\n\tpublic VotoRespuesta findVoto(Usuario user, Respuesta respuesta);\n\n\tpublic void insert(Pregunta p);\n\n\tpublic void update(Pregunta p);\n\n\tpublic void delete(Pregunta p);\n\n\t/** Crea una respuesta con el texto especificado, para la pregunta especificada, por el autor especificado.\n\t * @return La respuesta recien creada. */\n\tpublic Respuesta addRespuesta(String resp, Pregunta p, Usuario autor);\n\n\t/** Agrega un comentario a la pregunta especificada, a nombre del usuario especificado. */\n\tpublic ComentPregunta addComentario(String c, Pregunta p, Usuario autor);\n\n\t/** Agrega un comentario a la respuesta especificada, a nombre del usuario especificado. */\n\tpublic ComentRespuesta addComentario(String c, Respuesta r, Usuario autor);\n\n\t/** Agrega el tag especificado a la pregunta. Primero se busca el tag existente para relacionarlo con la\n\t * pregunta, pero si no existe, se crea uno nuevo. */\n\tpublic void addTag(String tag, Pregunta p);\n\n\t/** Devuelve una lista con tags que contengan el texto parcial especificado. */\n\tpublic List<TagPregunta> findMatchingTags(String parcial);\n\n}", "@OnKeyword(value = \"get todolist\")\n\tpublic void getTodoList(TeamchatAPI api) throws Exception {\n\t\tif (isBasecampnotPresent(api)) {\n\t\t\treturn;\n\t\t}\n\t\t// populating with project name list\n\t\tField f = api.objects().select().name(\"project\").label(\"Project\");\n\t\tfor (Project project : bah.getActiveProjects()) {\n\t\t\tf.addOption(project.getName() + \" | \" + project.getId());\n\t\t}\n\t\t// api.perform(api\n\t\t// .context()\n\t\t// .currentRoom()\n\t\t// .post(new PrimaryChatlet()\n\t\t// .setQuestion(\"Get todolists from a project\")\n\t\t// .setDetailsLabel(\"Comments\")\n\t\t// .showDetails(true)\n\t\t// .setReplyScreen(api.objects().form().addField(f))\n\t\t// .setReplyLabel(\"Select Project\")\n\t\t// .alias(\"get_todo_list2\")));//.setReplyLabel(\"Comment\")\n\t\tapi.perform(api\n\t\t\t\t.context()\n\t\t\t\t.currentRoom()\n\t\t\t\t.post(new PrimaryChatlet()\n\t\t\t\t\t\t.setQuestion(\"Get todolists from a project\")\n\t\t\t\t\t\t.setReplyScreen(api.objects().form().addField(f))\n\t\t\t\t\t\t.setReplyLabel(\"Select Project\")\n\t\t\t\t\t\t.alias(\"get_todo_list2\")));\n\t}", "public ArrayList consultarTodo() {\n Cursor cursor = this.myDataBase.rawQuery(\"SELECT des_invfisico_tmp._id,des_invfisico_tmp.cod_ubicacion,des_invfisico_tmp.cod_referencia,des_invfisico_tmp.cod_plu,plu.descripcion FROM des_invfisico_tmp LEFT OUTER JOIN plu ON plu.cod_plu = des_invfisico_tmp.cod_plu \", null);\n ArrayList arrayList = new ArrayList();\n new ArrayList();\n if (cursor.moveToFirst()) {\n do {\n for (int i = 0; i <= 4; ++i) {\n if (cursor.isNull(i)) {\n arrayList.add(\"\");\n continue;\n }\n arrayList.add(cursor.getString(i));\n }\n } while (cursor.moveToNext());\n }\n\n return arrayList;\n }", "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "private void loadNotesFromDB(){\n AppDB appDB = Room.databaseBuilder(getApplicationContext(), AppDB.class, \"app-database\").build();\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n List<Note> notes = appDB.notesDao().getAllNotes();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n // TODO: setup My RecyclerView\n setupNotesRecyclerView(notes);\n Log.d(\"MainActivity\", \"Notes Count: \" + notes.size());\n }\n });\n }\n }).start();\n }", "@Override\r\n public List<Funcionario> consultarTodosFuncionarios() throws Exception {\n return rnFuncionario.consultarTodos();\r\n }" ]
[ "0.70927775", "0.68417954", "0.6725145", "0.67200357", "0.6715865", "0.6600629", "0.65915346", "0.6570254", "0.6342951", "0.6201669", "0.6166744", "0.6159688", "0.6143821", "0.6115564", "0.6107867", "0.6107265", "0.60704017", "0.6069535", "0.6041003", "0.60052454", "0.5998493", "0.5995164", "0.5993402", "0.5979756", "0.59778583", "0.5976293", "0.5966462", "0.5962842", "0.5945246", "0.59445965", "0.59418833", "0.5923748", "0.5923285", "0.5892053", "0.5875139", "0.585813", "0.5856627", "0.5853925", "0.5841642", "0.58237505", "0.5805557", "0.5794552", "0.57912254", "0.5791065", "0.578628", "0.57807124", "0.5771129", "0.5764183", "0.575057", "0.57263213", "0.5709214", "0.57017285", "0.5701673", "0.5700438", "0.5693526", "0.5674158", "0.56640327", "0.5659563", "0.5658295", "0.5647379", "0.56458354", "0.56452715", "0.56399125", "0.5625961", "0.5613918", "0.56133616", "0.56115544", "0.56082386", "0.5589215", "0.55862856", "0.558515", "0.55815077", "0.556962", "0.55684084", "0.5566893", "0.5565185", "0.5559188", "0.5556041", "0.5548009", "0.55426264", "0.5542396", "0.5542243", "0.5535477", "0.5529352", "0.5527532", "0.55230093", "0.55187345", "0.5511396", "0.55086803", "0.5507903", "0.5507674", "0.55022526", "0.5498494", "0.5494459", "0.5488797", "0.5482484", "0.54754317", "0.5473332", "0.5468992", "0.5466572" ]
0.6045228
18
Interface de la factory de l'application
public interface IFactory { /** * créer un service transactionel (un proxy de service) gérant les Users * * @param caller * objet transactionel appelant ce service. null si début de * transaction * @return */ public abstract IUserService createUserService(ITransactional caller); /** * créer un dao transactionel dédié à la table utilisateur (un proxy de dao) * * @param caller * objet transactionel appelant ce service. null si début de * transaction * @return */ public abstract IUtilisateurDAO createUserDAO(ITransactional caller); /** * créer un dao transactionel dédié à la table cursus (un proxy de dao) * * @param caller * objet transactionel appelant ce service. null si début de * transaction * @return */ public abstract ICursusDAO createCursusDAO(ITransactional caller); /** * créer un dao transactionel dédié à la table competence (un proxy de dao) * * @param caller * objet transactionel appelant ce service. null si début de * transaction * @return */ public abstract ICompetenceDAO createCompetenceDAO(ITransactional caller); public abstract INiveauxDAO createNiveauDAO(ITransactional caller); public abstract IProfilDAO createProfilDAO(ITransactional caller); public abstract IGroupeDAO createGroupeDAO(ITransactional caller); public abstract IFenetreDAO createFenetreDAO(ITransactional caller); public abstract IFonctionDAO createFonctionDAO(ITransactional caller); public abstract INatureDAO createNatureDAO(ITransactional caller); public abstract IDroitDAO createDroitDAO(ITransactional caller); public abstract ISecurityService createSecurityService(ITransactional caller); public abstract IProjectService createProjectService(ITransactional caller); public abstract IKeywordDAO createKeywordDAO(ITransactional caller); public abstract IStatutDAO createStatutDAO(ITransactional caller); public abstract IAdresseDAO createAdresseDAO(ITransactional caller); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Factory {\n LeiFeng createLeiFeng();\n}", "public interface Factory {\r\n}", "public interface IMainframeFactory {\n\n\t/**\n\t * \n\t * @return new instance of IMainframe\n\t */\n\tIMainframe createInstance();\n}", "public interface FakeApplicationFactory {\n\n Application buildApplication(FakeApplicationFactoryArgs args);\n\n}", "ASPMFactory getASPMFactory();", "public BuiltinFactoryImpl() {\n\t\tsuper();\n\t}", "public interface Factory{\n\n @NonNull\n Navigator createNavigator();\n }", "private ServiceFactory() {}", "public ObjectifyFactory factory() {\n return ofy().factory();\n }", "public interface AbstractFactory {\n /**\n * Create cpu cpu.\n *\n * @return the cpu\n */\n Cpu createCpu();\n\n /**\n * Create main board main board.\n *\n * @return the main board\n */\n MainBoard createMainBoard();\n}", "EzlemurFactory getEzlemurFactory();", "public interface Factory {\n Product create();\n}", "Demo1Factory getDemo1Factory();", "interface Factory {\r\n /**\r\n * Create an instance of an agenda view model with the given saved\r\n * instance state.\r\n *\r\n * @param savedInstanceState previously saved state of the view model\r\n * @return the created agenda view model\r\n */\r\n AgendaViewModel create(Bundle savedInstanceState);\r\n }", "public PiviFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public ProyectoFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "GoatInfrastructureFactory getGoatInfrastructureFactory();", "public static Factory factory() {\n return ext_h::new;\n }", "Anywhere createAnywhere();", "AndroidFactory getAndroidFactory();", "public AndroidFactoryImpl() {\n\t\tsuper();\n\t}", "public interface IKoalaDownloaderFactory {\n IKoalaDownloader create();\n}", "Factory getFactory()\n {\n return configfile.factory;\n }", "public Factory() {\n\t\tsuper();\n\t}", "GamesFactory getGamesFactory();", "public interface IFactory {\n Operation CreateOperation();\n\n}", "GramaticaFactory getGramaticaFactory();", "public interface ReviewServiceFactory extends ServiceFactory {\n}", "public interface ProductFactory {\n Product createProduct();\n}", "public interface Factory {\n /* renamed from: a */\n Call mo35727a(Request request);\n }", "ASAFactory getASAFactory();", "QuestionarioFactory getQuestionarioFactory();", "public abstract ProductFactory getFactory();", "private ConcreteFactory() {}", "public MPSApplicationContextFactory() {\n this.encodingManager = new EncodingManager();\n\n protocolBuilder = new NamedProtocolBuilder();\n // Register the known protocols with the builder.\n ProtocolRegistry registry = new ProtocolRegistry();\n registry.register(protocolBuilder);\n }", "public ServiceFactoryImpl() {\n\t\tsuper();\n\t}", "public WdlFactoryImpl() {\n\t\tsuper();\n\t}", "public interface Factory<T> {\n T create();\n}", "private ORMServiceFactory() { }", "public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }", "public interface FruitFactory {\n\n Fruit getApple();\n\n Fruit getBanana();\n}", "PlanningFactory getFactory();", "public OBStoreFactory getFactory();", "public AoDai chooseFactory(){\n\t\treturn new ModernAoDai();\n\t}", "public static BuiltinFactory init() {\n\t\ttry {\n\t\t\tBuiltinFactory theBuiltinFactory = (BuiltinFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://www.soluvas.com/schema/story.builtin/1.0\"); \n\t\t\tif (theBuiltinFactory != null) {\n\t\t\t\treturn theBuiltinFactory;\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 BuiltinFactoryImpl();\n\t}", "public ApplicationCreator() {\n }", "public EcoreFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public borFactoryImpl() {\n\t\tsuper();\n\t}", "public interface DatabaseFactory {\r\n\r\n Database makeDatabase();\r\n}", "CreateEventViewModelFactory() {\n super(Storage.class, Authenticator.class);\n }", "public interface Factory {\n Animal createAnimal();\n}", "public ProyectFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "private MultibinderFactory() { }", "interface MovieFactory2{\n public Movie create(int id, String s);\n }", "UsageevolutionFactory getUsageevolutionFactory();", "public interface IFactory {\n IUser createUser();\n IDepartment createDepartment();\n}", "EnvironmentmmFactory getEnvironmentmmFactory();", "Sticker.Factory getStickerFactory();", "UberFactory getUberFactory();", "public static AndroidFactory init() {\n\t\ttry {\n\t\t\tAndroidFactory theAndroidFactory = (AndroidFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://www.eyal.fr/android\"); \n\t\t\tif (theAndroidFactory != null) {\n\t\t\t\treturn theAndroidFactory;\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 AndroidFactoryImpl();\n\t}", "public interface IFactory {\n\n public IUser createUser();\n\n public IDepartment addDepartment();\n}", "public interface ViewCreatorFactory extends Service {\n /**\n * Used to create Views in a space\n */\n interface ViewCreator {\n /**\n * Creates a view\n * @param path\n * @param sql\n * @param sqlContext\n */\n void createView(List<String> path, String sql, List<String> sqlContext, NamespaceAttribute... attributes);\n\n /**\n * Updates a view\n * @param path\n * @param sql\n * @param sqlContext\n * @param attributes\n */\n void updateView(List<String> path, String sql, List<String> sqlContext, NamespaceAttribute... attributes);\n\n /**\n * Drops a view\n * @param path\n */\n void dropView(List<String> path);\n }\n\n /**\n * get a ViewCreator for a particular user\n * @param userName\n * @return the ViewCreator\n */\n ViewCreator get(String userName);\n}", "public CoreFactoryImpl() {\n\t\tsuper();\n\t}", "public Factory() {\n this(getInternalClient());\n }", "public EsoFactoryImpl()\r\n {\r\n super();\r\n }", "public interface AbstractWidgetFactory {\n public Window createWindow();\n}", "public interface CustomApplication {\n ComponentBuilder builder();\n}", "public interface Factory<T> {\n\n /**\n * Returns an instance of the required type. The implementation determines whether or not a new or cached\n * instance is created every time this method is called.\n *\n * @return an instance of the required type.\n */\n T getInstance();\n}", "public interface AbstractFactory {\n Bmw produceBmw();\n Benz produceBenz();\n}", "public LanterneFactoryImpl() {\n\t\tsuper();\n\t}", "public PedidoFactoryImpl() {\n\t\tsuper();\n\t}", "public interface DAOFactory {\n\n /**\n *\n * @param context\n * @return\n */\n public abstract DAO createPersonBeaconDAO(Context context);\n}", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "public CommonsFactoryImpl() {\n\t\tsuper();\n\t}", "public interface AbstractFactory<T> {\n /**\n * Create a new Object of type T\n * @return the created object\n */\n T create();\n}", "public interface ApiFactory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tApiFactory eINSTANCE = work.andycarpenter.webgen.pims.api.impl.ApiFactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>API</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>API</em>'.\n\t * @generated\n\t */\n\tAPI createAPI();\n\n\t/**\n\t * Returns a new object of class '<em>Resource</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Resource</em>'.\n\t * @generated\n\t */\n\tResource createResource();\n\n\t/**\n\t * Returns a new object of class '<em>Resource Selection</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Resource Selection</em>'.\n\t * @generated\n\t */\n\tResourceSelection createResourceSelection();\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tApiPackage getApiPackage();\n\n}", "@Override\n IDeviceFactory getFactory();", "public interface Provider{\n Service newService();\n}", "public interface IApplicationInjector {\r\n\t\r\n\tpublic Runnable getServerListener(int port, int poolSize) throws ApplicationException;\r\n\t\r\n\tpublic Runnable getWorker(Socket socket) throws ApplicationException;\r\n\t\r\n\tpublic IFileUtil getFileUtil() throws ApplicationException;\r\n\r\n}", "public interface AccountFactory {\n Account create();\n}", "public interface Provider {\n Service newService();\n }", "public interface ICarFactory {\n}", "public EcoreFactoryImpl()\n {\n super();\n }", "public PageGeneratorLanguareFactoryImpl()\n {\n super();\n }", "public Contexte() {\n FactoryRegistry registry = FactoryRegistry.getRegistry();\n registry.register(\"module\", new ModuleFactory());\n registry.register(\"if\", new ConditionFactory());\n registry.register(\"template\", new TemplateFactory());\n registry.register(\"dump\", new DumpFactory());\n }", "public interface PublisherFactory extends Function<Environment, Publisher> { }", "public WebpageFactoryImpl() {\n\t\tsuper();\n\t}", "public interface ICarFactory {\n\t\n\tpublic ICar produce(String carType);\n\t\n\t \n\t\n}", "private static interface Service {}", "public interface IFactory {\n ICustomer getCustomer(CustomerType type);\n IAccount getAccount(Enum type);\n// IEntry getEntry(EntryType type);\n DAO getDAO(Enum type);\n\n}", "StoriesFactory getStoriesFactory();", "private PerfectoDriverFactory() {\n\n\t}", "IotdslFactory getIotdslFactory();", "public BazaarApplicationImpl() {\r\n\t\tsuper();\r\n\r\n\t}", "public EcoreFactoryImpl() {\n super();\n }", "public Factory(BaseProcessingEnvImpl env) {\n _env = env;\n }", "public interface Startup {\n\n\t/**\n\t * Starts the application.\n\t * \n\t * @param applicationManager\n\t * Application manager to start.\n\t */\n\tvoid start(ApplicationManager applicationManager);\n\n}", "public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }", "public interface RegistryFactory {\n\n /**\n * 连接注册中心.\n * \n * 连接注册中心需处理契约:<br>\n * 1. 当设置check=false时表示不检查连接,否则在连接不上时抛出异常。<br>\n * 2. 支持URL上的username:password权限认证。<br>\n * 3. 支持backup=10.20.153.10备选注册中心集群地址。<br>\n * 4. 支持file=registry.cache本地磁盘文件缓存。<br>\n * 5. 支持timeout=1000请求超时设置。<br>\n * 6. 支持session=60000会话超时或过期设置。<br>\n * \n * @param url 注册中心地址,不允许为空\n * @return 注册中心引用,总不返回空\n */\n Registry getRegistry(URL url);\n\n}" ]
[ "0.75126815", "0.73388946", "0.70479727", "0.69899195", "0.6956935", "0.68957806", "0.6889476", "0.68646485", "0.68556696", "0.68502283", "0.684204", "0.67734694", "0.6756545", "0.67500275", "0.6747757", "0.674717", "0.6720668", "0.67057556", "0.6705087", "0.6699874", "0.6699752", "0.6676209", "0.6660968", "0.66364366", "0.6618782", "0.66033095", "0.6586351", "0.65773267", "0.6572723", "0.656719", "0.65593433", "0.6544909", "0.6541028", "0.6519765", "0.6515553", "0.6514142", "0.64975667", "0.6493092", "0.64890987", "0.64856535", "0.6481259", "0.6480897", "0.647695", "0.6474764", "0.646232", "0.6461501", "0.64494675", "0.64462537", "0.64359623", "0.64343137", "0.64276904", "0.642192", "0.64156765", "0.64149576", "0.6410001", "0.6407884", "0.64076275", "0.6406614", "0.64059407", "0.64030313", "0.6401515", "0.6397795", "0.6396197", "0.637261", "0.6370529", "0.6370385", "0.63668877", "0.6364709", "0.63611424", "0.63577664", "0.6346188", "0.6345862", "0.6343493", "0.6343493", "0.6343493", "0.6340364", "0.63352686", "0.63342416", "0.6331541", "0.6330763", "0.63292444", "0.6326431", "0.6320285", "0.6312408", "0.63105965", "0.6308174", "0.6297566", "0.62926775", "0.6291186", "0.6282498", "0.62806594", "0.62757134", "0.6270114", "0.6262912", "0.625824", "0.62554467", "0.6255352", "0.62550193", "0.62487036", "0.624478", "0.6230977" ]
0.0
-1
/ Plays a chip of the Player in the GameField, if the InputColumn is valid. While the userInput is not valid, write errormessage and continue asking, until user entered a valid value.
public void makeMove(GameVersion game){ while(!this.inputType.waitForValidUserInput(game)){ try {Thread.sleep(500); }catch(InterruptedException e) {} } int userInput = this.inputType.getUserInput(game); game.board.playChip(userInput, this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void userPosition(char inputCharUser, char[][] board) {\r\n\t int row = 0;\r\n\t int col = 0;\r\n\r\n\t //Only break out of the while loop once the user enters a valid position\r\n\t while(true) {\r\n\t System.out.print(\"Enter a row number (0, 1, or 2): \");\r\n\t row = value.nextInt();\r\n\t System.out.print(\"Enter a column number (0, 1, or 2): \");\r\n\t col = value.nextInt();\r\n\r\n\t //Check if the row and col are 0, 1, or 2\r\n\t if (row < 0 || col < 0 || row > 2 || col > 2)\r\n\t System.out.println(\"This position is out of the bounds of the board! Try again!\" + \"\\n\");\r\n\r\n\t //Check if the position on the board the user entered is empty or not\r\n\t else if (board[row][col] != '-')\r\n\t System.out.println(\"Someone has already made a move at this position! Try again!\" + \"\\n\");\r\n\r\n\t //If none of the above condition fulfils then input the value\r\n\t else\r\n\t break;\r\n\t }\r\n\t board[row][col] = inputCharUser;\r\n\t }", "public void runGame() {\r\n // Create the Scanner object for reading input\r\n Scanner keyboard = new Scanner(System.in);\r\n \r\n Grid.Status gridStatus = Grid.Status.OK;\r\n \r\n while (gridStatus.equals(Grid.Status.OK) && !userLost && !userQuit) {\r\n this.displayGrid();\r\n \r\n System.out.println(\"What next?\");\r\n System.out.println(\"Options: (U)ncover r c, (F)lag r c, (Q)uit\");\r\n String input = keyboard.nextLine();\r\n String[] inputChars = input.split(\"\\\\s+\");\r\n \r\n try { \r\n int row, col; \r\n switch (inputChars[0].toLowerCase()) {\r\n case \"u\":\r\n row = Integer.parseInt(inputChars[1]);\r\n col = Integer.parseInt(inputChars[2]);\r\n gridStatus = this.grid.uncoverSquare(row, col);\r\n break;\r\n case \"f\":\r\n row = Integer.parseInt(inputChars[1]);\r\n col = Integer.parseInt(inputChars[2]);\r\n this.grid.flagSquare(row, col);\r\n break;\r\n case \"q\":\r\n this.userQuit = true;\r\n break;\r\n default:\r\n System.out.println(\"You must select either u, f, or q as the first character.\");\r\n break;\r\n }\r\n } catch (NumberFormatException e) {\r\n System.out.println(\"You must enter a command in the format char digit digit (ie. u 3 3).\");\r\n } catch (ArrayIndexOutOfBoundsException err) {\r\n System.out.println(\"You must enter a command in the format char digit digit (ie. u 3 3).\");\r\n } catch (NullPointerException error) {\r\n System.out.println(\"You must enter a command in the format char digit digit (ie. u 3 3).\");\r\n }\r\n }\r\n \r\n if (userQuit) {\r\n this.quitGame();\r\n } else if (userLost || gridStatus.equals(Grid.Status.MINE)) {\r\n this.gameOver();\r\n this.playAgain();\r\n } else if (gridStatus.equals(Grid.Status.WIN)) {\r\n this.displayGrid();\r\n System.out.println(\"You won. Congrats!\");\r\n this.playAgain();\r\n }\r\n }", "public void playerTurn(Mark mark) {\n boolean validInput = false;\n String player;\n do {\n if (mark == Mark.CROSS) {\n player = \"'X'\";\n } else {\n player = \"'O'\";\n }\n try {\n System.out.print(\"Player \" + player +\", enter the coordinates of your placement (1, 2 or 3) \\nrow: \");\n int row = scanner.nextInt();\n System.out.print(\"column: \");\n int col = scanner.nextInt();\n validInput = isValidInput(mark, row, col);\n }\n catch (InputMismatchException ex){\n System.out.println(\"Invalid coordinate(s): must be a number. Try again..\");\n scanner.next(); // avoid infinity loop by pointing scanner to the token value that causes exception\n }\n }\n // repeat tot dat input valid is\n while (!validInput);\n }", "public char userChoice ()\n {\n\tspeed (45, 500, \"\\nFire, Water or Grass?\");\n\t//ask for user's choice. will need to store in String\n\tString choice = IBIO.inputString (\"\\nChoose either Fire, Water or Grass: \");\n\n\t//Loop: if invalid input, ask again\n\twhile (!isValid (choice))\n\t{\n\t speed (45, 500, \"\\nInvalid choice! Please input again.\");\n\t choice = IBIO.inputString (\"\\nChoose either Fire, Water or Grass: \");\n\n\t}\n\t//stopping condition is the isValid method!!\n\t//something like: while(!isValid(choice))\n\n\t//If: to standardize values\n\t//if you've got one of Rock, ROCK, rock, r, R, then return 'r'.\n\t//else if you've got one of Paper, PAPER, paper, p, P, then return 'p'.\n\t//else return 's';\n\tif (choice.equals (\"fire\") || choice.equals (\"Fire\") || choice.equals (\"f\") || choice.equals (\"F\") || choice.equals (\"FIRE\"))\n\t return 'F';\n\telse if (choice.equals (\"w\") || choice.equals (\"W\") || choice.equals (\"Water\") || choice.equals (\"WATER\") || choice.equals (\"water\"))\n\t return 'W';\n\telse\n\t return 'G';\n }", "private void checkUserInput() {\n }", "public static void playerInput() \n\t{\n\t\t\n\t\tscanner = new Scanner(System.in);\n\t\tSystem.out.println(\"Choose the character x or o\");\n\t\tplayerInput = scanner.next().charAt(0);\n\t\tif (playerInput == 'x' || playerInput == 'o') \n\t\t{\n\t\t\tif (playerInput == 'x') \n\t\t\t{\n\t\t\t\tcomputerInput = 'o';\n\t\t\t\tSystem.out.println(\"Player chooses x & o is assigned to computer.\\n\");\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\tcomputerInput = 'x';\n\t\t\t\tSystem.out.println(\"Player chooses o & x is assigned to computer.\\n\");\n\t\t\t\t//computerMove();\n\t\t\t}\n\t\t} \n\t\telse \n\t\t{\n\t\t\tSystem.out.println(\"Invalid Input ! Try again.\\n\");\n\t\t\tplayerInput();\n\t\t}\n\t\ttossWhoIsFirst();\n\t}", "public static void userInput(){\r\n System.out.println(\"Enter the coordinates: \");\r\n if (!sc.hasNextInt()) {\r\n System.out.println(\"You should enter numbers!\");\r\n sc.next(); // Need this to get rid of the 2nd entry\r\n userInput();\r\n } else {\r\n int x = sc.nextInt();\r\n int y = sc.nextInt();\r\n if (x > 3 || x < 1 || y > 3 || y < 1) {\r\n System.out.println(\"Coordinates should be from 1 to 3!\");\r\n userInput();\r\n } // Check if space is free\r\n else if (output[3 - y][x - 1] != ' '){\r\n System.out.println(\"This cell is occupied! Choose another one!\");\r\n userInput();\r\n } else {\r\n inputXO = totalMovesPlaced % 2 == 0 ? 'X' : 'O';\r\n output[3 - y][x - 1] = inputXO;\r\n totalMovesPlaced++;\r\n }\r\n }\r\n totalMoves++;\r\n }", "public boolean playerEnters(Player player) throws Exception\n {\n dungeon.fancyOutput(\"You, pushing onwards, stumble into a pitch black room\");\n dungeon.pause(1000);\n dungeon.fancyOutput(\"Before your eyes ajust to the low lighting, the room explodes in a flash of orange glow\");\n dungeon.pause(1000);\n dungeon.fancyOutput(\"As you open your eyes, you relize that there are 5 torches alit in the room\");\n dungeon.pause(2000);\n dungeon.fancyOutput(\"Intrigued by the enticing glow of the torches, you walk towards them and notice a wooden sign that reads:\\n\");\n dungeon.pause(2000);\n dungeon.fancyOutput(\"'Welcome to the tomb of King Knuth III. Passage will only be granted to those that are able to solve the problem laid before you'\");\n dungeon.pause(3000);\n dungeon.fancyOutput(\"'If you're ready, place your palm against the indent in the stone slab in front of the room'\\n\");\n dungeon.fancyOutput(\"0) Place hand\");\n dungeon.fancyOutput(\"1) do nothing\");\n int userInput = dungeon.getIntSafe();\n if(userInput == 1)\n {\n dungeon.fancyOutput(\"The ground starts to shake and large chunks of stone start falling from the roof...\");\n int test = (int)(Math.random() * 4);\n if(test == 1)\n {\n dungeon.fancyOutput(\"You look up towards the ceiling just as a rock lands on top of you\");\n dungeon.fancyOutput(\"You crawl through the rubble and manage to find the exit door but remain severly injured\");\n return false;\n }\n dungeon.fancyOutput(\"Being the agile and lucky individual you are, you manage to sprint to the stone and place your palm against it\");\n dungeon.fancyOutput(\"The room immediately ceases to shake\");\n dungeon.pause(2000);\n }\n else if(userInput != 0)\n {\n dungeon.fancyOutput(\"You feel a sharp pain in the back of your head... to stop the pain, you rush to the stone to place your palm upon it\");\n dungeon.fancyOutput(\"(Perhaps the pain was caused by your lack of a proper input...)\");\n dungeon.pause(2000);\n }\n\n dungeon.fancyOutput(\"Words instantly start appearing in the wall... almost like they were being ingraved in front of your eyes\");\n dungeon.pause(1500);\n dungeon.fancyOutput(\"'Before you lies 5 torches..''\", 35);\n dungeon.pause(700);\n dungeon.fancyOutput(\"'You must extinguish the torches in the correct order to pass this room'\", 35);\n dungeon.pause(700);\n dungeon.fancyOutput(\"'To find the correct order, you must derive the answer from the hints provided'\\n\", 35);\n dungeon.pause(700);\n dungeon.waitForEnter();\n dungeon.fancyOutput(\"Correctly answering this question will award you with the right answer:\");\n dungeon.pause(2000);\n\n\n dungeon.fancyOutput(\"What is the answer to: (10 * 12 + 3) % 2\"); //FIRST QUESTION\n if(askAnswers(\"0\", \"5\", \"10\", \"1\", 3))\n dungeon.fancyOutput(\"After inputing your answer, the wall reads: 'The FIRST torch to pull is the 4th torch'\");\n else if(getHurt())\n return false;\n else\n dungeon.fancyOutput(\"The room stops shaking and the wall reads: 'The FIRST torch to pull is the 4th torch'\");\n torchOrder = \"\" + 4;\n dungeon.fancyOutput(\"Known order so far: \" + torchOrder + \"\\n\");\n\n\n dungeon.fancyOutput(\"'Here is the second question:'\"); // SECOND QUESTION\n dungeon.fancyOutput(\"How about a riddle this time?: Which of the following is faster than an FRS going downhill? \");\n if(askAnswers(\"A tesla\" , \"An imported Civic\" , \"Derek's car\", \"Trick question... (Does not compile)\", 0))\n dungeon.fancyOutput(\"After inputing your answer, the wall reads: 'The SECOND torch to pull is the 1st torch'\");\n else if(getHurt())\n return false;\n else\n dungeon.fancyOutput(\"The room stops shaking and the wall reads: 'The SECOND torch to pull is the 1st torch'\");\n\n torchOrder += 1;\n dungeon.fancyOutput(\"Known order so far: \" + torchOrder + \"\\n\");\n\n\n\n dungeon.fancyOutput(\"'Here is the third question:'\"); // THIRD QUESTION\n dungeon.fancyOutput(\"What happend to the grape when it was stepped on?\");\n dungeon.fancyOutput(\"(Hint: pick the one that makes the most sense for a joke)\");\n if(askAnswers(\"It was forced into the stone-cold pavement\" , \"It let out a little wine ;)\" , \"The following quote was made: 'Life is too short not to eat jam out of the jar'\" , \"Brennan's mom located said grape and blamed Max for it unfortunately being smashed into the carpet :/\" , 1))\n dungeon.fancyOutput(\"After inputing your answer, the wall reads: 'The THIRD torch to pull is the 2nd torch'\");\n else if(getHurt())\n return false;\n else\n dungeon.fancyOutput(\"The room stops shaking and the wall reads: 'The THIRD torch to pull is the 2nd torch'\");\n\n torchOrder += 2;\n dungeon.fancyOutput(\"Known order so far: \" + torchOrder + \"\\n\");\n\n\n dungeon.fancyOutput(\"'Here is the forth question:'\"); // FORTH QUESTION\n dungeon.fancyOutput(\"Picture the following sceanario: Derek and Brennan role up to a stoplight. Derek starts reving his engine, (thus initiating a race)... What does derek request if he wins the race?\");\n if(askAnswers(\"A cup of coffee\" , \"A full tank of gass\" , \"The answers to a few leetcode questions\" , \"Nothing, he had his poker face on. This wasnt his first rodeo\" , 2))\n dungeon.fancyOutput(\"After inputing your answer, the wall reads: 'The FORTH torch to pull is the 5th torch'\");\n else if(getHurt())\n return false;\n else\n dungeon.fancyOutput(\"The room stops shaking and the wall reads: 'The FORTH torch to pull is the 5th torch'\");\n\n torchOrder += 5;\n dungeon.fancyOutput(\"Known order so far: \" + torchOrder + \"\\n\");\n\n\n dungeon.fancyOutput(\"'Here is the final question:''\"); // FIFTH QUESTION\n dungeon.fancyOutput(\"Just as a dog is a man's best friend, johnny's best 'friend' is: \");\n if(askAnswers(\"His favorite pencil\", \"TacoBell serving plates (so he can drift his front-wheel drive car\", \"Max? probably not...\", \"A cold root-beer with his old man\", 1))\n dungeon.fancyOutput(\"After inputing your answer, the wall reads: 'The LAST torch to pull is the 3rd torch'\");\n else if(getHurt())\n return false;\n else\n dungeon.fancyOutput(\"The room stops shaking and the wall reads: 'The LAST torch to pull is the 3rd torch'\");\n\n torchOrder += 3;\n dungeon.fancyOutput(\"Known order so far: \" + torchOrder + \"\\n\");\n\n \n dungeon.fancyOutput(\"You proceed to extingush the torches in the order that you discovered\");\n dungeon.fancyOutput(\"The wall reads: 'Congratulations on passing this room! I, King Brandank, apluad you and grant you passage onwards.\");\n dungeon.fancyOutput(\"Please, before your departure, accept my gift of gratitude\\n\\n\");\n player.giveItem(\"Rusty Shiv\");\n //dungeon.fancyOutput(\"(Sorry for the extensive amount of text... I hope you got a good laugh out of this :D)\");\n return true;\n\n\n\n }", "static int inputCheck(Mode game){\n Scanner sc=new Scanner(System.in);\r\n int input;\r\n System.out.println(\"Your turn:\");\r\n do {\r\n input = sc.nextInt();\r\n if(input < 1 || input >9){\r\n System.out.println(\"Enter a number from 1-9\");\r\n }else if (game.filled(input)){\r\n System.out.println(\"Box is full, please enter another number\");\r\n }\r\n }while(input < 1 || input >9 || game.filled(input));\r\n return input;\r\n }", "@FXML\n private void handleUserInput() {\n String input = userInput.getText();\n String response = mug.getResponse(input);\n dialogContainer.getChildren().addAll(\n DialogBox.getUserDialog(input, userImage),\n DialogBox.getMugDialog(response, mugImage)\n );\n userInput.clear();\n if (input.toUpperCase().equals(\"BYE\")) {\n PauseTransition delay = new PauseTransition(Duration.seconds(1));\n delay.setOnFinished(event -> {\n Platform.exit();\n System.exit(0);\n });\n delay.play();\n }\n }", "private void userMoveInput(Board board) {\n\n Scanner in = new Scanner(System.in);\n System.out.print(this.name + \"- Enter number to place \" + this.xOrO + \" :\");\n try {\n this.playerInput = in.nextInt() - 1;\n if (board.checkIfSpotTaken(playerInput)) {\n invalidInput(board);\n }\n }\n catch(Exception err){\n System.out.print(\"Enter a number from 1 - 9. \");\n invalidInput(board);\n }\n }", "public static void userInputError(int input) //users inputs option that is out of bounds\n\t{\n\t\tSystem.out.println(\"ERROR: Selection Out Of Bounds! \\nOption \" + input + \" Does Not Exist\"); //error message\n\t\tSystem.out.println(\"Press 'Enter' To try Again\"); // prompt to try again\n\t}", "public boolean solvingPuzzle(String userInput) {\n\t\tboolean solved = false;\n\n\t\tif (userInput.equalsIgnoreCase(\"blue, aqua, green, purple\")) {\n\t\t\tSystem.out.println(\"The door opens. Well Done!\");\n\t\t\tsolved = true;\n\t\t} else {\n\t\t\tSystem.out.println(\"Wrong combination please try again.\");\n\t\t\tsolved = false;\n\t\t}\n\t\treturn solved;\n\t}", "public void playChip(int col, Player player) {\n\t\t// ********************\n\t\t// Aufgabe a)\n\t\t// Klasse muss selber verwalten, wer gerade am Zug war \n\t\tint inputRow = fields.length - fillState[col] - 1;\n\t\t\n\t\tfields[inputRow][col] = first_player ? 1:2;\n\t\t\n\t\tfirst_player = !first_player;\n\t\t\n\t\tfillState[col]++;\n\t\t\n\t\t// ********************\n\t}", "public void consoleBoardInput(){\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString input;\n\t\tint row=0,col=0;\n\t\t\n\t\tSystem.out.println(\"Current symbol: \" + ttt.getCurrentSymbol());\n\t\t\n\t\t//get row\n\t\tdo{\n\t\t\ttry{\n\t\t\t\tSystem.out.print(\"Enter Row: \");\n\t\t\t\tinput=in.readLine();\n\t\t\t\trow = Integer.parseInt(input);\n\t\t\t\tif (row<0 || row>2) throw new IllegalArgumentException();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\t}\n\t\t}while(true);\n\t\t\n\t\t//get column\n\t\tdo{\n\t\t\ttry{\n\t\t\t\tSystem.out.print(\"Enter Col: \");\n\t\t\t\tinput=in.readLine();\n\t\t\t\tcol = Integer.parseInt(input);\n\t\t\t\tif (col<0 || col>2) throw new IllegalArgumentException();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\t}\n\t\t}while(true);\n\t\t\n\t\t//check whether selected cell is valid\n\t\tif (!ttt.placeMove(row,col))\n\t\t\tSystem.out.println(\"Selected cell already filled. Try again.\");\n\t}", "@Test\r\n public void Test006TakeUserInputInValidColumn()\r\n {\r\n gol.input = new Scanner(new ByteArrayInputStream(\"2 1 2 20 2 3 2 4 -1\".getBytes()));\r\n gol.takeUserInput();\r\n assertTrue(gol.grid[2][1] == 1 && gol.grid[2][3] == 1 && gol.grid[2][4] == 1);\r\n }", "public void processInput() {\n \ttempBoard[inputRowIndex-1][inputColIndex-1]=piece; //set the chosen cell to the piece of the current player\n \tGame.permBoard.setBoard(tempBoard); //set this tempBoard with the new turn on it to the permBoard\n \t\n \t//TODO implement quit\n }", "@Test\r\n public void Test007TakeUserInputInValidRowColumn()\r\n {\r\n gol.input = new Scanner(new ByteArrayInputStream(\"2 1 20 20 2 3 2 4 -1\".getBytes()));\r\n gol.takeUserInput();\r\n assertTrue(gol.grid[2][1] == 1 && gol.grid[2][3] == 1 && gol.grid[2][4] == 1);\r\n }", "public static void printErrorForInvalidCommand(String userInput) {\n System.out.println(\"Aw man! I am unable to \" + userInput + \" yet! Please specify a different function! :D\");\n }", "@FXML\n private void handleUserInput() {\n String input = userInput.getText();\n String response = duke.getResponse(input);\n dialogContainer.getChildren().addAll(\n DialogBox.getUserDialog(input, userIcon),\n DialogBox.getDukeDialog(response, mrRobotIcon)\n );\n userInput.clear();\n if (response.equals(\"Goodbye friend.\")) {\n Platform.exit();\n }\n }", "@Test\r\n public void Test005TakeUserInputInValidRow()\r\n {\r\n gol.input = new Scanner(new ByteArrayInputStream(\"20 1 2 2 2 3 2 4 -1\".getBytes()));\r\n gol.takeUserInput();\r\n assertTrue(gol.grid[2][3] == 1 && gol.grid[2][2] == 1 && gol.grid[2][3] == 1 && gol.grid[2][4] == 1);\r\n }", "public void run(){\n //make sure user enters valid number of players\n if((numTotalPlayers < 1) || (numTotalPlayers > 8)){\n view.showErrorPopUp(\"Invalid input, please enter a player number from 2 to 8\");\n System.out.println(\"Please enter a number from 2 to 8\");\n System.exit(0);\n }\n \n //creates the player queue with diff values according to num players\n players = initPlayers();\n\n // init and show board and currentPlayer\n board.resetBoard();\n startNewTurn();\n view.show(); // show view as last step of run()\n\n if (numTotalPlayers == numComputerPlayers) { // if all players are computers, trigger doComputerTurn()\n view.showErrorPopUp(\"The board is excited to have all computer players, so it's about to shake things up, like it's dancing! \\n\\nWARNING: do not run the program with all of the players as computer players if you have epilepsy as the colors of the game are about to flash on-screen during the whole game.\");\n doComputerTurn();\n }\n }", "public static int promptUser(Scanner sc){\n int userInput = 0;\n boolean validInput = false;\n\n System.out.print(\"\" +\n \"Choose a game option: \\n\" +\n \" 1. Start playing \\n\" +\n \" 2. Set the starting configuration\\n\" +\n \"Enter your choice --> \");\n\n //loop until a valid input is read in\n while(validInput == false) {\n //ask until an integer is found\n while (!sc.hasNextInt()) {\n System.out.println(\"\\n\\t***INVALID INPUT***\\n\");\n System.out.println(\"\" +\n \"Choose a game option: \\n\" +\n \" 1. Start playing \\n\" +\n \" 2. Set the starting configuration\\n\" +\n \"Enter your choice --> \");\n sc.next();\n }\n\n userInput = sc.nextInt();\n\n //check to see if they entered a 1 or a 2\n if(userInput == 1 || userInput == 2)\n validInput = true;\n else{ //otherwise, re-prompt\n System.out.println(\"\\n\\t***INVALID INPUT***\\n\");\n System.out.println(\"\" +\n \"Choose a game option: \\n\" +\n \" 1. Start playing \\n\" +\n \" 2. Set the starting configuration\\n\" +\n \"Enter your choice --> \");\n continue;\n }\n\n }\n\n return userInput;\n }", "protected void playerTurn(APlayer player, board tttGame) {\n\n int num = 0;\n //num = in.nextInt();\n do {\n System.out.println(\"Select the box you want to mark!\");\n while (!in.hasNextInt()) {\n System.out.println(\"That's not a number!\");\n in.next();\n }\n num = in.nextInt();\n\n }while (!(num > 0 && num < 10));\n\n\n player.selectBox(num);\n while (!(player.getCol() >= 0 && player.getCol() <= 2 && player.getRow() >= 0 && player.getRow() <= 2\n && !tttGame.isBoxEmpty(player.getRow(), player.getCol()))) {\n\n //check if its empty\n if (tttGame.isBoxEmpty(player.getRow(), player.getCol())) {\n System.out.println(\"Invalid box\");\n num = in.nextInt();\n player.selectBox(num);\n }\n }\n\n tttGame.selectBox(player.getRow(), player.getCol(), player.getMark());\n }", "private static boolean valid_input(String user_input) {\n \n boolean output = false;\n \n if(user_input.length() == 2){\n \n output = (user_input.substring(0,1).matches(\"[0-9]\") && user_input.substring(1,2).matches(\"[a-zA-Z]\"));\n } else if (user_input.length() == 3) {\n \n output = (user_input.substring(0,2).matches(\"[1-2][0-9]\") && user_input.substring(2,3).matches(\"[a-zA-Z]\"));\n \n if(Integer.parseInt(user_input.substring(0,2))>TicTacToe.game.gridSize){\n output = false;\n }\n }\n \n return output;\n }", "private void processInputUntilRoomChange() {\n while (true) {\n // Get the user input\n System.out.print(\"> \");\n String input = scan.nextLine();\n\n // Determine which command they used and act accordingly\n if (input.startsWith(\"help\")) {\n this.displayCommands();\n } else if (input.startsWith(\"look\")) {\n this.displayDescription(input.substring(input.indexOf(\" \") + 1));\n } else if (input.startsWith(\"get\")) {\n this.acquireItem(input.substring(input.indexOf(\" \") + 1));\n } else if (input.startsWith(\"go\")) {\n if (this.movePlayer(input.substring(input.indexOf(\" \") + 1))) {\n break;\n }\n } else if (input.startsWith(\"use\")) {\n this.useItem(input.substring(input.indexOf(\" \") + 1));\n } else if (input.startsWith(\"inventory\")) {\n System.out.print(player.listInventory());\n } // The player did not enter a valid command.\n else {\n System.out.println(\"I don't know how to \" + input);\n }\n }\n }", "private void promptTurn()\n \t{\n \t\tUserInfo curr;\n\t\tString meow;\n \t\tcurr = players[turnIndex];\n \t\tString[] tokens;\n \t\tint x;\n \t\tint y;\n \t\n// PROTOCOL \t\n \t\tcurr.sendMessage(prtcl.makePacket(\"Please enter a move\", \"message\")); \n\t\tmeow = curr.getMessage();\n\t\ttokens = meow.split(\" \");\n// PROTOCOL\n \t\tx = Integer.parseInt(tokens[0]);\n \t\ty = Integer.parseInt(tokens[1]);\n \t\n \t\t// Should have a method to process the user's input, and provide an error message back to them if necessary. \n \t\tif(game.remove(x, y))\n \t\t{\n \t\t\tplayers[(turnIndex + 1) % 2].sendMessage(prtcl.makePacket(\"Other player took \" + tokens[0] + \" items from row \" + tokens[1] + \".\", \"message\"));\n \t\t\tbroadcast(prtcl.makePacket(game.toString(), \"message\"));\n \t\t\t// This is where the check to see if the game is won occurs. If so, a winner (the person who just moved) is \n \t\t\t// congratulated. \n \t\t\tif(!game.isDone())\n \t\t\t{\n \t\t\t\tturnIndex += 1;\n \t\t\t\tturnIndex %= 2;\n \t\t\t}\n \t\t} else\n \t\t{\n // PROTOCOL\n \t\t\tplayers[turnIndex].sendMessage(prtcl.makePacket(\"Something was wrong with that. Try again.\", \"ERROR\"));\n // PROTOCOL\n \t\t}\t\n \t}", "public static void placePlayerPiece(PlayerMovesHandler player) {\n\t\t// char piece = player.getPiece();\n\t\tScanner in = new Scanner(System.in);\n\t\tboolean invalidInput = true;\n\n\t\twhile (invalidInput) {\n\t\t\tSystem.out.println(\"Enter row and column no. where you want to place your mark (Top left is [1,1])\");\n\n\t\t\tint row = in.nextInt() - 1;\n\t\t\tint col = in.nextInt() - 1;\n\t\t\tinvalidInput = !(player.setPiece(row, col));\t// callee returns true if success \n\t\t}\n\t}", "public static void playerMove() \n\t{\n\t\tSystem.out.println(\"\\nPlayer: Enter a slot number :\\n\");\n\t\tint boardSlotNumber = scanner.nextInt();\n\n\t\tif (boardSlotNumber > 0 && boardSlotNumber <= 9 && tictactoeBoard[boardSlotNumber] != 'x' && tictactoeBoard[boardSlotNumber] != 'o')\n\t\t{\n\t\t\ttictactoeBoard[boardSlotNumber] = playerInput;\n\t\t\t//beforeMoveBoard();\n\t\t\tshowBoard();\n\t\t} \n\t\telse \n\t\t{\n\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\tplayerMove();\n\t\t}\n\t}", "@FXML\n private void handleUserInput() {\n String input = userInput.getText().strip();\n String response = \" \";\n\n DialogBox userDb = null;\n DialogBox dukeDb = null;\n\n try {\n response = this.getResponse(input);\n userDb = DialogBox.getUserDialog(input, userImage);\n dukeDb = DialogBox.getDukeDialog(response, dukeImage);\n } catch (DukeException e) {\n userDb = DialogBox.getUserDialog(input, userImage);\n dukeDb = DialogBox.getDukeDialog(GUI.sendErrorMessage(e), dukeImage);\n dukeDb.modifyColorForError();\n }\n\n dialogContainer.getChildren().addAll(\n userDb,\n dukeDb\n );\n\n userInput.clear();\n\n // Exit window once duke chatbot is closed\n if (isClosed(response)) {\n System.exit(0);\n }\n }", "public static char playerInput(String player) {\r\n\t System.out.println(\"Enter the input to begin the game: X | O: \");\r\n\t char inputChar = value.next().charAt(0);\r\n\r\n\t return inputChar;\r\n\t }", "public void startPlaying(){\n while(!dotComList.isEmpty()){\n // Get user input string.\n String inputGuess = helper.getUserInput(\"Enter a guess : \"); \n // Check the user input guess.\n checkUserGuess(inputGuess);\n }\n //Finish the game in case the dotComList is empty, viz all have sunk\n finishGame();\n }", "public void NumberOfPlayers()\r\n {\r\n Input=JOptionPane.showInputDialog(\"Type the number of players\", JOptionPane.YES_NO_OPTION);\r\n \r\n SecondInput = JOptionPane.showInputDialog(\"How many of those \"+ Input +\" players will be AI ?\", JOptionPane.YES_NO_OPTION);\r\n \r\n while(Converter(SecondInput) >= Converter(Input))\r\n {\r\n if(Converter(SecondInput) >= Converter(Input))\r\n {\r\n JOptionPane.showMessageDialog(this,\"AI players can't be equal or more than the original number of players!\",\r\n \"ERROR\",\r\n JOptionPane.ERROR_MESSAGE);\r\n\r\n SecondInput = JOptionPane.showInputDialog(\"How many of those \"+ Input +\" players will be AI ?\", JOptionPane.YES_NO_OPTION);\r\n }\r\n \r\n }\r\n \r\n if(Input!=null)\r\n {\r\n int j = Converter(Input); \r\n \r\n Start();\r\n }\r\n \r\n }", "public static void main(String[] args) {\n boolean repeatGame = true;\n while (repeatGame == true) {\n GameBoard myGame = new GameBoard();\n String myBoard = myGame.toString();\n System.out.println(myBoard);\n char currentPlayer = 'X';\n boolean killGame = false;\n while (killGame == false) {\n Scanner input = new Scanner(System.in);\n System.out.println(\"Player \" + currentPlayer + \", what column do you want to place your marker in?\");\n int userInput = input.nextInt();\n while (userInput >= myGame.getNumColumns() || userInput < 0) {\n System.out.println(\"Invalid input, must be columns in between 0 - \" + myGame.getNumColumns());\n userInput = input.nextInt();\n }\n while (myGame.checkIfFree(userInput) == false) {\n System.out.println(\"This column is not free, re-choose another valid column\");\n userInput = input.nextInt();\n while (userInput >= myGame.getNumColumns() || userInput < 0) {\n System.out.println(\"Invalid input, must be columns in between 0 - \" + (myGame.getNumColumns()-1));\n userInput = input.nextInt();\n }\n }\n myGame.placeToken(currentPlayer, userInput);\n myBoard = myGame.toString();\n System.out.println(myBoard);\n if (myGame.checkForWin(userInput) == true) {\n break;\n }\n if (myGame.checkTie() == true) {\n System.out.println(\"The game has ended in a tie.\");\n break;\n }\n\n // Player Turns\n if (currentPlayer == 'X') {\n currentPlayer = 'O';\n }\n else {\n currentPlayer = 'X';\n }\n }\n if (myGame.checkTie() == false) {\n System.out.println(\"Player \" + currentPlayer + \" won!\");\n }\n System.out.println(\"Would you like to play again? Y/N\");\n String userInput2;\n Scanner repeatIn = new Scanner(System.in);\n userInput2 = repeatIn.next();\n\n boolean repeat = true;\n while(repeat) {\n if (userInput2.equals(\"y\")) {\n repeatGame = true;\n break;\n }\n else if (userInput2.equals(\"n\")) {\n repeatGame = false;\n break;\n }\n System.out.println(\"Would you like to play again? Y/N\");\n userInput2 = repeatIn.next();\n }\n }\n }", "public void go(){\n \n turn = true;\n \n // if AI, do computery things\n if(type==\"AI\"){\n \n //let user know that AI is going\n System.out.print(\"\\tThe computer will now make a move..\");\n delay(1000, TicTacToe.game.gridSize); //take a second to go to make it appear as if computer is thinking\n \n while(turn){\n //AI selects a random empty cell and places corrosponding mark\n index = (int)Math.round((TicTacToe.game.gridSize*TicTacToe.game.gridSize-1)*Math.random());\n move(index, TicTacToe.game);\n }\n \n } else {\n //if human, do human stuff\n \n System.out.println(\"\\tPlease place an X on the grid. You can\");\n TicTacToe.user_input = TicTacToe.getInput(\"\\tdo this by typing 1A, 1B, 1C, 2A, etc.: \");\n\n //while it's the player's turn...\n while(turn) {\n \n //validate user input\n if(valid_input(TicTacToe.user_input)){\n \n if(TicTacToe.user_input.length()==2){\n \n column = Integer.parseInt(TicTacToe.user_input.substring(0,1));\n row = letterToNumber(TicTacToe.user_input.substring(1,2));\n \n } else {\n \n column = Integer.parseInt(TicTacToe.user_input.substring(0,2));\n row = letterToNumber(TicTacToe.user_input.substring(2,3));\n \n }\n \n index = TicTacToe.game.gridSize*(row-1)+(column-1);\n \n if(index > (TicTacToe.game.gridSize*TicTacToe.game.gridSize)-1 || index < 0){\n \n TicTacToe.user_input = TicTacToe.getInput(\"That's not a valid spot! Please choose another spot: \");\n } else {\n \n //if valid input, and cell isn't taken already,\n //place mark in selected cell and end turn\n move(index, TicTacToe.game);\n \n if(turn){\n \n TicTacToe.user_input = TicTacToe.getInput(\"That space is already in play! Please choose another spot: \");\n }\n \n }\n \n } else {\n \n TicTacToe.user_input = TicTacToe.getInput(\"That's not valid input. Please choose another spot: \");\n }\n }\n }\n }", "@FXML\n private void handleUserInput() {\n String input = userInput.getText();\n CommandResult dukeResponse;\n try {\n dukeResponse = duke.getResponse(input);\n runDialogContainer(input, dukeResponse);\n if (dukeResponse.isExit()) {\n runExitDialogContainer();\n }\n } catch (DukeException e) {\n runDialogContainer(input, e.getMessage());\n }\n userInput.clear();\n }", "private void userChoice(int x) {\n int choice;\n while (true) { // loop for validation\n try {\n choice = Integer.parseInt(sc.next());\n if (choice < 0 || choice > x) {\n System.out.println(\"Error! Please enter a valid number from the option above\");\n } else {\n this.choice = choice;\n return;\n }\n } catch (Exception e) {\n System.out.println(\"Error! Please enter a valid number from the option above\");\n }\n }\n }", "@FXML\n private void handleUserInput() {\n if (userInput.getText().trim().length() != 0) {\n String input = userInput.getText();\n String response = ailurus.getResponse(input);\n assert response.length() != 0 : \"response should not be empty\";\n assert userImage != null : \"userImage should not be null\";\n assert ailurusImage != null : \"ailurusImage should not be null\";\n dialogContainer.getChildren().addAll(\n DialogBox.getUserDialog(input, userImage),\n DialogBox.getAilurusDialog(response, ailurusImage)\n );\n userInput.clear();\n if (Ailurus.isExit()) {\n userInput.setDisable(true);\n new Timer().schedule(new TimerTask() {\n @Override\n public void run() {\n Platform.exit();\n System.exit(0);\n }\n }, 1000);\n }\n } else {\n userInput.clear();\n }\n }", "public boolean validatePlay(int column, char[][] grid) {\n //Where given column is between 0 - 6\n if (column < 0 || column > grid[0].length) {\n return false;\n }\n\n //Verifying whether given column is full\n if (grid[0][column] != ' ') {\n System.out.println();\n System.out.println(\"Entered column is already full.. Kindly enter the other column\");\n return false;\n }\n\n return true;\n }", "@Override\r\n public void playGame() {\r\n printInvalidCommandMessage();\r\n }", "@Test\r\n public void Test004TakeUserInputValid()\r\n {\r\n gol.input = new Scanner(new ByteArrayInputStream(\"1 1 2 2 2 3 2 4 -1\".getBytes()));\r\n gol.takeUserInput();\r\n assertTrue(gol.grid[1][1] == 1 && gol.grid[2][2] == 1 && gol.grid[2][3] == 1 && gol.grid[2][4] == 1);\r\n }", "@FXML\n private void handleUserInput() {\n String input = userInput.getText();\n if (input.toLowerCase().equals(\"bye\")) {\n String response = cait.getResponse(input);\n dialogContainer.getChildren().addAll(\n DialogBox.getUserDialog(input, userImage),\n DialogBox.getCaitDialog(response, caitImage)\n );\n userInput.clear();\n Platform.exit();\n }\n String response = cait.getResponse(input);\n dialogContainer.getChildren().addAll(\n DialogBox.getUserDialog(input, userImage),\n DialogBox.getCaitDialog(response, caitImage)\n );\n userInput.clear();\n }", "public static boolean validInput(int columnnumber){ //determine if column chosen is valid, and if user has won or not \r\n if(columnnumber>=0&&columnnumber<8){\r\n for(int i = 0; i<=5; i++){\r\n if(arrayCircles[i][columnnumber-1].getColor()==Color.white){ //if there is still open space left in the column, return true\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }", "private void invalidTry(){\n setButtons(false);\n setMsgText(\"There are 2 players in game, you cannot join in now.\");\n }", "public void playerMove(SharedConstants.PlayableItem playitem){\n\t\tboolean isValidInput = false;\n\t\tint col;\n\t\tString AICoordinates;\n\t\tdo {\n\t\t\tif(currentPlayer == SharedConstants.PlayableItem.BLACK) {\n\t\t\t\tSystem.out.print(\"What column do you wish to put your piece in player Black?\\n\"); \n\t\t\t\tint[] parsed = consoleParser(playerMove,false);\n\t\t\t\tcol = parsed[0];\n\t\t\t\tif(col == -2){\n\t\t\t\t\tSystem.out.println(\"Redo\");\n\t\t\t\t\tredoBoard();\n\t\t\t\t}\n\t\t\t\telse if(col == -3){\n\t\t\t\t\tSystem.out.println(\"Undo\");\n\t\t\t\t\tundoBoard();\n\t\t\t\t}\n\t\t\t\telse if(col == -4){\n\t\t\t\t\tSystem.out.println(\"Save\");\n\t\t\t\t\tsaveMove();\n\t\t\t\t}\n\t\t\t\telse if(col == -5){\n\t\t\t\t\tSystem.out.println(\"Load\");\n\t\t\t\t\tloadMove();\n\t\t\t\t}\n\t\t\t\tif(validMove(col)){\n\t\t\t\t\tgameStateModel.getUndoBoard().add(board.makeDeepCopy());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.print(\"AI \" + aiPlayer.getAIType() + \" move \\n\");\n\t\t\t\tAICoordinates = aiPlayer.makeMove(this);\n\t\t\t\tcol = Integer.parseInt(AICoordinates.split(\",\")[1]);\n\t\t\t}\n\t if(validMove(col)){\n\t \t\tint row = 5;\n\t \t\tint substituteLevel = (currentPlayer.equals(SharedConstants.PlayableItem.BLACK) ? -2:-1);\n\t \t\tmoveSet(row,col,substituteLevel);\n\t\t \tisValidInput = true;\n\t }\n\t else if(col < -1){\n\t \tSystem.out.println(\"Action\");\n\t }\n\t else\n\t\t\t\tSystem.out.println(\"Invalid move\"); \t\n\t\t} while(!isValidInput);\t\n\t\tif(isGameOver()){\n\t\t\tcurrentState = SharedConstants.GameStatus.GAME_END;\n\t\t}\n\t}", "private static int userInterface()\n {\n int uinput = 0;\n boolean badInput = true;\n\n System.out.println(\"This program will print a table of x\");\n System.out.println(\"and f(x) for x from 0 to the user\");\n System.out.println(\"inputted integer with f(x) being\");\n System.out.println(\"equal to:\");\n System.out.println(\"x^2 for x < 5\");\n System.out.println(\"x^2 - 3x - 10 for 5 <= x < 10\");\n System.out.println(\"x^2 - 7x - 8 for 10 <= x.\");\n \n Scanner read = new Scanner(System.in);\n System.out.print(\"Enter number of x: \");\n \n while (badInput)\n {\n if (read.hasNextInt())\n {\n uinput = read.nextInt();\n \t \tbadInput = false;\n\n if (uinput <= 0)\n {\n System.out.print(\"Enter a positive integer: \");\n badInput = true;\n }\n }\n else\n {\n \tSystem.out.print(\"Enter a positive integer: \");\n \t \tbadInput = true;\n \t }\n read.nextLine();\n }\n\n return uinput;\n }", "public boolean isValid(int row, int column, int value) {\n\t\tfor (int k = 0; k < 9; k++) { // Check row.\n\t\t\tif (value == player[k][column]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (int k = 0; k < 9; k++) { // Check column.\n\t\t\tif (value == player[row][k]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tint boxRowOffset = (row / 3) * 3; // Set offset to determine box.\n\t\tint boxColOffset = (column / 3) * 3;\n\t\tfor (int k = 0; k < 3; k++) { // Check box.\n\t\t\tfor (int m = 0; m < 3; m++) {\n\t\t\t\tif (value == player[boxRowOffset + k][boxColOffset + m]) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true; // no violations, so it's legal\n\t}", "public void startSinglePlayerGame() {\n\n Scanner scanner = new Scanner(System.in);\n\n while (true) {\n\n //show map.\n printMap();\n //show scoreboard.\n displayScoreBoard();\n\n System.out.println();\n System.out.println(\"Choose your cell :\");\n System.out.println(\"------------------\");\n System.out.println();\n\n //enter column.\n System.out.println(\"Column (from A-H) : \");\n String column = scanner.next();\n\n //enter row.\n System.out.println(\"Row (from 1-8) : \");\n int row = scanner.nextInt();\n\n //set player 1.\n setplayer1('●');\n\n //call move method.\n move(column.charAt(0), row);\n\n if (!gameOver()) {\n endGame();\n return;\n }\n String chars = \"ABCDEFGH\";\n\n //set player 2.\n setplayer1('◯');\n //find a random column and row.\n while (true) {\n Random random = new Random();\n int column3 = 0;\n char column2 = chars.charAt(random.nextInt(chars.length()));\n int row2 = random.nextInt(8);\n\n //change char to number.\n if (column2 == 'A') column3 = 0;\n if (column2 == 'B') column3 = 1;\n if (column2 == 'C') column3 = 2;\n if (column2 == 'D') column3 = 3;\n if (column2 == 'E') column3 = 4;\n if (column2 == 'F') column3 = 5;\n if (column2 == 'G') column3 = 6;\n if (column2 == 'H') column3 = 7;\n\n //check if the random block is allowed or not.\n if (isAllowedMove(row2, column3) && isBlockEmpty(row2, column3)) {\n System.out.println();\n System.out.println(\"Computer choosed cell in Column <\" + column2 + \"> and Row <\" + (row2 + 1) + \">\");\n System.out.println();\n move(column2, row2 + 1);\n break;\n }\n }\n //check end game.\n if (!gameOver()) {\n System.out.println();\n printMap();\n displayScoreBoard();\n endGame();\n return;\n }\n }\n\n }", "public void game(int i) {\n //if it is true it is player 1, other wise it is player 2\n //also changes the colour to indicate who moves next\n if (turn) {\n changeColourButton(new Color(0, 0, 255));\n turn(i, 1, 0);\n } else {\n changeColourButton(new Color(255, 0, 0));\n turn(i, 2, 1);\n }\n\n //prevents additional inputs if the column is full\n killButton();\n }", "public boolean My_Turn(BattleshipServer server, BattleshipClient client) {\r\n\t\t\tdisplay.putStaticLine(\"\");\t\r\n\t\t\tdisplay.putStaticLine(\"Enter the position you want to Attack (i.e. A2) \");\r\n\t\t\tdisplay.printScreen();\r\n\t\t\tdisplay.printPrompt(\"user> \");\r\n\t\t\ttry{\r\n\t\t\tattack_coord=Get_Input();\r\n\t\t\t}catch(IOException ioe){\r\n\t\t\t\tattack_coord=\"INVALID COMMAND\";\r\n\t\t\t}\r\n\t\twhile(!Validate_Input(attack_coord)){\r\n\t\t\tdisplay.printPrompt(\"user> \");\r\n\t//\t\tdisplay.putStaticLine(\"\");\t\r\n\t//\t\tdisplay.putStaticLine(\"Enter the position you want to Attack (i.e. A2) \");\r\n\t\t\ttry{\r\n\t\t\t\tattack_coord=Get_Input();\r\n\t\t\t\t}catch(IOException ioe){\r\n\t\t\t\t\tattack_coord=\"INVALID COMMAND\";\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t/*\r\n\t\t\t * send coordinates with C in front to indicate they are coordinate\r\n\t\t\t */\r\n\t\t\tif(server!=null)\r\n\t\t\t\tserver.Send(\"C\" + attack_coord); \r\n\t\t\telse if(client!=null)\r\n\t\t\t\tclient.Send(\"C\" + attack_coord);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.err.println(\"Error with connection\");\r\n\t\t\treturn false;\r\n\t\t}\t\t\r\n\t\t/*\r\n\t\t * We now have a valid guess and have sent it to the opponent. Update the Display\r\n\t\t */\r\n\t\t\r\n\t\tboolean hit=false;\r\n\t\t\r\n\t\t/*\r\n\t\t * update hit_history\r\n\t\t */\r\n\t\thisBoard.hit_history[xcoor][ycoor]=1; \r\n\t\t\t// Check for sunk ships and update the board accordingly.\r\n\r\n\t\t\r\n\t\tif(hisBoard.hit_or_miss(xcoor, ycoor)){\r\n\t\t\thit=true;\r\n\t\t\tSound.playSound(\"res/explosion.wav\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\tSound.playSound(\"res/Missile_Incoming_FlyBy.wav\");\r\n\t\t}\r\n\t\t\r\n\t\tString sunk=hisBoard.check_sunk();\r\n\t\tif(sunk!=\"nothing\"){\r\n\t\t\tSound.playSound(\"res/bubbles.wav\");\r\n\t\t\tif(hisBoard.check_all_sunk()){\r\n\t\t\t\tvictory=true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t// Now that all the calculations are done, print the display.\r\n\t\tdisplay.clearScreen();\r\n\t\tthis.Display_Boards();\r\n\t\tdisplay.putStaticLine(\"\");\r\n\t\tif(hit)\r\n\t\t\tdisplay.putStaticLine(attack_coord + \"... Hit!\");\r\n\t\telse\r\n\t\t\tdisplay.putStaticLine(attack_coord + \"... Miss\");\r\n\t\tdisplay.putStaticLine(\"\");\r\n\t\tif(sunk!=\"nothing\")\r\n\t\t\tdisplay.putStaticLine(\"You sunk his \" + sunk); //not sure of syntax on this\r\n\t\tdisplay.putStaticLine(\"\");\r\n\t\tif(victory)\r\n\t\t\tdisplay.putStaticLine(\"You WIN!!!!!!\");\r\n\t\t\r\n\t\t\r\n\t\t\t// It's not my turn anymore\r\n\t\thit=false;\r\n\t\tthis.isTurn=false;\r\n\t\treturn true;\r\n}", "public boolean handleUserInput(String userInput) {\n return this.duke.processOneCommand(userInput);\n }", "@FXML\n private void handleUserInput() {\n String input = userInput.getText();\n dialogContainer.getChildren().add(DialogBox.getUserDialog(input, userImage));\n if (duke.getResponse(input)) {\n CompletableFuture<Void> completableFuture = CompletableFuture.runAsync(() -> {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n });\n completableFuture.thenRun(() -> Platform.exit());\n }\n userInput.clear();\n }", "public void start(){ \r\n\t\tScanner in = new Scanner (System.in); \r\n\t\tSystem.out.println(\"Let's play Tic Tac Toe!\"); \r\n\t\tSystem.out.print(\"Who is the first player? Enter 1 for you, 0 for Computer\"); \r\n\t\tif (in.hasNextInt()){ \r\n\t\t\tcurrentTurn = in.nextInt(); \r\n\t\t\tif (currentTurn != 1 && currentTurn != 0){ \r\n\t\t\t\tSystem.out.println(\"Invalid Value entered. Default: Computer is first player.\"); \r\n\t\t\t\tcurrentTurn = 0; \r\n\t\t\t}\r\n\t\t}\r\n\t\telse { \r\n\t\t\tSystem.out.println(\"Invalid Value entered. Default: Computer is first player.\"); \r\n\t\t\tcurrentTurn = 0; \r\n\t\t}\r\n\t\tinitialize(); \r\n\t}", "public static byte rPSChoose(Scanner input, String userInput){\n System.out.println(\"1-Rock\\n2-Paper\\n3-Scissor\");\n do{ \n userInput=input.nextLine();\n switch(userInput){\n case \"1\": \n rock();\n return 1;\n case \"2\": \n paper();\n return 2;\n case \"3\": \n scissor();\n return 3;\n default:\n System.out.println(\"Type a valid option\");\n\n }\n }while (true);\n \n }", "private boolean validInput(Player player, int choice) {\n if (0 <= choice && choice < player.getCards().size()) {\n if(state.getWildDrawPenalty() != 1 && player.getCards().get(choice) instanceof WildDrawCard) {\n return true;\n }\n if( state.getWildDrawPenalty() != 1 && !(player.getCards().get(choice) instanceof WildDrawCard)) {\n System.out.println(\"You should put WildDraw card.\");\n return false;\n }\n if( player.getCards().get(choice) instanceof WildDrawCard){\n boolean validWildDraw = true;\n for (Card temp: player.getCards()) {\n if(temp.isValidCard(currentCard)) {\n validWildDraw = false;\n }\n }\n if (validWildDraw) {\n return true;\n }\n else {\n System.out.println(\"You can't put WildDraw card.\");\n return false;\n }\n }\n if(state.getDrawPenalty() != 1 && player.getCards().get(choice) instanceof Draw2Card) {\n return true;\n }\n if (state.getDrawPenalty() != 1 && !(player.getCards().get(choice) instanceof Draw2Card)) {\n System.out.println(\"You should put Draw2 card.\");\n return false;\n }\n if ( player.getCards().get(choice).isValidCard(currentCard)) {\n return true;\n }\n System.out.println(\"Enter valid card.\");\n return false;\n }\n System.out.println(\"Enter a number between 1-\" + player.getCards().size() );\n return false;\n }", "public void battle(Scanner userInput)\r\n\t\t{\r\n\t\t\trunning = true;\r\n\t\t\tSystem.out.println(\"==============================Battle start!=============================\\n\");\r\n\t\t\tdo \r\n\t\t\t{\r\n\t\t\t\tuserTurn(userInput);\r\n\t\t\t\tif(running)\r\n\t\t\t\t{\r\n\t\t\t\t\tenemyTurn(userInput);\r\n\t\t\t\t}\r\n\t\t\t} while(running);\r\n\t\t}", "private int getUserInput() {\n java.util.Scanner scanner = new java.util.Scanner(System.in);\n int input = scanner.nextInt();\n while(input < 1 || input > 3) {\n System.out.println(\"only enter 1 2 or 3.\");\n input = scanner.nextInt();\n }\n return input;\n }", "public static void handleInput(String input, String player) {\n\t\tint choice = 0;\n\t\tswitch(input.toLowerCase())\n\t\t{\n\t\t\tcase \"1\":\n\t\t\tcase \"rock\":\n\t\t\t\tchoice = 1;\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\tcase \"paper\":\n\t\t\t\tchoice = 2;\n\t\t\t\tbreak;\n\t\t\tcase \"3\":\n\t\t\tcase \"scissors\":\n\t\t\t\tchoice = 3;\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t// random number from 1 to 3, if the input is none of the above.\n\t\tif (choice == 0) {\n\t\t\tchoice = random.nextInt(3) + 1;\n\t\t}\n\t\t\n\t\t// check which player sent the input.\n\t\tif(player.equals(\"playerOne\")) {\n\t\t\tPlayerBean.PLAYERONE = choice;\n\t\t} else {\n\t\t\tPlayerBean.PLAYERTWO = choice;\n\t\t}\n\t}", "private void displaySomething() {\n if (userInputValue == null) {\n System.out.println(\"You have not yet entered anything.\");\n } else {\n System.out.println(\"Here's what you entered: \");\n System.out.println(userInputValue);\n }\n }", "public void gameStart(Game starter){\n String getGameMode;\n System.out.println(\"Enter the mode you want to play. Player: \" + getPlayerName() + \"\\n\" + showCardInHand() + \"(HARD) Hardness\" +\"\\n(SPECGRAV) Specific Gravity\" + \"\\n(CLE) Cleavage\" + \"\\n(ABU) Crystal Abundance\" + \"\\n(ECO) Economic Value\");\n System.out.print(\">>>\");\n Scanner gameMode = new Scanner(System.in);\n getGameMode = gameMode.nextLine();\n while (!(getGameMode.equals(\"HARD\") || getGameMode.equals(\"SPECGRAV\") || getGameMode.equals(\"ECO\") || getGameMode.equals(\"ABU\") || getGameMode.equals(\"CLE\") || getGameMode .equals(\"hard\") || getGameMode.equals(\"specgrav\") || getGameMode.equals(\"eco\") || getGameMode.equals(\"abu\") || getGameMode.equals(\"cle\"))){\n // If the player enter the game mode that does not match the criteria\n System.out.println(\"Invalid game mode!\");\n System.out.println(\"Enter the mode you want to play. Player: \" + getPlayerName() + \"\\n\" + showCardInHand() + \"(HARD) Hardness\" +\"\\n(SPECGRAV) Specific Gravity\" + \"\\n(CLE) Cleavage\" + \"\\n(ABU) Crystal Abundance\" + \"\\n(ECO) Economic Value\");\n System.out.print(\">>>\");\n getGameMode = gameMode.nextLine();\n }\n starter.setGameMode(getGameMode.toUpperCase()); // Accepting uppercase/lowercase input\n }", "public boolean checkInput();", "static void enterValue(char[][] board,char val,char user)\n {\n //displayBoard(board);\n Scanner scan = new Scanner(System.in);\n System.out.println(\"User \"+ user + \" enter values\");\n System.out.println(\"Enter row:0-2 \");\n int row = scan.nextInt();\n if(row<0||row>2)\n {\n System.out.println(\"enter row values between 0 and 2 only.\");\n enterValue(board,val,user);\n }\n System.out.println(\"Enter col:0-2 \");\n int col = scan.nextInt();\n if(col<0||col>2)\n {\n System.out.println(\"enter column values between 0 and 2 only.\");\n enterValue(board,val,user);\n }\n if(user=='A')\n {\n if(board[row][col]!='X'&&board[row][col]!='O')\n board[row][col] = val;\n else\n {\n System.out.println(\"can't override the existing value. Please enter again\");\n changeUser(board,true);\n }\n displayBoard(board);\n changeUser(board,false);\n }\n else\n {\n if(board[row][col]!='X'&&board[row][col]!='O')\n board[row][col] = val;\n else\n {\n System.out.println(\"can't override the existing value. Please enter again\");\n changeUser(board,false);\n }\n displayBoard(board);\n changeUser(board,true);\n }\n }", "public void outOfCombat() {\n\t\tScanner OoCInput = new Scanner(System.in);\n\t\tint in = OoCInput.nextInt();\n\t\tSystem.out.println(\"It seems to be clear for a moment.\\nWhat would you like to do?\");\n\t\tSystem.out.println(\"Press 1 to move on to the next room.\\nPress 2 to scan the room for Treasures.\\nPress 3 to rest for a minute (Stamina Regen)\\nPress 4 to Drink a potion\");\n\t\t//blanket if preventing faulty input\n\t\tif (in == 1 || in == 2 || in == 3 || in == 4) {\n\t\t\tif (in == 1) {\n\t\t\t\tPlayer.moveForward();\n\t\t\t}\n\t\t\tif (in == 2) {\n\t\t\t\tPlayer.Scan();\n\t\t\t}\n\t\t\tif (in == 3) {\n\t\t\t\tPlayer.Rest();\n\t\t\t}\n\t\t\tif (in == 4) {\n\t\t\t\tPlayer.drinkPotion();\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Invalid Input. Please try again.\");\n\t\t}\n\t}", "public static int checkUserInput(int move, Scanner scanner){\n //Catch the exceptions that the user input is not integers\n boolean bError = true;\n while(bError){\n if (scanner.hasNextInt())\n move = scanner.nextInt();\n else {\n System.out.println(\"Wrong input! Please re-enter a correct position(1-9).\");\n scanner.next();\n continue;\n }\n bError = false;\n }\n //To catch the exceptions that user's input is not in [0,9].\n while(!correctPos.contains(move)){\n System.out.println(\"Oops! Your input is not from 1-9, please enter the correct move.\");\n move =scanner.nextInt();\n }\n //To catch the exceptions that user may place a move that has been taken. \n while(Player0Pos.contains(move)||Player1Pos.contains(move)){\n System.out.println(\"Error! Your move has been taken, please enter a correct position.\");\n move =scanner.nextInt();\n }\n return move;\n \n }", "private static void playGame()\n\t{\n\t\tScanner in = new Scanner(System.in);\n\t\tint userGuess = 0;\n\t\tint length = String.valueOf(userGuess).length();\n\t\tboolean play = true;\n\t\twhile (play)\n\t\t{\t\n\t\t\tint gameNumber = newNumber();\n\t\t\tString randomNumber = String.valueOf(gameNumber);\n\t\t\tSystem.out.println(\">>>MASTERMIND<<<\");\n\t\t\tSystem.out.println(\"Enter your guess of the 4 digit number!\");\n\t\t\tdo\n\t\t\t{\n\t\t\t\tuserGuess = in.nextInt();\n\t\t\t\tlength = String.valueOf(userGuess).length();\n\t\t\t\tif (length != 4)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Please enter a number with a length of 4 digits.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (length != 4);\n\t\t\tString userNumber = String.valueOf(userGuess);\n\t\t\tnumberTester(userNumber, randomNumber);\n\t\t\tSystem.out.printf(\"\\nCongratulations! You guessed the random number %d\\n\", gameNumber);\n\t\t\tSystem.out.println(\"Would you like to play again?\");\n\t\t\tSystem.out.println(\"1.) Yes\");\n\t\t\tSystem.out.println(\"2.) No\");\n\t\t\tif (in.nextInt() == 2)\n\t\t\t{\n\t\t\t\tplay = false;\n\t\t\t}\n\t\t}\n\t}", "protected abstract boolean checkInput();", "public final static void play()\n\t{\n\t\tDatabase.resetForNewGame();\n\n\n\t\tclearConsole();\n\t\tint playerOnePoints = 0, playerTwoPoints = 0, matrixSize=0, userChoise=0;\n\t\tString playerOneName, playerTwoName;\n\t\tchar controller;\n\n\n\t\tSystem.out.println(\"LET THE GAME BEGIN!\");\n\t\tSystem.out.println(\"Please type players' names: \");\n\n\t\t/**\n\t\t * Asks for player's names and Galaxy size.\n\t\t * */\n\t\tdo\n\t\t{\n\t\t\tSystem.out.println(\"Player One: \");\n\t\t\tplayerOneName=Global.sc.next(\"\\\\w+\");\n\t\t\tSystem.out.println(\"Player Two: \");\n\t\t\tplayerTwoName=Global.sc.next(\"\\\\w+\");\n\t\t\tif ((!checkNames(playerOneName, playerTwoName)))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Error. Please enter names with no marks and spaces, different first letter or less length.: \");\n\t\t\t}\n\t\t} while(!checkNames(playerOneName, playerTwoName));\n\t\tclearConsole();\n\t\tSystem.out.println(\"Please choose galaxy size: \");\n\t\tSystem.out.println(\"[1] Small\");\n\t\tSystem.out.println(\"[2] Large\");\n\t\tuserChoise=Global.sc.nextInt();\n\t\twhile(userChoise!=1&&userChoise!=2)\n\t\t{\n\t\t\tSystem.out.println(\"Wrong number. Please enter again: \");\n\t\t\tuserChoise=Global.sc.nextInt();\n\t\t}\n\t\tif (userChoise==1) {\n\t\t\tmatrixSize=GameConstants.smallMatrixSize;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tmatrixSize=GameConstants.largeMatrixSize;\n\t\t}\n\n\t\t/**\n\t\t * Creates the Galaxy and player's coordinates.\n\t\t * */\n\t\tGalaxy galaxy = new Galaxy(matrixSize);\n\t\tPlayerOne playerOneCol=new PlayerOne();\n\t\tPlayerOne playerOneRow=new PlayerOne();\n\t\tPlayerTwo playerTwoRow=new PlayerTwo(matrixSize);\n\t\tPlayerTwo playerTwoCol=new PlayerTwo(matrixSize);\n\t\t/**\n\t\t * Creates TemporaryChar which will hold a potential symbol ('8'/'+'/'*') of a question.\n\t\t * */\n\t\tTemporaryChar temp = new TemporaryChar();\n\t\tgalaxy.putStars(matrixSize);\n\t\tgalaxy.putPlayers(playerOneName, playerTwoName, matrixSize);\n\n\n\t\t//GAME BEGINS\n\n\n\n\t\tdo\n\t\t{\n\t\t\t//First player\n\n\n\t\t\tclearConsole();\n\t\t\tdisplayPlayerInfo(playerOneName, playerOnePoints, playerTwoName, playerTwoPoints);\n\t\t\tgalaxy.printMatrix(matrixSize);\n\t\t\tSystem.out.print(playerOneName);\n\t\t\tSystem.out.print(\", please make a move: \");\n\n\t\t\tcontroller=Global.sc.next(\".\").charAt(0);\n\n\t\t\tmovePlayer(galaxy,temp, controller, playerOneRow, playerOneCol);\n\n\t\t\t//Throws exception if player has tried to move on the other player's position.\n\t\t\tif (playerOneRow.coordinate == playerTwoRow.coordinate&&playerOneCol.coordinate ==playerTwoCol.coordinate)\n\t\t\t{\n\t\t\t\tthrow new ArrayIndexOutOfBoundsException();\t\n\t\t\t}\n\t\t\tplayerOnePoints+=pointsToAdd(temp);\n\t\t\tclearConsole();\n\t\t\tdisplayPlayerInfo(playerOneName, playerOnePoints, playerTwoName, playerTwoPoints);\n\t\t\tgalaxy.printMatrix(matrixSize);\n\n\t\t\t//Checks if there are any stars.\n\t\t\tif(!galaxy.checkForRemainingStars(matrixSize)) break;\n\n\n\n\n\n\t\t\t//Second player\n\n\n\t\t\tclearConsole();\n\t\t\tdisplayPlayerInfo(playerOneName, playerOnePoints, playerTwoName, playerTwoPoints);\n\t\t\tgalaxy.printMatrix(matrixSize);\n\t\t\tSystem.out.print(playerTwoName);\n\t\t\tSystem.out.print(\", please make a move: \");\n\n\t\t\tcontroller=Global.sc.next(\".\").charAt(0);\n\n\t\t\tmovePlayer(galaxy,temp, controller, playerTwoRow, playerTwoCol);\n\n\t\t\tif (playerOneRow.coordinate == playerTwoRow.coordinate&&playerOneCol.coordinate ==playerTwoCol.coordinate)\n\t\t\t{\n\t\t\t\tthrow new ArrayIndexOutOfBoundsException();\t\n\t\t\t}\n\t\t\tplayerTwoPoints+=pointsToAdd(temp);\n\t\t\tclearConsole();\n\t\t\tdisplayPlayerInfo(playerOneName, playerOnePoints, playerTwoName, playerTwoPoints);\n\t\t\tgalaxy.printMatrix(matrixSize);\n\t\t} while (galaxy.checkForRemainingStars(matrixSize));\n\n\n\n\n\t\tif (playerOnePoints > playerTwoPoints)\n\t\t{\n\t\t\tSystem.out.print(playerOneName);\n\t\t\tSystem.out.println(\" wins!\");\n\t\t}\n\t\telse if (playerOnePoints < playerTwoPoints)\n\t\t{\n\t\t\tSystem.out.print(playerTwoName);\n\t\t\tSystem.out.println(\" wins!\");\n\t\t}\n\t\telse System.out.println(\"It's a draw!\");\n\n\t\tpressAnyKeyToContinue();\n\t\tshowMenu();\n\n\n\t}", "public char showMessage(int room)\n\t{\n\t\tScanner kbAlpha = new Scanner(System.in);\t\t\t//gets input\n\t\t\n\t\tString strInput;\t\t\t\t\t\t//holds player input\n\t\tchar cAction;\t\t\t\t\t\t\t//player choice of action\n\t\t\n\t\tcAction = 'x';\n\t\t\n\t\tswitch (room)\n\t\t{\n\t\t\tcase 1:\n\t\t\t\tif (evaluateInventory(\"Dagger\") && evaluateTravelled(1))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"There is no turning back now. You must proceed through\" +\n\t\t\t\t\t\t\" the door in front\\nof you.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open the door\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"There is no turning back now. You must proceed through\" +\n\t\t\t\t\t\t\t\" the door in front of you.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open the door\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(2);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if (evaluateTravelled(1))\n\t\t\t\t{\n\t\t\t\t\t//adds \"Dagger\" to inventory\n\t\t\t\t\tthis.inventory.add(\"Dagger\");\n\t\t\t\t\tthis.setEquippedWeapon(\"Dagger\");\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You found an old backpack! This will help you carry \" +\n\t\t\t\t\t\t\"items. Inside the\\nbackpack you find a rusty dagger. Not much, but \" +\n\t\t\t\t\t\t\"better than your fists,\\nright?\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You found an old backpack! This will help you carry \" +\n\t\t\t\t\t\t\t\"items. Inside the\\nbackpack you find a rusty dagger. Not much, but \" +\n\t\t\t\t\t\t\t\"better than your fists,\\nright?\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\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\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You find yourself in a dark hallway. Your back is against \" +\n\t\t\t\t\t\t\"the iron door\\nthat you entered. You see something in the floor at the \" +\n\t\t\t\t\t\t\"end of the\\nhallway just before a right turn.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Inspect what is in the floor at the end of the\" +\n\t\t\t\t\t\t\" hallway\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\nHP: \" + getHP() + \n\t\t\t\t\t\t\"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You find yourself in a dark hallway. Your back is against \" +\n\t\t\t\t\t\t\t\"the iron door\\nthat you entered. You see something in the floor at the \" +\n\t\t\t\t\t\t\t\"end of the\\nhallway just before a right turn.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Inspect what is in the floor at the end of\" +\n\t\t\t\t\t\t\t\" the hallway\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\nHP: \" + getHP() + \n\t\t\t\t\t\t\t\"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.hasTravelled.add(1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\t\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\t//if player has visited room 2 before\n\t\t\t\tif (evaluateTravelled(2) && !(evaluateInventory(\"Steampunk 4-Barrel Pistol\"))\n\t\t\t\t\t&& evaluateTravelled(3))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You enter a familiar room... the eastern door is still \"\n\t\t\t\t\t\t+ \"guarded by an alien.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open north door\\n[B] Fight alien\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You enter a familiar room... the eastern door is still \"\n\t\t\t\t\t\t\t+ \"guarded by an alien.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open north door\\n[B] Fight alien\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(3);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tfight(\"alien1\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Opens door\n\t\t\t\telse if (evaluateInventory(\"Steampunk 4-Barrel Pistol\")\n\t\t\t\t\t&& evaluateInventory(\"Iron Key\"))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Now that nothing stands in your way... it looks \" +\n\t\t\t\t\t\t\"like that key you found\\nis about to come in handy!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Use Iron Key on the iron door\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You enter a familiar room... the eastern door is still \"\n\t\t\t\t\t\t\t+ \"guarded by an alien.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open north door\\n[B] Fight alien\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(5);\n\t\t\t\t\t\tinventory.remove(new String(\"Iron Key\"));\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//player can't open door without Iron Key\n\t\t\t\telse if (evaluateInventory(\"Steampunk 4-Barrel Pistol\") && \n\t\t\t\t\t!(evaluateInventory(\"Iron Key\")))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"With the alien out of the way, you attempt to open \" +\n\t\t\t\t\t\t\"the door. Locked!\\nThere has to be a key around here somewhere... \" +\n\t\t\t\t\t\t\"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open north door\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"With the alien out of the way, you attempt to open \" +\n\t\t\t\t\t\t\t\"the door. Locked!\\nThere has to be a key around here somewhere... \" +\n\t\t\t\t\t\t\t\"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open north door\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player first time entering\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.hasTravelled.add(2);\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You slowly open the door to a large room. Looking \" +\n\t\t\t\t\t\t\"around, you can see two\\ndoors: one to the north and one to the \" +\n\t\t\t\t\t\t\"east. Guarding the eastern door is\\nan alien!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open north door\\n[B] Fight alien\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You slowly open the door to a large room. Looking \" +\n\t\t\t\t\t\t\t\"around, you can see two\\ndoors: one to the north and one to the \" +\n\t\t\t\t\t\t\t\"east. Guarding the eastern door is\\nan alien!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open north door\\n[B] Fight alien\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(3);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tfight(\"alien1\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t//player has been here before\n\t\t\t\tif (evaluateTravelled(3))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You have travelled this hallway before. Which way \" +\n\t\t\t\t\t\t\"would you like to go\\nnext?\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Through the northern door\\n[B] Through the \" +\n\t\t\t\t\t\t\"southern door\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You have travelled this hallway before. Which way \" +\n\t\t\t\t\t\t\t\"would you like to go\\nnext?\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Through the northern door\\n[B] Through the \" +\n\t\t\t\t\t\t\t\"southern door\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(4);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//first time player enters room\n\t\t\t\telse if (!(evaluateTravelled(3)))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You walk north and open the door, revealing a hallway.\" +\n\t\t\t\t\t\t\" It does not appear\\nto have anything interesting inside. \" +\n\t\t\t\t\t\t\"There is another door at the end of\\nthe hallway to the north.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue through the door at the end of the \" +\n\t\t\t\t\t\t\"hallway\\n[B] Return to previous room\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You walk north and open the door, revealing a hallway.\" +\n\t\t\t\t\t\t\t\" It does not appear\\nto have anything interesting inside. \" +\n\t\t\t\t\t\t\t\"There is another door at the end of\\nthe hallway to the north.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue through the door at the end of the \" +\n\t\t\t\t\t\t\t\"hallway\\n[B] Return to previous room\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(4);\n\t\t\t\t\t\tthis.hasTravelled.add(3);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(2);\n\t\t\t\t\t\tthis.hasTravelled.add(3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t//player has found Iron Key\n\t\t\t\tif (evaluateInventory(\"Iron Key\"))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"There is nothing else interesting in this room.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Exit the way you entered\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && cAction != 'E'\n\t\t\t\t\t\t&& cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"There is nothing else interesting in this room.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Exit the way you entered\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player does not have shovel but has searched dirt\n\t\t\t\telse if (!(evaluateInventory(\"Shovel\")) && blnSearchedDirt && \n\t\t\t\t\t!blnSearchedBarrels)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"A mound of dirt. It looks like something was burried, \" +\n\t\t\t\t\t\t\"but you recently\\nreceived a manicure and would prefer not to dig \" +\n\t\t\t\t\t\t\"with your hands.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Inspect dirt mound\\n[B] Search barrels\\n[C] Exit \" +\n\t\t\t\t\t\t\"the way you entered\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'c' && cAction != 'C' && cAction != 'e' && cAction != 'E'\n\t\t\t\t\t\t&& cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"A mound of dirt. It looks like something was burried, \" +\n\t\t\t\t\t\t\t\"but you recently\\nreceived a manicure and would prefer not to dig \" +\n\t\t\t\t\t\t\t\"with your hands.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Inspect dirt mound\\n[B] Search barrels\\n[C] Exit \" +\n\t\t\t\t\t\t\t\"the way you entered\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.inventory.add(\"Shovel\");\n\t\t\t\t\t\tthis.blnSearchedBarrels = true;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'c' || cAction == 'C')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player has shovel but not iron key\n\t\t\t\telse if (evaluateInventory(\"Shovel\") && !(evaluateInventory(\"Iron Key\"))\n\t\t\t\t\t&& !(evaluateTravelled(4)) && blnSearchedBarrels)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"The barrels contained a shovel. What would you like \"\n\t\t\t\t\t\t+ \"to do now?\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Inspect dirt mound\\n[B] Exit the way you entered\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"The barrels contained a shovel. What would you like \"\n\t\t\t\t\t\t\t+ \"to do now?\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Inspect dirt mound\\n[B] Exit the way you entered\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(3);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.hasTravelled.add(4);\n\t\t\t\t\t\tthis.blnSearchedDirt = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player digs dirt to find Iron Key\n\t\t\t\telse if (evaluateInventory(\"Shovel\") && evaluateTravelled(4) && blnSearchedDirt\n\t\t\t\t\t&& !(evaluateInventory(\"Iron Key\")))\n\t\t\t\t{\n\t\t\t\t\tthis.inventory.add(\"Iron Key\");\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You use the shovel to dig into the dirt mound. You \" +\n\t\t\t\t\t\t\"found an iron key!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Exit the way you entered\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && cAction != 'E'\n\t\t\t\t\t\t&& cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You use the shovel to dig into the dirt mound. You \" +\n\t\t\t\t\t\t\t\"found an iron key!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Exit the way you entered\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//first time player enters\n\t\t\t\telse if (!(evaluateInventory(\"Shovel\")) && !(evaluateTravelled(4)) &&\n\t\t\t\t\t!(evaluateInventory(\"Iron Key\")))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You open the door to another large room. In one \" + \n\t\t\t\t\t\t\"corner you see a few\\nbarrels. There is an odd looking dirt mound \" +\n\t\t\t\t\t\t\"in the center of the room. No\\naliens in sight, phew!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Inspect dirt mound\\n[B] Search barrels\\n[C] Exit \" +\n\t\t\t\t\t\t\"the way you entered\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'c' && cAction != 'C' && cAction != 'e' && cAction != 'E'\n\t\t\t\t\t\t&& cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You open the door to another large room. In one \" + \n\t\t\t\t\t\t\t\"corner you see a few\\nbarrels. There is an odd looking dirt mound \" +\n\t\t\t\t\t\t\t\"in the center of the room. No\\naliens in sight, phew!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Inspect dirt mound\\n[B] Search barrels\\n[C] Exit \" +\n\t\t\t\t\t\t\t\"the way you entered\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.blnSearchedDirt = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'c' || cAction == 'C')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(3);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.blnSearchedBarrels = true;\n\t\t\t\t\t\tthis.inventory.add(\"Shovel\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t//player has been in this hallway before\n\t\t\t\tif (evaluateTravelled(5))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You walk back into a hallway. It looks like you have \" +\n\t\t\t\t\t\t\"been here before.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open northern door\\n[B] Open southern door\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You walk back into a hallway. It looks like you have \" +\n\t\t\t\t\t\t\t\"been here before.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open northern door\\n[B] Open southern door\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(7);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(6);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//first time player enters hallway\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You enter a hallway that turns north and reveals another\"\n\t\t\t\t\t\t+ \" door. Just when\\nrounding the corner you see an old door along \" +\n\t\t\t\t\t\t\"the southern wall that is\\ncovered in vines, almost impossible to \" +\n\t\t\t\t\t\t\"spot. \\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open northern door\\n[B] Open southern door\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You enter a hallway that turns north and reveals another\"\n\t\t\t\t\t\t\t+ \" door. Just when\\nrounding the corner you see an old door along \" +\n\t\t\t\t\t\t\t\"the southern wall that is\\ncovered in vines, almost impossible to \" +\n\t\t\t\t\t\t\t\"spot. \\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open northern door\\n[B] Open southern door\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(7);\n\t\t\t\t\t\tthis.hasTravelled.add(5);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(6);\n\t\t\t\t\t\tthis.hasTravelled.add(5);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t//player has killed alien\n\t\t\t\tif (evaluateTravelled(6))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"The alien corpse is still fresh... There is nothing \" +\n\t\t\t\t\t\t\"else of interest here.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Return to hallway\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"The alien corpse is still fresh... There is nothing \" +\n\t\t\t\t\t\t\t\"else of interest here.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Return to hallway\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(5);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//alien is still alive\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You enter a small room. Out of the corner of your eye \" +\n\t\t\t\t\t\t\"you see a slow\\nmovement... an alien has spotted you!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Fight alien\\n[B] Run back through door way\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You enter a small room. Out of the corner of your eye \" +\n\t\t\t\t\t\t\t\"you see a slow\\nmovement... an alien has spotted you!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Fight alien\\n[B] Run back through door way\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tfight(\"alien2\");\n\t\t\t\t\t\tthis.hasTravelled.add(6);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(5);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\t//player enters first time\n\t\t\t\tif (!(evaluateTravelled(7)))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"The door opens to large a cavern. You can feel the \" +\n\t\t\t\t\t\t\"ground rumbling and\\nthere is a low mist rising just above the \" +\n\t\t\t\t\t\t\"floor. There are two doors\\nbesides the one you entered through. \" +\n\t\t\t\t\t\t\"There is one on the eastern cavern\\nwall, and you can barely see a \" +\n\t\t\t\t\t\t\"door at the far northern part of the\\ncavern, at the end of steep \" +\n\t\t\t\t\t\t\"decline from your position. Unfortunately,\\nanother alien is guarding \"\n\t\t\t\t\t\t+ \"this door.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Follow the path down to the northern door and \" +\n\t\t\t\t\t\t\"fight the alien\\n[B] Open the eastern door\\n[C] Return to the hallway\"\n\t\t\t\t\t\t+ \" you just came from\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'c' && cAction != 'C' && cAction != 'e' && cAction != 'E'\n\t\t\t\t\t\t&& cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"The door opens to large a cavern. You can feel the \" +\n\t\t\t\t\t\t\t\"ground rumbling and\\nthere is a low mist rising just above the \" +\n\t\t\t\t\t\t\t\"floor. There are two doors\\nbesides the one you entered through. \" +\n\t\t\t\t\t\t\t\"There is one on the eastern cavern\\nwall, and you can barely see a \" +\n\t\t\t\t\t\t\t\"door at the far northern part of the\\ncavern, at the end of steep \" +\n\t\t\t\t\t\t\t\"decline from your position. Unfortunately,\\nanother alien is guarding \"\n\t\t\t\t\t\t\t+ \"this door.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Follow the path down to the northern door and \" +\n\t\t\t\t\t\t\t\"fight the alien\\n[B] Open the eastern door\\n[C] Return to the hallway\"\n\t\t\t\t\t\t\t+ \" you just came from\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.hasTravelled.add(7);\n\t\t\t\t\t\tfight(\"alien3\");\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.hasTravelled.add(7);\n\t\t\t\t\t\tsetRoom(8);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'c' || cAction == 'C')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.hasTravelled.add(7);\n\t\t\t\t\t\tsetRoom(5);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player has been here before but not fought alien\n\t\t\t\telse if (evaluateTravelled(7) && !(evaluateInventory(\"Edison Grenade\")))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You are in a familiar large cavern.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Follow the path down to the northern door and \" +\n\t\t\t\t\t\t\"fight the alien\\n[B] Open the eastern door\\n[C] Return to the hallway\"\n\t\t\t\t\t\t+ \" you just came from\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'c' && cAction != 'C' && cAction != 'e' && cAction != 'E'\n\t\t\t\t\t\t&& cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"The door opens to large a cavern, you can feel the \" +\n\t\t\t\t\t\t\t\"ground rumbling and\\nthere is a low mist rising just above the \" +\n\t\t\t\t\t\t\t\"floor. There are two doors\\nbesides the one you entered through. \" +\n\t\t\t\t\t\t\t\"There is one on the eastern cavern\\nwall, and you can barely see a \" +\n\t\t\t\t\t\t\t\"door at the far northern part of the\\ncavern, at the end of steep \" +\n\t\t\t\t\t\t\t\"decline from your position. Unfortunately,\\nanother alien is guarding \"\n\t\t\t\t\t\t\t+ \"this door.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Follow the path down to the northern door and \" +\n\t\t\t\t\t\t\t\"fight the alien\\n[B] Open the eastern door\\n[C] Return to the hallway\"\n\t\t\t\t\t\t\t+ \" you just came from\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tfight(\"alien3\");\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(8);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'c' || cAction == 'C')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(5);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player defeats alien but does not have Steel Key\n\t\t\t\telse if (evaluateTravelled(7) && evaluateInventory(\"Edison Grenade\") &&\n\t\t\t\t\t!(evaluateInventory(\"Steel Key\")))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"The steel door is locked. If I had to guess, there\" +\n\t\t\t\t\t\t\" is probably a key to be\\nfound...\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open the eastern door\\n[B] Open the southern \" +\n\t\t\t\t\t\t\"door\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'c' && cAction != 'C' && cAction != 'e' && cAction != 'E'\n\t\t\t\t\t\t&& cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"The steel door is locked. If I had to guess, there\" +\n\t\t\t\t\t\t\t\" is probably a key to be\\nfound...\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open the eastern door\\n[B] Open the southern \" +\n\t\t\t\t\t\t\t\"door\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(8);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(5);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player has defeated alien and has Steel Key\n\t\t\t\telse if (evaluateInventory(\"Edison Grenade\") && \n\t\t\t\t\tevaluateInventory(\"Steel Key\") && evaluateTravelled(7))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Since we did away with the alien, it is time to use \"\n\t\t\t\t\t\t+ \"the Steek Key on the\\nsteel door. What could be on the other \" +\n\t\t\t\t\t\t\"side of the door?...\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue through doorway\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Since we did away with the alien, it is time to use \"\n\t\t\t\t\t\t\t+ \"the Steek Key on the\\nsteel door. What could be on the other \" +\n\t\t\t\t\t\t\t\"side of the door?...\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue through doorway\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(11);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t//player enters hallway\n\t\t\t\tthis.hasTravelled.add(8);\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You enter a hallway with a turn in it. You slowly walk\" +\n\t\t\t\t\t\" around the corner\\nand see a door at the end of the hall.\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Open western door back to cavern\\n[B] Open southern \"\n\t\t\t\t\t+ \"door\\n\\n\");\n\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\n\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\tcAction != 'M')\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You enter a hallway with a turn in it. You slowly walk\" +\n\t\t\t\t\t\t\" around the corner\\nand see a door at the end of the hall.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open western door back to cavern\\n[B] Open southern \"\n\t\t\t\t\t\t+ \"door\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t{\n\t\t\t\t\tsetRoom(7);\n\t\t\t\t}\n\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t{\n\t\t\t\t\tsetRoom(9);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\t//first time player enters\n\t\t\t\tif (!(evaluateTravelled(9)))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"When you open the door, you can hear the sound of an \" +\n\t\t\t\t\t\t\"alien standing up!\\nYou lock eyes with it's one eye - no chance of \" +\n\t\t\t\t\t\t\"getting by unnoticed. You\\nsee a door behind the alien.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Fight alien\\n[B] Run back into the hallway\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"When you open the door, you can hear the sound of an \" +\n\t\t\t\t\t\t\t\"alien standing up!\\nYou lock eyes with it's one eye - no chance of \" +\n\t\t\t\t\t\t\t\"getting by unnoticed. You\\nsee a door behind the alien.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Fight alien\\n[B] Run back into the hallway\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.hasTravelled.add(9);\n\t\t\t\t\t\tfight(\"alien4\");\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(8);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player defeats alien\n\t\t\t\telse if (evaluateTravelled(9) && \n\t\t\t\t\tevaluateInventory(\"Steampunk Mach. II Riflesword\"))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Where would you like to go next?\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open door that alien was guarding\\n[B] Exit to \" +\n\t\t\t\t\t\t\"hallway where you came from\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"That was an epic battle! You pick up the alien's \" +\n\t\t\t\t\t\t\t\"weapon. It is a Mach. II\\nRiflesword! This is a lot better than the \" +\n\t\t\t\t\t\t\tgetEquippedWeapon() + \"!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open door that alien was guarding\\n[B] Exit to \" +\n\t\t\t\t\t\t\t\"hallway where you came from\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(10);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(8);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\t//first time player enters\n\t\t\t\tif (!(evaluateTravelled(10)) && !(evaluateInventory(\"Steel Key\")))\n\t\t\t\t{\n\t\t\t\t\tthis.inventory.add(\"Steel Key\");\n\t\t\t\t\tthis.hasTravelled.add(10);\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"This is a small room, but right in front of you on the\" +\n\t\t\t\t\t\t\" ground is a Steel\\nKey! This probably opens something!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Exit room\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"This is a small room, but right in front of you on the\" +\n\t\t\t\t\t\t\t\" ground is a Steel\\nKey! This probably opens something!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Exit room\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(9);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player has entered before\n\t\t\t\telse if (evaluateInventory(\"Steel Key\") && evaluateTravelled(10))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"This tiny room has been explored already. Nothing to see\"\n\t\t\t\t\t\t+ \" here.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Exit room\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"This tiny room has been explored already. Nothing to see\"\n\t\t\t\t\t\t\t+ \" here.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Exit room\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(9);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\t//player enters room\n\t\t\t\tif (!(evaluateTravelled(11)) && !(evaluateInventory(\"Platinum Key\")))\n\t\t\t\t{\n\t\t\t\t\tthis.inventory.remove(\"Steel Key\");\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You enter another large room. The ground is oozing \"\n\t\t\t\t\t\t+ \"lava, adding to lava\\nrunning down the walls. In the center of \"\n\t\t\t\t\t\t+ \"the room... you see the BOSS\\nALIEN! He is guarding a door \"\n\t\t\t\t\t\t+ \"on the eastern wall. This will be your\\nhardest challenge \" +\n\t\t\t\t\t\t\"yet. Good luck!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Fight boss alien\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You enter another large room. The ground is oozing \"\n\t\t\t\t\t\t\t+ \"lava, adding to lava\\nrunning down the walls. In the center of \"\n\t\t\t\t\t\t\t+ \"the room... you see the BOSS\\nALIEN! He is guarding a door \"\n\t\t\t\t\t\t\t+ \"on the eastern wall. This will be your\\nhardest challenge \" +\n\t\t\t\t\t\t\t\"yet. Good luck!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Exit room\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tfight(\"boss\");\n\t\t\t\t\t\tthis.hasTravelled.add(11);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player has defeated the boss\n\t\t\t\telse if (evaluateTravelled(11) && evaluateInventory(\"Platinum Key\"))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Now that you have the Platinum Key, let us try to \"\n\t\t\t\t\t\t+ \"open the door behind the\\nboss alien corpse.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open eastern door\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Now that you have the Platinum Key, let us try to \"\n\t\t\t\t\t\t\t+ \"open the door behind the\\nboss alien corpse.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open eastern door\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(12);\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\t//player wins!\n\t\t\t\tthis.blnPlayerVictory = true;\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have found the obsidite! The CDC evacuates you and \"\n\t\t\t\t\t+ \"the obsidite back\\nto the CDC and production of the vaccine against \"\n\t\t\t\t\t+ \"the pandemic begins. You\\nhave saved the humanity!\");\n\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t}//end switch (room)\n\t\t\n\t\treturn cAction;\n\t\n\t}", "public void userTurn(Scanner userInput)\r\n\t{\r\n\t\tSystem.out.println(\"----------Your Turn!----------\\n\");\r\n\t\tSystem.out.println(\"Lv.\" + enemy.getLevel() + \" \" + enemyName + \r\n\t\t\"\\nHP: \" + enemy.getHealth() + \"/\" + enemyHP +\r\n\t\t\"\\nDMG:\" + enemyDMG + \"\\n\");\r\n\t\tString attackOption = \"1. Attack: \".substring(0, 36) + user.getDamage() + \" dmg\";\r\n\t\tString skillOption = (\"2. \" + user.getSpell() +\": \").substring(0, 36) + user.getSkillDMG() + \" dmg\\n\";\r\n\t\tSystem.out.println(\"Lv.\" + user.getLevel() + \" \" +user.getName());\r\n\t\tSystem.out.println(attackOption);\r\n\t\tSystem.out.println(skillOption);\r\n\t\tString cmd = userInput.nextLine();\r\n\t\t\r\n\t\tif(cmd.equalsIgnoreCase(\"attack\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(cmd);\r\n\t\t\tenemy.setHealth(userDMG);\r\n\t\t\tSystem.out.println(\"\\nYou attacked with \" + userDMG + \" dmg\");\r\n\t\t\tisEnemyDefeated(userInput);\r\n\t\t}\r\n\t\telse if(cmd.equalsIgnoreCase(user.getSpell()))\r\n\t\t{\r\n\t\t\tenemy.setHealth(user.getSkillDMG());\r\n\t\t\tSystem.out.println(\"\\nYou used \\\"\"+user.getSpell()+\"\\\" and made \" + user.getSkillDMG() + \" dmg to \" + enemyName);\r\n\t\t\tisEnemyDefeated(userInput);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\nOops Sadly you missed your attack...\");\r\n\t\t\tSystem.out.println(\"Make sure you spell the option correctly\");\r\n\t\t\tSystem.out.println(\"After all, spelling is important!\\n\");\r\n\t\t}\r\n\t}", "public static boolean userInput(){\n String tempInput = \"y\"; //string to hold input for bulletproofing, default length is one character\n Scanner input = new Scanner(System.in);\n\n do { //bulletproofing input\n\n if (tempInput.length() != 1){ //if looping for second time, output error message\n System.out.println(\"Unaccepted input. Please reenter.\");\n }\n\n tempInput = input.nextLine(); //take input\n\n }while(tempInput.length() != 1); //loops again if input is not single character\n\n return tempInput.charAt(0) == 'y';\n }", "private boolean checkUserInput(String userName, String roundLimitInput) {\n\n boolean userNameAccepted = false;\n boolean roundLimitAccepted = false;\n\n String notification = \"\";\n\n if (userName.length() > 8) {\n notification += \"- Wow! Try using a shorter name!\\n(Up to 8 characters)\\n\";\n nameInputField.setText(\"\");\n } else if (userName.length() == 0) {\n notification += \"- You have to input a name!\\n\\n\";\n nameInputField.setText(\"\");\n } else {\n userNameAccepted = true;\n }\n\n\n // Check if user round limit input is an integer\n try {\n int roundLimit;\n roundLimit = Integer.parseInt(roundLimitInput);\n if (roundLimit <= 0) {\n notification += \"- You have to enter a number > 0 \\nas a round limit!\\n\";\n pointLimitInputField.setText(\"\");\n } else {\n roundLimitAccepted = true;\n }\n } catch (NumberFormatException e) {\n notification += \"- You have to enter an integer \\nfor the number of rounds!\\n\";\n }\n\n notificationMsg.setText(notification);\n\n return userNameAccepted && roundLimitAccepted;\n }", "private static Boolean errorCheck(String Buffer){\n if(Buffer.matches(\"Y\")) return true;\n if(Buffer.matches(\"N\")) return false;\n screenClear(); //Clears the screen and applies an error message.\n return moreInput(); //Recursive repeat upon error.\n }", "public void clientRunning() {\n\t\twhile (this.running) {\n\t\t\tString userInputString = textUI.getString(\"Please input (or type 'help'):\");\n\t\t\tthis.processUserInput(userInputString);\n\t\t}\n\t}", "public void playTheGame() {\n\t\tint column;\n\t\ttry {\n\t\t\tboolean gameIsOver = false;\n\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\tthePlayers[count].getView().showOutput(\n\t\t\t\t\t\taConnect4Field.toString());\n\n\t\t\tdo {\n\t\t\t\tfor (int index = 0; index < thePlayers.length; index++) {\n\t\t\t\t\t// thePlayers[index].getView().showOutput(aConnect4Field.toString());\n\t\t\t\t\tif (aConnect4Field.isItaDraw()) {\n\t\t\t\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\t\t\t\tthePlayers[count].getView().showOutput(\"Draw\");\n\t\t\t\t\t\tgameIsOver = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthePlayers[index].getView().showOutput(\n\t\t\t\t\t\t\t\tthePlayers[index].getName()\n\t\t\t\t\t\t\t\t\t\t+ \" it's Your Turn! play your move\");\n\t\t\t\t\t\tcolumn = thePlayers[index].nextMove();\n\t\t\t\t\t\twhile (!aConnect4Field\n\t\t\t\t\t\t\t\t.checkIfPiecedCanBeDroppedIn(column)) {\n\t\t\t\t\t\t\tthePlayers[index].getView().showOutput(\n\t\t\t\t\t\t\t\t\t\"Invalid Turn Try again\");\n\t\t\t\t\t\t\tcolumn = thePlayers[index].nextMove();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\taConnect4Field.dropPieces(column,\n\t\t\t\t\t\t\t\tthePlayers[index].getGamePiece());\n\t\t\t\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\t\t\t\tthePlayers[count].getView().showOutput(\n\t\t\t\t\t\t\t\t\taConnect4Field.toString());\n\t\t\t\t\t\tif (aConnect4Field.error != \"\") {\n\n\t\t\t\t\t\t\tthePlayers[index].getView().showOutput(\n\t\t\t\t\t\t\t\t\taConnect4Field.error);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (aConnect4Field.didLastMoveWin()) {\n\t\t\t\t\t\t\t\tgameIsOver = true;\n\t\t\t\t\t\t\t\t// all player get to know\n\t\t\t\t\t\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\t\t\t\t\t\tthePlayers[count].getView().showOutput(\n\t\t\t\t\t\t\t\t\t\t\t\"The winner is: \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ thePlayers[index]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getName());\n\n\t\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}\n\n\t\t\t} while (!gameIsOver);\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public String onInputMessage(String userInput) throws QuitException{\n if (!userInput.equals(\"\"))\n System.out.println(userInput);\n\n //Enter data using BufferReader \n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); \n \n // Reading data using readLine\n String input; \n try {\n input = reader.readLine();\n } catch (IOException e) {\n return null;\n }\n if (input.equals(\"sortir\"))\n throw new QuitException();\n\n // Printing the read line \n return input;\n }", "public void invalid() {\r\n\t\tSystem.out.println(\"Please enter a valid input\");\r\n\t}", "public static void main(String[] args) {\n\n\n while (gameStatus) {\n if(checkRowGameWin(1) || checkColumnGameWin(1) || checkRowGameWin(2) || checkColumnGameWin(2)){\n System.out.println(\"hurray!!!!! \"+ Winplayer + \" win the game\");\n gameStatus = false;\n }else{\n getinput();\n }\n\n\n }\n }", "@Override\n public void interact(Player player) {\n\n if (player.isInJail() && !player.timeToGetOutOfJail()) {\n\n while (true) {\n\n if (player.hasPass()) System.out.println(\"roll, pay, card\");\n System.out.println(\"roll , pay\");\n\n String[] strings = {\"roll\", \"pay\", \"card\"};\n String answer = MyInput.validate_string(strings);\n if (answer.equals(\"roll\")) {\n if (Player.rolledDoubles()) {\n System.out.println(name + \" rolled doubles!\");\n player.gotOutOfJail();\n player.takeTurn();\n } else {\n System.out.println(name + \" didn't roll doubles\");\n player.spentANightInJain();\n if (player.timeToGetOutOfJail()) {\n player.setDollarCount(-1 * this.cost);\n player.setInJail(false);\n System.out.println(player.getName() + \" payed \" + this.cost + \" after their third roll for doubles\");\n player.takeTurn();\n }\n }\n return;\n } else if(answer.equals(\"pay\")) {\n System.out.print(\"payed to get out, \");\n player.setDollarCount(-1 * cost);\n player.gotOutOfJail();\n player.takeTurn();\n return;\n } else if(answer.equals(\"card\") && player.hasPass()) {\n player.setGetOutOfJailFreeOwnership(false);\n player.gotOutOfJail();\n System.out.println(player.getName() + \" used a card to get out of jail\");\n player.takeTurn();\n return;\n } else {\n System.out.println(\"bad input\");\n }\n }\n }\n }", "private void handleInput() {\n String result = \"\";\n while (!clientSocket.isClosed() && result != null) {\n try {\n result = inFromServer.readLine();\n if (result == null || result.equals(\"null\")) {\n RoboRally.scheduleSync(() -> game.setScreen(new ErrorScreen(game, \"You where disconnected from the host\")), 0);\n\n return;\n }\n ClientAction command = ClientAction.fromCommandString(result.substring(0, result.indexOf(\":\")));\n String data = result.substring(result.indexOf(\":\") + 1);\n switch (command) {\n case START_GAME:\n setupGame(data);\n break;\n case GIVE_CARDS:\n giveCards(data);\n break;\n case NAME:\n //clientName = data;\n // Only used to check connectivity\n break;\n case CONNECTED_PLAYERS:\n receiveConnectedPlayers(data);\n break;\n case THREAD_NAME:\n //Do nothing\n break;\n case START_ROUND:\n GameScreen.getUiHandler().updateCountDown(0);\n playerHandler.runRound(GameGraphics.gson.fromJson(data, StartRoundDto.class));\n break;\n case COUNT_DOWN:\n // This seconds int has the information about the current number for the countdown\n int seconds = 30 - GameGraphics.gson.fromJson(data, Integer.class); // Count down, not count up\n GameScreen.getUiHandler().updateCountDown(seconds);\n break;\n case PARTY_MODE:\n InputHandler.enableMode();\n break;\n default:\n System.out.println(\"Unknown operation :\" + result);\n break;\n }\n } catch (IOException e) {\n System.out.println(\"IOExeption \" + e);\n }\n }\n }", "private void startUpConditions(){\n\t\t\tString strSize = JOptionPane.showInputDialog(null, \n\t\t\t\t\t\"Pick a Board Size between 3-30.\");\n\t\t\ttry{\n\t\t\t\tselectedSize = Integer.parseInt(strSize);\n\t\t\t\t\n\t\t\tif(selectedSize < 2||selectedSize > 30){\n\t\t\t\tselectedSize = 10;\n\t\t\t\tJOptionPane.showMessageDialog(null, \"The Game has\"\n\t\t\t\t+ \" defaulted to a Board Size of 10.\");\n\t\t\t\t}\n\t\t\t\n\t\t\t}catch(NumberFormatException exception){\n\n\t\t\t\tJOptionPane.showMessageDialog(null, \"The Game has\"\n\t\t\t\t+ \" defaulted to a Board Size of 10.\"+\n\t\t\t\t\" Because you input characters other than numbers.\");\n\t\t\t\tselectedSize = 10;\t\t\t\t\n\t\t\t}\n\n\t\n\t\t//selecting the number of players within the game\n\t\t//verifying a valid input for the Players\n\t\t//It's awfully boring to play by yourself after all.\n\t\t\tString strPlay = JOptionPane.showInputDialog(null, \n\t\t\t\t\t\"Pick number of players between 2-10\");\n\t\t\ttry{\n\t\t\t\tif(strPlay==null){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"The game\"\n\t\t\t\t\t+\" has defaulted to 2 players.\");\n\t\t\t\t\tselectedPlayers = 2;\n\t\t\t\t}\n//\t\t\t\tif(input == JOptionPane.CANCEL_OPTION){\n//\t\t\t\t\tSystem.exit(1);\n//\t\t\t\t}\n\t\t\t\tif(strPlay!=null){\n\t\t\t\t\tselectedPlayers = Integer.parseInt(strPlay);\n\t\t\t\t\t\n\t\t\t\t\tif(selectedPlayers < 2||selectedPlayers > 10){\n\t\t\t\t\t\tselectedPlayers = 2;\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"The game\"\n\t\t\t\t\t\t\t+\" has defaulted to 2 players.\"\n\t\t\t\t\t\t\t+\" Because you input a number that \"\n\t\t\t\t\t\t\t+\"was out of bounds.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}catch(NumberFormatException exception){\n\t\t\t\tJOptionPane.showMessageDialog(null,\"You input \"\n\t\t\t\t\t+ \"something that was not a number.\"\n\t\t\t\t\t+ \" The game has defaulted to 2 players.\");\n\t\t\t\tselectedPlayers = 2;\n\t\t\t}\n\t\t\t\n\t\t\tString goFirst = JOptionPane.showInputDialog(null, \"Pick\"\n\t\t\t+ \" who will go first.\");\n\t\t\t\n\t\t\ttry{\n\t\t\t\tif(goFirst==null){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"The game\"\n\t\t\t\t\t+\" has defaulted to Player 1s turn.\");\n\t\t\t\t\tthis.firstTurn = 0;\n\t\t\t\t}\n\t\t\t\tif(goFirst!=null){\n\t\t\t\t\t this.firstTurn = Integer.parseInt(goFirst);\n\t\t\t\t}\n\t\t\t}catch(NumberFormatException exception){\n\t\t\t\tJOptionPane.showMessageDialog(null, \"You input \"\n\t\t\t\t+ \"something other than a number.\"\n\t\t\t\t+ \" The Game has defaulted to player 1s turn.\");\n\t\t\t\tthis.firstTurn = 0;\n\t\t\t}finally{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"The game\"\n\t\t\t\t\t+\" will now begin.\");\n\t\t\t}\n\t\t\t\n\t\t}", "public void registerplayerName()\n { \n boolean repeat = true;\n while (repeat)\n {\n playerName = getUserStringInput(\"Please input your name\");\n if (playerName.trim().length() >= 3 && playerName.trim().length() <= 10)\n {\n String playName = playerName;\n setPlayerName(playName);\n repeat = false;\n }\n else\n {\n System.out.println(\"Sorry, you enter incorrect,please input between 3 to 10 characters\");\n repeat = true;\n }\n }\n }", "public void showInputError() {\n\n resultLabel.setText(\"Choose another space!\");\n\n }", "@FXML\n private void handleUserInput() {\n Parser parser = new Parser();\n String input = userInput.getText();\n String response;\n if (input.equals(\"bye\")) {\n response = ui.ending();\n dialogContainer.getChildren().addAll(\n DialogBox.getUserDialog(input, userImage),\n DialogBox.getDukeDialog(response, dukeImage)\n );\n userInput.clear();\n\n } else {\n response = parser.getResponse(input);\n dialogContainer.getChildren().addAll(\n DialogBox.getUserDialog(input, userImage),\n DialogBox.getDukeDialog(response, dukeImage)\n );\n\n }\n userInput.clear();\n\n\n }", "public int startGame() {\n\t\tint counter = 0;\n\t\twhile (true) {\n\t\t\t\n\t\t\tPlayer current = (counter % 2 == 0) ? getPlayer1() : getPlayer2();\n\t\t\tint column = current.play(getGameBoard());\n\t\t\t\n\t\t\t// Check input validity:\n\t\t\t\n\t\t\tif(column < 0) {\n\t\t\t\tSystem.out.println(current.getName()+\" tries to play a negative column number -> disqualification.\");\n\t\t\t\treturn (current == player1)? 2 : 1;\n\t\t\t}\n\t\t\t\n\t \tif(isColumnFull(column, current)) {\n\t \t\tSystem.out.println(current.getName()+\" tries to play an already full column -> disqualification.\");\n\t \t\treturn (current == player1)? 2 : 1;\n\t \t}\n\t\t\t\n\t\t\tplayColumn(column, current);\n\t\t\tcounter++;\n\t\t\t\n\t\t\tif (isGameDrawn()) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t// For Player 1:\n\t\t\tif (hasWon(getPlayer1())) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// For Player 2:\n\t\t\tif (hasWon(getPlayer2())) {\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\t\n\t\t\t// continue ...\n\t\t}\n\t}", "public void beginGame()\n {\n boolean isMenuDisplayed = true;\n while (isMenuDisplayed)\n { \n displayMenu();\n String userSelection = getUserStringInput(\"Please select from the following options\");\n fourOption(userSelection);\n if (userSelection == \"4\")\n isMenuDisplayed = false;\n }\n }", "public char userChoice ()\n {\n\tString c = IBIO.inputString (\"Stag, Doe, Phoenix, Horse, or Wolf? \");\n\tboolean Check = isValid (c);\n\twhile (!isValid (c))\n\t{\n\t printSlow (\"Error, invalid input.\");\n\t c = IBIO.inputString (\"Stag, Doe, Phoenix, Horse, or Wolf? \");\n\t}\n\n\n\tif (c.equalsIgnoreCase (\"Stag\") || c.equalsIgnoreCase (\"s\"))\n\t return 's';\n\telse if (c.equalsIgnoreCase (\"Doe\") || c.equalsIgnoreCase (\"d\"))\n\t return 'd';\n\telse if (c.equalsIgnoreCase (\"Phoenix\") || c.equalsIgnoreCase (\"p\"))\n\t return 'p';\n\telse if (c.equalsIgnoreCase (\"Horse\") || c.equalsIgnoreCase (\"h\"))\n\t return 'h';\n\telse\n\t return 'w';\n\n }", "public boolean validateMoveAndPlay(String input){\n // This function validates the move. such as whether coins are present or not.\n try{\n InvalidMoveException.validateMove(input, this.gameController);\n if(playMove(input) == false){\n return false;\n }\n }catch(InvalidMoveException e){\n System.out.println(\"\\nDiscarding \"+input+ \" move because of following exception\");\n System.out.println(e.getMessage()+\"\\n\");\n }\n return true;\n }", "public static void playGame() {\r\n System.out.println(\"Welcome to the game of Battleship against the computer!\");\r\n System.out.println(\"Please press ENTER to start.\");\r\n scan.nextLine();\r\n scan.nextLine();\r\n System.out.println();\r\n System.out.println(\"GUESSING BOARD\");\r\n displayBoard(displayBoard);\r\n System.out.println(\" -----------------------------\");\r\n displayBoard(gameBoardPlayer);\r\n System.out.println(\"YOUR BOARD\");\r\n /*int count = 5;\r\n while (count >= 0) {\r\n System.out.println(\"Enter coordinates: \");\r\n int xCoord = scan.nextInt();\r\n int yCoord = scan.nextInt();\r\n \r\n \r\n if(!gameBoardComp[xCoord][yCoord].equals(\" * \")) {\r\n System.out.println(\"You hit one of the computer's ships!\");\r\n displayBoard[xCoord - 1][yCoord - 1] = \" H \";\r\n }\r\n else {\r\n System.out.println(\"You missed!\");\r\n displayBoard[xCoord - 1][yCoord - 1] = \" M \";\r\n }\r\n \r\n displayBoard(displayBoard);\r\n }*/\r\n }", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int[][] board = {{4,4,4},{4,4,4},{4,4,4}};\n int player = 1;\n while (whoWin(board) == -1) {\n displayBoard(board);\n System.out.printf(\"Enter a row (0, 1, or 2) for player %c: \", (player == 0) ? 'O' : 'X');\n int row = input.nextInt();\n System.out.printf(\"Enter a column (0, 1, or 2) for player %c: \", (player == 0) ? 'O' : 'X');\n int column = input.nextInt();\n board[row][column] = player;\n player = (player + 1) % 2;\n }\n displayBoard(board);\n player = whoWin(board);\n if (player == 1) {\n System.out.println(\"X player won\");\n }\n else if (player == 0) {\n System.out.println(\"O player won\");\n }\n else {\n System.out.println(\"It is a draw\");\n }\n }", "private static Option playerInput() {\n\t\tsc = new Scanner(System.in);\n\t\tSystem.out.println(\"Do you choose Rock(0), Paper(1) or Scissors(2)?\");\n\t\treturn Option.values()[sc.nextInt()];\n\t}", "public static void checkFromUser() {\n\t\tif (askUser(\"Please type y to execute program and any other key to stop\").contentEquals(\"y\")) {\n\t\t\tSystem.out.println(\"Continuing\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Terminating program\");\n\t\t\tSystem.exit(0); \n\t\t}\n\t\tSystem.out.println(\"Calculating the greatest house income, the greatest income after expenditure and greatest savings from the given 3 families\");\n\t}", "public static void main(String[] args) {\n\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tint row =0,col = 0;\r\n\t\tint user = -1;\r\n\t\t\r\n\t\twhile (user != 0 && user != 1 && user != 2) {\r\n\t\t\tSystem.out.println(\"\\n************************************\");\r\n\t\t\tSystem.out.println(\"\\nEnter difficulty level\");\r\n\t\t\tSystem.out.println(\"Press 0 for BEGINNER 9*9 cells and 10 mines\");\r\n\t\t\tSystem.out.println(\"Press 1 for INTERMEDIATE 16*16 cells and 40 mines\");\r\n\t\t\tSystem.out.println(\"Press 2 for ADVANCED 24*24 cells and 99 mines\\n\");\r\n\t\t\tuser = input.nextInt();\r\n\t\t\tSystem.out.println(\"\\n************************************\");\r\n\t\t\tif (user == 0) {\r\n\t\t\t\t\r\n\t\t\t\trow = 9; col = 9;\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\telse if (user == 1){ \r\n\t\t\t\t\r\n\t\t\t\trow = 16; col = 16;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse if (user == 2){\r\n\t\t\t\t\r\n\t\t\t\trow = 24; col = 24;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tchar[][] board = new char[row][col];\r\n\t\t\r\n\t\tinitBoard(board);\r\n\t\t\r\n\t\tint [][] solution = new int[row][col];\r\n\t\tint [][] playboard = new int[row][col];\r\n\t\tfor(int i=0;i<solution.length;i++){\r\n\t\t\t\r\n\t\t\tfor(int j=0;j<solution[0].length;j++){\r\n\t\t\t\t\r\n\t\t\t\tsolution[i][j]=0;playboard[i][j] =0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\tint mine = 0;\r\n\t\t\r\n\t\tif (row == 9) mine = 10;\r\n\t\telse if (row == 16) mine = 40;\r\n\t\telse if (row == 24) mine = 99;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tint countplay = mine;fillBoard(board,mine);\r\n\t\t\r\n\t\tfor(int i=0;i<board.length;i++){\r\n\t\t\t\r\n\t\t\tfor(int j=0;j<board[0].length;j++){\r\n\t\t\t\t\r\n\t\t\t\tint r = i;\r\n\t\t\t\tint c =j;\r\n\t\t\t\tif(board[i][c] == '*'){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(r>0 && c>0){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(board[r-1][c-1] == '.'){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tsolution[r-1][c-1] += 1;\r\n\t\t\t\t\t\t\t\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\t\r\n\t\t\t\t\tif(r >0){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(board[r-1][c] == '.'){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tsolution[r-1][c] += 1;\r\n\t\t\t\t\t\t\t\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\t\r\n\t\t\t\t\tif(r >0 && c+1 < board[0].length){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(board[r-1][c+1] == '.'){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tsolution[r-1][c+1] += 1;\r\n\t\t\t\t\t\t\t\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\t\r\n\t\t\t\t\tif(c >0){if(board[r][c-1] == '.'){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsolution[r][c-1] += 1;\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\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(c+1 < board[0].length){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(board[r][c+1] == '.'){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tsolution[r][c+1] += 1;\r\n\t\t\t\t\t\t\t\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\t\r\n\t\t\t\t\tif(r +1 < board.length && c >0){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(board[r+1][c-1] == '.'){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tsolution[r+1][c-1] += 1;\r\n\t\t\t\t\t\t\t\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\t\r\n\t\t\t\t\tif(r +1 < board.length){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(board[r+1][c] == '.'){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tsolution[r+1][c] += 1;\r\n\t\t\t\t\t\t\t\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\t\r\n\t\t\t\t\tif(r +1 < board.length && c+1 <board[0].length){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(board[r+1][c+1] == '.'){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tsolution[r+1][c+1] += 1;\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\r\n\t\tSystem.out.println(\"\\n************************************\");\r\n\t\tSystem.out.println(\"\\nPlay Game\");\r\n\t\tSystem.out.println(\"\\nRows and Columns start from 0!\");\r\n\t\tSystem.out.println(\"\\n************************************\");\r\n\t\tprintBoard(board);\r\n\t\t\r\n\t\twhile(countplay <=board.length * board[0].length){\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"\\nEnter row: \");\r\n\t\t\t\r\n\t\t\tint prow = input.nextInt();System.out.println(\"\\nEnter col: \");\r\n\t\t\tint pcol = input.nextInt();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor(int i=0;i<board.length;i++){\r\n\t\t\t\tfor(int j=0;j<board[0].length;j++){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(board[prow][pcol] == '*'){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tSystem.out.println(\"GAME OVER\\n\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor(int k=0;k<solution.length;k++){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tfor(int x=0;x<solution[0].length;x++){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(board[k][x]=='*')\r\n\t\t\t\t\t\t\t\t\tSystem.out.print(\"*\" + \" \");\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\tSystem.out.print(solution[k][x] + \"\");\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tSystem.out.println(\"\\n\");\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{playboard[prow][pcol] = solution[prow][pcol];\r\n\t\t\t\t\ti=board.length;\r\n\t\t\t\t\tj=board[0].length;break;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\tfor(int k=0;k<playboard.length;k++){\r\n\t\t\t\t\r\n\t\t\t\tfor(int x=0;x<playboard[0].length;x++){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(board[k][x]=='*')\r\n\t\t\t\t\t\tSystem.out.print(\".\" + \" \");\r\n\t\t\t\t\t\r\n\t\t\t\t\telse if(playboard[k][x]==0)\r\n\t\t\t\t\t\tSystem.out.print(\".\" + \" \");\r\n\t\t\t\t\t\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tSystem.out.print(playboard[k][x] + \" \");\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcountplay++;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Congratulations\");\r\n\t\t\r\n\t}", "public void input(){\n\t\tboolean[] inputKeyArray = inputHandler.processKeys();\n\t\tint[] inputMouseArray = inputHandler.processMouse();\n\t\tcurrentLevel.userInput(inputKeyArray, inputMouseArray);\n\t}", "public void playGame() {\n // we read input from the user using a scanner\n Scanner userIn = new Scanner(System.in);\n\n while (true) {\n // read guess from user\n System.out.print(\"Enter guess from 1 to 100 (-1 to exit): \");\n int guess = userIn.nextInt();\n\n // user entered a guess - they don't want to abort\n if (guess != -1) {\n // send guess to server\n this.networkOut.printf(GUESS, guess);\n\n // check response\n\n // TODO: Step 2\n String response = networkIn.nextLine();\n if(response.equals(LOW)){\n System.out.println(LOW);\n } else if(response.equals(HIGH)){\n System.out.println(HIGH);\n } else{\n System.out.println(CORRECT);\n this.networkOut.println(GuessServer.ABORT);\n break;\n }\n\n } else {\n this.networkOut.println(GuessServer.ABORT);\n // if the user wants to quit early we break out of the loop\n break;\n }\n }\n System.out.println(this.networkIn.nextLine());\n }", "private void handleUserInput() throws IOException {\n KeyStroke stroke = screen.pollInput();\n\n if (stroke == null) {\n return;\n }\n\n if (stroke.getCharacter() != null) {\n return;\n }\n\n Direction dir = directionFrom(stroke.getKeyType());\n\n if (dir == null) {\n return;\n }\n\n game.getSnake().setDirection(dir);\n }", "public void setupGame() {\r\n // Create the Scanner object for reading input\r\n Scanner keyboard = new Scanner(System.in);\r\n \r\n boolean invalid = true;\r\n \r\n while (invalid) {\r\n System.out.println(\"Select a difficulty: \\n\");\r\n System.out.printf(\"1) Easy%n2) Medium%n3) Hard%n\");\r\n String difficulty = keyboard.nextLine();\r\n\r\n switch (difficulty) {\r\n case \"1\":\r\n invalid = false;\r\n this.grid = new Grid(8,8,8);\r\n this.runGame();\r\n break;\r\n case \"2\":\r\n invalid = false;\r\n this.grid = new Grid(10, 12, 10);\r\n this.runGame();\r\n break;\r\n case \"3\":\r\n invalid = false;\r\n this.grid = new Grid(16, 20, 50);\r\n this.runGame();\r\n break;\r\n default:\r\n System.out.println(\"Please enter a valid choice\");\r\n invalid = true;\r\n break;\r\n }\r\n }\r\n }", "public static void checkAndAssign(int player,int mode,int i){\n\tboolean flag = false;\r\n\tString inp;\r\n\tif(mode==1||(mode==2&&i%2==0)||(mode==3&&i%2==1)){\r\n\tSystem.out.print(\"Enter your input Player \"+ player);\r\n\t}\r\n\telse\r\n\t\tSystem.out.print(\"The inputs of computer based Player \"+player+\"\\t\");\r\n\tif((mode==2&&i==1&&gamebd[1][1]==0)||(mode==3&&i==0&&gamebd[1][1]==0)){\r\n\t\tinp=2+\" \"+2;\r\n\t\tSystem.out.println(inp);\r\n\t}\r\n\telse\r\n inp=input(mode,i,player);\r\n\tdo{\r\n String[] temp = inp.split(\" \");\t\r\n if(!(Integer.parseInt(temp[0])>=1&&Integer.parseInt(temp[1])>=1&&Integer.parseInt(temp[0])<=3&&Integer.parseInt(temp[1])<=3))\r\n\t {\r\n\t System.out.println(\"Enter a valid input\");\r\n\t inp=input(mode,i,player);\r\n continue;\r\n\t}\t\t\t\r\n if(gamebd[Integer.parseInt(temp[0])-1][Integer.parseInt(temp[1])-1]==0){\r\n\t\t\tgamebd[Integer.parseInt(temp[0])-1][Integer.parseInt(temp[1])-1]=player;\r\n\t\t\tflag=true;\r\n\t}\r\n\t\telse if(mode==1||(mode==2&&i%2==0)||(mode==3&&i%2==1)){\r\n\t\t\tSystem.out.print(\"Enter your input again Player \"+player);\r\n\t\t inp=input(mode,i,player);\r\n\t\t}\r\n}while(flag==false);\r\n}", "public static void launch(Scanner userinput) {\n int userint; //initializes the variable before hand so it can be modified to catch exception without compile issues\n userint = userinput.nextInt();//handled to take int for the function poschecker\n methods.poschecker(userint);//function to validate if its positive\n }", "public void play(){\n\t\t//use scanner to scan input\n\t\tScanner s = new Scanner(System.in);\n\t\t//set ocean and set ships\n\t\tOcean ocean = new Ocean();\n\t\tocean.pleaceAllShipRandomly();\n\t\tboolean playChoice = true;\n\t\t//only when player choose to not to play again, the game will stop\n\t\twhile(playChoice) {\n\t\t\twhile(!ocean.isGameOver()){\n\n\t\t\t\tocean.print();\n\t\t\t\tSystem.out.println(\"Enter a row number 0-9\");\n\t\t\t\tString rowInput = s.nextLine();\n\t\t\t\t//check the input format\n\t\t\t\twhile(!checkInput(rowInput)){\n\t\t\t\t\tSystem.out.println(\"Wrong input, enter number 0-9\");\n\t\t\t\t\trowInput = s.nextLine();\n\t\t\t\t}\n\t\t\t\tint row = rowInput.charAt(0) - '0';\n\t\t\t\tSystem.out.println(\"Enter a column number 0-9\");\n\t\t\t\tString colInput = s.nextLine();\n\t\t\t\t//check the input format\n\t\t\t\twhile(!checkInput(colInput)){\n\t\t\t\t\tSystem.out.println(\"Wrong input, enter number 0-9\");\n\t\t\t\t\tcolInput = s.nextLine();\n\t\t\t\t}\n\t\t\t\tint col = colInput.charAt(0) - '0';\n\t\t\t\t\n\t\t\t\t//check if the point is occupied\n\t\t\t\tif(ocean.isOccupied(row, col)) {\n\t\t\t\t\tSystem.out.println(\"you hit\");\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.println(\"you miss\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//if the ship is sunk, we do not need to show the message again\n\t\t\t\tif(ocean.ships[row][col].isSunk()) {\n\t\t\t\t\tocean.shootAt(row, col);\n\t\t\t\t}else {\n\t\t\t\t\tocean.shootAt(row, col);\n\t\t\t\t\tif(ocean.ships[row][col].isSunk()) {\n\t\t\t\t\t\tSystem.out.println(\"You just sank a \" + ocean.ships[row][col].getShipType() + \"!\");\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//show the player his information each time\n\t\t\t\tSystem.out.println(\"Shots Fired: \" + ocean.getShotsFired());\n\t\t\t\tSystem.out.println(\"Hit Count: \" + ocean.getHitCount());\n\t\t\t\tSystem.out.println(\"Ships Sunk: \" + ocean.getShipsSunk());\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t//player choose to continue or stop\n\t\t\tSystem.out.println(\"Game is Over! Your Score: \" + ocean.getShotsFired() + \"\\nWould you like to play again?(input N to stop)\");\n\t\t\tString choice = s.nextLine();\n\t\t\tif(choice.equals(\"N\")) {\n\t\t\t\tplayChoice = false;\n\t\t\t}\n\t\t}\n\t\ts.close();\n\t}", "public void playTheGame() {\n\t\tboolean gameIsOver = false;\n\t\tdo{\n\t\t\tcheckIfPiecedCanBeDroppedIn(column_number);\n\t\t\tdropPieces(column_number,gamePiece);\n\t\t\tif ( didLastMoveWin() ) {\n\t\t\t\tgameIsOver = true;\n\t\t\t}\n\t\t\tSystem.out.println(\"A\"+didLastMoveWin());\n\t\t\tSystem.out.println(\"b\"+gameIsOver);\n\t\t}while(! gameIsOver);\n\t}", "public void easyComputerMove(Board board){\r\n int i;\r\n boolean validCheck;\r\n i = randomMove();\r\n while(!(board.validUserInput(i)))\r\n {\r\n i = randomMove();\r\n }\r\n board.updateBoard(this.getChip(), i);\r\n System.out.println(\"I placed my token in column \" + (i+1));\r\n \r\n \r\n }" ]
[ "0.6101798", "0.5968689", "0.5907111", "0.58951557", "0.58880657", "0.586893", "0.5690301", "0.5687359", "0.56858146", "0.56844723", "0.56536776", "0.56329846", "0.5615857", "0.56151086", "0.5599103", "0.55763316", "0.5540672", "0.55332124", "0.55192435", "0.54843754", "0.5474867", "0.5469624", "0.5446611", "0.54461354", "0.54397935", "0.5431072", "0.5430959", "0.5416749", "0.54099977", "0.5406655", "0.54033095", "0.53989387", "0.5370468", "0.53692114", "0.5360022", "0.53585184", "0.5355057", "0.53427494", "0.5342746", "0.5340689", "0.5316356", "0.53155607", "0.5304751", "0.5297118", "0.52863646", "0.528601", "0.5285062", "0.5272893", "0.52516687", "0.5245864", "0.52423424", "0.5238303", "0.52084225", "0.5195267", "0.51936835", "0.519091", "0.51846045", "0.51808083", "0.51464176", "0.5145675", "0.514425", "0.51354927", "0.51324165", "0.5124727", "0.5122728", "0.511983", "0.5112274", "0.5111842", "0.5111807", "0.5111303", "0.5108166", "0.51055706", "0.5104493", "0.5101359", "0.5101072", "0.509937", "0.50947946", "0.50935584", "0.50903726", "0.5088983", "0.5081975", "0.5080071", "0.50768816", "0.50753075", "0.5069421", "0.50690687", "0.50652015", "0.5061549", "0.50596803", "0.50550014", "0.5053308", "0.505122", "0.5050022", "0.50493383", "0.5045225", "0.5041488", "0.50413036", "0.5033267", "0.5032808", "0.5031206", "0.5025607" ]
0.0
-1
Returns the row count for ListView display purposes
@Override public int getCount() { return getRowCount(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getCount() {\n\t\treturn mNumRows;\n\t}", "public abstract int getViewRowCount();", "int getRowsCount();", "@Override\n\t\t\t\tpublic int getViewRowCount() {\n\t\t\t\t\treturn model.getListaBase().size();\n\t\t\t\t}", "public int getRowCount() {\n if (rowBuilder_ == null) {\n return row_.size();\n } else {\n return rowBuilder_.getCount();\n }\n }", "public int getRowCount() {\n if (rowBuilder_ == null) {\n return row_.size();\n } else {\n return rowBuilder_.getCount();\n }\n }", "public int getRowCount() {\n if (rowBuilder_ == null) {\n return row_.size();\n } else {\n return rowBuilder_.getCount();\n }\n }", "public int getRowCount() {\n if (rowBuilder_ == null) {\n return row_.size();\n } else {\n return rowBuilder_.getCount();\n }\n }", "public int getRowCount() {\n if (rowBuilder_ == null) {\n return row_.size();\n } else {\n return rowBuilder_.getCount();\n }\n }", "public int getRowCount() {\n if (rowBuilder_ == null) {\n return row_.size();\n } else {\n return rowBuilder_.getCount();\n }\n }", "public int getRowCount() {\n return listData.size();\n }", "int getNumberOfRows() {\n lock.readLock().lock();\n try {\n return extensionPointPluginMap.rowMap().size();\n } finally {\n lock.readLock().unlock();\n }\n }", "public int getNumRows () {\n\t\treturn numrows_;\n\t}", "public int numberOfRows(){\n SQLiteDatabase db = this.getReadableDatabase();\n int numRows = (int) DatabaseUtils.queryNumEntries(db,TABLE_NAME);\n return numRows;\n }", "public int getRowCount() {\n\t\treturn l.size();\r\n\t}", "public int getRowsCount() {\n return rows_.size();\n }", "public int getCount() {\n\t\treturn count;\r\n\t}", "public int getRowCount() {\n return row_.size();\n }", "public int getRowCount() {\n return row_.size();\n }", "public int getRowCount() {\n return row_.size();\n }", "public int getRowCount() {\n return row_.size();\n }", "public int getRowCount() {\n return row_.size();\n }", "public int getRowCount() {\n return row_.size();\n }", "public static int RowCount()\r\n\t{\r\n\t\treturn wrksheet.getRows();\r\n\t}", "public int getRowsCount() {\n return rows_.size();\n }", "public int getCount()\n\t{\n\t\treturn count;\n\t}", "public int getRowCount() { return this.underlying.getRowCount(); }", "public int getCount() {\r\n\t\treturn count;\r\n\t}", "public int getCount() {\r\n\t\treturn count;\r\n\t}", "public int getRowCount() {\r\n\t\treturn(noOfRows);\r\n\t}", "public int getNumRows() {\n\t\treturn NUM_ROWS; \n\t}", "public int getNumberOfRows() {\n return this.numberOfRows;\n }", "public int getCount() {\n\t\treturn this.count;\n\t}", "public int getCount() {\n\t\treturn this.count;\n\t}", "public int getRowCount() {\r\n String countQuery = \"SELECT * FROM \" + User.TABLE_USER_NAME;\r\n SQLiteDatabase db = this.getReadableDatabase();\r\n Cursor cursor = db.rawQuery(countQuery, null);\r\n int rowCount = cursor.getCount();\r\n db.close();\r\n cursor.close();\r\n\r\n // return row count\r\n return rowCount;\r\n }", "public int getRowCount()\n {\n // Get level of the node to be displayed\n int rowCount = displayNode.getLevel();\n \n // Add number of children\n rowCount = rowCount + displayNode.getChildCount();\n \n // Increment by 1 if the root node is being displayed\n if (rootVisible) \n { \n rowCount++; \n }\n \n // Return number of rows\n return rowCount;\n }", "public int getCount() {\n\t\treturn count;\n\t}", "public int getCount() {\n\t\treturn count;\n\t}", "public int getCount() {\n\t\treturn count;\n\t}", "public int getCount() {\n\t\treturn count;\n\t}", "@Override\n\tpublic Integer getItemCount() {\n\t\t\n\t\tInteger countRows = 0;\n\t\t\n\t\t/*\n\t\t * Count of items will be retrieved from MainQuery.xml\n\t\t */\n\t\ttry {\n\t\t\tconnection = DBConnectionUtil.getDBConnection();\n\t\t\tpreparedStatement = connection.prepareStatement(QueryUtil.queryByID(CommonConstants.QUERY_ID_GET_ITEM_COUNT));\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\twhile(resultSet.next()){\n\t\t\t\tcountRows = resultSet.getInt(1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (SQLException | SAXException | IOException | ParserConfigurationException | ClassNotFoundException e) {\n\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t} finally {\n\t\t\t/*\n\t\t\t * Close prepared statement and database connectivity at the end of transaction\n\t\t\t */\n\t\t\ttry {\n\t\t\t\tif (preparedStatement != null) {\n\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t}\n\t\t\t\tif (connection != null) {\n\t\t\t\t\tconnection.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t\t}\n\t\t}\n\t\treturn countRows;\n\t}", "@Override\n\tpublic Integer getItemCount() {\n\t\t\n\t\tInteger countRows = 0;\n\t\t\n\t\t/*\n\t\t * Count of items will be retrieved from MainQuery.xml\n\t\t */\n\t\ttry {\n\t\t\tconnection = DBConnectionUtil.getDBConnection();\n\t\t\tpreparedStatement = connection.prepareStatement(QueryUtil.queryByID(CommonConstants.QUERY_ID_GET_ITEM_COUNT));\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\twhile(resultSet.next()){\n\t\t\t\tcountRows = resultSet.getInt(1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (SQLException | SAXException | IOException | ParserConfigurationException | ClassNotFoundException e) {\n\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t} finally {\n\t\t\t/*\n\t\t\t * Close prepared statement and database connectivity at the end of transaction\n\t\t\t */\n\t\t\ttry {\n\t\t\t\tif (preparedStatement != null) {\n\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t}\n\t\t\t\tif (connection != null) {\n\t\t\t\t\tconnection.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t\t}\n\t\t}\n\t\treturn countRows;\n\t}", "public int numberOfRows() {\n\t\treturn rowCount;\n\t}", "public int getRowCount() {\n\t\treturn rowcount;\n\t}", "@Override\n\tpublic int getRowCount() {\n\t\treturn list.size();\n\t}", "@Override\n\tpublic int getRowCount() {\n\t\treturn list.size();\n\t}", "public int getCount() {\n\t\treturn count;\n\t}", "public static int getCount() {\n\t\treturn count;\n\t}", "public int getnRows() {\n return nRows;\n }", "public int getnRows() {\n return nRows;\n }", "public static int getCount() {\n return count;\n }", "public int getRowCount();", "public static int getCount() {\r\n\t\treturn count;\r\n\t}", "public static int getCount() {\r\n\t\treturn count;\r\n\t}", "public static int getCount() {\r\n\t\treturn count;\r\n\t}", "public int getCount()\n {\n \treturn count;\n }", "public static int getCount() {\n return count;\n }", "public static int getCount() {\n return count;\n }", "public static int getCount() {\n return count;\n }", "public int getCount() {\n return this.count;\n }", "public int getCount() {\n\t\t\treturn count;\n\t\t}", "public int getCount() {\n\t\treturn _count;\n\t}", "public int getRowCount() \n\t{ return rowcounter; }", "@Override\n\tpublic int getRowCnt() {\n\t\treturn invBaseStockDao.getRowCnt();\n\t}", "public int getRowCount() {\n\t\treturn content.size();\r\n\t}", "public int totalRowsCount();", "public int getRowCount(){\n return dataEntries.length;\n }", "public int getRowCount() {\n\t\treturn this.records.size();\n\t}", "public int getCount() {\n\t\t\treturn this.count;\n\t\t}", "public int getCount() {\n\t\t\treturn dataList.size();\r\n\t\t}", "@Override\n\t\t\tpublic int getRow() {\n\t\t\t\treturn count;\n\t\t\t}", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn listadapter.size();\n\t\t}", "public int getCount() {\n return dataList.size();\n }", "public int rowCount() {\n\t\treturn n_;\n\t}", "public int getRowCount() {\r\n return this.rowCount;\r\n }", "public int getNumRows() { \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Getter for the number of rows\n\t\treturn numRows; \n\t}", "public int getCount(){\r\n\t\treturn count;\r\n\t}", "public int getCount(){\r\n\t\treturn count;\r\n\t}", "public int getRowCount() {\n return this.rowCount;\n }", "int getItemCount();", "int getItemCount();", "int getItemCount();", "public abstract int getNumRows();", "public int getCount() {\n\t\treturn super.getCount();\n\t}", "public int getCount() {\n return count;\n }", "public int getCount() {\n return count;\n }", "public int getCount() {\n return count;\n }", "@Override\r\n public int getRowCount() {\n if (leitores != null) {\r\n return leitores.size();\r\n }\r\n return 0;\r\n }", "public int getRowCount()\r\n\t{\r\n\t\treturn rowCount;\r\n\t}", "public int getCount() {\r\n return Count;\r\n }", "public int getItemCount() {\n checkWidget();\n return OS.SendMessage(handle, OS.TCM_GETITEMCOUNT, 0, 0);\n }", "public int getCount() {\n return count;\n }", "@Override\n public int getRowCount() {\n if (menuItems.size() > 0) {\n return menuItems.size() + 2;\n } else {\n return menuItems.size();\n }\n }", "public int getNrow(){\r\n \treturn this.nrow;\r\n \t}", "public int getCount() {\n return mCount;\n }", "public int getCount() {\n return count;\n }", "public int getCount() {\n return count;\n }", "public int getCount() {\n return count;\n }", "public int getCount() {\n return count;\n }", "public int getCount() {\n return count;\n }" ]
[ "0.78423077", "0.77897054", "0.7476315", "0.73629636", "0.7300916", "0.7300916", "0.7300916", "0.7300916", "0.7300916", "0.7300916", "0.7275338", "0.72680587", "0.72667027", "0.72180057", "0.72063965", "0.7205666", "0.7156657", "0.71566445", "0.71566445", "0.71566445", "0.71566445", "0.71566445", "0.71566445", "0.71548766", "0.71535", "0.71482456", "0.7139422", "0.71335155", "0.71335155", "0.71294636", "0.71252835", "0.7122505", "0.7111307", "0.7111307", "0.71091366", "0.70969826", "0.70929366", "0.70929366", "0.70929366", "0.70929366", "0.70917463", "0.70917463", "0.7082953", "0.70815957", "0.7078746", "0.7078746", "0.7078701", "0.7074129", "0.7061505", "0.7061505", "0.70608383", "0.70509875", "0.7049237", "0.7049237", "0.7049237", "0.7041414", "0.70369595", "0.70369595", "0.70369595", "0.7035517", "0.7033912", "0.70226854", "0.70168954", "0.70138586", "0.7007623", "0.70042324", "0.6996359", "0.6995663", "0.6995424", "0.6987259", "0.69869643", "0.6986231", "0.6982", "0.69815797", "0.6980841", "0.6969655", "0.6967009", "0.6967009", "0.69662005", "0.69601977", "0.69601977", "0.69601977", "0.6956378", "0.69556755", "0.69454277", "0.69454277", "0.69454277", "0.6944897", "0.6942229", "0.69349617", "0.69304204", "0.6929757", "0.6927118", "0.6924463", "0.69186133", "0.6918011", "0.6918011", "0.6918011", "0.6918011", "0.6918011" ]
0.7181759
16
You'll notice that this prints to the console output in no particular order (and it changes every time you run your Java program). This is because "PCollection" does not preserve/maintain order at all (for the sake of maximum parallelization).
@ProcessElement public void process(@Element String elem, OutputReceiver<MyProduct> out) { LOG.info("Line read: {}\n", elem); //------------------------------------------------------------------ out.output(getMyProduct(elem)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void print() {\n for (Process process : workload) {\n System.out.println(process);\n }\n }", "public static void oldTest1()\r\n\t{\n\t\tArrayList personlist = new ArrayList();\r\n\t\tpersonlist.add(new Person(\"one\"));\r\n\t\tpersonlist.add(new Person(\"two\"));\r\n\t\tpersonlist.add(new Person(\"three\"));\r\n\t\tpersonlist.add(new Worker(\"oneA\", \"job1\"));\r\n\t\tpersonlist.add(new Worker(\"oneA\", \"job2\"));\r\n\t\tPrintCollection1(personlist);\r\n\t\tPrintCollection(personlist);\r\n\t}", "public void printProcessQueue()\n\t{\n\t\tProcesses.print();\n\t}", "public static void main(String[] args) {\n Queue<Integer> values=new PriorityQueue<>();\r\n values.add(87);\r\n\t values.add(97);\r\n\t values.add(34);\r\n\t values.add(92);\r\n\t System.out.println(values);\r\n\t}", "public void testExecuteInParallel_Collection() throws Exception\n {\n System.out.println( \"executeInParallel\" );\n Collection<Callable<Double>> tasks = createTasks( 10 );\n Collection<Double> result = ParallelUtil.executeInParallel( tasks );\n assertEquals( result.size(), tasks.size() );\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tQueue<Item> pq = new PriorityQueue<Item>();\r\n\t\t\r\n\t\tpq.add(new Item(154,\"java\"));\r\n\t\tpq.add(new Item(45,\"c++\"));\r\n\t\tpq.add(new Item(4,\"c\"));\r\n\t\tpq.add(new Item(154,\"javascript\"));\r\n\t\tpq.add(new Item(160,\"html\"));\r\n\t\t\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tForkJoinPool core = ForkJoinPool.commonPool() ;\n\t\tSystem.out.println(core.getParallelism());\n\t\t\n\t\t// Paralle() on a stream\n\t\tStream stream =Stream.of(\"Shobhit\",\"Mahesh\",\"Suresh\",\"Anand\",\"Andrew\");\n\t\tStream.of(\"Shobhit\",\"Mahesh\",\"Suresh\",\"Anand\",\"Andrew\").forEach(System.out::println);\n\t\tSystem.out.println(\"------\");\n\t\tStream.of(\"Shobhit\",\"Mahesh\",\"Suresh\",\"Anand\",\"Andrew\").parallel().forEach(System.out::println);\n\t\tSystem.out.println(\"------\");\n\t\t//2 .Use ParallelStream method at a collector \n\t\tArrays.asList(\"Shobhit\",\"Mahesh\",\"Suresh\",\"Anand\",\"Andrew\").parallelStream().forEach(System.out::println);\n\t\tSystem.out.println(\"------\");\n\t\t//3.Range method\n\t\tIntStream.rangeClosed(0, 10).forEach(System.out::println);\n\t\tSystem.out.println(\"------\");\n\t\tIntStream.rangeClosed(0, 10).parallel().forEach(System.out::println);\n\t\t//Print in Alaphabetical order\n\t\t//System.out.println(getArrayList());\n\t\tgetArrayList().stream().forEach(System.out::println);\n\t\tgetArrayList().parallelStream().forEach(System.out::println);\n\t\t//Check stream is running in Parallel Mode :-isParallel() Method is there\n\t\tIntStream s1=IntStream.rangeClosed(1,10);\n\t\tSystem.out.println(s1.isParallel()); // to check whether stream is running paralllel or not\n\t\tIntStream s2=IntStream.rangeClosed(1,10);s2.parallel();\n\t\tSystem.out.println(s2.isParallel());\n\t}", "@Test\n public void streamsExample() {\n List<Integer> list = asList(1, 2, 3, 4, 5);\n \n list.stream().forEach(out::println);\n \n out.println();\n \n list.stream().parallel().forEachOrdered(out::println);\n \n \n }", "public static void main(String[] args) {\n\t\tPriorityQueue p = new PriorityQueue();\n\t\tp.add(\"Hello1\");\n\t\tp.add(\"Hello2\");\n\t\tp.add(\"Hello3\");\n\t\tp.add(\"Hello4\");\n\t\t\n\t\tIterator it= p.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tSystem.out.println(it.next());\n\t\t}\n\t}", "public void rc(){\n List<Integer> numbers = new ArrayList<>();\n var result = List.of(1,2,3,4,5,6,7,8,9,10);\n result\n .parallelStream()\n .forEach(number->addToList(numbers,number));\n print.accept(numbers);\n }", "public static void main(String[] args) {\n\t\tQueue<Integer> q = new LinkedList<Integer>();\n\t\tq.add(5);\n\t\tq.add(3);\n\t\tq.add(1);\n for(Integer a : q){\n System.out.println(a);\n }\n q.peek();\n q.poll();\n q.remove();\n Iterator<Integer> t = q.iterator();\n\t\twhile(t.hasNext()){\n\t\t System.out.println(t.next());\n }\n\n\n\n\t}", "public static void main(String[] args) {\n\t\tArrayList<Points> pointsPath = new ArrayList<>();\r\n\t\tPoints p = new Points();\r\n\t\tpointsPath.add(new Points(p));\r\n\t\tp.move(4, 4);\r\n\t\tpointsPath.add(new Points(p));\r\n\t\tp.move(10, 10);\r\n\t\tpointsPath.add(new Points(p));\r\n\t\tIterator<Points> it = pointsPath.iterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t it.next());\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tPriorityQueue<String> pq = new PriorityQueue<String>();\n\t\t\n\t\tpq.add(\"aperewerple\");\n\t\tpq.add(\"apple\");\n\t\tpq.add(\"orange\");\n\t\tpq.add(\"banana\");\n\t\tpq.add(\"guvava\");\n\t\tpq.add(\"agede\");\n\t\tSystem.out.println(pq);\n\t\t\n\t\tIterator<String> itr = pq.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tSystem.out.println(itr.next());\n\t\t}\n\t\t\n\t}", "private void print() {\n\t\t// reorganize a wraparound queue and print\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tSystem.out.print(bq[(head + i) % bq.length] + \" \");\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t}", "public static void main(String[] args) {\n Container<String> queue = new Container<>(7);\n Producer p1 = new Producer(queue, 3);\n Thread t1 = new Thread(p1);\n t1.setName(\"p1\");\n Producer p2 = new Producer(queue, 20);\n Thread t2 = new Thread(p2);\n t2.setName(\"p2\");\n Consumer c1 = new Consumer(queue, 3);\n Thread t3 = new Thread(c1);\n t3.setName(\"c1\");\n Consumer c2 = new Consumer(queue, 29);\n Thread t4 = new Thread(c2);\n t4.setName(\"c2\");\n\n Producer p3 = new Producer(queue, 10);\n Thread t5 = new Thread(p3);\n t5.setName(\"p5\");\n\n Consumer c3 = new Consumer(queue, 1);\n Thread t6 = new Thread(c3);\n t6.setName(\"c3\");\n\n t3.start();\n t4.start();\n t6.start();\n t1.start();\n t2.start();\n t5.start();\n\n }", "public static void main(String[] args) {\r\n\t\tSet<String> list = new CopyOnWriteArraySet<>();\r\n\t\tlist.add(\"a\");\r\n\t\tlist.add(\"b\");\r\n\t\tlist.add(\"c\");\r\n\t\tlist.add(\"d\");\r\n\t\tfor (String string : list) {\r\n\t\t\tSystem.out.println(string);\r\n\t\t\t// This won't throw an ConcurrentModificationException, but if it was a normal\r\n\t\t\t// ArrayList, it would.\r\n\t\t\tlist.add(\"added after\");\r\n\t\t}\r\n\t\tSystem.out.println(list);\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint[] arr= {5,8,2,4,3};\r\n\t\t\r\n\t\tfor (int i:arr) {\r\n\t\t\tSystem.out.println(i+\" \");\r\n\t\t}\r\n\t\t\r\n\t\tArrays.parallelSort(arr);\r\n\t\tSystem.out.println(\"Elements after sort\");\r\n\t\t\r\n\t\tfor (int i:arr) {\r\n\t\t\tSystem.out.println(i+\" \");\r\n\t\t}\r\n\r\n\t}", "private void printHeap() {\n\t\tfor(Pair p: heap){\n\t\t\tint a= (int)p.element;\n\t\t\tint b=(int)p.priority;\n\t\t\tString printable=\"(\" + a + \", \" + b + \")\";\n\t\t\tSystem.out.println(printable);\n\t\t}\n\t}", "public static void HPRN(boolean verbose,ArrayList<Process> list, int numProcesses ) throws FileNotFoundException {\n\tSystem.out.println(\"Highest Penalty Ratio Next\");\n\tint totalCPU=0;\n\tint randomNum=1;\n\tPriorityQueue<Process> priorityQ = new PriorityQueue<Process>(10, new The_Comparator_Ratio()); \n \tSystem.out.print(\"The original output is: \" + numProcesses+ \" \");\n\n\tfor(int i=0;i<numProcesses;i++) {\n\t\tlist.get(i).processdetails();\n \t}\n\tSystem.out.println();\n\tCollections.sort(list);\n\tSystem.out.print(\"The sort output is: \" + numProcesses + \" \");\n\n\tfor(Process iterate: list) {\n\t\t\n\t\titerate.processdetails();\n\t}\n\tSystem.out.println();\n \n\t \n\t ArrayList<Process> terminated= new ArrayList<Process>();\n\t ArrayList<Process> InSystem= new ArrayList<Process>();\n\t HashMap<Process, Integer> runinng = new HashMap<Process, Integer>();\n \n\t int cycleNum=0;\n \n \n \n HashMap<Process, Integer> waitTime = new HashMap<Process, Integer>();\n \n HashMap<Process, Integer> finishTime = new HashMap<Process, Integer>();\n HashMap<Process, Integer> cycleReady = new HashMap<Process, Integer>();\n\n HashMap<Process, Integer> IOTime = new HashMap<Process, Integer>();\n CopyOnWriteArrayList<Process> blocked= new CopyOnWriteArrayList<Process>();\n\t \n\t Queue<Process> readyQ = new LinkedList<Process>(); \n\tArrayList<Process> ProcessesInCycle=new ArrayList<Process>();\n\tint AVGIO=0;\n\tArrayList<Integer> IOUtilization=new ArrayList<Integer>();\n\n\tQueue<Process> unstartedQ = new LinkedList<Process>(); \n\n\tint finishingTime=0;\n \n \n\t//Current running process\n\tProcess running=null;\n\tfor(int i=0; i<list.size();i++) {\n\t\t\n\t\t\tlist.get(i).currentState=\"unstarted\";\n\t\t\tunstartedQ.add(list.get(i));\n\t\t\n\t}\n\t\n\tif(verbose==true) {\n\t\tSystem.out.println(\"This detailed printout gives the state and remaining burst for each process\\n\");\n\t\tSystem.out.print(\"Before cycle \\t\" + cycleNum + \":\\t\");\n\t\tfor (int iterator=0; iterator<list.size();iterator++) {\n\t\t\t//System.out.println(\"Here 0000 \");\n\t\t\tlist.get(iterator).cycleStatus();\n\t\t\tSystem.out.print(\"\\t \");\n\t\t}\n\t\tSystem.out.print(\"\\n\");\n\t}\n\t\n\twhile (terminated.size()!=list.size()) {\n\t\tif(!InSystem.isEmpty()) {\n\t\t\tfor(Process p: InSystem) {\n\t\t\t\t \n\t\t\t\tp.setInSystem(p.getInSystem()+1);\n\t\t\t}\n\t\t\tfor(Process p: priorityQ) {\n\t\t\t\t//p.Cycle();\n\t\t\t\t//System.out.println(p.getRuning());\n\t\t\t\t//System.out.println(\"IN the System \" + p.getInSystem());\n\t\t\t\t//System.out.println(\"Actually Running \" + p.getRuning());\n\t\t\t\t//p.setInSystem(p.getInSystem()+1);\n\t\t\t}\n\t\t}\n\t\tif(!ProcessesInCycle.isEmpty()) {\n\t\t\t \n\t\t\t\tfor(Process in: ProcessesInCycle) {\n\t\t\t\t\tin.setCycleTracker(in.getCycleTracker()+1);\n\t\t\t\t}\n\t\t\t\tArrayList<Process> resort = new ArrayList<Process>();\n\t\t\t\tif(!priorityQ.isEmpty()) {\n\t\t\t\tfor(Process in : priorityQ) {\n\t\t\t\t\tresort.add(in);\n\t\t\t\t\t\n\t\t\t}\n\t\t\t}\n\t\t\t\tpriorityQ.clear();\n\t\t\t\tfor(Process in: resort) {\n\t\t\t\t\tpriorityQ.add(in);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\tProcess[] events = priorityQ.toArray(new Process[priorityQ.size()]);\n\t\t\t\tArrays.sort(events, priorityQ.comparator());\n\t\t\t\tfor (Process e : events) {\n\t\t\t\t\t//e.Cycle();\n\t\t\t\t //System.out.println( \" \" + ratioTest(e, cycleNum));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\n\t\tfor(Process iterator: unstartedQ) {\n\t\t\tif (iterator.A==cycleNum) {\n\t\t\t\tInSystem.add(iterator);\n\t\t\tint in=\tlist.indexOf(iterator);\n\t\t\tlist.get(in).currentState=\"ready\";\n\t\t\t\n\t\t\titerator.setCycleTracker(0);\n\t\t\treadyQ.add(iterator);\n\t\t\titerator.setCurrentState(\"ready\");\n\t\t\titerator.setCycleTracker(0);\n\t\t\tProcessesInCycle.add(iterator);\n\t\t\tcycleReady.put(iterator, 0);\n\t\t\tpriorityQ.add(iterator);\n\t\t\twaitTime.put(iterator, 0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t \n\t\tcycleNum++;\n\t\tif(running==null ){\n\t\t \n\t\t\t \n\t\t\tint i=0;\n\t\t\t\n\t\t\t\n \t\t\trunning=priorityQ.poll();\n \t\t\t \n \t\t\tint minCycle= Collections.min(cycleReady.values());\n \t\t\t\n \t\t\treadyQ.remove(running);\n\t\t\tif(running!=null &&running.getRuntime()==0) {\n\t\t\tint randomBurst= randomOS(running.getB(), randomNum);\n\t\t\trandomNum++;\n\t\t\trunning.setburst(randomBurst);\n\t\t\trunning.setIOBurst(randomBurst);\n\t\t\t \n\t\tint x=0;\n\t\tfor(Process iterator: list) {\n\t\tif(iterator.getID()==running.getID()) {\n\t\t\titerator.setCurrentState(\"running\");\n\t\t\truninng.put(running,randomBurst);\n\t\t}\n\t}\n\t\t\t}\n\t\n\n\t\t}\n\t\n\t\tfor(Process iterator: readyQ) {\n\t\t\tint in= list.indexOf(iterator);\n\t\t\tlist.get(in).setWaitingTime(list.get(in).getWaitingTime()+1);\n\t\t}\n\t\t\n\t\tif(verbose==true) {\n\t\t\n\t\t\tSystem.out.print(\"Before cycle \\t\" + cycleNum + \":\\t\");\n\t\t\t\n\t\t\tfor(Process iterator: list) {\n\t\t\t\titerator.cycleStatus();\n\t\t\t\tSystem.out.print(\"\\t\");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\n\t\t\n\t\tif(running!=null) {\n\t\t\ttotalCPU++;\n\t\t\trunning.setC(running.getC()-1);\n\t\t\trunning.setburst(running.getBurst()-1);\n\t\t\tfor(Process p: list) {\n\t\t\t\tif(p.getID()==running.getID())\n\t\t\t\tp.setRuning(p.getRuning()+1);\n\t\t\t}\n\t\t\trunning.setRuning(running.getRuning()+1);\n\t\t}\n\t\t\n\n\t\tif(!blocked.isEmpty()) {\n\t\t\tAVGIO++;\n\t\t\tArrayList<Process> ready= new ArrayList<Process>();\n\t\t\tfor(Process iterator: blocked) {\n\t\t\t\titerator.setBlocked(iterator.getBlocked()+1);\n \t\t\t\titerator.setIOBurst(iterator.getIOBurst()-1);\n\t\t\t\t\n \t\t\t\tIOTime.put(iterator, IOTime.get(iterator)+1);\n\t\t\t\tif(iterator.getIOBurst()<=0) {\n\t\t\t\t\tready.add(iterator);\n\t\t\t\n\t\t\t\t}}\n\t\t\t\n\t\t\tCollections.sort(ready);\n\t\t\tfor(Process in :ready ) {\n\t\t\t\tif(!ProcessesInCycle.contains(in)) {\n\t\t\t\tProcessesInCycle.add(in);\n\t\t\t\t}\n\t\t\t\t in.setCurrentState(\"ready\");\n\t\t\t\t\t\tblocked.remove(in);\n\t\t\t\t\t\treadyQ.add(in);\n\t\t\t\t\t\tif(!priorityQ.contains(in)) {\n\t\t\t\t\t\t\tpriorityQ.add(in);\n\t\t\t\t\t\t}\n\t\t\t\t\t\n \t\t\t\t\t\tfor(Process process: list) {\n\t\t\t\t\t\t\tif(process.getID()==in.getID()) {\n\t\t\t\t\t\t\t\tprocess.setCurrentState(\"ready\");\n\t\t\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\t\t//terminated.add(iterator);\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t}\t\n\t\n\t\n\t\tif(running!=null && running.getC()!=0 && running.getBurst()<=0) {\n\t\n\t\t\tint val=0;\n\t\t\n\t\t\tfor(Process iterator: list) {\n\t\t\t\tif(iterator.getID()==running.getID()) {\n\t\t\t\t\titerator.setCurrentState(\"blocked\");\n\t\t\t\t\t\n\t\t\t\t\tif(IOTime.containsKey(iterator)) {\n \t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\tIOTime.put(iterator, 0);\n\t\t\t\t\t}\n\t\t\t\t\tval=runinng.get(iterator)*iterator.getM();\n\t\t\t\t\t\n\t\t\t\t\titerator.setIOBurst(val);\n \t\t\t\t}\n\t\t\t}\n\t\t\t\t\n \t\t\trunning.setIOBurst(val);\n\t\n\t\t\tblocked.add(running);\n\t\t\trunning=null;\n \t\t}\n\t\telse if(running!=null && running.getC()==0 ){\n\t\t\tfor(Process iterator: list) {\n\t\t\t\tif(iterator.getID()==running.getID()) {\n\t\t\t\t\titerator.setCurrentState(\"terminated\");\n\t\t\t\t\titerator.setburst(0);\n\t\t\t\t\tProcessesInCycle.remove(iterator);\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t}\n\t\t\tterminated.add(running);\n\t\t\tfinishTime.put(running, cycleNum);\n\t\t\trunning=null;\n\t\t\t\n\t} \n\t\tfinishingTime++;\n\t}\n\tArrayList<Integer> AVGturnaroundTime= new ArrayList<Integer>();\n\tArrayList<Integer> AVGWaitTIme= new ArrayList<Integer>();\n\n\tSystem.out.println(\"\\nThe scheduling algorithm used was Highest Penalty Ratio Next\\n\");\n\tint counter=0;\n\tfor(Process values: list) {\n \t\tSystem.out.println(\"Process \"+ counter + \": \");\n\t \tSystem.out.print(\"\\t(A, B, C, M) =\" +\" \" );\n\t \t values.processdetails();\n\t\tfor(Process proc: finishTime.keySet()) {\n\t\t\tif (proc.getID()==values.getID()) {\n\t\t\t\tSystem.out.println(\"\\n\\tFinishing Time: \" + finishTime.get(proc));\n\t\t\t\tSystem.out.println(\"\\tTurnaround Time: \"+ (finishTime.get(proc)- proc.getA()));\n\t\t\t\tAVGturnaroundTime.add( (finishTime.get(proc)- proc.getA()));\n\t\t\t}\n\t\t}\n\t\t \n\t\t\n\t\t\n\t\tfor(Process proc: IOTime.keySet()) {\n \t\t\tif (proc.getID()==values.getID()) {\n\t\t\t\tSystem.out.println(\"\\tIO Time: \" + IOTime.get(proc));\n\t\t\t\tIOUtilization.add(IOTime.get(proc));\n\t\t\t}\n\t\t\n\t\t\n\t\t}\n\t\tSystem.out.println(\"\\tWaiting Time: \" +values.getWaitingTime());\n\t\tAVGWaitTIme.add(values.getWaitingTime());\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tcounter++;\n\t\t}\n\tint o=0;\n\tfor(Process l: list) {\n\t\to+=l.getCPUtime();\n\t\t \n\t}\n\tSystem.out.print(\"\\nSummary Data:\");\n\tSystem.out.println(\"\\n\\tFinishing Time: \" + finishingTime);\n \tSystem.out.println(\"\\tCPU Utilization: \" + (double)totalCPU/((double)cycleNum));\n \tint IOU=0;\n\tdouble ioUtilization=0;\n\t\n\tfor(int i =0; i<IOUtilization.size();i++) {\n\t\tIOU+=IOUtilization.get(i);\n\t}\n\tioUtilization=(double)AVGIO/((double) cycleNum);\n\tSystem.out.println(\"\\tI/O Utilization:: \" + ioUtilization);\n\tSystem.out.println(\"\\tThroughput: \" + ((double)((double)100*list.size()/(double)(cycleNum))) + \" processes per hundred cycles\");\n\tint avg=0;\n\tdouble TAT1=0;\n\tfor(int i =0; i<AVGturnaroundTime.size();i++) {\n\t\tavg+=AVGturnaroundTime.get(i);\n\t}\n\tTAT1= (double)avg/(double)list.size();\n\t\n\tSystem.out.println(\"\\tAverage turnaround time: \" + TAT1);\n\tint avgWait=0;\n\tdouble AVGW=0;\n\tfor(int i =0; i<AVGWaitTIme.size();i++) {\n\t\tavgWait+=AVGWaitTIme.get(i);\n\t}\n\tAVGW=(double)avgWait/(double) list.size();\n\tSystem.out.println(\"\\tAverage Wait time: \" + AVGW);\n\t\n\t\n\t\n\t\n\t\n}", "public static void main(String[] args)\n {\n PriorityQueue<Integer> pQueue =\n new PriorityQueue<>(Collections.reverseOrder());\n\n // Adding items to the pQueue using add()\n pQueue.add(10);\n pQueue.add(30);\n pQueue.add(20);\n pQueue.add(400);\n\n // Printing the most priority element\n System.out.println(\"Head value using peek function:\" +\n pQueue.peek());\n\n // Printing all elements\n System.out.println(\"The queue elements:\");\n for (Integer integer : pQueue) System.out.println(integer);\n\n // Removing the top priority element (or head) and\n // printing the modified pQueue using poll()\n pQueue.poll();\n System.out.println(\"After removing an element \"\n + \"with poll function:\");\n for (Integer integer : pQueue) System.out.println(integer);\n\n // Removing 30 using remove()\n pQueue.remove(30);\n System.out.println(\"after removing 30 with\"\n + \" remove function:\");\n for (Integer integer : pQueue) System.out.println(integer);\n\n // Check if an element is present using contains()\n boolean b = pQueue.contains(20);\n System.out.println(\"Priority queue contains 20 \"\n + \"or not?: \" + b);\n\n // Getting objects from the queue using toArray()\n // in an array and print the array\n Object[] arr = pQueue.toArray();\n System.out.println(\"Value in array: \");\n for (Object o : arr) System.out.println(\"Value: \" + o.toString());\n }", "private void print() {\n\t\tList<Entry<String, Double>> entries = sort();\n\t\tfor (Entry<String, Double> entry: entries) {\n\t\t\tSystem.out.println(entry);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tArrayList<String> ar=new ArrayList<String>();\n\t\tar.add(\"Hai\");\n\t\tar.add(\"Hello\");\n\t\t\n\t\tSet<String> set=new TreeSet<String>();\n\t\tset.add(\"Niha\");\n\t\tset.add(\"Nikki\");\n\t\t\n\t\tPriorityQueue<String> q=new PriorityQueue<String>();\n\t\tq.add(\"Java\");\n\t\tq.add(\"Dotnet\");\n\t\t\n\t\tHashMap<String,Collection> hm=new HashMap<String,Collection>();\n\t\t\n\t\thm.put(\"1234\", ar);\n\t\thm.put(\"234\", set);\n\t\thm.put(\"4567\", q);\n\t\t\n\t\tSet entries=hm.entrySet();\n\t\tIterator itr=entries.iterator();\n\t\t\n\t\twhile(itr.hasNext()) {\n\t\t\tMap.Entry me=(Map.Entry)itr.next();\n\t\t\tCollection c=(Collection)me.getValue();\n\t\t\tSystem.out.println(me.getKey()+\"\"+c);\n\t\t}\n\t\t\n\n\t}", "public static void main(String[] args) {\nPriorityQueue pq= new PriorityQueue(15);//,new MyComparator123());\r\nSystem.out.println(pq.peek());\r\n//System.out.println(pq.element());\r\n/*for(int i=1;i<=10;i++)\r\npq.offer(i);\r\nSystem.out.println(pq);\r\nSystem.out.println(pq.poll());\r\n\r\nSystem.out.println(pq);*/\r\npq.offer(\"A\");\r\npq.offer(\"C\");\r\npq.offer(\"B\");\r\npq.offer(\"Z\");\r\nfor(int i=0;i<pq.size();i++)\r\nSystem.out.println(pq.peek());\r\n\t}", "public static void main(String[] args) {\r\n\t\tPriorityQueue p1=new PriorityQueue();\r\n\t\t // System.out.println(\"p1.poll()=\"+p1.poll());\r\n // System.out.println(\"p1.remove()=\"+p1.remove());\r\n\t\tp1.add(12); \r\n\t\tp1.add(10);\r\n p1.add(20);\r\n // p1.add(2.3);\r\n p1.add(20);\r\n p1.add(100);\r\n p1.add(21);\r\n // p1.add(null);\r\n System.out.println(p1);\r\n System.out.println(\"p1.remove()=\"+p1.remove());\r\n System.out.println(\"p1.poll()=\"+p1.poll());\r\n System.out.println(p1);\r\n System.out.println(\"p1.peek()=\"+p1.peek()); \r\n System.out.println(\"p1.peek()=\"+p1.peek()); \r\n System.out.println(p1);\r\n\t}", "public static void main(String[] args) {\n Timer timer = new Timer();\r\n timer.start();\r\n \r\n /*Integer[] a = new Integer[1000000];\r\n Random rand = new Random();\r\n double d;\r\n int in;\r\n for(int x = 0; x < 1000000; x++){\r\n d = Math.random()*50;\r\n in = (int) d;\r\n a[x] = in;\r\n }*/\r\n \r\n Integer[] a = new Integer[5];\r\n a[0] = new Integer(2);\r\n a[1] = new Integer(1);\r\n a[2] = new Integer(4);\r\n a[3] = new Integer(3);\r\n\ta[4] = new Integer(8);\r\n priorityqSort(a);\r\n /*Queue<Integer> pq1 = new PriorityQueue<Integer>();\r\n for (Integer x: a){\r\n pq1.add(x);\r\n }\r\n System.out.println(\"pq1: \" + pq1);*/\r\n \r\n /*Queue<String> pq2 = new PriorityQueue<>();\r\n pq2.add(\"4\");\r\n pq2.add(\"9\");\r\n pq2.add(\"2\");\r\n pq2.add(\"1\");\r\n pq2.add(\"5\");\r\n pq2.add(\"0\");\r\n System.out.println(\"pq: \" + pq2);*/\r\n \r\n timer.end();\r\n System.out.println(timer);\r\n }", "private static void printDependencies(ConcurrentHashMap<String,LinkedList<String>> map, LinkedList<String> toProcess) {\r\n \tLinkedList<String> ll;\r\n \tString p;\r\n\r\n \twhile (toProcess.size() != 0) {\r\n \t\tp = toProcess.removeFirst();\r\n \t\tll = hashM.get(p);\r\n \t\tfor (String name : ll) {\r\n \t\t\tif (map.containsKey(name)) {\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\tSystem.out.print(\" \" + name);\r\n \t\t\tmap.put(name,new LinkedList<String>());\r\n \t\t\ttoProcess.add(name);\r\n \t\t}\r\n \t}\r\n }", "static void AddAndDisplay()\n\t{\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\toSet = new TreeSet<String>();\n\t\t\toSet.add(\"Apple\");\n\t\t\toSet.add(\"Boy\");\n\t\t\toSet.add(\"Cat\");\n\t\t\toSet.add(\"Apple\");\n\t\t\tSystem.out.println(oSet);\n\t\t\tSystem.out.println(\"****************\");\n\t\t\t\n\t\t\tfor(String s:oSet)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"for each loop: \"+s);\n\t\t\t}\n\t\t\tSystem.out.println(\"****************\");\n\t\t\t\n\t\t\tIterator<String> it = oSet.iterator();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Iterator: \"+it.next());\n\t\t\t}\n\t\t\tSystem.out.println(\"****************\");\n\t\t\t\n\t\t\tSpliterator<String> sp = oSet.spliterator();\n\t\t\tsp.forEachRemaining(System.out::println);\n\t\t\tSystem.out.println(\"****************\");\n\t\t\t\n\t\t\toSet.forEach((k)->System.out.println(\"for each method: \"+k));\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toSet = null;\n\t\t}\n\t}", "public static void main(String[] args) {\n\n //The PriorityQueue class provides the facility of using queue.\n // But it does not orders the elements in FIFO manner. It inherits AbstractQueue class.\n\n PriorityQueue<String> priorityQueue=new PriorityQueue<>();\n priorityQueue.add(\"amit\");\n priorityQueue.add(\"vinet\");\n priorityQueue.add(\"amit\");\n priorityQueue.add(\"rajan\");\n priorityQueue.add(\"karan\");\n priorityQueue.add(\"sajan\");\n priorityQueue.add(\"rajan\");\n\n System.out.println(priorityQueue.size());\n System.out.println(priorityQueue);\n System.out.println(\"head \"+priorityQueue.element());\n System.out.println(\"head \"+priorityQueue.peek());\n System.out.println(priorityQueue.remove(\"sajan\"));\n System.out.println(priorityQueue);\n priorityQueue.remove(\"rajan\");\n\n for(String str: priorityQueue){\n System.out.println(str);\n }\n priorityQueue.remove();\n System.out.println(priorityQueue);\n priorityQueue.poll();\n System.out.println(priorityQueue);\n priorityQueue.removeAll(priorityQueue);\n System.out.println(priorityQueue);\n }", "public static void main(String[] args) {\n\t\tLinkedList list=new LinkedList();\n\t\tlist.insert(10);\n\t\tlist.insert(5);\n\t\tlist.insert(15);\n\t\tlist.insert(100);\n\t\tlist.insert(500);\n\t\tlist.insert(200);\n\t\tlist.show();\n\t\tlist.sort();\n\t\tSystem.out.println();\n\t\tlist.show();\n\t}", "public static void main(String[] args) {\n CopyOnWriteArrayList<String> list = new CopyOnWriteArrayList<>();\n CopyOnWriteArraySet<String> set = new CopyOnWriteArraySet<>();\n\n for (int i = 0; i < 30; i++) {\n new Thread(()->{\n set.add(UUID.randomUUID().toString());\n System.out.println(set);\n },String.valueOf(i)).start();\n }\n\n /**\n * 1.故障现象\n * java.util.ConcurrentModificationException\n * 2.导致原因\n * 并发争抢修改导致\n * 3.解决方案\n * List<String> list = new Vector<>();\n * List<String> list = Collections.synchronizedList(new ArrayList<>());\n * CopyOnWriteArrayList<String> list = new CopyOnWriteArrayList<>();\n * 4.优化建议\n * CopyOnWriteArrayList<String> list = new CopyOnWriteArrayList<>();\n */\n }", "private void run() {\n List<Point> points = Arrays.asList(this.points);\n Collections.sort(points);\n for (int i=0; i < points.size(); i++) {\n Point p0 = points.get(i);\n List<Point> cp = new ArrayList<>(points); // clone\n Collections.sort(cp, p0.SLOPE_ORDER);\n for (int s=0, e; s < cp.size(); s=e) {\n for (e=s; e < cp.size() && p0.SLOPE_ORDER.compare(cp.get(s) , cp.get(e)) == 0; e++);\n if (e-s+1>= 4) {\n List<Point> r = new ArrayList<>(cp.subList(s, e));\n r.add(p0);\n Collections.sort(r);\n if (r.get(0).equals(p0)) {\n Point[] ret = r.toArray(new Point[e-s+1]);\n StdOut.println(this.toString(ret));\n this.drawLine(ret);\n }\n }\n }\n }\n }", "public void print(){\n\t\tfor (int i=0; i<_size; i++){\n\t\t\tSystem.out.print(_a[i].getKey()+\"; \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public static void main(String[] args) {\n Primos pr = new Primos(2);\n ArrayList<Integer> ultimosPrimosEncontrados = new ArrayList<>();\n\n int contador = 0;\n while(contador < 999999)\n {\n pr.run();\n\n try {\n pr.join();\n Primos newPrimo = new Primos(pr.getUltimoPrimoEncontrado());\n newPrimo.run();\n newPrimo.join();\n ultimosPrimosEncontrados = newPrimo.getTotalPrimos();\n contador++;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n System.out.println(\"Os ultimos primos encontrados foram\");\n Collections.sort(ultimosPrimosEncontrados);\n for(Integer i : ultimosPrimosEncontrados)\n {\n System.out.print(i + \" \");\n }\n }", "public static void SJF(boolean verbose,ArrayList<Process> list, int numProcesses ) throws FileNotFoundException {\n\tSystem.out.println(\"Shortest Job First\");\n\tint randomNum=1;\n\tPriorityQueue<Process> priorityQ = new PriorityQueue<Process>(10, new The_Comparator()); \n \tSystem.out.print(\"The original output is: \" + numProcesses+ \" \");\n\n\tfor(int i=0;i<numProcesses;i++) {\n\t\tlist.get(i).processdetails();\n \t}\n\tSystem.out.println();\n\tCollections.sort(list);\n\tSystem.out.print(\"The sort output is: \" + numProcesses + \" \");\n\n\tfor(Process iterate: list) {\n\t\t\n\t\titerate.processdetails();\n\t}\n\tSystem.out.println();\n \n\t \n\t ArrayList<Process> terminated= new ArrayList<Process>();\n\t HashMap<Process, Integer> runinng = new HashMap<Process, Integer>();\n\n\t int cycleNum=0;\n\t int totalCPUTime=0;\n \n \n HashMap<Process, Integer> waitTime = new HashMap<Process, Integer>();\n \n HashMap<Process, Integer> finishTime = new HashMap<Process, Integer>();\n HashMap<Process, Integer> cycleReady = new HashMap<Process, Integer>();\n\n HashMap<Process, Integer> IOTime = new HashMap<Process, Integer>();\n CopyOnWriteArrayList<Process> blocked= new CopyOnWriteArrayList<Process>();\n\t \n\t Queue<Process> readyQ = new LinkedList<Process>(); \n\tArrayList<Process> ProcessesInCycle=new ArrayList<Process>();\n\tint AVGIO=0;\n\tArrayList<Integer> IOUtilization=new ArrayList<Integer>();\n\n\tQueue<Process> unstartedQ = new LinkedList<Process>(); \n\n\tint finishingTime=0;\n \n \n\t//Current running process\n\tProcess running=null;\n\tfor(int i=0; i<list.size();i++) {\n\t\t\n\t\t\tlist.get(i).currentState=\"unstarted\";\n\t\t\tunstartedQ.add(list.get(i));\n\t\t\n\t}\n\t\n\tif(verbose==true) {\n\t\tSystem.out.println(\"This detailed printout gives the state and remaining burst for each process\\n\");\n\t\tSystem.out.print(\"Before cycle \\t\" + cycleNum + \":\\t\");\n\t\tfor (int iterator=0; iterator<list.size();iterator++) {\n\t\t\t//System.out.println(\"Here 0000 \");\n\t\t\tlist.get(iterator).cycleStatus();\n\t\t\tSystem.out.print(\"\\t \");\n\t\t}\n\t\tSystem.out.print(\"\\n\");\n\t}\n\t\n\twhile (terminated.size()!=list.size()) {\n\t\tif(!ProcessesInCycle.isEmpty()) {\n \t\t\t\tfor(Process in: ProcessesInCycle) {\n\t\t\t\t\tin.setCycleTracker(in.getCycleTracker()+1);\n\t\t\t\t}\n\t\t\t\tArrayList<Process> resort = new ArrayList<Process>();\n\t\t\t\tif(!priorityQ.isEmpty()) {\n\t\t\t\tfor(Process in : priorityQ) {\n\t\t\t\t\tresort.add(in);\n\t\t\t\t\t\n\t\t\t}\n\t\t\t}\n\t\t\t\tpriorityQ.clear();\n\t\t\t\tfor(Process in: resort) {\n\t\t\t\t\tpriorityQ.add(in);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t \t\t\t\tProcess[] events = priorityQ.toArray(new Process[priorityQ.size()]);\n\t\t\t\tArrays.sort(events, priorityQ.comparator());\n\t\t\t\tfor (Process e : events) {\n\t\t\t\t// e.Cycle();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\n\t\tfor(Process iterator: unstartedQ) {\n\t\t\tif (iterator.A==cycleNum) {\n\t\t\tint in=\tlist.indexOf(iterator);\n\t\t\tlist.get(in).currentState=\"ready\";\n\t\t\t\n\t\t\titerator.setCycleTracker(0);\n\t\t\treadyQ.add(iterator);\n\t\t\titerator.setCurrentState(\"ready\");\n\t\t\titerator.setCycleTracker(0);\n\t\t\tProcessesInCycle.add(iterator);\n\t\t\tcycleReady.put(iterator, 0);\n\t\t\tpriorityQ.add(iterator);\n\t\t\twaitTime.put(iterator, 0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t \n\n\t\tcycleNum++;\n\t\tif(running==null ){\n\t\t \n\t\t\tint i=0;\n\t\t\t\n\t\t\t\n \t\t\trunning=priorityQ.poll();\n \t\t\t \n \t\t\tint minCycle= Collections.min(cycleReady.values());\n \t\t\t\n \t\t\treadyQ.remove(running);\n\t\t\tif(running!=null &&running.getRuntime()==0) {\n\t\t\tint randomBurst= randomOS(running.getB(), randomNum);\n\t\t\t randomNum++;\n\t\t\trunning.setburst(randomBurst);\n\t\t\trunning.setIOBurst(randomBurst);\n\t\t\t \n\t\tint x=0;\n\t\tfor(Process iterator: list) {\n\t\tif(iterator.getID()==running.getID()) {\n\t\t\titerator.setCurrentState(\"running\");\n\t\t\truninng.put(running,randomBurst);\n\t\t}\n\t}\n\t\t\t}\n\t\n\n\t\t}\n\t \n\t\tfor(Process iterator: readyQ) {\n\t\t\tint in= list.indexOf(iterator);\n\t\t\tlist.get(in).setWaitingTime(list.get(in).getWaitingTime()+1);\n\t\t}\n\t\t\n\t\tif(verbose==true) {\n\t\t\n\t\t\tSystem.out.print(\"Before cycle \\t\" + cycleNum + \":\\t\");\n\t\t\t\n\t\t\tfor(Process iterator: list) {\n\t\t\t\titerator.cycleStatus();\n\t\t\t\tSystem.out.print(\"\\t\");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\n\t\t\n\t\tif(running!=null) {\n\t\t\ttotalCPUTime++;\n\t\t\trunning.setC(running.getC()-1);\n\t\t\trunning.setburst(running.getBurst()-1);\n\t\t}\n\t\t\n\n\t\tif(!blocked.isEmpty()) {\n\t\t\tAVGIO++;\n\t\t\tArrayList<Process> ready= new ArrayList<Process>();\n\t\t\tfor(Process iterator: blocked) {\n \t\t\t\titerator.setIOBurst(iterator.getIOBurst()-1);\n\t\t\t\t\n \t\t\t\tIOTime.put(iterator, IOTime.get(iterator)+1);\n\t\t\t\tif(iterator.getIOBurst()<=0) {\n\t\t\t\t\tready.add(iterator);\n\t\t\t\n\t\t\t\t}}\n\t\t\t\n\t\t\tCollections.sort(ready);\n\t\t\tfor(Process in :ready ) {\n\t\t\t\tif(!ProcessesInCycle.contains(in)) {\n\t\t\t\tProcessesInCycle.add(in);\n\t\t\t\t}\n\t\t\t\t in.setCurrentState(\"ready\");\n\t\t\t\t\t\tblocked.remove(in);\n\t\t\t\t\t\treadyQ.add(in);\n\t\t\t\t\t\tif(!priorityQ.contains(in)) {\n\t\t\t\t\t\t\tpriorityQ.add(in);\n\t\t\t\t\t\t}\n\t\t\t\t\t\n \t\t\t\t\t\tfor(Process process: list) {\n\t\t\t\t\t\t\tif(process.getID()==in.getID()) {\n\t\t\t\t\t\t\t\tprocess.setCurrentState(\"ready\");\n\t\t\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\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t}\t\n\t\n\t\n\t\tif(running!=null && running.getC()!=0 && running.getBurst()<=0) {\n\t\n\t\t\tint val=0;\n\t\t\n\t\t\tfor(Process iterator: list) {\n\t\t\t\tif(iterator.getID()==running.getID()) {\n\t\t\t\t\titerator.setCurrentState(\"blocked\");\n\t\t\t\t\t\n\t\t\t\t\tif(IOTime.containsKey(iterator)) {\n \t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\tIOTime.put(iterator, 0);\n\t\t\t\t\t}\n\t\t\t\t\tval=runinng.get(iterator)*iterator.getM();\n\t\t\t\t\t\n\t\t\t\t\titerator.setIOBurst(val);\n \t\t\t\t}\n\t\t\t}\n\t\t\t\t\n \t\t\trunning.setIOBurst(val);\n\t\n\t\t\tblocked.add(running);\n\t\t\trunning=null;\n \t\t}\n\t\telse if(running!=null && running.getC()==0 ){\n\t\t\tfor(Process iterator: list) {\n\t\t\t\tif(iterator.getID()==running.getID()) {\n\t\t\t\t\titerator.setCurrentState(\"terminated\");\n\t\t\t\t\titerator.setburst(0);\n\t\t\t\t\tProcessesInCycle.remove(iterator);\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t}\n\t\t\tterminated.add(running);\n\t\t\tfinishTime.put(running, cycleNum);\n\t\t\trunning=null;\n\t\t\t\n\t} \n\t\tfinishingTime++;\n\t}\n\tArrayList<Integer> AVGturnaroundTime= new ArrayList<Integer>();\n\tArrayList<Integer> AVGWaitTIme= new ArrayList<Integer>();\n\n\tSystem.out.println(\"\\nThe scheduling algorithm used was Shortest Job First\\n\");\n\tint counter=0;\n\tfor(Process values: list) {\n \t\tSystem.out.println(\"Process \"+ counter + \": \");\n\t \tSystem.out.print(\"\\t(A, B, C, M) =\" +\" \" );\n\t \t values.processdetails();\n\t\tfor(Process proc: finishTime.keySet()) {\n\t\t\tif (proc.getID()==values.getID()) {\n\t\t\t\tSystem.out.println(\"\\n\\tFinishing Time: \" + finishTime.get(proc));\n\t\t\t\tSystem.out.println(\"\\tTurnaround Time: \"+ (finishTime.get(proc)- proc.getA()));\n\t\t\t\tAVGturnaroundTime.add( (finishTime.get(proc)- proc.getA()));\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tfor(Process proc: IOTime.keySet()) {\n\t\t\t//System.out.println(waitTime);\n\t\t\tif (proc.getID()==values.getID()) {\n\t\t\t\tSystem.out.println(\"\\tIO Time: \" + IOTime.get(proc));\n\t\t\t\tIOUtilization.add(IOTime.get(proc));\n\t\t\t}\n\t\t\n\t\t\n\t\t}\n\t\tSystem.out.println(\"\\tWaiting Time: \" +values.getWaitingTime());\n\t\tAVGWaitTIme.add(values.getWaitingTime());\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tcounter++;\n\t\t}\n\tint o=0;\n\tfor(Process l: list) {\n\t\to+=l.getCPUtime();\n\t\t \n\t}\n\tSystem.out.print(\"\\nSummary Data:\");\n\tSystem.out.println(\"\\n\\tFinishing Time: \" + finishingTime);\n \tSystem.out.println(\"\\tCPU Utilization: \" + ((double)totalCPUTime/(double)(cycleNum)));\n \tint IOU=0;\n\tdouble ioUtilization=0;\n\t\n\tfor(int i =0; i<IOUtilization.size();i++) {\n\t\tIOU+=IOUtilization.get(i);\n\t}\n\tioUtilization=(double)AVGIO/((double) cycleNum);\n\tSystem.out.println(\"\\tI/O Utilization:: \" + ioUtilization);\n\tSystem.out.println(\"\\tThroughput: \" + ((double)((double)100*list.size()/(double)(cycleNum))) + \" processes per hundred cycles\");\n\tint avg=0;\n\tdouble TAT1=0;\n\tfor(int i =0; i<AVGturnaroundTime.size();i++) {\n\t\tavg+=AVGturnaroundTime.get(i);\n\t}\n\tTAT1= (double)avg/(double)list.size();\n\t\n\tSystem.out.println(\"\\tAverage turnaround time: \" + TAT1);\n\tint avgWait=0;\n\tdouble AVGW=0;\n\tfor(int i =0; i<AVGWaitTIme.size();i++) {\n\t\tavgWait+=AVGWaitTIme.get(i);\n\t}\n\tAVGW=(double)avgWait/(double) list.size();\n\tSystem.out.println(\"\\tAverage Wait time: \" + AVGW);\n\t\n\t\n\t\n}", "public static void main(String[] args) {\n System.out.println(\"------Task 2A------\");\n System.out.println(a2(numbers, 0));\n System.out.println(\" \");\n\n //Task 2A version 2\n System.out.println(\"------Task 2A v2---\");\n a2v2(numbers);\n System.out.println(\" \");\n\n //Task 2B\n System.out.println(\"------Task 2B------\");\n b2v1(numbers);\n System.out.println(\" \");\n\n //Task 2C\n System.out.println(\"------Task 2C------\");\n c2v1(numbers);\n System.out.println(\" \");\n\n\n //Task 4.\n System.out.println(\"------Task 4-------\");\n PriorityQueue<Element> Scores = new PriorityQueue<>();\n add_Element(new Element(\"Terje\", 5));\n add_Element(new Element(\"Kari\", 7));\n add_Element(new Element(\"Nils\", 4));\n add_Element(new Element(\"Otto\", 8));\n add_Element(new Element(\"Syvert\", 7));\n add_Element(new Element(\"Lise\", 11));\n add_Element(new Element(\"Notto\", 0));\n add_Element(new Element(\"Odd\", 1));\n add_Element(new Element(\"Even\", 2));\n\n Element highest = get_highest_priority_element();\n System.out.println(\"Highest priority in queue: \" + highest.getName() + \" \" + highest.getPriority() + \"\\n\");\n\n print_all_elements_in_order();\n }", "public void print() {\r\n\t\tSystem.out.print(\"|\");\r\n\t\t//loop executes until all elements of the list are printed\r\n\t\tfor (int i=0;i<capacity;i++) {\r\n\t\t\tSystem.out.print(list[i]+\" |\");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public void print() {\n\t\tint i = 1;\n\t\tfor (String s: g.keySet()) {\n\t\t\tSystem.out.print(\"Element: \" + i++ + \" \" + s + \" --> \");\n\t\t\tfor (String k: g.get(s)) {\n\t\t\t\tSystem.out.print(k + \" ### \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void main(String[] args) {\n// MemoryLayoutTest obj = new MemoryLayoutTest();\n HashMap<MemoryLayoutTest, String> map = new HashMap<>();\n List<MemoryLayoutTest> list = new ArrayList<>();\n for (int i = 0; i < 16; i++) {\n MemoryLayoutTest o = new MemoryLayoutTest();\n o.print();\n map.put(o, String.valueOf(i));\n list.add(o);\n }\n System.out.println(\"after\");\n for (MemoryLayoutTest o : list) {\n System.out.println(\"identityHash: \" + Integer.toHexString(System.identityHashCode(o)));\n o.print();\n }\n// obj.printSync();\n// int x = 0;\n// int y = 1;\n// int z = x + y;\n// obj.print();\n// obj.printHash();\n// obj.fun();\n// obj.print();\n// obj.printSync();\n// try {\n// Thread.sleep(2000);\n// } catch (InterruptedException e) {\n// e.printStackTrace();\n// }\n// new Thread() {\n// @Override\n// public void run() {\n// System.out.println(\"Thread \" + Thread.currentThread().getName());\n// obj.printSync();\n// }\n// }.start();\n// try {\n// Thread.sleep(2000);\n// } catch (InterruptedException e) {\n// e.printStackTrace();\n// }\n// System.out.println(\"Thread \" + Thread.currentThread().getName());\n// obj.printSync();\n// new Thread() {\n// @Override\n// public void run() {\n// System.out.println(\"Thread \" + Thread.currentThread().getName());\n// obj.printSync();\n// }\n// }.start();\n// try {\n// Thread.sleep(2000);\n// } catch (InterruptedException e) {\n// e.printStackTrace();\n// }\n// for (int i = 0; i < 4; i++) {\n// new Thread() {\n// @Override\n// public void run() {\n// System.out.println(\"Thread \" + Thread.currentThread().getName());\n// obj.printSync();\n// }\n// }.start();\n// }\n }", "public void testExecuteInParallel_Collection_ThreadPoolExecutor() throws Exception\n {\n System.out.println( \"executeInParallel\" );\n Collection<Callable<Double>> tasks = createTasks( 10 );\n Collection<Double> result = ParallelUtil.executeInParallel( tasks, ParallelUtil.createThreadPool( 1 ) );\n assertEquals( result.size(), tasks.size() );\n }", "public static void printResults() {\n resultMap.entrySet().stream().forEach((Map.Entry<File, String> entry) -> {\n System.out.println(String.format(\"%s processed by thread: %s\", entry.getKey(), entry.getValue()));\n });\n System.out.println(String.format(\"processed %d entries\", resultMap.size()));\n }", "private static void print(Collection<String> data) {\r\n\r\n\t\tdata.stream().forEach(s -> out.println(s));\r\n\t}", "public static void main(String[] args) {\n Integer[] s = {39, 20, 40, 1, 2, 3, 4, 5, 6, 7};\n Stopwatch timer = new Stopwatch();\n\n sort(s);\n\n double time = timer.elapsedTime();\n assert isSorted(s);\n StdOut.print(\"time: \" + time);\n StdOut.println();\n show(s);\n }", "public void printStats() {\n\t\tSystem.out.println(\"QuickSort terminates!\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Duration: \" + getDuration() + \" seconds\");\n\t\tSystem.out.println(\"Comparisons: \" + this.comparisonCounter);\n\t\tSystem.out.println(\"Boundary: \" + this.b);\n\t}", "public ArrayList<Process> generateProcesses() {\n int letterCounter = 65;\n int firstNumber = 1;\n float arrivalTime;\n float expectedTime;\n int priority;\n \n\n generator = new Random(RandomSeed); //paramater is seed used for random number generator\n\n for (int i = 0; i < numProcesses; i++) {\n String name = \"\";\n //create random number for arrival time\n arrivalTime = (float) (generator.nextDouble() * 99.0);\n //create random number for expected run time\n expectedTime = (float) (generator.nextDouble() * 9.9 + 0.1);\n //create random number for priority\n priority = generator.nextInt(4) + 1;\n //create new Process object and pass in these four\n\n if (letterCounter < 91) {\n name += firstNumber + \"-\" + (char) (letterCounter);\n letterCounter++;\n } else {\n letterCounter = 65;\n firstNumber++;\n name += firstNumber + \"-\" + (char) (letterCounter);\n letterCounter++;\n }\n \n\n newProcess = new Process(arrivalTime, expectedTime, priority, name);\n //put the Process object in array processArray using i as index\n processArrayList.add(newProcess);\n\n //System.out.print(newProcess.toString());\n /*System.out.println(processArrayList.get(i).getArrivalTime()\n + \" \" + processArrayList.get(i).getExpectedTime()\n + \" \" + processArrayList.get(i).getPriority());\n */\n }\n //System.out.println(\"\\n \");\n\n unsortedArrayList = new ArrayList<>();\n unsortedArrayList = (ArrayList<Process>)processArrayList.clone();\n \n Collections.sort(processArrayList, new Comparator<Process>() {\n @Override\n public int compare(Process process1, Process process2) {\n if (process1.getArrivalTime() < process2.getArrivalTime()) {\n return -1;\n }\n if (process1.getArrivalTime() > process2.getArrivalTime()) {\n return +1;\n }\n return 0;\n }\n });\n\n /* for(int i = 0; i < numProcesses; i++){\n \n System.out.println(\"arrival time: \" + processArrayList.get(i).getArrivalTime()\n + \" \" + processArrayList.get(i).getExpectedTime()\n + \" \" + processArrayList.get(i).getPriority());\n }*/\n return processArrayList;\n }", "public static void main(String[] args) {\n printUnique();\n }", "public static void main(String[] args)\n\t{\n\t\t// data added with the same priority value as already-preasent data, have less\n\t\t// priority than objects with the same priority value that were there before\n\t\t// being added.\n\t\tSystem.out.println(\"Data given all have equal priority so data\\nis ordered by the order it is provided in:\");\n\t\tPriorityQueue<String> q = new PriorityQueue<String>();\n\t\tq.add(\"highest\", 8);\n\t\tq.add(\"second highest\", 8);\n\t\tq.add(\"third highest\", 8);\n\t\tq.add(\"fourth highest\", 8);\n\t\tq.add(\"fifth highest\", 8);\n\t\tq.add(\"least\", 8);\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\n\t\t// sorting data provided in ascending order\n\t\tSystem.out.println(\"-------------\\nData given in ascending priority order:\");\n\t\tPriorityQueue<String> r = new PriorityQueue<String>();\n\t\tr.add(\"one\", 1);\n\t\tr.add(\"two\", 2);\n\t\tr.add(\"three\", 3);\n\t\tr.add(\"four\", 4);\n\t\tr.add(\"five\", 5);\n\t\tr.add(\"six\", 6);\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\n\t\t// sorting data provided in descending order\n\t\tSystem.out.println(\"-------------\\nData given in descending priority order:\");\n\t\tPriorityQueue<String> s = new PriorityQueue<String>();\n\t\ts.add(\"six\", 6);\n\t\ts.add(\"five\", 5);\n\t\ts.add(\"four\", 4);\n\t\ts.add(\"three\", 3);\n\t\ts.add(\"two\", 2);\n\t\ts.add(\"one\", 1);\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\n\t\t// sorting data provided in a mixed order\n\t\tSystem.out.println(\"-------------\\nData given in a mixed priority order:\");\n\t\tPriorityQueue<String> t = new PriorityQueue<String>();\n\t\tt.add(\"four\", 4);\n\t\tt.add(\"six\", 6);\n\t\tt.add(\"two\", 2);\n\t\tt.add(\"three\", 3);\n\t\tt.add(\"one\", 1);\n\t\tt.add(\"five\", 5);\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\n\t\t// sorting data provided in a mixed priority order including some repitition and\n\t\t// negative values\n\t\tSystem.out.println(\n\t\t\t\t\"-------------\\nData given in a mixed priority order\\nincluding repitition and negative priority:\");\n\t\tPriorityQueue<String> u = new PriorityQueue<String>();\n\t\tu.add(\"-two\", -2);\n\t\tu.add(\"two\", 2);\n\t\tu.add(\"zero\", 0);\n\t\tu.add(\"one\", 1);\n\t\tu.add(\"zero again\", 0);\n\t\tu.add(\"-one\", -1);\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\n\t\t// sorting data provided in a mixed priority order and is of type Double this\n\t\t// time\n\t\tSystem.out.println(\n\t\t\t\t\"-------------\\nData given in a mixed priority order\\nbut using double as the objects this time:\");\n\t\tPriorityQueue<Double> v = new PriorityQueue<Double>();\n\t\tv.add(.002, 2);\n\t\tv.add(.006, 6);\n\t\tv.add(.005, 5);\n\t\tv.add(.001, 1);\n\t\tv.add(.004, 4);\n\t\tv.add(.003, 3);\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t}", "public static void main(String[] args) {\n Collection values = new ArrayList();\n values.add(5);\n values.add(6);\n\n for (Object valu : values) {\n System.out.println(valu);\n }\n\n }", "public static void main(String[] args) {\n RandomizedQueue<String> rq = new RandomizedQueue<String>();\n rq.enqueue(\"a\");\n rq.enqueue(\"b\");\n rq.enqueue(\"c\");\n Iterator<String> i1 = rq.iterator();\n Iterator<String> i2 = rq.iterator();\n while(i1.hasNext()) {\n System.out.print(i1.next() + \",\");\n }\n System.out.println();\n rq.dequeue();\n while(i2.hasNext()) {\n System.out.print(i2.next() + \",\");\n }\n System.out.println();\n }", "public static void main(String[] args) {\n\t\t\n\t\tPriorityQueue<String> priorityQueue = new PriorityQueue<>();\n\t\t\n\t\tpriorityQueue.add(\"Kiwi\");\n\t\tpriorityQueue.add(\"Mango\");\n\t\tpriorityQueue.add(\"Pineapple\");\n\t\tpriorityQueue.add(\"Orange\");\n\t\tpriorityQueue.add(\"Apple\");\n\t\tpriorityQueue.add(\"Banana\");\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(priorityQueue);\n\t\t\n\t\tSystem.out.println(priorityQueue.remove());\n\t\tSystem.out.println(priorityQueue.remove());\n\t\tSystem.out.println(priorityQueue.remove());\n\t\tSystem.out.println(priorityQueue.remove());\n\t\tSystem.out.println(priorityQueue.remove());\n\t\tSystem.out.println(priorityQueue.remove());\n\n\t}", "public SetTest()\r\n\t{\r\n\t\tList< String > list = Arrays.asList( colors );\r\n\t\tSystem.out.printf( \"ArrayList: %s\\n\", list );\r\n\t\tprintNonDuplicates( list );\r\n\t\tprintSortedNonDuplicates(list);\r\n\t\t}", "public static void execAndPrint() {\n\t\tArrays.parallelSetAll(Main.arrays, value -> ThreadLocalRandom.current().nextInt(1000000));\n\t\tRunnable task = null;\n\t\tStopWatch watch = new StopWatch();\n\n\t\tfor (int i = 0; i < TaskFactory.values().length; i++) {\n\t\t\ttask = TaskFactory.values()[i].getTask();\n\n\t\t\tSystem.out.println(\"Starting Task: \" + task.toString());\n\n\t\t\twatch.start();\n\t\t\ttask.run();\n\t\t\twatch.stop();\n\n\t\t\tSystem.out.printf(\"Elapsed time is %.5f sec\\n\\n\", watch.getElapsed());\n\n\t\t\twatch.reset();\n\t\t}\n\n\n\t}", "ProcessRunner print();", "public void printRoutine()\n\t{\n\t\tfor (String name: vertices.keySet())\n\t\t{\n\t\t\tString value = vertices.get(name).toString();\n\t\t\tSystem.out.println(value);\n\t\t}\n\t}", "public static void main(String[] args) {\n FirstComeFirstServed FCFS = new FirstComeFirstServed();\n\n ShortestJobFirst SJF = new ShortestJobFirst();\n ShortestRemainingTime SRT = new ShortestRemainingTime();\n RoundRobin RR = new RoundRobin();\n NonpreemptiveHighestPriorityFirst NP_HPF = new NonpreemptiveHighestPriorityFirst();\n PreemptiveHighestPriorityFirst P_HPF = new PreemptiveHighestPriorityFirst();\n NonpreemptiveHighestPriorityFirstAging NP_HPF_AG = new NonpreemptiveHighestPriorityFirstAging();\n PreemptiveHighestPriorityFirstAging P_HPF_AG = new PreemptiveHighestPriorityFirstAging();\n\n\n PriorityQueue<Process>[] priorityQueues = new PriorityQueue[COUNT_ALGORITHM + 1];\n int [] SEEDS = new int[]{1234, 117777,33317,17111, 19191};\n\n for (int j = 0; j < ROUND; j++) {\n System.out.format(\"\\n### Start Running Round %d ###\\n\", j);\n // write your code here\n priorityQueues[0] = ProcessGenerator.generateJobs (SEEDS[j], 20);\n\n // make a copy for each algorithm\n for (int i = 1; i < COUNT_ALGORITHM + 1; i++) {\n priorityQueues[i] = new PriorityQueue<Process>(priorityQueues[0]);\n }\n\n // print the process list in ascending order\n while (!priorityQueues[COUNT_ALGORITHM].isEmpty()) {\n System.out.println(priorityQueues[COUNT_ALGORITHM].poll());\n }\n\n\n // Add different scheduling algorithms here\n System.out.println(\"\\nFisrt come first servered\");\n FCFS.schedule(priorityQueues[0]);\n\n System.out.println(\"\\nShortest Job First\");\n SJF.schedule(priorityQueues[1]);\n\n System.out.println(\"\\nShortest remaining time\");\n SRT.schedule(priorityQueues[2]);\n System.out.println(\"\\nRoundRobin\");\n RR.schedule(priorityQueues[4]);\n\n System.out.println(\"\\nNonpreemptive Highest Priority First\");\n NP_HPF.schedule(priorityQueues[5]);\n\n System.out.println(\"\\nNonpreemptive Highest Priority First (Aging)\");\n NP_HPF_AG.schedule(priorityQueues[6]);\n\n System.out.println(\"\\nPreemptive Highest Priority First\");\n P_HPF.schedule(priorityQueues[7]);\n\n System.out.println(\"\\nPreemptive Highest Priority First (Aging)\");\n P_HPF_AG.schedule(priorityQueues[8]);\n\n\n }\n\n\n System.out.println(\"\\n\");\n System.out.format(\"==================== 5 Round Average Statistics ====================\\n\");\n System.out.format(\"%10s %20s %20s %20s\\n\", \"Algorithm\", \"Turnaround\", \"Waiting\", \"Response\");\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"FCFS\",\n FCFS.getStats().getAvgTurnaroundTime(),\n FCFS.getStats().getAvgWaitingTime(),\n FCFS.getStats().getAvgResponseTime());\n\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"SJF\",\n SJF.getStats().getAvgTurnaroundTime(),\n SJF.getStats().getAvgWaitingTime(),\n SJF.getStats().getAvgResponseTime());\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"SRT\",\n SRT.getStats().getAvgTurnaroundTime(),\n SRT.getStats().getAvgWaitingTime(),\n SRT.getStats().getAvgResponseTime());\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"RR\",\n RR.getStats().getAvgTurnaroundTime(),\n RR.getStats().getAvgWaitingTime(),\n RR.getStats().getAvgResponseTime());\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"SJF\",\n SJF.getStats().getAvgTurnaroundTime(),\n SJF.getStats().getAvgWaitingTime(),\n SJF.getStats().getAvgResponseTime());\n\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"NP_HPF\",\n NP_HPF.getStats().getAvgTurnaroundTime(),\n NP_HPF.getStats().getAvgWaitingTime(),\n NP_HPF.getStats().getAvgResponseTime());\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"P_HPF\",\n P_HPF.getStats().getAvgTurnaroundTime(),\n P_HPF.getStats().getAvgWaitingTime(),\n P_HPF.getStats().getAvgResponseTime());\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"NP_HPF_AG\",\n NP_HPF_AG.getStats().getAvgTurnaroundTime(),\n NP_HPF_AG.getStats().getAvgWaitingTime(),\n NP_HPF_AG.getStats().getAvgResponseTime());\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"P_HPF_AG\",\n P_HPF_AG.getStats().getAvgTurnaroundTime(),\n P_HPF_AG.getStats().getAvgWaitingTime(),\n P_HPF_AG.getStats().getAvgResponseTime());\n\n }", "public static void main(String[] args) {\n\r\n TreeSet<point> ts1 = new TreeSet<>();\r\n ts1.add(new point(1,1));\r\n ts1.add(new point(5, 5));\r\n ts1.add(new point(5, 2));\r\n\r\n System.out.println(ts1);\r\n }", "public static void main(String[] args) throws InterruptedException {\n\t\tBlockingObjectPool blockingObjectPool = new BlockingObjectPool(5);\n\n\t\t// Producer thread\n\t\tnew Thread(() -> {\n\t\t\tint i = 0;\n\t\t\ttry {\n\t\t\t\twhile (true) {\n\t\t\t\t\tObject obj = new Object();\n\t\t\t\t\tblockingObjectPool.take(obj);\n\t\t\t\t\tSystem.out.println(\"Added :\" + obj);\n\t\t\t\t\tSystem.out.println(\"pool size :\" + blockingObjectPool.size());\n\t\t\t\t\t// System.out.println(\"Added : \" + i);\n\n\t\t\t\t\tThread.sleep(TimeUnit.SECONDS.toMillis(1));\n\t\t\t\t}\n\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}).start();\n\n\t\t// Consumer thread\n\t\tnew Thread(() -> {\n\t\t\ttry {\n\t\t\t\twhile (true) {\n\t\t\t\t\tObject poll = blockingObjectPool.get();\n\t\t\t\t\tSystem.out.println(\"Polled :\" + poll);\n\t\t\t\t\tSystem.out.println(\"pool size :\" + blockingObjectPool.size());\n\n\t\t\t\t\tThread.sleep(TimeUnit.SECONDS.toMillis(2));\n\t\t\t\t}\n\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}).start();\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tArrayList veg = new ArrayList();\n\t\tveg.add(\"Patato\");\n\t\tveg.add(\"Tomato\");\n\t\tveg.add(\"Cabbige\");\n\t\tSystem.out.println(veg);\n\t\t\n\t\tArrayList<Integer> prise = new ArrayList();\n\t\tprise.add(20);\n\t\tprise.add(30);\n\t\tprise.add(40);\n\t\tSystem.out.println(\tprise);\n\t\tveg.addAll(\tprise);\n\t\tveg.set(2,\"carrot\");\n//\t\tSystem.out.println(veg.get(3));\n//\t\tveg.remove(2);\n//\t\tSystem.out.println(veg);\n//\t\t\t\t\n\t\t\n\t\tSystem.out.println(veg);\n\t\tSystem.out.println();\n\t\tSystem.out.println(veg.toArray());\n\t\t\n\t\tPair< String, Integer, Double > p1 =new Pair(\"sunil\", 409,45.334343);\n\t\tp1.getdescription();\n\t\t\n\t\tPair<Boolean, Double, String> p2 = new Pair(false, 34.534,\"Sunil\");\n\t\tp2.getdescription();\n\t}", "@Override\r\n public void run() {\r\n \r\n while (listsOfSorted.size() > 1) {\r\n \r\n int[] list1 = listsOfSorted.poll();\r\n int[] list2 = listsOfSorted.poll();\r\n int[] newSortedList = new int[list1.length + list2.length];\r\n\r\n int current1 = 0;\r\n int current2 = 0;\r\n int current3 = 0;\r\n\r\n while (current1 < list1.length && current2 < list2.length) {\r\n if (list1[current1] < list2[current2]) {\r\n newSortedList[current3++] = list1[current1++];\r\n } else {\r\n newSortedList[current3++] = list2[current2++];\r\n }\r\n }\r\n\r\n while (current1 < list1.length) {\r\n newSortedList[current3++] = list1[current1++];\r\n }\r\n\r\n while (current2 < list2.length) {\r\n newSortedList[current3++] = list2[current2++];\r\n \r\n }\r\n \r\n listsOfSorted.offer(newSortedList);\r\n \r\n }\r\n System.out.println(Arrays.toString(listsOfSorted.peek()));\r\n \r\n }", "public static void main(String[] args) {\n\t\tQueue<Integer> integerPriorityQueue = new PriorityQueue<>(7);\r\n\t\tRandom rand = new Random();\r\n\t\tfor (int i = 0; i < 7; i++) {\r\n\t\t\tintegerPriorityQueue.add(new Integer(rand.nextInt(100)));\r\n\t\t}\r\n\t\tfor (int i = 0; i < 7; i++) {\r\n\t\t\tInteger in = integerPriorityQueue.poll();\r\n\t\t\tSystem.out.println(\"Processing Integer:\" + in);\r\n\t\t}\r\n\r\n\t\t// PriorityQueue example with Comparator\r\n\t\tQueue<Customer> customerPriorityQueue = new PriorityQueue<>(7, idComparator);\r\n\t\taddDataToQueue(customerPriorityQueue);\r\n\r\n\t\tpollDataFromQueue(customerPriorityQueue);\r\n\r\n\t}", "private void setupCollector() {\n outList = new ArrayList<>();\n }", "static void print(Collection c) {\n\t\tSystem.out.print(\"{\");\n\t\tfor(Iterator iterator=c.iterator();iterator.hasNext();) {\n\t\t\tSystem.out.printf(\"\\\"%s\\\"\", iterator.next());\n\t\t\tSystem.out.print(iterator.hasNext()?\", \":\"}\\n\");\n\t\t}\n\t}", "public static void main(String[] args) {\n ArrayList<Integer> items = new ArrayList<>();\n items.add(1);\n items.add(2);\n items.add(3);\n items.add(4);\n items.add(5);\n items.add(6);\n items.add(7);\n items.add(8);\n\n\n printArray(items);\n }", "public static void main(String[] args) {\n\n\t\tint ar[] = { 2, 3, 1, 4, 6, 7, 5, 8, 9 };\n\t\tint k = 2;\n\n\t\tList<Integer> list = new ArrayList<>();\n\n\t\tPriorityQueue<Integer> q = new PriorityQueue<>();\n\t\tfor (int x : ar) {\n\t\t\tq.add(x);\n\t\t\tif (q.size() > k) {\n\t\t\t\tlist.add(q.remove());\n\t\t\t}\n\t\t}\n\n\t\twhile (q.size() > 0) {\n\t\t\tlist.add(q.remove());\n\t\t}\n\n\t\tSystem.out.println(list);\n\n\t}", "public void printMiniMap() { }", "private void dumpProcesses()\n{\n System.err.println(\"\\n\\nDumping Processes\");\n for (DpinProcess dp : process_set.values()) {\n dp.dump();\n }\n}", "public void printPieces()\n {\n\tint last = 1;\n\tfor(int i=0;i<unused.length;i++)\n\t {\n\t\tif(unused[i]!=null)\n\t\t {\n\t\t\tSystem.out.println(last + \". \" + unused[i]);\n\t\t\tlast++;\n\t\t }\n\t }\n }", "public static void main(String[] args) {\n Queue<Integer> q = new LinkedList<Integer>();\n q.add(10);\n q.add(5);\n q.add(15);\n System.out.println(q.peek());\n System.out.println(q.poll());\n System.out.println(q.peek());\n System.out.println(q.size());\n }", "public void dumpBag() {\n while (tileBag.size() > 0) {\n System.out.print(tileBag.remove(0) + \" - \");\n }\n }", "@Override\n\tpublic void collectionProcessComplete(ProcessTrace aTrace)\n\t\t\tthrows ResourceProcessException, IOException {\n\t\tSystem.out.println(\"Average precision \" + totalScore / documentCount);\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"\\tSelection\\tBubble\\tInsertion\\tCollections\\tQuick\\tinPlaceQuick\\tMerge\");\r\n\t\tfor (int n = 1000; n <= 7000; n += 500) {\r\n\t\t\tAPArrayList<Double> lists = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listb = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listi = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listc = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listipq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listm = new APArrayList<Double>();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\t\tDouble val = Math.random();\r\n\t\t\t\tlists.add(val);\r\n\t\t\t\tlistb.add(val);\r\n\t\t\t\tlisti.add(val);\r\n\t\t\t\tlistc.add(val);\r\n\t\t\t\tlistq.add(val);\r\n\t\t\t\tlistipq.add(val);\r\n\t\t\t\tlistm.add(val);\r\n\t\t\t}\r\n\r\n\t\t\tlong selStartTime = System.nanoTime();\r\n\t\t\tlists.selectionSort();\r\n\t\t\tlong selEndTime = System.nanoTime();\r\n\t\t\tlong selSortTime = selEndTime - selStartTime;\r\n\t\t\tlists.clear();\r\n\t\t\t\r\n\t\t\tlong bubStartTime = System.nanoTime();\r\n\t\t\tlistb.bubbleSort();\r\n\t\t\tlong bubEndTime = System.nanoTime();\r\n\t\t\tlong bubSortTime = bubEndTime - bubStartTime;\r\n\t\t\tlistb.clear();\r\n\t\t\t\r\n\t\t\tlong insStartTime = System.nanoTime();\r\n\t\t\tlisti.insertionSort();\r\n\t\t\tlong insEndTime = System.nanoTime();\r\n\t\t\tlong insSortTime = insEndTime - insStartTime;\r\n\t\t\tlisti.clear();\r\n\t\t\t\r\n\t\t\tlong CollStartTime = System.nanoTime();\r\n\t\t\tlistc.sort();\r\n\t\t\tlong CollEndTime = System.nanoTime();\r\n\t\t\tlong CollSortTime = CollEndTime - CollStartTime;\r\n\t\t\tlistc.clear();\r\n\t\t\t\r\n\t\t\tlong quickStartTime = System.nanoTime();\r\n\t\t\tlistq.simpleQuickSort();\r\n\t\t\tlong quickEndTime = System.nanoTime();\r\n\t\t\tlong quickSortTime = quickEndTime - quickStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\tlong inPlaceQuickStartTime = System.nanoTime();\r\n\t\t\tlistipq.inPlaceQuickSort();\r\n\t\t\tlong inPlaceQuickEndTime = System.nanoTime();\r\n\t\t\tlong inPlaceQuickSortTime = inPlaceQuickEndTime - inPlaceQuickStartTime;\r\n\t\t\tlistipq.clear();\r\n\t\t\t\r\n\t\t\tlong mergeStartTime = System.nanoTime();\r\n\t\t\tlistm.mergeSort();\r\n\t\t\tlong mergeEndTime = System.nanoTime();\r\n\t\t\tlong mergeSortTime = mergeEndTime - mergeStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(n + \"\\t\" + selSortTime + \"\\t\" + bubSortTime + \"\\t\" + insSortTime + \"\\t\" + CollSortTime + \"\\t\" + quickSortTime + \"\\t\" + inPlaceQuickSortTime + \"\\t\" + mergeSortTime);\r\n\t\t}\r\n\t}", "private static void paixu(ArrayList<Integer> p1, Map<Integer, String> map) {\n\t\tCollections.sort(p1);\n\t\tfor (Integer integer : p1) {\n\t\t\tint key = integer;\n\t\t\tString card = map.get(key);\n\t\t\tSystem.out.print(card + \" \");\n\t\t\t\n\t\t}\n\t\tSystem.out.println();\n\t\t//map.\n\t}", "public static void main(String[] args) {\n\t\tCollection<String> collection = new Vector<String>();\n\t\tcollection.add(\"Collection\");\n\t\tcollection.add(\"List\");\n\t\tcollection.add(\"Queue\");\n\t\tcollection.add(\"Set\");\n\t\tcollection.add(\"Map\");\n\n\t\t// size Collection\n\t\tSystem.out.println(\"Size: \" + collection.size());\n\n\t\t// use Iterator\n\t\tIterator<String> iterator = collection.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\t// check Iterator has element?\n\t\t\tString s = iterator.next();\n\t\t\tSystem.out.println(\"Element: \" + s);\n\t\t}\n\t}", "public void print(){\n System.out.print(\"Current Queue: \");\n for (int i = 1; l <= myHeap.getLength(); i++){\n \tSystem.out.printf(\"%s\", myHeap.getArray()[i]);\n \tif (i < myHeap.getLength()){\n \t\tSystem.out.print(\",\");\n \t}\n }\n\n System.out.println();\n }", "public static void main(String[] args) {\n try {\n System.out.println(\"print\");\n Thread.sleep(1000);\n System.out.println(\"out\");\n Thread.sleep(1000);\n System.out.println(\"an array\");\n }catch(InterruptedException e)\n {\n System.out.println(e.getMessage());\n }\n int [] arr = {3,0,1,4,1,5,9,2,6};\n sort(arr);\n System.out.println(\"arr = \" + Arrays.toString(arr));\n }", "public void triCollection(){\r\n Collections.sort(collection);\r\n }", "public static void main(String[] args) {\r\n\t\r\n\t\tVector v = new Vector();\r\n\t\tfor (int i = 0; i <= 10; i++) {\r\n\t\t\tv.addElement(i);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(v); \r\n\t\t//System.out.println(v.elements()); \r\n\t\tEnumeration e = v.elements();\r\n\t\t\r\n\t\t//EXPECTED: should also print the even numbers 1 by 1 on new line\r\n\t\twhile (e.hasMoreElements()) {\r\n\t\t\tInteger I = (Integer)e.nextElement();\r\n\t\t\tif (I % 2 == 0) {\r\n\t\t\t\tSystem.out.println(I);\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(I + \" will be removed\");\r\n\t\t\t\tv.remove(I);\r\n\t\t\t\tSystem.out.println(v);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "private void showFinalResults(){\r\n\r\n System.out.println(\"Player\\t\\t:\\t\\tPoints\");\r\n for(Player player : this.sortedPlayers){\r\n System.out.println(player.toString());\r\n }\r\n System.out.println();\r\n }", "public static void main( String[] args )\n {\n OrderedSet set = new OrderedSet( true );\n set.add( new Integer( 6 ) );\n set.add( new Integer( 1 ) );\n set.add( new Integer( 4 ) );\n set.add( new Integer( 1 ) );\n System.out.println( set );\n System.out.println();\n\n System.out.println( \"Enumerate the OrderedSet\" );\n Enumeration e = set.elements();\n while ( e.hasMoreElements() )\n System.out.println( e.nextElement() );\n System.out.println();\n\n System.out.println( \"Iterate through the OrderedSet\" );\n for ( OrderedSetIterator i = set.begin(); !i.atEnd(); i.advance() )\n System.out.println( i.get() );\n System.out.println();\n\n System.out.println( \"Show that duplicates can be added.\" );\n set.add( new Integer( 8 ) );\n System.out.println( \"set = \" + set );\n\n set.add( new Integer( 4 ) );\n System.out.println( \"set = \" + set );\n }", "public static void main(String[] args) {\n /* *************** */\n /* * QUESTION 7 * */\n /* *************** */\n /* *************** */\n\n for(double p=0; p<1; p+=0.1){\n for(double q=0; q<1; q+=0.1){\n int res_1 = 0;\n int res_2 = 0;\n for(int i=0; i<100; i++){\n Graph graph_1 = new Graph();\n graph_1.generate_full_symmetric(p, q, 100);\n //graph_2.setVertices(new ArrayList<>(graph_1.getVertices()));\n Graph graph_2 = (Graph) deepCopy(graph_1);\n res_1+=graph_1.resolve_heuristic_v1().size();\n res_2+=graph_2.resolve_heuristic_v2();\n }\n res_1/=100;\n System.out.format(\"V1 - f( %.1f ; %.1f) = %s \\n\", p, q, res_1);\n res_2/=100;\n System.out.format(\"V2 - f( %.1f ; %.1f) = %s \\n\", p, q, res_2);\n }\n }\n\n }", "public static void main(String args[])\r\n\t {\n\t\t PriorityQueue<String> pq = new PriorityQueue<String>();\r\n\r\n // Adding items to the pq using add()\r\n\t\t pq.add(\"Peach\");\r\n\t\t pq.add(\"Cyan\");\r\n\t\t pq.add(\"Crimson\");\r\n\t\t \r\n\t\t System.out.println(\"Priority Queue: \"+pq);\r\n\t }", "public void testCompareTimes_Collection()\n {\n System.out.println( \"compareTimes\" );\n Collection<Callable<Double>> tasks = createTasks( 10 );\n NamedValue<Double> value = ParallelUtil.compareTimes( tasks );\n System.out.println( \"Value: \" + value + \", \" + value.getValue() );\n }", "public static void main(String[] args) throws Exception{\n\t\tCollection<Integer> values = new ArrayList<>();\r\n\t\tvalues.add(3);\r\n\t\tvalues.add(77);\r\n\t\tvalues.add(5);\r\n\t\t//to fetch the values we have tow ways 1. Iterator 2.enhacned for loop\r\n\t\t/*Iterator i = values.iterator();\r\n\t\twhile(i.hasNext()){\r\n\t\t\tSystem.out.println(i.next());\r\n\t\t}\r\n\t\t*/\r\n\t\t//or for each\r\n\t\tvalues.forEach(i->System.out.println(i));\r\n\r\n\r\n\r\n\r\n\t}", "public void print() {\r\n for (int i : heap) {\r\n System.out.print(i + \" \");\r\n }\r\n System.out.println();\r\n }", "public void sort() {\n\t\tSystem.out.println(\"Quick Sort Algorithm invoked\");\n\n\t}", "public void collection() {\n\t\tif(showCollection) {\n\t\t\tclear_console();\n\t\t\tfor(int i = 1;i<crystalQuantity.length;i++) {\n\t\t\t\tif(crystalQuantity[i]>0) {\n\t\t\t\t\tSystem.out.println(\"T\" + i + \": \" + crystalQuantity[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n List<Integer> list = IntStream.rangeClosed(1, 1000).boxed().collect(Collectors.toList());\n Logger.getLogger(\"org.apache\").setLevel(Level.WARN);\n SparkConf conf = new SparkConf().setAppName(\"printing03\").setMaster(\"local[*]\");\n JavaSparkContext sc = new JavaSparkContext(conf);\n JavaRDD<Integer> rddList = sc.parallelize(list);\n JavaRDD<Double> sqrtRdd = rddList.map(i -> Math.sqrt(i));\n //sqrtRdd.foreach(System.out::println); /*java.io.NotSerializableException: java.io.PrintStream println is non serializble*/\n\n //solution -> collect all to single core and print using streams\n sqrtRdd.collect().forEach(System.out::println);\n sc.close();\n }", "public void printVertices() {\r\n\t\tfor (int i = 0; i < vertices.size(); i++)\r\n\t\t\tSystem.out.print(vertices.get(i).label);\r\n\t}", "public static void main(String[] args) {\n\t\tint[] nums = {1,2,3};\n\t\tnew NextPermutation().nextPermutation(nums);\n\t\tint[] nums1 = {3,2,1};\n\t\tnew NextPermutation().nextPermutation(nums1);\n\t\tint[] nums2 = {1,3,2};\n\t\t//Arrays.sort(nums2, 1, nums.length);\n\t\t//for(int i=0;i<nums2.length;i++)System.out.println(nums2[i]);\n\t\tnew NextPermutation().nextPermutation(nums2);\n\n\t}", "public static void main(String[] args) {\n\n\t\tList<List<String>> list2 = parlindromPartitioning(\"aadfsafasdf\");\n\n\t\tfor (List<String> tmp : list2) {\n\t\t\tfor (String s : tmp) {\n\t\t\t\tSystem.out.print(s + \",\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tArrayList<Integer> nums = new ArrayList<Integer>(Arrays.asList(5,4,1,2,3));\r\n\t\trecoverRotatedSortedArray(nums);\r\n\t\tfor(int x: nums){\r\n\t\t\tSystem.out.print(x);\r\n\t\t\tSystem.out.print(\",\");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public void printQueue();", "public static void main(String[] args) {\n int[] test = {1,2,3,4,5,6,7,8,9,10};\n Queue testing = new Queue(test);\n int[] pulled = new int[3];\n pulled[0] = testing.pop();\n pulled[1] = testing.pop();\n pulled[0] = testing.pop();\n System.out.println(\"pulled \" + pulled[0] + \" \" + pulled[1] + \" \" + pulled[2]);\n testing.push(pulled);\n testing.iter();\n }", "public ParallelMinimalSeparatorsEnumerator()\n {\n super();\n Q = new ConcurrentQueueSet<>();\n P = ConcurrentHashMap.newKeySet();\n componentsCache = ConcurrentHashMap.newKeySet();\n }", "public void displayAsList()\n\t{\n\t\tSystem.out.println(\"Printing all vertices\");\n\t\tvertices.show();\n\t}", "public static void main(String[] args) {\n\t\tfor(int i = 0 ; i < 5 ; i++)\n\t\t\tSystem.out.println(Arrays.toString(flavoSet(3)));\n\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tSet list = new HashSet();\n\t\tlist.add(\"1\");\n\t\tlist.add(\"2\");\n\t\tlist.add(\"3\");\n\t\tlist.add(\"1\");\n\t\tlist.forEach(System.out::print); // 123\n\t\t\n\t\tSystem.out.println(\"---------------------------\");\n\t\t\n//\t\tStream<String> stream = Arrays.stream(new String[] {\"a\",\"b\",\"c\"});\n//\t\tString output = stream.filter(s->{ \n//\t\t\tif(s.compareTo(\"abc\") > 0)\n//\t\t\t\treturn true;\n//\t\t})\n//\t\t.peek(System.out::print)\n//\t\t.collect(Collectorsjoining()); //Compilation Fail Here\n//\t\tSystem.out.println(output);\n\t\t\n\t\t\n\t\tVector obj = new Vector(4,2);\n\t\tobj.addElement(new Integer(3));\n\t\tobj.addElement(new Integer(2));\n\t\tobj.addElement(new Integer(5));\n\t\tSystem.out.println(obj.capacity());\n\t\t\n\t\tSystem.out.println(\"---------------------------\");\n\t\t\n//\t\tSet _set = new HashSet();\n\t\tSet _set = new TreeSet();\n\t\t_set.add(new Integer(2));\n\t\t_set.add(new Integer(1));\n\t\tSystem.out.println(_set); // [1,2] TreeSet will Guaranteed Sorting\n\t\t\n\t\tSystem.out.println(\"---------------------------\");\n\t\t\n\t\tSet<Integer> ss = new HashSet<Integer>();\n\t\tInteger i1 = 45;\n\t\tInteger i2 = 46;\n\t\tss.add(i1);\n\t\tss.add(i1);\n\t\tss.add(i2);\n\t\tSystem.out.print(ss.size() + \" \");\n\t\tss.remove(i1);\n\t\tSystem.out.print(ss.size() + \" \");\n\t\ti2=47;\n\t\tss.remove(i2);\n\t\tSystem.out.print(ss.size() + \" \");\n\t\t\n\t\tSystem.out.println(\"---------------------------\");\n\t}", "public static void main(String[] args) {\n ArrayList<Integer> myNumbers = new ArrayList<Integer>();\n // adding items in the list\n myNumbers.add(5);\n myNumbers.add(2);\n myNumbers.add(4);\n myNumbers.set(0, 7);\n // myNumbers.remove(0);\n // Before sorting accessing numbers\n System.out.print(\"Before sorting :\");\n for (int i = 0; i < myNumbers.size(); i++) {\n System.out.print(myNumbers.get(i) + \" \");\n }\n // sorting the list\n Collections.sort(myNumbers);\n System.out.print(\"\\nAfter sorting :\");\n for (Integer keep : myNumbers) {\n System.out.print(keep + \" \");\n }\n }", "public static void main(String[] args) {\r\n\r\n ExecutorService es = Executors.newFixedThreadPool(100);\r\n for (int i = 0; i < 10; i++) {\r\n es.execute(new Runnable() {\r\n @Override\r\n public void run() {\r\n // l++;\r\n // l--;\r\n l.incrementAndGet();\r\n l.decrementAndGet();\r\n }\r\n });\r\n }\r\n // for (int i = 0; i < 10; i++) {\r\n // es.execute(new Runnable() {\r\n // @Override\r\n // public void run() {\r\n // synchronized (l) {\r\n // l--;\r\n // }\r\n // // l.decrementAndGet();\r\n // }\r\n // });\r\n // }\r\n System.out.println(l);\r\n }", "public static void main(String[] args){\n\n ArrayList<String> test = new ArrayList<>();\n test.add(\"T\");\n test.add(\"L\");\n\n ArrayList<String> test2 = new ArrayList<>();\n test2.add(\"P\");\n\n PFD pfd1 = new PFD(test,test2,1);\n\n ArrayList<String> test3 = new ArrayList<>();\n test3.add(\"T\");\n test3.add(\"L\");\n\n ArrayList<String> test4 = new ArrayList<>();\n test4.add(\"M\");\n\n PFD pfd2 = new PFD(test3,test4,1);\n\n ArrayList<String> test5 = new ArrayList<>();\n test5.add(\"P\");\n ArrayList<String> test6 = new ArrayList<>();\n test6.add(\"M\");\n\n ArrayList<String> test7 = new ArrayList<>();\n test7.add(\"T\");\n ArrayList<String> test8 = new ArrayList<>();\n test8.add(\"S\");\n\n PFD pfd3 = new PFD(test5,test6,3);\n PFD pfd4 = new PFD(test7,test8,3);\n ArrayList<PFD> test2List = new ArrayList<PFD>(Arrays.asList(pfd1, pfd2));\n ArrayList<String> r = new ArrayList<String>(Arrays.asList(\"M\", \"S\", \"T\", \"P\"));\n// System.out.println(test2List);\n// System.out.println(\"Closure: \" + getClosureForAttr(new ArrayList<String>(Arrays.asList(\"T\",\"M\")),test2List,1));\n// System.out.println(\"BDNF? \"+ isSatisfiedBDFN(test2List,3));\n// System.out.println(getCanCover1(test2List));\n// S = DecomposeWithTheCertainty(r,test2List,4);\n// System.out.println(turnDeOutputToString());\n// System.out.println(getAllComb(r, new ArrayList<ArrayList<String>>()));\n\n// System.out.println(getMinimalKeys(test2List,r,4));\n\n// System.out.println(\"B-prime: \"+getBetaPrimeList(test2List,r,2));\n// System.out.println(\"Satisfied 3NF? \"+isSatisfied3NF(test2List,r,3));\n// System.out.println(\"Is not subset:\"+isNotSubset(pfd4,test2List));\n ArrayList<String> t = new ArrayList<>();\n t.add(\"A\");\n t.add(\"B\");\n t.add(\"C\");\n ArrayList<String> t1 = new ArrayList<>();\n t1.add(\"B\");\n t1.add(\"A\");\n// t1.add(\"D\");\n t.retainAll(t1);\n// System.out.println(t.toString());\n// System.out.println(String.join(\"\",t1));\n//\n// System.out.println(getAllCombo(r).toString());\n double x = 2 / 3.0;\n System.out.println(x);\n\n}", "public static void main(String[] args) {\n\n testWithNElementsParallel(1000);\n testWithNElementsParallel(10000);\n testWithNElementsParallel(100000);\n testWithNElementsParallel(1000000);\n testWithNElementsParallel(5000000);\n testWithNElementsParallel(10000000);\n }", "public static void main(String[] args) {\n\t\tVector v1=new Vector(2,8);\n\t\tSystem.out.println(v1.capacity());\n\t\tv1.add(10);\n\t\tv1.add(20);\nv1.add(30);\n\tv1.add(40);\n\tv1.add(50);\n\tv1.add(60);\n\tv1.add(70);\n\tv1.add(80);\n\tv1.add(90);\n\t\tv1.add(10);\n\t\tv1.add(11);\n\t\tArrayList a1=new ArrayList(v1);\n\t\ta1.add(200);\n\t\tSystem.out.println(a1);\n\t\n\n\n\t}" ]
[ "0.6289169", "0.5888968", "0.5750819", "0.56944275", "0.56673783", "0.56603175", "0.5634266", "0.561153", "0.56075567", "0.56006557", "0.55847657", "0.5574067", "0.5539443", "0.5536219", "0.5511192", "0.55026406", "0.5495149", "0.5485029", "0.547777", "0.54747427", "0.5456208", "0.5436078", "0.54178053", "0.5412936", "0.5405185", "0.54045695", "0.5398444", "0.5361899", "0.5360547", "0.5351436", "0.53474855", "0.53361136", "0.5295292", "0.5294193", "0.5291777", "0.5289758", "0.5283242", "0.5279494", "0.5267503", "0.5263945", "0.5263673", "0.5256806", "0.52535176", "0.5240862", "0.52390575", "0.5233703", "0.5229402", "0.52286524", "0.5223859", "0.52216", "0.5218629", "0.5214558", "0.52091825", "0.5208913", "0.51983166", "0.5196939", "0.51956093", "0.5195193", "0.51948047", "0.5193397", "0.5193022", "0.5193012", "0.51910144", "0.5190739", "0.5184626", "0.5181778", "0.51654494", "0.51652485", "0.5163724", "0.51578766", "0.51566654", "0.5155743", "0.5154549", "0.5154044", "0.5152698", "0.5149581", "0.51471543", "0.5146336", "0.51461434", "0.51446915", "0.5144362", "0.513784", "0.5133672", "0.5126702", "0.51227903", "0.51224625", "0.511793", "0.5117243", "0.5113519", "0.51071346", "0.51051635", "0.5103711", "0.50977343", "0.50879484", "0.50876224", "0.50835776", "0.50820595", "0.50777566", "0.50776273", "0.5076775", "0.5061669" ]
0.0
-1
Notice that the method signature differs in this DoFn and the one from earlier.
@ProcessElement public void process(ProcessContext c) { MyProduct elem = c.element(); c.output(KV.of(elem.getId(), elem)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SliceDto operate(SliceDataManager sliceDataManager, SliceDto reqSliceDto) throws MloClientException;", "@Override\n\tpublic void call() {\n\t\t\n\t}", "@Override\n public void apply() {\n }", "public interface MutableDataService<U> extends RetrievalService<U> {\n\n /**\n * Create a resource in the server.\n *\n * @implSpec the default implementation of this method is to proxy create requests to the {@link #replace} method.\n * @param metadata metadata for the new resource\n * @param dataset the dataset to be persisted\n * @return a new completion stage that, when the stage completes normally, indicates that the supplied data were\n * successfully created in the corresponding persistence layer. In the case of an unsuccessful write operation,\n * the {@link CompletionStage} will complete exceptionally and can be handled with\n * {@link CompletionStage#handle}, {@link CompletionStage#exceptionally} or similar methods.\n */\n default CompletionStage<Void> create(Metadata metadata, Dataset dataset) {\n return replace(metadata, dataset);\n }\n\n /**\n * Replace a resource in the server.\n *\n * @param metadata metadata for the resource\n * @param dataset the dataset to be persisted\n * @return a new completion stage that, when the stage completes normally, indicates that the supplied data\n * were successfully stored in the corresponding persistence layer. In the case of an unsuccessful write operation,\n * the {@link CompletionStage} will complete exceptionally and can be handled with\n * {@link CompletionStage#handle}, {@link CompletionStage#exceptionally} or similar methods.\n */\n CompletionStage<Void> replace(Metadata metadata, Dataset dataset);\n\n /**\n * Delete a resource from the server.\n *\n * @param metadata metadata for the resource\n * @return a new completion stage that, when the stage completes normally, indicates that the resource\n * was successfully deleted from the corresponding persistence layer. In the case of an unsuccessful delete\n * operation, the {@link CompletionStage} will complete exceptionally and can be handled with\n * {@link CompletionStage#handle}, {@link CompletionStage#exceptionally} or similar methods.\n */\n CompletionStage<Void> delete(Metadata metadata);\n\n}", "protected abstract void processDTO();", "@Override\n public BaseResponse callFunction(EdmFunctionImport funcDesc, Map<String, OFunctionParameter> params, QueryInfo queryInfo) {\n _log.error(\"callFunction(\" + funcDesc + \", \" + params + \", \" + queryInfo);\n Map.Entry<EdmFunctionImport,ServiceOperationHandler> descriptor = _functionDescriptors.get(funcDesc.getName());\n if (descriptor != null) {\n return descriptor.getValue().execute(funcDesc, params, queryInfo);\n }\n return super.callFunction(funcDesc, params, queryInfo);\n }", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\r\n\tprotected CallableProtectedTask<String> createCallable(Method method,\r\n\t\t\tList<FileItem> input, DBProtocol item) throws ResourceException {\r\n\t\tDBUser user = null;\r\n\t\t\r\n\t\tif ((getRequest().getClientInfo().getUser()==null) || (getRequest().getClientInfo().getUser().getIdentifier()==null)) {\r\n\t\t\tuser = null;\r\n\t\t\t//we have default user and POST is protected by a filter\r\n\t\t\t/*\r\n\t\t\tthrow new ResourceException(Status.CLIENT_ERROR_UNAUTHORIZED.getCode(),\r\n\t\t\t\t\t\t\"Upload not allowed\",\r\n\t\t\t\t\t\t\"Only logged in users with editor rights may upload new documents\",\r\n\t\t\t\t\t\tStatus.CLIENT_ERROR_UNAUTHORIZED.getUri());\r\n\t\t\t\t\t\t*/\r\n\t\t} else {\r\n\t\t\tuser = new DBUser();\r\n\t\t\tuser.setUserName(getRequest().getClientInfo().getUser().getIdentifier());\r\n\t\t}\t\r\n\t\tConnection conn = null;\r\n\t\tDBConnection dbc = null;\r\n\t\ttry {\r\n\t\t\tProtocolQueryURIReporter r = new ProtocolQueryURIReporter(getRequest(),\"\");\r\n\t\t\tclass TDBConnection extends QDBConnection {\r\n\t\t\t\tpublic TDBConnection(Context context,Properties configFile) {\r\n\t\t\t\t\tsuper(context,configFile);\r\n\t\t\t\t}\r\n\t\t\t\tpublic String getDir() {\r\n\t\t\t\t\tloadProperties();\r\n\t\t\t\t\treturn getAttachmentDir();\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tdbc = new TDBConnection(getApplication().getContext(),getDbConfig());\r\n\t\t\tconn = dbc.getConnection();\r\n\r\n\t\t\tString dir = ((TDBConnection)dbc).getDir();\r\n\t\t\tif (\"\".equals(dir)) dir = null;\r\n\t\t\treturn new CallableProtocolUpload(method,item,user,input,conn,r,getToken(),getRequest().getRootRef().toString(),\r\n\t\t\t\t\t\tdir==null?null:new File(dir),\r\n\t\t\t\t\t\t((TaskApplication)getApplication()).getResolver()\r\n\t\t\t);\r\n\t\t} catch (ResourceException x) {\r\n\t\t\tthrow x;\r\n\t\t} catch (Exception x) {\r\n\t\t\ttry { conn.close(); } catch (Exception xx) {}\r\n\t\t\tthrow new ResourceException(Status.SERVER_ERROR_INTERNAL,x);\r\n\t\t} finally {\r\n\t\t\tdbc = null;\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic Object call(Object[] invokedArgs) {\n\t\treturn returnType.cast(informer.get(fieldName));\n\t}", "JobResponse apply();", "@Override\n\tprotected ProducedData performs() {\n\t\treturn null;\n\t}", "@Override\n protected Object freshBatch(Object reuse)\n {\n throw new NotImplementedException();\n }", "@Override\n\tpublic void processData() {\n\t\t\n\t}", "public DataHolder postProcess( DataHolder holder );", "DataFlow createDataFlow();", "interface SliceOperation {\n\t/**\n\t * Executes to operate slice.\n\t * @param sliceDataManager the slice data manager.\n\t * @param reqSliceDto the requested slice DTO.\n\t * @return the received slice DTO.\n\t * @throws MloClientException Failed to operate.\n\t */\n\tSliceDto operate(SliceDataManager sliceDataManager, SliceDto reqSliceDto) throws MloClientException;\n}", "void apply() throws Exception;", "void applyResponses(ReaderContext context, Operation operation, Method method);", "void applyProduces(ReaderContext context, Operation operation, Method method);", "@Override\n\tpublic void doIt() {\n\t\t\n\t}", "@Override\n\tvoid post() {\n\t\t\n\t}", "public abstract void operation();", "public void sampleOperation() {\n\t}", "Snapshot apply();", "@Override\r\n\tpublic void process(ResultItems arg0, Task arg1) {\n\t\t\r\n\t}", "protected abstract String invoke(HttpServletRequest request) throws DriverException, WorkflowException;", "@Override\n\tpublic void onDataPass(ToDoItem toDoItem) {\n\t}", "public static void main(String[] args) {\r\n\r\n\t\toptions = PipelineOptionsFactory.fromArgs(args).withValidation().as(DataIngestionPipelineOptions.class);\r\n\t\t\r\n\t\toptions.setRunner(DataflowRunner.class);\r\n\r\n\t\tPipeline p = Pipeline.create(options);\t\t\r\n\t\t\r\n\t\t//PipelineOptions pOptions = p.getOptions();\r\n\t\t\r\n\t\t//System.out.println(\"options id\" + pOptions.getOptionsId());\r\n\t\t\r\n\t\tTable table = BigQueryOptions.getDefaultInstance().getService().getTable(options.getBqDataset(), options.getBqTargetTable());\r\n\r\n\t\tSchema schema = table.getDefinition().getSchema();\r\n\r\n\t\tList<Field> tableFieldSchema = schema.getFields();\r\n\r\n\t\tList<String> columnNames = new ArrayList<String>();\r\n\r\n\t\tlogger.info(\"tableFieldSchema =>\" + tableFieldSchema);\r\n\r\n\t\tfor (Field fieldSchema : tableFieldSchema) {\r\n\t\t\tcolumnNames.add(fieldSchema.getName());\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"column names====>\"+ columnNames);\r\n\t\t\r\n\t\tlogger.info(String.format(\"The job will be executed on project: %1$s dataset: %2$s table: %3$s\",\r\n\t\t\t\toptions.getProject(), options.getBqDataset(), options.getBqTargetTable()));\r\n\t\t\r\n\t\tp.apply(\"ReadCSVFromCloudStorage\", TextIO.read().from(options.getInputFile()))\t\r\n\t\t .apply(ParDo.of(new StringToRowConverter(columnNames)))\r\n\t\t .apply(BigQueryIO.writeTableRows()\r\n\t\t\t\t.to(options.getProject().trim() + \":\" + options.getBqDataset().trim() + \".\" + options.getBqTargetTable().trim())\r\n\t\t\t\t.withCreateDisposition(BigQueryIO.Write.CreateDisposition.CREATE_NEVER)\r\n\t\t\t\t.withWriteDisposition(getWriteDisposition (options)));\r\n\r\n\t\r\n\t\tPipelineResult result = p.run();\r\n\t\t\r\n\t\tString jobId = ((DataflowPipelineJob) result).getJobId();\t\r\n\t\t\t\t\t\t\r\n\t\tDataflowClient client = DataflowClient.create(options);\r\n\t\t\r\n\t\tlogger.info(\"jobId======>\" + jobId);\r\n\t\t\r\n\t\tswitch (result.waitUntilFinish()) {\r\n\t\t\tcase CANCELLED:\r\n\t\t\t\tbreak;\r\n\t\t\tcase DONE:\r\n\t\t\t\t//System.out.println(\"The status is done\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tJob job = client.getJob(jobId);\r\n\t\t\t\t\t//logger.info(\"Job Details================>\" + job.getId(), job.getName(), job.getCreateTime());\r\n\t\t\t\t\t//logger.info(\"Job create time =============>\" + job.getCreateTime());\r\n\t\t\t\t\t//logger.info(\"Job object================>\" + job);\r\n\t\t\t\t\tMetadataTracker.insert(job.getId().toString(), \"DATA INGESTION\", \"CSV\", options.getInputFile(), options.getOutput() == null ? \"\" : options.getOutput(), job.getCreateTime().toString(), job.getCurrentStateTime().toString(), \"45356\", options.getBqDataset(), options.getBqTargetTable());\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\tcase FAILED:\r\n\t\t\t\tbreak;\r\n\t\t\tcase RUNNING:\r\n\t\t\t\tbreak;\r\n\t\t\tcase STOPPED:\r\n\t\t\t\tbreak;\r\n\t\t\tcase UNKNOWN:\r\n\t\t\t\tbreak;\r\n\t\t\tcase UPDATED:\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\t\t\t\r\n\t\t}\r\n\t\t//MetadataTracker.insert(id, jobType, sourceType, sourcePath, targetPath, startTime, endTime, count, datasetName, tableName);\t\t\t\r\n\t\t\r\n\t\t//MetadataTracker.insert(pOptions.getOptionsId(), \"DATA INGESTION\", \"CSV\", options.getInputFile(), \"\", new DateTime(12312), new DateTime(12324), 434343, options.getBqDataset(), options.getBqTargetTable());\r\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "default void process(Input input, Output response) { }", "@Override\n public void afterBulk(long executionId,\n BulkRequest request,\n BulkResponse response) {\n }", "@Override\r\n\tpublic Response invoke() {\n\t\treturn null;\r\n\t}", "@Override\n public DataObjectResponse<T> handlePUT(DataObjectRequest<T> request)\n {\n return handlePUT(request, null);\n }", "protected void invokeInternal(XTeeMessage<Document> request, XTeeMessage<Element> response) throws Exception {\n throw new IllegalStateException(\"You must override either the 'invokeInternal' or the 'invokeInternalEx' method!\");\n }", "public abstract void dataFromEOJ(Service service);", "boolean invokeOperation() {\n return false;\n }", "@Override\n public void beforeBulk(long executionId,\n BulkRequest request) {\n }", "public void preDoDelete(T entity)\n {\n }", "@Override\n public final void doPut() {\n try {\n checkPermissions(getRequest());\n if (id == null) {\n throw new APIMissingIdException(getRequestURL());\n }\n\n final String inputStream = getInputStream();\n if (inputStream.length() == 0) {\n api.runUpdate(id, new HashMap<String, String>());\n return;\n }\n\n Item.setApplyValidatorMandatoryByDefault(false);\n final IItem item = getJSonStreamAsItem();\n api.runUpdate(id, getAttributesWithDeploysAsJsonString(item));\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n\n }\n }", "public interface BulkableAction<T extends JestResult> extends DocumentTargetedAction<T> {\r\n public String getBulkMethodName();\r\n public Collection<Object> getParameter(String key);\r\n}", "private DynamoOperation(Context context, int myAddress, int nodeCount, int replicationCount, int readQuorum, int writeQuorum){\n\t\tdbHelper = new DBHelper(context);\n\t\tdynamoRing = DynamoRing.createAndGetInstance(nodeCount);\n\t\tMY_ADDRESS = myAddress;\n\t\tREPLICATION_COUNT = replicationCount;\n\t\tREAD_QUORUM = readQuorum;\n\t\tWRITE_QUORUM = writeQuorum;\n\t\tsync();\n\t}", "@Override\n\tprotected void processPostUpdateStream(KStream<String, Event> events) {\n\n\t}", "private <X, Y extends AmazonWebServiceRequest> Response<X> doInvoke(Request<Y> request, HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler,\n ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) {\n\n if (discoveredEndpoint != null) {\n request.setEndpoint(discoveredEndpoint);\n request.getOriginalRequest().getRequestClientOptions().appendUserAgent(\"endpoint-discovery\");\n } else if (uriFromEndpointTrait != null) {\n request.setEndpoint(uriFromEndpointTrait);\n } else {\n request.setEndpoint(endpoint);\n }\n\n request.setTimeOffset(timeOffset);\n\n HttpResponseHandler<AmazonServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata());\n\n return client.execute(request, responseHandler, errorResponseHandler, executionContext);\n }", "private <X, Y extends AmazonWebServiceRequest> Response<X> doInvoke(Request<Y> request, HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler,\n ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) {\n\n if (discoveredEndpoint != null) {\n request.setEndpoint(discoveredEndpoint);\n request.getOriginalRequest().getRequestClientOptions().appendUserAgent(\"endpoint-discovery\");\n } else if (uriFromEndpointTrait != null) {\n request.setEndpoint(uriFromEndpointTrait);\n } else {\n request.setEndpoint(endpoint);\n }\n\n request.setTimeOffset(timeOffset);\n\n HttpResponseHandler<AmazonServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata());\n\n return client.execute(request, responseHandler, errorResponseHandler, executionContext);\n }", "private <X, Y extends AmazonWebServiceRequest> Response<X> doInvoke(Request<Y> request, HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler,\n ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) {\n\n if (discoveredEndpoint != null) {\n request.setEndpoint(discoveredEndpoint);\n request.getOriginalRequest().getRequestClientOptions().appendUserAgent(\"endpoint-discovery\");\n } else if (uriFromEndpointTrait != null) {\n request.setEndpoint(uriFromEndpointTrait);\n } else {\n request.setEndpoint(endpoint);\n }\n\n request.setTimeOffset(timeOffset);\n\n HttpResponseHandler<AmazonServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata());\n\n return client.execute(request, responseHandler, errorResponseHandler, executionContext);\n }", "private <X, Y extends AmazonWebServiceRequest> Response<X> doInvoke(Request<Y> request, HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler,\n ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) {\n\n if (discoveredEndpoint != null) {\n request.setEndpoint(discoveredEndpoint);\n request.getOriginalRequest().getRequestClientOptions().appendUserAgent(\"endpoint-discovery\");\n } else if (uriFromEndpointTrait != null) {\n request.setEndpoint(uriFromEndpointTrait);\n } else {\n request.setEndpoint(endpoint);\n }\n\n request.setTimeOffset(timeOffset);\n\n HttpResponseHandler<AmazonServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata());\n\n return client.execute(request, responseHandler, errorResponseHandler, executionContext);\n }", "public abstract void Do();", "@Override\n protected boolean usesNoRefReads() {\n return true;\n }", "@Override\n protected void doWriteTo(StreamOutput out) throws IOException {\n }", "@Override\n\tprotected void handlePostBody(HashMap<String, HashMap<String, String>> params, DataFormat format) throws Exception {\n\t}", "@Override\r\n\tpublic int do_update(DTO dto) {\n\t\treturn 0;\r\n\t}", "public void preDoRetrieve(T entity)\n {\n }", "public void postDoRetrieve(ID id)\n {\n }", "@Override\n public int[] doInCallableStatement(CallableStatement callableStatement) throws SQLException, DataAccessException {\n callableStatement.addBatch();\n\n while (params.hasNext()) {\n batchFactory.addParameter(callableStatement, params.next());\n callableStatement.addBatch();\n }\n return callableStatement.executeBatch();\n }", "JobResponse.Update update();", "public void postDoDelete(T entity)\n {\n }", "protected abstract SoyValue compute();", "public DataHolder processRequest(DataHolder indataholder) throws java.rmi.RemoteException;", "@Override\r\n\tprotected void doF1() {\n\t\t\r\n\t}", "public RESULT apply(TYPE data) throws THROWABLE;", "@Override\n\tprotected void flowThrough(Object in, Object d, Object out) {\n\t\t\n\t}", "V call() throws StatusRuntimeException;", "public interface ICloudRequest {\n \n public int getOp();\n public void incrementRetries();\n public void resetRetries();\n public int getRetries();\n \n /**\n * Retrieve the data unit associated with this request\n * @return {@link DepSkyDataUnit}\n */\n public DepSkyDataUnit getDataUnit();\n \n /**\n * Determine when this procedure started originally\n * @return long - start time of this procedure\n */\n public long getStartTime();\n \n /**\n * Determine the sequence of this request\n * @return long\n */\n public long getSequenceNumber();\n \n /**\n * Get the data resulting from this request\n * @return byte[] consisting of the data\n */\n public byte[] getData();\n \n \n}", "public abstract void doInvoke(InvocationContext ic) throws Exception;", "@Override\n\t\tpublic void worked(int arg0) {\n\n\t\t}", "@Override\n protected void executeLowLevelRequest() {\n doPutItem();\n }", "@Override\n protected void postAddDTO( final D dto )\n {\n final String methodName = \"postAddDTO\";\n logMethodBegin( methodName, dto );\n Objects.requireNonNull( dto, \"dto argument cannot be null\" );\n super.postAddDTO( dto );\n this.updateStockPrice( dto );\n logMethodEnd( methodName );\n }", "D update(D dto);", "@Override\n public void delta() {\n \n }", "private ResponseEntity<String> processServiceMetadata(final Service sMetadata, final ExecuteServiceData data)\n\t\t\tthrows InterruptedException {\n\t\tObjectMapper objectMapper = new ObjectMapper();\n\t\tString requestMimeType = MIME_TYPE;\n\n\t\tString rawURL = sMetadata.getUrl();\n\t\tlogger.log(String.format(\"Executing Service with URL %s with ID %s\", rawURL, data.getServiceId()), Severity.INFORMATIONAL);\n\t\tUriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(rawURL);\n\n\t\tMap<String, DataType> postObjects = new HashMap<>();\n\t\tIterator<Entry<String, DataType>> it = data.getDataInputs().entrySet().iterator();\n\t\tString postString = \"\";\n\n\t\twhile (it.hasNext()) {\n\t\t\tEntry<String, DataType> entry = it.next();\n\t\t\tString inputName = entry.getKey();\n\t\t\tlogger.log(\"The parameter is \" + inputName, Severity.DEBUG);\n\n\t\t\tif (entry.getValue() instanceof URLParameterDataType) {\n\t\t\t\tString paramValue = ((URLParameterDataType) entry.getValue()).getContent();\n\n\t\t\t\tbuilder = processURLParameterDataTypeMetadata(paramValue, inputName, sMetadata, builder);\n\t\t\t} else if (entry.getValue() instanceof BodyDataType) {\n\t\t\t\tBodyDataType bdt = (BodyDataType) entry.getValue();\n\t\t\t\tpostString = bdt.getContent();\n\t\t\t\trequestMimeType = bdt.getMimeType();\n\t\t\t\tif ((requestMimeType == null) || (requestMimeType.length() == 0)) {\n\t\t\t\t\tlogger.log(\"Body mime type not specified\", Severity.ERROR);\n\t\t\t\t\treturn new ResponseEntity<>(\"Body mime type not specified\", HttpStatus.BAD_REQUEST);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Default behavior for other inputs, put them in list of objects\n\t\t\t\t// which are transformed into JSON consistent with default requestMimeType\n\t\t\t\tlogger.log(\"inputName =\" + inputName + \"entry Value=\" + entry.getValue(), Severity.INFORMATIONAL);\n\t\t\t\tpostObjects.put(inputName, entry.getValue());\n\t\t\t}\n\t\t}\n\n\t\tlogger.log(\"Final Builder URL\" + builder.toUriString(), Severity.INFORMATIONAL);\n\t\tif (postObjects.size() > 0) {\n\n\t\t\tif (postString.length() > 0) {\n\t\t\t\tlogger.log(\"String Input not consistent with other Inputs\", Severity.ERROR);\n\t\t\t\treturn new ResponseEntity<>(\"String Input not consistent with other Inputs\", HttpStatus.BAD_REQUEST);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tpostString = objectMapper.writeValueAsString(postObjects);\n\t\t\t} catch (JsonProcessingException e) {\n\t\t\t\tLOG.error(\"Json processing error occurred\", e);\n\t\t\t\tlogger.log(e.getMessage(), Severity.ERROR);\n\t\t\t\treturn new ResponseEntity<>(\"Could not marshal post requests\", HttpStatus.BAD_REQUEST);\n\t\t\t}\n\t\t}\n\n\t\tlogger.log(String.format(\"Triggered execution of service %s\", sMetadata.getServiceId()), Severity.INFORMATIONAL,\n\t\t\t\tnew AuditElement(\"serviceController\", \"executingExternalService\", sMetadata.getServiceId()));\n\n\t\treturn executeJob(sMetadata.getMethod(), requestMimeType, builder.toUriString(), postString);\n\t}", "public void doPost( )\n {\n \n }", "@Override\n\tpublic void processing() {\n\n\t}", "JobResponse apply(Context context);", "@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public abstract void apply() throws ContradictionException;", "protected byte[] onRequest(String topic, String item, int uFmt)\n {\n return null;\n }", "@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "public void doService() {\n }", "@Override\n\tpublic void commitOffsets() {\n\n\t}", "private <X, Y extends AmazonWebServiceRequest> Response<X> doInvoke(Request<Y> request, HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler,\n ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) {\n\n if (discoveredEndpoint != null) {\n request.setEndpoint(discoveredEndpoint);\n request.getOriginalRequest().getRequestClientOptions().appendUserAgent(\"endpoint-discovery\");\n } else if (uriFromEndpointTrait != null) {\n request.setEndpoint(uriFromEndpointTrait);\n } else {\n request.setEndpoint(endpoint);\n }\n\n request.setTimeOffset(timeOffset);\n\n DefaultErrorResponseHandler errorResponseHandler = new DefaultErrorResponseHandler(exceptionUnmarshallersMap, defaultUnmarshaller);\n\n return client.execute(request, responseHandler, errorResponseHandler, executionContext);\n }", "@ProcessData()\n public Data sayHello(Data<MyData> param) {\n MyData data = param.getContent();\n System.out.println(\"call processor\");\n if (data != null) {\n data.put(\"Response\", \"Hello (\" + data.get(\"user.name\") + \") value = \" + data.getName());\n }\n return param;\n }", "abstract public void execute(FunctionContext context) throws Exception;", "@Override\n\tpublic void process(Exchange arg0) throws Exception {\n\t\t\n\t}", "int updateByExampleSelective(@Param(\"record\") CptDataStore record, @Param(\"example\") CptDataStoreExample example);", "boolean stageAfterResultsToDocument(Object input) throws ValidationFailedException;", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void doSomething() {\n \n }", "public interface IPostProcessor<R, T> {\r\n\r\n public R postProcess(ClientRequest clientRequest, T processedResult, String userId) throws Exception;\r\n}", "@SuppressWarnings(\"deprecation\")\r\n\tpublic static void main(String[] args) throws IOException {\n\t\tfinal DataflowPipelineOptions options = PipelineOptionsFactory.as(DataflowPipelineOptions.class);\r\n\t\tDefineProperties.configurePipeLineOptions(options);\r\n\t\t//FileSystems.setDefaultPipelineOptions(options);\r\n\r\n\t \tfinal Pipeline pipeline = Pipeline.create(options);\r\n\t \t \t\t\r\n\t \t//PCollection<TableRow> tableRow1 = pipeline.apply(BigQueryIO.read().fromQuery(PropertyUtil.getProperty(\"dataflow.job.query1\")));\r\n\t \t//PCollection<TableRow> tableRow2 = pipeline.apply(BigQueryIO.read().fromQuery(PropertyUtil.getProperty(\"dataflow.job.query2\")));\r\n \t\t//tableRow1.apply(\"ConverToString\",ParDo.of(new TableRowtoString()))\r\n\t\t//.apply(TextIO.write().to(PropertyUtil.getProperty(\"dataflow.job.gcswritefile\")));\t\t\r\n\t \t\r\n\t \tString key1 = PropertyUtil.getProperty(\"dataflow.job.joinkey1\");\r\n\t \tString key2 = PropertyUtil.getProperty(\"dataflow.job.joinkey2\");\r\n\t \t\t \t\r\n\t \tWithKeys<String, TableRow> joinkey = WithKeys.of(\r\n\t \t\t (TableRow row) ->\r\n\t \t\t String.format(\"%s#%s\",\r\n\t \t\t row.get(key1)\r\n\t \t\t ,row.get(key2)\r\n\t \t\t ))\r\n\t \t\t .withKeyType(TypeDescriptors.strings());\r\n\t \t\r\n\t \tPCollection<KV<String, TableRow>> table1Rows = pipeline\r\n\t \t\t .apply(\"ReadTable1\",BigQueryIO.read().fromQuery(PropertyUtil.getProperty(\"dataflow.job.query1\")))\r\n\t \t\t .apply(\"WithKeys\", joinkey);\r\n\r\n\t \tPCollection<KV<String, TableRow>> table2Rows = pipeline\r\n\t\t \t\t.apply(\"ReadTable2\",BigQueryIO.read().fromQuery(PropertyUtil.getProperty(\"dataflow.job.query2\")))\r\n\t\t \t .apply(\"WithKeys\", joinkey);\r\n\t \t\r\n\r\n\r\n\t\tfinal TupleTag<TableRow> table1Tag = new TupleTag<>();\r\n\t \tfinal TupleTag<TableRow> table2Tag = new TupleTag<>();\r\n\t \t//final TupleTag<TableRow> table3Tag = new TupleTag<>();\r\n\r\n\t \t \t\r\n\t //Merge collection values into a CoGbkResult collection\r\n\t \tPCollection<KV<String, CoGbkResult>> coGbkResult = KeyedPCollectionTuple\r\n\t \t .of(table1Tag, table1Rows)\r\n\t \t .and(table2Tag, table2Rows)\r\n\t \t //.and(table3Tag, table3Rows)\r\n\t \t .apply(\"joinkey\", CoGroupByKey.create());\r\n\t \t\r\n\r\n\t \t\r\n\t //Final coGroup Result\r\n\t \tcoGbkResult.apply(\"ProcessResults\", \r\n\t \t\t ParDo.of(new DoFn<KV<String, CoGbkResult>, TableRow>()\r\n\t \t{\r\n\r\n\t\t\tprivate static final long serialVersionUID = 1L;\r\n\t\t\t@ProcessElement\r\n\t \t\tpublic void processElement(ProcessContext c) throws Exception {\r\n\t \t {\t\r\n\t \t\t KV<String, CoGbkResult> e = c.element();\r\n\t \t\t String key=c.element().getKey();\r\n\t \t\t CoGbkResult result = e.getValue();\r\n\t \t\t \r\n\t \t\t \r\n\t \t\t List<TableRow> pt1Val = (List<TableRow>) result.getAll(table1Tag);\r\n\t \t\t List<TableRow> pt2Val = (List<TableRow>) result.getAll(table2Tag);\r\n\r\n\t \t\t TableRow row = new TableRow();\r\n\t \t\t TableRow row1 = new TableRow();\r\n\t \t\t \r\n\t \t\t TableFieldSchema col = new TableFieldSchema();\r\n\t \t\t TableFieldSchema col1 = new TableFieldSchema();\r\n\t \t\t\r\n\t \t\t\t \t\t \r\n\t \t\t if(pt1Val != null && pt2Val != null) \r\n\t \t\t {\r\n\t \t\t \t\r\n\t \t\t \tfor(TableRow a : pt1Val) \r\n\t \t\t \t{\r\n\t \t\t \t\tif(a.values()!=null)\r\n\t \t\t \t\t{ \t\r\n\t \t\t \t\t\tfor (int i = 0; i < 4 ; i++) \r\n\t \t\t \t\t\t{\r\n\t \t\t \t\t\t col = Table_Schema.getTableSchema().getFields().get(i);\r\n\t \t\t \t\t\t row.set(col.getName(), a.get(col.getName()));\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 \t for(TableRow b : pt2Val) \r\n\t \t\t \t \t{\r\n\t \t\t \t\t if(b.values()!=null)\r\n\t \t\t \t\t { \t\t\r\n\t \t\t \t\t\t for (int i = 0; i < 4 ; i++) \r\n\t \t\t \t\t\t {\r\n\t \t\t \t\t\t\t col1 = Table_Schema.getTableSchema().getFields().get(i);\r\n\t \t\t \t\t\t\t row1.set(col1.getName(), b.get(col1.getName()));\r\n\t \t\t \t\t\t }\r\n\t \t\t \t\t }\r\n\t \t\t \t \t}\r\n\r\n\t \t\t \t//Right Outer Join\r\n\t \t\t \t//if(row.isEmpty())\t\r\n\t \t\t \t\t//{c.output(row);}\r\n\t \t\t \t\r\n\t \t\t //Left Outer Join\r\n\t \t\t \t//if(row1.isEmpty())\t\r\n\t \t\t \t\t//{c.output(row1);}\r\n\t \t\t \t\r\n\t \t\t //Inner Join\r\n \t\t \tif(!row.isEmpty() && !row1.isEmpty())\t\r\n \t\t \t \t{c.output(row);}\r\n\t \t\t \t\r\n\t \t \r\n\t \t \t\t}}}\r\n\t \t }))\r\n\t \t\t//.apply(TextIO.write().to(PropertyUtil.getProperty(\"dataflow.job.gcswritefile\")));\r\n\t \t .apply(\"WriteToBq\", BigQueryIO.writeTableRows()\r\n\t .to(PropertyUtil.getProperty(\"dataflow.job.tablename\"))\r\n\t .withWriteDisposition(WriteDisposition.WRITE_TRUNCATE)\r\n\t .withCreateDisposition(CreateDisposition.CREATE_NEVER));\r\n\t\t \t\r\n\t \tpipeline.run().waitUntilFinish();\r\n\t}", "public SfJdDocAudit saveFN(SfJdDocAudit inData, RequestMeta requestMeta) {\n if (inData.getJdDocAuditId()==null ) {\r\n\r\n ZcSUtil su=new ZcSUtil();\r\n BigDecimal id=new BigDecimal(su.getNextVal(SfJdDocAudit.SEQ_SF_JD_DOC_AUDIT_ID));\r\n inData.setJdDocAuditId(id); \r\n\r\n boolean isDraft = false;\r\n String userId = requestMeta.getSvUserID();\r\n String compoId = requestMeta.getCompoId();\r\n \r\n if (inData.getProcessInstId() == null || inData.getProcessInstId().longValue() == -1) {\r\n Long draftid = workflowDao.createDraftId();\r\n inData.setProcessInstId(draftid);\r\n isDraft = true;\r\n } \r\n insert(inData,requestMeta);\r\n if (isDraft) {\r\n AsWfDraft asWfDraft = new AsWfDraft();\r\n asWfDraft.setCompoId(compoId);\r\n asWfDraft.setWfDraftName(inData.getName());\r\n asWfDraft.setUserId(userId);\r\n asWfDraft.setMasterTabId(compoId);\r\n asWfDraft.setWfDraftId(BigDecimal.valueOf(inData.getProcessInstId().longValue()));\r\n workflowDao.insertAsWfdraft(asWfDraft);\r\n }\r\n }else{\r\n update(inData,requestMeta);\r\n }\r\n return inData;\r\n }", "default void doProcessor(URLBuilder builder, APIResult result){}", "@Override\n\tprotected void processInput() {\n\t}", "@Nonnull\n\t<T> DodonaFuture<T> execute(Function<? super DodonaClient, ? extends T> call);", "@Override\r\n\tpublic void modifiedService(ServiceReference arg0, Object arg1) {\n\t\t\r\n\t}", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "public abstract void mutate();", "static public void callForeachRDD (org.apache.spark.streaming.api.java.JavaDStream<byte[]> jdstream, org.apache.spark.streaming.api.python.PythonTransformFunction pfunc) { throw new RuntimeException(); }" ]
[ "0.5058979", "0.501869", "0.49256915", "0.48945835", "0.48611882", "0.4860284", "0.48361567", "0.48294398", "0.48216915", "0.48185575", "0.48157084", "0.47468805", "0.4746347", "0.47403172", "0.4714765", "0.47141808", "0.47072506", "0.46848777", "0.46799022", "0.46706232", "0.46645534", "0.465151", "0.4650374", "0.4649122", "0.46208513", "0.46138844", "0.4613055", "0.4611494", "0.45989546", "0.45989546", "0.45969906", "0.45842052", "0.45818293", "0.45714355", "0.4561002", "0.45487696", "0.45463032", "0.4524516", "0.45140505", "0.4510598", "0.45035577", "0.45022693", "0.44994307", "0.44993123", "0.44993123", "0.44993123", "0.44993123", "0.44987828", "0.4496635", "0.4490127", "0.44814104", "0.4480675", "0.44778064", "0.4473161", "0.44665366", "0.44651458", "0.44629312", "0.44602248", "0.44482395", "0.44473577", "0.44461057", "0.444109", "0.44402152", "0.4434849", "0.44329372", "0.44243178", "0.44220766", "0.44132453", "0.44131732", "0.44115692", "0.4406666", "0.44052327", "0.44045234", "0.44015235", "0.4399132", "0.43951058", "0.43945515", "0.43912053", "0.43902296", "0.4389388", "0.4388998", "0.43882", "0.43881693", "0.4385324", "0.43845224", "0.4377935", "0.43772188", "0.43751875", "0.43751255", "0.43746582", "0.4373535", "0.43713993", "0.43711308", "0.43681312", "0.43652037", "0.4361328", "0.43596834", "0.4356392", "0.43528298", "0.43527192", "0.43507347" ]
0.0
-1
TODO 3 This method works OK for the input files provided. However, if the Product ID contains a comma or some lines are invalid, then this approach may not work properly. What would be a better way to parse CSV files?
static MyProduct getMyProduct(String line) { // Assuming that the input data is 'valid', we can tokenize each line to three String literals. // These tokens correspond to product ID, units sold, and revenue. String[] tokens = line.split(","); MyProduct.Builder prodBuilder = MyProduct.newBuilder(); // You can "set" the value of a field like this: prodBuilder.setId(tokens[0]); // You can chain multiple calls to setters, too. prodBuilder.setUnitsSold(Integer.parseInt(tokens[1])).setRevenue(Integer.parseInt(tokens[2])); // 'build()' will create a new object based on the values set in the builder object. return prodBuilder.build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public List<Product> productReader() throws IOException {\n BufferedReader csvReader = new BufferedReader(new FileReader(PRODUCTS_REFERENCE_FILE));\n String row;\n List<Product> dataList = new ArrayList<>();\n\n row = csvReader.readLine();\n while ((row = csvReader.readLine()) != null){\n\n Product data = new Product();\n //I separate the row data by a separator, a coma in this case and add all the data in the class\n String[] datas = row.split(SEPARATOR_COLON);\n\n data.setProduct_id(Integer.parseInt(datas[0]));\n data.setName(datas[1]);\n data.setDescription(datas[2]);\n data.setCategory_id(Integer.parseInt(datas[3]));\n\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"MM/dd/yyyy\");\n\n //Since some dates had just one number for the month, I had to use this to add a 0\n //to make all the dates the same length after getting rid of the 0:01 that was not necessary\n String[] creationDate = datas[4].split(\" \");\n if(creationDate[0].length() == 9){\n creationDate[0] = \"0\"+ creationDate[0];\n }\n data.setCreation_date(LocalDate.parse(creationDate[0], formatter));\n\n creationDate = datas[5].split(\" \");\n if(creationDate[0].length() == 9){\n creationDate[0] = \"0\"+ creationDate[0];\n }\n data.setUpdate_date(LocalDate.parse(creationDate[0], formatter));\n\n creationDate = datas[6].split(\" \");\n if(creationDate[0].length() == 9){\n creationDate[0] = \"0\"+ creationDate[0];\n }\n data.setLast_purchased_date(LocalDate.parse(creationDate[0], formatter));\n\n dataList.add(data);\n\n }\n return dataList;\n\n }", "@Override\n\tpublic void parseCSV(String csv) {\n\t\t\n\t}", "private void processCSVFile( BufferedReader csvFile ) throws IOException {\r\n\t\t\r\n\t\tboolean headerRowRead = false;\r\n\t\tString[] headerArray = null;\r\n\t\t\r\n\t\t//loop through all rows and create contacts\r\n\t\tString row = csvFile.readLine();\r\n\t\t\r\n\t\twhile (row != null) {\r\n\t\t\t\r\n\t\t\tif (row.length()==0 || row.startsWith(\"#\") || row.startsWith(\";\") ) {\t\t\r\n\t\t\t\t\r\n\t\t\t\t//empty or comment row: skip\r\n\t\t\t\t\r\n\t\t\t} else if (!headerRowRead) {\r\n\t\t\t\t\r\n\t\t\t\t//header row is the first non-blank, not-comment row in the CSV file\r\n\t\t\t\t//the required header row contains the attribute names\r\n\t\t\t\t\r\n\t\t\t\theaderRowRead = true;\r\n\t\t\t\t\r\n\t\t\t\t//read header\r\n\t\t\t\theaderArray = parseCSVLine( row, true); \t\t\r\n\t\t\t\tLogger.debug(\"header: \" + row);\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\r\n\t\t\t\tHashMap<String,String> contactObject = ContactsImport.getRowValues(headerArray, row);\r\n\t\t\t\tcreateContact(contactObject);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\trow = csvFile.readLine(); //read next line form csv file\r\n\t\t}\r\n\t\t\r\n\t\tLogger.debug(\"finished\");\r\n\r\n\t}", "public TreeSet<Product> readCSV() throws IOException, NumberFormatException {\n\r\n TreeSet<Product> products = new TreeSet<>();\r\n\r\n try (BufferedReader reader = new BufferedReader(new FileReader(\"src/Collection/file.csv_2.txt\"));) {\r\n while ((line = reader.readLine()) != null) {\r\n String[] row = line.split(\",\");\r\n\r\n Location location = new Location(\r\n Double.parseDouble(row[14]),\r\n Integer.parseInt(row[15]),\r\n Float.parseFloat(row[16]),\r\n row[17]);\r\n Address address = new Address(\r\n row[12],\r\n row[13],\r\n location\r\n );\r\n Organization organization = new Organization(\r\n Integer.parseInt(row[8]),\r\n row[9],\r\n row[10],\r\n OrganizationType.valueOf(row[11]),\r\n address\r\n );\r\n Coordinates coordinates = new Coordinates(\r\n Float.parseFloat(row[3]),\r\n Double.parseDouble(row[4])\r\n );\r\n try {\r\n\r\n\r\n Product product = new Product (\r\n Integer.parseInt(row[0]),\r\n row[1],\r\n LocalDate.parse(row[2].replace(\"/\", \"-\")),\r\n coordinates,\r\n Integer.parseInt(row[5]),\r\n row[6],\r\n UnitOfMeasure.valueOf(row[7]),\r\n organization\r\n );\r\n products.add(product);}\r\n catch (NumberFormatException e){\r\n System.out.println(\"wrong format\");\r\n }\r\n\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n products.forEach(System.out::println);\r\n return products;\r\n }", "public static void fileRead(String fileName) {\n //System.out.println(\"in file read\");\n String typeProduct, idProduct, nameProduct, priceProduct, yearProduct, authorsProduct, publisherProduct, makerProduct;\n\n Scanner inputStream = null;\n try {\n inputStream = new Scanner(new FileInputStream(fileName));\n } catch (FileNotFoundException e) {\n System.out.println(\"the file was not there\");\n }\n String fileLine = null;\n while (inputStream.hasNextLine()) {\n fileLine = inputStream.nextLine();\n //System.out.println(fileLine);\n\n if (fileLine.contains(\"type\") && fileLine.length() != 0) {\n //System.out.println(\"Type statement\");\n typeProduct = fileLine.substring(8, fileLine.length() - 1); //this creates a substring from the file that has the product type. it lets you have the product type without quotes.\n //System.out.println(typeProduct);\n\n //parse productId\n fileLine = inputStream.nextLine();\n idProduct = fileLine.substring(13, fileLine.length() - 1);\n //System.out.println(\"id product\");\n //System.out.println(idProduct);\n\n //now parsing name\n fileLine = inputStream.nextLine();\n //System.out.println(\"now parsing name\");\n nameProduct = fileLine.substring(8, fileLine.length() - 1);\n //System.out.println(\"name Product\");\n //System.out.println(nameProduct);\n\n //now parsing price\n fileLine = inputStream.nextLine();\n priceProduct = fileLine.substring(9, fileLine.length() - 1);\n //System.out.println(priceProduct);\n Double priceProductDouble = 0.0;\n try {\n priceProductDouble = Double.parseDouble(priceProduct);\n } catch (NumberFormatException e) {\n System.out.println(\"invalid price format\");\n }\n //System.out.println(priceProductDouble);\n\n //now parsing year\n fileLine = inputStream.nextLine();\n yearProduct = fileLine.substring(8, fileLine.length() - 1);\n //System.out.println(yearProduct);\n int yearProductInt = 0;\n try {\n yearProductInt = Integer.parseInt(yearProduct);\n } catch (NumberFormatException e) {\n System.out.println(\"invalid year in the file\");\n }\n\n if (typeProduct.equalsIgnoreCase(\"book\")) {\n //System.out.println(\"this is book\");\n\n //now parsing authors\n fileLine = inputStream.nextLine();\n authorsProduct = fileLine.substring(11, fileLine.length() - 1);\n //System.out.println(priceProduct);\n\n //now parsing publlishers\n fileLine = inputStream.nextLine();\n publisherProduct = fileLine.substring(13, fileLine.length() - 1);\n //System.out.println(publisherProduct);\n try{\n Product addProduct = new Book(idProduct, nameProduct, yearProductInt, priceProductDouble, authorsProduct, publisherProduct);\n \n productList.add(addProduct);\n \n nameProduct = nameProduct.toLowerCase();\n \n addToMap(nameProduct);\n \n } catch (Exception error){\n System.out.println(error.getMessage());\n ProductGUI.Display(error.getMessage() + \"\\n\");\n }\n \n\n } else if (typeProduct.equalsIgnoreCase(\"electronics\")) {\n //System.out.println(\"electronic\");\n //now parsing publlishers\n fileLine = inputStream.nextLine();\n makerProduct = fileLine.substring(9, fileLine.length() - 1);\n //System.out.println(makerProduct);\n \n try{\n Product addProduct = new Electronics(idProduct, nameProduct, yearProductInt, priceProductDouble, makerProduct);\n productList.add(addProduct);\n nameProduct = nameProduct.toLowerCase();\n addToMap(nameProduct);\n }catch(Exception error){\n System.out.println(error.getMessage());\n ProductGUI.Display(error.getMessage() + \"\\n\");\n }\n \n }\n\n }\n\n }\n System.out.println(\"Reading File: Successful\");\n }", "private static List<String> parseLine(String csvLine) {\n List<String> result = new ArrayList<>();\n if (Objects.isNull(csvLine) || csvLine.isEmpty()) {\n return result;\n }\n StringBuilder charSet = new StringBuilder();\n char[] chars = csvLine.toCharArray();\n for (char character : chars) {\n if (character == DEFAULT_SEPARATOR) {\n result.add(charSet.toString().trim());\n charSet = new StringBuilder();\n } else {\n charSet.append(character);\n }\n }\n result.add(charSet.toString().trim());\n return result;\n }", "private ArrayList<CSVRecord> processCsvData(String csvFile) {\n ArrayList<CSVRecord> records = new ArrayList<>();\n\n File csvData = new File(\"src/main/resources/csv/\" + csvFile + \".csv\");\n\n try {\n CSVParser parser = CSVParser.parse(csvData, Charset.defaultCharset(), CSVFormat.EXCEL);\n records.addAll(parser.getRecords());\n } catch (IOException exception) {\n logger.error(\"Unable to parse CSV file: \" + exception.getMessage());\n }\n\n return records;\n }", "public void readEntityCSV(String line) {\n List<String> items = Arrays.asList(line.split(\",\"));\n this.setId(Long.valueOf(items.get(0)));\n this.noOfRounds = Integer.parseInt(items.get(1));\n this.caliber = Float.parseFloat(items.get(2));\n this.manufacturer = items.get(3);\n this.price = Float.parseFloat(items.get(4));\n }", "public void loadCSVData() throws IOException, SQLException {\r\n //SQL statement to load csv information into data table\r\n String insertvaluesSQL = \"INSERT INTO data\"\r\n + \"(InvoiceNo, StockCode, Description, Quantity, InvoiceDate, UnitPrice, CustomerID, Country)\"\r\n + \" VALUES (?,?,?,?,?,?,?,?);\";\r\n\r\n //code to read csv file taken from W03 practical\r\n BufferedReader br = new BufferedReader(new FileReader(filePath));\r\n String line = br.readLine();\r\n String[] informationArray;\r\n while (line != null) {\r\n informationArray = line.split(\",\");\r\n PreparedStatement preparedStatement = connection.prepareStatement(insertvaluesSQL);\r\n //the first '?' corresponds to the 0th term in the information array\r\n //the second '?' corresponds to the 1st term in the information array\r\n for (int i = 1; i < 9; i++) {\r\n preparedStatement.setString(i, informationArray[i - 1]);\r\n }\r\n preparedStatement.executeUpdate();\r\n line = br.readLine();\r\n }\r\n Statement statement = connection.createStatement();\r\n statement.executeUpdate(\"DELETE FROM data WHERE InvoiceNo = 'InvoiceNo';\");\r\n statement.close();\r\n }", "static public void extractFromCSVRefFile(String file_path) throws Exception\n\t{\n\t\tDataExtractor de = new DataExtractor();\n\t\t\n\t\tFile commitFile = new File(file_path);\n\t\tBufferedReader reader = new BufferedReader(new FileReader(commitFile));\n\t\t\n\t\tString line = \"\";\n\t\tList<String> commit_ids = new ArrayList<String>();\n\n\t\twhile(line != null)\n\t\t{\n\t\t\tline = reader.readLine();\n\t\t\tif(line!= null && !line.isEmpty() && line.contains(\";\"))\n\t\t\t{\n\t\t\t\tString id = line.split(\";\")[1];\n\t\t\t\tcommit_ids.add(id);\n\t\t\t}\n\t\t}\n\t\treader.close();\n\t\tde.extractCommitInfo(commit_ids);\t\t\n\t}", "@Override\n public void importCSV(File file) {\n System.out.println(\"oi\");\n System.out.println(file.isFile()+\" \"+file.getAbsolutePath());\n if(file.isFile() && file.getPath().toLowerCase().contains(\".csv\")){\n System.out.println(\"Entro\");\n try {\n final Reader reader = new FileReader(file);\n final BufferedReader bufferReader = new BufferedReader(reader);\n String[] cabecalho = bufferReader.readLine().split(\",\");\n int tipo;\n if(cabecalho.length == 3){\n if(cabecalho[2].equalsIgnoreCase(\"SIGLA\")){\n tipo = 1;\n System.out.println(\"TIPO PAIS\");\n }\n else {\n tipo = 2;\n System.out.println(\"TIPO CIDADE\");\n }\n }else {\n tipo = 3;\n System.out.println(\"TIPO ESTADO\");\n }\n \n while(true){\n String linha = bufferReader.readLine();\n if(linha == null){\n break;\n }\n String[] row = linha.split(\",\");\n switch (tipo) {\n case 1:\n Pais pais = new Pais();\n pais.setId(Long.parseLong(row[0]));\n pais.setNome(row[1]);\n pais.setSigla(row[2]);\n new PaisDaoImpl().insert(pais);\n break;\n case 2:\n Cidade cidade = new Cidade();\n cidade.setId(Long.parseLong(row[0]));\n cidade.setNome(row[1]);\n cidade.setEstado(Long.parseLong(row[2]));\n new CidadeDaoImpl().insert(cidade);\n break;\n default:\n Estado estado = new Estado();\n estado.setId(Long.parseLong(row[0]));\n estado.setNome(row[1]);\n estado.setUf(row[2]);\n estado.setPais(Long.parseLong(row[3]));\n new EstadoDaoImpl().insert(estado);\n break;\n }\n }\n \n } catch (FileNotFoundException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "private void readFile() {\r\n\t\tcsvEntrys = new ArrayList<>();\r\n\t\tString line = \"\";\r\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(new File(filepath)))) {\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tif (!line.contains(\"id\")) {\r\n\t\t\t\t\tcsvEntrys.add(line);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n DBO consume(String csv) throws TransformerException;", "public static List<String> extractData_CSV(String csvFile, String rowID) throws Exception {\n List<String> rows = new ArrayList<>();\n\n BufferedReader reader = new BufferedReader(new FileReader(csvFile));\n String line = \"\";\n\n while ( (line = reader.readLine()) != null) {\n if (line.startsWith(rowID)){\n rows.add(line);\n }\n }\n reader.close();\n return rows;\n }", "private static void readInputDataFromCSV(String pathToCSVfile) throws IOException {\n\n // open the file\n BufferedReader reader = new BufferedReader(new FileReader(pathToCSVfile));\n // read line by line\n String line = null;\n Scanner scanner = null;\n int index = 0;\n inputPlayersList = new ArrayList<>();\n\n while ((line = reader.readLine()) != null) {\n Player pl = new Player();\n scanner = new Scanner(line);\n scanner.useDelimiter(\",\");\n while (scanner.hasNext()) {\n String data = scanner.next();\n if (index == 0)\n pl.setLastName(data);\n else if (index == 1)\n pl.setFirstName(data);\n else if (index == 2)\n pl.setCountry(data);\n else if (index == 3)\n pl.setTicketNumber(data);\n else\n System.out.println(\"Incorrect data: \" + data);\n index++;\n }\n index = 0;\n inputPlayersList.add(pl);\n\n }\n //close reader\n reader.close();\n }", "private boolean readData(String aCSVFilename)\n {\n try\n {\n // open the chosen file\n File file = new File(aCSVFilename);\n BufferedReader bufRdr = new BufferedReader(new FileReader(file));\n\n // read each line of text file\n String line = null;\n while ((line = bufRdr.readLine()) != null)\n {\n StringTokenizer st = new StringTokenizer(line, \",\");\n while (st.hasMoreTokens())\n {\n String key = st.nextToken();\n String value = st.nextToken();\n processKeyValuePair(key, value);\n }\n }\n //close the file\n bufRdr.close();\n return true;\n }\n catch (Exception e)\n {\n return false;\n }\n }", "private void processRecords()\n {\n // This is the way to connect the file to an inputstream in android\n InputStream inputStream = getResources().openRawResource(R.raw.products);\n\n Scanner scanner = new Scanner(inputStream);\n\n\n // skipping first row by reading it before loop and displaying it as column names\n String[] tableRow = scanner.nextLine().split(\",\");\n\n //Log.e(\"COLUMN NAMES\", Arrays.toString(tableRow));\n //Log.e(\"COLUMN NAMES SIZE\", String.valueOf(tableRow.length));\n\n\n // --- Truncate table (delete all rows and reset auto increment --\n // this line of code will be useful because for now we are forced to read file\n // everytime we open app, this way we do not have duplicate data.\n db.resetTable();\n\n while (scanner.hasNextLine())\n {\n tableRow = scanner.nextLine().split(\",\");\n //Log.e(\"COLUMN VALUES\", Arrays.toString(tableRow));\n //Log.e(\"COLUMN VALUES SIZE\", String.valueOf(tableRow.length));\n\n /*\n * Possible Change:\n * On each iteration a new Product() can be created and call the setter to set\n * its fields to the elements of the String array, example\n * product = new Product();\n * product.setNumber(tableRow[0]);\n * product.setBusinessName(tableRow[1]);\n * ...\n * db.insertData(product); // because the new insertData method would expect a\n * Product object instead\n *\n */\n\n // insert data\n if (db.insertData(tableRow))\n {\n //Log.e(\"Insert\", \"SUCCESSFUL INSERT AT \" + tableRow[0]);\n }\n else\n {\n //Log.e(\"Insert\", \"UNSUCCESSFUL INSERT\");\n }\n\n }\n }", "@Override\n protected void processLine(String line) {\n String[] lines = line.split(\",\");\n for (String l : lines) {\n data.add(l);\n }\n }", "@Override\n public ToDoList readCSV(String csvPath) throws InvalidArgumentException {\n this.csvPath = csvPath;\n this.toDoList = new ToDoList();\n\n BufferedReader inputFile = null;\n try {\n inputFile = new BufferedReader(new FileReader(this.csvPath));\n\n String line = inputFile.readLine();\n if (line == null) {\n inputFile.close();\n return this.toDoList;\n } // Empty CSV file, no need for processing.\n this.processHeader(line);\n while ((line = inputFile.readLine()) != null) {\n this.processToDoItem(line);\n }\n inputFile.close();\n return this.toDoList;\n } catch (FileNotFoundException fnfe) {\n throw new InvalidArgumentException(\"OOPS! File not found!\");\n } catch (IOException ioe) {\n throw new InvalidArgumentException(\"There is somthing wrong!\");\n }\n }", "public void readToCsv() {\r\n\r\n String seperator = \";\";\r\n\r\n try (BufferedReader reader = new BufferedReader(\r\n new FileReader(\"Products.csv\"))){\r\n\r\n String line = null;\r\n for(int i=1; (line = reader.readLine()) != null; i++) {\r\n String[] fields = line.split(seperator, -1);\r\n\r\n // For nutrients objects to read\r\n if(fields.length ==5){\r\n Nutrient object= new Nutrient();\r\n object.name = fields[0];\r\n object.price = Double.parseDouble(fields[1]);\r\n object.tag=fields[2];\r\n object.content = fields[3];\r\n object.numOfProduct = Integer.parseInt(fields[4]);\r\n //object.addFeatures(object.name,object.price,object.size,object.gender,object.tag,object.content,object.numOfProduct);\r\n NutrientList.add(object);\r\n allProducts.add(object);\r\n }\r\n // For Cosmetics objects to read\r\n if (fields.length==6){\r\n Cosmetics object2=new Cosmetics();\r\n object2.name = fields[0];\r\n object2.price = Double.parseDouble(fields[1]);\r\n object2.gender = fields[2];\r\n object2.tag=fields[3];\r\n object2.content = fields[4];\r\n object2.numOfProduct = Integer.parseInt(fields[5]);\r\n //object2.addFeatures(object2.name,object2.price,object2.size,object2.gender,object2.tag,object2.content,object2.numOfProduct);\r\n CosmeticsList.add(object2);\r\n allProducts.add(object2);\r\n }\r\n // For clothes objects to read\r\n if(fields.length ==7){\r\n\r\n Clothes object3=new Clothes();\r\n object3.name = fields[0];\r\n object3.price = Double.parseDouble(fields[1]);\r\n object3.size= fields[2];\r\n object3.tag=fields[4];\r\n object3.content = fields[5];\r\n object3.numOfProduct = Integer.parseInt(fields[6]);\r\n object3.addFeatures(object3.name,object3.price,object3.size,\"E\",object3.tag,object3.content,object3.numOfProduct);\r\n ClothesList.add(object3);\r\n allProducts.add(object3);\r\n }\r\n\r\n }}\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private ProductRecord parseLine(String line) {\n\t\tString[] splittedLine = splitAndTrim(line);\n\t\t\n\t\tString name = splittedLine[0];\n\t\tString id = splittedLine[1];\n\t\tint price = Integer.parseInt(splittedLine[2]);\n\t\tint currentStock = Integer.parseInt(splittedLine[3]);\n\t\tint minStock = Integer.parseInt(splittedLine[4]);\n\t\t\n\t\t// Parse memo if exist.\n\t\tString memo = null;\n\t\tif (splittedLine.length >= 6) memo = splittedLine[5];\n\t\t\n\t\t// Get category from product id.\n\t\tString category;\n\t\tint categoryInt = Integer.parseInt(id.split(\"-\")[0]);\n\t\tswitch (categoryInt) {\n\t\tcase 1:\n\t\t\tcategory = \"Food\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tcategory = \"Office\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tcategory = \"Misc.\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tcategory = \"Health\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tcategory = \"Clothing\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tcategory = \"Etc\";\n\t\t}\n\t\t\n\t\treturn new ProductRecord(name, id, category, price, currentStock, minStock, memo);\n\t}", "@Override\n public List<TimetableUpload> parseCsvFile(MultipartFile file) {\n try (Reader reader = new BufferedReader(new InputStreamReader(file.getInputStream()))) {\n // create csv bean reader\n CsvToBean<TimetableUpload> csvToBean = new CsvToBeanBuilder(reader)\n .withType(TimetableUpload.class)\n .withIgnoreLeadingWhiteSpace(true)\n .build();\n return csvToBean.parse();\n } catch (IOException e) {\n System.err.println(\"Something went wrong while parsing the csv file\");\n return null;\n }\n }", "private static ArrayList<QueryCoordinates> loadCoordinatesFromCSVString(String csvStr, boolean debugMode) {\n\t\tArrayList<QueryCoordinates> records = new ArrayList<QueryCoordinates>();\n\t\ttry {\n\t\t\tCSVParser csv = CSVParser.parse(csvStr,\n\t\t\t\t\tCSVFormat.DEFAULT.withFirstRecordAsHeader().withIgnoreHeaderCase().withTrim());\n\t\t\tfor (CSVRecord csvRecord : csv) {\n\t\t\t\ttry {\n\t\t\t\t\tdouble startLon = Double.parseDouble(csvRecord.get(\"start_lon\"));\n\t\t\t\t\tdouble startLat = Double.parseDouble(csvRecord.get(\"start_lat\"));\n\t\t\t\t\tdouble endLon = Double.parseDouble(csvRecord.get(\"end_lon\"));\n\t\t\t\t\tdouble endLat = Double.parseDouble(csvRecord.get(\"end_lat\"));\n\t\t\t\t\trecords.add(new QueryCoordinates(startLon, startLat, endLon, endLat));\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t// ignore invalid rows and try to read all other...\n\t\t\t\t\tString errorMsg = \"CSV input file seems to be formatted incorrectly. Every data field has to contain a float value.\";\n\t\t\t\t\tprintError(errorMsg, null, 0, debugMode, e);\n\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tString errorMsg = \"CSV input file could not be read. Make sure the separator character is a comma: ','\";\n\t\t\tprintError(errorMsg, null, 1, debugMode, e);\n\t\t} catch (IllegalStateException e) {\n\t\t\tString errorMsg = \"CSV input file seems to be formatted incorrectly. Make sure the file has a header row like \\\"start_lon\\\",\\\"start_lat\\\",\\\"end_lon\\\",\\\"end_lat\\\".\";\n\t\t\tprintError(errorMsg, null, 1, debugMode, e);\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tString errorMsg = \"CSV input file seems to be formatted incorrectly. Make sure the file has a header row like \\\"start_lon\\\",\\\"start_lat\\\",\\\"end_lon\\\",\\\"end_lat\\\".\";\n\t\t\tprintError(errorMsg, null, 1, debugMode, e);\n\t\t}\n\t\treturn records;\n\t}", "List<String[]> readCsv(String inputFilePath,int skipLine,char separator)throws IOException;", "public static Product convertToProduct(String line) {\n String[] row = line.split(\",\");\n Product item = new Product();\n String thisLine;\n for (int i = 0; i < row.length; i++) {\n switch (i) {\n case (0):\n item.category = row[i];\n break;\n case (1):\n item.name = row[i];\n break;\n case (2):\n thisLine = row[i];\n if (thisLine.contains(\"\\\"\")){\n thisLine +=row[++i];\n item.price = Double.parseDouble(thisLine.replaceAll(\"\\\\$\", \"\").replaceAll(\"\\\"\", \"\").replaceAll(\",\",\"\"));\n item.stockNum = Integer.parseInt(row[++i]);\n break;\n }else {\n item.price = Double.parseDouble(row[i].replaceAll(\"\\\\$\", \"\").replaceAll(\"\\\"\", \"\"));\n }\n break;\n case (3):\n item.stockNum = Integer.parseInt(row[i]);\n }\n }\n\n item.id = createID();\n return item;\n }", "List<String[]> readCsv(String inputFilePath)throws IOException;", "List<String[]> readCsv(String inputFilePath,int skipLine)throws IOException;", "public static void readCSV() throws IOException {\n\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\tString line;\n\t\tif((line = br.readLine()) != null) {\n\t\t\tsetCSVorder(line);\n\t\t}\n\t\t\n\t\twhile((line = br.readLine()) != null) {\n\t\t\tFlightState fs = getStateFromCSV(line);\n\t\t\tsendToKafka(fs);\n\t\t}\n\t\t\n\t\tbr.close();\n\t}", "public void fromCsv(String line, String separator, NumberFormat numberFormat) throws ParseException {\r\n\t\t\tString[] values = line.split(separator);\r\n\t\t\t\r\n\t\t\tid = values[0];\r\n\t\t\tdate = ZonedDateTime.parse(values[1]);\r\n\t\t\tresolution = values[2];\r\n\t\t\thypothesis = values[3];\r\n\t\t\tquality = (values[4].length() == 0 ? Integer.MIN_VALUE : Integer.parseInt(values[4]));\r\n\t\t\tvalue = numberFormat.parse(values[5]).doubleValue();\r\n\t\t\tunit = values[6];\r\n\t\t}", "public String[] parseLine() {\n String[] tokens = null;\n try {\n tokens = csvReader.readNext();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return tokens;\n }", "public static List<String> parseCSVFile(final String filePath) {\n\t\tLOG.info(\"Entred in to parseCSVFile()\");\n\t\tLOG.info(\"File path is : {}\", filePath);\n\n\t\tList<String> dataList = new ArrayList<>();\n\t\tCSVReader csvReader = null;\n\t\ttry {\n\t\t\tcsvReader = new CSVReader(new FileReader(filePath));\n\t\t\tString[] nextLine;\n\t\t\tint lineNumber = 0;\n\t\t\twhile ((nextLine = csvReader.readNext()) != null) {\n\t\t\t\tlineNumber++;\n\t\t\t\tif (lineNumber == 1)\n\t\t\t\t\tcontinue;\n\t\t\t\tString data = String.join(ReportingDataConstants.CSV_DATA_SPERATOR, nextLine);\n\t\t\t\tLOG.info(\"The data is {}\", data);\n\t\t\t\tdataList.add(data);\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new RuntimeException(\"CSV File not found, please check the file paths\");\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(\"CSV File parse exception, please check the file format\");\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (csvReader != null)\n\t\t\t\t\tcsvReader.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tLOG.error(\"Exception occured while closing reader: {}\", e.getLocalizedMessage());\n\t\t\t}\n\t\t}\n\n\t\tLOG.info(\"Exit from parseCSVFile()\");\n\t\treturn dataList;\n\t}", "public void Read_Csv() {\n\t\t\n\t\tFile file = new File(\"Faucets.csv\");\n\t\tif(file.exists() == false) {\n\t\t\ttry {\n\t\t\t\t if (file.createNewFile()) {\n\t\t\t\t System.out.println(\"File created: \" + file.getName());\n\t\t\t\t } else {\n\t\t\t\t System.out.println(\"File already exists... Error\");\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\tFileWriter myWriter = new FileWriter(\"Faucets.csv\");\n\t\t\t\tmyWriter.write(\"Freebitco.in,3600,228,\");\n\t\t\t\tmyWriter.close();\n\t\t\t\t\n\t\t\t\t\n\t\t\t}catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//Reading the file\n\t\tString line = null;\n\t\ttry {\n\t\t\tFileReader fileReader = new FileReader(\"Faucets.csv\");\n\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\t\t\t\n\t\t\tint x = 0;\n\t\t\tint commacounter = 0;\n\t\t\tint commaposition[] = new int[3];\n\t\t\twhile((line = bufferedReader.readLine()) != null) {\n\t\t\t\t\n\t\t\t\twhile(x < line.length()) {\n\t\t\t\t\t\n\t\t\t\t\tif(line.charAt(x) == ',') {\n\t\t\t\t\t\tcommaposition[commacounter] = x;\n\t\t\t\t\t\tcommacounter +=1;\n\t\t\t\t\t}\n\t\t\t\t\tif(commacounter == 3) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tFaucets.site[amount_counter] = line.substring(0, commaposition[0]);\n\t\t\t\t\t\tFaucets.time[amount_counter] = Integer.parseInt(line.substring(commaposition[0]+1, commaposition[1]));\n\t\t\t\t\t\tFaucets.amount[amount_counter] = Integer.parseInt(line.substring(commaposition[1]+1, commaposition[2]));\n\t\t\t\t\t\tamount_counter += 1;\n\t\t\t\t\t\tcommacounter=0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tx+=1;\n\t\t\t\t}\n\t\t\t\tx=0;\n\t\t\t}\n\t\t\tbufferedReader.close();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\n\t\t\t\n\t}", "private void loadAndProcessInput(){\n transactions_set = new ArrayList<>();\n strItemToInt = new HashMap<>();\n intToStrItem = new HashMap<>();\n \n try{\n BufferedReader br = new BufferedReader(\n new InputStreamReader(\n new FileInputStream(this.inputFilePath)\n ));\n \n String line;\n while((line = br.readLine()) != null){\n String[] tokens = line.split(\" \");\n ArrayList<Integer> itemsId = new ArrayList();\n \n for(String item : tokens){\n if( ! strItemToInt.containsKey(item)){\n strItemToInt.put(item, strItemToInt.size()+1);\n intToStrItem.put(strItemToInt.size(), item);\n }\n itemsId.add(strItemToInt.get(item));\n }\n transactions_set.add(itemsId);\n }\n }\n catch(IOException fnfEx){\n System.err.println(\"Input Error\");\n fnfEx.printStackTrace();\n }\n \n }", "@Test\n\tpublic void testReadCsvFile() throws FileNotFoundException {\n\t\tFileParser fp = new FileParser();\n\t\tArrayList<String> parsedLines = fp.readCsvFile(\"movies.csv\");\n\t\tassertEquals(\"toy story\", parsedLines.get(0));\n\t}", "@Test\r\n\tpublic void readCsvTest() throws IOException {\r\n\t\t\tfail(\"Not yet implemented\");\r\n\t}", "private boolean parseLine()\r\n\t{\r\n\t\tString delim = \"\\t\";\r\n\t\tm_tokenizer = new StringTokenizer(m_line, delim, true);\r\n\t\tString token;\r\n\t\t\r\n\t\tint tokCount = m_tokenizer.countTokens();\r\n\t\tif ((fieldIndexArray.length <= tokCount) &&\t(tokCount <= fieldIndexArray.length*2))\r\n\t\t{\r\n\t\t\tint lastDelim = -2; /** case when line has consecutive (>=2) tabs!*/\r\n\t\t\tint columnIndex = 0;\r\n\t\t\t/** Tokenise the chip data file's line to separate the data to be put in various columns*/\r\n\t\t\tfor (int i=0; i< tokCount; i++) \r\n\t\t\t{\r\n\t\t\t\ttoken = m_tokenizer.nextToken();\r\n\t\t\t\tif (token.equalsIgnoreCase(delim)) \r\n\t\t\t\t{\r\n\t\t\t\t\tif (lastDelim + 1 == i) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t/** 2 consecutive tags - empty string value*/\r\n\t\t\t\t\t\tif(columnIndex<fieldIndexArray.length)\r\n\t\t\t\t\t\t\tbaseRecord.fields[fieldIndexArray[columnIndex++]].append(\"\");\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlastDelim = i;\r\n\t\t\t\t} \r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\t/** Each time when new token rrpresenting column data is encountered then columnIndex is \r\n\t\t\t\t\t * incremented and tokens are stored till the token number is less than total number\r\n\t\t\t\t\t * of tokens on one line according to fieldIndexArray */\r\n\t\t\t\t\tif(columnIndex < fieldIndexArray.length)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t/** If total description length exceeds the precision of that field in the table then \r\n\t\t\t\t\t\t * it will be truncated to load it in the description field*/\r\n\t\t\t\t\t\tif(columnIndex == (fieldIndexArray.length-1))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (token.length() > max)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tStringBuffer tokenbuffer = new StringBuffer(token);\r\n\t\t\t\t\t\t\t\ttokenbuffer.setLength(max);\r\n\t\t\t\t\t\t\t\tif(tokenbuffer.charAt(max-1) != '\"')\r\n\t\t\t\t\t\t\t\t\ttokenbuffer.append('\"');\r\n\t\t\t\t\t\t\t\ttoken=tokenbuffer.toString();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/** Here fieldIndexArray will give the actual location of particular token\r\n\t\t\t\t\t\t * in the chipinformation table. This mapping is already done in fieldIndexArray */\r\n\t\t\t\t\t\tbaseRecord.fields[fieldIndexArray[columnIndex++]].append(token);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} \r\n\t\telse\r\n\t\t{\r\n\t\t\tLogger.log(\"Invalid record: \"+ tokCount + \" fields. \",\r\n\t\t\t\t\tLogger.WARNING);\r\n\t\t\tLogger.log(\"Expected tokens = \"+ fieldIndexArray.length,\r\n\t\t\t\t\tLogger.WARNING);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public List<Lender> readCSVFile(String path){\r\n\r\n List<Lender> inputList = new ArrayList<>();\r\n try{\r\n File inputF = new File(path);\r\n InputStream inputFS = new FileInputStream(inputF);\r\n BufferedReader br = new BufferedReader(new InputStreamReader(inputFS));\r\n // skip the header of the csv\r\n inputList = br.lines().skip(1).map(mapToItem).collect(Collectors.toList());\r\n br.close();\r\n } catch (IOException e) {\r\n throw new QuoteException(\"Error reading the csv file\", e);\r\n }\r\n\r\n return inputList ;\r\n }", "public ArrayList<Invoice> readFromCsv() throws IOException {\n if (!FileIOHelper.exists(this.orderCsv)) return new ArrayList<>(); // Empty array list\n BufferedReader csvFile = FileIOHelper.getFileBufferedReader(this.orderCsv);\n List<String[]> csvLines = readAll(csvFile, 1);\n ArrayList<Invoice> items = new ArrayList<>();\n if (csvLines.size() == 0) return items;\n csvLines.forEach((str) -> items.add(new Invoice(str)));\n return items;\n }", "public void Parse()\n {\n String prepend = \"urn:cerner:mid:core.personnel:c232:\";\n try{\n\n BufferedReader br = new BufferedReader(new FileReader(new File(path)));\n\n String line;\n\n while ((line = br.readLine()) != null)\n {\n line = line.trim();\n String[] lines = line.split(\",\");\n for (String entry : lines)\n {\n entry = entry.trim();\n entry = entry.replace(prepend, replace);\n System.out.println(entry+\",\");\n }\n\n }\n \n br.close();\n }catch(IOException IO)\n {\n System.out.println(IO.getStackTrace());\n } \n \n }", "public DataProcessor(String filename) throws FileNotFoundException{\n\tlst = new ArrayList();\n\tScanner input = new Scanner(new FileReader(filename));\n //skip the first line of the csv file\n\tString escapedLine = input.nextLine();\n \twhile(input.hasNextLine()){\n\t recordCount++;\n\t String line = input.nextLine();\n\t //CORRECTION BLOC to skip quoted commas\n\t if (line.contains(\"\\\"\")){\n\t\tint first= line.indexOf(\"\\\"\");\n\t\twhile(first >0 ){\n\t\t String problem = line.substring(first,line.indexOf(\"\\\"\",first+1)+1);\n\t\t \tint second = line.indexOf(\"\\\"\",first+1);\n\t\t\t//look for comma between quoted\n\t\t\tif(problem.contains(\",\")){\n\t\t\t //replace comma by space not to change string indices\n\t\t\t problem=problem.replace(\",\",\" \");\n\t\t\t line=line.replace(line.substring(first,line.indexOf(\"\\\"\",first+1)+1),problem);\n\t\t\t}\n\t\t\t//look for another quote symbol\n\t\t\tfirst = line.indexOf(\"\\\"\",second+1);\n\t\t}\n\t }\n\t String[] fields = line.split(\",\");\n\t //create Person object to store the suspect's data\n\t Person suspect = new Person(fields[SEX].charAt(0),fields[RACE].charAt(0),Integer.parseInt(fields[DOB]),Integer.parseInt(fields[HEIGHTFT]),fields[EYECOLOR],fields[BUILD].charAt(0));\n\t lst.add(suspect);\n\t}\n\t//close scanner\n\tinput.close();\n }", "List<String[]> readCsv(String inputFilePath, char separator)throws IOException;", "@Test\n void testRead() throws IOException, URISyntaxException {\n final String[] expectedResult = {\n \"-199\t\\\"hello\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"2017/06/20\\\"\t0.0\t1\t\\\"2\\\"\t\\\"823478788778713\\\"\",\n \"2\t\\\"Sdfwer\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"1100/06/20\\\"\tInf\t2\t\\\"NaN\\\"\t\\\",1,2,3\\\"\",\n \"0\t\\\"cjlajfo.\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"3000/06/20\\\"\t-Inf\t3\t\\\"inf\\\"\t\\\"\\\\casdf\\\"\",\n \"-1\t\\\"Mywer\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"06-20-2011\\\"\t3.141592653\t4\t\\\"4.8\\\"\t\\\"  \\\\\\\" \\\"\",\n \"266128\t\\\"Sf\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"06-20-1917\\\"\t0\t5\t\\\"Inf+11\\\"\t\\\"\\\"\",\n \"0\t\\\"null\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"03/03/1817\\\"\t123\t6.000001\t\\\"11-2\\\"\t\\\"\\\\\\\"adf\\\\0\\\\na\\\\td\\\\nsf\\\\\\\"\\\"\",\n \"-2389\t\\\"\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:72\t2017-06-20\t\\\"2017-03-12\\\"\tNaN\t2\t\\\"nap\\\"\t\\\"💩⌛👩🏻■\\\"\"};\n BufferedReader result;\n File file = getFile(\"csv/ingest/IngestCSV.csv\");\n try (FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream stream = new BufferedInputStream(fileInputStream)) {\n CSVFileReader instance = createInstance();\n File outFile = instance.read(Tuple.of(stream, file), null).getTabDelimitedFile();\n result = new BufferedReader(new FileReader(outFile));\n }\n\n assertThat(result).isNotNull();\n assertThat(result.lines().collect(Collectors.toList())).isEqualTo(Arrays.asList(expectedResult));\n }", "@Override\n\tprotected Object csvRecordToObject(String cvsRecord) {\n\t\t \n String[] arrOfStr = cvsRecord.split(\",\");\n\t\t Item item =new Item();\n\t\t item.setItemno(Integer.parseInt(arrOfStr[0]));\n\t\t item.setItemName(arrOfStr[1]);\n\t\t item.setUnitPrice(arrOfStr[2]);\n\t\t return item;\n\t\t\n\t}", "private static String[] parseCSVLine(String line, boolean convertToLowerCase ) {\r\n\t\t\r\n\t\t//split the line om commas, but only if that comma is not between quotes (0 or even nr of quotes ahead)\r\n\t\tString[] tokens = line.split(\",(?=([^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\r\n\t\t\r\n\t\tString[] result = new String[tokens.length];\r\n\t\t\r\n\t\t//get rid of spaces and enclosing double quotes\r\n\t\tfor (int i=0; i<tokens.length; i++) {\r\n\t\t\t\r\n\t\t\tString t = tokens[i].trim().replaceAll(\"^\\\"|\\\"$\", \"\");\r\n\t\t\t\r\n\t\t\tif (convertToLowerCase) {\r\n\t\t\t\tt = t.toLowerCase();\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\tresult[i] = t;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}", "private String[] parseLine(final String nextLine, final boolean readLine)\n throws IOException {\n String line = nextLine;\n if (line.length() == 0) {\n return new String[0];\n } else {\n\n final List<String> fields = new ArrayList<String>();\n StringBuilder sb = new StringBuilder();\n boolean inQuotes = false;\n boolean hadQuotes = false;\n do {\n if (inQuotes && readLine) {\n sb.append(\"\\n\");\n line = getNextLine();\n if (line == null) {\n break;\n }\n }\n for (int i = 0; i < line.length(); i++) {\n final char c = line.charAt(i);\n if (c == CsvConstants.QUOTE_CHARACTER) {\n hadQuotes = true;\n if (inQuotes && line.length() > i + 1\n && line.charAt(i + 1) == CsvConstants.QUOTE_CHARACTER) {\n sb.append(line.charAt(i + 1));\n i++;\n } else {\n inQuotes = !inQuotes;\n if (i > 2 && line.charAt(i - 1) != this.fieldSeparator\n && line.length() > i + 1\n && line.charAt(i + 1) != this.fieldSeparator) {\n sb.append(c);\n }\n }\n } else if (c == this.fieldSeparator && !inQuotes) {\n hadQuotes = false;\n if (hadQuotes || sb.length() > 0) {\n fields.add(sb.toString());\n } else {\n fields.add(null);\n }\n sb = new StringBuilder();\n } else {\n sb.append(c);\n }\n }\n } while (inQuotes);\n if (sb.length() > 0 || fields.size() > 0) {\n if (hadQuotes || sb.length() > 0) {\n fields.add(sb.toString());\n } else {\n fields.add(null);\n }\n }\n return fields.toArray(new String[0]);\n }\n }", "private ImportCommand parseLinesFromFile(BufferedReader br) {\n boolean hasContactWithInvalidField = false;\n boolean hasContactWithoutName = false;\n try {\n String line = br.readLine();\n while (line != null) {\n String[] attributes = line.split(\",\", -1);\n int numAttributes = attributes.length;\n\n if (attributes[NAME_FIELD].equalsIgnoreCase(\"Name\")\n || attributes[NAME_FIELD].equalsIgnoreCase(\"Name:\")) { // ignore headers\n line = br.readLine();\n continue;\n }\n\n if (contactHasNoName(attributes, numAttributes)) {\n hasContactWithoutName = true;\n line = br.readLine();\n continue;\n }\n\n Name name = null;\n Optional<Phone> phone = Optional.empty();\n Optional<Email> email = Optional.empty();\n Optional<Address> address = Optional.empty();\n Meeting meeting = null;\n\n try {\n name = ParserUtil.parseName(attributes[NAME_FIELD]);\n if (!attributes[PHONE_FIELD].matches(\"\")) {\n phone = Optional.of(ParserUtil.parsePhone(attributes[PHONE_FIELD]));\n }\n if (!attributes[EMAIL_FIELD].matches(\"\")) {\n email = Optional.of(ParserUtil.parseEmail(attributes[EMAIL_FIELD]));\n }\n if (!attributes[ADDRESS_FIELD].matches(\"\")) {\n address = Optional.of(ParserUtil.parseAddress(attributes[ADDRESS_FIELD]));\n }\n if (!attributes[MEETING_FIELD].matches(\"\")) {\n meeting = ParserUtil.parseMeeting(attributes[MEETING_FIELD]);\n }\n } catch (ParseException pe) {\n hasContactWithInvalidField = true;\n line = br.readLine();\n continue;\n }\n\n ArrayList<String> tags = new ArrayList<>();\n //Check for tags\n if (numAttributes > TAG_FIELD_START) {\n for (int i = TAG_FIELD_START; i < numAttributes; i++) {\n if (!attributes[i].matches(\"\")) {\n tags.add(attributes[i]);\n }\n }\n }\n\n Set<Tag> tagList = null;\n try {\n tagList = ParserUtil.parseTags(tags);\n } catch (ParseException e) {\n line = br.readLine();\n continue;\n }\n if (meeting == null) {\n persons.add(new Person(name, phone, email, address, tagList));\n } else {\n persons.add(new Person(name, phone, email, address, tagList, meeting));\n }\n line = br.readLine();\n }\n br.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n return new ImportCommand(persons, hasContactWithInvalidField, hasContactWithoutName);\n }", "public static List<List<String>> getCSV2(String filepath) { //this method words the best\r\n List<List<String>> records = new ArrayList<>();\r\n try (BufferedReader br = new BufferedReader(new FileReader(filepath))) {\r\n String line;\r\n int lineCounter = 1; // this is to stop it from reading lines after the data is done\r\n while ((line = br.readLine()) != null) {\r\n String[] values = line.split(\",\");\r\n if (values.length < 2 && lineCounter > 14) { // <----- the 14th line is chosen arbitrarily.\r\n System.out.println(\"end of file\");\r\n break;\r\n } else {\r\n records.add(Arrays.asList(values));\r\n lineCounter++;\r\n }\r\n }\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return records;\r\n }", "@ParameterizedTest\n @CsvFileSource(files = \"src/test/resources/params/shoppinglist3.csv\",\n numLinesToSkip = 1, delimiterString = \"___\") // Delimiter string in this case.\n public void csvFileSource_StringDoubleIntStringString3(String name,\n double price, int qty, String uom,\n String provider){\n System.out.println(\"name = \" + name + \", price = \" + price + \", qty = \" + qty\n + \", uom = \" + uom + \", provider = \" + provider);\n }", "public boolean checkCSVIntegrity(final ProgressMonitor monitor,\r\n final File csvFile)\r\n {\r\n if (monitor == null)\r\n throw new NullPointerException(\"monitor may not be null\");\r\n\r\n boolean valid = true;\r\n\r\n try\r\n {\r\n FileInputStream fis = new FileInputStream(csvFile);\r\n BufferedInputStream bis = new BufferedInputStream(fis);\r\n\r\n byte[] rCache = new byte[1024];\r\n int numberOfChars = 0;\r\n int numColumns = 0;\r\n int lastPosition = 0;\r\n boolean headerComplete = false;\r\n\r\n /* read header and identify amount of columns */\r\n while (!headerComplete)\r\n {\r\n numberOfChars = bis.read(rCache, 0, 1024);\r\n if (numberOfChars == -1)\r\n break;\r\n\r\n for (lastPosition = 0; lastPosition < numberOfChars; lastPosition++)\r\n {\r\n if (rCache[lastPosition] == SEPARATOR)\r\n {\r\n numColumns++;\r\n }\r\n else if (rCache[lastPosition] == '\\n')\r\n {\r\n numColumns++;\r\n headerComplete = true;\r\n break;\r\n }\r\n else\r\n {\r\n /*\r\n * for each other character nothing has to be done, this part will\r\n * be removed by the compiler so just leave for information\r\n */\r\n }\r\n }\r\n }\r\n\r\n /* not ending header */\r\n if (!headerComplete)\r\n {\r\n monitor\r\n .setStatusText(\"Keine Daten oder keine Kopfzeile oder Encoding falsch. Siehe http://http://www.jverein.de/administration_import.php\");\r\n valid = false;\r\n }\r\n\r\n /* the position needs to increased because of the break in the for loop */\r\n lastPosition++;\r\n\r\n int columnsPerLine = 0;\r\n int lineNo = 1;\r\n /* count columns in each line */\r\n do\r\n {\r\n\r\n for (; lastPosition < numberOfChars; lastPosition++)\r\n {\r\n if (rCache[lastPosition] == SEPARATOR)\r\n columnsPerLine++;\r\n else if (rCache[lastPosition] == ' ')\r\n {\r\n if (lastPosition - 1 >= 0 && rCache[lastPosition - 1] == SEPARATOR)\r\n {\r\n monitor\r\n .setStatusText(String\r\n .format(\r\n \"Leerzeichen nach einem Semikolon in Zeile: {0} und Spalte: {1}\",\r\n new Object[] { lineNo + \"\", columnsPerLine + \"\" }));\r\n valid = false;\r\n }\r\n if (lastPosition + 1 < numberOfChars\r\n && rCache[lastPosition + 1] == SEPARATOR)\r\n {\r\n monitor\r\n .setStatusText(String\r\n .format(\r\n \"Leerzeichen vor einem Semikolon in Zeile: {0} und Spalte: {1}\",\r\n new Object[] { lineNo + \"\", columnsPerLine + \"\" }));\r\n valid = false;\r\n }\r\n }\r\n else if (rCache[lastPosition] == '\\n')\r\n {\r\n columnsPerLine++;\r\n lineNo++;\r\n if (columnsPerLine != numColumns)\r\n {\r\n monitor\r\n .setStatusText(String\r\n .format(\r\n \"Anzahl der Spalten in Zeile: {0} passt nicht mit der Anzahl Spalten in der Kopfzeile ueberein.\",\r\n lineNo + \"\"));\r\n valid = false;\r\n }\r\n columnsPerLine = 0;\r\n }\r\n else\r\n {\r\n /*\r\n * for each other character nothing has to be done, this part will\r\n * be removed by the compiler so just leave it for information\r\n */\r\n }\r\n }\r\n lastPosition = 0;\r\n numberOfChars = bis.read(rCache, 0, 1024);\r\n }\r\n while (numberOfChars != -1);\r\n\r\n bis.close();\r\n fis.close();\r\n }\r\n catch (FileNotFoundException e)\r\n {\r\n Logger.error(\"Fehler\", e);\r\n valid = false;\r\n }\r\n catch (IOException e)\r\n {\r\n Logger.error(\"Fehler\", e);\r\n valid = false;\r\n }\r\n return valid;\r\n }", "private void parseRecord(String line){\n\t\tString[] recordSplit = line.split(\",\");\n\t\tString employeeId = recordSplit[RECORD_EMPLOYEE];\n\t\t/**\n\t\t * check if the key matching employeeId is found in \n\t\t * employeesStocks if not create a new EmployeeStocks \n \t\t * with employeeId as key\n\t\t */\n\t\t\n\t\tif(!mStockReport.getEmployeesRecords().containsKey(employeeId)){\n\t\t\tmStockReport.getEmployeesRecords().put(employeeId, new EmployeeRecords());\n\t\t\tmStockReport.getEmployeesRecords().get(employeeId).setEmployeeId(employeeId);\n\t\t}\n\t\tint recordDate = Integer.parseInt(recordSplit[RECORD_DATE]);\n\t\tRecord record = createRecord(recordSplit);\n\t\tswitch(recordSplit[RECORD_TYPE]){\n\t\tcase TYPE_VEST:\n\t\t\tmStockReport.getEmployeesRecords().get(employeeId).putVests(recordDate, record);\n\t\t\tbreak;\n\t\tcase TYPE_SALE:\t\n\t\t\tmStockReport.getEmployeesRecords().get(employeeId).putSales(recordDate, record);\n\t\t\tbreak;\n\t\tcase TYPE_PERF:\n\t\t\tmStockReport.getEmployeesRecords().get(employeeId).putPerfs(recordDate, record);\n\t\t\tbreak;\n\t\t}\n\t}", "public static void processDataFile() {\n final String INPUT_FILENAME = \"input/assn6input1.txt\";\n File inputFile = null;\n Scanner inputScanner = null;\n System.out.println(\"Reading data from file: \" + INPUT_FILENAME);\n System.out.println();\n try {\n inputFile = new File(INPUT_FILENAME);\n inputScanner = new Scanner(inputFile);\n } catch(FileNotFoundException e) {\n System.err.println(\"Error opening file \" + INPUT_FILENAME);\n }\n while(inputScanner.hasNext()) {\n String[] dataLine = inputScanner.nextLine().split(\",\");\n // Is the first token \"REALTOR\"?\n if(dataLine[0].toUpperCase().equals(\"REALTOR\")) {\n if(dataLine[1].toUpperCase().equals(\"ADD\")) {\n addRealtor(dataLine);\n }\n else if(dataLine[1].toUpperCase().equals(\"DEL\")) {\n //deleteRealtor(dataLine[2]);\n }\n else {\n \n }\n }\n // Is the first token \"PROPERTY\"?\n else if(dataLine[0].toUpperCase().equals(\"PROPERTY\")) {\n if(dataLine[1].toUpperCase().equals(\"ADD\")) {\n addProperty(dataLine);\n }\n else if(dataLine[1].toUpperCase().equals(\"DEL\")) {\n //deleteProperty(Integer.parseInt(dataLine[2]));\n }\n else {\n \n }\n } else {\n // not realtor or property in the first token\n System.out.println(\"\\tNeither realtor, nor property in first\"\n + \" token\");\n }\n }\n inputScanner.close();\n }", "@ParameterizedTest\n @CsvFileSource(files = {\"src/test/resources/params/shoppinglist.csv\",\n \"src/test/resources/params/shoppinglist2.csv\"},\n numLinesToSkip = 1) // The first line in .csv is a header, this is to skip that line\n public void csvFileSource_StringDoubleIntStringString2(String name,\n double price, int qty, String uom,\n String provider){\n System.out.println(\"name = \" + name + \", price = \" + price + \", qty = \" + qty\n + \", uom = \" + uom + \", provider = \" + provider);\n }", "@Override\n public void csvImport(String filename) {\n try {\n FileReader r = new FileReader(filename);\n Scanner in = new Scanner(r);\n\n while (in.hasNext()) {\n String firstInput = in.next().trim();\n String firstName = firstInput.substring(0, firstInput.length() - 1).trim();\n String lastInput = in.next().trim();\n String lastName = lastInput.substring(0, lastInput.length() - 1).trim();\n String ID = in.next().substring(0, 5);\n int pID = Integer.parseInt(ID);\n String grade = in.next();\n\n Student s = new Student(firstName, lastName, pID);\n Grade g = new Grade(grade);\n\n map.put(s, g);\n }\n checker = true;\n } catch (FileNotFoundException ex) {\n System.out.println(\"File was not found\");\n checker = false;\n }\n }", "public static void test000(String[] args) throws IOException\n {\n\n\n //System.out.println(sql_insert_shipto_template);\n\n// sql_insert_shipto_template = sql_insert_shipto_template.replaceAll(\"%SALES_ORGANIZATION_CODE%\", \"261\");\n// sql_insert_shipto_template = sql_insert_shipto_template.replaceAll(\"%DC_SHORTNAME%\", \"PF\");\n// sql_insert_shipto_template = sql_insert_shipto_template.replaceAll(\"%SHIPTO_CODE%\", \"10156409\");\n// sql_insert_shipto_template = sql_insert_shipto_template.replaceAll(\"%PRODUCT_CODE%\", \"10104574\");\n// sql_insert_shipto_template = sql_insert_shipto_template.replaceAll(\"%STARTDATE%\", \"01.02.2014\");\n// sql_insert_shipto_template = sql_insert_shipto_template.replaceAll(\"%FINISHDATE%\", \"31.12.9999\");\n\n\n // String test = \"1\\t2\\t3\\n4\\t5\\t6\";\n\n String test = \"SO;SHIPTO;SHIPTO;DCSHORT;REP;GRD;Name;start date;end date\\n\" +\n \"261;10156405PF;10156405;PF;249394;10104570;A.KORKUNOV DARK 5*10*100G;07.10.2014;31.12.9999\\n\" +\n \"261;10156405CH;10156405;CH;249410;10104542;A.KORKUNOV MILK 5*10*100G;07.10.2014;31.12.9999\\n\" +\n \"377;10156409PF;10156409;PF;249399;10104574;A.KORKUNOV DARK ALMOND 5*10*100G;07.10.2014;31.12.9999\\n\";\n\n\n //CSVParser parser = CSVParser.parse(test, CSVFormat.newFormat(';'));\n File file = new File(\"c:\\\\MATDET_SHIPTO_EXAMPLE.csv\");\n CSVParser parser = CSVParser.parse(file, java.nio.charset.Charset.defaultCharset(), CSVFormat.newFormat(';'));\n\n int rownum = 0;\n for (CSVRecord strings : parser)\n {\n\n if (rownum++ == 0)\n continue;\n String SO = strings.get(0);\n String SHIPTO = strings.get(2);\n String DCSHORT = strings.get(3);\n //String REP = strings.get(4);\n String PRODUCT = strings.get(5);\n String START = strings.get(7);\n String END = strings.get(8);\n\n String temp = SQL_INSERT_TMATDET_SHIPTO_TEMPLATE;\n temp = temp.replaceAll(\"%SALES_ORGANIZATION_CODE%\", SO);\n temp = temp.replaceAll(\"%DC_SHORTNAME%\", DCSHORT);\n temp = temp.replaceAll(\"%SHIPTO_CODE%\", SHIPTO);\n temp = temp.replaceAll(\"%PRODUCT_CODE%\", PRODUCT);\n temp = temp.replaceAll(\"%STARTDATE%\", START);\n temp = temp.replaceAll(\"%FINISHDATE%\", END);\n\n\n System.out.println(temp);\n }\n\n System.out.println(\"rows=\" + rownum);\n\n\n// CsvParser parser = new CsvParserImpl();\n// CSV\n// parser.\n// List parsed = parser.parse(\"1\\t2\\t3\\n4\\t5\\t6\");\n// System.out.println(parsed.get(0));\n\n //System.out.println(sql_insert_shipto_template);\n\n }", "public void readFile(){\r\n\t\tFileInputStream inputStream = null;\r\n\t\tScanner scan = null;\r\n\t\tString path = \"C:/Users/spandya/workspace/LatestPrice.csv\";\r\n\t\ttry {\r\n\t\t\tinputStream = new FileInputStream(path);\r\n\t\t\tscan = new Scanner(inputStream, \"UTF-8\");\r\n\t\t\twhile(scan.hasNext()){\r\n\t\t\t\tString line = scan.nextLine();\r\n\t\t\t\tString firstWord = line.split(\",\")[0];\r\n\t\t\t\tString latestPrice = line.substring(line.lastIndexOf(\",\")+1);\r\n\t\t\t\tSystem.out.println(firstWord+\":\"+latestPrice);\r\n\t\t\t}\r\n\t\t\tif(scan.ioException() != null){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthrow scan.ioException();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tif(inputStream != null){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tinputStream.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(scan != null){\r\n\t\t\t\tscan.close();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void importData(String filePath) {\n\t\tString[] allLines = readFile(filePath);\n\n\t\t//Obtains the date to give to all sales from the cell in the first line and first column of the csv\n\t\t//And formats it into the expected format.\n\t\tString[] firstLine = allLines[0].split(\",(?=([^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\", -1);\n\t\tString[] title = firstLine[0].split(\"\\\\(\");\n\t\tSimpleDateFormat oldFormat = new SimpleDateFormat(\"MMMMM, yyyy\");\n\t\tSimpleDateFormat newFormat = new SimpleDateFormat(\"MMM yyyy\");\n\t\tDate date = null;\n\t\ttry {\n\t\t\tdate = oldFormat.parse(title[1].replaceAll(\"[()]\", \"\"));\n\t\t} catch (ParseException e) {\n\t\t\tSystem.out.println(\"There was parsing the date in the first cell of the first line of the csv.\\n\" \n\t\t\t\t\t+ \" A date of the format 'October, 2017' was expected.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.monthAndYear = newFormat.format(date);\n\n\t\t//Parses data for each currency and places it in class variable listForex by calling importForex() on each currency line of csv\n\t\t//Considers that the first line of currencies is the fourth line of csv.\n\t\t//Stops if counter reaches the total number of lines of csv, or if the line is shorter than 15 characters,\n\t\t//so that it doesn't try to parse the summary lines below the last currency line.\n\t\tint counter = 3;\n\t\twhile (counter< allLines.length && allLines[counter].length() > 15) {\n\t\t\timportForex(allLines[counter]);\n\t\t\tcounter++;\n\t\t}\n\n\t\tChannel apple = obtainChannel(\"Apple\", new AppleFileFormat(), false);\n\n\t\t//Places the imported data in the app,\n\t\t//making sure not to replace the existing list of FX rates for this month and year if there is one.\n\t\t//It does however update the FX rate value for currencies that are already in the data for this month.\n\t\tif (apple.getHistoricalForex().containsKey(monthAndYear)) {\n\t\t\tHashMap<String, Double> existingList = apple.getHistoricalForex().get(monthAndYear);\n\t\t\tfor (String s : existingList.keySet()) {\n\t\t\t\tlistForex.put(s, existingList.get(s));\n\t\t\t}\t\n\t\t}\n\t\tapple.addHistoricalForex(monthAndYear, listForex);\n\t}", "private Iterable<CSVRecord> obtainCsvIterable()\n throws FileNotFoundException, IOException {\n return CSVFormat.RFC4180\n .withFirstRecordAsHeader()\n .parse(this.fileReader);\n\n }", "@Override\r\n\tpublic ArrayList<String> importCsv(File file) {\r\n\t\t\tFileReader monFichier = null;\r\n\t\t\tBufferedReader tampon = null;\r\n\t\t\tArrayList<String> aLImport = new ArrayList<String>();\r\n\t\t\tString[] tabString ;\r\n\t\t\tint sizeLine;\r\n\t\t\r\n\t\t\ttry {\r\n\t\t\t\t// file path\r\n\t\t\t\tmonFichier = new FileReader(file.getAbsolutePath());\r\n\t\t\t\ttampon = new BufferedReader(monFichier);\r\n\r\n\t\t\t\t// read the first line of the file .csv\r\n\t\t\t\tString ligneTemp = tampon.readLine();\r\n\t\t\t\ttabString = ligneTemp.split(\";\");\r\n\t\t\t\tthis.setNbColumnsRead(tabString.length);\r\n\t\t\t\t\r\n\t\t\t\t//Start of the actual content (first line only acting as a header)\r\n\t\t\t\tligneTemp = tampon.readLine();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\t// faire la gestion des erreurs \r\n\t\t\t\t\t\t/*JOptionPane.showMessageDialog(this, \"Le fichier .csv n'est pas valide\", \"Erreur !\",\r\n\t\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);*/\r\n\t\t\t\t\r\n\t\t\t\t// read all the lines one by one and split them to keep the\r\n\t\t\t\t// structure's name\r\n\t\t\t\twhile (ligneTemp != null) {\t\t\t\t\t\r\n\t\t\t\t\ttabString = ligneTemp.split(\";\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tsizeLine = tabString.length;\r\n\t\t\t\t\t//This for start at 1 in order to skip the first cell, assuming it is always \"Start\" and is therefore not required in the ArrayList\r\n\t\t\t\t\tfor (int i = 1; i < sizeLine; i+=2) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!tabString[i].contains(\"End\")){\r\n\t\t\t\t\t\t\taLImport.add(tabString[i]);\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\tligneTemp = tampon.readLine();\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (IOException exception) {\r\n\t\t\t\texception.printStackTrace();\r\n\t\t\t\treturn null;\r\n\t\t\t} finally {\r\n\t\t\t\ttry {\r\n\t\t\t\tif (tampon != null)\r\n\t\t\t\t{\r\n\t\t\t\t\ttampon.close();\r\n\t\t\t\t}\r\n\t\t\t\tif (monFichier != null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmonFichier.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (IOException exception1) {\r\n\t\t\t\t\texception1.printStackTrace();\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\treturn aLImport;\t\r\n\t}", "private static void processCsvEntry(String entryFileName, byte[] csvBytes, JsonNode columnClassJson, Connection connection,\n String keywordEscapeChar, int batchSize, List<DeleteWrapper> allDeletes) throws Exception {\n\n String tableName = Files.getNameWithoutExtension(entryFileName);\n ArrayList<String> actualColumns = getTableColumns(connection, tableName);\n\n ByteArrayInputStream bais = new ByteArrayInputStream(csvBytes);\n InputStreamReader isr = new InputStreamReader(bais);\n CSVParser csvParser = new CSVParser(isr, CSV_FORMAT.withHeader());\n\n //find out what columns we've got\n List<String> columns = createHeaderList(csvParser);\n List<String> columnsRemove = new ArrayList<>();\n for (String column : columns) {\n if (!column.equals(COL_IS_DELETE) && !column.equals(COL_ID)) {\n if (!actualColumns.contains(column)) {\n columnsRemove.add(column);\n }\n }\n }\n for (String column : columnsRemove) {\n LOG.debug(\"Removing column:\" + column + \" from the header map for table:\" + tableName);\n columns.remove(column);\n }\n\n Map<String, Class> columnClasses = createHeaderColumnMap(entryFileName, columnClassJson, columns);\n\n //validate that file has \"id\" and \"is_delete\" always\n if (!columns.contains(COL_IS_DELETE)) {\n throw new Exception(\"\" + entryFileName + \" doesn't have an \" + COL_IS_DELETE + \" column\");\n }\n if (!columns.contains(COL_ID)) {\n throw new Exception(\"\" + entryFileName + \" doesn't have an \" + COL_ID + \" column\");\n }\n\n //since we're dealing with small volumes, we can just read keep all the records in memory\n List<CSVRecord> upserts = new ArrayList<>();\n List<DeleteWrapper> deletes = new ArrayList<>();\n\n int row = 0;\n\n Iterator<CSVRecord> csvIterator = csvParser.iterator();\n while (csvIterator.hasNext()) {\n CSVRecord csvRecord = csvIterator.next();\n String isDeleteStr = csvRecord.get(COL_IS_DELETE);\n if (Strings.isNullOrEmpty(isDeleteStr)) {\n throw new Exception(\"Empty \" + COL_IS_DELETE + \" value on row \" + row + \" of \" + entryFileName);\n }\n boolean isDelete = Boolean.parseBoolean(isDeleteStr);\n\n if (isDelete) {\n //we have to play deletes in reverse, so just add to this list and they'll be processed after all the upserts\n deletes.add(new DeleteWrapper(tableName, csvRecord, columns, columnClasses));\n\n } else {\n upserts.add(csvRecord);\n }\n\n row ++;\n }\n\n LOG.trace(\"Got \" + upserts.size() + \" upserts and \" + deletes.size() + \" deletes for \" + tableName);\n\n //add the deletes to this list to apply later\n allDeletes.addAll(deletes);\n\n if (!upserts.isEmpty()) {\n\n //when doing a bulk, we can have 300,000+ practitioners, so do them in batches, so we're\n //not keeping huge DB transactions open\n List<CSVRecord> batch = new ArrayList<>();\n for (CSVRecord record : upserts) {\n batch.add(record);\n\n //in testing, batches of 20000 seemed best, although there wasn't much difference between batches of 5000 up to 100000\n if (batch.size() >= batchSize) {\n fileUpsertsWithRetry(batch, columns, columnClasses, tableName, connection, keywordEscapeChar);\n batch = new ArrayList<>();\n }\n }\n if (!batch.isEmpty()) {\n fileUpsertsWithRetry(batch, columns, columnClasses, tableName, connection, keywordEscapeChar);\n }\n }\n }", "void readProducts(String filename) throws FileNotFoundException {\n\t\t//reads the file, computes the number of rows in the file\n\t\tScanner input=new Scanner(new File(filename));\n\t\tint numOfRow=0;\n\t\twhile(input.hasNextLine()) {\n\t\t\tnumOfRow++;\n\t\t\tinput.nextLine();\n\t\t}\n\t\t//load the products array one by one, using constructor\n\t\tproducts=new Product[numOfRow-1];\n\t\tScanner input2=new Scanner(new File(filename));\n\t\tinput2.nextLine();\n\t\tint i=0;\n\t\twhile(input2.hasNextLine()) {\n\t\t\tString row=input2.nextLine();\n\t\t\tString[] split1=row.split(((char)34+\",\"+(char)34));\n\t\t\tproducts[i++]=new Product(split1[0].substring(1, split1[0].length())\n\t\t\t\t\t, split1[1], split1[4], split1[7].substring(0, split1[7].length()-1));\n\t\t}\n\t\t//close the input\n\t\tinput.close();\n\t\tinput2.close();\n\t}", "public void fillBoardFromCSV(String pathToCSV){\r\n \r\n BufferedReader br = null;\r\n String line = \" \";\r\n int index = 0;\r\n \r\n \r\n try{\r\n br = new BufferedReader(new FileReader(pathToCSV));\r\n while ((line = br.readLine()) != null) {\r\n String[] lines = line.split(\",\");\r\n System.out.println(lines.length);\r\n for(int i = 0; i < 11; i++){\r\n if(lines[i].equals(\"f\")){\r\n board[index][i] = new Flat(index,i);\r\n }\r\n if(lines[i].equals(\"s\")){\r\n board[index][i] = new Slot(index,i);\r\n }\r\n }\r\n index++; \r\n }\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } finally {\r\n if (br != null) {\r\n try {\r\n br.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n \r\n \r\n }", "private List<String> read_level_row(String line){\r\n List<String> row = new ArrayList<>();\r\n try (Scanner rowScanner = new Scanner(line)){\r\n rowScanner.useDelimiter(\",\");\r\n while (rowScanner.hasNext()) {\r\n row.add(rowScanner.next());\r\n }\r\n }\r\n return row;\r\n }", "private void readData () throws SQLException {\n int currentFetchSize = getFetchSize();\n setFetchSize(0);\n close();\n setFetchSize(currentFetchSize);\n moveToInsertRow();\n\n CSVRecord record;\n\n for (int i = 1; i <= getFetchSize(); i++) {\n lineNumber++;\n try {\n\n if (this.records.iterator().hasNext()) {\n record = this.records.iterator().next();\n\n for (int j = 0; j <= this.columnsTypes.length - 1; j++) {\n\n switch (this.columnsTypes[j]) {\n case \"VARCHAR\":\n case \"CHAR\":\n case \"LONGVARCHAR\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateString(j + 1, record.get(j));\n break;\n case \"INTEGER\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateInt(j + 1, Integer.parseInt(record.get(j)));\n break;\n case \"TINYINT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateByte(j + 1, Byte.parseByte(record.get(j)));\n break;\n case \"SMALLINT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateShort(j + 1, Short.parseShort(record.get(j)));\n break;\n case \"BIGINT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateLong(j + 1, Long.parseLong(record.get(j)));\n break;\n case \"NUMERIC\":\n case \"DECIMAL\":\n /*\n * \"0\" [0,0]\n * \"0.00\" [0,2]\n * \"123\" [123,0]\n * \"-123\" [-123,0]\n * \"1.23E3\" [123,-1]\n * \"1.23E+3\" [123,-1]\n * \"12.3E+7\" [123,-6]\n * \"12.0\" [120,1]\n * \"12.3\" [123,1]\n * \"0.00123\" [123,5]\n * \"-1.23E-12\" [-123,14]\n * \"1234.5E-4\" [12345,5]\n * \"0E+7\" [0,-7]\n * \"-0\" [0,0]\n */\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateBigDecimal(j + 1, new BigDecimal(record.get(j)));\n break;\n case \"DOUBLE\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateDouble(j + 1, Double.parseDouble(record.get(j)));\n break;\n case \"FLOAT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateFloat(j + 1, Float.parseFloat(record.get(j)));\n break;\n case \"DATE\":\n // yyyy-[m]m-[d]d\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateDate(j + 1, Date.valueOf(record.get(j)));\n break;\n case \"TIMESTAMP\":\n // yyyy-[m]m-[d]d hh:mm:ss[.f...]\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateTimestamp(j + 1, Timestamp.valueOf(record.get(j)));\n break;\n case \"TIME\":\n // hh:mm:ss\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateTime(j + 1, Time.valueOf(record.get(j)));\n break;\n case \"BOOLEAN\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateBoolean(j + 1, convertToBoolean(record.get(j)));\n break;\n default:\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateString(j + 1, record.get(j));\n break;\n }\n }\n\n insertRow();\n incrementRowCount();\n }\n } catch (Exception e) {\n LOG.error(\"An error has occurred reading line number {} of the CSV file\", lineNumber, e);\n throw e;\n }\n }\n\n moveToCurrentRow();\n beforeFirst(); \n }", "private void handleImportLines(String inputLineString ){\n String [] splitInputLine = inputLineString.split(\",\");\n String command = splitInputLine[0];\n String name = \"\";\n String date = \"\";\n String department = \"\";\n\n double pay = 0;\n int role = 0;\n\n if(splitInputLine.length == ADDPARTFULLCOMMANDS){\n name = splitInputLine[1];\n department = splitInputLine[2];\n date = splitInputLine[3];\n pay = Double.parseDouble(splitInputLine[4]);\n\n }else if(splitInputLine.length == ADDMANAGECOMMANDS){\n name = splitInputLine[1];\n department = splitInputLine[2];\n date = splitInputLine[3];\n pay = Double.parseDouble(splitInputLine[4]);\n role = Integer.parseInt(splitInputLine[5]);\n }else if(splitInputLine.length == OTHEREXPECTEDCOMMANDS){\n name = splitInputLine[1];\n department = splitInputLine[2];\n date = splitInputLine[3];\n }\n\n if(command.equals(\"P\")){\n Profile newEmployeeProfile = profileData(name, department, date);\n Employee newEmployee = new Parttime(newEmployeeProfile, pay);\n company.add(newEmployee);\n }else if(command.equals(\"F\")){\n Profile newEmployeeProfile = profileData(name, department, date);\n Employee newEmployee = new Fulltime(newEmployeeProfile, pay);\n company.add(newEmployee);\n }else if(command.equals(\"M\")){\n Profile newEmployeeProfile = profileData(name, department, date);\n Employee newEmployee = new Management(newEmployeeProfile, pay, role);\n company.add(newEmployee);\n }\n }", "@Test\n void testBrokenCSV() throws IOException {\n try {\n createInstance().read(null, null);\n fail(\"IOException not thrown on null csv\");\n } catch (NullPointerException ex) {\n assertThat(ex.getMessage()).isNull();\n } catch (IngestException ex) {\n assertThat(ex.getErrorKey()).isEqualTo(IngestError.UNKNOWN_ERROR);\n }\n File file = getFile(\"csv/ingest/BrokenCSV.csv\");\n try (FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream stream = new BufferedInputStream(fileInputStream)) {\n createInstance().read(Tuple.of(stream, file), null);\n fail(\"IOException was not thrown when collumns do not align.\");\n } catch (IngestException ex) {\n assertThat(ex.getErrorKey()).isEqualTo(IngestError.CSV_RECORD_MISMATCH);\n }\n }", "@Insert({ \"insert into csv_file (id, pid, \", \"filename, start_time, \", \"end_time, length, \", \"density, machine, \",\n\t\t\t\"ar, path, size, \", \"uuid, header_time, \", \"last_update, conflict_resolved, \", \"status, comment, \",\n\t\t\t\"width, start_version, \", \"end_version)\", \"values (#{id,jdbcType=INTEGER}, #{pid,jdbcType=VARCHAR}, \",\n\t\t\t\"#{filename,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, \",\n\t\t\t\"#{endTime,jdbcType=TIMESTAMP}, #{length,jdbcType=INTEGER}, \",\n\t\t\t\"#{density,jdbcType=DOUBLE}, #{machine,jdbcType=VARCHAR}, \",\n\t\t\t\"#{ar,jdbcType=BIT}, #{path,jdbcType=VARCHAR}, #{size,jdbcType=BIGINT}, \",\n\t\t\t\"#{uuid,jdbcType=CHAR}, #{headerTime,jdbcType=TIMESTAMP}, \",\n\t\t\t\"#{lastUpdate,jdbcType=TIMESTAMP}, #{conflictResolved,jdbcType=BIT}, \",\n\t\t\t\"#{status,jdbcType=INTEGER}, #{comment,jdbcType=VARCHAR}, \",\n\t\t\t\"#{width,jdbcType=INTEGER}, #{startVersion,jdbcType=INTEGER}, \", \"#{endVersion,jdbcType=INTEGER})\" })\n\tint insert(CsvFile record);", "void insertCSV(String file_path) {\n try {\n InputStream fileStream = new FileInputStream(file_path);\n Reader decoder = new InputStreamReader(fileStream, \"UTF-8\");\n BufferedReader buffered = new BufferedReader(decoder);\n\n for (String line = buffered.readLine(); line != null; line = buffered.readLine()) {\n // process line\n String[] tokens = line.trim().split(\"\\\\s+\"); // split line into different fields\n\n // valid table row should have 16 fields\n if (tokens.length == 16) {\n insertSingleRow(tokens);\n } else {\n continue;\n }\n }\n } catch (Exception e) {\n logger.log(Level.WARNING, \"insertGZip error \", e);\n }\n }", "@ParameterizedTest\n @CsvFileSource(files = \"src/test/resources/params/shoppinglist.csv\",\n numLinesToSkip = 1) // The first line in .csv is a header, this is to skip that line\n public void csvFileSource_StringDoubleIntStringString(String name,\n double price, int qty, String uom,\n String provider){\n System.out.println(\"name = \" + name + \", price = \" + price + \", qty = \" + qty\n + \", uom = \" + uom + \", provider = \" + provider);\n }", "public static List<CoffeeShop> readCSVFile(String filePath) {\n\t\tList<CoffeeShop> coffeeShopList = new ArrayList<>();\n\t\tString fileContent = readFile(filePath);\n\t\ttry{\n\t\t\tString[] coffeeStrings = fileContent.split(LINE_SEPARATOR);\n\t\t\tfor(String coffeeString : coffeeStrings){\n\t\t\t\tString[] shopValues = coffeeString.split(FILE_SEPARATOR);\n\t\t\t\tcoffeeShopList.add(new CoffeeShop(shopValues[0], Double.parseDouble(shopValues[1]), Double.parseDouble(shopValues[2])));\n\t\t\t}\n\t\t}catch(Exception e){\n\t\t\tSystem.out.println(\"Cannot read CSV file as it is Malformed \" +e.getMessage());\n\t\t}\n\t\t\n\t\treturn coffeeShopList;\n\t}", "@Test\n public void givenStateCensusAnalyserFile_WhenImproperDelimiter_ReturnsException() {\n\n String CSV_FILE_PATH = \"src/test/resources/StateCensusData.csv\";\n try {\n indianCensusAnalyzer.loadStateCensusCSVData(CensusAnalyser.Country.INDIA, CSV_FILE_PATH);\n } catch (CSVBuilderException e) {\n Assert.assertEquals(CSVBuilderException.TypeOfException.INCORRECT_DELIMITER_HEADER_EXCEPTION, e.typeOfException);\n }\n }", "public List<String[]> parseCSV(String filename) throws FileNotFoundException {\n Scanner scanner = new Scanner(new File(filename));\n List<String[]> list = new ArrayList<>();\n while (scanner.hasNextLine()) {\n String line = scanner.nextLine();\n list.add(line.split(\", \"));\n }\n scanner.close();\n return list;\n }", "public List<Products> readFile(BufferedReader reader, List<Products> productList) throws IOException {\n\t\tif (null == reader) {\n\t\t\treader = new BufferedReader(new FileReader(FileHandelling.RECORDS_FILE));\n\t\t} else {\n\t\t\tString line;\n\t\t\tProducts products = new Products();\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString[] temp = line.split(\",\");\n\t\t\t\tproducts = new Products();\n\t\t\t\tproducts.setId(Integer.parseInt(temp[0]));\n\t\t\t\tproducts.setName(temp[1]);\n\t\t\t\tproducts.setBrand(temp[2]);\n\t\t\t\tproducts.setPrice(Float.parseFloat(temp[3]));\n\t\t\t\tproductList.add(products);\n\t\t\t}\n\n\t\t}\n\t\treturn productList;\n\t}", "@Test\n public void testCSVHandlerForEmployees() throws IOException, URISyntaxException {\n val csvHandler = TestInjector.create(CSVHandler.class);\n // todo clean this up but also keep it working on windows\n val input = Paths.get(getClass().getResource(\"PrototypeEmployees.csv\").toURI()).toString();\n val output = \"build/Employees.csv\";\n csvHandler.importEmployees(input);\n csvHandler.exportEmployees(output);\n val inputLines = Files.readAllLines(Paths.get(input));\n val outputLines = Files.readAllLines(Paths.get(output));\n assertEquals(inputLines.size(), outputLines.size());\n assertEquals(inputLines.get(0), outputLines.get(0)); // make sure header lines are the same\n assertTrue(outputLines.containsAll(inputLines));\n assertTrue(inputLines.containsAll(outputLines));\n }", "@SuppressWarnings(\"resource\")\r\n\tpublic static List<CSVRecord> convertFileToObject(MultipartFile file) throws MyToysDefinedException {\r\n\t\ttry {\r\n\t\t\tBufferedReader fileReader = new BufferedReader(\r\n\t\t\t\t\tnew InputStreamReader(file.getInputStream(), CommonConstants.ENCODING_FORMAT));\r\n\t\t\treturn new CSVParser(fileReader,\r\n\t\t\t\t\tCSVFormat.DEFAULT.withHeader(ProductServiceConstant.HEADERS).withIgnoreHeaderCase().withTrim())\r\n\t\t\t\t\t\t\t.getRecords();\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new MyToysDefinedException(e);\r\n\t\t}\r\n\t}", "public static LinkedList<Patient> CSVImport(String str) {\n\t\treturn CSVImport(new File(str));\n\t}", "public static LinkedList<Patient> CSVImport(File f) {\n\t\treturn importSepValuesFilePatient(f, \",\");\n\t}", "private static ArrayList<Ms3Person> readCSV(String fileName) {\r\n\t\tArrayList<Ms3Person> personsList = new ArrayList<>();\r\n\t\ttry (Scanner sc = new Scanner(new File(fileName))) {\r\n\t\t\t// skip the first line which is having column headers name\r\n\t\t\tsc.nextLine();\r\n\t\t\tint index = 1;\r\n\t\t\t// loop will go till end of file is reached ie.\r\n\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t// read single line at a time\r\n\t\t\t\tString personData = sc.nextLine();\r\n\t\t\t\tif(index >=5999)\r\n\t\t\t\t\tSystem.out.println(index+\" index\"+personData);\r\n\t\t\t\t//System.out.println(personData);\r\n\t\t\t\t//split the string by delimiter ,\r\n\t\t\t\tif(personData.length()>2) {\r\n\t\t\t\t\tString singlePersonRecord[] = personData.split(\",\");\r\n\t\t\t\t\t//the data we get is in form of sTring we need to convert\r\n\t\t\t\t\t//it to required data type for usage\r\n\t\t\t\t\tMs3Person person = convertDataToRequiredDataType(singlePersonRecord,index);\r\n\t\t\t\t\tif (person != null) {\r\n\t\t\t\t\t\t// add the person object in ArrayList\r\n\t\t\t\t\t\tpersonsList.add(person);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// bad data so create new file & write data\r\n // writing to the logfile\r\n \r\n \r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(\"index: \" + index);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tif(personData.length()<1) {//if no more line is there or only empty lines left\r\n\t\t\t\t\t\tSystem.out.println(\"finished reading the file...\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// if any exception arises while reading the file data that exception\r\n\t\t\t// will be caught in this block\r\n\t\t\tSystem.out.println(\"EXCEPTION: \" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn personsList;\r\n\t}", "private List<String[]> parseFileByName(String name){\n\n List<String[]> content = new ArrayList<>();\n String csvFile = name;\n BufferedReader br = null;\n String line = \"\";\n String cvsSplitBy = \",\";\n\n try {\n\n br = new BufferedReader(new FileReader(csvFile));\n while ((line = br.readLine()) != null) {\n\n // use comma as separator\n String[] data = line.split(cvsSplitBy);\n content.add(data);\n\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n return content;\n }", "public void parseFile() throws IOException {\r\n\t\tFileInputStream inputStream = new FileInputStream(FILE_PATH);\r\n\t\tScanner sc = new Scanner(inputStream, \"UTF-8\");\r\n\r\n\t\tString line = \"\";\r\n\t\t\r\n\t\twhile (sc.hasNextLine()) {\r\n\t\t\ttry{line = sc.nextLine();} catch(Exception e){System.out.println(e);}\r\n\t\t\tif(line.indexOf(comment_char)==0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(header == true) {\r\n//\t\t\tline = sc.nextLine();\r\n\t\t\tString[] linee = line.split(delimiter);\r\n\t\t\tthis.fieldNames = linee;\r\n\t\t\tfor(int i = 0; i < linee.length; i++) {\r\n\t\t\t\tcolumnMapping.put(linee[i], i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\twhile (sc.hasNextLine()) {\r\n\t\t\ttry{line = sc.nextLine();} catch(Exception e){System.out.println(e);}\r\n\t\t\tdf.add(line.split(delimiter, -1));\r\n//\t\t\tif(df.get(df.size()-1).length != this.fieldNames.length) {\r\n//\t\t\t\tSystem.out.println(this.FILE_PATH);\r\n//\t\t\t\tSystem.out.println(String.join(\" \", df.get(df.size()-1)));\r\n//\t\t\t}\r\n\t\t\tfor(int i = 0; i < df.get(df.size()-1).length; i++) {\r\n\t\t\t\tif(df.get(df.size()-1)[i].equals(\"\")) {\r\n\t\t\t\t\tdf.get(df.size()-1)[i] = \"0\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tinputStream.close();\r\n\t\tsc.close();\t\r\n\t}", "@Test\n public void givenStateCode_WhenImproperDelimiter_ReturnExceptionFileNotFound() {\n String CSV_FILE_PATH = \"src/test/resources/StateCode.csv\";\n try {\n indianCensusAnalyzer.loadStateCensusCSVData(CensusAnalyser.Country.INDIA, CSV_FILE_PATH);\n } catch (CSVBuilderException e) {\n Assert.assertEquals(CSVBuilderException.TypeOfException.INCORRECT_DELIMITER_HEADER_EXCEPTION, e.typeOfException);\n }\n }", "private void processToDoItem(String line) {\n String[] items = line.split((\"\\\",\\\"\"));\n // Skip the invalid line\n if (items.length != this.headerMap.size()) {\n System.out.println(String.format(\"The line %s has wrong columns. Please fix it!\", line));\n return;\n }\n\n HashMap<String, String> mappingTable = new HashMap<>();\n for (int i = 0; i < items.length; i++) {\n String item = items[i].replaceAll(\"\\\"\", \"\");\n item = item.equals(\"?\") ? null : item;\n mappingTable.put(headerMap.get(i), item);\n }\n ToDoItem todo = this.parseToDoItem(mappingTable);\n this.toDoList.addExistingToDo(Integer.parseInt(mappingTable.get(\"id\")), todo);\n }", "public List<Country> readCountriesFromCSV(String fileName){\n try {\n Scanner scanner = new Scanner(new File(fileName));\n scanner.useDelimiter(\",\");\n scanner.nextLine();\n while(scanner.hasNextLine()){\n lsta.add(createCountry(scanner.nextLine().split(\",\")));\n// System.out.println(pyr.get_pharaoh()+\"|\"+pyr.get_modern_name()+\"|\"+pyr.get_site()+\"|\"+pyr.get_height()+\"|\");\n }\n scanner.close();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(CityCSVDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return lsta;\n }", "public String parseCSV(MultipartFile file, Model model) {\n\n\n\n String status = \"FAILED\";\n // parse CSV file to create a list of `User` objects\n try (Reader reader = new BufferedReader(new InputStreamReader(file.getInputStream()))) {\n\n // create csv bean reader\n CsvToBean<Category> csvToBean = new CsvToBeanBuilder(reader)\n .withType(Category.class)\n .withIgnoreLeadingWhiteSpace(true)\n .build();\n\n // convert `CsvToBean` object to list of users\n List<Category> categories = csvToBean.parse();\n\n //Stream Category to KAFKA Topic\n\n categories.stream().forEach(category -> {\n Logger.info(\"Category => \"+category.getCategories());\n kafkaTemplate.send(TOPIC,category);\n });\n\n // save users list on model\n model.addAttribute(\"users\", categories);\n model.addAttribute(\"status\", true);\n\n status = \"SUCCESS\";\n\n } catch (Exception ex) {\n model.addAttribute(\"message\", \"An error occurred while processing the CSV file.\");\n model.addAttribute(\"status\", false);\n //TODO - Add Logger Error\n ex.printStackTrace();\n }\n\n return status;\n }", "@Override\r\n public void init() throws HarvesterException {\r\n JsonSimple options = new JsonSimple(getJsonConfig().getObject(\"harvester\", \"csv\"));\r\n \r\n String filePath = options.getString(null, \"fileLocation\");\r\n if (filePath == null) {\r\n throw new HarvesterException(\"No data file provided!\");\r\n }\r\n File csvDataFile = new File(filePath);\r\n if (csvDataFile == null || !csvDataFile.exists()) {\r\n throw new HarvesterException(\"Could not find CSV file '\" + filePath + \"'\");\r\n }\r\n filename = csvDataFile.getName();\r\n \r\n idPrefix = options.getString(\"\", \"recordIDPrefix\");\r\n maxRows = options.getInteger(-1, \"maxRows\");\r\n ignoredFields = getStringList(options, \"ignoreFields\");\r\n includedFields = getStringList(options, \"includedFields\");\r\n payloadId = options.getString(DEFAULT_PAYLOAD_ID, \"payloadId\");\r\n batchSize = options.getInteger(DEFAULT_BATCH_SIZE, \"batchSize\");\r\n hasMore = true;\r\n \r\n try {\r\n // open the CSV file for reading\r\n Reader fileReader = new InputStreamReader(new FileInputStream(csvDataFile), \"UTF-8\");\r\n char delimiter = options.getString(String.valueOf(DEFAULT_DELIMITER), \"delimiter\").charAt(0);\r\n csvReader = new CSVReader(fileReader, delimiter);\r\n \r\n // configure the data fields\r\n if (options.getBoolean(true, \"headerRow\")) {\r\n dataFields = Arrays.asList(csvReader.readNext());\r\n } else {\r\n dataFields = getStringList(options, \"headerList\");\r\n }\r\n \r\n // check that the specified id column is valid\r\n idColumn = options.getString(null, \"idColumn\");\r\n if (idColumn != null && !dataFields.contains(idColumn)) {\r\n throw new HarvesterException(\"'\" + idColumn + \"' is invalid!\");\r\n }\r\n } catch (IOException ioe) {\r\n throw new HarvesterException(ioe);\r\n }\r\n }", "private String[] splitLine(String line)\n\t{\n\t\treturn line.split(CSV_SEPARATOR);\n\t}", "public Set<Airport> loadFile(final String csvFile) throws CoreException;", "@SuppressWarnings(\"resource\")\r\n\tpublic static ArrayList<UserInfo> getUserDataFromCsvFile()\r\n\t{\r\n\t\t\r\n\t\tArrayList<UserInfo> unfList=null;\r\n\t\ttry{\r\n\t\t\tFile myObj= new File(\"E:\\\\Selenium Setup\\\\datadriven.csv\");\r\n\t\t\tunfList = new ArrayList<UserInfo>();\r\n\t\t\tScanner myReader= new Scanner(myObj);\r\n\t\t\tint count=0;\r\n\t\t\twhile (myReader.hasNextLine()) \r\n\t\t\t{\r\n\t\t\t\tString data= myReader.nextLine();\r\n\t\t\t\tif (count !=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tString[] info =data.split(\"\\\\,\");\r\n\t\t\t\t\tunfList.add(new UserInfo(info[0],info[1]));\r\n\t\t\t\t\t//unfList.add(new UserInfo(info[0], info[1]));\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t++count;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}catch (Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t}\r\n\t\t\treturn unfList;\r\n\t}", "public void readCsvFile(String path) {\n\n // make sure the ArrayList is empty before you start recording the data\n if (!Records.isEmpty()) {\n Records.clear();\n }\n try {\n // read data from the .csv file\n System.out.println(\"Reading array list....\");\n BufferedReader br = new BufferedReader(new FileReader(path));\n // Skip the first line\n String line = br.readLine();\n while ((line = br.readLine()) != null) {\n\n String[] fields = line.split(\",\");\n Record record = new Record( // the fields in .csv are jumbled\n Integer.parseInt(fields[2]), // skierID\n Integer.parseInt(fields[3]), // liftID\n Integer.parseInt(fields[1]), // dayNum\n Integer.parseInt(fields[4])); // time\n Records.add(record);\n }\n\n br.close();\n System.out.println(\"!!Reading completed!!\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void testDataReader() {\n File csv = new File(pathTest);\n try (FileReader fr = new FileReader(csv); BufferedReader bfr = new BufferedReader(fr)) {\n Logger.printInfo(\"Reading test data\");\n for (String line; (line = bfr.readLine()) != null; ) {\n String[] split = line.split(\",\");\n String data = textCleaner(split[indexData].toLowerCase());\n int label = Integer.parseInt(split[indexLabel].toLowerCase());\n\n linesTest.add(data);\n labelsTest.add(label);\n Logger.print(\"Reading size: \" + linesTest.size());\n }\n for (String l : linesTest) {\n matrixTest.add(wordVectorizer(l));\n }\n } catch (IOException ex) {\n Logger.printError(\"!! Test Data Not Reading !!\");\n System.exit(0);\n }\n }", "@Override\n public void parse(CSVParser context, char character) {\n if (character == '\"') { // transition to enclosed cell parse.\n context.setState(new EnclosedRecordReadState());\n } else if (Character.isWhitespace(character)) { // continue consuming whitespace.\n return;\n } else if (character == ',') { // terminate the cell\n context.terminateCell();\n } else { // All other characters enter cell parse state.\n context.append(character);\n context.setState(new CellReadState());\n }\n }", "@Test\r\n public void readCsvFile() throws FileNotFoundException, IOException { \r\n CsvReader csvr = new CsvReader(CSV_FILE);\r\n \r\n List<NetworkElement> nes = csvr.getNetworkElements();\r\n assertEquals(55,nes.size()); \r\n }", "public Set<Airport> loadFile(final File csvFile) throws CoreException;", "public void openPlayerDataFromCSV() throws FileNotFoundException {\n csvReader = new BufferedReader(new FileReader(PATH_TO_CSV));\n }", "public void loadFromCsv(String filePath) throws Exception {\n\tBufferedReader br=new BufferedReader(new FileReader(filePath));\n\tString line=\"\";\n\tint i=0;\n\n\tline=br.readLine();\n\tthis.gen=Integer.parseInt(line);\n\t\n\twhile((line=br.readLine()) != null) {\n\t this.setBna(i,line);\n\t i++;\n\t}\n\tbr.close();\n }", "@Test\n public void testVisaCCPositive_CSV() {\n String visaCCNumber = UtilityParsers.csvHelper(visaInputFilePathCSV);\n CreditCardValidator creditCardValidator = new VisaCCValidator(visaCCNumber);\n assertTrue(creditCardValidator.validateCreditCard());\n }", "public static ArrayList<ArrayList<String>> getAllDataFromFile(String csvInputPath, char sep) {\n ArrayList<ArrayList<String>> allData = new ArrayList<>();\r\n try (CSVReader reader = new CSVReader(new InputStreamReader(new FileInputStream(csvInputPath)), sep, '\"', '|');) {\r\n String[] nextLine;\r\n int numRow = 0;\r\n while ((nextLine = reader.readNext()) != null && numRow < MAX_ROW_NUMBER) {\r\n ArrayList<String> allRow = new ArrayList<>();\r\n allRow.addAll(Arrays.asList(nextLine));\r\n allData.add(allRow);\r\n numRow += 1;\r\n }\r\n } catch (FileNotFoundException ex) {\r\n Logger.getLogger(ManageExcel.class\r\n .getName()).log(Level.SEVERE, null, ex);\r\n\r\n } catch (IOException ex) {\r\n Logger.getLogger(ManageExcel.class\r\n .getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return allData;\r\n }", "public static void main(String[] args) throws FileNotFoundException, IOException {\r\n \r\n Directory d = new Directory();\r\n \r\n if (args.length != 1) {\r\n System.out.println(\"Usage: java CSVReaderTest <filename>\");\r\n }\r\n else {\r\n FileReader fr = new FileReader(args[0]);\r\n BufferedReader c = new BufferedReader(fr);\r\n\r\n int lineNum = 0;\r\n boolean eof = false;\r\n \r\n while (!eof) {\r\n String line = c.readLine();\r\n \r\n if (line == null) {\r\n eof = true;\r\n }\r\n else{\r\n // Allocate an array of the necessary size to return the strings\r\n String[] values = new String[4];\r\n // Start beginIndex at the beginning of the String, position 0\r\n int beginIndex = 0;\r\n\r\n for (int i = 0; i < 3; i++) {\r\n int endIndex;\r\n endIndex = line.indexOf(',', beginIndex);\r\n\r\n // if the argument begins and ends with quotes, remove them\r\n if (line.charAt(beginIndex) == '\"' && line.charAt(endIndex - 1) == '\"') {\r\n values[i] = line.substring(beginIndex + 1, endIndex - 1);\r\n\r\n } else {\r\n values[i] = line.substring(beginIndex, endIndex);\r\n }\r\n\r\n beginIndex = endIndex + 1;\r\n }\r\n\r\n if (line.charAt(beginIndex) == '\"' && line.charAt(line.length() - 1) == '\"') {\r\n values[3] = line.substring(beginIndex + 1, line.length() - 1);\r\n } else {\r\n values[3] = line.substring(beginIndex, line.length());\r\n }\r\n \r\n if (lineNum > 1) {\r\n lineNum = lineNum + 1;\r\n Student s = new Student(values[0]);\r\n s.setFirstName(values[1]);\r\n s.setLastName(values[2]);\r\n s.setPhoneNumber(values[3]);\r\n d.addStudent(s);\r\n System.out.println(s);\r\n }\r\n\r\n }\r\n }\r\n c.close();\r\n }\r\n \r\n Student c = new Student(\"mengl1\");\r\n c.setFirstName(\"Meng\");\r\n c.setLastName(\"Li\");\r\n c.setPhoneNumber(\"412-807-0153\");\r\n \r\n Student a = new Student(\"mengl2\");\r\n a.setFirstName(\"Mengl\");\r\n a.setLastName(\"Li\");\r\n a.setPhoneNumber(\"412-807-0154\");\r\n \r\n Student b = new Student(\"terryhong\");\r\n b.setFirstName(\"terry\");\r\n b.setLastName(\"hong\");\r\n b.setPhoneNumber(\"412-464-475\");\r\n\r\n d.addStudent(c);\r\n d.addStudent(a);\r\n d.addStudent(b);\r\n \r\n //System.out.println(d.searchByAndrewId(\"mengl2\"));\r\n //d.deleteStudent(\"terryhong\");\r\n System.out.println(d.size());\r\n // System.out.println(d.searchByLastName(\"Li\"));\r\n\r\n }", "public void parseInput(Scanner sc, String inputLine) {\n String[] input = inputLine.split(\",\");\n assert(input[0].equals(\"R\"));\n this.warehouseID = Integer.parseInt(input[1]);\n this.districtID = Integer.parseInt(input[2]);\n this.customerID = Integer.parseInt(input[3]);\n }", "public static StockSetData getStockSetDataFromCSV(String filePath) {\r\n int TOP_HEADER_ROW_INDEX = 4;\r\n // Create our BuyOptionObject\r\n StockSetData stockSetData = new StockSetData();\r\n // Get all the data as records\r\n List<List<String>> records = getCSV2(filePath);\r\n // Label the columns\r\n List<String> topHeader = records.get(TOP_HEADER_ROW_INDEX);\r\n List<String> nameHeader = records.get(TOP_HEADER_ROW_INDEX + 1);\r\n\r\n // loop horizontally through the elements in the top header\r\n for (int i = 0; i < topHeader.size(); i++) {\r\n // decide the type of column\r\n\r\n if (topHeader.get(i).equals(\"l\")) {\r\n ArrayList<String> loaderArray = new ArrayList<>();\r\n for (int j = TOP_HEADER_ROW_INDEX + 2; j < records.size(); j++) {\r\n loaderArray.add(records.get(j).get(i));\r\n }\r\n ColumnAndName columnAndName = new ColumnAndName(loaderArray ,nameHeader.get(i));\r\n stockSetData.getLabelValues().add(columnAndName);\r\n }\r\n if (topHeader.get(i).equals(\"s\")) {\r\n ArrayList<String> loaderArray = new ArrayList<>();\r\n for (int j = TOP_HEADER_ROW_INDEX + 2; j < records.size(); j++) {\r\n loaderArray.add(records.get(j).get(i));\r\n }\r\n ColumnAndName columnAndName = new ColumnAndName(loaderArray ,nameHeader.get(i));\r\n stockSetData.getSortingValues().add(columnAndName);\r\n }\r\n if (topHeader.get(i).equals(\"f\")) {\r\n ArrayList<String> loaderArray = new ArrayList<>();\r\n for (int j = TOP_HEADER_ROW_INDEX + 2; j < records.size(); j++) {\r\n loaderArray.add(records.get(j).get(i));\r\n }\r\n ColumnAndName columnAndName = new ColumnAndName(loaderArray ,nameHeader.get(i));\r\n stockSetData.getFitnessValues().add(columnAndName);\r\n }\r\n\r\n\r\n }\r\n\r\n return stockSetData;\r\n }", "private void removefromstore()\r\n\t{\r\n\t\tFile inputFile = new File(\"InventoryItems.csv\");\r\n\t\tFile tempFile = new File(\"temp.csv\");\r\n\t\tString cvsSplitBy = \",\";\r\n\t\t\r\n\t\tBufferedReader reader;\r\n\t\ttry {\r\n\t\t\treader = new BufferedReader(new FileReader(inputFile));\r\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(tempFile));\r\n\t\t\tString currentLine;\r\n\t\t\t\r\n\t\t\twhile((currentLine = reader.readLine()) != null) {\r\n\t\t\t // trim newline when comparing with lineToRemove\r\n\t\t\t\tString[] tempItem = currentLine.split(cvsSplitBy);\r\n\t\t\t if(tempItem[0].equals(this.id)) \r\n\t\t\t \tcontinue;\r\n\t\t\t writer.write(currentLine + System.getProperty(\"line.separator\"));\r\n\t\t\t}\r\n\t\t\twriter.close(); \r\n\t\t\treader.close(); \r\n\t\t\t\r\n\t\t\t//clear the file\r\n\t\t\tPrintWriter pwriter = new PrintWriter(inputFile);\r\n\t\t\tpwriter.print(\"\");\r\n\t\t\tpwriter.close();\r\n\t\t\t\r\n\t\t\t//copy back the data\r\n\t\t\treader = new BufferedReader(new FileReader(tempFile));\r\n\t\t writer = new BufferedWriter(new FileWriter(inputFile));\r\n\t\t\t\r\n\t\t\twhile((currentLine = reader.readLine()) != null) {\r\n\t\t\t writer.write(currentLine + System.getProperty(\"line.separator\"));\r\n\t\t\t}\r\n\t\t\twriter.close(); \r\n\t\t\treader.close(); \r\n\t\t} catch (FileNotFoundException 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}\r\n\t\t\r\n\r\n\r\n\t\t\r\n\t}", "@Override\n public void importItems(){\n if (DialogUtils.askYesNo(\"Confirm\", \"<html>Importing individuals will REPLACE all existing individuals.<br>Are you sure you want to do this?</html>\") == DialogUtils.NO) {\n return;\n }\n\n try {\n File file = DialogUtils.chooseFileForOpen(\"Import File\", new ExtensionsFileFilter(new String[] { \"csv\" }), null);\n if (file != null) {\n //remove current data\n MedSavantClient.PatientManager.clearPatients(LoginController.getSessionID(), ProjectController.getInstance().getCurrentProjectID());\n new ImportProgressDialog(file).showDialog();\n }\n } catch (Exception ex) {\n ClientMiscUtils.reportError(\"Unable to import individuals. Please make sure the file is in CSV format and that Hospital IDs are unique.\", ex);\n }\n }" ]
[ "0.6858164", "0.6663647", "0.6555449", "0.6524164", "0.63292956", "0.6287049", "0.6258732", "0.6220116", "0.61392456", "0.60489726", "0.60377324", "0.6020361", "0.5966387", "0.5947696", "0.5882933", "0.5847681", "0.5826655", "0.5819379", "0.5817148", "0.5808339", "0.57879734", "0.57755715", "0.5732947", "0.57158387", "0.5704287", "0.56903124", "0.5674065", "0.5672011", "0.5652733", "0.5650435", "0.5627726", "0.56276083", "0.56169176", "0.55889463", "0.5582018", "0.55814993", "0.557385", "0.5570732", "0.55604357", "0.5541185", "0.55411124", "0.55386895", "0.55272114", "0.551877", "0.55090964", "0.5507225", "0.5499674", "0.5476936", "0.547055", "0.54631585", "0.5462644", "0.5450472", "0.5443587", "0.54429066", "0.5442267", "0.5440938", "0.5431383", "0.54234713", "0.54186994", "0.541359", "0.5408757", "0.54022926", "0.5396998", "0.53729504", "0.5362946", "0.5353578", "0.53516155", "0.53485143", "0.53401816", "0.5330861", "0.53226393", "0.5310875", "0.5309399", "0.530705", "0.5305714", "0.5294327", "0.52926254", "0.5289932", "0.52669954", "0.52626073", "0.526219", "0.5256475", "0.52511126", "0.5247694", "0.52386975", "0.52257234", "0.52189225", "0.5215039", "0.5208583", "0.5206216", "0.5200861", "0.5200483", "0.5199109", "0.5196875", "0.51942515", "0.5185284", "0.5180447", "0.5153907", "0.5149898", "0.51466006", "0.51449096" ]
0.0
-1
SELECT StageBox.x, StageBox.y, Boxes.name FROM StageBox, Boxes WHERE StageBox.boxidx = Boxes.idx AND StageBox.stageidx=1
public int loadFrames(int id, ArrayList<StageData.Box> frames) { String sql = "SELECT "// + TABLE_NAME_BOXES + "." + TABLE_COLUMN_NAME + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_INDEX + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_NAME + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_RACE + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_TYPE + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_SHAPE + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_WIDTH + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_HEIGHT + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_ANGLE + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_DENSITY + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_RESTITUTION + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_FRICTION + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_FILTERBITS + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_TEXTUREINDEX + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_ANIMATIONINDEX + "," + TABLE_NAME_STAGEBOX + "." + TABLE_COLUMN_X + "," + TABLE_NAME_STAGEBOX + "." + TABLE_COLUMN_Y// + "," // + TABLE_NAME_STAGEBOX + "." + TABLE_COLUMN_PRESENTTIME + " FROM " + TABLE_NAME_BOXES + "," + TABLE_NAME_STAGEBOX + " WHERE " + TABLE_NAME_BOXES + "." + TABLE_COLUMN_INDEX + "=" + TABLE_NAME_STAGEBOX + "." + TABLE_COLUMN_BOXINDEX + " AND " + TABLE_NAME_STAGEBOX + "." + TABLE_COLUMN_STAGEINDEX + "=" + id + " AND " + TABLE_NAME_STAGEBOX + "." + TABLE_COLUMN_PRESENTTIME + "= -1"; try { ResultSet res = querySQL(sql); while(res.next()) { StageData.Box box = new StageData.Box(); box.id = res.getInt(1); box.name = res.getString(2); box.race = covertBoxRace(res.getInt(3)); box.type = covertBoxType(res.getInt(4)); box.shape = convertBoxShape(res.getInt(5)); box.width = res.getInt(6); box.height = res.getInt(7); box.angle = res.getFloat(8); box.density = res.getFloat(9); box.restitution = res.getFloat(10); box.friction = res.getFloat(11); box.filterBits = (short)res.getInt(12); box.texture = res.getInt(13); box.animation = res.getInt(14); box.x = res.getInt(15); box.y = res.getInt(16); frames.add(box); } res.close(); } catch (SQLException e) { Gdx.app.log(Global.APP_TAG, "dbaccess exception - " + e.toString()); return -1; } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void calcBoxVerts() {\n\t\tif (verts != null) {\n\t\t\tdouble minX = verts[0].getElement(0);\n\t\t\tdouble maxX = minX;\n\t\t\tdouble minY = verts[0].getElement(1);\n\t\t\tdouble maxY = minY;\n\t\t\tdouble minZ = verts[0].getElement(2);\n\t\t\tdouble maxZ = minZ;\n\t\t\tfor (int i = 1; i < verts.length; i++) {\n\t\t\t\tif (verts[i].getElement(0) < minX) {\n\t\t\t\t\tminX = verts[i].getElement(0);\n\t\t\t\t} else if (verts[i].getElement(0) > maxX) {\n\t\t\t\t\tmaxX = verts[i].getElement(0);\n\t\t\t\t}\n\t\t\t\tif (verts[i].getElement(1) < minY) {\n\t\t\t\t\tminY = verts[i].getElement(1);\n\t\t\t\t} else if (verts[i].getElement(1) > maxY) {\n\t\t\t\t\tmaxY = verts[i].getElement(1);\n\t\t\t\t}\n\t\t\t\tif (verts[i].getElement(2) < minZ) {\n\t\t\t\t\tminZ = verts[i].getElement(2);\n\t\t\t\t} else if (verts[i].getElement(2) > maxZ) {\n\t\t\t\t\tmaxZ = verts[i].getElement(2);\n\t\t\t\t}\n\t\t\t}\n\t\t\tVector[] boxVerts = new Vector[8];\n\t\t\tboxVerts[0] = new Vector(3);\n\t\t\tboxVerts[0].setElements(new double[] {minX, minY, minZ});\n\t\t\tboxVerts[1] = new Vector(3);\n\t\t\tboxVerts[1].setElements(new double[] {maxX, minY, minZ});\n\t\t\tboxVerts[2] = new Vector(3);\n\t\t\tboxVerts[2].setElements(new double[] {minX, minY, maxZ});\n\t\t\tboxVerts[3] = new Vector(3);\n\t\t\tboxVerts[3].setElements(new double[] {maxX, minY, maxZ});\n\t\t\tboxVerts[4] = new Vector(3);\n\t\t\tboxVerts[4].setElements(new double[] {minX, maxY, minZ});\n\t\t\tboxVerts[5] = new Vector(3);\n\t\t\tboxVerts[5].setElements(new double[] {maxX, maxY, minZ});\n\t\t\tboxVerts[6] = new Vector(3);\n\t\t\tboxVerts[6].setElements(new double[] {minX, maxY, maxZ});\n\t\t\tboxVerts[7] = new Vector(3);\n\t\t\tboxVerts[7].setElements(new double[] {maxX, maxY, maxZ});\n\t\t\tthis.boxVerts = boxVerts;\n\t\t} else {\n\t\t\tthis.boxVerts = null;\n\t\t}\n\t}", "@Test\n\tvoid testBoxCollision() {\n\t\tStage stage = new Stage();\n\t\tstage.initStage();\n\t\tstage.getCat().setX(100);\n\t\tint Y = stage.getCat().getY();\n\t\tBox box = new Box(100, Y);\n\t\tstage.getBoxes().add(box);\n\t\tstage.checkCollisions();\n\t\t\n\t\tassertEquals(2, stage.getStageOfGame());\n\t}", "private Box getBox(List<Box> boxes, int id){\n for(Box box:boxes){\n if(box.getId()==id){\n return box;\n }\n }\n return null;\n }", "private void generateBoxGeom()\n {\n // textures all share the same array, so process separately.\n textureBuffer = createBuffer(BOX_TEX_COORDS.length);\n textureBuffer.put(BOX_TEX_COORDS);\n textureBuffer.rewind();\n\n vertexBuffer = new FloatBuffer[6];\n normalBuffer = new FloatBuffer[6];\n\n for(int i = 0; i < 6; i++)\n {\n vertexBuffer[i] = createBuffer(12);\n normalBuffer[i] = createBuffer(12);\n }\n\n vertexBuffer[POSITIVE_X].put(RIGHT_BOX_COORDS);\n normalBuffer[POSITIVE_X].put(RIGHT_BOX_NORMALS);\n\n vertexBuffer[NEGATIVE_X].put(LEFT_BOX_COORDS);\n normalBuffer[NEGATIVE_X].put(LEFT_BOX_NORMALS);\n\n vertexBuffer[POSITIVE_Y].put(TOP_BOX_COORDS);\n normalBuffer[POSITIVE_Y].put(TOP_BOX_NORMALS);\n\n vertexBuffer[NEGATIVE_Y].put(BOTTOM_BOX_COORDS);\n normalBuffer[NEGATIVE_Y].put(BOTTOM_BOX_NORMALS);\n\n vertexBuffer[POSITIVE_Z].put(BACK_BOX_COORDS);\n normalBuffer[POSITIVE_Z].put(BACK_BOX_NORMALS);\n\n vertexBuffer[NEGATIVE_Z].put(FRONT_BOX_COORDS);\n normalBuffer[NEGATIVE_Z].put(FRONT_BOX_NORMALS);\n\n for(int i = 0; i < 6; i++)\n {\n vertexBuffer[i].rewind();\n normalBuffer[i].rewind();\n }\n }", "public Box getBox() {\n\t//we compute the coordinates of the top left square \n\t//of the box by integer division\n\treturn new Box((rowIndex/3)*3, (colIndex/3)*3); \n }", "public Box[][] getBoxes() {\n \treturn boxes;\n }", "private Box findBox(int x) {\n\t\tArrayList<BoxLogic> local = CurrentState.getCurrentListOfBoxLogic();\n\t\treturn local.get(x - 1).getBox();\n\t}", "@Override\r\n public void getBoxes(IPartCollisionHelper box) {\n box.addBox(4, 4, 12, 12, 12, 14);\r\n box.addBox(6, 6, 11, 10, 10, 12);\r\n }", "public ShapeBox selectById(Integer id){\n return shapeBoxDao.selectById(id);\n }", "public void\nGLRenderBoundingBox(SoGLRenderAction action, final SbBox3f bbox)\n//\n////////////////////////////////////////////////////////////////////////\n{\n int face, vert;\n final SoMaterialBundle mb = new SoMaterialBundle(action);\n final SbVec3f scale = new SbVec3f(), tmp = new SbVec3f();\n\n // Make sure textures are disabled, just to speed things up\n action.getState().push();\n SoGLMultiTextureEnabledElement.set(action.getState(),this,0, false);\n\n // Make sure first material is sent if necessary\n mb.sendFirst();\n\n // Scale and translate the cube to the correct spot\n final SbVec3f translate = bbox.getCenter();\n final SbVec3f size = new SbVec3f();\n bbox.getSize(size);\n scale.copyFrom(size.operator_mul(0.5f));\n\n GL2 gl2 = Ctx.get(SoGLCacheContextElement.get(action.getState())); \n \n for (face = 0; face < 6; face++) {\n\n if (! mb.isColorOnly())\n gl2.glNormal3fv(normals[face].getValueRead(),0);\n\n gl2.glBegin(GL2.GL_POLYGON);\n\n for (vert = 0; vert < 4; vert++)\n gl2.glVertex3fv((SCALE(verts[face][vert],tmp,scale).operator_add(translate)).getValueRead(),0);\n\n gl2.glEnd();\n }\n\n // Restore state\n action.getState().pop();\n mb.destructor(); // java port\n}", "public Vector[] getBoxVerts() {\n\t\treturn boxVerts;\n\t}", "public abstract Vector getDrawPosition(Rectangle selectionBox);", "protected void boxOfMortys() {\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n\n pos1 = new Triple(-10, -10, 0);\n pos2 = new Triple(110, -10, 0);\n pos3 = new Triple(110, -10, 120);\n pos4 = new Triple(-10, -10, 120);\n pos5 = new Triple(-10, 110, 0);\n pos6 = new Triple(110, 110, 0);\n pos7 = new Triple(110, 110, 120);\n pos8 = new Triple(-10, 110, 120);\n\n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos2, 1, 0),\n new Vertex(pos3, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, 1, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 22 ) );\n\n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos5, 1, 0),\n new Vertex(pos8, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, 1, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 22 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, 0, 0),\n new Vertex(pos6, 1, 0),\n new Vertex(pos7, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1),\n new Vertex(pos3, 0, 1),\n new Vertex(pos2, 0, 0),\n 22 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, 0, 0),\n new Vertex(pos6, 1, 0),\n new Vertex(pos7, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1),\n new Vertex(pos8, 0, 1),\n new Vertex(pos5, 0, 0),\n 22 ) );\n\n // Top Triangles\n// frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0),\n// new Vertex(pos3, 0, 1),\n// new Vertex(pos7, 1, 1),\n// 20 ) );\n\n// frozenSoups.addTri( new Triangle(new Vertex(pos7, 0, 0),\n// new Vertex(pos8, 1, 0),\n// new Vertex(pos4, 1, 1),\n// 20 ) );\n }", "public int[] getBoxes() { return boxes; }", "public double[] getBox() { return box; }", "private List<Box> initBoxes(List<Integer> deadBoxes){\n List<Box> boxes = new ArrayList<>();\n\n for(int x=0;x<16;x++){\n boxes.add(new Box(x + 1, grid[x]));\n }\n\n\n /**\n * 1 2 3 4\n * 5 6 7 8\n * 9 10 11 12\n * 13 14 15 16\n */\n\n //first row\n addNeighbours(1, new int[]{2,5,6}, boxes);\n addNeighbours(2,new int[]{1,3,5,6,7}, boxes);\n addNeighbours(3,new int[]{2,4,6,7,8}, boxes);\n addNeighbours(4,new int[]{3,7,8}, boxes);\n addNeighbours(5,new int[]{1,2,6,9,10}, boxes);\n addNeighbours(6,new int[]{1,2,3,5,7,9,10,11}, boxes);\n addNeighbours(7,new int[]{2,3,4,6,8,10,11,12}, boxes);\n addNeighbours(8,new int[]{3,4,7,11,12}, boxes);\n addNeighbours(9,new int[]{5,6,10,13,14}, boxes);\n addNeighbours(10,new int[]{5,6,7,9,11,13,14,15}, boxes);\n addNeighbours(11,new int[]{6,7,8,10,12,14,15,16}, boxes);\n addNeighbours(12,new int[]{7,8,11,15,16}, boxes);\n addNeighbours(13,new int[]{9,10,14}, boxes);\n addNeighbours(14,new int[]{9,10,11,13,15}, boxes);\n addNeighbours(15,new int[]{10,11,12,14,16}, boxes);\n addNeighbours(16,new int[]{11,12,15}, boxes);\n\n return removeBoxes(boxes,deadBoxes);\n }", "public abstract Vector getPosition(Rectangle selectionBox);", "public void addBox()\n {\n if(Student.sittingRia==false) {\n box = new BoxRia(\"chalkboard.png\",4,2);\n addObject(box,box.myRow,box.mySeat);\n chalk = new BoxRia(\"chalk.png\",0,0);\n addObject(chalk,2,3);\n }\n }", "private void drawBox() {\n GLES20.glEnable(GLES20.GL_SCISSOR_TEST);\n GLES20.glScissor(0, 0, 100, 100);\n GLES20.glClearColor(1.0f, 0.0f, 0.0f, 1.0f);\n GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);\n GLES20.glDisable(GLES20.GL_SCISSOR_TEST);\n }", "public List<WrapperEntity> getEntitiesWithin(BoundingBox box){\r\n\t\tList<WrapperEntity> entities = new ArrayList<WrapperEntity>();\r\n\t\tfor(Entity entity : world.getEntitiesWithinAABB(Entity.class, box.convert())){\r\n\t\t\tentities.add(WrapperEntity.getWrapperFor(entity));\r\n\t\t}\r\n\t\treturn entities;\r\n\t}", "public void group() {\n for (Box box : boxes) {\r\n box.x += this.x;\r\n box.y += this.y;\r\n }\r\n }", "public void displayInnerBoxesHover(Box box) {\n for (Box box1 : boxes) {\r\n if (box1.equals(box)) {\r\n box1.displayHover();\r\n } else box1.display();\r\n }\r\n }", "@Override\n public List<FreeSpace3D> segmentSpace(Box box){\n ArrayList<FreeSpace3D> newFreeSpace3DS = new ArrayList<>();\n ArrayList<Surface> newSurfaces = new ArrayList();\n if(box.getZBottom() > position.getZ())\n {\n //the bottom of physical box is a separating plane\n FreeSpace3D fs = new FreeSpace3D(width, depth, box.getZBottom() - position.getZ(), position, this.pallet, supportingSurfaces);\n newFreeSpace3DS.add(fs);\n }\n\n if(box.getZTop() < getZTop())\n {\n // the top of the physical box is a separating plane\n // determine the intersecting area\n PositionedRectangle intersectingArea = box.getTop().getHorizontalIntersection(this.getPositionedBottom());\n Surface sf = new Surface(intersectingArea);\n FreeSpace3D fs = new FreeSpace3D(width, depth,position.getZ() + height - box.getZTop(),\n new Vector3D(position.getX(), position.getY(),box.getZTop()), this.pallet, sf);\n newFreeSpace3DS.add(fs);\n }\n\n if(box.getXLeft() > getXLeft())\n {\n //the left side of physical box is a separating plane\n ArrayList<Surface> remainingSupportingSurfaces = updateSurfaces(new PositionedRectangle(box.getXLeft() - getXLeft(), depth, position));\n if(!remainingSupportingSurfaces.isEmpty()){\n FreeSpace3D fs = new FreeSpace3D(box.getXLeft() - getXLeft(), depth, height, position, this.pallet, remainingSupportingSurfaces);\n newFreeSpace3DS.add(fs);\n }\n }\n\n if(box.getXRight() < getXRight())\n {\n // the right of the physical box is a separating plane\n ArrayList<Surface> remainingSupportingSurfaces = updateSurfaces(new PositionedRectangle(getXRight() - box.getXRight(), depth, new Vector3D(box.getXRight(), position.getY(), position.getZ())));\n if(!remainingSupportingSurfaces.isEmpty()){\n FreeSpace3D fs = new FreeSpace3D(getXRight() - box.getXRight(), depth,\n height, new Vector3D(box.getXRight(), position.getY(), position.getZ()), this.pallet, remainingSupportingSurfaces);\n newFreeSpace3DS.add(fs);\n }\n }\n\n if(box.getYFront() > getYFront())\n {\n // the front of the physical box is a separating plane\n ArrayList<Surface> remainingSupportingSurfaces = updateSurfaces(new PositionedRectangle(width, box.getYFront() - getYFront(), position));\n if(!remainingSupportingSurfaces.isEmpty()){\n FreeSpace3D fs = new FreeSpace3D(width, box.getYFront() - getYFront(), height, position, this.pallet, remainingSupportingSurfaces);\n newFreeSpace3DS.add(fs);\n }\n }\n\n if(box.getYBack() < getYBack())\n {\n // the back of the physical box is a separating plane\n ArrayList<Surface> remainingSupportingSurfaces = updateSurfaces(new PositionedRectangle(width, getYBack() - box.getYBack(), new Vector3D(position.getX(), box.getYBack(), position.getZ())));\n if(!remainingSupportingSurfaces.isEmpty()){\n FreeSpace3D fs = new FreeSpace3D(width, getYBack() - box.getYBack(),\n height, new Vector3D(position.getX(), box.getYBack(), position.getZ()), this.pallet, remainingSupportingSurfaces);\n newFreeSpace3DS.add(fs);\n }\n }\n\n return newFreeSpace3DS;\n }", "public void displayInnerBoxes() {\n for (Box box : boxes)\r\n box.display();\r\n }", "private TransformGroup createBox(\n\t\tfloat x,\n\t\tfloat z,\n\t\tfloat size,\n\t\tfloat height,\n\t\tColor3f col) {\n\n\t\t//quadrilatere\n\t\tQuadArray quad =\n\t\t\tnew QuadArray(24, QuadArray.COORDINATES | QuadArray.COLOR_3);\n\t\tquad.setCoordinate(0, new Point3f(0.001f, height - 0.001f, 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t1,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, 0.001f));\n\t\tquad.setCoordinate(2, new Point3f(size - 0.001f, 0.001f, 0.001f));\n\t\tquad.setCoordinate(3, new Point3f(0.001f, 0.001f, 0.001f));\n\n\t\tquad.setCoordinate(4, new Point3f(0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t5,\n\t\t\tnew Point3f(size - 0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t6,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t7,\n\t\t\tnew Point3f(0.001f, height - 0.001f, size - 0.001f));\n\n\t\tquad.setCoordinate(8, new Point3f(0.001f, 0.001f, 0.001f));\n\t\tquad.setCoordinate(9, new Point3f(0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t10,\n\t\t\tnew Point3f(0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(11, new Point3f(0.001f, height - 0.001f, 0.001f));\n\n\t\tquad.setCoordinate(\n\t\t\t12,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t13,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t14,\n\t\t\tnew Point3f(size - 0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(15, new Point3f(size - 0.001f, 0.001f, 0.001f));\n\n\t\tquad.setCoordinate(16, new Point3f(size - 0.001f, 0.001f, 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t17,\n\t\t\tnew Point3f(size - 0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(18, new Point3f(0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(19, new Point3f(0.001f, 0.001f, 0.001f));\n\n\t\tquad.setCoordinate(20, new Point3f(0.001f, height - 0.001f, 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t21,\n\t\t\tnew Point3f(0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t22,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t23,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, 0.001f));\n\n\t\tfor (int i = 0; i < 24; i++)\n\t\t\tquad.setColor(i, col);\n\n\t\t//dessine les aretes\n\n\t\t//quadrilatere\n\t\tQuadArray aretes =\n\t\t\tnew QuadArray(24, QuadArray.COORDINATES | QuadArray.COLOR_3);\n\t\taretes.setCoordinate(0, new Point3f(0.0f, 0.0f, 0.0f));\n\t\taretes.setCoordinate(1, new Point3f(size, 0.0f, 0.0f));\n\t\taretes.setCoordinate(2, new Point3f(size, height, 0.0f));\n\t\taretes.setCoordinate(3, new Point3f(0.0f, height, 0.0f));\n\n\t\taretes.setCoordinate(4, new Point3f(0.0f, 0.0f, size));\n\t\taretes.setCoordinate(5, new Point3f(size, 0.0f, size));\n\t\taretes.setCoordinate(6, new Point3f(size, height, size));\n\t\taretes.setCoordinate(7, new Point3f(0.0f, height, size));\n\n\t\taretes.setCoordinate(8, new Point3f(0.0f, 0.0f, 0.0f));\n\t\taretes.setCoordinate(9, new Point3f(0.0f, 0.0f, size));\n\t\taretes.setCoordinate(10, new Point3f(0.0f, height, size));\n\t\taretes.setCoordinate(11, new Point3f(0.0f, height, 0.0f));\n\n\t\taretes.setCoordinate(12, new Point3f(size, 0.0f, 0.0f));\n\t\taretes.setCoordinate(13, new Point3f(size, 0.0f, size));\n\t\taretes.setCoordinate(14, new Point3f(size, height, size));\n\t\taretes.setCoordinate(15, new Point3f(size, height, 0.0f));\n\n\t\tfor (int i = 0; i < 24; i++)\n\t\t\taretes.setColor(i, new Color3f(1f, 1f, 1f));\n\n\t\t// move the box\n\t\tTransform3D translate = new Transform3D();\n\t\ttranslate.set(new Vector3f(x, 0.0f, z));\n\n\t\tTransformGroup tg = new TransformGroup(translate);\n\n\t\t// create the box\n\t\ttg.addChild(new Shape3D(quad));\n\t\ttg.addChild(new Shape3D(aretes, lineApp()));\n\t\treturn tg;\n\t}", "static void trial4() {\n ModelBuilder modelBuilder = new ModelBuilder();\n Model cubeModel = modelBuilder.createBox(\n 5f,\n 5f,\n 5f,\n new Material( ColorAttribute.createDiffuse(Color.GREEN) ),\n Usage.Position);\n Mesh cubeMesh = cubeModel.meshes.get(0);\n\n // There are 36 vertex indices\n // I take it this is because there are 2 triangle per face\n // 3 x 2 x 6 = 36\n System.err.println(cubeMesh.getNumIndices());\n\n short[] cubeIndices = new short[36];\n cubeMesh.getIndices(cubeIndices);\n for (int i = 0; i < 36; i+=3) {\n for (int j = 0; j <= 2; j++) {\n System.err.printf(\"%3d \", cubeIndices[i+j]);\n }\n System.err.println();\n }\n\n }", "private void createPointers() {\n\t\tSquare[] tempSquares = new Square[size*size];\n\t\tint counter = 0;\n\t\tfor (int i = 0; i < size; i++) {\n\t\t for (int j = 0; j < size; j++) {\n\t\t\t\ttempSquares[counter] = squares[i][j];\n\t\t\t\tif (counter != 0) {\n\t\t\t\t tempSquares[counter - 1].setNext(tempSquares[counter]);\n\t\t\t\t}\n\t\t\t\tcounter++;\n\t\t }\n\t\t}\n\n\t\tfor (Row r: rows) {\n\t\t r.tellSquares(this);\n\t\t}\n\t\tfor (Column c: columns) {\n\t\t c.tellSquares(this);\n\t\t}\n\n/*\n\t\tSystem.out.println(\"_________\");\n\t\tSystem.out.println(\"kol paa min, length her er: \"+length);\n\t\tSystem.out.println(\"rad paa min, hoyde her er: \"+height);\n\t\tSystem.out.println(\"boks length: \"+boxes[0].length);\n\t\tSystem.out.println(\"boks length: \"+boxes[1].length);\n*/\n\n\t\tfor (int i = 0; i < length; i++) {\n\t\t for (int j = 0; j < height; j++) {\n\t\t\t\tboxes[j][i].tellSquares(this);\n\t\t }\n\t\t}\n }", "public int getBox(){\n\t\treturn box;\n\t}", "private void updateBoxes(){\n if(model.getMap() != null) {\n DoubleVec position = invModelToView(new DoubleVec(canvas.getWidth()*0.5,canvas.getHeight()*0.5));\n inner = new Rectangle(position, 1.0/zoomFactor * fi * canvas.getWidth(), 1.0/zoomFactor * fi * canvas.getHeight(), 0);\n outer = new Rectangle(position, 1.0/zoomFactor * fo * canvas.getWidth(), 1.0/zoomFactor * fo * canvas.getHeight(), 0);\n }\n }", "protected int[] getParticlesByIndexInside( ArrayList<Object> geomObjects,PointXY[] boundingBox ){\r\n\t\t\r\n\t\tArrayList<Integer> pset = new ArrayList<Integer>() ;\r\n\t\tPoint2D testP2D;\r\n\t\tRepulsionFieldParticle particle;\r\n\t\tObject geomObject;\r\n\t\t\r\n\t\tboolean covered;\r\n\t\t\r\n\t\t\r\n\r\n\t\tfor (int i= 0; i<particles.size() ;i++){\r\n\t\t\t\r\n\t\t\tparticle = particles.get(i) ;\r\n\t\t\t\r\n\t\t\t// within bounding box? no? skip the rest , -> next particle by index value\r\n\t\t\tif ((particle.x<boundingBox[0].x-averageDistance*1.1) || (particle.x>boundingBox[1].x+averageDistance*1.1)){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ((particle.y<boundingBox[0].y-averageDistance*1.1) || (particle.y>boundingBox[3].y+averageDistance*1.1)){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t \r\n\t\t\t\r\n\t\t\ttestP2D = new Point2D( particle.x, particle.y);\r\n\t\t\t\r\n\t\t\t// test particle across all ellipses\r\n\t\t\tfor (int s=0;s<geomObjects.size();s++){\r\n\t\t\t\t\r\n\t\t\t\tgeomObject = geomObjects.get(s) ;\r\n\t\t\t\t \r\n\t\t\t\tcovered = isInsideGeomObject(geomObject,testP2D);\r\n\t\t\t\t\r\n\t\t\t\tif (covered) {\r\n\t\t\t\t\tif (pset.contains(i)==false){\r\n\t\t\t\t\t\tpset.add(i) ;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// out.print(2, \"+++ particle added, index:\"+i+\", location x,y:\" + df.format(particle.x)+\",\" + df.format(particle.y)+\" +++\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// out.print(2, \"--- particle NOT added, index:\"+i+\", location x,y:\" + df.format(particle.x)+\",\" + df.format(particle.y)+\" ---\");\r\n\t\t\t\t}\r\n\t\t\t} // s->\r\n\t\t\t\r\n\t\t} // i->\r\n\t\t\r\n\t\t\r\n\t\tint[] particleIndexes = new int[pset.size()] ;\r\n\t\t\r\n\t\tfor (int i=0;i< pset.size();i++){\r\n\t\t\tparticleIndexes[i] = pset.get(i) ;\r\n\t\t}\r\n\t\treturn particleIndexes;\r\n\t}", "private void boxCreator(int[] pos, int width, int height) {\n for (int x = pos[0]; x < pos[0] + width; x++) {\n tiles[x][pos[1]] = Tileset.WALL;\n }\n for (int y = pos[1]; y < pos[1] + height; y++) {\n tiles[pos[0]][y] = Tileset.WALL;\n }\n for (int x = pos[0]; x < pos[0] + width; x++) {\n tiles[x][pos[1] + height] = Tileset.WALL;\n }\n for (int y = pos[1]; y < pos[1] + height + 1; y++) {\n tiles[pos[0] + width][y] = Tileset.WALL;\n }\n for (int y = pos[1] + 1; y < pos[1] + height; y++) {\n for (int x = pos[0] + 1; x < pos[0] + width; x++) {\n tiles[x][y] = Tileset.FLOWER;\n }\n }\n }", "public abstract Vector getAnchorPoint(Rectangle selectionBox);", "public Cursor getallchecklistindex(String stageid)\n {\n \ttry\n \t{\n \t\tString sql=\"select checklist.Id,checklist.checknum,checklist.name,checklist.rpl from checklistindex inner join checklist on checklistindex.checknum=checklist.checknum where checklistindex.stageid='\"+stageid+\"' GROUP BY checklistindex.checknum\";\n \t\t\n \t\tCursor mCur=mDb.rawQuery(sql, null);\n \t\tif(mCur!=null)\n \t\t{\n \t\t\tmCur.moveToNext();\n \t\t}\n \t\treturn mCur;\n \t}\n \tcatch(SQLException mSQLException)\n \t{\n \t\tLog.e(TAG, \"getTestData >>\"+ mSQLException.toString());\n \t\tthrow mSQLException;\n \t}\n }", "public void paintbox(Graphics page, Rectangle box)\n\t\t{\n\t\t\tpage.drawImage(rock, box.x, box.y, box.width, box.height, this); //Places the rock image over the column \n\t\t}", "private void analyzeBox(QuadTreeNode node) {\n\t\t\tif (node.type().equals(\"leaf\")) {\n\t\t\t\tif (node.isWithin(((LeafNode)node).id, xl, yl, xu, yu)) elements.add(((LeafNode)node).id);\n\t\t\t} else if (node.type().equals(\"inner\")) {\n\t\t\t\tInnerNode nodeHandle = (InnerNode) node;\n\t\t\t\t//First Quad\n\t\t\t\tif (!nodeHandle.children[0].type().equals(\"empty\") && \n\t\t\t\t\t\txu >= nodeHandle.children[0].llx() && \n\t\t\t\t\t\tyu >= nodeHandle.children[0].lly()) analyzeBox(nodeHandle.children[0]);\n\t\t\t\t//Second Quad\n\t\t\t\tif (!nodeHandle.children[1].type().equals(\"empty\") && \n\t\t\t\t\t\txl < nodeHandle.children[1].urx() && \n\t\t\t\t\t\tyu > nodeHandle.children[1].lly()) analyzeBox(nodeHandle.children[1]);\n\t\t\t\t//Third Quad\n\t\t\t\tif (!nodeHandle.children[2].type().equals(\"empty\") && \n\t\t\t\t\t\txl < nodeHandle.children[2].urx() && \n\t\t\t\t\t\tyl < nodeHandle.children[2].ury()) analyzeBox(nodeHandle.children[2]);\n\t\t\t\t//Fourth Quad\n\t\t\t\tif (!nodeHandle.children[3].type().equals(\"empty\") && \n\t\t\t\t\t\txu >= nodeHandle.children[3].llx() && \n\t\t\t\t\t\tyl <= nodeHandle.children[3].ury()) analyzeBox(nodeHandle.children[3]);\n\t\t\t}\n\t\t}", "protected Box getGroupBounds (int idx)\n {\n if (_groupBounds.length <= idx) {\n Box[] obounds = _groupBounds;\n _groupBounds = new Box[idx + 1];\n System.arraycopy(obounds, 0, _groupBounds, 0, obounds.length);\n for (int ii = obounds.length; ii < _groupBounds.length; ii++) {\n _groupBounds[ii] = new Box();\n }\n }\n return _groupBounds[idx];\n }", "public void constructBoundingBox()\r\n\t{\n\t\tdouble a = m_Qmin.x;\r\n\t\tdouble b = m_Qmin.y;\r\n\t\tdouble c = m_Qmin.z;\r\n\r\n\t\tdouble d = m_Qmax.x;\r\n\t\tdouble e = m_Qmax.y;\r\n\t\tdouble f = m_Qmax.z;\r\n\r\n\t\t//constructing the vertexes of the bounding box\r\n\t\tSceneVertex A = new SceneVertex( new Vector3d(a, b, c));\r\n\t\tSceneVertex B = new SceneVertex( new Vector3d(d, b, c));\r\n\t\tSceneVertex C = new SceneVertex( new Vector3d(d, b, f));\r\n\t\tSceneVertex D = new SceneVertex( new Vector3d(d, e, f));\r\n\t\tSceneVertex E = new SceneVertex( new Vector3d(a, e, f));\r\n\t\tSceneVertex F = new SceneVertex( new Vector3d(a, e, c));\r\n\t\tSceneVertex G = new SceneVertex( new Vector3d(d, e, c));\r\n\t\tSceneVertex H = new SceneVertex( new Vector3d(a, b, f));\r\n\r\n\r\n\t\t// building the vertices arrays for the faces\r\n\t\tArrayList<SceneVertex> verArrP0front = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP0front.add(A);\r\n\t\tverArrP0front.add(B);\r\n\t\tverArrP0front.add(G);\r\n\t\tverArrP0front.add(F);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP1left = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP1left.add(A);\r\n\t\tverArrP1left.add(F);\r\n\t\tverArrP1left.add(E);\r\n\t\tverArrP1left.add(H);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP2back = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP2back.add(H);\r\n\t\tverArrP2back.add(C);\r\n\t\tverArrP2back.add(D);\r\n\t\tverArrP2back.add(E);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP3right = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP3right.add(G);\r\n\t\tverArrP3right.add(D);\r\n\t\tverArrP3right.add(C);\r\n\t\tverArrP3right.add(B);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP4bottom = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP4bottom.add(A);\r\n\t\tverArrP4bottom.add(H);\r\n\t\tverArrP4bottom.add(C);\r\n\t\tverArrP4bottom.add(B);\r\n\r\n\t\tArrayList<SceneVertex> verArrP5top = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP5top.add(F);\r\n\t\tverArrP5top.add(G);\r\n\t\tverArrP5top.add(D);\r\n\t\tverArrP5top.add(E);\r\n\t\t\r\n\t\t// creating BoundingBox\r\n\t\tm_BoundingBox = new SceneNode(DrawingMode.GL_LINE, \"BoundingBox\", null);\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP0front, \"FRONT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP1left, \"LEFT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP2back, \"BACK\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP3right, \"RIGHT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP4bottom, \"BOTTOM\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP5top, \"TOP\"));\r\n\r\n\t\t\r\n\t}", "private void drawBox(Graphics window, int hsBtoRGB, int x, int y) {\n\t\t\n\t}", "void setBox();", "public static void loadGraph_Database(Position[] bBox, String name) {\n // Graph aus Datei laden\n double time_graph = System.currentTimeMillis();\n System.out.println(\"============================================================\");\n Application.connection = new geoDatabaseConnection(dbhost, dbport, dbuser, dbpasswd, dbname);\n\n // Graph generieren\n File file = new File(name + \".DAT\");\n // Graph von DB laden\n Application.println(\"Fetching Data from DB and building graph\");\n try {\n Application.connection.connect();\n graph = Application.connection.getGraph(bBox, name);\n FileOutputStream fos = new FileOutputStream(file.getName());\n ObjectOutputStream out2 = new ObjectOutputStream(fos);\n out2.writeObject(graph);\n out2.close();\n fos.close();\n time_graph = (System.currentTimeMillis() - time_graph) / 1000;\n Application.println(\"Fetching Data and building graph took: \" + time_graph + \"sec\");\n double time_init = System.currentTimeMillis();\n Application.println(\"Init Graph\");\n graph.initGraph();\n time_init = (System.currentTimeMillis() - time_init) / 1000;\n Application.println(\"Init Graph took \" + time_init + \" Secs\");\n Application.println(\"============================================================\");\n } catch (Exception e) {\n System.out.println(\"Error: \" + e.toString());\n e.printStackTrace();\n System.exit(1);\n }\n }", "public int[] boxCoords(Vector3d v) {\r\n\t\t/* Check the bounds are valid */\r\n\t\tint x = (int)(v.x/box[0]);\r\n\t\tint y = (int)(v.y/box[1]);\r\n\t\tint z = (int)(v.z/box[2]);\r\n\t\tx = (x >= boxes[0] ? boxes[0]-1 : x);\r\n\t\ty = (y >= boxes[1] ? boxes[1]-1 : y);\r\n\t\tz = (z >= boxes[2] ? boxes[2]-1 : z);\r\n\t\tif (x < 0) x = 0;\r\n\t\tif (y < 0) y = 0;\r\n\t\tif (z < 0) z = 0;\r\n\t\treturn new int[] {x, y, z};\t\r\n\t}", "public PokemonBox[] getBoxes()\n\t{\n\t\treturn m_boxes;\n\t}", "Box(double w, double h, double d) {\n\n widgh =w;\n height =h;\n depth =d;\n\n}", "protected void skybox() {\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n\n pos1 = new Triple(0, 0, 0);\n pos2 = new Triple(100, 0, 0);\n pos3 = new Triple(100, 0, 100);\n pos4 = new Triple(0, 0, 100);\n pos5 = new Triple(0, 100, 0);\n pos6 = new Triple(100, 100, 0);\n pos7 = new Triple(100, 100, 100);\n pos8 = new Triple(0, 100, 100);\n\n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos2, .25, 0),\n new Vertex(pos3, .25, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, .25, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 21 ) );\n\n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 1, 0),\n new Vertex(pos5, .75, 0),\n new Vertex(pos8, .75, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, .75, 1),\n new Vertex(pos4, 1, 1),\n new Vertex(pos1, 1, 0),\n 21 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, .25, 0),\n new Vertex(pos6, .5, 0),\n new Vertex(pos7, .5, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, .5, 1),\n new Vertex(pos3, .25, 1),\n new Vertex(pos2, .25, 0),\n 21 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, .75, 0),\n new Vertex(pos6, .5, 0),\n new Vertex(pos7, .5, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, .5, 1),\n new Vertex(pos8, .75, 1),\n new Vertex(pos5, .75, 0),\n 21 ) );\n\n // Top Triangles\n// frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0),\n// new Vertex(pos3, 0, 1),\n// new Vertex(pos7, 1, 1),\n// 20 ) );\n\n// frozenSoups.addTri( new Triangle(new Vertex(pos7, 0, 0),\n// new Vertex(pos8, 1, 0),\n// new Vertex(pos4, 1, 1),\n// 20 ) );\n }", "public static void main(String[] args) {\n int[] boxcap = {100,100,50,200,250};\n int[] items = {10,25,50,50,30,30,50,40,10,50,10,50,40};\n int i, j;\n\n // // create boxes\n // Box[] boxes = new Box[boxcap.length];\n // for (i = 0; i <= boxcap.length; i++) {\n // try{\n // boxes[i] = new Box(boxcap[i]);\n // throw new BoxFullException(\"Array Index Out of Bounds Exception!\");\n // //boxes[i] = new Box(boxcap[i]);\n //\n // } catch (BoxFullException e){\n // System.out.println(\"Caught Exception in method: \"+e);\n //\n // }\n // }\n\n\n // create boxes\n \tBox[] boxes = new Box[boxcap.length];\n \tfor (i = 0; i <= boxcap.length; i++) {\n try {\n \t boxes[i] = new Box(boxcap[i]);\n } catch (ArrayIndexOutOfBoundsException e){\n System.out.println(\"Caught exception in main: \"+e);\n }\n \t}\n\n // add items to boxes\n i = 0; // box index\n j = 0; // item index\n try{\n while (j < items.length) {\n boxes[i].add(items[j]);\n j++;\n }\n }catch (BoxFullException e){\n System.out.println(\"Caught exception in WHILE: \"+e);\n }\n\n\n // print items in boxes\n for (i = 0; i < boxes.length; i++) {\n for (j = 0; j < items.length; j++) {\n try{\n System.out.printf(\"Box %d item %d: size %d.\\n\",\n i,j,boxes[i].getItem(j));\n } catch (IndexOutOfBoundsException e){\n System.out.println(\"Caught exception in PRINT BOX: \"+e);\n\n\n }\n }\n }\n }", "public void toggleSelected(){\n if(!selected) {\n this.graphicsGroup.toFront();\n// System.out.println(\"selecting\");\n transparentBoxImages = new Image[(int)this.getWidth()/32][(int) this.getHeight()/32];\n //add the box to the proper position for each row this world addition covers\n for(int x = 0; x< this.getWidth() / game.BLOCK_SIZE; x++){\n for(int y = 0; y<this.getHeight()/game.BLOCK_SIZE;y++){\n Image nextImage = new Image(new TextureRegion(game.atlas.findRegion(\"GreenTransparent\")));\n nextImage.setSize(game.BLOCK_SIZE, game.BLOCK_SIZE);\n nextImage.setPosition(this.getX() + (x * game.BLOCK_SIZE), this.getY() + (y * game.BLOCK_SIZE));\n\n graphicsGroup.addActorBefore(this, nextImage);\n transparentBoxImages[x][y]= nextImage;\n\n }\n }\n\n //pick the item up\n this.setY(this.getY() + 10);\n selected = true;\n }\n else{\n\n //put the item back down\n this.setY(this.getY() - 10);\n\n for(int x = 0; x< this.getWidth() / game.BLOCK_SIZE; x++){\n for(int y = 0; y<this.getHeight()/game.BLOCK_SIZE;y++){\n graphicsGroup.removeActor(transparentBoxImages[x][y]);\n\n }\n }\n\n\n selected = false;\n\n //if we can't place it there, then we will just run everything again\n if(!game.placeable){\n Timer.schedule(new Timer.Task(){\n @Override\n public void run() {\n game.selectEnemy(worldAddition);\n }\n }, 0.1f);\n }\n\n\n }\n }", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "public void setBox(int box) {\n this.box = box;\n }", "public Box getBox(int id) {\n return boxes.get(id);\n }", "public void sendBoxInfo(int j)\n\t{\n\t\t/* TODO: Save boxes in the Database and not in the server! */\n\t\tif(j < 0 || j > m_boxes.length - 1)\n\t\t\treturn;\n\t\t/* If box is non-existant, create it and send small packet */\n\t\tif(m_boxes[j] == null)\n\t\t{\n\t\t\tm_boxes[j] = new PokemonBox();\n\t\t\tServerMessage message = new ServerMessage(ClientPacket.ACCESS_BOX);\n\t\t\tmessage.addInt(0);\n\t\t\tgetSession().Send(message);\n\t\t}\n\t\t/* Else send all pokes in box */\n\t\tString packet = \"\";\n\t\tfor(int i = 0; i < m_boxes[j].getPokemon().length; i++)\n\t\t\tif(m_boxes[j].getPokemon(i) != null)\n\t\t\t\tpacket += m_boxes[j].getPokemon(i).getSpeciesNumber() + \",\";\n\t\t\telse\n\t\t\t\tpacket += \",\";\n\t\tServerMessage message = new ServerMessage(ClientPacket.ACCESS_BOX);\n\t\tmessage.addInt(1);\n\t\tmessage.addString(packet);\n\t\tgetSession().Send(message);\n\t}", "List<Building> findBuildingCoordinatesByType(String type);", "boolean getBox();", "public Rectangle2D getBox(\n )\n {return box;}", "public static String bboxVertices(){\n \treturn \"0.5 0.5 0.5 0.5 0.5 -0.5 0.5 -0.5 0.5 0.5 -0.5 -0.5 -0.5 0.5 0.5 -0.5 0.5 -0.5 -0.5 -0.5 0.5 -0.5 -0.5 -0.5\";\n }", "public Box[] getBoxes1D() {\n\t\tBox[] temp = new Box[size];\n\t\tint tempCounter = 0;\n\t\tfor (int j = 0; j < length; j++) {\n\t\t for (int i = 0; i < height; i++) {\n\t\t\t\ttemp[tempCounter] = boxes[i][j];\n\t\t\t\ttempCounter++;\n\t\t }\n\t\t}\n\t\treturn temp;\n }", "public BoxContainer getElement(int x, int y){\n\t\t\tArrayList<Integer> coordinates = new ArrayList<Integer>();\n\t\t\tcoordinates.add(x);\n\t\t\tcoordinates.add(y);\n\t\t\tBoxContainer point = map.get(coordinates);\n\t\t\tif (point == null){\n\t\t\t\treturn BoxContainer.Unkown;\n\t\t\t} else {\n\t\t\t\treturn point;\n\t\t\t}\n\t\t}", "List<Coord> allActiveCells();", "public int compareTo(Box box){\r\n return (box.width * box.depth) - (this.width * this.depth);\r\n }", "private static native long createEdgeBoxes_0(float alpha, float beta, float eta, float minScore, int maxBoxes, float edgeMinMag, float edgeMergeThr, float clusterMinMag, float maxAspectRatio, float minBoxArea, float gamma, float kappa);", "public VBox getBox() {\n return box;\n }", "public Boards getView(Long bno);", "public StagePosition makeStagePosition(int col, int row);", "Box(Box ob){ //passing object to constructor\n\t\twidth = ob.width;\n\t\theight = ob.height;\n\t\tdepth = ob.depth;\n\t\t}", "private static void selectionSort(ArrayList<Box> BoxArray) { \n\n\t\tfor ( int i = 0; i < BoxArray.size(); i++ ) { \n\t\t\tint lowPos = i; \n\t\t\tfor ( int j = i + 1; j < BoxArray.size(); j++ ) \n\t\t\t\tif ( BoxArray.get(j).volume() < BoxArray.get(lowPos).volume() ) \n\t\t\t\t\tlowPos = j;\n\t\t\tif ( BoxArray.get(lowPos) != BoxArray.get(i) ) { \n\t\t\t\tBox temp = BoxArray.get(lowPos);\n\t\t\t\tBoxArray.set(lowPos, BoxArray.get(i));\n\t\t\t\tBoxArray.set(i, temp);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic List<DisplayResult> getResults(ReferencedEnvelope bounds) {\n\t\t\n\t\tString whereClause = bounds != null ? \"WHERE ST_Transform(geom, 4326) && ST_MakeEnvelope(\"+bounds.getMinX()+\",\"+bounds.getMinY()+\",\"+bounds.getMaxX()+\",\"+bounds.getMaxY()+\") \" : \"\";\n\t\t\n\t\t//Only latest results\n\t\tString query = \"SELECT DISTINCT ON (meshblock_id) id, meshblock_id, operat_score, date_entered, ST_AsText(ST_Transform(centroid,4326)), ST_AsText(ST_Transform(geom,4326)), \"\n\t\t\t\t+ \"natural_elements_score, incivilities_and_nuisance_score, navigation_and_mobility_score, territorial_score \"\n\t\t\t\t+ \"FROM result \"\n\t\t\t\t+ whereClause\n\t\t\t\t+ \"ORDER BY meshblock_id, date_entered DESC;\";\n\n\t\tSystem.out.println(query);\n\t GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();\n\n\t WKTReader reader = new WKTReader(geometryFactory);\n\t \n\t\tRowMapper<DisplayResult> rowMapper = (rs, rowNum) -> {\n\t\t\t\n\t\t\tDisplayResult result = new DisplayResult();\n\t\t\tresult.setResultId(rs.getInt(1));\n\t\t\tresult.setMeshblockId(rs.getInt(2));\n\t\t\tresult.setOperatScore(rs.getDouble(3));\n\t\t\t\t\n\t\t\tresult.setNaturalElementsScore(rs.getDouble(7));\n\t\t\tresult.setIncivilitiesScore(rs.getDouble(8));\n\t\t\tresult.setNavigationScore(rs.getDouble(9));\n\t\t\tresult.setTerritorialScore(rs.getDouble(10));\n\t\t\tPoint point;\n\t\t\ttry {\n\t\t\t\tpoint = (Point) reader.read(rs.getString(5));\n\t\t\t\tresult.setCentroid(point.toString());\n\t\t\t\tresult.setLat(point.getCoordinate().y);\n\t\t\t\tresult.setLng(point.getCoordinate().x);\n\t\t\t\t\t\n\t\t\t\tresult.setGeom(rs.getString(6));\n\t\t\t\t\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t\t\n\t\treturn jdbcTemplate.query(query, rowMapper);\n\t\t\n\t}", "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: */ }", "public void computeBoundingBox() {\n\taveragePosition = new Point3(center);\n tMat.rightMultiply(averagePosition);\n \n minBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n maxBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n // Initialize\n Point3[] v = new Point3[8];\n for (int i = 0; i < 8; i++)\n \tv[i] = new Point3(center);\n // Vertices of the box\n v[0].add(new Vector3(-radius, -radius, -height/2.0));\n v[1].add(new Vector3(-radius, radius, -height/2.0));\n v[2].add(new Vector3(radius, -radius, -height/2.0));\n v[3].add(new Vector3(radius, radius, -height/2.0));\n v[4].add(new Vector3(-radius, -radius, height/2.0));\n v[5].add(new Vector3(-radius, radius, height/2.0));\n v[6].add(new Vector3(radius, -radius, height/2.0));\n v[7].add(new Vector3(radius, radius, height/2.0));\n // Update minBound and maxBound\n for (int i = 0; i < 8; i++)\n {\n \ttMat.rightMultiply(v[i]);\n \tif (v[i].x < minBound.x)\n \t\tminBound.x = v[i].x;\n \tif (v[i].x > maxBound.x)\n \t\tmaxBound.x = v[i].x;\n \tif (v[i].y < minBound.y)\n \t\tminBound.y = v[i].y;\n \tif (v[i].y > maxBound.y)\n \t\tmaxBound.y = v[i].y;\n \tif (v[i].z < minBound.z)\n \t\tminBound.z = v[i].z;\n \tif (v[i].z > maxBound.z)\n \t\tmaxBound.z = v[i].z;\n }\n \n }", "Box(Box ob)\n\t{\n\t\t//pass object to constructor\n\t\twidth = ob.width;\n\t\theight = ob.height;\n\t\tdepth = ob.depth;\n\t\t\n\t\t\n\t}", "private void actualizaHitbox() {\n hitbox = new Rect((int)(posX + 0.2 * bala.getWidth()), (int)(posY + 0.2 * bala.getHeight()), (int)(posX + 0.8 * bala.getWidth()), (int)(posY + 0.8 * bala.getHeight()));\n }", "Box(){\r\n Height = -1; // Used -1 to initiate an uninitialized Box. \r\n Width = -1;\r\n Depth = -1;\r\n }", "private GObject getCollidingObject(GOval ball) {\n GObject result = null;\n GPoint[] borderPoints = createArrayOfBallBorders(ball);\n for (GPoint someBorderPoint : borderPoints) {\n result = getElementAt(someBorderPoint);\n if (result != null){\n break;\n }\n }\n return result;\n }", "boolean UsedInBox(int grid[][], int boxStartRow, int boxStartCol, int num)\n{\n for (int row = 0; row < 3; row++)\n for (int col = 0; col < 3; col++)\n if (grid[row+boxStartRow][col+boxStartCol] == num)\n return true;\n return false;\n}", "private boolean contains(List<Box> boxes, int id){\n for(Box box : boxes){\n if(box.getId()==id){\n return true;\n }\n }\n return false;\n }", "public interface IndexedPTBox extends PTBox {\n\n\tpublic boolean hasNewConstraints();\n\tpublic Set<ConditionalConstraint> getNewConstraints();\t\n}", "public void prepareToPlaceOnCurrentRow(Box box) {\n\t\tbox.y = getCurrentY();\n\t\tbox.x = getCurrentX();\n\t}", "public void\nrayPickBoundingBox(SoRayPickAction action, final SbBox3f bbox)\n//\n////////////////////////////////////////////////////////////////////////\n{\n // Save the state so we don't affect the real complexity\n action.getState().push();\n\n // Change the complexity\n SoComplexityElement.set(action.getState(), 0.0f);\n SoComplexityTypeElement.set(action.getState(),\n SoComplexityTypeElement.Type.OBJECT_SPACE);\n\n // Change the current matrix to scale and translate the cube to the\n // correct spot. (We can't just use an extra matrix passed to\n // computeObjectSpaceRay(), since the points generated by\n // generatePrimitives() have to be transformed, not just the ray.)\n final SbVec3fSingle size = new SbVec3fSingle();\n bbox.getSize(size);\n\n // If any of the dimensions is 0, beef it up a little bit to avoid\n // scaling by 0\n if (size.getValueRead()[0] == 0.0)\n size.getValue()[0] = 0.00001f;\n if (size.getValueRead()[1] == 0.0)\n size.getValue()[1] = 0.00001f;\n if (size.getValueRead()[2] == 0.0)\n size.getValue()[2] = 0.00001f;\n\n SoModelMatrixElement.translateBy(action.getState(), this,\n bbox.getCenter());\n SoModelMatrixElement.scaleBy(action.getState(), this,\n size.operator_mul(0.5f));\n\n // Compute the picking ray in the space of the shape\n computeObjectSpaceRay(action);\n\n // Pick using primitive generation. Make sure we know that we are\n // picking on just a bounding box of another shape, so details\n // won't be created.\n pickingBoundingBox = true;\n generatePrimitives(action);\n\n // Restore the state\n action.getState().pop();\n}", "public Block[][][] getCubes(){ return cubes; }", "public StagePosition makeStagePosition();", "public Pj3dBox Box(int x)\r\n\t{\r\n\t\tPj3dBox b = new Pj3dBox(this, x);\r\n\t\treturn b;\r\n\t}", "public StsOSWell[] getSelectedWells()\n {\n \tObject[] selected = transferPanel.getSelectedObjects();\n \tStsOSWell[] wells = new StsOSWell[selected.length];\n \tfor (int i=0; i<selected.length; i++)\n \t{\n \t\twells[i] = (StsOSWell)selected[i];\n \t}\n \treturn wells;\n }", "public void swapFromBox(int box, int boxSlot, int partySlot)\n\t{\n\t\tif(box < 0 || box > 8)\n\t\t\treturn;\n\t\t/* Ensure the box exists */\n\t\tif(m_boxes[box] == null)\n\t\t\tm_boxes[box] = new PokemonBox();\n\t\t/* Make sure we're not depositing our only Pokemon */\n\t\tif(getPartyCount() == 1)\n\t\t\tif(m_pokemon[partySlot] != null && m_boxes[box].getPokemon(boxSlot) == null)\n\t\t\t\treturn;\n\t\t/* Everything is okay, let's get swapping! */\n\t\tPokemon temp = m_pokemon[partySlot];\n\t\tm_pokemon[partySlot] = m_boxes[box].getPokemon(boxSlot);\n\t\tm_boxes[box].setPokemon(boxSlot, temp);\n\t\tif(m_pokemon[partySlot] != null)\n\t\t{\n\t\t\tupdateClientParty(partySlot);\n\t\t\tString packet = \"\";\n\t\t\tfor(int i = 0; i < m_boxes[box].getPokemon().length; i++)\n\t\t\t\tif(m_boxes[box].getPokemon(i) != null)\n\t\t\t\t\tpacket += m_boxes[box].getPokemon(i).getSpeciesNumber() + \",\";\n\t\t\t\telse\n\t\t\t\t\tpacket += \",\";\n\t\t\tServerMessage message = new ServerMessage(ClientPacket.ACCESS_BOX);\n\t\t\tmessage.addInt(1);\n\t\t\tmessage.addString(packet);\n\t\t\tgetSession().Send(message);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tServerMessage partyLeave = new ServerMessage(ClientPacket.POKE_LEAVE_PARTY);\n\t\t\tpartyLeave.addInt(partySlot);\n\t\t\tgetSession().Send(partyLeave);\n\t\t}\n\t}", "public static void main(String[] args){\n Box[] boxes = {new Box1(),new Box2(), new Box3(),new Box4(),new Box5() };\n int length =15;\n int width =20;\n int height =25;\n for (Box box:boxes\n ) {if(box.validate(length,width,height)){\n System.out.println(box.name );\n break;\n }\n\n }\n\n\n\n\n /*Scanner scan = new Scanner(System.in);\n System.out.println(\"Please enter a number:\");\n int length = Integer.parseInt(scan.next());\n System.out.println(\"Please enter a number:\");\n int width = Integer.parseInt(scan.next());\n System.out.println(\"Please enter a number:\");\n int height = Integer.parseInt(scan.next());\n System.out.println(\"length: \" + length + \", width: \" + width + \", height: \" + height);\n if (box3.validate(length, width, height)) {\n System.out.println(box3.getName());\n }*/\n\n\n }", "private void setBox(){\n\t\tif((this.row >= 0 && this.row <= 2) && \n\t\t (this.column >= 0 && this.column <= 2)){\n\t\t\t\t\tthis.box = 1;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 0 && this.row <= 2) && \n\t\t (this.column >= 3 && this.column <= 5)){\n\t\t\t\t\tthis.box = 2;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 0 && this.row <= 2) && \n\t\t (this.column >= 6 && this.column <= 8)){\n\t\t\t\t\tthis.box = 3;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 3 && this.row <= 5) && \n\t\t (this.column >= 0 && this.column <= 2)){\n\t\t\t\t\tthis.box = 4;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 3 && this.row <= 5) && \n\t\t (this.column >= 3 && this.column <= 5)){\n\t\t\t\t\tthis.box = 5;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 3 && this.row <= 5) && \n\t\t (this.column >= 6 && this.column <= 8)){\n\t\t\t\t\tthis.box = 6;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 6 && this.row <= 8) && \n\t\t (this.column >= 0 && this.column <= 2)){\n\t\t\t\t\tthis.box = 7;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 6 && this.row <= 8) && \n\t\t (this.column >= 3 && this.column <= 5)){\n\t\t\t\t\tthis.box = 8;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 6 && this.row <= 8) && \n\t\t (this.column >= 6 && this.column <= 8)){\n\t\t\t\t\tthis.box = 9;\n\t\t\t\t\treturn;\n\t\t}\n\t}", "public interface IBox {\r\n void process();\r\n void add(IBox box);\r\n void remove(IBox box);\r\n boolean isLeaf();\r\n}", "public void setBoxes(PokemonBox[] boxes)\n\t{\n\t\tm_boxes = boxes;\n\t}", "private void actionViewBoundingBox ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\t\tif (tableSize != 0)\r\n\t\t\t{\r\n\t\t\t\tint imagIndex = mainFormLink.getComponentPanelLeft().getComponentComboboxFileName().getSelectedIndex();\r\n\r\n\t\t\t\t//---- Get the image with colored cells, convert it to buffered image instead of opencv Mat.\r\n\t\t\t\tBufferedImage imageCC = OpencvConverter.convertMatToBImage(ImageDraw.drawImageBoundingBox(DataController.getTable().getElement(imagIndex)));\r\n\r\n\t\t\t\t//---- Display image at the image viewer panel\r\n\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().loadImage(imageCC);\r\n\r\n\t\t\t\t//---- Change button icon\r\n\t\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_CELL_IMAGE);\r\n\r\n\t\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewImage().setIcon(iconButton);\r\n\t\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewImage().setActionCommand(FormMainHandlerCommands.AC_VIEW_IMAGE);\r\n\t\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewImage().setToolTipText(\"View cells\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage exception)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(exception);\r\n\t\t}\r\n\t}", "public boolean isBoxInBox(BBox BBox)\n {\n Vec3 sizeA = extents;\n Vec3 sizeB = BBox.extents;\n// System.out.println(\"sizeA: \" + sizeA);\n// System.out.println(\"mA: \" + m);\n// System.out.println(\"sizeB: \" + sizeB);\n// System.out.println(\"mB: \" + BBox.m);\n Vec3[] rotA, rotB;\n rotA = getInvRot();\n rotB = BBox.getInvRot();\n\n float[][] r = new float[3][3]; // Rotation from B to A\n float[][] ar = new float[3][3]; // absolute values of R matrix, to use with box extents\n float extentA, extentB, separation;\n int i, k;\n\n // Calculate B to A rotation matrix\n for (i = 0; i < 3; i++)\n {\n for (k = 0; k < 3; k++)\n {\n r[i][k] = rotA[i].dot(rotB[k]);\n ar[i][k] = abs(r[i][k]);\n }\n }\n\n // Vector separating the centers of Box B and of Box A\t\n Vec3 vSepWS = BBox.getCenterPoint().subtract(getCenterPoint());\n // Rotated into Box A's coordinates\n Vec3 vSepA = new Vec3(\n vSepWS.dot(rotA[0]),\n vSepWS.dot(rotA[1]),\n vSepWS.dot(rotA[2]));\n\n // Test if any of A's basis vectors separate the box\n for (i = 0; i < 3; i++)\n {\n extentA = sizeA.get(i);\n extentB = sizeB.dot(new Vec3(ar[i][0], ar[i][1], ar[i][2]));\n separation = abs(vSepA.get(i));\n\n if (separation > extentA + extentB)\n {\n return false;\n }\n }\n\n // Test if any of B's basis vectors separate the box\n for (k = 0; k < 3; k++)\n {\n extentA = sizeA.dot(new Vec3(ar[0][k], ar[1][k], ar[2][k]));\n extentB = sizeB.get(k);\n separation = abs(vSepA.dot(new Vec3(r[0][k], r[1][k], r[2][k])));\n\n if (separation > extentA + extentB)\n {\n return false;\n }\n }\n\n // Now test Cross Products of each basis vector combination ( A[i], B[k] )\n for (i = 0; i < 3; i++)\n {\n for (k = 0; k < 3; k++)\n {\n int i1 = (i + 1) % 3, i2 = (i + 2) % 3;\n int k1 = (k + 1) % 3, k2 = (k + 2) % 3;\n extentA = sizeA.get(i1) * ar[i2][k] + sizeA.get(i2) * ar[i1][k];\n extentB = sizeB.get(k1) * ar[i][k2] + sizeB.get(k2) * ar[i][k1];\n separation = abs(vSepA.get(i2) * r[i1][k] - vSepA.get(i1) * r[i2][k]);\n if (separation > extentA + extentB)\n {\n return false;\n }\n }\n }\n\n // No separating axis found, the boxes overlap\t\n return true;\n }", "private HashMap setupBoundBoxes(BioMightBoundBox bioMightBoundBoxIn) \r\n\t{\r\n\t\t// Set up the bounding boxes for the various components\r\n\t\t// The various components locations will be driven by the\r\n\t\t// bounding boxes\r\n\t\tHashMap boundingBoxMap = new HashMap();\r\n\t\t\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\r\n\t\t// Initialize the BoundBoxes. This is used for\r\n\t\t// collections such as arms, legs,lungs,etc\r\n\t\tBioMightBoundBoxes bioBoundBoxes = null;\r\n\t\r\n\t\t// Initialize the BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\r\n\t\t// Initialize the Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize the Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\t\r\n\t\t// Use the information in the incomiing Bound Box\r\n\t\t// to orientate the inner bound boxes\r\n\t\tif (bioMightBoundBoxIn != null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Arm - SetupBoundBoxes - Incoming BoundBox: \" + \r\n\t\t\t\t\tbioMightBoundBoxIn.getXPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxIn.getYPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxIn.getZPos());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//********************************************************************* \r\n\t\t// EPITHELIUM BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Arm\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-12.0);\r\n\t\tzPos= new BigDecimal(-1.0);\r\n\t\t\r\n\t\txVector= new BigDecimal(9.0);\r\n\t\tyVector= new BigDecimal(8.0); \r\n\t\tzVector= new BigDecimal(4.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\r\n\t\t// Arm Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -9.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, \"ArmEpithelialCell\",\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(\"ArmEpithelialCell\", bioMightConnector);\r\n\t\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\tboundingBoxMap.put(Constants.ArmEpitheliumRef, bioBoundBox);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\t//********************************************************************* \r\n\t\t// ARMS BOUND BOXES\r\n\t\t// Set up the Bounding Box for the Bronchi\r\n\t\t// On a porportioned human, the Bronchi are located in the --- \r\n\t\t//**********************************************************************\r\n\t\t\r\n\t\t//********************************************************************* \r\n\t\t// LEFT ARMS BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Left Arm\r\n\t\t// On a porportioned human, the Bronchi are located in the --- \r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(1.0);\r\n\t\tyPos = new BigDecimal(-11.0);\r\n\t\tzPos= new BigDecimal(-3.5);\r\n\t\t\r\n\t\txVector= new BigDecimal(2.0);\r\n\t\tyVector= new BigDecimal(2.0); \r\n\t\tzVector= new BigDecimal(2.0);\r\n\r\n\t\tbioBoundBoxes = new BioMightBoundBoxes();\r\n\t\t\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\t\r\n\t\t// ArmEpithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -8.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.ArmEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.ArmEpitheliumRef, bioMightConnector);\r\n\t\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.LeftArmRef, bioBoundBox);\t\r\n\r\n\t\t//********************************************************************* \r\n\t\t// RIGHT ARMS BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Bronchi\r\n\t\t// On a porportioned human, the Bronchi are located in the --- \r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(-1.0);\r\n\t\tyPos = new BigDecimal(-11.0);\r\n\t\tzPos= new BigDecimal(-3.5);\r\n\t\t\r\n\t\txVector= new BigDecimal(2.0);\r\n\t\tyVector= new BigDecimal(2.0); \r\n\t\tzVector= new BigDecimal(2.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\t\r\n\t\t// ArmEpithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -8.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.ArmEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.ArmEpitheliumRef, bioMightConnector);\r\n\t\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.RightArmRef, bioBoundBox);\t\t\r\n\r\n\t\t// Put the BioMight BoundBoxes for the Bronchi \r\n\t\t// into the BoundingBoxMap \r\n\t\tboundingBoxMap.put(Constants.BronchiRef, bioBoundBoxes);\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn (boundingBoxMap);\r\n\t}", "static RenderBall[] make(Box box)\n\t{\n RenderBall[] rB = new RenderBall[box.nbBalls];\n\t\tfor (int i = 0; i < box.nbBalls; i++)\n\t\t{\n\t\t\trB[i] = new RenderBall();\n\t\t\trB[i].c.r = (int)(Math.random() * 195 + 30);\n\t\t\trB[i].c.v = (int)(Math.random() * 195 + 30);\n\t\t\trB[i].c.b = (int)(Math.random() * 195 + 30);\n\t\t\tif (i == box.nbBalls - 1)\n\t\t\t{\n\t\t\t\trB[i].c.r = 255;\n\t\t\t\trB[i].c.v = 255;\n\t\t\t\trB[i].c.b = 255;\n\t\t\t}\n\t\t}\n return rB;\n\t}", "public int getBoxId(Point point) {\n Color c = colorOfPoint(point);\n Integer id = boxIdFromColor(c);\n if(id == null) {\n throw new ArrayIndexOutOfBoundsException();\n }\n return id;\n }", "public void drawModifyingBox(Graphics g) {\r\n\t\tGraphics2D g2d = (Graphics2D) g;\r\n\t\tint x = -1;\r\n\t\tint y = -1;\r\n\t\tint width = -1;\r\n\t\tint height = -1;\r\n\r\n\t\tint highlightboxwidth = 0;\r\n\t\tint highlightboxheight = 0;\r\n\r\n\t\t/** getting the needed informations of the real pixel size of this row */\r\n\t\tLayoutCell current = tableLayoutUtil.getCurrentLayoutCell();\r\n\t\tif (current != null) {\r\n\t\t\tx = 0;\r\n\t\t\ty = current.getCellDimensions().y;\r\n\t\t\theight = current.getCellDimensions().height;\r\n\t\t\twidth = InterfaceGuidelines.MARGIN_LEFT;\r\n\r\n\t\t\thighlightboxheight = height;\r\n\t\t\thighlightboxwidth = tableLayoutUtil.getCalculatedLayoutWidth();\r\n\r\n\t\t}\r\n\r\n\t\t/** drawing a filled box on the left side as \"active indicator\" */\r\n\t\tg2d.setColor(Color.GRAY);\r\n\t\tg2d.fillRect(x, y, width, height);\r\n\r\n\t\t/** highlight the row */\r\n\t\tg2d.setColor(Color.GRAY);\r\n\t\tBasicStroke stroke = new BasicStroke(1.0f);\r\n\t\tg2d.setStroke(stroke);\r\n\t\tg2d.drawRect(x, y, highlightboxwidth, highlightboxheight);\r\n\t\tschraffiertesRechteckZeichnen(g2d, x, y, highlightboxwidth, highlightboxheight);\r\n\r\n\t\t/** drawing the row number on the gray box */\r\n\t\tg2d.setColor(Color.WHITE);\r\n\t\tg2d.setFont(new Font(\"SansSerif\", Font.BOLD, 10));\r\n\t\tString info = current.getCellY() + \"\";\r\n\t\tFontMetrics metrics = g2d.getFontMetrics();\r\n\t\tint fontHeight = metrics.getHeight();\r\n\t\tg2d.drawString(info, 1, ((height) / 2) + y + (fontHeight / 2));\r\n\t}", "private void drawPlayerDetailBox(Graphics g, int x, int y) throws IOException{\n\t\t ImageIcon bg;\n\t\t bg = new ImageIcon(ImageIO.read(new File(relativePath + \"playerDetailBox.png\")));\n\t\t bg.paintIcon(this, g, x, y);\n\t }", "private void drawBox(Graphics2D g2d, int y, int wid, int hei) {\n g2d.setColor(Dark_Gray);\n Triangle triangle1 = new Triangle(new Point(wid / 3, y), new Point(2 * wid / 3, y), new Point(wid / 3, y + hei / 10));\n triangle1.fill(g2d);\n g2d.setColor(Light_Gray);\n Triangle triangle2 = new Triangle(new Point(2 * wid / 3, y + hei / 10), new Point(2 * wid / 3, y), new Point(wid / 3, y + hei / 10));\n triangle2.fill(g2d);\n Triangle triangle3 = new Triangle(new Point(wid / 3, y + hei / 10), new Point(wid / 3 + 8, y + hei / 10), new Point(wid / 3 + 8, y + hei / 10 - 8));\n triangle3.fill(g2d);\n g2d.setColor(Dark_Gray);\n Triangle triangle4 = new Triangle(new Point(2 * wid / 3, y), new Point(2 * wid / 3 - 8, y), new Point(2 * wid / 3 - 8, y + 8));\n triangle4.fill(g2d);\n g2d.setColor(Color.BLACK);\n g2d.fillRect(wid / 3 + 4, y + 4, wid / 3 - 8, hei / 10 - 8);\n }", "public void buildVerticies(){\n\t\tfor(Entry<HexLocation, TerrainHex> entry : hexes.entrySet()){\n\t\t\t\n\t\t\tVertexLocation vertLoc1 = new VertexLocation(entry.getKey(), VertexDirection.NorthWest);\n\t\t\tVertex v1 = new Vertex(vertLoc1);\n\t\t\tverticies.put(vertLoc1, v1);\n\t\t\t\n\t\t\tVertexLocation vertLoc2 = new VertexLocation(entry.getKey(), VertexDirection.NorthEast);\n\t\t\tVertex v2 = new Vertex(vertLoc2);\n\t\t\tverticies.put(vertLoc2, v2);\n\t\t\t\n\t\t\tVertexLocation vertLoc3 = new VertexLocation(entry.getKey(), VertexDirection.East);\n\t\t\tVertex v3 = new Vertex(vertLoc3);\n\t\t\tverticies.put(vertLoc3, v3);\n\t\t\t\n\t\t\tVertexLocation vertLoc4 = new VertexLocation(entry.getKey(), VertexDirection.SouthEast);\n\t\t\tVertex v4 = new Vertex(vertLoc4);\n\t\t\tverticies.put(vertLoc4, v4);\n\t\t\t\n\t\t\tVertexLocation vertLoc5 = new VertexLocation(entry.getKey(), VertexDirection.SouthWest);\n\t\t\tVertex v5 = new Vertex(vertLoc5);\n\t\t\tverticies.put(vertLoc5, v5);\n\t\t\t\n\t\t\tVertexLocation vertLoc6 = new VertexLocation(entry.getKey(), VertexDirection.West);\n\t\t\tVertex v6 = new Vertex(vertLoc6);\n\t\t\tverticies.put(vertLoc6, v6);\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "GeometricalObject getObject(int index);", "protected void replayBox( ParticleBox box )\n\t{\n\t\tIterator<Object> particles = box.getParticleIdIterator();\n\t\t\n\t\twhile( particles.hasNext() )\n\t\t{\n\t\t\tParticle p = box.getParticle( particles.next() );\n\t\t\tPoint3 P = p.getPosition();\n\t\t\t\n\t\t\tparticleAdded( p.getId(), P.x, P.y, P.z );\n\t\t\t\n\t\t\tIterator<String> i = p.getAttributeKeyIterator();\n\t\t\t\n\t\t\tif( i != null )\n\t\t\t{\n\t\t\t\twhile( i.hasNext() )\n\t\t\t\t{\n\t\t\t\t\tString key = i.next();\n\t\t\t\t\tObject val = p.getAttribute( key );\n\t\t\t\t\t\n\t\t\t\t\tparticleAttributeChanged( p.getId(), key, val, false );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private BioMightBoundBoxes setupDefaultBoundBoxes() \r\n\t{\r\n\t\t// Set up the collection to hold the Bounding Boxes\r\n\t\tBioMightBoundBoxes bioBoundBoxes = null;\r\n\t\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\t\r\n\t\t// Initialize a BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\t\r\n\t\t// Initialize Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize a Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = null;\r\n\t\r\n\t\t//********************************************************************* \r\n\t\t// LEFT FOOT BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Feet\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-65.0);\r\n\t\tzPos= new BigDecimal(3.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\r\n\t\t// Feet Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(-2.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\t\r\n\t\t// Associate the connector on the Box\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box in the collection\r\n\t\tbioBoundBoxes.setBoundingBox(Constants.LeftFootRef, bioBoundBox);\r\n\t\r\n\t\r\n\t\t//********************************************************************* er\r\n\t\t// RIGHT CNEMES BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Foot\r\n\t\t// On a porportioned human, the \r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-14.0);\r\n\t\tzPos= new BigDecimal(-3.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\r\n\t\t// Foot Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(2.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\r\n\t\t// Associate the connector on the Box\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box in the collection\r\n\t\tbioBoundBoxes.setBoundingBox(Constants.RightFootRef, bioBoundBox);\r\n\t\r\n\t\t// return the collection that holds both foot bound boxes\r\n\t\treturn (bioBoundBoxes);\r\n\t}", "private ArrayList<Figure> getBoxData(){\n ArrayList<Figure> box = new ArrayList<>();\n box.addAll(getCircleData());\n box.addAll(getRectangleData());\n\n return box;\n }", "@PrivilegeCheck(privilege = Privileges.DEVELOPER)\n\t@CheckLock(entity = EntityNameConstants.CONTROL_STRUCTURE)\n\t@RequestMapping(value = \"/{id}/sensor/{sensorId}/box/{boxId}\", method = RequestMethod.PUT)\n\tpublic String setBoxId(@PathVariable(\"id\") @XStamppProjectId String projectId, @PathVariable(\"sensorId\") int sensorId,\n\t\t\t@PathVariable(\"boxId\") String boxId) throws IOException {\n\t\tif (boxId.equals(\"null\")) {\n\t\t\tboxId = null;\n\t\t}\n\t\tSensor result = this.sensorDataService.setSensorBoxId(UUID.fromString(projectId), sensorId, boxId);\n\t\treturn ser.serialize(result);\n\t}", "public static void loadGraph_Database(String bBoxFile, String name) {\n Application.graph = null;\n Position[] boundingBox;\n try {\n boundingBox = CSV.readPositionArray(bBoxFile);\n loadGraph_Database(boundingBox, name);\n } catch (Exception e) {\n System.out.println(\"Error while reading File\");\n }\n }" ]
[ "0.54534787", "0.52974147", "0.529277", "0.526171", "0.5189668", "0.518056", "0.5135981", "0.5102169", "0.5099085", "0.50449353", "0.5037372", "0.49703598", "0.4948506", "0.49301213", "0.49237776", "0.49213246", "0.4916215", "0.4912094", "0.49079642", "0.48828757", "0.48812073", "0.4880102", "0.48775744", "0.48767793", "0.484985", "0.48379144", "0.4817681", "0.48157898", "0.48149455", "0.48124695", "0.4802749", "0.47874057", "0.47815192", "0.47737312", "0.47475353", "0.4723716", "0.4720654", "0.47152346", "0.4713903", "0.47015822", "0.46743694", "0.46597657", "0.4657513", "0.4655163", "0.4653954", "0.46472746", "0.46467695", "0.46420452", "0.46416897", "0.46330637", "0.46268925", "0.4613702", "0.46104014", "0.45822385", "0.45736614", "0.45495296", "0.45468077", "0.45408702", "0.454061", "0.45402077", "0.45393115", "0.45346534", "0.4529297", "0.45258063", "0.4524793", "0.4517819", "0.4514311", "0.45103577", "0.4502095", "0.44985217", "0.44881567", "0.4482934", "0.44598347", "0.44527197", "0.44522956", "0.44491923", "0.44487995", "0.44392207", "0.44361153", "0.44307804", "0.44297075", "0.44285014", "0.4422721", "0.44209397", "0.44135454", "0.44122857", "0.44029358", "0.4396122", "0.43949127", "0.4392091", "0.43889564", "0.43858862", "0.4383433", "0.43793085", "0.43752202", "0.4367795", "0.43655086", "0.4359226", "0.43506253", "0.43484554" ]
0.51923275
4
Set Seed for Initialization of Agents and Populations
public void setSeed(int seed){ this.seed = seed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initialize() {\n\t\tinitialize(seedValue0, seedValue1);\n\t}", "public Seed() {\r\n\t\tcards = new Cards();\r\n\t\tseedCards = new ArrayList<Cards>();\r\n\t\tdescription = \"\";\r\n\t\tautoSummary = \"\";\r\n\t}", "Seed(){\r\n seedCells = new ArrayList<>();\r\n edgeCells = new ArrayList<>();\r\n }", "public Population InitSinglePopulation(int NumberOfAgents) {\n \n SinglePopulation TempPopulation = new SinglePopulation();\n \n TempPopulation.setPopulationID(0);\n\n for(int j = 0; j < NumberOfAgents; j++){\n\n SinglePopulationAgent TempAgentS = new SinglePopulationAgent(j,rand.nextDouble());\n boolean InitAction = (rand.nextDouble() < TempAgentS.getStrategy()) ? true : false;\n TempAgentS.setAction(InitAction);\n \n TempPopulation.AgentList.add(TempAgentS);\n }\n \n TempPopulation.setStrategyList();\n TempPopulation.setActionList();\n return TempPopulation;\n }", "public void initializePopulation(){\n\t\t// create the population\n\t\tfor(int i = 0; i < POPULATION_SIZE; i++){\n\t\t\t// get a random length for the building sequence\n\t\t\tint randArraySize = randomGenerator.nextInt(possiblePieces.length-1)+1;\n\t\t\t\n\t\t\tBuildingPiece[] pieceSequence = new BuildingPiece[randArraySize];\n\t\t\tfor(int j = 0; j < randArraySize; j++){\n\t\t\t\t// get a random possible piece and insert it into the sequence\n\t\t\t\tint randIndex = randomGenerator.nextInt(possiblePieces.length);\n\t\t\t\tpieceSequence[j] = possiblePieces[randIndex];\n\t\t\t}\n\t\t\t\n\t\t\t/* add a new number sequence with the newly created \n\t\t\t * sequence from the input */\n\t\t\tpopulation.add(new Building(pieceSequence, generation, possiblePieces));\n\t\t}\n\t}", "void setSeed(long seed);", "public void seed(long seed) {\n }", "private int[][] generateInitialPopulation(int binCt, int binSize, int pkgCt, int populationSize) {\n\t\tint[][] population = new int[populationSize][pkgCt];\n\t\tfor (int i = 0; i < populationSize; i++) {\n\t\t\tfor (int j = 0; j < pkgCt; j++) {\n\t\t\t\tpopulation[i][j] = rand.nextInt(binCt);\n\t\t\t}\n\t\t}\n\t\treturn population;\n\t}", "public CellularAutomatonRNG()\n {\n this(DefaultSeedGenerator.getInstance().generateSeed(SEED_SIZE_BYTES));\n }", "@Override\r\n protected void setUp()\r\n {\r\n island = new Island(5,5);\r\n position = new Position(island, 4,4);\r\n seed = new BirdFood(position, \"seed\", \"Crunchy Seeds\", 1.0, 2.0, 1.5);\r\n }", "public void initializeAgentsPositions(int seed) {\r\n //THE NEXT LINE MEANS THAT ALL INDIVIDUALS WILL BE EVALUATED WITH THE SAME\r\n //ENVIRONEMNT STARTING POSITIONS.\r\n //reset cells\r\n prey.setCell(null);\r\n for (Predator predator : predators) {\r\n predator.setCell(null);\r\n }\r\n prey.setCell(getCell(GeneticAlgorithm.random.nextInt(grid.length), GeneticAlgorithm.random.nextInt(grid.length)));\r\n for (Predator predator : predators) {\r\n do {\r\n Cell cell = getCell(\r\n GeneticAlgorithm.random.nextInt(grid.length), GeneticAlgorithm.random.nextInt(grid.length));\r\n if (!cell.hasAgent()) {\r\n predator.setCell(cell);\r\n }\r\n } while (predator.getCell() == null);\r\n } \r\n }", "public void setSeed(int seed) {\r\n this.seed = seed;\r\n }", "public void initWorldGenSeed(long p_75905_1_) {\n/* 99 */ this.worldGenSeed = p_75905_1_;\n/* */ \n/* 101 */ if (this.parent != null)\n/* */ {\n/* 103 */ this.parent.initWorldGenSeed(p_75905_1_);\n/* */ }\n/* */ \n/* 106 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 107 */ this.worldGenSeed += this.baseSeed;\n/* 108 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 109 */ this.worldGenSeed += this.baseSeed;\n/* 110 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 111 */ this.worldGenSeed += this.baseSeed;\n/* */ }", "void setSeed(final long seed);", "public void setNextGeneration() {\n // create a temporary population\n ArrayList<Genotype> tempPopulation = new ArrayList<Genotype>();\n\n // select mates\n while (tempPopulation.size() < populationSize) {\n tempPopulation.add(Genotype.Mate(rouletteSelection(),\n rouletteSelection(), crossoverProbability));\n }\n }", "@Before\n public void setUp() {\n randSeeder = new Random(42);\n\n //Show we haven't seeded the test's random number generator\n randSeed = RAND_UNSEEDED;\n comp = IntPlus.getIntComparator();\n }", "private void initializePopulation() {\n // reset the population\n population = new ArrayList<Genotype>();\n\n // set the population to an array of random genotypes\n for (int i = 0; i < populationSize; i++) {\n population.add(new Genotype(chromosomeSize));\n }\n\n // evaluate the population\n // evaluatePopulation();\n }", "void new_seed( Seed seed );", "public void setRNG(long seed);", "public void initialiseNewRandomPopulation(Random rnd) {\n\t\tthis.population = new ArrayList<Individual>();\n\t\tfor (int i = 0; i < this.popSize; i++) {\t\t\t\t\t//FOR ALL DESIRED POPULATION SIZE\n\t\t\tdouble[] randomValues = new double[DIMENSIONS];\t\t\t//INITIATE RANDOM X ARRAY WITH CORRECT DIMENSIONS\n\t\t\tfor (int j = 0; j < DIMENSIONS; j++) {\t\t\t\t\t//CREATE RANDOM X VALUES\n\t\t\t\trandomValues[j] = -5 + rnd.nextDouble() * 10;\t\t//ASSIGN VALUES TO EACH POSITION IN ARRAY\n\t\t\t}\n\t\t\tIndividual newInd = new Individual(randomValues);\t\t//CREATE NEW INDIVIDUAL WITH RANDOM X VALUES\n\t\t\tthis.population.add(newInd);\t\t\t\t\t\t\t//ADD INDIVIDUAL TO POPULATION\n\t\t}\n\t}", "public void generatePopulation() {\n\t\t\n\t\tif (SCType.getScLayers() <= 2)\n\t\t\tLogger.logError(\"To few supply chain layers, minimum of 3 required:\" + SCType.getScLayers());\n\t\t\n\t\tArrayList<CountryAgent> countryAgents = SU.getObjectsAll(CountryAgent.class);\t\t\n\t\tfor (CountryAgent country : countryAgents) {\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.PRODUCER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_PRODUCERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.PRODUCER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.INTERNATIONAL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_INTERNATIONALS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.INTERNATIONAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.WHOLESALER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_WHOLESALERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.WHOLESALER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.RETAIL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_RETAILERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.RETAIL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.CONSUMER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_CONSUMERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.CONSUMER);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set possible new suppliers and clients\n\t\tfor (BaseAgent agent : SU.getObjectsAll(BaseAgent.class)) {\n\t\t\tagent.setPossibleNewSuppliersAndClients();\n\t\t}\n\t\t\n\t\tSU.getDataCollector().addAllCurrentStock();\n\t}", "public ArrayList<Population> InitializePopulations (int NumberOfPopulations, int NumberOfAgents){\n \n ArrayList<Population> PopulationsList = new ArrayList();\n \n if(NumberOfPopulations == 1){\n \n PopulationsList.add(InitSinglePopulation(NumberOfAgents));\n \n }else{\n \n for(int i = 0; i < NumberOfPopulations; i++){ \n double temp = rand.nextDouble();\n PopulationsList.add(InitSinglePopulation(i, NumberOfAgents, temp));\n }\n \n }\n \n \n return PopulationsList;\n }", "public void setSeed(String seed) \n\t{\n\t}", "private void initializeDNA() {\n\t\tint numInputs = population.numInputs;\n\t\tint numOutputs = population.numOutputs;\n\t\tfor (int i = 1; i <= numInputs; i++) {\n\t\t\tsubmitNewNode(new NNode(i, NNode.INPUT));\n\t\t}\n\t\tfor (int j = numInputs + 1; j <= numInputs + numOutputs; j++) {\n\t\t\tsubmitNewNode(new NNode(j, NNode.OUTPUT));\n\t\t}\n\n\t\tfor (int i = 0; i < numInputs; i++) {\n\t\t\tfor (int j = 0; j < numOutputs; j++) {\n\t\t\t\tint start = i + 1;\n\t\t\t\tint end = numInputs + 1 + j;\n\t\t\t\tint innovation = population.getInnovation(start, end);\n\t\t\t\tGene g = new Gene(innovation, start, end, Braincraft\n\t\t\t\t\t\t.randomWeight(), true);\n\t\t\t\tpopulation.registerGene(g);\n\t\t\t\tsubmitNewGene(g);\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void genomeInitialises() {\n int inputCount = rng.nextInt(20) + 1;\n int outputCount = rng.nextInt(20) + 1;\n\n Population population = new Population(0, inputCount, outputCount, new BlankState());\n\n Genome genome = new Genome(inputCount, outputCount, blankState, population);\n\n int connectionGeneLength = inputCount * outputCount;\n\n for (int i = 0; i < connectionGeneLength; i++) {\n Connection connection = genome.getConnection(i);\n NodeType in = genome.getNode(connection.getIn());\n NodeType out = genome.getNode(connection.getOut());\n\n assertNotNull(connection);\n assertNotNull(in);\n assertNotNull(out);\n assertEquals(NodeType.INPUT, in);\n assertEquals(NodeType.OUTPUT, out);\n assertTrue(genome.containsNode(in, connection.getIn()));\n assertTrue(genome.containsNode(out, connection.getOut()));\n }\n }", "public ScenarioGenerator(long seed) {\n rd.setSeed(seed);\n }", "RoachPopulation(int initial)\n {\n roaches = initial;\n }", "SolutionPopulation initialise(ArrayList<City> cities, int populationSize);", "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "public static void runAGeneration() {\n //Breeds Population until max population size for genetic drift\n breedAll();\n\n //Genocides Population by fitness\n genocide();\n\n System.out.println(\"\\nPopulation: \");\n\n //prints population\n printPopulation();\n }", "public void setSeed(int seed){\n\t\tmyRandom = new Random(seed);\n\t}", "public static void seed() {\n\n // Get locations, employees, and custodians from database.\n ArrayList<Location> locations = new ArrayList(LocationTable.getLocations().values());\n ArrayList<User> employees = UserTable.getEmployees();\n ArrayList<User> custodians = UserTable.getCustodians();\n\n // Generate random sanitation requests\n Random rand = new Random();\n final int numEntries = 30;\n for (int i = 0; i < numEntries; i++) {\n\n // Generate location (uniform)\n Location location = locations.get(rand.nextInt(locations.size()));\n\n // Generate priority (uniform)\n Priority priority;\n switch (rand.nextInt(3)) {\n case 0: priority = Priority.HIGH; break;\n case 1: priority = Priority.MEDIUM; break;\n default: priority = Priority.LOW; break;\n }\n\n // Generate requester\n User requester = employees.get(rand.nextInt(employees.size()));\n\n // Generate request time (uniform current time + ~12 hours)\n Timestamp requestTime = new Timestamp(\n new Date().getTime() + rand.nextInt(43200000));\n\n // Generate description\n String description;\n switch (rand.nextInt(3)) {\n case 0: description = \"Drink spill\";\n case 1: description = \"Vomit\";\n default: description = \"Radioactive waste\";\n }\n\n // Add request to database\n SanitationRequest request = new SanitationRequest(\n 0, location, priority, Status.INCOMPLETE, description,\n requester, requestTime,\n null, null, null);\n\n // Mark 2/3 of requests as claimed\n int claimFlag = rand.nextInt(3);\n if (claimFlag > 0) {\n\n // Mark as claimed within 1 hour of request\n User servicer = custodians.get(rand.nextInt(custodians.size()));\n Timestamp claimedTime = new Timestamp(\n requestTime.getTime() + rand.nextInt(3600000));\n request.setServicer(servicer);\n request.setClaimedTime(claimedTime);\n\n // Mark half of claimed requests as completed within 2 hours of claim\n if (claimFlag == 2) {\n Timestamp completedTime = new Timestamp(\n claimedTime.getTime() + rand.nextInt(7200000));\n request.setCompletedTime(completedTime);\n request.setStatus(Status.COMPLETE);\n }\n\n // Update request in database\n editSanitationRequest(request);\n }\n\n // Add request to database\n addSanitationRequest(request);\n }\n }", "public void random_init()\r\n\t{\r\n\t\tRandom random_generator = new Random();\r\n\t\t\r\n\t\tfor(int i=0;i<chromosome_size;i++)\r\n\t\t{\r\n\t\t\tchromosome[i] = random_generator.nextInt(num_colors)+1;\r\n\t\t}\r\n\t}", "public void init( int pointDimension, long randomSeed );", "public GridSimRandom(long seed) {\n random_.setSeed(seed);\n }", "@Override\n\n //-----------------\n\n public void init() {\n //test(); // <---------------- Uncomment to TEST!\n\n // %-distribution of RED, BLUE and NONE\n double[] dist = {0.49, 0.49, 0.02};\n\n // Number of locations (places) in world (square)\n int nLocations = 950;\n\n Actor[] distArray = distribution(nLocations, dist); //Generates array with correct distribution.\n distArray = shuffle(distArray); //Shuffles array\n world = toMatrix(distArray, nLocations, world); //Generates the start world.\n // Should be last\n fixScreenSize(nLocations);\n }", "@Before\n public void setUp()\n {\n\n // Create countries\n country1 = new Country(\"Country 1\", null);\n country2 = new Country(\"Country 2\", null);\n country1.setGame(game);\n country2.setGame(game);\n\n // Create Cities\n cityA = new City(\"City A\", 80, country1);\n cityB = new City(\"City B\", 60, country1);\n cityC = new City(\"City C\", 40, country1);\n\n }", "private void initializeAgent() {\n if (Math.random() < PROBABILITY_START_WITH_AGENT) {\n agent = new SugarscapeAgent();\n }\n }", "@Override\n\tprotected void onInitialAgentsCreation() {\n\t\tSystem.out.println(\"Création drones\");\n\t\tDrone drone = null;\n\t\tDroneBuilder droneBuilder;\n\t\tfor (int i = 0; i < INITIAL_DRONE_COUNT; i++) {\n\t\t\tdrone = new Drone(this, getEnvironment().getRandom().nextInt(World.WIDTH), getEnvironment().getRandom().nextInt(World.HEIGHT));\n\t\t\tdroneBuilder = new DroneBuilder();\n\t\t\tdroneBuilder.setDrone(drone);\n\t\t\tdroneBuilder.buildBehaviorStates();\n\t\t\tdroneBuilder.buildAgentPhase();\n\t\t}\n\t}", "public DayTradeStrategy(int seed) {\r\n /* If you need some initialization of e.g., instance variables\r\n write here.\r\n */\r\n\r\n fRandom = new Random(seed); // Initialization of random sequence.\r\n }", "private void createInitialPopulation() throws InterruptedException, TimeoutException {\n\n\t\tProteinDatabase ident = new ProteinDatabase();\n\t\tident.parseInput(\"proteins.fasta\");\n\t\tList<Protein> database = ident.getDatabase();\n\n\t\tfor (Protein data : database) {\n\t\t\tdata.setExperimental(es);\n\t\t}\n\n\t\tList<Protein> candidates = new ArrayList<Protein>();\n\t\tfor (Protein p : database)\n\t\t{\n\t\t\tTheoreticalSpectrum theoreticalSpectrum = new TheoreticalSpectrum(p.getAminoAcidsequence());\n\t\t\tif (Math.abs(parentMass - theoreticalSpectrum.getParentMass()) <= parentMassThreshold) {\n\t\t\t\tcandidates.add(p);\n\t\t\t}\n\t\t}\n\n\t\trunInitialFitnessCalculations(candidates);\n\n\t\tCollections.sort(candidates, new ProteinFitnessComparator());\n\t\tdebug(candidates, 0);\n\n\n\t\tpopulation = new ArrayList<Protein>(populationSize);\n\n\t\tpopulationActualSize = 0;\n\t\tfor (Protein p : candidates)\n\t\t{\n\t\t\tpopulation.add(p);\n\t\t\tpopulationActualSize++;\n\t\t\tif (populationActualSize == populationSize)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void beginGeneration() {\n\t\tfor(int seqIndex = 0; seqIndex < NUM_SEQUENCES; ++seqIndex) {\n\t\t\tfor(int pieceIndex = 0; pieceIndex < SEQUENCE_LENGTH; ++pieceIndex) {\n\t\t\t\tsequences[seqIndex][pieceIndex] = random.nextInt(State.N_PIECES);\n\t\t\t}\n\t\t}\n\t}", "protected void initializeExecutionRandomness() {\r\n\r\n\t}", "private void setupAnts() {\n IntStream.range(0, numberOfAnts)\n .forEach(i -> {\n ants.forEach(ant -> {\n ant.clear();\n ant.visitCity(-1, random.nextInt(numberOfCities));\n });\n });\n currentIndex = 0;\n }", "public static void generateSeedData()\n\t{\n\t\teventIDCounter = 1; //set counter for ID of events to 1\n\t\t\n\t\t// generate the grid world\n\t\tfor(int i = 0; i <= (MAX_COORDS*2); i++)\n\t\t{\n\t\t\tfor(int j = 0; j <= (MAX_COORDS*2); j++)\n\t\t\t{\n\t\t\t\tgridWorld[i][j] = new Coordinate(i-MAX_COORDS,j-MAX_COORDS);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Assumption that there will be 1 event to every 10 coordinates\n\t\t// grid of 21*21=441, 441/10=44\n\t\tint numOfEvents = ((MAX_COORDS*2)+1)*((MAX_COORDS*2)+1)/10;\n\t\tEvent newEvent;\n\t\tint newXCoord;\n\t\tint newYCoord;\n\t\tTicket ticket;\n\t\tArrayList<Ticket> tickets;\n\t\t\n\t\tfor(int i = 1; i <= numOfEvents; i++)\n\t\t{\n\t\t\t// create random coordinates for new event\n\t\t\tnewXCoord = rand.nextInt(MAX_COORDS + 1 +MAX_COORDS) -MAX_COORDS;\n\t\t\tnewYCoord = rand.nextInt(MAX_COORDS + 1 +MAX_COORDS) -MAX_COORDS;\n\t\t\t\n\t\t\tnewEvent = new Event(i, gridWorld[newXCoord+MAX_COORDS][newYCoord+MAX_COORDS], \"Event \"+String.format(\"%03d\", i)); \n\t\t\t\n\t\t\t//create a random number of tickets between 0 and 5\n\t\t\ttickets = new ArrayList<Ticket>(); // clear all tickets in the arraylist\n\t\t\tfor(int j = 0; j < 4; j++)\n\t\t\t{\n\t\t\t\tint num = rand.nextInt(5000 - 1000) +1000; // create price in cents, from $10 to $50 \n\t\t\t\tdouble price = num/100.0; // convert to double\n\t\t\t\tticket = new BasicTicket((new BigDecimal(price)).setScale(2, RoundingMode.CEILING));\n\t\t\t\ttickets.add(ticket);\n\t\t\t}\n\t\t\tnewEvent.setTickets(tickets);\n\t\t\t\t\n\t\t\t// set the grid coordinate to have this event\n\t\t\tgridWorld[newXCoord+MAX_COORDS][newYCoord+MAX_COORDS].setEvent(newEvent);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t// Add a couple of events hard coded first for testing\n\t\t/*Event newEvent1 = new Event(gridWorld[18][20], \"Event 001\"); //distance of 18 from 0,0\n\t\tgridWorld[18][20].setEvent(newEvent1);\n\t\t\n\t\tEvent newEvent2 = new Event(gridWorld[9][10], \"Event 002\"); //distance of 1 from 0,0\n\t\tgridWorld[9][10].setEvent(newEvent2);\n\t\t\n\t\tEvent newEvent3 = new Event(gridWorld[8][5], \"Event 003\"); //distance of 7 from 0,0\n\t\tgridWorld[8][5].setEvent(newEvent3);\n\t\t\n\t\tEvent newEvent4 = new Event(gridWorld[10][14], \"Event 004\"); //distance of 4 from 0,0\n\t\tgridWorld[10][14].setEvent(newEvent4);\n\t\t\n\t\tEvent newEvent5 = new Event(gridWorld[10][11], \"Event 005\"); //distance of 1 from 0,0\n\t\tgridWorld[10][11].setEvent(newEvent5);\n\t\t\n\t\tEvent newEvent6 = new Event(gridWorld[5][10], \"Event 006\"); //distance of 5 from 0,0\n\t\tgridWorld[5][10].setEvent(newEvent6);\n\t\t\n\t\tEvent newEvent7 = new Event(gridWorld[11][12], \"Event 007\"); //distance of 3 from 0,0\n\t\tgridWorld[11][12].setEvent(newEvent7);\n\t\t\n\t\tEvent newEvent8 = new Event(gridWorld[0][0], \"Event 008\"); //distance of 20 from 0,0\n\t\tgridWorld[0][0].setEvent(newEvent8);*/\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n public void run() {\n if (experiment.randomSeed != -1) {\n ThreadLocalRandom.current().setSeed(experiment.randomSeed);\n }\n\n // Initialise the environment and agents\n environment.initialise();\n for (Agent agent : agents) {\n agent.initialise();\n }\n\n // Add the agents to the environment\n for (Agent agent : agents) {\n environment.add(agent);\n }\n\n // Run the experiment\n for (int update = 1, episode = 1; update <= experiment.totalUpdates; episode++) {\n // Restart the environment at the beginning of an episode\n environment.restart();\n\n // Play out an episode\n for (int turn = 1; !environment.isTerminal() && (environment.maxTurns() == 0 || turn <= environment.maxTurns()) && update <= experiment.totalUpdates; turn++, update++) {\n // Perform the next turn\n environment.performTurn();\n\n // Increment the task\n task.increment();\n\n // If evaluation point\n if (update % experiment.observationFrequency == 0) {\n evaluate(run, update, episode);\n }\n }\n }\n }", "protected void onChange_InitPopulation() {\n onChange_InitPopulation_xjal( InitPopulation );\n }", "@Test\n public void randomSeedNumTest()\n {\n int x = _city.getRandomNum(5);\n int y = _city.getRandomNum(5);\n assertEquals(x, y);\n }", "@Override\n public Builder seed(long randomSeed) {\n super.seed(randomSeed);\n return this;\n }", "public void setUp() {\r\n state1 = new DateState(new State(20200818, \"VM\", 110, 50, 123, 11, 19,\r\n 65, \"A+\", 15)); // root\r\n test1 = state1;\r\n state2 = new DateState(new State(20200818, \"VA\", 72, 43, 79, 12, 17, 33,\r\n \"B\", 9));\r\n state3 = new DateState(new State(20200817, \"VA\", 72, 43, 79, 12, 17, 33,\r\n \"B\", 9));\r\n state4 = new DateState(new State(20200817, \"VM\", 110, 50, 123, 11, 19,\r\n 65, \"A+\", 15));\r\n nullState = null;\r\n }", "public void reproduce() {\n if (getSelfCount() >= getMinMates() && getLocation()\n .getEmptyCount() >= getMinEmpty()\n && getFoodCount() >= getMinFood() && dayCountDown != 0) {\n int index = RandomGenerator.nextNumber(getLocation()\n .getEmptyCount());\n Cell selectedCell = getLocation().getEmptyArray().get(index);\n createLife(selectedCell).init();\n \n }\n \n }", "public NextGeneration(){\n this.born[3] = true;\n this.survives[2] = true;\n this.survives[3] = true;\n }", "String getSeed();", "public int getSeed() {\r\n return seed;\r\n }", "@Override\n\tpublic void setStartPopulation(List<BitString> seedPopulation) {\n\t\t\n\t}", "void init() {\r\n \tfor (int i=0; i<SIZE; i++) {\r\n \t\tfor (int j=0; j<LEN; j++) {\r\n \t\t\tif (rnd.nextDouble() < 0.5)\r\n \t\t\t\toldpop[i][j] = 0;\r\n \t\t\telse\r\n \t\t\t\toldpop[i][j] = 1;\r\n \t\t}\r\n \t}\r\n \tfor (int j=0; j<LEN; j++) {\r\n \t\tcbest[j] = oldpop[0][j];\r\n \t}\r\n\t\tbest = fitness(0);\r\n }", "public Population InitSinglePopulation\n (int PopulationID, int NumberOfAgents, double MixedStrategy){\n \n MultiPopulation TempPopulation = new MultiPopulation();\n\n TempPopulation.setPopulationID(PopulationID);\n TempPopulation.setInitMixedStrategy(MixedStrategy);\n\n for(int j = 0; j < NumberOfAgents; j++){\n\n double TempDraw = rand.nextDouble();\n boolean TempAction = (TempDraw < MixedStrategy) ? true : false;\n MultiPopulationAgent TempAgentM = \n new MultiPopulationAgent(j,PopulationID,TempAction);\n \n TempPopulation.AgentList.add(TempAgentM);\n \n }\n \n TempPopulation.setActionList();\n return TempPopulation;\n }", "public int getSeed() {\n return seed;\n }", "public int getSeed() {\n return seed;\n }", "public final void seed(int s0, int s1, int s2)\r\n {\r\n d0 = s0;\r\n d1 = s1;\r\n d2 = s2;\r\n i = 0;\r\n }", "private void setupAgents() {\r\n try {\r\n setupJade();\r\n //createAgent(Bank.class, \"Bank\");\r\n createAgent(ProductionAgent.class, \"Res1\");\r\n createAgent(ProductionAgent.class, \"Res2\");\r\n createAgent(SocialAgent.class, \"Soc\");\r\n createAgent(ClientAgent.class, \"Client\");\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace(System.err);\r\n }\r\n }", "public void begin(GameState init_state) {\n rand = new Random();\n }", "void initial()\n\t{\n\t\tint i;\n\t\tfor(i=0;i<FoodNumber;i++)\n\t\t{\n\t\tinit(i);\n\t\t}\n\t\tGlobalMin=f[0];\n\t for(i=0;i<D;i++)\n\t GlobalParams[i]=Foods[0][i];\n\n\n\t}", "protected Agent(){\n\t\trand = SeededRandom.getGenerator();\n\t}", "public void setup() {\n doors = new ArrayList<>();\n doors.add(new Door(Contains.GOAT));\n doors.add(new Door(Contains.GOAT));\n doors.add(new Door(Contains.CAR));\n Collections.shuffle(doors);\n stage = Stage.BEGINNING;\n }", "public static void setSeed( long seed ) {\n random = new Random( seed );\n }", "public WB_RandomPoint setSeed(final long seed);", "public void initialSetup(GameObserver gameObs) {\n nPlayers = gameObs.getNumPlayers();\n nActs = gameObs.getNumActions().clone();\n eGame = new EmpiricalMatrixGame(nPlayers, nActs);\n eGame.setDefaultPayoff(gameObs.getDefaultPayoff());\n currentPlayer = 0;\n lastPlayerWithBR = nPlayers - 1;\n samplesToConfirmEquilibrium = -1;\n mostStableConfirmed = null;\n confirmedStability = Double.POSITIVE_INFINITY;\n currentOutcome = new int[nPlayers];\n predictedOutcome = new OutcomeDistribution(nActs);\n tabu = new GenericTensor<Boolean>(nActs);\n for (int i = 0; i < tabu.size(); i++) {\n tabu.setValue(false, i);\n }\n deviationTestOrder.initialize(nPlayers, nActs);\n\n // this must be last\n selectRandomUnexploredProfile(gameObs);\n }", "public static void randomInit(int r) { }", "public long getSeed()\n {\n return randomSeed;\n }", "private void initConfiguration() {\n\t\tseedList = new ArrayList<String>();\n\t\t// TODO: add other initialization here...\n\t}", "@BeforeEach\n void setUp() {\n seed = new Random().nextInt();\n random = new Random().nextInt();\n rng = new Random(seed);\n int strSize = rng.nextInt(20);\n hello = RandomStringUtils.random(strSize, 0, Character.MAX_CODE_POINT, true, false, null, rng);\n int binarySize = rng.nextInt(20)+1;\n binary = RandomStringUtils.random(binarySize, ZeroOne);\n st = new TString(hello);\n bot = new Bool(true);\n bof = new Bool(false);\n bi = new Binary(binary);\n i = new Int(seed); //seed is a random number\n decimal = seed+0.1; //transformed to double\n f = new Float(decimal);\n g = new Float(random);\n j = new Int(random);\n Null = new NullType();\n }", "@ProgrammaticProperty\n public void setSeed(String seed) {\n m_randomSeed = seed;\n }", "public void setSeed(long seed) {\n real.setSeed(seed);\n twister.setSeed(seed);\n }", "protected void initializePopulation () {\n\t\tfor (int i = 0; i < this.speciesSize; i++) {\n\t\t\tthis.detectors.add(DetectorFactory.makeDetector(this.featuresLength, this.typeBias, this.generalityBias));\n\t\t}\n\t}", "public static void main(String[] args) {\n City city = new City(60, 200);\n\n City city2 = new City(180, 200);\n\n City city3 = new City(80, 180);\n City city4 = new City(140, 180);\n\n City city5 = new City(20, 160);\n\n City city6 = new City(100, 160);\n\n City city7 = new City(200, 160);\n\n City city8 = new City(140, 140);\n\n City city9 = new City(40, 120);\n\n City city10 = new City(100, 120);\n\n City city11 = new City(180, 100);\n\n City city12 = new City(60, 80);\n\n City city13 = new City(120, 80);\n City city14 = new City(180, 60);\n City city15 = new City(20, 40);\n\n City city16 = new City(100, 40);\n\n City city17 = new City(200, 40);\n City city18 = new City(20, 20);\n\n City city19 = new City(60, 20);\n City city20 = new City(160, 20);\n List<City> list=new ArrayList<City>();\n list.add(city);list.add(city2);\n list.add(city3);\n list.add(city4);\n list.add(city5);\n list.add(city6);\n list.add(city7);\n list.add(city8);\n list.add(city9);\n list.add(city10);\n list.add(city11);\n list.add(city12);\n list.add(city13);\n list.add(city14);\n list.add(city15);\n list.add(city16);\n list.add(city17);\n list.add(city18);\n list.add(city19);\n list.add(city20);\n\n // Initialize population\n Population pop = new Population(100, true,list);\n System.out.println(\"Initial distance: \" + pop.getBestTour().getDistance());\n\n // Evolve population for 100 generations\n pop = Ga.evolvePopulation(pop);\n for (int i = 0; i < 500; i++) {\n pop = Ga.evolvePopulation(pop);\n System.out.println(\"第\"+i+\"代\"+pop.getBestTour().getDistance());\n }\n\n // Print final results\n System.out.println(\"Finished\");\n System.out.println(\"Final distance: \" + pop.getBestTour().getDistance());\n System.out.println(\"Solution:\");\n System.out.println(pop.getBestTour());\n }", "private int[] generateInitialSolution(){\n int[] initialSolution = new int[tspProblem.getNumberOfCities()];\n ArrayList<Integer> listToGetRandomCities = new ArrayList<Integer>();\n\n for(int i = 0; i <= initialSolution.length - 1; i++){\n listToGetRandomCities.add(i);\n }\n\n for(int i = 0; i <= initialSolution.length - 1; i++){\n initialSolution[i] = getRandomCity(listToGetRandomCities);\n }\n\n return initialSolution;\n }", "public void setSeed(final long seed) {\n random.setSeed(seed);\n }", "public static void setSeed(long s) {\r\n seed = s;\r\n random = new Random(seed);\r\n }", "public void setRandomSeed(long seed) {\n randomGenerator.setSeed(seed);\n }", "public void generateIndividual() {\n // Loop through all our destination cities and add them to our tour\n for (int cityIndex = 0; cityIndex < TourManager.numberOfCities(); cityIndex++) {\n setCity(cityIndex, TourManager.getCity(cityIndex));\n }\n // Randomly reorder the tour\n Collections.shuffle(tour);\n }", "private void SetUp() {\n numbers.add(0);\n numbers.add(1);\n numbers.add(2);\n numbers.add(3);\n numbers.add(4);\n numbers.add(5);\n numbers.add(6);\n numbers.add(7);\n numbers.add(8);\n numbers.add(9);\n\n PuzzleSolve(10, empty, numbers);\n }", "private void init(){\n \tdimension.set(0.5f, 0.5f);\n \tsetAnimation(Assets.instance.goldCoin.animGoldCoin);\n \tstateTime = MathUtils.random(0.0f,1.0f);\n \t\n \t//regGoldCoin = Assets.instance.goldCoin.goldCoin;\n \t // Set bounding box for collision detection\n \tbounds.set(0,0,dimension.x, dimension.y);\n \tcollected = false;\n }", "@Test\n\tpublic void testUpdatesSeeds() {\n\t\t//Arrange\n\t\tint startLoc[] = new int[]{2};\n\t\tint otherLocs[] = new int[]{0,1,3,4};\n\t\t\t\n\t\tMockito.when(randMock.generateRandomNumber(1, 4, seed)).thenReturn(startLoc);\n\t\tMockito.when(randMock.generateRandomNumber(10, 5, seed+1)).thenReturn(otherLocs);\n\t\t\t\n\t\t//Act\n\t\tlong seed = 2;\n\t\t\t\n\t\t//Assert\n\t\tassertEquals(seed, iteratorObj.startVisits());\n\t}", "public int getSeed(){\n return this.seed; \n }", "public void setPoputlation (double population) { n.setPopulation(population); }", "public void setRandomGenes(int i){\n if (i > populationSize){\n throw new IllegalArgumentException(\"The number of random genes per generation must not be greater than the population size\");\n }\n randGenes = i;\n }", "@Before\n public void initialize() {\n kata4 = new Kata4();\n }", "@BeforeEach\n void init() {\n carte = new Carte();\n planning = new Planning(carte);\n }", "@Before\n\tpublic void initBeforeEachTestMethod()\n\t{\n\t\ttileScorer_STUDENT = new TileScorerImpl_Moran(ScrabbleEliteConfiguration_Moran.getEliteTileToPointsMap());\n\t\ttileTranslator_STUDENT = new TileTranslatorImpl_Moran(ScrabbleEliteConfiguration_Moran.getEliteTileToTranslationSetMap());\n\t\tdictionary_STUDENT = new DictionaryImpl_Moran(ScrabbleEliteConfiguration_Moran.getEliteWordList());\n\t\tscrabbleWordScorer_STUDENT = new ScrabbleWordScorerImpl_Moran(tileScorer_STUDENT, tileTranslator_STUDENT, dictionary_STUDENT);\n\t}", "@Override\n\tprotected void setup() {\n\t\tObject[] args = getArguments();\n\t\tif (args != null && args.length == 3) {\n\t\t\tnumAttempts = Integer.parseInt((String) args[0]);\n\t\t\tinitLaps = Integer.parseInt((String) args[1]);\n\t\t\tstep = Integer.parseInt((String) args[2]);\n\t\t\tlogger.info(\"Init experiment (a:\" + numAttempts + \", i:\" + initLaps + \", s:\" + step);\n\t\t} else {\n\t\t\tlogger.log(Logger.SEVERE, \"Agent \" + getLocalName() + \" - Incorrect number of arguments\");\n\t\t\tdoDelete();\n\t\t}\n\t\t// Init experiment\n\t\taddBehaviour(new ExperimentBehaviour(numAttempts, initLaps, step));\n\t}", "public GoLRandomInitializer(long seed) {\n Random randomLifeOrDeath = new Random(seed);\n \n // Give life to random *predicted* cells in the board\n for (int row = 0; row < this.NUM_ROWS; row++)\n for (int column = 0; column < this.NUM_COLUMNS; column++)\n this.gameBoard[row][column] = new \n GoLCell(randomLifeOrDeath.nextBoolean());\n }", "public long getSeed() {\n return seed;\n }", "private void createSeed(Element temp) {\n\n Seed seed = new Seed();\n for(int i = 0; i < temp.getAttributeCount(); i++) { //same principle as createGrape\n Attribute attribute = temp.getAttribute(i);\n String name = attribute.getQualifiedName();\n String value = attribute.getValue();\n\n switch (name) {\n case (\"name\"):\n seed.setId(value);\n break;\n\n case (\"type\"):\n try {\n seed.setSeedClass(Class.forName(\"Examples.\"+value));\n } catch (ReflectiveOperationException e) {\n Class className = this.isPrimitive(value);\n if(className == null)\n e.printStackTrace();\n else\n seed.setSeedClass(className);\n }\n break;\n\n case(\"constructor\"):\n seed.setIsConstructor(Boolean.valueOf(value));\n break;\n\n case (\"isReferenced\"):\n seed.setRef(Boolean.valueOf(value)); //TODO considerar que se hace si es true\n break;\n\n case (\"value\"):\n if(seed.getSeedClass() != null) {\n if(seed.isRef()){//Debo saber si meter un objeto o un valor\n String k =seed.getSeedClass().getSimpleName();\n Object h = singletonGrapes.get(k);\n if(h==null){\n h = this.isPrimitive(seed.getSeedClass().getSimpleName());\n }\n seed.setValue(h);\n }else{\n seed.setValue(value);\n }\n } else {\n System.err.print(\"Objects.Seed parameters not in correct order. Type should be before values.\");\n }\n break;\n\n default:\n System.err.print(\"Invalid parameter \" + name);\n break;\n }\n }\n\n Element parent = (Element) temp.getParent();\n Grape parentGrape = grapes.get(parent.getAttributeValue(\"id\"));\n super.dependencies.computeIfAbsent(parentGrape.getId(), V-> new LinkedList<>());\n super.dependencies.get(parentGrape.getId()).add(seed); //map should store seeds that belong to the same grape TODO revisar estructura\n\n if(seed.isConstructor())\n buildWithConstructors(parentGrape.getId());\n else\n buildWithSetters(parentGrape.getId());\n }", "public static void generatePopulation() {\n population = setupArray(POP_SIZE, NUM_RULES, GENE_SIZE, COND_LEN);\n\n for (Individual individual : population) {\n for (int i = 0; i < individual.getGene().length; i++) {\n individual.gene[i] = bits.get(new Random().nextInt(2));\n }\n individual.generateRulebase();\n }\n }", "@Before\n\tpublic final void setUp() {\n\t\tint numLegs = 4;\n\t\tanimal = new Animal(\"Possum\", \"Mammal\", \"male\", numLegs);\n\t\ttestForest = new Forest(\"Hamner Forest Park\", \"Alpine Forest\", \n\t\t\t\t\"Warm, Mountain-like\");\n\t}", "@Before\n public void setUp()\n {\n game = new Game(456);\n // Create countries\n country1 = new Country(\"Country 1\");\n country2 = new Country(\"Country 2\");\n\n country1.setGame(game);\n country2.setGame(game);\n\n // Create cities\n cityA = new City(\"City A\", 80, country1);\n cityB = new City(\"City B\", 60, country1);\n cityC = new City(\"City C\", 40, country1);\n cityD = new CapitalCity(\"City D\", 100, country1);\n cityE = new CapitalCity(\"City E\", 50, country2);\n cityF = new City(\"City F\", 90, country2);\n cityG = new City(\"City G\", 70, country2);\n\n // Connect cities to countries\n country1.addCity(cityA);\n country1.addCity(cityB);\n country1.addCity(cityC);\n country1.addCity(cityD);\n\n country2.addCity(cityE);\n country2.addCity(cityF);\n country2.addCity(cityG);\n\n // Create roads\n country1.addRoads(cityA, cityB, 4);\n country1.addRoads(cityA, cityC, 3);\n country1.addRoads(cityA, cityD, 5);\n country1.addRoads(cityB, cityD, 2);\n country1.addRoads(cityC, cityD, 2);\n country1.addRoads(cityC, cityE, 4);\n country1.addRoads(cityD, cityF, 3);\n country2.addRoads(cityE, cityC, 4);\n country2.addRoads(cityE, cityF, 2);\n country2.addRoads(cityE, cityG, 5);\n country2.addRoads(cityF, cityD, 3);\n country2.addRoads(cityF, cityG, 6);\n }", "public final void randomSeed(long what){\n\t\tsetSeed(what);\n\t\trandom();\n\t}", "public GoLRandomInitializer() {\n Random randomLifeOrDeath = new Random();\n \n // Give life to random cells in the board\n for (int row = 0; row < this.NUM_ROWS; row++)\n for (int column = 0; column < this.NUM_COLUMNS; column++)\n this.gameBoard[row][column] = new \n GoLCell(randomLifeOrDeath.nextBoolean());\n }", "private void initializeStateWithRandomValues(Assignment x, List<RandomVariable> Z){\n for (RandomVariable Zi: Z){\n Object randomValue = Zi.getDomain().get(new Random().nextInt(Zi.getDomain().size()));\n x.set(Zi, randomValue);\n\n }\n }" ]
[ "0.65155506", "0.6486056", "0.63683736", "0.62447953", "0.62233424", "0.6207705", "0.61316264", "0.6107863", "0.6104313", "0.61003554", "0.6085997", "0.60801125", "0.6073071", "0.6065431", "0.6056414", "0.60558486", "0.6055356", "0.60133135", "0.5983978", "0.596144", "0.59602886", "0.59490573", "0.59314907", "0.59303075", "0.59184074", "0.59017205", "0.5893345", "0.5878042", "0.5871187", "0.5858986", "0.58525497", "0.5827602", "0.5823188", "0.5786603", "0.5733473", "0.57250607", "0.5707963", "0.5707564", "0.5690283", "0.5673789", "0.56610507", "0.5651348", "0.56320256", "0.56267977", "0.56197083", "0.5619263", "0.56120837", "0.5609005", "0.56089616", "0.5603664", "0.559443", "0.55801636", "0.55739766", "0.55683243", "0.5559006", "0.5550975", "0.5546819", "0.55452377", "0.55452377", "0.55401284", "0.55374557", "0.553458", "0.5530198", "0.55274034", "0.5520901", "0.5512174", "0.55092645", "0.550731", "0.55064845", "0.5478968", "0.54747313", "0.547342", "0.5470352", "0.5463962", "0.5458844", "0.54562354", "0.545069", "0.543738", "0.5430203", "0.5423224", "0.54205805", "0.54127616", "0.54016256", "0.53892106", "0.53866833", "0.53860307", "0.5382021", "0.53806126", "0.5369275", "0.53680605", "0.5367523", "0.53648216", "0.5364766", "0.5364733", "0.53603053", "0.535904", "0.5358593", "0.5358518", "0.53583837", "0.5350653" ]
0.64058495
2
Returns the Initialization seed
public int getSeed(){ return this.seed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static long getSeed() {\r\n return seed;\r\n }", "public int getSeed() {\r\n return seed;\r\n }", "public int getSeed() {\n return seed;\n }", "public int getSeed() {\n return seed;\n }", "public long getSeed() {\n return seed;\n }", "public long getSeed() {\n\t\treturn seed;\n\t}", "public long getSeed(){\n\t\treturn this.seed;\n\t}", "String getSeed();", "public byte[] getSeed() {\n return seed;\n }", "public long getSeed()\n {\n return randomSeed;\n }", "public long getSeed()\r\n {\r\n return this.randomSeed;\r\n }", "public int getSeed()\n {\n return map.getSeed();\n }", "public String getSeed() {\n return m_randomSeed;\n }", "public byte[] newSeed() {\r\n return engineSpi.newSeed();\r\n }", "public long getSimulationSeed()\r\n\t{\r\n\t\treturn(getParent().getSimulationSeed());\r\n\t}", "public CellularAutomatonRNG()\n {\n this(DefaultSeedGenerator.getInstance().generateSeed(SEED_SIZE_BYTES));\n }", "protected final long seedRoll() {\r\n Long time = System.currentTimeMillis();\r\n String hexSeed = String.format(\"%x\", new BigInteger(1, mGame.getSeed().getBytes()));\r\n Long seed = Long.parseLong(hexSeed, 16);\r\n\r\n return time + seed;\r\n }", "void new_seed( Seed seed );", "public void initialize() {\n\t\tinitialize(seedValue0, seedValue1);\n\t}", "public void seed(long seed) {\n }", "private String getRandomSeed() {\n long newSeed = 0;\n Random randBoolean = new Random(randomSeed);\n for (int i = 0; i < 48; i++) {\n if (randBoolean.nextBoolean()) {\n newSeed += 1 << i;\n }\n }\n if (newSeed < 0) {\n newSeed = Math.abs(newSeed);\n }\n\n String s = \"\";\n if (newSeed == 0) {\n s += \"0\";\n } else {\n while (newSeed != 0) {\n long num = (newSeed & (0xF));\n if (num < 10) {\n s = num + s;\n } else {\n s = ((char) (num + 55)) + s;\n }\n newSeed = newSeed >> 4;\n }\n }\n return s;\n }", "public void setSeed(int seed){\n this.seed = seed; \n }", "public void setRNG(long seed);", "public Seed() {\r\n\t\tcards = new Cards();\r\n\t\tseedCards = new ArrayList<Cards>();\r\n\t\tdescription = \"\";\r\n\t\tautoSummary = \"\";\r\n\t}", "private Long getSeedSequence() {\n String s1 = \"Please enter seed and end with 'S'\";\n boolean getin = false;\n drawFrame(20, 20, s1, true);\n String seedstr = \"\";\n while (!getin) {\n if (StdDraw.hasNextKeyTyped()) {\n drawFrame(20, 20, \"\", true);\n Character ch = StdDraw.nextKeyTyped();\n if ((ch.equals('S') || ch.equals('s'))) {\n return Long.parseLong(seedstr);\n }\n seedstr += ch;\n drawFrame(20, 20, seedstr, false);\n }\n }\n return Long.parseLong(seedstr);\n }", "private PRNG() {\n java.util.Random r = new java.util.Random();\n seed = r.nextInt();\n mersenne = new MersenneTwister(seed);\n }", "private static byte[] generateSeed() {\n try {\n ByteArrayOutputStream seedBuffer = new ByteArrayOutputStream();\n DataOutputStream seedBufferOut = new DataOutputStream(seedBuffer);\n seedBufferOut.writeLong(System.currentTimeMillis());\n seedBufferOut.writeLong(System.nanoTime());\n seedBufferOut.writeInt(android.os.Process.myPid());\n seedBufferOut.writeInt(Process.myUid());\n seedBufferOut.write(BUILD_FINGERPRINT_AND_DEVICE_SERIAL);\n seedBufferOut.close();\n return seedBuffer.toByteArray();\n } catch (IOException e) {\n throw new SecurityException(\"Failed to generate seed\", e);\n }\n }", "public interface RandomSeed {\n\n\t/**\n\t * @return Uma semente randomica entre 0 e 1 inclusive.\n\t */\n\tpublic double getSeed();\n}", "void setSeed(long seed);", "void setSeed(final long seed);", "public void initWorldGenSeed(long p_75905_1_) {\n/* 99 */ this.worldGenSeed = p_75905_1_;\n/* */ \n/* 101 */ if (this.parent != null)\n/* */ {\n/* 103 */ this.parent.initWorldGenSeed(p_75905_1_);\n/* */ }\n/* */ \n/* 106 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 107 */ this.worldGenSeed += this.baseSeed;\n/* 108 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 109 */ this.worldGenSeed += this.baseSeed;\n/* 110 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 111 */ this.worldGenSeed += this.baseSeed;\n/* */ }", "public static byte[] initSalt() throws Exception {\n\n // Get a random number \n SecureRandom random = new SecureRandom();\n\n // generate the SALT\n return random.generateSeed(8);\n }", "public static void randomInit(int r) { }", "private static int initialiseSeed(String seedString) {\n \tint randomSeed = 0;\n\t\ttry {\n \trandomSeed = Integer.parseInt(seedString);\n \t}\n \tcatch(Exception e){\n \t\tSystem.out.println(\"Please pass the value for random seed as an integer number.\");\n\t\t\texitArgumentError();\n \t}\n\t\treturn randomSeed;\n\t}", "public byte[] getSeedActive()\n {\n return this.seedActive;\n }", "public BaileyCrandall() {\n\tsetSeed(System.currentTimeMillis());\n }", "public static int genTurnSeed(int numPlayers) {\n\t\tRandom turnRand = new Random();\n\t\treturn turnRand.nextInt(numPlayers)+1;\n\t}", "public static String generateResetKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }", "public long[] getSeeds() {\n Random random = new Random(seed + layerSeed);\n return RefIntStream.range(0, this.samples).mapToLong(i -> random.nextLong()).toArray();\n }", "String generateRuntimeInitialization();", "public ScenarioGenerator(long seed) {\n rd.setSeed(seed);\n }", "public static void main(String[] args) {\n\t\tRandom r=new Random();\n\t\tr.setSeed(10000000);\n\t\tSystem.out.println(r.nextInt());\n\t}", "private Random getRandom()\n\t{\n\t\tif (this.random == null)\n\t\t{\n\t\t\t// Calculate the new random number generator seed\n\t\t\tlong seed = System.currentTimeMillis();\n\t\t\tlong t1 = seed;\n\t\t\tchar entropy[] = getEntropy().toCharArray();\n\t\t\tfor (int i = 0; i < entropy.length; i++)\n\t\t\t{\n\t\t\t\tlong update = ((byte) entropy[i]) << ((i % 8) * 8);\n\t\t\t\tseed ^= update;\n\t\t\t}\n\t\t\tthis.random = new java.util.Random();\n\t\t\tthis.random.setSeed(seed);\n\t\t}\n\n\t\treturn (this.random);\n\n\t}", "public void setSeed(int seed) {\r\n this.seed = seed;\r\n }", "public Mazealgo() {\n Random number = new Random();\n long i = number.nextLong();\n this.random = new Random(i);\n this.seed = i;\n }", "public int getInitialValue()\n {\n return _init;\n }", "public Rng(long seed) {\n\t\tr = new Random(seed);\n\t}", "private long getInitId() {\n if (self.getQuorumVerifier().getVotingMembers().containsKey(self.getMyId())) {\n return self.getMyId();\n } else {\n return Long.MIN_VALUE;\n }\n }", "public static String generateActivationKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }", "public static String generateActivationKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }", "public static int getSeedValue(int run, int solverConfigId, int InstanceId, int ExperimentId) throws SQLException {\n PreparedStatement st = DatabaseConnector.getInstance().getConn().prepareStatement(\"SELECT seed FROM \" + table + \" \" +\n \"WHERE run=? AND SolverConfig_idSolverConfig=? AND Instances_idInstance=? AND Experiment_idExperiment=? ;\");\n st.setInt(1, run);\n st.setInt(2, solverConfigId);\n st.setInt(3, InstanceId);\n st.setInt(4, ExperimentId);\n ResultSet rs = st.executeQuery();\n rs.next();\n int seed = rs.getInt(\"seed\");\n rs.close();\n return seed;\n }", "public static String generateActivationKey() {\n return RandomStringUtils.randomNumeric(RESET_CODE_DIGIT_COUNT);\n }", "public int getRandomPositiveInt(){\r\n long gen = (a*seed+c)%m;\r\n seed = gen;\r\n return (int)gen;\r\n }", "protected Supplier<Set<Entity>> getSeedSupplier() {\n return defaultSeedSupplier;\n }", "public byte[] getInitializationVector() {\n return this.initialization_vector;\n }", "public List initializers() {\n return initializers; }", "public CellularAutomatonRNG(byte[] seed)\n {\n if (seed == null || seed.length != SEED_SIZE_BYTES)\n {\n throw new IllegalArgumentException(\"Cellular Automaton RNG requires a 32-bit (4-byte) seed.\");\n }\n this.seed = seed.clone();\n\n // Set initial cell states using seed.\n cells[AUTOMATON_LENGTH - 1] = seed[0] + 128;\n cells[AUTOMATON_LENGTH - 2] = seed[1] + 128;\n cells[AUTOMATON_LENGTH - 3] = seed[2] + 128;\n cells[AUTOMATON_LENGTH - 4] = seed[3] + 128;\n\n int seedAsInt = BinaryUtils.convertBytesToInt(seed, 0);\n if (seedAsInt != 0xFFFFFFFF)\n {\n seedAsInt++;\n }\n for (int i = 0; i < AUTOMATON_LENGTH - 4; i++)\n {\n cells[i] = 0x000000FF & (seedAsInt >> (i % 32));\n }\n\n // Evolve automaton before returning integers.\n for (int i = 0; i < AUTOMATON_LENGTH * AUTOMATON_LENGTH / 4; i++)\n {\n next(32);\n }\n }", "public void setSeed(String seed) \n\t{\n\t}", "private static byte[] genKeyWithSeed(String seed) throws Exception {\n\t\tKeyGenerator kg = KeyGenerator.getInstance(ALGORITHM);\n\t\tkg.init(256, new SecureRandom(seed.getBytes()));\n\n\t\tSecretKey secretKey = kg.generateKey();\n\t\treturn secretKey.getEncoded();\n\t}", "Seed(){\r\n seedCells = new ArrayList<>();\r\n edgeCells = new ArrayList<>();\r\n }", "public static int randomNext() { return 0; }", "@Test\n public void randomSeedNumTest()\n {\n int x = _city.getRandomNum(5);\n int y = _city.getRandomNum(5);\n assertEquals(x, y);\n }", "private long getSeedFromLoad(String[] all) {\n int x = 0;\n String seedst = \"\";\n\n for (String s : all) {\n if (s.equals(\"N\") || all[x].equals(\"n\")) {\n x += 1;\n } else if (s.equals(\"s\") || s.equals(\"S\")) {\n return Long.parseLong(seedst);\n } else {\n seedst += all[x];\n x += 1;\n }\n }\n return Long.parseLong(seedst);\n }", "RandomArrayGenerator() {\n this.defaultLaenge = 16;\n }", "public WB_RandomPoint setSeed(final long seed);", "public DayTradeStrategy(int seed) {\r\n /* If you need some initialization of e.g., instance variables\r\n write here.\r\n */\r\n\r\n fRandom = new Random(seed); // Initialization of random sequence.\r\n }", "public Random getRandomGenerator() {\n return randomGenerator;\n }", "public boolean isSeed() {\r\n\t\treturn isSeed;\r\n\t}", "public Random getRandom() {\n\t\treturn (rand);\n\t}", "public TrollGame (int seed){\n rand = new Random(seed);\n initBoard(ROWS, COLS, rand);\n }", "public Random(long seed) {\n real = new UniversalGenerator(seed);\n twister = new MersenneTwister(seed);\n }", "public int generateRandom() {\n\t\tint random = (int)(Math.random()*((6-1)+1))+1;\n\t\treturn random;\n\t}", "private static byte[] generateSalt() {\n byte[] salt = new byte[Constants.CIPHER_SALT_LENGTH];\n SecureRandom rand = new SecureRandom();\n rand.nextBytes(salt);\n return salt;\n }", "public Random getRandomNumberGenerator() { return randomNumberGenerator; }", "public static String generateResetKey() {\n return RandomStringUtils.randomNumeric(SHORT_DEF_COUNT);\n }", "public DuelistRNG() {\n this((long) ((Math.random() - 0.5) * 0x10000000000000L)\n ^ (long) (((Math.random() - 0.5) * 2.0) * 0x8000000000000000L),\n (long) ((Math.random() - 0.5) * 0x10000000000000L)\n ^ (long) (((Math.random() - 0.5) * 2.0) * 0x8000000000000000L));\n }", "private void initConfiguration() {\n\t\tseedList = new ArrayList<String>();\n\t\t// TODO: add other initialization here...\n\t}", "public static void setSeed(long s) {\r\n seed = s;\r\n random = new Random(seed);\r\n }", "static byte[] core_init_state(int size, short seed) {\n\t\tbyte[] p=new byte[size];\n\t\tint total=0,next=0,i;\n\t\tbyte[] buf=null;\n\n\t\tfinal_counts = new int[NUM_CORE_STATES];\n\t\ttrack_counts = new int[NUM_CORE_STATES];\n\n\t\tsize--;\n\t\tnext=0;\n\t\twhile ((total+next+1)<size) {\n\t\t\tif (next>0) {\n\t\t\t\tfor(i=0;i<next;i++)\n\t\t\t\t\tp[total+i]=buf[i];\n\t\t\t\tp[total+i]=',';\n\t\t\t\ttotal+=next+1;\n\t\t\t}\n\t\t\tseed++;\n\t\t\tswitch (seed & 0x7) {\n\t\t\t\tcase 0: /* int */\n\t\t\t\tcase 1: /* int */\n\t\t\t\tcase 2: /* int */\n\t\t\t\t\tbuf=intpat((seed>>3) & 0x3);\n\t\t\t\t\tnext=4;\n\t\t\t\tbreak;\n\t\t\t\tcase 3: /* float */\n\t\t\t\tcase 4: /* float */\n\t\t\t\t\tbuf=floatpat((seed>>3) & 0x3);\n\t\t\t\t\tnext=8;\n\t\t\t\tbreak;\n\t\t\t\tcase 5: /* scientific */\n\t\t\t\tcase 6: /* scientific */\n\t\t\t\t\tbuf=scipat((seed>>3) & 0x3);\n\t\t\t\t\tnext=8;\n\t\t\t\tbreak;\n\t\t\t\tcase 7: /* invalid */\n\t\t\t\t\tbuf=errpat((seed>>3) & 0x3);\n\t\t\t\t\tnext=8;\n\t\t\t\tbreak;\n\t\t\t\tdefault: /* Never happen, just to make some compilers happy */\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tsize++;\n\t\twhile (total<size) { /* fill the rest with 0 */\n\t\t\tp[total]=0;\n\t\t\ttotal++;\n\t\t}\n\t\treturn p;\n\t}", "public static int getRandom() \n\t{\n\t\treturn rGenerator.nextInt();\n\t}", "public Random() {\n real = new UniversalGenerator();\n twister = new MersenneTwister();\n }", "public void initialize()\n {\n if (!this.seedInitialized)\n {\n throw new IllegalStateException(\"Seed \" + this.maxHeight + \" not initialized\");\n }\n\n this.heightOfNodes = new Vector();\n this.tailLength = 0;\n this.firstNode = null;\n this.firstNodeHeight = -1;\n this.isInitialized = true;\n System.arraycopy(this.seedNext, 0, this.seedActive, 0, messDigestTree\n .getDigestSize());\n }", "public void setSeed(int seed){\n\t\tmyRandom = new Random(seed);\n\t}", "public XorShiftRandom(final long seed) {\n\t\tthis.seed = seed;\n\t}", "public ContainerProgram getInit()\n {\n return _init;\n }", "public XxHash(long seed) {\n this.seed = seed;\n }", "private Random rand()\n\t{\n\t\treturn new Random();\n\t}", "@Before\n public void setUp() {\n randSeeder = new Random(42);\n\n //Show we haven't seeded the test's random number generator\n randSeed = RAND_UNSEEDED;\n comp = IntPlus.getIntComparator();\n }", "public static SecretKeySpec key_from_seed(byte[] seed) {\n\t// compute SHA-1 hash of the seed\n\tbyte[] hashval = null;\n\ttry {\n\t MessageDigest sha1 = MessageDigest.getInstance(\"SHA1\");\n\t hashval = sha1.digest(seed);\n\t}\n\tcatch (Exception e) {\n\t e.printStackTrace();\n\t}\n\n\t// extract 1st AES_KEY_LEN bytes for the key material\n\tbyte[] key = new byte[AES_KEY_LEN];\n\tSystem.arraycopy(hashval, 0, key, 0, AES_KEY_LEN);\n\n\t// initialize the key\n\tSecretKeySpec keySpec = new SecretKeySpec(key, \"AES\");\n\treturn keySpec;\n }", "public static ByteSource getSaltInByteSource()\n {\n //Always use a SecureRandom generator\n \tRandomNumberGenerator randomGenerator = new SecureRandomNumberGenerator();\n //Create array for salt\n \tByteSource salt = randomGenerator.nextBytes();\n //return salt\n return salt;\n }", "public java.lang.String getCDBRAND() {\n return CDBRAND;\n }", "public Mazealgo(long seed) {\n this.seed = seed;\n this.random = new Random(seed);\n }", "public byte[] initialValue() {\n return new byte[]{(byte) -1, (byte) -40, (byte) -1, (byte) -37, (byte) 0, (byte) 67, (byte) 0, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -64, (byte) 0, (byte) 17, (byte) 8, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 3, (byte) 1, (byte) 34, (byte) 0, (byte) 2, (byte) 17, (byte) 0, (byte) 3, (byte) 17, (byte) 0, (byte) -1, (byte) -60, (byte) 0, (byte) 31, (byte) 0, (byte) 0, (byte) 1, (byte) 5, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 9, (byte) 10, (byte) 11, (byte) -1, (byte) -60, (byte) 0, (byte) -75, (byte) 16, (byte) 0, (byte) 2, (byte) 1, (byte) 3, (byte) 3, (byte) 2, (byte) 4, (byte) 3, (byte) 5, (byte) 5, (byte) 4, (byte) 4, (byte) 0, (byte) 0, (byte) 1, (byte) 125, (byte) 1, (byte) 2, (byte) 3, (byte) 0, (byte) 4, (byte) 17, (byte) 5, (byte) 18, (byte) 33, (byte) 49, (byte) 65, (byte) 6, (byte) 19, (byte) 81, (byte) 97, (byte) 7, (byte) 34, (byte) 113, (byte) 20, (byte) 50, (byte) -127, (byte) -111, (byte) -95, (byte) 8, (byte) 35, (byte) 66, (byte) -79, (byte) -63, (byte) 21, (byte) 82, (byte) -47, (byte) -16, (byte) 36, (byte) 51, (byte) 98, (byte) 114, (byte) -126, (byte) 9, (byte) 10, (byte) 22, (byte) 23, (byte) 24, (byte) 25, (byte) 26, (byte) 37, (byte) 38, (byte) 39, (byte) 40, (byte) 41, (byte) 42, (byte) 52, (byte) 53, (byte) 54, (byte) 55, (byte) 56, (byte) 57, (byte) 58, (byte) 67, (byte) 68, (byte) 69, (byte) 70, (byte) 71, (byte) 72, (byte) 73, (byte) 74, (byte) 83, (byte) 84, (byte) 85, (byte) 86, (byte) 87, (byte) 88, (byte) 89, (byte) 90, (byte) 99, (byte) 100, (byte) 101, (byte) 102, (byte) 103, (byte) 104, (byte) 105, (byte) 106, (byte) 115, (byte) 116, (byte) 117, (byte) 118, (byte) 119, (byte) 120, (byte) 121, (byte) 122, (byte) -125, (byte) -124, (byte) -123, (byte) -122, (byte) -121, (byte) -120, (byte) -119, (byte) -118, (byte) -110, (byte) -109, (byte) -108, (byte) -107, (byte) -106, (byte) -105, (byte) -104, (byte) -103, (byte) -102, (byte) -94, (byte) -93, (byte) -92, (byte) -91, (byte) -90, (byte) -89, (byte) -88, (byte) -87, (byte) -86, (byte) -78, (byte) -77, (byte) -76, (byte) -75, (byte) -74, (byte) -73, (byte) -72, (byte) -71, (byte) -70, (byte) -62, (byte) -61, (byte) -60, (byte) -59, (byte) -58, (byte) -57, (byte) -56, (byte) -55, (byte) -54, (byte) -46, (byte) -45, (byte) -44, (byte) -43, (byte) -42, (byte) -41, (byte) -40, (byte) -39, (byte) -38, (byte) -31, (byte) -30, (byte) -29, (byte) -28, (byte) -27, (byte) -26, (byte) -25, (byte) -24, (byte) -23, (byte) -22, (byte) -15, (byte) -14, (byte) -13, (byte) -12, (byte) -11, (byte) -10, (byte) -9, (byte) -8, (byte) -7, (byte) -6, (byte) -1, (byte) -60, (byte) 0, (byte) 31, (byte) 1, (byte) 0, (byte) 3, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 9, (byte) 10, (byte) 11, (byte) -1, (byte) -60, (byte) 0, (byte) -75, (byte) 17, (byte) 0, (byte) 2, (byte) 1, (byte) 2, (byte) 4, (byte) 4, (byte) 3, (byte) 4, (byte) 7, (byte) 5, (byte) 4, (byte) 4, (byte) 0, (byte) 1, (byte) 2, (byte) 119, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 17, (byte) 4, (byte) 5, (byte) 33, (byte) 49, (byte) 6, (byte) 18, (byte) 65, (byte) 81, (byte) 7, (byte) 97, (byte) 113, (byte) 19, (byte) 34, (byte) 50, (byte) -127, (byte) 8, (byte) 20, (byte) 66, (byte) -111, (byte) -95, (byte) -79, (byte) -63, (byte) 9, (byte) 35, (byte) 51, (byte) 82, (byte) -16, (byte) 21, (byte) 98, (byte) 114, (byte) -47, (byte) 10, (byte) 22, (byte) 36, (byte) 52, (byte) -31, (byte) 37, (byte) -15, (byte) 23, (byte) 24, (byte) 25, (byte) 26, (byte) 38, (byte) 39, (byte) 40, (byte) 41, (byte) 42, (byte) 53, (byte) 54, (byte) 55, (byte) 56, (byte) 57, (byte) 58, (byte) 67, (byte) 68, (byte) 69, (byte) 70, (byte) 71, (byte) 72, (byte) 73, (byte) 74, (byte) 83, (byte) 84, (byte) 85, (byte) 86, (byte) 87, (byte) 88, (byte) 89, (byte) 90, (byte) 99, (byte) 100, (byte) 101, (byte) 102, (byte) 103, (byte) 104, (byte) 105, (byte) 106, (byte) 115, (byte) 116, (byte) 117, (byte) 118, (byte) 119, (byte) 120, (byte) 121, (byte) 122, (byte) -126, (byte) -125, (byte) -124, (byte) -123, (byte) -122, (byte) -121, (byte) -120, (byte) -119, (byte) -118, (byte) -110, (byte) -109, (byte) -108, (byte) -107, (byte) -106, (byte) -105, (byte) -104, (byte) -103, (byte) -102, (byte) -94, (byte) -93, (byte) -92, (byte) -91, (byte) -90, (byte) -89, (byte) -88, (byte) -87, (byte) -86, (byte) -78, (byte) -77, (byte) -76, (byte) -75, (byte) -74, (byte) -73, (byte) -72, (byte) -71, (byte) -70, (byte) -62, (byte) -61, (byte) -60, (byte) -59, (byte) -58, (byte) -57, (byte) -56, (byte) -55, (byte) -54, (byte) -46, (byte) -45, (byte) -44, (byte) -43, (byte) -42, (byte) -41, (byte) -40, (byte) -39, (byte) -38, (byte) -30, (byte) -29, (byte) -28, (byte) -27, (byte) -26, (byte) -25, (byte) -24, (byte) -23, (byte) -22, (byte) -14, (byte) -13, (byte) -12, (byte) -11, (byte) -10, (byte) -9, (byte) -8, (byte) -7, (byte) -6, (byte) -1, (byte) -38, (byte) 0, (byte) 12, (byte) 3, (byte) 1, (byte) 0, (byte) 2, (byte) 17, (byte) 3, (byte) 17, (byte) 0, (byte) 63, (byte) 0, (byte) -114, (byte) -118, (byte) 40, (byte) -96, (byte) 15, (byte) -1, (byte) -39};\n }", "public void initialize() {\n\t\tString alphabet = \"abcdefghijklmnopqrstuvwxyz\";\n\t\tint N = alphabet.length();\n\n\t\tRandom r = new Random();\n\t\tString key = \"\";\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tkey+= alphabet.charAt(r.nextInt(N));\n\t\t}\n\t\tthis.key = key;\n\t}", "public static int getRndSalary() {\n return ThreadLocalRandom.current().nextInt(10, 100000 + 1);\n }", "public final void randomSeed(long what){\n\t\tsetSeed(what);\n\t\trandom();\n\t}", "public static TinyMT32 getDefault(final String seed) {\n TinyMT32Parameter defaultParameter = TinyMT32Parameter\n .getDefaultParameter();\n TinyMT32 tiny = new TinyMT32(defaultParameter);\n tiny.setSeed(seed);\n return tiny;\n }", "public static TinyMT32 getDefault(final long seed) {\n TinyMT32Parameter defaultParameter = TinyMT32Parameter\n .getDefaultParameter();\n TinyMT32 tiny = new TinyMT32(defaultParameter);\n tiny.setSeed(seed);\n return tiny;\n }", "public FlipCoin(int seed){\n this.rander = new Random(seed);\n }", "public BidTime getInitTime() {\r\n\t\treturn initTime;\r\n\t}" ]
[ "0.78930646", "0.7766628", "0.7720611", "0.7720611", "0.7715619", "0.7700297", "0.7658765", "0.7639659", "0.76011026", "0.7548581", "0.7480809", "0.7430172", "0.7179742", "0.7012619", "0.69901496", "0.67159605", "0.67063683", "0.66343004", "0.6587754", "0.656058", "0.6505441", "0.63287777", "0.6286154", "0.6196297", "0.6173822", "0.61542857", "0.6087076", "0.6046984", "0.6034926", "0.59044975", "0.5891818", "0.5863983", "0.5839876", "0.57585365", "0.5758458", "0.57322097", "0.57074124", "0.5685722", "0.5671214", "0.565764", "0.5655193", "0.5654745", "0.5627961", "0.55915594", "0.55834216", "0.5581437", "0.5580778", "0.5549875", "0.5544968", "0.5544968", "0.5518087", "0.5514151", "0.54979295", "0.5496401", "0.54943097", "0.54924375", "0.54913133", "0.5490664", "0.54886484", "0.547352", "0.5456844", "0.5449625", "0.5435032", "0.5418352", "0.541238", "0.54099023", "0.5408471", "0.53992707", "0.5398134", "0.5394495", "0.5393604", "0.5387915", "0.5387512", "0.53750813", "0.53558266", "0.53377664", "0.5337681", "0.53313655", "0.5329592", "0.5323968", "0.5322356", "0.53144085", "0.530331", "0.52988905", "0.52979654", "0.5294411", "0.52890813", "0.52822876", "0.52800655", "0.5272761", "0.52618873", "0.52593434", "0.5257736", "0.52548003", "0.5254026", "0.52509487", "0.52501667", "0.52459455", "0.5242926", "0.5241667" ]
0.7226657
12
Method to initialize Populations requested from the user. Depending on the number requested, a Single Population Class is created (when one is set) or a Multi Population Class (over one population) To create the populations, we overload the same method.
public ArrayList<Population> InitializePopulations (int NumberOfPopulations, int NumberOfAgents){ ArrayList<Population> PopulationsList = new ArrayList(); if(NumberOfPopulations == 1){ PopulationsList.add(InitSinglePopulation(NumberOfAgents)); }else{ for(int i = 0; i < NumberOfPopulations; i++){ double temp = rand.nextDouble(); PopulationsList.add(InitSinglePopulation(i, NumberOfAgents, temp)); } } return PopulationsList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initializePopulation(){\n\t\t// create the population\n\t\tfor(int i = 0; i < POPULATION_SIZE; i++){\n\t\t\t// get a random length for the building sequence\n\t\t\tint randArraySize = randomGenerator.nextInt(possiblePieces.length-1)+1;\n\t\t\t\n\t\t\tBuildingPiece[] pieceSequence = new BuildingPiece[randArraySize];\n\t\t\tfor(int j = 0; j < randArraySize; j++){\n\t\t\t\t// get a random possible piece and insert it into the sequence\n\t\t\t\tint randIndex = randomGenerator.nextInt(possiblePieces.length);\n\t\t\t\tpieceSequence[j] = possiblePieces[randIndex];\n\t\t\t}\n\t\t\t\n\t\t\t/* add a new number sequence with the newly created \n\t\t\t * sequence from the input */\n\t\t\tpopulation.add(new Building(pieceSequence, generation, possiblePieces));\n\t\t}\n\t}", "private void initializePopulation() {\n // reset the population\n population = new ArrayList<Genotype>();\n\n // set the population to an array of random genotypes\n for (int i = 0; i < populationSize; i++) {\n population.add(new Genotype(chromosomeSize));\n }\n\n // evaluate the population\n // evaluatePopulation();\n }", "public interface PopulationInitialiser {\n\t/**\n\t * this generates an initial solution population from which to start optimisation\n\t *\n\t * @param cities the set of cities which are part of each solution\n\t * @param populationSize the number of solutions to be included in a population\n\t */\n\tSolutionPopulation initialise(ArrayList<City> cities, int populationSize);\n}", "public Population InitSinglePopulation\n (int PopulationID, int NumberOfAgents, double MixedStrategy){\n \n MultiPopulation TempPopulation = new MultiPopulation();\n\n TempPopulation.setPopulationID(PopulationID);\n TempPopulation.setInitMixedStrategy(MixedStrategy);\n\n for(int j = 0; j < NumberOfAgents; j++){\n\n double TempDraw = rand.nextDouble();\n boolean TempAction = (TempDraw < MixedStrategy) ? true : false;\n MultiPopulationAgent TempAgentM = \n new MultiPopulationAgent(j,PopulationID,TempAction);\n \n TempPopulation.AgentList.add(TempAgentM);\n \n }\n \n TempPopulation.setActionList();\n return TempPopulation;\n }", "protected Population<T, K> initializePopulation(int size, Class<K> clazz)\n\t\t\tthrows InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {\n\t\tPopulation<T, K> pop = new Population<>(size, fitnessCalc);\n\t\tpop.initialize(clazz);\n\t\treturn pop;\n\t}", "public Population InitSinglePopulation(int NumberOfAgents) {\n \n SinglePopulation TempPopulation = new SinglePopulation();\n \n TempPopulation.setPopulationID(0);\n\n for(int j = 0; j < NumberOfAgents; j++){\n\n SinglePopulationAgent TempAgentS = new SinglePopulationAgent(j,rand.nextDouble());\n boolean InitAction = (rand.nextDouble() < TempAgentS.getStrategy()) ? true : false;\n TempAgentS.setAction(InitAction);\n \n TempPopulation.AgentList.add(TempAgentS);\n }\n \n TempPopulation.setStrategyList();\n TempPopulation.setActionList();\n return TempPopulation;\n }", "SolutionPopulation initialise(ArrayList<City> cities, int populationSize);", "public Population(int indivCount) {\n this.indivCount = indivCount;\n layers = new ArrayList<>();\n individuals = new Individual[indivCount];\n }", "public void initPopulation() throws JMException, ClassNotFoundException {\n population_ = new SolutionSet[problemSet_.size()];\n for (int i = 0; i < problemSet_.size(); i++){\n population_[i] = new SolutionSet(populationSize_);\n }\n\n for (int j = 0; j < problemSet_.size(); j++){\n for (int i = 0; i < populationSize_; i++) {\n Solution newSolution = new Solution(problemSet_);\n problemSet_.get(j).evaluate(newSolution);\n problemSet_.get(j).evaluateConstraints(newSolution);\n population_[j].add(newSolution);\n } // for\n }\n\n }", "public void initPop(int num) {\n\t\tif (num % 2 == 1) {\n\t\t\tnum -= 1;\n\t\t}\n\t\tthis.individuals = new AI[num];\n\t\tfor (int i = 0; i < num; i++)\n\t\t\tthis.individuals[i] = new AI();\n\t}", "public Population(int size, ArrayList<Individual> KIS){\n this.size = size;\n this.individuals = KIS;\n }", "public void setPopulation(int population) {\n this.population = population;\n }", "public void setPopulation(int population) {\n\n this.population = population;\n }", "public void generatePopulation() {\n\t\t\n\t\tif (SCType.getScLayers() <= 2)\n\t\t\tLogger.logError(\"To few supply chain layers, minimum of 3 required:\" + SCType.getScLayers());\n\t\t\n\t\tArrayList<CountryAgent> countryAgents = SU.getObjectsAll(CountryAgent.class);\t\t\n\t\tfor (CountryAgent country : countryAgents) {\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.PRODUCER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_PRODUCERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.PRODUCER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.INTERNATIONAL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_INTERNATIONALS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.INTERNATIONAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.WHOLESALER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_WHOLESALERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.WHOLESALER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.RETAIL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_RETAILERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.RETAIL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.CONSUMER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_CONSUMERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.CONSUMER);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set possible new suppliers and clients\n\t\tfor (BaseAgent agent : SU.getObjectsAll(BaseAgent.class)) {\n\t\t\tagent.setPossibleNewSuppliersAndClients();\n\t\t}\n\t\t\n\t\tSU.getDataCollector().addAllCurrentStock();\n\t}", "public void setPopulation(Integer population) {\n this.population = population;\n }", "public void setpopulation(int population) {\n this.population = population;\n }", "public void setPoputlation (double population) { n.setPopulation(population); }", "protected void initializePopulation () {\n\t\tfor (int i = 0; i < this.speciesSize; i++) {\n\t\t\tthis.detectors.add(DetectorFactory.makeDetector(this.featuresLength, this.typeBias, this.generalityBias));\n\t\t}\n\t}", "public Population(int popSize, String[] studet_ids, int groupSize, \r\n\t\t int initPop, int selMethod, int selPara, \r\n\t\t int crossMethod, double crossPara, int mutMethod,\r\n\t\t double mutPara, int replaceMethod, int replacePara,\r\n\t\t double powerStep, double tourStep, FitnessFunction fitnessFunction)\r\n {\r\n\tthis(selMethod, selPara, crossMethod, crossPara, mutMethod, mutPara, \r\n\t replaceMethod, replacePara, powerStep, tourStep, fitnessFunction);\r\n\r\n\tchromos = new ArrayList<Chromosome>();\r\n\tfor(int i = 0; i < popSize; i++)\r\n\t chromos.add(new Chromosome(studet_ids, groupSize, crossMethod,\r\n\t\t\t\t crossPara, mutMethod, mutPara, initPop, ff));\r\n\tinitialize();\r\n }", "private static List<Cell> initiatePopulation(int required_population_size)\n {\n List<Cell> population = new ArrayList<Cell>(); //Define an arraylist to hold the initial population of cells\n int[][][] diploid_genome = newEmptyDeploidGenome();\n int cell_generation = newest_generation + 1, last_div = -1;\n \n //Set the label status of all DNA strands in the genome to unlabelled\n for(int chromosome_count = 0; chromosome_count < diploid_genome.length; chromosome_count++)\n {\n for(int homologous_pair_count= 0; homologous_pair_count < diploid_genome[chromosome_count].length; homologous_pair_count++)\n {\n for(int dna_strand_count = 0; dna_strand_count < diploid_genome[chromosome_count][homologous_pair_count].length; dna_strand_count++)\n {\n diploid_genome[chromosome_count][homologous_pair_count][dna_strand_count] = STRAND_UNLABELLED; //Set each DNA strand to unlabelled\n }\n }\n }\n \n // !****!Create the starting population of cells, all as generation 0!****!\n for (int counter = 0; counter < required_population_size; counter++)\n {\n int cell_id = counter;\n population.add(new Cell(cell_id, cell_generation, last_div, CAN_DIVIDE, diploid_genome)); // Create a new Cell object with the following values.\n id_of_last_created_cell = cell_id; // Track the id of the last created cell\n }// for\n newest_generation++;\n return population;\n }", "private void initialiseNumbers() {\r\n double choice = Math.random();\r\n sourceNumbers = new int[6];\r\n if(choice<0.8) {\r\n //one big number, 5 small.\r\n sourceNumbers[0] = (Integer) bigPool.remove(0);\r\n for( int i=1; i<6; i++) {\r\n sourceNumbers[i] = (Integer) smallPool.remove(0);\r\n }\r\n } else {\r\n //two big numbers, 5 small\r\n sourceNumbers[0] = (Integer) bigPool.remove(0);\r\n sourceNumbers[1] = (Integer) bigPool.remove(0);\r\n for( int i=2; i<6; i++) {\r\n sourceNumbers[i] = (Integer) smallPool.remove(0);\r\n }\r\n }\r\n\r\n //for target all numbers from 101 to 999 are equally likely\r\n targetNumber = 101 + (int) (899 * Math.random());\r\n }", "GuppySet(int numberOfGuppies, int minAge, int maxAge,\n double minHealthCoefficient, double maxHealthCoefficient) {\n this.numberOfGuppies = numberOfGuppies;\n this.minAge = minAge;\n this.maxAge = maxAge;\n this.minHealthCoefficient = minHealthCoefficient;\n this.maxHealthCoefficient = maxHealthCoefficient;\n }", "protected Population(Infrastructure infra)\n\t\t{\tinds = new Individual[NUMBER_INDIVIDUALS];\n\t\t\tfor(int i=0;i<NUMBER_INDIVIDUALS;i++)\n\t\t\t\tinds[i] = new Individual(infra);\n\t\t\tthis_ind = 0;\n\t\t\tthis_gen = 0;\n\t\t}", "public void genPopulation(int howMany)\r\n/* 30: */ {\r\n/* 31:54 */ this.pop.removeAllElements();\r\n/* 32:55 */ for (int i = 0; i < howMany; i++)\r\n/* 33: */ {\r\n/* 34:61 */ int[] clusterV = g.genRandomClusterSize();\r\n/* 35:62 */ Cluster c = new Cluster(g, clusterV);\r\n/* 36:63 */ this.pop.addElement(c);\r\n/* 37: */ }\r\n/* 38: */ }", "public static void generatePopulation() {\n population = setupArray(POP_SIZE, NUM_RULES, GENE_SIZE, COND_LEN);\n\n for (Individual individual : population) {\n for (int i = 0; i < individual.getGene().length; i++) {\n individual.gene[i] = bits.get(new Random().nextInt(2));\n }\n individual.generateRulebase();\n }\n }", "public PopulationGrowth() {\n initComponents();\n }", "private int[][] generateInitialPopulation(int binCt, int binSize, int pkgCt, int populationSize) {\n\t\tint[][] population = new int[populationSize][pkgCt];\n\t\tfor (int i = 0; i < populationSize; i++) {\n\t\t\tfor (int j = 0; j < pkgCt; j++) {\n\t\t\t\tpopulation[i][j] = rand.nextInt(binCt);\n\t\t\t}\n\t\t}\n\t\treturn population;\n\t}", "RoachPopulation(int initial)\n {\n roaches = initial;\n }", "public void initialiseNewRandomPopulation(Random rnd) {\n\t\tthis.population = new ArrayList<Individual>();\n\t\tfor (int i = 0; i < this.popSize; i++) {\t\t\t\t\t//FOR ALL DESIRED POPULATION SIZE\n\t\t\tdouble[] randomValues = new double[DIMENSIONS];\t\t\t//INITIATE RANDOM X ARRAY WITH CORRECT DIMENSIONS\n\t\t\tfor (int j = 0; j < DIMENSIONS; j++) {\t\t\t\t\t//CREATE RANDOM X VALUES\n\t\t\t\trandomValues[j] = -5 + rnd.nextDouble() * 10;\t\t//ASSIGN VALUES TO EACH POSITION IN ARRAY\n\t\t\t}\n\t\t\tIndividual newInd = new Individual(randomValues);\t\t//CREATE NEW INDIVIDUAL WITH RANDOM X VALUES\n\t\t\tthis.population.add(newInd);\t\t\t\t\t\t\t//ADD INDIVIDUAL TO POPULATION\n\t\t}\n\t}", "public IntegerGenotype create() \r\n\t{\n\t\tIntegerGenotype genotype = new IntegerGenotype(1,3);\r\n\t\tgenotype.init(new Random(), Data.numeroCuardillas); \r\n\t\t\r\n\t\treturn genotype;\r\n\t}", "public PopulationFilter(int nr)\n { \n super();\n inhabitants = nr;\n }", "protected void onChange_InitPopulation() {\n onChange_InitPopulation_xjal( InitPopulation );\n }", "public Population(int capacity) {\r\n Validate.positive(capacity, \"capacity\");\r\n this.capacity = capacity;\r\n }", "private static Pool setUpPool(String name, double volume, double temp,\n double pH, double nutrientCoefficient, GuppySet startingGuppies) {\n Pool pool = new Pool(name, volume, temp, pH, nutrientCoefficient);\n\n pool.addFish(startingGuppies.generateGuppies());\n\n return pool;\n }", "public void createRandomPopulation(List<String> cabinetArrangement, int populationSize){\n\t\t\n\t\tint size = 0;\n\t\t\n\t\t//list to check if the current solution\n\t\t//has been already added to the population \n\t\t\n\t\tList<ArrayList<String>> added = new ArrayList<ArrayList<String>>();\n\t\t\n\t\t//create a new solution object\n\t\tSolution solution = new Solution(relations, cabinetArrangement);\n\t\t//assign a cabinet arrangement to it, which is a possible solution\n\t\tsolution.cabinetArrangement(new ArrayList<>(solution.getCabinets()), new ArrayList<String>());\n\n\t\twhile(size < populationSize) {\n\t\t\t\t\n\t\t\t\t//continue, if the solution is already in the population\n\t\t\t\tif(added.contains(solution.getPossibleSolution())) {\n\t\t\t\t\tsolution = new Solution(relations, cabinetArrangement);\n\t\t\t\t\tsolution.cabinetArrangement(new ArrayList<>(solution.getCabinets()), new ArrayList<String>());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsize++;\n\t\t\t\n\t\t\t\t//add solution to the population\n\t\t\t\tpopulation.add(solution);\n\t\t\t\t//and to the control list\n\t\t\t\tadded.add(solution.getPossibleSolution());\n\t\t\t\t\n\t\t\t\tsolution = new Solution(relations, cabinetArrangement);\n\t\t\t\tsolution.cabinetArrangement(new ArrayList<>(solution.getCabinets()), new ArrayList<String>());\n\n\t\t}\n\t\t\n\t\tif(size == populationSize) {\n\t\t\t//count the average path when the population is already created\n\t\t\tcountAveragePath();\n\t\t\t\n\t\t\t//count and assign a cloning factor for all the solutions\n\t\t\tcloningFactor();\n\t\t}\n\t}", "public Population()\n{\n year = 0;\n fate = new Random();\n eligibleDuas = new ArrayList<Caldean>();\n eligibleDuises = new ArrayList<Caldean>();\n theHouses = new LinkedList<House>();\n}", "public Population(int nVillages){\r\n\t\tthis.nFlocks = 0;\r\n\t\tthis.nVillages = nVillages;\r\n\t\tthis.vVillages = new Village[nVillages];\r\n\t\tfor(int i = 0; i < nVillages; i++){\r\n\t\t\tthis.vVillages[i] = new Village();\r\n\t\t\tthis.nFlocks += vVillages[i].getnFlocks();\r\n\t\t}\r\n\t\tthis.ndvPool = new Vector<NDInfection>();\r\n\t}", "public void createSelectedPopulation(Population previousPopulation, int populationSize, double perc) {\n\t\t\n\t\tint intendedSize = (int)(populationSize * perc/100);\n\t\tSystem.out.println(\"intended size: \" + intendedSize ) ;\n\t\tint currentSize = 0;\n\t\tint randomPopulationSize;\n\t\tSolution mutant;\n\t\tList<ArrayList<String>> added = new ArrayList<ArrayList<String>>();\n\n\t\t\n\t\t//copy solutions from the previous population until the cloning factor is bigger than 1\n\t\tfor(Solution solution : previousPopulation.getPopulation()) {\n\t\t\tif(solution.getCloningFactor() < 1.0) break;\n\t\t\t\n\t\t\t//add as many clones of the current solution\n\t\t\t//as indicates the cloning factor\n\t\t\t//eg. if cloning factor is 2 -> 3 copies of this solution will go to the next population\n\t\t\tfor(int i = 0; i <= (int) solution.getCloningFactor(); i++) {\n\t\t\t\t//if we get a complete population by cloning the solution from the previous population\n\t\t\t\t//leave the method\n\t\t\t\tif(currentSize == intendedSize) break;\n\t\t\t\t\n\t\t\t\t//we create a mutation of each clone\n\t\t\t\t//if mutation is less efficient or already exists in the population we discard it\n\t\t\t\tmutant = new Solution(solution.getFrequencyRelations(), solution.getCabinets());\n\t\t\t\tArrayList<String> mutantSol = solution.mutate();\n\t\t\t\tmutant.setPossibleSolution(mutantSol);\n\t\t\t\tmutant.setPath(mutant.countPath(mutant.getPossibleSolution()));\n\t\t\t\t\n\t\t\t\t//System.out.println(\"M: \" + mutantSol + \" \" + mutant.getPath() );\n\t\t\t//\tSystem.out.println(\"S: \" + solution.getPossibleSolution() + \" \" + solution.getPath() );\n\n\n\t\t\t\tif(mutant.getPath() >= solution.getPath() || added.contains(mutant.getPossibleSolution()) ) {\n\t\t\t\t\tpopulation.add(solution);\n\t\t\t\t\tadded.add(solution.getPossibleSolution());\n\t\t\t\t\t//System.out.println(\"original\");\n\t\t\t\t}else {\n\t\t\t\t\tpopulation.add(mutant);\n\t\t\t\t\tadded.add(mutant.getPossibleSolution());\n\t\t\t\t\t//System.out.println(\"mutant\");\n\t\t\t\t}\n\t\t\t\n\t\t\t\tcurrentSize++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//count the number of random solutions that should be added\n\t\tif(currentSize <= populationSize) {\n\t\t\t randomPopulationSize = populationSize - currentSize;\n\t\t}else return;\n\t\t\n\t\t//create random solutions and add them to the population \n\t\t//until the wished size is reached\n\t\tcreateRandomPopulation(previousPopulation.getCabinetArrangement(), randomPopulationSize);\n\t\t\t\n\t}", "public void init()\n\t{\n\t\tint inN;\n\t\tdo{\n\t inN=getN();\n\t switch(inN)\n\t {\n\t case 1: problem1();break;\n\t case 2: problem2();break;\n\t case 3: problem3();break;\n\t default:\n\t }\n\t }while(inN != 0);\t\n\t}", "private static void populationsMain() {\n Printing.wraptitle( POPULATIONS );\n Printing.makeOptions( GOUP );\n\n msg( \"This portion of the project is not interactive. See Discussion.pdf for population predictions.\" );\n msg( \"You can evaluate the functions used in this portion through selection (4) on the main menu.\" );\n\n int option = requestOption( 0 );\n if ( option == 0 ) {\n main();\n }\n\n }", "public void setNextGeneration() {\n // create a temporary population\n ArrayList<Genotype> tempPopulation = new ArrayList<Genotype>();\n\n // select mates\n while (tempPopulation.size() < populationSize) {\n tempPopulation.add(Genotype.Mate(rouletteSelection(),\n rouletteSelection(), crossoverProbability));\n }\n }", "public FireflyOptimization(int population, int generations){\n this(population, generations, 0.2, 2, 1);\n }", "public Population(ArrayList<Chromosome> c, int selMethod, int selPara, \r\n\t\t int crossMethod, double crossPara, int mutMethod,\r\n\t\t double mutPara, int replaceMethod, int replacePara,\r\n\t\t double powerStep, double tourStep, FitnessFunction fitnessFunction)\r\n {\r\n\tthis(selMethod, selPara, crossMethod, crossPara, mutMethod, mutPara, \r\n\t replaceMethod, replacePara, powerStep, tourStep, fitnessFunction);\r\n\r\n\tchromos = c;\r\n\r\n\tinitialize();\r\n }", "public void InitializeMaxNumInstances(int num) {\n }", "public void setPopSize(int i){\n if (i < 2){\n throw new IllegalArgumentException(\"The population size must be at least 2.\");\n }\n if (i < randGenes){\n throw new IllegalArgumentException(\"The population size must be greater than the number of random genes per generation.\");\n }\n populationSize = i;\n }", "public Guppy() {\n this(DEFAULT_GENUS, DEFAULT_SPECIES, 0, true, 0,\n DEFAULT_HEALTH_COEFFICIENT);\n }", "private void initialiseNumberPickers() {\n\n ViewGroup pickerElements = (ViewGroup) findViewById(R.id.pickerLayout);\n for (int j = 0; j < pickerElements.getChildCount(); j++) {\n View grandchild = pickerElements.getChildAt(j);\n if (grandchild instanceof NumberPicker) {\n\n ((NumberPicker) grandchild).setMaxValue(9);\n ((NumberPicker) grandchild).setMinValue(0);\n if (grandchild.getId() == R.id.tenSecondPicker) {\n ((NumberPicker) grandchild).setMaxValue(5);\n }\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic <T extends Creature> Population(Evolution evolution,\n\t\t\tint populationSize, Class<T> creatureClass, Environment environment)\n\t{\n\t\tgeneration = 0;\n\t\tdesiredSize = populationSize;\n\t\tcreatures = new ArrayList<>();\n\t\tthis.environment = environment;\n\t\tjuries = new ArrayList<>();\n\t\tthis.creatureClass = (Class<Creature>) creatureClass;\n\t\tinitialize(evolution);\n\t}", "private Pool setUpSkookumchuk() {\n final int skookumchukVolume = 1000;\n final int skookumchukTemperature = 42;\n final double skookumchukPH = 7.9;\n final double skookumchukNutrientCoefficient = 0.9;\n final int skookumchukNumberOfGuppies = 100;\n final int skookumchukMinAge = 10;\n final int skookumchukMaxAge = 25;\n final double skookumchukMinHealthCoefficient = 0.5;\n final double skookumchukMaxHealthCoefficient = 0.8;\n\n GuppySet skookumchukGuppies = new GuppySet(skookumchukNumberOfGuppies,\n skookumchukMinAge, skookumchukMaxAge,\n skookumchukMinHealthCoefficient,\n skookumchukMaxHealthCoefficient);\n\n Pool skookumchuk = setUpPool(\"Skookumchuk\", skookumchukVolume,\n skookumchukTemperature, skookumchukPH,\n skookumchukNutrientCoefficient, skookumchukGuppies);\n\n return skookumchuk;\n }", "public void updatePopulation() {\r\n this.usedPopulation = Integer.parseInt(data.driver.findElement(By.id(\"pop_current_label\")).getText());\r\n this.maxPopulation = Integer.parseInt(data.driver.findElement(By.id(\"pop_max_label\")).getText());\r\n }", "public void setPopulationSize(int m){\n\t\tsetParameters(m, type1Size, sampleSize);\n\t}", "Multiplication createRandomMultiplication();", "Multiplication createRandomMultiplication();", "public static void initialize(String[] args) {\n\n\t\tSystem.out.print(\"Please enter the number of People (n): \");\n\t\tSystem.out.println(args[0]);\n\t\tnumPeople = Integer.parseInt(args[0]);\n\t\tboard = new int[numPeople][numPeople];\n\t\tbestCombo = new int[numPeople];\n\t\tbestPossibleCombination = new int[numPeople];\n\t\t\n\t\tint i = 0;\n\t\tint j = 0;\n\n\t\t// Convert args to ints\n\t\tint size = args.length;\n\t\tint[] argsNums = new int[size - 1];\n\t\t// start at 1 because first int specifies size\n\t\tfor (i = 1; i < size; i++) {\n\t\t\targsNums[i - 1] = Integer.parseInt(args[i]);\n\t\t\t// System.out.println(argsNums[i-1]);\n\t\t}\n\n\t\t// Row Counter\n\t\tfor (i = 0; i < numPeople; i++) {\n\n\t\t\t// Column Counter\n\t\t\tfor (j = 0; j < numPeople; j++) {\n\t\t\t\tint num = argsNums[numPeople * i + j];\n\t\t\t\t//Initializes board\n\t\t\t\tboard[i][j] = num;\n\t\t\t\t//initializes bestPossibleCombination\n\t\t\t\tif(bestPossibleCombination[i]<num){\n\t\t\t\t\tbestPossibleCombination[i]=num;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\n\n\n\t}", "private static ArrayList<Chromosome> generatePopulation(ArrayList<City> cities, int pathLength, int populationSize) {\n // generating part of the initial population using a Nearest Neighbour Algorithm\n int nnPopulationSize = (int) (0.1*populationSize);\n // if the required number of chromosomes to be generated by the NN Algorithm is greater then the number of cities\n // then set the required number of chromosomes to the number of cities\n if (nnPopulationSize > cities.size()) {\n nnPopulationSize = cities.size();\n }\n ArrayList<Chromosome> nnPopulation = generateNearestNeighbourPopulation(pathLength, nnPopulationSize);\n\n // generating the rest of the initial population randomly\n int randomPopulationSize = populationSize - nnPopulationSize;\n ArrayList<Chromosome> randomPopulation = new ArrayList<>();\n randomPopulation.addAll( generateRandomPopulation(pathLength, randomPopulationSize) );\n\n // Combining the 2 parts of the population into one initial population\n ArrayList<Chromosome> population = new ArrayList<>();\n population.addAll(nnPopulation);\n population.addAll(randomPopulation);\n\n return population;\n }", "public Population(int populationSize, boolean initialize, boolean selfCreation) {\r\n\t tours = new Tour[populationSize]; \r\n\t if (initialize) {\t\r\n\t \tif(selfCreation==false) {\r\n\t\t \tfor (int i = 0; i < populationSize; i++) {\t\t\t\t \r\n\t\t Tour newTour = new Tour();\r\n\t\t newTour.generateIndividual();\r\n\t\t saveTour(i, newTour);\t\t\t\t\t\t\t\t\t \r\n\t\t }\r\n\t \t}\r\n\t \telse {\r\n\t \t\tString path=\"C:\\\\Users\\\\BADai\\\\git\\\\BachelorThesis\\\\BA\\\\src\\\\Tour.txt\";\r\n\t \t\treadFile rf = new readFile();\r\n\t \t\tTour t= new Tour(rf.readTour(path));\r\n\t \t\tsaveTour(0,t);\r\n\t \t\tfor(int a=0; a<t.tourSize();a++) {\r\n\t \t\t\tAll_Cities.addCity(t.getCity(a));\r\n\t \t\t}\r\n\t \t\tD_Matrix.startCity=All_Cities.getCity(0);\r\n\t \t}\r\n\t }\r\n\t\r\n\t }", "public PopulatedPlace(String zip, String town, String state,\n\t\t\t double latitude, double longitude, int population){\n\tsuper(zip, town, state, latitude, longitude);\n\tthis.population = population;\n }", "private void SetUp() {\n numbers.add(0);\n numbers.add(1);\n numbers.add(2);\n numbers.add(3);\n numbers.add(4);\n numbers.add(5);\n numbers.add(6);\n numbers.add(7);\n numbers.add(8);\n numbers.add(9);\n\n PuzzleSolve(10, empty, numbers);\n }", "void init() {\r\n \tfor (int i=0; i<SIZE; i++) {\r\n \t\tfor (int j=0; j<LEN; j++) {\r\n \t\t\tif (rnd.nextDouble() < 0.5)\r\n \t\t\t\toldpop[i][j] = 0;\r\n \t\t\telse\r\n \t\t\t\toldpop[i][j] = 1;\r\n \t\t}\r\n \t}\r\n \tfor (int j=0; j<LEN; j++) {\r\n \t\tcbest[j] = oldpop[0][j];\r\n \t}\r\n\t\tbest = fitness(0);\r\n }", "public NeighborhoodDistribution(int divisions) {this.divisions=divisions;}", "@Test\n public void genomeInitialises() {\n int inputCount = rng.nextInt(20) + 1;\n int outputCount = rng.nextInt(20) + 1;\n\n Population population = new Population(0, inputCount, outputCount, new BlankState());\n\n Genome genome = new Genome(inputCount, outputCount, blankState, population);\n\n int connectionGeneLength = inputCount * outputCount;\n\n for (int i = 0; i < connectionGeneLength; i++) {\n Connection connection = genome.getConnection(i);\n NodeType in = genome.getNode(connection.getIn());\n NodeType out = genome.getNode(connection.getOut());\n\n assertNotNull(connection);\n assertNotNull(in);\n assertNotNull(out);\n assertEquals(NodeType.INPUT, in);\n assertEquals(NodeType.OUTPUT, out);\n assertTrue(genome.containsNode(in, connection.getIn()));\n assertTrue(genome.containsNode(out, connection.getOut()));\n }\n }", "private void createCommunalPlaces(int populationSize) {\n int nHospitals = populationSize / PopulationParameters.get().buildingDistribution.populationToHospitalsRatio;\n int nSchools = populationSize / PopulationParameters.get().buildingDistribution.populationToSchoolsRatio;\n int nShops = populationSize / PopulationParameters.get().buildingDistribution.populationToShopsRatio;\n int nOffices = populationSize / PopulationParameters.get().buildingDistribution.populationToOfficesRatio;\n int nConstructionSites = populationSize / PopulationParameters.get().buildingDistribution.populationToConstructionSitesRatio;\n int nNurseries = populationSize / PopulationParameters.get().buildingDistribution.populationToNurseriesRatio;\n int nRestaurants = populationSize / PopulationParameters.get().buildingDistribution.populationToRestaurantsRatio;\n int nCareHomes = populationSize / PopulationParameters.get().buildingDistribution.populationToCareHomesRatio;\n\n createNHospitals(nHospitals);\n createNSchools(nSchools);\n createNShops(nShops);\n createNOffices(nOffices);\n createNConstructionSites(nConstructionSites);\n createNNurseries(nNurseries);\n createNRestaurants(nRestaurants);\n createNCareHomes(nCareHomes);\n\n LOGGER.info(\"Total number of communal places = {}\", getCommunalPlaces().size());\n }", "public InitData(int type){\n this.type = type;\n this.setLayout(new GridBagLayout());\n GridBagConstraints gc = new GridBagConstraints();\n //setting title\n\n JLabel title = new JLabel();\n if(type == 1){\n title.setText(\"Simple Random Sampling\");\n }else if(type == 2){\n title.setText(\"Systematic Sampling\");\n }else{\n title.setText(\"Stratified Sampling\");\n }\n //setting font\n title.setFont(new Font(\"Century Gothic\",Font.BOLD,30));\n\n JLabel popSizeLabel = new JLabel(\"Please input population size\");\n popSizeTextField = new JTextField(\"\",20);\n JLabel sampleSizeLabel = new JLabel();\n\n if(type !=3 ) {\n sampleSizeLabel.setText(\"Please input sample size\");\n }else {\n sampleSizeLabel.setText(\"Please input sample size percentage from each strata\");\n }\n sampleSizeTextField = new JTextField(\"\",20);\n\n String[] dataChoices = {\"Integers\", \"Characters\"};\n dataTypeCombo = new JComboBox(dataChoices);\n dataTypeCombo.setSelectedIndex(1);\n\n //setting layout\n gc.weighty = 0.5;\n gc.gridx = 0;\n gc.gridy = 0;\n this.add(title,gc);\n\n gc.weighty = 0.2;\n gc.gridx = 0;\n gc.gridy = 1;\n this.add(popSizeLabel,gc);\n\n gc.gridx = 0;\n gc.gridy = 2;\n this.add(popSizeTextField,gc);\n\n gc.gridx = 0;\n gc.gridy = 3;\n this.add(sampleSizeLabel,gc);\n\n gc.gridx = 0;\n gc.gridy = 4;\n this.add(sampleSizeTextField,gc);\n\n gc.gridx = 1;\n gc.gridy = 2;\n this.add(dataTypeCombo,gc);\n\n this.setVisible(true);\n }", "private Data initialise() {\n \r\n getRoomsData();\r\n getMeetingTimesData();\r\n setLabMeetingTimes();\r\n getInstructorsData();\r\n getCoursesData();\r\n getDepartmentsData();\r\n getInstructorFixData();\r\n \r\n for (int i=0;i<departments.size(); i++){\r\n numberOfClasses += departments.get(i).getCourses().size();\r\n }\r\n return this;\r\n }", "@Override\r\n public Solution[] initialize() {\r\n System.out.println(\"c Attempting feasible initialization\");\r\n Solution[] initial_pop = new Solution[populationSize];\r\n for (int i = 0; i < populationSize; ++i) {\r\n initial_pop[i] = problem.newSolution();\r\n attemptFeasibleInitialization(initial_pop[i]);\r\n }\r\n return initial_pop;\r\n }", "public static void createPlayers() {\n\t\tcomputer1 = new ComputerSpeler();\n\t\tspeler = new PersoonSpeler();\n//\t\tif (Main.getNumberOfPlayers() >= 3) { \n//\t\t\tSpeler computer2 = new ComputerSpeler();\n//\t\t}\n//\t\tif (Main.getNumberOfPlayers() == 4) {\n//\t\t\tSpeler computer3 = new ComputerSpeler();\n//\t\t}\n\n\n\t}", "public static void main(String[] args) {\n\t\tScanner input = new Scanner (System.in);\n\t\tOurShape[] shapes = new OurShape[100]; // array of OurShape objects\n\t\tint numberOfShapes = 0;\n\t\tint option = 6; // give the variable a invalid menu number\n\t\t// display welcome message\n\t\tSystem.out.println(\"Welcome to the Shapes Program!\"\n\t\t\t\t\t\t\t+\"\\nThis program allows you to \\\"create\\\" five different shapes.\"\n\t\t\t\t\t\t\t+\"\\nA maximum of 100 shapes can be added before the program will \"\n\t\t\t\t\t\t\t+\"\\nterminate itself. When the program ends, the number of shapes and \"\n\t\t\t\t\t\t\t+\"\\ntheir values will be displayed.\");\n\t\twhile (option != 0 && numberOfShapes <= 99) { // loop menu as long as conditions are valid\n\t\t\ttry {\n\t\t\t\tdo { // keep displaying menu for invalid input\n\t\t\t\t\tSystem.out.println(\"Enter:\"\n\t\t\t\t\t\t\t\t\t\t+\"\\n 1 to add a circle\"\n\t\t\t\t\t\t\t\t\t\t+\"\\n 2 to add a sphere\"\n\t\t\t\t\t\t\t\t\t\t+\"\\n 3 to add a cylinder\"\n\t\t\t\t\t\t\t\t\t\t+\"\\n 4 to add a cube\"\n\t\t\t\t\t\t\t\t\t\t+\"\\n 5 to add a rectangular prism\"\n\t\t\t\t\t\t\t\t\t\t+\"\\n 0 to quit\");\n\t\t\t\t\toption = input.nextInt();\n\t\t\t\t} while (option < 0 || option > 5);\n\t\t\t} catch(InputMismatchException e) {\n\t\t\t\tSystem.out.println(\"Invalid input! Please enter a valid number.\");\n\t\t\t\tinput.nextLine();\n\t\t\t} // end try\n\t\t\t\n\t\t\tswitch(option) {\n\t\t\t\tcase 1:\n\t\t\t\t\tshapes[numberOfShapes] = new Circle();\n\t\t\t\t\tshapes[numberOfShapes].inputFromUser();\n\t\t\t\t\t++numberOfShapes;\n\t\t\t\t\tSystem.out.println(\"The circle has been added.\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tshapes[numberOfShapes] = new Sphere();\n\t\t\t\t\tshapes[numberOfShapes].inputFromUser();\n\t\t\t\t\t++numberOfShapes;\n\t\t\t\t\tSystem.out.println(\"The sphere has been added.\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tshapes[numberOfShapes] = new Cylinder();\n\t\t\t\t\tshapes[numberOfShapes].inputFromUser();\n\t\t\t\t\t++numberOfShapes;\n\t\t\t\t\tSystem.out.println(\"The cylinder has been added.\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tshapes[numberOfShapes] = new Cube();\n\t\t\t\t\tshapes[numberOfShapes].inputFromUser();\n\t\t\t\t\t++numberOfShapes;\n\t\t\t\t\tSystem.out.println(\"The cube has been added.\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tshapes[numberOfShapes] = new RectangularPrism();\n\t\t\t\t\tshapes[numberOfShapes].inputFromUser();\n\t\t\t\t\t++numberOfShapes;\n\t\t\t\t\tSystem.out.println(\"The rectangular prism has been added.\");\n\t\t\t\t\tbreak;\n\t\t\t} // end switch\n\t\t} // end big while loop\n\n\t\tif (numberOfShapes >= 99) {\n\t\t\tSystem.out.println(\"100 shapes were added, ending program...\");\n\t\t}\n\t\t//when stopped, display shapes\n\t\tif (option == 0 && numberOfShapes == 0) {\n\t\t\tSystem.out.print(\"Goodbye. No shapes were added.\");\n\t\t}\n\t\tif ((option == 0 && numberOfShapes > 0) || numberOfShapes >= 99) {\n\t\t\tSystem.out.println(\"Goodbye. The shapes added were: \");\n\t\t\tfor (int i = 0; i < numberOfShapes; i++) {\n\t\t\t\tSystem.out.println (shapes[i].toString() + shapes[i].calc());\n\t\t\t}\n\t\t}\n\t}", "public void init(int numPacks)\n {\n int k, pack;\n\n if (numPacks < 1 || numPacks > 6)\n numPacks = 1;\n\n // hand over the masterPack cards to our deck\n for (pack = 0; pack < numPacks; pack++)\n for (k = 0; k < 52; k++)\n cards[pack*52 + k] = masterPack[k];\n\n // this was slightly sloppy: multiple packs point to same master cards\n // if something modified a card, we would be in trouble. fortunately,\n // we don't expect a card to ever be modified after instantiated\n // in the context of a deck.\n\n this.numPacks = numPacks;\n topCard = numPacks * 52;\n }", "public abstract List<Double> updatePopulations();", "BusinessLogic(int size)\r\n\t{\r\n\t\tthis.size = size;\r\n\t\tgenerator = new Random();\r\n\t\tnumbers = new ArrayList<Integer>();\r\n\t}", "void init(int n);", "void init(int n);", "public void init() {\n initLayers();\n for (int i = 0; i < indivCount; i++) {\n ArrayList<Layer> iLayers = new ArrayList<>();\n for (Layer l : layers)\n iLayers.add(l.cloneSettings());\n individuals[i] = new Individual(iLayers);\n }\n }", "private void _setInstanceInfo() {\n int subClass, superClass;\n\n for (int i = 0; i < CLASS_NUM; i++) {\n switch (i) {\n case CS_C_UNIV:\n break;\n case CS_C_DEPT:\n break;\n case CS_C_FULLPROF:\n instances_[i].num = _getRandomFromRange(FULLPROF_MIN, FULLPROF_MAX);\n break;\n case CS_C_VISITINGPROF:\n instances_[i].num = _getRandomFromRange(VISITINGPROF_MIN, VISITINGPROF_MAX);\n break;\n case CS_C_ASSOPROF:\n instances_[i].num = _getRandomFromRange(ASSOPROF_MIN, ASSOPROF_MAX);\n break;\n case CS_C_ASSTPROF:\n instances_[i].num = _getRandomFromRange(ASSTPROF_MIN, ASSTPROF_MAX);\n break;\n case CS_C_LECTURER:\n instances_[i].num = _getRandomFromRange(LEC_MIN, LEC_MAX);\n break;\n case CS_C_UNDERSTUD:\n instances_[i].num = _getRandomFromRange(R_UNDERSTUD_FACULTY_MIN *\n instances_[CS_C_FACULTY].total,\n R_UNDERSTUD_FACULTY_MAX *\n instances_[CS_C_FACULTY].total);\n break;\n case CS_C_VISITSTUD:\n instances_[i].num = _getRandomFromRange(R_VISITSTUD_FACULTY_MIN *\n instances_[CS_C_FACULTY].total,\n R_VISITSTUD_FACULTY_MAX *\n instances_[CS_C_FACULTY].total);\n break; \n case CS_C_GRADSTUD:\n instances_[i].num = _getRandomFromRange(R_GRADSTUD_FACULTY_MIN *\n instances_[CS_C_FACULTY].total,\n R_GRADSTUD_FACULTY_MAX *\n instances_[CS_C_FACULTY].total);\n break;\n case CS_C_TA:\n instances_[i].num = _getRandomFromRange(instances_[CS_C_GRADSTUD].total /\n R_GRADSTUD_TA_MAX,\n instances_[CS_C_GRADSTUD].total /\n R_GRADSTUD_TA_MIN);\n break;\n case CS_C_RA:\n instances_[i].num = _getRandomFromRange(instances_[CS_C_GRADSTUD].total /\n R_GRADSTUD_RA_MAX,\n instances_[CS_C_GRADSTUD].total /\n R_GRADSTUD_RA_MIN);\n break;\n case CS_C_RESEARCHGROUP:\n instances_[i].num = _getRandomFromRange(RESEARCHGROUP_MIN, RESEARCHGROUP_MAX);\n break;\n default:\n instances_[i].num = CLASS_INFO[i][INDEX_NUM];\n break;\n }\n instances_[i].total = instances_[i].num;\n subClass = i;\n while ( (superClass = CLASS_INFO[subClass][INDEX_SUPER]) != CS_C_NULL) {\n instances_[superClass].total += instances_[i].num;\n subClass = superClass;\n }\n }\n }", "public ChocolateDistribution(int noOfChocolate, int noOfStudents) {\n this.noOfChocolate = noOfChocolate;\n this.noOfStudents = noOfStudents;\n }", "private Populator getPopInitObject() throws Exception{\n String populatorClassname = \"\";\n try { \n populatorClassname = getStringProperty(ParameterList.POP_INITIALIZER, false).replaceAll(\"\\\\s\", \"\");\n Class<?> populatorClass = Class.forName(populatorClassname);\n Constructor<?> populatorConstructor = populatorClass.getConstructor(PropertiesManager.class);\n return (Populator)populatorConstructor.newInstance(this);\n } \n catch (ClassNotFoundException e) {\n throw new ClassNotFoundException(\"Error loading the population initializer. Class \" + populatorClassname + \" not found\", e);\n } \n }", "public Genepool(int numGenes) {\n\t\tgeneNumber = numGenes;\n\t\tgenepool = new ArrayList<Gene>();\n\t\toffspringPool = new ArrayList<Gene>();\n\t\tgenerateGenes();\n\t}", "private void initNature() {\n int N = 100;\n int MOD = 10;\n switch (nature) {\n case \"Hardy\": { natureStats = new Stats(0, N, N, N, N, N); break; }\n case \"Lonely\": { natureStats = new Stats(0, N + MOD, N - MOD, N, N, N); break; }\n case \"Adamant\": { natureStats = new Stats(0, N + MOD, N, N - MOD, N, N); break; }\n case \"Naughty\": { natureStats = new Stats(0, N + MOD, N, N, N - MOD, N); break; }\n case \"Brave\": { natureStats = new Stats(0, N + MOD, N, N, N, N - MOD); break; }\n\n case \"Bold\": { natureStats = new Stats(0, N - MOD, N + MOD, N, N, N); break; }\n case \"Docile\": { natureStats = new Stats(0, N, N, N, N, N); break; }\n case \"Impish\": { natureStats = new Stats(0, N, N + MOD, N - MOD, N, N); break; }\n case \"Lax\": { natureStats = new Stats(0, N, N + MOD, N, N - MOD, N); break; }\n case \"Relaxed\": { natureStats = new Stats(0, N, N + MOD, N, N, N - MOD); break; }\n\n case \"Modest\": { natureStats = new Stats(0, N - MOD, N, N + MOD, N, N); break; }\n case \"Mild\": { natureStats = new Stats(0, N, N - MOD, N + MOD, N, N); break; }\n case \"Bashful\": { natureStats = new Stats(0, N, N, N, N, N); break; }\n case \"Rash\": { natureStats = new Stats(0, N, N, N + MOD, N - MOD, N); break; }\n case \"Quiet\": { natureStats = new Stats(0, N, N, N + MOD, N, N - MOD); break; }\n\n case \"Calm\": { natureStats = new Stats(0, N - MOD, N, N, N + MOD, N); break; }\n case \"Gentle\": { natureStats = new Stats(0, N, N - MOD, N, N + MOD, N); break; }\n case \"Careful\": { natureStats = new Stats(0, N, N, N - MOD, N + MOD, N); break; }\n case \"Quirky\": { natureStats = new Stats(0, N, N, N, N, N); break; }\n case \"Sassy\": { natureStats = new Stats(0, N, N, N, N + MOD, N - MOD); break; }\n\n case \"Timid\": { natureStats = new Stats(0, N - MOD, N, N, N, N + MOD); break; }\n case \"Hasty\": { natureStats = new Stats(0, N, N - MOD, N, N, N + MOD); break; }\n case \"Jolly\": { natureStats = new Stats(0, N, N, N - MOD, N, N + MOD); break; }\n case \"Naive\": { natureStats = new Stats(0, N, N, N, N - MOD, N + MOD); break; }\n case \"Serious\": { natureStats = new Stats(0, N, N, N, N, N); break; }\n }\n }", "public int getPopulation() {\n return population;\n }", "private void initialize() {\r\n //Below are for testing purposes\r\n this.addProductQuantity(new Product(\"1984\", 1, 1.99), 10);\r\n this.addProductQuantity(new Product(\"The Great Gatsby\", 2, 2.45), 25);\r\n this.addProductQuantity(new Product(\"Silent Spring\", 3, 1.86), 3);\r\n this.addProductQuantity(new Product(\"A Room of One's Own\", 4, 3.75), 15);\r\n this.addProductQuantity(new Product(\"Catcher in The Rye\", 5, 2.89), 11);\r\n this.addProductQuantity(new Product(\"The Code Breaker\", 6, 2.50), 26);\r\n this.addProductQuantity(new Product(\"Crime and Punishment\", 7, 2.75), 1);\r\n this.addProductQuantity(new Product(\"Moby Dick\", 8, 2.50), 13);\r\n this.addProductQuantity(new Product(\"The Sixth Extinction\", 9, 3.10), 10);\r\n }", "public void init(int numPacks) {\n //Initialize the cards array.\n this.cards = new Card[numPacks * Deck.MAX_CARDS_IN_PACK];\n //Until the total number of cards are reached, keep adding cards from the\n //master pack.\n for (int i = 0; i < numPacks * Deck.MAX_CARDS_IN_PACK; i++) {\n this.cards[i] = this.masterPack[i % Deck.MAX_CARDS_IN_PACK];\n }\n //Set the top card to the last card allocated.\n this.topCard = numPacks * Deck.MAX_CARDS_IN_PACK;\n }", "public void setUpPockets(int numberOfPlayers)\n\t{\n\n\t\tswitch(numberOfPlayers) // Now it is time to setup the pockets depending on the number of players\n\t\t{\n\t\tcase 2: // For two players...\n\t\t\tpanelPlayer1 = new JPanel(); // Instance the panels\n\t\t\tpanelPlayer2 = new JPanel();\n\t\t\tpanelPlayer2GoalPock = new JPanel();\n\n\t\t\tpanelPlayer1.setLayout(new FlowLayout(FlowLayout.CENTER));\n\t\t\tpanelPlayer2.setLayout(new FlowLayout(FlowLayout.CENTER));\n\n\n\t\t\tpanelPlayer1.add(playerPockets.get(0)); // Add in player 1's pockets...\n\t\t\tpanelPlayer1.add(playerPockets.get(1));\n\t\t\tpanelPlayer1.add(playerPockets.get(2));\n\t\t\tpanelPlayer1.add(playerPockets.get(3));\n\t\t\tpanelPlayerList.add(goalPockets.get(0)); // Add player 1's goal pocket to the right side of the screen...\n\n\t\t\tpanelPlayer2.add(playerPockets.get(7)); // Add in player two's pockets...\n\t\t\tpanelPlayer2.add(playerPockets.get(6));\n\t\t\tpanelPlayer2.add(playerPockets.get(5));\n\t\t\tpanelPlayer2.add(playerPockets.get(4));\n\t\t\tpanelPlayer2GoalPock.add(goalPockets.get(1));\n\n\n\t\t\tmain.add(\"North\", panelPlayer1); // Add these panels to the container.\n\t\t\tmain.add(\"South\", panelPlayer2);\n\t\t\tmain.add(\"West\",panelPlayer2GoalPock);\n\t\t\tbreak;\n\n\t\t}\n\n\t}", "public static LinkedHashMap<BitVector, Double> initializePopulation(int bitVectorSize) {\r\n\r\n\t\tLinkedHashMap<BitVector, Double> population = new LinkedHashMap<>();\r\n\r\n\t\twhile (population.size() < (minPopSize + maxPopSize) / 2) {\r\n\t\t\tBitVector b = new BitVector(bitVectorSize);\r\n\t\t\tb.randomize(rand);\r\n\t\t\tpopulation.put(b, function.valueAt(b));\r\n\t\t}\r\n\r\n\t\treturn population;\r\n\t}", "private void setMultipliers(double healthMultiplier, double dmgMultiplier, double speedMultiplier, double jmpHeightMultiplier) {\n\n // Health multiplier : set to 1 if input is below 1.\n if (healthMultiplier < 1) {\n this.healthMultiplier = 1;\n } else {\n this.healthMultiplier = healthMultiplier;\n }\n\n // Attack damage multiplier : set to 1 if input is below 1.\n if (dmgMultiplier < 1) {\n this.dmgMultiplier = 1;\n } else {\n this.dmgMultiplier = dmgMultiplier;\n }\n\n // Move speed multiplier : set to 1 if input is below 1.\n if (speedMultiplier < 1) {\n this.speedMultiplier = 1;\n } else {\n this.speedMultiplier = speedMultiplier;\n }\n\n // Jump height multiplier : set to 1 if input is below 1.\n if (jmpHeightMultiplier < 1) {\n this.jmpHeightMultiplier = 1;\n } else {\n this.jmpHeightMultiplier = jmpHeightMultiplier;\n }\n }", "private void instantiateProbes() {\n\t\tString probe_str = this.config.getProperty(\"probes.include\", \"all\");\n\t\tString probe_exclude_str = this.config.getProperty(\"probes.exclude\", \"\");\n\t\tString probe_external = this.config.getProperty(\"probes.external\", \"\");\n\t\t\t\t\n\t\ttry {\n\t\t\tArrayList<String> availableProbeList = this.listAvailableProbeClasses();\n\t\t\t//user wants to instantiate all available probes with default params\n\t\t\t//TODO - allow user to parameterize probes when selecting to add all probes\n\t\t\tif (probe_str.equals(\"all\")) {\n\t\t\t\tfor(String s : availableProbeList) \n\t\t\t\t\tthis.probes.put(s, null);\n\t\t\t\t\n\t\t\t\t//user wants to instantiate all available probes except the ones specified for exclusion\n\t\t\t\tif (!probe_exclude_str.equals(\"\")) {\n\t\t\t\t\tString[] probe_list = probe_exclude_str.split(\";\");\n\t\t\t\t\tfor(String s:probe_list)\n\t\t\t\t\t\tthis.probes.remove(s.split(\",\")[0]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//instantiate\n\t\t\t\tfor(Entry<String,IProbe> p:this.probes.entrySet()){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tIProbe tempProbe = JCProbeFactory.newInstance(PROBE_LIB_PATH, p.getKey());\n\t\t\t\t\t\ttempProbe.attachQueue(this.queue);\n\t\t\t\t\t\ttempProbe.attachLogger(this.logger);\n\t\t\t\t\t\tp.setValue(tempProbe);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (CatascopiaException e) {\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//user wants to instantiate specific probes (and may set custom params)\n\t\t\telse{\n\t\t\t\tString[] probe_list = probe_str.split(\";\");\n\t\t\t\tfor(String s:probe_list) {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString[] params = s.split(\",\");\n\t\t\t\t\t\tIProbe tempProbe = JCProbeFactory.newInstance(PROBE_LIB_PATH,params[0]);\n\t\t\t\t\t\ttempProbe.attachQueue(this.queue);\n\t\t\t\t\t\ttempProbe.attachLogger(this.logger);\n\t\t\t\t\t\tif(params.length > 1) //user wants to define custom collecting period\n\t\t\t\t\t\t\ttempProbe.setCollectPeriod(Integer.parseInt(params[1]));\n\t\t\t\t\t\tthis.probes.put(params[0], tempProbe);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (CatascopiaException e) {\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t//activate Agent probes\n\t\t\tthis.activateAllProbes();\n\t\t\t\n\t\t\t//deploy external probes located in a custom user-defined path\n\t\t\tif (!probe_external.equals(\"\")) {\n\t\t\t\tString[] probe_list = probe_external.split(\";\");\n\t\t\t\tfor(String s:probe_list){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString[] params = s.split(\",\");\n\t\t\t\t\t\tString pclass = params[0];\n\t\t\t\t\t\tString ppath = params[1];\n\t\t\t\t\t\tthis.deployProbeAtRuntime(ppath, pclass);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (ArrayIndexOutOfBoundsException e){\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, \"External Probe deployment error. Either the probe class name of classpath are not correctly provided\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\t\n\t\t\t\n\t\t\t//log probe list added to Agent\n\t\t\tString l = \" \";\n\t\t\tfor(Entry<String,IProbe> entry:this.probes.entrySet())\n\t\t\t\tl += entry.getKey() + \",\";\n\t\t\tthis.writeToLog(Level.INFO,\"Probes Activated: \"+l.substring(0, l.length()-1));\n\t\t}\n\t\tcatch (CatascopiaException e){\n\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t}\n\t}", "public void initFloors(int numFloors) throws InvalidArgumentException{\n floors = new ArrayList<>(); \n for(int i = 1; i <= numFloors; i++)\n getFloors().add(FloorFactory.create(i)); \n }", "public interface Population {\n\n /**\n * Add the specified chromosome to the population.\n * If the size of the population has reached to maxSize, eviction is done\n * removing chromosomes with the worst fitness\n * @param chromosome\n */\n void addChromosome(@NotNull final Chromosome chromosome);\n\n /**\n * Return a random chromosome\n * @return\n */\n Chromosome getRandom();\n\n\n /**\n * Return a random chromosome among the first limit fittest chromosomes\n * @param limit Nth fittest chromosome\n * @return\n */\n Chromosome getRandomAmongFittest(int limit);\n\n /**\n * Remove the specified chromosome from the population\n * @param chromosome\n */\n boolean removeChromosome(@NotNull final Chromosome chromosome);\n\n /**\n * Return the fittest chromosome\n * @return\n */\n Chromosome fittestChromosome();\n\n /**\n * Number of chromosome in the population\n * @return\n */\n int size();\n\n /**\n * Return the hits of each chromosomes\n * @return\n */\n Map<String, Long> hits();\n}", "public int getPopulation() {\n\n return population;\n }", "@Override\n public void initialize() {\n numPlayers = game().numPlayers();\n haveSeen = new ArrayList<>();\n goldProb = new double[3];\n Probability = new double[numPlayers];\n oldBoard = game().board().copy();\n //sets all of the players to miners at first\n //the lower the value the higher the player is predicted as Saboteur\n for (int i = 0; i < numPlayers; i++) {\n Probability[i] = 0.5;\n haveSeen.add(new int[3]);\n }\n for(int i=0; i<3; i++) {\n //top is 0, middle is 1, bottom is 2\n goldProb[i]=0.1;\n }\n if(role() == Role.SABOTEUR) Probability[index()]=0;\n else if(role() == Role.GOLD_MINER) Probability[index()]=1;\n }", "public Chromosone() {\n Random rand = new Random();\n for(int i=0;i<=75;i++)\n {\n int rnd = rand.nextInt(2);// [1,0...]\n\n Val.add(rnd);\n }\n }", "public BinomialModelSimulator(double initialValue, double increaseIfUp, double decreaseIfDown, int lastTime,\n\t\t\tint numberOfSimulations) {\n\t\tthis(initialValue, increaseIfUp, decreaseIfDown, 0, 1897, lastTime, numberOfSimulations);\n\t}", "public void generatePopulation(String filePathAndName) {\n\t\t\n\t\tList<String> dataAll = SU.readFile(filePathAndName);\n\t\tList<String> dataAgents = new ArrayList<String>();\n\t\tList<String> dataStock = new ArrayList<String>();\n\t\tList<String> dataRelations = new ArrayList<String>();\n\t\t\n\t\tint typeOfData = -1;\n\t\tfor (String datum : dataAll) {\n\t\t\tif (!datum.startsWith(\"%\")) {\n\t\t\t\tswitch(typeOfData) {\n\t\t\t\tcase 0:\tdataAgents.add(datum); break;\n\t\t\t\tcase 1: dataStock.add(datum); break;\n\t\t\t\tcase 2: dataRelations.add(datum); break;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttypeOfData = Integer.parseInt(datum.substring(1,2));\n\t\t\t}\n\t\t}\n\t\t\n\t\tgenerateAgents(dataAgents);\n\t\tgenerateStock(dataStock);\n\t\tgenerateRelations(dataRelations);\n\t\t\n\t\tSU.getDataCollector().addAllCurrentStock();\n\t}", "private void createInitialPopulation() throws InterruptedException, TimeoutException {\n\n\t\tProteinDatabase ident = new ProteinDatabase();\n\t\tident.parseInput(\"proteins.fasta\");\n\t\tList<Protein> database = ident.getDatabase();\n\n\t\tfor (Protein data : database) {\n\t\t\tdata.setExperimental(es);\n\t\t}\n\n\t\tList<Protein> candidates = new ArrayList<Protein>();\n\t\tfor (Protein p : database)\n\t\t{\n\t\t\tTheoreticalSpectrum theoreticalSpectrum = new TheoreticalSpectrum(p.getAminoAcidsequence());\n\t\t\tif (Math.abs(parentMass - theoreticalSpectrum.getParentMass()) <= parentMassThreshold) {\n\t\t\t\tcandidates.add(p);\n\t\t\t}\n\t\t}\n\n\t\trunInitialFitnessCalculations(candidates);\n\n\t\tCollections.sort(candidates, new ProteinFitnessComparator());\n\t\tdebug(candidates, 0);\n\n\n\t\tpopulation = new ArrayList<Protein>(populationSize);\n\n\t\tpopulationActualSize = 0;\n\t\tfor (Protein p : candidates)\n\t\t{\n\t\t\tpopulation.add(p);\n\t\t\tpopulationActualSize++;\n\t\t\tif (populationActualSize == populationSize)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public interface Population {\n public List<Individual> selectRandomIndividuals(int n, boolean withReplacement);\n\n public void evaluateFitnesses();\n\n public Individual crossoverOnePoint(Individual a, Individual b);\n\n public Individual crossoverTwoPoint(Individual a, Individual b);\n\n public Individual crossoverUniform(Individual a, Individual b);\n\n public void evolveMuLambda(int numParents, int numChildren, double mean, double variance);\n\n public void evolveMuPlusLambda(int numParents, int numChildren, double mean, double mutationRate);\n\n public void evolveGeneticAlgorithm();\n\n public void saveIndividualsAsPlayersInDb();\n\n public void addListener(EvolutionCompleteListener listener);\n\n}", "public static void main(String[] args) {\n City city = new City(60, 200);\n\n City city2 = new City(180, 200);\n\n City city3 = new City(80, 180);\n City city4 = new City(140, 180);\n\n City city5 = new City(20, 160);\n\n City city6 = new City(100, 160);\n\n City city7 = new City(200, 160);\n\n City city8 = new City(140, 140);\n\n City city9 = new City(40, 120);\n\n City city10 = new City(100, 120);\n\n City city11 = new City(180, 100);\n\n City city12 = new City(60, 80);\n\n City city13 = new City(120, 80);\n City city14 = new City(180, 60);\n City city15 = new City(20, 40);\n\n City city16 = new City(100, 40);\n\n City city17 = new City(200, 40);\n City city18 = new City(20, 20);\n\n City city19 = new City(60, 20);\n City city20 = new City(160, 20);\n List<City> list=new ArrayList<City>();\n list.add(city);list.add(city2);\n list.add(city3);\n list.add(city4);\n list.add(city5);\n list.add(city6);\n list.add(city7);\n list.add(city8);\n list.add(city9);\n list.add(city10);\n list.add(city11);\n list.add(city12);\n list.add(city13);\n list.add(city14);\n list.add(city15);\n list.add(city16);\n list.add(city17);\n list.add(city18);\n list.add(city19);\n list.add(city20);\n\n // Initialize population\n Population pop = new Population(100, true,list);\n System.out.println(\"Initial distance: \" + pop.getBestTour().getDistance());\n\n // Evolve population for 100 generations\n pop = Ga.evolvePopulation(pop);\n for (int i = 0; i < 500; i++) {\n pop = Ga.evolvePopulation(pop);\n System.out.println(\"第\"+i+\"代\"+pop.getBestTour().getDistance());\n }\n\n // Print final results\n System.out.println(\"Finished\");\n System.out.println(\"Final distance: \" + pop.getBestTour().getDistance());\n System.out.println(\"Solution:\");\n System.out.println(pop.getBestTour());\n }", "public void init(){\n\t\tEmployee first = new Employee(\"Diego\", \"Gerente\", \"[email protected]\");\n\t\tHighSchool toAdd = new HighSchool(\"Santiago Apostol\", \"4656465\", \"cra 33a #44-56\", \"3145689879\", 30, 5000, \"Jose\", new Date(1, 3, 2001), 3, \"Servicios educativos\", \"451616\", 15, \"Piedrahita\", 45, 1200, 500);\n\t\ttoAdd.addEmployee(first);\n\t\tProduct pilot = new Product(\"jet\", \"A00358994\", 1.5, 5000);\n\t\tFood firstFood = new Food(\"Colombina\", \"454161\", \"cra 18\", \"454611313\", 565, 60000, \"Alberto\", new Date(1, 8, 2015), 6, \"Manufactura\", 4);\n\t\tfirstFood.addProduct(pilot);\n\t\ttheHolding = new Holding(\"Hertz\", \"15545\", \"cra 39a #30a-55\", \"3147886693\", 80, 500000, \"Daniel\", new Date(1, 2, 2015), 5);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\ttheHolding.addSubordinate(firstFood);\n\t}", "private void initExplorationBounds() {\n switch (configuration.getCoverageCriteria()) {\n case GOAL_COVERAGE:\n case BRANCH_COVERAGE:\n configuration.setObjectScope(configuration.isIncrementalLoopUnroll() ?\n FajitaConfiguration.INITIAL_INCREMENTAL_OBJECT_SCOPE :\n configuration.getMaximumObjectScope()\n );\n configuration.setLoopUnroll(configuration.isIncrementalLoopUnroll() ?\n FajitaConfiguration.INITIAL_INCREMENAL_LOOP_UNROLL :\n configuration.getMaximumLoopUnroll()\n );\n break;\n case CLASS_COVERAGE:\n case DUAL_CLASS_BRANCH_COVERAGE:\n configuration.setObjectScope(configuration.getMaximumObjectScope());\n configuration.setLoopUnroll(configuration.getMaximumLoopUnroll());\n break;\n }\n }", "public ArchitectureGenerator(Problem problem, int populationSize, String type) {\n this.problem = problem;\n this.populationSize = populationSize;\n this.pprng = new ParallelPRNG();\n this.type = type;\n }", "public BinomialModelSimulator(double initialValue, double increaseIfUp, double decreaseIfDown, int seed, int lastTime,\n\t\t\tint numberOfSimulations) {\n\t\tthis(initialValue, increaseIfUp, decreaseIfDown, 0, seed, lastTime, numberOfSimulations);\n\t}", "public void baiscSetting(){\n generations_ = 0;\n maxGenerations_ = ((Integer) this.getInputParameter(\"maxGenerations\")).intValue();\n populationSize_ = ((Integer) this.getInputParameter(\"populationSize\")).intValue();\n mutation_ = operators_.get(\"mutation\");\n crossover_ = operators_.get(\"crossover\");\n selection_ = operators_.get(\"selection\");\n learning_ = operators_.get(\"learning\");\n\n }" ]
[ "0.6667392", "0.6522867", "0.63956434", "0.6374002", "0.6363828", "0.6322152", "0.6142106", "0.6128648", "0.6093163", "0.6037591", "0.60314536", "0.5974116", "0.5939253", "0.59356177", "0.5890567", "0.58855224", "0.58140016", "0.58022404", "0.57689416", "0.57672036", "0.5712016", "0.5711536", "0.5666124", "0.5567635", "0.55668384", "0.55357814", "0.5507755", "0.5470826", "0.54598105", "0.5447665", "0.54140955", "0.540343", "0.5401108", "0.5389947", "0.53399587", "0.53149104", "0.5313599", "0.52913916", "0.5263438", "0.5251379", "0.52472913", "0.52275175", "0.5218099", "0.520853", "0.5191099", "0.516827", "0.5160213", "0.5144899", "0.51391023", "0.5137675", "0.5133865", "0.5116535", "0.5116535", "0.50537527", "0.5046219", "0.5043595", "0.50069624", "0.5002369", "0.49963707", "0.49962685", "0.49928242", "0.49789545", "0.49678546", "0.49663275", "0.49612457", "0.4960883", "0.49523586", "0.49502468", "0.4946385", "0.49439546", "0.49385193", "0.49385193", "0.4926202", "0.4920976", "0.49076852", "0.48938248", "0.4892886", "0.48781568", "0.48753536", "0.4873003", "0.48659953", "0.48644716", "0.4858138", "0.48550698", "0.4854624", "0.48545092", "0.48494083", "0.48446554", "0.4840837", "0.48332164", "0.48322377", "0.48194486", "0.48186648", "0.4818361", "0.4800079", "0.47949278", "0.4760021", "0.4748577", "0.4730207", "0.4729358" ]
0.6873851
0
Method to create a Single Population.
public Population InitSinglePopulation(int NumberOfAgents) { SinglePopulation TempPopulation = new SinglePopulation(); TempPopulation.setPopulationID(0); for(int j = 0; j < NumberOfAgents; j++){ SinglePopulationAgent TempAgentS = new SinglePopulationAgent(j,rand.nextDouble()); boolean InitAction = (rand.nextDouble() < TempAgentS.getStrategy()) ? true : false; TempAgentS.setAction(InitAction); TempPopulation.AgentList.add(TempAgentS); } TempPopulation.setStrategyList(); TempPopulation.setActionList(); return TempPopulation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Population(Infrastructure infra)\n\t\t{\tinds = new Individual[NUMBER_INDIVIDUALS];\n\t\t\tfor(int i=0;i<NUMBER_INDIVIDUALS;i++)\n\t\t\t\tinds[i] = new Individual(infra);\n\t\t\tthis_ind = 0;\n\t\t\tthis_gen = 0;\n\t\t}", "public Population InitSinglePopulation\n (int PopulationID, int NumberOfAgents, double MixedStrategy){\n \n MultiPopulation TempPopulation = new MultiPopulation();\n\n TempPopulation.setPopulationID(PopulationID);\n TempPopulation.setInitMixedStrategy(MixedStrategy);\n\n for(int j = 0; j < NumberOfAgents; j++){\n\n double TempDraw = rand.nextDouble();\n boolean TempAction = (TempDraw < MixedStrategy) ? true : false;\n MultiPopulationAgent TempAgentM = \n new MultiPopulationAgent(j,PopulationID,TempAction);\n \n TempPopulation.AgentList.add(TempAgentM);\n \n }\n \n TempPopulation.setActionList();\n return TempPopulation;\n }", "public IntegerGenotype create() \r\n\t{\n\t\tIntegerGenotype genotype = new IntegerGenotype(1,3);\r\n\t\tgenotype.init(new Random(), Data.numeroCuardillas); \r\n\t\t\r\n\t\treturn genotype;\r\n\t}", "Individual createIndividual();", "public interface Population {\n public List<Individual> selectRandomIndividuals(int n, boolean withReplacement);\n\n public void evaluateFitnesses();\n\n public Individual crossoverOnePoint(Individual a, Individual b);\n\n public Individual crossoverTwoPoint(Individual a, Individual b);\n\n public Individual crossoverUniform(Individual a, Individual b);\n\n public void evolveMuLambda(int numParents, int numChildren, double mean, double variance);\n\n public void evolveMuPlusLambda(int numParents, int numChildren, double mean, double mutationRate);\n\n public void evolveGeneticAlgorithm();\n\n public void saveIndividualsAsPlayersInDb();\n\n public void addListener(EvolutionCompleteListener listener);\n\n}", "public Guppy() {\n this(DEFAULT_GENUS, DEFAULT_SPECIES, 0, true, 0,\n DEFAULT_HEALTH_COEFFICIENT);\n }", "public Population (Coordinate location){\n this.location = location;\n }", "public Population(int capacity) {\r\n Validate.positive(capacity, \"capacity\");\r\n this.capacity = capacity;\r\n }", "public interface Population {\n\n /**\n * Add the specified chromosome to the population.\n * If the size of the population has reached to maxSize, eviction is done\n * removing chromosomes with the worst fitness\n * @param chromosome\n */\n void addChromosome(@NotNull final Chromosome chromosome);\n\n /**\n * Return a random chromosome\n * @return\n */\n Chromosome getRandom();\n\n\n /**\n * Return a random chromosome among the first limit fittest chromosomes\n * @param limit Nth fittest chromosome\n * @return\n */\n Chromosome getRandomAmongFittest(int limit);\n\n /**\n * Remove the specified chromosome from the population\n * @param chromosome\n */\n boolean removeChromosome(@NotNull final Chromosome chromosome);\n\n /**\n * Return the fittest chromosome\n * @return\n */\n Chromosome fittestChromosome();\n\n /**\n * Number of chromosome in the population\n * @return\n */\n int size();\n\n /**\n * Return the hits of each chromosomes\n * @return\n */\n Map<String, Long> hits();\n}", "SUP createSUP();", "public PopulationfosaController() {\n }", "public PopulationGrowth() {\n initComponents();\n }", "@Override\n protected Professional generateCreateRequest() {\n return new Professional().withId(FIRST_ID).withFirstName(FIRST_NAME).withLastName(LAST_NAME)\n .withCompanyName(COMPANY_NAME);\n }", "public void generatePopulation() {\n\t\t\n\t\tif (SCType.getScLayers() <= 2)\n\t\t\tLogger.logError(\"To few supply chain layers, minimum of 3 required:\" + SCType.getScLayers());\n\t\t\n\t\tArrayList<CountryAgent> countryAgents = SU.getObjectsAll(CountryAgent.class);\t\t\n\t\tfor (CountryAgent country : countryAgents) {\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.PRODUCER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_PRODUCERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.PRODUCER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.INTERNATIONAL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_INTERNATIONALS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.INTERNATIONAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.WHOLESALER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_WHOLESALERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.WHOLESALER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.RETAIL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_RETAILERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.RETAIL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.CONSUMER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_CONSUMERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.CONSUMER);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set possible new suppliers and clients\n\t\tfor (BaseAgent agent : SU.getObjectsAll(BaseAgent.class)) {\n\t\t\tagent.setPossibleNewSuppliersAndClients();\n\t\t}\n\t\t\n\t\tSU.getDataCollector().addAllCurrentStock();\n\t}", "public Population (float longitude, float latitude){\n this.location = new Coordinate (longitude,latitude);\n }", "public Population(int indivCount) {\n this.indivCount = indivCount;\n layers = new ArrayList<>();\n individuals = new Individual[indivCount];\n }", "public org.drip.measure.continuous.R1 populationDistribution()\n\t{\n\t\treturn _distPopulation;\n\t}", "private GeneProduct createGeneProduct( Gene gene ) {\n GeneProduct geneProduct = GeneProduct.Factory.newInstance();\n geneProduct.setGene( gene );\n geneProduct.setName( gene.getName() );\n geneProduct.setDescription( \"Gene product placeholder\" );\n return geneProduct;\n }", "public static Gng init() {\n return new Gng();\n }", "public Predator reproduce() {\n if(eaten < 2) return null;\n else {\n if ((int) (Math.random() * 100) >= 80) {\n predatorsSpawned++;\n return new Predator(((int) ((speed + Math.random()) * 5)), ((int) (maxEnergy + Math.random()\n * 50)), world, true);\n }\n predatorsSpawned++;\n return new Predator(speed, maxEnergy, world);\n }\n }", "public static NewShipperPG newShipperPG(ShipperPG prototype) {\n return new ShipperPGImpl(prototype);\n }", "P createP();", "public Contribution createContribution()\n {\n return new Contribution();\n }", "@Override\n\tpublic Item create() {\n\t\tLOGGER.info(\"Shoe Name\");\n\t\tString item_name = util.getString();\n\t\tLOGGER.info(\"Shoe Size\");\n\t\tdouble size = util.getDouble();\n\t\tLOGGER.info(\"Set Price\");\n\t\tdouble price = util.getDouble();\n\t\tLOGGER.info(\"Number in Stock\");\n\t\tlong stock = util.getLong();\n\t\tItem newItem = itemDAO.create(new Item(item_name, size, price, stock));\n\t\tLOGGER.info(\"\\n\");\n\t\treturn newItem;\n\t}", "public Pencil() {\n\n }", "public static void generatePopulation() {\n population = setupArray(POP_SIZE, NUM_RULES, GENE_SIZE, COND_LEN);\n\n for (Individual individual : population) {\n for (int i = 0; i < individual.getGene().length; i++) {\n individual.gene[i] = bits.get(new Random().nextInt(2));\n }\n individual.generateRulebase();\n }\n }", "public Puppy() {\n\t\t//TODO\n\t}", "@Override\n\tpublic Produs build() {\n\t\treturn produs;\n\t}", "public Genetic() {\r\n }", "public void setPoputlation (double population) { n.setPopulation(population); }", "private static Pool setUpPool(String name, double volume, double temp,\n double pH, double nutrientCoefficient, GuppySet startingGuppies) {\n Pool pool = new Pool(name, volume, temp, pH, nutrientCoefficient);\n\n pool.addFish(startingGuppies.generateGuppies());\n\n return pool;\n }", "public static CreationEntry createSimpleEntry(int aPrimarySkill, int aObjectSource, int aObjectTarget, int aObjectCreated, boolean depleteSource, boolean depleteTarget, float aPercentageLost, boolean depleteEqually, boolean aCreateOnGround, CreationCategories aCategory) {\n/* 3586 */ CreationEntry entry = new SimpleCreationEntry(aPrimarySkill, aObjectSource, aObjectTarget, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCategory);\n/* */ \n/* 3588 */ CreationMatrix.getInstance().addCreationEntry(entry);\n/* 3589 */ return entry;\n/* */ }", "VariationPoint createVariationPoint();", "public String getModuleName() {\n\t\treturn \"Evaluate Population\";\n\t}", "@Override\n\tpublic IProduct factoryMethod() {\n\t\treturn new Toy();\n\t}", "Simple createSimple();", "public Cop generateCop(){\r\n\r\n\t\t\tPatch currentPatch = randPatch();\r\n\r\n\t\t\tCop cop= new Cop(currentPatch);\r\n\r\n\t\t\tcurrentPatch.setPerson(cop);\r\n\r\n\t\t\treturn cop;\r\n\t\t}", "public double getPopulation () { return n.getPopulation(); }", "public String getPopulation() {\n\t\treturn population;\n\t}", "public static CreationEntry createSimpleEntry(int aPrimarySkill, int aObjectSource, int aObjectTarget, int aObjectCreated, boolean depleteSource, boolean depleteTarget, float aPercentageLost, boolean depleteEqually, boolean aCreateOnGround, int aCustomCreationCutOff, double aMinimumSkill, CreationCategories aCategory) {\n/* 3645 */ CreationEntry entry = new SimpleCreationEntry(aPrimarySkill, aObjectSource, aObjectTarget, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCustomCreationCutOff, aMinimumSkill, aCategory);\n/* */ \n/* */ \n/* 3648 */ CreationMatrix.getInstance().addCreationEntry(entry);\n/* 3649 */ return entry;\n/* */ }", "public static Population simpleAndParallel(UnchangedInfo info, Rectangle rect) {\n\t\tint size = info.size;\n\t\tPopulation population = fjPool.invoke(new GetPopulation(info, rect, 0, size));\n\t\treturn population;\n\t}", "public Clorus replicate() {\n Clorus p2 = new Clorus(energy/2.0);\n energy /= 2;\n return p2;\n }", "public Population(int popSize, String[] studet_ids, int groupSize, \r\n\t\t int initPop, int selMethod, int selPara, \r\n\t\t int crossMethod, double crossPara, int mutMethod,\r\n\t\t double mutPara, int replaceMethod, int replacePara,\r\n\t\t double powerStep, double tourStep, FitnessFunction fitnessFunction)\r\n {\r\n\tthis(selMethod, selPara, crossMethod, crossPara, mutMethod, mutPara, \r\n\t replaceMethod, replacePara, powerStep, tourStep, fitnessFunction);\r\n\r\n\tchromos = new ArrayList<Chromosome>();\r\n\tfor(int i = 0; i < popSize; i++)\r\n\t chromos.add(new Chromosome(studet_ids, groupSize, crossMethod,\r\n\t\t\t\t crossPara, mutMethod, mutPara, initPop, ff));\r\n\tinitialize();\r\n }", "public void setPopulation(int population) {\n this.population = population;\n }", "SomePlus createSomePlus();", "protected Population<T, K> initializePopulation(int size, Class<K> clazz)\n\t\t\tthrows InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {\n\t\tPopulation<T, K> pop = new Population<>(size, fitnessCalc);\n\t\tpop.initialize(clazz);\n\t\treturn pop;\n\t}", "public long getPopulation() {\n return population;\n }", "public long getPopulation() {\n return population;\n }", "protected DPP createDPP() {\n\t\tDPP dpp = new DPP();\n\t\tdpp.add(null, OP_CREATE, ST_CREATED);\n\t\t// dpp.add(ST_CREATED, ..., ...);\n\t\treturn dpp;\n\t}", "public static Profesional createEntity(EntityManager em) {\n Profesional profesional = new Profesional()\n .profesion(DEFAULT_PROFESION)\n .matricula(DEFAULT_MATRICULA);\n return profesional;\n }", "public StackPushSingle()\n {\n super(\"PushStackSingle\");\n }", "public Individual()\r\n\t{\r\n\t}", "public P copy(){\n AssetLoader l = GDefence.getInstance().assetLoader;\n P p = new P(chance.get(), duration.get(), bonusDmg.get(), g);\n p.gemBoost[0] = new BoostInteger(p.bonusDmg, g.bonusDmgUp, l.getWord(\"bashGrade3\"),\n true, BoostInteger.IntegerGradeFieldType.NONE);\n p.gemBoost[1] = new BoostFloat(p.duration, g.durationUp, l.getWord(\"bashGrade2\"),\n true, BoostFloat.FloatGradeFieldType.TIME);\n p.gemBoost[2] = new BoostFloat(p.chance, g.chanceUp, l.getWord(\"bashGrade1\"),\n true, BoostFloat.FloatGradeFieldType.PERCENT);\n p.s = new S(chance.get(), duration.get(), bonusDmg.get());\n return p;\n }", "private MolecularSample createTestSample() {\n testMolecularSample = new MolecularSample();\n testMolecularSample.setName(TEST_MOLECULAR_SAMPLE_NAME_CREATE);\n testMolecularSample.setMaterialSample(TEST_MATERIAL_SAMPLE_UUID);\n testMolecularSample.setSampleType(TEST_MOLECULAR_SAMPLE_SAMPLE_TYPE);\n \n persist(testMolecularSample);\n \n return testMolecularSample;\n }", "public void setPopulation(int population) {\n\n this.population = population;\n }", "QualityScenario createQualityScenario();", "public interface PopulationInitialiser {\n\t/**\n\t * this generates an initial solution population from which to start optimisation\n\t *\n\t * @param cities the set of cities which are part of each solution\n\t * @param populationSize the number of solutions to be included in a population\n\t */\n\tSolutionPopulation initialise(ArrayList<City> cities, int populationSize);\n}", "public Jewel generate()\r\n\t{\r\n\t\treturn new Jewel(rand.nextInt(maxType));\r\n\t}", "public SimpleRegression() {\n this(new TDistributionImpl(1.0));\n }", "public suiluppo_equip_allocation create(long equip_allocat_id);", "IEquipableItem create(int power, int min, int max);", "public Population(int size, ArrayList<Individual> KIS){\n this.size = size;\n this.individuals = KIS;\n }", "public void setPopulation(Integer population) {\n this.population = population;\n }", "public InspectionModal createNewInspection(){\n waitForLoading();\n clickElement(createNewInspectionButton);\n return new InspectionModal(super.driver); // return pop ap\n }", "Multiplication createRandomMultiplication();", "Multiplication createRandomMultiplication();", "public int getPopulation() {\n return population;\n }", "Stimulus createStimulus();", "@Override\n\tSauce createSauce() {\n\t\treturn new NYSauce();\n\t}", "public Produto() {}", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "public void setpopulation(int population) {\n this.population = population;\n }", "@Override\n public Productor getProductor() {\n return new ProductorImp1();\n }", "static Grandson getGrandson() {\n\t\treturn new Grandson();\r\n\t}", "public int getPopulation() {\n\n return population;\n }", "public Person create() {\n\t\treturn personRepository.create();\n\t}", "Population<T> operate(Population<T> population);", "private com.google.protobuf.SingleFieldBuilderV3<\n io.envoyproxy.envoy.type.v3.FractionalPercent, io.envoyproxy.envoy.type.v3.FractionalPercent.Builder, io.envoyproxy.envoy.type.v3.FractionalPercentOrBuilder> \n getRandomSamplingFieldBuilder() {\n if (randomSamplingBuilder_ == null) {\n randomSamplingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n io.envoyproxy.envoy.type.v3.FractionalPercent, io.envoyproxy.envoy.type.v3.FractionalPercent.Builder, io.envoyproxy.envoy.type.v3.FractionalPercentOrBuilder>(\n getRandomSampling(),\n getParentForChildren(),\n isClean());\n randomSampling_ = null;\n }\n return randomSamplingBuilder_;\n }", "private Populator getPopInitObject() throws Exception{\n String populatorClassname = \"\";\n try { \n populatorClassname = getStringProperty(ParameterList.POP_INITIALIZER, false).replaceAll(\"\\\\s\", \"\");\n Class<?> populatorClass = Class.forName(populatorClassname);\n Constructor<?> populatorConstructor = populatorClass.getConstructor(PropertiesManager.class);\n return (Populator)populatorConstructor.newInstance(this);\n } \n catch (ClassNotFoundException e) {\n throw new ClassNotFoundException(\"Error loading the population initializer. Class \" + populatorClassname + \" not found\", e);\n } \n }", "public static Potion buildFromFullData(SceneObjectSaveData data) \n {\n \n Potion consumable = new Potion();\n \n return consumable;\n }", "public Unit<Dimensionless> one() {return one;}", "public static SingleTon createSingleTonObject() {\r\n\t\tif(ston == null) {\r\n\t\t\tston=new SingleTon();\r\n\t\t}\r\n\t\treturn ston;\r\n\t}", "public final Statistic newInstance() {\n Statistic s = new Statistic();\n s.myNumMissing = myNumMissing;\n s.firstx = firstx;\n s.max = max;\n s.min = min;\n s.myConfidenceLevel = myConfidenceLevel;\n s.myJsum = myJsum;\n s.myValue = myValue;\n s.setName(getName());\n s.num = num;\n s.sumxx = sumxx;\n s.moments = Arrays.copyOf(moments, moments.length);\n if (getSaveOption()) {\n s.save(getSavedData());\n s.setSaveOption(true);\n }\n return (s);\n }", "private ManufactureProcess createNewManufactureProcess() {\n\t\tManufactureProcess result = null;\n\n\t\tif (workshop.getTotalProcessNumber() < workshop.getSupportingProcesses()) {\n\n\t\t\tint skillLevel = getEffectiveSkillLevel();\n\t\t\tint techLevel = workshop.getTechLevel();\n\n\t\t\t// Determine all manufacturing processes that are possible and profitable.\n\t\t\tMap<ManufactureProcessInfo, Double> processProbMap = new HashMap<ManufactureProcessInfo, Double>();\n\t\t\tIterator<ManufactureProcessInfo> i = ManufactureUtil\n\t\t\t\t\t.getManufactureProcessesForTechSkillLevel(techLevel, skillLevel).iterator();\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tManufactureProcessInfo processInfo = i.next();\n\t\t\t\tif (ManufactureUtil.canProcessBeStarted(processInfo, workshop)) {\n\t\t\t\t\tdouble processValue = 0;\n\t\t\t\t\tif (person != null)\n\t\t\t\t\t\tprocessValue = ManufactureUtil.getManufactureProcessValue(processInfo, person.getSettlement());\n\t\t\t\t\telse if (robot != null)\n\t\t\t\t\t\tprocessValue = ManufactureUtil.getManufactureProcessValue(processInfo, robot.getSettlement());\n\n\t\t\t\t\tif (processValue > 0D) {\n\t\t\t\t\t\tprocessProbMap.put(processInfo, processValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Randomly choose among possible manufacturing processes based on their\n\t\t\t// relative profitability.\n\t\t\tManufactureProcessInfo chosenProcess = null;\n\t\t\tif (!processProbMap.isEmpty()) {\n\t\t\t\tchosenProcess = RandomUtil.getWeightedRandomObject(processProbMap);\n\t\t\t}\n\n\t\t\t// Create chosen manufacturing process.\n\t\t\tif (chosenProcess != null) {\n\t\t\t\tresult = new ManufactureProcess(chosenProcess, workshop);\n\t\t\t\tworkshop.addProcess(result);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "public void reproduce(){\n\t\t// sort the population from strongest to weakest\n\t\tCollections.sort(population);\n\t\tCollections.reverse(population);\n\t\t\n\t\tfor(int i = 0; i < (int)(POPULATION_SIZE*POPULATION_ACTION_PERCENT); i+=2){\n\t\t\t\n\t\t\t// get two random indexes for reproduction based on the exponential function\n\t\t\t// (1/1000) * (randInt)^2 = index\n\t\t\t// this function favors sequences with higher fitness scores\n\t\t\tint randIndex1 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\tint randIndex2 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\t\n\t\t\trandIndex1 = (int) (Math.pow(randIndex1, 2) / 1000);\n\t\t\trandIndex2 = (int) (Math.pow(randIndex2, 2) / 1000);\n\t\t\t\n\t\t\t// get two pieces\n\t\t\tBuildingPiece[] array1 = population.get(randIndex1).getList();\n\t\t\tBuildingPiece[] array2 = population.get(randIndex2).getList();\n\t\t\t\n\t\t\t// find a splicing point\n\t\t\tint splicePoint = findSplicingPoint(array1, array2);\n\t\t\t\n\t\t\t// generate two new arrays based on the splicing point\n\t\t\tBuildingPiece[] newArray1 = generateNewArray(array1, array2, splicePoint);\n\t\t\tBuildingPiece[] newArray2 = generateNewArray(array2, array1, splicePoint);\n\t\t\t\n\t\t\t// make new buildings with the new arrays\n\t\t\tBuilding bp1 = new Building(newArray1, generation, possiblePieces);\n\t\t\tBuilding bp2 = new Building(newArray2, generation, possiblePieces);\n\t\t\t\n\t\t\t// mutate the new building sequences\n\t\t\tmutateArray(bp1);\n\t\t\tmutateArray(bp2);\n\t\t\t\n\t\t\t// add them into the population\n\t\t\tpopulation.add(randIndex1, bp1);\n\t\t\tpopulation.add(randIndex2, bp2);\n\t\t}\n\t}", "@Override\n public String getName() {\n return \"Genetic\";\n }", "public Jode single() {\n return single(false);\n }", "Gruppo getGruppo();", "public Population()\n{\n year = 0;\n fate = new Random();\n eligibleDuas = new ArrayList<Caldean>();\n eligibleDuises = new ArrayList<Caldean>();\n theHouses = new LinkedList<House>();\n}", "public GeneralParameters instantiate() {\n return instantiate(null);\n }", "public Population(Graph graph)\r\n/* 13: */ {\r\n/* 14:36 */ g = graph.cloneGraph();\r\n/* 15: */ }", "public SingletonMarket<Goods, Bidder<Goods>> getSingletonMarket(int numGoods, int numBidders, double p, String distribution) throws Exception {\n switch (distribution) {\n case \"Uniform\":\n return SingletonMarketFactory.uniformRewardSingletonRandomMarket(numGoods, numBidders, p);\n case \"Elitist\":\n return SingletonMarketFactory.elitistRewardSingletonRandomMarket(numGoods, numBidders, p);\n default:\n throw new Exception(\"Unknown distribution: \" + distribution);\n }\n }", "Shipment createShipment();", "public void createG1(String eq){\n graph1 = false;\n Equation e1 = new Equation(eq);\n q1 = new XYPoints(e1, range);\n createCP(range);\n executeGraphs();\n updateGraph(q1);\n graph1 = true;\n }", "public static Unit siege(){\n\t\tUnit unit = new Unit(\"Siege\", \"C_W_Siege\", 15, 5, 12, 14, 4);\n\t\tunit.addWep(new Weapon(\"Warhammer\",10,5));\n\t\tunit.addActive(ActiveType.SLAM);\n\t\tunit.addActive(ActiveType.POWER);\n\t\tunit.addPassive(PassiveType.ALERT);\n\t\treturn unit;\n\t}", "GoalSpecification createGoalSpecification();", "public Garage() {\n\t\tid = generateId();\n\t}", "public int getpopulation() {\n return population;\n }", "public Sandwich getSandwich(){\n return new Sandwich();\n }", "Stone create();" ]
[ "0.6127338", "0.5971105", "0.58620024", "0.5844841", "0.5815146", "0.5720398", "0.56773806", "0.56092864", "0.5582343", "0.55551285", "0.55232745", "0.55064577", "0.5383884", "0.529601", "0.52950156", "0.52862626", "0.5267721", "0.5229795", "0.52194875", "0.51982415", "0.51543045", "0.51365435", "0.5133177", "0.5118827", "0.5099486", "0.5081487", "0.5071912", "0.5071213", "0.50576484", "0.5056876", "0.5033222", "0.50056577", "0.5002632", "0.499669", "0.49962217", "0.49916786", "0.4984385", "0.4984057", "0.49823114", "0.4979278", "0.4965949", "0.49611127", "0.49571514", "0.49549016", "0.49547172", "0.49458855", "0.49415925", "0.49415925", "0.49389604", "0.4937813", "0.49221903", "0.4908057", "0.49051413", "0.4904908", "0.49007162", "0.48923925", "0.48858678", "0.48833728", "0.4880804", "0.48801178", "0.48714244", "0.4871094", "0.4867225", "0.48648688", "0.48569074", "0.48569074", "0.4856263", "0.48414752", "0.48411053", "0.48382026", "0.4837567", "0.482841", "0.48256457", "0.48216686", "0.48205754", "0.48126033", "0.4809981", "0.4807871", "0.4807829", "0.4799851", "0.47980335", "0.47974774", "0.47967267", "0.47940397", "0.47913942", "0.47910783", "0.4773215", "0.47719955", "0.47683513", "0.4766441", "0.47547448", "0.47517288", "0.47475404", "0.47468525", "0.47462547", "0.4745677", "0.47451222", "0.47448653", "0.47435495", "0.47431403" ]
0.58027774
5
Method overloaded to create Multi Population.
public Population InitSinglePopulation (int PopulationID, int NumberOfAgents, double MixedStrategy){ MultiPopulation TempPopulation = new MultiPopulation(); TempPopulation.setPopulationID(PopulationID); TempPopulation.setInitMixedStrategy(MixedStrategy); for(int j = 0; j < NumberOfAgents; j++){ double TempDraw = rand.nextDouble(); boolean TempAction = (TempDraw < MixedStrategy) ? true : false; MultiPopulationAgent TempAgentM = new MultiPopulationAgent(j,PopulationID,TempAction); TempPopulation.AgentList.add(TempAgentM); } TempPopulation.setActionList(); return TempPopulation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Population(int indivCount) {\n this.indivCount = indivCount;\n layers = new ArrayList<>();\n individuals = new Individual[indivCount];\n }", "Multi createMulti();", "protected Population(Infrastructure infra)\n\t\t{\tinds = new Individual[NUMBER_INDIVIDUALS];\n\t\t\tfor(int i=0;i<NUMBER_INDIVIDUALS;i++)\n\t\t\t\tinds[i] = new Individual(infra);\n\t\t\tthis_ind = 0;\n\t\t\tthis_gen = 0;\n\t\t}", "public interface Population {\n public List<Individual> selectRandomIndividuals(int n, boolean withReplacement);\n\n public void evaluateFitnesses();\n\n public Individual crossoverOnePoint(Individual a, Individual b);\n\n public Individual crossoverTwoPoint(Individual a, Individual b);\n\n public Individual crossoverUniform(Individual a, Individual b);\n\n public void evolveMuLambda(int numParents, int numChildren, double mean, double variance);\n\n public void evolveMuPlusLambda(int numParents, int numChildren, double mean, double mutationRate);\n\n public void evolveGeneticAlgorithm();\n\n public void saveIndividualsAsPlayersInDb();\n\n public void addListener(EvolutionCompleteListener listener);\n\n}", "public void generatePopulation() {\n\t\t\n\t\tif (SCType.getScLayers() <= 2)\n\t\t\tLogger.logError(\"To few supply chain layers, minimum of 3 required:\" + SCType.getScLayers());\n\t\t\n\t\tArrayList<CountryAgent> countryAgents = SU.getObjectsAll(CountryAgent.class);\t\t\n\t\tfor (CountryAgent country : countryAgents) {\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.PRODUCER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_PRODUCERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.PRODUCER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.INTERNATIONAL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_INTERNATIONALS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.INTERNATIONAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.WHOLESALER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_WHOLESALERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.WHOLESALER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.RETAIL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_RETAILERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.RETAIL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.CONSUMER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_CONSUMERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.CONSUMER);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set possible new suppliers and clients\n\t\tfor (BaseAgent agent : SU.getObjectsAll(BaseAgent.class)) {\n\t\t\tagent.setPossibleNewSuppliersAndClients();\n\t\t}\n\t\t\n\t\tSU.getDataCollector().addAllCurrentStock();\n\t}", "public Population(int popSize, String[] studet_ids, int groupSize, \r\n\t\t int initPop, int selMethod, int selPara, \r\n\t\t int crossMethod, double crossPara, int mutMethod,\r\n\t\t double mutPara, int replaceMethod, int replacePara,\r\n\t\t double powerStep, double tourStep, FitnessFunction fitnessFunction)\r\n {\r\n\tthis(selMethod, selPara, crossMethod, crossPara, mutMethod, mutPara, \r\n\t replaceMethod, replacePara, powerStep, tourStep, fitnessFunction);\r\n\r\n\tchromos = new ArrayList<Chromosome>();\r\n\tfor(int i = 0; i < popSize; i++)\r\n\t chromos.add(new Chromosome(studet_ids, groupSize, crossMethod,\r\n\t\t\t\t crossPara, mutMethod, mutPara, initPop, ff));\r\n\tinitialize();\r\n }", "public static void generatePopulation() {\n population = setupArray(POP_SIZE, NUM_RULES, GENE_SIZE, COND_LEN);\n\n for (Individual individual : population) {\n for (int i = 0; i < individual.getGene().length; i++) {\n individual.gene[i] = bits.get(new Random().nextInt(2));\n }\n individual.generateRulebase();\n }\n }", "public ArrayList<Population> InitializePopulations (int NumberOfPopulations, int NumberOfAgents){\n \n ArrayList<Population> PopulationsList = new ArrayList();\n \n if(NumberOfPopulations == 1){\n \n PopulationsList.add(InitSinglePopulation(NumberOfAgents));\n \n }else{\n \n for(int i = 0; i < NumberOfPopulations; i++){ \n double temp = rand.nextDouble();\n PopulationsList.add(InitSinglePopulation(i, NumberOfAgents, temp));\n }\n \n }\n \n \n return PopulationsList;\n }", "public Population InitSinglePopulation(int NumberOfAgents) {\n \n SinglePopulation TempPopulation = new SinglePopulation();\n \n TempPopulation.setPopulationID(0);\n\n for(int j = 0; j < NumberOfAgents; j++){\n\n SinglePopulationAgent TempAgentS = new SinglePopulationAgent(j,rand.nextDouble());\n boolean InitAction = (rand.nextDouble() < TempAgentS.getStrategy()) ? true : false;\n TempAgentS.setAction(InitAction);\n \n TempPopulation.AgentList.add(TempAgentS);\n }\n \n TempPopulation.setStrategyList();\n TempPopulation.setActionList();\n return TempPopulation;\n }", "public Population(int size, ArrayList<Individual> KIS){\n this.size = size;\n this.individuals = KIS;\n }", "public abstract List<Double> updatePopulations();", "public Population(ArrayList<Chromosome> c, int selMethod, int selPara, \r\n\t\t int crossMethod, double crossPara, int mutMethod,\r\n\t\t double mutPara, int replaceMethod, int replacePara,\r\n\t\t double powerStep, double tourStep, FitnessFunction fitnessFunction)\r\n {\r\n\tthis(selMethod, selPara, crossMethod, crossPara, mutMethod, mutPara, \r\n\t replaceMethod, replacePara, powerStep, tourStep, fitnessFunction);\r\n\r\n\tchromos = c;\r\n\r\n\tinitialize();\r\n }", "public void genPopulation(int howMany)\r\n/* 30: */ {\r\n/* 31:54 */ this.pop.removeAllElements();\r\n/* 32:55 */ for (int i = 0; i < howMany; i++)\r\n/* 33: */ {\r\n/* 34:61 */ int[] clusterV = g.genRandomClusterSize();\r\n/* 35:62 */ Cluster c = new Cluster(g, clusterV);\r\n/* 36:63 */ this.pop.addElement(c);\r\n/* 37: */ }\r\n/* 38: */ }", "Multiply createMultiply();", "Multiplication createRandomMultiplication();", "Multiplication createRandomMultiplication();", "public void setPoputlation (double population) { n.setPopulation(population); }", "GuppySet(int numberOfGuppies, int minAge, int maxAge,\n double minHealthCoefficient, double maxHealthCoefficient) {\n this.numberOfGuppies = numberOfGuppies;\n this.minAge = minAge;\n this.maxAge = maxAge;\n this.minHealthCoefficient = minHealthCoefficient;\n this.maxHealthCoefficient = maxHealthCoefficient;\n }", "Population<T> operate(Population<T> population);", "public interface Population {\n\n /**\n * Add the specified chromosome to the population.\n * If the size of the population has reached to maxSize, eviction is done\n * removing chromosomes with the worst fitness\n * @param chromosome\n */\n void addChromosome(@NotNull final Chromosome chromosome);\n\n /**\n * Return a random chromosome\n * @return\n */\n Chromosome getRandom();\n\n\n /**\n * Return a random chromosome among the first limit fittest chromosomes\n * @param limit Nth fittest chromosome\n * @return\n */\n Chromosome getRandomAmongFittest(int limit);\n\n /**\n * Remove the specified chromosome from the population\n * @param chromosome\n */\n boolean removeChromosome(@NotNull final Chromosome chromosome);\n\n /**\n * Return the fittest chromosome\n * @return\n */\n Chromosome fittestChromosome();\n\n /**\n * Number of chromosome in the population\n * @return\n */\n int size();\n\n /**\n * Return the hits of each chromosomes\n * @return\n */\n Map<String, Long> hits();\n}", "public IntegerGenotype create() \r\n\t{\n\t\tIntegerGenotype genotype = new IntegerGenotype(1,3);\r\n\t\tgenotype.init(new Random(), Data.numeroCuardillas); \r\n\t\t\r\n\t\treturn genotype;\r\n\t}", "public DiceProductInterface product(DiceProductInterface multiplicand);", "public void generateGenes() {\n\t\tfor(int i = 0; i < geneNumber; i++){\n\t\t\tdouble[] vector = new double[NUM_HEURISTICS];\n\t\t\tfor(int j = 0; j < NUM_HEURISTICS; j++){\n\t\t\t\t// To get a number in [-0.5, 0.5)\n\t\t\t\tvector[j] = Math.random() - 0.5;\n\t\t\t}\n\t\t\tGene newGene = new Gene(vector, true);\n\t\t\tgenepool.add(newGene);\n\t\t}\n\t}", "public Population(int nVillages){\r\n\t\tthis.nFlocks = 0;\r\n\t\tthis.nVillages = nVillages;\r\n\t\tthis.vVillages = new Village[nVillages];\r\n\t\tfor(int i = 0; i < nVillages; i++){\r\n\t\t\tthis.vVillages[i] = new Village();\r\n\t\t\tthis.nFlocks += vVillages[i].getnFlocks();\r\n\t\t}\r\n\t\tthis.ndvPool = new Vector<NDInfection>();\r\n\t}", "public MaxAggregator replicate()\r\n {\r\n return new MaxAggregator(getProperty());\r\n }", "public void setPopulation(int population) {\n this.population = population;\n }", "public final void rule__XMultiplicativeExpression__FeatureAssignment_1_0_0_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12396:1: ( ( ( ruleOpMulti ) ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12397:1: ( ( ruleOpMulti ) )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12397:1: ( ( ruleOpMulti ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12398:1: ( ruleOpMulti )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12399:1: ( ruleOpMulti )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12400:1: ruleOpMulti\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementOpMultiParserRuleCall_1_0_0_1_0_1()); \n }\n pushFollow(FOLLOW_ruleOpMulti_in_rule__XMultiplicativeExpression__FeatureAssignment_1_0_0_124876);\n ruleOpMulti();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementOpMultiParserRuleCall_1_0_0_1_0_1()); \n }\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public Population evolve()\r\n {\r\n\tArrayList<Chromosome> tempPop = \r\n\t new ArrayList<Chromosome>(chromos.size());\r\n\tChromosome u;\r\n\tChromosome v;\r\n\r\n\tfor(int i = 0; i < chromos.size()/2; i++)\r\n\t {\r\n\t\tu = selectParent();\r\n\t\tv = selectParent();\r\n\t\t\r\n\t\t//System.out.println(\"*****Parent 1 : \\n\" + v);\r\n\t\t\r\n Chromosome c1 = u.child(v);\r\n Chromosome c2 = v.child(u);\r\n\t\ttempPop.add(c1);\r\n\t\ttempPop.add(c2);\r\n\t\t\r\n //System.out.println(\"****Generated new child: \\n\" + c1);\r\n\t }\t \r\n\t\r\n\t// if needed, add in the code for keeping the best chromosome\r\n\tPopulation pop = new Population(tempPop, selMethod, selPara, \r\n\t\t\t\t\tcrossMethod, crossPara, mutMethod, mutPara, \r\n\t\t\t\t\treplaceMethod, replacePara, powerStep, tourStep, ff);\r\n\r\n\tif(replaceMethod == ELITISM)\r\n\t {\r\n\t\tpop.remove(worstChromoIndex);\r\n\t\tpop.add(bestChromo.clone());\r\n\t\tpop.initialize();\r\n\t }\r\n\r\n\tgeneration++;\r\n\treturn pop;\r\n }", "public static Population evolvePopulation(Population pop) {\n Population newPopulation = new Population(pop.populationSize(), false);\n\n // Keep our best individual if elitism is enabled\n int elitismOffset = 0;\n if (elitism) {\n newPopulation.saveTour(0, pop.getFittest());\n elitismOffset = 1;\n }\n\n // Crossover population\n // Loop over the new population's size and create individuals from\n // Current population\n for (int i = elitismOffset; i < newPopulation.populationSize(); i++) {\n // Select parents\n // Tour parent1 = tournamentSelection(pop);\n //Tour parent2 = tournamentSelection(pop);\n\n\n\n\n Tour[] temp_a = roullet( newPopulation);\n if( temp_a == null )\n {\n System.out.println(\"no a\");\n //r//eturn temp;\n }\n // Tour parent1 = tournamentSelection(pop);\n //Tour parent2 = tournamentSelection(pop);\n Tour parent1 = temp_a[0];\n Tour parent2 = temp_a[1];\n\n\n\n\n\n\n\n\n // Crossover parents\n Tour child = crossover(parent1, parent2);\n // Add child to new population\n newPopulation.saveTour(i, child);\n }\n\n // Mutate the new population a bit to add some new genetic material\n for (int i = elitismOffset; i < newPopulation.populationSize(); i++) {\n mutate(newPopulation.getTour(i));\n }\n\n return newPopulation;\n }", "public interface PopulationInitialiser {\n\t/**\n\t * this generates an initial solution population from which to start optimisation\n\t *\n\t * @param cities the set of cities which are part of each solution\n\t * @param populationSize the number of solutions to be included in a population\n\t */\n\tSolutionPopulation initialise(ArrayList<City> cities, int populationSize);\n}", "public static double multi() {\n System.out.println(\"Enter multiplier\");\n double a = getNumber();\n System.out.println(\"Enter multiplicand\");\n double b = getNumber();\n\n return a * b;\n }", "public void setPopulationSize(int m){\n\t\tsetParameters(m, type1Size, sampleSize);\n\t}", "public void initPop(int num) {\n\t\tif (num % 2 == 1) {\n\t\t\tnum -= 1;\n\t\t}\n\t\tthis.individuals = new AI[num];\n\t\tfor (int i = 0; i < num; i++)\n\t\t\tthis.individuals[i] = new AI();\n\t}", "private static void extractIpuPopulation(final String propertiesFilePath) throws Exception {\n\t\tProperties populationExtractorProperties = GenstarService.loadPropertyFile(propertiesFilePath);\n\t\t\n\t\t\n\t\t// 1. Generate the population\n\t\tIPopulation extractedPopulation = GenstarService.extractIpuPopulation(populationExtractorProperties);\n\n\t\t\n\t\t// 2. Print population information\n\t\tSystem.out.println(\"Information of the extracted population\");\n\t\tSystem.out.println(\"Group population name: \" + extractedPopulation.getName());\n\t\tSystem.out.println(\"Number of group entities: \" + extractedPopulation.getNbOfEntities());\n\t\tSystem.out.println(\"Extracted percent: \" + populationExtractorProperties.getProperty(PROPERTY_FILES.EXTRACT_IPF_POPULATION_PROPERTIES.PERCENTAGE_PROPERTY));\n\t\t\n\t\tList<AbstractAttribute> attributes = extractedPopulation.getAttributes();\n\t\tSystem.out.println(\"Number of group attributes: \" + attributes.size());\n\t\tfor (AbstractAttribute attr : attributes) { System.out.println(\"\\t\" + attr.toString()); }\n\t\t\n\t\tString componentPopulationName = null;\n\t\tint totalNumberOfExtractedComponentEntities = 0;\n\t\tList<Entity> groupEntities = extractedPopulation.getEntities();\n\t\tfor (Entity gEntity : groupEntities) {\n\t\t\tfor (IPopulation componentPop : gEntity.getComponentPopulations()) { \n\t\t\t\ttotalNumberOfExtractedComponentEntities += componentPop.getNbOfEntities();\n\t\t\t\tif (componentPopulationName == null) { componentPopulationName = componentPop.getName(); }\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Component population name: \" + componentPopulationName);\n\t\tSystem.out.println(\"Total number of component entities: \" + totalNumberOfExtractedComponentEntities + \"\\n\");\n\t}", "public void setPopulation(int population) {\n\n this.population = population;\n }", "private void generateData(int popsize, int ntrials) {\n data = new double[ntrials][100];\n \n for (int i = 0; i < ntrials; i++) {\n Population pop = new Population(popsize, rand);\n for (int j = 0; j < 100; j++) {\n data[i][j] = pop.totalA();\n pop.advance();\n }\n }\n }", "public PopulationGrowth() {\n initComponents();\n }", "public static Population simpleAndParallel(UnchangedInfo info, Rectangle rect) {\n\t\tint size = info.size;\n\t\tPopulation population = fjPool.invoke(new GetPopulation(info, rect, 0, size));\n\t\treturn population;\n\t}", "public Population mutatePopulation(Population population, List<FogDevice> fogDevices, List<? extends Cloudlet> cloudletList) {\n\n // Loop over current population by fitness\n for (int populationIndex = 1; populationIndex < population.size(); populationIndex++) {\n // if the current individual is selected to mutation phase\n if (this.mutationRate > Math.random()) {\n Individual individual = population.getFittest(populationIndex);\n individual = this.mutateIndividual(individual);\n }\n }\n // Return mutated population\n return population;\n }", "public void createSelectedPopulation(Population previousPopulation, int populationSize, double perc) {\n\t\t\n\t\tint intendedSize = (int)(populationSize * perc/100);\n\t\tSystem.out.println(\"intended size: \" + intendedSize ) ;\n\t\tint currentSize = 0;\n\t\tint randomPopulationSize;\n\t\tSolution mutant;\n\t\tList<ArrayList<String>> added = new ArrayList<ArrayList<String>>();\n\n\t\t\n\t\t//copy solutions from the previous population until the cloning factor is bigger than 1\n\t\tfor(Solution solution : previousPopulation.getPopulation()) {\n\t\t\tif(solution.getCloningFactor() < 1.0) break;\n\t\t\t\n\t\t\t//add as many clones of the current solution\n\t\t\t//as indicates the cloning factor\n\t\t\t//eg. if cloning factor is 2 -> 3 copies of this solution will go to the next population\n\t\t\tfor(int i = 0; i <= (int) solution.getCloningFactor(); i++) {\n\t\t\t\t//if we get a complete population by cloning the solution from the previous population\n\t\t\t\t//leave the method\n\t\t\t\tif(currentSize == intendedSize) break;\n\t\t\t\t\n\t\t\t\t//we create a mutation of each clone\n\t\t\t\t//if mutation is less efficient or already exists in the population we discard it\n\t\t\t\tmutant = new Solution(solution.getFrequencyRelations(), solution.getCabinets());\n\t\t\t\tArrayList<String> mutantSol = solution.mutate();\n\t\t\t\tmutant.setPossibleSolution(mutantSol);\n\t\t\t\tmutant.setPath(mutant.countPath(mutant.getPossibleSolution()));\n\t\t\t\t\n\t\t\t\t//System.out.println(\"M: \" + mutantSol + \" \" + mutant.getPath() );\n\t\t\t//\tSystem.out.println(\"S: \" + solution.getPossibleSolution() + \" \" + solution.getPath() );\n\n\n\t\t\t\tif(mutant.getPath() >= solution.getPath() || added.contains(mutant.getPossibleSolution()) ) {\n\t\t\t\t\tpopulation.add(solution);\n\t\t\t\t\tadded.add(solution.getPossibleSolution());\n\t\t\t\t\t//System.out.println(\"original\");\n\t\t\t\t}else {\n\t\t\t\t\tpopulation.add(mutant);\n\t\t\t\t\tadded.add(mutant.getPossibleSolution());\n\t\t\t\t\t//System.out.println(\"mutant\");\n\t\t\t\t}\n\t\t\t\n\t\t\t\tcurrentSize++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//count the number of random solutions that should be added\n\t\tif(currentSize <= populationSize) {\n\t\t\t randomPopulationSize = populationSize - currentSize;\n\t\t}else return;\n\t\t\n\t\t//create random solutions and add them to the population \n\t\t//until the wished size is reached\n\t\tcreateRandomPopulation(previousPopulation.getCabinetArrangement(), randomPopulationSize);\n\t\t\t\n\t}", "private void setUpGroupBy(){\n\t\tEPPropiedad pro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p2\");\n\t\tpro.setPseudonombre(\"\");\n\t\texpresionesGroupBy.add(pro);\n\t\tpro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p3\");\n\t\tpro.setPseudonombre(\"\");\n\t\texpresionesGroupBy.add(pro);\n\t}", "public final void rule__XMultiplicativeExpression__FeatureAssignment_1_0_0_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:17664:1: ( ( ( ruleOpMulti ) ) )\r\n // InternalDroneScript.g:17665:2: ( ( ruleOpMulti ) )\r\n {\r\n // InternalDroneScript.g:17665:2: ( ( ruleOpMulti ) )\r\n // InternalDroneScript.g:17666:3: ( ruleOpMulti )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0()); \r\n }\r\n // InternalDroneScript.g:17667:3: ( ruleOpMulti )\r\n // InternalDroneScript.g:17668:4: ruleOpMulti\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementOpMultiParserRuleCall_1_0_0_1_0_1()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleOpMulti();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementOpMultiParserRuleCall_1_0_0_1_0_1()); \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public double getPopulation () { return n.getPopulation(); }", "public void reproduce(){\n\t\t// sort the population from strongest to weakest\n\t\tCollections.sort(population);\n\t\tCollections.reverse(population);\n\t\t\n\t\tfor(int i = 0; i < (int)(POPULATION_SIZE*POPULATION_ACTION_PERCENT); i+=2){\n\t\t\t\n\t\t\t// get two random indexes for reproduction based on the exponential function\n\t\t\t// (1/1000) * (randInt)^2 = index\n\t\t\t// this function favors sequences with higher fitness scores\n\t\t\tint randIndex1 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\tint randIndex2 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\t\n\t\t\trandIndex1 = (int) (Math.pow(randIndex1, 2) / 1000);\n\t\t\trandIndex2 = (int) (Math.pow(randIndex2, 2) / 1000);\n\t\t\t\n\t\t\t// get two pieces\n\t\t\tBuildingPiece[] array1 = population.get(randIndex1).getList();\n\t\t\tBuildingPiece[] array2 = population.get(randIndex2).getList();\n\t\t\t\n\t\t\t// find a splicing point\n\t\t\tint splicePoint = findSplicingPoint(array1, array2);\n\t\t\t\n\t\t\t// generate two new arrays based on the splicing point\n\t\t\tBuildingPiece[] newArray1 = generateNewArray(array1, array2, splicePoint);\n\t\t\tBuildingPiece[] newArray2 = generateNewArray(array2, array1, splicePoint);\n\t\t\t\n\t\t\t// make new buildings with the new arrays\n\t\t\tBuilding bp1 = new Building(newArray1, generation, possiblePieces);\n\t\t\tBuilding bp2 = new Building(newArray2, generation, possiblePieces);\n\t\t\t\n\t\t\t// mutate the new building sequences\n\t\t\tmutateArray(bp1);\n\t\t\tmutateArray(bp2);\n\t\t\t\n\t\t\t// add them into the population\n\t\t\tpopulation.add(randIndex1, bp1);\n\t\t\tpopulation.add(randIndex2, bp2);\n\t\t}\n\t}", "private static List<Gene> getGenePool() {\n List<Gene> list = new ArrayList<>();\n\n Item item1 = new Item();\n item1.setName(\"Swiss Army Knife\");\n item1.setWeight(0.08125);\n item1.setVal(15);\n Gene gene1 = new Gene(item1);\n\n Item item2 = new Item();\n item2.setName(\"Duct Tape\");\n item2.setWeight(1.3);\n item2.setVal(3);\n Gene gene2 = new Gene(item2);\n\n Item item3 = new Item();\n item3.setName(\"Rope (50 feet)\");\n item3.setWeight(7);\n item3.setVal(10);\n Gene gene3 = new Gene(item3);\n\n Item item4 = new Item();\n item4.setName(\"Satellite phone\");\n item4.setWeight(2);\n item4.setVal(8);\n Gene gene4 = new Gene(item4);\n\n Item item5 = new Item();\n item5.setName(\"Elmer's Glue\");\n item5.setWeight(0.25);\n item5.setVal(2);\n Gene gene5 = new Gene(item5);\n\n Item item6 = new Item();\n item6.setName(\"Toilet Paper Roll\");\n item6.setWeight(.5);\n item6.setVal(4);\n Gene gene6 = new Gene(item6);\n\n Item item7 = new Item();\n item7.setName(\"Binoculars\");\n item7.setWeight(3);\n item7.setVal(5);\n Gene gene7 = new Gene(item7);\n\n Item item8 = new Item();\n item8.setName(\"Compass\");\n item8.setWeight(0.0573202);\n item8.setVal(15);\n Gene gene8 = new Gene(item8);\n\n Item item9 = new Item();\n item9.setName(\"Jug (pre-filled with water)\");\n item9.setWeight(4);\n item9.setVal(6);\n Gene gene9 = new Gene(item9);\n\n Item item10 = new Item();\n item10.setName(\"Flashlight\");\n item10.setWeight(2);\n item10.setVal(4);\n Gene gene10 = new Gene(item10);\n\n Item item11 = new Item();\n item11.setName(\"Box of paper clips\");\n item11.setWeight(.9);\n item11.setVal(2);\n Gene gene11 = new Gene(item11);\n\n Item item12 = new Item();\n item12.setName(\"Gloves (1 pair)\");\n item12.setWeight(.8125);\n item12.setVal(3);\n Gene gene12 = new Gene(item12);\n\n Item item13 = new Item();\n item13.setName(\"Scissors\");\n item13.setWeight(0.2);\n item13.setVal(2);\n Gene gene13 = new Gene(item13);\n\n Item item14 = new Item();\n item14.setName(\"Signal Flair (4pk)\");\n item14.setWeight(4);\n item14.setVal(5);\n Gene gene14 = new Gene(item14);\n\n Item item15 = new Item();\n item15.setName(\"Water Purifying System\");\n item15.setWeight(0.5125);\n item15.setVal(4);\n Gene gene15 = new Gene(item15);\n\n Item item16 = new Item();\n item16.setName(\"Whistle\");\n item16.setWeight(0.075);\n item16.setVal(2);\n Gene gene16 = new Gene(item16);\n\n Item item17 = new Item();\n item17.setName(\"Sleeping Bag\");\n item17.setWeight(0.38125);\n item17.setVal(4);\n Gene gene17 = new Gene(item17);\n\n Item item18 = new Item();\n item18.setName(\"Insect Repellent\");\n item18.setWeight(1.15);\n item18.setVal(3);\n Gene gene18 = new Gene(item18);\n\n Item item19 = new Item();\n item19.setName(\"Trowel\");\n item19.setWeight(0.31875);\n item19.setVal(3);\n Gene gene19 = new Gene(item19);\n\n Item item20 = new Item();\n item20.setName(\"Lighter\");\n item20.setWeight(.2);\n item20.setVal(4);\n Gene gene20 = new Gene(item20);\n\n Item item21 = new Item();\n item21.setName(\"Safety Horn\");\n item21.setWeight(.21);\n item21.setVal(3);\n Gene gene21 = new Gene(item21);\n\n Item item22 = new Item();\n item22.setName(\"Headlamp\");\n item22.setWeight(.8);\n item22.setVal(4);\n Gene gene22 = new Gene(item22);\n\n Item item23 = new Item();\n item23.setName(\"Freeze Dried Food Kit\");\n item23.setWeight(2);\n item23.setVal(6);\n Gene gene23 = new Gene(item23);\n\n Item item24 = new Item();\n item24.setName(\"Sunscreen\");\n item24.setWeight(.5);\n item24.setVal(4);\n Gene gene24 = new Gene(item24);\n\n Item item25 = new Item();\n item25.setName(\"Trekking Pole (Adjustable)\");\n item25.setWeight(1.3);\n item25.setVal(4);\n Gene gene25 = new Gene(item25);\n\n Item item26 = new Item();\n item26.setName(\"Counter Assault Bear Spray\");\n item26.setWeight(.5);\n item26.setVal(4);\n Gene gene26 = new Gene(item26);\n\n Item item27 = new Item();\n item27.setName(\"Insect Spray\");\n item27.setWeight(.5);\n item27.setVal(3);\n Gene gene27 = new Gene(item27);\n\n Item item28 = new Item();\n item28.setName(\"Hand sanitizer\");\n item28.setWeight(.625);\n item28.setVal(3);\n Gene gene28 = new Gene(item28);\n\n Item item29 = new Item();\n item29.setName(\"Mirror\");\n item29.setWeight(.5);\n item29.setVal(3);\n Gene gene29 = new Gene(item29);\n\n Item item30 = new Item();\n item30.setName(\"First Aid Kit\");\n item30.setWeight(3);\n item30.setVal(6);\n Gene gene30 = new Gene(item30);\n\n list.add(gene1);\n list.add(gene2);\n list.add(gene3);\n list.add(gene4);\n list.add(gene5);\n list.add(gene6);\n list.add(gene7);\n list.add(gene8);\n list.add(gene9);\n list.add(gene10);\n list.add(gene11);\n list.add(gene12);\n list.add(gene13);\n list.add(gene14);\n list.add(gene15);\n list.add(gene16);\n list.add(gene17);\n list.add(gene18);\n list.add(gene19);\n list.add(gene20);\n list.add(gene21);\n list.add(gene22);\n list.add(gene23);\n list.add(gene24);\n list.add(gene25);\n list.add(gene26);\n list.add(gene27);\n list.add(gene28);\n list.add(gene29);\n list.add(gene30);\n\n return list;\n }", "public final void rule__XMultiplicativeExpression__FeatureAssignment_1_0_0_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17641:1: ( ( ( ruleOpMulti ) ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17642:1: ( ( ruleOpMulti ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17642:1: ( ( ruleOpMulti ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17643:1: ( ruleOpMulti )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17644:1: ( ruleOpMulti )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17645:1: ruleOpMulti\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementOpMultiParserRuleCall_1_0_0_1_0_1()); \r\n }\r\n pushFollow(FOLLOW_ruleOpMulti_in_rule__XMultiplicativeExpression__FeatureAssignment_1_0_0_135628);\r\n ruleOpMulti();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementOpMultiParserRuleCall_1_0_0_1_0_1()); \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "private static Pool setUpPool(String name, double volume, double temp,\n double pH, double nutrientCoefficient, GuppySet startingGuppies) {\n Pool pool = new Pool(name, volume, temp, pH, nutrientCoefficient);\n\n pool.addFish(startingGuppies.generateGuppies());\n\n return pool;\n }", "public int produce(int min, int max, int start, int subpopulation, Individual[] inds, ec.EvolutionState state, int thread)\n/* */ {\n/* 27 */ int n = this.sources[0].produce(min, max, start, subpopulation, inds, state, thread);\n/* */ \n/* */ \n/* */ \n/* 31 */ if (!state.random[thread].nextBoolean(this.likelihood)) {\n/* 32 */ return reproduce(n, start, subpopulation, inds, state, thread, false);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 38 */ if (!(this.sources[0] instanceof ec.BreedingPipeline)) {\n/* 39 */ for (int q = start; q < n + start; q++) {\n/* 40 */ inds[q] = ((Individual)inds[q].clone());\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 48 */ if (!(inds[start] instanceof TestCaseCandidate))\n/* 49 */ state.output.fatal(\"OurMutatorPipeline didn't get an Chromosome.The offending individual is in subpopulation \" + \n/* 50 */ subpopulation + \" and it's:\" + inds[start]);\n/* 51 */ ChromosomeSpecies species = (ChromosomeSpecies)inds[start].species;\n/* */ \n/* */ \n/* */ \n/* 55 */ for (int q = start; q < n + start; q++)\n/* */ {\n/* 57 */ TestCaseCandidate i = (TestCaseCandidate)inds[q];\n/* 58 */ double mutp = 1.0D / i.getGenes().size();\n/* */ \n/* 60 */ double[] propa = new double[i.getGenes().size()];\n/* 61 */ for (int x = 0; x < i.getGenes().size(); x++)\n/* 62 */ propa[x] = mutp;\n/* 63 */ for (int x = 0; x < i.getGenes().size(); x++) {\n/* 64 */ if (state.random[thread].nextBoolean(propa[x]))\n/* */ {\n/* */ \n/* 67 */ ((csbst.generators.AbsractGenerator)i.getGenes().get(x)).mutate();\n/* */ }\n/* */ }\n/* */ \n/* 71 */ i.evaluated = false;\n/* */ }\n/* */ \n/* 74 */ return n;\n/* */ }", "@Override\n\tpublic void ispisiPopulaciju(IVector[] populacija) {\n\n\t}", "public void generatePopulation(String filePathAndName) {\n\t\t\n\t\tList<String> dataAll = SU.readFile(filePathAndName);\n\t\tList<String> dataAgents = new ArrayList<String>();\n\t\tList<String> dataStock = new ArrayList<String>();\n\t\tList<String> dataRelations = new ArrayList<String>();\n\t\t\n\t\tint typeOfData = -1;\n\t\tfor (String datum : dataAll) {\n\t\t\tif (!datum.startsWith(\"%\")) {\n\t\t\t\tswitch(typeOfData) {\n\t\t\t\tcase 0:\tdataAgents.add(datum); break;\n\t\t\t\tcase 1: dataStock.add(datum); break;\n\t\t\t\tcase 2: dataRelations.add(datum); break;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttypeOfData = Integer.parseInt(datum.substring(1,2));\n\t\t\t}\n\t\t}\n\t\t\n\t\tgenerateAgents(dataAgents);\n\t\tgenerateStock(dataStock);\n\t\tgenerateRelations(dataRelations);\n\t\t\n\t\tSU.getDataCollector().addAllCurrentStock();\n\t}", "public void initialiseNewRandomPopulation(Random rnd) {\n\t\tthis.population = new ArrayList<Individual>();\n\t\tfor (int i = 0; i < this.popSize; i++) {\t\t\t\t\t//FOR ALL DESIRED POPULATION SIZE\n\t\t\tdouble[] randomValues = new double[DIMENSIONS];\t\t\t//INITIATE RANDOM X ARRAY WITH CORRECT DIMENSIONS\n\t\t\tfor (int j = 0; j < DIMENSIONS; j++) {\t\t\t\t\t//CREATE RANDOM X VALUES\n\t\t\t\trandomValues[j] = -5 + rnd.nextDouble() * 10;\t\t//ASSIGN VALUES TO EACH POSITION IN ARRAY\n\t\t\t}\n\t\t\tIndividual newInd = new Individual(randomValues);\t\t//CREATE NEW INDIVIDUAL WITH RANDOM X VALUES\n\t\t\tthis.population.add(newInd);\t\t\t\t\t\t\t//ADD INDIVIDUAL TO POPULATION\n\t\t}\n\t}", "@Override\n public TestingSet createTestingSet(int individuals) \n {\n return TestingSet.createSingleTrialForAllIndividuals(individuals);\n }", "public void setPopulation(Integer population) {\n this.population = population;\n }", "public void setpopulation(int population) {\n this.population = population;\n }", "public Guppy() {\n this(DEFAULT_GENUS, DEFAULT_SPECIES, 0, true, 0,\n DEFAULT_HEALTH_COEFFICIENT);\n }", "private void initializePopulation() {\n // reset the population\n population = new ArrayList<Genotype>();\n\n // set the population to an array of random genotypes\n for (int i = 0; i < populationSize; i++) {\n population.add(new Genotype(chromosomeSize));\n }\n\n // evaluate the population\n // evaluatePopulation();\n }", "public void initializePopulation(){\n\t\t// create the population\n\t\tfor(int i = 0; i < POPULATION_SIZE; i++){\n\t\t\t// get a random length for the building sequence\n\t\t\tint randArraySize = randomGenerator.nextInt(possiblePieces.length-1)+1;\n\t\t\t\n\t\t\tBuildingPiece[] pieceSequence = new BuildingPiece[randArraySize];\n\t\t\tfor(int j = 0; j < randArraySize; j++){\n\t\t\t\t// get a random possible piece and insert it into the sequence\n\t\t\t\tint randIndex = randomGenerator.nextInt(possiblePieces.length);\n\t\t\t\tpieceSequence[j] = possiblePieces[randIndex];\n\t\t\t}\n\t\t\t\n\t\t\t/* add a new number sequence with the newly created \n\t\t\t * sequence from the input */\n\t\t\tpopulation.add(new Building(pieceSequence, generation, possiblePieces));\n\t\t}\n\t}", "public ArrayList<Fish> generateGuppies() {\n ArrayList<Fish> generatedFish = new ArrayList<Fish>();\n\n final double femaleProbability = 0.5;\n\n Random generator = new Random();\n\n int ageInWeeks;\n double healthCoefficient;\n double femaleRoll;\n for (int i = 1; i <= numberOfGuppies; i++) {\n ageInWeeks = generator.nextInt(maxAge - minAge) + minAge;\n healthCoefficient = generator.nextDouble()\n * (maxHealthCoefficient - minHealthCoefficient)\n + minHealthCoefficient;\n femaleRoll = generator.nextDouble();\n\n generatedFish.add(new Guppy(\"Poecilia\", \"reticulata\",\n ageInWeeks, femaleRoll < femaleProbability, 0,\n healthCoefficient));\n }\n\n return generatedFish;\n }", "public Genepool(int numGenes) {\n\t\tgeneNumber = numGenes;\n\t\tgenepool = new ArrayList<Gene>();\n\t\toffspringPool = new ArrayList<Gene>();\n\t\tgenerateGenes();\n\t}", "private void genArgRepMutantGen(MethodCallExpr me,Expression ex,int pos){\n\n MethodCallExpr mutantMulti = me.clone();\n BinaryExpr binaryExpr2 = new BinaryExpr(ex,ex, BinaryExpr.Operator.MULTIPLY);\n mutantMulti.setArgument(pos,binaryExpr2);\n outputToFile(me,mutantMulti);\n }", "public void generateOffspringPopulation() throws JMException{\n\n offspringPopulation_ = new SolutionSet[problemSet_.size()];\n\n for (int task = 0; task < problemSet_.size(); task++){\n offspringPopulation_[task] = new SolutionSet(populationSize_);\n if (crossover_.getClass() == SBXCrossover.class){\n Solution[] parents = new Solution[2];\n for (int i = 0; i < (populationSize_); i++) {\n // obtain parents\n parents = (Solution[]) selection_.execute(population_[task]);\n\n Solution[] offSpring = (Solution[]) crossover_\n .execute(parents);\n mutation_.execute(offSpring[0]);\n problemSet_.get(task).evaluate(offSpring[0]);\n problemSet_.get(task).evaluateConstraints(offSpring[0]);\n offspringPopulation_[task].add(offSpring[0]);\n } // for\n }\n else if (crossover_.getClass() == EGG.class){\n\n int[] permutation = new int[populationSize_];\n Utils.randomPermutation(permutation, populationSize_);\n etmo.util.Ranking ranking = new etmo.util.Ranking(population_[task]);\n SolutionSet front = ranking.getSubfront(0);\n\n front.Suppress();\n SolutionSet KP = null;\n if(front.size()> problemSet_.get(task).getNumberOfObjectives())\n KP = findingKneePoint(front, task);\n if(KP == null){\n KP = population_[task];\n }\n\n for (int i = 0; i < (populationSize_); i++) {\n // obtain parents\n int n = permutation[i];\n // STEP 2.1. Mating selection\n int r1,r2;\n r1 = PseudoRandom.randInt(0, KP.size() - 1);\n do {\n r2 = PseudoRandom.randInt(0, KP.size() - 1);\n } while (r2==r1);\n // STEP 2.2. Reproduction\n Solution child;\n Solution[] parents = new Solution[3];\n\n// 加入迁移:\n double tranRand = PseudoRandom.randDouble();\n if (tranRand <= 0.1){\n parents[1] = population_[PseudoRandom.randInt(0, problemSet_.size() - 1)].get(PseudoRandom.randInt(0, populationSize_ - 1));\n parents[2] = population_[PseudoRandom.randInt(0, problemSet_.size() - 1)].get(PseudoRandom.randInt(0, populationSize_ - 1));\n parents[0] = population_[task].get(n);\n child = (Solution) crossover_.execute(parents);\n\n mutation_.execute(child);\n\n problemSet_.get(task).evaluate(child);\n problemSet_.get(task).evaluateConstraints(child);\n offspringPopulation_[task].add(child);\n }\n\n\n\n else {\n parents[1] = KP.get(r1);\n parents[2] = KP.get(r2);\n parents[0] = population_[task].get(n);\n child = (Solution) crossover_.execute(parents);\n\n mutation_.execute(child);\n\n problemSet_.get(task).evaluate(child);\n problemSet_.get(task).evaluateConstraints(child);\n offspringPopulation_[task].add(child);\n }\n\n\n } // for\n }\n\n }\n\n\n\n\n }", "private void crossover() {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < pop_size; i++) { // go through population\r\n\r\n int a = new Random().nextInt(this.pop_size);\r\n int b = new Random().nextInt(this.pop_size);\r\n\r\n int split_point = new Random().nextInt(this.gene_size);\r\n\r\n float[] p1_genes = this.parent_population.getPopulation()[a].getGenes();\r\n float[] p2_genes = this.parent_population.getPopulation()[b].getGenes();\r\n\r\n float[] c1_genes = new float[gene_size];\r\n float[] c2_genes = new float[gene_size];\r\n\r\n for (int j = 0; j < gene_size; j++) {\r\n\r\n if (j < split_point) {\r\n c1_genes[j] = p1_genes[j];\r\n c2_genes[j] = p2_genes[j];\r\n } else {\r\n c2_genes[j] = p1_genes[j];\r\n c1_genes[j] = p2_genes[j];\r\n }\r\n }\r\n individual child1 = new individual(c1_genes, solutions, output);\r\n individual child2 = new individual(c2_genes, solutions, output);\r\n\r\n if (child1.getFitness() > child2.getFitness()) {\r\n temp_pop[i] = child1;\r\n } else {\r\n temp_pop[i] = child2;\r\n }\r\n }\r\n this.offspring_population.setPopulation(temp_pop);\r\n this.offspring_population.update_population();\r\n }", "Aggregator createAggregator(Aggregator aggregator) throws RepoxException;", "Popis getPopis();", "public static void evaluateGroupedProblemForm( EvolutionState state, boolean returnIndividuals,\n DataInputStream dataIn, DataOutputStream dataOut )\n {\n int numInds = -1;\n boolean countVictoriesOnly = false;\n Subpopulation[] subPop = null;\n \n try\n {\n numInds = dataIn.readInt();\n subPop = new Subpopulation[numInds];\n for(int x=0;x<numInds;x++)\n {\n int subPopNum = dataIn.readInt();\n // Here we need to know the subpopulation number so as to create the\n // correct type of subpopulation in order to create the correct type\n // of individual.\n if( state.population == null )\n state.population = new Population();\n if( state.population.subpops == null )\n state.population.subpops = new Subpopulation[subPopNum+1];\n if( state.population.subpops.length <= subPopNum )\n {\n Subpopulation[] temp = state.population.subpops;\n state.population.subpops = new Subpopulation[subPopNum+1];\n System.arraycopy( temp, 0, state.population.subpops, 0, temp.length );\n }\n if( state.population.subpops[subPopNum] == null )\n {\n Parameter param = new Parameter(P_SUBPOP).push(\"\" + subPopNum);\n subPop[x] = \n (Subpopulation)(state.parameters.getInstanceForParameterEq(\n param,null,\n Subpopulation.class));\n // Setup the subpopulation so that it is in a valid state.\n subPop[x].setup(state, param);\n state.population.subpops[subPopNum] = subPop[x];\n }\n else\n subPop[x] = state.population.subpops[subPopNum];\n }\n countVictoriesOnly = dataIn.readBoolean();\n }\n catch (IOException e)\n {\n state.output.fatal(\"Unable to read the subpopulation number from the master:\\n\"+e);\n }\n \n // Read the individuals from the stream\n Individual inds[] = new Individual[numInds];\n boolean updateFitness[] = new boolean[numInds];\n try\n {\n for(int i=0;i<inds.length;++i)\n {\n inds[i] = subPop[i].species.newIndividual( state, dataIn );\n updateFitness[i] = dataIn.readBoolean();\n }\n }\n catch (IOException e)\n {\n state.output.fatal(\"Unable to read individual from master.\");\n }\n \n // Evaluate the individual\n // TODO Check to make sure the real problem is an instance of GroupedProblemForm\n ((GroupedProblemForm)(state.evaluator.p_problem)).evaluate( state, inds, updateFitness, countVictoriesOnly, 0 );\n \n try\n {\n // Return the evaluated individual to the master\n // just write evaluated and fitness\n for(int i=0;i<inds.length;i++)\n {\n dataOut.writeByte(returnIndividuals ? V_INDIVIDUAL : (updateFitness[i] ? V_FITNESS : V_NOTHING));\n if (returnIndividuals)\n {\n inds[i].writeIndividual(state, dataOut);\n }\n else if (updateFitness[i])\n {\n dataOut.writeBoolean(inds[i].evaluated);\n inds[i].fitness.writeFitness(state,dataOut);\n }\n }\n dataOut.flush();\n }\n catch( IOException e ) { state.output.fatal(\"Caught fatal IOException\\n\"+e ); }\n }", "protected Population<T, K> initializePopulation(int size, Class<K> clazz)\n\t\t\tthrows InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {\n\t\tPopulation<T, K> pop = new Population<>(size, fitnessCalc);\n\t\tpop.initialize(clazz);\n\t\treturn pop;\n\t}", "protected void initializePopulation () {\n\t\tfor (int i = 0; i < this.speciesSize; i++) {\n\t\t\tthis.detectors.add(DetectorFactory.makeDetector(this.featuresLength, this.typeBias, this.generalityBias));\n\t\t}\n\t}", "Individual createIndividual();", "private void createGrape(Element temp) {\n Grape grape = new Grape(); //new instance of Objects.Grape\n for(int i = 0; i < temp.getAttributeCount(); i++) { //iterates through all the attributes placed by the user\n Attribute attribute = temp.getAttribute(i); //instantiates a specific attribute (eg. id = \"1\")\n String name = attribute.getQualifiedName(); //takes the attribute name (eg. id)\n String value = attribute.getValue(); //takes the attribute value (eg. \"1\")\n\n switch (name) {\n case(\"id\"):\n grape.setId(value);\n break;\n\n case (\"class\"):\n try {\n grape.setGrapeClass(Class.forName(\"Examples.\"+value)); //creates a new Class based on the attribute's value\n\n } catch (ReflectiveOperationException e) {\n e.printStackTrace();\n\n }\n break;\n\n case (\"scope\"):\n if(value.equals(\"singleton\")) {\n grape.setSingleton(true);\n super.singletonGrapes.put(grape.getId(), null); //create a new instance of the grape and store it in its map\n }\n else\n grape.setSingleton(false);\n\n break;\n\n case (\"init-method\"):\n if (grape.getGrapeClass() != null) {\n Class grapeClass = grape.getGrapeClass();\n try {\n grape.setInitMethod(grapeClass.getMethod(value, null));\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n } else {\n System.err.print(\"Objects.Grape parameters not in correct order. Class should be before methods. \");\n }\n break;\n\n case (\"destroy-method\"):\n if (grape.getGrapeClass() != null) {\n Class grapeClass = grape.getGrapeClass();\n try {\n grape.setDestroyMethod(grapeClass.getMethod(value, null));\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n } else {\n System.err.print(\"Objects.Grape parameters not in correct order. Class should be before methods. \");\n }\n break;\n\n case (\"property\"):\n if (grape.getGrapeClass() != null) {\n if (value.equals(\"type\")) {\n autowired =! autowired;\n grape.setAutowiring(\"type\");\n } else if (value.equals(\"name\")) {\n autowired =! autowired;\n grape.setAutowiring(\"name\");\n } else if (value.equals(\"no\") && autowired) {\n if (searchAndCreateDep(grape)) {\n return;\n }\n }\n } else {\n System.err.print(\"Objects.Grape parameters not in correct order. Class should be before methods. \");\n }\n break;\n\n default:\n System.err.print(\"Invalid parameter \" + name);\n break;\n }\n }\n super.grapes.put(grape.getId(), grape);\n }", "public ArrayList<BehaviorParameterDisplay> formatDataForDisplay(TreePopulation oPop) {\n\n ArrayList<ModelData> p_oSingles = new ArrayList<ModelData>(); //single data objects\n ArrayList<ArrayList<SpeciesSpecific>> p_oSpeciesSpecific = new ArrayList<ArrayList<SpeciesSpecific>>(); //SpeciesSpecific objects - vector of vectors\n //grouped by what species they apply to\n ModelEnum oEnum;\n\n boolean[] p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n int i;\n boolean bAny;\n\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = true;\n }\n addDataObjectToDisplayArrays(mp_fDiam10ToDbhSlope, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fDiam10ToDbhIntercept, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n\n //------------------------------------------\n //Adult height-diameter function - standard\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatAdultHDFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatAdultHDFunction.getValue().get(i);\n if (oEnum.getValue() == 0) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fMaxCanopyHeight, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fSlopeOfAsymptoticHeight, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Adult height-diameter function - linear\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatAdultHDFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatAdultHDFunction.getValue().get(i);\n if (oEnum.getValue() == 1) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fMaxCanopyHeight, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fAdultLinearSlope, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fAdultLinearIntercept, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Adult height-diameter function - reverse linear\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatAdultHDFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatAdultHDFunction.getValue().get(i);\n if (oEnum.getValue() == 2) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fMaxCanopyHeight, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fAdultReverseLinearSlope, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fAdultReverseLinearIntercept, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Sapling height-diameter function - standard\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatSaplingHDFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatSaplingHDFunction.getValue().get(i);\n if (oEnum.getValue() == 0) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fMaxCanopyHeight, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fSlopeOfAsymptoticHeight, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Sapling height-diameter function - linear\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatSaplingHDFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatSaplingHDFunction.getValue().get(i);\n if (oEnum.getValue() == 1) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fMaxCanopyHeight, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fSaplingLinearSlope, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fSaplingLinearIntercept, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Sapling height-diameter function - reverse linear\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatSaplingHDFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatSaplingHDFunction.getValue().get(i);\n if (oEnum.getValue() == 2) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fMaxCanopyHeight, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fSaplingReverseLinearSlope, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fSaplingReverseLinearIntercept, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Sapling height-diameter function - power\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatSaplingHDFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatSaplingHDFunction.getValue().get(i);\n if (oEnum.getValue() == 3) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fMaxCanopyHeight, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fPowerA, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fPowerB, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Seedling height-diameter function - standard\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatSeedlingHDFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatSeedlingHDFunction.getValue().get(i);\n if (oEnum.getValue() == 0) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fSlopeOfHeightDiam10, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Seedling height-diameter function - linear\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatSeedlingHDFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatSeedlingHDFunction.getValue().get(i);\n if (oEnum.getValue() == 1) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fSeedlingLinearSlope, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fSeedlingLinearIntercept, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Seedling height-diameter function - reverse linear\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatSeedlingHDFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatSeedlingHDFunction.getValue().get(i);\n if (oEnum.getValue() == 2) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fSeedlingReverseLinearSlope, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fSeedlingReverseLinearIntercept, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Adult crown radius function - standard\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatAdultCRDFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatAdultCRDFunction.getValue().get(i);\n if (oEnum.getValue() == 0) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fSlopeOfAsympCrownRad, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fCrownRadExp, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fMaxCrownRad, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Adult crown radius function - Chapman-Richards\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatAdultCRDFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatAdultCRDFunction.getValue().get(i);\n if (oEnum.getValue() == 1) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fCRCrownRadIntercept, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fCRAsympCrownRad, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fCRCrownRadShape1, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fCRCrownRadShape2, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Adult crown radius function - non-spatial density dependent\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatAdultCRDFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatAdultCRDFunction.getValue().get(i);\n if (oEnum.getValue() == 2) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCDA, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCDB, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCDC, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCDD, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCDE, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCDF, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCDG, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCDH, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCDI, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCDJ, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatExpDensDepCRD1, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatExpDensDepCRA, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatExpDensDepCRB, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatExpDensDepCRC, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatExpDensDepCRD, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatExpDensDepCRE, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatExpDensDepCRF, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Adult crown radius function - NCI\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatAdultCRDFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatAdultCRDFunction.getValue().get(i);\n if (oEnum.getValue() == 3) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fNCIMaxCrownRadius, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICRAlpha, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICRBeta, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICRGamma, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICRMaxCrowdingRadius, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICRN, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICRD, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n for (i = 0; i < mp_oAllData.size(); i++) {\n ModelData oData = (ModelData) mp_oAllData.get(i);\n String sKey = oData.getDescriptor().toLowerCase();\n if (sKey.indexOf(\"nci crown radius lambda\") > -1) {\n addDataObjectToDisplayArrays(oData, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n }\n //Minimum neighbor DBH applies to all species \n boolean[] p_bApplyAll = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bApplyAll.length; i++) {\n p_bApplyAll[i] = true;\n }\n addDataObjectToDisplayArrays(mp_fNCICRMinNeighborDBH, p_oSingles, p_oSpeciesSpecific, p_bApplyAll);\n }\n\n //------------------------------------------\n //Sapling crown radius function - standard\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatSaplingCRDFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatSaplingCRDFunction.getValue().get(i);\n if (oEnum.getValue() == 0) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fSlopeOfAsympCrownRad, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fCrownRadExp, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fMaxCrownRad, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Sapling crown radius function - Chapman-Richards\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatSaplingCRDFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatSaplingCRDFunction.getValue().get(i);\n if (oEnum.getValue() == 1) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fCRCrownRadIntercept, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fCRAsympCrownRad, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fCRCrownRadShape1, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fCRCrownRadShape2, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Sapling crown radius function - NCI\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatSaplingCRDFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatSaplingCRDFunction.getValue().get(i);\n if (oEnum.getValue() == 3) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fNCIMaxCrownRadius, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICRAlpha, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICRBeta, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICRGamma, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICRMaxCrowdingRadius, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICRN, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICRD, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n for (i = 0; i < mp_oAllData.size(); i++) {\n ModelData oData = mp_oAllData.get(i);\n String sKey = oData.getDescriptor().toLowerCase();\n if (sKey.indexOf(\"nci crown radius lambda\") > -1) {\n addDataObjectToDisplayArrays(oData, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n }\n //Minimum neighbor DBH applies to all species \n boolean[] p_bApplyAll = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bApplyAll.length; i++) {\n p_bApplyAll[i] = true;\n }\n addDataObjectToDisplayArrays(mp_fNCICRMinNeighborDBH, p_oSingles, p_oSpeciesSpecific, p_bApplyAll);\n }\n\n //------------------------------------------\n //Adult crown depth function - standard\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatAdultCDHFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatAdultCDHFunction.getValue().get(i);\n if (oEnum.getValue() == 0) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fSlopeOfAsympCrownDpth, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fCrownDepthExp, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Adult crown depth function - Chapman-Richards\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatAdultCDHFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatAdultCDHFunction.getValue().get(i);\n if (oEnum.getValue() == 1) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fCRCrownHtIntercept, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fCRAsympCrownHt, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fCRCrownHtShape1, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fCRCrownHtShape2, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Adult crown depth function - non-spatial density dependent\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatAdultCDHFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatAdultCDHFunction.getValue().get(i);\n if (oEnum.getValue() == 2) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCRA, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCRB, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCRC, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCRD, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCRE, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCRF, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCRG, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCRH, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCRI, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatDensDepInstCRJ, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatLogDensDepCRDA, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatLogDensDepCRDB, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatLogDensDepCRDC, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatLogDensDepCRDD, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatLogDensDepCRDE, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatLogDensDepCRDF, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNonSpatLogDensDepCRDG, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Adult crown depth function - NCI\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatAdultCDHFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatAdultCDHFunction.getValue().get(i);\n if (oEnum.getValue() == 3) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fNCIMaxCrownDepth, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICDAlpha, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICDBeta, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICDGamma, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICDMaxCrowdingRadius, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICDN, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICDD, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n for (i = 0; i < mp_oAllData.size(); i++) {\n ModelData oData = mp_oAllData.get(i);\n String sKey = oData.getDescriptor().toLowerCase();\n if (sKey.indexOf(\"nci crown depth lambda\") > -1) {\n addDataObjectToDisplayArrays(oData, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n }\n //Minimum neighbor DBH applies to all species \n boolean[] p_bApplyAll = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bApplyAll.length; i++) {\n p_bApplyAll[i] = true;\n }\n addDataObjectToDisplayArrays(mp_fNCICDMinNeighborDBH, p_oSingles, p_oSpeciesSpecific, p_bApplyAll);\n }\n\n //------------------------------------------\n //Sapling crown depth function - standard\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatSaplingCDHFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatSaplingCDHFunction.getValue().get(i);\n if (oEnum.getValue() == 0) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fSlopeOfAsympCrownDpth, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fCrownDepthExp, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Sapling crown depth function - Chapman-Richards\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatSaplingCDHFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatSaplingCDHFunction.getValue().get(i);\n if (oEnum.getValue() == 1) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fCRCrownHtIntercept, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fCRAsympCrownHt, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fCRCrownHtShape1, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fCRCrownHtShape2, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n\n //------------------------------------------\n //Sapling crown depth function - NCI\n bAny = false;\n p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bAppliesTo.length; i++) {\n p_bAppliesTo[i] = false;\n }\n for (i = 0; i < mp_iWhatSaplingCDHFunction.getValue().size(); i++) {\n oEnum = (ModelEnum)mp_iWhatSaplingCDHFunction.getValue().get(i);\n if (oEnum.getValue() == 3) {\n p_bAppliesTo[i] = true;\n bAny = true;\n }\n }\n if (bAny) {\n addDataObjectToDisplayArrays(mp_fNCIMaxCrownDepth, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICDAlpha, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICDBeta, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICDGamma, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICDMaxCrowdingRadius, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICDN, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n addDataObjectToDisplayArrays(mp_fNCICDD, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n for (i = 0; i < mp_oAllData.size(); i++) {\n ModelData oData = mp_oAllData.get(i);\n String sKey = oData.getDescriptor().toLowerCase();\n if (sKey.indexOf(\"nci crown depth lambda\") > -1) {\n addDataObjectToDisplayArrays(oData, p_oSingles, p_oSpeciesSpecific, p_bAppliesTo);\n }\n }\n //Minimum neighbor DBH applies to all species \n boolean[] p_bApplyAll = new boolean[oPop.getNumberOfSpecies()];\n for (i = 0; i < p_bApplyAll.length; i++) {\n p_bApplyAll[i] = true;\n }\n addDataObjectToDisplayArrays(mp_fNCICDMinNeighborDBH, p_oSingles, p_oSpeciesSpecific, p_bApplyAll);\n }\n\n BehaviorParameterDisplay oDisp = formatTable(p_oSingles, p_oSpeciesSpecific, oPop);\n ArrayList<BehaviorParameterDisplay> jReturn = new ArrayList<BehaviorParameterDisplay>(1);\n jReturn.add(oDisp);\n return jReturn;\n }", "SUP createSUP();", "public CountMultipleCreations() {\r\n\t\tmultiples = new HashSet<String>();\r\n\t}", "@Test public void addPentagonalPyramid()\n {\n PentagonalPyramid[] pArray = new PentagonalPyramid[100];\n PentagonalPyramid p1 = new PentagonalPyramid(\"PP1\", 1, 2);\n PentagonalPyramid p2 = new PentagonalPyramid(\"PP1\", 2, 3);\n PentagonalPyramid p3 = new PentagonalPyramid(\"PP1\", 3, 4);\n pArray[0] = p1;\n pArray[1] = p2;\n pArray[2] = p3;\n \n PentagonalPyramidList2 pList = new PentagonalPyramidList2(\"ListName\", \n pArray, 3);\n PentagonalPyramid p = new PentagonalPyramid(\"new\", 10, 6);\n pList.addPentagonalPyramid(\"new\", 10, 6);\n PentagonalPyramid[] pA = pList.getList();\n Assert.assertEquals(\"addPentagonal Test\", p, pA[3]);\n }", "public void testMultiple() {\n \tMeasurement a = new Measurement(2,6);\n \tMeasurement b = new Measurement(1,5);\n \t\n \tMeasurement c = a.multiple(2);\n \tMeasurement d = b.multiple(5);\n \t\n assertTrue(a.getFeet() == 2);\n assertTrue(a.getInches() == 6);\n assertTrue(b.getFeet() == 1);\n assertTrue(b.getInches() == 5);\n \n assertTrue(c.getFeet() == 5);\n assertTrue(c.getInches() == 0);\n assertTrue(d.getFeet() == 7);\n assertTrue(d.getInches() == 1);\n }", "public Individual createIndividual( final EvolutionState state,\r\n int subpop,\r\n Individual[] inds,\r\n int index,\r\n int thread)\r\n {\n double Pm = 1.0 / inds.length;\r\n\r\n // default value for scaling factor F\r\n double F = state.random[thread].nextBoolean() ? 1.0 : ( SCALE_F / Math.sqrt(inds.length) );\r\n\r\n // K is random value distributed N(0,1)\r\n double K = state.random[thread].nextGaussian();\r\n\r\n // select three indexes different from each other and from that of the current parent\r\n int r0, r1, r2;\r\n do\r\n {\r\n r0 = state.random[thread].nextInt(inds.length);\r\n }\r\n while( r0 == index );\r\n do\r\n {\r\n r1 = state.random[thread].nextInt(inds.length);\r\n }\r\n while( r1 == r0 || r1 == index );\r\n do\r\n {\r\n r2 = state.random[thread].nextInt(inds.length);\r\n }\r\n while( r2 == r1 || r2 == r0 || r2 == index );\r\n\r\n DoubleVectorIndividual v = (DoubleVectorIndividual)(inds[index].clone());\r\n DoubleVectorIndividual g0 = (DoubleVectorIndividual)(inds[r0]);\r\n DoubleVectorIndividual g1 = (DoubleVectorIndividual)(inds[r1]);\r\n DoubleVectorIndividual g2 = (DoubleVectorIndividual)(inds[r2]);\r\n\r\n int dim = v.genome.length;\r\n int localIndex = state.random[thread].nextInt(dim);\r\n int counter = 0;\r\n\r\n // create the child\r\n do\r\n {\r\n if( state.random[thread].nextDouble() <= Pm )\r\n {\r\n v.genome[localIndex] = v.genome[localIndex] + F * (g1.genome[localIndex] - g2.genome[localIndex]);\r\n }\r\n else\r\n {\r\n v.genome[localIndex] = v.genome[localIndex] + K * (g0.genome[localIndex] - v.genome[localIndex]);\r\n }\r\n localIndex = (localIndex+1) % dim;\r\n }\r\n while (++counter < dim);\r\n\r\n return v;\r\n }", "public void reproduce(int generation, IPopulation pop, List<ISpecies> sorted_species) {\n\t\tfor(ISpecies specie : sorted_species){\r\n\r\n\t\t\tList<IOrganism> organisms = specie.getOrganisms();\r\n\r\n\t\t\t// outside the species\r\n\t\t\tint orgnum = 0;\r\n\r\n\t\t\tIOrganism mom = null;\r\n\t\t\tIOrganism baby = null;\r\n\t\t\tIGenome new_genome = null;\r\n\t\t\tIOrganism _organism = null;\r\n\t\t\tIOrganism _dad = null;\r\n\r\n\t\t\tif (specie.getExpectedOffspring() > 0 && organisms.size() == 0)\r\n\t\t\t\treturn;\r\n\r\n\t\t\t// elements for this species\r\n\t\t\tint poolsize = organisms.size() - 1;\r\n\r\n\t\t\t// the champion of the 'this' species is the first element of the species;\r\n\t\t\tIOrganism thechamp = organisms.get(0);\r\n\t\t\tboolean champ_done = false; // Flag the preservation of the champion\r\n\r\n\t\t\t// Create the designated number of offspring for the Species one at a time.\r\n\t\t\tfor (int count = 0; count < specie.getExpectedOffspring(); count++) {\r\n\r\n\t\t\t\t// If we have a super_champ (Population champion), finish off some special clones.\r\n\t\t\t\tif (thechamp.getSuperChampOffspring() > 0) {\r\n\r\n\t\t\t\t\t// save in mom current champ;\r\n\t\t\t\t\tmom = thechamp;\r\n\t\t\t\t\t// create a new genome from this copy\r\n\t\t\t\t\tnew_genome = mom.getGenome().duplicate(count);\r\n\t\t\t\t\tif ((thechamp.getSuperChampOffspring()) > 1) {\r\n\t\t\t\t\t\tif (RandomUtils.randomDouble() < .8 || evolutionParameters.getDoubleParameter(MUTATE_ADD_LINK_PROB) == 0.0)\r\n\t\t\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutateLinkWeight(new_genome, evolutionParameters.getDoubleParameter(WEIGHT_MUT_POWER), 1.0, MutationType.GAUSSIAN);\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t// Sometimes we add a link to a superchamp\r\n\t\t\t\t\t\t\tnew_genome.generatePhenotype(generation);\r\n\t\t\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutateAddLink(new_genome,pop);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t\tthechamp.incrementSuperChampOffspring();\r\n\t\t\t\t} // end population champ\r\n\r\n\t\t\t\t// If we have a Species champion, just clone it\r\n\t\t\t\telse if ((!champ_done) && (specie.getExpectedOffspring() > 5)) {\r\n\t\t\t\t\tmom = thechamp; // Mom is the champ\r\n\t\t\t\t\tnew_genome = mom.getGenome().duplicate(count);\r\n\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation); // Baby is\r\n\t\t\t\t\t// just like mommy\r\n\t\t\t\t\tchamp_done = true;\r\n\r\n\t\t\t\t} else if (RandomUtils.randomDouble() < evolutionParameters.getDoubleParameter(MUTATE_ONLY_PROB) || poolsize == 1) {\r\n\r\n\t\t\t\t\t// Choose the random parent\r\n\t\t\t\t\torgnum = RandomUtils.randomInt(0, poolsize);\r\n\t\t\t\t\t_organism = organisms.get(orgnum);\r\n\t\t\t\t\tmom = _organism;\r\n\t\t\t\t\tnew_genome = mom.getGenome().duplicate(count);\r\n\r\n\t\t\t\t\t// Do the mutation depending on probabilities of various mutations\r\n\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutate(new_genome,pop,generation);\r\n\r\n\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t}\r\n\t\t\t\t// Otherwise we should mate\r\n\t\t\t\telse {\r\n\t\t\t\t\t// Choose the random mom\r\n\t\t\t\t\torgnum = RandomUtils.randomInt(0, poolsize);\r\n\t\t\t\t\t_organism = organisms.get(orgnum);\r\n\r\n\t\t\t\t\t// save in mom\r\n\t\t\t\t\tmom = _organism;\r\n\t\t\t\t\t// Choose random dad...\r\n\t\t\t\t\t// Mate within Species\r\n\t\t\t\t\tif (RandomUtils.randomDouble() > evolutionParameters.getDoubleParameter(INTERSPECIES_MATE_RATE)) {\r\n\t\t\t\t\t\torgnum = RandomUtils.randomInt(0, poolsize);\r\n\t\t\t\t\t\t_organism = organisms.get(orgnum);\r\n\t\t\t\t\t\t_dad = _organism;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Mate outside Species\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t// save current species\r\n\t\t\t\t\t\tISpecies randspecies = specie;\r\n\t\t\t\t\t\t// Select a random species\r\n\t\t\t\t\t\tint giveup = 0;\r\n\t\t\t\t\t\t// Give up if you can't find a different Species\r\n\t\t\t\t\t\twhile ((randspecies == specie) && (giveup < 5)) {\r\n\r\n\t\t\t\t\t\t\t// Choose a random species tending towards better species\r\n\t\t\t\t\t\t\tdouble randmult = Math.min(1.0, RandomUtils.randomGaussian() / 4);\r\n\r\n\t\t\t\t\t\t\t// This tends to select better species\r\n\t\t\t\t\t\t\tint sp_ext = Math.max(0, (int) Math.floor((randmult * (sorted_species.size() - 1.0)) + 0.5));\r\n\t\t\t\t\t\t\trandspecies = sorted_species.get(sp_ext);\r\n\t\t\t\t\t\t\t++giveup;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t_dad = randspecies.getOrganisms().get(0);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tnew_genome = evolutionStrategy.getCrossoverStrategy().performCrossover(mom,_dad,count);\r\n\r\n\t\t\t\t\t// Determine whether to mutate the baby's Genome\r\n\t\t\t\t\t// This is done randomly or if the mom and dad are the same organism\r\n\t\t\t\t\tif (RandomUtils.randomDouble() > evolutionParameters.getDoubleParameter(MATE_ONLY_PROB) || \r\n\t\t\t\t\t\t\t_dad.getGenome().getId() == mom.getGenome().getId() || \r\n\t\t\t\t\t\t\t_dad.getGenome().compatibility(mom.getGenome()) == 0.0) {\r\n\r\n\t\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutate(new_genome,pop,generation);\r\n\t\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t\t} \r\n\t\t\t\t\t// end block of prob\r\n\t\t\t\t\t// Determine whether to mutate the baby's Genome\r\n\t\t\t\t\t// This is done randomly or if the mom and dad are the same organism\r\n\r\n\t\t\t\t\t// Create the baby without mutating first\r\n\t\t\t\t\telse \r\n\t\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t}\r\n\t\t\t\tevolutionStrategy.getSpeciationStrategy().addOrganismToSpecies(pop, baby);\r\n\t\t\t} // end offspring cycle\r\n\t\t}\r\n\t}", "public void initPopulation() throws JMException, ClassNotFoundException {\n population_ = new SolutionSet[problemSet_.size()];\n for (int i = 0; i < problemSet_.size(); i++){\n population_[i] = new SolutionSet(populationSize_);\n }\n\n for (int j = 0; j < problemSet_.size(); j++){\n for (int i = 0; i < populationSize_; i++) {\n Solution newSolution = new Solution(problemSet_);\n problemSet_.get(j).evaluate(newSolution);\n problemSet_.get(j).evaluateConstraints(newSolution);\n population_[j].add(newSolution);\n } // for\n }\n\n }", "public Population(int capacity) {\r\n Validate.positive(capacity, \"capacity\");\r\n this.capacity = capacity;\r\n }", "public Population(int nVillages, int nFlocks, double[] parameters){\r\n\t\tthis.nFlocks = 0;\r\n\t\tthis.nVillages = nVillages;\r\n\t\tthis.vVillages = new Village[nVillages];\r\n\t\tfor(int i = 0; i < nVillages; i++){\r\n\t\t\tthis.vVillages[i] = new Village(nFlocks, parameters);\r\n\t\t\tthis.nFlocks += vVillages[i].getnFlocks();\r\n\t\t}\r\n\t\tthis.ndvPool = new Vector<NDInfection>();\r\n\t}", "public Population(Graph graph)\r\n/* 13: */ {\r\n/* 14:36 */ g = graph.cloneGraph();\r\n/* 15: */ }", "public void setPop(ArrayList<Bacteria> newPop){\n inds = newPop;\n }", "IEquipableItem create(int power, int min, int max);", "@Incoming(\"multiplyVariants\")\n @Outgoing(\"wrapSseEvent\")\n public ProcessorBuilder<String, String> multiply() {\n // Multiply to 3 variants of same message\n return ReactiveStreams.<String>builder()\n .flatMap(o ->\n ReactiveStreams.of(\n // upper case variant\n o.toUpperCase(),\n // repeat twice variant\n o.repeat(2),\n // reverse chars 'tnairav'\n new StringBuilder(o).reverse().toString())\n );\n }", "protected Individual[] mate(Individual ma, Individual pa) \n\t\t{\tfloat[] ch1 = getNewGenes(ma,pa);\n\t\t\tfloat[] ch2 = getNewGenes(pa,ma);\n\t\t\t\n\t\t\tIndividual[] kids = {new Individual(ch1),new Individual(ch2)};\n\t\t\treturn kids;\n\t\t}", "public static SelectiveSearchSegmentationStrategyMultiple createSelectiveSearchSegmentationStrategyMultiple()\r\n {\r\n \r\n SelectiveSearchSegmentationStrategyMultiple retVal = SelectiveSearchSegmentationStrategyMultiple.__fromPtr__(createSelectiveSearchSegmentationStrategyMultiple_4());\r\n \r\n return retVal;\r\n }", "public PopulationFilter(int nr)\n { \n super();\n inhabitants = nr;\n }", "@Override\n\tprotected AbstractFitnessResult[] multipleEvaluation(ReactionNetwork network){\n\t\tAbstractFitnessResult[] results = super.multipleEvaluation(network);\n\t\tRDMultiobjectivePatternFitnessResult[] results2 = new RDMultiobjectivePatternFitnessResult[results.length];\n\t\t\n\t\tfor(int i= 0; i< results.length; i++){\n\t\t\tresults2[i] = (RDMultiobjectivePatternFitnessResult) results[i];\n\t\t}\n\t\t\n\t\tfor(int i = 0; i<multievaluationObjs.size(); i++){\n\t\t\tdouble fit = multievaluationObjs.get(i).evaluateScore(results2);\n\t\t\tfor(int j = 0; j<results2.length; j++){\n\t\t\t\tresults2[j].addFit(fit);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn results2;\n\t}", "public static void main(String[] args) {\n City city = new City(60, 200);\n\n City city2 = new City(180, 200);\n\n City city3 = new City(80, 180);\n City city4 = new City(140, 180);\n\n City city5 = new City(20, 160);\n\n City city6 = new City(100, 160);\n\n City city7 = new City(200, 160);\n\n City city8 = new City(140, 140);\n\n City city9 = new City(40, 120);\n\n City city10 = new City(100, 120);\n\n City city11 = new City(180, 100);\n\n City city12 = new City(60, 80);\n\n City city13 = new City(120, 80);\n City city14 = new City(180, 60);\n City city15 = new City(20, 40);\n\n City city16 = new City(100, 40);\n\n City city17 = new City(200, 40);\n City city18 = new City(20, 20);\n\n City city19 = new City(60, 20);\n City city20 = new City(160, 20);\n List<City> list=new ArrayList<City>();\n list.add(city);list.add(city2);\n list.add(city3);\n list.add(city4);\n list.add(city5);\n list.add(city6);\n list.add(city7);\n list.add(city8);\n list.add(city9);\n list.add(city10);\n list.add(city11);\n list.add(city12);\n list.add(city13);\n list.add(city14);\n list.add(city15);\n list.add(city16);\n list.add(city17);\n list.add(city18);\n list.add(city19);\n list.add(city20);\n\n // Initialize population\n Population pop = new Population(100, true,list);\n System.out.println(\"Initial distance: \" + pop.getBestTour().getDistance());\n\n // Evolve population for 100 generations\n pop = Ga.evolvePopulation(pop);\n for (int i = 0; i < 500; i++) {\n pop = Ga.evolvePopulation(pop);\n System.out.println(\"第\"+i+\"代\"+pop.getBestTour().getDistance());\n }\n\n // Print final results\n System.out.println(\"Finished\");\n System.out.println(\"Final distance: \" + pop.getBestTour().getDistance());\n System.out.println(\"Solution:\");\n System.out.println(pop.getBestTour());\n }", "public Chromosone() {\n Random rand = new Random();\n for(int i=0;i<=75;i++)\n {\n int rnd = rand.nextInt(2);// [1,0...]\n\n Val.add(rnd);\n }\n }", "public void createPhilosophers() {\n\t\tphil1 = new Philosopher(1,stick1,stick2);\n\t\tphil2 = new Philosopher(2,stick2,stick3);\n\t\tphil3 = new Philosopher(3,stick3,stick4);\n\t\tphil4 = new Philosopher(4,stick4,stick5);\n\t\tphil5 = new Philosopher(5,stick5,stick1);\n\t}", "public Population crossoverPopulation(Population population, List<FogDevice> fogDevices, List<? extends Cloudlet> cloudletList) {\n Individual queen = population.getFittest(0);\n // Loop over current population by fitness\n for (int dronesIndex = 1; dronesIndex < (numberDrones + 1); dronesIndex++) {\n Individual husband = population.getFittest(dronesIndex);\n\n // Apply crossover to this individual?\n if (this.crossoverRate > Math.random()) {\n // Initialize offspring\n Individual offspring = new Individual(husband.getChromosomeLength());\n\n offspring = crossover2Point(husband, queen);\n\n if(husband.getFitness() <= calcFitness(offspring, fogDevices, cloudletList)\n && !doesPopupationIncludeIndividual(population, offspring)) {\n population.getPopulation().remove(husband);\n population.getPopulation().add(offspring);\n }\n }\n }\n return population;\n }", "@DataProvider(name = \"test1\")\n\tpublic Object [][] createData1() {\n\t\treturn new Object [][] {\n\t\t\tnew Object [] { 0, 0 },\n\t\t\tnew Object [] { 9, 2 },\n\t\t\tnew Object [] { 15, 0 },\n\t\t\tnew Object [] { 32, 0 },\n\t\t\tnew Object [] { 529, 4 },\n\t\t\tnew Object [] { 1041, 5 },\n\t\t\tnew Object [] { 65536, 0 },\n\t\t\tnew Object [] { 65537, 15 },\n\t\t\tnew Object [] { 100000, 4 }, \n\t\t\tnew Object [] { 2147483, 5 },\n\t\t\tnew Object [] { 2147483637, 1 }, //max - 10\n\t\t\tnew Object [] { 2147483646, 0 }, //max - 1\n\t\t\tnew Object [] { 2147483647, 0 } //max\n\t\t};\n\t}", "public void setP(List<Production> p);", "@Override\r\n\tpublic int multi(int x, int y) {\n\t\treturn x * y;\r\n\t}", "Chromosome from(List<Chromosome> population);", "private void setMultipliersArraySize(int i) {\r\n\t\tp_multiplier_name = new String[i];\r\n\t\tp_multiplier_value = new Double[i];\r\n\t\tp_multiplier_description = new String[i];\r\n\t}", "public static void makeGrid (Species map[][], int numSheepStart, int numWolfStart, int numPlantStart, int sheepHealth, int plantHealth, int wolfHealth, int plantSpawnRate) {\n \n // Declare coordinates to randomly spawn species\n int y = 0;\n int x = 0;\n \n // Initialise plants\n Plant plant;\n \n // Spawn plants\n for (int i = 0; i < numPlantStart; i++) {\n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) { \n \n // Choose a random plant (50% chance healthy, 25% poisonous or energizing)\n int plantChoice = (int) Math.ceil(Math.random() * 100);\n \n // Create the new plants\n if ((plantChoice <= 100) && (plantChoice >= 50)) {\n plant = new HealthyPlant(plantHealth, x, y, plantSpawnRate);\n } else if ((plantChoice < 50) && (plantChoice >= 25)) {\n plant = new EnergizingPlant(plantHealth, x, y, plantSpawnRate);\n } else {\n plant = new PoisonousPlant(plantHealth, x, y, plantSpawnRate);\n }\n \n // Set plant coordinates\n plant.setX(x);\n plant.setY(y);\n map[y][x] = plant;\n \n // No space\n } else { \n i -= 1;\n }\n \n }\n \n // Spawn sheep\n for (int i = 0; i < numSheepStart; i++) { \n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) {\n \n // Create new sheep\n Sheep sheep = new Sheep(sheepHealth, x, y, 5); \n \n // Set sheep coordinates\n sheep.setX(x);\n sheep.setY(y);\n map[y][x] = sheep;\n \n // No space\n } else { \n i -= 1; \n }\n \n }\n \n // Spawn wolves\n for (int i = 0; i < numWolfStart; i++) { \n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) { \n \n // Create new wolf\n Wolf wolf = new Wolf(wolfHealth, x, y, 5); \n \n // Set wolf coordinates\n wolf.setX(x);\n wolf.setY(y);\n map[y][x] = wolf; \n \n // No space\n } else { \n i -= 1; \n }\n }\n \n }", "public int getPopulation() {\n return population;\n }", "@Override\n\tpublic Spielfeld clone() {\n\t\tint[] mulden = new int[this.getMulden().length];\n\t\t\n\t\tfor(int i = 0; i < this.getMulden().length; i++) {\n\t\t\tmulden[i] = this.getMulden()[i];\n\t\t}\n\t\t\n\t\treturn new Spielfeld(mulden);\n\t}", "boolean getMultiple();" ]
[ "0.5911739", "0.5881375", "0.5847855", "0.57098806", "0.5703853", "0.56730694", "0.564314", "0.5583263", "0.55054295", "0.5486395", "0.54047966", "0.53794366", "0.5359637", "0.52454007", "0.5234072", "0.5234072", "0.5204293", "0.5200257", "0.51795536", "0.51752126", "0.5155189", "0.514366", "0.5125984", "0.50091016", "0.5009002", "0.49936107", "0.49902704", "0.4960602", "0.495304", "0.4951876", "0.4942628", "0.49425635", "0.49411082", "0.49333435", "0.49316308", "0.4917366", "0.49131536", "0.4909598", "0.49035734", "0.49021158", "0.4900398", "0.48958468", "0.48890486", "0.4888237", "0.48659542", "0.48655832", "0.48543194", "0.48482433", "0.4844753", "0.48438632", "0.48364416", "0.48349836", "0.48294055", "0.48066053", "0.480263", "0.47870332", "0.47780254", "0.47721925", "0.47528094", "0.47508717", "0.47320464", "0.47302964", "0.46986195", "0.46973038", "0.46913865", "0.46752796", "0.46545509", "0.46531218", "0.4650288", "0.46407512", "0.46156606", "0.4613054", "0.46089688", "0.4600487", "0.46001747", "0.458932", "0.458305", "0.45821327", "0.4581005", "0.45806095", "0.45791844", "0.45772216", "0.45727596", "0.45679387", "0.45655495", "0.4561819", "0.45540246", "0.45450145", "0.45428613", "0.45310172", "0.45174274", "0.45172346", "0.451246", "0.45000473", "0.44964242", "0.44798318", "0.44648933", "0.44595042", "0.44588777", "0.44434834" ]
0.62689126
0