query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
method berikut akan dijalankan saat aktifitas dimulai
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); inputUsername = findViewById(R.id.inputUsername); inputPassword = findViewById(R.id.inputPassword); btnLogin = findViewById(R.id.btnLogin); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@NotifyChange({\"matkulKur\", \"addNew\", \"resetInputIcon\"}) \n @Command(\"batal\")\n public void batal(){\n if (isAddNew()==true) setMatkulKur(getTempMatkulKur()); //\n setResetInputIcon(false);\n setAddNew(false); //apapun itu buat supaya tambah baru selalu kondisi false\n }", "public void limpiar() {\n\t//txtBuscar.setText(\"\");\n\n\t// codTemporal.setText(\"\");\n\thabilita(true, false, false, false, false, true, false, true, true);\n }", "public data_kelahiran() {\n initComponents();\n ((javax.swing.plaf.basic.BasicInternalFrameUI)this.getUI()).setNorthPane(null);\n autonumber();\n data_tabel();\n lebarKolom();\n \n \n \n }", "private void dibujarEstado() {\n\n\t\tcantidadFichasNegras.setText(String.valueOf(juego.contarFichasNegras()));\n\t\tcantidadFichasBlancas.setText(String.valueOf(juego.contarFichasBlancas()));\n\t\tjugadorActual.setText(juego.obtenerJugadorActual());\n\t}", "public void visMedlemskabsMenu ()\r\n {\r\n System.out.println(\"Du har valgt medlemskab.\");\r\n System.out.println(\"Hvad Oensker du at foretage dig?\");\r\n System.out.println(\"1: Oprette et nyt medlem\");\r\n System.out.println(\"2: Opdatere oplysninger paa et eksisterende medlem\");\r\n System.out.println(\"0: Afslut\");\r\n\r\n }", "public void visKontingenthaandteringMenu ()\r\n {\r\n System.out.println(\"Du har valgt kontingent.\");\r\n System.out.println(\"Hvad oensker du at foretage dig?\");\r\n System.out.println(\"1: Se priser\");\r\n System.out.println(\"2: Se medlemmer i restance\");\r\n System.out.println(\"0: Afslut\");\r\n\r\n }", "@Override\n public void cantidad_Defensa(){\n defensa=2+nivel+aumentoD;\n }", "public void exibeMenuCadastroFuncionario() {\n updateData();\n setVisible(true);\n\n }", "@Override\n\tpublic void guiTinNhan() {\n\n\t}", "public void kurangIsi(){\n status();\n //kondisi jika air kurang atau sama dengan level 0\n if(level==0){Toast.makeText(this,\"Air Sedikit\",Toast.LENGTH_SHORT).show();return;}\n progress.setImageLevel(--level);\n }", "public nhanvien() {\n initComponents();\n laysodong();\n if(count % 5 ==0 )\n {\n sotrang = count/5;\n }\n else\n {\n sotrang=count/5 + 1;\n }\n DAO_NV.dolentable(tblnhanvien,1);\n lbltrang.setText(\"1\");\n lblsotrang.setText(\"1/\"+sotrang);\n jButton3.setEnabled(false);\n jButton1.setEnabled(false);\n \n \n \n \n\n }", "private void form_awal() {\n jnama.setEnabled(false);\n jalamat.setEnabled(false);\n jhp.setEnabled(false);\n jbbm.setEnabled(false);\n jsitus.setEnabled(false);\n \n btnsimpan.setEnabled(false);\n btnhapus.setEnabled(false);\n }", "private static void setNormalState() {\n InitialClass.arduino.serialWrite('0');\n InitialClass.arduino.serialWrite('6');\n InitialClass.arduino.serialWrite('2');\n InitialClass.arduino.serialWrite('8');\n InitialClass.arduino.serialWrite('C');\n InitialClass.arduino.serialWrite('A');\n InitialClass.arduino.serialWrite('4');\n /// hide animated images of scada\n pumpForSolutionOn.setVisible(false);\n pumpForTitrationOn.setVisible(false);\n mixerOn.setVisible(false);\n valveTitrationOpened.setVisible(false);\n valveSolutionOpened.setVisible(false);\n valveWaterOpened.setVisible(false);\n valveOutOpened.setVisible(false);\n\n log.append(\"Клапана закрыты\\nдвигатели выключены\\n\");\n\n }", "public void inhabilitaPanel() {\n\n\t\t//comboNombreCarta.setEnabled(false);\n\t\tjScrollPane1.setEnabled(false);\n\t\tjScrollPane1.getVerticalScrollBar().setEnabled(false);\n\t\tjScrollPane1.getHorizontalScrollBar().setEnabled(false);\n\t\tjScrollPane2.setEnabled(false);\n\t\tjScrollPane2.getVerticalScrollBar().setEnabled(false);\n\t\tjScrollPane2.getHorizontalScrollBar().setEnabled(false);\n\t\tlistaSeleccionadas.setEnabled(false);\n\t\tlistaDisponibles.setEnabled(false);\n\t\tlabelFondo.setEnabled(false);\n\t\ttextoNumeroCartas.setEnabled(false);\n\t\ttextoRaza.setEnabled(false);\n\t\tbotCargar.setEnabled(false);\n\t\tbotGuardar.setEnabled(false);\n\t\tbotGuardarComo.setEnabled(false);\n\t\tbotSalir.setEnabled(false);\n\t\tbotAyuda.setEnabled(false);\n\t\tbotNuevaBaraja.setEnabled(false);\n\t\ttextoBarajaCargada.setEnabled(false);\n\t\tthis.panelFondo.setEnabled(false);\n\t\tlabelImagen.setEnabled(false);\n this.NumeroPuntos.setEnabled(false);\n\n\t}", "public void tambahIsi(){\n status();\n //kondisi jika air penuh\n if(level==6){\n Toast.makeText(this,\"Air Penuh\",Toast.LENGTH_SHORT).show();return;}\n progress.setImageLevel(++level);\n }", "private void btnHomeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnHomeActionPerformed\n// timingnyaDiStop();\n int inginKeluar;// 0 = (YES) exit ke main menu , 1 = (NO)tidak jadi //default netbeansnya\n inginKeluar = JOptionPane.showConfirmDialog(this, \"Anda yakin ingin mengakhiri Pembahasan / Materi?\", \"Konfirmasi Kembali\", 0);\n if (inginKeluar == 0) //kalo bener mau keluar, skoring muncul (masukkanSkor)\n {\n try {\n masukkanSkor();\n\n } catch (IOException ex) {\n Logger.getLogger(bahas.class\n .getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n timingnyaMainLagi();\n }\n }", "protected void aktualisieren() {\r\n\r\n\t}", "private void volverValoresADefault( )\n {\n if( sensorManag != null )\n sensorManag.unregisterListener(sensorListener);\n gameOn=false;\n getWindow().getDecorView().setBackgroundColor(Color.WHITE);\n pantallaEstabaTapada=false;\n ((TextView)findViewById(R.id.txtPredSeg)).setText(\"\");\n segundosTranscurridos=0;\n }", "private void setStatusTelaExibir () {\n setStatusTelaExibir(-1);\n }", "public void Dios()\r\n {\r\n \tif(!dios)\r\n \t\tgrafico.cambiarA(0);\r\n \telse\r\n \t\tgrafico.cambiarA(1);\r\n dios=!dios;\r\n }", "public void verarbeite() {\n\t\t\r\n\t}", "private void InsetarEstudiantes() {\n new Insertar_Estudiantes(arreglo).setVisible(true); // CONECTA LA VENTANA Y LE PASA LA REFERENCIA DEL ARREGLO A INSERTAR ESTUDIANTE\n this.hide(); // Esconde la ventana anterior,\n // this.setVisible(false); // Otra forma de Eliminar - Esconder la ventana anterior.\n }", "@Override\n\t\tpublic void update() {\n\t\t\tSystem.out.println(\"새로운 수정\");\n\t\t}", "public v_pembelian() {\n initComponents();\n disable_info();\n setTabel();\n initFaktur();\n }", "public formdatamahasiswa() {\n initComponents();\n }", "public DanhSachHocPhanDaDangKi() {\n initComponents();\n updateTable();\n }", "@Override\n\tpublic void bildir(){\n\t\tif(durum == true){\n\t\t\tSystem.out.println(\"Durum: Acik\");\t\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Durum: Kapali\");\n\t\t}\n\t\t\n\t}", "public Perumahan() {\n initComponents();\n aturModelTabel();\n Tipe();\n showForm(false);\n showData(\"\");\n }", "public Karyawan() {\n initComponents();\n setResizable(false);\n tampilkan_data();\n kosong_form();\n }", "public void iniciarPantalla() {\n actualizarCampos();\n _presentacion.setVisible(false);\n _opcionMultiple.setVisible(true);\n }", "public void inhabilitaPanel() {\n\t\t// contentPane.setEnabled(false);\n\t\tpanelPrincipal.setEnabled(false);\n\t\tpanelBotones.setEnabled(false);\n\t\tboton1Jugador.setEnabled(false);\n\t\tbotonJuegoRed.setEnabled(false);\n\t\tbotonEditar.setEnabled(false);\n\t\tbotonDemo.setEnabled(false);\n\t\tbotonReglas.setEnabled(false);\n\t\tbotonAyuda.setEnabled(false);\n\t\tbotonRecibir.setEnabled(false);\n\t\tbotonEnviar.setEnabled(false);\n\t\tbotonDescargaSobre.setEnabled(false);\n\t\tbotonSalir.setEnabled(false);\n\t\tlabelFondo.setEnabled(false);\n\t\tlabelDibujo.setEnabled(false);\n\n\t}", "public void hapusDataKategori(){\n loadDataKategori(); \n \n //Beri peringatan sebelum melakukan penghapusan data\n int pesan = JOptionPane.showConfirmDialog(null, \"HAPUS DATA\"+ nmKategori +\"?\",\"KONFIRMASI\", JOptionPane.OK_CANCEL_OPTION);\n \n //jika pengguna memilih OK lanjutkan proses hapus data\n if(pesan == JOptionPane.OK_OPTION){\n //uji koneksi\n try{\n //buka koneksi ke database\n Statement stat = (Statement) koneksiDB.getKoneksi().createStatement();\n \n //perintah hapus data\n String sql = \"DELETE FROM tbl_kembali WHERE nm_kategori='\"+ nmKategori +\"'\";\n PreparedStatement p =(PreparedStatement)koneksiDB.getKoneksi().prepareStatement(sql);\n p.executeUpdate();\n \n //fungsi ambil data\n getDataKategori();\n \n //fungsi reset data\n reset();\n JOptionPane.showMessageDialog(null, \"BERHASIL DIHAPUS\");\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage());\n }\n }\n }", "private void HalMatkulComponentShown(java.awt.event.ComponentEvent evt) {\n\trefreshTableMK();\n\tif (noJabatan == 3) {\n\t jButton17.setVisible(false);\n\t filler14.setVisible(false);\n\t jButton1.setVisible(false);\n\t filler15.setVisible(false);\n\t jButton2.setVisible(false);\n\t filler16.setVisible(false);\n\t}\n }", "public form_utama_kasir() {\n initComponents(); \n koneksi DB = new koneksi(); \n con = DB.getConnection();\n aturtext();\n tampilkan();\n nofakturbaru();\n loadData();\n panelEditDataDiri.setVisible(false);\n txtHapusKodeTransaksi.setVisible(false);\n txtHapusQtyTransaksi.setVisible(false);\n txtHapusStokTersedia.setVisible(false);\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public void ZerarM() {\n\t\tfor(int i = 0;i<3;i++) {\n\t\t\tfor(int j = 0;j<3;j++) {\n\t\t\t\tthis.m[i][j] = \"0\";\n\t\t\t}\n\t\t}\n\t\tthis.emp = 0;\n\t\tJOptionPane.showMessageDialog(null,\"COMEÇOU\");\n\t}", "public void inicializarInterfaz() {\n\t\tvista.setVisible(true);\n\t\tvista.bienvenida.setVisible(true);\n\t\tvista.sel_billete.setVisible(false);\n\t\tvista.sel_fecha.setVisible(false);\n\t\tvista.detalles_compra.setVisible(false);\n\t\tvista.login.setVisible(false);\n\t\tvista.registro.setVisible(false);\n\t\tvista.pago.setVisible(false);\n\t\tvista.fin_pago.setVisible(false);\n\t\tvista.agur.setVisible(false);\n\t\t\n\t}", "public void gamereset() {\n Button tmp = (Button) findViewById(R.id.resetbutton);\n tmp.setVisibility(View.VISIBLE);\n }", "private void form_tambah() {\n jnama.setEnabled(true);\n jalamat.setEnabled(true);\n jhp.setEnabled(true);\n jbbm.setEnabled(true);\n jsitus.setEnabled(true);\n \n btnsimpan.setEnabled(true);\n btnhapus.setEnabled(true);\n \n jnama.requestFocus(true);\n }", "public void ativa() {\n this.ativada = true;\n }", "public void atualizar() {\n System.out.println(\"Metodo atualizar chamado!\");\n setR1(0);\n setR2(0);\n setR3(0);\n setN(0);\n\n //context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Atualizado!\", \"\"));\n }", "public void srediFormuPremaSK(){\n int aktivanSK = Komunikacija.getInstance().getAktivan_sk();\n \n if(aktivanSK == Konstante.SK_DODAVANJE){\n srediFormu();\n this.setTitle(\"Unos nove vezbe\");\n }\n if(aktivanSK == Konstante.SK_IZMENA){\n srediFormu();\n prikaziPodatkeVezbi(Komunikacija.getInstance().getVezbe());\n this.setTitle(\"Izmena vezbe\");\n } \n \n if(aktivanSK == Konstante.SK_PRIKAZ){\n jTextFieldNaziv.setEnabled(false);\n jTextFieldFokus.setEnabled(false);\n jTextFieldVremeTrajanja.setEnabled(false);\n prikaziPodatkeVezbi(Komunikacija.getInstance().getVezbe());\n this.setTitle(\"Detalji vezbe\");\n }\n}", "public void asetaTeksti(){\n }", "private void xoatrangactrtion() {\n\t\ttxtmakhhm.setText(\"\");\n\t\ttxtTinhtrang.setText(\"\");\n\t\ttxtGhichu.setText(\"\");\n\t\tjdcNgaytra.setToolTipText(\"\");\n\t\tckTra.setToolTipText(\"\");\n\t\t\n\t}", "private void ulangiEnkripsi() {\n this.tfieldP.setText(\"P\");\n this.tfieldQ.setText(\"Q\");\n this.tfieldN.setText(\"N\");\n this.tfieldTN.setText(\"TN\");\n this.tfieldE.setText(\"E\");\n this.tfieldD.setText(\"D\");\n this.tfieldLokasidannamafilehasilenkripsi.setText(\"Lokasi & Nama File Hasil Enkripsi\");\n this.tfieldLokasidannamafileenkripsi.setText(\"Lokasi & Nama File\");\n this.fileAsli = null;\n this.pbEnkripsi.setValue(0);\n this.enkripsi.setP(null);\n this.enkripsi.setQ(null);\n this.enkripsi.setN(null);\n this.enkripsi.setTn(null);\n this.enkripsi.setE(null);\n this.enkripsi.setD(null);\n }", "public void resetOvladani() {\n this.setEnabled(true);\n gameConnectButton.setEnabled(true);\n gameConnectButton.setText(\"Pripoj ke hre\");\n\n newGameButton.setEnabled(true);\n newGameButton.setText(\"Zaloz hru\");\n\n zalozenaHra = false;\n\n }", "public void Showbarang_gudang() {\n initComponents();\n setHeader();\n }", "public final void mo25943g() {\n setVisibility(0);\n setStatus(1);\n }", "public void iniciarBatalha() {\r\n\t\trede.iniciarPartidaRede();\r\n\t}", "public v_halaman() {\n initComponents();\n this.setLocationRelativeTo(this);\n profileFrame.setLocationRelativeTo(null);\n kandang1Button.setActionCommand(\"kandang1\");\n kandang2Button.setActionCommand(\"kandang2\");\n kandang3Button.setActionCommand(\"kandang3\");\n kandang4Button.setActionCommand(\"kandang4\");\n kandang5Button.setActionCommand(\"kandang5\");\n kandang6Button.setActionCommand(\"kandang6\");\n rumputGratis1.setActionCommand(\"rumput\"+1);\n rumputGratis2.setActionCommand(\"rumput\"+2);\n rumputGratis3.setActionCommand(\"rumput\"+3);\n rumputGratis4.setActionCommand(\"rumput\"+4);\n rumputGratis5.setActionCommand(\"rumput\"+5);\n rumputGratis6.setActionCommand(\"rumput\"+6);\n rumputGratis7.setActionCommand(\"rumput\"+7);\n rumputGratis8.setActionCommand(\"rumput\"+8);\n rumputGratis9.setActionCommand(\"rumput\"+9);\n rumputGratis10.setActionCommand(\"rumput\"+10);\n papanBeliKandang.setActionCommand(\"papan1\");\n papanBelikandang2.setActionCommand(\"papan2\");\n papanBelikandang3.setActionCommand(\"papan3\");\n papanBelikandang4.setActionCommand(\"papan4\");\n papanBelikandang5.setActionCommand(\"papan5\");\n\n for (int i = 0; i < 10; i++) {\n getButtonRumput()[i].setVisible(false);\n }\n for (int i = 0; i < 5; i++) {\n getButtonPapan()[i].setVisible(false);\n }\n \n \n }", "void salirDelMazo() {\n mazo.inhabilitarCartaEspecial(this);\n }", "public beli_kredit() {\n initComponents();\n koneksitoko();\n }", "public final void mo25944h() {\n setVisibility(0);\n setStatus(2);\n }", "public Tampilan_Utama() {\n initComponents();\n initFrame();\n this.setLocationRelativeTo(null);\n jMenu5.setEnabled(false);\n jMenuItem1.setEnabled(true);\n jMenuItem5.setEnabled(false);\n jMenuItem6.setEnabled(false);\n jMenuItem7.setEnabled(false);\n jMenuItem10.setEnabled(false);\n adLbl.setVisible(false);\n adminLbl.setVisible(false);\n adminLbl.setText(\"\");\n logoutBtn.setVisible(false);\n \n }", "public beranda() {\n initComponents();\n koneksi DB = new koneksi();\n DB.config();\n con = DB.con;\n st = DB.stm;\n ShowDataStore();\n ShowPermintaanStore();\n ShowPermintaanGudang();\n ShowDataStoreKurang15();\n }", "private void limpiarCampos() {\n datoCriterio1.setText(\"\");\n ((DefaultTableModel)this.jTable1.getModel()).setRowCount(0);\n jBConcretarAccion.setEnabled(false);\n jBCancelar.setEnabled(false);\n jLObjetoSeleccionado.setText(\"\");\n this.unObjetoSeleccionado = null;\n }", "public void mantenimiento(){\n\t}", "private void deshabilitarFuncionalidades()\r\n\t{\r\n\t\t\r\n\t\tthis.lbMantenimientos.setVisible(false);\r\n\t\t\r\n\t\t\r\n\t\tthis.lbAdministracion.setVisible(false);\r\n\t\t\r\n\t\t\r\n\t\tthis.userButton.setVisible(false);\r\n\t\tthis.userButton.setEnabled(false);\r\n\t\t\r\n\t\tthis.gruposButton.setVisible(false);\r\n\t\tthis.gruposButton.setEnabled(false);\r\n\t\t\r\n\t\tthis.impuestoButton.setVisible(false);\r\n\t\tthis.impuestoButton.setEnabled(false);\r\n\t\t\r\n\t\tthis.empresaButton.setVisible(false);\r\n\t\tthis.empresaButton.setEnabled(false);\r\n\t\t\r\n\t\tthis.monedasButton.setVisible(false);\r\n\t\tthis.monedasButton.setEnabled(false);\r\n\t\t\r\n\t\tthis.rubros.setVisible(false);\r\n\t\tthis.rubros.setEnabled(false);\r\n\t\t\r\n\t\tthis.codigosGeneralizados.setVisible(false);\r\n\t\tthis.codigosGeneralizados.setEnabled(false);\r\n\t\t\r\n\t\tthis.documentosButton.setVisible(false);\r\n\t\tthis.documentosButton.setEnabled(false);\r\n\t\t\r\n\t\tthis.clientesButton.setVisible(false);\r\n\t\tthis.clientesButton.setEnabled(false);\r\n\t\t\r\n\t\tthis.funcionariosButton.setVisible(false);\r\n\t\tthis.funcionariosButton.setEnabled(false);\r\n\t\t\r\n\t\tthis.cotizaciones.setVisible(false);\r\n\t\tthis.cotizaciones.setEnabled(false);\r\n\t\t\r\n\t\tthis.tipoRubros.setVisible(false);\r\n\t\tthis.tipoRubros.setEnabled(false);\r\n\t\t\r\n\t\tthis.cuentas.setVisible(false);\r\n\t\tthis.cuentas.setEnabled(false);\r\n\t\t\r\n\t\tthis.bancos.setVisible(false);\r\n\t\tthis.bancos.setEnabled(false);\r\n\t\t\r\n\t\tthis.procesos.setVisible(false);\r\n\t\tthis.procesos.setEnabled(false);\r\n\t\t\r\n\t\tthis.gastos.setVisible(false);\r\n\t\tthis.gastos.setEnabled(false);\r\n\t\t\r\n\t\tthis.ingCobro.setVisible(false);\r\n\t\tthis.ingCobro.setEnabled(false);\r\n\t\t\r\n\t\tthis.ingEgreso.setVisible(false);\r\n\t\tthis.ingEgreso.setEnabled(false);\r\n\t\t\r\n\t\tthis.otroCobro.setVisible(false);\r\n\t\tthis.otroCobro.setEnabled(false);\r\n\t\t\r\n\t\tthis.otroEgreso.setVisible(false);\r\n\t\tthis.otroEgreso.setEnabled(false);\r\n\t\t\r\n\t\tthis.resumenProc.setVisible(false);\r\n\t\tthis.resumenProc.setEnabled(false);\r\n\t\t\r\n\t\tthis.periodo.setVisible(false);\r\n\t\tthis.periodo.setEnabled(false);\r\n\t\t\r\n\t\tthis.deposito.setVisible(false);\r\n\t\tthis.deposito.setEnabled(false);\r\n\t\t\r\n\t\tthis.factura.setVisible(false);\r\n\t\tthis.factura.setEnabled(false);\r\n\t\t\r\n\t\tthis.recibo.setVisible(false);\r\n\t\tthis.recibo.setEnabled(false);\r\n\t\t\r\n\t\tthis.notaCredito.setVisible(false);\r\n\t\tthis.notaCredito.setEnabled(false);\r\n\t\t\r\n\t\tthis.conciliacion.setVisible(false);\r\n\t\tthis.conciliacion.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnRepGastosPendCobro.setVisible(false);\r\n\t\tthis.btnRepGastosPendCobro.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnRepCheque.setVisible(false);\r\n\t\tthis.btnRepCheque.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnCheqADepositar.setVisible(false);\r\n\t\tthis.btnCheqADepositar.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnRepIva.setVisible(false);\r\n\t\tthis.btnRepIva.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnEstadoCuenta.setVisible(false);\r\n\t\tthis.btnEstadoCuenta.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnEstadoCuentaTotales.setVisible(false);\r\n\t\tthis.btnEstadoCuentaTotales.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnMovPorCuenta.setVisible(false);\r\n\t\tthis.btnMovPorCuenta.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnMovPorRubro.setVisible(false);\r\n\t\tthis.btnMovPorRubro.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnMovCaja.setVisible(false);\r\n\t\tthis.btnMovCaja.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnMovBco.setVisible(false);\r\n\t\tthis.btnMovBco.setEnabled(false);\r\n\t\t\r\n\t\t\r\n\t\tthis.btnRepGastosxProceso.setVisible(false);\r\n\t\tthis.btnRepGastosxProceso.setEnabled(false);\r\n\t}", "public void sogutucuyuKapat(){\n\t\tif(!(durum==false)){\n\t\t\tdurum = false;\n\t\t\tnotifyObservers();\n\t\t} else {\n\t\t\tnotifyObservers();\n\t\t}\n\t\t\n\t}", "public void bayar() {\n transaksi.setStatus(\"lunas\");\n setLunas(true);\n }", "public void isiPilihanDokter() {\n String[] list = new String[]{\"\"};\n pilihNamaDokter.setModel(new javax.swing.DefaultComboBoxModel(list));\n\n /*Mengambil data pilihan spesialis*/\n String nama = (String) pilihPoliTujuan.getSelectedItem();\n String kodeSpesialis = ss.serviceGetIDSpesialis(nama);\n\n /* Mencari dokter where id_spesialis = pilihSpesialis */\n tmd.setData(ds.serviceGetAllDokterByIdSpesialis(kodeSpesialis));\n int b = tmd.getRowCount();\n\n /* Menampilkan semua nama berdasrkan pilihan sebelumnya */\n pilihNamaDokter.setModel(new javax.swing.DefaultComboBoxModel(ds.serviceTampilNamaDokter(kodeSpesialis, b)));\n }", "void usada() {\n mazo.habilitarCartaEspecial(this);\n }", "public DashboardPondok() {\n initComponents();\n setExtendedState(JFrame.MAXIMIZED_BOTH);\n waktu();\n try {\n int kodee = 0;\n\n Koneksi_DB objkoneksi = new Koneksi_DB();\n Connection con = objkoneksi.bukakoneksi();\n Statement st = con.createStatement();\n String SQL = \"select kode from enabled\";\n ResultSet RS = st.executeQuery(SQL);\n while (RS.next()) {\n kodee = RS.getInt(1);\n }\n if (kodee == 11) {\n menusiswa.setEnabled(false);\n menumapel.setEnabled(false);\n menunilai.setEnabled(false);\n menuguru.setEnabled(false);\n menureport.setEnabled(true);\n menusetting.setEnabled(true);\n subuser.setEnabled(false);\n sublog.setEnabled(true);\n subclose.setEnabled(true);\n sublaporansantri.setEnabled(true);\n sublaporanguru.setEnabled(false);\n sublaporanall.setEnabled(true);\n } else if (kodee == 12) {\n menusiswa.setEnabled(false);\n menumapel.setEnabled(false);\n menunilai.setEnabled(true);\n menuguru.setEnabled(false);\n menureport.setEnabled(true);\n menusetting.setEnabled(true);\n subuser.setEnabled(false);\n sublog.setEnabled(true);\n subclose.setEnabled(true);\n } else if (kodee == 13) {\n menusiswa.setEnabled(true);\n menumapel.setEnabled(true);\n menunilai.setEnabled(true);\n menuguru.setEnabled(true);\n menureport.setEnabled(true);\n menusetting.setEnabled(true);\n subuser.setEnabled(true);\n sublog.setEnabled(true);\n subclose.setEnabled(true);\n }\n } catch (SQLException e) {\n }\n }", "public FormPencarianBuku() {\n initComponents();\n kosong();\n datatable();\n textfieldNamaFileBuku.setVisible(false);\n textfieldKodeBuku.setVisible(false);\n bukuRandom();\n }", "public void setdat()\n {\n }", "private void inizia() throws Exception {\n this.setNomeChiave(CHIAVE_NAV);\n this.setUsaNuovo(false);\n this.setUsaElimina(false);\n this.setUsaRicerca(true);\n this.setUsaSelezione(true);\n this.setUsaStampaLista(false);\n this.setUsaProietta(false);\n this.setAggiornamentoTotaliContinuo(true);\n }", "public void ativa()\n\t{\n\t\tativado = true;\n\t}", "public Pemilihan_Dokter() {\n initComponents();\n }", "public void actionPerformed(ActionEvent evt){ ////klik ALT+ENTER -> import actionPerformed ->TOP\n String nol_bulan=\"\";\n String nol_hari=\"\";\n String nol_jam=\"\";\n String nol_menit=\"\";\n String nol_detik=\"\";\n Calendar dt=Calendar.getInstance(); ////untuk mengambil informasi waktu\n \n int nilai_jam=dt.get(Calendar.HOUR_OF_DAY); ////3.Calendar.HOUR_OF_DAY digunakan untuk settingan jam\n int nilai_menit=dt.get(Calendar.MINUTE); ////4.Calendar.MINUTE digunakan untuk settingan menit\n int nilai_detik=dt.get(Calendar.SECOND); ////5.Calendar.SECOND digunakan untuk settingan detik\n \n \n if(nilai_jam<=9){\n nol_jam=\"0\";\n }\n if(nilai_menit<=9){\n nol_menit=\"0\";\n }\n if(nilai_detik<=9){\n nol_detik=\"0\";\n }\n \n String jam=nol_jam+Integer.toString(nilai_jam);\n String menit=nol_menit+Integer.toString(nilai_menit);\n String detik=nol_detik+Integer.toString(nilai_detik);\n jammm.setText(jam+\":\"+menit+\":\"+detik); ////6.Label dengan variabel \"jammm\" akan berubah sesuai settingan jam menit dan detik\n\n }", "public aplikasi_kun() {\n initComponents();\n }", "public void diminuiInSitu(){\n if(quantidade_in_situ>0)\n quantidade_in_situ--;\n else\n return;\n }", "private void setCurrentOperation(){ \r\n boolean isNamesVisible = true; //Valor logico si los campos de nombres y apellidos seran visibles\r\n Integer[] disables; //Se declara el arreglo que contendra las posiciones de la TOOLBAR que seran DESHABILITADOS para cada operacion\r\n loadToolBar(); //Se Refresca la barra de Herramientas\r\n lb_Title.setText(\"\"); //Se deja en blanco la etiqueta del Titulo\r\n //Se evalua el tipo de Operacion\r\n switch(tipoOperacion){\r\n case 0: //SOLO LECTURA \r\n tf_nroguia.setEditable(true);\r\n tf_nrorguia.setEditable(false);\r\n tf_chofer.setEditable(false);\r\n tf_veh1.setEditable(false);\r\n tf_veh2.setEditable(false);\r\n tf_ayud1.setEditable(false);\r\n tf_ayud2.setEditable(false);\r\n tf_cheqp.setEditable(false);\r\n tf_supruta.setEditable(false);\r\n\r\n dt_fcarga.setDisable(true);\r\n dt_relacion.setDisable(true);\r\n\r\n im_check.setVisible(false);\r\n im_val.setVisible(false);\r\n\r\n bt_c1.setDisable(true);\r\n bt_c2.setDisable(true);\r\n bt_c3.setDisable(true);\r\n bt_c4.setDisable(true);\r\n bt_c5.setDisable(true);\r\n bt_c6.setDisable(true);\r\n bt_c7.setDisable(true);\r\n\r\n //SE PERMITE: NUEVO, CANCELAR Y BUSCAR\r\n disables = new Integer[]{2,5,6,9,10};\r\n disableAllToolBar(disables); \r\n hb_1.setVisible(true);\r\n break;\r\n case 1: //NUEVO\r\n lb_Title.setText(\"NUEVO\");\r\n\r\n tf_nroguia.setEditable(false);\r\n tf_nrorguia.setEditable(true);\r\n\r\n dt_relacion.setDisable(false);\r\n\r\n im_check.setVisible(true);\r\n im_val.setVisible(false);\r\n\r\n //SE PERMITE: NUEVO,GUARDAR Y CANCELAR \r\n disables = new Integer[]{0,1,3,4,6,7,8,9,10,11};\r\n disableAllToolBar(disables); \r\n break;\r\n case 2: //EDITAR\r\n lb_Title.setText(\"EDITAR\");\r\n\r\n tf_nroguia.setEditable(false);\r\n tf_nrorguia.setEditable(true);\r\n\r\n dt_relacion.setDisable(false);\r\n \r\n im_check.setVisible(true);\r\n im_val.setVisible(false);\r\n \r\n //SE PERMITE: EDITAR,GUARDAR Y CANCELAR\r\n disables = new Integer[]{0,1,3,4,6,7,8,9,10,11};\r\n disableAllToolBar(disables); \r\n break;\r\n case 3: //GUARDAR\r\n tf_nroguia.setEditable(true);\r\n tf_nrorguia.setEditable(false);\r\n\r\n dt_relacion.setDisable(true);\r\n \r\n im_check.setVisible(false);\r\n im_val.setVisible(false);\r\n\r\n //SE PERMITE: GUARDAR Y CANCELAR\r\n disables = new Integer[]{0,1,3,4,6,7,8,9,10,11};\r\n disableAllToolBar(disables); \r\n break;\r\n case 4: //CAMBIAR STATUS \r\n tf_nroguia.setEditable(true);\r\n tf_nrorguia.setEditable(false);\r\n\r\n dt_relacion.setDisable(true);\r\n \r\n im_check.setVisible(false);\r\n im_val.setVisible(false);\r\n\r\n //SE PERMITE: GUARDAR,CAMBIO STATUS Y CANCELAR\r\n disables = new Integer[]{2,5,6,7,8,9,10};\r\n disableAllToolBar(disables); \r\n break;\r\n } \r\n init_FocusArray(tipoOperacion); \r\n Gui.getInstance().setTipoOperacion(tipoOperacion);\r\n }", "public void habilitaPanel() {\n\n\t\tthis.panelFondo.setEnabled(true);\n\t\tlabelImagen.setEnabled(true);\n\t\t//comboNombreCarta.setEnabled(true);\n\t\tthis.jScrollPane1.setEnabled(true);\n\t\tthis.jScrollPane1.getVerticalScrollBar().setEnabled(true);\n\t\tjScrollPane1.getHorizontalScrollBar().setEnabled(true);\n\t\tthis.jScrollPane2.setEnabled(true);\n\t\tthis.jScrollPane2.getVerticalScrollBar().setEnabled(true);\n\t\tjScrollPane2.getHorizontalScrollBar().setEnabled(true);\n\t\tlistaSeleccionadas.setEnabled(true);\n\t\tlistaDisponibles.setEnabled(true);\n\t\tthis.labelFondo.setEnabled(true);\n\t\ttextoNumeroCartas.setEnabled(true);\n\t\ttextoRaza.setEnabled(true);\n\t\tbotCargar.setEnabled(true);\n\t\tbotGuardar.setEnabled(true);\n\t\tbotGuardarComo.setEnabled(true);\n\t\tbotSalir.setEnabled(true);\n\t\tbotAyuda.setEnabled(true);\n\t\tbotNuevaBaraja.setEnabled(true);\n\t\ttextoBarajaCargada.setEnabled(true);\n\t\tthis.setEnabled(true);\n this.NumeroPuntos.setEnabled(true);\n\n\t}", "private void hienThi() {\n try {\n if (isInsert) {\n txtMaThucAn.setText(ThucPhamController.hienMa());\n txtMaThucAn.setEnabled(false);\n hienTrangThai();\n } else {\n txtMaThucAn.setText(tp.getMathucpham());\n txtMaThucAn.setEnabled(false);\n txtTenThucAn.setText(tp.getTenthucpham());\n jSpinSoLuong.setValue(tp.getSoluong());\n String sDonGia = Integer.toString((int) tp.getDongia());\n txtDonGia.setText(sDonGia);\n hienTrangThai();\n if (tp.getTrangthai() == 1) {\n cbbTrangThai.setSelectedIndex(0);\n } else {\n cbbTrangThai.setSelectedIndex(1);\n }\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tpartie.setDefausse(true);\n\t\t}", "private void limparComponentes() {\n textCodigo.setText(\"0\");\n textDescricao.setText(\"\");\n tableCategorias.clearSelection();\n }", "public void hapusDataProduk(){\n loadDataProduk(); \n \n //Beri peringatan sebelum melakukan penghapusan data\n int pesan = JOptionPane.showConfirmDialog(null, \"HAPUS DATA\"+ kode_barang +\"?\",\"KONFIRMASI\", JOptionPane.OK_CANCEL_OPTION);\n \n //jika pengguna memilih OK lanjutkan proses hapus data\n if(pesan == JOptionPane.OK_OPTION){\n //uji koneksi\n try{\n //buka koneksi ke database\n Statement stat = (Statement) koneksi.getKoneksi().createStatement();\n \n //perintah hapus data\n String sql = \"DELETE FROM barang WHERE kode_barang='\"+ kode_barang +\"'\";\n PreparedStatement p =(PreparedStatement)koneksi.getKoneksi().prepareStatement(sql);\n p.executeUpdate();\n \n //fungsi ambil data\n getDataProduk();\n \n //fungsi reset data\n reset();\n JOptionPane.showMessageDialog(null, \"DATA BARANG BERHASIL DIHAPUS\");\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage());\n }\n }\n \n }", "public void cambiarVisibilidad(int opcion){\n if(opcion==1){\n vistaInicial.jpCentral.setVisible(true);\n vistaInicial.jpDerecha.setVisible(true);\n vistaInicial.jpCentralGeneral.setVisible(false);\n }else{\n vistaInicial.jpCentral.setVisible(false);\n vistaInicial.jpDerecha.setVisible(false);\n vistaInicial.jpCentralGeneral.setVisible(true);\n }\n }", "public void novaIgra() {\r\n\t\tbroj_slobodnih = 16;\r\n\t\tfor(int i = 0 ; i < 4 ; i++)\r\n\t\t\tfor(int j = 0 ; j < 4 ; j++)\r\n\t\t\t\ttabela[i][j] = 0;\r\n\t\tpobjeda = false;\r\n\t\tigrajPoslijePobjede = false;\r\n\t\tgenerisiPolje();\r\n\t\tgenerisiPolje();\r\n\t}", "private void xuLyThanhToanDVReload() {\n txtThanhToanDVGiaDV.setText(\"\");\n txtThanhToanDVSoLuong.setText(\"\");\n txtThanhToanDVSoLuongMoi.setText(\"\");\n txtThanhToanDVSoLuongCu.setText(\"\");\n txtThanhToanTongCong.setText(\"0\");\n tongCong=0;\n cbbThanhToanMaKH.removeAllItems();\n hienThiMaKHSuDungDV();\n }", "void tampilKarakterA();", "@Override\n\tpublic void nhanTinNhan() {\n\n\t}", "private void setTVnotication()\n {\n if(countnoti == 0)\n {\n tv_none_notification.setVisibility(View.VISIBLE);\n }\n else\n if(countnoti > 0)\n {\n tv_none_notification.setVisibility(View.GONE);\n }\n }", "public FmKlijent() {\n initComponents();\n// napuniKombo();\n// srediTabelu();\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private void limpiar()\n {\n this.jButton1.setEnabled(true);\n \n jTextField3.setText(\"\"); \n jTextField1.setText(\"\");\n cbPro.setSelectedItem(\"Seleccione...\");\n txtmac.setText(\"\"); \n cbMarca.setSelectedItem(\"Seleccione...\"); \n cbEstado.setSelectedItem(\"Seleccione...\"); \n cbAlm.setSelectedItem(\"Seleccione...\"); \n bxRam.setSelectedItem(\"Seleccione...\"); \n cbAcces.setSelectedItem(\"Seleccione...\");\n }", "@Override\r\n\tpublic void 자기() {\n\t\tSystem.out.println(\"잠을 잔다\");\r\n\t}", "public void trenneVerbindung();", "@Override\n\tpublic void setVisible(boolean arg0) {\n\n\t\tlistRestoreSelectedModel.removeAllElements();\n\t\tlistBackupAllTablesModel.removeAllElements();\n\t\tlistRestoreupAllTablesModel.removeAllElements();\n\t\tlistBackupSelectedModel.removeAllElements();\n\t\tgetLabelFileOperationStatus().setText(\"Status: Idle\");\n\t\tif (arg0)\n\t\t\tpopulateAvailableTables();\n\n\t\tsuper.setVisible(arg0);\n\t}", "public void setLabelEstados(int pokemon){\r\n if(pokemon ==0){\r\n if(pokemon_activo1.getConfuso() == true) vc.setjL_Estado1(\"Confuso\");\r\n else if(pokemon_activo1.getCongelado()== true) vc.setjL_Estado1(\"Congelado\");\r\n else if(pokemon_activo1.getDormido()== true) vc.setjL_Estado1(\"Dormido\");\r\n else if(pokemon_activo1.getEnvenenado()== true) vc.setjL_Estado1(\"Envenenado\");\r\n else if(pokemon_activo1.getParalizado()== true) vc.setjL_Estado1(\"Paralizado\");\r\n else if(pokemon_activo1.getQuemado()== true) vc.setjL_Estado1(\"Quemado\");\r\n else if(pokemon_activo1.getCongelado() == false && pokemon_activo1.getDormido() == false && pokemon_activo1.getEnvenenado() == false && \r\n pokemon_activo1.getParalizado() == false && pokemon_activo1.getQuemado() == false){\r\n vc.setjL_Estado1(\"Normal\");\r\n }\r\n }\r\n if(pokemon ==1){\r\n if(pokemon_activo2.getConfuso() == true) vc.setjL_Estado2(\"Confuso\");\r\n else if(pokemon_activo2.getCongelado()== true) vc.setjL_Estado2(\"Congelado\");\r\n else if(pokemon_activo2.getDormido()== true) vc.setjL_Estado2(\"Dormido\");\r\n else if(pokemon_activo2.getEnvenenado()== true) vc.setjL_Estado2(\"Envenenado\");\r\n else if(pokemon_activo2.getParalizado()== true) vc.setjL_Estado2(\"Paralizado\");\r\n else if(pokemon_activo2.getQuemado()== true) vc.setjL_Estado2(\"Quemado\");\r\n else if(pokemon_activo2.getCongelado() == false && pokemon_activo2.getDormido() == false && pokemon_activo2.getEnvenenado() == false && \r\n pokemon_activo2.getParalizado() == false && pokemon_activo2.getQuemado() == false){\r\n vc.setjL_Estado2(\"Normal\");\r\n }\r\n }\r\n }", "@Override\n public void memoria() {\n \n }", "public void atakuj() {\n\n System.out.println(\"to metoda atakuj z klasy Potwor \");\n\n }", "public void cambiarEstado(){\n\r\n revelado=true;\r\n }", "@Override\r\n\tprotected void initVentajas() {\n\r\n\t}", "public void anuncio() {\n\n\t\tapp.image(pantallaEncontrado, 197, 115, 300, 150);\n\n\t\tapp.image(botonContinuar, 253, 285);\n\n\t}", "public ListBahanKosong_View() {\n initComponents();\n controller = new ListBahanKosong_Controller(this);\n controller.isiTabel();\n controller.Item();\n controller.ItemLow();\n controller.ItemOut();\n model = (DefaultTableModel)tbl_data.getModel();\n setExtendedState(JFrame.MAXIMIZED_BOTH);\n }", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }", "public hesapekrani() {\n initComponents();\n getedits();\n \n \n }", "public void themesa()\n {\n \n \n \n \n }", "private void limpaTela() {\n txfNomeGrupo.setText(\"\");\n ftfValorViagem.setText(\"0\");\n ftfDataSaida.setText(\"\");\n ftfHoraSaida.setText(\"\");\n ftfDataRetorno.setText(\"\");\n ftfHoraRetorno.setText(\"\");\n\n txfNumPessoas.setText(\"\");\n txfIntegrante.setText(\"\");\n\n txfNomeGrupo.setBackground(null);\n ftfValorViagem.setBackground(Color.white);\n ftfDataSaida.setBackground(Color.white);\n ftfHoraSaida.setBackground(Color.white);\n ftfDataRetorno.setBackground(Color.white);\n ftfHoraRetorno.setBackground(Color.white);\n txfNumPessoas.setBackground(null);\n txfIntegrante.setBackground(Color.white);\n\n }", "@Override\n\tpublic void naoAtirou() {\n\t\tatirou=false;\n\n\t}" ]
[ "0.67283756", "0.66400015", "0.6504073", "0.6489299", "0.6399456", "0.6331666", "0.62710947", "0.6221071", "0.620584", "0.618479", "0.6136403", "0.61355734", "0.6121654", "0.61155546", "0.61064667", "0.61014605", "0.6090265", "0.6087239", "0.6086301", "0.6064314", "0.60579854", "0.6041846", "0.60333914", "0.6031189", "0.6030459", "0.601606", "0.6007212", "0.59957695", "0.59714985", "0.59626794", "0.5958444", "0.5956704", "0.5924418", "0.59221804", "0.592031", "0.59147215", "0.5908892", "0.59040755", "0.59021384", "0.58978164", "0.58970445", "0.5886575", "0.5884298", "0.5883681", "0.5867103", "0.58670104", "0.5866998", "0.58465695", "0.5844172", "0.5833505", "0.58323556", "0.5829975", "0.5826815", "0.58259904", "0.58034134", "0.57997245", "0.57935697", "0.5791758", "0.57836145", "0.57832974", "0.57795596", "0.5777608", "0.5775659", "0.57666767", "0.575789", "0.5751055", "0.5750523", "0.57502466", "0.5744377", "0.57332134", "0.5732265", "0.5722499", "0.57175905", "0.5714535", "0.57119113", "0.5705089", "0.5701858", "0.5686946", "0.56865114", "0.5686028", "0.56792814", "0.56752074", "0.5671406", "0.5669908", "0.5669837", "0.56680536", "0.5659423", "0.56542253", "0.56535214", "0.5653487", "0.5652752", "0.5650271", "0.5650074", "0.5648729", "0.564491", "0.5643223", "0.5640406", "0.563737", "0.56353885", "0.5632146", "0.5629871" ]
0.0
-1
Returns the URL of the unproxied field data server. (this should really be downloaded by the proxy, but it's not at this point).
public String getUnproxiedFieldDataServerUrl() { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx); String hostName = prefs.getString("serverHostName", ""); String context = "bdrs-core";//prefs.getString("contextName", ""); String path = prefs.getString("path", ""); StringBuilder url = new StringBuilder(); url.append("http://").append(hostName).append("/").append(context); if (path.length() > 0) { url.append("/").append(path); } return url.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getServerUrl() {\r\n return this.fedoraBaseUrl;\r\n }", "public String getURL() {\r\n\t\treturn dURL.toString();\r\n\t}", "public String getServerUrl()\n {\n return null;\n }", "public String getServerUrl() {\n return props.getProperty(\"url\");\n }", "public String getServerUrl() {\n return ipAddress;\n }", "public static final String getDataServerUrl() {\n\t\treturn \"http://uifolder.coolauncher.com.cn/iloong/pui/ServicesEngineV1/DataService\";\n\t}", "public String getUrl() {\n\t\tif (prop.getProperty(\"url\") == null)\n\t\t\treturn \"\";\n\t\treturn prop.getProperty(\"url\");\n\t}", "public String url() {\n return server.baseUri().toString();\n }", "private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}", "@java.lang.Override\n public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n url_ = s;\n return s;\n }\n }", "public String getUrl() {\n Object ref = url_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n url_ = s;\n }\n return s;\n }\n }", "public String getUrl() {\n Object ref = url_;\n if (!(ref instanceof String)) {\n String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getURL() {\n\t\treturn prop.getProperty(\"URL\");\n\t}", "@Override\n\tpublic String getURL() {\n\t\treturn null;\n\t}", "public String getRemoteURL(){\r\n\t\treturn this.remoteURL;\r\n\t}", "public String getServerURL() {\n return serverURL;\n }", "public String getURL()\n {\n return getURL(\"http\");\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getUrlBytes() {\n return instance.getUrlBytes();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getUrlBytes() {\n return instance.getUrlBytes();\n }", "public String getServerUrl() {\n return mServerUrl;\n }", "public String getServerURI() {\n return settings.getString(\"server_url\", DEFAULT_SERVER_URL);\n }", "public String getUrl() {\n Object ref = url_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getUrl() {\n Object ref = url_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n url_ = s;\n return s;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n url_ = s;\n }\n return s;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n url_ = s;\n }\n return s;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n url_ = s;\n }\n return s;\n }\n }", "protected final String getServerUrl() {\n return this.serverUrl;\n }", "public static String getURL() {\n\t return getURL(BackOfficeGlobals.ENV.NIS_USE_HTTPS, BackOfficeGlobals.ENV.NIS_HOST, BackOfficeGlobals.ENV.NIS_PORT);\n\t}", "public final String getUrl() {\n return properties.get(URL_PROPERTY);\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getUrlBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(url_);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getUrlBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(url_);\n }", "public String getUrlDataFile() {\n\t\treturn urlDataFile;\n\t}", "@java.lang.Override\n public java.lang.String getUrl() {\n return instance.getUrl();\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return instance.getUrl();\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n url_ = s;\n return s;\n }\n }", "@Override\r\n\tpublic String getUrl() {\n\t\treturn null;\r\n\t}", "@java.lang.Override\n public java.lang.String getUrl() {\n return url_;\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return url_;\n }", "protected String getServerUrl() {\r\n\t\treturn server;\r\n\t}", "public String getURL(){\r\n\t\t \r\n\t\t\r\n\t\treturn rb.getProperty(\"url\");\r\n\t}", "@Override\n public String getUrl() {\n return getOriginUrl();\n }", "public java.lang.String getURL() {\n return URL;\n }", "public String getDN() {\n\t\treturn url.getDN();\n }", "public URL getServer() {\n\t\treturn null;\n\t}", "public java.lang.String getURL() {\n return uRL;\n }", "public String getUrl() { /* (readonly) */\n return mUrl;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getUrlBytes() {\n java.lang.Object ref = url_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n url_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getBaseUrl() {\n StringBuffer buf = new StringBuffer();\n buf.append(getScheme());\n buf.append(\"://\");\n buf.append(getServerName());\n if ((isSecure() && getServerPort() != 443) ||\n getServerPort() != 80) {\n buf.append(\":\");\n buf.append(getServerPort());\n }\n return buf.toString();\n }", "public java.lang.String getBaseUrl() {\n return bugQuery.getBaseUrl();\n }", "@Override\r\n public String getURL() {\n return url;\r\n }", "String getServerUrl();", "public String getNonProxyHosts() {\n return nonProxyHosts;\n }", "public String getNonProxyHosts() {\n return nonProxyHosts;\n }", "private String makeServerUrl(){\n\t\tURL url = null;\n\t\t\n\t\t//Make sure we have a valid url\n\t\tString complete = this.preferences.getString(\"server\", \"\");\n\t\ttry {\n\t\t\turl = new URL( complete );\n\t\t} catch( Exception e ) {\n\t\t\tonCreateDialog(DIALOG_INVALID_URL).show();\n\t\t\treturn null;\n\t\t}\n\t\treturn url.toExternalForm();\n\t}", "public String getNetShowUrl() throws ServiceLocalException {\n\t\treturn (String) this.getPropertyBag().getObjectFromPropertyDefinition(\n\t\t\t\tAppointmentSchema.NetShowUrl);\n\t}", "public String getUrl()\n\t\t{\n\t\t\treturn \"https://www.zohoapis.eu\";\n\t\t}", "public URI getInternalURL() {\n return internalURL;\n }", "public String getServerUrl() {\n\t return Config.SERVER_URL;\n }", "@Override\r\n public String getUrl()\r\n {\n return null;\r\n }", "public java.lang.String getProxyHost()\r\n {\r\n return proxyHost;\r\n }", "public String getUrl() {\r\n\t\treturn url;\r\n\t}", "public String getUrl() {\r\n\t\treturn url;\r\n\t}", "public String getURL() {\r\n\t\treturn url;\r\n\t}", "public java.lang.String getUrl () {\r\n\t\treturn url;\r\n\t}", "public String getURL() {\n\t\treturn URL;\n\t}", "public String getHostURL() {\n return getHostURL(PAActiveObject.getActiveObjectNodeUrl(PAActiveObject.getStubOnThis()));\n }", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String get_url() throws Exception {\n\t\treturn this.url;\n\t}", "public String getUrl() {\r\n\t\t\treturn url;\r\n\t\t}", "public String getURL() {\n\t\treturn RequestConstants.BASE_IMAGE_URL+_url;\n\t}", "public String getUrl() {\n\t\treturn this.url;\n\t}", "public URL getUrl() {\n try {\n StringBuilder completeUrlBuilder = new StringBuilder();\n completeUrlBuilder.append(getBaseEndpointPath());\n completeUrlBuilder.append(path);\n if (requestType == HttpRequest.NetworkOperationType.GET && parameters != null) {\n boolean first = true;\n for (String key : parameters.keySet()) {\n if (first) {\n first = false;\n completeUrlBuilder.append(\"?\");\n } else {\n completeUrlBuilder.append(\"&\");\n }\n completeUrlBuilder.append(key).append(\"=\").append(parameters.get(key));\n }\n }\n return new URL(completeUrlBuilder.toString());\n } catch (MalformedURLException exception) {\n LocalizableLog.error(exception);\n return null;\n }\n }", "public String getURL() {\n\t\treturn url;\n\t}", "public String getUrl()\n\t\t{\n\t\t\treturn \"https://sandbox.zohoapis.eu\";\n\t\t}", "public String getUrl() {\n\t\t\treturn url;\n\t\t}", "@Api(1.2)\n @NonNull\n public String url() {\n return mRequest.buildOkRequest().url().toString();\n }", "public String getURL(){\r\n\t\tString url = \"rmi://\";\r\n\t\turl += this.getAddress()+\":\"+this.getPort()+\"/\";\r\n\t\treturn url;\r\n\t}", "public String getURL() {\r\n return url;\r\n }", "public java.lang.String getUrl() {\n return url;\n }", "public String getUrl() {\n return _Web_search.getBaseUrl() + getQuery();\n }", "public String getHttpProxyHost();", "public String getURL() {\n return url;\n }", "public String getSourceDownloadUrl();", "public String getUrl() {\n return this.Url;\n }", "@Nonnull public String getURL() {\n return url;\n }", "java.net.URL getUrl();" ]
[ "0.64248013", "0.6379213", "0.62995017", "0.6298492", "0.6234547", "0.6197112", "0.6140422", "0.6085308", "0.60813683", "0.6066307", "0.60497713", "0.6038381", "0.6025874", "0.6022919", "0.60156715", "0.6014221", "0.5999225", "0.5983523", "0.5983523", "0.5973316", "0.59730387", "0.5969341", "0.5956089", "0.5956089", "0.5954999", "0.59539175", "0.59499526", "0.5929863", "0.5929863", "0.5919409", "0.59173423", "0.5904467", "0.5899996", "0.5899996", "0.5898552", "0.58763355", "0.58763355", "0.587473", "0.587131", "0.587131", "0.5867185", "0.5862761", "0.58525056", "0.58525056", "0.5838099", "0.5826678", "0.58210856", "0.5818895", "0.5817826", "0.5781588", "0.5769037", "0.5767545", "0.57608616", "0.5745349", "0.574435", "0.5742652", "0.57384557", "0.57310796", "0.57310796", "0.5722758", "0.57163066", "0.5713662", "0.5682593", "0.56774247", "0.56764716", "0.56684047", "0.56638056", "0.56638056", "0.56561774", "0.5651023", "0.56483674", "0.5646334", "0.56433433", "0.56433433", "0.56433433", "0.56433433", "0.56433433", "0.56433433", "0.56433433", "0.56433433", "0.56433433", "0.56375784", "0.563636", "0.5632535", "0.5619566", "0.5616455", "0.5612968", "0.5612594", "0.5611185", "0.56037873", "0.5602798", "0.5598799", "0.5589228", "0.5586712", "0.5575692", "0.5575056", "0.55726784", "0.55601907", "0.5557132", "0.5555728" ]
0.84153795
0
Overload test for one inetger parameter
void test(int a){ System.out.println("a: "+a); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasSubnetRequest();", "private static boolean valid(String arg) {\n\n /* check if valid option */\n if ( arg.equals(\"-v\") || arg.equals(\"-i\") || arg.equals(\"-p\") || arg.equals(\"-h\") )\n return true;\n\n /* check if valid port */\n try {\n int port = Integer.parseInt(arg);\n if ( ( 0 < port ) && ( port < 65354 ) )\n return true;\n } catch (NumberFormatException ignored) {}\n\n /* check if valid ip address */\n String[] ips = arg.split(\"\\\\.\");\n if ( ips.length != 4 )\n return false;\n try{\n for (int i=0; i<4; i++){\n int ip = Integer.parseInt(ips[i]);\n if ( ( ip < 0) || (255 < ip ) )\n return false;\n }\n } catch (NumberFormatException ignored) {return false;}\n\n return true;\n }", "public boolean hasParameter(String name) throws IllegalArgumentException {\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"hasParameter() \");\n Via via=(Via)sipHeader;\n \n if(name == null) throw new IllegalArgumentException\n (\"JAIN-EXCEPTION: null parameter\");\n return via.hasParameter(name);\n }", "protected abstract boolean isValidParameter(String parameter);", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkProtocol() {\n\t\tboolean flag = oTest.checkProtocol();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn false;\r\n\t}", "private static String type(String arg) {\n if ( arg.contains(\".\") )\n return \"ip\";\n try {\n Integer.parseInt(arg);\n return \"port\";\n } catch (NumberFormatException ignored) {\n return arg;\n }\n }", "public static void CheckIfParametersAreValid(String args[]) {\n if (args.length != 4) {\n System.err.printf(\"usage: %s server_name port\\n\", args[1]);\n System.exit(1);\n }\n\n IP = args[0];\n PORT = Integer.parseInt(args[1]);\n BUFFER_SIZE = Integer.parseInt(args[2]);\n MSG_RATE = Integer.parseInt(args[3]);\n\n\n String[] ipSeparated = args[0].split(\"\\\\.\");\n\n if(ipSeparated.length<4){\n System.out.println(\"Invalid IP format.\");\n System.exit(1);\n }\n if (ipSeparated.length == 4) {\n\n for (int i = 0; i < ipSeparated.length; i++) {\n if (Integer.valueOf(ipSeparated[i]) < 0 || Integer.valueOf(ipSeparated[i]) > 255 ) {//if ip is not complete i get error\n System.out.println(\"Invalid IP format.\");\n System.exit(1);\n }else {\n IP = args[0];\n }\n }\n }\n\n if (Integer.parseInt(args[1])>= 0 && Integer.parseInt(args[1]) < 65535) {\n PORT = Integer.parseInt((args[1]));\n }\n else {\n System.out.println(\"Invalid PORT Number.\");\n System.exit(1);\n }\n if (Integer.parseInt(args[2]) > 0 || Integer.parseInt(args[2]) < 2048) {\n BUFFER_SIZE = Integer.parseInt((args[2]));\n }\n\n else {\n System.out.println(\"Invalid Buffer Size.\");\n System.exit(1);\n }\n if (Integer.parseInt(args[3]) >= 0) {\n MSG_RATE = Integer.parseInt(args[3]);\n } else {\n System.out.println(\"Message RATE Invalid.\");\n System.exit(1);\n }\n\n }", "public abstract boolean a(e parame, b paramb, int paramInt1, int paramInt2);", "int expectIntParameter(String strParamName);", "public void isMethod(org.zoolu.sip.dialog.InviteDialog isParameter, String isParameter, String isParameter, Message isParameter);", "public static void CheckIfParametersAreValid(String args[]) {\n\t\tif (args.length != 4) {\n\t\t\tSystem.err.printf(\"usage: %s server_name port\\n\", args[1]);\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tIP = args[0];\n\t\tPORT = Integer.parseInt(args[1]);\n\t\tBUFFER_SIZE = Integer.parseInt(args[2]);\n\t\tMSG_RATE = Integer.parseInt(args[3]);\n\n\t\t//Validating Ip - Splitting the ip in 4 numbers because they are dividied by \". \" when we get from input\n\t\tString[] ipSeparated = args[0].split(\"\\\\.\");\n\n\t\tif(ipSeparated.length<4 ){\n\t\t\tSystem.out.println(\"Invalid IP format.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tif (ipSeparated.length == 4) {\n\n\t\t\tfor (int i = 0; i < ipSeparated.length; i++) {\n\t\t\t\tif (Integer.valueOf(ipSeparated[i]) < 0 || Integer.valueOf(ipSeparated[i]) > 255 ) {//if ip is not complete i get error\n\t\t\t\t\tSystem.out.println(\"Invalid IP format.\");\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}else {\n\t\t\t\t\tIP = args[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Validating Port - The Port number has to be between 0 adn 65535\n\t\tif (Integer.parseInt(args[1])>= 0 && Integer.parseInt(args[1]) < 65535) {\n\t\t\tPORT = Integer.parseInt((args[1]));\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Invalid PORT Number.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t//Validating Buffer - The Buffer Size ahs to be between 0 and 2048\n\t\tif (Integer.parseInt(args[2]) > 0 || Integer.parseInt(args[2]) < 2048) {\n\t\t\tBUFFER_SIZE = Integer.parseInt((args[2]));\n\t\t}\n\n\t\telse {\n\t\t\tSystem.out.println(\"Invalid Buffer Size.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t//Checking the parameter order of the deserved place for message rate\n\t\tif (Integer.parseInt(args[3]) >= 0) {\n\t\t\tMSG_RATE = Integer.parseInt(args[3]);\n\t\t} else {\n\t\t\tSystem.out.println(\"Message RATE Invalid.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t}", "@Test\n\tpublic void testGetRequestParameter() {\n\t}", "public void testgetParameter() throws Exception {\n\r\n\t}", "public boolean isValue(Class<?> paramClass) {\n/* 125 */ if (paramClass == null) {\n/* 126 */ throw new IllegalArgumentException();\n/* */ }\n/* */ \n/* 129 */ return (\n/* 130 */ !paramClass.isInterface() && Serializable.class\n/* 131 */ .isAssignableFrom(paramClass) && \n/* 132 */ !Remote.class.isAssignableFrom(paramClass));\n/* */ }", "public void testGetPort() {\n }", "boolean isBadCommunication();", "boolean hasParameterValue();", "boolean hasParameterName();", "abstract void addressValidity();", "boolean hasSubnetResponse();", "public void checkParameters() {\n }", "@Override\n public boolean validate(final String param) {\n return false;\n }", "private static boolean paramValid(String paramName,String paramValue){\n return paramName!=null&&paramName.length()>0&&paramValue!=null&&paramValue.length()>0;\n }", "public boolean hasParam(String paramName);", "boolean hasBitcoinAddress();", "boolean hasParameters();", "@Override\n public boolean isCommunicte(String addr) {\n return mCommunciation.isCommunicte(addr);\n }", "@Override\n\tpublic boolean isParam() {\n\t\treturn false;\n\t}", "public boolean testParametertakesprecedence(EIfcdoorstyle type) throws SdaiException;", "boolean hasProtocol();", "private void validateInputParameters(){\n\n }", "boolean testConnection(RemoteService service);", "protected abstract boolean matches(String paramString, int paramInt);", "static int type_of_rp(String passed){\n\t\treturn 1;\n\t}", "public interface CallbackClientIntf extends Remote \n{ \n public static final String NAME = \"CallbackClientIntf\";\n\t\n public boolean IsGoodObject(Object Obj1, Object Obj2) throws RemoteException;\n public boolean IsRightValue(long val1, long val2) throws RemoteException, Exception;\n\n}", "public void testRetrieveAddress() throws Exception {\r\n try {\r\n this.dao.retrieveAddress(-1);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "public boolean hasParameters() {\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"hasParameters()\");\n Via via=(Via)sipHeader;\n \n return via.hasParameters();\n }", "@Test\n public void testWithNonEmptyString() throws org.nfunk.jep.ParseException\n {\n Stack<Object> parameters = CollectionsUtils.newParametersStack(\"test\");\n function.run(parameters);\n assertEquals(FALSE, parameters.pop());\n }", "@Test\n public void testInvokingStringMethodAndEvaluateWithWrongValue() {\n\n // Calling the String-Method and it should be avaluated with an int, the result should be false\n MethodInvokingEventCondition invokingEventCondition = new MethodInvokingEventCondition(DummyAdapterEvent.class,\n DummyAdapterEvent.METHOD_RETURNS_STRING, INT_TO_MATCH);\n\n Assert.assertFalse(invokingEventCondition.evaluate(dummyAdapterEvent));\n }", "private static boolean portsMatch(ServicePort servicePort, IntOrString intOrString) {\n if (intOrString != null) {\n Integer port = servicePort.getPort();\n Integer intVal = intOrString.getIntVal();\n String strVal = intOrString.getStrVal();\n if (intVal != null) {\n if (port != null) {\n return port.intValue() == intVal.intValue();\n } else {\n /// should we find the port by name now?\n }\n } else if (strVal != null ){\n return Objects.equal(strVal, servicePort.getName());\n }\n }\n return false;\n }", "public boolean test(String a, String b)\n\t{\n\t\treturn false;\n\t}", "public void testSearchAddresses() throws Exception {\r\n try {\r\n this.dao.searchAddresses(null);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "private void checkParams(String[] params) throws MethodCallWithNonexistentParameter,\n OutmatchingParametersToMethodCall, OutmatchingParameterType, InconvertibleTypeAssignment {\n ArrayList<Variable> methodParams = this.method.getMethodParameters();\n if (params.length != methodParams.size()) {\n // not enough params somewhere, or more than enough.\n throw new OutmatchingParametersToMethodCall();\n }\n int i = 0;\n for (String toBeParam : params) {\n toBeParam = toBeParam.trim();\n Variable toBeVariable = findParamByName(toBeParam);\n VariableVerifier.VerifiedTypes type = methodParams.get(i).getType();\n if (toBeVariable == null) {\n VariableVerifier.VerifiedTypes typeOfString = VariableVerifier.VerifiedTypes.getTypeOfString(toBeParam);\n if (!type.getConvertibles().contains(typeOfString)) {\n throw new MethodCallWithNonexistentParameter();\n }\n } else {\n checkTypes(toBeVariable, methodParams.get(i));\n checkValue(toBeVariable);\n }\n i++;\n }\n }", "public abstract boolean isAppropriateRequest(Request request);", "public Boolean test(String input);", "boolean hasForwardingParams();", "static int type_of_call(String passed){\n\t\treturn 1;\n\t}", "public boolean validateStorageProviderConnection(String ipAddress, Integer portNumber, String interfaceType);", "static void test1 (int port) throws Exception {\n server = new ServerSocket (port);\n if (port == 0) {\n port = server.getLocalPort();\n }\n // try Ipv6 only\n c1 = new Socket (\"::1\", port);\n s1 = server.accept ();\n simpleDataExchange (c1, s1);\n s1.close ();\n c1.close();\n // try with both IPv4 and Ipv6\n c1 = new Socket (\"127.0.0.1\", port);\n c2 = new Socket (\"::1\", port);\n s1 = server.accept();\n s2 = server.accept();\n s1peer = s1.getInetAddress();\n s2peer = s2.getInetAddress();\n if (s1peer instanceof Inet6Address) {\n t_assert ((s2peer instanceof Inet4Address));\n simpleDataExchange (c2, s1);\n simpleDataExchange (c1, s2);\n } else {\n t_assert ((s2peer instanceof Inet6Address));\n simpleDataExchange (c1, s1);\n simpleDataExchange (c2, s2);\n }\n c1.close();\n c2.close();\n s1.close();\n s2.close();\n server.close ();\n System.out.println (\"Test1: OK\");\n }", "void shouldThrowForBadServerValue() {\n }", "static int type_of_out(String passed){\n\t\treturn 1;\n\t}", "@Test\n public void iPAddressIsBotTest() throws Exception {\n String value = null;\n BotCheckResponse response = api.iPAddressIsBot(value);\n\n // TODO: test validations\n }", "public void testRetrieveAddresses() throws Exception {\r\n try {\r\n this.dao.retrieveAddresses(new long[]{-1});\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "protected boolean requireArgument(Node node, int idx, String argName)\n {\n if (!hasArgument(node, idx)) {\n rsvc.error(\"#\" + getName() + \"() error : \" + argName + \" argument required\");\n return false;\n }\n return true;\n }", "boolean hasEndpoint();", "@Test\n public void execute_addressParameter() throws ParseException {\n //No user input\n execute_parameterPredicate_test(0, \" \", \"addr\", true, false, Collections.emptyList());\n //Single keyword, ignore case, people found.\n execute_parameterPredicate_test(3, \"ave\", \"addr\", true, false, Arrays.asList(ALICE, BENSON, ELLE));\n //Single keyword, case sensitive, people found.\n execute_parameterPredicate_test(2, \"Ave\", \"addr\", false, false, Arrays.asList(ALICE, BENSON));\n //Multiple keywords, ignore case, or condition, multiple people found\n execute_parameterPredicate_test(2, \"jurong Clementi\", \"addr\", true, false, Arrays.asList(ALICE, BENSON));\n //Multiple keywords, ignore case, and condition, no one found\n execute_parameterPredicate_test(0, \"jurong Clementi\", \"addr\", true, true, Collections.emptyList());\n //Multiple keywords, case sensitive, or condition, multiple people found\n execute_parameterPredicate_test(1, \"jurong Clementi\", \"addr\", false, false, Arrays.asList(BENSON));\n //Multiple keywords, case sensitive, and condition, no one found\n execute_parameterPredicate_test(0, \"jurong Clementi\", \"addr\", false, true, Collections.emptyList());\n }", "boolean hasIp();", "boolean hasIp();", "boolean hasIp();", "boolean hasIp();", "public abstract boolean mo9094a(Request request);", "protected void a(int paramInt1, int paramInt2, boolean paramBoolean, yz paramyz) {}", "public boolean isRemoteInterface(Class paramClass) {\n/* 98 */ boolean bool = true;\n/* */ try {\n/* 100 */ validateRemoteInterface(paramClass);\n/* 101 */ } catch (IDLTypeException iDLTypeException) {\n/* 102 */ bool = false;\n/* */ } \n/* */ \n/* 105 */ return bool;\n/* */ }", "public void testGetEndPoint2() throws Exception {\n if(DEBUG_FLAG) System.out.println(\"entered testGetEndPoint2\");\n Ivorn ivorn = new Ivorn(\"ivo://org.test/org.astrogrid.registry.RegistryService\");\n String url = rs.getEndPointByIdentifier(ivorn);\n assertNotNull(url);\n assertTrue(url.startsWith(\"http\")); \n if(DEBUG_FLAG) System.out.println(\"url = \" + url);\n System.out.println(\"exiting testGetEndPoint2\");\n }", "@Test\n\tpublic void testParameters() {\n\t\tassertEquals(par, myReply.getParameters());\n\t}", "abstract void telephoneValidity();", "public static boolean validateAPI(String arg, int numAPI) {\n if (arg.length() < 3) {\n System.out.println(\"Not a valid API call\");\n return false;\n }\n // Check location of bracket\n int startBracketLocation = arg.indexOf('(');\n int endBracketLocation = arg.indexOf(')');\n if (endBracketLocation < startBracketLocation) {\n System.out.println(\"Not a valid API call\");\n return false;\n }\n\n // Check if there is a whitespace in the function name\n String functionName = arg.substring(0,startBracketLocation).trim();\n Pattern pattern = Pattern.compile(\"\\\\s\");\n if (pattern.matcher(functionName).find()) {\n System.out.println(\"Whitespace in function name is invalid\");\n return false;\n }\n\n // Check if the provided parameter is correct\n String[] parameterList;\n String parameter = arg.substring(startBracketLocation + 1, endBracketLocation).trim();\n if (parameter.length() == 0) {\n parameterList = new String[0];\n } else {\n parameterList = parameter.split(\",\");\n for (int i = 0; i < parameterList.length; i++) {\n parameterList[i] = parameterList[i].trim();\n if (pattern.matcher(parameterList[i]).find()) {\n return false;\n }\n }\n }\n String cleanedArgument = functionName + \"(\";\n for (int i = 0; i < parameterList.length; i++) {\n cleanedArgument = cleanedArgument.concat(parameterList[i]);\n if (i < parameterList.length - 1) {\n cleanedArgument = cleanedArgument.concat(\", \");\n }\n }\n cleanedArgument = cleanedArgument.concat(\")\");\n// if (numAPI == 0) {\n// oldAPI = new ApiDescription(functionName, parameterList.length);\n// } else if (numAPI == 1){\n// newAPI = new ApiDescription(functionName, parameterList.length);\n// }\n return true;\n }", "@Test\n public void iPAddressIsThreatTest() throws Exception {\n String value = null;\n IPThreatResponse response = api.iPAddressIsThreat(value);\n\n // TODO: test validations\n }", "public interface NetInterface {\r\n /**\r\n * 接口有正确响应\r\n * @param result\r\n */\r\n public void onNetResult(String interfaceAction,Object result);\r\n\r\n /**\r\n * 接口调用异常\r\n * @param ex\r\n * @param isOnCallback\r\n */\r\n public void onNetError(String interfaceAction,Throwable ex, boolean isOnCallback);\r\n\r\n public void onNetFinished(String interfaceAction);\r\n\r\n}", "static int type_of_xri(String passed){\n\t\treturn 1;\n\t}", "@Override\n protected void validateParameters(String uri, Map<String, Object> parameters, String optionPrefix) {\n }", "public boolean isParameterProvided();", "@Override\n\tpublic boolean isHaveParam() {\n\t\treturn param !=null;\n\t}", "public void testParseHost() throws UnknownHostException {\n InetAddress host = PortParser.parseHost(PARAMETERS);\n assertEquals(\"InetAddress\", HOST, host);\n }", "public void testGetEndPoint() throws Exception {\n if(DEBUG_FLAG) System.out.println(\"entered testGetEndPoint\");\n String ident = \"ivo://org.test/org.astrogrid.registry.RegistryService\"; \n String url = rs.getEndPointByIdentifier(ident);\n assertNotNull(url);\n assertTrue(url.startsWith(\"http\"));\n if(DEBUG_FLAG) System.out.println(\"url = \" + url);\n System.out.println(\"exiting testGetEndPoint\");\n }", "static int type_of_inx(String passed){\n\t\treturn 1;\n\t}", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkInfoPort() {\n\t\tboolean flag = oTest.checkInfoPort();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "@Test\n public void iPAddressIsTorNodeTest() throws Exception {\n String value = null;\n TorNodeResponse response = api.iPAddressIsTorNode(value);\n\n // TODO: test validations\n }", "static void tryReadArgs(String args[]){\n\t\tif(args.length > 0) {\n\t\t\tip = args[0];\n\t\t}\n\t\tif(args.length > 1) {\n\t\t\tport = Integer.parseInt(args[1]);\n\t\t}\n\t}", "protected int checkParam(Object o, String name)\n {\n if (o == null) {\n System.err.println(format(\"Parameter %s is not set\", name));\n return 1;\n }\n return 0;\n }", "boolean hasAddress();", "boolean hasAddress();", "boolean hasAdParameter();", "private void checkInput(String input)throws Exception{\n\n if (input.getBytes(\"UTF-8\").length > 255){\n throw new IOException(\"Message too long\");\n\n }\n try {\n if (Integer.parseInt(input) < 0 || Integer.parseInt(input) > 65535) {\n throw new IOException(\"Port not valid\");\n }\n }catch (NumberFormatException e){\n //nothing should happen\n }\n }", "public interface ForbiddenCheckServ {\n\n boolean grammarCheck(String ce);\n}", "public boolean hasStringParam(String paramName);", "private static boolean isAcceptableVersion(NetworkParameters params, int version) {\n\t\tfor (int v : params.getAcceptableAddressCodes()) {\n\t\t\tif (version == v) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean isNestimSpecified();", "public abstract boolean accepts(String string);", "@Override\r\n public boolean isValidParameterCount(int parameterCount) {\n return parameterCount> 0;\r\n }", "protected void validateParameter(String... param) throws NavigationException {\r\n\t\tif (param.length > 0){\r\n\t\t\tfor(int i = 0; i < param.length; i++){\r\n\t\t\t\tif (param[i] != null && param[i].isEmpty()) {\r\n\t\t\t\t\tthrow new NavigationException(\"parametro no enviado\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n public void testStoreSaleWrongInput() {\n String responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"-1\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").request().get(String.class);\n assertEquals(\"ERROR\", responseMsg);\n }", "private boolean hasParam(SearchCriteria sc, final String param) {\n final Object obj = sc.getParam(param);\n return obj != null && !obj.toString().isEmpty();\n }", "@Override protected boolean checkParam(final String param,\n final String newValue) {\n if (DRBD_RES_PARAM_AFTER.equals(param)\n || DRBD_RES_PARAM_AFTER_8_3.equals(param)) {\n /* drbdsetup xml syncer says it should be numeric, but in\n /etc/drbd.conf it is not. */\n return true;\n }\n return getBrowser().getDrbdXML().checkParam(param, newValue);\n }", "public String param(String id) {\n if (online) return super.param(id);\n else return (String)params.get(id);\n}", "private int checkIPCompatibility(String ip_detect_type) {\n if (!ip_detect_type.equals(\"ipv4\") && !ip_detect_type.equals(\"ipv6\")) {\n return IP_TYPE_CANNOT_DECIDE;\n }\n Socket tcpSocket = new Socket();\n try {\n ArrayList<String> hostnameList = MLabNS.Lookup(context, \"mobiperf\", \n ip_detect_type, \"ip\");\n // MLabNS returns at least one ip address\n if (hostnameList.isEmpty())\n return IP_TYPE_CANNOT_DECIDE;\n // Use the first result in the element\n String hostname = hostnameList.get(0);\n SocketAddress remoteAddr = new InetSocketAddress(hostname, portNum);\n tcpSocket.setTcpNoDelay(true);\n tcpSocket.connect(remoteAddr, tcpTimeout);\n } catch (ConnectException e) {\n // Server is not reachable due to client not support ipv6\n Logger.e(\"Connection exception is \" + e.getMessage());\n return IP_TYPE_UNCONNECTIVITY;\n } catch (IOException e) {\n // Client timer expired\n Logger.e(\"Fail to setup TCP in checkIPCompatibility(). \"\n + e.getMessage());\n return IP_TYPE_CANNOT_DECIDE;\n } catch (InvalidParameterException e) {\n // MLabNS service lookup fail\n Logger.e(\"InvalidParameterException in checkIPCompatibility(). \"\n + e.getMessage());\n return IP_TYPE_CANNOT_DECIDE;\n } catch (IllegalArgumentException e) {\n Logger.e(\"IllegalArgumentException in checkIPCompatibility(). \"\n + e.getMessage());\n return IP_TYPE_CANNOT_DECIDE;\n } finally {\n try {\n tcpSocket.close();\n } catch (IOException e) {\n Logger.e(\"Fail to close TCP in checkIPCompatibility().\");\n return IP_TYPE_CANNOT_DECIDE;\n }\n }\n return IP_TYPE_CONNECTIVITY;\n }", "@Test\n public void testWithEmptyString() throws org.nfunk.jep.ParseException\n {\n Stack<Object> parameters = CollectionsUtils.newParametersStack(\"\");\n function.run(parameters);\n assertEquals(TRUE, parameters.pop());\n }", "@Override\r\n\tpublic boolean supportsParameter(MethodParameter parameter) {\n\t\tAuthUser authUser = parameter.getParameterAnnotation(AuthUser.class);\r\n\t\t\r\n\t\t//@AuthUser 안붙어있음\r\n\t\tif(authUser==null){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//파라미터 타입이 UserVo아님\r\n\t\tif(parameter.getParameterType().equals(UserVo.class)==false){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Then(\"validate status code is {string}\")\r\n\tpublic void validate_status_code_is_(String arg1) throws Throwable {\n\t\tresponse.prettyPrint();\r\n\t\t//System.out.println(response.getStatusCode()+\"*****\"+arg1);\r\n\t\tAssert.assertTrue(response.getStatusCode()==Integer.parseInt(arg1));\r\n\t}", "public interface IFailureDetectionEventListener {\r\n\t/**\r\n\t * Convict the specified endpoint.\r\n\t * \r\n\t * @param ep\r\n\t * endpoint to be convicted\r\n\t */\r\n\tpublic void convict(InetAddress ep);\r\n\r\n}", "public String getParameter(String name) throws IllegalArgumentException {\n\t if ( LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"getParameter() \" \n\t\t+ name);\n Via via=(Via)sipHeader;\n \n if (name == null) throw new\n IllegalArgumentException(\"JAIN-EXCEPTION: null argument\");\n return via.getParameter(name);\n }" ]
[ "0.57445914", "0.5695257", "0.5611535", "0.5604132", "0.5590844", "0.5584221", "0.55576324", "0.5435351", "0.53978664", "0.5389462", "0.53325987", "0.53283226", "0.53271407", "0.5307994", "0.52813333", "0.52786994", "0.5268412", "0.5210944", "0.5196365", "0.51734364", "0.5169774", "0.5158293", "0.51448435", "0.5134793", "0.51280797", "0.5118769", "0.5091518", "0.50846523", "0.50840104", "0.5076568", "0.50755054", "0.5074164", "0.5063135", "0.50615096", "0.5058949", "0.5047787", "0.50457233", "0.50450647", "0.50345814", "0.5023754", "0.5023118", "0.5021019", "0.50071114", "0.49984047", "0.49949303", "0.49876034", "0.49761978", "0.49747697", "0.49738002", "0.49684286", "0.4965293", "0.49546665", "0.49533153", "0.49510092", "0.4949907", "0.49495822", "0.4943984", "0.4943984", "0.4943984", "0.4943984", "0.49425858", "0.49424085", "0.4942323", "0.49308434", "0.49273768", "0.49247032", "0.492075", "0.49177966", "0.49124134", "0.4912038", "0.49113163", "0.49094316", "0.49022865", "0.48995197", "0.4899306", "0.48990977", "0.489248", "0.488545", "0.48809323", "0.48757392", "0.48656312", "0.48656312", "0.4861621", "0.48615462", "0.48615104", "0.48585555", "0.48536223", "0.48531938", "0.48490703", "0.48468783", "0.4839814", "0.48386288", "0.48366815", "0.4832067", "0.4825158", "0.48246434", "0.48233378", "0.48185843", "0.4817791", "0.48169714", "0.4811716" ]
0.0
-1
overload test for two integer parameter
void test(int a ,int b){ System.out.println("a and b: "+a+" "+b); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean check(int value);", "@Override\n\t\t\tpublic boolean test(Integer t) {\n\t\t\t\treturn false;\n\t\t\t}", "protected abstract int intOp(int i1, int i2);", "public static boolean isValid(String args[]){\n \n if(args.length < 2){\n System.out.println(\"Not enough arguments detected. Please enter two\"\n + \" integer arguments.\");\n return false;\n }\n \n Scanner scanin = new Scanner(args[0]);\n Scanner scanin2 = new Scanner(args[1]);\n\t \n if(!scanin.hasNextInt() || !scanin2.hasNextInt()){\n System.out.println(\"Invalid argument type detected. Please enter two\"\n + \" integer arguments.\");\n return false;\n }\n\t else\n return true;\n }", "public abstract boolean a(e parame, b paramb, int paramInt1, int paramInt2);", "public abstract boolean e(int i2);", "public static final int quickCheck(int paramInt1, int paramInt2)\n/* */ {\n/* 2133 */ int[] arrayOfInt = { 0, 0, 4, 8, 17, 34 };\n/* */ \n/* */ \n/* */ \n/* 2137 */ int i = (int)getNorm32(paramInt1) & arrayOfInt[paramInt2];\n/* */ \n/* 2139 */ if (i == 0)\n/* 2140 */ return 1;\n/* 2141 */ if ((i & 0xF) != 0) {\n/* 2142 */ return 0;\n/* */ }\n/* 2144 */ return 2;\n/* */ }", "@Override\n\t\t\tpublic boolean test(Integer t) {\n\t\t\t\tint tmp = t;\n\t\t\t\tif (tmp % 2 == 0) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}", "boolean method_103(int var1, int var2);", "private static void testStuff(int i1, int i2) {\n\t\tif (i1 != i2)\n\t\t\terrors += 1;\n\t}", "public void b(int paramInt1, int paramInt2) {}", "public void b(int paramInt1, int paramInt2) {}", "int expectIntParameter(String strParamName);", "boolean hasInt();", "@Test\n\tpublic void testInt2() {\n\t\tTextField intText = new TextField(\"-23\");\n\t\tboolean checkIntText = initTest.checkIntValues(intText);\n\t\tassertFalse(checkIntText);\n\t}", "boolean mo56158b(int i, int i2);", "boolean checked(int x, int y);", "protected void a(int paramInt1, int paramInt2, boolean paramBoolean, yz paramyz) {}", "protected abstract boolean matches(String paramString, int paramInt);", "public static void main(String[] args) {\n checkIfNumberIsOddOrEven(112);\n checkIfNumberIsOddOrEven(111);\n\n }", "public boolean isInteger();", "private static void test1(Integer i, Integer j) {\n\t\tif (i == j) \n\t\t\t{\n\t\t\t\tSystem.out.println(\"TRUE\");\n\t\t\t} \n\t\t\telse \n\t\t\t\t{\n\t\t\t\tSystem.out.println(\"FALSE\");\n\t\t\t\t}\n\t}", "boolean hasIntValue();", "boolean hasNum2();", "public static boolean same_int(int a, int b){\n if(a == b) {\n return true;\n } else {\n return false;\n }\n }", "int compareToInt(integers i);", "boolean isInt(TextField input);", "public boolean method_103(int var1, int var2) {\r\n return true;\r\n }", "public boolean b(int paramInt, amj paramamj)\r\n/* 578: */ {\r\n/* 579:621 */ return true;\r\n/* 580: */ }", "public boolean in1020(int a, int b) {\n return ((a >= 10 && a <= 20) || (b >= 10 && b <= 20));\n}", "@Test\n\tvoid testCheckClass2() {\n\t\tassertTrue(DataChecker.checkClass(new Integer(1), new Integer(15)));\n\t}", "public int a(String paramString, float paramFloat1, float paramFloat2, int paramInt)\r\n/* 234: */ {\r\n/* 235:243 */ return a(paramString, paramFloat1, paramFloat2, paramInt, true);\r\n/* 236: */ }", "public static void main(String[] args) {\n\t\t\r\n\t\t\r\n\t\toverload2 ov=new overload2();\r\n\t\tint i=88;\r\n\t\tov.test();\r\n\t\tov.test(10, 20);\r\n\t\tov.test(i);//test(double a) exacute \r\n\t\tov.test(123.2);\r\n\r\n\r\n\t}", "int test(S2Point a0, S2Point ab1, S2Point a2, S2Point b0, S2Point b2);", "@Test\r\n\tpublic void test01() {\n\t\tInteger x = -128;\r\n\t\tInteger y = -128;\r\n\t\tassertSame(x, y);\r\n\t\tInteger u = 1000;\r\n\t\tInteger v = 1000;\r\n\t\tassertNotSame(u, v);\r\n\t}", "private boolean intToBoolean(int arg) {\n\t\tif (arg == 0) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "boolean method_107(boolean var1, class_81 var2);", "private int c(int paramInt)\r\n/* 38: */ {\r\n/* 39:39 */ if (paramInt >= 2) {\r\n/* 40:40 */ return 2 + (paramInt & 0x1);\r\n/* 41: */ }\r\n/* 42:42 */ return paramInt;\r\n/* 43: */ }", "protected void a(int paramInt1, int paramInt2, boolean paramBoolean, EntityPlayer paramahd) {}", "public static Boolean Int(String arg){\n\t\tif(arg == arg.replaceAll(\"\\\\D\",\"\")){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "@Test\n public void testInvokingIntMethodAndEvaluate() {\n\n MethodInvokingEventCondition invokingEventCondition = new MethodInvokingEventCondition(DummyAdapterEvent.class,\n DummyAdapterEvent.METHOD_RETURNS_INT, INT_TO_MATCH);\n\n Assert.assertTrue(invokingEventCondition.evaluate(dummyAdapterEvent));\n }", "protected abstract int getValue(int paramInt);", "private void inRange(String[] arguments) {\n\t\ttry { \n\t int IDLow = Integer.parseInt(arguments[1]);\n\t int IDHigh = Integer.parseInt(arguments[2]);\n\t totalInRangeCount = 0;\n\t countInRange(root, IDLow, IDHigh);\n\t System.out.printf(\"%d\\n\",totalInRangeCount);\n\t } catch(NumberFormatException e) { \n\t System.out.println(\"Argument not an Integer\");; \n\t }\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tMyinteger int1=new Myinteger(5);\n\t\tSystem.out.println(\"这个值是:\"+int1.getValue()+\"\\t该值是否是偶数\"+int1.isEven()+\"\\t\\t该值是否是奇数\"+int1.isOdd()+\"\\t\\t是否是素数\"+int1.isPrime());\n\t\t\n\t\tSystem.out.println(\"这个值是:6\\t该值是否是偶数\"+int1.isEven(6)+\"\\t\\t该值是否是奇数\"+int1.isOdd(6)+\"\\t\\t是否是素数\"+int1.isPrime(6));\n\t}", "boolean hasNum1();", "@Test\n public void test() {\n assertFalse(checkZeroOnes(\"111000\"));\n }", "public interface IntPredicate {\n boolean test(int t);\n}", "static int binarySearch(int[] paramArrayOfint, int paramInt1, int paramInt2) {\n }", "private static void assertEqualsExactType(int a, int b) {\n Assert.assertEquals(a, b);\n }", "private static void assertEqualsExactType(int a, int b) {\n Assert.assertEquals(a, b);\n }", "protected abstract int isValidInput();", "boolean knows(int a, int b) {\n\t\treturn false;\n\t}", "@Test\n\tpublic void testAndNegativeIntegers() throws BcException, IOException {\n\t\tString[] params = { \"-1 && -1\" };\n\t\tbcApp.run(params, inStream, outStream);\n\t\tassertEquals(\"1\", outStream.toString());\n\t}", "@Test\r\n public void testPrimitive()\r\n {\r\n test(int.class);\r\n }", "boolean test(int number, int comparisonPoint) {\n return operator.test(number, comparisonPoint);\n }", "public int a(String paramString, int paramInt1, int paramInt2, int paramInt3)\r\n/* 239: */ {\r\n/* 240:247 */ return a(paramString, (float)paramInt1, (float)paramInt2, paramInt3, false);\r\n/* 241: */ }", "boolean isMoreSpecific (MethodType type) throws OverloadingAmbiguous {\r\n boolean status = false;\r\n\r\n try {\r\n for (int i = 0, size = arguments.size (); i < size; i++) {\r\n\tIdentifier this_arg = (Identifier) arguments.elementAt (i);\r\n\tIdentifier target_arg = (Identifier) type.arguments.elementAt (i);\r\n\r\n\tint type_diff = this_arg.type.compare (target_arg.type);\r\n\tif (type_diff == 0)\r\n\t continue;\r\n\telse if (type_diff > 0) {\r\n\t if (status == true) throw new OverloadingAmbiguous ();\r\n\t} else {\r\n\t if (i != 0) throw new OverloadingAmbiguous ();\r\n\t status = true;\r\n\t}\r\n }\r\n } catch (OverloadingAmbiguous ex) {\r\n throw ex;\r\n } catch (TypeMismatch ex) {\r\n throw new OverloadingAmbiguous ();\r\n }\r\n\r\n return status;\r\n }", "@Test\n public void testCheckPz_int_intArr() {\n System.out.println(\"checkPz\");\n int pz = 4;\n int[] number = {1, 2, 3, 4, 3, 4};\n AbstractMethod instance = new AbstractMethodImpl();\n boolean expResult = true;\n boolean result = instance.checkPz(pz, number);\n assertEquals(expResult, result);\n\n }", "@Override\r\n public boolean equals(Object o) {\r\n if (o instanceof IntToInt) {\r\n return ((IntToInt) o).getA() == getA() && ((IntToInt) o).getB() == getB();\r\n }\r\n return false;\r\n }", "public boolean test(String a, String b)\n\t{\n\t\treturn false;\n\t}", "public abstract void a(b paramb, int paramInt1, int paramInt2);", "@Override\r\n public boolean isValidParameterCount(int parameterCount) {\n return parameterCount> 0;\r\n }", "private static int compareInts(int first, int second) {\n return first > second ? 1 : (second > first ? -1 : 0);\n }", "public boolean makes10(int a, int b) {\n return (a == 10 || b == 10 || a + b == 10);\n}", "boolean mo16688a(T t, T t2);", "boolean contains(int val);", "@Test\n\tpublic void testAddInRange() {\n\t\tInteger result = SimpleCalc.add(3, 5);\n\t\tassertEquals(new Integer(8), result);\n\t}", "protected void validatePreamp(int[] param) {\n }", "@Given(\"^Parameter is (\\\\d+)$\")\n\tpublic void parameter_is(int arg1) throws Throwable {\n\t\ti = arg1;\n\t}", "@Override\r\n\tpublic int getInt(int arg) {\n\t\treturn 0;\r\n\t}", "@OfMethod({\"getInt(java.lang.String)\", \"getInt(int)\"})\n public void testGetInt() throws Exception {\n CallableStatement instance = newClosedCall();\n\n try {\n instance.getInt(getParameterName());\n fail(\"Allowed get int by parameter name after close.\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n\n try {\n instance.getInt(getParameterIndex());\n fail(\"Allowed get int by parameter index after close.\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n }", "void execute(Integer num1, Integer num2);", "public static void main(String[] args) {\n\t\tSystem.out.print(\"Enter an integer: \");\n\t\tScanner input = new Scanner(System.in);\n\t\tint integer = input.nextInt();\n\t\t\n\t\t// Call function\n\t\tcheckOddOrEven(integer);\n\t}", "class_1069 method_105(int var1, int var2);", "public static boolean isEven(MyInteger n1){\n return n1.isEven();\n }", "@Test\n\tvoid testNegativeInteger() {\n\t\tint result = calculator.negativeInteger(-4,-3);\n\t\tassertEquals(-1,result);\n\t}", "@Override\r\n\tpublic int getInt(int[] args) {\n\t\treturn 0;\r\n\t}", "public static void main(String[] args) {\n\t\tint x, y;\r\n\t\tx = 10;\r\n\t\ty = -10;\r\n\t\tif(x > 0 && y > 0) {\r\n\t\t\tSystem.out.println(\"both numbers are positive\");\r\n\t\t}else if(x > 0 || y > 0 ) {\r\n\t\t\tSystem.out.println(\"atleast one number is positive\");\r\n\t\t}else {\r\n\t\t\tSystem.out.println(\"both numbers are negative\");\r\n\t\t}\r\n\t}", "public boolean query(int a, int b) {\n\t\treturn find(a) == find(b);\n }", "class_1069 method_104(int var1, int var2);", "@Override\n\tpublic boolean test(Object[] args, Object res) {\n\t\treturn maxDepth((TreeNode)args[0]) == (Integer)res;\n\t}", "public void testOverloadedMethods(){\n System.out.printf(\"Square of integer 7 is %d\\n\", square(7));\n System.out.printf(\"Square of double 7.5 is %f\\n\", square(7.5));\n }", "boolean hasParameterValue();", "public boolean icyHot(int temp1, int temp2) {\n return ((temp1 < 0 && temp2 > 100) || (temp1 > 100 && temp2 < 0));\n}", "public void checkNumberArgs(int argNum) throws WrongNumberArgsException {\n/* 79 */ if (argNum < 2) {\n/* 80 */ reportWrongNumberArgs();\n/* */ }\n/* */ }", "protected void validateAttenuator(int[] param) {\n }", "private void checkTypes(Variable first, Variable second) throws OutmatchingParameterType {\n VariableVerifier.VerifiedTypes firstType = first.getType();\n VariableVerifier.VerifiedTypes secondType = second.getType();\n\n if (!firstType.equals(secondType)) {\n throw new OutmatchingParameterType();\n }\n }", "@Test\r\n public void lowerHigherSimple() throws Exception {\r\n assertEquals(2, (int) sInt.lower(3));\r\n assertEquals(4, (int) sInt.higher(3));\r\n assertEquals(3, (int) sInt.ceiling(3));\r\n assertEquals(3, (int) sInt.floor(3));\r\n }", "@Test\n\tpublic void testStringCalculatorMethodIntPresence() {\n\t\tcalc.Add(\"1\");\n\t\tAssert.assertTrue(true);\n\t}", "@Test\n public void testCheckPz_3args() {\n System.out.println(\"checkPz\");\n int pz = 4;\n int[] number = {1, 2, 3, 4, 5, 6};\n int pos = 4;\n AbstractMethod instance = new AbstractMethodImpl();\n boolean expResult = true;\n boolean result = instance.checkPz(pz, number, pos);\n assertEquals(expResult, result);\n\n }", "public int operation(int number1,int number2,String operator)", "boolean contains(int value);", "boolean contains(int value);", "private int a(alq paramalq, int paramInt)\r\n/* 40: */ {\r\n/* 41: 61 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 42: 62 */ if ((this.a[i] != null) && (this.a[i].b() == paramalq) && (this.a[i].i() == paramInt)) {\r\n/* 43: 63 */ return i;\r\n/* 44: */ }\r\n/* 45: */ }\r\n/* 46: 66 */ return -1;\r\n/* 47: */ }", "@Test\n public void testCheckPz_3args1() {\n System.out.println(\"checkPz\");\n int pz = 4;\n int[] number = {1, 2, 3, 4, 5, 6};\n int pos = 5;\n AbstractMethod instance = new AbstractMethodImpl();\n boolean expResult = false;\n boolean result = instance.checkPz(pz, number, pos);\n assertEquals(expResult, result);\n\n }", "public abstract int a(long j2, int i2);", "void method16(int aOne)\n {\n }", "@Test\n public void testIsSameNumber() {\n int x = 1;\n int y = 1;\n int z = 2;\n\n assertEquals(true, Flik.isSameNumber(x, y));\n assertEquals(false, Flik.isSameNumber(x, z));\n }", "int foo(int a, int b);", "@Test\n\tpublic void testInt3() {\n\t\tTextField intText = new TextField(\"abc\");\n\t\tboolean checkIntText = initTest.checkIntValues(intText);\n\t\tassertFalse(checkIntText);\n\t}" ]
[ "0.6174018", "0.6165494", "0.6083793", "0.6068398", "0.6046936", "0.60311395", "0.59895355", "0.5988235", "0.59144455", "0.5886998", "0.58751714", "0.58751714", "0.5826508", "0.58180344", "0.5797576", "0.57794756", "0.57770586", "0.57670337", "0.57640934", "0.57552284", "0.5741719", "0.5712426", "0.5701006", "0.5669946", "0.5653619", "0.56483984", "0.56446034", "0.5613853", "0.55526435", "0.55512774", "0.5539869", "0.5511462", "0.5486906", "0.54823494", "0.5425371", "0.5412692", "0.5410639", "0.540908", "0.5401117", "0.5396975", "0.53841466", "0.5369765", "0.5363725", "0.5360724", "0.53581953", "0.5336527", "0.5332388", "0.53308374", "0.53306925", "0.53306925", "0.5330196", "0.53269774", "0.53267807", "0.5317385", "0.530402", "0.5295126", "0.52862006", "0.5274731", "0.52710044", "0.52355814", "0.5231955", "0.52303725", "0.52291", "0.52229834", "0.5222726", "0.5207536", "0.5176312", "0.5174632", "0.5171596", "0.51688164", "0.5168241", "0.5164217", "0.5160372", "0.5157974", "0.5145429", "0.5143156", "0.5139843", "0.51395005", "0.5138982", "0.51343745", "0.5128679", "0.512582", "0.51192874", "0.51160204", "0.5112243", "0.5108693", "0.5099509", "0.5094022", "0.5091194", "0.5089252", "0.50860393", "0.50786734", "0.50786734", "0.50751466", "0.507383", "0.5072743", "0.50724226", "0.5070204", "0.5067898", "0.5066253" ]
0.5621301
27
overload test for a double parameter
double test(double a){ System.out.println("double a: "+a); return a*a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isDouble();", "double expectDoubleParameter(String strParamName);", "boolean hasDouble();", "public static void isValid(double dbl) throws IllegalArgumentException {\n\t//nothing to do here\n }", "public boolean a(double paramDouble)\r\n/* 28: */ {\r\n/* 29: 44 */ double d1 = aQ().a() * 4.0D;\r\n/* 30: 45 */ d1 *= 64.0D;\r\n/* 31: 46 */ return paramDouble < d1 * d1;\r\n/* 32: */ }", "protected abstract double doubleOp(double d1, double d2);", "public boolean isDouble() {\n return false;\n }", "public abstract boolean containsInstance(double value);", "@Override\n\tpublic void visit(DoubleType n) {\n\t\t\n\t}", "@OfMethod({\"getDouble(java.lang.String)\", \"getDouble(int)\"})\n public void testGetDouble() throws Exception {\n CallableStatement instance = newClosedCall();\n\n try {\n instance.getDouble(getParameterName());\n fail(\"Allowed get double by parameter name after close.\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n\n try {\n instance.getDouble(getParameterIndex());\n fail(\"Allowed get double by parameter index after close.\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n }", "public boolean isDouble() {\n return this.data instanceof Double;\n }", "public void testContainsdoubledouble() {\r\n\t\tCircleArc2D arc = new CircleArc2D(new Point2D(0, 0), 10, 0, PI/2);\r\n\t\tassertTrue(!arc.contains(0, 0));\r\n\t\tassertTrue(arc.contains(10, 0));\r\n\t\tassertTrue(arc.contains(0, 10));\r\n\t}", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\t\t\n\t}", "private void validate(Adouble val) {\r\n Assertions.assertEquals(val.aonType(), Atype.DOUBLE);\r\n Assertions.assertEquals(val, val);\r\n Assertions.assertEquals(val, Adouble.valueOf(val.toDouble()));\r\n Assertions.assertEquals(val.hashCode(), Adouble.valueOf(val.toDouble()).hashCode());\r\n Assertions.assertTrue(val.isNumber());\r\n }", "@Override\n\tpublic void visit(DoubleValue arg0) {\n\n\t}", "protected abstract double operation(double val);", "default DoublePredicate or(DoublePredicate paramDoublePredicate) {\n/* 101 */ Objects.requireNonNull(paramDoublePredicate);\n/* 102 */ return paramDouble -> (test(paramDouble) || paramDoublePredicate.test(paramDouble));\n/* */ }", "public abstract T fromDouble(Double d);", "@Test\n public void testIsValidDouble() {\n System.out.println(\"isValidDouble\");\n String double_number = \"Mary\";\n boolean expResult = false;\n boolean result = ValidVariables.isValidDouble(double_number);\n assertEquals(expResult, result);\n }", "public void dataNotDouble() {\n MarketDataBundle marketDataBundle = new MapMarketDataBundle(\n new MarketDataEnvironmentBuilder()\n .add(SecurityId.of(SEC1.getExternalIdBundle()), \"not a double\")\n .add(SecurityId.of(SEC2.getExternalIdBundle()), 2.0)\n .valuationTime(ZonedDateTime.now())\n .build());\n MarketDataShock shock = MarketDataShock.relativeShift(0.5, MATCHER1);\n FilteredScenarioDefinition scenarioDef = new FilteredScenarioDefinition(shock);\n SimpleEnvironment env = new SimpleEnvironment(ZonedDateTime.now(), marketDataBundle, scenarioDef);\n\n assertFalse(FN.foo(env, SEC1).isSuccess());\n assertEquals(2d, FN.foo(env, SEC2).getValue(), DELTA);\n }", "double getDoubleValue2();", "@OfMethod({\"setDouble(java.lang.String,double)\", \"setDouble(int,double)\"})\n public void testSetDouble() throws Exception {\n CallableStatement instance = newClosedCall();\n\n try {\n instance.setDouble(getParameterName(), 0D);\n fail(\"Allowed set double by parameter name after close.\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n\n try {\n instance.setDouble(getParameterIndex(), 0D);\n fail(\"Allowed set double by parameter index after close.\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n }", "public void validateDoubleField(double field, String nameField) throws ParamsInvalidException {\n if (field < 0) {\n throw new ParamsInvalidException(12, nameField);\n }\n }", "default T handleNumber(double val) {\n throw new UnsupportedOperationException();\n }", "public double evaluateAsDouble();", "public\n DoubleParam\n (\n String name, \n String desc, \n Double value\n ) \n {\n super(name, desc, value);\n }", "public static double isDouble() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\treturn input.nextDouble();\n\t\t\t} catch (InputMismatchException e) {\n\t\t\t\tinput.next();\n\t\t\t\tSystem.out.println(\"Vas unos nije odgovarajuci. Probajte ponovo: \");\n\t\t\t}\n\t\t}\n\t}", "public void set_double(double param) {\n this.local_double = param;\n }", "public abstract Double get(T first, T second);", "double performeOperation(double argument1, double argument2);", "public double getDouble();", "double getEDouble();", "public double doubleValue();", "@SuppressWarnings(\"unchecked\")\n protected void \n validate\n (\n Comparable value\t \n )\n throws IllegalArgumentException \n {\n if((value != null) && !(value instanceof Double))\n throw new IllegalArgumentException\n\t(\"The parameter (\" + pName + \") only accepts (Double) values!\");\n }", "default DoublePredicate negate() {\n/* 81 */ return paramDouble -> !test(paramDouble);\n/* */ }", "public native double __doubleMethod( long __swiftObject, double arg );", "public void setParam(String paramName, double value);", "@Override\n public boolean setParameter(String parameterName, double value) {\n return false;\n }", "private static boolean isDouble(String input) {\n\t\ttry {\n\t\t\tDouble.parseDouble(input);\n\t\t\treturn true;\n\t\t} catch (Exception ex) {}\n\t\treturn false;\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\t\r\n\t\toverload2 ov=new overload2();\r\n\t\tint i=88;\r\n\t\tov.test();\r\n\t\tov.test(10, 20);\r\n\t\tov.test(i);//test(double a) exacute \r\n\t\tov.test(123.2);\r\n\r\n\r\n\t}", "@Override\n\tpublic void visit(DoubleLiteral n) {\n\t\t\n\t}", "public static boolean check(double arg) {\n if (!(Double.isInfinite(arg))) {\n return true;\n } else {\n System.out.println(\"Warring! You have entered a very large number!\");\n return false;\n }\n }", "double getDoubleValue1();", "Double getDoubleValue();", "@Test\n\tpublic void testGetSessieDuur(){\n\t\tdouble expResult = 1;\n\t\tassertTrue(expResult == instance.getSessieDuur());\n\t}", "public static void testOfDoubleNumberIsInteger(){\n\t\tSystem.out.println(\"please enter a double number: \");\n\t\tScanner scann=new Scanner(System.in);\n\t\tdouble x=scann.nextDouble();\n\t\tif(x%1==0)\n\t\t\tSystem.out.println(\"The number you have enterd it's not a double \");\n\t\telse\n\t\t\tSystem.out.println(\"The number you have entered it's double\");\n\t}", "public void ee_parameter(Double ee_parameter) {\n }", "@Override\n\tpublic boolean isSatisfied(double d) {\n\t\treturn false;\n\t}", "public interface Double2Filter extends FunctionTemplate {\n boolean accept(double a, double b);\n}", "@Test\n public void testGetPropertyAsDouble_shouldReturnDoubleValue() {\n final Config wholeNum = new Config().setId(\"wholeNum\").setValue(\"12345\");\n when(configDao.findById(\"wholeNum\")).thenReturn(Optional.of(wholeNum));\n assertThat(service.getProperty(\"wholeNum\").asDouble()).hasValue(12345d);\n\n // Test with decimals\n final Config decimal = new Config().setId(\"decimal\").setValue(\"983.23315\");\n when(configDao.findById(\"decimal\")).thenReturn(Optional.of(decimal));\n assertThat(service.getProperty(\"decimal\").asDouble()).hasValue(983.23315);\n\n // Test with empty\n assertThat(service.getProperty(\"unknown\").asDouble()).isEmpty();\n\n // Test with blank\n Assertions.assertThatThrownBy(() -> service.getProperty(\"blank\").asDouble())\n .isInstanceOf(NumberFormatException.class);\n\n // Test with invalid characters\n Assertions.assertThatThrownBy(() -> service.getProperty(\"email\").asDouble())\n .isInstanceOf(NumberFormatException.class);\n }", "public abstract void getDoubleImpl(String str, double d, Resolver<Double> resolver);", "@Override\r\n\t\t\tpublic boolean accept(double t) {\n\t\t\t\treturn t>0.5;\r\n\t\t\t}", "public void testOverloadedMethods(){\n System.out.printf(\"Square of integer 7 is %d\\n\", square(7));\n System.out.printf(\"Square of double 7.5 is %f\\n\", square(7.5));\n }", "public Double visit (NumberArgument aArg)\n {\n return aArg.getValue ();\n }", "public T caseExpression_Double(Expression_Double object)\r\n {\r\n return null;\r\n }", "double doubleTheValue(double input) {\n\t\treturn input*2;\n\t}", "public double getParam(String paramName);", "public abstract double getasDouble(int tuple, int val);", "private static boolean checkIfIsDouble(String num) {\n try {\n Double.parseDouble(num);\n return true;\n } catch (NumberFormatException e) {\n return false;\n }\n }", "float expectFloatParameter(String strParamName);", "double apply(final double a);", "private boolean isValidDouble(String text) {\r\n \ttry {\r\n \t\tDouble value = Double.valueOf(text);\r\n \t} catch (NumberFormatException e) {\r\n \t\treturn false;\r\n \t}\r\n \treturn true;\r\n }", "public abstract double read_double();", "public abstract void setDoubleImpl(String str, double d, Resolver<Void> resolver);", "public double utility();", "boolean mo61590s(double d);", "public void set(double d);", "public abstract double fct(double x);", "public static double leerDouble() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public void printer(double x);", "double getDoubleValue3();", "public void testGetDistancedoubledouble() {\r\n\t\tCircleArc2D arc = new CircleArc2D(new Point2D(0, 0), 10, 0, PI/2);\r\n\t\tassertEquals(arc.distance(0, 0), 10, Shape2D.ACCURACY);\r\n\t\tassertEquals(arc.distance(10, 0), 0, Shape2D.ACCURACY);\r\n\t\tassertEquals(arc.distance(0, 10), 0, Shape2D.ACCURACY);\r\n\t\tassertEquals(arc.distance(10, -10), 10, Shape2D.ACCURACY);\t\t\r\n\t\tassertEquals(arc.distance(10, 10), (10*(Math.sqrt(2)-1)), Shape2D.ACCURACY);\t\t\r\n\t}", "public boolean validateInput(double input){\n\t\tif(input >= -1 && input <= 1)\n\t\t return true;\n\t\treturn false;\t\n\t}", "@Test\n\tpublic void test_TCM__double_getDoubleValue() {\n\t\tAttribute attr = new Attribute(\"test\", \"11111111111111\");\n\t\ttry {\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == 11111111111111d );\n\n\t\t\tattr.setValue(\"0\");\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == 0 );\n\n\t\t\tattr.setValue(Double.toString(java.lang.Double.MAX_VALUE));\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == java.lang.Double.MAX_VALUE);\n\n\t\t\tattr.setValue(Double.toString(java.lang.Double.MIN_VALUE));\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == java.lang.Double.MIN_VALUE);\n\n\t\t} catch (DataConversionException e) {\n\t\t\tfail(\"couldn't convert boolean value\");\n\t\t}\n\n\t\ttry {\n\t\t\tattr.setValue(\"foo\");\n\t\t\tfail(\"incorrectly returned double from non double value\" + attr.getDoubleValue());\n\n\t\t} catch (DataConversionException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t}", "@Test\n public void testTimescales_IDoubleArray_double()\n {\n IDoubleArray T = null;\n double tau = 0.0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.timescales(T, tau);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Ignore\n @Test(expected = IllegalArgumentException.class)\n public void require_that_illegal_double_throws_exception() throws IOException {\n Slime slime = new Slime();\n Cursor root = slime.setObject();\n root.setString(\"doubleval\", \"invalid\");\n InnerCNode def = new DefParser(\"simpletypes\", new StringReader(StringUtilities.implode(SimpletypesConfig.CONFIG_DEF_SCHEMA, \"\\n\"))).getTree();\n new ConfigFileFormat(def).encode(new ByteArrayOutputStream(), slime);\n }", "@Test\n public void testSetNumberDouble() {\n factory.setNumber(0.25).setCurrency(\"EUR\");\n assertEquals(Geldbetrag.valueOf(\"0.25 EUR\"), factory.create());\n }", "void mo130799a(double d);", "@Override\n public Double value(TypeOfValue value);", "abstract void calculate(double a);", "public Snippet visit(CoercionToDoubleExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t _ret = n.expression.accept(this, argu);\n\t _ret.returnTemp = \"(\" + \"double\" + \")\" + _ret.returnTemp;\n\t\t\t_ret.expType = new X10Double();\n\t return _ret;\n\t }", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default double asDouble() {\n \n return notSupportedCast(BasicTypeID.DOUBLE);\n }", "protected double getParamAsDouble(HttpServletRequest request, String paramName) {\n\t\treturn getParamAsDouble(request, paramName, null);\n\t}", "public double getDouble(String name)\n/* */ {\n/* 1015 */ return getDouble(name, 0.0D);\n/* */ }", "@FunctionalInterface\n/* */ public interface DoublePredicate\n/* */ {\n/* */ default DoublePredicate and(DoublePredicate paramDoublePredicate) {\n/* 69 */ Objects.requireNonNull(paramDoublePredicate);\n/* 70 */ return paramDouble -> (test(paramDouble) && paramDoublePredicate.test(paramDouble));\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default DoublePredicate negate() {\n/* 81 */ return paramDouble -> !test(paramDouble);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default DoublePredicate or(DoublePredicate paramDoublePredicate) {\n/* 101 */ Objects.requireNonNull(paramDoublePredicate);\n/* 102 */ return paramDouble -> (test(paramDouble) || paramDoublePredicate.test(paramDouble));\n/* */ }\n/* */ \n/* */ boolean test(double paramDouble);\n/* */ }", "@Override\n\tpublic boolean contains(double arg0, double arg1, double arg2, double arg3) {\n\t\treturn false;\n\t}", "public abstract double evaluate(double value);", "@Parameters({\"12, 2, 14\", \"3, 4, 7\", \"4, 4, 8\", \"1, 2, 3\", \"1, 2, 3\", \"10, 4, 14\", \"100, 100, 200\", \"50, 25, 75\",\n \"50, 25, 75\", \"30, 30, 60\", \"0, 0, 0\", \"2147483646, 1, 2147483647\"})\n public void testAddMethod(double a, double b, double result) {\n assertEquals(result, calc.add(a, b), 0.1);\n }", "public void set(double val);", "public boolean realAsDouble() {\n return false;\n }", "static boolean isDouble(String str) {\n\t\n\t\ttry {\n\t\t\tDouble.parseDouble(str);\n\t\t} \n\t\tcatch (NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "double getDouble(String key, double defaultValue);", "public MyDouble(double val) {\n this.setValue(val);\n }", "T print(double data) throws PrintingException;", "public abstract Double toDouble(T t);", "public double getDoubleParam(String theAlias) {\n String name = getAlias(theAlias);\n\n if (!allParams.containsKey(name)) {\n System.out.println(\"Careful, you are getting the value of parameter: \" + name + \" but the parameter hasn't been added...\");\n System.exit(1);\n }\n if (!doubleParams.containsKey(name)) {\n System.out.println(\"Careful, you are getting the value of parameter: \" + name + \" but the parameter isn't a double parameter...\");\n System.exit(1);\n }\n\n return doubleParams.get(name);\n }", "@Override\n\tpublic void javaMethodBaseWithTwoParams(long longParam, double doubleParam) {\n\t\t\n\t}", "public ResultDouble(double value) {\r\n\t\tthis.value = value;\r\n\t}", "public double getValue(double[] parameters);", "public abstract double compute(double value);" ]
[ "0.7497219", "0.7290741", "0.7255311", "0.6977204", "0.67575973", "0.645851", "0.6336559", "0.6308263", "0.6258263", "0.6184239", "0.61465585", "0.6137859", "0.61316514", "0.6124018", "0.6105412", "0.61030906", "0.6094091", "0.60569334", "0.60499287", "0.6017544", "0.59979516", "0.5984971", "0.59545255", "0.5944597", "0.5928794", "0.58815634", "0.58635455", "0.5857896", "0.582886", "0.5828738", "0.58161974", "0.5805233", "0.57995963", "0.57959145", "0.579175", "0.5791642", "0.57759625", "0.5763484", "0.57323354", "0.5729524", "0.57230103", "0.57220626", "0.5717454", "0.5707582", "0.5704723", "0.5703125", "0.5689037", "0.5681116", "0.56808436", "0.56606424", "0.5655669", "0.56465244", "0.5644636", "0.56374836", "0.5633105", "0.56287587", "0.56227523", "0.5620497", "0.5615177", "0.560165", "0.55908895", "0.55903375", "0.5581502", "0.5578327", "0.5572573", "0.55538833", "0.5540414", "0.55219424", "0.5513883", "0.55085856", "0.55053353", "0.55050904", "0.5492595", "0.5491029", "0.5486574", "0.5467289", "0.54605854", "0.5449306", "0.5448437", "0.5446806", "0.5436672", "0.54337764", "0.5430659", "0.5422309", "0.5418354", "0.54175305", "0.5417397", "0.54160166", "0.5415655", "0.54144204", "0.5407564", "0.5404526", "0.54004526", "0.5390376", "0.53835726", "0.5380815", "0.5363086", "0.53626376", "0.5357986", "0.5356733" ]
0.56811583
47
create the command line parser create the Options
private static Options getOptions() { Options options = new Options(); options.addOption(OptGenMode, "generate", false, "generate private key sharing"); options.addOption("h", "help", false, "Print help."); options.addOption(OptionBuilder.withType(Integer.class) .withLongOpt("shares") .withDescription("number of shares to generate").hasArg() .withArgName("int").create(OptShares)); options.addOption(OptionBuilder.withType(Integer.class) .withLongOpt("threshold") .withDescription("number of requires shares").hasArg() .withArgName("int").create(OptThreshold)); return options; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Options createOptions() {\n \n \t\tOptions options = new Options();\n \t\t\n \t\tOptionBuilder.withArgName(\"path\");\n \t\tOptionBuilder.hasArg(true);\n \t\tOptionBuilder.withDescription(\"path to the input file / directory\");\n \t\tOptionBuilder.isRequired(true);\n \t\toptions.addOption(OptionBuilder.create(\"input\"));\n \t\t\n \t\tOptionBuilder.withArgName(\"int\");\n \t\tOptionBuilder.hasArg(true);\n \t\tOptionBuilder.withDescription(\"minimum size of file in MB to split (Default: \" + MIN_FILE_SIZE + \" MB)\");\n \t\tOptionBuilder.isRequired(false);\n \t\toptions.addOption(OptionBuilder.create(\"minsize\"));\n \t\t\n \t\tOptionBuilder.withArgName(\"path\");\n \t\tOptionBuilder.hasArg(true);\n \t\tOptionBuilder.withDescription(\"path to the ignore list file\");\n \t\tOptionBuilder.isRequired(false);\n \t\toptions.addOption(OptionBuilder.create(\"ignore\"));\n \t\t\n \t\tOptionBuilder.withArgName(\"path\");\n \t\tOptionBuilder.hasArg(true);\n \t\tOptionBuilder.withDescription(\"path to the output directory\");\n \t\tOptionBuilder.isRequired(false);\n \t\toptions.addOption(OptionBuilder.create(\"output\"));\n \t\t\n \t\tOptionBuilder.withArgName(\"path\");\n \t\tOptionBuilder.hasArg(true);\n \t\tOptionBuilder.withDescription(\"path to the osmosis script template\");\n \t\tOptionBuilder.isRequired(false);\n \t\toptions.addOption(OptionBuilder.create(\"template\"));\n \t\t\n \t\treturn options;\n \t\t\n \t}", "public static Options createOptions() {\n Options options = new Options();\n options.addOption(Option.builder(\"i\").required(true).longOpt(\"inputFile\").hasArg(true)\n .argName(\"PATH\").desc(\"this command specifies the path to the file \"\n + \"containing queries to be inputted into the tool. It is therefore mandatory\")\n .build());\n options.addOption(Option.builder(\"o\").longOpt(\"outputFile\").hasArg(true).argName(\"PATH\")\n .desc(\"this command specifies the path to the file that the tool can write \"\n + \"its results to. If not specified, the tool will simply print results\"\n + \"on the console. It is therefore optional\").build());\n options.addOption(Option.builder(\"l\").longOpt(\"limit\").hasArg(true).argName(\"INTEGER\")\n .desc(\"this command specifies the path to an integer that the tools takes \"\n + \"as a limit for the number of errors to be explored, thereby controlling\"\n + \"the runtime. It is therefore optional\").build());\n return options;\n }", "public CopsOptionParser() {\n\t\tsuper();\n\t\taddOption(HELP);\n\t\taddOption(SCENARIO);\n\t\taddOption(VALIDATE_ONLY);\n\t\taddOption(CONF);\n\n\t}", "private Options createOptions()\n {\n final Options options = new Options();\n\n options.addOption(optionDataDir);\n options.addOption(optionRepoDir);\n options.addOption(optOutputFilename);\n\n return options;\n }", "public static Options getCmdLineOptions(){\n\t\tOptions options = new Options();\n\t\t//\t\toptions.addOption(OptionBuilder.withArgName(\"outputPath\").hasArg().withDescription(\"output sequence lengths to a file [if not specified, lengths are printed to stdout]\").create(Thunder.OPT_PATH_OUTPUT));\n\t\t//\t\toptions.addOption(OptionBuilder.withArgName(\"maxExpectedLength\").hasArg().withDescription(\"print sequences exceeding this maximum expected size (for debugging + QC)\").create(\"m\"));\n\t\treturn options;\n\t}", "public OptionParser() {\n\n\t}", "private static Options makeOptions() {\n\t\tOptions options = new Options();\n\n\t\tOption configOption = new Option(\"c\", \"config\", true, \"configuration file path\");\n\t\tconfigOption.setRequired(false);\n\t\tconfigOption.setArgName(\"file\");\n\t\toptions.addOption(configOption);\n\n\t\tOption debugOption = new Option(\"d\", \"debug\", false, \"debug mode\");\n\t\tdebugOption.setRequired(false);\n\t\toptions.addOption(debugOption);\n\n\t\tOption timingOption = new Option(\"t\", \"timing\", false, \"timing mode\");\n\t\ttimingOption.setRequired(false);\n\t\toptions.addOption(timingOption);\n\n\t\treturn options;\n\t}", "public static Options prepareOptions() {\n Options options = new Options();\n\n options.addOption(\"f\", \"forceDeleteIndex\", false,\n \"Force delete index if index already exists.\");\n options.addOption(\"h\", \"help\", false, \"Show this help information and exit.\");\n options.addOption(\"r\", \"realTime\", false, \"Keep for backwards compabitlity. No Effect.\");\n options.addOption(\"t\", \"terminology\", true, \"The terminology (ex: ncit_20.02d) to load.\");\n options.addOption(\"d\", \"directory\", true, \"Load concepts from the given directory\");\n options.addOption(\"xc\", \"skipConcepts\", false,\n \"Skip loading concepts, just clean stale terminologies, metadata, and update latest flags\");\n options.addOption(\"xm\", \"skipMetadata\", false,\n \"Skip loading metadata, just clean stale terminologies concepts, and update latest flags\");\n options.addOption(\"xl\", \"skipLoad\", false,\n \"Skip loading data, just clean stale terminologies and update latest flags\");\n options.addOption(\"xr\", \"report\", false, \"Compute and return a report instead of loading data\");\n\n return options;\n }", "public static Options prepCliParser()\n\t{\n\t\tOptions knowsCliDtd = new Options();\n\t\tfinal boolean needsEmbelishment = true;\n\t\tknowsCliDtd.addOption( configFlagS, configFlagLong, needsEmbelishment,\n\t\t\t\t\"path to config (ex C:\\\\Program Files\\\\apache\\\\tomcat.txt)\" );\n\t\tknowsCliDtd.addOption( verboseFlagS, verboseFlagLong,\n\t\t\t\t! needsEmbelishment, \"show debug information\" );\n\t\tknowsCliDtd.addOption( helpFlagS, helpFlagLong,\n\t\t\t\t! needsEmbelishment, \"show arg flags\" );\n\t\treturn knowsCliDtd;\n\t}", "private void initOptions() {\n\t\t// TODO: ???\n\t\t// additional input docs via --dir --includes --excludes --recursive\n\t\t// --loglevel=debug\n\t\t// --optionally validate output as well?\n\t\t\n\t\tthis.sb = new StringBuffer();\n\t\tArrayList options = new ArrayList();\n\t\toptions.add( new LongOpt(\"help\", LongOpt.NO_ARGUMENT, null, 'h') );\n\t\toptions.add( new LongOpt(\"version\", LongOpt.NO_ARGUMENT, null, 'v') );\t\t\n\t\toptions.add( new LongOpt(\"query\", LongOpt.REQUIRED_ARGUMENT, sb, 'q') );\n\t\toptions.add( new LongOpt(\"base\", LongOpt.REQUIRED_ARGUMENT, sb, 'b') );\n\t\toptions.add( new LongOpt(\"var\", LongOpt.REQUIRED_ARGUMENT, sb, 'P') );\n\t\toptions.add( new LongOpt(\"out\", LongOpt.REQUIRED_ARGUMENT, sb, 'o') );\n\t\toptions.add( new LongOpt(\"algo\", LongOpt.REQUIRED_ARGUMENT, sb, 'S') );\n\t\toptions.add( new LongOpt(\"encoding\", LongOpt.REQUIRED_ARGUMENT, sb, 'E') );\n\t\toptions.add( new LongOpt(\"indent\", LongOpt.REQUIRED_ARGUMENT, sb, 'I') );\t\n\t\toptions.add( new LongOpt(\"strip\", LongOpt.NO_ARGUMENT, null, 's') );\t\t\n\t\toptions.add( new LongOpt(\"update\", LongOpt.REQUIRED_ARGUMENT, sb, 'u') );\t\n\t\toptions.add( new LongOpt(\"xinclude\", LongOpt.NO_ARGUMENT, null, 'x') );\t\t\n\t\toptions.add( new LongOpt(\"explain\", LongOpt.NO_ARGUMENT, null, 'e') );\n\t\toptions.add( new LongOpt(\"noexternal\", LongOpt.NO_ARGUMENT, null, 'n') );\t\t\n\t\toptions.add( new LongOpt(\"runs\", LongOpt.REQUIRED_ARGUMENT, sb, 'r') );\n\t\toptions.add( new LongOpt(\"iterations\", LongOpt.REQUIRED_ARGUMENT, sb, 'i') );\n\t\toptions.add( new LongOpt(\"docpoolcapacity\", LongOpt.REQUIRED_ARGUMENT, sb, 'C') );\n\t\toptions.add( new LongOpt(\"docpoolcompression\", LongOpt.REQUIRED_ARGUMENT, sb, 'D') );\n\t\toptions.add( new LongOpt(\"nobuilderpool\", LongOpt.NO_ARGUMENT, null, 'p') );\n\t\toptions.add( new LongOpt(\"debug\", LongOpt.NO_ARGUMENT, null, 'd') );\t\t\n\t\toptions.add( new LongOpt(\"validate\", LongOpt.REQUIRED_ARGUMENT, sb, 'V') ); \n\t\toptions.add( new LongOpt(\"namespace\", LongOpt.REQUIRED_ARGUMENT, sb, 'W') ); \n\t\toptions.add( new LongOpt(\"schema\", LongOpt.REQUIRED_ARGUMENT, sb, 'w') );\n\t\toptions.add( new LongOpt(\"filterpath\", LongOpt.REQUIRED_ARGUMENT, sb, 'f') );\n\t\toptions.add( new LongOpt(\"filterquery\", LongOpt.REQUIRED_ARGUMENT, sb, 'F') );\n\t\toptions.add( new LongOpt(\"xomxpath\", LongOpt.NO_ARGUMENT, null, 'N') );\t\t\n\t\t\n////\t\toptions.add( new LongOpt(\"loglevel\", LongOpt.REQUIRED_ARGUMENT, sb, 'l') ); setLogLevels(Level.INFO);\n\t\t\t\n\t\tthis.longOpts = new LongOpt[options.size()];\n\t\toptions.toArray(this.longOpts);\t\t\n\t}", "private void setOptions() {\n cliOptions = new Options();\n cliOptions.addOption(Option.builder(\"p\")\n .required(false)\n .hasArg()\n .desc(\"Paramaters file\")\n .type(String.class)\n .build());\n cliOptions.addOption(Option.builder(\"P\")\n .required(false)\n .hasArg()\n .desc(\"Overwrite of one or more parameters provided by file.\")\n .type(String.class)\n .hasArgs()\n .build());\n cliOptions.addOption(Option.builder(\"H\")\n .required(false)\n .desc(\"Create a parameter file model on the classpath.\")\n .type(String.class)\n .build());\n }", "private static Options getOptions() {\n Option inputOption = Option.builder(\"i\")\n .longOpt(\"input\")\n .hasArg()\n .argName(\"input file\")\n .required()\n .desc(\"The JSON input filename\")\n .build();\n Option outputOption = Option.builder(\"o\")\n .longOpt(\"output\")\n .hasArg()\n .argName(\"output file\")\n .required()\n .desc(\"The Drupal output filename\")\n .build();\n Option configOption = Option.builder(\"c\")\n .longOpt(\"config\")\n .hasArg()\n .argName(\"properties file\")\n .required()\n .desc(\"The properties file for containing Google credentials\")\n .build();\n Option helpOption = Option.builder(\"h\")\n .longOpt(\"help\")\n .desc(\"Print this message\")\n .build();\n\n Options options = new Options();\n options.addOption(inputOption);\n options.addOption(outputOption);\n options.addOption(configOption);\n options.addOption(helpOption);\n\n return options;\n }", "private static JSAP prepCmdLineParser()\n throws Exception {\n final JSAP jsap = new JSAP();\n\n final FlaggedOption site_xml = new FlaggedOption(\"hbase_site\")\n .setStringParser(JSAP.STRING_PARSER)\n .setDefault(\"/etc/hbase/conf/hbase-site.xml\")\n .setRequired(true)\n .setShortFlag('c')\n .setLongFlag(JSAP.NO_LONGFLAG);\n site_xml.setHelp(\"Path to hbase-site.xml\");\n jsap.registerParameter(site_xml);\n\n final FlaggedOption jmxremote_password = new FlaggedOption(\"jmxremote_password\")\n .setStringParser(JSAP.STRING_PARSER)\n .setDefault(\"/etc/hbase/conf/jmxremote.password\")\n .setRequired(true)\n .setShortFlag('j')\n .setLongFlag(JSAP.NO_LONGFLAG);\n jmxremote_password.setHelp(\"Path to jmxremote.password.\");\n jsap.registerParameter(jmxremote_password);\n\n final FlaggedOption throttleFactor = new FlaggedOption(\"throttleFactor\")\n .setStringParser(JSAP.INTEGER_PARSER)\n .setDefault(\"1\")\n .setRequired(false)\n .setShortFlag('t')\n .setLongFlag(JSAP.NO_LONGFLAG);\n throttleFactor.setHelp(\"Throttle factor to limit the compaction queue. The default (1) limits it to num threads / 1\");\n jsap.registerParameter(throttleFactor);\n\n final FlaggedOption num_cycles = new FlaggedOption(\"numCycles\")\n .setStringParser(JSAP.INTEGER_PARSER)\n .setDefault(\"1\")\n .setRequired(false)\n .setShortFlag('n')\n .setLongFlag(JSAP.NO_LONGFLAG);\n num_cycles.setHelp(\"Number of iterations to run. The default is 1. Set to 0 to run forever.\");\n jsap.registerParameter(num_cycles);\n\n final FlaggedOption pauseInterval = new FlaggedOption(\"pauseInterval\")\n .setStringParser(JSAP.INTEGER_PARSER)\n .setDefault(\"30000\")\n .setRequired(false)\n .setShortFlag('p')\n .setLongFlag(JSAP.NO_LONGFLAG);\n pauseInterval.setHelp(\"Time (in milliseconds) to pause between compactions.\");\n jsap.registerParameter(pauseInterval);\n\n final FlaggedOption waitInterval = new FlaggedOption(\"waitInterval\")\n .setStringParser(JSAP.INTEGER_PARSER)\n .setDefault(\"60000\")\n .setRequired(false)\n .setShortFlag('w')\n .setLongFlag(JSAP.NO_LONGFLAG);\n waitInterval.setHelp(\"Time (in milliseconds) to wait between \" +\n \"time (are we there yet?) checks.\");\n jsap.registerParameter(waitInterval);\n\n DateStringParser date_parser = DateStringParser.getParser();\n date_parser.setProperty(\"format\", \"HH:mm\");\n\n final FlaggedOption startTime = new FlaggedOption(\"startTime\")\n .setStringParser(date_parser)\n .setDefault(\"01:00\")\n .setRequired(true)\n .setShortFlag('s')\n .setLongFlag(JSAP.NO_LONGFLAG);\n startTime.setHelp(\"Time to start compactions.\");\n jsap.registerParameter(startTime);\n\n final FlaggedOption endTime = new FlaggedOption(\"endTime\")\n .setStringParser(date_parser)\n .setDefault(\"07:00\")\n .setRequired(true)\n .setShortFlag('e')\n .setLongFlag(JSAP.NO_LONGFLAG);\n endTime.setHelp(\"Time to stop compactions.\");\n jsap.registerParameter(endTime);\n\n final FlaggedOption dryRun = new FlaggedOption(\"dryRun\")\n .setStringParser(JSAP.BOOLEAN_PARSER)\n .setDefault(\"false\")\n .setRequired(false)\n .setShortFlag('d')\n .setLongFlag(JSAP.NO_LONGFLAG);\n dryRun.setHelp(\"Don't actually do any compactions or splits.\");\n jsap.registerParameter(dryRun);\n\n final FlaggedOption maxSplitSize = new FlaggedOption(\"maxSplitSize_in_MB\")\n .setStringParser(JSAP.LONG_PARSER)\n .setDefault(\"4096\")\n .setRequired(false)\n .setShortFlag('m')\n .setLongFlag(JSAP.NO_LONGFLAG);\n maxSplitSize.setHelp(\"Maximum size for store files (in MB) at which a region is split.\");\n jsap.registerParameter(maxSplitSize);\n\n final FlaggedOption splitsEnabled = new FlaggedOption(\"splitsEnabled\")\n .setStringParser(JSAP.BOOLEAN_PARSER)\n .setDefault(\"false\")\n .setRequired(false)\n .setShortFlag('h')\n .setLongFlag(JSAP.NO_LONGFLAG);\n splitsEnabled.setHelp(\"Do splits (default split size will be 256MB unless specified).\");\n jsap.registerParameter(splitsEnabled);\n\n final FlaggedOption table_names = new FlaggedOption(\"tableNames\")\n .setStringParser(JSAP.STRING_PARSER)\n .setRequired(false)\n .setShortFlag(JSAP.NO_SHORTFLAG)\n .setLongFlag(\"tableNames\")\n .setList(true)\n .setListSeparator(',');\n table_names.setHelp(\"Specific table names to check against (default is all)\");\n jsap.registerParameter(table_names);\n\n final FlaggedOption files_keep = new FlaggedOption(\"filesKeep\")\n .setStringParser(JSAP.INTEGER_PARSER)\n .setRequired(false)\n .setShortFlag('f')\n .setLongFlag(\"filesKeep\")\n .setDefault(\"5\");\n files_keep.setHelp(\"Number of storefiles to look for before compacting (default is 5)\");\n jsap.registerParameter(files_keep);\n\n\n return jsap;\n }", "public abstract ArgumentParser makeParser();", "protected P parse(String options, String[] args){\n HashMap cmdFlags = new HashMap();\n String flag;\n String nextFlag=null;\n StringBuffer errors=new StringBuffer();\n /**\n First go through options to see what should be in args\n */\n for(int which=0;which<options.length();which++){\n flag = \"-\"+options.substring(which,which+1);\n if(which+1<options.length()){\n nextFlag=options.substring(which+1,which+2);\n if (nextFlag.equals(\"-\")){\n cmdFlags.put(flag,nextFlag);\n } else\n if (nextFlag.equals(\"+\")){\n cmdFlags.put(flag,nextFlag);\n /*\n mark that it is required\n if found this will be overwritten by -\n */\n this.put(flag,nextFlag);\n } else\n //JDH changed to \"_\" from \";\" because too many cmdlines mess up ;\n if (nextFlag.equals(\"_\")){\n cmdFlags.put(flag,nextFlag);\n } else\n //JDH changed to \".\" from \":\" because too many cmdlines mess up ;\n if (nextFlag.equals(\".\")){\n cmdFlags.put(flag,\" \"); //JDH changed this from \":\"\n /*\n mark that it is required\n if found this will be overwritten by value\n JDH should use \" \" so it cannot be the same as a value\n */\n this.put(flag,\" \"); // mark that it is required\n } else {\n System.out.println(\"Bad symbol \"+nextFlag+\"in option string\");\n }\n which++;\n } else {\n System.out.println(\"Missing symbol in option string at \"+which);\n }\n }\n\n int arg=0;\n for(;arg<args.length;arg++){\n if (!args[arg].startsWith(\"-\")){\n break;\n }\n flag = args[arg];\n /*\n This should tell it to quit looking for flags or options\n */\n if (flag.equals(\"--\")){\n arg++;\n break;\n }\n if (!(cmdFlags.containsKey(flag))){\n errors.append(\"\\nbad flag \"+flag);\n continue;\n }\n if (((String)cmdFlags.get(flag)).equals(\"-\")){\n this.put(flag,\"-\");\n continue;\n }\n if (((String)cmdFlags.get(flag)).equals(\"+\")){\n this.put(flag,\"-\");// turns off the + because it was found\n continue;\n }\n if (!(arg+1<args.length)){\n errors.append(\"\\nMissing value for \"+flag);\n continue;\n }\n arg++;\n this.put(flag,args[arg]);\n }\n String[] params=null;\n params = new String[args.length - arg];\n\n int n=0;\n // reverse these so they come back in the right order!\n for(;arg<args.length;arg++){\n params[n++] = args[arg];\n }\n Iterator k = null;\n Map.Entry e = null;\n if (this.containsValue(\"+\")){\n // can iterate through to see which ones\n k = this.entrySet().iterator();\n while (k.hasNext()){\n if (\"+\".equals((String)(e=(Map.Entry)k.next()).getValue())){\n errors.append(\"\\nThe required flag \"+(String)e.getKey()+\" was not supplied.\");\n };\n }\n } \n /*\n Should change this to \" \" in accordance with remark above\n */\n //JDH changed to \" \" from \":\" in both spots below\n if (this.containsValue(\" \")){\n // can iterate through to see which ones\n k = this.entrySet().iterator();\n while (k.hasNext()){\n if (\" \".equals((String)(e=(Map.Entry)k.next()).getValue())){\n errors.append(\"\\nThe required option \"+(String)e.getKey()+\" was not supplied.\");\n }\n }\n }\n this.put(\" \",params);\n this.put(\"*\",errors.toString());\n return this;\n }", "@Before public void initParser() {\n\t\tparser = new CliParserImpl(\"-\", \"--\");\n\t}", "private static CommandLine parseCommandLine(String[] args) {\n Option config = new Option(CONFIG, true, \"operator config\");\n Option brokerStatsZookeeper =\n new Option(BROKERSTATS_ZOOKEEPER, true, \"zookeeper for brokerstats topic\");\n Option brokerStatsTopic = new Option(BROKERSTATS_TOPIC, true, \"topic for brokerstats\");\n Option clusterZookeeper = new Option(CLUSTER_ZOOKEEPER, true, \"cluster zookeeper\");\n Option seconds = new Option(SECONDS, true, \"examined time window in seconds\");\n options.addOption(config).addOption(brokerStatsZookeeper).addOption(brokerStatsTopic)\n .addOption(clusterZookeeper).addOption(seconds);\n\n if (args.length < 6) {\n printUsageAndExit();\n }\n\n CommandLineParser parser = new DefaultParser();\n CommandLine cmd = null;\n try {\n cmd = parser.parse(options, args);\n } catch (ParseException | NumberFormatException e) {\n printUsageAndExit();\n }\n return cmd;\n }", "OPTION createOPTION();", "public static Options addOptions() {\n Options options = new Options();\n options.addOption(\"f\", true, \"The input file \");\n options.addOption(\"d\", true, \"The output directory\");\n options.addOption(\"u\", true, \"Only uber retrieval value is (1,0) default 0\");\n options.addOption(\"l\",true,\"Only Lyft Retrieval value is (1,0) default 0\");\n return options;\n }", "public Options initOptions() {\n\n\t\tOptions privateOptions = new Options();\n\n\t\t//Algorithm options\n\t\t//Option algorithm = new Option(\"a\", \"algorithm\", true, \"Specify the algorithm to use during the alignment\");\n\t\t//algorithm.setArgName(\"mem | aln | bwasw\");\n\n\t\t//options.addOption(algorithm);\n\n\t\tOptionGroup algorithm = new OptionGroup();\n\n\t\tOption mem = new Option(\"m\",\"mem\", false,\"The MEM algorithm will be used\");\n\t\talgorithm.addOption(mem);\n\n\t\tOption aln = new Option(\"a\",\"aln\", false,\"The ALN algorithm will be used\");\n\t\talgorithm.addOption(aln);\n\n\t\tOption bwasw = new Option(\"b\", \"bwasw\", false, \"The bwasw algorithm will be used\");\n\t\talgorithm.addOption(bwasw);\n\n\t\tprivateOptions.addOptionGroup(algorithm);\n\n\t\t//Paired or single reads\n\t\t//Option reads = new Option(\"r\", \"reads\", true, \"Type of reads to use during alignment\");\n\t\t//reads.setArgName(\"paired | single\");\n\n\t\t//options.addOption(reads);\n\t\tOptionGroup reads = new OptionGroup();\n\n\t\tOption paired = new Option(\"p\", \"paired\", false, \"Paired reads will be used as input FASTQ reads\");\n\t\treads.addOption(paired);\n\n\t\tOption single = new Option(\"s\", \"single\", false, \"Single reads will be used as input FASTQ reads\");\n\t\treads.addOption(single);\n\n\t\tprivateOptions.addOptionGroup(reads);\n\n\t\t// Options to BWA\n\t\tOptionGroup bwaOptionsGroup = new OptionGroup();\n\t\tOption bwaArgs = new Option(\"w\", \"bwa\", true, \"Arguments passed directly to BWA\");\n\t\tbwaArgs.setArgName(\"\\\"BWA arguments\\\"\");\n\n\t\tbwaOptionsGroup.addOption(bwaArgs);\n\n\t\tprivateOptions.addOptionGroup(bwaOptionsGroup);\n\n\t\t//Index\n\t\tOptionGroup indexGroup = new OptionGroup();\n\t\tOption index = new Option(\"i\", \"index\", true, \"Prefix for the index created by bwa to use - setIndexPath(string)\");\n\t\tindex.setArgName(\"Index prefix\");\n\t\tindex.setRequired(true);\n\n\t\tindexGroup.addOption(index);\n\n\t\tprivateOptions.addOptionGroup(indexGroup);\n\n\t\t//Partition number\n\t\tOptionGroup sparkGroup = new OptionGroup();\n\t\tOption partitions = new Option(\"n\", \"partitions\", true,\n\t\t\t\t\"Number of partitions to divide input - setPartitionNumber(int)\");\n\t\tpartitions.setArgName(\"Number of partitions\");\n\n\t\tsparkGroup.addOption(partitions);\n\n\t\tprivateOptions.addOptionGroup(sparkGroup);\n\n\n\t\tOptionGroup reducerGroup = new OptionGroup();\n\t\tOption reducer = new Option(\"r\", \"reducer\", false, \"The program is going to merge all the final results in a reducer phase\");\n\n\t\treducerGroup.addOption(reducer);\n\n\t\tprivateOptions.addOptionGroup(reducerGroup);\n\n\t\t/* OptionGroup sorting = new OptionGroup();\n\n\t\tOption hdfs = new Option(\"f\", \"hdfs\", false, \"The HDFS is used to perform the input FASTQ reads sort\");\n\t\tsorting.addOption(hdfs);\n\n\t\tOption spark = new Option(\"k\", \"spark\", false, \"the Spark engine is used to perform the input FASTQ reads sort\");\n\t\tsorting.addOption(spark);\n\n\t\tprivateOptions.addOptionGroup(sorting);\n\t\t*/\n\t\t// Help\n\t\tOptionGroup helpGroup = new OptionGroup();\n\t\tOption help = new Option(\"h\", \"help\", false, \"Shows this help\");\n\n\t\thelpGroup.addOption(help);\n\n\t\tprivateOptions.addOptionGroup(helpGroup);\n\n\t\treturn privateOptions;\n\t}", "private HashMap initCommonOpts() {\n HashMap _opts = new HashMap();\n \n _opts.put(\"help\", \n new Option(\"h\", \"help\", false, \"Get help.\")\n );\n _opts.put(\"version\",\n new Option(\"v\", \"version\", false, \"Print version number and exit.\")\n );\n _opts.put(\"system\",\n OptionBuilder\n .withLongOpt( \"system\" )\n .withDescription(\"Use the given filename or system identifier to find the DTD. \" +\n \"This could be a relative \" +\n \"pathname, if the DTD exists in a file on your system, or an HTTP URL. \" +\n \"The '-s' switch is optional. \" +\n \"Note that if a catalog is in use, what looks like a filename might \" +\n \"resolve to something else entirely.\")\n .hasArg()\n .withArgName(\"system-id\")\n .create('s')\n );\n _opts.put(\"doc\",\n OptionBuilder\n .withLongOpt( \"doc\" )\n .withDescription(\"Specify an XML document used to find the DTD. This could be just a \\\"stub\\\" \" +\n \"file, that contains nothing other than the doctype declaration and a root element. \" +\n \"This file doesn't need to be valid according to the DTD.\")\n .hasArg()\n .withArgName(\"xml-file\")\n .create('d')\n );\n _opts.put(\"public\",\n OptionBuilder\n .withLongOpt( \"public\" )\n .withDescription(\"Use the given public identifier to find the DTD. This would be used in \" +\n \"conjunction with an OASIS catalog file.\")\n .hasArg()\n .withArgName(\"public-id\")\n .create('p')\n );\n _opts.put(\"catalog\",\n OptionBuilder\n .withLongOpt( \"catalog\" )\n .withDescription(\"Specify a file to use as the OASIS catalog, to resolve system and \" +\n \"public identifiers.\")\n .hasArg()\n .withArgName(\"catalog-file\")\n .create('c')\n );\n _opts.put(\"title\",\n OptionBuilder\n .withLongOpt( \"title\" )\n .withDescription(\"Specify the title of this DTD.\")\n .hasArg()\n .withArgName(\"dtd-title\")\n .create('t')\n );\n _opts.put(\"roots\",\n OptionBuilder\n .withLongOpt(\"roots\")\n .withDescription(\"Specify the set of possible root elements for documents conforming \" +\n \"to this DTD.\")\n .hasArg()\n .withArgName(\"roots\")\n .create('r')\n );\n _opts.put(\"docproc\",\n OptionBuilder\n .withLongOpt(\"docproc\")\n .withDescription(\"Command to use to process structured comments. This command should \" +\n \"take its input on stdin, and produce valid XHTML on stdout.\")\n .hasArg()\n .withArgName(\"cmd\")\n .create()\n );\n _opts.put(\"markdown\",\n OptionBuilder\n .withLongOpt(\"markdown\")\n .withDescription(\"Causes structured comments to be processed as Markdown. \" +\n \"Requires pandoc to be installed on the system, and accessible to this process. \" +\n \"Same as \\\"--docproc pandoc\\\". If you want to supply your own Markdown \" +\n \"processor, or any other processor, use the --docproc option.\")\n .create('m')\n );\n _opts.put(\"param\",\n OptionBuilder\n .withLongOpt(\"param\")\n .hasArgs(2)\n .withValueSeparator()\n .withDescription(\"Parameter name & value to pass to the XSLT. You can use multiple \" +\n \"instances of this option.\")\n .withArgName( \"param=value\" )\n .create('P')\n );\n\n /* \n The 'q' here is a hack to get around some weird behavior that I can't figure out.\n If the 'q' is omitted, this option just doesn't work.\n */\n _opts.put(\"debug\",\n OptionBuilder\n .withLongOpt(\"debug\")\n .withDescription(\"Turns on debugging.\")\n .create('q')\n );\n\n return _opts;\n }", "public ParseOptions() {}", "public CommandLine parse(String[] args ) throws ParseException\n {\n String[] cleanArgs = CleanArgument.cleanArgs( args );\n CommandLineParser parser = new DefaultParser();\n return parser.parse( options, cleanArgs );\n }", "@Override\n @SuppressWarnings(\"static-access\")\n public void setJCLIOptions() {\n Option Help = new Option(\"h\", \"help\", false, \"Show Help.\");\n this.jcOptions.addOption(Help);\n this.jcOptions.addOption(OptionBuilder.withLongOpt(\"file\").withDescription(\"File to Convert\").isRequired(false).hasArg().create(\"f\"));\n //this.jcOptions.addOption(OptionBuilder.withLongOpt(\"outputfile\").withDescription(\"Output File\").isRequired(false).hasArg().create(\"of\"));\n OptionGroup jcGroup = new OptionGroup();\n jcGroup.addOption(OptionBuilder.withLongOpt(\"texttobinary\").withDescription(\"Convert text to Binary\").create(\"ttb\"));\n jcGroup.addOption(OptionBuilder.withLongOpt(\"binarytotext\").withDescription(\"Convert binary to text\").create(\"btt\"));\n this.jcOptions.addOptionGroup(jcGroup);\n }", "private void prepareOptions() {\n CommandFactory\n .getInstance()\n .getCommands()\n .forEach((s, command) -> options.addOption(s, true, command.getDefinition()));\n }", "public static void initDefaultOptions()\r\n\t{\n\r\n\t\taddOption(HELP, true, \"show Arguments\");\r\n\t}", "public void createOptionsList() {\r\n int j;\r\n int i;\r\n String tempClassOptionsString = this.classOptionsString;\r\n while (tempClassOptionsString.length() > 0) {\r\n char cliChar = ' ';\r\n String optionValue = \"\";\r\n String str = \"\";\r\n tempClassOptionsString = tempClassOptionsString.trim();\r\n\r\n i = tempClassOptionsString.indexOf(\"-\");\r\n if (i >= 0) {\r\n cliChar = tempClassOptionsString.charAt(i + 1);\r\n tempClassOptionsString = tempClassOptionsString.substring(i + 2).trim();\r\n if (tempClassOptionsString.length() == 0) {\r\n optionValue = \"true\";\r\n Pair<String, String> optionPair = new Pair<String, String>(String.valueOf(cliChar), optionValue);\r\n this.outputClassOptions.add(optionPair);\r\n } else {\r\n if (tempClassOptionsString.charAt(0) == '-') {\r\n optionValue = \"true\";\r\n Pair<String, String> optionPair = new Pair<String, String>(String.valueOf(cliChar), optionValue);\r\n this.outputClassOptions.add(optionPair);\r\n } else if (tempClassOptionsString.charAt(0) == '(') {\r\n int openBracket = 0;\r\n int closeBracket = 0;\r\n StringBuffer temp = new StringBuffer(\"\");\r\n for (int k = 0; k < tempClassOptionsString.length(); k++) {\r\n char cTemp = tempClassOptionsString.charAt(k);\r\n temp.append(cTemp);\r\n switch (cTemp) {\r\n case '(': {\r\n openBracket += 1;\r\n break;\r\n }\r\n case ')': {\r\n closeBracket += 1;\r\n if (closeBracket == openBracket) {\r\n tempClassOptionsString = tempClassOptionsString.substring(k + 1).trim();\r\n optionValue = temp.toString().trim();\r\n optionValue = optionValue.substring(1, optionValue.length() - 1);\r\n Pair<String, String> optionPair = new Pair<String, String>(String.valueOf(cliChar), optionValue);\r\n this.outputClassObjectOptions.add(optionPair);\r\n optionsString subObject = new optionsString(optionValue);\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n\r\n\r\n } else {\r\n j = tempClassOptionsString.indexOf(\" \");\r\n if (j > 0) {\r\n optionValue = tempClassOptionsString.substring(0, j);\r\n tempClassOptionsString = tempClassOptionsString.substring(j + 1).trim();\r\n Pair<String, String> optionPair = new Pair<String, String>(String.valueOf(cliChar), optionValue);\r\n this.outputClassOptions.add(optionPair);\r\n } else {\r\n optionValue = tempClassOptionsString;\r\n tempClassOptionsString = \"\";\r\n Pair<String, String> optionPair = new Pair<String, String>(String.valueOf(cliChar), optionValue);\r\n this.outputClassOptions.add(optionPair);\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n i = this.classFullName.lastIndexOf('.');\r\n if (i > 0) {\r\n this.classShortName = this.classFullName.substring(i + 1);\r\n } else\r\n this.classShortName = this.classFullName;\r\n }", "public static CommandLine createCommand(String[] args) {\n CommandLineParser parser = new DefaultParser();\n Options options = createOptions();\n HelpFormatter help = new HelpFormatter();\n\n help.setOptionComparator(new Comparator<Option>() {\n public int compare(Option option1, Option option2) {\n if (option1.isRequired() != option2.isRequired()) {\n return option1.isRequired() ? -1 : 1;\n }\n else if (option1.equals(option2)) {\n return 0;\n }\n else {\n return (option1.getLongOpt().equals(\"outputFile\")) ? -1 : 1;\n }\n }\n });\n\n CommandLine cl = null;\n try {\n cl = parser.parse(options, args);\n } catch (ParseException e) {\n System.out.println(\"there was an issue parsing the commandline\" + e.getMessage());\n help.printHelp(\"query_breakdown\", options, true);\n }\n\n return cl;\n }", "private static TestgenOptions parseTestgenOptions(String[] args) {\n OptionsParser parser = OptionsParser.newOptionsParser(TestgenOptions.class);\n parser.parseAndExitUponError(args);\n return parser.getOptions(TestgenOptions.class);\n }", "public static void main( String[] args )\n {\n CommandLineParser parser = new DefaultParser();\n\n // create the Options\n OptionGroup optgrp = new OptionGroup();\n optgrp.addOption(Option.builder(\"l\")\n .longOpt(\"list\")\n .hasArg().argName(\"keyword\").optionalArg(true)\n .type(String.class)\n .desc(\"List documents scraped for keyword\")\n .build());\n optgrp.addOption( Option.builder(\"r\")\n .longOpt(\"read\")\n .hasArg().argName(\"doc_id\")\n .type(String.class)\n .desc(\"Display a specific scraped document.\")\n .build());\n optgrp.addOption( Option.builder(\"a\")\n .longOpt(\"add\")\n .type(String.class)\n .desc(\"Add keywords to scrape\")\n .build());\n optgrp.addOption( Option.builder(\"s\")\n .longOpt(\"scraper\")\n .type(String.class)\n .desc(\"Start the scraper watcher\")\n .build());\n\n\n\n Options options = new Options();\n options.addOptionGroup(optgrp);\n\n options.addOption( Option.builder(\"n\")\n .longOpt(\"search-name\").hasArg()\n .type(String.class)\n .desc(\"Name of the search task for a set of keywords\")\n .build());\n\n options.addOption( Option.builder(\"k\")\n .longOpt(\"keywords\")\n .type(String.class).hasArgs()\n .desc(\"keywords to scrape. \")\n .build());\n\n options.addOption( Option.builder(\"t\")\n .longOpt(\"scraper-threads\")\n .type(Integer.class).valueSeparator().hasArg()\n .desc(\"Number of scraper threads to use.\")\n .build());\n\n //String[] args2 = new String[]{ \"--add --search-name=\\\"some thing\\\" --keywords=kw1, kw2\" };\n // String[] args2 = new String[]{ \"--add\", \"--search-name\", \"some thing new\", \"--keywords\", \"kw3\", \"kw4\"};\n // String[] args2 = new String[]{ \"--scraper\"};\n// String[] args2 = new String[]{ \"--list\"};\n\n int exitCode = 0;\n CommandLine line;\n try {\n // parse the command line arguments\n line = parser.parse( options, args );\n }\n catch( ParseException exp ) {\n System.out.println( \"Unexpected exception:\" + exp.getMessage() );\n HelpFormatter formatter = new HelpFormatter();\n formatter.printHelp( \"searchscraper \\n\" +\n \" [--add --search-name=<SearchTask> --keywords=<keyword1> <keyword2> ...]\\n\" +\n \" [--list [<keyword>] ]\\n\" +\n \" [--read <doc_id>]\\n\", options , true);\n System.exit(2);\n return;\n }\n\n if( line.hasOption( \"add\" ) ) {\n // Add Search Task mode\n if(!line.hasOption( \"search-name\" ) || !line.hasOption(\"keywords\")) {\n System.out.println(\"must have search name and keywords when adding\");\n System.exit(2);\n }\n String name = line.getOptionValue( \"search-name\" );\n String[] keywords = line.getOptionValues(\"keywords\");\n System.out.println(\"Got keywords: \" + Arrays.toString(keywords) );\n\n exitCode = add(name, Arrays.asList(keywords));\n\n } else if( line.hasOption( \"list\" ) ) {\n // List Keyword mode\n DataStore ds = new DataStore();\n String keyword = line.getOptionValue( \"list\" );\n System.out.println(\"Listing with keyword = `\" + keyword + \"`\");\n if(keyword == null) {\n List<String > keywords = ds.listKeywords();\n for(String kw : keywords) {\n System.out.println(kw);\n }\n exitCode=0;\n } else {\n List<SearchResult > results = ds.listDocsForKeyword(keyword);\n for(SearchResult kw : results) {\n System.out.println(kw);\n }\n }\n ds.close();\n\n } else if( line.hasOption( \"read\" ) ) {\n // Show a specific document\n String docId = line.getOptionValue( \"read\" );\n if(docId == null) {\n System.err.println(\"read option missing doc_id parameter\");\n exitCode = 2;\n } else {\n\n DataStore ds = new DataStore();\n String result = ds.read(docId);\n\n if (result == null) {\n System.err.println(\"NOT FOUND\");\n exitCode = 1;\n } else {\n System.out.println(result);\n }\n ds.close();\n }\n }\n else if( line.hasOption( \"scraper\" ) ) {\n int numThreads = 1;\n if(line.hasOption( \"scraper-threads\")) {\n String threadString = line.getOptionValue(\"scraper-threads\");\n try {\n numThreads = Integer.parseInt(threadString);\n } catch (NumberFormatException e) {\n System.out.println(\n \"unable to parse number of threads from `\" +\n threadString + \"`\");\n }\n\n }\n // Start scraper mode\n Daemon daemon = new Daemon(numThreads);\n daemon.start();\n } else {\n // generate the help statement\n HelpFormatter formatter = new HelpFormatter();\n formatter.printHelp( \"searchscraper \\n\" +\n \" [--add --search-name <SearchTask> --keywords <keyword1> <keyword2> ...]\\n\" +\n \" [--list [<keyword>] ]\\n\" +\n \" [--read <doc_id>]\\n\", options , true);\n exitCode = 2;\n }\n\n\n System.exit(exitCode);\n }", "public BwaOptions(String[] args) {\n\n\t\t//Parse arguments\n\t\tfor (String argument : args) {\n\t\t\tLOG.info(\"[\"+this.getClass().getName()+\"] :: Received argument: \" + argument);\n\t\t}\n\n\t\t//Algorithm options\n\t\tthis.options = this.initOptions();\n\n\t\t//To print the help\n\t\tHelpFormatter formatter = new HelpFormatter();\n\t\t//formatter.setWidth(500);\n\t\t//formatter.printHelp( correctUse,header, options,footer , true);\n\n\t\t//Parse the given arguments\n\t\tCommandLineParser parser = new BasicParser();\n\t\tCommandLine cmd;\n\n\t\ttry {\n\t\t\tcmd = parser.parse(this.options, args);\n\n\t\t\t//We look for the algorithm\n\t\t\tif (cmd.hasOption('m') || cmd.hasOption(\"mem\")){\n\t\t\t\t//Case of the mem algorithm\n\t\t\t\tmemAlgorithm = true;\n\t\t\t\talnAlgorithm = false;\n\t\t\t\tbwaswAlgorithm = false;\n\t\t\t}\n\t\t\telse if(cmd.hasOption('a') || cmd.hasOption(\"aln\")){\n\t\t\t\t// Case of aln algorithm\n\t\t\t\talnAlgorithm = true;\n\t\t\t\tmemAlgorithm = false;\n\t\t\t\tbwaswAlgorithm = false;\n\t\t\t}\n\t\t\telse if(cmd.hasOption('b') || cmd.hasOption(\"bwasw\")){\n\t\t\t\t// Case of bwasw algorithm\n\t\t\t\tbwaswAlgorithm = true;\n\t\t\t\tmemAlgorithm = false;\n\t\t\t\talnAlgorithm = false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t// Default case. Mem algorithm\n\t\t\t\tLOG.warn(\"[\"+this.getClass().getName()+\"] :: The algorithm \"\n\t\t\t\t\t\t+ cmd.getOptionValue(\"algorithm\")\n\t\t\t\t\t\t+ \" could not be found\\nSetting to default mem algorithm\\n\");\n\n\t\t\t\tmemAlgorithm = true;\n\t\t\t\talnAlgorithm = false;\n\t\t\t\tbwaswAlgorithm = false;\n\t\t\t}\n\n\t\t\t//We look for the index\n\t\t\tif (cmd.hasOption(\"index\") || cmd.hasOption('i')) {\n\t\t\t\tindexPath = cmd.getOptionValue(\"index\");\n\t\t\t}\n\t\t/* There is no need of this, as the index option is mandatory\n\t\telse {\n\t\t\tLOG.error(\"[\"+this.getClass().getName()+\"] :: No index has been found. Aborting.\");\n\t\t\tformatter.printHelp(correctUse, header, options, footer, true);\n\t\t\tSystem.exit(1);\n\t\t}*/\n\n\t\t\t//Partition number\n\t\t\tif (cmd.hasOption(\"partitions\") || cmd.hasOption('n')) {\n\t\t\t\tpartitionNumber = Integer.parseInt(cmd.getOptionValue(\"partitions\"));\n\t\t\t}\n\n\t\t\t// BWA arguments\n\t\t\tif (cmd.hasOption(\"bwa\") || cmd.hasOption('w')) {\n\t\t\t\tbwaArgs = cmd.getOptionValue(\"bwa\");\n\t\t\t}\n\n\t\t\t// Paired or single reads\n\t\t\tif (cmd.hasOption(\"paired\") || cmd.hasOption('p')) {\n\t\t\t\tpairedReads = true;\n\t\t\t\tsingleReads = false;\n\t\t\t}\n\t\t\telse if (cmd.hasOption(\"single\") || cmd.hasOption('s')) {\n\t\t\t\tpairedReads = false;\n\t\t\t\tsingleReads = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tLOG.warn(\"[\"+this.getClass().getName()+\"] :: Reads argument could not be found\\nSetting it to default paired reads\\n\");\n\t\t\t\tpairedReads = true;\n\t\t\t\tsingleReads = false;\n\t\t\t}\n\n\t\t\t// Sorting\n\t\t\tif (cmd.hasOption('f') || cmd.hasOption(\"hdfs\")) {\n\t\t\t\tthis.sortFastqReadsHdfs = true;\n\t\t\t\tthis.sortFastqReads = false;\n\t\t\t}\n\t\t\telse if (cmd.hasOption('k') || cmd.hasOption(\"spark\")) {\n\t\t\t\tthis.sortFastqReadsHdfs = false;\n\t\t\t\tthis.sortFastqReads = true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tthis.sortFastqReadsHdfs = false;\n\t\t\t\tthis.sortFastqReads = false;\n\t\t\t}\n\n\t\t\t// Use reducer\n\t\t\tif (cmd.hasOption('r') || cmd.hasOption(\"reducer\")) {\n\t\t\t\tthis.useReducer = true;\n\t\t\t}\n\n\t\t\t// Help\n\t\t\tif (cmd.hasOption('h') || cmd.hasOption(\"help\")) {\n\t\t\t\t//formatter.printHelp(correctUse, header, options, footer, true);\n\t\t\t\tthis.printHelp();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t\t//Input and output paths\n\t\t\tString otherArguments[] = cmd.getArgs(); //With this we get the rest of the arguments\n\n\t\t\tif ((otherArguments.length != 2) && (otherArguments.length != 3)) {\n\t\t\t\tLOG.error(\"[\"+this.getClass().getName()+\"] No input and output has been found. Aborting.\");\n\n\t\t\t\tfor (String tmpString : otherArguments) {\n\t\t\t\t\tLOG.error(\"[\"+this.getClass().getName()+\"] Other args:: \" + tmpString);\n\t\t\t\t}\n\n\t\t\t\t//formatter.printHelp(correctUse, header, options, footer, true);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\telse if (otherArguments.length == 2) {\n\t\t\t\tinputPath = otherArguments[0];\n\t\t\t\toutputPath = otherArguments[1];\n\t\t\t}\n\t\t\telse if (otherArguments.length == 3) {\n\t\t\t\tinputPath = otherArguments[0];\n\t\t\t\tinputPath2 = otherArguments[1];\n\t\t\t\toutputPath = otherArguments[2];\n\t\t\t}\n\n\t\t} catch (UnrecognizedOptionException e) {\n\t\t\te.printStackTrace();\n\t\t\t//formatter.printHelp(correctUse, header, options, footer, true);\n\t\t\tthis.printHelp();\n\t\t\tSystem.exit(1);\n\t\t} catch (MissingOptionException e) {\n\t\t\t//formatter.printHelp(correctUse, header, options, footer, true);\n\t\t\tthis.printHelp();\n\t\t\tSystem.exit(1);\n\t\t} catch (ParseException e) {\n\t\t\t//formatter.printHelp( correctUse,header, options,footer , true);\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "@Override\n\tpublic void configure(CommandLineParser parser) {\n\t\tparser.addOptions(plugins);\n\t}", "private SimpleCLI(Options options) {\n this.options = options;\n }", "private static void parseCommandLine(String[] args) throws WorkbenchException {\n commandLine = new CommandLine('-');\r\n commandLine.addOptionSpec(new OptionSpec(PROPERTIES_OPTION, 1));\r\n commandLine.addOptionSpec(new OptionSpec(DEFAULT_PLUGINS, 1));\r\n commandLine.addOptionSpec(new OptionSpec(PLUG_IN_DIRECTORY_OPTION, 1));\r\n commandLine.addOptionSpec(new OptionSpec(I18N_FILE, 1));\r\n //[UT] 17.08.2005 \r\n commandLine.addOptionSpec(new OptionSpec(INITIAL_PROJECT_FILE, 1));\r\n commandLine.addOptionSpec(new OptionSpec(STATE_OPTION, 1));\r\n try {\r\n commandLine.parse(args);\r\n } catch (ParseException e) {\r\n throw new WorkbenchException(\"A problem occurred parsing the command line: \" + e.toString());\r\n }\r\n }", "protected Options createOptions() {\n \treturn new Options(this) {\n\n\t\t\t/**\n\t\t\t * Appends the soot classpath to the default system classpath.\n\t\t\t */\n\t\t\tpublic String constructFullClasspath() {\n\t\t\t\tString cp = super.constructFullClasspath();\n\t\t\t\tcp += File.pathSeparator + soot.options.Options.v().soot_classpath();\n\t\t\t\treturn cp;\n\t\t\t}\n\n \t};\n }", "public static void main(String[] args) throws IOException {\n CommandLineParser parser = new DefaultParser();\n Options options = new Options();\n\n Option optModel = OptionBuilder.withArgName(\"model\")\n .hasArg()\n .withDescription(\"model used for simulation: \\n\\nmistransmission\\n constraint\\n constraintWithMistransmission\\n prior\\n priorWithMistransmission (default)\")\n .create(\"model\");\n options.addOption(optModel);\n \n options.addOption(\"stochastic\", false, \"sample from previous generation's distributions\"); \n \n options.addOption(\"superspeakers\", false, \"20% of speakers in grouped distance model connect to other group\"); \n\n Option optLogging = OptionBuilder.withArgName(\"logging\")\n .hasArg()\n .withDescription(\"logging level: \\nnone \\nsome \\nall \\ntabular \\ntroubleshooting\")\n .create(\"logging\");\n options.addOption(optLogging); \n\n Option optFreqNoun = OptionBuilder.withArgName(\"freqNoun\")\n .hasArg()\n .withDescription(\"noun frequency of the target word\")\n .create(\"freqNoun\");\n options.addOption(optFreqNoun); \n \n Option optFreqVerb = OptionBuilder.withArgName(\"freqVerb\")\n .hasArg()\n .withDescription(\"verb frequency of the target word\")\n .create(\"freqVerb\");\n options.addOption(optFreqVerb); \n \n Option optMisProbP = OptionBuilder.withArgName(\"misProbNoun\")\n .hasArg()\n .withDescription(\"mistransmission probability for nouns\")\n .create(\"misProbP\");\n options.addOption(optMisProbP); \n \n Option optMisProbQ = OptionBuilder.withArgName(\"misProbVerb\")\n .hasArg()\n .withDescription(\"mistransmission probability for verbs\")\n .create(\"misProbQ\");\n options.addOption(optMisProbQ); \n \n Option optLambda11 = OptionBuilder.withArgName(\"prior11General\")\n .hasArg()\n .withDescription(\"general prior probability for {1,1} stress pattern\")\n .create(\"prior11General\");\n options.addOption(optLambda11); \n \n Option optLambda22 = OptionBuilder.withArgName(\"prior22General\")\n .hasArg()\n .withDescription(\"general prior probability for {2,2} stress pattern\")\n .create(\"prior22General\");\n options.addOption(optLambda22); \n \n Option optTargetLambda11 = OptionBuilder.withArgName(\"prior11Target\")\n .hasArg()\n .withDescription(\"prior probability for {1,1} stress pattern in the target word prefix class\")\n .create(\"prior11Target\");\n options.addOption(optTargetLambda11); \n \n Option optTargetLambda22 = OptionBuilder.withArgName(\"prior22Target\")\n .hasArg()\n .withDescription(\"prior probability for {2,2} stress pattern in the target word prefix class\")\n .create(\"prior22Target\");\n options.addOption(optTargetLambda22); \n \n Option optDistModel = OptionBuilder.withArgName(\"distModel\")\n .hasArg()\n .withDescription(\"distance model:\\n none\\n absolute\\n probabilistic\\n random\\n lattice\\n grouped (default)\")\n .create(\"distModel\");\n options.addOption(optDistModel); \n \n options.addOption(\"priorClass\", false, \"use word pair prefixes as a class for sharing prior probabilities\"); \n \n Option optNumSpeakers = OptionBuilder.withArgName(\"numSpeakers\")\n .hasArg()\n .withDescription(\"number of speakers\")\n .create(\"numSpeakers\");\n options.addOption(optNumSpeakers); \n \n Option optTargetWord = OptionBuilder.withArgName(\"targetWord\")\n .hasArg()\n .withDescription(\"target word for logging\")\n .create(\"targetWord\");\n options.addOption(optTargetWord); \n \n options.addOption(\"help\", false, \"print this message\"); \n\n try { // parse the command line arguments\n CommandLine line = parser.parse(options, args);\n if(line.hasOption(\"model\")) {\n model = line.getOptionValue(\"model\");\n }\n if(line.hasOption(\"stochastic\")) { \n stochastic = true;\n } else {\n stochastic = false;\n }\n if(line.hasOption(\"superspeakers\")) { \n superspeakers = true;\n } else {\n superspeakers = false;\n }\n if(line.hasOption(\"logging\")) {\n logging = line.getOptionValue(\"logging\");\n }\n if(line.hasOption(\"freqNoun\")) {\n freqNoun = Integer.parseInt(line.getOptionValue(\"freqNoun\"));\n }\n if(line.hasOption(\"freqVerb\")) {\n freqVerb = Integer.parseInt(line.getOptionValue(\"freqVerb\"));\n }\n if(line.hasOption(\"misProbP\")) {\n misProbP = Integer.parseInt(line.getOptionValue(\"misProbP\"));\n }\n if(line.hasOption(\"misProbQ\")) {\n misProbQ = Integer.parseInt(line.getOptionValue(\"misProbQ\"));\n }\n if(line.hasOption(\"targetWord\")) {\n targetWord = line.getOptionValue(\"targetWord\");\n }\n if(line.hasOption(\"prior11General\")) {\n lambda11 = Integer.parseInt(line.getOptionValue(\"prior11General\"));\n }\n if(line.hasOption(\"prior22General\")) {\n lambda22 = Integer.parseInt(line.getOptionValue(\"prior22General\"));\n }\n if(line.hasOption(\"prior11Target\")) {\n targetClassLambda11 = Integer.parseInt(line.getOptionValue(\"prior11Target\"));\n }\n if(line.hasOption(\"prior22Target\")) {\n targetClassLambda22 = Integer.parseInt(line.getOptionValue(\"prior22Target\"));\n }\n if(line.hasOption(\"distModel\")) {\n distModel = line.getOptionValue(\"distModel\");\n }\n if(line.hasOption(\"priorClass\")) {\n priorClass = true;\n } else {\n priorClass = false;\n }\n if(line.hasOption(\"numSpeakers\")) {\n numSpeakers = Integer.parseInt(line.getOptionValue(\"numSpeakers\"));\n }\n if(line.hasOption(\"help\")) {\n HelpFormatter formatter = new HelpFormatter();\n formatter.printHelp( \"StressChange\", options );\n }\n } catch ( ParseException exp) {\n System.out.println(\"Unexpected exception: \" + exp.getMessage());\n }\n\n if (StressChange.logging.equals(\"tabular\")){\n System.out.println(\"Iteration,Speaker,Group,Word,Prefix,Noun prob,Verb prob\");\n }\n else if (!StressChange.logging.equals(\"none\")) {\n System.out.println(\"Simulating \" + model + \" model with \" + distModel + \" distance model, showing \" + logging + \" words\");\n System.out.println(\"N1 (target word noun frequency): \" + freqNoun);\n System.out.println(\"N2 (target word verb frequency): \" + freqVerb);\n }\n \n initialStress = new ReadPairs(System.getProperty(\"user.dir\") + \"/src/initialStressSmoothed.txt\").OpenFile(); // read in initial pairs\n\n SimState state = new StressChange(System.currentTimeMillis());\n state.start();\n \n do {\n convos.removeAllEdges();\n if (! StressChange.logging.equals(\"none\") && !StressChange.logging.equals(\"tabular\")){ System.out.println(\"\"); }\n //if (! StressChange.logging.equals(\"none\")){ System.out.println(\"Generation at year \" + (1500 + (state.schedule.getSteps()) * 25)); } // 25-year generations \n if (! StressChange.logging.equals(\"none\") && !StressChange.logging.equals(\"tabular\")){ System.out.println(\"==== ITERATION \" + (state.schedule.getSteps() + 1) + \" ====\"); }\n if (!state.schedule.step(state)) {\n break;\n }\n step++;\n } while (state.schedule.getSteps() < 49); // maximum 50 iterations\n state.finish();\n\n System.exit(0);\n }", "public void parse(String[] args) throws ParseException {\r\n\r\n options.addOption(configFileOption);\r\n CommandLineParser parser = new GnuParser();\r\n\r\n CommandLine line = parser.parse(options, args);\r\n if (line.hasOption(\"f\")) {\r\n configFile = line.getOptionValue(\"f\");\r\n }\r\n }", "protected CLOptionDescriptor[] createCLOptions()\n {\n //TODO: localise\n final CLOptionDescriptor options[] = new CLOptionDescriptor[ 13 ];\n\n options[0] =\n new CLOptionDescriptor( \"help\",\n CLOptionDescriptor.ARGUMENT_DISALLOWED,\n HELP_OPT,\n \"display this help message\",\n INFO_OPT_INCOMPAT );\n \n options[1] =\n new CLOptionDescriptor( \"file\",\n CLOptionDescriptor.ARGUMENT_REQUIRED,\n FILE_OPT,\n \"the build file.\" );\n\n options[2] =\n new CLOptionDescriptor( \"log-level\",\n CLOptionDescriptor.ARGUMENT_REQUIRED,\n LOG_LEVEL_OPT,\n \"the verbosity level at which to log messages. \" +\n \"(DEBUG|INFO|WARN|ERROR|FATAL_ERROR)\",\n LOG_OPT_INCOMPAT );\n\n options[3] =\n new CLOptionDescriptor( \"quiet\",\n CLOptionDescriptor.ARGUMENT_DISALLOWED,\n QUIET_OPT,\n \"equivelent to --log-level=FATAL_ERROR\",\n LOG_OPT_INCOMPAT );\n\n options[4] =\n new CLOptionDescriptor( \"verbose\",\n CLOptionDescriptor.ARGUMENT_DISALLOWED,\n VERBOSE_OPT,\n \"equivelent to --log-level=INFO\",\n LOG_OPT_INCOMPAT );\n\n options[5] =\n new CLOptionDescriptor( \"listener\",\n CLOptionDescriptor.ARGUMENT_REQUIRED,\n LISTENER_OPT,\n \"the listener for log events.\" );\n\n options[6] =\n new CLOptionDescriptor( \"version\",\n CLOptionDescriptor.ARGUMENT_DISALLOWED,\n VERSION_OPT,\n \"display version\",\n INFO_OPT_INCOMPAT );\n\n options[7] =\n new CLOptionDescriptor( \"bin-dir\",\n CLOptionDescriptor.ARGUMENT_REQUIRED,\n BIN_DIR_OPT,\n \"the listener for log events.\" );\n\n options[8] =\n new CLOptionDescriptor( \"lib-dir\",\n CLOptionDescriptor.ARGUMENT_REQUIRED,\n LIB_DIR_OPT,\n \"the lib directory to scan for jars/zip files.\" );\n\n options[9] =\n new CLOptionDescriptor( \"task-lib-dir\",\n CLOptionDescriptor.ARGUMENT_REQUIRED,\n TASKLIB_DIR_OPT,\n \"the task lib directory to scan for .tsk files.\" );\n options[10] =\n new CLOptionDescriptor( \"incremental\",\n CLOptionDescriptor.ARGUMENT_DISALLOWED,\n INCREMENTAL_OPT,\n \"Run in incremental mode\" );\n options[11] =\n new CLOptionDescriptor( \"ant-home\",\n CLOptionDescriptor.ARGUMENT_REQUIRED,\n HOME_DIR_OPT,\n \"Specify ant home directory\" );\n options[12] =\n new CLOptionDescriptor( \"define\",\n CLOptionDescriptor.ARGUMENTS_REQUIRED_2,\n DEFINE_OPT,\n \"Define a variable (ie -Dfoo=var)\" );\n return options;\n }", "HashMap<String, String> cliParser(String[] args){\n CmdLineParser parser = new CmdLineParser(this);\n try {\n // parse the arguments.\n parser.parseArgument(args);\n\n if (this.printHelp) {\n System.err.println(\"Usage:\");\n parser.printUsage(System.err);\n System.err.println();\n System.exit(0);\n }\n } catch( CmdLineException e ) {\n System.err.println(e.getMessage());\n System.err.println(\"java BGPCommunitiesParser.jar [options...] arguments...\");\n // print the list of available options\n parser.printUsage(System.err);\n System.err.println();\n\n // print option sample. This is useful some time\n System.err.println(\" Example: java BGPCommunitiesParser.jar\"+parser.printExample(ALL));\n System.exit(0);\n }\n\n HashMap<String, String> cliArgs = new HashMap<>();\n String[] period;\n long startTs = 0;\n long endTs = 0;\n // parse the period argument\n try{\n period = this.period.split(\",\");\n startTs = this.dateToEpoch(period[0]);\n endTs = this.dateToEpoch(period[1]);\n if (startTs >= endTs){\n System.err.println(\"The period argument is invalid. \" +\n \"The start datetime should be before the end datetime.\");\n System.exit(-1);\n }\n }\n catch (java.lang.ArrayIndexOutOfBoundsException e) {\n System.err.println(\"The period argument is invalid. \" +\n \"Please provide two comma-separated datetimes in the format YYYMMMDD.hhmm \" +\n \"(e.g. 20180124.0127,20180125.1010).\");\n System.exit(-1);\n }\n\n cliArgs.put(\"communities\", this.communities);\n cliArgs.put(\"start\", Long.toString(startTs));\n cliArgs.put(\"end\", Long.toString(endTs));\n cliArgs.put(\"collectors\", this.collectors);\n cliArgs.put(\"outdir\", this.outdir);\n cliArgs.put(\"facilities\", this.facilities);\n cliArgs.put(\"overlap\", Long.toString(this.overlap));\n return cliArgs;\n }", "public void parseCommandLine(String[] args) {\r\n\t\t// define command line options\r\n\t\tOptions options = new Options();\r\n\t\t// refresh:\r\n\t\toptions.addOption(new Option(\r\n\t\t \"refresh\", \r\n\t\t \"Tell Argus to start refreshing all files after Minstrel startup.\"));\r\n\t\t// port:\r\n\t\tOptionBuilder.withArgName(\"port\");\r\n\t\tOptionBuilder.hasArg();\r\n\t\tOptionBuilder.withDescription( \"Run NanoHTTPD on this port instead of default 8000.\" );\r\n\t\toptions.addOption(OptionBuilder.create(\"port\"));\r\n\t\t// argus:\r\n\t\tOptionBuilder.withArgName(\"url\");\r\n\t\tOptionBuilder.hasArg();\r\n\t\tOptionBuilder.withDescription( \"Use Argus at <url> instead of default localhost:8008.\" );\r\n\t\toptions.addOption(OptionBuilder.create(\"argus\"));\r\n\t\t// vlc:\r\n\t\tOptionBuilder.withArgName(\"url\");\r\n\t\tOptionBuilder.hasArg();\r\n\t\tOptionBuilder.withDescription(\"Use VLC at <url> instead of default localhost:8080.\");\r\n\t\toptions.addOption(OptionBuilder.create(\"vlc\"));\r\n\t\t// wwwroot:\r\n\t\tOptionBuilder.withArgName(\"path\");\r\n\t\tOptionBuilder.hasArg();\r\n\t\tOptionBuilder.withDescription(\"Have NanoHTTPD serve files from <path> instead of default ./wwwroot.\");\r\n\t\toptions.addOption(OptionBuilder.create(\"wwwroot\"));\r\n\t\t\r\n\t\t// parse command line options and adjust accordingly\r\n\t\tCommandLineParser parser = new GnuParser();\r\n\t\ttry {\r\n\t\t\tCommandLine line = parser.parse(options, args);\r\n\r\n\t\t\tif (line.hasOption(\"refresh\")) {\r\n\t\t\t\trefresh = new Date();\r\n\t\t\t}\r\n\t\t\tif (line.hasOption(\"port\")) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tport = Integer.parseInt( line.getOptionValue(\"port\"));\r\n\t\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\t\tSystem.err.println(\"Badly formatted port number, defaulting to 8000. Reason: \" + e.getMessage());\r\n\t\t\t\t\tport = 8000;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (line.hasOption(\"argus\")) {\r\n\t\t\t\targusURL = line.getOptionValue(\"argus\");\r\n\t\t\t}\r\n\t\t\tif (line.hasOption(\"vlc\")) {\r\n\t\t\t\tvlcURL = line.getOptionValue(\"vlc\");\r\n\t\t\t}\r\n\t\t\tif (line.hasOption(\"wwwroot\")) {\r\n\t\t\t\twwwroot = line.getOptionValue(\"wwwroot\");\r\n\t\t\t}\r\n\t\t} catch (ParseException e) {\r\n\t\t\tSystem.err.println(\"Command line parsing failed. Reason: \" + e.getMessage());\r\n\t\t}\r\n\t}", "private Options() {\n }", "public interface CommandLineParser {\n\n CommandLine parse(Options options, String[] arguments) throws ParseException;\n CommandLine parse(Options options, String[] arguments, boolean stopAtNonOption) throws ParseException;\n\n}", "private static void parseArguments(String[] args, MiParaPipeLine p) throws IOException{\n options.addOption(\"i\", \"input-file\", true, \"FASTA input file for query sequences\");\n options.addOption(\"o\", \"output-folder\", true, \"output folder for prediction results\");\n options.addOption(\"t\", \"test\", true, \"run test example \");\n options.addOption(\"c\", \"config\", true, \"configuration file for miRPara\");\n options.addOption(\"a\", \"action\", true, \"action to perform\");\n options.addOption(\"h\", \"help \", false, \"print help\");\n\n logger.trace(\"parsing args\");\n CommandLineParser parser = new BasicParser();\n CommandLine cmd = null;\n\n \n try {\n cmd = parser.parse(options, args);\n if (cmd.hasOption(\"h\")){\n print_help();\n System.out.print(p.reportAvailableActions());\n }\n\n if (cmd.hasOption(\"t\")){ \n logger.info(\"test set to \" + cmd.getOptionValue(\"l\"));\n test = cmd.getOptionValue(\"t\").toLowerCase();\n }\n \n if (cmd.hasOption(\"i\")) {\n logger.info(\"input file set to \" + cmd.getOptionValue(\"i\"));\n p.setInputFilename(cmd.getOptionValue(\"i\"));\t\n } \n\n if (cmd.hasOption(\"o\")){\n logger.info(\"output folder is\" + cmd.getOptionValue(\"o\"));\n p.setOutputFolder(cmd.getOptionValue(\"o\"));\n }\n \n if (cmd.hasOption(\"a\")){\n logger.info(\"requested action is \" + cmd.getOptionValue(\"a\"));\n p.setAction(cmd.getOptionValue(\"a\"));\n }\n \n if (cmd.hasOption(\"c\")){\n configFile = cmd.getOptionValue(\"c\");\n logger.info(\"Configuration file is \" + configFile);\n p.setConfigFilename(configFile);\n }\n\n\n \n if(p.getConfigFilename()==null){\n throw new ParseException(\"no configuration file was specified\") ; \n }\n \n if(new File(p.getConfigFilename()).exists() == false){\n throw new IOException(\"configuration file <\" + p.getConfigFilename() + \"> does not exist\");\n } \n \n if(new File(p.getInputFilename()).exists()== false)\n {\n throw new IOException(\"input file <\" + p.getInputFilename() + \"> does not exist\");\n }\n \n if(new File(p.getOutputFolder()).exists() == false)\n {\n if (new File(p.getOutputFolder()).getParentFile().exists() == false)\n throw new IOException(\"parent file <\" + new File(p.getOutputFolder()).getParentFile() + \"> does not exist\");\n \n new File(p.getOutputFolder()).mkdir();\n logger.info(\"create results folder <\" + p.getOutputFolder() + \">\");\n }\n\n } catch (ParseException e) {\n\n logger.fatal(\"Failed to parse command line properties\", e);\n print_help();\n\n }\n\n \n }", "public Options() {\n init();\n }", "private void parseOptions(DataStore args) {\r\n\r\n // System.out.println(\"IN JavaWeaver.parseOptions\\n\" + args);\r\n if (args.hasValue(JavaWeaverKeys.CLEAR_OUTPUT_FOLDER)) {\r\n clearOutputFolder = args.get(JavaWeaverKeys.CLEAR_OUTPUT_FOLDER);\r\n }\r\n if (args.hasValue(JavaWeaverKeys.NO_CLASSPATH)) {\r\n noClassPath = args.get(JavaWeaverKeys.NO_CLASSPATH);\r\n }\r\n if (args.hasValue(JavaWeaverKeys.INCLUDE_DIRS)) {\r\n classPath = args.get(JavaWeaverKeys.INCLUDE_DIRS).getFiles();\r\n }\r\n if (args.hasValue(JavaWeaverKeys.OUTPUT_TYPE)) {\r\n outType = args.get(JavaWeaverKeys.OUTPUT_TYPE);\r\n }\r\n if (args.hasValue(JavaWeaverKeys.SHOW_LOG_INFO)) {\r\n loggingGear.setActive(args.get(JavaWeaverKeys.SHOW_LOG_INFO));\r\n }\r\n if (args.hasValue(JavaWeaverKeys.FORMAT)) {\r\n prettyPrint = args.get(JavaWeaverKeys.FORMAT);\r\n }\r\n\r\n if (args.hasValue(JavaWeaverKeys.REPORT)) {\r\n\r\n reportGear.setActive(args.get(JavaWeaverKeys.REPORT));\r\n }\r\n\r\n }", "@OverridingMethodsMustInvokeSuper\n protected Tool parseArguments(String[] args) throws Exception {\n for (String arg : options(args)) {\n if (arg.equals(\"--debug\")) {\n checkArgument(verbosity == Level.DEFAULT, \"Specify one of: --quiet --verbose --debug\");\n setVerbosity(Level.DEBUG);\n } else if (arg.equals(\"--verbose\")) {\n checkArgument(verbosity == Level.DEFAULT, \"Specify one of: --quiet --verbose --debug\");\n setVerbosity(Level.VERBOSE);\n } else if (arg.equals(\"--quiet\")) {\n checkArgument(verbosity == Level.DEFAULT, \"Specify one of: --quiet --verbose --debug\");\n setVerbosity(Level.QUIET);\n } else if (arg.equals(\"--pretty\")) {\n setPretty(true);\n } else {\n return unknownOption(arg);\n }\n }\n return this;\n }", "public CommandLineBuilder()\n {\n m_commandLine = new String[0];\n }", "go.micro.runtime.RuntimeOuterClass.CreateOptions getOptions();", "protected int parseOptions(final String[] args) {\n\t\tOptions options = new Options();\n\t\toptions.addOption(\"a\", \"start\", true, \"Start an asynchronous task\");\n\t\toptions.addOption(\"h\", \"hostname\", true, \"Specify the hostname to connect to\");\n\t\toptions.addOption(\"l\", \"list\", false, \"List the available asynchronous tasks\");\n\t\toptions.addOption(\"o\", \"stop\", true, \"Stop an asynchronous task\");\n\t\toptions.addOption(\"p\", \"port\", true, \"Specify the port to connect to\");\n\t\toptions.addOption(\"i\", \"identifier\", true, \"Specify the identifier to synchronize\");\n\t\toptions.addOption(\"t\", \"attributes\", true, \"Specify the attributes pivot to synchronize (comma separated, identifier parameter required)\");\n\t\toptions.addOption(\"s\", \"status\", true, \"Get a task status\");\n\n\t\tCommandLineParser parser = new GnuParser();\n\n\t\ttry {\n\t\t\tCommandLine cmdLine = parser.parse(options, args);\n\t\t\tif ( cmdLine.hasOption(\"a\") ) {\n\t\t\t\toperation = OperationType.START;\n\t\t\t\ttaskName = cmdLine.getOptionValue(\"a\");\n\t\t\t}\n\t\t\tif ( cmdLine.hasOption(\"l\") ) {\n\t\t\t\toperation = OperationType.TASKS_LIST;\n\t\t\t}\n\t\t\tif ( cmdLine.hasOption(\"o\") ) {\n\t\t\t\toperation = OperationType.STOP;\n\t\t\t\ttaskName = cmdLine.getOptionValue(\"o\");\n\t\t\t}\n\t\t\tif ( cmdLine.hasOption(\"s\") ) {\n\t\t\t\toperation = OperationType.STATUS;\n\t\t\t\ttaskName = cmdLine.getOptionValue(\"s\");\n\t\t\t}\n\t\t\tif ( cmdLine.hasOption(\"i\") ) {\n\t\t\t\tidToSync = cmdLine.getOptionValue(\"i\");\n\t\t\t\tif(cmdLine.hasOption(\"t\")) {\n\t\t\t\t\tStringTokenizer attrsStr = new StringTokenizer(cmdLine.getOptionValue(\"t\"),\",\");\n\t\t\t\t\twhile(attrsStr.hasMoreTokens()) {\n\t\t\t\t\t\tString token = attrsStr.nextToken();\n\t\t\t\t\t\tif(token.contains(\"=\")) {\n\t\t\t\t\t\t\tattrsToSync.put(token.substring(0, token.indexOf(\"=\")), token.substring(token.indexOf(\"=\")+1));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tLOGGER.error(\"Unknown attribute name=value couple in \\\"{}\\\". Please check your parameters !\", token);\n\t\t\t\t\t\t\tprintHelp(options);\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (cmdLine.hasOption(\"t\") ) {\n\t\t\t\tLOGGER.error(\"Attributes specified, but missing identifier !\");\n\t\t\t\tprintHelp(options);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif ( cmdLine.hasOption(\"h\") ) {\n\t\t\t\thostname = cmdLine.getOptionValue(\"h\");\n\t\t\t} else {\n\t\t\t\thostname = \"localhost\";\n\t\t\t\tLOGGER.info(\"Hostname parameter not specified, using {} as default value.\", hostname);\n\t\t\t}\n\t\t\tif ( cmdLine.hasOption(\"p\") ) {\n\t\t\t\tport = cmdLine.getOptionValue(\"p\");\n\t\t\t} else {\n\t\t\t\tport = \"1099\";\n\t\t\t\tLOGGER.info(\"TCP Port parameter not specified, using {} as default value.\", port);\n\t\t\t}\n\t\t\tif (operation == OperationType.UNKNOWN ) {\n\t\t\t\tprintHelp(options);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t} catch (ParseException e) {\n\t\t\tLOGGER.error(\"Unable to parse the options ({})\", e.toString());\n\t\t\tLOGGER.debug(e.toString(), e);\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}", "public ArgumentsParser() {\n this(new String[0]);\n }", "public static Arguments parseArgs(String args[]) {\n // Set defaults\n ArgumentBuilder builder = new ArgumentBuilder();\n builder.setFileName(args[0]);\n builder.setMode(RunMode.LOCAL);\n builder.setExampleSize(2);\n builder.setFileTemplate(FileTemplate.JAVA_DEFAUlT);\n\n for (int i = 1; i < args.length; i++) {\n switch (args[i]) {\n case \"-h\":\n case \"-help\":\n help();\n break;\n case \"-size\":\n case \"-s\":\n builder.setExampleSize(Integer.parseInt(args[i + 1]));\n i++;\n break;\n case \"-kattis\":\n builder.setMode(RunMode.KATTIS);\n break;\n case \"-local\":\n builder.setMode(RunMode.LOCAL);\n break;\n case \"-template\":\n case \"-t\":\n builder.setFileTemplate(FileTemplate.valueOf(args[i + 1].toUpperCase()));\n i++;\n break;\n }\n }\n if (builder.getMode() == RunMode.LOCAL && builder.isExampleSizeSetManual()) {\n System.out.println(\"No example size set, using default of 2.\");\n }\n return builder.build();\n }", "public String[] getOptions() {\n return argv;\n }", "protected void parse(CommandLine cli)\n {\n // Application ID option\n if(hasOption(cli, Opt.APPLICATION_ID, false))\n {\n applicationId = Long.parseLong(getOptionValue(cli, Opt.APPLICATION_ID));\n logOptionValue(Opt.APPLICATION_ID, applicationId);\n }\n\n // Server ID option\n if(hasOption(cli, Opt.SERVER_ID, false))\n {\n serverId = Long.parseLong(getOptionValue(cli, Opt.SERVER_ID));\n logOptionValue(Opt.SERVER_ID, serverId);\n }\n\n // Category option\n if(hasOption(cli, Opt.CATEGORY, true))\n {\n category = getOptionValue(cli, Opt.CATEGORY);\n logOptionValue(Opt.CATEGORY, category);\n }\n\n // Name option\n if(hasOption(cli, Opt.NAME, true))\n {\n name = getOptionValue(cli, Opt.NAME);\n logOptionValue(Opt.NAME, name);\n }\n }", "public static void main(String[] ignored) {\n\t\tfinal String[] argv = new String[] {\n\n\t\t\t\t/* short options */\n\t\t\t\t\"-ab\",\n\t\t\t\t\"dd-argument\",\n\t\t\t\t\"-0\",\n\t\t\t\t\"-1\",\n\t\t\t\t\"-2\",\n\n\t\t\t\t/* long options */\n\t\t\t\t\"--add=123\",\n\t\t\t\t\"--append\",\n\t\t\t\t\"--delete-float=3.141952\",\n\t\t\t\t\"--delete-double=3.141952\",\n\t\t\t\t\"--verbose\",\n\t\t\t\t\"--create=789\",\n\t\t\t\t\"-c987\",\n\t\t\t\t\"--file=filename1\",\n\n\t\t\t\t/* non-option arguments */\n\t\t\t\t\"--\",\n\t\t\t\t\"hello\",\n\t\t\t\t\"there\",\n\t\t};\n\n\t\ttry {\n\n\t\t\t/* Two ways to build options, via create() method or using() */\n\t\t\tfinal Options options = new Options.Builder()\n\n\t\t\t\t\t/* Short options */\n\t\t\t\t\t.create(\"a\")\n\t\t\t\t\t.create(\"b\")\n\t\t\t\t\t.create(\"c\", int.class)\n\t\t\t\t\t.create(\"d\", String.class)\n\t\t\t\t\t.create(\"0\")\n\t\t\t\t\t.create(\"1\")\n\t\t\t\t\t.create(\"2\")\n\n\t\t\t\t\t.group('o', suboptions -> suboptions\n\t\t\t\t\t\t\t.create(\"ro\")\n\t\t\t\t\t\t\t.create(\"rw\")\n\t\t\t\t\t\t\t.create(\"name\", String.class))\n\n\t\t\t\t\t/* Long options */\n\t\t\t\t\t.using(Option.of(\"add\", int.class))\n\t\t\t\t\t.using(Option.of(\"append\"))\n\t\t\t\t\t.using(Option.of(\"delete-float\", float.class))\n\t\t\t\t\t.using(Option.of(\"delete-double\", double.class))\n\t\t\t\t\t.using(Option.of(\"verbose\"))\n\t\t\t\t\t.using(Option.of(\"create\", int.class))\n\t\t\t\t\t.using(Option.of(\"file\", String.class))\n\t\t\t\t\t.build();\n\n\t\t\t/* Handler be notified when option is matched */\n\t\t\tfinal Option<Integer> create = options.get(\"create\", int.class);\n\t\t\tcreate.onMatch(n -> System.out.printf(\"Creating new entry %d%n\", n));\n\n\t\t\t/* Setup and parse the command line arguments */\n\t\t\tfinal Args args = Args.of(argv, options);\n\n\t\t\t/* All matched options */\n\t\t\tSystem.out.println(\"-- Example 3:\");\n\t\t\tSystem.out.println(\"Matched options:\");\n\t\t\tfinal List<Option<?>> matched = options.getAllMatched();\n\t\t\tmatched.forEach(System.out::println);\n\n\t\t\t/* Anything that was unmatched by the parser is stored here */\n\t\t\tSystem.out.println(\"Unmatched args:\");\n\t\t\tfinal List<String> unmatched = args.getUnmatchedArgs();\n\t\t\tunmatched.forEach(System.out::println);\n\n\t\t\t/* 2 ways to work with user options: getOption or findMatched */\n\n\t\t\t/*\n\t\t\t * Find methods always return a java Optional. Unmatched option with no command\n\t\t\t * line match, the returned optional will be empty, otherwise the Optional will\n\t\t\t * have the option with the commanline arg/value.\n\t\t\t */\n\t\t\tfinal Optional<Option<Boolean>> a = options.findMatched(\"a\", boolean.class);\n\t\t\ta.ifPresent(opt -> System.out.println(\"Option A is found!\"));\n\n\t\t\t/* Get method will throw unchecked OptionNotFoundException if not found */\n\t\t\tfinal Option<Integer> add = options.get(\"add\", int.class);\n\t\t\tif (add.isMatched()) {\n\t\t\t\tSystem.out.printf(\"add this amount %d%n\", add.getValue());\n\t\t\t}\n\n\t\t} catch (UnrecognizedArgException | InvalidArgException e) {\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t\tSystem.err.printf(\"Usage: %s [-a|-b|-0|-1|-2] [-c arg] [-d arg]%n\", \"Example3\");\n\t\t\tSystem.err.printf(\" \"\n\t\t\t\t\t+ \" [--add element]\"\n\t\t\t\t\t+ \" [--append]\"\n\t\t\t\t\t+ \" [--delete-float arg]\"\n\t\t\t\t\t+ \" [--delete-double arg]\"\n\t\t\t\t\t+ \" [--verbose]\"\n\t\t\t\t\t+ \" [--create arg]\"\n\t\t\t\t\t+ \" [--file arg]\"\n\t\t\t\t\t+ \"%n\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t/*\n\t\t * Next step: Example 4 - working with beans\n\t\t * \n\t\t * A much easiest way to deal with many options is using the BeanOption API.\n\t\t * Example 4 demostrates its usage.\n\t\t */\n\t}", "public static void main(String[] args) {\n CommandCliParser cliParser = new CommandCliParser();\n cliParser.parseCommand(\"--verbose\");\n }", "@Override\n protected String[] ParseCmdLine(final String[] args) {\n\n final CmdLineParser clp = new CmdLineParser();\n final OptionalFlag optHelp = new OptionalFlag(\n clp, \"h?\", \"help\", \"help mode\\nprint this usage information and exit\");\n optHelp.forHelpUsage();\n final OptionalFlag optForce =\n new OptionalFlag(clp, \"f\", \"force\", \"force overwrite\");\n final OptionalFlag optDelete =\n new OptionalFlag(clp, \"d\", \"delete\", \"delete the table content first\");\n final OptionalFlag optAll = new OptionalFlag(\n clp, \"a\", \"all\",\n \"import all and synchronize changes in the document back to the datasource\");\n final OptionalFlag optSync = new OptionalFlag(\n clp, \"\", \"sync\",\n \"synchronize changes in the document back to the datasource\");\n final OptionalArgumentInteger optCommitCount =\n new OptionalArgumentInteger(clp, \"n\", \"commitcount\", \"commit count\");\n\n clp.setArgumentDescription(\n \"[[sourcefile [destinationfile]]\\n[sourcefile... targetdirectory]]\", -1,\n -1, null);\n final String[] argv = clp.getOptions(args);\n\n force = optForce.getValue(false);\n doDelete = optDelete.getValue(false);\n doSync = optAll.getValue(false) || optSync.getValue(false);\n doImport = optAll.getValue(false) || !optSync.getValue(false);\n commitCount = optCommitCount.getValue(0);\n\n return argv;\n }", "private static Options readArguments(String[] args) {\n\t\tOptions result = new Options();\n\t\ttry {\n\t\t\tresult.numberClients = Integer.parseInt(args[0]);\n\t\t\tresult.trafficTime = Integer.parseInt(args[args.length - 1]);\n\t\t} catch (java.lang.NumberFormatException e) {\n\t\t\tSystem.err.println(\"Error while converting to integer. Did you run the program correctly?\");\n\t\t\tSystem.err.println(\"$ tgpm <c> [-w] [-s <sid>] <s>\");\n\t\t\tSystem.exit(0);\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\tSystem.err.println(\"Program requires at least TWO arguments, number of clients and active seconds.\");\n\t\t\tSystem.err.println(\"$ tgpm <c> [-w] [-s <sid>] <s>\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tString argsString = String.join(\" \", args);\n\n\t\tif (argsString.contains(\"-w\")) {\n\t\t\tresult.writeMode = true;\n\t\t}\n\n\t\tPattern p = Pattern.compile(\"-s ([0-9]+)\");\n\t\tMatcher m = p.matcher(argsString);\n\t\tif (m.find()) {\n\t\t\tif (args.length > 3) {\n\t\t\t\tresult.storeID = Integer.parseInt(m.group(1));\n\t\t\t} else {\n\t\t\t\tSystem.err.println(\"When single store mode is enabled, the program requires AT LEAST 4 arguments.\");\n\t\t\t\tSystem.err.println(\"$ tgpm <c> [-w] [-s <sid>] <s>\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public CommandArguments parse(String[] args) {\n ErrorSupport command = new ErrorSupport();\n command.checkLength(args);\n\n //parsing arguments\n CommandArguments arguments = new CommandArguments();\n for (int i = 0; i < args.length; i++) {\n if ((i == args.length - 1) && !args[i].equals(\"--help\")) {\n throw new IllegalArgumentException(\"Incorrect argument, --help for more information about app syntax\");\n }\n switch (args[i]) {\n case (\"--help\"):\n System.out.println(\"\\nHELP MENU \\nAvailable options and arguments: \\n \\t--latitude x \\t-enter latitude coordinate \\n \\t--longitude x\\t-enter longitude coordinate \\n \\t--sensorid x \\t-enter sensor's Id \\n \\t--apikey x \\t\\t-enter API key \\n \\t--history x \\t-enter number of hours to display from history data\\n\");\n System.exit(0);\n case (\"--latitude\"):\n i++;\n arguments.setLatitude(command.checkIsDouble(args[i]));\n break;\n case (\"--longitude\"):\n i++;\n arguments.setLongitude(command.checkIsDouble(args[i]));\n break;\n case (\"--sensorid\"):\n i++;\n arguments.setSensorId(command.checkIsInt(args[i]));\n break;\n case (\"--apikey\"):\n i++;\n arguments.setApiKey(command.checkApiKey(args[i]));\n break;\n case (\"--history\"):\n i++;\n arguments.setHistory(command.checkIsInt(args[i]));\n break;\n default:\n throw new IllegalArgumentException(\"Incorrect option, --help for more information about app syntax\");\n }\n }\n\n //checking environment API_KEY if there was no apikey in command line entered\n if (!arguments.hasApiKey() && System.getenv(\"API_KEY\") == null) {\n throw new IllegalArgumentException(\"No API Key found, check if you have entered the correct key or if there is a suitable environment variable ( API_KEY ), --help for more information about app syntax\");\n } else if (!arguments.hasApiKey()) {\n arguments.setApiKey(command.checkApiKey(System.getenv(\"API_KEY\")));\n }\n return arguments;\n }", "private CommandLine() {\n\t}", "@Override\n\tpublic\n\tOptions getOptions()\n\t{\n Options options=new Options();\n\n String description = String.format(\"The worker to -stop, -start or -restart. Available workers are %s\", this.getAvailableWorkers());\n\n options.addOption(AssistantCommand.WORKER_OPTION, true, description);\n options.addOption(AssistantCommand.STOP_OPTION, false, \"Stop the worker.\");\n options.addOption(AssistantCommand.START_OPTION, false, \"Start the worker.\");\n options.addOption(AssistantCommand.KILL_OPTION, false, \"Kill the worker forcing it to stop.\");\n options.addOption(AssistantCommand.RESTART_OPTION, false, \"Either start a worker that is stopped or stop and start the worker.\");\n\n String delayDescription = String.format(\"The amount of time in mills before processing the next message.\" +\n \" The default is %d milliseconds\", BaseAssistantWorker.DEFAULT_DELAY);\n Option delayOption = new Option(AssistantCommand.DELAY_OPTION, true, delayDescription);\n delayOption.setType(Integer.class);\n delayOption.setRequired(false);\n options.addOption(delayOption);\n\n String thresholdDescription = String.format(\"Must be in the range of 0-100.\" +\n \" The default is %d\", BaseAssistantWorker.DEFAULT_IDLE_THRESHOLD);\n Option thresholdOption = new Option(AssistantCommand.IDLE_THRESHOLD_OPTION, true, thresholdDescription);\n thresholdOption.setType(Integer.class);\n thresholdOption.setRequired(false);\n options.addOption(thresholdOption);\n\n return options;\n }", "go.micro.runtime.RuntimeOuterClass.CreateOptionsOrBuilder getOptionsOrBuilder();", "private static Params parseCLI(String[] args) {\n Params params = new Params();\n\n if(args.length>1) {\n int paramIndex = 0;\n for(int i=0; i<args.length; i++) {\n String arg = args[i];\n OutputType type = OutputType.getOutputType(arg);\n if(type!=null) {\n params.outputType = type;\n paramIndex = i;\n break;\n } else if(\"-help\".equals(arg)) {\n usage();\n System.exit(0);\n }\n }\n\n params.inputFile = args[paramIndex+1];\n if(args.length>paramIndex+2) {\n params.outputFile = args[paramIndex+2];\n }\n\n } else if(args.length == 1 && \"-help\".equals(args[0])) {\n usage();\n System.exit(0);\n\n } else {\n \n System.err.println(\"Error, incorrect usage\");\n usage();\n System.exit(-1);\n\n }\n\n return params;\n }", "public abstract IParser[] getParserOptionSet();", "private static PlanOptions parsePlanOptions(String[] args) {\n OptionsParser parser = OptionsParser.newOptionsParser(PlanOptions.class);\n parser.parseAndExitUponError(args);\n return parser.getOptions(PlanOptions.class);\n }", "private void parseArgs(String[] args) throws ParseException\n {\n CommandLineParser parser = new PosixParser();\n cmd = parser.parse(options, args);\n }", "public void initOptions(String[] args) {\n\t\tCL_Initializer.CL_init(args);\n\t\tCL_Initializer.checkParsing(args);\n\t\tCL_Initializer.initImagingScheme();\n\t\tCL_Initializer.initDataSynthesizer();\n\t}", "public boolean parse() {\n \n // create the version option\n Option optVersion = new Option(\"V\", \"version\", false, localization.getMessage(\"Help_Version\"));\n \n // create the help option\n Option optHelp = new Option(\"h\", \"help\", false, localization.getMessage(\"Help_Help\"));\n \n // create the log option\n Option optLog = new Option(\"l\", \"log\", false, localization.getMessage(\"Help_Log\"));\n \n // create the verbose option\n Option optVerbose = new Option(\"v\", \"verbose\", false, localization.getMessage(\"Help_Verbose\"));\n \n // create the timeout option\n Option optTimeout = new Option(\"t\", \"timeout\", true, localization.getMessage(\"Help_Timeout\"));\n \n // create the language option\n Option optLanguage = new Option(\"L\", \"language\", true, localization.getMessage(\"Help_Language\"));\n \n // add version\n commandLineOptions.addOption(optVersion);\n \n // add help\n commandLineOptions.addOption(optHelp);\n \n // add log\n commandLineOptions.addOption(optLog);\n \n // add verbose\n commandLineOptions.addOption(optVerbose);\n \n // add timeout\n commandLineOptions.addOption(optTimeout);\n \n // add language\n commandLineOptions.addOption(optLanguage);\n \n // create a new basic parser\n CommandLineParser parser = new BasicParser();\n \n // lets try to parse everthing\n try {\n \n // parse the arguments\n CommandLine line = parser.parse(commandLineOptions, theArgs);\n \n // if -L or --language found\n if (line.hasOption(\"language\")) {\n \n // create a new language controler\n LanguageController language = new LanguageController();\n \n // if the attempt to set the language according to the command\n // line has failed\n if (!language.setLanguage(line.getOptionValue(\"language\"))) {\n \n // print the list of available languages\n language.printLanguageHelp();\n \n // print the usage\n printUsage();\n \n // and simply return\n return false;\n }\n }\n \n // if -h or --help found\n if (line.hasOption(\"help\")) {\n \n // print version\n printVersion();\n \n // and usage\n printUsage();\n \n // return\n return false;\n \n } else {\n \n // if -v or --version found\n if (line.hasOption(\"version\")) {\n \n // print version\n printVersion();\n \n printSpecialThanks();\n \n // and return\n return false;\n \n } else {\n \n // get the list of files\n String[] files = line.getArgs();\n \n // we only expect one file\n if (files.length != 1) {\n \n // print version\n printVersion();\n \n // usage\n printUsage();\n \n // and return\n return false;\n \n } else {\n \n // if -t or --timeout found\n if (line.hasOption(\"timeout\")) {\n \n // try to convert the argument to a number\n try {\n \n // parse the long value\n executionTimeout = Long.parseLong(line.getOptionValue(\"timeout\"));\n \n // if it's not a valid number\n if (executionTimeout <= 0) {\n \n // print version\n printVersion();\n \n // usage\n printUsage();\n \n // and return\n return false;\n \n }\n } catch (NumberFormatException numberFormatException) {\n \n // we have a bad conversion\n \n // print version\n printVersion();\n \n // usage\n printUsage();\n \n // and return\n return false;\n }\n } else {\n \n // fallback to the default value, that is,\n // timeout is disabled\n executionTimeout = 0;\n }\n \n // active logging\n AraraLogging.enableLogging(line.hasOption(\"log\"));\n \n // set verbose flag\n showVerboseOutput = line.hasOption(\"verbose\");\n \n // everything is fine, set\n // the file\n theFile = files[0];\n \n // check if file exists\n if (!checkFile(theFile, configuration.getValidExtensions())) {\n \n // file not found, return false\n return false;\n \n }\n \n // and return\n return true;\n }\n }\n }\n \n } catch (ParseException parseException) {\n \n // something happened, in the last case print version\n printVersion();\n \n // and usage\n printUsage();\n \n // and simply return\n return false;\n \n }\n }", "protected FromToOption createOption() {\n return new FromToOption();\n }", "public static CommandLine parseCommandLine(String[] args) {\n Options options = getOptions();\n CommandLineParser cmdLineParser = new DefaultParser();\n\n CommandLine cmdLine = null;\n try {\n cmdLine = cmdLineParser.parse(options, args);\n } catch (ParseException pe) {\n printHelp(options);\n System.exit(1);\n }\n\n if (cmdLine == null) {\n printHelp(options);\n System.exit(1);\n }\n\n if (cmdLine.hasOption(\"help\")) {\n printHelp(options);\n System.exit(0);\n }\n\n return cmdLine;\n }", "private void _init(String[] _args, String[] _optList, OptionHandler _optHandler, \n HashMap _customOpts,\n boolean _wantOutput, int _numDtds, String _cmdLineSyntax, \n String _usageHeader) \n {\n args = _args;\n optList = _optList;\n optHandler = _optHandler;\n customOpts = _customOpts;\n wantOutput = _wantOutput;\n numDtds = _numDtds;\n cmdLineSyntax = _cmdLineSyntax;\n usageHeader = _usageHeader;\n }", "static Configuration parseArguments(String[] args) {\n \n // Global config\n GlobalConfiguration globalConfig = new GlobalConfiguration();\n \n // Module-specific options.\n List<ModuleSpecificProperty> moduleConfigs = new LinkedList<>();\n \n \n // For each argument...\n for (String arg : args) {\n arg = StringUtils.removeStart( arg, \"--\" );\n \n if( arg.equals(\"help\") ){\n Utils.writeHelp();\n return null;\n }\n if( arg.startsWith(\"as5.dir=\") || arg.startsWith(\"eap5.dir=\") || arg.startsWith(\"src.dir=\") ) {\n globalConfig.getAS5Config().setDir(StringUtils.substringAfter(arg, \"=\"));\n continue;\n }\n\n if( arg.startsWith(\"dest.dir=\") || arg.startsWith(\"eap6.dir=\") || arg.startsWith(\"dest.dir=\") || arg.startsWith(\"wfly.dir=\") ) {\n globalConfig.getAS7Config().setDir(StringUtils.substringAfter(arg, \"=\"));\n continue;\n }\n\n if( arg.startsWith(\"as5.profile=\") || arg.startsWith(\"eap5.profile=\") || arg.startsWith(\"src.profile=\") ) {\n globalConfig.getAS5Config().setProfileName(StringUtils.substringAfter(arg, \"=\"));\n continue;\n }\n\n if( arg.startsWith(\"dest.confPath=\") || arg.startsWith(\"eap6.confPath=\") || arg.startsWith(\"dest.conf.file=\") || arg.startsWith(\"wfly.confPath=\") ) {\n globalConfig.getAS7Config().setConfigPath(StringUtils.substringAfter(arg, \"=\"));\n continue;\n }\n\n if( arg.startsWith(\"dest.mgmt=\") || arg.startsWith(\"eap6.mgmt=\") || arg.startsWith(\"dest.mgmt=\") || arg.startsWith(\"wfly.mgmt=\") ) {\n parseMgmtConn( StringUtils.substringAfter(arg, \"=\"), globalConfig.getAS7Config() );\n continue;\n }\n\n if( arg.startsWith(\"app.path=\") ) {\n globalConfig.addDeploymentPath( StringUtils.substringAfter(arg, \"=\"));\n continue;\n }\n\n if( arg.startsWith(\"valid.skip\") ) {\n globalConfig.setSkipValidation(true);\n continue;\n }\n\n if( arg.equals(\"dry\") || arg.equals(\"dryRun\") || arg.equals(\"dry-run\") ) {\n globalConfig.setDryRun(true);\n continue;\n }\n \n if( arg.equals(\"test\") || arg.equals(\"testRun\") || arg.equals(\"test-run\") ) {\n globalConfig.setTestRun(true);\n continue;\n }\n \n if( arg.startsWith(\"report.dir=\") ) {\n globalConfig.setReportDir( StringUtils.substringAfter(arg, \"=\"));\n continue;\n }\n\n if( arg.startsWith(\"migrators.dir=\") || arg.startsWith(\"migr.dir=\") ) {\n globalConfig.setExternalMigratorsDir( StringUtils.substringAfter(arg, \"=\"));\n continue;\n }\n\n // User variables available in EL and Groovy in external migrators.\n if (arg.startsWith(\"userVar.\")) {\n \n // --userVar.<property.name>=<value>\n String rest = StringUtils.substringAfter(arg, \".\");\n String name = StringUtils.substringBefore(rest, \"=\");\n String value = StringUtils.substringAfter(rest, \"=\");\n \n globalConfig.getUserVars().put( name, value );\n }\n \n\n // Module-specific configurations.\n // TODO: Process by calling IMigrator instances' callback.\n if (arg.startsWith(\"conf.\")) {\n \n // --conf.<module>.<property.name>[=<value>]\n String conf = StringUtils.substringAfter(arg, \".\");\n String module = StringUtils.substringBefore(conf, \".\");\n String propName = StringUtils.substringAfter(conf, \".\");\n int pos = propName.indexOf('=');\n String value = null;\n if( pos == -1 ){\n value = propName.substring(pos+1);\n propName = propName.substring(0, pos);\n }\n \n moduleConfigs.add( new ModuleSpecificProperty(module, propName, value));\n }\n\n \n // Unrecognized.\n \n if( ! arg.contains(\"=\") ){\n // TODO: Could be AS5 or AS7 dir.\n }\n \n System.err.println(\"Warning: Unknown argument: \" + arg + \" !\");\n Utils.writeHelp();\n continue;\n }\n\n Configuration configuration = new Configuration();\n configuration.setModuleConfigs(moduleConfigs);\n configuration.setGlobalConfig(globalConfig);\n \n return configuration;\n \n }", "@Override\n\tpublic void configure(Subparser subparser) {\n\t\tsuper.configure(subparser);\n\n\t\tfinal ArgumentGroup group = subparser.addArgumentGroup(\"Preprocessing CLI Config\").description(\"Optional arguments to do a single import step by hand. Overrides json configuration.\");\n\n\t\tgroup.addArgument(\"--in\").required(false)\n\t\t\t .type(new FileArgumentType().verifyIsDirectory().verifyCanRead())\n\t\t\t .help(\"Directory containing the input files (in csv or gzipped csv format).\");\n\n\t\tgroup.addArgument(\"--out\").required(false)\n\t\t\t .type(new FileArgumentType().verifyIsDirectory().verifyCanCreate().verifyCanWrite())\n\t\t\t .help(\"Directory to write the output cqpp files to.\");\n\n\n\t\tgroup.addArgument(\"--desc\").required(false)\n\t\t\t .type(new FileArgumentType().verifyIsDirectory().verifyCanRead())\n\t\t\t .help(\"Directory containing the import description files (*.import.json).\");\n\n\t}", "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 }", "@Override\n protected void options()\n {\n super.options();\n addOption(Opt.APPLICATION_ID);\n addOption(Opt.SERVER_ID);\n addOption(Opt.CATEGORY);\n addOption(Opt.NAME, \"The name of the label\");\n }", "public static CommandLine prepCli( Options knowsCliDtd,\n\t\t\tString[] args, ResourceBundle rbm )\n\t{\n\t\tCommandLineParser cliRegex = new DefaultParser();\n\t\tCommandLine userInput = null;\n\t\ttry\n\t\t{\n\t\t\tuserInput = cliRegex.parse( knowsCliDtd, args );\n\t\t\tif ( userInput.hasOption( helpFlagS )\n\t\t\t\t\t|| userInput.hasOption( helpFlagLong ) )\n\t\t\t{\n\t\t\t\tnew HelpFormatter().printHelp( \"Note Enojes\", knowsCliDtd );\n\t\t\t}\n\t\t}\n\t\tcatch ( ParseException pe )\n\t\t{\n\t\t\tMessageFormat problem = new MessageFormat( rbm.getString( rbKeyCliParse ) );\n\t\t\tSystem.err.println( problem.format( new Object[]{ cl +\"pc\", pe } ) );\n\t\t}\n\t\treturn userInput;\n\t}", "private static Map<String, String> getOptions(String[] args)\n {\n Map<String, String> options = new HashMap<>();\n\n for (int i = 0; i < args.length; i++) {\n if (args[i].charAt(0) == '-') {\n if (args[i].charAt(1) == '-') {\n if (args[i].length() < 3) {\n throw new IllegalArgumentException(\"Not a valid argument: \" + args[i]);\n }\n\n String arg = args[i].substring(2, args[i].length());\n String[] keyVal = arg.split(\"=\");\n if (keyVal.length != 2) {\n throw new IllegalArgumentException(\"Not a valid argument: \" + args[i]);\n }\n\n String optionKey = keyVal[0];\n String optionVal = keyVal[1];\n\n if (!Arrays.asList(validOptions).contains(optionKey)) {\n throw new IllegalArgumentException(\"Not a valid argument: \" + args[i]);\n }\n\n options.put(optionKey, optionVal);\n } else {\n throw new IllegalArgumentException(\"Not a valid argument: \" + args[i]);\n }\n }\n }\n\n return options;\n }", "public OptionsHandle getOptionsHandle() {\r\n\t\tOptionsHandle myOps = new OptionsHandle(this, 2);\r\n\t\tmyOps.addStringOption(\"dna\", \"atgc\",\r\n\t\t\t\t\"Alphabet used by the sequence.\");\r\n\t\tmyOps.addIntOption(\"order\", 0, \"Order of Markov Model\");\r\n\r\n\t\treturn myOps;\r\n\t}", "public static void main(String [] pOptions) {\n \n PatternCreator myPatternCreator = new PatternCreator();\n \n }", "private static String optionsListing() {\n\t\tString result = \"\\nUsage: java -jar comtor.jar -dir dirname\\n\\n\";\n\t\tresult += \"Options:\\n\";\n\t\t\n\t\tresult += \"-dir dirname\\t\\tSpecified the pathname of the directory in which COMTOR will \"; \n\t\tresult += \"search for Java source code\\n\\t\\t\\tfiles (packaged and non-packaged).\\n\\n\";\n\t\t\n\t\tresult += \"-help | --help\\t\\tThis help message\\n\";\n\t\tresult += \"\\n\\n\";\n\t\treturn result;\n\t}", "protected abstract void initializeOptions(Options options);", "public Configuration parse() {\n final CommandLineParser parser = new BasicParser();\n final CommandLine cmd;\n\n try {\n cmd = parser.parse(options, args);\n\n if (cmd.hasOption(\"h\"))\n return help();\n\n if (cmd.hasOption(\"f\")) {\n return configurationFromFile(cmd.getOptionValue(\"f\"));\n } else if (cmd.hasOption(\"u\")) {\n return configurationFromUrl(cmd.getOptionValue(\"u\"));\n } else if (0 < args.length) {\n logback.warn(\"Unknown parameter: \" + args[0]);\n return help();\n } else {\n return configurationFromResource();\n }\n\n } catch (final ParseException e) {\n logback.error(\"Failed to parse command line properties\", e);\n return help();\n }\n }", "@Override\n public Cli<C> build() {\n ParserMetadata<C> parserConfig = this.parserBuilder.build();\n\n CommandMetadata defaultCommandMetadata = null;\n List<CommandMetadata> allCommands = new ArrayList<CommandMetadata>();\n if (defaultCommand != null) {\n defaultCommandMetadata = MetadataLoader.loadCommand(defaultCommand, baseHelpSections, parserConfig);\n }\n\n List<CommandMetadata> defaultCommandGroup = defaultCommandGroupCommands != null\n ? MetadataLoader.loadCommands(defaultCommandGroupCommands, baseHelpSections, parserConfig)\n : new ArrayList<CommandMetadata>();\n\n allCommands.addAll(defaultCommandGroup);\n if (defaultCommandMetadata != null)\n allCommands.add(defaultCommandMetadata);\n\n // Build groups\n List<CommandGroupMetadata> commandGroups;\n if (groups != null) {\n commandGroups = new ArrayList<CommandGroupMetadata>();\n for (GroupBuilder<C> groupBuilder : groups.values()) {\n commandGroups.add(groupBuilder.build());\n }\n } else {\n commandGroups = new ArrayList<>();\n }\n\n // Find all commands registered in groups and sub-groups, we use this to\n // check this is a valid CLI with at least 1 command\n for (CommandGroupMetadata group : commandGroups) {\n allCommands.addAll(group.getCommands());\n if (group.getDefaultCommand() != null)\n allCommands.add(group.getDefaultCommand());\n\n // Make sure to scan sub-groups\n Queue<CommandGroupMetadata> subGroups = new LinkedList<CommandGroupMetadata>();\n subGroups.addAll(group.getSubGroups());\n while (!subGroups.isEmpty()) {\n CommandGroupMetadata subGroup = subGroups.poll();\n allCommands.addAll(subGroup.getCommands());\n if (subGroup.getDefaultCommand() != null)\n allCommands.add(subGroup.getDefaultCommand());\n subGroups.addAll(subGroup.getSubGroups());\n }\n }\n\n // add commands to groups based on the value of groups in the @Command\n // annotations\n // rather than change the entire way metadata is loaded, I figured just\n // post-processing was an easier, yet uglier, way to go\n MetadataLoader.loadCommandsIntoGroupsByAnnotation(allCommands, commandGroups, defaultCommandGroup,\n baseHelpSections, parserConfig);\n\n // Build restrictions\n // Use defaults if none specified\n if (restrictions.size() == 0)\n withDefaultRestrictions();\n\n if (allCommands.size() == 0)\n throw new IllegalArgumentException(\"Must specify at least one command to create a CLI\");\n\n // Build metadata objects\n GlobalMetadata<C> metadata = MetadataLoader.<C> loadGlobal(name, description, defaultCommandMetadata,\n ListUtils.unmodifiableList(defaultCommandGroup), ListUtils.unmodifiableList(commandGroups),\n ListUtils.unmodifiableList(restrictions), Collections.unmodifiableCollection(baseHelpSections.values()),\n parserConfig);\n\n return new Cli<C>(metadata);\n }", "private static void parseCommandLine(String[] args) throws Exception {\n int i;\n // iterate over all options (arguments starting with '-')\n for (i = 0; i < args.length && args[i].charAt(0) == '-'; i++) {\n switch (args[i].charAt(1)) {\n // -a type = write out annotations of type a.\n case 'a':\n if (annotTypesToWrite == null)\n annotTypesToWrite = new ArrayList();\n annotTypesToWrite.add(args[++i]);\n break;\n\n // -g gappFile = path to the saved application\n case 'g':\n gappFile = new File(args[++i]);\n break;\n\n // -e encoding = character encoding for documents\n case 'e':\n encoding = args[++i];\n break;\n\n default:\n System.err.println(\"Unrecognised option \" + args[i]);\n usage();\n }\n }\n\n // set index of the first non-option argument, which we take as the first\n // file to process\n firstFile = i;\n\n // sanity check other arguments\n if (gappFile == null) {\n System.err.println(\"No .gapp file specified\");\n usage();\n }\n }", "public abstract Options getOptions();", "public ConfigGeneratorApi(ToolOptions options) {\n super(options);\n }", "uicargs createuicargs();", "@CommandLineInterface(application = \"split\")\n public interface SplitCommandOptions extends HelpOption {\n \n @Unparsed(name = \"FILE\")\n public List<File> getFiles();\n \n @Option(shortName = \"o\", longName = \"out\", description = \"The directory into which the decrypted files are written. Directory is created if it does not exist.\")\n public File getOutput();\n \n @Option(shortName = \"s\", longName = \"size\", description = \"Maximum number of entities to write per file. Default is 500.\", defaultValue = \"500\")\n public Integer getChunkSize();\n \n }", "public ArgumentsParser(String... args) {\n this.arguments = new HashMap<>(args.length);\n this.args = Arrays.copyOf(args, args.length);\n }", "public List<String> getOptions() {\n List<String> options = new ArrayList<String>();\n if (!showWarnings) {\n options.add(\"-nowarn\");\n }\n addStringOption(options, \"-source\", source);\n addStringOption(options, \"-target\", target);\n addStringOption(options, \"--release\", release);\n addStringOption(options, \"-encoding\", encoding);\n return options;\n }", "public InfoOptions() {\n\t\tHelpOpt = new ArrayList<String>();\n\t\tDisplayOpt = new ArrayList<String>();\n\t\tNoteOpt = new ArrayList<String>();\n\t\tDelOpt = new ArrayList<String>();\n\t\tChangeNameOpt = new ArrayList<String>();\n\t\tsetDisplay();\n\t\tsetHelp();\n\t\tsetNote();\n\t\tsetDel();\n\t\tsetChangeName();\n\t}", "public CuratorClientArgParser( String[] commandLineArgs ) {\n confirmArgsAreGood( commandLineArgs );\n\n testing = false;\n for( int crntArg = 0; crntArg < commandLineArgs.length; crntArg++ ) {\n if( commandLineArgs[crntArg].equals(\"-host\") ) {\n host = commandLineArgs[++crntArg];\n }\n else if( commandLineArgs[crntArg].equals(\"-port\") ) {\n port = Integer.parseInt( commandLineArgs[++crntArg] );\n }\n else if( commandLineArgs[crntArg].equals(\"-in\") ) {\n inputDir = new File( commandLineArgs[++crntArg] );\n }\n else if( commandLineArgs[crntArg].equals(\"-out\") ) {\n outputDir = new File( commandLineArgs[++crntArg] );\n }\n else if( commandLineArgs[crntArg].equals(\"-mode\") ) {\n try {\n mode = CuratorClient.CuratorClientMode.fromString( commandLineArgs[++crntArg] );\n } catch ( IllegalArgumentException e ) {\n System.out.println( \"Please specify either 'PRE' or 'POST' \"\n + \"(pre-Hadoop and post-Hadoop, \"\n + \"respectively) as the mode.\");\n }\n }\n else if( commandLineArgs[crntArg].equals(\"-test\") ) {\n testing = true;\n }\n }\n\n if( outputDir == null ) {\n outputDir = new File( inputDir, \"output\" );\n }\n }", "public Grammar(){\n this.builder = Cli.<VesperCommand>builder(\"vesper\")\n .withDescription(\"the nice CLI for Vesper\")\n .withDefaultCommand(HelpCommand.class)\n .withCommand(HelpCommand.class)\n .withCommand(LogCommand.class)\n .withCommand(ResetCommand.class)\n .withCommand(InspectCommand.class)\n .withCommand(ReplCommand.class)\n .withCommand(ConfigCommand.class)\n .withCommand(AddCommand.class)\n .withCommand(OriginShow.class)\n .withCommand(PublishCommand.class)\n .withCommand(FormatCommand.class)\n .withCommand(DeduplicateCommand.class)\n .withCommand(OptimizeImportsCommand.class);\n\n builder.withGroup(\"whereis\")\n .withDescription(\"Locates a program unit found in the tracked source\")\n .withDefaultCommand(LocateClassCommand.class)\n .withCommand(LocateClassCommand.class)\n .withCommand(LocateMethodCommand.class)\n .withCommand(LocateParamCommand.class)\n .withCommand(LocateVarCommand.class)\n .withCommand(LocateFieldCommand.class);\n\n builder.withGroup(\"notes\")\n .withDescription(\"Manage set of notes describing the tracked source\")\n .withDefaultCommand(NotesShow.class)\n .withCommand(NotesShow.class)\n .withCommand(NoteAdd.class);\n\n builder.withGroup(\"rename\")\n .withDescription(\"Manage set of renaming commands\")\n .withDefaultCommand(RenameClassCommand.class)\n .withCommand(RenameClassCommand.class)\n .withCommand(RenameMethodCommand.class)\n .withCommand(RenameParameterCommand.class)\n .withCommand(RenameFieldCommand.class)\n .withCommand(RenameLocalVariableCommand.class);\n\n builder.withGroup(\"rm\")\n .withDescription(\"Remove file contents from the tracked source\")\n .withDefaultCommand(RemoveSourceCommand.class)\n .withCommand(RemoveSourceCommand.class)\n .withCommand(RemoveClassCommand.class)\n .withCommand(RemoveMethodCommand.class)\n .withCommand(RemoveParameterCommand.class)\n .withCommand(RemoveFieldCommand.class)\n .withCommand(RemoveLocalVariableCommand.class)\n .withCommand(RemoveRegionCommand.class);\n\n builder.withGroup(\"clip\")\n .withDescription(\"Clip a code section from the tracked source\")\n .withDefaultCommand(ClipRangeCommand.class)\n .withCommand(ClipRangeCommand.class);\n\n }", "public FindBugsCommandLine() {\n super();\n project = new Project();\n startOptionGroup(\"General FindBugs options:\");\n addOption(\"-project\", \"project\", \"analyze given project\");\n addOption(\"-home\", \"home directory\", \"specify FindBugs home directory\");\n addOption(\"-pluginList\", \"jar1[\" + File.pathSeparator + \"jar2...]\", \"specify list of plugin Jar files to load\");\n addSwitchWithOptionalExtraPart(\"-effort\", \"min|less|default|more|max\", \"set analysis effort level\");\n addSwitch(\"-adjustExperimental\", \"lower priority of experimental Bug Patterns\");\n addSwitch(\"-workHard\", \"ensure analysis effort is at least 'default'\");\n addSwitch(\"-conserveSpace\", \"same as -effort:min (for backward compatibility)\");\n }", "public CommandParser(){\n setLanguage(\"ENGLISH\");\n commandTranslations = getPatterns(new String[] {TRANSLATION});\n commands = new ArrayList<>();\n addErrors();\n }", "public void initialize() {\n // Get our home directory\n String homeStr = System.getProperty(\"DTDANALYZER_HOME\");\n if (homeStr == null) homeStr = \".\";\n home = new File(homeStr);\n\n // Read the package properties file\n Properties props = new Properties();\n try {\n props.load(new FileInputStream( new File(homeStr, \"app.properties\") ));\n version = props.getProperty(\"version\");\n buildtime = props.getProperty(\"buildtime\");\n } \n catch (IOException e) {\n System.err.println(\n \"Warning: failed to read app.properties file. This should exist in \" +\n \"the DtdAnalyzer installation directory.\"\n );\n }\n\n // Merge the common and custom options into activeOpts. Custom ones with the same\n // name will override the common ones.\n for (int i = 0; i < optList.length; ++i) {\n String optName = optList[i];\n //System.err.println(\" option \" + optName);\n Option opt = (Option) customOpts.get(optName);\n if (opt == null) opt = (Option) commonOpts.get(optList[i]);\n if (opt == null) {\n System.err.println(\"Strange, undefined command line option '\" + optName +\n \"'. This should never \" +\n \"happen; please create an issue on GitHub.\");\n System.exit(1);\n }\n \n activeOpts.addOption(opt);\n }\n\n // Set System properties for parsing and transforming\n if ( System.getProperty(App.SAX_DRIVER_PROPERTY) == null )\n System.setProperty(App.SAX_DRIVER_PROPERTY, App.SAX_DRIVER_DEFAULT);\n\n if ( System.getProperty(App.TRANSFORMER_FACTORY_PROPERTY) == null )\n System.setProperty(App.TRANSFORMER_FACTORY_PROPERTY, App.TRANSFORMER_FACTORY_DEFAULT);\n\n // Initialize all of the dtd specifiers\n dtdSpecifiers = new DtdSpecifier[numDtds];\n for (int i = 0; i < numDtds; ++i) {\n dtdSpecifiers[i] = new DtdSpecifier();\n }\n numDtdsFound = 0;\n numTitlesFound = 0;\n \n // Parse the command line arguments\n CommandLineParser clp = new PosixParser();\n try {\n line = clp.parse( activeOpts, args );\n\n // Loop through the given command-line options, in the order they were given.\n Option[] lineOpts = line.getOptions();\n for (int i = 0; i < lineOpts.length; ++i) {\n Option opt = lineOpts[i];\n String optName = opt.getLongOpt();\n\n if (!optHandler.handleOption(opt)) {\n // The application didn't know what to do with it, so it\n // must be a common opt, for us to handle.\n handleOption(opt);\n }\n }\n\n \n // Now loop through any left-over arguments, and if we still\n // expect dtd specifiers, then use them up. If there's one extra, and \n // wantOutput is true, then we'll use that for the output filename.\n String[] rest = line.getArgs();\n for (int i = 0; i < rest.length; ++i) {\n //System.err.println(\"looking at \" + rest[i] + \", numDtdsFound is \" + numDtdsFound +\n // \", numDtds is \" + numDtds + \", wantOutput is \" + wantOutput);\n if (numDtdsFound < numDtds) {\n // Use this to initialize a dtd; assume it is a system id.\n dtdSpecifiers[numDtdsFound].idType = 's';\n dtdSpecifiers[numDtdsFound].idValue = rest[i];\n numDtdsFound++;\n }\n else if (wantOutput && output == null) {\n // Use this to initialize the output\n output = new StreamResult(new File(rest[i]));\n }\n else {\n usageError(\"Too many arguments\");\n }\n }\n\n // If we still don't have all the input dtds specified, complain.\n if (numDtdsFound < numDtds) {\n usageError(\"Expected at least \" + numDtds + \" DTD specifier\" + \n (numDtds > 1 ? \"s\" : \"\") + \"!\");\n }\n\n // Default output is to write to standard out\n if (wantOutput && output == null) {\n output = new StreamResult(System.out);\n }\n\n // Validate each dtd specifier object. This also causes dummy XML documents\n // to be created for -s or -p specifiers.\n for (int i = 0; i < numDtds; ++i) {\n dtdSpecifiers[i].validate();\n }\n\n // If no --xslt option was specified, then set the transformer to the\n // identity transformer\n if (xslt == null) {\n try {\n // If no xslt was specified, use the identity transformer\n TransformerFactory f = TransformerFactory.newInstance();\n xslt = f.newTransformer();\n xslt.setOutputProperty(OutputKeys.INDENT, \"yes\");\n }\n catch (TransformerConfigurationException e) {\n System.err.println(\"Error configuring xslt transformer: \" + e.getMessage());\n System.exit(1);\n }\n }\n \n\n }\n catch( ParseException exp ) {\n usageError(exp.getMessage());\n }\n }", "protected void DefineFlag()\n {\n String flagStr = \"-ci -d -h -hs -i:STR -n -o:STR -p -s:STR -t:INT -ti -v -x:STR\";\n \n // init the system option\n systemOption_ = new Option(flagStr);\n // Add the full name for flags\n systemOption_.SetFlagFullName(\"-ci\", \"Print_Config_Info\");\n systemOption_.SetFlagFullName(\"-d\", \"Print_Operation_Details\");\n systemOption_.SetFlagFullName(\"-h\", \"Help\");\n systemOption_.SetFlagFullName(\"-hs\", \"Hierarchy_Struture\");\n systemOption_.SetFlagFullName(\"-i\", \"Input_File\");\n systemOption_.SetFlagFullName(\"-n\", \"No_Output\");\n systemOption_.SetFlagFullName(\"-o\", \"Output_File\");\n systemOption_.SetFlagFullName(\"-p\", \"Show_Prompt\");\n systemOption_.SetFlagFullName(\"-s\", \"Field_Separator\");\n systemOption_.SetFlagFullName(\"-t\", \"Term_Field\");\n systemOption_.SetFlagFullName(\"-ti\", \"Display_Filtered_Input\");\n systemOption_.SetFlagFullName(\"-v\", \"Version\");\n systemOption_.SetFlagFullName(\"-x\", \"Load_Configuration_file\");\n }", "public static void main(String[] args) {\n OptionParser parser = new OptionParser();\n parser.accepts(\"myProp\").withRequiredArg();\n OptionSet options = parser.parse(args);\n\n boolean myProp = options.hasArgument(\"myProp\");\n System.out.println(myProp);\n Object myProp1 = options.valueOf(\"myProp\");\n System.out.println(myProp1);\n }", "protected OptionSet(String n, int size) {\n\t\tthis.opt = new Option[size];\n\t\tthis.name = n;\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\topt[i] = new Option();\n\t\t}\n\t \n\t}", "public interface CmdLineOption {\n \n /**\n * Checks if this option parser recognizes the specified\n * option name.\n */\n boolean accepts(String optionName);\n\n /**\n * Called if the option that this parser recognizes is found.\n * \n * @param parser\n * The parser that's using this option object.\n * \n * For example, if the option \"-quiet\" is simply an alias to\n * \"-verbose 5\", then the implementation can just call the\n * {@link CmdLineParser#parse(String[])} method recursively. \n * \n * @param params\n * The rest of the arguments. This method can use this\n * object to access the arguments of the option if necessary.\n * \n * @return\n * The number of arguments consumed. For example, return 0\n * if this option doesn't take any parameter.\n */\n int parseArguments( CmdLineParser parser, Parameters params ) throws CmdLineException;\n \n// /**\n// * Adds the usage message for this option. \n// * <p>\n// * This method is used to build usage message for the parser.\n// * \n// * @param buf\n// * Messages should be appended to this buffer.\n// * If you add something, make sure you add '\\n' at the end. \n// */\n// void appendUsage( StringBuffer buf );\n \n \n /**\n * SPI for {@link CmdLineOption}.\n * \n * Object of this interface is passed to\n * {@link CmdLineOption}s to make it easy/safe to parse\n * additional parameters for options.\n */\n public interface Parameters {\n /**\n * Gets the recognized option name.\n * \n * @return\n * This option name has been passed to the\n * {@link CmdLineOption#accepts(String)} method and\n * the method has returned <code>true</code>.\n */\n String getOptionName();\n \n /**\n * Gets the additional parameter to this option.\n * \n * @param idx\n * specifying 0 will retrieve the token next to the option.\n * For example, if the command line looks like \"-o abc -d x\",\n * then <code>getParameter(0)</code> for \"-o\" returns \"abc\"\n * and <code>getParameter(1)</code> will return \"-d\".\n * \n * @return\n * Always return non-null valid String. If an attempt is\n * made to access a non-existent index, this method throws\n * appropriate {@link CmdLineException}.\n */\n String getParameter( int idx ) throws CmdLineException;\n \n /**\n * The convenience method of\n * <code>Integer.parseInt(getParameter(idx))</code>\n * with proper error handling.\n * \n * @exception CmdLineException\n * If the parameter is not an integer, it throws an\n * approrpiate {@link CmdLineException}.\n */\n int getIntParameter( int idx ) throws CmdLineException;\n }\n \n}", "void\t\tsetCommandOptions(String command, Strings options);" ]
[ "0.7718264", "0.7578929", "0.7254021", "0.7155391", "0.7132748", "0.703786", "0.70333457", "0.7007586", "0.699301", "0.6976877", "0.6948752", "0.6776155", "0.67010766", "0.66602045", "0.6565388", "0.6561843", "0.6552747", "0.65337825", "0.6519944", "0.6420583", "0.6408867", "0.6367739", "0.6334191", "0.62925446", "0.6275185", "0.62345505", "0.6184012", "0.6157701", "0.61551505", "0.61448413", "0.61363566", "0.6113606", "0.61092293", "0.61035687", "0.6096878", "0.60850435", "0.6045833", "0.6041016", "0.60303676", "0.60213417", "0.60171443", "0.6014681", "0.5997918", "0.5986802", "0.58966756", "0.58923906", "0.58498687", "0.58450085", "0.58400613", "0.58281153", "0.58261424", "0.58238107", "0.5804751", "0.5788094", "0.57370126", "0.5730499", "0.56763697", "0.5674958", "0.5670377", "0.5659801", "0.56585926", "0.5630556", "0.5628555", "0.5628444", "0.5569828", "0.5545441", "0.554542", "0.55242014", "0.55207896", "0.5520677", "0.55135906", "0.550749", "0.54507935", "0.5449933", "0.54476714", "0.5433812", "0.5430035", "0.5404661", "0.53980374", "0.53818774", "0.53772455", "0.5368749", "0.5359021", "0.5358345", "0.5344237", "0.53442234", "0.5339364", "0.53357077", "0.53307104", "0.5321492", "0.53164804", "0.5315862", "0.5304353", "0.5299048", "0.5289842", "0.5286159", "0.52806896", "0.527787", "0.5272381", "0.5266446" ]
0.6804849
11
Copies all the info in this to create an independent clone that is not a pointer.
public ChessPiece getClone(ChessOwner owner){ ChessPiece temp = new ChessPiece(pieceName, uniquePieceID, attackDirectionVectors, movementDirectionVectors, specialMovementVectors, movementVectors, attackVectors, blackArtFile, whiteArtFile, NPCArtFile); temp.setOwner(owner); return temp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Object clone() {\n return super.clone();\n }", "Object clone();", "Object clone();", "public abstract Object clone();", "public abstract Object clone() ;", "public Object clone() {\n return this.copy();\n }", "public Object clone() {\n // No problems cloning here since private variables are immutable\n return super.clone();\n }", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone(){\n \t\n \treturn this;\n \t\n }", "@Override\n public MetaContainer clone() {\n return clone(false);\n }", "public Object clone()\n/* */ {\n/* 835 */ return super.clone();\n/* */ }", "public Function clone();", "public abstract Pessoa clone();", "public Object clone() throws CloneNotSupportedException { return super.clone(); }", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\r\n\t}", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\r\n\t}", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\r\n\t}", "public /*@ non_null @*/ Object clone() {\n return this;\n }", "@Override\n protected Object clone() throws CloneNotSupportedException {\n\n return super.clone();\n }", "@Override\n\tpublic Object clone() \n\t{\n\t\ttry{\n\t\t// Note all state is primitive so no need to deep copy reference types.\n\t\treturn (Tile) super.clone();\n\t\t} catch (CloneNotSupportedException e) \n\t\t{\n\t\t\t// We should not ever be here as we implement Cloneable.\n\t\t\t// It is better to deal with the exception here rather than letting\n\t\t\t// clone throw it as we would have to catch it in more places then.\n\t\t\treturn null;\n\t\t}\n\t}", "public Object clone ()\n\t{\n\t\ttry \n\t\t{\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch (CloneNotSupportedException e) \n\t\t{\n throw new InternalError(e.toString());\n\t\t}\n\t}", "@Override\n\tpublic Object clone() {\n\t\treturn null;\n\t}", "protected final Object clone() {\n\t\tBitBoardImpl clone = new BitBoardImpl();\n\t\tfor( int i = 0; i < 5; i++) {\n\t\t clone._boardLayer[i] = _boardLayer[i];\n\t\t}\n\t\treturn clone;\n }", "public Object clone() {\r\n try {\r\n return super.clone();\r\n } catch (CloneNotSupportedException e) {\r\n return null;\r\n }\r\n }", "public Object clone() {\n // No problems cloning here since private variables are immutable\n return (InstTexes) super.clone();\n }", "public BufferTWeak cloneMe() {\r\n BufferTWeak ib = new BufferTWeak(uc);\r\n ib.increment = increment;\r\n ib.set(new Object[objects.length]);\r\n for (int i = 0; i < objects.length; i++) {\r\n ib.objects[i] = this.objects[i];\r\n }\r\n ib.offset = this.offset;\r\n ib.count = this.count;\r\n return ib;\r\n }", "private void selfClone() {\n stroke = stroke.clone();\n }", "Component deepClone();", "public Clone() {}", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException { // semi-copy\r\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "public Object clone () {\n\t\t\ttry {\n\t\t\t\treturn super.clone();\n\t\t\t} catch (CloneNotSupportedException e) {\n\t\t\t\tthrow new InternalError(e.toString());\n\t\t\t}\n\t\t}", "@Override\r\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\t\r\n\t\treturn super.clone();\r\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n public Object clone() {\n try {\n IdentificationSet<X> newSet = (IdentificationSet<X>) super.clone();\n newSet.map = (HashMap<X, Identification>) map.clone();\n return newSet;\n } catch (CloneNotSupportedException e) {\n throw new InternalError();\n }\n }", "@Override\r\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\r\n\t}", "@Override\r\n @GwtIncompatible\r\n public Object clone() {\r\n try {\r\n @SuppressWarnings(\"unchecked\")\r\n PairBuilder<L, R> result = (PairBuilder<L, R>)super.clone();\r\n result.self = result;\r\n return result;\r\n } catch (CloneNotSupportedException e) {\r\n throw new InternalError(e.getMessage());\r\n }\r\n }", "@Override\n\tpublic PhyphoxBuffer clone() {\n\t\treturn new PhyphoxBuffer(this, 0);\n\t}", "@Override\n public Data clone() {\n final Data data = new Data(name, code, numeric, symbol, fractionSymbol, fractionsPerUnit, rounding, formatString,\n triangulated.clone());\n return data;\n }", "public Object clone() {\n try {\n return super.clone();\n } catch (Exception exception) {\n throw new InternalError(\"Clone failed\");\n }\n }", "public Object clone() {\n\t\ttry {\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch(CloneNotSupportedException exc) {\n\t\t\treturn null;\n\t\t}\n\t}", "public DescriptiveFramework clone();", "@Override\n public Object clone() throws CloneNotSupportedException{\n return super.clone();\n }", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "public Object clone() {\n try {\n // clones itself\n return super.clone();\n } catch (Exception exception) {\n ;\n }\n return null;\n }", "Prototype makeCopy();", "public Object clone()\n {\n Object o = null;\n try\n {\n o = super.clone();\n }\n catch (CloneNotSupportedException e)\n {\n e.printStackTrace();\n }\n return o;\n}", "@Override\n protected Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n // return super.clone(); // OR we can return the already present :: return getInstance();\n }", "public abstract State clone();", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "@Override\n\tpublic Object clone() throws CloneNotSupportedException {\n\treturn super.clone();\n\t}", "public Object clone() {\n \ttry {\n \tMyClass1 result = (MyClass1) super.clone();\n \tresult.Some2Ob = (Some2)Some2Ob.clone(); ///IMPORTANT: Some2 clone method called for deep copy without calling this Some2.x will be = 12\n \t\n \treturn result;\n \t} catch (CloneNotSupportedException e) {\n \treturn null; \n \t}\n\t}", "@Override\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "public Object clone(){ \r\n\t\tBaseballCard cloned = new BaseballCard();\r\n\t\tcloned.name = this.getName();\r\n\t\tcloned.manufacturer=this.getManufacturer();\r\n\t\tcloned.year = this.getYear();\r\n\t\tcloned.price = this.getPrice();\r\n\t\tcloned.size[0]= this.getSizeX();\r\n\t\tcloned.size[1]= this.getSizeY();\r\n\t\treturn cloned;\r\n\t}", "public /*@ non_null @*/ Object clone() { \n //@ assume owner == null;\n return this;\n }", "@Override\n public MultiCache clone () {\n return new MultiCache(this);\n }", "protected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "public Complex makeDeepCopy() {\r\n Complex complex2 = new Complex(this.getReal(), this.getImaginary());\r\n return complex2;\r\n }", "RecordInfo clone();", "public Binaire clone(){\n\t\treturn new Binaire(this.symbole, this.gauche.clone(), this.droit.clone());\n\t}", "public abstract INodo copy();", "@Override\n public SharedObject clone() {\n SharedObject c;\n try {\n c = (SharedObject)super.clone();\n } catch (CloneNotSupportedException e) {\n // Should never happen.\n throw new ICUCloneNotSupportedException(e);\n }\n c.refCount = new AtomicInteger();\n return c;\n }", "public Object clone()\n {\n PSRelation copy = new PSRelation(new PSCollection(m_keyNames.iterator()),\n new PSCollection(m_keyValues.iterator()));\n \n copy.m_componentState = m_componentState;\n copy.m_databaseComponentId = m_databaseComponentId;\n copy.m_id = m_id;\n\n return copy;\n }", "public State dup (State self)\n {\n if (self == null)\n return null;\n\n State copy = new State ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.address = self.address;\n copy.addressPort = self.addressPort;\n copy.generation = self.generation;\n copy.max_version = self.max_version;\n copy.extra = new VersionedMap (self.extra);\n return copy;\n }", "@Override\n public Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n }", "public Object clone() {\n FileTransfer ft = new FileTransfer();\n ft.mLogicalFile = new String(this.mLogicalFile);\n ft.mFlags = (BitSet) this.mFlags.clone();\n ft.mTransferFlag = this.mTransferFlag;\n ft.mSize = this.mSize;\n ft.mType = this.mType;\n ft.mJob = new String(this.mJob);\n ft.mPriority = this.mPriority;\n ft.mURLForRegistrationOnDestination = this.mURLForRegistrationOnDestination;\n ft.mMetadata = (Metadata) this.mMetadata.clone();\n ft.mVerifySymlinkSource = this.mVerifySymlinkSource;\n // the maps are not cloned underneath\n\n return ft;\n }", "@Override\n public Board clone() {\n return new Board(copyOf(this.board));\n }", "public Object clone() {\n GlobalizedAnswer cloned;\n try {\n cloned = (GlobalizedAnswer)super.clone();\n }\n catch (CloneNotSupportedException e) {\n throw new Error(getClass() + \" must support cloning\", e);\n }\n assert cloned != null;\n \n // Copy mutable fields by value\n cloned.tuples = (Tuples) tuples.clone();\n \n return cloned;\n }", "@Override\r\n\tprotected B clone() throws CloneNotSupportedException {\r\n\t\tB clone = (B)super.clone();\r\n//\t\tclone.a = new A();\r\n\t\treturn clone;\r\n\t}", "public Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException(\"clone() is not supported in \"+this.getClass().getName());\n }", "public LinkedList<AnyType> clone() {\n LinkedList<AnyType> clone = new LinkedList<AnyType>();\n LinkedListIterator<AnyType> itr = this.first();\n LinkedListIterator<AnyType> cloneitr = clone.zeroth();\n while (itr.current != null) {\n clone.insert(itr.current.element, cloneitr);\n itr.advance();\n cloneitr.advance();\n }\n return clone;\n }", "@Override\r\n\tprotected A clone() throws CloneNotSupportedException {\r\n\t\tA clone = (A)super.clone();\r\n//\t\tclone.b = new B();\r\n\t\treturn clone;\r\n\t}", "public Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override \n public Door clone()\n {\n try\n {\n Door copy = (Door)super.clone();\n \n //a copy of the location class\n copy.room = room.clone(); \n \n return copy;\n }\n catch(CloneNotSupportedException e)\n {\n throw new InternalError();\n }\n }", "public Object clone() throws CloneNotSupportedException {\r\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "public Object clone() throws CloneNotSupportedException {\n\tthrow new CloneNotSupportedException(\"This is a Singleton Ojbect; Buzz off\");\n }", "public final Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n }", "@Override \n public Object clone() {\n try {\n Resource2Builder result = (Resource2Builder)super.clone();\n result.self = result;\n return result;\n } catch (CloneNotSupportedException e) {\n throw new InternalError(e.getMessage());\n }\n }", "public Object clone()\n {\n try {\n Object newObj = super.clone();\n ((LDAPUrl)newObj).url = (com.github.terefang.jldap.ldap.LDAPUrl)this.url.clone();\n return newObj;\n } catch( CloneNotSupportedException ce) {\n throw new RuntimeException(\"Internal error, cannot create clone\");\n }\n }", "@Override\n public GraphicsState clone(\n )\n {\n GraphicsState clone;\n {\n // Shallow copy.\n try\n {clone = (GraphicsState)super.clone();}\n catch(CloneNotSupportedException e)\n {throw new RuntimeException(e);} // NOTE: It should never happen.\n\n // Deep copy.\n /* NOTE: Mutable objects are to be cloned. */\n clone.ctm = (AffineTransform)ctm.clone();\n clone.tlm = (AffineTransform)tlm.clone();\n clone.tm = (AffineTransform)tm.clone();\n }\n return clone;\n }", "public Object clone() {\n View v2;\n try {\n v2 = (View) super.clone();\n } catch (CloneNotSupportedException cnse) {\n v2 = new View();\n }\n v2.center = (Location) center.clone();\n v2.zoom = zoom;\n v2.size = (Dimension) size.clone();\n return v2;\n }", "public Object clone() {\r\n//STUB BEGIN\r\n \t/*\r\n DoubleLinkedList clone = null;\r\n try { \r\n \tclone = (DoubleLinkedList) super.clone();\r\n } catch (CloneNotSupportedException e) { \r\n \tthrow new InternalError();\r\n }*/ //JBSE still does not implement Object.clone\r\n \tDoubleLinkedList clone = new DoubleLinkedList();\r\n//STUB END\r\n\r\n // Put clone into \"virgin\" state\r\n//INSTRUMENTATION BEGIN\r\n //clone.header = new Entry(null, null, null);\r\n clone.header = new Entry(null, null, null, clone);\r\n//INSTRUMENTATION END\r\n clone.header.next = clone.header.previous = clone.header;\r\n clone.size = 0;\r\n clone.modCount = 0;\r\n\r\n // Initialize clone with our elements\r\n for (Entry e = header.next; e != header; e = e.next)\r\n clone.add(e.element);\r\n\r\n return clone;\r\n }", "public Paper clone() \r\n\t{\r\n\t\tPaper copy = null;\r\n\t\ttry\r\n\t\t{ \r\n\t\t\tcopy = new Paper(this.getId(), new String(this.getTitle()), new String(this.getURI()),\r\n\t\t\t\tthis.year, new String(this.biblio_info), \r\n\t\t\t\tnew String(this.authors), new String(this.url) ); \r\n\t\t}\r\n\t\tcatch (Exception e) { e.printStackTrace(System.out); }\r\n\t\treturn copy;\r\n\t}", "public Object clone()\n {\n Object o = null;\n try \n { o = super.clone(); } \n catch(CloneNotSupportedException e) \n { System.err.println(\"Erreur dans le clonage de la cellule...\"); }\n return o;\n }", "private Shop deepCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n List<Book> books = new ArrayList<>();\n Iterator<Book> iterator = this.getBooks().iterator();\n while(iterator.hasNext()){\n\n books.add((Book) iterator.next().clone());\n }\n obj.setBooks(books);\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "public T cloneDeep();", "@Override\n protected Currency clone() {\n final Currency currency = new Currency();\n if (data != null) {\n currency.data = data.clone();\n }\n return currency;\n\n }", "@Override\r\n\tpublic AI_Domain clone() {\r\n\t\treturn new Board2048model(this);\r\n\t}" ]
[ "0.7603676", "0.74927336", "0.74927336", "0.7448434", "0.74025923", "0.73986864", "0.7385297", "0.7379618", "0.7379618", "0.7379618", "0.7379618", "0.73793954", "0.7366074", "0.7357229", "0.73504794", "0.73146087", "0.71775234", "0.7092684", "0.7092684", "0.7092684", "0.7087052", "0.70564497", "0.703836", "0.70372915", "0.7030509", "0.70112216", "0.70099396", "0.69973034", "0.6996764", "0.6993718", "0.6989419", "0.69852537", "0.69847906", "0.69769543", "0.697199", "0.6968714", "0.6968714", "0.6968714", "0.6968714", "0.6968714", "0.6968714", "0.6968714", "0.6968714", "0.6968714", "0.69686687", "0.69526017", "0.6949967", "0.69473463", "0.692435", "0.69207436", "0.69176775", "0.6910083", "0.690701", "0.69056135", "0.6903803", "0.6900052", "0.68798137", "0.68760574", "0.6872592", "0.68607074", "0.68388855", "0.6833907", "0.68311805", "0.68311805", "0.68311805", "0.6823174", "0.6822513", "0.6807595", "0.68035746", "0.6792439", "0.6787558", "0.6787519", "0.6787295", "0.67603934", "0.67532927", "0.6752869", "0.6730349", "0.6724072", "0.67232007", "0.6705196", "0.6700904", "0.669652", "0.669368", "0.6689805", "0.6688504", "0.66794306", "0.6671775", "0.6653288", "0.66489685", "0.66345906", "0.6633991", "0.6616476", "0.65966153", "0.6591468", "0.6586825", "0.65857095", "0.65837055", "0.6575592", "0.6567119", "0.65645313", "0.6563652" ]
0.0
-1
Executes all operations in extendDocument to modify the xml code in originalDocument
protected Document parse(Document originalForm, Document extendDocument) throws Exception { ArrayList operationNodes = this.extractOperationNodes(extendDocument); for (int i = 0; i < operationNodes.size(); i++) { Node operationNode = (Node) operationNodes.get(i); if (operationNode != null) { try { ExtendedXmlOperation operation = this.getNodeOperation(operationNode); this.executeOperation(originalForm, operation); } catch (Exception e) { ExtendedXmlParser.logger.error(null, e); throw e; } } } return originalForm; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Document augmentDocumentXml(Document document) throws IOException, SAXException {\n\t\tString fileName = getBbnFileName(document);\n\n\t\t// move to the next BBN file if necessary\n\t\t// this will be efficient if the documents are passed in WSJ order as it avoids reloading the same file\n\t\tif (!fileName.equals(currentBbnFile)) {\n\t\t\tFile xmlFile = new File(StaticConfig.bbnPath + fileName);\n\t\t\txmlReader.parse(new InputSource(xmlFile.getPath()));\n\t\t\tcurrentBbnFile = fileName;\n\t\t}\n\n\t\tList<String> tags = handler.getTags(document.docId.getFileStr());\n\t\tList<Token> tokenList = document.tokenList;\n\n\t\t// sanity check: same number of tokens?\n\t\tif (tags.size() != tokenList.size()) {\n\t\t\tthrow new Error(\"Tag and token counts differ\");\n\t\t}\n\n\t\t// align tags and tokens\n\t\tfor (int i = 0; i < tokenList.size(); i++) {\n\t\t\tToken token = tokenList.get(i);\n\t\t\tString neTag = tags.get(i);\n\t\t\ttoken.goldNer = neTag;\n\t\t}\n\n\t\treturn document;\n\t}", "private static Document createCopiedDocument(Document originalDocument) {\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db;\n Document copiedDocument = null;\n try {\n db = dbf.newDocumentBuilder();\n Node originalRoot = originalDocument.getDocumentElement();\n copiedDocument = db.newDocument();\n Node copiedRoot = copiedDocument.importNode(originalRoot, true);\n copiedDocument.appendChild(copiedRoot);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return copiedDocument;\n }", "public DocumentManipulator() {\n\t\ttry {\n\t\t\tthis.document = XMLUtils.buildDocument();\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SAXException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//-- Init Xpath\n\t\tinit();\n\t}", "@Override\n public void process(IeDocument document) {\n\n }", "@Override\n\tpublic Document patchIEResults(Document doc) {\n\t\tif (doc.getInitial_event() != null) {\n\t\t\tList<Paragraph> originalp = doc.getInitial_event();\n\t\t\toriginalp = patchDocLevel(originalp);\n\t\t\tdoc.setInitial_event(originalp);\n\t\t}\n\t\tif (doc.getInclusion_criteria() != null) {\n\t\t\tList<Paragraph> originalp = doc.getInclusion_criteria();\n\t\t\toriginalp = patchDocLevel(originalp);\n\t\t\tdoc.setInclusion_criteria(originalp);\n\t\t}\n\t\tif (doc.getExclusion_criteria() != null) {\n\t\t\tList<Paragraph> originalp = doc.getExclusion_criteria();\n\t\t\toriginalp = patchDocLevel(originalp);\n\t\t\tdoc.setExclusion_criteria(originalp);\n\t\t}\n\t\treturn doc;\n\t}", "public void test1() {\n\t\tString fileToUpload = \"test.xml\";\n\t\tContext context = SessionService.getInstance().getContext();\n\t\tAssetManager assetManager = context.getAssets();\n\t\tInputStream inputStream = null;\n\t\ttry {\n\t\t\tinputStream = assetManager.open(fileToUpload, AssetManager.ACCESS_BUFFER);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// upload xml document for testing, the server adds IDs for every element\n\t\tboolean success;\n\t\tif (inputStream == null) {\n\t\t\tsuccess = false;\n\t\t} else {\n\t\t\tsuccess = collabEditingService.uploadDocument(fileToUpload, inputStream);\n\t\t}\n\t\tif (!success) {\n\t\t\tLog.w(TAG, \"Document already exists on the server or connection failure during upload\");\n\t\t}\n\n\t\t// download the decorated document file again\n\t\tString fileForEditing = \"test.xml\";\n\t\tsuccess = collabEditingService.loadDocumentFromServer(fileForEditing);\n\t\tif (success) collabEditingService.showDocument(); // debug\n\t\t\n\t\t// insert text under parent node 200 and before node 300 \n\t\tLog.i(TAG, System.currentTimeMillis() + \": \" + \"Inserting\");\n\t\tcollabEditingService.insertText(\"200\", \"300\", NodePosition.INSERT_BEFORE, \" Woohoo \", 0);\n\t\t// c1.insertText(\"200\", null, 1, \" Woohoo \", 0); // inserts text right under the parent node\n\t\t\n\t\t// insert a new Element node before Node 500\n\t\tElement newNode = collabEditingService.createElement(\"Foo\");\n\t\tnewNode.setAttribute(\"myAttrib\", \"69\");\n\t\tcollabEditingService.insertNode(\"200\", newNode, \"300\", NodePosition.INSERT_AFTER);\n\t\t\n\t\tLog.i(TAG, collabEditingService.getDocumentString());\n\t\tcollabEditingService.showStateVector();\n\t}", "public DocumentManipulator(Document document) {\n\t\tthis.document = document;\n\t\tinit();\n\t}", "private Document doMerge(Document[] docs) throws AbstractXmlMergeException\n {\n Document originalDoc = docs[0];\n\n for (int i = 1; i < docs.length; i++)\n {\n\n if (!m_rootMatcher.matches(originalDoc.getRootElement(), docs[i].getRootElement()))\n {\n throw new IllegalArgumentException(\"Root elements do not match.\");\n }\n\n Document output = new Document();\n if (originalDoc.getDocType() != null)\n {\n output.setDocType((DocType) originalDoc.getDocType().clone());\n }\n output.setRootElement(new Element(\"root\"));\n\n m_rootMergeAction.perform(originalDoc.getRootElement(), docs[i].getRootElement(),\n output.getRootElement());\n\n Element root = (Element) output.getRootElement().getChildren().get(0);\n root.detach();\n\n originalDoc.setRootElement(root);\n }\n\n return originalDoc;\n }", "public void processDocument() {\n\n\t\t// compact concepts\n\t\tprocessConcepts(concepts);\n\t}", "public void run() {\n try {\r\n TransformerFactory tFactory = TransformerFactory.newInstance();\r\n // Fortify Mod: prevent external entity injection\r\n tFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);\r\n Transformer transformer = tFactory.newTransformer();\r\n transformer.setOutputProperty(\"encoding\", \"UTF-8\");\r\n transformer.setOutputProperty(\"indent\", \"yes\");\r\n transformer.transform(new DOMSource(doc), new StreamResult(\r\n pos));\r\n } catch (Exception e) {\r\n throw new RuntimeException(\r\n \"Error converting Document to InputStream. \"\r\n + e.getMessage());\r\n } finally {\r\n try {\r\n pos.close();\r\n } catch (IOException e) {\r\n\r\n }\r\n }\r\n }", "@Override\r\n protected void parseDocuments()\r\n {\n\r\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "public void openXml() throws ParserConfigurationException, TransformerConfigurationException, SAXException {\n\n SAXTransformerFactory saxTransformerFactory = (SAXTransformerFactory) SAXTransformerFactory.newInstance();\n transformer = saxTransformerFactory.newTransformerHandler();\n\n // pretty XML output\n Transformer serializer = transformer.getTransformer();\n serializer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"4\");\n serializer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setResult(result);\n transformer.startDocument();\n transformer.startElement(null, null, \"inserts\", null);\n }", "@Override\n\t\t\t\tpublic void startDocument() throws SAXException {\n\t\t\t\t\tsuper.startDocument();\n\t\t\t\t\tbuilder = new StringBuilder();\n\t\t\t\t}", "private static Document copyDocument(Document origDoc) {\n DocumentImpl doc = new DocumentImpl();\n doc.setFeatures(origDoc.getFeatures());\n doc.setContent(new DocumentContentImpl(origDoc.getContent().toString()));\n doc.setPreserveOriginalContent(origDoc.getPreserveOriginalContent());\n doc.setMarkupAware(origDoc.getMarkupAware());\n\n for(String an : origDoc.getAnnotationSetNames()) {\n if(!an.equals(GateConstants.ORIGINAL_MARKUPS_ANNOT_SET_NAME)) {\n AnnotationSet as = origDoc.getAnnotations(an);\n doc.getAnnotations(an).addAll(as);\n }\n }\n\n doc.getAnnotations().addAll(origDoc.getAnnotations());\n\n return doc;\n }", "public void reParse() {\r\n \r\n \t\tSystem.out.println(\"Starting reparse\");\r\n \r\n \t\t// to reparse an entire document\r\n \r\n \t\t// A. remove all document positions & problem markers\r\n \t\tSystem.out.println(\"DUMPING POSITIONS\");\r\n \t\tdumpPositions();\r\n \t\ttry {\r\n \t\t\tgetFile().deleteMarkers(IMarker.PROBLEM, true, IResource.DEPTH_ZERO);\r\n \t\t\t_parseErrors.clear();\r\n \t\t} catch (CoreException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t}\r\n \r\n \t\t// if this is not set, the document is new and has never been parsed before.\r\n \t\tif (_doc == null) {\r\n \t\t\tgetProjectNature().addToModel(this);\r\n \t\t} else {\r\n \r\n \t\t\t// B. remove compilation unit from model tree\r\n \t\t\tif(Config.debug()) {\r\n \t\t\t System.out.println(\"removing compilation unit from tree\");\r\n \t\t\t}\r\n \t\t\t// C. remove Document from project\r\n \t\t\tif(Config.debug()) {\r\n \t\t\t\tSystem.out.println(\"Remove document from project\");\r\n \t\t\t}\r\n \t\t\tgetProjectNature().removeDocument(this);\r\n \r\n \t\t\t// D. Re-add Document to the project (wich will cause it to be parsed)\r\n \t\t\tif(Config.debug()) {\r\n \t\t\t System.out.println(\"Re-add document to project\");\r\n \t\t\t}\r\n \t\t\tNamespace root = getProjectNature().getModel();\r\n \t\t\tgetProjectNature().addModelElement(this, root);\r\n \t\t}\r\n \r\n \t\tSystem.out.println(\"Einde reparse\");\r\n \t}", "@Override\n\tpublic void startDocument() {\n\t\t\n\t}", "abstract public void data(Document document, Element rootElement);", "public void normalise() {\n\t\tElement base = this;\n\t\t\n\t\tbase.setNamespace(\"1\");\n\t\t\n\t\tint i = 1;\n\t\tfor (Element child : base.getAllChildren() )\n\t\t\tbase.normaliseChild(child, i++);\n\t\t\n\t\t\n\t}", "void visitDocumentNode(DocumentNode node);", "public void commit() {\n\t\ttry {\n\t\t\tTransformer transformer = TransformerFactory.newInstance().newTransformer();\n\t\t\tDOMSource domSource = new DOMSource(document);\n\t\t\tStreamResult streamResult = new StreamResult(new File(fileName));\n\t\t\ttransformer.transform(domSource, streamResult);\n\t\t\t//Reload nodes list\n\t\t\tnodes = document.getDocumentElement().getChildNodes();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void transformToSecondXml();", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t\tbuilder = new StringBuilder();\n\t}", "@Test\n public void create() throws ParserConfigurationException, IOException, SAXException {\n Document document = createDocument();\n Document documentExpected = readDocument(\"createExpected.xml\");\n XModifier modifier = new XModifier(document);\n modifier.setNamespace(\"ns\", \"http://localhost\");\n // create an empty element\n modifier.addModify(\"/ns:root/ns:element1\");\n // create an element with attribute\n modifier.addModify(\"/ns:root/ns:element2[@attr=1]\");\n // append an new element to existing element1\n modifier.addModify(\"/ns:root/ns:element1/ns:element11\");\n // create an element with text\n modifier.addModify(\"/ns:root/ns:element3\", \"TEXT\");\n modifier.modify();\n assertXmlEquals(documentExpected, document);\n }", "private void copyXML(final WriteXML out, final Map<String, String> replace) {\r\n\t\tfinal StringBuilder text = new StringBuilder();\r\n\t\tint depth = 0;\r\n\t\tint ch;\r\n\t\tcopyAttributes(out, replace);\r\n\t\tfinal String contain = this.in.getTag().getName();\r\n\r\n\t\tout.beginTag(contain);\r\n\r\n\t\twhile ((ch = this.in.read()) != -1) {\r\n\t\t\tfinal Type type = this.in.getTag().getType();\r\n\r\n\t\t\tif (ch == 0) {\r\n\t\t\t\tif (type == Type.BEGIN) {\r\n\t\t\t\t\tif (text.length() > 0) {\r\n\t\t\t\t\t\tout.addText(text.toString());\r\n\t\t\t\t\t\ttext.setLength(0);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcopyAttributes(out, null);\r\n\t\t\t\t\tout.beginTag(this.in.getTag().getName());\r\n\t\t\t\t\tdepth++;\r\n\t\t\t\t} else if (type == Type.END) {\r\n\t\t\t\t\tif (text.length() > 0) {\r\n\t\t\t\t\t\tout.addText(text.toString());\r\n\t\t\t\t\t\ttext.setLength(0);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (depth == 0) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tout.endTag(this.in.getTag().getName());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdepth--;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\ttext.append((char) ch);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tout.endTag(contain);\r\n\t}", "@Override\n abstract public void commitPendingXmlChanges();", "@Override\r\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\r\n\t\tSystem.out.println(\"Start Document\");\r\n\t}", "public void writeDocumentToOutput() {\n log.debug(\"Statemend of XML document...\");\r\n // writeDocumentToOutput(root,0);\r\n log.debug(\"... end of statement\");\r\n }", "public void startDocument() {\n\t\t\tif (isVerbose()) {\n\t\t\t\tlogInfo(\"start\", \"\");\n\t\t\t\tindent();\n\t\t\t}\n\n\t\t\t_attributes.clear();\n\t\t\t_root = null;\n\t\t}", "@Override\n\t\tpublic void startDocument() throws SAXException {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void startDocument() throws SAXException\r\n\t{\r\n\t\t//\t\ttry \n\t\t//\t\t{\n\t\t//\t\t\tif (task.isMergeSourceFiles())\r\n\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\telse\r\n\t\t//\t\t\t{\r\n\t\t//\t\t\t\tmultiFileStartDocument();\r\n\t\t//\t\t\t}\n\t\t//\t\t} \n\t\t//\t\tcatch (Exception e) \n\t\t//\t\t{\n\t\t//\t\t\tthrow new SAXException(\"Exception on starting document \", e);\n\t\t//\t\t}\r\n\t}", "protected void syncWithDocument(Node node) {\n/* 383 */ if (node.getNodeType() != 9)\n/* */ {\n/* 385 */ throw new XMLCRuntimeException(\"Node must be a document node\");\n/* */ }\n/* */ \n/* */ \n/* 389 */ Document doc = (Document)node;\n/* */ \n/* */ \n/* */ try {\n/* 393 */ Field[] fs = getClass().getDeclaredFields();\n/* */ \n/* 395 */ int substStart = \"$element_\".length();\n/* */ \n/* 397 */ for (int i = 0; i < fs.length; i++) {\n/* */ \n/* 399 */ Field f = fs[i];\n/* */ \n/* 401 */ if (f.getName().startsWith(\"$element_\")) {\n/* */ \n/* 403 */ String id = f.getName().substring(substStart);\n/* */ \n/* 405 */ Node idNode = doc.getElementById(id);\n/* */ \n/* 407 */ if (idNode == null) {\n/* */ \n/* 409 */ id = id.substring(0, 1).toLowerCase() + id.substring(1);\n/* */ \n/* 411 */ idNode = doc.getElementById(id);\n/* */ } \n/* */ \n/* */ \n/* 415 */ if (idNode != null) f.set(this, idNode);\n/* */ \n/* */ } \n/* */ } \n/* 419 */ } catch (Exception e) {\n/* */ \n/* 421 */ throw new XMLCRuntimeException(\"Error reflecting on element access fields\", e);\n/* */ } \n/* */ }", "void startDocument()\n throws SAXException\n {\n contentHandler.setDocumentLocator(this);\n contentHandler.startDocument();\n attributesList.clear();\n }", "static void processDoc1(Document doc, int docno) throws IOException {\n\t\tString script = JetTest.config.getProperty(\"processDocument\");\n\t\t// if there is a name tagger, clear its cache\n\t\tif (JetTest.nameTagger != null) JetTest.nameTagger.newDocument();\n\t\tSpan all = new Span(0, doc.length());\n\t\tControl.applyScript (doc, all, script);\n\t}", "@Override\n public abstract NiceXWPFDocument merge(NiceXWPFDocument source, Iterator<NiceXWPFDocument> mergedIterator,\n XWPFRun location) throws Exception;", "@Override\r\n\t\tpublic void startDocument() throws SAXException {\n\t\t}", "protected void syncWithDocument(Node node) {\n/* 797 */ if (node.getNodeType() != 9)\n/* */ {\n/* 799 */ throw new XMLCRuntimeException(\"Node must be a document node\");\n/* */ }\n/* */ \n/* */ \n/* 803 */ Document doc = (Document)node;\n/* */ \n/* */ \n/* */ try {\n/* 807 */ Field[] fs = getClass().getDeclaredFields();\n/* */ \n/* 809 */ int substStart = \"$element_\".length();\n/* */ \n/* 811 */ for (int i = 0; i < fs.length; i++) {\n/* */ \n/* 813 */ Field f = fs[i];\n/* */ \n/* 815 */ if (f.getName().startsWith(\"$element_\")) {\n/* */ \n/* 817 */ String id = f.getName().substring(substStart);\n/* */ \n/* 819 */ Node idNode = doc.getElementById(id);\n/* */ \n/* 821 */ if (idNode == null) {\n/* */ \n/* 823 */ id = id.substring(0, 1).toLowerCase() + id.substring(1);\n/* */ \n/* 825 */ idNode = doc.getElementById(id);\n/* */ } \n/* */ \n/* */ \n/* 829 */ if (idNode != null) f.set(this, idNode);\n/* */ \n/* */ } \n/* */ } \n/* 833 */ } catch (Exception e) {\n/* */ \n/* 835 */ throw new XMLCRuntimeException(\"Error reflecting on element access fields\", e);\n/* */ } \n/* */ }", "private static Nodes downloadXMLDocument(\n URL source, String xpointer, Builder builder, ArrayList baseURLs,\n String accept, String acceptLanguage, String parentLanguage) \n throws IOException, ParsingException, XIncludeException, \n XPointerSyntaxException, XPointerResourceException {\n\n String base = source.toExternalForm();\n if (xpointer == null && baseURLs.indexOf(base) != -1) {\n throw new InclusionLoopException(\n \"Tried to include the already included document \" + base +\n \" from \" + baseURLs.get(baseURLs.size()-1), (String) baseURLs.get(baseURLs.size()-1));\n } \n \n URLConnection uc = source.openConnection();\n setHeaders(uc, accept, acceptLanguage);\n InputStream in = new BufferedInputStream(uc.getInputStream());\n Document doc;\n try {\n doc = builder.build(in, source.toExternalForm());\n }\n finally {\n in.close();\n }\n \n resolveInPlace(doc, builder, baseURLs); \n Nodes included;\n if (xpointer != null && xpointer.length() != 0) {\n included = XPointer.query(doc, xpointer); \n // fill in lang attributes here\n for (int i = 0; i < included.size(); i++) {\n Node node = included.get(i);\n // Current implementation can only select elements\n Element top = (Element) node;\n Attribute lang = top.getAttribute(\"lang\", \n \"http://www.w3.org/XML/1998/namespace\");\n if (lang == null) {\n String childLanguage = getXMLLangValue(top);\n if (!parentLanguage.equals(childLanguage)) {\n top.addAttribute(new Attribute(\"xml:lang\", \n \"http://www.w3.org/XML/1998/namespace\", \n childLanguage));\n }\n }\n }\n }\n else {\n included = new Nodes();\n for (int i = 0; i < doc.getChildCount(); i++) {\n Node child = doc.getChild(i);\n if (!(child instanceof DocType)) {\n included.append(child);\n } \n }\n }\n // so we can detach the old root if necessary\n doc.setRootElement(new Element(\"f\")); \n for (int i = 0; i < included.size(); i++) {\n Node node = included.get(i);\n // Take account of xml:base attribute, which we normally \n // don't do when detaching\n String noFragment = node.getBaseURI();\n if (noFragment.indexOf('#') >= 0) {\n noFragment = noFragment.substring(0, noFragment.indexOf('#'));\n }\n node.detach();\n if (node instanceof Element) {\n ((Element) node).setBaseURI(noFragment);\n }\n } \n \n return included;\n \n }", "protected void syncWithDocument(Node node) {\n/* 429 */ if (node.getNodeType() != 9)\n/* */ {\n/* 431 */ throw new XMLCRuntimeException(\"Node must be a document node\");\n/* */ }\n/* */ \n/* */ \n/* 435 */ Document doc = (Document)node;\n/* */ \n/* */ \n/* */ try {\n/* 439 */ Field[] fs = getClass().getDeclaredFields();\n/* */ \n/* 441 */ int substStart = \"$element_\".length();\n/* */ \n/* 443 */ for (int i = 0; i < fs.length; i++) {\n/* */ \n/* 445 */ Field f = fs[i];\n/* */ \n/* 447 */ if (f.getName().startsWith(\"$element_\")) {\n/* */ \n/* 449 */ String id = f.getName().substring(substStart);\n/* */ \n/* 451 */ Node idNode = doc.getElementById(id);\n/* */ \n/* 453 */ if (idNode == null) {\n/* */ \n/* 455 */ id = id.substring(0, 1).toLowerCase() + id.substring(1);\n/* */ \n/* 457 */ idNode = doc.getElementById(id);\n/* */ } \n/* */ \n/* */ \n/* 461 */ if (idNode != null) f.set(this, idNode);\n/* */ \n/* */ } \n/* */ } \n/* 465 */ } catch (Exception e) {\n/* */ \n/* 467 */ throw new XMLCRuntimeException(\"Error reflecting on element access fields\", e);\n/* */ } \n/* */ }", "public void buildDocument() {\n/* 220 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 222 */ syncAccessMethods();\n/* */ }", "private void processStandoffMarkup(Document docExtra) {\n\t\tDOMSnapshot snapExtra = new DOMSnapshot(docExtra, docRoot, new XMLDialect());\n\t\tfor (ITSState itssExtra : snapExtra.iterNodes()) {\n\t\t\tRuleResolver resolver = resolvers.get(itssExtra.node.getNodeName()); \n\t\t\tif (resolver != null) {\n\t\t\t\tGlobalRule rule = resolver.extractRule(snapExtra.attrReader, snapExtra.parameters, itssExtra.node);\n\t\t\t\tapplyRule(resolver, rule);\n\t\t\t}\n\t\t\t\n\t\t\tif (itssExtra.node.getNodeName().equals(\"its:param\")) {\n\t\t\t\tString name = itssExtra.node.getAttributes().getNamedItem(\"name\").getNodeValue();\n\t\t\t\tString value = itssExtra.node.getTextContent();\n\t\t\t\tparameters.add(name, value);\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "protected static org.w3c.dom.Document setUpXML(String nodeName)\n throws ParserConfigurationException\n {\n //try\n //{\n DocumentBuilderFactory myFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder myDocBuilder = myFactory.newDocumentBuilder();\n DOMImplementation myDOMImpl = myDocBuilder.getDOMImplementation();\n // resultDocument = myDOMImpl.createDocument(\"at.ac.tuwien.dbai.pdfwrap\", \"PDFResult\", null);\n org.w3c.dom.Document resultDocument =\n myDOMImpl.createDocument(\"at.ac.tuwien.dbai.pdfwrap\", nodeName, null);\n return resultDocument;\n //}\n //catch (ParserConfigurationException e)\n //{\n // e.printStackTrace();\n // return null;\n //}\n\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\t\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\t\n\t}", "public void updateDocument(Document arg0) throws ContestManagementException {\r\n }", "protected void assembleDocument() {\n\n // Create the missive\n this.createMissive();\n }", "public void setupBaseConvenienceObjects(MaintenanceDocument document);", "protected void changeContent() {\n byte[] data = Arrays.copyOf(content.getContent(),\n content.getContent().length + 1);\n data[content.getContent().length] = '2'; // append one byte\n content.setContent(data);\n LOG.info(\"document content changed\");\n }", "@Override\n\t\t\t\tpublic void endDocument() throws SAXException {\n\t\t\t\t\tsuper.endDocument();\n\t\t\t\t}", "private static interface DefDocumentProcessor\n\t{\n\t\t/**\n\t\t * Called for every element found during processing of the s.t.\n\t\t * path.\n\t\t * @param documentPath an abstract pathname of the document\n\t\t * @throws XMLFormatException if document appears to be corrupted\n\t\t */\n\t\tvoid processElement(File documentPath) \n\t\t\tthrows XMLFormatException;\n\t}", "public void newDocument();", "public abstract WalkerDocument newDocument(DocumentTag adapter, IOptions options);", "private static synchronized void changeXML(Path filepath, File conf, String name){\n try {\n // Строим объектную модель исходного XML файла\n DocumentBuilder db = DocumentBuilderFactory.newInstance()\n .newDocumentBuilder();\n Document doc = db.parse(conf);\n doc.normalize();\n \n NodeList appenders = doc.getElementsByTagName(\"appender\");\n for (int i = 0; i < appenders.getLength(); i++) {\n Node appender = appenders.item(i);\n //if this node is suitable appender, then change TextContext 'file'\n if (isMyRollingFileAppender(appender, name)) {\n NodeList childNodes = appender.getChildNodes();\n for (int j = 0; j < childNodes.getLength(); j++) {\n Node nextChild = childNodes.item(j);\n if (nextChild.getNodeName().equals(\"file\")) {\n nextChild.setTextContent(filepath.toString());\n break;\n }\n }\n break;\n }\n }\n // Write changes to XML-file\n Transformer transformer = TransformerFactory.newInstance()\n .newTransformer();\n DOMSource source = new DOMSource(doc);\n StreamResult result = new StreamResult(conf);\n transformer.transform(source, result);\n \n } catch (SAXException | IOException | ParserConfigurationException\n | TransformerConfigurationException ex) {\n System.out.println(\"Ошибка ввода-вывода при изменении XML-файла: \"+ex.getMessage());\n } catch (TransformerException ex) {\n System.out.println(\"Ошибка в траносформации XML \"+ex.getMessage());\n }\n }", "private static void replaceDocument(final StyledDocument doc, BaseBean graph) {\n final StringWriter out = new StringWriter();\n try {\n graph.write(out);\n } catch (Schema2BeansException | IOException ex) {\n Logger.getLogger(TomcatModuleConfiguration.class.getName()).log(Level.INFO, null, ex);\n }\n NbDocument.runAtomic(doc, () -> {\n try {\n doc.remove(0, doc.getLength());\n doc.insertString(0, out.toString(), null);\n } catch (BadLocationException ble) {\n Exceptions.printStackTrace(ble);\n }\n });\n }", "@Test\n\t@Override\n\tpublic void testUpdateObjectOKXml() throws Exception {\n\t}", "public void buildDocument() {\n/* 310 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 312 */ syncAccessMethods();\n/* */ }", "private void updateSuperDefinitions(Environment result, Environment ext,\n \t\t\tMap<String, IClassDefinition> cReplacementMap) {\n \t\tfor(IClassDefinition cdef : ext.getClasses())\n \t\t{\n \t\t\tIClassDefinition superDef = cdef.getSuperDef();\n \t\t\tif (superDef != null){\n \n \t\t\t\t// Update super to be newly generated production if necessary\n \t\t\t\tIClassDefinition replacementSuperDef = cReplacementMap.get(superDef.getName().getName());\n \t\t\t\tif (replacementSuperDef != null)\n \t\t\t\t\tcdef.setSuper(replacementSuperDef);\n \n \t\t\t\t// Update super to the result-ast if necessary\n \t\t\t\tif (superDef == ext.node)\n \t\t\t\t\tcdef.setSuper(result.node);\n \n \t\t\t\t// RWL: Hmm, node is not an interface and should not be present in supers, right?\n \t\t\t\tif (cdef.getSuperDefs().contains(base.node) || cdef.getSuperDefs().contains(ext.node))\n \t\t\t\t{\n \t\t\t\t\tcdef.getSuperDefs().remove(base.node);\n \t\t\t\t\tcdef.getSuperDefs().remove(ext.node);\n \t\t\t\t\tcdef.getSuperDefs().add(result.node);\n \t\t\t\t}\n\t\t\t\t\n \t\t\t\tif (cdef.getSuperDefs().contains(base.iNode) || cdef.getSuperDefs().contains(ext.iNode))\n \t\t\t\t{\n \t\t\t\t\tcdef.getSuperDefs().remove(base.iNode);\n \t\t\t\t\tcdef.getSuperDefs().remove(ext.iNode);\n \t\t\t\t\tcdef.getSuperDefs().add(result.iNode);\n \t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n \n\t\tfor (IInterfaceDefinition idef : ext.getInterfaces())\n\t\t{\n\t\t\tif (idef.getSuperDefs().contains(base.iNode) || idef.getSuperDefs().contains(ext.iNode))\n\t\t\t{\n\t\t\t\tidef.getSuperDefs().remove(base.iNode);\n\t\t\t\tidef.getSuperDefs().remove(ext.iNode);\n\t\t\t\tidef.getSuperDefs().add(result.iNode);\n \t\t\t}\n\t\t\t\n \t\t}\n \n \t}", "public void startDocument()\n throws SAXException {\n newContent = new StringBuffer();\n // TODO: what is the proper way to set this?\n newContent.append(\"<?xml version=\\\"1.0\\\"?>\");\n }", "public XWPFDocument startConversion() {\n\n convertParagraphs(docx);\n convertFooter(docx);\n convertHeader(docx);\n convertTables(docx);\n updateStylesToNewFont();\n\n\n return docx;\n }", "private void unpackGeneralXmlMarkup(Document doc, RepositioningInfo repInfo,\n RepositioningInfo ampCodingInfo, StatusListener statusListener)\n throws DocumentFormatException {\n boolean docHasContentButNoValidURL = hasContentButNoValidUrl(doc);\n\n XmlDocumentHandler xmlDocHandler = null;\n try {\n\n // Create a new Xml document handler\n xmlDocHandler =\n new XmlDocumentHandler(doc, this.markupElementsMap,\n this.element2StringMap);\n\n // Register a status listener with it\n xmlDocHandler.addStatusListener(statusListener);\n\n // set repositioning object\n xmlDocHandler.setRepositioningInfo(repInfo);\n\n // set the object with ampersand coding positions\n xmlDocHandler.setAmpCodingInfo(ampCodingInfo);\n\n // create the parser\n SAXDocumentParser newxmlParser = new SAXDocumentParser();\n\n // Set up the factory to create the appropriate type of parser\n // Fast Infoset doesn't support validating which is good as we would want\n // it off any way, but we do want it to be namesapace aware\n newxmlParser.setFeature(\"http://xml.org/sax/features/namespaces\", true);\n newxmlParser.setFeature(\"http://xml.org/sax/features/namespace-prefixes\",\n true);\n newxmlParser.setContentHandler(xmlDocHandler);\n newxmlParser.setErrorHandler(xmlDocHandler);\n newxmlParser.setDTDHandler(xmlDocHandler);\n newxmlParser.setEntityResolver(xmlDocHandler);\n\n // Parse the XML Document with the appropriate encoding\n Reader docReader = null;\n try {\n InputSource is;\n if(docHasContentButNoValidURL) {\n // no URL, so parse from string\n is = new InputSource(new StringReader(doc.getContent().toString()));\n } else if(doc instanceof TextualDocument) {\n // textual document - load with user specified encoding\n String docEncoding = ((TextualDocument)doc).getEncoding();\n // don't strip BOM on XML.\n docReader =\n new InputStreamReader(doc.getSourceUrl().openStream(),\n docEncoding);\n is = new InputSource(docReader);\n // must set system ID to allow relative URLs (e.g. to a DTD) to\n // work\n is.setSystemId(doc.getSourceUrl().toString());\n } else {\n // let the parser decide the encoding\n is = new InputSource(doc.getSourceUrl().toString());\n }\n newxmlParser.parse(is);\n } finally {\n // make sure the open streams are closed\n if(docReader != null) docReader.close();\n }\n\n ((DocumentImpl)doc).setNextAnnotationId(xmlDocHandler\n .getCustomObjectsId());\n } catch(SAXException e) {\n doc.getFeatures().put(\"parsingError\", Boolean.TRUE);\n\n Boolean bThrow =\n (Boolean)doc.getFeatures().get(\n GateConstants.THROWEX_FORMAT_PROPERTY_NAME);\n\n if(bThrow != null && bThrow.booleanValue()) {\n throw new DocumentFormatException(e);\n } else {\n Out.println(\"Warning: Document remains unparsed. \\n\"\n + \"\\n Stack Dump: \");\n e.printStackTrace(Out.getPrintWriter());\n }\n\n } catch(IOException e) {\n throw new DocumentFormatException(\"I/O exception for \"\n + doc.getSourceUrl(), e);\n } finally {\n if(xmlDocHandler != null)\n xmlDocHandler.removeStatusListener(statusListener);\n }\n }", "public void buildDocument() {\n/* 248 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 250 */ syncAccessMethods();\n/* */ }", "@Override\n\t\t\t\tpublic void changedUpdate(final DocumentEvent e) {\n\t\t\t\t}", "public void saveChanges() throws TransformerException {\n\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\r\n\t\tTransformer transformer = transformerFactory.newTransformer();\r\n\t\tDOMSource source = new DOMSource(document);\r\n\t\tStreamResult result = new StreamResult(new File(path));\r\n\t\ttransformer.transform(source, result);\r\n\t}", "@Override\r\n public void startDocument() throws SAXException {\n }", "public void startDocument() throws SAXException {\n \n }", "protected ArrayList extractOperationNodes(Document extendDocument) {\r\n\r\n ArrayList extendNodes = new ArrayList();\r\n\r\n Node rootExtendsNode = extendDocument.getFirstChild();\r\n if (rootExtendsNode != null) {\r\n // Get childs of root extend node\r\n NodeList nodes = rootExtendsNode.getChildNodes();\r\n int lenght = nodes.getLength();\r\n for (int i = 0; i < lenght; i++) {\r\n Node node = nodes.item(i);\r\n if (this.isExtendedNode(node)) {\r\n // logger.debug(node.getNodeName());\r\n extendNodes.add(node);\r\n }\r\n }\r\n }\r\n\r\n return extendNodes;\r\n }", "public void changeXMLFile() throws IOException {\n File orig = new File(RunnerClass.homedir + \"launch4j.xml\");\n File custom = new File(RunnerClass.homedir + \"launch4j2.xml\");\n BufferedReader br = new BufferedReader(new FileReader(orig));\n PrintWriter pw = new PrintWriter(new FileWriter(custom));\n int line = 0;\n String s;\n //Reads all lines, and replaces 5th line with new destination file\n while ((s = br.readLine()) != null) {\n line++;\n if (line == 5)\n pw.println(\" <outfile>\" + exeF.getCanonicalPath() + \"</outfile>\");\n else if(line == 18)\n pw.println(\" <minVersion>\"+ getFullVersion(RunnerClass.mf.generalOptionalPanel.javaVersion.getText().trim()) +\"</minVersion>\");\n else\n pw.println(s);\n }\n br.close();\n pw.close();\n //Deletes original file, renames temp to original\n RunnerClass.logger.info(\"del: \" + orig.delete());\n RunnerClass.logger.info(\"ren: \" + custom.renameTo(orig));\n }", "public ExtendedDocumentEvent(ITextDocument doc, int offset, int length, String text, String replacedText) {\r\n\t\tsuper(doc,offset,length,text);\r\n\t\tthis.replacedText = replacedText;\r\n\t}", "public void fileReverted(OpenDefinitionsDocument doc) { }", "public void fileReverted(OpenDefinitionsDocument doc) { }", "public void initializeXMLElements(TOSCAPlan newBuildPlan) {\n\t\tnewBuildPlan.setBpelDocument(this.documentBuilder.newDocument());\n\n\t\t// initialize processElement and append to document\n\t\tnewBuildPlan.setBpelProcessElement(\n\t\t\t\tnewBuildPlan.getBpelDocument().createElementNS(TOSCAPlan.bpelNamespace, \"process\"));\n\t\tnewBuildPlan.getBpelDocument().appendChild(newBuildPlan.getBpelProcessElement());\n\n\t\t// FIXME declare xml schema namespace\n\t\tnewBuildPlan.getBpelProcessElement().setAttributeNS(\"http://www.w3.org/2000/xmlns/\", \"xmlns:xsd\",\n\t\t\t\t\"http://www.w3.org/2001/XMLSchema\");\n\n\t\t// init import files list\n\t\tnewBuildPlan.setImportedFiles(new ArrayList<File>());\n\n\t\t// initialize and append extensions element to process\n\t\tnewBuildPlan.setBpelExtensionsElement(\n\t\t\t\tnewBuildPlan.getBpelDocument().createElementNS(TOSCAPlan.bpelNamespace, \"extensions\"));\n\t\tnewBuildPlan.getBpelProcessElement().appendChild(newBuildPlan.getBpelExtensionsElement());\n\n\t\t// init and append imports element\n\t\tnewBuildPlan.setBpelImportElements(new ArrayList<Element>());\n\n\t\t// TODO this is here to not to forget that the imports elements aren't\n\t\t// attached, cause there are none and import elements aren't nested in a\n\t\t// list element\n\t\t//\n\t\t// this.bpelImportsElement = this.bpelProcessDocument.createElementNS(\n\t\t// BuildPlan.bpelNamespace, \"imports\");\n\t\t// this.bpelProcessElement.appendChild(bpelImportsElement);\n\n\t\t// init and append partnerlink element\n\t\tnewBuildPlan.setBpelPartnerLinksElement(\n\t\t\t\tnewBuildPlan.getBpelDocument().createElementNS(TOSCAPlan.bpelNamespace, \"partnerLinks\"));\n\t\tnewBuildPlan.getBpelProcessElement().appendChild(newBuildPlan.getBpelPartnerLinksElement());\n\n\t\t// initialize and append variables element\n\t\tnewBuildPlan.setBpelProcessVariablesElement(\n\t\t\t\tnewBuildPlan.getBpelDocument().createElementNS(TOSCAPlan.bpelNamespace, \"variables\"));\n\t\tnewBuildPlan.getBpelProcessElement().appendChild(newBuildPlan.getBpelProcessVariablesElement());\n\n\t\t// init and append main sequence to process element\n\t\tnewBuildPlan.setBpelMainSequenceElement(\n\t\t\t\tnewBuildPlan.getBpelDocument().createElementNS(TOSCAPlan.bpelNamespace, \"sequence\"));\n\t\tnewBuildPlan.getBpelProcessElement().appendChild(newBuildPlan.getBpelMainSequenceElement());\n\n\t\t// init and append main sequence receive element to main sequence\n\t\t// element\n\t\tnewBuildPlan.setBpelMainSequenceReceiveElement(\n\t\t\t\tnewBuildPlan.getBpelDocument().createElementNS(TOSCAPlan.bpelNamespace, \"receive\"));\n\t\tnewBuildPlan.getBpelMainSequenceElement().appendChild(newBuildPlan.getBpelMainSequenceReceiveElement());\n\n\t\t// init and append main sequence property assign element to main\n\t\t// sequence element\n\t\tnewBuildPlan.setBpelMainSequencePropertyAssignElement(\n\t\t\t\tnewBuildPlan.getBpelDocument().createElementNS(TOSCAPlan.bpelNamespace, \"assign\"));\n\t\tnewBuildPlan.getBpelMainSequenceElement().appendChild(newBuildPlan.getBpelMainSequencePropertyAssignElement());\n\n\t\t// init and append main sequence flow element to main sequence element\n\t\tnewBuildPlan.setBpelMainFlowElement(\n\t\t\t\tnewBuildPlan.getBpelDocument().createElementNS(TOSCAPlan.bpelNamespace, \"flow\"));\n\t\tnewBuildPlan.getBpelMainSequenceElement().appendChild(newBuildPlan.getBpelMainFlowElement());\n\n\t\t// init and append flow links element\n\t\tnewBuildPlan.setBpelMainFlowLinksElement(\n\t\t\t\tnewBuildPlan.getBpelDocument().createElementNS(TOSCAPlan.bpelNamespace, \"links\"));\n\t\tnewBuildPlan.getBpelMainFlowElement().appendChild(newBuildPlan.getBpelMainFlowLinksElement());\n\n\t\t// init and append output assign element\n\t\tnewBuildPlan.setBpelMainSequenceOutputAssignElement(\n\t\t\t\tnewBuildPlan.getBpelDocument().createElementNS(TOSCAPlan.bpelNamespace, \"assign\"));\n\t\tnewBuildPlan.getBpelMainSequenceElement().appendChild(newBuildPlan.getBpelMainSequenceOutputAssignElement());\n\n\t\t// init and append main sequence callback invoke element to main\n\t\t// sequence element\n\t\tnewBuildPlan.setBpelMainSequenceCallbackInvokeElement(\n\t\t\t\tnewBuildPlan.getBpelDocument().createElementNS(TOSCAPlan.bpelNamespace, \"invoke\"));\n\t\tnewBuildPlan.getBpelMainSequenceElement().appendChild(newBuildPlan.getBpelMainSequenceCallbackInvokeElement());\n\t}", "@Override\n public void startDocument() throws SAXException {\n }", "public void testRemoveWriteEnableTagsWithDocumentInMemory() {\n String fileName = \"read_only_with_write_parts_removed_as_byte.docx\";\n String fileInput = inputDirectory + \"read_only_with_write_parts.docx\";\n String expectedResult = expectedDirectory + \"read_only_with_write_parts_removed.docx\";\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.removeWriteEnabledTags();\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n assertTrue(docxSource1.save(outputStream));\n byte fileAsByte[] = outputStream.toByteArray();\n FileOutputStream file = new FileOutputStream(new File(outputDirectory + fileName));\n file.write(fileAsByte);\n file.close();\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(\"failed\" + e.getMessage());\n }\n }", "private void write(){\n\t\ttry {\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\t\n\t\t\tString pathSub = ManipXML.class.getResource(path).toString();\n\t\t\tpathSub = pathSub.substring(5, pathSub.length());\n\t\t\tStreamResult result = new StreamResult(pathSub);\n\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t} catch (TransformerConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void exec() throws IOException, XMLStreamException {\n\n\t\tdoc_set = new HashSet<String>();\n\n\t\t// XML event reader of source XML file\n\n\t\tXMLInputFactory in_factory = XMLInputFactory.newInstance();\n\n\t\tInputStream in = PgSchemaUtil.getSchemaInputStream(sph_data_in_path);\n\n\t\tXMLEventReader reader = in_factory.createXMLEventReader(in);\n\n\t\t// XML event writer of extracted XML file\n\n\t\tXMLOutputFactory out_factory = XMLOutputFactory.newInstance();\n\n\t\t// XML event writer of extracted XML file\n\n\t\tBufferedWriter bout = new BufferedWriter(new OutputStreamWriter(Files.newOutputStream(sph_data_out_path), PgSchemaUtil.def_encoding), PgSchemaUtil.def_buffered_output_stream_buffer_size);\n\n\t\txml_writer = out_factory.createXMLEventWriter(bout);\n\n\t\t// XML event writer for interim XML content before xml_writer is prepared\n\n\t\tinterim_events = new ArrayList<XMLEvent>();\n\n\t\tXMLEvent event;\n\t\tEventHandler handler;\n\n\t\twhile (reader.hasNext()) {\n\n\t\t\tevent = reader.nextEvent();\n\n\t\t\thandler = read_handlers.get(event.getEventType());\n\n\t\t\thandler.handleEvent(event);\n\n\t\t}\n\n\t\tinterim_events.clear();\n\n\t\tbout.close();\n\n\t\treader.close();\n\n\t\tin.close();\n\n\t\tdoc_set.clear();\n\n\t\tread_handlers.clear();\n\n\t}", "protected void extract() {\n\t\tfor (ITSState nodeState : doc.iterNodes()) {\n\t\t\tNode node = nodeState.node;\n\t\t\tRuleResolver resolver = resolvers.get(node.getNodeName()); \n\t\t\tif (resolver != null) {\n\t\t\t\tGlobalRule rule = resolver.extractRule(attrReader, parameters, nodeState.node);\n\t\t\t\tapplyRule(resolver, rule);\n\t\t\t}\n\t\t\t\n\t\t\tif (node.getNodeName().equals(\"its:param\")) {\n\t\t\t\tString name = node.getAttributes().getNamedItem(\"name\").getNodeValue();\n\t\t\t\tString value = node.getTextContent();\n\t\t\t\tparameters.add(name, value);\n\t\t\t} else if (attrReader.dialect.isRules(node)) { \n\t\t\t\t// we have external link (xlink:href or link href)\n\t\t\t\tString external = attrReader.dialect.getExternalRules(node);\n\t\t\t\tif (external != null) {\n\t\t\t\t\textractExternalRules(external);\n\t\t\t\t}\n\t\t\t} else if (node.getNodeName().equals(\"script\")) {\n\t\t\t\t// we have embedded\n\t\t\t\tif (node.hasAttributes()) {\n\t\t\t\t\tif (node.getAttributes().getNamedItem(\"type\").getNodeValue().equals(\"application/its+xml\")) {\n\t\t\t\t\t\textractEmbeddedRules(node.getTextContent());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!nodeState.nodePath.contains(\"its:rules\")) {\n\t\t\t\t// unless we're in rules, look at local annotations\n\t\t\t\t// LOCAL\n\t\t\t\textractLocal(nodeState);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// process inheritance\n\t\tfor (ITSState nodeState : doc.iterNodes()) {\n\t\t\t// Elements: handle inheritance \n\t\t\tITSData parentData = getParentState(nodeState);\n\t\t\tif (parentData != null) {\n\t\t\t\t// inherit from parent\n\t\t\t\tITSData thisData = nodeItsData.get(nodeState.nodePath);\n\t\t\t\tif (thisData == null) {\n\t\t\t\t\tthisData = new ITSData();\n\t\t\t\t\tapplyRuleToNode(nodeState.nodePath, thisData);\n\t\t\t\t} \n\t\t\t\tthisData.inherit(parentData);\t\t\t\t\n\t\t\t}\t\n\t\t\t\t\t\t\n\t\t} \n\t\t\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\t\tchange();\n\t\t\t\t}", "@Override\r\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\r\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tSystem.out.println(\"---解析文档开始----\");\n\t}", "private void updateSuperDefinitions(Environment result, Environment ext,\n\t\t\tMap<String, IClassDefinition> cReplacementMap,\n\t\t\tMap<String, IInterfaceDefinition> iReplacementMap)\n\t{\n\t\tfor (IClassDefinition cdef : ext.getClasses())\n\t\t{\n\t\t\tIClassDefinition superDef = cdef.getSuperDef();\n\t\t\tif (superDef != null)\n\t\t\t{\n\n\t\t\t\t// Update super to be newly generated production if necessary\n\t\t\t\tIClassDefinition replacementSuperDef = cReplacementMap.get(superDef.getName().getName());\n\t\t\t\tif (replacementSuperDef != null)\n\t\t\t\t\tcdef.setSuper(replacementSuperDef);\n\n\t\t\t\t// Update super to the result-ast if necessary\n\t\t\t\tif (superDef == ext.node)\n\t\t\t\t\tcdef.setSuper(result.node);\n\n\t\t\t\t// RWL: Hmm, node is not an interface and should not be present\n\t\t\t\t// in supers, right?\n\t\t\t\tif (cdef.getSuperDefs().contains(base.node)\n\t\t\t\t\t\t|| cdef.getSuperDefs().contains(ext.node))\n\t\t\t\t{\n\t\t\t\t\tcdef.getSuperDefs().remove(base.node);\n\t\t\t\t\tcdef.getSuperDefs().remove(ext.node);\n\t\t\t\t\tcdef.getSuperDefs().add(result.node);\n\t\t\t\t}\n\n\t\t\t\tif (cdef.getSuperDefs().contains(base.iNode)\n\t\t\t\t\t\t|| cdef.getSuperDefs().contains(ext.iNode))\n\t\t\t\t{\n\t\t\t\t\tcdef.getSuperDefs().remove(base.iNode);\n\t\t\t\t\tcdef.getSuperDefs().remove(ext.iNode);\n\t\t\t\t\tcdef.getSuperDefs().add(result.iNode);\n\t\t\t\t}\n\n\t\t\t\t// Replace supers\n\t\t\t\tList<IInterfaceDefinition> tbr = new LinkedList<IInterfaceDefinition>();\n\t\t\t\tList<IInterfaceDefinition> tba = new LinkedList<IInterfaceDefinition>();\n\t\t\t\tfor (IInterfaceDefinition idef : cdef.getSuperDefs())\n\t\t\t\t\tif (cReplacementMap.containsKey(idef.getName().getName()))\n\t\t\t\t\t{\n\t\t\t\t\t\tIClassDefinition newDef = cReplacementMap.get(idef.getName().getName());\n\t\t\t\t\t\ttbr.add(idef);\n\t\t\t\t\t\ttba.add(newDef);\n\t\t\t\t\t}\n\t\t\t\tcdef.getSuperDefs().removeAll(tbr);\n\t\t\t\tcdef.getSuperDefs().addAll(tba);\n\n\t\t\t}\n\n\t\t}\n\n\t\tfor (IInterfaceDefinition idef : ext.getInterfaces())\n\t\t{\n\t\t\tif (idef.getSuperDefs().contains(base.iNode)\n\t\t\t\t\t|| idef.getSuperDefs().contains(ext.iNode))\n\t\t\t{\n\t\t\t\tidef.getSuperDefs().remove(base.iNode);\n\t\t\t\tidef.getSuperDefs().remove(ext.iNode);\n\t\t\t\tidef.getSuperDefs().add(result.iNode);\n\t\t\t}\n\n\t\t\tList<IInterfaceDefinition> tbr = new LinkedList<IInterfaceDefinition>();\n\t\t\tList<IInterfaceDefinition> tba = new LinkedList<IInterfaceDefinition>();\n\t\t\tfor (IInterfaceDefinition sidef : idef.getSuperDefs())\n\t\t\t{\n\t\t\t\tif (iReplacementMap.containsKey(sidef.getName().getName()))\n\t\t\t\t{\n\t\t\t\t\tIInterfaceDefinition replacement = iReplacementMap.get(sidef.getName().getName());\n\t\t\t\t\ttbr.add(sidef);\n\t\t\t\t\ttba.add(replacement);\n\t\t\t\t}\n\t\t\t}\n\t\t\tidef.getSuperDefs().removeAll(tbr);\n\t\t\tidef.getSuperDefs().addAll(tba);\n\t\t}\n\n\t}", "protected abstract Element toXmlEx(Document doc);", "public String modifyIoXml(String xml_og){\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\tDocument doc = null;\r\n\t\tString xml_final;\r\n\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(\"swe\".equals(args)) {\r\n\t\t\t return \"http://www.opengis.net/swe/1.0.1\";\r\n\t\t\t }else if(\"env\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\";\r\n\t\t\t }else if(\"sos\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/sos/2.0\";\r\n\t\t\t }else if(\"ows\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/ows/1.1\";\r\n\t\t\t }else if(\"soap\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\"; \t\r\n\t\t\t }else if(\"om\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/om/2.0\";\r\n\t\t\t }else if(\"xlink\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/1999/xlink\";\r\n\t\t\t }else{\r\n\t\t\t return null;}\r\n\t\t\t }\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n\t\t\t\tString path_loading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\tNodeList nodes = (NodeList)xPath.compile(path_loading).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t\t\t\tString messwert = \"\";\r\n\t\t\t\tfor(int n = 0; n<nodes.getLength(); n++){\r\n\t\t\t\t\tmesswert = nodes.item(n).getTextContent();\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.parseInsertObservation:parser Loading OG: \"+messwert);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(messwert.equals(\"1\")){\r\n\t\t\t\t\t\tnodes.item(n).setTextContent(\"2222\");;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.parseInsertObservation:parser Loading EDITED:\"+nodes.item(n).getTextContent());\r\n\t\t\t\t}\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\r\n\t\txml_final = TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2);\r\n\t\treturn xml_final;\r\n\t}", "public String modifyIoXml(String xml_og){\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\tDocument doc = null;\r\n\t\tString xml_final;\r\n\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(\"swe\".equals(args)) {\r\n\t\t\t return \"http://www.opengis.net/swe/1.0.1\";\r\n\t\t\t }else if(\"env\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\";\r\n\t\t\t }else if(\"sos\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/sos/2.0\";\r\n\t\t\t }else if(\"ows\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/ows/1.1\";\r\n\t\t\t }else if(\"soap\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\"; \t\r\n\t\t\t }else if(\"om\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/om/2.0\";\r\n\t\t\t }else if(\"xlink\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/1999/xlink\";\r\n\t\t\t }else{\r\n\t\t\t return null;}\r\n\t\t\t }\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n\t \t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t \t\r\n\t \t\r\n\t \t//find Loading value\r\n\t\t\t\tString path_loading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\tNodeList nodes = (NodeList)xPath.compile(path_loading).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\r\n\t\t\t\tString messwert = \"\";\r\n\t\t\t\tfor(int n = 0; n<nodes.getLength(); n++){\r\n\t\t\t\t\tmesswert = nodes.item(n).getTextContent();\r\n\t\t\t\t\t//replace original value with new value\r\n\t\t\t\t\tif(messwert.equals(LoadOnStartAppConfiguration.value_from)){\r\n\t\t\t\t\t\tnodes.item(n).setTextContent(LoadOnStartAppConfiguration.value_to);;\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t}\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\r\n\t\txml_final = TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2);\r\n\t\treturn xml_final;\r\n\t}", "private void loadFromDoc(Document data) {\n if (total == null) { total = data; return; }\n\tNodeList tree = data.getDocumentElement().getChildNodes();\n\tfor (int i = 0; i < tree.getLength(); i++) {\n Node totroot = total.getDocumentElement();\n totroot.insertBefore(total.importNode(tree.item(i), true), null);\n }\n }", "public void startDocument() {\n _root = null;\n _target = null;\n _prefixMapping = null;\n _parentStack = new Stack<>();\n }", "public RSyntaxDocument updateDocument() {\r\n \r\n docVar = (RSyntaxDocument) editorPane.getDocument();\r\n syntaxDocument = docVar;\r\n \r\n return syntaxDocument;\r\n }", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\n\t}", "final void updateSpan(){\n setEdited();\n if (this instanceof Document){\n ((Document)this).updateDoc();\n } else {\n getParent().updateParent();\n }\n }", "protected @Override void updateLayout(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a) {\n \n //super.updateLayout(ec, e, a);\n }", "public abstract WalkerDocument newDocument(IOptions options);", "@Override\n\tpublic void posModify() {\n\t\tgetEntityManager().refresh(instance);\n\t\tcambiarTipoCuenta(instance);\n\t\tgetEntityManager().flush();\n\t\tgetEntityManager().refresh(instance);\n\t\tresultList = null;\n\t\trootNode = null;\n\t}", "public void startDocument() throws SAXException {\n\tcurGroupId = \"\";\n\tcurGeneSet.clear();\n\tmHgEntryIdHandler.reset();\n\tsuper.startDocument();\n }", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\t}", "public void prepareForRun(OpenDefinitionsDocument doc) { }", "Document toXml() throws ParserConfigurationException, TransformerException, IOException;", "public static native Element overwrite(Element oldElem, Element newElem)/*-{\r\n\t\treturn $wnd.Ext.DomHelper.overwrite(oldElem, newElem);\r\n\t}-*/;" ]
[ "0.60807246", "0.5806678", "0.5721297", "0.56783766", "0.55960155", "0.5523403", "0.5522375", "0.55119884", "0.5508105", "0.5482522", "0.5474889", "0.5461473", "0.5461473", "0.5461473", "0.5451502", "0.5433711", "0.542213", "0.5397407", "0.5394368", "0.5393752", "0.5393401", "0.5390606", "0.5327512", "0.53237766", "0.5315868", "0.53134096", "0.52891976", "0.52796876", "0.5257301", "0.5252857", "0.5249558", "0.5225292", "0.5217036", "0.5204259", "0.5204038", "0.51982737", "0.5192305", "0.51918113", "0.5183017", "0.5179798", "0.5155974", "0.5152784", "0.5148521", "0.5135075", "0.5133932", "0.5133932", "0.5121749", "0.5121121", "0.51170164", "0.5113344", "0.5108928", "0.50973046", "0.5093822", "0.50919557", "0.50889665", "0.5086934", "0.50762415", "0.5070907", "0.5055697", "0.505459", "0.5047139", "0.5036501", "0.5032576", "0.5027937", "0.5025753", "0.5024377", "0.5022004", "0.5021678", "0.50141186", "0.50137055", "0.50038654", "0.50038654", "0.49896467", "0.49813432", "0.49634615", "0.4962634", "0.49599582", "0.4958303", "0.49570596", "0.49426994", "0.49420676", "0.4939402", "0.49377012", "0.49370033", "0.49370033", "0.49275535", "0.49203396", "0.49096274", "0.4908709", "0.49061936", "0.48987633", "0.48966238", "0.4894254", "0.48927104", "0.48917958", "0.48917958", "0.48917958", "0.4889035", "0.4877299", "0.4877144" ]
0.6516983
0
This method processes a node that contains an operation and returns an instance of class XmlExtendsOperation with necessary information to apply this operation in original xml document
protected ExtendedXmlOperation getNodeOperation(Node node) throws Exception { NamedNodeMap mapAtributes = node.getAttributes(); Node attrNode = mapAtributes.getNamedItem(ExtendedXmlParser.ATTR_ATRIBUTE); Node containerNode = mapAtributes.getNamedItem(ExtendedXmlParser.CONTAINER_ATRIBUTE); Node levelsNode = mapAtributes.getNamedItem(ExtendedXmlParser.LEVELS_ATRIBUTE); String containerValue = ""; int levelsValue = 0; String attrValue = ""; if ((attrNode == null) && !this.checkNodeWithoutAttributes(node)) { throw new Exception("Missing " + ExtendedXmlParser.ATTR_ATRIBUTE + " in " + node.getNodeName()); } if ((levelsNode != null) && !levelsNode.getNodeValue().equals("0")) { if (containerNode == null) { throw new Exception("Missing " + ExtendedXmlParser.CONTAINER_ATRIBUTE + " in " + node.getNodeName()); } containerValue = containerNode.getNodeValue(); levelsValue = Integer.parseInt(levelsNode.getNodeValue()); } if (!this.checkNodeWithoutAttributes(node)) { attrValue = attrNode.getNodeValue(); } NodeList containedCode = node.getChildNodes(); if (containedCode.getLength() < 0) { throw new Exception("Empty xml code in " + node.getNodeName()); } ExtendedXmlOperation operation = new ExtendedXmlOperation(node.getNodeName(), attrValue, containerValue, levelsValue, containedCode); return operation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected ArrayList extractOperationNodes(Document extendDocument) {\r\n\r\n ArrayList extendNodes = new ArrayList();\r\n\r\n Node rootExtendsNode = extendDocument.getFirstChild();\r\n if (rootExtendsNode != null) {\r\n // Get childs of root extend node\r\n NodeList nodes = rootExtendsNode.getChildNodes();\r\n int lenght = nodes.getLength();\r\n for (int i = 0; i < lenght; i++) {\r\n Node node = nodes.item(i);\r\n if (this.isExtendedNode(node)) {\r\n // logger.debug(node.getNodeName());\r\n extendNodes.add(node);\r\n }\r\n }\r\n }\r\n\r\n return extendNodes;\r\n }", "protected Document parse(Document originalForm, Document extendDocument) throws Exception {\r\n\r\n ArrayList operationNodes = this.extractOperationNodes(extendDocument);\r\n for (int i = 0; i < operationNodes.size(); i++) {\r\n Node operationNode = (Node) operationNodes.get(i);\r\n if (operationNode != null) {\r\n try {\r\n ExtendedXmlOperation operation = this.getNodeOperation(operationNode);\r\n this.executeOperation(originalForm, operation);\r\n } catch (Exception e) {\r\n ExtendedXmlParser.logger.error(null, e);\r\n throw e;\r\n }\r\n }\r\n }\r\n return originalForm;\r\n }", "Operation getOperation();", "public Operation getOperation();", "private static void appendOperation_1_0( Element root, Operation_1_0 operation ) {\n LOG.entering();\n Element op = XMLTools.appendElement( root, OWS, POWS + \"Operation\" );\n\n op.setAttribute( \"Name\", operation.getName() );\n\n DCPType[] dcps = operation.getDCPs();\n for ( DCPType dcp : dcps )\n appendDCP( op, dcp );\n\n OWSDomainType[] parameters = operation.getParameters();\n for ( OWSDomainType parameter : parameters )\n appendParameter( op, parameter, \"Parameter\" );\n\n OWSDomainType[] constraints = operation.getConstraints();\n for ( OWSDomainType constraint : constraints )\n appendParameter( op, constraint, \"Constraint\" );\n\n Object[] metadatas = operation.getMetadata();\n for ( Object metadata : metadatas )\n appendMetadata( op, metadata );\n LOG.exiting();\n }", "Operation createOperation();", "Operation createOperation();", "public static OperationContext parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n OperationContext object =\n new OperationContext();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"OperationContext\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (OperationContext)org.apache.axis2.transaction.xsd.ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n java.util.ArrayList list6 = new java.util.ArrayList();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"axisOperation\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setAxisOperation(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setAxisOperation(org.apache.axis2.description.xsd.AxisOperation.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"complete\").equals(reader.getName())){\n \n java.lang.String content = reader.getElementText();\n \n object.setComplete(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content));\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"configurationContext\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setConfigurationContext(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setConfigurationContext(org.apache.axis2.context.xsd.ConfigurationContext.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"key\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setKey(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"logCorrelationIDString\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setLogCorrelationIDString(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"messageContexts\").equals(reader.getName())){\n \n \n \n // Process the array and step past its final element's end.\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n list6.add(null);\n \n reader.next();\n } else {\n list6.add(reader.getElementText());\n }\n //loop until we find a start element that is not part of this array\n boolean loopDone6 = false;\n while(!loopDone6){\n // Ensure we are at the EndElement\n while (!reader.isEndElement()){\n reader.next();\n }\n // Step out of this element\n reader.next();\n // Step to next element event.\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n if (reader.isEndElement()){\n //two continuous end elements means we are exiting the xml structure\n loopDone6 = true;\n } else {\n if (new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"messageContexts\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n list6.add(null);\n \n reader.next();\n } else {\n list6.add(reader.getElementText());\n }\n }else{\n loopDone6 = true;\n }\n }\n }\n // call the converter utility to convert and set the array\n \n object.setMessageContexts((java.lang.String[])\n list6.toArray(new java.lang.String[list6.size()]));\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"operationName\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setOperationName(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"rootContext\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setRootContext(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setRootContext(org.apache.axis2.context.xsd.ConfigurationContext.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"serviceContext\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setServiceContext(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setServiceContext(org.apache.axis2.context.xsd.ServiceContext.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"serviceGroupName\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setServiceGroupName(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"serviceName\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setServiceName(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "private interface OperationOverNodes {\n\t\tvoid operate(Node node);\n\t}", "@Override\n\tpublic Operation createOperate() {\n\t\treturn new OperationDiv();\n\t}", "OperationNode getNode();", "private ExtendedOperations(){}", "@Override\n public SchemaElement cloneSchemaElement()\n {\n return new APIOperation(this);\n }", "public Operation getOperation() {\n return operation;\n }", "public org.xmlsoap.schemas.wsdl.http.OperationType addNewOperation()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.http.OperationType target = null;\n target = (org.xmlsoap.schemas.wsdl.http.OperationType)get_store().add_element_user(OPERATION$0);\n return target;\n }\n }", "public EAdOperation getOperation() {\r\n\t\treturn operation;\r\n\t}", "private void operateOverSubnodes(Node node, OperationOverNodes operation) {\n\t\tif (node != null) {\n\t\t\toperation.operate(node);\n\t\t\tNode next = node.getSubnode();\n\t\t\twhile (next != null) {\n\t\t\t\toperateOverSubnodes(next, operation);\n\t\t\t\tnext = next.getNext();\n\t\t\t}\n\t\t}\n\t}", "public Operation getOperation() {\n return this.operation;\n }", "Operations createOperations();", "@Override\n\tpublic String operation() {\n\t\treturn adaptee.specificOperation();\n\t}", "Operator.Type getOperation();", "@Override\n public NodeType ExecuteOperation()\n {\n //if the first child is an operator\n if(this.childNodes[0].isOperator==true)\n {\n BasicOperator basicOperator=(BasicOperator)this.childNodes[0]; \n if(basicOperator.operands==1)\n {\n UnaryOperator unaryOperator=(UnaryOperator)childNodes[0];\n return unaryOperator.PerformOperation(childNodes[1]);\n }\n else if(basicOperator.operands==2)\n {\n BinaryOperator binaryOperator=(BinaryOperator)childNodes[0];\n return binaryOperator.PerformOperation(childNodes[1], childNodes[2]);\n }\n else if(basicOperator.operands==3)\n {\n TernaryOperator ternaryOperator=(TernaryOperator)childNodes[0];\n return ternaryOperator.PerformOperation(childNodes[1], childNodes[2], childNodes[3]);\n }\n }\n //if not an operator\n else\n {\n return this.childNodes[0].ExecuteOperation();\n }\n return null;\n }", "public void applyToAncestors( Operation operation ) {\n PlanNode ancestor = getParent();\n while (ancestor != null) {\n operation.apply(ancestor);\n ancestor = ancestor.getParent();\n }\n }", "public OperationType getOperation() {\r\n return operation;\r\n }", "public OperationType getOperation() {\r\n return operation;\r\n }", "public IMutateExprTree getBaseOp() \r\n\t{\r\n\t\treturn baseOp;\r\n\t}", "public OperationResultInfoBase operation() {\n return this.operation;\n }", "public String getOperation() {return operation;}", "public final EObject ruleEOperations() throws RecognitionException {\n EObject current = null;\n\n EObject lv_operations_1_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:5483:2: ( ( () ( (lv_operations_1_0= ruleEOperationDefinition ) )* ) )\n // InternalRMParser.g:5484:2: ( () ( (lv_operations_1_0= ruleEOperationDefinition ) )* )\n {\n // InternalRMParser.g:5484:2: ( () ( (lv_operations_1_0= ruleEOperationDefinition ) )* )\n // InternalRMParser.g:5485:3: () ( (lv_operations_1_0= ruleEOperationDefinition ) )*\n {\n // InternalRMParser.g:5485:3: ()\n // InternalRMParser.g:5486:4: \n {\n\n \t\t\t\tcurrent = forceCreateModelElement(\n \t\t\t\t\tgrammarAccess.getEOperationsAccess().getEOperationsAction_0(),\n \t\t\t\t\tcurrent);\n \t\t\t\n\n }\n\n // InternalRMParser.g:5492:3: ( (lv_operations_1_0= ruleEOperationDefinition ) )*\n loop39:\n do {\n int alt39=2;\n int LA39_0 = input.LA(1);\n\n if ( (LA39_0==RULE_ID) ) {\n alt39=1;\n }\n\n\n switch (alt39) {\n \tcase 1 :\n \t // InternalRMParser.g:5493:4: (lv_operations_1_0= ruleEOperationDefinition )\n \t {\n \t // InternalRMParser.g:5493:4: (lv_operations_1_0= ruleEOperationDefinition )\n \t // InternalRMParser.g:5494:5: lv_operations_1_0= ruleEOperationDefinition\n \t {\n\n \t \t\t\t\t\tnewCompositeNode(grammarAccess.getEOperationsAccess().getOperationsEOperationDefinitionParserRuleCall_1_0());\n \t \t\t\t\t\n \t pushFollow(FOLLOW_43);\n \t lv_operations_1_0=ruleEOperationDefinition();\n\n \t state._fsp--;\n\n\n \t \t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getEOperationsRule());\n \t \t\t\t\t\t}\n \t \t\t\t\t\tadd(\n \t \t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\"operations\",\n \t \t\t\t\t\t\tlv_operations_1_0,\n \t \t\t\t\t\t\t\"org.sodalite.dsl.RM.EOperationDefinition\");\n \t \t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop39;\n }\n } while (true);\n\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public String getOperation();", "public Node extend() {\n return node;\n }", "protected boolean isExtendedNode(Node node) {\r\n\r\n String nodeName = node.getNodeName();\r\n\r\n if (nodeName.equalsIgnoreCase(ExtendedXmlParser.INSERT_AFTER_OP)\r\n || nodeName.equalsIgnoreCase(ExtendedXmlParser.INSERT_BEFORE_OP)\r\n || nodeName.equalsIgnoreCase(ExtendedXmlParser.REMOVE_OP)\r\n || nodeName.equalsIgnoreCase(ExtendedXmlParser.REPLACE_OP)\r\n || nodeName.equalsIgnoreCase(ExtendedXmlParser.MODIFY_FORM)\r\n || nodeName.equalsIgnoreCase(ExtendedXmlParser.MODIFY_ATTRIBUTE)\r\n || nodeName.equalsIgnoreCase(ExtendedXmlParser.ADD_REMOTE_REFERENCE)\r\n || nodeName.equalsIgnoreCase(ExtendedXmlParser.REMOVE_REMOTE_REFERENCE)\r\n || nodeName.equalsIgnoreCase(ExtendedXmlParser.MODIFY_REMOTE_REFERENCE)) {\r\n return true;\r\n }\r\n return false;\r\n }", "private Operation110 getOperation110( String name, boolean isMandatory, Map<String, Element> operations,\n OnlineResource defaultOnlineResource )\n throws XMLParsingException,\n InvalidCapabilitiesException {\n\n Operation110 operation = null;\n Element operationElement = operations.get( name );\n if ( operationElement == null ) {\n if ( isMandatory ) {\n throw new XMLParsingException( \"Mandatory operation '\" + name\n + \"' not defined in \"\n + \"'OperationsMetadata'-section.\" );\n }\n } else {\n // 'ows:DCP' - elements\n DCPType[] dcps = getDCPs( XMLTools.getRequiredElements( operationElement, PRE_OWS + \"DCP\", nsContext ) );\n //fill in the default online resource if one is missing.\n if ( defaultOnlineResource != null ) {\n for ( DCPType dcp : dcps ) {\n Protocol pr = dcp.getProtocol();\n if ( pr != null ) {\n if ( pr instanceof HTTP ) {\n if ( ( (HTTP) pr ).getGetOnlineResources() == null || ( (HTTP) pr ).getGetOnlineResources().length == 0 ) {\n ( (HTTP) pr ).setGetOnlineResources( new URL[] { defaultOnlineResource.getLinkage()\n .getHref() } );\n }\n if ( ( (HTTP) pr ).getPostOnlineResources() == null || ( (HTTP) pr ).getPostOnlineResources().length == 0 ) {\n ( (HTTP) pr ).setPostOnlineResources( new URL[] { defaultOnlineResource.getLinkage()\n .getHref() } );\n }\n }\n }\n }\n }\n\n // 'Parameter' - elements\n List<Node> parameterList = XMLTools.getNodes( operationElement, PRE_OWS + \"Parameter\", nsContext );\n OWSDomainType110[] parameters = new OWSDomainType110[parameterList.size()];\n for ( int i = 0; i < parameters.length; i++ ) {\n parameters[i] = getOWSDomainType110( (Element) parameterList.get( i ) );\n }\n // 'Constraint' - elements\n List<Node> constraintList = XMLTools.getNodes( operationElement, PRE_OWS + \"Constraint\", nsContext );\n OWSDomainType110[] constraints = new OWSDomainType110[constraintList.size()];\n for ( int i = 0; i < constraintList.size(); i++ ) {\n constraints[i] = getOWSDomainType110( (Element) constraintList.get( i ) );\n }\n // 'ows:Metadata' - element\n List<Node> metadataList = XMLTools.getNodes( operationElement, PRE_OWS + \"Metadata\", nsContext );\n OWSMetadata[] metadata = new OWSMetadata[metadataList.size()];\n for ( int i = 0; i < metadata.length; i++ ) {\n metadata[i] = getOWSMetadata( operationElement, PRE_OWS + \"Metadata\", nsContext );\n }\n\n // return new Operation110 object\n operation = new Operation110( name, dcps, parameters, constraints, metadata );\n }\n\n return operation;\n }", "public SegmentaoOperacao getOperation() {\r\n\t\treturn operation;\r\n\t}", "public String getOperation() {\n return this.operation;\n }", "public Operation operation() {\n return Operation.fromSwig(alert.getOp());\n }", "OperationCallExp createOperationCallExp();", "String getOperation();", "String getOperation();", "protected Container2OperationEvaluator(Container2Operation op) {\r\n this.op = op;\r\n }", "@Override\n @NotNull\n public ConverterType getOperation() {\n return this.operation.getConverter();\n }", "public OperationResultInfoBaseResourceInner withOperation(OperationResultInfoBase operation) {\n this.operation = operation;\n return this;\n }", "public List<OperationImplementation> getOperations() {\n List<?> operationsUnknown = (List<?>) properties.get(XPATH_OPERATIONS);\n List<OperationImplementation> operations = new ArrayList<OperationImplementation>();\n if (operationsUnknown != null) {\n \t for (Object operationUnknown : operationsUnknown) {\n \t Map<?, ?> operationMap = (Map<?, ?>) operationUnknown;\n \t operations.add(new OperationImplementation(\n \t (String) operationMap.get(OPERATION_NAME),\n \t (String) operationMap.get(OPERATION_PARAMETERS),\n \t (String) operationMap.get(OPERATION_DOCUMENTATION)));\n \t }\n }\n return operations;\n }", "public String getOperation() {\r\n\t\treturn operation;\r\n\t}", "public org.apache.axis2.description.xsd.AxisOperation getAxisOperation(){\n return localAxisOperation;\n }", "@objid (\"5d1e9f76-f0d9-4b67-a34e-4ac268bb9498\")\n Operation getOBase();", "public String getOperation() {\n return operation;\n }", "public String getOperation() {\n return operation;\n }", "public String getOperation() {\n\t\treturn operation;\n\t}", "private Element createBaseTemporalNode(Node relOpNode, XmlProcessor hqmfXmlProcessor) {\n\n\t\tNamedNodeMap attribMap = relOpNode.getAttributes();\n\t\tElement temporallyRelatedInfoNode = hqmfXmlProcessor.getOriginalDoc()\n\t\t\t\t.createElement(\"temporallyRelatedInformation\");\n\t\ttemporallyRelatedInfoNode.setAttribute(TYPE_CODE, attribMap.getNamedItem(TYPE).getNodeValue().toUpperCase());\n\n\t\tElement temporalInfoNode = hqmfXmlProcessor.getOriginalDoc().createElement(\"qdm:temporalInformation\");\n\t\tString precisionUnit = \"min\"; // use min by default\n\n\t\tif (attribMap.getNamedItem(OPERATOR_TYPE) != null) {\n\t\t\tString operatorType = attribMap.getNamedItem(OPERATOR_TYPE).getNodeValue();\n\t\t\tString quantity = attribMap.getNamedItem(QUANTITY).getNodeValue();\n\t\t\tString unit = attribMap.getNamedItem(UNIT).getNodeValue();\n\n\t\t\tif (\"seconds\".equals(unit)) {\n\t\t\t\tprecisionUnit = \"s\";\n\t\t\t\tunit = \"s\";\n\t\t\t} else if (\"hours\".equals(unit)) {\n\t\t\t\tunit = \"h\";\n\t\t\t} else if (\"minutes\".equals(unit)) {\n\t\t\t\tunit = \"min\";\n\t\t\t} else {\n\t\t\t\tprecisionUnit = \"d\";\n\t\t\t\tif (\"days\".equals(unit)) {\n\t\t\t\t\tunit = \"d\";\n\t\t\t\t} else if (\"weeks\".equals(unit)) {\n\t\t\t\t\tunit = \"wk\";\n\t\t\t\t} else if (\"months\".equals(unit)) {\n\t\t\t\t\tunit = \"mo\";\n\t\t\t\t} else if (\"years\".equals(unit)) {\n\t\t\t\t\tunit = \"a\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tElement deltaNode = hqmfXmlProcessor.getOriginalDoc().createElement(\"qdm:delta\");\n\t\t\tElement lowNode = hqmfXmlProcessor.getOriginalDoc().createElement(\"low\");\n\t\t\tlowNode.setAttribute(UNIT, unit);\n\n\t\t\tElement highNode = hqmfXmlProcessor.getOriginalDoc().createElement(\"high\");\n\t\t\thighNode.setAttribute(UNIT, unit);\n\n\t\t\tif (operatorType.startsWith(\"Greater Than\")) {\n\t\t\t\tlowNode.setAttribute(VALUE, quantity);\n\t\t\t\thighNode.removeAttribute(UNIT);\n\t\t\t\thighNode.setAttribute(NULL_FLAVOR, \"PINF\");\n\t\t\t\tif (\"Greater Than or Equal To\".equals(operatorType)) {\n\t\t\t\t\tdeltaNode.setAttribute(\"lowClosed\", TRUE);\n\t\t\t\t}\n\t\t\t} else if (\"Equal To\".equals(operatorType)) {\n\t\t\t\tdeltaNode.setAttribute(\"lowClosed\", TRUE);\n\t\t\t\tdeltaNode.setAttribute(\"highClosed\", TRUE);\n\t\t\t\tlowNode.setAttribute(VALUE, quantity);\n\t\t\t\thighNode.setAttribute(VALUE, quantity);\n\t\t\t} else if (operatorType.startsWith(\"Less Than\")) {\n\t\t\t\tdeltaNode.setAttribute(\"lowClosed\", TRUE);\n\t\t\t\tlowNode.setAttribute(VALUE, \"0\");\n\t\t\t\thighNode.setAttribute(VALUE, quantity);\n\t\t\t\tif (\"Less Than or Equal To\".equals(operatorType)) {\n\t\t\t\t\tdeltaNode.setAttribute(\"highClosed\", TRUE);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdeltaNode.appendChild(lowNode);\n\t\t\tdeltaNode.appendChild(highNode);\n\t\t\ttemporalInfoNode.appendChild(deltaNode);\n\t\t}\n\t\ttemporalInfoNode.setAttribute(\"precisionUnit\", precisionUnit);\n\t\ttemporallyRelatedInfoNode.appendChild(temporalInfoNode);\n\t\treturn temporallyRelatedInfoNode;\n\t}", "public abstract Node apply(Node node);", "public String getOperation () {\n return operation;\n }", "public String getOperation () {\n return operation;\n }", "public void setOperation(String op) {this.operation = op;}", "public final EObject ruleECallOperationActivityDefinition() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token this_BEGIN_1=null;\n Token this_END_3=null;\n EObject lv_operation_2_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:3296:2: ( (otherlv_0= Call_operation this_BEGIN_1= RULE_BEGIN ( (lv_operation_2_0= ruleECallOperationActivityDefinitionBody ) ) this_END_3= RULE_END ) )\n // InternalRMParser.g:3297:2: (otherlv_0= Call_operation this_BEGIN_1= RULE_BEGIN ( (lv_operation_2_0= ruleECallOperationActivityDefinitionBody ) ) this_END_3= RULE_END )\n {\n // InternalRMParser.g:3297:2: (otherlv_0= Call_operation this_BEGIN_1= RULE_BEGIN ( (lv_operation_2_0= ruleECallOperationActivityDefinitionBody ) ) this_END_3= RULE_END )\n // InternalRMParser.g:3298:3: otherlv_0= Call_operation this_BEGIN_1= RULE_BEGIN ( (lv_operation_2_0= ruleECallOperationActivityDefinitionBody ) ) this_END_3= RULE_END\n {\n otherlv_0=(Token)match(input,Call_operation,FOLLOW_6); \n\n \t\t\tnewLeafNode(otherlv_0, grammarAccess.getECallOperationActivityDefinitionAccess().getCall_operationKeyword_0());\n \t\t\n this_BEGIN_1=(Token)match(input,RULE_BEGIN,FOLLOW_46); \n\n \t\t\tnewLeafNode(this_BEGIN_1, grammarAccess.getECallOperationActivityDefinitionAccess().getBEGINTerminalRuleCall_1());\n \t\t\n // InternalRMParser.g:3306:3: ( (lv_operation_2_0= ruleECallOperationActivityDefinitionBody ) )\n // InternalRMParser.g:3307:4: (lv_operation_2_0= ruleECallOperationActivityDefinitionBody )\n {\n // InternalRMParser.g:3307:4: (lv_operation_2_0= ruleECallOperationActivityDefinitionBody )\n // InternalRMParser.g:3308:5: lv_operation_2_0= ruleECallOperationActivityDefinitionBody\n {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getECallOperationActivityDefinitionAccess().getOperationECallOperationActivityDefinitionBodyParserRuleCall_2_0());\n \t\t\t\t\n pushFollow(FOLLOW_8);\n lv_operation_2_0=ruleECallOperationActivityDefinitionBody();\n\n state._fsp--;\n\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getECallOperationActivityDefinitionRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"operation\",\n \t\t\t\t\t\tlv_operation_2_0,\n \t\t\t\t\t\t\"org.sodalite.dsl.RM.ECallOperationActivityDefinitionBody\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n\n }\n\n\n }\n\n this_END_3=(Token)match(input,RULE_END,FOLLOW_2); \n\n \t\t\tnewLeafNode(this_END_3, grammarAccess.getECallOperationActivityDefinitionAccess().getENDTerminalRuleCall_3());\n \t\t\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "org.jetbrains.kotlin.backend.common.serialization.proto.IrOperation getOperation();", "public void setOperation (String operation) {\n this.operation = operation;\n }", "public void setOperation (String operation) {\n this.operation = operation;\n }", "public String getOperation() {\n\t\t\treturn operation;\n\t\t}", "public WSIFOperationInfo getOperation(QName operationName) {\n if (operationName == null) {\n // lets try a default operation\n return defaultOperation;\n }\n return (WSIFOperationInfo) operationMap.get(operationName);\n }", "public java.lang.CharSequence getOperation() {\n return Operation;\n }", "Counter registerOperation(Class<? extends Operation> operationType);", "public TransformedOperation transformOperation(ModelVersion modelVersion, ModelNode operation) throws OperationFailedException {\n checkIsMainController();\n PathElement pathElement = PathElement.pathElement(SUBSYSTEM, mainSubsystemName);\n PathAddress opAddr = PathAddress.pathAddress(operation.get(OP_ADDR));\n // Composite operations have no address\n if ((opAddr.size() > 0 && opAddr.getElement(0).equals(pathElement)) || operation.get(OP).asString().equals(COMPOSITE)) {\n\n final Map<PathAddress, ModelVersion> subsystem = Collections.singletonMap(PathAddress.EMPTY_ADDRESS.append(pathElement), modelVersion);\n final TransformationTarget transformationTarget = TransformationTargetImpl.create(extensionRegistry.getTransformerRegistry(), getCoreModelVersionByLegacyModelVersion(modelVersion),\n subsystem, MOCK_IGNORED_DOMAIN_RESOURCE_REGISTRY, TransformationTarget.TransformationTargetType.SERVER);\n\n final Transformers transformers = Transformers.Factory.create(transformationTarget);\n final TransformationContext transformationContext = createTransformationContext(transformationTarget);\n return transformers.transformOperation(transformationContext, operation);\n }\n return new OperationTransformer.TransformedOperation(operation, OperationResultTransformer.ORIGINAL_RESULT);\n }", "public <O extends FighterOperation> O apply(O operation);", "public void setOperation(EAdOperation operation) {\r\n\t\tthis.operation = operation;\r\n\t}", "public String modifyIoXml(String xml_og){\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\tDocument doc = null;\r\n\t\tString xml_final;\r\n\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(\"swe\".equals(args)) {\r\n\t\t\t return \"http://www.opengis.net/swe/1.0.1\";\r\n\t\t\t }else if(\"env\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\";\r\n\t\t\t }else if(\"sos\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/sos/2.0\";\r\n\t\t\t }else if(\"ows\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/ows/1.1\";\r\n\t\t\t }else if(\"soap\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\"; \t\r\n\t\t\t }else if(\"om\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/om/2.0\";\r\n\t\t\t }else if(\"xlink\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/1999/xlink\";\r\n\t\t\t }else{\r\n\t\t\t return null;}\r\n\t\t\t }\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n\t\t\t\tString path_loading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\tNodeList nodes = (NodeList)xPath.compile(path_loading).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t\t\t\tString messwert = \"\";\r\n\t\t\t\tfor(int n = 0; n<nodes.getLength(); n++){\r\n\t\t\t\t\tmesswert = nodes.item(n).getTextContent();\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.parseInsertObservation:parser Loading OG: \"+messwert);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(messwert.equals(\"1\")){\r\n\t\t\t\t\t\tnodes.item(n).setTextContent(\"2222\");;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.parseInsertObservation:parser Loading EDITED:\"+nodes.item(n).getTextContent());\r\n\t\t\t\t}\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\r\n\t\txml_final = TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2);\r\n\t\treturn xml_final;\r\n\t}", "public String modifyIoXml(String xml_og){\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\tDocument doc = null;\r\n\t\tString xml_final;\r\n\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(\"swe\".equals(args)) {\r\n\t\t\t return \"http://www.opengis.net/swe/1.0.1\";\r\n\t\t\t }else if(\"env\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\";\r\n\t\t\t }else if(\"sos\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/sos/2.0\";\r\n\t\t\t }else if(\"ows\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/ows/1.1\";\r\n\t\t\t }else if(\"soap\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\"; \t\r\n\t\t\t }else if(\"om\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/om/2.0\";\r\n\t\t\t }else if(\"xlink\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/1999/xlink\";\r\n\t\t\t }else{\r\n\t\t\t return null;}\r\n\t\t\t }\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n\t \t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t \t\r\n\t \t\r\n\t \t//find Loading value\r\n\t\t\t\tString path_loading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\tNodeList nodes = (NodeList)xPath.compile(path_loading).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\r\n\t\t\t\tString messwert = \"\";\r\n\t\t\t\tfor(int n = 0; n<nodes.getLength(); n++){\r\n\t\t\t\t\tmesswert = nodes.item(n).getTextContent();\r\n\t\t\t\t\t//replace original value with new value\r\n\t\t\t\t\tif(messwert.equals(LoadOnStartAppConfiguration.value_from)){\r\n\t\t\t\t\t\tnodes.item(n).setTextContent(LoadOnStartAppConfiguration.value_to);;\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t}\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\r\n\t\txml_final = TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2);\r\n\t\treturn xml_final;\r\n\t}", "public abstract void operation();", "public Operation() {\n super();\n }", "public java.lang.CharSequence getOperation() {\n return Operation;\n }", "void applyExtensions(ReaderContext context, Operation operation, Method method);", "@Override\n public void visit(final OpExtend opExtend) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpExtend\");\n }\n addOp(OpExtend.extend(rewriteOp1(opExtend), opExtend.getVarExprList()));\n }", "public OperationNode(ValueNode<T> left, String operation, ValueNode<T> right) {\n\t\tsuper(left, right);\n\t\tthis.operation = operation;\n\t}", "public void setOperation(String operation) {\n this.operation = operation;\n }", "public void setOperation(String operation) {\n this.operation = operation;\n }", "protected abstract Object resolveQualifiedOperationEntity(String namespace, String localName);", "public java.lang.CharSequence getOperation() {\n return operation;\n }", "@Override\n public void visit(final OpDiff opDiff) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpDiff\");\n }\n final OpRewriter rewriter = new OpRewriter(securityEvaluator, graphIRI);\n addOp(OpDiff.create(rewriteOp2(opDiff, rewriter), rewriter.getResult()));\n }", "SolutionChange getSuperChange();", "public SegmentacaoAbstrata(SegmentaoOperacao operation) {\r\n\t\tthis.operation = operation;\r\n\t}", "void applyOperationId(Operation operation, Method method);", "@Test\n public void testOperationMethod() throws JAXBException {\n final String xml = XML.marshal(createMercatorMethod());\n assertXmlEquals(\"<gml:OperationMethod xmlns:gml=\\\"\" + Namespaces.GML + \"\\\">\\n\" +\n \" <gml:name>Mercator (1SP)</gml:name>\\n\" +\n \" <gml:formula>See EPSG guide.</gml:formula>\\n\" +\n \" <gml:parameter>\\n\" +\n \" <gml:OperationParameter gml:id=\\\"epsg-parameter-8801\\\">\\n\" +\n \" <gml:identifier codeSpace=\\\"IOGP\\\">urn:ogc:def:parameter:EPSG::8801</gml:identifier>\\n\" +\n \" <gml:name codeSpace=\\\"EPSG\\\">Latitude of natural origin</gml:name>\\n\" +\n \" </gml:OperationParameter>\\n\" +\n \" </gml:parameter>\\n\" +\n \" <gml:parameter>\\n\" +\n \" <gml:OperationParameter gml:id=\\\"epsg-parameter-8802\\\">\\n\" +\n \" <gml:identifier codeSpace=\\\"IOGP\\\">urn:ogc:def:parameter:EPSG::8802</gml:identifier>\\n\" +\n \" <gml:name codeSpace=\\\"EPSG\\\">Longitude of natural origin</gml:name>\\n\" +\n \" </gml:OperationParameter>\\n\" +\n \" </gml:parameter>\\n\" +\n \"</gml:OperationMethod>\", xml, \"xmlns:*\");\n\n final OperationMethod method = (OperationMethod) XML.unmarshal(xml);\n verifyMethod(method);\n Validators.validate(method);\n }", "@SuppressWarnings(\"unchecked\")\n\t\tpublic Operation createOperation(String opName, String[] params, OperationCallback caller) {\n\t\t\tthrow new RuntimeException(\"Method 'createOperation' in class 'DummyNode' not yet implemented!\");\n\t\t\t//return null;\n\t\t}", "public org.xmlsoap.schemas.wsdl.http.OperationType getOperation()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.http.OperationType target = null;\n target = (org.xmlsoap.schemas.wsdl.http.OperationType)get_store().find_element_user(OPERATION$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public SoNode getNodeAppliedTo() {\n \t \t return pimpl.appliedcode == SoAction.AppliedCode.NODE ? pimpl.applieddata.node : null;\n \t \t }", "public java.lang.CharSequence getOperation() {\n return operation;\n }", "public void setOperation(String operation) {\r\n\t\tthis.operation = operation;\r\n\t}", "protected OperationsMetadata parseOperationsMetadata( OnlineResource defaultOnlineResource )\n throws XMLParsingException,\n InvalidCapabilitiesException {\n\n Node operationMetadata = XMLTools.getRequiredNode( getRootElement(), PRE_OWS + \"OperationsMetadata\", nsContext );\n List<Node> operationElementList = XMLTools.getNodes( operationMetadata, PRE_OWS + \"Operation\", nsContext );\n\n Map<String, Element> operations = new HashMap<String, Element>();\n for ( int i = 0; i < operationElementList.size(); i++ ) {\n operations.put( XMLTools.getRequiredNodeAsString( operationElementList.get( i ), \"@name\", nsContext ),\n (Element) operationElementList.get( i ) );\n }\n\n Operation110 getCapabilities = getOperation110( OperationsMetadata.GET_CAPABILITIES_NAME,\n true,\n operations,\n defaultOnlineResource );\n Operation110 getView = getOperation110( WPVSOperationsMetadata.GET_VIEW_NAME,\n true,\n operations,\n defaultOnlineResource );\n Operation110 getDescription = getOperation110( WPVSOperationsMetadata.GET_DESCRIPTION_NAME,\n false,\n operations,\n defaultOnlineResource );\n\n Operation110 get3DFeatureInfo = getOperation110( WPVSOperationsMetadata.GET_3D_FEATURE_INFO,\n false,\n operations,\n defaultOnlineResource );\n\n Operation110 getLegendGraphics = getOperation110( WPVSOperationsMetadata.GET_LEGEND_GRAPHIC_NAME,\n false,\n operations,\n defaultOnlineResource );\n\n List<Node> parameterElementList = XMLTools.getNodes( operationMetadata, PRE_OWS + \"Parameter\", nsContext );\n OWSDomainType110[] parameters = new OWSDomainType110[parameterElementList.size()];\n for ( int i = 0; i < parameters.length; i++ ) {\n parameters[i] = getOWSDomainType110( (Element) parameterElementList.get( i ) );\n }\n\n List<Node> constraintElementList = XMLTools.getNodes( operationMetadata, PRE_OWS + \"Constraint\", nsContext );\n OWSDomainType110[] constraints = new OWSDomainType110[constraintElementList.size()];\n for ( int i = 0; i < constraints.length; i++ ) {\n constraints[i] = getOWSDomainType110( (Element) constraintElementList.get( i ) );\n }\n\n List<Node> extendedCapsList = XMLTools.getNodes( operationMetadata, PRE_OWS + \"ExtendedCapabilities\", nsContext );\n Object[] extendedCapabilities = new Object[extendedCapsList.size()];\n for ( int i = 0; i < extendedCapabilities.length; i++ ) {\n extendedCapabilities[i] = extendedCapsList.get( i );\n }\n\n WPVSOperationsMetadata metadata = new WPVSOperationsMetadata( getCapabilities,\n getView,\n getDescription,\n getLegendGraphics,\n parameters,\n constraints,\n extendedCapabilities,\n get3DFeatureInfo );\n\n return metadata;\n }", "BOperation createBOperation();", "protected abstract boolean actionImplementation(iNamedObject node);", "public java.lang.CharSequence getSuboperation() {\n return suboperation;\n }", "AggregateOperation(WaveletBlipOperation op) {\n segmentsToRemove = Collections.emptyList();\n segmentsToAdd = Collections.emptyList();\n segmentsToEndModifying = Collections.emptyList();\n segmentsToStartModifying = Collections.emptyList();\n participantsToRemove = Collections.emptyList();\n participantsToAdd = Collections.emptyList();\n if (op.getBlipOp() instanceof BlipContentOperation) {\n docOps = Collections.singletonList(\n new DocumentOperations(\n op.getBlipId(),\n new DocOpList.Singleton(((BlipContentOperation) op.getBlipOp()).getContentOp())));\n } else {\n docOps = Collections.emptyList();\n }\n }", "public interface AddBeforeOperationKnowledgeSource<T extends Node> extends OperationKnowledgeSource<T>\n{\n\t/**\n\t * Retrieves the anchor argument.\n\t * @return The element before which another element was added.\n\t */\n\tpublic SymbolicElement<T> getAnchor();\n\t\n\t/**\n\t * Retrieves the addition argument.\n\t * @return The element which was added before the anchor argument.\n\t */\n\tpublic SymbolicElement<T> getAddition();\n}", "public java.lang.CharSequence getSuboperation() {\n return suboperation;\n }", "public abstract String getAddOperationLabel();", "public AgwCslOper clone() {\n return (AgwCslOper)cloneContent(new AgwCslOper());\n }", "@XmlElement(name = \"operationName\", namespace = Namespaces.SRV)\n final String getOperationName() {\n if (LEGACY_XML) {\n final OperationMetadata operation = getOperation();\n if (operation != null) {\n return operation.getOperationName();\n }\n }\n return null;\n }", "@Override\n\tpublic void VisitUnaryNode(UnaryOperatorNode Node) {\n\n\t}", "private Object addElement(XmlElement e, Method method, Object[] args) {\n/* 167 */ Class<?> rt = method.getReturnType();\n/* */ \n/* */ \n/* 170 */ String nsUri = \"##default\";\n/* 171 */ String localName = method.getName();\n/* */ \n/* 173 */ if (e != null) {\n/* */ \n/* 175 */ if (e.value().length() != 0)\n/* 176 */ localName = e.value(); \n/* 177 */ nsUri = e.ns();\n/* */ } \n/* */ \n/* 180 */ if (nsUri.equals(\"##default\")) {\n/* */ \n/* 182 */ Class<?> c = method.getDeclaringClass();\n/* 183 */ XmlElement ce = c.<XmlElement>getAnnotation(XmlElement.class);\n/* 184 */ if (ce != null) {\n/* 185 */ nsUri = ce.ns();\n/* */ }\n/* */ \n/* 188 */ if (nsUri.equals(\"##default\"))\n/* */ {\n/* 190 */ nsUri = getNamespace(c.getPackage());\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* 195 */ if (rt == void.class) {\n/* */ \n/* */ \n/* 198 */ boolean isCDATA = (method.getAnnotation(XmlCDATA.class) != null);\n/* */ \n/* 200 */ StartTag st = new StartTag(this.document, nsUri, localName);\n/* 201 */ addChild(st);\n/* 202 */ for (Object arg : args) {\n/* */ Text text;\n/* 204 */ if (isCDATA) { text = new Cdata(this.document, st, arg); }\n/* 205 */ else { text = new Pcdata(this.document, st, arg); }\n/* 206 */ addChild(text);\n/* */ } \n/* 208 */ addChild(new EndTag());\n/* 209 */ return null;\n/* */ } \n/* 211 */ if (TypedXmlWriter.class.isAssignableFrom(rt))\n/* */ {\n/* 213 */ return _element(nsUri, localName, rt);\n/* */ }\n/* */ \n/* 216 */ throw new IllegalSignatureException(\"Illegal return type: \" + rt);\n/* */ }", "public void setOperation (String Operation);" ]
[ "0.6302545", "0.60325456", "0.58293813", "0.56916565", "0.5617109", "0.55486757", "0.55486757", "0.5503607", "0.54977995", "0.54759866", "0.5455842", "0.545292", "0.5445702", "0.53372854", "0.5329533", "0.5318857", "0.53027445", "0.5286441", "0.52554333", "0.5247685", "0.51944804", "0.5181841", "0.51504576", "0.5148986", "0.5148986", "0.5130573", "0.5112602", "0.5083791", "0.50571454", "0.50498474", "0.50373346", "0.5020622", "0.5016853", "0.50105697", "0.50068605", "0.5002573", "0.49992394", "0.49703187", "0.49703187", "0.49656218", "0.4962249", "0.4951978", "0.49399793", "0.49381366", "0.4930384", "0.49285504", "0.49063286", "0.49063286", "0.48900148", "0.48827097", "0.48716885", "0.4857835", "0.4857835", "0.48488292", "0.48435026", "0.4836517", "0.4833848", "0.4833848", "0.4832034", "0.4814627", "0.4811851", "0.48085746", "0.48060784", "0.47942448", "0.4793037", "0.47925395", "0.47925395", "0.47878602", "0.4784509", "0.47841376", "0.47817135", "0.47754192", "0.47716403", "0.47560236", "0.47560236", "0.47535944", "0.47497648", "0.47472718", "0.47449732", "0.4740746", "0.4736982", "0.4736147", "0.4734718", "0.4731559", "0.47275004", "0.47197744", "0.4716506", "0.4712468", "0.4712395", "0.4712128", "0.47109702", "0.47027645", "0.469438", "0.4688612", "0.4684897", "0.46747062", "0.46699342", "0.46684211", "0.46623045", "0.4659654" ]
0.6438629
0
This method iterate along the extend document extracting all nodes of operations
protected ArrayList extractOperationNodes(Document extendDocument) { ArrayList extendNodes = new ArrayList(); Node rootExtendsNode = extendDocument.getFirstChild(); if (rootExtendsNode != null) { // Get childs of root extend node NodeList nodes = rootExtendsNode.getChildNodes(); int lenght = nodes.getLength(); for (int i = 0; i < lenght; i++) { Node node = nodes.item(i); if (this.isExtendedNode(node)) { // logger.debug(node.getNodeName()); extendNodes.add(node); } } } return extendNodes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<OperationImplementation> getOperations() {\n List<?> operationsUnknown = (List<?>) properties.get(XPATH_OPERATIONS);\n List<OperationImplementation> operations = new ArrayList<OperationImplementation>();\n if (operationsUnknown != null) {\n \t for (Object operationUnknown : operationsUnknown) {\n \t Map<?, ?> operationMap = (Map<?, ?>) operationUnknown;\n \t operations.add(new OperationImplementation(\n \t (String) operationMap.get(OPERATION_NAME),\n \t (String) operationMap.get(OPERATION_PARAMETERS),\n \t (String) operationMap.get(OPERATION_DOCUMENTATION)));\n \t }\n }\n return operations;\n }", "protected Document parse(Document originalForm, Document extendDocument) throws Exception {\r\n\r\n ArrayList operationNodes = this.extractOperationNodes(extendDocument);\r\n for (int i = 0; i < operationNodes.size(); i++) {\r\n Node operationNode = (Node) operationNodes.get(i);\r\n if (operationNode != null) {\r\n try {\r\n ExtendedXmlOperation operation = this.getNodeOperation(operationNode);\r\n this.executeOperation(originalForm, operation);\r\n } catch (Exception e) {\r\n ExtendedXmlParser.logger.error(null, e);\r\n throw e;\r\n }\r\n }\r\n }\r\n return originalForm;\r\n }", "protected void extract() {\n\t\tfor (ITSState nodeState : doc.iterNodes()) {\n\t\t\tNode node = nodeState.node;\n\t\t\tRuleResolver resolver = resolvers.get(node.getNodeName()); \n\t\t\tif (resolver != null) {\n\t\t\t\tGlobalRule rule = resolver.extractRule(attrReader, parameters, nodeState.node);\n\t\t\t\tapplyRule(resolver, rule);\n\t\t\t}\n\t\t\t\n\t\t\tif (node.getNodeName().equals(\"its:param\")) {\n\t\t\t\tString name = node.getAttributes().getNamedItem(\"name\").getNodeValue();\n\t\t\t\tString value = node.getTextContent();\n\t\t\t\tparameters.add(name, value);\n\t\t\t} else if (attrReader.dialect.isRules(node)) { \n\t\t\t\t// we have external link (xlink:href or link href)\n\t\t\t\tString external = attrReader.dialect.getExternalRules(node);\n\t\t\t\tif (external != null) {\n\t\t\t\t\textractExternalRules(external);\n\t\t\t\t}\n\t\t\t} else if (node.getNodeName().equals(\"script\")) {\n\t\t\t\t// we have embedded\n\t\t\t\tif (node.hasAttributes()) {\n\t\t\t\t\tif (node.getAttributes().getNamedItem(\"type\").getNodeValue().equals(\"application/its+xml\")) {\n\t\t\t\t\t\textractEmbeddedRules(node.getTextContent());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!nodeState.nodePath.contains(\"its:rules\")) {\n\t\t\t\t// unless we're in rules, look at local annotations\n\t\t\t\t// LOCAL\n\t\t\t\textractLocal(nodeState);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// process inheritance\n\t\tfor (ITSState nodeState : doc.iterNodes()) {\n\t\t\t// Elements: handle inheritance \n\t\t\tITSData parentData = getParentState(nodeState);\n\t\t\tif (parentData != null) {\n\t\t\t\t// inherit from parent\n\t\t\t\tITSData thisData = nodeItsData.get(nodeState.nodePath);\n\t\t\t\tif (thisData == null) {\n\t\t\t\t\tthisData = new ITSData();\n\t\t\t\t\tapplyRuleToNode(nodeState.nodePath, thisData);\n\t\t\t\t} \n\t\t\t\tthisData.inherit(parentData);\t\t\t\t\n\t\t\t}\t\n\t\t\t\t\t\t\n\t\t} \n\t\t\n\t\t\n\t}", "Operations operations();", "private static void appendOperation_1_0( Element root, Operation_1_0 operation ) {\n LOG.entering();\n Element op = XMLTools.appendElement( root, OWS, POWS + \"Operation\" );\n\n op.setAttribute( \"Name\", operation.getName() );\n\n DCPType[] dcps = operation.getDCPs();\n for ( DCPType dcp : dcps )\n appendDCP( op, dcp );\n\n OWSDomainType[] parameters = operation.getParameters();\n for ( OWSDomainType parameter : parameters )\n appendParameter( op, parameter, \"Parameter\" );\n\n OWSDomainType[] constraints = operation.getConstraints();\n for ( OWSDomainType constraint : constraints )\n appendParameter( op, constraint, \"Constraint\" );\n\n Object[] metadatas = operation.getMetadata();\n for ( Object metadata : metadatas )\n appendMetadata( op, metadata );\n LOG.exiting();\n }", "@Override\r\n protected void parseDocuments()\r\n {\n\r\n }", "public static List<OperationData> getElements() {\n return new ArrayList<>(content);\n }", "public Collection getOperations()\n {\n return Collections.unmodifiableCollection(operations);\n }", "public Collection<Element> getOperations() {\n Stream<Element> combinedStream = Stream.of(aCollection, cCollection)\n .flatMap(Collection::stream);\n return combinedStream.collect(Collectors.toList());\n }", "private interface OperationOverNodes {\n\t\tvoid operate(Node node);\n\t}", "public void convertAll() {\n Document dom = null;\n long beginTime = System.currentTimeMillis();\n try {\n log.info(\" ############################### begin import ######################\");\n dom = XMLParser.parseXMLToDOM(context.getResourceAsStream(IMPORT_FILE));\n // XMLParser.DTDValidator(dom);\n Element element = (Element) dom.getElementsByTagName(\"import\").item(0);\n String encoding = element.getAttribute(\"encoding\");\n DataAccessor.encoding = encoding;\n\n NodeList list = element.getChildNodes();\n\n List<Data> clondSources = new ArrayList<Data>();\n for (int i = 0; i < list.getLength(); i++) {\n // datatype node\n Node itemDatatype = list.item(i);\n List<Data> sources = processDatatype(itemDatatype);\n clondSources.addAll(sources);\n }\n NodeService.insertMigrationMappings(clondSources);\n createRelationDataType(clondSources);\n linkRoot(list);\n log.info(String.format(\n \" ---->#######################finished importing [time:%s mins] #############################\",\n (System.currentTimeMillis() - beginTime) / (1000 * 60)));\n NodeService.insertProperties(properties);\n }\n catch (Exception e) {\n log.error(e.getMessage());\n e.printStackTrace();\n }\n }", "private void getNodeOperation(OperationResponse response, ObjectIdData requestData) {\n\t\t\n//\t\tString gehtNichtMeldung = \"{\\\"message\\\":\\\"MaPL currently is missing appropriate APIs to filter nodes intelligently.\\\"}\";\n//\t\tResponseUtil.addSuccess(response, requestData, String.valueOf(200), ResponseUtil.toPayload(gehtNichtMeldung));\n\t\t\n\t\t\n\t\trestWrapper = MapsHelpers.initRestWrapperAndLogin(getContext());\n\t\tint httpStatusCode = 200;\n\t\tLogger.severe(\"Object ID : \" + requestData.getObjectId());\n\t\tLogger.severe(\"Dynamic props : \" + requestData.getDynamicProperties().toString());\n\t\tLogger.severe(\"User def props: \" + requestData.getUserDefinedProperties().toString());\n\t\t\n\t\tif ( restWrapper != null ) {\n\t\t\tJSONArray allNodes = new JSONArray();\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tString additionalInfo = \"?withAdditionalInfo=true\";\n\t\t\t\t\n\t\t\t\tString treeId = requestData.getObjectId();\n\t\t\t\t\n\t\t\t\tLogger.severe(\"Find all nodes for tree ID \" + treeId );\n\t\t\t\t\n//\t\t\t\tResponseUtil.addSuccess(response, requestData, String.valueOf(httpStatusCode), ResponseUtil.toPayload(allNodes.toString(4)));\n//\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\tString restPath = \"/node/root/\" + treeId + additionalInfo;\n\t\t\t\t\n\t\t\t\tObject result = restWrapper.httpGetRequest(restPath, new HashMap<String, String>());\n\t\t\t\t\n\t\t\t\tallNodes.put(result);\n\t\t\t\n\t\t\t\tgetChildren(allNodes, treeId, (JSONObject)result, 0);\n\t\t\t\tLogger.severe(\"Found nodes: \" + allNodes.length() );\n\t\t\t\t\n\t\t\t\thttpStatusCode = restWrapper.getHttpClient().getLastStatus();\n\t\t\t\t\n\t\t\t\tResponseUtil.addSuccess(response, requestData, String.valueOf(httpStatusCode), ResponseUtil.toPayload(allNodes.toString(4)));\n\t\t\t\t\n\t\t\t} catch (JSONException e) {\n\t\t\t\tLogger.log(Level.SEVERE, \"An error\", e);\n\t\t\t\tthrow new ConnectorException(e);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} else {\n\t\t\tresponse.addResult(requestData, OperationStatus.FAILURE, null, \"Authentication failed\", null);\n\t\t}\n\t\t\n\t}", "OperationsClient getOperations();", "@Override\n public OctreeIterator iterator()\n {\n Stack<CelestialBody> stack = new Stack<>();\n stack = this.root.iterate(stack);\n\n OctreeIterator iterator = new OctreeIterator(stack);\n return iterator;\n }", "Operations createOperations();", "public Vector<Node> GetAdditionalSubNodes();", "private static void appendOperationsMetadata_1_0( Element elem,\n OperationsMetadata_1_0 operationsMetadata ) {\n LOG.entering();\n Element root = XMLTools.appendElement( elem, OWS, POWS + \"OperationsMetadata\" );\n\n Operation[] operations = operationsMetadata.getAllOperations();\n for ( Operation operation : operations )\n appendOperation_1_0( root, (Operation_1_0) operation );\n\n OWSDomainType[] parameters = operationsMetadata.getParameter();\n if ( parameters != null )\n for ( OWSDomainType parameter : parameters )\n appendParameter( root, parameter, POWS + \"Parameter\" );\n\n OWSDomainType[] constraints = operationsMetadata.getConstraints();\n if ( constraints != null )\n for ( OWSDomainType constraint : constraints )\n appendParameter( root, constraint, POWS + \"Constraint\" );\n\n String extCap = operationsMetadata.getExtendedCapabilities();\n if ( extCap != null )\n XMLTools.appendElement( root, OWS, POWS + \"ExtendedCapabilities\", extCap );\n LOG.exiting();\n }", "@Override\n\tpublic void docToLists() {\n\t\tnodesToList(document, null, nodes);\n\t}", "private void retrieveAll(Definition def)\r\n\t{\n\t\t\r\n\t\t\r\n\t\tjavax.wsdl.Types types=def.getTypes();\r\n\t\tif(types==null) return;\r\n\t\t\r\n\t\tSchema sch=(Schema) def.getTypes().getExtensibilityElements().get(0);\r\n\t\tElement elm=sch.getElement();\r\n\t\tString tns=sch.getElement().getAttribute(\"targetNamespace\");\r\n\t\t\r\n\t\tNodeList nl=elm.getChildNodes();\t\t\r\n\t\tElement elmnt;\r\n\t\tnsInc++;\r\n\t\tfor(int i=0;i<nl.getLength();i++)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tif (checkElementName(nl.item(i), \"element\" ))\r\n\t\t\t{\r\n\t\t\t\telmnt=(Element)(nl.item(i));\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tOMElement omm=\tcreateOMFromSchema((Element)nl.item(i),tns);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tQName qname=new QName(tns,elmnt.getAttribute(\"name\"));//omm.getNamespace().getPrefix());\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\ttmpNameAndType.put(qname, omm);\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}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t}", "public static void nonRecursiveParserXML(NodeList rList, Document doc){\r\n\t try {\t\r\n\t System.out.println(\"===========================\");\r\n\t for (int temp1 = 0; temp1 < rList.getLength(); temp1++) {\r\n\t \t NodeList nList = doc.getElementsByTagName(\"mxCell\");\r\n\t System.out.println(\"++++++++++++++ mxCell +++++++++++++++++\");\r\n\t for (int temp = 0; temp < nList.getLength(); temp++) {// for each cell\r\n\t Node nNode = nList.item(temp); // a cell is called in as nNode\r\n\t System.out.println(\"\\nCurrent Element :\" + nNode.getNodeName());\r\n\t if (nNode.getNodeType() == Node.ELEMENT_NODE) {\r\n\t Element eElement = (Element) nNode;\r\n\t NamedNodeMap attList = eElement.getAttributes(); \r\n\t \r\n\t for(int ind = 0; ind < attList.getLength(); ind++){\r\n\t \t System.out.println(\"Attribute :\" + attList.item(ind));\r\n\t } \r\n\t NodeList subNodes = eElement.getElementsByTagName(\"mxGeometry\");\r\n\t System.out.println(\"\\t\\t------------ mxGeometry --------------\");\r\n\t for(int subInd = 0; subInd < subNodes.getLength(); subInd++){\r\n\t \t NamedNodeMap elemAtList = subNodes.item(subInd).getAttributes(); \r\n\t \r\n\t for(int ind2 = 0; ind2 < elemAtList.getLength(); ind2++){\r\n\t \t System.out.println(\"Attribute :\" + elemAtList.item(ind2));\r\n\t }\r\n\t }\r\n\t //System.out.println(\"First Name : \" + eElement.getElementsByTagName(\"mxGeometry\").item(0).getTextContent());\r\n\t }\r\n\t } \r\n\t }\r\n\t } catch (Exception e) {\r\n\t e.printStackTrace();\r\n\t }\r\n\t\t}", "private void listChildren(Node current) {\n if(current instanceof Element){ //finds the element tags in the XML document with XOM parser\n Element temp = (Element) current;\n switch(temp.getQualifiedName()) {\n case (\"grapes\"): //grapes tag doesn't do anything in particular except instantiating the file\n break;\n\n case (\"grape\"):\n createGrape(temp);\n break;\n\n case (\"seed\"):\n createSeed(temp);\n break;\n\n default:\n throw new IllegalArgumentException(\"Invalid input in XML \" ); //any other element type is not supported in our XML formatted file\n }\n }\n\n for (int i = 0; i < current.getChildCount(); i++) {\n listChildren(current.getChild(i)); //recursive call traverses the XML document in preorder\n }\n\n }", "private void operateOverSubnodes(Node node, OperationOverNodes operation) {\n\t\tif (node != null) {\n\t\t\toperation.operate(node);\n\t\t\tNode next = node.getSubnode();\n\t\t\twhile (next != null) {\n\t\t\t\toperateOverSubnodes(next, operation);\n\t\t\t\tnext = next.getNext();\n\t\t\t}\n\t\t}\n\t}", "public void processDocument() {\n\n\t\t// compact concepts\n\t\tprocessConcepts(concepts);\n\t}", "public void accept(Visitor visitor)\n {\n visitor.startService(this);\n for (Iterator iterator = nameToOperation.values().iterator(); iterator.hasNext();)\n {\n OperationInfo operationInfo = (OperationInfo) iterator.next();\n operationInfo.accept(visitor);\n }\n visitor.endService(this);\n }", "@Override\n\tpublic void operation() {\n\t\tSystem.out.println(this.getClass().getSimpleName() + \" Ich bin ein Composite. Hier folgen meine Kinder:\");\n\t\tfor (Component children : _childComponents) {\n\t\t\t// Rekursiver Aufruf in den Leafs\n\t\t\tchildren.operation();\n\t\t}\n\n\t}", "void list()\n\t{\n\t\toperation.list();\n\t\t\n\t}", "@Override\n public YFCDocument invoke(YFCDocument inXml) {\n \n YFCElement inEle = inXml.getDocumentElement();\n YFCIterable<YFCElement> yfsItrator = inEle.getChildren(XMLLiterals.ITEM);\n for(YFCElement itemEle : yfsItrator) {\n YFCDocument itemListDoc = YFCDocument.createDocument(XMLLiterals.ITEM_LIST);\n YFCElement itemListEle = itemListDoc.getDocumentElement();\n itemEle.setAttribute(XMLLiterals.ORGANIZATION_CODE, INDIGO_CA);\n itemEle.setAttribute(XMLLiterals.UNIT_OF_MEASURE, EACH);\n itemListEle.importNode(itemEle);\n invokeYantraService(ITEM_LOAD_Q, itemListDoc);\n }\n return inXml;\n }", "private ExtendedOperations(){}", "@Override\n protected void iterChildren(TreeFunction f) {\n }", "@Override\n protected void iterChildren(TreeFunction f) {\n }", "@Override\n protected void iterChildren(TreeFunction f) {\n }", "@Override\r\n\tpublic List<SubstageDocument> getAll() throws Exception {\n\t\treturn null;\r\n\t}", "public ClsNodeDocument[] GetDocuments (String transID, String dataFlow,String[] operationArr, ClsNodeDocument[] searchDocs);", "protected SortedSet<Operation> nestOperations(SortedSet<Operation> operations) {\n\t\tSet<Operation> markedForRemoval = new HashSet<Operation>();\n\t\tfor (Operation op : operations) {\n\t\t\tSortedSet<Operation> toBeNested = new TreeSet<Operation>(SORT_BY_POSITION_AND_SUSPECT_TYPE);\n\t\t\tif (toBeNested.contains(op)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSourcePosition opPos = op.getPosition();\n\t\t\tSortedSet<Operation> tailSet = operations.tailSet(op);\n\t\t\tIterator<Operation> tailIter = tailSet.iterator();\n\t\t\ttailIter.next(); // skip op itself\n\t\t\twhile (tailIter.hasNext()) {\n\t\t\t\tOperation tailOp = tailIter.next();\n\t\t\t\tSourcePosition tailOpPos = tailOp.getPosition();\n\t\t\t\tif (tailOpPos.getURL().equals(opPos.getURL()) && tailOpPos.getStartOffset() < opPos.getEndOffset()) {\n\t\t\t\t\t// if the next operation has the same URL and should be nested.\n\t\t\t\t\ttoBeNested.add(tailOp);\n\t\t\t\t} else {\n\t\t\t\t\t// no need to look further, there won't be any nesting further down\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (toBeNested.size() > 0) {\n\t\t\t\top.addChildren(nestOperations(toBeNested));\n\t\t\t}\n\t\t\tmarkedForRemoval.addAll(toBeNested);\n\t\t}\n\t\t// remove the nested Operations from the this level\n\t\toperations.removeAll(markedForRemoval);\n\t\treturn operations;\n\t}", "@SuppressWarnings(\"deprecation\")\r\n\tprivate void loopingChildren(Node documento) throws IOException, SQLException, Exception {\r\n\r\n\t\tArrayList<ArmazenaErroOuAvisoAntigo> temp = new ArrayList<ArmazenaErroOuAvisoAntigo>();\r\n\r\n\t\tInteger aux = null;\r\n\r\n\t\tif (documento != null) {\r\n\r\n\t\t\t/**\r\n\t\t\t * teste\r\n\t\t\t */\r\n\t\t\tString nomeTag = documento.getNodeName();\r\n\r\n\t\t\t/*\r\n\t\t\t * Pesquisa se eh uma tag especial de parametro.\r\n\t\t\t */\r\n\t\t\tif (nomeTag != null && (TokenNucleo.LINHA.equals(nomeTag) || TokenNucleo.COLUNA.equals(nomeTag)\r\n\t\t\t\t\t|| TokenNucleo.MAE.equals(nomeTag))) {\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * Tag de linha que contem o numero da linha e a configuracao de\r\n\t\t\t\t * identacao.\r\n\t\t\t\t */\r\n\t\t\t\tif (TokenNucleo.LINHA.equals(nomeTag)) {\r\n\r\n\t\t\t\t\tlinhaTag = new Integer(documento.getAttributes().item(2).getNodeValue());\r\n\r\n\t\t\t\t\taux = new Integer(documento.getAttributes().item(1).getNodeValue());\r\n\r\n\t\t\t\t\tEspaco2Tag = new Espaco2(aux, new Integer(documento.getAttributes().item(0).getNodeValue()));\r\n\r\n\t\t\t\t\tdocumento = documento.getNextSibling();\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * Tag de coluna.\r\n\t\t\t\t */\r\n\t\t\t\tif (TokenNucleo.COLUNA.equals(nomeTag)) {\r\n\r\n\t\t\t\t\tcolunaTag = new Integer(documento.getAttributes().item(0).getNodeValue());\r\n\r\n\t\t\t\t\tdocumento = documento.getNextSibling();\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * tag mae para todas as outras.\r\n\t\t\t\t */\r\n\t\t\t\tif (TokenNucleo.MAE.equals(nomeTag)) {\r\n\r\n\t\t\t\t\tNodeList children = documento.getChildNodes();\r\n\r\n\t\t\t\t\tfor (int i = 0; i < children.getLength(); i++) {\r\n\r\n\t\t\t\t\t\t// Comeca a fazer um loop para dentro do documento.\r\n\t\t\t\t\t\tloopingChildren(children.item(i));\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\t\t\t/*\r\n\t\t\t * Se a tag for Tag HTML do Conteudo do Link.\r\n\t\t\t */\r\n\t\t\telse {\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * Tipo de No.\r\n\t\t\t\t */\r\n\t\t\t\tshort type = documento.getNodeType();\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * Se houver um doctype ele eh atribuido a lista de tags, para\r\n\t\t\t\t * que nao ocorra erros.\r\n\t\t\t\t */\r\n\t\t\t\tif (type == Node.DOCUMENT_TYPE_NODE) {\r\n\r\n\t\t\t\t\ttag.add(\"!DOCTYPE\");\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * Reescreve o no para que se possa guardar ela montada.\r\n\t\t\t\t */\r\n\t\t\t\ttagCompleta = new ConversorTexto().reEscrever(documento);\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * Verificacao HardCoded\r\n\t\t\t\t */\r\n\t\t\t\tif (!nomeTag.equals(\"#text\")) {\r\n\r\n\t\t\t\t\tif (nomeTag.toLowerCase().equals(\"input\")) {\r\n\r\n\t\t\t\t\t\tif (!regras.verificaTextoPredefinidoInput(tagCompleta)) {\r\n\r\n\t\t\t\t\t\t\tArmazenaErroOuAvisoAntigo v = new ArmazenaErroOuAvisoAntigo();\r\n\r\n\t\t\t\t\t\t\tv.setPv3(132);\r\n\r\n\t\t\t\t\t\t\tv.setProcurado(\"Value\");\r\n\r\n\t\t\t\t\t\t\tv.setTag(true);\r\n\r\n\t\t\t\t\t\t\ttemp.add(v);\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\tif (nomeTag.toLowerCase().equals(\"input\") || nomeTag.toLowerCase().equals(\"textarea\")\r\n\t\t\t\t\t\t\t|| nomeTag.toLowerCase().equals(\"select\")) {\r\n\r\n\t\t\t\t\t\tboolean ishidden = false;\r\n\r\n\t\t\t\t\t\tboolean isbutton = false;\r\n\r\n\t\t\t\t\t\tboolean isimage = false;\r\n\r\n\t\t\t\t\t\tboolean comErro = true;\r\n\r\n\t\t\t\t\t\tNamedNodeMap nos = documento.getAttributes();\r\n\r\n\t\t\t\t\t\tfor (int k = 0; k < nos.getLength(); k++) {\r\n\r\n\t\t\t\t\t\t\tif (nos.item(k).getNodeName().toLowerCase().equals(\"type\")) {\r\n\r\n\t\t\t\t\t\t\t\tif (nos.item(k).getNodeValue().toLowerCase().equals(\"hidden\")) {\r\n\r\n\t\t\t\t\t\t\t\t\tishidden = true;\r\n\r\n\t\t\t\t\t\t\t\t} else if (nos.item(k).getNodeValue().toLowerCase().equals(\"button\")) {\r\n\r\n\t\t\t\t\t\t\t\t\tisbutton = true;\r\n\r\n\t\t\t\t\t\t\t\t} else if (nos.item(k).getNodeValue().toLowerCase().equals(\"submit\")) {\r\n\r\n\t\t\t\t\t\t\t\t\tisbutton = true;\r\n\r\n\t\t\t\t\t\t\t\t} else if (nos.item(k).getNodeValue().toLowerCase().equals(\"reset\")) {\r\n\r\n\t\t\t\t\t\t\t\t\tisbutton = true;\r\n\r\n\t\t\t\t\t\t\t\t} else if (nos.item(k).getNodeValue().toLowerCase().equals(\"image\")) {\r\n\r\n\t\t\t\t\t\t\t\t\tisimage = true;\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (nos.item(k).getNodeName().equals(\"id\")) {\r\n\r\n\t\t\t\t\t\t\t\tif (regras.verificaLabel(strHtmlSource, nos.item(k).getNodeValue())) {\r\n\r\n\t\t\t\t\t\t\t\t\tcomErro = false;\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (ishidden == false && isbutton == false && isimage == false && comErro == true) {\r\n\r\n\t\t\t\t\t\t\tArmazenaErroOuAvisoAntigo v = new ArmazenaErroOuAvisoAntigo();\r\n\r\n\t\t\t\t\t\t\tv.setPv3(233);\r\n\r\n\t\t\t\t\t\t\tv.setProcurado(\"Label\");\r\n\r\n\t\t\t\t\t\t\tv.setTag(true);\r\n\r\n\t\t\t\t\t\t\ttemp.add(v);\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\tif (nomeTag.toLowerCase().equals(\"h1\") || nomeTag.toLowerCase().equals(\"h2\")\r\n\t\t\t\t\t\t\t|| nomeTag.toLowerCase().equals(\"h3\") || nomeTag.toLowerCase().equals(\"h4\")\r\n\t\t\t\t\t\t\t|| nomeTag.toLowerCase().equals(\"h5\") || nomeTag.toLowerCase().equals(\"h6\")) {\r\n\r\n\t\t\t\t\t\tif (regras.verificaH1aH6(strHtmlSource) != 0) {\r\n\r\n\t\t\t\t\t\t\tArmazenaErroOuAvisoAntigo v = new ArmazenaErroOuAvisoAntigo();\r\n\r\n\t\t\t\t\t\t\tv.setPv3(217);\r\n\r\n\t\t\t\t\t\t\tv.setProcurado(\"\");\r\n\r\n\t\t\t\t\t\t\tv.setTag(true);\r\n\r\n\t\t\t\t\t\t\ttemp.add(v);\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\tif (!regras.verificaTamFixoEmAtributoStyle(tagCompleta)) {\r\n\r\n\t\t\t\t\t\tArmazenaErroOuAvisoAntigo v = new ArmazenaErroOuAvisoAntigo();\r\n\r\n\t\t\t\t\t\tv.setPv3(179);\r\n\r\n\t\t\t\t\t\tv.setProcurado(\"\");\r\n\r\n\t\t\t\t\t\tv.setTag(true);\r\n\r\n\t\t\t\t\t\ttemp.add(v);\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (nomeTag.toLowerCase().equals(\"textarea\")) {\r\n\r\n\t\t\t\t\t\tif (!regras.verificaTextoPredefinidoTextarea(strHtmlSource, tagCompleta)) {\r\n\r\n\t\t\t\t\t\t\tArmazenaErroOuAvisoAntigo v = new ArmazenaErroOuAvisoAntigo();\r\n\r\n\t\t\t\t\t\t\tv.setPv3(134);\r\n\r\n\t\t\t\t\t\t\tv.setProcurado(\"\");\r\n\r\n\t\t\t\t\t\t\tv.setTag(true);\r\n\r\n\t\t\t\t\t\t\ttemp.add(v);\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\tif (nomeTag.toLowerCase().equals(\"frame\")) {\r\n\r\n\t\t\t\t\t\tif (!regras.verificaLongDesc(tagCompleta)) {\r\n\r\n\t\t\t\t\t\t\tArmazenaErroOuAvisoAntigo v = new ArmazenaErroOuAvisoAntigo();\r\n\r\n\t\t\t\t\t\t\tv.setPv3(212);\r\n\r\n\t\t\t\t\t\t\tv.setProcurado(\"\");\r\n\r\n\t\t\t\t\t\t\tv.setTag(true);\r\n\r\n\t\t\t\t\t\t\ttemp.add(v);\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\tif (nomeTag.toLowerCase().equals(\"a\")) {\r\n\r\n\t\t\t\t\t\tif (!regras.verificaSeparadorEmLink(strHtmlSource)) {\r\n\r\n\t\t\t\t\t\t\t// System.out.println(\"oi\");\r\n\r\n\t\t\t\t\t\t\tArmazenaErroOuAvisoAntigo v = new ArmazenaErroOuAvisoAntigo();\r\n\r\n\t\t\t\t\t\t\tv.setPv3(259);\r\n\r\n\t\t\t\t\t\t\tv.setProcurado(\"\");\r\n\r\n\t\t\t\t\t\t\tv.setTag(true);\r\n\r\n\t\t\t\t\t\t\ttemp.add(v);\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\t/*\r\n\t\t\t\t * No de abertura, ele apenas prossegue a pesquisa com os seus\r\n\t\t\t\t * filhos.\r\n\t\t\t\t */\r\n\t\t\t\tif (type == Node.DOCUMENT_NODE) {\r\n\r\n\t\t\t\t\tloopingChildren(((Document) documento).getDocumentElement());\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * No normal, que deve ser avaliado.\r\n\t\t\t\t */\r\n\t\t\t\telse if (type == Node.ELEMENT_NODE) {\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Guarda o nome da tag para que depois ela possa ser feito\r\n\t\t\t\t\t * o teste se ha uma tag especifica no documento.\r\n\t\t\t\t\t */\r\n\t\t\t\t\ttag.add(documento.getNodeName().toUpperCase());\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Avalia a tag e recebe uma lista de erros.\r\n\t\t\t\t\t */\r\n\t\t\t\t\ttemp.addAll(this.validar.validar(documento));\r\n\r\n\t\t\t\t\tif (temp != null) {\r\n\r\n\t\t\t\t\t\t// informa qual � a tag corrente\r\n\t\t\t\t\t\tcurrentTagName = documento.getNodeName().toLowerCase();\r\n\r\n\t\t\t\t\t\t// Se houver erro guarde ele.\r\n\t\t\t\t\t\tavaliar(temp);\r\n\r\n\t\t\t\t\t\t// System.out.print(\"erro no \" + documento.getNodeName()\r\n\t\t\t\t\t\t// +\"\\n\");\r\n\r\n\t\t\t\t\t\tif (documento.getNodeName().toUpperCase().equals(\"IMG\")) {\r\n\r\n\t\t\t\t\t\t\t// Node\r\n\t\t\t\t\t\t\t// src=documento.getAttributes().getNamedItem(\"src\");\r\n\t\t\t\t\t\t\t// System.out.print(\"img \" + src.getNodeValue()\r\n\t\t\t\t\t\t\t// +\"\\n\");\r\n\r\n\t\t\t\t\t\t} else if (documento.getNodeName().toUpperCase().equals(\"OPTION\")) {\r\n\r\n\t\t\t\t\t\t\t// Node\r\n\t\t\t\t\t\t\t// src=documento.getAttributes().getNamedItem(\"value\");\r\n\t\t\t\t\t\t\t// System.out.print(\"option '\" + src.getNodeValue()\r\n\t\t\t\t\t\t\t// +\"'\\n\");\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\t/*\r\n\t\t\t\t\t * Se tiver filhos busque-os.\r\n\t\t\t\t\t */\r\n\t\t\t\t\tNodeList children = documento.getChildNodes();\r\n\r\n\t\t\t\t\tif (children != null) {\r\n\r\n\t\t\t\t\t\tint len = children.getLength();\r\n\r\n\t\t\t\t\t\tfor (int pos = 0; pos < len; pos++) {\r\n\r\n\t\t\t\t\t\t\ttry {\r\n\r\n\t\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t\t * Para cada filho eh feito uma nova consulta.\r\n\t\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\t\tloopingChildren(children.item(pos));\r\n\r\n\t\t\t\t\t\t\t} catch (Error e) {\r\n\r\n\t\t\t\t\t\t\t\tthrow new Exception(\"Erro de overflow\");\r\n\r\n\t\t\t\t\t\t\t}\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}", "public <T> void introspect(Operation<T> operation, Method method, ValidationContext context) {\n DataType<List<DataType<T>>> inputType = operation.getInputType();\n for (DataType<?> type : inputType.getLogical()) {\n if (isJAXB(type)) {\n operation.addIntent(JAXBConstants.DATABINDING_INTENT);\n return;\n }\n }\n }", "private IndexOperations getIndexOperations() {\n return elasticsearchOperations.indexOps(itemClazz);\n }", "@Override\n @Transactional(readOnly = true)\n public List<OperationDTO> findAll() {\n log.debug(\"Request to get all Operations\");\n return operationRepository.findAll().stream()\n .map(operationMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "public static void main(String[] args) {\n\t\ttry {\n//\t\t\tExtractorXML xml = new ExtractorXML(\"./TLf6PpaaExclBrkdnD-sqlMap.xml\", \"utf-8\");\n\t\t\tExtractorXML xml = new ExtractorXML(\"D:/tmp/test.xml\",\"utf-8\");\n\n\n\t\t\tTObj nd = xml.doAnalyze();\n\n\t\t\txml.dump(\"c:\\\\a.out\");\n/*\t\t\tfor ( int i = 0; ; i ++) {\n\t\t\tif (xml.getAttributeValue(\"/sqlMap/insert[\" + i +\"]\", \"id\") == null)\n\t\t\t\tbreak;\n\t\t\tSystem.out.println(xml.getAttributeValue(\"/sqlMap/insert[\" + i +\"]\", \"id\"));\n\t\t\t}*/\n\n\t\t//System.out.println(\"!!\" + rootnode.getNodeValue(\"/navigation/action[\" + 3 +\"]\"));\n\n\t\t\tSystem.out.println(\"root=\"+xml.getRootName());\n//\t\tArrayList arr = node_list.get(3).sublist;\n\n/*\t\tfor(int i = 0; i < arr.size() ; i ++){\n\n\t\t\tnode_data ndd = (node_data)arr.get(i);\n\t\t\tif(ndd.nodename.equals(\"command\") ){\n\t\t\t\t//System.out.println(ndd.tlocation.getStartLine() + \" :: \" + ndd.nodename + \" :: \" + ndd.tlocation.getEndLine());\n\t\t\t\tfor(int j =0; j < ndd.sublist.size() ; j ++){\n\t\t\t\t\tSystem.out.println(ndd.sublist.get(j).nodename);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n*/\n\t\t/*\tfor(int j =0 ; j < node_list.size(); j ++){\n\n\t\t\tnode_data nd = (node_data)node_list.get(j);\n\t\t\tSystem.out.println(nd.keylist.get(0).value + \" TLOCATION start :: \" + nd.tlocation.getStartLine() + \" TLOCATION end :: \" + nd.tlocation.getEndLine());\n\t\t}\n\t\tSystem.out.println(rootnode.sublist.get(0).tlocation.getStartLine() + \" \"+ rootnode.sublist.get(0).tlocation.getEndLine());\n\t\t */\n\t\t\t// xml.log.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "public static OperationContext parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n OperationContext object =\n new OperationContext();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"OperationContext\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (OperationContext)org.apache.axis2.transaction.xsd.ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n java.util.ArrayList list6 = new java.util.ArrayList();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"axisOperation\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setAxisOperation(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setAxisOperation(org.apache.axis2.description.xsd.AxisOperation.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"complete\").equals(reader.getName())){\n \n java.lang.String content = reader.getElementText();\n \n object.setComplete(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content));\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"configurationContext\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setConfigurationContext(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setConfigurationContext(org.apache.axis2.context.xsd.ConfigurationContext.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"key\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setKey(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"logCorrelationIDString\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setLogCorrelationIDString(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"messageContexts\").equals(reader.getName())){\n \n \n \n // Process the array and step past its final element's end.\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n list6.add(null);\n \n reader.next();\n } else {\n list6.add(reader.getElementText());\n }\n //loop until we find a start element that is not part of this array\n boolean loopDone6 = false;\n while(!loopDone6){\n // Ensure we are at the EndElement\n while (!reader.isEndElement()){\n reader.next();\n }\n // Step out of this element\n reader.next();\n // Step to next element event.\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n if (reader.isEndElement()){\n //two continuous end elements means we are exiting the xml structure\n loopDone6 = true;\n } else {\n if (new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"messageContexts\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n list6.add(null);\n \n reader.next();\n } else {\n list6.add(reader.getElementText());\n }\n }else{\n loopDone6 = true;\n }\n }\n }\n // call the converter utility to convert and set the array\n \n object.setMessageContexts((java.lang.String[])\n list6.toArray(new java.lang.String[list6.size()]));\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"operationName\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setOperationName(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"rootContext\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setRootContext(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setRootContext(org.apache.axis2.context.xsd.ConfigurationContext.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"serviceContext\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setServiceContext(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setServiceContext(org.apache.axis2.context.xsd.ServiceContext.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"serviceGroupName\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setServiceGroupName(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\"serviceName\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setServiceName(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Override\n\tpublic OpIterator[] getChildren() {\n\t\tOpIterator[] childOperators = new OpIterator[1];\n\t\tchildOperators[0] = childOperator;\n\t\treturn childOperators;\n\t}", "private void processStandoffMarkup(Document docExtra) {\n\t\tDOMSnapshot snapExtra = new DOMSnapshot(docExtra, docRoot, new XMLDialect());\n\t\tfor (ITSState itssExtra : snapExtra.iterNodes()) {\n\t\t\tRuleResolver resolver = resolvers.get(itssExtra.node.getNodeName()); \n\t\t\tif (resolver != null) {\n\t\t\t\tGlobalRule rule = resolver.extractRule(snapExtra.attrReader, snapExtra.parameters, itssExtra.node);\n\t\t\t\tapplyRule(resolver, rule);\n\t\t\t}\n\t\t\t\n\t\t\tif (itssExtra.node.getNodeName().equals(\"its:param\")) {\n\t\t\t\tString name = itssExtra.node.getAttributes().getNamedItem(\"name\").getNodeValue();\n\t\t\t\tString value = itssExtra.node.getTextContent();\n\t\t\t\tparameters.add(name, value);\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public final FxNodeCursor iterateChildren() {\n FxNode n = currentNode();\n if (n == null) throw new IllegalStateException(\"No current node\");\n if (n.isArray()) { // false since we have already returned START_ARRAY\n return new FxArrayCursor((FxArrayNode) n, this);\n }\n if (n.isObject()) {\n return new FxObjectCursor((FxObjNode) n, this);\n }\n throw new IllegalStateException(\"Current node of type \"+n.getClass().getName());\n }", "public void iterate(){//iterate over all the keys\n\t\tSystem.out.println(\"Keys are :\");\n\t\tSystem.out.println(\"-----------------------\");\n\t\titerate(this.root);\n\t\tSystem.out.println(\"-----------------------\");\n\t}", "private List<MutateOperation> removeAll() {\n return removeDescendantsAndFilter(rootResourceName);\n }", "Iterable<? extends XomNode> elements();", "public void iterate() {\n\t\t// iterator\n\t\tQueue<NDLMapEntryNode<T>> nodes = new LinkedList<NDLMapEntryNode<T>>();\n\t\tnodes.add(rootNode);\n\t\twhile(!nodes.isEmpty()) {\n\t\t\t// iterate BFSwise\n\t\t\tNDLMapEntryNode<T> node = nodes.poll();\n\t\t\tif(node.end) {\n\t\t\t\t// end of entry, call processor\n\t\t\t\tif(keyProcessor != null) {\n\t\t\t\t\tkeyProcessor.process(node.data);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(node.keys != null) {\n\t\t\t\t// if available\n\t\t\t\tnodes.addAll(node.keys.values()); // next nodes to traverse\n\t\t\t}\n\t\t}\n\t}", "public List getResult() {\n // Flush remaining text content in case the last text segment is\n // outside an element.\n try {\n this.flushCharacters();\n }\n catch (SAXException e) { /* Ignore... */ }\n return this.getDetachedContent(dummyRoot);\n }", "protected void parseRootElement() {\n\n // This is the Activiti method body for parsing through the XML object model\n // The Joda Engine needs less information than Activiti. That's why some methods are commented out.\n parseProcessDefinitions();\n }", "void process(JsonNode document);", "@Override\r\n\tpublic List<ComputeNodeDesc> getAllComputeNodes(Identifier opId) {\n\t\treturn null;\r\n\t}", "void applyExtensions(ReaderContext context, Operation operation, Method method);", "List<CoreWaveletOperation> toCoreWaveletOperations() {\n List<CoreWaveletOperation> operations = new ArrayList<CoreWaveletOperation>();\n for (SegmentId segment : segmentsToRemove) {\n operations.add(new CoreRemoveSegment(segment));\n }\n for (SegmentId segment : segmentsToAdd) {\n operations.add(new CoreAddSegment(segment));\n }\n for (SegmentId segment : segmentsToEndModifying) {\n operations.add(new CoreEndModifyingSegment(segment));\n }\n for (SegmentId segment : segmentsToStartModifying) {\n operations.add(new CoreStartModifyingSegment(segment));\n }\n for (ParticipantId participant : participantsToRemove) {\n operations.add(new CoreRemoveParticipant(participant));\n }\n for (ParticipantId participant : participantsToAdd) {\n operations.add(new CoreAddParticipant(participant));\n }\n for (DocumentOperations documentOps : docOps) {\n operations.add(new CoreWaveletDocumentOperation(documentOps.id,\n documentOps.operations.composeAll()));\n }\n return operations;\n }", "@Override\r\n\tpublic E2ECheckpointElements getElements() {\n\t\treturn this.content;\r\n\t}", "public ClsNodeDocument[] GetDocuments (String tIDorDataFlow, boolean isTransID);", "public DataStructure getOperations() {\r\n\t\tif (ports == null) {\r\n\t\t\treturn EmptyStructures.EMPTY_STRUCTURE;\r\n\t\t}\r\n\t\tList l = new ArrayList();\r\n\t\tfor (Iterator it = ports.values().iterator(); it.hasNext();) {\r\n\t\t\tWSDLPort port = (WSDLPort) it.next();\r\n\t\t\tl.addAll(port.getOperations());\r\n\t\t}\r\n\t\treturn l;\r\n\t}", "@Override\n public void visit(final OpExtend opExtend) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpExtend\");\n }\n addOp(OpExtend.extend(rewriteOp1(opExtend), opExtend.getVarExprList()));\n }", "public Iterator<T> byGenerations() {\r\n ArrayIterator<T> iter = new ArrayIterator<T>();\r\n\r\n for (int i = 0; i < SIZE; i++) {\r\n iter.add(tree[i]);\r\n }\r\n\r\n return iter;\r\n }", "public static java.util.Collection getOperationDescs() {\r\n return _myOperationsList;\r\n }", "private Document doMerge(Document[] docs) throws AbstractXmlMergeException\n {\n Document originalDoc = docs[0];\n\n for (int i = 1; i < docs.length; i++)\n {\n\n if (!m_rootMatcher.matches(originalDoc.getRootElement(), docs[i].getRootElement()))\n {\n throw new IllegalArgumentException(\"Root elements do not match.\");\n }\n\n Document output = new Document();\n if (originalDoc.getDocType() != null)\n {\n output.setDocType((DocType) originalDoc.getDocType().clone());\n }\n output.setRootElement(new Element(\"root\"));\n\n m_rootMergeAction.perform(originalDoc.getRootElement(), docs[i].getRootElement(),\n output.getRootElement());\n\n Element root = (Element) output.getRootElement().getChildren().get(0);\n root.detach();\n\n originalDoc.setRootElement(root);\n }\n\n return originalDoc;\n }", "OperationNode getNode();", "@Transactional(propagation = Propagation.REQUIRED, value = \"jamiTransactionManager\", readOnly = true)\n public Iterator<Experiment> iterateAll() {\n return new IntactQueryResultIterator<Experiment>((ExperimentService) ApplicationContextProvider.getBean(\"experimentService\"));\n }", "private void convert() {\n\t\tList<Node> e = findNextElements();\n\t\twhile(e != null) {\n\t\t\tNode parent = e.get(0).getParentNode();\n\t\t\tNode apply = doc.createElement(\"apply\");\n\t\t\tparent.insertBefore(apply, e.get(0));\n\t\t\tString fun = e.get(0).getTextContent().equals(\"|\")? \"abs\" : \"ceiling\";\n\t\t\tapply.appendChild(doc.createElement(fun));\n\t\t\tfor(Node n : e) {\n\t\t\t\tapply.appendChild(n);\n\t\t\t}\n\t\t\tapply.removeChild(e.get(0));\n\t\t\tapply.removeChild(e.get(e.size() - 1));\n\t\t\te = findNextElements();\n\t\t}\n\t}", "private Collection<? extends RestModel> getRepoOrFolderChildren(AuthorizationService authService, boolean isCompact,\n ArtifactoryRestRequest request) {\n Collection<? extends RestTreeNode> items = getChildren(authService, isCompact, request);\n List<RestModel> treeModel = new ArrayList<>();\n items.forEach(item -> {\n // update additional data\n ((INode) item).updateNodeData();\n treeModel.add(item);\n });\n return treeModel;\n }", "private Collection<? extends RestModel> getRepoOrFolderChildren(AuthorizationService authService, boolean isCompact,\n ArtifactoryRestRequest request) {\n Collection<? extends RestTreeNode> items = getChildren(authService, isCompact, request);\n List<RestModel> treeModel = new ArrayList<>();\n items.forEach(item -> {\n // update additional data\n ((INode) item).updateNodeData();\n treeModel.add(item);\n });\n return treeModel;\n }", "@Override\n public void process(IeDocument document) {\n\n }", "AggregateOperation() {\n segmentsToRemove = Collections.emptyList();\n segmentsToAdd = Collections.emptyList();\n segmentsToEndModifying = Collections.emptyList();\n segmentsToStartModifying = Collections.emptyList();\n participantsToRemove = Collections.emptyList();\n participantsToAdd = Collections.emptyList();\n docOps = Collections.emptyList();\n }", "protected void executeSchemaOperations() {\n }", "Object getDocumentNode(Object contextNode);", "public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n return new InterAggrIterator();\n }", "AggregateOperation invert() {\n List<DocumentOperations> invertedDocOps = new ArrayList<DocumentOperations>(docOps.size());\n for (DocumentOperations operations : docOps) {\n invertedDocOps.add(new DocumentOperations(operations.id, invert(operations.operations)));\n }\n return new AggregateOperation(segmentsToAdd, segmentsToRemove, segmentsToStartModifying, segmentsToEndModifying,\n participantsToAdd, participantsToRemove, invertedDocOps);\n }", "@Override\r\n\tpublic String toString()\r\n\t{\r\n\t\treturn rootOperation.toString();\r\n\t}", "@SuppressWarnings(\"unused\") \n\tprivate void extractChanges(Node commit_node, RevCommit m) throws Exception\n\t{\n\n\t\tList<String> commitIds = new ArrayList<String>(); \n\n\t\tcommitIds.add(m.toObjectId().getName());\n\t\t\n\t\tCommitInfoExtractor cie = new CommitInfoExtractor();\n\t\tcie.extractFeatureChanges(commitIds);\n\t\tList<EvolutionStep>steps = cie.getSteps();\n\t\t\n\t\ttry(Transaction tx = DBConnection.getService().beginTx())\n\t\t{\n\t\t\tfor(EvolutionStep step : steps)\n\t\t\t{\n\t\t\t\tFileChangeExtractor file_changes = new FileChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> file_nodes = file_changes.addFileChangesToCommit(step.files, commit_node);\n\t\t\t\t\n\t\t\t\tVMChangeExtractor vm_changes = new VMChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> vm_nodes = vm_changes.addVMChangesToCommit(step.fm_changes, commit_node);\n\t\t\t\t\n\t\t\t\tBuildChangeExtractor build_changes = new BuildChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> build_nodes = build_changes.addBuildChangesToCommit(step.build_changes, commit_node);\n\t\t\t\t\n\t\t\t\tCodeChangeExtractor code_changes = new CodeChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> code_nodes = code_changes.addCodeChangesToCommit(step.impl_changes, commit_node);\n\n//\t\t\t\tList<EvolutionStep> local = new ArrayList<EvolutionStep>(); local.add(step);\n//\t\t\t\tFeatureOrientedChangeExtractor dataextractor = new FeatureOrientedChangeExtractor(local);\n//\t\t\t\tdataextractor.buildFeatureChanges();\n//\t\t\t\t\n//\t\t\t\tList<FeatureOrientedChange> changes = dataextractor.getFeatureChanges();\n//\t\n//\t\t\t\tList<Node> focs = new ArrayList<Node>();\n//\t\t\t\tfor(FeatureOrientedChange c : changes)\n//\t\t\t\t{\n//\t\t\t\t\tNode foc_node = createFeatureOrientedChangeForCommit(c);\n//\t\t\t\t\tfocs.add(foc_node);\n//\t\t\t\t\tlink_file_and_vm_changes(c,foc_node,file_nodes, vm_nodes,build_nodes,code_nodes); \n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t\tMap<String,Node> known_focs = buildFOCMap(focs);\n//\t\t\t\tlink_mapping_artefacts(known_focs,build_nodes);\n//\t\t\t\tlink_code_artefacts(known_focs,code_nodes);\n\t\t\t}\n\t\t\ttx.success();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tthrow new Exception(\"Failed to create Neo4j nodes - \", e);\n\t\t}\n\t}", "private void startParsing(){\r\n pondred = new ArrayList<>();\r\n //extract docs from corpus\r\n for (String xml:parseDocsFile(docs_file))\r\n {\r\n try {\r\n pondred.add(loadXMLFromString(xml));\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n System.out.println(\"Ending parsing\");\r\n for (Core pon:pondred){\r\n for (String string:pon.abstractTerm){\r\n Double tf = pon.getAbstractFerq(string)/pon.getAbstractSize();\r\n Double idf = Math.log10(Core.count/countingDuplicates(string));\r\n pon.abstractFrequence.put(string,tf*idf);\r\n }\r\n pon.finish();\r\n }\r\n }", "Map<Element, Map<Element, Element>> getOperationMap();", "public void setOperations(List<OperationImplementation> operations) {\n List<Map<String, Serializable>> operationsSerializable = new ArrayList<Map<String, Serializable>>();\n for (OperationImplementation operation : operations) {\n Map<String, Serializable> operationSerializable = new HashMap<String, Serializable>();\n operationSerializable.put(OPERATION_NAME, operation.getName());\n operationSerializable.put(OPERATION_DOCUMENTATION, operation.getDocumentation());\n operationSerializable.put(OPERATION_PARAMETERS, operation.getParameters());\n operationsSerializable.add(operationSerializable);\n }\n properties.put(XPATH_OPERATIONS, (Serializable) operationsSerializable);\n }", "public ObservableList<Operation> getOperations() {\n\t\treturn operations;\n\t}", "private void parseXMLDocument(final Document doc)\r\n {\r\n Node docRoot = doc.getDocumentElement();\r\n StringBuilder indent = new StringBuilder();\r\n\r\n fullXmlTree.append(\"<\" + docRoot.getNodeName() + \">\\n\");\r\n searchTreeFromBranch(docRoot, 0, indent);\r\n fullXmlTree.append(\"</\" + docRoot.getNodeName() + \">\\n\");\r\n\r\n if (getPrintFullTree())\r\n {\r\n printFullTree();\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n private static void parseActions() throws DataConversionException {\n \t\n \tlogger.info(\"Parsing actions !\");\n \t\n imagingActions = new ArrayList<ImagingAction>();\n \n SAXBuilder sxb = new SAXBuilder();\n Document document = null;\n try {\n String url = \"imaging-fdsdocument-actions.xml\";\n URI uri = ImagingActionsParser.class.getClassLoader().getResource(url).toURI();\n File actionsFileDefinition = new File(uri);\n document = sxb.build(actionsFileDefinition);\n } catch (Exception e) {\n logger.error(\"Cannot parse imaging actions xml !\");\n }\n\n Element racine = document.getRootElement();\n List<Element> actions = (List<Element>) racine.getChildren(\"action\");\n Iterator<Element> actionsIterator = actions.iterator();\n while (actionsIterator.hasNext()) {\n Element currentAction = actionsIterator.next();\n \n //Constructor put default values\n ImagingAction imagingAction = new ImagingAction();\n //ACTION NAME\n imagingAction.setName(currentAction.getChild(\"name\").getText());\n //ACTION TYPE\n Attribute attrType = currentAction.getAttribute(\"type\");\n if (attrType != null) {\n imagingAction.setType(attrType.getValue());\n if (attrType.getValue().equals(\"url\")) {\n \t//ACTION URL TARGET\n \tAttribute attrTarget = currentAction.getAttribute(\"target\");\n \timagingAction.setUrlTarget(attrTarget.getValue());\n }\n }\n //ACTION URL\n Element urlElement = currentAction.getChild(\"url\");\n if (urlElement != null) {\n imagingAction.setUrl(urlElement.getText());\n }\n //ACTION EVALUATOR\n Element evaluatorsElement = currentAction.getChild(\"evaluators\");\n if (evaluatorsElement != null) {\n\t List<Element> evaluators = (List<Element>) evaluatorsElement.getChildren(\"evaluator\");\n\t Iterator<Element> evalIterator = evaluators.iterator();\n\t while (evalIterator.hasNext()) {\n\t Element evaluator = evalIterator.next();\n\t Attribute negateAttribute = evaluator.getAttribute(\"negate\");\n\t boolean negate = false;\n\t if (negateAttribute != null && negateAttribute.getBooleanValue()) {\n\t negate = true;\n\t }\n\t imagingAction.addEvaluator(new ImagingActionEvaluator(evaluator.getText(), negate));\n\t }\n }\n //ACTION DISPLAY VIEWS\n Element displayElement = currentAction.getChild(\"display\");\n if (displayElement != null) {\n\t List<Element> views = (List<Element>) displayElement.getChildren(\"view\");\n\t Iterator<Element> viewIterator = views.iterator();\n\t while (viewIterator.hasNext()) {\n\t Element view = viewIterator.next();\n\t imagingAction.addView(view.getText());\n\t }\n }\n imagingActions.add(imagingAction);\n }\n }", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllInterpretedBy_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), INTERPRETEDBY);\r\n\t}", "public List<OperationStatusResultInner> operations() {\n return this.operations;\n }", "public void applyToAncestors( Operation operation ) {\n PlanNode ancestor = getParent();\n while (ancestor != null) {\n operation.apply(ancestor);\n ancestor = ancestor.getParent();\n }\n }", "private void buildObject(Element current) {\n\t\tList<Element> children = current.getChildren();\n\t\tIterator<Element> iterator = children.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tElement child = iterator.next();\n\t\t\tString category = child.getAttributeValue(\"description\");\n\t\t\tString reference = child.getAttributeValue(\"reference\");\n\n\t\t\tEplusObject ob = new EplusObject(category, reference);\n\t\t\tprocessFields(child, ob);\n\t\t\tobjects.add(ob);\n\t\t}\n\t}", "Operation getOperation();", "private void rootTreeIterate(Element rootNode) throws DocumentException {\n\n Iterator rootIterator = rootNode.elementIterator();\n\n while (rootIterator.hasNext()) {\n\n Element node = (Element) rootIterator.next();\n\n if (node.getName().equals(TABLE_NODE)) {\n processTableNode(node);\n } else if (node.getName().equals(CLASS_NODE)) {\n processClassNode(node);\n } else if (node.getName().equals(CLASS_PARENT_NODE)) {\n processClassParentNode(node);\n } else if (node.getName().equals(PROPERTY_NODE)) {\n processPropertyNode(node);\n } else if (node.getName().equals(PROPERTY_PARENT_NODE)) {\n processPropertyParentNode(node);\n } else {\n throw new DocumentException(\"Node with illegal name \\\"\" + node.getName() + \"\\\" found\");\n }\n }\n }", "Iterator getDescendantAxisIterator(Object contextNode) throws UnsupportedAxisException;", "@Override\n public List<IExpression> getElements() {\n return elements;\n }", "@Override\n\tpublic void operation() {\n\t\tfor(Object object:list) {\n\t\t\t((Component)object).operation();\n\t\t}\n\t}", "public abstract Iterable<String> addDocument(TextDocument doc) throws IOException;", "@Override\n\tpublic Document patchIEResults(Document doc) {\n\t\tif (doc.getInitial_event() != null) {\n\t\t\tList<Paragraph> originalp = doc.getInitial_event();\n\t\t\toriginalp = patchDocLevel(originalp);\n\t\t\tdoc.setInitial_event(originalp);\n\t\t}\n\t\tif (doc.getInclusion_criteria() != null) {\n\t\t\tList<Paragraph> originalp = doc.getInclusion_criteria();\n\t\t\toriginalp = patchDocLevel(originalp);\n\t\t\tdoc.setInclusion_criteria(originalp);\n\t\t}\n\t\tif (doc.getExclusion_criteria() != null) {\n\t\t\tList<Paragraph> originalp = doc.getExclusion_criteria();\n\t\t\toriginalp = patchDocLevel(originalp);\n\t\t\tdoc.setExclusion_criteria(originalp);\n\t\t}\n\t\treturn doc;\n\t}", "public void parse(){\n\n Integer childStart = this.findNewElement(0, this.document.length - 1);\n if(childStart == null){\n return;\n }\n\n this.root.removeData();\n this.copyTextToDocumentTree(this.root, 0, childStart - 1);\n\n DocumentSectionType childType = this.getType(childStart);\n\n do {\n Integer end = this.findNextSameLevelElement(childStart + 1, childType);\n //now we have boundaries of our new element, so let's grab it's index\n //we need appropriate matcher\n\n Matcher childMatcher = childType.getPattern().matcher(this.document[childStart]);\n childMatcher.find();\n DocumentTree child = new DocumentTree(childType, childMatcher.group(1), null);\n\n //now clear first line\n try{\n String group2 = childMatcher.group(2);\n this.document[childStart] = group2 != null ? group2 + \" \" : \"\";\n }catch(IndexOutOfBoundsException e){\n this.document[childStart] = \"\";\n }\n try {\n this.document[childStart] += childMatcher.group(3);\n }catch(IndexOutOfBoundsException e){\n this.document[childStart] += \"\";\n }\n //and copy it's text\n this.copyTextToDocumentTree(child, childStart, end - 1);\n root.addChild(child);\n //finally, parse it\n DocumentParser childParser = new DocumentParser(child, joinChapterWithChapterNames);\n childParser.parse();\n\n childStart = end;\n }while(childStart != this.document.length);\n\n if(this.root.getType() == DocumentSectionType.CHAPTER && this.joinChapterWithChapterNames){\n DocumentTree nameNode = (DocumentTree)this.root.getChildren().get(0);\n this.root.removeData();\n this.root.appendData(nameNode.getIndex());\n this.root.replaceChild(nameNode, nameNode.getChildren());\n }\n\n }", "AggregateOperation(WaveletBlipOperation op) {\n segmentsToRemove = Collections.emptyList();\n segmentsToAdd = Collections.emptyList();\n segmentsToEndModifying = Collections.emptyList();\n segmentsToStartModifying = Collections.emptyList();\n participantsToRemove = Collections.emptyList();\n participantsToAdd = Collections.emptyList();\n if (op.getBlipOp() instanceof BlipContentOperation) {\n docOps = Collections.singletonList(\n new DocumentOperations(\n op.getBlipId(),\n new DocOpList.Singleton(((BlipContentOperation) op.getBlipOp()).getContentOp())));\n } else {\n docOps = Collections.emptyList();\n }\n }", "Iterator getDescendantOrSelfAxisIterator(Object contextNode) throws UnsupportedAxisException;", "@GET\r\n @Produces({MediaType.APPLICATION_XML})\r\n public Set<Document> findAll() throws InternalServerErrorException{\r\n LOGGER.info(\"Peticion de todos los documentos\");\r\n Set<Document> collection = null;\r\n try {\r\n collection = ejb.getDocumentList();\r\n } catch (GetCollectionException ex) {\r\n LOGGER.warning(\"ERROR en la obtencion de la lista de documentos\");\r\n throw new InternalServerErrorException();\r\n }\r\n LOGGER.info(\"Respuesta de obtencion de lista de documentos\");\r\n return collection;\r\n }", "@Test\n public void test_compteAvecOperations(){\n \t\n \tCompte c = serviceCompte.rechercherCompteAvecOperations(1L);\n \tSystem.out.println(\"compte_1 : \"+c);\n \tfor(Operation op : c.getOperations()){\n \t\tSystem.out.println(\"\\t\"+op);\n \t}\n \tAssert.assertTrue(c.getOperations().size()>0);\n }", "protected OperationsMetadata parseOperationsMetadata( OnlineResource defaultOnlineResource )\n throws XMLParsingException,\n InvalidCapabilitiesException {\n\n Node operationMetadata = XMLTools.getRequiredNode( getRootElement(), PRE_OWS + \"OperationsMetadata\", nsContext );\n List<Node> operationElementList = XMLTools.getNodes( operationMetadata, PRE_OWS + \"Operation\", nsContext );\n\n Map<String, Element> operations = new HashMap<String, Element>();\n for ( int i = 0; i < operationElementList.size(); i++ ) {\n operations.put( XMLTools.getRequiredNodeAsString( operationElementList.get( i ), \"@name\", nsContext ),\n (Element) operationElementList.get( i ) );\n }\n\n Operation110 getCapabilities = getOperation110( OperationsMetadata.GET_CAPABILITIES_NAME,\n true,\n operations,\n defaultOnlineResource );\n Operation110 getView = getOperation110( WPVSOperationsMetadata.GET_VIEW_NAME,\n true,\n operations,\n defaultOnlineResource );\n Operation110 getDescription = getOperation110( WPVSOperationsMetadata.GET_DESCRIPTION_NAME,\n false,\n operations,\n defaultOnlineResource );\n\n Operation110 get3DFeatureInfo = getOperation110( WPVSOperationsMetadata.GET_3D_FEATURE_INFO,\n false,\n operations,\n defaultOnlineResource );\n\n Operation110 getLegendGraphics = getOperation110( WPVSOperationsMetadata.GET_LEGEND_GRAPHIC_NAME,\n false,\n operations,\n defaultOnlineResource );\n\n List<Node> parameterElementList = XMLTools.getNodes( operationMetadata, PRE_OWS + \"Parameter\", nsContext );\n OWSDomainType110[] parameters = new OWSDomainType110[parameterElementList.size()];\n for ( int i = 0; i < parameters.length; i++ ) {\n parameters[i] = getOWSDomainType110( (Element) parameterElementList.get( i ) );\n }\n\n List<Node> constraintElementList = XMLTools.getNodes( operationMetadata, PRE_OWS + \"Constraint\", nsContext );\n OWSDomainType110[] constraints = new OWSDomainType110[constraintElementList.size()];\n for ( int i = 0; i < constraints.length; i++ ) {\n constraints[i] = getOWSDomainType110( (Element) constraintElementList.get( i ) );\n }\n\n List<Node> extendedCapsList = XMLTools.getNodes( operationMetadata, PRE_OWS + \"ExtendedCapabilities\", nsContext );\n Object[] extendedCapabilities = new Object[extendedCapsList.size()];\n for ( int i = 0; i < extendedCapabilities.length; i++ ) {\n extendedCapabilities[i] = extendedCapsList.get( i );\n }\n\n WPVSOperationsMetadata metadata = new WPVSOperationsMetadata( getCapabilities,\n getView,\n getDescription,\n getLegendGraphics,\n parameters,\n constraints,\n extendedCapabilities,\n get3DFeatureInfo );\n\n return metadata;\n }", "@Override\n\tpublic Page<Operation> listeOperation(String codeCompte, int page, int size) {\n\t\treturn operationrepository.listOperation(codeCompte, PageRequest.of(page, size));\n\t}", "@Override\n public Iterator<T> iterator() {\n return new IteratorTree(this.root, this.modCount);\n }", "@Override\n public int getOperationsApplied() {\n return operationsApplied;\n }", "@Override\n public void startUpOperations() {\n }" ]
[ "0.6128879", "0.6059279", "0.5989023", "0.5598431", "0.5344307", "0.531004", "0.530384", "0.52856624", "0.5248519", "0.5244817", "0.52242875", "0.51984406", "0.51218235", "0.51197654", "0.5098788", "0.5089017", "0.5036594", "0.50101465", "0.49981213", "0.49550033", "0.49510044", "0.49349082", "0.49191234", "0.49125296", "0.4910041", "0.48968408", "0.4884055", "0.48786968", "0.48668516", "0.48668516", "0.48668516", "0.48613706", "0.4859199", "0.4852568", "0.48502246", "0.48468676", "0.48399243", "0.4828532", "0.4798911", "0.4777184", "0.47769344", "0.47752205", "0.4774186", "0.47728914", "0.47691354", "0.4762248", "0.4757739", "0.47563237", "0.474361", "0.47425288", "0.47413123", "0.47387046", "0.4732108", "0.4721874", "0.4721463", "0.47198996", "0.4709565", "0.4696623", "0.4672553", "0.46690735", "0.46594903", "0.46547675", "0.46486658", "0.4648125", "0.4648125", "0.4626492", "0.46241936", "0.46241122", "0.46234566", "0.4623286", "0.46195102", "0.4614451", "0.46133795", "0.46030977", "0.46018842", "0.46017414", "0.4596381", "0.45898485", "0.45864362", "0.45850968", "0.4578716", "0.4577678", "0.45759282", "0.4573391", "0.45713067", "0.4570779", "0.45680425", "0.45625597", "0.45618394", "0.45568052", "0.45551503", "0.45510808", "0.45459965", "0.45422298", "0.4540177", "0.45376775", "0.4535701", "0.45333418", "0.45327273", "0.45290127" ]
0.7799714
0
Returns true or false if the node doesn't need attributes
protected boolean checkNodeWithoutAttributes(Node node) { String nodeName = node.getNodeName(); if (nodeName.equalsIgnoreCase(ExtendedXmlParser.MODIFY_FORM) || nodeName.equalsIgnoreCase(ExtendedXmlParser.ADD_REMOTE_REFERENCE)) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasAttributes();", "boolean hasAttributes();", "@java.lang.Override\n public boolean hasAttributes() {\n return attributes_ != null;\n }", "@Override\r\n\t\tpublic boolean hasAttributes()\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}", "boolean hasSetAttribute();", "private boolean readNodeAttributes() throws Exception {\n // read attributes:\n String attribute = \"\";\n String value = \"\";\n while (readChar(false) == ' ') // check ' ' char\n {\n // skip ' ' char\n if (!ignoreSpaceAndInvisibleChars())\n return false;\n attribute = this.readToChar(new char[]{'=', '/', '>'}, false);\n if (attribute == null)\n return false;\n if (readChar(false) != '=')\n break;\n // skip '=' char:\n _bi++;\n int quote = readChar(true);\n if (quote == -1) {\n return false;\n }\n boolean noQuote = ('\"' != (char) quote && '\\'' != (char) quote);\n char[] endChars = new char[]{(char) quote};\n if (noQuote) {\n _bi--;\n endChars = new char[]{' ', '/', '>'};\n }\n value = this.readToChar(endChars, false);\n if (value == null) {\n return false;\n }\n _lastTag.setAttribute(attribute, XMLDecoder.exec(value));\n // dumpMsg(\"attribute name: \" + attribute + \", value: \" + value);\n if (!noQuote) {\n // skip '\"' or '\\'':\n _bi++;\n }\n }\n return true;\n }", "public final boolean hasAttribute ()\r\n {\r\n return _value.hasAttribute();\r\n }", "boolean isAttribute();", "public boolean isSetAttrs() {\n return this.attrs != null;\n }", "public boolean hasAttributes() {\n return attributesBuilder_ != null || attributes_ != null;\n }", "boolean hasNode();", "boolean hasNode();", "public boolean isNodeProp() {\n \t\treturn isNodeProp;\n \t}", "boolean hasIsNodeOf();", "public boolean isAttribute() {\n\t\treturn false;\n\t}", "@java.lang.Override\n public boolean hasNode() {\n return node_ != null;\n }", "@java.lang.Override\n public boolean hasNode() {\n return node_ != null;\n }", "public boolean hasDynamicAttributes();", "@Override\n public boolean isMissingNode() { return false; }", "public boolean hasNode() {\n return nodeBuilder_ != null || node_ != null;\n }", "public boolean hasNode() {\n return nodeBuilder_ != null || node_ != null;\n }", "public boolean hasAttribute(String name) {\n // if attribute() returns a value, then this jode has that attribute\n return attribute(name, true) != null;\n }", "boolean hasAttribute(String name);", "public boolean isRealNode();", "public boolean isRealNode();", "public final boolean isDeepAttributeReference ()\r\n {\r\n return _value.hasXmlTreePath();\r\n }", "@Override\r\n\t\tpublic boolean hasAttribute(String name)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}", "public boolean hasAttribute(String name)\n/* */ {\n/* 1234 */ return findAttribute(name) != null;\n/* */ }", "boolean hasHasNodeSettings();", "public boolean isRealNode() {\n\t\t\tif (this.getHeight() != -1) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "boolean hasNode()\n/* */ {\n/* 473 */ if ((this.bn == null) && (this.mn == null)) return false;\n/* 474 */ if (this.jt == null) return false;\n/* 475 */ return true;\n/* */ }", "public boolean isNode() {\n return (kids != null);\n }", "public boolean isDnAttributes()\n {\n return dnAttributes;\n }", "@Override\r\n\tpublic boolean isEqual(Node node) {\n\t\treturn false;\r\n\t}", "@Override\n public boolean isAttribute()\n {\n return attribute;\n }", "private boolean nodeRequiresInput() {\n boolean requiresInput = false;\n \n return requiresInput;\n }", "boolean hasChildNodes();", "public Boolean isRootNode();", "public boolean isRealNode()\r\n\t\t{\r\n\t\t\tif (this.key == -1)\r\n\t\t\t\treturn false;\r\n\t\t\treturn true; \r\n\t\t}", "boolean isAttribute(Object object);", "public boolean containAttribute(String name);", "private boolean isWanted(Node n) {\n if (use_All) {\n return true;\n }\n String name = n.getNodeName();\n for (int ix = 0; ix < remove_tags.length; ix++) {\n if (name.compareTo(remove_tags[ix]) == 0) {\n return false;\n }\n }\n for (int ix = 0; ix < add_tags.length; ix++) {\n if (name.compareTo(add_tags[ix]) == 0) {\n return true;\n }\n }\n return false;\n }", "@Override\n\tpublic boolean isMissing(final Attribute att) {\n\t\treturn false;\n\t}", "boolean hasHasNodeID();", "public boolean hasNodeCharacteristicId() {\n return nodeCharacteristicId_ != null;\n }", "public boolean hasNodeCharacteristicId() {\n return nodeCharacteristicId_ != null;\n }", "protected boolean isExtendedNode(Node node) {\r\n\r\n String nodeName = node.getNodeName();\r\n\r\n if (nodeName.equalsIgnoreCase(ExtendedXmlParser.INSERT_AFTER_OP)\r\n || nodeName.equalsIgnoreCase(ExtendedXmlParser.INSERT_BEFORE_OP)\r\n || nodeName.equalsIgnoreCase(ExtendedXmlParser.REMOVE_OP)\r\n || nodeName.equalsIgnoreCase(ExtendedXmlParser.REPLACE_OP)\r\n || nodeName.equalsIgnoreCase(ExtendedXmlParser.MODIFY_FORM)\r\n || nodeName.equalsIgnoreCase(ExtendedXmlParser.MODIFY_ATTRIBUTE)\r\n || nodeName.equalsIgnoreCase(ExtendedXmlParser.ADD_REMOTE_REFERENCE)\r\n || nodeName.equalsIgnoreCase(ExtendedXmlParser.REMOVE_REMOTE_REFERENCE)\r\n || nodeName.equalsIgnoreCase(ExtendedXmlParser.MODIFY_REMOTE_REFERENCE)) {\r\n return true;\r\n }\r\n return false;\r\n }", "private boolean isReference()\n {\n return countAttributes(REFERENCE_ATTRS) > 0;\n }", "@Override\n\tpublic boolean hasValue(Attribute attribute) {\n\t\treturn false;\n\t}", "@Override\r\n\t\tpublic boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}", "@Override\r\n\t\tpublic boolean hasChildNodes()\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}", "public boolean hasNodeCharacteristicId() {\n return nodeCharacteristicIdBuilder_ != null || nodeCharacteristicId_ != null;\n }", "public boolean hasNodeCharacteristicId() {\n return nodeCharacteristicIdBuilder_ != null || nodeCharacteristicId_ != null;\n }", "protected boolean isEmptyXmlTagExpanded() {\n return false;\n }", "private boolean isAttributeDefined(String attrName)\n {\n return getAttributes().get(attrName) != null;\n }", "protected final boolean isRootNode() {\n return isRootNode;\n }", "public boolean hasEmbeddedNodeDeclaration() {\r\n\t\t\treturn false;\r\n\t\t}", "@Override\n public boolean removeAttribute(ConfigurationNode node)\n {\n return attributes.removeNode(node);\n }", "public static boolean isValidNode(Node node) {\r\n\t\tif (node == null ||\r\n\t\t\t\tnode.getCreatedByPrincipalId() == null ||\r\n\t\t\t\tnode.getCreatedOn() == null ||\r\n\t\t\t\tnode.getETag() == null ||\r\n\t\t\t\tnode.getId() == null ||\r\n\t\t\t\tnode.getModifiedByPrincipalId() == null ||\r\n\t\t\t\tnode.getModifiedOn() == null ||\r\n\t\t\t\tnode.getName() == null ||\r\n\t\t\t\tnode.getNodeType() == null) \r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "public boolean hasSetAttribute() {\n return ((bitField0_ & 0x08000000) == 0x08000000);\n }", "protected abstract boolean populateAttributes();", "public boolean isAttributeWritesCached();", "public String getNodeAttribute() {\n\treturn nodeAttribute;\n }", "public boolean empty() {\n if(root==EXT_NODE) {\r\n \treturn true;\r\n }\r\n return false;\r\n }", "public boolean isApplicableForNode(AbstractNode node);", "public final boolean hasXmlTreePathValue ()\r\n {\r\n return _value.isXmlTreePath();\r\n }", "private boolean isNodeTypeAttribute(String attributeName, String attributeValue) {\r\n boolean match = false;\r\n if (!StringUtils.isBlank(attributeName) && !StringUtils.isBlank(attributeValue) && !StringUtils.isBlank(getJsonTypeAttributeName())) {\r\n if (attributeName.equalsIgnoreCase(getJsonTypeAttributeName())) {\r\n if (attributeValue.equalsIgnoreCase(\"boolean\")) {\r\n _current.setType(XML2JSONObject.Type.Boolean);\r\n }\r\n else if (attributeValue.equalsIgnoreCase(\"number\")) {\r\n _current.setType(XML2JSONObject.Type.Number);\r\n }\r\n else if (attributeValue.equalsIgnoreCase(\"array\")) {\r\n _current.setType(XML2JSONObject.Type.Array);\r\n }\r\n match = true;\r\n\r\n }\r\n }\r\n return match;\r\n }", "abstract boolean hasXMLProperty(XMLName name);", "@XmlAttribute\n public Boolean isReadOnly() {\n return readOnly;\n }", "public boolean isEmpty()\n{\n // If any attributes are not default return false\n if(getMaxTime()!=5 || getFrameRate()!=25 || !SnapUtils.equals(getEndAction(),\"Loop\"))\n return false;\n \n // Iterate over owner children and if any are not empty, return false\n for(int i=0, iMax=getOwner().getChildCount(); i<iMax; i++)\n if(!isEmpty(getOwner().getChild(i)))\n return false;\n \n // Return true since every child was empty\n return true;\n}", "public boolean hasValue() throws SdpParseException {\n\t\tNameValue nameValue = getAttribute();\n\t\tif (nameValue == null)\n\t\t\treturn false;\n\t\telse {\n\t\t\tObject value = nameValue.getValue();\n\t\t\tif (value == null)\n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\treturn true;\n\t\t}\n\t}", "public boolean hasEmbeddedNodeDeclaration() {\r\n\t\t\treturn true;\r\n\t\t}", "public boolean hasSetAttribute() {\n return ((bitField0_ & 0x08000000) == 0x08000000);\n }", "boolean hasStoreAttribute();", "@Override\n public boolean isDefined()\n {\n return getValue() != null || getChildrenCount() > 0\n || getAttributeCount() > 0;\n }", "private boolean checkAttributes(ExportPkg ep, ImportPkg ip) {\n /* Mandatory attributes */\n if (!ip.checkMandatory(ep.mandatory)) {\n return false;\n }\n /* Predefined attributes */\n if (!ip.okPackageVersion(ep.version) ||\n (ip.bundleSymbolicName != null &&\n !ip.bundleSymbolicName.equals(ep.bpkgs.bundle.symbolicName)) ||\n !ip.bundleRange.withinRange(ep.bpkgs.bundle.version)) {\n return false;\n }\n /* Other attributes */\n for (Iterator i = ip.attributes.entrySet().iterator(); i.hasNext(); ) {\n Map.Entry e = (Map.Entry)i.next();\n String a = (String)ep.attributes.get(e.getKey());\n if (a == null || !a.equals(e.getValue())) {\n return false;\n }\n }\n return true;\n }", "private void parseNodeFlags(Node node, Attributes attributes) {\n String rendered = attributes.getValue(\"rendered\");\n if (\"true\".equals(rendered)) {\n node.setRendered();\n }\n }", "public boolean provideGraphInfo() { return node_size == NodeSize.GRAPHINFO; }", "boolean hasNodeId();", "@Override\n\tpublic boolean isEmpty() {\n\t\tmodCount = root.numChildren();\n\t\treturn (modCount == 0);\n\t}", "private boolean isEmpty(ListItem<PropertyWrapper> attribute) {\n return false;\n }", "@XmlAttribute\n public Boolean isPrivateSpaceRestricted() {\n return privateSpaceRestricted;\n }", "public boolean isNotEmpty(){\n return root != null;\n }", "public boolean isUnset() {\n boolean isUnset = false;\n for (ASTNode child : this.getNode().getChildren(TokenSet.create(AsciiDocTokenTypes.ATTRIBUTE_UNSET))) {\n ASTNode treePrev = child.getTreePrev();\n if (treePrev != null && treePrev.getElementType() == AsciiDocTokenTypes.ATTRIBUTE_NAME_START) {\n isUnset = true;\n break;\n }\n ASTNode treeNext = child.getTreeNext();\n if (treeNext != null && treeNext.getElementType() == AsciiDocTokenTypes.ATTRIBUTE_NAME_END) {\n isUnset = true;\n break;\n }\n }\n return isUnset;\n }", "private void checkForSuperfluousAttributes(SyntaxTreeNode node,\n Attributes attrs)\n {\n QName qname = node.getQName();\n boolean isStylesheet = (node instanceof Stylesheet);\n String[] legal = _instructionAttrs.get(qname.getStringRep());\n if (versionIsOne && legal != null) {\n int j;\n final int n = attrs.getLength();\n\n for (int i = 0; i < n; i++) {\n final String attrQName = attrs.getQName(i);\n\n if (isStylesheet && attrQName.equals(\"version\")) {\n versionIsOne = attrs.getValue(i).equals(\"1.0\");\n }\n\n // Ignore if special or if it has a prefix\n if (attrQName.startsWith(\"xml\") ||\n attrQName.indexOf(':') > 0) continue;\n\n for (j = 0; j < legal.length; j++) {\n if (attrQName.equalsIgnoreCase(legal[j])) {\n break;\n }\n }\n if (j == legal.length) {\n final ErrorMsg err =\n new ErrorMsg(ErrorMsg.ILLEGAL_ATTRIBUTE_ERR,\n attrQName, node);\n // Workaround for the TCK failure ErrorListener.errorTests.error001..\n err.setWarningError(true);\n reportError(WARNING, err);\n }\n }\n }\n }", "@Override\n public final boolean hasForfeitAttribute() {\n return true;\n }", "public Boolean isEmpty() {\n\t\tBoolean empty=true;\n\t\tif(nodes.isEmpty()==false) {\n\t\t\tempty=false;\n\t\t}\n\t\treturn empty;\n\t}", "public boolean comesFromDiagramElement() {\n return getOriginalElement() != null;\n }", "public boolean isUseLeafNodesOnly() {\r\n return dataBinder.isUseLeafNodesOnly();\r\n }", "@Override\r\n\t\tpublic boolean isEqualNode(Node arg)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}", "public boolean visit(SchemaBase node) {\n return true;\n }", "@Override\n public boolean isEmpty() {\n return (that.rootNode == null);\n }", "boolean getNodeCharacteristicIdNull();", "private static boolean isAttributeAvailable(Element element, String attrName) {\n \t\tModelQuery modelQuery = ModelQueryUtil.getModelQuery(element\n \t\t\t\t.getOwnerDocument());\n \t\tif (modelQuery != null) {\n \t\t\tCMElementDeclaration decl = modelQuery\n \t\t\t\t\t.getCMElementDeclaration(element);\n \t\t\tif (decl != null) {\n \t\t\t\tCMNamedNodeMap map = decl.getAttributes();\n \t\t\t\tif ((CMAttributeDeclaration) map.getNamedItem(attrName) != null) {\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\treturn false;\n \t}", "public boolean visit(OpenAttrBase node) {\n return visit((SchemaBase)node);\n }", "boolean isUniqueAttribute();", "@Kroll.getProperty @Kroll.method\n\tpublic boolean getSpecified() {\n\t\tif (attr.getOwnerElement() == null) {\n\t\t\treturn true;\n\t\t}\n\t\treturn attr.getSpecified();\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn getNumberOfNodes() == 0;\r\n\t}", "protected final boolean isRoot() {\n return _metaData.isRoot(this);\n }", "boolean hasNodeCharacteristicId();" ]
[ "0.7496312", "0.7496312", "0.7179123", "0.71723527", "0.6974269", "0.696695", "0.6921248", "0.6907282", "0.6866029", "0.6839544", "0.6735846", "0.6735846", "0.6720176", "0.66309756", "0.6548352", "0.6543871", "0.6543871", "0.6519286", "0.64891624", "0.6458597", "0.6458597", "0.64530164", "0.6420026", "0.6379921", "0.6379921", "0.6373466", "0.6320146", "0.6306046", "0.6289272", "0.62034947", "0.6177507", "0.6135484", "0.6124602", "0.6079854", "0.6060278", "0.6053755", "0.6037471", "0.6024973", "0.60089135", "0.59999466", "0.59907776", "0.5985974", "0.5974596", "0.5970289", "0.59369314", "0.59369314", "0.59156466", "0.5915335", "0.5905889", "0.5901936", "0.5893652", "0.5886016", "0.5886016", "0.58840054", "0.58759373", "0.5870727", "0.5857491", "0.5844191", "0.58416617", "0.58328795", "0.5831058", "0.5821896", "0.58159256", "0.58129454", "0.5811938", "0.58112794", "0.58057386", "0.5793554", "0.5783606", "0.57823503", "0.5776224", "0.5774805", "0.57728577", "0.5766474", "0.5741915", "0.5737414", "0.5731659", "0.57241124", "0.5711933", "0.57108206", "0.57068324", "0.570681", "0.57059586", "0.5701693", "0.56976855", "0.5683692", "0.56814843", "0.5680255", "0.5678143", "0.56752306", "0.56701845", "0.56694734", "0.5654686", "0.56467634", "0.5639785", "0.56359327", "0.561467", "0.5609409", "0.55989385", "0.5594705" ]
0.73662204
2
Returns true or false if the node parameter is a operation node
protected boolean isExtendedNode(Node node) { String nodeName = node.getNodeName(); if (nodeName.equalsIgnoreCase(ExtendedXmlParser.INSERT_AFTER_OP) || nodeName.equalsIgnoreCase(ExtendedXmlParser.INSERT_BEFORE_OP) || nodeName.equalsIgnoreCase(ExtendedXmlParser.REMOVE_OP) || nodeName.equalsIgnoreCase(ExtendedXmlParser.REPLACE_OP) || nodeName.equalsIgnoreCase(ExtendedXmlParser.MODIFY_FORM) || nodeName.equalsIgnoreCase(ExtendedXmlParser.MODIFY_ATTRIBUTE) || nodeName.equalsIgnoreCase(ExtendedXmlParser.ADD_REMOTE_REFERENCE) || nodeName.equalsIgnoreCase(ExtendedXmlParser.REMOVE_REMOTE_REFERENCE) || nodeName.equalsIgnoreCase(ExtendedXmlParser.MODIFY_REMOTE_REFERENCE)) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isOp();", "boolean hasOperation();", "public boolean isOp ( ) {\n\t\treturn extract ( handle -> handle.isOp ( ) );\n\t}", "public boolean isOperation() {\n return operation != null;\n }", "public boolean hasOperation() {\n return operationBuilder_ != null || operation_ != null;\n }", "@java.lang.Override\n public boolean hasOperation() {\n return operation_ != null;\n }", "public boolean isWholeOperationParameter() {\n\t\treturn isWholeOperationParameter;\n\t}", "public boolean isOp(){\n return opSet.contains(symbol());\n }", "public boolean isSetOp() {\n return this.op != null;\n }", "@Override\n\tpublic boolean hasOperation() {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean visit(QualifiedName node) {\r\n\t\toperand(node,node.getFullyQualifiedName());\r\n\t\treturn false;\r\n\t}", "public boolean hasOperate() {\n return result.hasOperate();\n }", "public boolean hasOperate() {\n return result.hasOperate();\n }", "public boolean hasOperate() {\n return result.hasOperate();\n }", "public boolean hasOperate() {\n return result.hasOperate();\n }", "boolean hasOperator();", "boolean hasIsNodeOf();", "OperationNode getNode();", "BoolOperation createBoolOperation();", "public boolean isOperator(){\n return true;\n }", "public boolean isRealNode();", "public boolean isRealNode();", "public boolean equivalent(Operation o) {\n return o.token == this.token && o.op == this.op;\n }", "public boolean checkOperation(char operation) {\n boolean result = false;\n if (operation == '+' | operation == '-' | operation == '/' | operation == '*') {\n result = true;\n }\n return result;\n }", "private boolean isArithOp() throws IOException\n\t{\n\t\tboolean isValid = false;\n\t\t\n\t\tif(isRelation())\n\t\t{\n\t\t\tif(theNextToken.TokenType == TokenType.PLUS)\n\t\t\t{\n\t\t\t\tupdateToken();\n\t\t\t\tupdateToken();\n\t\t\t\t\n\t\t\t\tif(isArithOp())\n\t\t\t\t{\n\t\t\t\t\tisValid = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(theNextToken.TokenType == TokenType.MINUS)\n\t\t\t{\n\t\t\t\tupdateToken();\n\t\t\t\tupdateToken();\n\t\t\t\t\n\t\t\t\tif(isArithOp())\n\t\t\t\t{\n\t\t\t\t\tisValid = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tisValid = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn isValid;\n\t}", "public boolean hasOperation() {\n return fieldSetFlags()[1];\n }", "public boolean isParameter() {\n\t\treturn isWholeOperationParameter;\n\t}", "@Override\n public boolean visit(JsBinaryOperation x, JsContext<JsExpression> ctx) {\n return !x.getOperator().isAssignment()\n || !(x.getArg1() instanceof JsStringLiteral);\n }", "boolean hasNode();", "boolean hasNode();", "public boolean isApplicableForNode(AbstractNode node);", "boolean hasHasNodeID();", "public boolean hasOperation() {\n return fieldSetFlags()[3];\n }", "public boolean isClass() {\n return operation == null;\n }", "public boolean isValidOperation(String srcClass, String targetClass, TaskType operation) throws InvalidOperationException\n\t{\n\t\treturn true;\n\t}", "protected abstract boolean actionImplementation(iNamedObject node);", "private boolean isOperator(String op){\n return (op.equals(\"+\") || op.equals(\"-\") || op.equals(\"*\") || op.equals(\"/\"));\n }", "public boolean isOperand(){\n return false;\n }", "@Override\r\n\t\tpublic boolean isEqualNode(Node arg)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}", "public StatementNode getStatementNodeOnTrue();", "Operator.Type getOperation();", "public boolean isOprUner() /*const*/{\n\t\treturn Tkn==TipeToken.Not;\n\t}", "public boolean isOprBiner() /*const*/{\n\t\treturn Tkn!=TipeToken.Not && Tkn!=TipeToken.Bilangan && !isPunctuator();\n\t}", "public abstract boolean isUsing(Long graphNode);", "public boolean evaluate(SDGNode node);", "public Boolean isRootNode();", "boolean hasNodeId();", "static public ASTOp isOp(String id) {\n ASTOp op4 = UDF_OPS.get(id);\n if( op4 != null ) return op4;\n return isBuiltinOp(id);\n }", "public boolean isTaskNode()\n\t{\n\t\treturn isTaskNode;\n\t}", "private static boolean validOperation(String op) {\n\t\tfor (String goodOp : validOps) {\n\t\t\tif (goodOp.equalsIgnoreCase(op)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static boolean isOperator(String token) {\n if (Connective.getValueFromSymbol(token) == null) {\n return false;\n } else {\n return true;\n }\n }", "NetworkNodeType getIsA();", "public boolean isLeafContextNode();", "protected boolean uniqueNodesUnderOps(Expression root, Fragment op) {\n Set<Expression> visited = new HashSet<>();\n return uniqueNodesUnderOps(root, op, visited);\n }", "public boolean isConcreteSyntax (Node node);", "boolean isUnary() {\r\n\t\treturn (n2==null) && (t2==null);\r\n\t}", "public boolean validOperator(char op){\n switch(op){\n case '+':\n case '-':\n case '*':\n case '/':\n case '^':\n case ')':\n case '(':\n return true;\n }\n\n return false;\n }", "boolean isNoOp();", "public boolean isOperationSuccess() {\n return operationSuccess;\n }", "private boolean nodeRequiresInput() {\n boolean requiresInput = false;\n \n return requiresInput;\n }", "public boolean hasSuboperation() {\n return fieldSetFlags()[4];\n }", "@Override\n public NodeType ExecuteOperation()\n {\n //if the first child is an operator\n if(this.childNodes[0].isOperator==true)\n {\n BasicOperator basicOperator=(BasicOperator)this.childNodes[0]; \n if(basicOperator.operands==1)\n {\n UnaryOperator unaryOperator=(UnaryOperator)childNodes[0];\n return unaryOperator.PerformOperation(childNodes[1]);\n }\n else if(basicOperator.operands==2)\n {\n BinaryOperator binaryOperator=(BinaryOperator)childNodes[0];\n return binaryOperator.PerformOperation(childNodes[1], childNodes[2]);\n }\n else if(basicOperator.operands==3)\n {\n TernaryOperator ternaryOperator=(TernaryOperator)childNodes[0];\n return ternaryOperator.PerformOperation(childNodes[1], childNodes[2], childNodes[3]);\n }\n }\n //if not an operator\n else\n {\n return this.childNodes[0].ExecuteOperation();\n }\n return null;\n }", "public boolean isTerminal() {\n\t\tif(this.getSuccessors('1').length == 0 && this.getSuccessors('2').length == 0)\r\n\t\t\treturn true;\r\n\r\n\t\t//Else the baord is not a terminal node\r\n\t\treturn false;\r\n\t}", "@Override\n\tpublic Object visit(ASTLogical node, Object data)\n\t{\n\t\treturn visitOperatorNode(node, data);\n\t}", "public boolean checkOperationTrig(String operation) {\n boolean result = false;\n if (TrigComands.LIST_TRIG_COMANDS.contains(operation)) {\n result = true;\n }\n return result;\n }", "boolean hasHasNodeSettings();", "private static boolean isOperator(String token) {\n\t\treturn OPERATORS.containsKey(token);\n\t}", "public void setOp(boolean value) {}", "@Override\n\tpublic boolean canOperate()\n\t{\n\t\treturn s_ctx.isConnected();\n\t}", "private interface OperationOverNodes {\n\t\tvoid operate(Node node);\n\t}", "public String getOperation() {return operation;}", "public boolean isInstruction() {\n\t\treturn this.operation instanceof MagicInstruction;\n\t}", "public boolean isExpression (Object value);", "@Override\r\n\tpublic boolean isEqual(Node node) {\n\t\treturn false;\r\n\t}", "public boolean isNodeProp() {\n \t\treturn isNodeProp;\n \t}", "public boolean isCompatible(final PNode node) {\n if (!(node instanceof OperatorNode)) {\n return false;\n }\n for (int index = 0; index < operators.length; index++) {\n if (operators[index] == null || ((OperatorNode) node).equalsByContent(operators[index])) {\n return true;\n }\n }\n return false;\n }", "public boolean isDynamic(String opName) throws RemoteException;", "public boolean isValidOperator(String op)\n {\n return (normalizeOperator(op) != null);\n }", "public boolean isOperationExecuted() {\n return currentItemState == ItemProcessingState.EXECUTED;\n }", "public boolean containsOrOperator() {\r\n\t\tfor (int n = 0; n < elements.size(); ++n) {\r\n\t\t\tObject ob = elements.get(n);\r\n\t\t\tif (ob instanceof Operator.OrOperator) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isOperator() {\n\t\treturn (letter == '+') || (letter == '*') ||\n\t\t\t (letter == '%') || (letter == '-') ? true : false;\n\t}", "public String getOperation();", "String getOp();", "String getOp();", "String getOp();", "public boolean hasNode() {\n return nodeBuilder_ != null || node_ != null;\n }", "public boolean hasNode() {\n return nodeBuilder_ != null || node_ != null;\n }", "public boolean isTest() {\n\t\treturn this.operation instanceof MagicCriterion;\n\t}", "public void setOperation(String op) {this.operation = op;}", "public boolean visit(SchemaBase node) {\n return true;\n }", "String getOr_op();", "public boolean haveOperationsToDo (Session connect)\n {\n String req = \"from \" + OperationAbstract.class.getSimpleName () + \" where achieved='false' and smd='\" + this.id + \"'\";\n List<OperationAbstract> lst = connect.createQuery (req).list ();\n\n System.out.println (lst);\n return !lst.isEmpty ();\n }", "protected boolean consecutiveNodesUnderOps(Expression root, Fragment op,\n BiFunction<Expression, Expression, Boolean> matcher) {\n Wrapper wrapper = new Wrapper();\n return consecutiveNodesUnderOps(root, op, matcher, wrapper);\n }", "boolean hasActionCommand();", "boolean isInputNeuron();", "public String getOperation() {\n return this.operation;\n }", "@Override\n public boolean equals(IOperation op) {\n if (!(op instanceof ResourceOperation)) {\n return false;\n }\n \n ResourceOperation rop = (ResourceOperation)op;\n return super.equals(rop) &&\n actionType == rop.getActionType() && target == rop.getTarget() &&\n StringComparator.isSame(ipath, rop.getIdenticalPath());\n }", "Object findOperatorNeedCheck();", "String getOperation();", "String getOperation();" ]
[ "0.7408291", "0.7209179", "0.714858", "0.7090589", "0.6805448", "0.67852396", "0.6480799", "0.64769506", "0.6441291", "0.639811", "0.63172865", "0.623535", "0.623535", "0.623535", "0.623535", "0.6202315", "0.6143498", "0.60830176", "0.6069327", "0.60334396", "0.60097677", "0.60097677", "0.5980194", "0.5974301", "0.5956281", "0.59472203", "0.5870963", "0.5860655", "0.5832986", "0.5832986", "0.581821", "0.5807528", "0.5805524", "0.57961315", "0.5784432", "0.578405", "0.57802534", "0.5770301", "0.5755905", "0.5740138", "0.573669", "0.5712915", "0.57071584", "0.56763184", "0.56606466", "0.5654368", "0.5648706", "0.5631381", "0.56306237", "0.5607657", "0.5590961", "0.55749506", "0.55713725", "0.5549421", "0.5517019", "0.5503765", "0.5493237", "0.5486044", "0.5479523", "0.54674876", "0.5446919", "0.5443909", "0.5419333", "0.5411335", "0.5409069", "0.54084945", "0.5406871", "0.540525", "0.5375399", "0.53667426", "0.5337564", "0.5335534", "0.53312624", "0.53291035", "0.5323698", "0.5321365", "0.5311097", "0.5301317", "0.53012633", "0.5300774", "0.52984834", "0.52967626", "0.52904606", "0.52904606", "0.52904606", "0.52851385", "0.52851385", "0.5270742", "0.52638596", "0.5261055", "0.52586836", "0.5256753", "0.5252311", "0.52488273", "0.5234257", "0.52333754", "0.52261186", "0.5223734", "0.5220747", "0.5220747" ]
0.6262077
11
Sets the background of the button as focused
public void openGame(View view) { setViewBackgroundWithoutResettingPadding(view, R.drawable.bkg_button_on); // Calculates the first level least completed on file String levelCodes = loadLevelStatus(this); int firstUnsolvedLevel = levelCodes.indexOf("0"); if (firstUnsolvedLevel == -1) { firstUnsolvedLevel = levelCodes.indexOf("1"); } if (firstUnsolvedLevel == -1) { firstUnsolvedLevel = levelCodes.indexOf("2"); } if (firstUnsolvedLevel == -1) { firstUnsolvedLevel = 0; } // Saves the default level scroll position and the first unsolved level SharedPreferences.Editor settingsEditor = sharedPreferences.edit(); settingsEditor.putInt(GRID_POSITION, firstUnsolvedLevel); settingsEditor.putInt(CURRENT_LEVEL, firstUnsolvedLevel); settingsEditor.apply(); // Starts the intent at the first level not completed Intent intent = new Intent(this, BoardActivity.class); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void onFocusChange(View button, boolean isFocus) {\n\t\t\t\tif(isFocus){\n\t\t\t\t\tbutton.setBackgroundColor(getResources().getColor(R.color.blue));\n\t\t\t\t}else \n\t\t\t\t\tbutton.setBackground(getResources().getDrawable(R.drawable.button_style)); \n\t\t\t}", "@Override\n public void setFocused()\n {\n setImage(\"MinusFocused.png\");\n }", "public void setFocused(boolean focused);", "public abstract void setBackgroundPressed(final int rgba);", "public void setPressedBackgroundColor(Color pressedBackgroundColor) {\n this.pressedBackgroundColor = pressedBackgroundColor;\n }", "@Override\r\n public void mousePressed(MouseEvent e) {\n setBackground(Color.BLUE);\r\n \r\n \r\n }", "public void setActivingColor(){\n this.setBackground(new Color( 213, 228, 242));\n this.forceupdateUI();\n }", "@Override\r\n\t\tpublic void onChange(boolean selfChange) {\n\t\t\tif (mBtnState) {\r\n\t\t\t\tsetUnfocusBg();\r\n\t\t\t} else {\r\n\t\t\t\tsetDefaultBg();\r\n\t\t\t}\r\n\t\t}", "private void focusAnimations(View v,int focused, int normal)\n {\n boolean found = false;\n for(ButtonData btn:buttons)\n if(btn.getView()==v)\n found=true;\n\n if(!found)\n {\n buttons.add(new ButtonData(v,focused,normal));\n }\n\n for(ButtonData btn:buttons)\n if(btn.getView()!=v)\n {\n btn.getView().setPressed(false);\n btn.getView().setBackgroundResource(btn.getNormal());\n btn.getView().invalidate();\n }\n else\n btn.getView().setPressed(true);\n\n if(v.isPressed())\n v.setBackgroundResource(focused);\n else\n v.setBackgroundResource(normal);\n }", "public void setFocus() {\n startButton.setFocus();\n }", "private void setPressedStyle() {\n this.setStyle(BUTTON_PRESSED);\n this.setPrefHeight(43);\n this.setLayoutY(getLayoutY() + 4);\n }", "protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect){\n }", "public abstract void setForegroundPressed(final int rgba);", "public void setBg(){\n this.setBackground(color);\n }", "protected void gainFocus(){\r\n\t\twidgetModifyFacade.changeVersatilePane(this);\r\n\t\twidgetModifyFacade.gainedFocusSignal(this);\r\n\t//\tthis.setId(\"single-image-widget-selected\");\r\n\t}", "public void setSelectionBackground( final Color color ) {\n checkWidget();\n selectionBackground = color;\n }", "private void applyBackgroundColor() {\r\n\t\tthis.control.setBackground(PromptSupport.getBackground(this.control));\r\n\t}", "public void setFocused(boolean value) {\n getPolymerElement().setFocused(value);\n }", "public void focusPropertyButton(Button btn){\n btn.hoverProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observableValue, Boolean aBoolean, Boolean t1) {\n if (t1){\n InterfaceStyling.dropShadowExitSelect(btn);\n } else {\n InterfaceStyling.dropShadowExitDeselect(btn);\n }\n }\n });\n }", "public void chooseBackgroundColor(){\n currentBackgroundColor = backgroundColorPicker.getValue();\n draw();\n }", "void setFocus();", "@Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus) {\n mInputLayout\n .setBackgroundResource(R.drawable.textfield_search_selected);\n\n } else {\n mInputLayout\n .setBackgroundResource(R.drawable.textfield_search_default);\n }\n }", "public void setFocus();", "@Override\r\npublic void mousePressed(MouseEvent arg0) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "public void setEnteredBackground(boolean enteredBackground) {\n this.enteredBackground = enteredBackground;\n }", "public void focus() {}", "@Override\r\npublic void mouseClicked(MouseEvent e) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "public void setFocus() {\n\t}", "@Override\r\n\tpublic boolean isFocused() {\n\t\treturn false;\r\n\t}", "public void setFocus() {\n \t\tviewer.getControl().setFocus();\n \t}", "private void chooseTo7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chooseTo7ActionPerformed\n chooseTo7.setBackground(Color.black);\n }", "public void setFocus() {\n }", "private void setTabBg(View vFocused, boolean selected) {\n if (selected) {\n SkinUtil.instance().setViewBackground(this, vFocused, R.drawable.bg_title_item_c);\n } else {\n SkinUtil.instance().setViewBackground(this, vFocused, R.drawable.btn_filter_tab_selector);\n }\n }", "@Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus) {\n // 如果是左侧的三个按钮获得焦点的话, 则直接触发事件\n if (v.getId() == R.id.main_ib_bendi) {\n btnBendiSetFocus();\n btnTfkaSetBackground();\n btnUpanSetBackground();\n return;\n } else if (v.getId() == R.id.main_ib_tfka) {\n btnBendiSetBackground();\n btnTfkaSetFocus();\n btnUpanSetBackground();\n return;\n } else if (v.getId() == R.id.main_ib_upan) {\n btnBendiSetBackground();\n btnTfkaSetBackground();\n btnUpanSetFocus();\n return;\n }\n }\n\n btnBendiSetBackground();\n btnTfkaSetBackground();\n btnUpanSetBackground();\n\n // viewAnimation(v, hasFocus);\n }", "@Focus\n\tpublic void setFocus() \n\t{\n\t\t\tfor(int r = Board.LENGTH - 1; r >= 0; r--)\n\t\t\t{\t\n\t\t\t\t\tfor(int c=0;c<Board.LENGTH;c++)\n\t\t\t\t\t{\t\n\t\t\t\t\t\tsquares[r][c+1].setBackground(Display.getDefault().getSystemColor(SWT.COLOR_DARK_GRAY));\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif(((Square) squares[r][c+1].getData()).isLegal())//It returns the legal attribute wrong\n\t\t\t\t\t\t{squares[r][c+1].setBackground(Display.getDefault().getSystemColor(SWT.COLOR_YELLOW));}\n\t\t\t\t\t\t\n\t\t\t\t\t\tPiece piece = ((Square) squares[r][c+1].getData()).getPiece();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(piece == null)\t\n\t\t\t\t\t\t\tsquares[r][c+1].setImage(IconHandler.getBlankIcon());\t\t\t\t\t\t\t\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tsquares[r][c+1].setImage(piece.getIcon());\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}\t\t\n\t}", "private void toggle_focus() {\n\t\ttry {\n\t\t\tif (!lock_autofocus) {\n\t\t\t\t//getCameraManager().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\t\t\n\t\t\t\tlockAutoFocus.setBackgroundResource(R.drawable.eye_selected);\n\t\t\t} else {\n\t\t\t\tlockAutoFocus.setBackgroundResource(R.drawable.eye);\n\t\t\t\tstatusView.setText(getString(R.string.set_focus));\n\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Stopped;\n\t\t\t //getCameraManager().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\t\t\n\t\t\t}\n\t\t\tlock_autofocus = !lock_autofocus;\n\t\t\tcameraManager.setAutoFocus(lock_autofocus);\n\t\t} catch (Exception oEx) {\n\n\t\t}\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "private void buttonMouseEnter(Button btn){\r\n\t\tbtn.setBackground(\r\n\t\t\t\tnew Background(new BackgroundFill(Color.rgb(66,103,178), new CornerRadii(0), new Insets(0)))); // set login button facebook blue with mouse enter\r\n\t\tbtn.setTextFill(Color.WHITE);\r\n\t}", "public void setFocus() {\n \t\tex.setFocus();\n \t}", "@Override\r\n\tpublic void setFocus() {\n\t\t\r\n\t}", "private void updateBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_updateBtnMouseEntered\n updateBtn.setBackground(Color.decode(\"#339966\"));\n }", "public void setFocus() {\n\t\tui.setFocus();\n\t}", "public void setFocus() {\n\t\tthis.viewer.getControl().setFocus();\n\t}", "@Override\r\n\tpublic void setFocus() {\r\n\t\tif (getControl() != null)\r\n\t\t\tgetControl().setFocus();\r\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "private void setFocus() {\n\t\tif (held) {\n\t\t\tfocus.x = img.getWidth() / 2;\n\t\t\tfocus.y = img.getHeight();\n\t\t} else {\n\t\t\tfocus.x = img.getWidth();\n\t\t\tfocus.y = img.getHeight() /2;\n\t\t} // end else\n\t}", "@Override\r\n\tpublic void setFocus() {\r\n\t}", "private void chooseTo8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chooseTo8ActionPerformed\n chooseTo8.setBackground(Color.black);\n }", "public void cancelSelectionBorder(){\n BackgroundImage bgselected= new BackgroundImage(new Image(\"rugbeats/img/Background_selectedhdpi.png\"),BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT,\n new BackgroundSize(1.0, 1.0, true, true, false, false));\n ImgStack.setBackground(new Background(bgselected));\n }", "void focus();", "void focus();", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "private void setButtonBackground(Button button, String bgImgName) {\n BackgroundImage backgroundImage = new BackgroundImage(\n new Image( getClass().getResource(\"resources/\" + bgImgName).toExternalForm()),\n BackgroundRepeat.NO_REPEAT,\n BackgroundRepeat.NO_REPEAT,\n BackgroundPosition.CENTER,\n BackgroundSize.DEFAULT);\n Background background = new Background(backgroundImage);\n button.setBackground(background);\n }", "@Override\r\n\tpublic void focus() {\r\n\t\tactivate();\r\n\t\ttoFront();\r\n\t}", "@Override\n public void setFocus() {\n }", "public void setFocus(){\n\t\ttxtText.setFocus(true);\n\t\ttxtText.selectAll();\n\t}", "public Color getPressedBackgroundColor() {\n return pressedBackgroundColor;\n }", "public void ConfiguracionBackground(int nNormal, int nFocus)\n {\n // Establecemos los valores de los background\n m_nBckNormal = nNormal;\n m_nBckFocus = nFocus;\n }", "private void searchBtnMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchBtnMousePressed\n searchBtn.setBackground(Color.decode(\"#1e5837\"));\n }", "@Override\n\tpublic void setFocus() {\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "public void Focus() {\n }", "private void chooseTo1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chooseTo1ActionPerformed\n chooseTo1.setBackground(Color.black);\n }", "@Override\n public void onClick(View v) {\n Intent PreviousScreen = new Intent(RoundSetting.this, MainPage.class);\n startActivity(PreviousScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "@Override\n public void onClick(View v) {\n Intent PreviousScreen = new Intent(RoundSetting.this, MainPage.class);\n startActivity(PreviousScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "@Override\n public void onClick(View v) {\n Intent PreviousScreen = new Intent(RoundSetting.this, MainPage.class);\n startActivity(PreviousScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "public void highlightEnable() {\n actualFillColor = new Color(0, 255, 0, 150);\n repaint();\n revalidate();\n }", "private void updateBtnMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_updateBtnMousePressed\n updateBtn.setBackground(Color.decode(\"#1e5837\"));\n }", "@FXML\n public void highlightMultiplayer()\n {\n multiplayerButton.setOnMouseEntered(mouseEvent -> multiplayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }", "private void searchBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchBtnMouseEntered\n searchBtn.setBackground(Color.decode(\"#339966\"));\n }", "@Override\r\n\tpublic void setBackgroundResource(int resid) {\n\t\tsuper.setBackgroundResource(resid);\r\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tbtnPrincipal.setBackgroundResource(R.drawable.est_premier_goles);\n\t\t\t}", "@Override\n\t\t\tpublic void onFocusChange(View v, boolean hasFocus) {\n\t\t\t\tif (hasFocus)\n\t\t\t\t\tpromocodeEdit.setBackgroundResource(R.drawable.formfield);\n\t\t\t\telse if (promocodeEdit.getText().toString().equals(\"\"))\n\t\t\t\t\tpromocodeEdit\n\t\t\t\t\t\t\t.setBackgroundResource(R.drawable.promo_btn_gray);\n\t\t\t}", "private void clearBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clearBtnMouseEntered\n clearBtn.setBackground(Color.decode(\"#339966\"));\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tbtnPrincipal.setBackgroundResource(R.drawable.est_premier_rojas);\n\t\t\t}", "private void buttonRedMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_buttonRedMouseEntered\n buttonRed.setBackground(new Color(255, 100, 100));\n repaint();\n }", "void addFocus();", "public static void setActiveBtnStyle(Button btn) {\n btn.setStyle(\"-fx-background-color: #42b13c,linear-gradient(#fafdfe, #e8f5fc), linear-gradient(#eaf6fd 0%, #d2fcd4 49%, #bdfdc9 50%, #70f575 100%)\");\n }", "public void setSelectionForeground( final Color color ) {\n checkWidget();\n selectionForeground = color;\n }", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n switch(event.getAction())\n {\n case MotionEvent.ACTION_DOWN:\n // buttonControl.setBackgroundColor(Color.RED);\n\n break;\n case MotionEvent.ACTION_UP:\n\n //set color back to default\n // buttonControl.setBackgroundColor(R.color.md_amber_200);\n Intent intent = new Intent(ControlDiagnostic.this, ControlActivity.class);\n startActivity(intent);\n break;\n }\n return true;\n }", "@Override\n public void setFocus()\n {\n this.textInput.setFocus();\n }", "private void drawFocus(Graphics2D g2, int x, int y, int w, int h)\r\n/* 237: */ {\r\n/* 238:262 */ g2.setPaint(new GradientPaint(x, y, PlasticLookAndFeel.getFocusColor().brighter(), w, h, PlasticLookAndFeel.getFocusColor()));\r\n/* 239: */ \r\n/* 240: */ \r\n/* 241: */ \r\n/* 242: */ \r\n/* 243: */ \r\n/* 244: */ \r\n/* 245: */ \r\n/* 246:270 */ Stroke stroke = g2.getStroke();\r\n/* 247:271 */ g2.setStroke(FOCUS_STROKE);\r\n/* 248:272 */ g2.drawOval(x, y, w, h);\r\n/* 249:273 */ g2.setStroke(stroke);\r\n/* 250: */ }", "protected void drawFocus( Graphics g, boolean on ) \n {\n paint( g );\n }", "public void setFocused(boolean focused) {\n/* 822 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent actionevent)\r\n\t\t{\n\t\t\tColor c = (Color) getValue( \"Color\" );\r\n\t\t\tsetBackground( c );\r\n\t\t}", "private void setBackgroundColor(int backColor){\n backgroundColor = backColor;\n touchArea.setBackgroundColor(backgroundColor);\n }" ]
[ "0.754511", "0.7022663", "0.6803246", "0.66151035", "0.6492519", "0.64506006", "0.6420154", "0.6410517", "0.64089185", "0.640417", "0.6375894", "0.63564885", "0.635415", "0.6267172", "0.62303793", "0.6224276", "0.6176164", "0.61504877", "0.61336476", "0.61124843", "0.6099544", "0.6081912", "0.6074314", "0.6045876", "0.60345924", "0.600037", "0.60003406", "0.5995601", "0.597552", "0.59538823", "0.5953232", "0.5950714", "0.5948705", "0.5901173", "0.5886481", "0.5871759", "0.58700424", "0.58700424", "0.58700424", "0.5854172", "0.58433175", "0.58429724", "0.5834171", "0.5826841", "0.58230907", "0.58189803", "0.58181804", "0.58181804", "0.58181804", "0.58181804", "0.58181804", "0.5814515", "0.5813104", "0.57990074", "0.5798089", "0.5794622", "0.5794622", "0.5791622", "0.5791622", "0.5791622", "0.5791622", "0.5768357", "0.5767572", "0.57618725", "0.5746724", "0.57444", "0.5739512", "0.57386035", "0.5734682", "0.5731977", "0.5731977", "0.5731977", "0.5731977", "0.5731977", "0.5731977", "0.5731977", "0.572922", "0.57195", "0.57162154", "0.57162154", "0.57162154", "0.56983095", "0.5691716", "0.56906825", "0.5685847", "0.56812435", "0.5680049", "0.5672244", "0.5662363", "0.5653533", "0.56500757", "0.5649333", "0.56470907", "0.56358856", "0.56327856", "0.56268954", "0.5614002", "0.56119156", "0.5611861", "0.5605763", "0.5604587" ]
0.0
-1
Sets the background of the button as focused
public void openLevels(View view) { setViewBackgroundWithoutResettingPadding(view, R.drawable.bkg_button_on); // Starts the new activity Intent intent = new Intent(this, LevelsActivity.class); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void onFocusChange(View button, boolean isFocus) {\n\t\t\t\tif(isFocus){\n\t\t\t\t\tbutton.setBackgroundColor(getResources().getColor(R.color.blue));\n\t\t\t\t}else \n\t\t\t\t\tbutton.setBackground(getResources().getDrawable(R.drawable.button_style)); \n\t\t\t}", "@Override\n public void setFocused()\n {\n setImage(\"MinusFocused.png\");\n }", "public void setFocused(boolean focused);", "public abstract void setBackgroundPressed(final int rgba);", "public void setPressedBackgroundColor(Color pressedBackgroundColor) {\n this.pressedBackgroundColor = pressedBackgroundColor;\n }", "@Override\r\n public void mousePressed(MouseEvent e) {\n setBackground(Color.BLUE);\r\n \r\n \r\n }", "public void setActivingColor(){\n this.setBackground(new Color( 213, 228, 242));\n this.forceupdateUI();\n }", "@Override\r\n\t\tpublic void onChange(boolean selfChange) {\n\t\t\tif (mBtnState) {\r\n\t\t\t\tsetUnfocusBg();\r\n\t\t\t} else {\r\n\t\t\t\tsetDefaultBg();\r\n\t\t\t}\r\n\t\t}", "private void focusAnimations(View v,int focused, int normal)\n {\n boolean found = false;\n for(ButtonData btn:buttons)\n if(btn.getView()==v)\n found=true;\n\n if(!found)\n {\n buttons.add(new ButtonData(v,focused,normal));\n }\n\n for(ButtonData btn:buttons)\n if(btn.getView()!=v)\n {\n btn.getView().setPressed(false);\n btn.getView().setBackgroundResource(btn.getNormal());\n btn.getView().invalidate();\n }\n else\n btn.getView().setPressed(true);\n\n if(v.isPressed())\n v.setBackgroundResource(focused);\n else\n v.setBackgroundResource(normal);\n }", "public void setFocus() {\n startButton.setFocus();\n }", "private void setPressedStyle() {\n this.setStyle(BUTTON_PRESSED);\n this.setPrefHeight(43);\n this.setLayoutY(getLayoutY() + 4);\n }", "protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect){\n }", "public abstract void setForegroundPressed(final int rgba);", "public void setBg(){\n this.setBackground(color);\n }", "protected void gainFocus(){\r\n\t\twidgetModifyFacade.changeVersatilePane(this);\r\n\t\twidgetModifyFacade.gainedFocusSignal(this);\r\n\t//\tthis.setId(\"single-image-widget-selected\");\r\n\t}", "public void setSelectionBackground( final Color color ) {\n checkWidget();\n selectionBackground = color;\n }", "private void applyBackgroundColor() {\r\n\t\tthis.control.setBackground(PromptSupport.getBackground(this.control));\r\n\t}", "public void setFocused(boolean value) {\n getPolymerElement().setFocused(value);\n }", "public void focusPropertyButton(Button btn){\n btn.hoverProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observableValue, Boolean aBoolean, Boolean t1) {\n if (t1){\n InterfaceStyling.dropShadowExitSelect(btn);\n } else {\n InterfaceStyling.dropShadowExitDeselect(btn);\n }\n }\n });\n }", "public void chooseBackgroundColor(){\n currentBackgroundColor = backgroundColorPicker.getValue();\n draw();\n }", "void setFocus();", "@Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus) {\n mInputLayout\n .setBackgroundResource(R.drawable.textfield_search_selected);\n\n } else {\n mInputLayout\n .setBackgroundResource(R.drawable.textfield_search_default);\n }\n }", "public void setFocus();", "@Override\r\npublic void mousePressed(MouseEvent arg0) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "public void setEnteredBackground(boolean enteredBackground) {\n this.enteredBackground = enteredBackground;\n }", "public void focus() {}", "@Override\r\npublic void mouseClicked(MouseEvent e) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "public void setFocus() {\n\t}", "@Override\r\n\tpublic boolean isFocused() {\n\t\treturn false;\r\n\t}", "public void setFocus() {\n \t\tviewer.getControl().setFocus();\n \t}", "private void chooseTo7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chooseTo7ActionPerformed\n chooseTo7.setBackground(Color.black);\n }", "public void setFocus() {\n }", "private void setTabBg(View vFocused, boolean selected) {\n if (selected) {\n SkinUtil.instance().setViewBackground(this, vFocused, R.drawable.bg_title_item_c);\n } else {\n SkinUtil.instance().setViewBackground(this, vFocused, R.drawable.btn_filter_tab_selector);\n }\n }", "@Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus) {\n // 如果是左侧的三个按钮获得焦点的话, 则直接触发事件\n if (v.getId() == R.id.main_ib_bendi) {\n btnBendiSetFocus();\n btnTfkaSetBackground();\n btnUpanSetBackground();\n return;\n } else if (v.getId() == R.id.main_ib_tfka) {\n btnBendiSetBackground();\n btnTfkaSetFocus();\n btnUpanSetBackground();\n return;\n } else if (v.getId() == R.id.main_ib_upan) {\n btnBendiSetBackground();\n btnTfkaSetBackground();\n btnUpanSetFocus();\n return;\n }\n }\n\n btnBendiSetBackground();\n btnTfkaSetBackground();\n btnUpanSetBackground();\n\n // viewAnimation(v, hasFocus);\n }", "@Focus\n\tpublic void setFocus() \n\t{\n\t\t\tfor(int r = Board.LENGTH - 1; r >= 0; r--)\n\t\t\t{\t\n\t\t\t\t\tfor(int c=0;c<Board.LENGTH;c++)\n\t\t\t\t\t{\t\n\t\t\t\t\t\tsquares[r][c+1].setBackground(Display.getDefault().getSystemColor(SWT.COLOR_DARK_GRAY));\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif(((Square) squares[r][c+1].getData()).isLegal())//It returns the legal attribute wrong\n\t\t\t\t\t\t{squares[r][c+1].setBackground(Display.getDefault().getSystemColor(SWT.COLOR_YELLOW));}\n\t\t\t\t\t\t\n\t\t\t\t\t\tPiece piece = ((Square) squares[r][c+1].getData()).getPiece();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(piece == null)\t\n\t\t\t\t\t\t\tsquares[r][c+1].setImage(IconHandler.getBlankIcon());\t\t\t\t\t\t\t\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tsquares[r][c+1].setImage(piece.getIcon());\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}\t\t\n\t}", "private void toggle_focus() {\n\t\ttry {\n\t\t\tif (!lock_autofocus) {\n\t\t\t\t//getCameraManager().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\t\t\n\t\t\t\tlockAutoFocus.setBackgroundResource(R.drawable.eye_selected);\n\t\t\t} else {\n\t\t\t\tlockAutoFocus.setBackgroundResource(R.drawable.eye);\n\t\t\t\tstatusView.setText(getString(R.string.set_focus));\n\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Stopped;\n\t\t\t //getCameraManager().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\t\t\n\t\t\t}\n\t\t\tlock_autofocus = !lock_autofocus;\n\t\t\tcameraManager.setAutoFocus(lock_autofocus);\n\t\t} catch (Exception oEx) {\n\n\t\t}\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "private void buttonMouseEnter(Button btn){\r\n\t\tbtn.setBackground(\r\n\t\t\t\tnew Background(new BackgroundFill(Color.rgb(66,103,178), new CornerRadii(0), new Insets(0)))); // set login button facebook blue with mouse enter\r\n\t\tbtn.setTextFill(Color.WHITE);\r\n\t}", "public void setFocus() {\n \t\tex.setFocus();\n \t}", "@Override\r\n\tpublic void setFocus() {\n\t\t\r\n\t}", "private void updateBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_updateBtnMouseEntered\n updateBtn.setBackground(Color.decode(\"#339966\"));\n }", "public void setFocus() {\n\t\tui.setFocus();\n\t}", "public void setFocus() {\n\t\tthis.viewer.getControl().setFocus();\n\t}", "@Override\r\n\tpublic void setFocus() {\r\n\t\tif (getControl() != null)\r\n\t\t\tgetControl().setFocus();\r\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "private void setFocus() {\n\t\tif (held) {\n\t\t\tfocus.x = img.getWidth() / 2;\n\t\t\tfocus.y = img.getHeight();\n\t\t} else {\n\t\t\tfocus.x = img.getWidth();\n\t\t\tfocus.y = img.getHeight() /2;\n\t\t} // end else\n\t}", "@Override\r\n\tpublic void setFocus() {\r\n\t}", "private void chooseTo8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chooseTo8ActionPerformed\n chooseTo8.setBackground(Color.black);\n }", "public void cancelSelectionBorder(){\n BackgroundImage bgselected= new BackgroundImage(new Image(\"rugbeats/img/Background_selectedhdpi.png\"),BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT,\n new BackgroundSize(1.0, 1.0, true, true, false, false));\n ImgStack.setBackground(new Background(bgselected));\n }", "void focus();", "void focus();", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "private void setButtonBackground(Button button, String bgImgName) {\n BackgroundImage backgroundImage = new BackgroundImage(\n new Image( getClass().getResource(\"resources/\" + bgImgName).toExternalForm()),\n BackgroundRepeat.NO_REPEAT,\n BackgroundRepeat.NO_REPEAT,\n BackgroundPosition.CENTER,\n BackgroundSize.DEFAULT);\n Background background = new Background(backgroundImage);\n button.setBackground(background);\n }", "@Override\r\n\tpublic void focus() {\r\n\t\tactivate();\r\n\t\ttoFront();\r\n\t}", "@Override\n public void setFocus() {\n }", "public void setFocus(){\n\t\ttxtText.setFocus(true);\n\t\ttxtText.selectAll();\n\t}", "public Color getPressedBackgroundColor() {\n return pressedBackgroundColor;\n }", "public void ConfiguracionBackground(int nNormal, int nFocus)\n {\n // Establecemos los valores de los background\n m_nBckNormal = nNormal;\n m_nBckFocus = nFocus;\n }", "private void searchBtnMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchBtnMousePressed\n searchBtn.setBackground(Color.decode(\"#1e5837\"));\n }", "@Override\n\tpublic void setFocus() {\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "public void Focus() {\n }", "private void chooseTo1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chooseTo1ActionPerformed\n chooseTo1.setBackground(Color.black);\n }", "@Override\n public void onClick(View v) {\n Intent PreviousScreen = new Intent(RoundSetting.this, MainPage.class);\n startActivity(PreviousScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "@Override\n public void onClick(View v) {\n Intent PreviousScreen = new Intent(RoundSetting.this, MainPage.class);\n startActivity(PreviousScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "@Override\n public void onClick(View v) {\n Intent PreviousScreen = new Intent(RoundSetting.this, MainPage.class);\n startActivity(PreviousScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "public void highlightEnable() {\n actualFillColor = new Color(0, 255, 0, 150);\n repaint();\n revalidate();\n }", "private void updateBtnMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_updateBtnMousePressed\n updateBtn.setBackground(Color.decode(\"#1e5837\"));\n }", "@FXML\n public void highlightMultiplayer()\n {\n multiplayerButton.setOnMouseEntered(mouseEvent -> multiplayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }", "private void searchBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchBtnMouseEntered\n searchBtn.setBackground(Color.decode(\"#339966\"));\n }", "@Override\r\n\tpublic void setBackgroundResource(int resid) {\n\t\tsuper.setBackgroundResource(resid);\r\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tbtnPrincipal.setBackgroundResource(R.drawable.est_premier_goles);\n\t\t\t}", "@Override\n\t\t\tpublic void onFocusChange(View v, boolean hasFocus) {\n\t\t\t\tif (hasFocus)\n\t\t\t\t\tpromocodeEdit.setBackgroundResource(R.drawable.formfield);\n\t\t\t\telse if (promocodeEdit.getText().toString().equals(\"\"))\n\t\t\t\t\tpromocodeEdit\n\t\t\t\t\t\t\t.setBackgroundResource(R.drawable.promo_btn_gray);\n\t\t\t}", "private void clearBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clearBtnMouseEntered\n clearBtn.setBackground(Color.decode(\"#339966\"));\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tbtnPrincipal.setBackgroundResource(R.drawable.est_premier_rojas);\n\t\t\t}", "private void buttonRedMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_buttonRedMouseEntered\n buttonRed.setBackground(new Color(255, 100, 100));\n repaint();\n }", "void addFocus();", "public static void setActiveBtnStyle(Button btn) {\n btn.setStyle(\"-fx-background-color: #42b13c,linear-gradient(#fafdfe, #e8f5fc), linear-gradient(#eaf6fd 0%, #d2fcd4 49%, #bdfdc9 50%, #70f575 100%)\");\n }", "public void setSelectionForeground( final Color color ) {\n checkWidget();\n selectionForeground = color;\n }", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n switch(event.getAction())\n {\n case MotionEvent.ACTION_DOWN:\n // buttonControl.setBackgroundColor(Color.RED);\n\n break;\n case MotionEvent.ACTION_UP:\n\n //set color back to default\n // buttonControl.setBackgroundColor(R.color.md_amber_200);\n Intent intent = new Intent(ControlDiagnostic.this, ControlActivity.class);\n startActivity(intent);\n break;\n }\n return true;\n }", "@Override\n public void setFocus()\n {\n this.textInput.setFocus();\n }", "private void drawFocus(Graphics2D g2, int x, int y, int w, int h)\r\n/* 237: */ {\r\n/* 238:262 */ g2.setPaint(new GradientPaint(x, y, PlasticLookAndFeel.getFocusColor().brighter(), w, h, PlasticLookAndFeel.getFocusColor()));\r\n/* 239: */ \r\n/* 240: */ \r\n/* 241: */ \r\n/* 242: */ \r\n/* 243: */ \r\n/* 244: */ \r\n/* 245: */ \r\n/* 246:270 */ Stroke stroke = g2.getStroke();\r\n/* 247:271 */ g2.setStroke(FOCUS_STROKE);\r\n/* 248:272 */ g2.drawOval(x, y, w, h);\r\n/* 249:273 */ g2.setStroke(stroke);\r\n/* 250: */ }", "protected void drawFocus( Graphics g, boolean on ) \n {\n paint( g );\n }", "public void setFocused(boolean focused) {\n/* 822 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent actionevent)\r\n\t\t{\n\t\t\tColor c = (Color) getValue( \"Color\" );\r\n\t\t\tsetBackground( c );\r\n\t\t}", "private void setBackgroundColor(int backColor){\n backgroundColor = backColor;\n touchArea.setBackgroundColor(backgroundColor);\n }" ]
[ "0.754511", "0.7022663", "0.6803246", "0.66151035", "0.6492519", "0.64506006", "0.6420154", "0.6410517", "0.64089185", "0.640417", "0.6375894", "0.63564885", "0.635415", "0.6267172", "0.62303793", "0.6224276", "0.6176164", "0.61504877", "0.61336476", "0.61124843", "0.6099544", "0.6081912", "0.6074314", "0.6045876", "0.60345924", "0.600037", "0.60003406", "0.5995601", "0.597552", "0.59538823", "0.5953232", "0.5950714", "0.5948705", "0.5901173", "0.5886481", "0.5871759", "0.58700424", "0.58700424", "0.58700424", "0.5854172", "0.58433175", "0.58429724", "0.5834171", "0.5826841", "0.58230907", "0.58189803", "0.58181804", "0.58181804", "0.58181804", "0.58181804", "0.58181804", "0.5814515", "0.5813104", "0.57990074", "0.5798089", "0.5794622", "0.5794622", "0.5791622", "0.5791622", "0.5791622", "0.5791622", "0.5768357", "0.5767572", "0.57618725", "0.5746724", "0.57444", "0.5739512", "0.57386035", "0.5734682", "0.5731977", "0.5731977", "0.5731977", "0.5731977", "0.5731977", "0.5731977", "0.5731977", "0.572922", "0.57195", "0.57162154", "0.57162154", "0.57162154", "0.56983095", "0.5691716", "0.56906825", "0.5685847", "0.56812435", "0.5680049", "0.5672244", "0.5662363", "0.5653533", "0.56500757", "0.5649333", "0.56470907", "0.56358856", "0.56327856", "0.56268954", "0.5614002", "0.56119156", "0.5611861", "0.5605763", "0.5604587" ]
0.0
-1
Sets the background of the button as focused
public void openSettings(View view) { setViewBackgroundWithoutResettingPadding(view, R.drawable.bkg_button_on); // Starts the new activity Intent intent = new Intent(this, SettingsActivity.class); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void onFocusChange(View button, boolean isFocus) {\n\t\t\t\tif(isFocus){\n\t\t\t\t\tbutton.setBackgroundColor(getResources().getColor(R.color.blue));\n\t\t\t\t}else \n\t\t\t\t\tbutton.setBackground(getResources().getDrawable(R.drawable.button_style)); \n\t\t\t}", "@Override\n public void setFocused()\n {\n setImage(\"MinusFocused.png\");\n }", "public void setFocused(boolean focused);", "public abstract void setBackgroundPressed(final int rgba);", "public void setPressedBackgroundColor(Color pressedBackgroundColor) {\n this.pressedBackgroundColor = pressedBackgroundColor;\n }", "@Override\r\n public void mousePressed(MouseEvent e) {\n setBackground(Color.BLUE);\r\n \r\n \r\n }", "public void setActivingColor(){\n this.setBackground(new Color( 213, 228, 242));\n this.forceupdateUI();\n }", "@Override\r\n\t\tpublic void onChange(boolean selfChange) {\n\t\t\tif (mBtnState) {\r\n\t\t\t\tsetUnfocusBg();\r\n\t\t\t} else {\r\n\t\t\t\tsetDefaultBg();\r\n\t\t\t}\r\n\t\t}", "private void focusAnimations(View v,int focused, int normal)\n {\n boolean found = false;\n for(ButtonData btn:buttons)\n if(btn.getView()==v)\n found=true;\n\n if(!found)\n {\n buttons.add(new ButtonData(v,focused,normal));\n }\n\n for(ButtonData btn:buttons)\n if(btn.getView()!=v)\n {\n btn.getView().setPressed(false);\n btn.getView().setBackgroundResource(btn.getNormal());\n btn.getView().invalidate();\n }\n else\n btn.getView().setPressed(true);\n\n if(v.isPressed())\n v.setBackgroundResource(focused);\n else\n v.setBackgroundResource(normal);\n }", "public void setFocus() {\n startButton.setFocus();\n }", "private void setPressedStyle() {\n this.setStyle(BUTTON_PRESSED);\n this.setPrefHeight(43);\n this.setLayoutY(getLayoutY() + 4);\n }", "protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect){\n }", "public abstract void setForegroundPressed(final int rgba);", "public void setBg(){\n this.setBackground(color);\n }", "protected void gainFocus(){\r\n\t\twidgetModifyFacade.changeVersatilePane(this);\r\n\t\twidgetModifyFacade.gainedFocusSignal(this);\r\n\t//\tthis.setId(\"single-image-widget-selected\");\r\n\t}", "public void setSelectionBackground( final Color color ) {\n checkWidget();\n selectionBackground = color;\n }", "private void applyBackgroundColor() {\r\n\t\tthis.control.setBackground(PromptSupport.getBackground(this.control));\r\n\t}", "public void setFocused(boolean value) {\n getPolymerElement().setFocused(value);\n }", "public void focusPropertyButton(Button btn){\n btn.hoverProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observableValue, Boolean aBoolean, Boolean t1) {\n if (t1){\n InterfaceStyling.dropShadowExitSelect(btn);\n } else {\n InterfaceStyling.dropShadowExitDeselect(btn);\n }\n }\n });\n }", "public void chooseBackgroundColor(){\n currentBackgroundColor = backgroundColorPicker.getValue();\n draw();\n }", "void setFocus();", "@Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus) {\n mInputLayout\n .setBackgroundResource(R.drawable.textfield_search_selected);\n\n } else {\n mInputLayout\n .setBackgroundResource(R.drawable.textfield_search_default);\n }\n }", "public void setFocus();", "@Override\r\npublic void mousePressed(MouseEvent arg0) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "public void setEnteredBackground(boolean enteredBackground) {\n this.enteredBackground = enteredBackground;\n }", "@Override\r\npublic void mouseClicked(MouseEvent e) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "public void focus() {}", "public void setFocus() {\n\t}", "@Override\r\n\tpublic boolean isFocused() {\n\t\treturn false;\r\n\t}", "private void chooseTo7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chooseTo7ActionPerformed\n chooseTo7.setBackground(Color.black);\n }", "public void setFocus() {\n \t\tviewer.getControl().setFocus();\n \t}", "public void setFocus() {\n }", "private void setTabBg(View vFocused, boolean selected) {\n if (selected) {\n SkinUtil.instance().setViewBackground(this, vFocused, R.drawable.bg_title_item_c);\n } else {\n SkinUtil.instance().setViewBackground(this, vFocused, R.drawable.btn_filter_tab_selector);\n }\n }", "@Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus) {\n // 如果是左侧的三个按钮获得焦点的话, 则直接触发事件\n if (v.getId() == R.id.main_ib_bendi) {\n btnBendiSetFocus();\n btnTfkaSetBackground();\n btnUpanSetBackground();\n return;\n } else if (v.getId() == R.id.main_ib_tfka) {\n btnBendiSetBackground();\n btnTfkaSetFocus();\n btnUpanSetBackground();\n return;\n } else if (v.getId() == R.id.main_ib_upan) {\n btnBendiSetBackground();\n btnTfkaSetBackground();\n btnUpanSetFocus();\n return;\n }\n }\n\n btnBendiSetBackground();\n btnTfkaSetBackground();\n btnUpanSetBackground();\n\n // viewAnimation(v, hasFocus);\n }", "@Focus\n\tpublic void setFocus() \n\t{\n\t\t\tfor(int r = Board.LENGTH - 1; r >= 0; r--)\n\t\t\t{\t\n\t\t\t\t\tfor(int c=0;c<Board.LENGTH;c++)\n\t\t\t\t\t{\t\n\t\t\t\t\t\tsquares[r][c+1].setBackground(Display.getDefault().getSystemColor(SWT.COLOR_DARK_GRAY));\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif(((Square) squares[r][c+1].getData()).isLegal())//It returns the legal attribute wrong\n\t\t\t\t\t\t{squares[r][c+1].setBackground(Display.getDefault().getSystemColor(SWT.COLOR_YELLOW));}\n\t\t\t\t\t\t\n\t\t\t\t\t\tPiece piece = ((Square) squares[r][c+1].getData()).getPiece();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(piece == null)\t\n\t\t\t\t\t\t\tsquares[r][c+1].setImage(IconHandler.getBlankIcon());\t\t\t\t\t\t\t\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tsquares[r][c+1].setImage(piece.getIcon());\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}\t\t\n\t}", "private void toggle_focus() {\n\t\ttry {\n\t\t\tif (!lock_autofocus) {\n\t\t\t\t//getCameraManager().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\t\t\n\t\t\t\tlockAutoFocus.setBackgroundResource(R.drawable.eye_selected);\n\t\t\t} else {\n\t\t\t\tlockAutoFocus.setBackgroundResource(R.drawable.eye);\n\t\t\t\tstatusView.setText(getString(R.string.set_focus));\n\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Stopped;\n\t\t\t //getCameraManager().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\t\t\n\t\t\t}\n\t\t\tlock_autofocus = !lock_autofocus;\n\t\t\tcameraManager.setAutoFocus(lock_autofocus);\n\t\t} catch (Exception oEx) {\n\n\t\t}\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "private void buttonMouseEnter(Button btn){\r\n\t\tbtn.setBackground(\r\n\t\t\t\tnew Background(new BackgroundFill(Color.rgb(66,103,178), new CornerRadii(0), new Insets(0)))); // set login button facebook blue with mouse enter\r\n\t\tbtn.setTextFill(Color.WHITE);\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\t\t\r\n\t}", "public void setFocus() {\n \t\tex.setFocus();\n \t}", "private void updateBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_updateBtnMouseEntered\n updateBtn.setBackground(Color.decode(\"#339966\"));\n }", "public void setFocus() {\n\t\tui.setFocus();\n\t}", "public void setFocus() {\n\t\tthis.viewer.getControl().setFocus();\n\t}", "@Override\r\n\tpublic void setFocus() {\r\n\t\tif (getControl() != null)\r\n\t\t\tgetControl().setFocus();\r\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "private void setFocus() {\n\t\tif (held) {\n\t\t\tfocus.x = img.getWidth() / 2;\n\t\t\tfocus.y = img.getHeight();\n\t\t} else {\n\t\t\tfocus.x = img.getWidth();\n\t\t\tfocus.y = img.getHeight() /2;\n\t\t} // end else\n\t}", "@Override\r\n\tpublic void setFocus() {\r\n\t}", "private void chooseTo8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chooseTo8ActionPerformed\n chooseTo8.setBackground(Color.black);\n }", "public void cancelSelectionBorder(){\n BackgroundImage bgselected= new BackgroundImage(new Image(\"rugbeats/img/Background_selectedhdpi.png\"),BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT,\n new BackgroundSize(1.0, 1.0, true, true, false, false));\n ImgStack.setBackground(new Background(bgselected));\n }", "void focus();", "void focus();", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "private void setButtonBackground(Button button, String bgImgName) {\n BackgroundImage backgroundImage = new BackgroundImage(\n new Image( getClass().getResource(\"resources/\" + bgImgName).toExternalForm()),\n BackgroundRepeat.NO_REPEAT,\n BackgroundRepeat.NO_REPEAT,\n BackgroundPosition.CENTER,\n BackgroundSize.DEFAULT);\n Background background = new Background(backgroundImage);\n button.setBackground(background);\n }", "@Override\r\n\tpublic void focus() {\r\n\t\tactivate();\r\n\t\ttoFront();\r\n\t}", "@Override\n public void setFocus() {\n }", "public Color getPressedBackgroundColor() {\n return pressedBackgroundColor;\n }", "public void setFocus(){\n\t\ttxtText.setFocus(true);\n\t\ttxtText.selectAll();\n\t}", "private void searchBtnMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchBtnMousePressed\n searchBtn.setBackground(Color.decode(\"#1e5837\"));\n }", "public void ConfiguracionBackground(int nNormal, int nFocus)\n {\n // Establecemos los valores de los background\n m_nBckNormal = nNormal;\n m_nBckFocus = nFocus;\n }", "@Override\n\tpublic void setFocus() {\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "public void Focus() {\n }", "private void chooseTo1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chooseTo1ActionPerformed\n chooseTo1.setBackground(Color.black);\n }", "@Override\n public void onClick(View v) {\n Intent PreviousScreen = new Intent(RoundSetting.this, MainPage.class);\n startActivity(PreviousScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "@Override\n public void onClick(View v) {\n Intent PreviousScreen = new Intent(RoundSetting.this, MainPage.class);\n startActivity(PreviousScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "@Override\n public void onClick(View v) {\n Intent PreviousScreen = new Intent(RoundSetting.this, MainPage.class);\n startActivity(PreviousScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "public void highlightEnable() {\n actualFillColor = new Color(0, 255, 0, 150);\n repaint();\n revalidate();\n }", "private void updateBtnMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_updateBtnMousePressed\n updateBtn.setBackground(Color.decode(\"#1e5837\"));\n }", "@FXML\n public void highlightMultiplayer()\n {\n multiplayerButton.setOnMouseEntered(mouseEvent -> multiplayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }", "private void searchBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchBtnMouseEntered\n searchBtn.setBackground(Color.decode(\"#339966\"));\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tbtnPrincipal.setBackgroundResource(R.drawable.est_premier_goles);\n\t\t\t}", "@Override\r\n\tpublic void setBackgroundResource(int resid) {\n\t\tsuper.setBackgroundResource(resid);\r\n\t}", "@Override\n\t\t\tpublic void onFocusChange(View v, boolean hasFocus) {\n\t\t\t\tif (hasFocus)\n\t\t\t\t\tpromocodeEdit.setBackgroundResource(R.drawable.formfield);\n\t\t\t\telse if (promocodeEdit.getText().toString().equals(\"\"))\n\t\t\t\t\tpromocodeEdit\n\t\t\t\t\t\t\t.setBackgroundResource(R.drawable.promo_btn_gray);\n\t\t\t}", "private void clearBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clearBtnMouseEntered\n clearBtn.setBackground(Color.decode(\"#339966\"));\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tbtnPrincipal.setBackgroundResource(R.drawable.est_premier_rojas);\n\t\t\t}", "private void buttonRedMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_buttonRedMouseEntered\n buttonRed.setBackground(new Color(255, 100, 100));\n repaint();\n }", "void addFocus();", "public static void setActiveBtnStyle(Button btn) {\n btn.setStyle(\"-fx-background-color: #42b13c,linear-gradient(#fafdfe, #e8f5fc), linear-gradient(#eaf6fd 0%, #d2fcd4 49%, #bdfdc9 50%, #70f575 100%)\");\n }", "public void setSelectionForeground( final Color color ) {\n checkWidget();\n selectionForeground = color;\n }", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n switch(event.getAction())\n {\n case MotionEvent.ACTION_DOWN:\n // buttonControl.setBackgroundColor(Color.RED);\n\n break;\n case MotionEvent.ACTION_UP:\n\n //set color back to default\n // buttonControl.setBackgroundColor(R.color.md_amber_200);\n Intent intent = new Intent(ControlDiagnostic.this, ControlActivity.class);\n startActivity(intent);\n break;\n }\n return true;\n }", "@Override\n public void setFocus()\n {\n this.textInput.setFocus();\n }", "private void drawFocus(Graphics2D g2, int x, int y, int w, int h)\r\n/* 237: */ {\r\n/* 238:262 */ g2.setPaint(new GradientPaint(x, y, PlasticLookAndFeel.getFocusColor().brighter(), w, h, PlasticLookAndFeel.getFocusColor()));\r\n/* 239: */ \r\n/* 240: */ \r\n/* 241: */ \r\n/* 242: */ \r\n/* 243: */ \r\n/* 244: */ \r\n/* 245: */ \r\n/* 246:270 */ Stroke stroke = g2.getStroke();\r\n/* 247:271 */ g2.setStroke(FOCUS_STROKE);\r\n/* 248:272 */ g2.drawOval(x, y, w, h);\r\n/* 249:273 */ g2.setStroke(stroke);\r\n/* 250: */ }", "public void setFocused(boolean focused) {\n/* 822 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "protected void drawFocus( Graphics g, boolean on ) \n {\n paint( g );\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent actionevent)\r\n\t\t{\n\t\t\tColor c = (Color) getValue( \"Color\" );\r\n\t\t\tsetBackground( c );\r\n\t\t}", "private void setBackgroundColor(int backColor){\n backgroundColor = backColor;\n touchArea.setBackgroundColor(backgroundColor);\n }" ]
[ "0.7545188", "0.7024956", "0.6803572", "0.66167253", "0.6493439", "0.6452654", "0.6421814", "0.6411543", "0.6409164", "0.6404046", "0.6378395", "0.6357997", "0.63561624", "0.6267539", "0.6231931", "0.6223347", "0.61769545", "0.6149706", "0.6133999", "0.61133957", "0.60994595", "0.6082208", "0.6074255", "0.60489994", "0.6034034", "0.600325", "0.6000621", "0.599514", "0.597581", "0.5954513", "0.5953497", "0.59504676", "0.5949659", "0.59020317", "0.58862257", "0.5871693", "0.58696264", "0.58696264", "0.58696264", "0.5856423", "0.5842596", "0.58424723", "0.5836623", "0.5826249", "0.5822662", "0.5818731", "0.5817946", "0.5817946", "0.5817946", "0.5817946", "0.5817946", "0.5813791", "0.5812874", "0.58002853", "0.5799511", "0.57953566", "0.57953566", "0.5791364", "0.5791364", "0.5791364", "0.5791364", "0.5768981", "0.57682306", "0.57617104", "0.57460946", "0.5745811", "0.57410663", "0.5740809", "0.5734475", "0.57317686", "0.57317686", "0.57317686", "0.57317686", "0.57317686", "0.57317686", "0.57317686", "0.57297415", "0.57211536", "0.57186174", "0.57186174", "0.57186174", "0.5699793", "0.56946456", "0.5693966", "0.56879246", "0.5682924", "0.56820923", "0.5672597", "0.5664401", "0.56559545", "0.565148", "0.56507164", "0.56481445", "0.5635348", "0.56348294", "0.5626899", "0.56145865", "0.56121784", "0.56112844", "0.5606736", "0.5604171" ]
0.0
-1
Sets the background of the button as focused
public void openHelp(View view) { setViewBackgroundWithoutResettingPadding(view, R.drawable.bkg_button_on); // Starts the new activity Intent intent = new Intent(this, HelpActivity.class); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void onFocusChange(View button, boolean isFocus) {\n\t\t\t\tif(isFocus){\n\t\t\t\t\tbutton.setBackgroundColor(getResources().getColor(R.color.blue));\n\t\t\t\t}else \n\t\t\t\t\tbutton.setBackground(getResources().getDrawable(R.drawable.button_style)); \n\t\t\t}", "@Override\n public void setFocused()\n {\n setImage(\"MinusFocused.png\");\n }", "public void setFocused(boolean focused);", "public abstract void setBackgroundPressed(final int rgba);", "public void setPressedBackgroundColor(Color pressedBackgroundColor) {\n this.pressedBackgroundColor = pressedBackgroundColor;\n }", "@Override\r\n public void mousePressed(MouseEvent e) {\n setBackground(Color.BLUE);\r\n \r\n \r\n }", "public void setActivingColor(){\n this.setBackground(new Color( 213, 228, 242));\n this.forceupdateUI();\n }", "@Override\r\n\t\tpublic void onChange(boolean selfChange) {\n\t\t\tif (mBtnState) {\r\n\t\t\t\tsetUnfocusBg();\r\n\t\t\t} else {\r\n\t\t\t\tsetDefaultBg();\r\n\t\t\t}\r\n\t\t}", "private void focusAnimations(View v,int focused, int normal)\n {\n boolean found = false;\n for(ButtonData btn:buttons)\n if(btn.getView()==v)\n found=true;\n\n if(!found)\n {\n buttons.add(new ButtonData(v,focused,normal));\n }\n\n for(ButtonData btn:buttons)\n if(btn.getView()!=v)\n {\n btn.getView().setPressed(false);\n btn.getView().setBackgroundResource(btn.getNormal());\n btn.getView().invalidate();\n }\n else\n btn.getView().setPressed(true);\n\n if(v.isPressed())\n v.setBackgroundResource(focused);\n else\n v.setBackgroundResource(normal);\n }", "public void setFocus() {\n startButton.setFocus();\n }", "private void setPressedStyle() {\n this.setStyle(BUTTON_PRESSED);\n this.setPrefHeight(43);\n this.setLayoutY(getLayoutY() + 4);\n }", "protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect){\n }", "public abstract void setForegroundPressed(final int rgba);", "public void setBg(){\n this.setBackground(color);\n }", "protected void gainFocus(){\r\n\t\twidgetModifyFacade.changeVersatilePane(this);\r\n\t\twidgetModifyFacade.gainedFocusSignal(this);\r\n\t//\tthis.setId(\"single-image-widget-selected\");\r\n\t}", "public void setSelectionBackground( final Color color ) {\n checkWidget();\n selectionBackground = color;\n }", "private void applyBackgroundColor() {\r\n\t\tthis.control.setBackground(PromptSupport.getBackground(this.control));\r\n\t}", "public void setFocused(boolean value) {\n getPolymerElement().setFocused(value);\n }", "public void focusPropertyButton(Button btn){\n btn.hoverProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observableValue, Boolean aBoolean, Boolean t1) {\n if (t1){\n InterfaceStyling.dropShadowExitSelect(btn);\n } else {\n InterfaceStyling.dropShadowExitDeselect(btn);\n }\n }\n });\n }", "public void chooseBackgroundColor(){\n currentBackgroundColor = backgroundColorPicker.getValue();\n draw();\n }", "void setFocus();", "@Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus) {\n mInputLayout\n .setBackgroundResource(R.drawable.textfield_search_selected);\n\n } else {\n mInputLayout\n .setBackgroundResource(R.drawable.textfield_search_default);\n }\n }", "public void setFocus();", "@Override\r\npublic void mousePressed(MouseEvent arg0) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "public void setEnteredBackground(boolean enteredBackground) {\n this.enteredBackground = enteredBackground;\n }", "public void focus() {}", "@Override\r\npublic void mouseClicked(MouseEvent e) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "public void setFocus() {\n\t}", "@Override\r\n\tpublic boolean isFocused() {\n\t\treturn false;\r\n\t}", "public void setFocus() {\n \t\tviewer.getControl().setFocus();\n \t}", "private void chooseTo7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chooseTo7ActionPerformed\n chooseTo7.setBackground(Color.black);\n }", "public void setFocus() {\n }", "private void setTabBg(View vFocused, boolean selected) {\n if (selected) {\n SkinUtil.instance().setViewBackground(this, vFocused, R.drawable.bg_title_item_c);\n } else {\n SkinUtil.instance().setViewBackground(this, vFocused, R.drawable.btn_filter_tab_selector);\n }\n }", "@Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus) {\n // 如果是左侧的三个按钮获得焦点的话, 则直接触发事件\n if (v.getId() == R.id.main_ib_bendi) {\n btnBendiSetFocus();\n btnTfkaSetBackground();\n btnUpanSetBackground();\n return;\n } else if (v.getId() == R.id.main_ib_tfka) {\n btnBendiSetBackground();\n btnTfkaSetFocus();\n btnUpanSetBackground();\n return;\n } else if (v.getId() == R.id.main_ib_upan) {\n btnBendiSetBackground();\n btnTfkaSetBackground();\n btnUpanSetFocus();\n return;\n }\n }\n\n btnBendiSetBackground();\n btnTfkaSetBackground();\n btnUpanSetBackground();\n\n // viewAnimation(v, hasFocus);\n }", "@Focus\n\tpublic void setFocus() \n\t{\n\t\t\tfor(int r = Board.LENGTH - 1; r >= 0; r--)\n\t\t\t{\t\n\t\t\t\t\tfor(int c=0;c<Board.LENGTH;c++)\n\t\t\t\t\t{\t\n\t\t\t\t\t\tsquares[r][c+1].setBackground(Display.getDefault().getSystemColor(SWT.COLOR_DARK_GRAY));\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif(((Square) squares[r][c+1].getData()).isLegal())//It returns the legal attribute wrong\n\t\t\t\t\t\t{squares[r][c+1].setBackground(Display.getDefault().getSystemColor(SWT.COLOR_YELLOW));}\n\t\t\t\t\t\t\n\t\t\t\t\t\tPiece piece = ((Square) squares[r][c+1].getData()).getPiece();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(piece == null)\t\n\t\t\t\t\t\t\tsquares[r][c+1].setImage(IconHandler.getBlankIcon());\t\t\t\t\t\t\t\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tsquares[r][c+1].setImage(piece.getIcon());\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}\t\t\n\t}", "private void toggle_focus() {\n\t\ttry {\n\t\t\tif (!lock_autofocus) {\n\t\t\t\t//getCameraManager().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\t\t\n\t\t\t\tlockAutoFocus.setBackgroundResource(R.drawable.eye_selected);\n\t\t\t} else {\n\t\t\t\tlockAutoFocus.setBackgroundResource(R.drawable.eye);\n\t\t\t\tstatusView.setText(getString(R.string.set_focus));\n\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Stopped;\n\t\t\t //getCameraManager().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\t\t\n\t\t\t}\n\t\t\tlock_autofocus = !lock_autofocus;\n\t\t\tcameraManager.setAutoFocus(lock_autofocus);\n\t\t} catch (Exception oEx) {\n\n\t\t}\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "private void buttonMouseEnter(Button btn){\r\n\t\tbtn.setBackground(\r\n\t\t\t\tnew Background(new BackgroundFill(Color.rgb(66,103,178), new CornerRadii(0), new Insets(0)))); // set login button facebook blue with mouse enter\r\n\t\tbtn.setTextFill(Color.WHITE);\r\n\t}", "public void setFocus() {\n \t\tex.setFocus();\n \t}", "@Override\r\n\tpublic void setFocus() {\n\t\t\r\n\t}", "private void updateBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_updateBtnMouseEntered\n updateBtn.setBackground(Color.decode(\"#339966\"));\n }", "public void setFocus() {\n\t\tui.setFocus();\n\t}", "public void setFocus() {\n\t\tthis.viewer.getControl().setFocus();\n\t}", "@Override\r\n\tpublic void setFocus() {\r\n\t\tif (getControl() != null)\r\n\t\t\tgetControl().setFocus();\r\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "private void setFocus() {\n\t\tif (held) {\n\t\t\tfocus.x = img.getWidth() / 2;\n\t\t\tfocus.y = img.getHeight();\n\t\t} else {\n\t\t\tfocus.x = img.getWidth();\n\t\t\tfocus.y = img.getHeight() /2;\n\t\t} // end else\n\t}", "@Override\r\n\tpublic void setFocus() {\r\n\t}", "private void chooseTo8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chooseTo8ActionPerformed\n chooseTo8.setBackground(Color.black);\n }", "public void cancelSelectionBorder(){\n BackgroundImage bgselected= new BackgroundImage(new Image(\"rugbeats/img/Background_selectedhdpi.png\"),BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT,\n new BackgroundSize(1.0, 1.0, true, true, false, false));\n ImgStack.setBackground(new Background(bgselected));\n }", "void focus();", "void focus();", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "private void setButtonBackground(Button button, String bgImgName) {\n BackgroundImage backgroundImage = new BackgroundImage(\n new Image( getClass().getResource(\"resources/\" + bgImgName).toExternalForm()),\n BackgroundRepeat.NO_REPEAT,\n BackgroundRepeat.NO_REPEAT,\n BackgroundPosition.CENTER,\n BackgroundSize.DEFAULT);\n Background background = new Background(backgroundImage);\n button.setBackground(background);\n }", "@Override\r\n\tpublic void focus() {\r\n\t\tactivate();\r\n\t\ttoFront();\r\n\t}", "@Override\n public void setFocus() {\n }", "public void setFocus(){\n\t\ttxtText.setFocus(true);\n\t\ttxtText.selectAll();\n\t}", "public Color getPressedBackgroundColor() {\n return pressedBackgroundColor;\n }", "public void ConfiguracionBackground(int nNormal, int nFocus)\n {\n // Establecemos los valores de los background\n m_nBckNormal = nNormal;\n m_nBckFocus = nFocus;\n }", "private void searchBtnMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchBtnMousePressed\n searchBtn.setBackground(Color.decode(\"#1e5837\"));\n }", "@Override\n\tpublic void setFocus() {\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "public void Focus() {\n }", "private void chooseTo1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chooseTo1ActionPerformed\n chooseTo1.setBackground(Color.black);\n }", "@Override\n public void onClick(View v) {\n Intent PreviousScreen = new Intent(RoundSetting.this, MainPage.class);\n startActivity(PreviousScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "@Override\n public void onClick(View v) {\n Intent PreviousScreen = new Intent(RoundSetting.this, MainPage.class);\n startActivity(PreviousScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "@Override\n public void onClick(View v) {\n Intent PreviousScreen = new Intent(RoundSetting.this, MainPage.class);\n startActivity(PreviousScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "public void highlightEnable() {\n actualFillColor = new Color(0, 255, 0, 150);\n repaint();\n revalidate();\n }", "private void updateBtnMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_updateBtnMousePressed\n updateBtn.setBackground(Color.decode(\"#1e5837\"));\n }", "@FXML\n public void highlightMultiplayer()\n {\n multiplayerButton.setOnMouseEntered(mouseEvent -> multiplayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }", "private void searchBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchBtnMouseEntered\n searchBtn.setBackground(Color.decode(\"#339966\"));\n }", "@Override\r\n\tpublic void setBackgroundResource(int resid) {\n\t\tsuper.setBackgroundResource(resid);\r\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tbtnPrincipal.setBackgroundResource(R.drawable.est_premier_goles);\n\t\t\t}", "@Override\n\t\t\tpublic void onFocusChange(View v, boolean hasFocus) {\n\t\t\t\tif (hasFocus)\n\t\t\t\t\tpromocodeEdit.setBackgroundResource(R.drawable.formfield);\n\t\t\t\telse if (promocodeEdit.getText().toString().equals(\"\"))\n\t\t\t\t\tpromocodeEdit\n\t\t\t\t\t\t\t.setBackgroundResource(R.drawable.promo_btn_gray);\n\t\t\t}", "private void clearBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clearBtnMouseEntered\n clearBtn.setBackground(Color.decode(\"#339966\"));\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tbtnPrincipal.setBackgroundResource(R.drawable.est_premier_rojas);\n\t\t\t}", "private void buttonRedMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_buttonRedMouseEntered\n buttonRed.setBackground(new Color(255, 100, 100));\n repaint();\n }", "void addFocus();", "public static void setActiveBtnStyle(Button btn) {\n btn.setStyle(\"-fx-background-color: #42b13c,linear-gradient(#fafdfe, #e8f5fc), linear-gradient(#eaf6fd 0%, #d2fcd4 49%, #bdfdc9 50%, #70f575 100%)\");\n }", "public void setSelectionForeground( final Color color ) {\n checkWidget();\n selectionForeground = color;\n }", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n switch(event.getAction())\n {\n case MotionEvent.ACTION_DOWN:\n // buttonControl.setBackgroundColor(Color.RED);\n\n break;\n case MotionEvent.ACTION_UP:\n\n //set color back to default\n // buttonControl.setBackgroundColor(R.color.md_amber_200);\n Intent intent = new Intent(ControlDiagnostic.this, ControlActivity.class);\n startActivity(intent);\n break;\n }\n return true;\n }", "@Override\n public void setFocus()\n {\n this.textInput.setFocus();\n }", "private void drawFocus(Graphics2D g2, int x, int y, int w, int h)\r\n/* 237: */ {\r\n/* 238:262 */ g2.setPaint(new GradientPaint(x, y, PlasticLookAndFeel.getFocusColor().brighter(), w, h, PlasticLookAndFeel.getFocusColor()));\r\n/* 239: */ \r\n/* 240: */ \r\n/* 241: */ \r\n/* 242: */ \r\n/* 243: */ \r\n/* 244: */ \r\n/* 245: */ \r\n/* 246:270 */ Stroke stroke = g2.getStroke();\r\n/* 247:271 */ g2.setStroke(FOCUS_STROKE);\r\n/* 248:272 */ g2.drawOval(x, y, w, h);\r\n/* 249:273 */ g2.setStroke(stroke);\r\n/* 250: */ }", "protected void drawFocus( Graphics g, boolean on ) \n {\n paint( g );\n }", "public void setFocused(boolean focused) {\n/* 822 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent actionevent)\r\n\t\t{\n\t\t\tColor c = (Color) getValue( \"Color\" );\r\n\t\t\tsetBackground( c );\r\n\t\t}", "private void setBackgroundColor(int backColor){\n backgroundColor = backColor;\n touchArea.setBackgroundColor(backgroundColor);\n }" ]
[ "0.754511", "0.7022663", "0.6803246", "0.66151035", "0.6492519", "0.64506006", "0.6420154", "0.6410517", "0.64089185", "0.640417", "0.6375894", "0.63564885", "0.635415", "0.6267172", "0.62303793", "0.6224276", "0.6176164", "0.61504877", "0.61336476", "0.61124843", "0.6099544", "0.6081912", "0.6074314", "0.6045876", "0.60345924", "0.600037", "0.60003406", "0.5995601", "0.597552", "0.59538823", "0.5953232", "0.5950714", "0.5948705", "0.5901173", "0.5886481", "0.5871759", "0.58700424", "0.58700424", "0.58700424", "0.5854172", "0.58433175", "0.58429724", "0.5834171", "0.5826841", "0.58230907", "0.58189803", "0.58181804", "0.58181804", "0.58181804", "0.58181804", "0.58181804", "0.5814515", "0.5813104", "0.57990074", "0.5798089", "0.5794622", "0.5794622", "0.5791622", "0.5791622", "0.5791622", "0.5791622", "0.5768357", "0.5767572", "0.57618725", "0.5746724", "0.57444", "0.5739512", "0.57386035", "0.5734682", "0.5731977", "0.5731977", "0.5731977", "0.5731977", "0.5731977", "0.5731977", "0.5731977", "0.572922", "0.57195", "0.57162154", "0.57162154", "0.57162154", "0.56983095", "0.5691716", "0.56906825", "0.5685847", "0.56812435", "0.5680049", "0.5672244", "0.5662363", "0.5653533", "0.56500757", "0.5649333", "0.56470907", "0.56358856", "0.56327856", "0.56268954", "0.5614002", "0.56119156", "0.5611861", "0.5605763", "0.5604587" ]
0.0
-1
Sets the background of the button as focused
public void openAbout(View view) { setViewBackgroundWithoutResettingPadding(view, R.drawable.bkg_button_on); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void onFocusChange(View button, boolean isFocus) {\n\t\t\t\tif(isFocus){\n\t\t\t\t\tbutton.setBackgroundColor(getResources().getColor(R.color.blue));\n\t\t\t\t}else \n\t\t\t\t\tbutton.setBackground(getResources().getDrawable(R.drawable.button_style)); \n\t\t\t}", "@Override\n public void setFocused()\n {\n setImage(\"MinusFocused.png\");\n }", "public void setFocused(boolean focused);", "public abstract void setBackgroundPressed(final int rgba);", "public void setPressedBackgroundColor(Color pressedBackgroundColor) {\n this.pressedBackgroundColor = pressedBackgroundColor;\n }", "@Override\r\n public void mousePressed(MouseEvent e) {\n setBackground(Color.BLUE);\r\n \r\n \r\n }", "public void setActivingColor(){\n this.setBackground(new Color( 213, 228, 242));\n this.forceupdateUI();\n }", "@Override\r\n\t\tpublic void onChange(boolean selfChange) {\n\t\t\tif (mBtnState) {\r\n\t\t\t\tsetUnfocusBg();\r\n\t\t\t} else {\r\n\t\t\t\tsetDefaultBg();\r\n\t\t\t}\r\n\t\t}", "private void focusAnimations(View v,int focused, int normal)\n {\n boolean found = false;\n for(ButtonData btn:buttons)\n if(btn.getView()==v)\n found=true;\n\n if(!found)\n {\n buttons.add(new ButtonData(v,focused,normal));\n }\n\n for(ButtonData btn:buttons)\n if(btn.getView()!=v)\n {\n btn.getView().setPressed(false);\n btn.getView().setBackgroundResource(btn.getNormal());\n btn.getView().invalidate();\n }\n else\n btn.getView().setPressed(true);\n\n if(v.isPressed())\n v.setBackgroundResource(focused);\n else\n v.setBackgroundResource(normal);\n }", "public void setFocus() {\n startButton.setFocus();\n }", "private void setPressedStyle() {\n this.setStyle(BUTTON_PRESSED);\n this.setPrefHeight(43);\n this.setLayoutY(getLayoutY() + 4);\n }", "protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect){\n }", "public abstract void setForegroundPressed(final int rgba);", "public void setBg(){\n this.setBackground(color);\n }", "protected void gainFocus(){\r\n\t\twidgetModifyFacade.changeVersatilePane(this);\r\n\t\twidgetModifyFacade.gainedFocusSignal(this);\r\n\t//\tthis.setId(\"single-image-widget-selected\");\r\n\t}", "public void setSelectionBackground( final Color color ) {\n checkWidget();\n selectionBackground = color;\n }", "private void applyBackgroundColor() {\r\n\t\tthis.control.setBackground(PromptSupport.getBackground(this.control));\r\n\t}", "public void setFocused(boolean value) {\n getPolymerElement().setFocused(value);\n }", "public void focusPropertyButton(Button btn){\n btn.hoverProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observableValue, Boolean aBoolean, Boolean t1) {\n if (t1){\n InterfaceStyling.dropShadowExitSelect(btn);\n } else {\n InterfaceStyling.dropShadowExitDeselect(btn);\n }\n }\n });\n }", "public void chooseBackgroundColor(){\n currentBackgroundColor = backgroundColorPicker.getValue();\n draw();\n }", "void setFocus();", "@Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus) {\n mInputLayout\n .setBackgroundResource(R.drawable.textfield_search_selected);\n\n } else {\n mInputLayout\n .setBackgroundResource(R.drawable.textfield_search_default);\n }\n }", "public void setFocus();", "@Override\r\npublic void mousePressed(MouseEvent arg0) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "public void setEnteredBackground(boolean enteredBackground) {\n this.enteredBackground = enteredBackground;\n }", "public void focus() {}", "@Override\r\npublic void mouseClicked(MouseEvent e) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "public void setFocus() {\n\t}", "@Override\r\n\tpublic boolean isFocused() {\n\t\treturn false;\r\n\t}", "public void setFocus() {\n \t\tviewer.getControl().setFocus();\n \t}", "private void chooseTo7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chooseTo7ActionPerformed\n chooseTo7.setBackground(Color.black);\n }", "public void setFocus() {\n }", "private void setTabBg(View vFocused, boolean selected) {\n if (selected) {\n SkinUtil.instance().setViewBackground(this, vFocused, R.drawable.bg_title_item_c);\n } else {\n SkinUtil.instance().setViewBackground(this, vFocused, R.drawable.btn_filter_tab_selector);\n }\n }", "@Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus) {\n // 如果是左侧的三个按钮获得焦点的话, 则直接触发事件\n if (v.getId() == R.id.main_ib_bendi) {\n btnBendiSetFocus();\n btnTfkaSetBackground();\n btnUpanSetBackground();\n return;\n } else if (v.getId() == R.id.main_ib_tfka) {\n btnBendiSetBackground();\n btnTfkaSetFocus();\n btnUpanSetBackground();\n return;\n } else if (v.getId() == R.id.main_ib_upan) {\n btnBendiSetBackground();\n btnTfkaSetBackground();\n btnUpanSetFocus();\n return;\n }\n }\n\n btnBendiSetBackground();\n btnTfkaSetBackground();\n btnUpanSetBackground();\n\n // viewAnimation(v, hasFocus);\n }", "@Focus\n\tpublic void setFocus() \n\t{\n\t\t\tfor(int r = Board.LENGTH - 1; r >= 0; r--)\n\t\t\t{\t\n\t\t\t\t\tfor(int c=0;c<Board.LENGTH;c++)\n\t\t\t\t\t{\t\n\t\t\t\t\t\tsquares[r][c+1].setBackground(Display.getDefault().getSystemColor(SWT.COLOR_DARK_GRAY));\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif(((Square) squares[r][c+1].getData()).isLegal())//It returns the legal attribute wrong\n\t\t\t\t\t\t{squares[r][c+1].setBackground(Display.getDefault().getSystemColor(SWT.COLOR_YELLOW));}\n\t\t\t\t\t\t\n\t\t\t\t\t\tPiece piece = ((Square) squares[r][c+1].getData()).getPiece();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(piece == null)\t\n\t\t\t\t\t\t\tsquares[r][c+1].setImage(IconHandler.getBlankIcon());\t\t\t\t\t\t\t\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tsquares[r][c+1].setImage(piece.getIcon());\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}\t\t\n\t}", "private void toggle_focus() {\n\t\ttry {\n\t\t\tif (!lock_autofocus) {\n\t\t\t\t//getCameraManager().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\t\t\n\t\t\t\tlockAutoFocus.setBackgroundResource(R.drawable.eye_selected);\n\t\t\t} else {\n\t\t\t\tlockAutoFocus.setBackgroundResource(R.drawable.eye);\n\t\t\t\tstatusView.setText(getString(R.string.set_focus));\n\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Stopped;\n\t\t\t //getCameraManager().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\t\t\n\t\t\t}\n\t\t\tlock_autofocus = !lock_autofocus;\n\t\t\tcameraManager.setAutoFocus(lock_autofocus);\n\t\t} catch (Exception oEx) {\n\n\t\t}\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "private void buttonMouseEnter(Button btn){\r\n\t\tbtn.setBackground(\r\n\t\t\t\tnew Background(new BackgroundFill(Color.rgb(66,103,178), new CornerRadii(0), new Insets(0)))); // set login button facebook blue with mouse enter\r\n\t\tbtn.setTextFill(Color.WHITE);\r\n\t}", "public void setFocus() {\n \t\tex.setFocus();\n \t}", "@Override\r\n\tpublic void setFocus() {\n\t\t\r\n\t}", "private void updateBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_updateBtnMouseEntered\n updateBtn.setBackground(Color.decode(\"#339966\"));\n }", "public void setFocus() {\n\t\tui.setFocus();\n\t}", "public void setFocus() {\n\t\tthis.viewer.getControl().setFocus();\n\t}", "@Override\r\n\tpublic void setFocus() {\r\n\t\tif (getControl() != null)\r\n\t\t\tgetControl().setFocus();\r\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "private void setFocus() {\n\t\tif (held) {\n\t\t\tfocus.x = img.getWidth() / 2;\n\t\t\tfocus.y = img.getHeight();\n\t\t} else {\n\t\t\tfocus.x = img.getWidth();\n\t\t\tfocus.y = img.getHeight() /2;\n\t\t} // end else\n\t}", "@Override\r\n\tpublic void setFocus() {\r\n\t}", "private void chooseTo8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chooseTo8ActionPerformed\n chooseTo8.setBackground(Color.black);\n }", "public void cancelSelectionBorder(){\n BackgroundImage bgselected= new BackgroundImage(new Image(\"rugbeats/img/Background_selectedhdpi.png\"),BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT,\n new BackgroundSize(1.0, 1.0, true, true, false, false));\n ImgStack.setBackground(new Background(bgselected));\n }", "void focus();", "void focus();", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "private void setButtonBackground(Button button, String bgImgName) {\n BackgroundImage backgroundImage = new BackgroundImage(\n new Image( getClass().getResource(\"resources/\" + bgImgName).toExternalForm()),\n BackgroundRepeat.NO_REPEAT,\n BackgroundRepeat.NO_REPEAT,\n BackgroundPosition.CENTER,\n BackgroundSize.DEFAULT);\n Background background = new Background(backgroundImage);\n button.setBackground(background);\n }", "@Override\r\n\tpublic void focus() {\r\n\t\tactivate();\r\n\t\ttoFront();\r\n\t}", "@Override\n public void setFocus() {\n }", "public void setFocus(){\n\t\ttxtText.setFocus(true);\n\t\ttxtText.selectAll();\n\t}", "public Color getPressedBackgroundColor() {\n return pressedBackgroundColor;\n }", "public void ConfiguracionBackground(int nNormal, int nFocus)\n {\n // Establecemos los valores de los background\n m_nBckNormal = nNormal;\n m_nBckFocus = nFocus;\n }", "private void searchBtnMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchBtnMousePressed\n searchBtn.setBackground(Color.decode(\"#1e5837\"));\n }", "@Override\n\tpublic void setFocus() {\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "public void Focus() {\n }", "private void chooseTo1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chooseTo1ActionPerformed\n chooseTo1.setBackground(Color.black);\n }", "@Override\n public void onClick(View v) {\n Intent PreviousScreen = new Intent(RoundSetting.this, MainPage.class);\n startActivity(PreviousScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "@Override\n public void onClick(View v) {\n Intent PreviousScreen = new Intent(RoundSetting.this, MainPage.class);\n startActivity(PreviousScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "@Override\n public void onClick(View v) {\n Intent PreviousScreen = new Intent(RoundSetting.this, MainPage.class);\n startActivity(PreviousScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "public void highlightEnable() {\n actualFillColor = new Color(0, 255, 0, 150);\n repaint();\n revalidate();\n }", "private void updateBtnMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_updateBtnMousePressed\n updateBtn.setBackground(Color.decode(\"#1e5837\"));\n }", "@FXML\n public void highlightMultiplayer()\n {\n multiplayerButton.setOnMouseEntered(mouseEvent -> multiplayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }", "private void searchBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchBtnMouseEntered\n searchBtn.setBackground(Color.decode(\"#339966\"));\n }", "@Override\r\n\tpublic void setBackgroundResource(int resid) {\n\t\tsuper.setBackgroundResource(resid);\r\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tbtnPrincipal.setBackgroundResource(R.drawable.est_premier_goles);\n\t\t\t}", "@Override\n\t\t\tpublic void onFocusChange(View v, boolean hasFocus) {\n\t\t\t\tif (hasFocus)\n\t\t\t\t\tpromocodeEdit.setBackgroundResource(R.drawable.formfield);\n\t\t\t\telse if (promocodeEdit.getText().toString().equals(\"\"))\n\t\t\t\t\tpromocodeEdit\n\t\t\t\t\t\t\t.setBackgroundResource(R.drawable.promo_btn_gray);\n\t\t\t}", "private void clearBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clearBtnMouseEntered\n clearBtn.setBackground(Color.decode(\"#339966\"));\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tbtnPrincipal.setBackgroundResource(R.drawable.est_premier_rojas);\n\t\t\t}", "private void buttonRedMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_buttonRedMouseEntered\n buttonRed.setBackground(new Color(255, 100, 100));\n repaint();\n }", "void addFocus();", "public static void setActiveBtnStyle(Button btn) {\n btn.setStyle(\"-fx-background-color: #42b13c,linear-gradient(#fafdfe, #e8f5fc), linear-gradient(#eaf6fd 0%, #d2fcd4 49%, #bdfdc9 50%, #70f575 100%)\");\n }", "public void setSelectionForeground( final Color color ) {\n checkWidget();\n selectionForeground = color;\n }", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n switch(event.getAction())\n {\n case MotionEvent.ACTION_DOWN:\n // buttonControl.setBackgroundColor(Color.RED);\n\n break;\n case MotionEvent.ACTION_UP:\n\n //set color back to default\n // buttonControl.setBackgroundColor(R.color.md_amber_200);\n Intent intent = new Intent(ControlDiagnostic.this, ControlActivity.class);\n startActivity(intent);\n break;\n }\n return true;\n }", "@Override\n public void setFocus()\n {\n this.textInput.setFocus();\n }", "private void drawFocus(Graphics2D g2, int x, int y, int w, int h)\r\n/* 237: */ {\r\n/* 238:262 */ g2.setPaint(new GradientPaint(x, y, PlasticLookAndFeel.getFocusColor().brighter(), w, h, PlasticLookAndFeel.getFocusColor()));\r\n/* 239: */ \r\n/* 240: */ \r\n/* 241: */ \r\n/* 242: */ \r\n/* 243: */ \r\n/* 244: */ \r\n/* 245: */ \r\n/* 246:270 */ Stroke stroke = g2.getStroke();\r\n/* 247:271 */ g2.setStroke(FOCUS_STROKE);\r\n/* 248:272 */ g2.drawOval(x, y, w, h);\r\n/* 249:273 */ g2.setStroke(stroke);\r\n/* 250: */ }", "protected void drawFocus( Graphics g, boolean on ) \n {\n paint( g );\n }", "public void setFocused(boolean focused) {\n/* 822 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent actionevent)\r\n\t\t{\n\t\t\tColor c = (Color) getValue( \"Color\" );\r\n\t\t\tsetBackground( c );\r\n\t\t}", "private void setBackgroundColor(int backColor){\n backgroundColor = backColor;\n touchArea.setBackgroundColor(backgroundColor);\n }" ]
[ "0.754511", "0.7022663", "0.6803246", "0.66151035", "0.6492519", "0.64506006", "0.6420154", "0.6410517", "0.64089185", "0.640417", "0.6375894", "0.63564885", "0.635415", "0.6267172", "0.62303793", "0.6224276", "0.6176164", "0.61504877", "0.61336476", "0.61124843", "0.6099544", "0.6081912", "0.6074314", "0.6045876", "0.60345924", "0.600037", "0.60003406", "0.5995601", "0.597552", "0.59538823", "0.5953232", "0.5950714", "0.5948705", "0.5901173", "0.5886481", "0.5871759", "0.58700424", "0.58700424", "0.58700424", "0.5854172", "0.58433175", "0.58429724", "0.5834171", "0.5826841", "0.58230907", "0.58189803", "0.58181804", "0.58181804", "0.58181804", "0.58181804", "0.58181804", "0.5814515", "0.5813104", "0.57990074", "0.5798089", "0.5794622", "0.5794622", "0.5791622", "0.5791622", "0.5791622", "0.5791622", "0.5768357", "0.5767572", "0.57618725", "0.5746724", "0.57444", "0.5739512", "0.57386035", "0.5734682", "0.5731977", "0.5731977", "0.5731977", "0.5731977", "0.5731977", "0.5731977", "0.5731977", "0.572922", "0.57195", "0.57162154", "0.57162154", "0.57162154", "0.56983095", "0.5691716", "0.56906825", "0.5685847", "0.56812435", "0.5680049", "0.5672244", "0.5662363", "0.5653533", "0.56500757", "0.5649333", "0.56470907", "0.56358856", "0.56327856", "0.56268954", "0.5614002", "0.56119156", "0.5611861", "0.5605763", "0.5604587" ]
0.0
-1
/ This method allows you to close the app by pressing twice the back button
@Override public void onBackPressed() { if (lastBackPressTime < System.currentTimeMillis() - 2500) { toast = Toast.makeText(this, R.string.toast_close_app, Toast.LENGTH_SHORT); toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0); toast.show(); lastBackPressTime = System.currentTimeMillis(); return; } else { if (toast != null) { toast.cancel(); } } super.onBackPressed(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onBackPressed()\n {\n if(backButtonCount >= 1)\n {\n Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }\n else\n {\n Toast.makeText(this, \"Press the back button once again to close the application.\", Toast.LENGTH_SHORT).show();\n backButtonCount++;\n }\n }", "@Override\n\tpublic void onBackPressed() {\n\t\texitApplication().onClick(null);\n\t\tsuper.onBackPressed();\n\t}", "@Override\n public void onBackPressed() {\n Intent intent = new Intent(this, WorkSpace.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n intent.putExtra(\"Close this app\", true);\n startActivity(intent);\n finish();\n }", "@Override\r\n\tpublic void onBackPressed() {\n\t\tfinish();\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tfinish();\r\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tIntent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n finish();\n System.exit(0);\n\t}", "@Override\n public void onBackPressed() {\n confirmExit();\n }", "public static void goBack() {\n\t\tif (touchGUI.getTouchModel().getGuiModel().isDialogShown()) {\n\t\t\ttouchGUI.getTouchModel().getGuiModel().closeActiveDialog();\n\t\t} else {\n\t\t\t// else go to last view in history\n\t\t\tif (!appWidget.goBack()) {\n\t\t\t\t// if history is empty -> close app\n\t\t\t\tphoneGap.exitApp();\n\t\t\t}\n\t\t}\n\n\t\tlaf.updateUndoSaveButtons();\n\t\ttouchGUI.updateViewSizes();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tthis.finish();\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tthis.finish();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tfinish();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tfinish();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tfinish();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tfinish();\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tfinish();\n\t\tsuper.onBackPressed();\n\t}", "@Override\n public void onBackPressed() {\n this.finish();\n }", "@Override\n public void onBackPressed() {\n exit++;\n System.out.println(\"###############exit\" + exit);\n if (exit == 1) {\n start = System.currentTimeMillis();\n Toast.makeText(this, \"再点击退出\", Toast.LENGTH_SHORT).show();\n return;\n } else {\n end = System.currentTimeMillis();\n if (end - start < 3000) {\n//\t\t\t\tSystem.exit(0);\n//\t\t\t\tAppActivityManager.getAppManager().finishAllActivity();\n finish();\n } else {\n Toast.makeText(this, \"再点击退出\", Toast.LENGTH_SHORT).show();\n start = System.currentTimeMillis();\n return;\n }\n }\n }", "@Override\n public void onBackPressed() {\n if (backPressed >= 1) {\n finishAffinity();\n super.onBackPressed();\n\n\n } else {\n // clean up\n backPressed = backPressed + 1;\n Toast.makeText(this, getString(R.string.press_back_exit),\n Toast.LENGTH_SHORT).show();\n }\n }", "public void onBackPressed() {\n if (doubleBackToExitPressedOnce) {\n this.finish();\n super.onBackPressed();\n return;\n }\n\n this.doubleBackToExitPressedOnce = true;\n Toast.makeText(this, \"Please click BACK again to exit the game\", Toast.LENGTH_SHORT).show();\n\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n doubleBackToExitPressedOnce=false;\n }\n }, 2000);\n }", "@Override\n\tpublic void onBackPressed() {\n\n\t\tboolean exit = mPreferences.getBoolean(Key.CB_EXIT, true);\n\t\t// If no confirmation required or user pressing for second time, then\n\t\t// exit app.\n\t\tif (exit && !mExitTrue) {\n\t\t\tmExitTrue = true;\n\t\t\tmToastExit = Toast.makeText(cxt,\n\t\t\t\t\tgetResources().getString(R.string.confirm_exit_msg),\n\t\t\t\t\tToast.LENGTH_SHORT);\n\t\t\tmToastExit.show();\n\t\t\tnew Timer(\"cancelExit\").schedule(new TimerTask() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tHome.this.mExitTrue = false;\n\t\t\t\t}\n\t\t\t}, 2000);\n\t\t} else {\n\t\t\tif (mToastExit != null) {\n\t\t\t\tmToastExit.cancel();\n\t\t\t}\n\t\t\tsuper.onBackPressed();\n\t\t}\n\t}", "@Override\n public void onBackPressed() {\n showQuitDialog();\n }", "@Override\n public boolean onBackPressed() {\n if (doubleBackToExitPressedOnce) {\n requireActivity().finishAffinity();\n System.exit(0);\n }\n\n this.doubleBackToExitPressedOnce = true;\n Toast.makeText(requireActivity(), \"Please click BACK again to exit\", Toast.LENGTH_SHORT).show();\n\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n doubleBackToExitPressedOnce = false;\n }\n }, 2000);\n return true;\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n this.finish();\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n this.finish();\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\t finish();\n\t}", "@Override\n public void onBackPressed() {\n\n finish();\n }", "public void Exit() {\r\n \tsuper.onBackPressed();\r\n }", "@Override\n public void onBackPressed() {\n\n Intent homeIntent = new Intent(Intent.ACTION_MAIN);\n homeIntent.addCategory( Intent.CATEGORY_HOME );\n homeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(homeIntent);\n }", "@Override\n public void onBackPressed() {\n if (doubleBackToExitPressedOnce) {\n super.onBackPressed();\n return;\n }\n this.doubleBackToExitPressedOnce = true;\n Toast.makeText(getApplicationContext(), \"Tap again to exit\",Toast.LENGTH_SHORT).show();\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n doubleBackToExitPressedOnce=false;\n }\n }, 2000);\n }", "@Override\n public void onBackPressed() {\n getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n if (back_pressed + 2000 > System.currentTimeMillis()) {\n\n super.onBackPressed();\n this.finish();\n\n } else\n Toast.makeText(getBaseContext(), \"Press once again to exit!\", Toast.LENGTH_SHORT).show();\n back_pressed = System.currentTimeMillis();\n }", "@Override\n\tpublic void onBackPressed() {\n\t\treturn;\n\t}", "@Override\n public void onBackPressed() {\n finish();\n }", "@Override\n public void onBackPressed() {\n finish();\n }", "@Override\n public void onBackPressed() {\n finish();\n }", "@Override\n public void onBackPressed() {\n finish();\n }", "@Override\n public void onBackPressed() {\n finish();\n }", "@Override\n public void onBackPressed() {\n finish();\n }", "@Override\n public void onBackPressed() {\n finish();\n }", "@Override\n public void onBackPressed() {\n if (exit) {\n System.exit(0);\n } else {\n Toast.makeText(this, \"Press Back again to Exit.\",\n Toast.LENGTH_SHORT).show();\n exit = true;\n new Handler().postDelayed(new Runnable() { //3 sn içinde iki defa basıldı mı kontrolu için\n @Override\n public void run() {\n exit = false;\n }\n }, 3 * 1000);\n }\n }", "@Override\n public void onBackPressed() {\n if (doubleBackToExitPressedOnce) {\n super.onBackPressed();\n return;\n }\n\n this.doubleBackToExitPressedOnce = true;\n Toast.makeText(this, \"Please click BACK again to exit\", Toast.LENGTH_SHORT).show();\n\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n doubleBackToExitPressedOnce=false;\n }\n }, 2000);\n }", "@Override\r\n public void onBackPressed() {\r\n \t\r\n \tif( backPressedOnce == true ) {\r\n \t\ttoast.Cancel();\r\n \t\tsuper.onBackPressed();\r\n \t\treturn;\r\n \t}\r\n \t\r\n \tbackPressedOnce = true;\r\n String message = \"Press Back button twice to exit\";\r\n toast.Create(message,Toast.LENGTH_SHORT, this.getApplicationContext());\r\n toast.Show();\r\n \t\r\n \t// Resetting backPressedOnce flag to false\r\n \tRunnable resetBackFlag = new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tbackPressedOnce = false;\r\n\t\t\t}\r\n\t\t};\r\n\t\tnew Handler().postDelayed(resetBackFlag, TOAST_LENGTH_SHORT_DURATION);\r\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\t\n\t\tremoveClickList();\n\t\tfinish();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\treturn;\n\t}", "@Override\n public void onBackPressed() {\n timesBackPressed++;\n if (timesBackPressed > 1) {\n currentStateSaveToSharedPref();\n finish();\n } else\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.leave_warning), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n finish();\n }", "@Override\n public void onBackPressed() {\n exitReveal();\n\n super.onBackPressed();\n }", "@Override\n public void onBackPressed() {\n finish();\n\n }", "@Override\n public void onBackPressed() {\n if (backClickOnce) {\n finishAffinity();\n } else {\n backClickOnce = true;\n Toast.makeText(this, R.string.click_back_again_to_exit, Toast.LENGTH_SHORT).show();\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n backClickOnce = false;\n }\n }, 2000);\n }\n }", "@Override\r\n\tpublic void onBackPressed() {\n\t\tbackButtonHandler();\r\n\t\treturn;\r\n\t}", "@Override\n\tpublic void onBackPressed() {\n\treturn;\n\t}", "@Override\n public void onBackPressed() {\n Intent i = new Intent(StockAdjustmentList.this, ActivityHomeScreen.class);\n startActivity(i);\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(i);\n finish();\n }", "@Override\n public void onBackPressed()\n {\n Intent intent = new Intent(this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);\n startActivity(intent);\n finish();\n }", "public void onBackPressed()\n {\n hideSystemUI(activity);\n }", "@Override\n public void onBackPressed() {\n if (doubleBackToExitPressedOnce) {\n super.onBackPressed();\n return;\n }\n\n // Sets boolean to true when user presses back button\n this.doubleBackToExitPressedOnce = true;\n Toast.makeText(this, \"Press again to exit\", Toast.LENGTH_SHORT).show();\n\n // System waits for 2 seconds before setting boolean value to false again\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n doubleBackToExitPressedOnce = false;\n }\n }, 2000);\n }", "@Override\n\tpublic void onBackPressed()\n\t\t{\n\t\tbackPressed();\n\t\t}", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n finish();\n startActivity(new Intent(getApplicationContext(), MainActivity.class));\n }", "protected void goBack() {\r\n\t\tfinish();\r\n\t}", "@Override\n public void onBackPressed() {\n return;\n }", "@Override\n public void onBackPressed() {\n return;\n }", "@Override\n public void onBackPressed() {\n return;\n }", "@Override\n public void onBackPressed() {\n return;\n }", "@Override\n public void onBackPressed() {\n\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Do you want to exit the application?\");\n builder.setCancelable(true);\n builder.setNegativeButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n });\n\n builder.setPositiveButton(\"No\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n\n AlertDialog ad = builder.create();\n ad.show();\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tstartActivity(new Intent(getApplicationContext(),\tLauncher.class));\n\t}", "@Override\r\n public void onBackPressed() {\n setResult(Activity.RESULT_OK);\r\n this.finish();\r\n super.onBackPressed();\r\n }", "@Override\r\n public void onBackPressed() {\r\n \t// Handle the back button click event such that if user \r\n \t// is performing an IMCI or CCM assessment then a confirmation dialog \r\n \t// will be displayed to confirm that the user wishes to exit the \r\n \t// patient assessment\r\n \texitAssessmentDialogHandler();\r\n }", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t\tstartActivity(new Intent(SignActivity.this,MainActivity.class));\r\n\t\tfinish();\r\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tBack();\n\t}", "@Override\n public void onBackPressed() {\n if (!mTouchAnyWhere) {\n super.onBackPressed();\n return;\n }\n\n goBackDialog();\n }", "@Override\n public void onBackPressed() {\n return;\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tmoveTaskToBack(false);\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tif (lastClickTime <= 0) {\n\t\t\tToast.makeText(this, resources.getString(R.string.ToastPressAgain), Toast.LENGTH_SHORT).show();\n\t\t\tlastClickTime = System.currentTimeMillis();\n\t\t} else {\n\t\t\tlong currentClickTime = System.currentTimeMillis();\n\t\t\tif ((currentClickTime - lastClickTime) < 1000) {\n\t\t\t\t// 退出\n\t\t\t\t// finish();\n\t\t\t\t// 关闭整个程序\n\t\t\t\tSysApplication.getInstance().exit();\n\t\t\t} else {\n\t\t\t\tToast.makeText(this, resources.getString(R.string.ToastPressAgain), Toast.LENGTH_SHORT).show();\n\t\t\t\tlastClickTime = System.currentTimeMillis();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onBackPressed() {\n //super.onBackPressed();\n finish();\n }", "public void onBackPressed(){\n finish();\n }", "public void onExit() {\n Intent homeIntent = new Intent(Intent.ACTION_MAIN);\n homeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n homeIntent.addCategory(Intent.CATEGORY_HOME);\n startActivity(homeIntent);\n finish();\n }", "@Override\n public void onBackPressed() {\n if (doubleBackToExitPressedOnce) {\n super.onBackPressed();\n updatePICstatus2();\n return;\n }\n this.doubleBackToExitPressedOnce = true;\n Toast.makeText(this, \"Please click Back again to exit\", Toast.LENGTH_SHORT).show();\n\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n doubleBackToExitPressedOnce = false;\n }\n }, 3000);\n }", "@Override\n public void onBackPressed() {\n /*startAppAd.onBackPressed();\n super.onBackPressed();*/\n\n if(blnExit)\n {\n super.onBackPressed();\n return;\n }\n this.blnExit = true;\n // startAppAd.onBackPressed();\n\n\n Toast.makeText(ActHome.this,\"Please click BACK again to EXIT.\",Toast.LENGTH_SHORT).show();\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n blnExit = false;\n }\n },2000);\n }", "@Override\n public void onBackPressed() {\n Intent intent = new Intent(this, SplashActivity.class);\n startActivity(intent);\n }", "@Override public void onBackPressed() {\n boolean handled = container.onBackPressed();\n if (!handled) {\n finish();\n }\n }", "public void onBackPressed() {\n backbutton();\n }", "public void onBackPressed() {\n // do nothing. We want to force user to stay in this activity and not drop out.\n }", "@Override\r\n public void onBackPressed() {\r\n\r\n if (backPressedTime + 2000 > System.currentTimeMillis()) {\r\n finish();\r\n } else {\r\n Toast.makeText(QuestionActivity.this, \"Press Back Again Close Quiz\", Toast.LENGTH_SHORT).show();\r\n }\r\n backPressedTime = System.currentTimeMillis();\r\n }", "@Override\r\n public void onClick(View view) {\r\n finish();\r\n onBackPressed();\r\n\r\n }", "@Override\n public void onBackPressed() {\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n if (drawer.isDrawerOpen(GravityCompat.START)) {\n drawer.closeDrawer(GravityCompat.START);\n } else {\n // salir de la app\n if (exit) {\n finish();\n } else {\n Toast.makeText(this, R.string.alert_close_message,\n Toast.LENGTH_SHORT).show();\n exit = true;\n new CountDownTimer(3000, 1000) {\n\n @Override\n public void onTick(long l) {\n\n }\n\n @Override\n public void onFinish() {\n exit = false;\n }\n }.start();\n }\n }\n }", "@Override\n public void onBackPressed() {\n Intent intent = new Intent(BillofLandingActivity.this, HomeActivity.class);\n startActivity(intent);\n finish();\n }", "@Override\n public void onBackPressed() {\n backToHome();\n }", "@Override\n\tpublic void onBackPressed() {\n\n\t\tnavigatetoAppointmentsListingScreen(\"false\");\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t}", "@Override\n\tpublic boolean onBackPressed() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onBackPressed() {\n\t\treturn false;\n\t}", "@Override\n // Detect when the back button is pressed\n public void onBackPressed() {\n\n // Let the system handle the back button\n\n super.onBackPressed();\n\n }", "@Override\n public void onBackPressed() {\n Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onBackPressed() {\n Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "private void onBack() {\n\t\tIntent startMain = new Intent(Intent.ACTION_MAIN);\r\n\t\tstartMain.addCategory(Intent.CATEGORY_HOME);\r\n\t\tstartMain.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); // //FLAG_ACTIVITY_NEW_TASK\r\n\t\tstartActivity(startMain);\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tIntent i = new Intent(this, MainActivity.class);\r\n\t\tstartActivity(i);\r\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tif (wv1.canGoBack()) {\n\t wv1.goBack();\n\t\t}else \n\t\t{\n\t\t\twv1.stopLoading();\n\t\t\twv1.clearCache(true);\n\t\t\tfinish();\n\t }\n\t}", "@Override\n public void onBackPressed() {\n\n Intent intent = new Intent(Day_Picker_Activity.this, ShowWeather.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n }", "private void backPressHandling() {\r\n FragmentManager manager = getSupportFragmentManager();\r\n if (manager.getBackStackEntryCount() <= 1) {\r\n finish();\r\n } else {\r\n manager.popBackStack();\r\n }\r\n }", "protected void exitByBackKey() {\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(\"EXIT\");\n builder.setMessage(\"ARE YOU SURE?\");\n builder.setPositiveButton(\"EXIT\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n });\n\n builder.setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n return;\n }\n });\n builder.show();\n\n }", "@Override\r\n\tpublic void onBackPressed() {\n\t\tmoveTaskToBack(true);\r\n\t\tsuper.onBackPressed();\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t\tdoBack();\r\n\t}" ]
[ "0.7971689", "0.7904344", "0.78447294", "0.7831272", "0.7831272", "0.7810363", "0.7741567", "0.7719002", "0.7715131", "0.7699846", "0.7694287", "0.7694287", "0.7694287", "0.76857585", "0.76857585", "0.76700294", "0.7668314", "0.76666707", "0.76514745", "0.7610184", "0.7606452", "0.75938565", "0.7591425", "0.7591425", "0.7551386", "0.75439245", "0.7522855", "0.7521669", "0.7500384", "0.74966025", "0.7490074", "0.7476512", "0.7476512", "0.7476512", "0.7476512", "0.7476512", "0.7476512", "0.7476512", "0.7466521", "0.7461137", "0.74518514", "0.7446851", "0.74388", "0.7422936", "0.7394627", "0.7390812", "0.7388463", "0.7377055", "0.7374082", "0.73739654", "0.73653734", "0.73635775", "0.73540944", "0.7343117", "0.73417586", "0.73271203", "0.7326291", "0.73053443", "0.73053443", "0.73053443", "0.73053443", "0.72849065", "0.7276771", "0.72641426", "0.7260514", "0.7259682", "0.72516", "0.72480136", "0.7245039", "0.72438514", "0.7239346", "0.723532", "0.72340554", "0.7225649", "0.72201896", "0.7211009", "0.72055256", "0.7197563", "0.71958554", "0.7195427", "0.71848685", "0.71796477", "0.7173148", "0.71683884", "0.71657354", "0.7165205", "0.71614486", "0.71614486", "0.7158668", "0.7158668", "0.71557933", "0.7152358", "0.7152358", "0.7150525", "0.7145569", "0.71423817", "0.7141937", "0.7141477", "0.71381336", "0.7135779", "0.7125941" ]
0.0
-1
Initialize the database by passing an URL to the database Pointing to a "key" addressed by the path to store and write data whenever myRef is used.
public AndroidInterfaceClass(){ database = FirebaseDatabase.getInstance("https://brainstorming-1fa06-default-rtdb.europe-west1.firebasedatabase.app/"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public URLDB(String path)\n\t{\n\t\tsuper(Tools.getHash(path));\n\t\tif (!FileManager.isDirExisted(path))\n\t\t{\n\t\t\tFileManager.makeDir(path);\n\t\t}\n\t\tthis.envPath = new File(path);\n\t\tthis.env = new DBEnv(this.envPath, false, DBConfig.DB_CACHE_SIZE, DBConfig.LOCK_TIME_OUT, DBConfig.URL_STORE);\n\t\tthis.accessor = new URLAccessor(this.env.getEntityStore());\n\t}", "public void createURL(){\n urlDB = ( PREFACE + server + \"/\" + database + options);\n }", "public Database(String url) {\n this.url = url;\n\n File f = new File(url);\n\n if (f.exists()) {\n try {\n f.mkdirs();\n f.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //create table relationship\n LinkedList<String> relationship_attributes = new LinkedList<>();\n relationship_attributes.add(\"id_entity1\");\n relationship_attributes.add(\"id_entity2\");\n relationship_attributes.add(\"description\");\n this.create_table(\"relationship\", relationship_attributes);\n }", "public static void setDatabaseURL(String url){\n databaseURL=url;\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n DBHandler = DBConnection.getConnection();\n }", "public Database(final String u) {\n this.url = u;\n }", "private void initFirebase() {\n FirebaseApp.initializeApp(this);\n firebaseDatabase = FirebaseDatabase.getInstance();\n databaseReference = firebaseDatabase.getReference();\n storageReference = FirebaseStorage.getInstance().getReference();\n }", "public DatabaseInterface(String url) throws SQLException {\n sql = DriverManager.getConnection(url);\n }", "public abstract void setupReferences() throws SQLException;", "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 RDB() throws Exception\r\n\t{\r\n\t\tthis(Preferences.getURL());\r\n\t}", "private void initFirebase() {\n //инициализируем наше приложение для Firebase согласно параметрам в google-services.json\n // (google-services.json - файл, с настройками для firebase, кот. мы получили во время регистрации)\n FirebaseApp.initializeApp(this);\n //получаем точку входа для базы данных\n database = FirebaseDatabase.getInstance();\n myRef = database.getReference();\n\n }", "public void initiateStore() {\r\n\t\tURLConnection urlConnection = null;\r\n\t\tBufferedReader in = null;\r\n\t\tURL dataUrl = null;\r\n\t\ttry {\r\n\t\t\tdataUrl = new URL(URL_STRING);\r\n\t\t\turlConnection = dataUrl.openConnection();\r\n\t\t\tin = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\r\n\t\t\tString inputLine;\r\n\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n\t\t\t\tString[] splittedLine = inputLine.split(\";\");\r\n\t\t\t\t// an array of 4 elements, the fourth element\r\n\t\t\t\t// the first three elements are the properties of the book.\r\n\t\t\t\t// last element is the quantity.\r\n\t\t\t\tBook book = new Book();\r\n\t\t\t\tbook.setTitle(splittedLine[0]);\r\n\t\t\t\tbook.setAuthor(splittedLine[1]);\r\n\t\t\t\tBigDecimal decimalPrice = new BigDecimal(splittedLine[2].replaceAll(\",\", \"\"));\r\n\t\t\t\tbook.setPrice(decimalPrice);\r\n\t\t\t\tfor(int i=0; i<Integer.parseInt(splittedLine[3]); i++)\r\n\t\t\t\t\tthis.addBook(book);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif(!in.equals(null)) in.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n try {\r\n con = DriverManager.getConnection(\"jdbc:derby://localhost:1527/BracuConnect\", \"sayeem\", \"17101009\");\r\n } catch (SQLException e) {\r\n }\r\n }", "private DataManager() {\n ref = FirebaseStorage.getInstance().getReference();\n }", "public DatabaseReference open() {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n myPokemonDbRef = database.getReference(PokemonDataTag);\n return myPokemonDbRef;\n }", "public static void setDatabasePath(String filename) {\r\n databasePath = filename;\r\n database = new File(databasePath);\r\n }", "public DataWriter(String dbPath) {\n databasePath = dbPath;\n }", "@Override\n\tpublic void initialize(URL url, ResourceBundle rb) {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tdbhandler = Dbhandler.getInstance();\n\t\t\n\t\t} catch (InstantiationException | IllegalAccessException | ClassNotFoundException | SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void initDatabase() {\n\n String sql = \"CREATE TABLE IF NOT EXISTS books (\\n\"\n + \"\tISBN integer PRIMARY KEY,\\n\"\n + \"\tBookName text NOT NULL,\\n\"\n + \" AuthorName text NOT NULL, \\n\"\n + \"\tPrice integer\\n\"\n + \");\";\n\n try (Connection conn = DriverManager.getConnection(urlPath);\n Statement stmt = conn.createStatement()) {\n System.out.println(\"Database connected\");\n stmt.execute(sql);\n\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "private void setupDatabase() {\r\n\t\tDatabaseHelperFactory.init(this);\r\n\t\tdatabase = DatabaseHelperFactory.getInstance();\r\n\t}", "public GosplPopulationInDatabase() {\n\t\ttry {\n\t\t\tthis.connection = DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:hsqldb:mem:\"+mySqlDBname+\";shutdown=true\", \"SA\", \"\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"error while trying to initialize the HDSQL database engine in memory: \"+e.getMessage(), e);\n\t\t}\n\t}", "private void initFirebase() {\n database = FirebaseDatabase.getInstance();\n user = FirebaseAuth.getInstance().getCurrentUser();\n dRef = database.getReference(\"Trails\");\n }", "private void initDB(){\n gistHelper = new GistSQLiteHelper(mainActivity, \"GistsDB\", null, 1);\n db = gistHelper.getWritableDatabase();\n }", "public DB(String db) throws ClassNotFoundException, SQLException {\n // Set up a connection and store it in a field\n Class.forName(\"org.sqlite.JDBC\");\n String url = \"jdbc:sqlite:\" + db;\n\n // stop conn from creating a file if does not exists\n SQLiteConfig config = new SQLiteConfig();\n config.resetOpenMode(SQLiteOpenMode.CREATE);\n\n //connect to the file\n conn = DriverManager.getConnection(url, config.toProperties());\n try (Statement stat = conn.createStatement();) {\n stat.executeUpdate(\"PRAGMA foreign_keys = ON;\");\n }\n }", "public void setDatabase(Connection _db);", "public void initEDBConnection(String name) throws SQLException {\n String dbName = buildDBName(name);\n cache = new CacheManager<>(1024);\n File f = new File(dbName);\n\n if (!f.exists())\n createDB(dbName);\n else if(!f.isDirectory())\n createDB(dbName);\n else\n connectDB(dbName);\n\n refreshCurrentAccountId();\n refreshCurrentOperationId();\n }", "private createSingletonDatabase()\n\t{\n\t\tConnection conn = createDatabase();\n\t\tcreateTable();\n\t\tString filename = \"Summer expereince survey 2016 for oliver.csv\"; \n\t\timportData(conn, filename);\n\t}", "@PostConstruct\r\n public void init() {\n File database = new File(applicationProps.getGeodb());\r\n try {\r\n reader = new DatabaseReader.Builder(database).withCache(new CHMCache()).build();\r\n } catch (IOException e) {\r\n log.error(\"Error reading maxmind DB, \", e);\r\n }\r\n }", "public FileDatabase(String filename) throws IOException {\n\t\tdatabase = new File(filename);\n\t\tread();\n\t}", "private void setupDb(){\n try {\n openConnection();\n s.executeUpdate(\"CREATE TABLE IF NOT EXISTS LIB (NAME text UNIQUE , TYPE text, LANGUAGE text, INTRUSIVE text, OPENSOURCE text)\");\n }catch (SQLException e) {\n System.err.println(e.getMessage());\n }finally {\n if (c != null){\n close(c);\n }\n }\n }", "private void initDb() {\n\t\tif (dbHelper == null) {\n\t\t\tdbHelper = new DatabaseOpenHelper(this);\n\t\t}\n\t\tif (dbAccess == null) {\n\t\t\tdbAccess = new DatabaseAccess(dbHelper.getWritableDatabase());\n\t\t}\n\t}", "public static void initialize()\n\t{\n\t\tProperties props = new Properties();\n\t\tFileInputStream in = new fileInputStream(\"database.properties\");\n\t\tprops.load(in);\n\t\tin.close();\n\t\tString drivers = props.getProperty(\"jdbc.drivers\");\n\t\tif (drivers != null)\n\t\t\tSystem.setProperty(\"jdbc.drivers\", drivers);\n\t\tString url = props.getProperty(\"jdbc.url\");\n\t\tString username = props.getProperty(\"jdbc.username\");\n\t\tString password = props.getProperty(\"jdbc.password\");\n\t\t\n\t\tSystem.out.println(\"url=\"+url+\" user=\"+username+\" password=\"+password);\n\n\t\tdbConnect = DriverManager.getConnection( url, username, password);\n\t\t\n\t\tinitializeDatabase();\n\t}", "private boolean SetWordNetDB(URL url) {\r\n\t\tdict = new Dictionary(url);\r\n\t\ttry {\r\n\t\t\tdict.open();\r\n\t\t} catch (IOException e) {\t\t\t\t\r\n\t\t\tSystem.err.println(\"ERROR: Cannot open WordNet library. Please check the WordNet's Path.\");\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public void init(String path, DatabaseHelper helper) {\n try {\n connection = DriverManager.getConnection(\"jdbc:sqlite:\" + path);\n\n queryCache = new QueryCache();\n\n Statement statement = connection.createStatement();\n ResultSet rs = statement.executeQuery(\"PRAGMA user_version;\");\n int version = rs.getInt(1);\n rs.close();\n\n if(version != DATABASE_SCHEMA_VERSION) {\n Log.debug(\"Database version was {0} but Schema version is {1}\", version, DATABASE_SCHEMA_VERSION);\n\n // Create default data\n if(version == 0) {\n helper.onCreate(this);\n } else {\n helper.onMigration(this, version, DATABASE_SCHEMA_VERSION);\n }\n\n statement = connection.createStatement();\n statement.execute(\"PRAGMA user_version = \" + DATABASE_SCHEMA_VERSION + \";\");\n }\n \n } catch (SQLException ex) {\n Log.error(\"{0}\", ex);\n throw new RuntimeException(\"Database connection failed!\", ex);\n }\n }", "public Database() {\n size = 0;\n tables = new HashMap();\n p = new Parse(this);\n }", "private void connectDB() throws IOException, HashtableFullException {\n\t\tFile directory = new File(Main.hashDBStore + File.separator);\n\t\tif (!directory.exists())\n\t\t\tdirectory.mkdirs();\n\t\tFile dbf = new File(directory.getPath() + File.separator + \"hashstore-\"\n\t\t\t\t+ this.getName());\n\t\tlong entries = ((Main.chunkStoreAllocationSize / Main.chunkStorePageSize)) + 8000;\n\t\tif (HashFunctionPool.max_hash_cluster > 1)\n\t\t\tentries = (Main.chunkStoreAllocationSize / HashFunctionPool.avg_page_size) + 8000;\n\t\ttry {\n\t\t\tSDFSLogger.getLog().info(\n\t\t\t\t\t\"Loading hashdb class \" + Main.hashesDBClass);\n\t\t\tSDFSLogger.getLog().info(\"Maximum Number of Entries is \" + entries);\n\t\t\tbdb = (AbstractHashesMap) Class.forName(Main.hashesDBClass)\n\t\t\t\t\t.newInstance();\n\t\t\tbdb.init(entries, dbf.getPath());\n\t\t} catch (InstantiationException e) {\n\t\t\tSDFSLogger.getLog().fatal(\"Unable to initiate ChunkStore\", e);\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t} catch (IllegalAccessException e) {\n\t\t\tSDFSLogger.getLog().fatal(\"Unable to initiate ChunkStore\", e);\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSDFSLogger.getLog().fatal(\"Unable to initiate ChunkStore\", e);\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t} catch (IOException e) {\n\t\t\tSDFSLogger.getLog().fatal(\"Unable to initiate ChunkStore\", e);\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\n\t}", "private void initDB() {\n dataBaseHelper = new DataBaseHelper(this);\n }", "public static void init(File envHome) throws DatabaseException {\n try {\n //noinspection ResultOfMethodCallIgnored\n envHome.mkdirs();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n /* Open a transactional Berkeley DB engine environment. */\n EnvironmentConfig envConfig = new EnvironmentConfig();\n envConfig.setAllowCreate(true);\n// envConfig.setTransactional(true);\n env = new Environment(envHome, envConfig);\n\n /* Open a transactional entity store. */\n StoreConfig storeConfig = new StoreConfig();\n storeConfig.setAllowCreate(true);\n// storeConfig.setTransactional(true);\n store = new EntityStore(env, \"CrawlerStore\", storeConfig);\n\n /* Initialize the data access object. */\n userAccessor = new UserAccessor(store);\n documentAccessor = new DocumentAccessor(store);\n }", "public static void setConnection(String url, String user, String password) {\n Database.url = url;\n Database.user = user;\n Database.password = password;\n }", "public void initConnection() {\n try {\n FileInputStream serviceAccount = new FileInputStream(\"serviceAccountKey.json\");\n\n FirebaseOptions options = new FirebaseOptions.Builder()\n .setCredentials(GoogleCredentials.fromStream(serviceAccount))\n .setDatabaseUrl(\"https://yieldcomparisontool.firebaseio.com\")\n .build();\n try {\n if (FirebaseApp.getInstance(FirebaseApp.DEFAULT_APP_NAME) == null) {\n FirebaseApp.initializeApp(options);\n }\n } catch (IllegalStateException e) {\n FirebaseApp.initializeApp(options);\n }\n } catch (IOException e) {\n System.out.println(\"ERROR Invalid Firebase Service account credentials.\");\n System.out.println(e);\n System.exit(1);\n }\n }", "private void mockUpDB() {\n locationDBAdapter.insertLocationData(\n \"ChIJd0UHJHcw2jARVTHgHdgUyrk\",\n \"Baan Thong Luang\",\n \"https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png\",\n \"https://maps.google.com/maps/contrib/101781857378275784222/photos\",\n \"CmRSAAAAEegLHnt03YODdRQ658VBWtIhOoz3TjUAj1oVqQIlLq0DkfSttuS-SQ3aOLBBbuFdwKbpkbsrFzMWghgyZeRD-n5rshknOXv6p5Xo3bdYr5FMOUGCy-6f6LYRy1PN9cKOEhBuj-7Dc5fBhX_38N_Sn7OPGhTBRgFIvThYstd7e8naYNPMUS2rTQ\",\n \"GOOGLE\",\n \"236/10 Wualai Road Tumbon Haiya, CHIANG MAI\",\n 18.770709,\n 98.978078,\n 0.0);\n\n }", "public DatabaseClient() {\n initConnection();\n dbClient = FirestoreClient.getFirestore();\n }", "public MySQLDatabase(String _uri, String _user, String _password){\n uri = _uri;\n user = _user;\n password = _password;\n }", "private DatabaseRepository() {\n try {\n // connect to database\n\n DB_URL = \"jdbc:sqlite:\"\n + this.getClass().getProtectionDomain()\n .getCodeSource()\n .getLocation()\n .toURI()\n .getPath().replaceAll(\"[/\\\\\\\\]\\\\w*\\\\.jar\", \"/\")\n + \"lib/GM-SIS.db\";\n connection = DriverManager.getConnection(DB_URL);\n mapper = ObjectRelationalMapper.getInstance();\n mapper.initialize(this);\n }\n catch (SQLException | URISyntaxException e) {\n System.out.println(e.toString());\n }\n }", "public static void init()\n\t{\n\t\tMongoClient mongoClient = new MongoClient(new MongoClientURI(\"mongodb://111.111.111.111:27017\"));\n\t\tdatabase=mongoClient.getDatabase(\"mydb\");\n\t}", "public Database(Context context)\n\t{\n\t\t/* Instanciation de l'openHelper */\n\t\tDBOpenHelper helper = new DBOpenHelper(context);\n\t\t\n\t\t/* Load de la database */\n\t\t//TODO passer en asynchrone pour les perfs\n\t\tmainDatabase = helper.getWritableDatabase();\n\t\t\n\t\t/* DEBUG PRINT */\n\t\tLog.i(\"info\", \"Database Loading Suceeded\");\n\t}", "public void store(DBConnection db) throws IOException;", "public int maDBOpen(String path)\n \t{\n \t\ttry\n \t\t{\n \t\t\tMoDatabase database = MoDatabase.create(path);\n \t\t\t++mDatabaseCounter;\n \t\t\taddDatabase(mDatabaseCounter, database);\n \t\t\treturn mDatabaseCounter;\n \t\t}\n \t\tcatch (SQLiteException ex)\n \t\t{\n \t\t\tlogStackTrace(ex);\n \t\t\treturn MA_DB_ERROR;\n \t\t}\n \t}", "public Database initDB() {\n Database db = new Database(\"dataBase.db\");\n\n// db.insertData(\"1 Dragos Dinescu [email protected] 0744522600 Digi 10-12-2020\");\n// db.insertData(\"2 Adelina Mirea [email protected] 0733651320 Orange 14-10-2020\");\n// db.insertData(\"3 Radu Sorostinean [email protected] 0733723321 Digi 1-10-2020\");\n// db.insertData(\"4 Andrei Brasoveanu [email protected] 0732341390 Vodafone 12-11-2020\");\n return db;\n\n //db.deleteFromDB();\n //db.updateDB(\"1 alex radu [email protected] 022256926 orange 10/08/2010\");\n }", "public void createDB(String filename) throws SQLException {\n //System.out.printf(\"Connecting to the database %s.%n\", filename);\n /* \n * Connect to the database (file). If the file does not exist, create it.\n */\n Connection db_connection = DriverManager.getConnection(SQLITEDBPATH + filename);\n this.createTables(db_connection);\n this.initTableCities(db_connection);\n this.initTableTeams(db_connection);\n //System.out.printf(\"Connection to the database has been established.%n\");\n db_connection.close();\n //System.out.printf(\"Connection to the database has been closed.%n\");\n }", "public void map()\n\t{\n\t // key is the documentId\n\t\t// value is the url\n\t\t//fetch the document using the documentId\n\t\t\n\t}", "public void initConnection() throws SQLException{\n\t\tuserCon = new UserDBHandler(\"jdbc:mysql://127.0.0.1:3306/users\", \"admin\", \"admin\");\n\t\tproductCon = new ProductDBHandler(\"jdbc:mysql://127.0.0.1:3306/products\", \"admin\", \"admin\");\n\t}", "public Database()\r\n\t{\r\n\t\tinitializeDatabase();\r\n\t\t\r\n\t}", "private DBManager() throws Exception {\n file = new File(\"pdfLibraryDB.mv.db\");\n if (!file.exists()) {\n conn = connect();\n stmt = conn.createStatement();\n query = \"CREATE TABLE user(username VARCHAR(30) PRIMARY KEY, password VARCHAR(32));\" +\n \"CREATE TABLE category(id VARCHAR(30) PRIMARY KEY, name VARCHAR(30), username VARCHAR(30), FOREIGN KEY(username) REFERENCES user(username) ON UPDATE CASCADE ON DELETE CASCADE);\"+\n \"CREATE TABLE favorite(id VARCHAR(30) PRIMARY KEY, path VARCHAR(500), keyword VARCHAR(200), searchType VARCHAR(10), category VARCHAR(30),username VARCHAR(30), FOREIGN KEY(username) REFERENCES user(username) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY(category) REFERENCES category(id) ON UPDATE CASCADE ON DELETE CASCADE);\" +\n \"CREATE TABLE history(id VARCHAR(30) PRIMARY KEY, keyword VARCHAR(200), type VARCHAR(10), directory VARCHAR(500), username VARCHAR(30), FOREIGN KEY(username) REFERENCES user(username) ON UPDATE CASCADE ON DELETE CASCADE);\";\n stmt.executeUpdate(query);\n stmt.close();\n conn.close();\n System.out.println(\"DB created!\");\n }\n }", "private void connectDatabase(){\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb)\r\n {\r\n if(database.connectToRMIDatabaseServer())\r\n {\r\n System.out.println(\"database found\");\r\n }\r\n }", "public DBHandler() {\n\n driverName = \"com.mysql.jdbc.Driver\";\n url = \"jdbc:mysql://us-cdbr-azure-southcentral-e.cloudapp.net/newsstand\";\n userId = (String) \"ba7e286a39ae9e\";\n password = (String) \"d89b6d9b\";\n \n }", "private void makeSQLConn() {\n\t\ttry {\n\t\t\tmyDB = new MySQLAccess();\n\t\t} catch (Exception e) { e.printStackTrace(); }\n\t}", "@Override\n\tpublic void initDemoDB() {\n\t}", "public MyGameDatabaseHandler() throws SQLException, ClassNotFoundException{\n Class.forName(DRIVER);\n con = DriverManager.getConnection(DATABASE_URL);\n connected = true;\n }", "private static void initializeDatabase() {\n\t\tArrayList<String> data = DatabaseHandler.readDatabase(DATABASE_NAME);\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\trecords = serializer.deserialize(data);\n\t}", "public SQLite(String dbLocation) {\n this.dbLocation = dbLocation;\n }", "public void DBConnect() {\n \tdatabase = new DatabaseAccess();\n \tif (database != null) {\n \t\ttry {\n \t\t\tString config = getServletContext().getInitParameter(\"dbConfig\");\n \t\t\tdatabase.GetConnectionProperties(config);\n \t\t\tdatabase.DatabaseConnect();\n \t\t}\n \t\tcatch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}\n }", "private DatabaseContext() {\r\n datastore = createDatastore();\r\n init();\r\n }", "private void open()\n\t\t{\n\t\t\tconfig=Db4oEmbedded.newConfiguration();\n\t\t\tconfig.common().objectClass(Census.class).cascadeOnUpdate(true);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\tDB=Db4oEmbedded.openFile(config, PATH);\n\t\t\t\tSystem.out.println(\"[DB4O]Database was open\");\n\t\t\t\t\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"[DB4O]ERROR:Database could not be open\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "public Database() {\n\t\tconn = null;\n\t}", "public void createNewDataBase() {\n try (Connection conn = DriverManager.getConnection(url)) {\n if (conn != null) {\n DatabaseMetaData meta = conn.getMetaData();\n createNewTable();\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public PostDatabase() {\r\n\ttry {\r\n\t Class.forName(DRIVER);\r\n\t db = DriverManager.getConnection(URI);\r\n\t Statement create = db.createStatement();\r\n\t create.execute(\"CREATE TABLE IF NOT EXISTS posts ( id INTEGER PRIMARY KEY, author TEXT, date INTEGER, isPublic INTEGER, content TEXT );\");\r\n\t} catch (ClassNotFoundException e) {\r\n\t System.err.println(\"Caught exception while attempting to use database driver: \" + e.getMessage());\r\n\t} catch (SQLException e) {\r\n\t System.err.println(\"Caught exception while doing something to the database: \" + e.getMessage());\r\n\t}\r\n }", "public DatabaseStorage(Context context)\n {\n this.database = new DatabaseStorageHelper(context);\n }", "public DatabaseAccess(Context context) {\n this.openHelper = new OlpbhtbDatabase(context);\n }", "public DatabaseAdaptor() {\n\t\ttry {\n\t\t\tdatabase = new MyDatabase(DB_NAME);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void configureDB() {\n\t\tmDb = mDbHelper.getWritableDatabase();\n\t}", "public void OpenDB() {\n\t\tString JDriver = \"com.microsoft.sqlserver.jdbc.SQLServerDriver\";// 数据库驱动\n\t\tSystem.out.println(\"数据库驱动成功\");\n\t\tString connectDB = \"jdbc:sqlserver://localhost:1433;DatabaseName=bookstoreDB\";// 数据库连接\n\t\ttry {\n\t\t\tClass.forName(JDriver);// 加载数据库引擎,返回给定字符串名的类\n\t\t} catch (ClassNotFoundException e) {// e.printStackTrace();\n\t\t\tSystem.out.println(\"加载数据库引擎失败\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\ttry {\n\t\t\tconDB = DriverManager.getConnection(connectDB, \"sa\", \"123456\");// 连接数据库对象\n\t\t\tSystem.out.println(\"连接数据库成功\");\n\t\t\tstaDB = conDB.createStatement();\n\t\t} // 创建SQL命令对象\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"数据库连接错误\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public LocalDatabase(String DBName) {\n\t\tname = DBName;\n\t\texternal = new RS_LastFMInterface();\t\t\n\t}", "public void setUp() throws IOException\r\n\t{\r\n\r\n\t\tgraphDb = new GraphDatabaseFactory().newEmbeddedDatabase( dbPath );\r\n\t\tSystem.out.println(\"Connecting to the database...\"); \r\n\t\tSystem.out.println(\"Done!\");\r\n\r\n\t}", "public Database() {\r\n\t\ttry {\t\r\n\t\t\tSystem.out.println(\"Database: Connected\");\r\n\t\t\tconn = DriverManager.getConnection(DB_URL,USER,PASS);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Unable to connect to database\");\r\n\t\t}\r\n\t}", "public NameSurferDataBase(String filename) {\t\n\t\tnameData(filename);\n\t}", "public static final synchronized DatabaseReader initLookupService(String dbLocation) throws IOException {\n \n DatabaseReader ls = null;\n WeakReference<DatabaseReader> wrLs = globalLookupServices.get(dbLocation);\n if ((wrLs == null) || ((ls = wrLs.get()) == null)) {\n \n FileObject localDbLocation = null;\n\n try {\n FileObject source = KettleVFS.getFileObject(dbLocation);\n \n FileName dbVfs = source.getName();\n if (dbVfs.getScheme().equals(\"file\")) {\n localDbLocation = KettleVFS.getFileObject(source.getURL().getFile());\n } else {\n // It's remote - copy it locally\n\n if (source.exists() && source.getType().equals(FileType.FILE) && source.isReadable()) {\n\n // copy to a tmp file, that will be deleted in the end\n //\n File localDbFile = File.createTempFile(dbVfs.getBaseName(), \".\" + dbVfs.getExtension());\n localDbFile.deleteOnExit();\n FileObject localDbFileObject = KettleVFS.getFileObject(localDbFile.getAbsolutePath());\n localDbFileObject.copyFrom(source, Selectors.SELECT_SELF);\n \n // Closing references - we don't need them\n source.close();\n localDbFileObject.close();\n \n // this.log(Level.INFO, \"Successfully copied file from \" + dbLocation + \" to \" + localDbFile.getAbsolutePath());\n //localDbLocation = localDbFile.getAbsolutePath();\n localDbLocation = KettleVFS.getFileObject(localDbFileObject.getPublicURIString());\n }\n }\n } catch (Exception e) {\n throw new IOException(\"Unable to copy database file to local storage\", e);\n }\n\n // Logger.getLogger(MaxMindGeoIP.class.getName()).log(Level.INFO, \"GeoIP using database \" + localDbLocation);\n InputStream dbStream = KettleVFS.getInputStream(localDbLocation);\n ls = new DatabaseReader.Builder(dbStream).withCache(new CHMCache()).build();\n globalLookupServices.put(dbLocation, new WeakReference<DatabaseReader>(ls));\n }\n return ls;\n }", "private void open() {\n\t\tFile dbf = new File( dbName );\n\n\t\tif ( dbf.exists( ) == false ) {\n\t\t\tSystem.out.println(\n\t\t\t\t \"SQLite database file [\"\n\t\t\t\t+ dbName\n\t\t\t\t+ \"] does not exist\");\n\t\t\tSystem.exit( 0 );\n\t\t}\n\t\n\t\ttry {\n\t\t\tClass.forName( JDBC_DRIVER );\n\t\t\tgetConnection( );\n\t\t}\n\t\tcatch ( ClassNotFoundException cnfe ) {\n\t\t\tnotify( \"Db.Open\", cnfe );\n\t\t}\n\n\t\tif ( debug )\n\t\t\tSystem.out.println( \"Db.Open : leaving\" );\n\t}", "public void openRWDB() throws SQLException {\r\n\t\tString mPath = DATABASE_PATH + DATABASE_NAME;\r\n\t\tmDataBase = SQLiteDatabase.openDatabase(mPath, null,\r\n\t\t\t\tSQLiteDatabase.OPEN_READWRITE);\r\n\t}", "public static String getDatabaseURL(){\n return databaseURL;\n }", "public void setDb(gov.nih.nlm.ncbi.www.RsiteRefDocument.RsiteRef.Db db)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.RsiteRefDocument.RsiteRef.Db target = null;\r\n target = (gov.nih.nlm.ncbi.www.RsiteRefDocument.RsiteRef.Db)get_store().find_element_user(DB$2, 0);\r\n if (target == null)\r\n {\r\n target = (gov.nih.nlm.ncbi.www.RsiteRefDocument.RsiteRef.Db)get_store().add_element_user(DB$2);\r\n }\r\n target.set(db);\r\n }\r\n }", "public DataBaseHandler(final String pluginDir, final String filename) throws ConnectException {\n final Path filePath = Paths.get(pluginDir, filename);\n this.databaseFile = String.format(\"jdbc:sqlite:%s\", filePath);\n createNewDatabase();\n createTables();\n }", "@Override\r\n protected void connect() {\r\n try {\r\n this.setDatabase();\r\n } catch (SQLException e) {\r\n Log.w(NoteTraitDataSource.class.getName(), \"Error setting database.\");\r\n }\r\n }", "protected FirmRepository(String url){\r\n super(TABLE_NAME,KEY,url);\r\n }", "public static MongoDatabase init() {\n\n\t\tMongoClientURI connectionString = new MongoClientURI(\n\t\t\t\t\"mongodb+srv://xxxxx:[email protected]/test\");\n\t\tMongoClient mongoClient = new MongoClient(connectionString);\n\n\t\tMongoDatabase database = mongoClient.getDatabase(\"city\");\n\n\t\treturn database;\n\n\t}", "private void loadDatabase()\n\t{\n\t\ttry\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Check to make sure the Bmod Database is there, if not, try \n\t\t\t\t// downloading from the website.\n\t\t\t\tif(!Files.exists(m_databaseFile))\n\t\t\t\t{\n\t\t\t\t\tFiles.createDirectories(m_databaseFile.getParent());\n\t\t\t\t\n\t\t\t\t\tbyte[] file = ExtensionPoints.readURLAsBytes(\"http://\" + Constants.API_HOST + HSQL_DATABASE_PATH);\n\t\t\t\t\tif(file.length != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tFiles.deleteIfExists(m_databaseFile);\n\t\t\t\t\t\tFiles.write(m_databaseFile, file, StandardOpenOption.CREATE, StandardOpenOption.WRITE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// make sure we have the proper scriptformat.\n\t\t\t\tsetScriptFormatCorrectly();\n\t\t\t}catch(NullPointerException|IOException ex)\n\t\t\t{\n\t\t\t\tm_logger.error(\"Could not fetch database from web.\", ex);\n\t\t\t}\n\t\t\t\n\t\n\t\t\t\n\t\t\tClass.forName(\"org.hsqldb.jdbcDriver\");\n\t\t\n\t\t\t\n\t\t\tString db = ExtensionPoints.getBmodDirectory(\"database\").toUri().getPath();\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:hsqldb:file:\" + db, \"sa\", \"\");\n\t\t\t\n\t\t\t// Setup Connection\n\t\t\tCSVRecordLoader ldr = new CSVRecordLoader();\n\t\t\n\t\t\t// Load all of the building independent plugins\n\t\t\tfor(Record<?> cp : ldr.getRecordPluginManagers())\n\t\t\t{\n\t\t\t\tm_logger.debug(\"Creating table: \" + cp.getTableName());\n\t\t\t\t// Create a new table\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tgetPreparedStatement(cp.getSQLTableDefn()).execute();\n\t\t\t\t} catch(SQLException ex)\n\t\t\t\t{\n\t\t\t\t\t// Table exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tm_logger.debug(\"Doing index:\" + cp.getIndexDefn());\n\t\t\t\t\tif(cp.getIndexDefn() != null)\n\t\t\t\t\t\tgetPreparedStatement(cp.getIndexDefn()).execute();\n\t\t\t\t}catch(SQLException ex)\n\t\t\t\t{\t// index exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t} catch (Exception ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t\tif(ex instanceof DatabaseIntegrityException)\n\t\t\t\tDatabase.handleCriticalError((DatabaseIntegrityException)ex);\n\t\t\telse\n\t\t\t\tDatabase.handleCriticalError(new DatabaseIntegrityException(ex));\n\t\t}\n\t\t\n\t}", "public GosplPopulationInDatabase(IPopulation<ADemoEntity, Attribute<? extends IValue>> population) {\n\t\ttry {\n\t\t\tthis.connection = DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:hsqldb:mem:\"+mySqlDBname+\";shutdown=true\", \"SA\", \"\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"error while trying to initialize the HDSQL database engine in memory: \"+e.getMessage(), e);\n\t\t}\n\t\tloadPopulationIntoDatabase(population);\n\t}", "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 }", "public DataConnection() {\n\t\ttry {\n\t\t\tString dbClass = \"com.mysql.jdbc.Driver\";\n\t\t\tClass.forName(dbClass).newInstance();\n\t\t\tConnection con = DriverManager.getConnection(DIR_DB, USER_DB, PASS_DB);\n\t\t\tstatement = con.createStatement();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void initialize(URL arg0, ResourceBundle arg1) {\n\t\thandler = new ConnectionHandler();\n\t\tmerrQytetet();\n\t\tupdateTable();\n\t}", "public ArtistDb(Connection connection) {\r\n super(connection);\r\n }", "public void addToDB(DatabaseReference databaseReference) {\n databaseReference.child(DBUtility.POSTS).child(key_).setValue(this);\n }", "private DBMaster() {\r\n\t\t//The current address is localhost - needs to be changed at a later date\r\n\t\t_db = new GraphDatabaseFactory().newEmbeddedDatabase(\"\\\\etc\\\\neo4j\\\\default.graphdb\");\r\n\t\tregisterShutdownHook();\r\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n try {\n db.dbConnect();\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(PriceRoomController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(PriceRoomController.class.getName()).log(Level.SEVERE, null, ex);\n }\n UpdatePriceRoom();\n }", "private void openDatabase() {\r\n if ( connect != null )\r\n return;\r\n\r\n try {\r\n // Setup the connection with the DB\r\n String host = System.getenv(\"DTF_TEST_DB_HOST\");\r\n String user = System.getenv(\"DTF_TEST_DB_USER\");\r\n String password = System.getenv(\"DTF_TEST_DB_PASSWORD\");\r\n read_only = true;\r\n if (user != null && password != null) {\r\n read_only = false;\r\n }\r\n if ( user == null || password == null ) {\r\n user = \"guest\";\r\n password = \"\";\r\n }\r\n Class.forName(\"com.mysql.jdbc.Driver\"); // required at run time only for .getConnection(): mysql-connector-java-5.1.35.jar\r\n connect = DriverManager.getConnection(\"jdbc:mysql://\"+host+\"/qa_portal?user=\"+user+\"&password=\"+password);\r\n } catch ( Exception e ) {\r\n System.err.println( \"ERROR: DescribedTemplateCore.openDatabase() could not open database connection, \" + e.getMessage() );\r\n }\r\n }", "public DataHandlerDBMS() {\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tDBMS = DriverManager.getConnection(url);\n\t\t\tSystem.out.println(\"DBSM inizializzato\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Errore apertura DBMS\");\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"Assenza driver mySQL\");\n\t\t}\n\t}", "public void initializeHashMap(DatabaseReference ref){\n ref.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n UserSign sign = dataSnapshot.getValue(UserSign.class);\n System.out.println(\"ADDED USER SIGN FROM LOCAL DECK \" + dataSnapshot.getValue(UserSign.class).getUrl());\n userSigns.put(sign.getUrl(), sign);\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n //Updadte the deck if a sign was removed from the user's myDeck\n System.out.println(\"REMOVED USER SIGN FROM LOCAL DECK \" + dataSnapshot.getValue(UserSign.class).getUrl());\n userSigns.remove(dataSnapshot.getValue(UserSign.class).getUrl());\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "void setRef(int index, Ref value) throws SQLException;" ]
[ "0.66163355", "0.6605214", "0.6265088", "0.61742574", "0.5881067", "0.58151513", "0.57241666", "0.56347406", "0.5588754", "0.5579006", "0.5555184", "0.55549026", "0.55160296", "0.5510476", "0.54828703", "0.54657584", "0.54546106", "0.54316866", "0.5429628", "0.5409953", "0.53924704", "0.53788984", "0.5355945", "0.5351896", "0.53501743", "0.5340005", "0.5337134", "0.53250563", "0.5324512", "0.53109574", "0.52740324", "0.52733713", "0.5271147", "0.5267118", "0.52644813", "0.52583325", "0.52570194", "0.52480346", "0.5237499", "0.5234635", "0.5190655", "0.5189989", "0.51857525", "0.5183256", "0.5180581", "0.51658595", "0.5162795", "0.51598644", "0.5159411", "0.5148014", "0.51316565", "0.513028", "0.51271605", "0.5117511", "0.5114114", "0.50908977", "0.50899965", "0.50877756", "0.5087233", "0.5080976", "0.5079124", "0.5077078", "0.5076571", "0.5049844", "0.50386417", "0.503736", "0.50260454", "0.50143677", "0.5013349", "0.5005878", "0.5005341", "0.5002123", "0.49933112", "0.49907058", "0.49898154", "0.49831662", "0.49819165", "0.49750537", "0.49693343", "0.49670357", "0.49658862", "0.4960442", "0.49596477", "0.4950813", "0.4940049", "0.49363154", "0.49320385", "0.493023", "0.4929761", "0.49223334", "0.4919245", "0.49185675", "0.49167746", "0.49156988", "0.49092406", "0.49083593", "0.4899735", "0.4897913", "0.48972923", "0.4895303" ]
0.52616644
35
Sets a value in the database on a given target to a given value.
@Override public void setValueInDb(String target, String value) { DatabaseReference currentRef = database.getReference(target); currentRef.setValue(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void set(String target, String value){\n\t\tif (target == null || value == null){\n\t\t\tLog.e(NAME, \"Invalid parameters for 'set' method!\");\n\t\t\treturn;\n\t\t}\n\t\tif (valueCache.containsKey(target)){\n\t\t\tString oldValue = valueCache.get(target);\n\t\t\tdeleteOne(oldValue);\n\t\t}\n\t\tvalueCache.put(target, value);\n\t\taddOne(value);\n\t}", "public void setTargetValue(int idx, Object value);", "private void startDBValue(String target){\n database.getReference(gameCodeRef).child(target).setValue(1);\n }", "private void increaseDBValue(String target, int value){\n database.getReference(gameCodeRef).child(target).setValue(value+1);\n }", "void setTarget(String target) {\n try {\n int value = Integer.valueOf(target);\n game.setTarget(value);\n } catch (NumberFormatException e) {\n // caused by inputting strings\n } catch (IllegalArgumentException e) {\n // caused by number < 6.\n game.setTarget(10);\n }\n }", "private void setValue(Object entity, Field targetField, String targetValue) {\n if ( null == entity || null == targetField || 0 >= targetField.getName().length() ) {\n throw new IllegalStateException();\n }\n final Method[] declaredMethods = entity.getClass().getDeclaredMethods();\n final String fieldName = targetField.getName();\n String expectedMethodName = null;\n if ( fieldName.length() > 1 ) {\n expectedMethodName = \"set\" + fieldName.substring(0).toUpperCase() + fieldName.substring(1, fieldName.length() - 1);\n } else {\n expectedMethodName = \"set\" + fieldName.substring(0).toUpperCase();\n }\n Method expectedMethod = null;\n for ( Method method : declaredMethods ) {\n if ( method.getName().equals(expectedMethodName) ) {\n expectedMethod = method;\n }\n }\n if ( null != expectedMethod ) {\n boolean accessibilityChanged = false;\n try {\n if ( !expectedMethod.isAccessible() ) {\n expectedMethod.setAccessible(true);\n accessibilityChanged = true;\n }\n expectedMethod.invoke(entity, targetValue);\n } catch (Exception e) {\n Logger.getLogger(getClass().getName()).log(Level.SEVERE, e.getMessage(), e);\n } finally {\n if ( accessibilityChanged ) {\n expectedMethod.setAccessible(false);\n }\n }\n } else {\n boolean accessibilityChanged = false;\n if ( !targetField.isAccessible() ) {\n targetField.setAccessible(true);\n accessibilityChanged = true;\n }\n try {\n targetField.set(entity, targetValue);\n } catch (Exception e) {\n Logger.getLogger(getClass().getName()).log(Level.SEVERE, e.getMessage(), e);\n } finally {\n if ( accessibilityChanged ) {\n targetField.setAccessible(false);\n }\n }\n }\n }", "public void setField(final Object target, final String name, final Object value) {\n\n // check if the object is a proxy object\n if (AopUtils.isAopProxy(target) && target instanceof Advised) {\n try {\n ReflectionTestUtils.setField(((Advised) target).getTargetSource().getTarget(), name, value);\n } catch (Exception e) {\n e.printStackTrace();\n }\n } else {\n ReflectionTestUtils.setField(target, name, value);\n }\n }", "public void setFieldValue(final Object target, final String fieldName, final Object value) {\n final Field f = getField(target, fieldName);\n try {\n f.set(target, value);\n } catch (final IllegalAccessException e) {\n throw new IllegalStateException(\"Error setting field value\", e);\n }\n }", "protected void setValue(Object target, String targetName, String propName,\n\t\t\tObject valToSet) throws WekaException {\n\n\t\ttry {\n\t\t\tgetStepManager().logDebug(\n\t\t\t\t\t\"Attempting to set property '\" + propName + \"' \"\n\t\t\t\t\t\t\t+ \"with value of type '\" + valToSet.getClass().getCanonicalName()\n\t\t\t\t\t\t\t+ \" '(\" + valToSet + \") on '\" + targetName + \"'\");\n\t\t\tPropertyDescriptor prop = getPropDescriptor(target, propName);\n\n\t\t\tif (prop == null) {\n\t\t\t\tthrow new WekaException(\"Unable to find method '\" + propName + \"'\");\n\t\t\t}\n\t\t\tMethod setMethod = prop.getWriteMethod();\n\t\t\tsetMethod.invoke(target, valToSet);\n\t\t} catch (Exception e) {\n\t\t\tthrow new WekaException(e);\n\t\t}\n\t}", "public void setValue(Object value);", "public void set(Object target, Object value)\n\t\tthrows IllegalAccessException,\n\t\tInvocationTargetException {\n\t\tsetter.setAccessible(true);\n\t\tsetter.invoke(target, value);\n\t}", "void setValue(Object value);", "public void setTargetValue(String name, Object def);", "public void setTarget(String val)\r\n\t{\r\n\t\t_target = val;\r\n\t}", "public void setTarget(NameContainer value) {\n DmcAttribute<?> attr = get(DmpDMSAG.__target);\n if (attr == null)\n attr = new DmcTypeNameContainerSV(DmpDMSAG.__target);\n \n try{\n attr.set(value);\n set(DmpDMSAG.__target,attr);\n }\n catch(DmcValueException ex){\n throw(new IllegalStateException(\"The type specific set() method shouldn't throw exceptions!\",ex));\n }\n }", "@Override\n\tpublic void setBindingValue(T value, Object target, BindingEvaluationContext context) {\n\n\t}", "public void setTarget(DmcObjectName value) {\n DmcAttribute<?> attr = get(DmpDMSAG.__target);\n if (attr == null)\n attr = new DmcTypeNameContainerSV(DmpDMSAG.__target);\n \n try{\n attr.set(value);\n set(DmpDMSAG.__target,attr);\n }\n catch(DmcValueException ex){\n throw(new IllegalStateException(\"The alternative type specific set() method shouldn't throw exceptions!\",ex));\n }\n }", "public void set(int rowIndex, int columnIndex, int value) { target.set(index.get(rowIndex), columnIndex, value); }", "void setValue(T value);", "void setValue(T value);", "void setValue(int value);", "public void setValue(Object value) { this.value = value; }", "void setValue(Object object, Object value);", "public abstract void setValue(T value);", "public void setValue(Object val);", "public void setValue(Entity value) {\r\n\t\t\tthis.value = value;\r\n\t\t}", "public void setTarget(String newValue);", "public V setValue(V value);", "public abstract void setValue(int value);", "public void setValue(int value);", "public void setValue(Object value)\r\n\t{\r\n\t\tm_value = value;\r\n\t}", "public void setValue(Value value) {\n this.value = value;\n }", "void setTarget(java.lang.String target);", "public void setValue(Object value) {\n this.value = value;\n }", "void setTarget(Node target) {\n\t\tthis.target = target;\n\t}", "public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException {\n currentPreparedStatement.setObject(parameterIndex, x, targetSqlType);\n }", "protected abstract void setValue(V value);", "public void setValue(T value) \n\t{\n\t\tthis.value = value;\n\t}", "public void setValue(Object value) {\n\t\tthis.value = value;\n\t\tsetValueAction(value);\n\t}", "@objid (\"8fb70c43-b102-4a64-9424-c7cc07d58fcf\")\n void setTarget(Instance value);", "public void setValue(T value) {\n this.value = value;\n }", "public void setTarget(CPointer<BlenderObject> target) throws IOException\n\t{\n\t\tlong __address = ((target == null) ? 0 : target.getAddress());\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeLong(__io__address + 128, __address);\n\t\t} else {\n\t\t\t__io__block.writeLong(__io__address + 104, __address);\n\t\t}\n\t}", "@Override\n public void setValue(Node value) throws ValueFormatException,\n VersionException, LockException, ConstraintViolationException,\n RepositoryException {\n \n }", "void setValue(V value);", "public void setValue(final Object value) { _value = value; }", "void setValue(T value)\n\t\t{\n\t\t\tthis.value = value;\n\t\t}", "public abstract void setValueAction(Object value);", "public void setValue(T value) {\n\t\tthis.value = value;\n\t}", "public void setValue(T value) {\n\t\tthis.value = value;\n\t}", "public void setTarget(Object value) throws DmcValueException {\n DmcTypeNameContainerSV attr = (DmcTypeNameContainerSV) get(DmpDMSAG.__target);\n if (attr == null)\n attr = new DmcTypeNameContainerSV(DmpDMSAG.__target);\n \n attr.set(value);\n set(DmpDMSAG.__target,attr);\n }", "public void setValue(Object value)\r\n {\r\n m_value = value;\r\n }", "public Object setPossibleProperty( Map<String, Object> context, Object target, String name, Object value )\n throws OgnlException\n {\n Object result = null;\n OgnlContext ognlContext = (OgnlContext) context;\n\n try\n {\n if ( !OgnlRuntime.setMethodValue( ognlContext, target, name, value, true ) )\n {\n result = OgnlRuntime.setFieldValue( ognlContext, target, name, value ) ? null : OgnlRuntime.NotFound;\n }\n\n if ( result == OgnlRuntime.NotFound )\n {\n Method m = OgnlRuntime.getWriteMethod( target.getClass(), name );\n if ( m != null )\n {\n result = m.invoke( target, value );\n }\n }\n } catch ( OgnlException ex )\n {\n throw ex;\n } catch ( Exception ex )\n {\n throw new OgnlException( name, ex );\n }\n\n return result;\n }", "public void setValue(Object o){\n \tthis.value = o;\n }", "public void setTargetUUID(String gameUUID, String targetUUID) {\n\t\tif (this.gameTargetUUIDs == null) {\n\t\t\tthis.gameTargetUUIDs = new HashMapJDO();\n\t\t}\n\t\tthis.gameTargetUUIDs.addNewTarget(gameUUID, targetUUID);\n\t}", "protected void setValue(T value) {\r\n this.value = value;\r\n }", "public void setTarget(ObjectSequentialNumber target) {\n this.target = target;\n }", "void set(long newValue);", "void setValue(T value) throws YangException;", "public void setTarget(double target, TrcWarpSpace warpSpace)\n {\n final String funcName = \"setTarget\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"target=%f,warpSpace=%s\", target, warpSpace);\n }\n //\n // Read from input device without holding a lock on this object, since this could\n // be a long-running call.\n //\n final double input = pidInput.get();\n\n synchronized (this)\n {\n if (!absSetPoint)\n {\n //\n // Set point is relative, add target to current input to get absolute set point.\n //\n setPoint = input + target;\n currError = target;\n }\n else\n {\n //\n // Set point is absolute, use as is but optimize it if it is in warp space.\n //\n setPoint = target;\n if (warpSpace != null)\n {\n setPoint = warpSpace.getOptimizedTarget(setPoint, input);\n }\n currError = setPoint - input;\n }\n\n if (inverted)\n {\n currError = -currError;\n }\n\n setPointSign = Math.signum(currError);\n //\n // If there is a valid target range, limit the set point to this range.\n //\n if (maxTarget > minTarget)\n {\n if (setPoint > maxTarget)\n {\n setPoint = maxTarget;\n }\n else if (setPoint < minTarget)\n {\n setPoint = minTarget;\n }\n }\n\n totalError = 0.0;\n prevTime = settlingStartTime = TrcUtil.getCurrentTime();\n // Only init the prevOutputTime if this setTarget is called after a reset()\n // If it's called mid-operation, we don't want to reset the prevOutputTime clock\n if (prevOutputTime == 0.0)\n {\n prevOutputTime = prevTime;\n }\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n }", "public void setValue(Object value) {\n setValue(value.toString());\n }", "@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}", "void setValue(String value);", "void setValue(String value);", "public void setValue(String value);", "public void setValue(String value);", "public void setValue(String value);", "public void setValue(String value);", "public void setValue (String Value);", "public void setValue(String fieldName, Object value) {\n try {\n Field field = FieldUtils.getField(object.getClass(), fieldName, true);\n if (field != null) {\n FieldUtils.writeField(field, object, value, true);\n } else {\n logger.error(\"Unable to set value on field because the field does not exits on class: \" + object.getClass());\n }\n } catch (IllegalAccessException e) {\n logger.error(e);\n }\n }", "private void setActiveValue(int projectId, String value) {\n\t\tConnection conn = getConnection();\n\t\tPreparedStatement stmtUpdate = null;\n\t\ttry {\n\t\t\tStringBuilder sbUpdate = new StringBuilder(UPDATE)\n\t\t\t\t.append(projectTableName)\n\t\t\t\t.append(SET)\n\t\t\t\t.append(projectActiveColumnName).append(EQUAL).append(value) //$NON-NLS-1$\n\t\t\t\t.append(WHERE)\n\t\t\t\t.append(projectIdColumnName).append(EQUAL).append(projectId); //$NON-NLS-1$\n\n\t\t\tstmtUpdate = conn.prepareStatement(sbUpdate.toString());\n\t\t\tstmtUpdate.executeUpdate();\n\t\t\t\n\t\t} catch (SQLException ex) {\n\t\t\tthrow new DAOException(ex);\n\t\t\t\n\t\t} finally {\n\t\t\tDbUtils.closeQuietly(conn);\n\t\t\tDbUtils.closeQuietly(stmtUpdate);\n\t\t}\n\t\t\n\t}", "public void setValue(Number value) {\n this.value = value;\n }", "private void smem_variable_set(smem_variable_key variable_id, long variable_value) throws SQLException\n {\n final PreparedStatement var_set = db.var_set;\n \n var_set.setLong(1, variable_value);\n var_set.setInt(2, variable_id.ordinal());\n \n var_set.execute();\n }", "public void setPater(T target, T lchild) throws ElementNotFoundException {\r\n int index = getIndex(target);\r\n if (index == -1) {\r\n throw new ElementNotFoundException(\"setPater: target not found\");\r\n }\r\n if (index * 2 + 1 >= SIZE) {\r\n System.out.println(\"out of bound\");\r\n return;\r\n } else {\r\n tree[index * 2 + 1] = lchild;\r\n }\r\n }", "public void setObject(int parameterIndex, Object x, SQLType targetSqlType) throws SQLException {\n/* */ try {\n/* 49 */ if (this.wrappedStmt != null) {\n/* 50 */ ((PreparedStatement)this.wrappedStmt).setObject(parameterIndex, x, targetSqlType);\n/* */ } else {\n/* 52 */ throw SQLError.createSQLException(\"No operations allowed after statement closed\", \"S1000\", this.exceptionInterceptor);\n/* */ } \n/* 54 */ } catch (SQLException sqlEx) {\n/* 55 */ checkAndFireConnectionError(sqlEx);\n/* */ } \n/* */ }", "public void setValue(int value)\n {\n this.value = value;\n }", "public void setValue(Integer value) {\n _value = value ;\n }", "private void fillTargetRecordInDB(Target target, DataBaseConnector contactsDB) {\n contactsDB.insertDestination(target.getId(), target.getAddress(), target.getName(), target.getSubject().toString(), target.getRating(),\n target.getmLocation().getLat(), target.getmLocation().getLon(), target.getPlaceID(), target.getPhoto_ref());\n }", "public void setValueId(Integer valueId) {\n this.valueId = valueId;\n }", "public void setValueId(Integer valueId) {\n this.valueId = valueId;\n }", "boolean setValueForNode(Node node, TargetValue value) {\n\n // Assert integrity of target value. Other parts of code assume shared identities for bottom (UNDEFINED) and top\n // (NOT_A_CONSTANT) values. Maybe we should change this? But at least we don't fail silently now.\n\n assert !value.equals(TargetValue.getUnknown()) || value.equals(UNDEFINED);\n assert !value.equals(TargetValue.getBad()) || value.equals(NOT_A_CONSTANT);\n\n TargetValue oldValue = this.getValueForNode(node);\n TargetValue newValue = join(oldValue, value);\n\n // System.out.println(describe(oldValue) + \" ⊔ \" + describe(value) + \" = \" + describe(newValue) + \"\\t\" + node);\n\n this.values.put(node, newValue);\n\n return !oldValue.equals(newValue);\n }", "public void setCurrentTarget(Object target) {\r\n if (target instanceof IModelNode) {\r\n newSource = null;\r\n newTarget = (IModelNode) target;\r\n }\r\n }", "void setObject(int index, Object value, int sqlType)\n throws SQLException;", "void setObject(int index, Object value) throws SQLException;", "public void setTarget(double target)\n {\n setTarget(target, null);\n }", "T setUrlTarget(String urlTarget);", "public void setValue(long value) {\n\t this.value = value;\n\t }", "public void setValue(FreeColAction value) {\n logger.warning(\"Calling unsupported method setValue.\");\n }", "public void setValue(int value) {\r\n this.value = value;\r\n }", "public void setSignificanceToTarget( Flow.Significance val ) {\n doCommand( new UpdateSegmentObject( getUser().getUsername(), getFlow(), \"significanceToTarget\", val ) );\n }", "public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }", "public void set(String arg0, int arg1, Object arg2) {\n\t\tthis.bdb.set(arg0,arg1,arg2);\n\t}", "public void setTarget(Target target) {\n\t\tthis.target = target;\n\t}", "public void setMater(T target, T rchild) throws ElementNotFoundException {\r\n int index = getIndex(target);\r\n if (index == -1) {\r\n throw new ElementNotFoundException(\"setMater: target not found\");\r\n }\r\n if (index * 2 + 2 >= SIZE) {\r\n System.out.println(\"out of bound\");\r\n return;\r\n } else {\r\n tree[index * 2 + 2] = rchild;\r\n }\r\n }", "Object setValue(Object value) throws NullPointerException;", "public void setValue(int value)\n {\n // we have assumed value 1 for X and 10 for O\n this.value = value;\n }", "void setInt(int index, int value) throws SQLException;", "public void setValue (int newValue) {\n myValue = newValue;\n }", "public void setValue(int value) {\n this.value = value;\n }", "public void setValue(int value) {\n this.value = value;\n }", "public void setValue(int value) {\n this.value = value;\n }" ]
[ "0.72304285", "0.7154211", "0.71350867", "0.69359124", "0.66866344", "0.6666791", "0.665836", "0.6498744", "0.64443195", "0.63864565", "0.6366866", "0.63514656", "0.6311853", "0.63090044", "0.6272029", "0.6264039", "0.624068", "0.6220126", "0.61897665", "0.61897665", "0.6177217", "0.61547995", "0.615404", "0.6153451", "0.6147245", "0.6126743", "0.60942155", "0.6086603", "0.6081528", "0.6041284", "0.6040814", "0.6033862", "0.6023954", "0.6019097", "0.6012082", "0.60070187", "0.59893596", "0.5980003", "0.596448", "0.5958638", "0.595583", "0.5954265", "0.5953853", "0.595159", "0.59435916", "0.5940045", "0.5935", "0.59288096", "0.59288096", "0.59229493", "0.5917794", "0.5916833", "0.59153855", "0.5913944", "0.58469415", "0.5844318", "0.5837384", "0.5835531", "0.58317304", "0.58293647", "0.5825455", "0.58213294", "0.58213294", "0.5811813", "0.5811813", "0.5811813", "0.5811813", "0.5801245", "0.57959473", "0.57866985", "0.5779695", "0.5777302", "0.57757086", "0.5769844", "0.5758028", "0.5753248", "0.57397145", "0.57365227", "0.57365227", "0.57288784", "0.5712145", "0.571188", "0.5710606", "0.57105285", "0.5688022", "0.56801355", "0.5672403", "0.5662305", "0.5656484", "0.56559545", "0.5644704", "0.56336313", "0.56285906", "0.5627201", "0.5616352", "0.56154615", "0.56037503", "0.5597713", "0.5597713", "0.5597713" ]
0.80739576
0
Increases a value in the database with one, in the field specified by target
private void increaseDBValue(String target, int value){ database.getReference(gameCodeRef).child(target).setValue(value+1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startDBValue(String target){\n database.getReference(gameCodeRef).child(target).setValue(1);\n }", "public double increaseNumberTo(double oldValue, double speed, double target){\r\n\t\t\r\n\t\tif(Math.abs(oldValue - target) <= speed)return target;\r\n\t\t//if (false) return 0;\r\n\t\telse{\r\n\t\t\toldValue -= target;\r\n\t\t\treturn((Math.abs(oldValue)-speed) * sign(oldValue) + target);\r\n\t\t}\r\n\t}", "private void increaseOneToQuantity() {\n String previousValueString = mQuantityEditText.getText().toString();\n int previousValue;\n if (previousValueString.isEmpty() || previousValueString.equals(\"0\")) {\n return;\n }\n else {\n previousValue = Integer.parseInt(previousValueString);\n mQuantityEditText.setText(String.valueOf(previousValue + 1));\n }\n }", "public void setTargeted() {\n targeted ++;\n }", "private void updateNrPlayerValues(String target) {\n database.getReference(gameCodeRef).child(target).addListenerForSingleValueEvent(new ValueEventListener()\n {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n String value = String.valueOf(snapshot.getValue());\n if (value.isEmpty() || value == null || value.equals(null) || value.contains(\"null\")){\n startDBValue(target);\n value = \"1\";\n }\n else {\n increaseDBValue(target, Integer.parseInt(value));\n }\n switch (target){\n case \"NumberOfPlayers\":\n break;\n case \"PlayersDoneBrainstorming\":\n checkPlayersDoneBrainstorming(Integer.parseInt(value)+1);\n break;\n case \"PlayersDoneEliminating\":\n checkPlayersDoneEliminating(Integer.parseInt(value)+1);\n break;\n }\n }\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n Log.w(TAG,\"loadGamecode:onCancelled\", error.toException());\n }\n\n });\n }", "@Override\r\n\tprotected void onIncreaseMp(TYPE type, int value, int skillId, int logId)\r\n\t{\n\t}", "public void increment(){\n value+=1;\n }", "default void inc(long value) {\n\t\tcount(Math.abs(value));\n\t}", "private void promote() {\r\n //promote gives more money\r\n increment();\r\n }", "void increase();", "void increase();", "public void increase() {\n balance.multiply(1.001);\n }", "public DocumentMutation increment(FieldPath path, byte inc);", "public void increase() {\r\n\r\n\t\tincrease(1);\r\n\r\n\t}", "public void IncrementCounter()\r\n {\r\n \tsetCurrentValue( currentValue.add(BigInteger.ONE)); \r\n \r\n log.debug(\"counter now: \" + currentValue.intValue() );\r\n \r\n }", "private void increment() {\r\n salary = (int) (salary + salary * 0.2);\r\n }", "void setUnitIncrement(Adjustable adj, int u);", "public int increase() {\r\n return ++value;\r\n }", "public void Increase()\n {\n Increase(1);\n }", "public UpdateValues inc(String column, Object value) {\n return this.add(column, UpdateType.INC, value);\n }", "private static void increasePrimitive(int value) {\n value++;\n }", "public void incrementAmount() { amount++; }", "public void setTargetValue(int idx, Object value);", "@Override\r\n public void increment(String metricId, int incrementValue) {\r\n route(metricId, metricAggregator -> metricAggregator.increment(resolve(metricId), incrementValue));\r\n }", "public void setIncrement( final int value ) {\n checkWidget();\n if( value >= 1 && value <= maximum - minimum ) {\n increment = value;\n }\n }", "public void addOneToScore() {\r\n score++;\r\n }", "protected void computeIncrement()\r\n\t{\r\n\t\tsuper.increment = this.userDefinedIncrement;\r\n\r\n\t\tdouble powerOfTen = Math.pow( 10, Math.abs( this.getRoundingPowerOfTen() ) );\r\n\r\n\t\t//---round the increment according to user defined power\r\n\t\tsuper.increment = super.round( super.increment, powerOfTen );\r\n\r\n\t\t//---if we round this down to zero, force it to the power of ten.\r\n\t\t//---for example, round to nearest 100, value = 35...would push down to 0 which is illegal.\r\n\t\tif( super.increment == 0 )\r\n\t\t{\r\n\t\t\tsuper.increment = powerOfTen;\r\n\t\t}\r\n\r\n\t\tsuper.setMinValue( super.round( this.userDefinedMinimum, powerOfTen ) );\r\n\t\tsuper.setMaxValue( super.getMinValue() + ( super.increment * super.getNumberOfScaleItems() ) );\r\n\r\n\t}", "public void increment(Object incValue) {\r\n\t\t\r\n\t\tNumberOperation operator = new NumberOperation(this.value, incValue) {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic Number doAnOperation() {\r\n\t\t\t\tTypeEnum typeOfResult = getFinalType();\r\n\t\t\t\tif(typeOfResult == TypeEnum.TYPE_INTEGER) {\r\n\t\t\t\t\treturn getO1().intValue() + getO2().intValue();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn getO1().doubleValue() + getO2().doubleValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.value = operator.doAnOperation();\r\n\t}", "private void updateValue( DatabaseReference db, String parent, String child) {\r\n db.child(parent).addListenerForSingleValueEvent(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(DataSnapshot snapshot) {\r\n if (snapshot.hasChild(child)) {\r\n db.child(parent).child(child).setValue((Long)(snapshot.child(child).getValue())+1);\r\n }\r\n else\r\n db.child(parent).child(child).setValue(1);\r\n }\r\n\r\n @Override\r\n public void onCancelled(@NonNull DatabaseError error) {\r\n\r\n }\r\n });\r\n }", "public int reachNumber(int target) {\n target = Math.abs(target);\n int sum = 0;\n int i = 0;\n while(sum < target){\n i++;\n sum += i;\n }\n while((sum - target) % 2 != 0){\n i++;\n sum += i;\n }\n return i;\n }", "Post incrementRatio(Long id);", "private static void calc1(int x) {\n\t\tx+=1;\n\t}", "public void incValue(){\n\t\tif(this.value < 9){\n\t\t\tthis.value++;\n\t\t}\n\t\telse{\n\t\t\tthis.value = 0;\n\t\t}\n\t}", "public void increasePaymentCounter() throws SQLException{\n\t\tConnection conn = DataSource.getConnection();\n\t\ttry{\n\t\n\t\t\tString query = \"Update loan \"\n\t\t\t\t\t\t+ \" SET current_payment_counter = current_payment_counter+1\"\n\t\t\t\t\t\t+ \" WHERE client_id = '\"+this.client_id+\"' AND start_date = '\"+this.start_date+\"';\";\n\t\t\tStatement stat = conn.createStatement();\n\t\t\tstat.execute(query);\n\t\t\t\n\t\t}finally{\n\t\t\tconn.close();\n\t\t}\n\t}", "public void upgrade1(int value) {\n upgrade1.upgrade(this, value);\n }", "public void increment() {\n increment(1);\n }", "public void inc(){\n this.current += 1;\n }", "org.hl7.fhir.Quantity addNewValueQuantity();", "public void change(double increment)\n\t{\n\t\tthis.accumulation += increment;\n\t}", "public void incrementScore(int val) {\n score += val;\n }", "void setTarget(String target) {\n try {\n int value = Integer.valueOf(target);\n game.setTarget(value);\n } catch (NumberFormatException e) {\n // caused by inputting strings\n } catch (IllegalArgumentException e) {\n // caused by number < 6.\n game.setTarget(10);\n }\n }", "public int increase()\n {\n return this.increase(1);\n }", "public int inc(Object key)\r\n {\r\n return add(key, 1);\r\n }", "public double Increase(long amount) \n {\n lastAmount = amount;\n return count += amount;\n }", "@Override\r\n\tpublic int updateByExampleSelective(Emp record, EmpExample example) {\n\t\treturn 0;\r\n\t}", "public void increaseQuantity() {\n this.quantity++;\n this.updateTotalPrice();\n }", "@Override\r\n\tpublic double getIncrement(EventNetwork g, String source, String target,\r\n\t\t\tdouble currentTime, double weight) {\n\t\treturn m_pivot - weight;\r\n\t}", "public void increaseQuantity(int amount) {\n this.currentQuantity += amount;\n }", "public void increase(int quantity) {\r\n\r\n\t\tif (getAmount() == Integer.MAX_VALUE)\r\n\r\n\t\t\treturn;\r\n\r\n\t\tsetAmount(getAmount() + quantity);\r\n\r\n\t}", "public void putInteger (JSONObject target , String key , Integer value){\r\n\t\tif ( value==null){\r\n\t\t\ttarget.put(key, JSONNull.getInstance());\r\n\t\t\treturn ; \r\n\t\t}\r\n\t\ttarget.put(key, new JSONNumber(value));\r\n\t}", "@Override\r\n\tpublic int increase() throws Exception {\n\t\treturn 0;\r\n\t}", "@Override\n public void setValueInDb(String target, String value) {\n DatabaseReference currentRef = database.getReference(target);\n currentRef.setValue(value);\n }", "public void setValue(int value);", "static int incBy1AndMul(int x, int y)\r\n\t{\r\n\t\treturn Math.multiplyExact((x+1), y);\r\n\t}", "public void update(int x)\n {\n xValue += x;\n }", "synchronized long userUpdate(long value) {\n\n if (value == currValue) {\n currValue += increment;\n\n return value;\n }\n\n if (increment > 0) {\n if (value > currValue) {\n currValue += ((value - currValue + increment) / increment)\n * increment;\n }\n } else {\n if (value < currValue) {\n currValue += ((value - currValue + increment) / increment)\n * increment;\n }\n }\n\n return value;\n }", "public void updatedNumber(String key, Number val) {}", "public Double increment(Feature feat, double value)\r\n {\r\n Double cur = this.get(feat);\r\n\r\n return this.put(feat, ((cur == null) ? value : cur + value));\r\n }", "@Override\n public int incrementFirstValue(int key) {\n return array.incrementEntry(key << 1, 1);\n }", "public abstract void increment(int delta);", "public void adjustValue(String name, int v){\n t.get(name).setCurrent(v);\n }", "public void incrementScore(int increment) {\n score = score + increment;\n }", "public void updateBal(int value) {\r\n bal = bal + value;\r\n }", "@Override\r\n\tpublic int updateByPrimaryKeySelective(PayRecord record) {\n\t\treturn 0;\r\n\t}", "public abstract void setValue(int value);", "public abstract void increaseThis();", "@Override\r\n\tpublic int updateByExampleSelective(Byip record, ByipExample example) {\n\t\treturn 0;\r\n\t}", "int updateByPrimaryKeySelective(HuoDong record);", "void setValue(int value);", "protected Number incrementWriteLockValue(Number numberValue) {\r\n return Long.valueOf(numberValue.longValue() + 1);\r\n }", "private int increaseBy() {\n\t\tif (increaseBy == null) {\n\t\t\tincreaseBy = Integer.valueOf(ERXProperties.intForKeyWithDefault(\"er.extensions.ERXLongPrimaryKeyFactory.increaseBy\", 1000));\n\t\t}\n\t\treturn increaseBy.intValue();\n\t}", "public void buyFuelGainMultiply() {\n this.fuelGainMultiply++;\n }", "void setExtremeSpikeIncrease(VariableAmount increase);", "void set(long newValue);", "public void inc() {\n inc(1);\n }", "Builder extremeSpikeIncrease(VariableAmount increase);", "@Override\n\tpublic int updateByPrimaryKeySelective(GasRemind record) {\n\t\treturn 0;\n\t}", "public void incdrum(String quantity1, String capacity) {\nString countQuery = \"SELECT \"+Drum_Quantity + \" FROM \" + DATABASE_TABLE4+\" WHERE \"+Drum_Capacity+\" ='\"+capacity+\"'\";\n\t \n\t Cursor cursor = ourDatabase.rawQuery(countQuery, null);\n\t int d=cursor.getColumnIndex(Drum_Quantity);\n\t\tString cbal=null;\n\t\tfor(cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()){\n\t\t\tcbal=cursor.getString(d);\n\t\t\t\n\t\t}\n\t\tint cur=Integer.parseInt(cbal);\n\t\tcur=cur+Integer.parseInt(quantity1);\n\t ContentValues up=new ContentValues();\n\t up.put(Drum_Quantity, cur);\n\t\tourDatabase.update(DATABASE_TABLE4, up, Drum_Capacity+\" = '\"+capacity+\"'\", null);\n\t\t\n\t}", "public void update(long value) {\n\t\tcount.incrementAndGet();\n\t\tsample.update(value);\n\t\tsetMax(value);\n\t\tsetMin(value);\n\t\t_sum.getAndAdd(value);\n\t\tupdateVariance(value);\n\t}", "int updateByPrimaryKeySelective(BasicInfoAnodeBurningLossRate record);", "int updateByPrimaryKey(VarRatio record);", "public int setValue (int val);", "public void setIncrement(double increment) {\n this.increment = increment;\n }", "int updateByPrimaryKeySelective(Powers record);", "public void setOneNewWanted () {\r\n numWanted ++;\r\n }", "public void add1() {\r\n value++;\r\n }", "long getAndAdd(long delta);", "public abstract GF2nElement increase();", "private void change(Node n, int value) {\n\t\tn.pendingVal = value;\n\t\tn.sum = n.size() * value;\n\t\tn.min = value;\n\t\tarray[n.from] = value;\n\n\t}", "@Override\r\n\tpublic int updateByExample(Emp record, EmpExample example) {\n\t\treturn 0;\r\n\t}", "default void increment(String tagKey, String tagValue, Double amount, String name, String description) {\n increment(new String[]{tagKey, tagValue}, amount, name, description);\n }", "@Transactional\n @Modifying\n @Query(\"update Item i set i.price = i.price * 1.1\")\n void increacePriceBy10Percent();", "public void increaseScore(){\n this.inc.seekTo(0);\n this.inc.start();\n this.currentScore++;\n }", "private void addOne(String value){\n\t\tif (numCache.containsKey(value)){\n\t\t\tnumCache.put(value, numCache.get(value) + 1);\n\t\t}else{\n\t\t\tnumCache.put(value, 1);\n\t\t}\n\t}", "int updateByPrimaryKeySelective(PurchasePayment record);", "public void increment(long value) {\n mCount.getAndIncrement();\n mTotal.getAndAdd(value);\n }", "VariableAmount getExtremeSpikeIncrease();", "void setActiveOperand(double activeOperand);", "@Override\r\n\tpublic int updateByExample(Byip record, ByipExample example) {\n\t\treturn 0;\r\n\t}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tint val = Integer.parseInt(jt.getText());\r\n\t\t\tval++;\r\n\t\t\tjt.setText(val+\"\");\r\n\t\t\t\r\n\t\t}" ]
[ "0.64365286", "0.6266113", "0.6009681", "0.58166456", "0.57996815", "0.5796801", "0.57354045", "0.5711112", "0.56535476", "0.5645197", "0.5645197", "0.56358296", "0.56101847", "0.55949116", "0.55400187", "0.553954", "0.55240446", "0.54826343", "0.544774", "0.5442794", "0.54251605", "0.5399263", "0.5393124", "0.5377548", "0.5373785", "0.53591466", "0.532566", "0.5315581", "0.5311619", "0.5299021", "0.52971816", "0.528247", "0.5273693", "0.52693784", "0.5267712", "0.5260314", "0.52560383", "0.52501553", "0.5227768", "0.52244407", "0.5210427", "0.5190999", "0.5189574", "0.51889485", "0.51831424", "0.5173294", "0.5165772", "0.5163102", "0.51628196", "0.5160609", "0.51597935", "0.5144152", "0.51439804", "0.51436627", "0.51360816", "0.51308256", "0.51120186", "0.50994015", "0.50923115", "0.5089953", "0.5078209", "0.5071459", "0.5069538", "0.50653356", "0.506388", "0.5058141", "0.50556993", "0.5049969", "0.50482434", "0.50458795", "0.50337505", "0.50326866", "0.50269574", "0.5020501", "0.5018059", "0.5010868", "0.5009839", "0.50071436", "0.49994618", "0.49986416", "0.49982738", "0.49979952", "0.49910045", "0.4989514", "0.49891233", "0.49876046", "0.49816418", "0.49805462", "0.49791458", "0.4978494", "0.49741048", "0.49642426", "0.49596733", "0.49559662", "0.49555004", "0.4954089", "0.49506775", "0.49480644", "0.49441862", "0.49439624" ]
0.7588778
0
Initialized a databasefield with the number 1.
private void startDBValue(String target){ database.getReference(gameCodeRef).child(target).setValue(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Field() {\n value = 0;\n }", "public IntegerField() {\r this(3, 0, 0, 0);\r }", "public Record() {\n data = new int[DatabaseManager.fieldNames.length];\n }", "@Override\r\n public List<DbField> initDbField(String controlID) {\n return null;\r\n }", "public Builder setField1321(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1321_ = value;\n onChanged();\n return this;\n }", "public Field(int value) {\n\n if (isPowerOfTwo(value)) {\n this.value = value;\n } else {\n throw new IllegalArgumentException(\"Value has to be a power of 2\");\n }\n }", "public Entry(int field) {\n this.field = field;\n }", "public Builder setField1(long value) {\n bitField0_ |= 0x00000002;\n field1_ = value;\n onChanged();\n return this;\n }", "public Field() {\r\n\t}", "public NumericField() {\n\t\tsuper();\n\t}", "@Override\n\tpublic int getField1() {\n\t\treturn -1;\n\t}", "public BaseField setupField(int iFieldSeq)\n {\n BaseField field = null;\n //if (iFieldSeq == 0)\n //{\n // field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n // field.setHidden(true);\n //}\n //if (iFieldSeq == 1)\n //{\n // field = new RecordChangedField(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n // field.setHidden(true);\n //}\n //if (iFieldSeq == 2)\n //{\n // field = new BooleanField(this, DELETED, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));\n // field.setHidden(true);\n //}\n if (iFieldSeq == 3)\n field = new StringField(this, NAME, 60, null, null);\n if (field == null)\n field = super.setupField(iFieldSeq);\n return field;\n }", "public Builder setNum1(int value) {\r\n\t\t\t\tbitField0_ |= 0x00000002;\r\n\t\t\t\tnum1_ = value;\r\n\t\t\t\tonChanged();\r\n\t\t\t\treturn this;\r\n\t\t\t}", "public Builder setField1011(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1011_ = value;\n onChanged();\n return this;\n }", "public long getField1() {\n return field1_;\n }", "public long getField1() {\n return field1_;\n }", "public Builder setField1001(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1001_ = value;\n onChanged();\n return this;\n }", "public Column(int num)\n {\n colNum = num;\n }", "public void setField(DatabaseField field) {\n this.field = field;\n }", "public DataIntField(String name, DataObject assignedDataObject) {\n super(name);\n this.assignedDataObject = assignedDataObject;\n }", "private DatabaseType(Integer value, String displayValue, String className) {\n this.value = value;\n this.displayValue = displayValue;\n this.className = className;\n }", "public Builder setField1320(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1320_ = value;\n onChanged();\n return this;\n }", "public Builder setField1111(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1111_ = value;\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString\n getField1321Bytes() {\n java.lang.Object ref = field1321_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n field1321_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }", "public IRAFAddItemColBrgyPage() {\n initComponents();\n xNumberField1.setFieldType( Integer.class );\n }", "public Field(String watermark,\n String showfieldname,\n String saveRequired,\n String jfunction,\n String onChange,\n String onKeyDown,\n String defaultValue,\n String type,\n String sqlValue,\n String field_name,\n String relation,\n String states,\n String relationField,\n String onClickVList,\n String jIdList,\n String name,\n String searchRequired,\n String id,\n String placeholder,\n String value,\n String fieldType,\n String onclicksummary,\n String newRecord,\n List<Field> dListArray,\n List<OptionModel> mOptionsArrayList,\n String onclickrightbutton,\n String webSaveRequired,\n String field_type) {\n\n this.watermark = watermark;\n this.showfieldname = showfieldname;\n this.saveRequired = saveRequired;\n this.jfunction = jfunction;\n this.onChange = onChange;\n this.onKeyDown = onKeyDown;\n this.defaultValue = defaultValue;\n this.type = type;\n this.sqlValue = sqlValue;\n this.field_name = field_name;\n this.relation = relation;\n this.states = states;\n this.relationField = relationField;\n this.onClickVList = onClickVList;\n this.jIdList = jIdList;\n this.name = name;\n this.searchRequired = searchRequired;\n this.id = id;\n this.placeholder = placeholder;\n this.value = value;\n this.fieldType = fieldType;\n this.onclicksummary = onclicksummary;\n this.newRecord = newRecord;\n this.dListArray = dListArray;\n this.optionsArrayList = mOptionsArrayList;\n this.onclickrightbutton = onclickrightbutton;\n this.webSaveRequired = webSaveRequired;\n this.field_type = field_type;\n\n// this( watermark, showfieldname, saveRequired, jfunction,\n// onChange, onKeyDown, defaultValue, type, sqlValue,\n// field_name, relation, states, relationField,\n// onClickVList, jIdList, name, \"\",\n// searchRequired, id, placeholder, value,\n// fieldType, onclicksummary, newRecord, \"\",\n// dListArray,mOptionsArrayList,onclickrightbutton);\n }", "public ChangeFieldEf() {\r\n\t\tthis(null, null);\r\n\t}", "public UiFieldRecord() {\n super(UiField.UI_FIELD);\n }", "public UpperCaseField(final int l) {\n this(null, l, 0);\n }", "public Builder setField1331(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1331_ = value;\n onChanged();\n return this;\n }", "@Override\n public void setField(int id, int value) {\n \n }", "public com.google.protobuf.ByteString\n getField1321Bytes() {\n java.lang.Object ref = field1321_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n field1321_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Builder setField0(boolean value) {\n bitField0_ |= 0x00000001;\n field0_ = value;\n onChanged();\n return this;\n }", "public org.apache.gora.cascading.test.storage.TestRow.Builder setDefaultLong1(long value) {\n validate(fields()[0], value);\n this.defaultLong1 = value;\n fieldSetFlags()[0] = true;\n return this; \n }", "public Builder setField1321Bytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n field1321_ = value;\n onChanged();\n return this;\n }", "public T1Record() {\n super(pan.auditdb.tables.T1.T1);\n }", "@Override\n public int getField(int id) {\n return 0;\n }", "public BinaryField(JNIBinaryField field)\n\t{\n\t\tsetInternal(field);\n\t}", "@attribute(value = \"\", required = true)\t\r\n\tpublic void addNumberField(NumberField f) {\r\n\t\tfields.put(\"\" + fieldCount++, f);\r\n\t}", "public Value(int i) {\n integer = i;\n itemClass = Integer.class;\n type = DataType.INT;\n }", "public Builder setField1121(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1121_ = value;\n onChanged();\n return this;\n }", "public void changeToBaseOne() {\r\n\t\tthis.numberBase = 1;\r\n\t}", "public java.lang.String getField1321() {\n java.lang.Object ref = field1321_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n field1321_ = s;\n return s;\n }\n }", "public Builder clearField1321() {\n \n field1321_ = getDefaultInstance().getField1321();\n onChanged();\n return this;\n }", "public Store() {\n\t\t//If unspecified then default to 1 register in the store\n\t\tthis(1);\n\t}", "public jq_Field first() { return _field; }", "public Builder setField1334(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1334_ = value;\n onChanged();\n return this;\n }", "protected Document createDefaultModel()\n\t{\n\t\treturn new IntegerDocument();\n\t}", "FieldDefinition createFieldDefinition();", "private JdbcTypeType(int value, String name, String literal) {\r\n\t\tsuper(value, name, literal);\r\n\t}", "public Builder setField1040(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1040_ = value;\n onChanged();\n return this;\n }", "public Binary() { \n\t_decNum = 0;\n\t_binNum = \"0\";\n }", "public DBField getAutoIndexField()\n {\n return this.getField(DBRecordKey.FLD_autoIndex);\n }", "public IntegerField(int cols)\n\t{\n\t\tsuper(cols);\n\t}", "public Builder setData1(int value) {\n bitField0_ |= 0x00000002;\n data1_ = value;\n \n return this;\n }", "public Builder setData1(int value) {\n bitField0_ |= 0x00000002;\n data1_ = value;\n \n return this;\n }", "public java.lang.String getField1321() {\n java.lang.Object ref = field1321_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n field1321_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public Builder setField1013(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1013_ = value;\n onChanged();\n return this;\n }", "public String getFieldName() { return databaseFieldName; }", "@Override\n\tpublic void setField(int id, int value) {\n\t\t\n\t}", "@Override\n\tpublic void setField(int id, int value) {\n\t\t\n\t}", "public DataPrimitive(int value) {\n\t\tsuper();\n\t\tthis.value = Integer.toString(value);\n\t}", "public GO_RecordType() {\n }", "@Override\n\tpublic int getID() {\n\t\treturn 1;\n\t}", "public CpFldMemo() { super(10010, 5); }", "public Builder setField1127(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1127_ = value;\n onChanged();\n return this;\n }", "public CountLM(String fld, boolean single) { super(fld); this.single = single; }", "public UpperCaseField() {\n this(null, 0, 0);\n }", "public Builder setField1281(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1281_ = value;\n onChanged();\n return this;\n }", "public Builder setField1330(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1330_ = value;\n onChanged();\n return this;\n }", "public Database()\r\n\t{\r\n\t\tinitializeDatabase();\r\n\t\t\r\n\t}", "@Override\n\tpublic int getField(int id) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int getField(int id) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int getField(int id) {\n\t\treturn 0;\n\t}", "public Builder setField1323(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1323_ = value;\n onChanged();\n return this;\n }", "public int getNumber() {\n return field.getNumber();\n }", "public DbRecord()\n {\n m_UserName = \"\";\n // Generate user's unique identifier\n m_Key = new byte[16];\n java.util.UUID guid = java.util.UUID.randomUUID();\n long itemHigh = guid.getMostSignificantBits();\n long itemLow = guid.getLeastSignificantBits();\n for( int i = 7; i >= 0; i-- )\n {\n m_Key[i] = (byte)(itemHigh & 0xFF);\n itemHigh >>>= 8;\n m_Key[8+i] = (byte)(itemLow & 0xFF);\n itemLow >>>= 8;\n }\n m_Template = null;\n }", "void fillDatabase() {\n Type.type( \"FOOD\" );\n Type.type( \"HOT\" );\n Type.type( \"SNACK\" );\n }", "One(){\n data = new int[DEFAULT_CAPACITY];\n }", "public void setM_Warehouse_ID (int M_Warehouse_ID)\n{\nset_Value (\"M_Warehouse_ID\", new Integer(M_Warehouse_ID));\n}", "public Builder setField1018(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1018_ = value;\n onChanged();\n return this;\n }", "public Builder setField1324(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1324_ = value;\n onChanged();\n return this;\n }", "public int getStartField()\n {\n return this.startField;\n }", "public Builder setField1010(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1010_ = value;\n onChanged();\n return this;\n }", "void setMyField(String val) {\n\t\ttry {\n\t\t\tmyField = Integer.parseInt(val);\n\t\t} catch (NumberFormatException e) {\n\t\t\tmyField = 0;\n\t\t}\n\t}", "public Builder setField1333(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1333_ = value;\n onChanged();\n return this;\n }", "public BaseField setupField(int iFieldSeq)\n {\n BaseField field = null;\n if (iFieldSeq == 0)\n field = new HotelField(this, PRODUCT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 1)\n // field = new DateField(this, START_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 2)\n // field = new DateField(this, END_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 3)\n // field = new StringField(this, DESCRIPTION, 10, null, null);\n //if (iFieldSeq == 4)\n // field = new CityField(this, CITY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 5)\n // field = new CityField(this, TO_CITY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 6)\n // field = new ContinentField(this, CONTINENT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 7)\n // field = new RegionField(this, REGION_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 8)\n // field = new CountryField(this, COUNTRY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 9)\n // field = new StateField(this, STATE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 10)\n // field = new VendorField(this, VENDOR_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 11)\n field = new HotelRateField(this, RATE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 12)\n field = new HotelClassField(this, CLASS_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 13)\n // field = new DateField(this, DETAIL_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 14)\n // field = new ShortField(this, PAX, Constants.DEFAULT_FIELD_LENGTH, null, new Short((short)2));\n //if (iFieldSeq == 15)\n // field = new HotelScreenRecord_LastChanged(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 16)\n // field = new BooleanField(this, REMOTE_QUERY_ENABLED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 17)\n // field = new ShortField(this, BLOCKED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 18)\n // field = new ShortField(this, OVERSELL, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 19)\n // field = new BooleanField(this, CLOSED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 20)\n // field = new BooleanField(this, DELETE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 21)\n // field = new BooleanField(this, READ_ONLY, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 22)\n // field = new ProductSearchTypeField(this, PRODUCT_SEARCH_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 23)\n // field = new ProductTypeField(this, PRODUCT_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 24)\n field = new PaxCategorySelect(this, PAX_CATEGORY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (field == null)\n field = super.setupField(iFieldSeq);\n return field;\n }", "public MyInteger( )\n {\n this( 0 );\n }", "public NumberedList()\n {\n _init=1;\n }", "public Builder setField1072(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1072_ = value;\n onChanged();\n return this;\n }", "public Builder setField1110(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1110_ = value;\n onChanged();\n return this;\n }", "public synchronized int getOrCreateField(String field, boolean scalar_field) {\r\n if (flds_lu.containsKey(field) == false) {\r\n flds[fld_count] = field; sclr[fld_count] = scalar_field; flds_lu.put(field, fld_count); fld_dts.put(fld_count,new HashSet<BundlesDT.DT>()); fld_count++;\r\n } return flds_lu.get(field);\r\n }", "private Field(String name) {\n\t\t\tthis.name = name;\n\t\t}", "public void startDataField(String tag, char ind1, char ind2) {\n \t datafield = new DataField(tag, ind1, ind2);\n }", "public Builder setField1338(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1338_ = value;\n onChanged();\n return this;\n }", "public void setRecordNum(java.lang.Integer value) {\n this.recordNum = value;\n }", "public TextField getTextField1() {\n if (textField1 == null) {//GEN-END:|31-getter|0|31-preInit\n // write pre-init user code here\n textField1 = new TextField(\"Immatriculation\", null, 32, TextField.ANY);//GEN-LINE:|31-getter|1|31-postInit\n // write post-init user code here\n }//GEN-BEGIN:|31-getter|2|\n return textField1;\n }", "public SimpleDB() \n\t{\n\t\tcomparedToClass= new int[][] {{0,1,3,5,9,11,13,16,19,20,23},{0,0,0,0,0,0,0,0,0,0,0}};\n\t\tmaxGrade = new int [24];\n\t\tfor (int i = 0; i< maxGrade.length; i++) \n\t\t{\n\t\t\tmaxGrade[i] = 0;\n\t\t}\n\t\tpassRate.put(0,new Integer[]{125,290});\n\t\tpassRate.put(1,new Integer[] {436,580});\n\t\tpassRate.put(3,new Integer[] {713,580});\n\t\tpassRate.put(5,new Integer[] {570,500});\n\t\tpassRate.put(9,new Integer[] {480,580});\n\t\tpassRate.put(11,new Integer[] {1050,580});\n\t\tpassRate.put(13,new Integer[] {310,580});\n\t\tpassRate.put(16,new Integer[] {235,290});\n\t\tpassRate.put(19,new Integer[] {250,580});\n\t\tpassRate.put(20,new Integer[] {200,290});\n\t\tpassRate.put(23,new Integer[] {1000,1140});\n\t}", "@attribute(value = \"\", required = true)\t\r\n\tpublic void addCharField(CharField f) {\r\n\t\tfields.put(\"\" + fieldCount++, f);\r\n\t}" ]
[ "0.6803919", "0.6640705", "0.61883783", "0.60726595", "0.5792531", "0.57363385", "0.57135963", "0.5693921", "0.5629311", "0.56053823", "0.5599316", "0.5596846", "0.5572543", "0.5569355", "0.55464", "0.55349195", "0.5517477", "0.54753584", "0.5470828", "0.54682845", "0.5448531", "0.54462177", "0.5443945", "0.5435637", "0.54112965", "0.5394436", "0.53932416", "0.5390595", "0.53847337", "0.5383788", "0.5370805", "0.53671104", "0.5344286", "0.5343223", "0.533446", "0.53208524", "0.5316525", "0.5296322", "0.5295244", "0.52884364", "0.52867645", "0.52698135", "0.5260092", "0.5247865", "0.5242453", "0.52394843", "0.5237713", "0.5219004", "0.5212651", "0.5197867", "0.51978403", "0.51962477", "0.51790017", "0.51786923", "0.51778495", "0.51742476", "0.51742476", "0.5172552", "0.5167256", "0.51568687", "0.5156865", "0.5156865", "0.51492614", "0.5143719", "0.5133747", "0.51248604", "0.51170826", "0.51152927", "0.5099909", "0.5085322", "0.5084683", "0.50843656", "0.5084011", "0.5084011", "0.5084011", "0.5080049", "0.5074235", "0.5072269", "0.5070655", "0.5069965", "0.5069606", "0.50612736", "0.5056529", "0.50564784", "0.50551444", "0.5054276", "0.50523704", "0.50448215", "0.5043845", "0.50396377", "0.5035799", "0.50317585", "0.5025401", "0.5019601", "0.5018106", "0.50173455", "0.5016523", "0.5015623", "0.50147724", "0.5005333" ]
0.50723946
77
Initializes the values in the database
public void initializeGameRoom() { DatabaseReference game = database.getReference(gameCodeRef); game.child("NumberOfPlayers").setValue(0); game.child("PlayersDoneBrainstorming").setValue(0); game.child("PlayersDoneEliminating").setValue(0); game.child("AllDoneBrainstorming").setValue(false); game.child("AllDoneEliminating").setValue(false); game.child("StartGame").setValue(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initValues() {\n \n }", "@Override\n\tpublic void initializeValues() {\n\n\t}", "@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}", "public void initialize()\r\n\t{\r\n\t\tdatabaseHandler = DatabaseHandler.getInstance();\r\n\t\tfillPatientsTable();\r\n\t}", "Values() {\n initializeTable(INITIAL_SIZE);\n this.size = 0;\n this.tombstones = 0;\n }", "void fillDatabase() {\n Type.type( \"FOOD\" );\n Type.type( \"HOT\" );\n Type.type( \"SNACK\" );\n }", "public void init() {\n\n\t\tConnection connection = null;\n\t\tStatement statement = null;\n\n\t\ttry {\n\n\t\t\tconnection = DatabaseInteractor.getConnection();\n\t\t\tstatement = connection.createStatement();\n\n\t\t} catch (SQLException exception) {\n\t\t\texception.printStackTrace();\n\t\t\treturn;\n\t\t} catch (ClassNotFoundException exception) {\n\t\t\texception.printStackTrace();\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\n\t\t\tDatabaseInteractor.createTable(StringConstants.USERS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.QUESTIONS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.ANSWERS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.TOPICS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.USER_QUESTION_VOTES_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.USER_ANSWER_VOTES_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.USER_TOPIC_RANKS_TABLE, statement);\n\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void initialize() {\n\n fechaDeLaVisita.set(LocalDate.now());\n\n if (medico.get() != null) {\n medico.get().clear();\n } else {\n medico.set(new Medico());\n }\n\n turnoVisita.set(\"\");\n visitaAcompanadaSN.set(false);\n lugarVisita.set(\"\");\n if (causa.get() != null) {\n causa.get().clear();\n } else {\n causa.set(new Causa());\n }\n\n if (promocion.get() != null) {\n promocion.get().clear();\n } else {\n promocion.set(new Promocion());\n }\n\n observacion.set(\"\");\n persistida.set(false);\n persistidoGraf.set(MaterialDesignIcon.SYNC_PROBLEM.graphic());\n\n fechaCreacion.set(LocalDateTime.now());\n\n }", "private static void initializeDatabase() {\n\t\tArrayList<String> data = DatabaseHandler.readDatabase(DATABASE_NAME);\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\trecords = serializer.deserialize(data);\n\t}", "@PostConstruct\r\n public void init() {\r\n all.addAll(allFromDB());\r\n Collections.sort(all);\r\n }", "private void initialData() {\n\n// if (MorphiaObject.datastore.createQuery(SecurityRole.class).countAll() == 0) {\n// for (final String roleName : Arrays\n// .asList(controllers.Application.USER_ROLE)) {\n// final SecurityRole role = new SecurityRole();\n// role.roleName = roleName;\n// MorphiaObject.datastore.save(role);\n// }\n// }\n }", "private void initValues() {\n this.closeConnection();\n this.agregarRol = false;\n rutRoles = null; rutRoles = new Vector(); rutRoles.clear();\n deudasContribuyente = null; deudasContribuyente = new Vector(); deudasContribuyente.clear();\n rutRolesConsultados = null; rutRolesConsultados = new HashMap(); rutRolesConsultados.clear();\n param = null; param = new HashMap(); param.clear();\n\n demandasContribuyente = null; demandasContribuyente = new Vector(); demandasContribuyente.clear();\n demandaSeleccionada=null; demandaSeleccionada= new Long(-1);\n\n\n this.conveniosMasivo = null;\n\n porcentajeCuotaContado = null; porcentajeCuotaContado = new Long(0);\n porcentajeCondonacion = null; porcentajeCondonacion = new Long(0);\n pagoContado = null; pagoContado = new Long(0);\n numeroCuotas = null; numeroCuotas = new Long(0);\n totalPagar = null; totalPagar = new Long(0);\n totalPagarConCondonacion = null; totalPagarConCondonacion = new Long(0);\n arregloDeudas=\"\";\n tipoPago=1;\n estadoCobranza=\"T\";\n codigoPropuesta = new Long(0);\n codigoFuncionario = new Long(0);\n idTesoreria = new Long(0);\n liquidada = false;\n }", "@Override\n public void init() {\n this.shapes = new DatabaseShape();\n }", "public Record() {\n data = new int[DatabaseManager.fieldNames.length];\n }", "@Override\n\tpublic void initParameters() {\n\t\ttransferDbData = new TransferDbData();\n\t}", "private void init()\n\t{\n\t\tsetModel(new Model(Id.model, this, null));\n\t\tsetEnviroment(new Enviroment(Id.enviroment, this, model()));\n\t\tsetVaccinationCenter(new VaccinationCenter(Id.vaccinationCenter, this, model()));\n\t\tsetCanteen(new Canteen(Id.canteen, this, vaccinationCenter()));\n\t\tsetRegistration(new Registration(Id.registration, this, vaccinationCenter()));\n\t\tsetExamination(new Examination(Id.examination, this, vaccinationCenter()));\n\t\tsetVaccination(new Vaccination(Id.vaccination, this, vaccinationCenter()));\n\t\tsetWaitingRoom(new WaitingRoom(Id.waitingRoom, this, vaccinationCenter()));\n\t\tsetSyringes(new Syringes(Id.syringes, this, vaccination()));\n\t}", "public Database()\r\n\t{\r\n\t\tinitializeDatabase();\r\n\t\t\r\n\t}", "public void initDefaultValues() {\n }", "public Database() {\n //Assign instance variables.\n this.movies = new ArrayList<>();\n this.users = new ArrayList<>();\n }", "private void initData() {\n Author steinbeck = new Author(\"John\", \"Steinbeck\");\n Publisher p1 = new Publisher(\"Covici Friede\", \"111 Main Street\", \"Santa Cruz\", \"CA\", \"95034\");\n Book omam = new Book(\"Of Mice And Men\", \"11234\", p1);\n \n publisherRepository.save(p1);\n\n steinbeck.getBooks().add(omam);\n omam.getAuthors().add(steinbeck);\n authorRepository.save(steinbeck);\n bookRepository.save(omam);\n\n // Create Crime & Punishment\n Author a2 = new Author(\"Fyodor\", \"Dostoevsky\");\n Publisher p2 = new Publisher( \"The Russian Messenger\", \"303 Stazysky Rao\", \"Rustovia\", \"OAL\", \"00933434-3943\");\n Book b2 = new Book(\"Crime and Punishment\", \"22334\", p2);\n a2.getBooks().add(b2);\n b2.getAuthors().add(a2);\n\n publisherRepository.save(p2);\n authorRepository.save(a2);\n bookRepository.save(b2);\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}", "@Override\n\tpublic void init() throws SlickException {\n\t\t\n\t}", "private void initDB() {\n dataBaseHelper = new DataBaseHelper(this);\n }", "public void initializeData() {\n _currentDataAll = _purityReportData.getAll();\n }", "public void initDatabase() {\n Datastore mongoDataStore = DatabaseHandler.getInstance().getMongoDataStore();\n initUsers();\n initAccounts();\n mongoDataStore.save(users);\n }", "public void initialize() {\n setThisFacility(null);\n loadData();\n initCols();\n\n }", "private void init() {\n try {\n renderer = new TableNameRenderer(tableHome);\n if (listId != null) {\n model = new DefaultComboBoxModel(listId);\n }\n else {\n Object[] idList = renderer.getTableIdList(step, extraTableRef);\n model = new DefaultComboBoxModel(idList);\n }\n setRenderer(renderer);\n setModel(model);\n }\n catch (PersistenceException ex) {\n ex.printStackTrace();\n }\n }", "protected void InitValuables() {\n\t\tsuper.InitValuables();\n\t\t\n\t}", "public void beginInitialization() {\n SQLiteDatabase db = this.helper.getWritableDatabase();\n db.beginTransaction();\n populateMeasurementVersionsCache(db);\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic void init() {\n\t\tif (allcode.isEmpty()) {\r\n\t\t\tCode code = new Code();\r\n\r\n\t\t\tList list = this.dynamicsqldao.findbyWhere(code, Code.class);\r\n\t\t\tif (list.isEmpty() == false) {\r\n\t\t\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\t\t\tcode = new Code();\r\n\t\t\t\t\tcode = (Code) list.get(i);\r\n\t\t\t\t\tString ckey = code.getCode();\r\n\t\t\t\t\tList codelist = this.dynamicsqldao\r\n\t\t\t\t\t\t\t.findbyWhere( code, Code.class);\r\n\t\t\t\t\tallcode.put(ckey, codelist);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void initData() {\n\t\tcomboBoxInit();\n\t\tinitList();\n\t}", "private void initDatas(){\r\n \t\r\n \tjTable1.setModel(ViewUtil.transferBeanList2DefaultTableModel(discountService.getAllDiscountInfo(),\"Discount\"));\r\n }", "protected void init() throws SQLException {\n }", "public void init() {\r\n\t\tdbVersion = new DBVersion( getDefaultDatabase(), progress, upgradeFile.versionTableName, upgradeFile.logTableName );\r\n\t}", "private void initialize()\n {\n aggregatedFields = new Fields(fieldToAggregator.keySet());\n }", "private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }", "@PostConstruct\n public void init() {\n for (final Stat stat: Stat.ALL_STATS) {\n effortValues.put(stat, new SimpleIntegerProperty(0));\n minIndividualValues.put(stat, new SimpleIntegerProperty(0));\n maxIndividualValues.put(stat, new SimpleIntegerProperty(31));\n if (!stat.equals(Stat.HP)) {\n minMinusIndividualValues.put(stat, new SimpleIntegerProperty(0));\n maxMinusIndividualValues.put(stat, new SimpleIntegerProperty(31));\n minNeutralIndividualValues.put(stat, new SimpleIntegerProperty(0));\n maxNeutralIndividualValues.put(stat, new SimpleIntegerProperty(31));\n minPlusIndividualValues.put(stat, new SimpleIntegerProperty(0));\n maxPlusIndividualValues.put(stat, new SimpleIntegerProperty(31));\n }\n\n }\n reset();\n }", "public void initTable();", "public void initialize() {\n\t\tinitialize(seedValue0, seedValue1);\n\t}", "protected void InitValuables() {\n\t\tsuper.InitValuables();\n\t\t\n\t\tCursurIndex = 1;\n\t\t\n\t}", "private void initData() {\n\t}", "public void initialize() {\r\n\t\tsetValue(initialValue);\r\n\t}", "public PostalCodeDataBase()\n {\n codeToCityMap = new HashMap<String, Set<String>>();\n // additional instance variable(s) to be initialized in part (b)\n }", "protected abstract void initialiseTable();", "@SuppressWarnings(\"static-access\")\n\tprivate void initData() {\n\t\tstartDate = startDate.now();\n\t\tendDate = endDate.now();\n\t}", "private void initData() {\n }", "@Override\n protected void initData()\n {\n super.initData();\n\n entityProps = getFormSession().getAssemblingMessageEntityProperties();\n\n refreshDataTable(entityProps);\n }", "public Database() {\n if (init) {\n\n //creating Transaction data\n Transaction transactionOne\n = new Transaction(1, \"Debit\", \"Spar Grocery\", 54.68,1);\n\n transactionDB.add(transactionOne);\n\n // Creating an Account data\n Account accountOne = new Account(1, 445, 111111111, \"Savings\",\n 1250.24, transactionDB);\n\n accountDB.add(accountOne);\n\n //creating withdrawal data\n Withdrawal withdrawalOne = new Withdrawal(1, 64422545, 600.89);\n withdrawalDB.add(withdrawalOne);\n\n //creating transfer data\n Transfer transferOne = new Transfer(1, 25252525, 521.23);\n transferDB.add(transferOne);\n\n //creating lodgement data\n Lodgement lodgementOne = new Lodgement(1, 67766666, 521.23);\n lodgementDB.add(lodgementOne);\n\n //add Customer data \n Customer customerOne\n = new Customer(1, \"Darth Vader\", \"[email protected]\",\n \"Level 5, Suit Dark\", \"darkSideIsGoodStuff\",\n accountDB, withdrawalDB, transferDB, lodgementDB);\n\n customerDB.add(customerOne);\n\n init = false;\n }\n }", "private void initDb() {\n\t\tif (dbHelper == null) {\n\t\t\tdbHelper = new DatabaseOpenHelper(this);\n\t\t}\n\t\tif (dbAccess == null) {\n\t\t\tdbAccess = new DatabaseAccess(dbHelper.getWritableDatabase());\n\t\t}\n\t}", "public InitialData(){}", "private RowData() {\n initFields();\n }", "static void init() {\n\t\tuserDatabase = new HashMap<String, User>();\n\t}", "public FakeDatabase() {\n\t\t\n\t\t// Add initial data\n\t\t\n//\t\tSystem.out.println(authorList.size() + \" authors\");\n//\t\tSystem.out.println(bookList.size() + \" books\");\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}", "public void initialize() {\n\n // Calculate the average unit price.\n calculateAvgUnitPrice() ;\n\n // Calculate the realized profit/loss for this stock\n calculateRealizedProfit() ;\n\n this.itdValueCache = ScripITDValueCache.getInstance() ;\n this.eodValueCache = ScripEODValueCache.getInstance() ;\n }", "public void initData() {\n }", "public void initData() {\n }", "@Override\n\t@Transactional\n\n\tpublic void initCinemas() {\n\t\tvilleRepository.findAll().forEach(v->{\n\t\t\tStream.of(\"Megarama\",\"Pathé\",\"UGC\",\"MK2\").forEach(c->{\n\t\t\t\tCinema cinema=new Cinema();\n\t\t\t\tcinema.setName(c);\n\t\t\t\tcinema.setNombreSalles(3+(int) (Math.random()*7));\n\t\t\t\tcinema.setVille(v);\n\t\t\t\t\n\t\t\t cinemaRepository.save(cinema);\t\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t});\n\t}", "private void setDefaultDBValues() {\r\n this.rhostfield.setText(hostnameString_default);\r\n this.rportfield.setText((new Integer(portNr_default)).toString());\r\n this.rdatabasefield.setText(databaseString_default);\r\n this.ruserfield.setText(rusernameString_default);\r\n this.rpasswdfield.setText(\"\");\r\n this.rtablename1efield.setText(nodeList_DBtable_default);\r\n this.colnodeIdfield.setText(node_ids_DBcol_default);\r\n this.colnodeLabelfield.setText(node_labels_DBcol_default);\r\n this.rtablename2efield.setText(edgeList_DBtable_default);\r\n this.coledge1field.setText(edgeList_DBcol1_default);\r\n this.coledge2field.setText(edgeList_DBcol2_default);\r\n this.colweightfield.setText(edgeList_DBcolweight_default);\r\n this.otablenamefield.setText(result_DBtable_default);\r\n\r\n this.is_alg_started = false;\r\n this.is_already_read_from_DB = false;\r\n this.is_already_renumbered = false;\r\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 RecipeDataBase(){\n //recipes = new ArrayList<>();\n loadDatabase();\n \n }", "public AllOOneDataStructure() {\n map = new HashMap<>();\n vals = new HashMap<>();\n maxKey = minKey = \"\";\n max = min = 0;\n }", "private void Initialized_Data() {\n\t\t\r\n\t}", "private void initializeAll() {\n initialize(rows);\n initialize(columns);\n initialize(boxes);\n }", "@Override\n\tpublic void initData() {\n\n\n\n\t}", "public Data() {\n initComponents();\n koneksi_db();\n tampil_data();\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}", "public void initDatabase(){\n CovidOpener cpHelper = new CovidOpener(this);\n cdb = cpHelper.getWritableDatabase();\n }", "private void initData() {\n\n }", "private void hibernateInitialize(Solicitud solicitud) {\n// Hibernate.initialize(solicitud);\n// Hibernate.initialize(solicitud.getEstudiante());\n// Hibernate.initialize(solicitud.getEstudiante().getPersona());\n// Hibernate.initialize(solicitud.getEstudiante().getPersona().getTipoDocumento());\n// Hibernate.initialize(solicitud.getEstudiante().getHorario_disponible());\n// Hibernate.initialize(solicitud.getEstudiante().getHorario_disponible().getDias_disponibles());\n// Hibernate.initialize(solicitud.getEstudiante().getEstudiante().getInformacion_Academica());\n// Hibernate.initialize(solicitud.getEstudiante().getEstudiante().getPrograma().getNombre());\n// Hibernate.initialize(solicitud.getMonitoria_solicitada());\n// Hibernate.initialize(solicitud.getMonitoria_solicitada().getCurso());\n// Collection<MonitoriaAceptada> monitorias = solicitud.getMonitorias();\n// for (Iterator<MonitoriaAceptada> it = monitorias.iterator(); it.hasNext();) {\n// MonitoriaAceptada monitoria = it.next();\n// Hibernate.initialize(monitoria);\n// Hibernate.initialize(monitoria.getSeccion());\n// }\n// Collection<MonitoriaRealizada> monitoriasRealizadas = solicitud.getEstudiante().getMonitoriasRealizadas();\n// Hibernate.initialize(monitoriasRealizadas);\n// for (MonitoriaRealizada monitoriaRealizada : monitoriasRealizadas) {\n// Hibernate.initialize(monitoriaRealizada);\n// }\n// Hibernate.initialize(solicitud.getResponsablePreseleccion());\n\n }", "public void initialize() {\n final Double optimismRate = new Double(0.0);\n _counts.clear();\n _values.clear();\n\n for (Integer index : Range.closed(0, _armsNo - 1).asSet(DiscreteDomains.integers())) {\n _counts.add(index, optimismRate.intValue());\n _values.add(index, optimismRate);\n }\n }", "public void init() {\r\n\t\tsetModel(new ProductTableModel());\r\n\t}", "public void initialise() \n\t{\n\t\tthis.docids = scoresMap.keys();\n\t\tthis.scores = scoresMap.getValues();\n\t\tthis.occurrences = occurrencesMap.getValues();\t\t\n\t\tresultSize = this.docids.length;\n\t\texactResultSize = this.docids.length;\n\n\t\tscoresMap.clear();\n\t\toccurrencesMap.clear();\n\t\tthis.arraysInitialised = true;\n\t}", "@Override\n\tprotected void initializeFields() {\n\n\t}", "public static void initialization() {\n System.out.println(\"initialization\");\n try {\n HibernateUtil.updateSchema();\n } catch (Exception e) {\n throw new RuntimeException(e.getMessage());\n }\n }", "@Override\r\n public void performInitialization(Object model) {\r\n super.performInitialization(model);\r\n richTable.setForceLocalJsonData(true);\r\n\r\n //init binding info\r\n if (bindingInfo != null) {\r\n bindingInfo.setDefaults(ViewLifecycle.getView(), getPropertyName());\r\n }\r\n \r\n List<? extends Component> items = getItems();\r\n \r\n ComponentUtils.clearAndAssignIds(items);\r\n\r\n //iterate over this collections items to initialize\r\n for (Component item : this.getItems()) {\r\n initialComponentIds.add(item.getId());\r\n\r\n //if data field, setup a forced placeholder value\r\n if (item instanceof DataField) {\r\n ((DataField) item).setForcedValue(VALUE_TOKEN + item.getId() + VALUE_TOKEN);\r\n }\r\n\r\n ///populate expression map\r\n expressionConversionMap = buildExpressionMap(item, expressionConversionMap);\r\n }\r\n }", "public void initialize() {\n for (TableInSchema tableInSchema : initialTables()) {\n addTable(tableInSchema);\n }\n }", "private void initTables() {\n try (Connection connection = this.getConnection();\n Statement statement = connection.createStatement()) {\n statement.execute(INIT.CREATE_CITIES.toString());\n statement.execute(INIT.CREATE_ROLES.toString());\n statement.execute(INIT.CREATE_MUSIC.toString());\n statement.execute(INIT.CREATE_ADDRESS.toString());\n statement.execute(INIT.CREATE_USERS.toString());\n statement.execute(INIT.CREATE_USERS_TO_MUSIC.toString());\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n }\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 }", "public void initDefaultValues() {\n setOrderActive(1);\n setProductQuantity(1);\n setBillingPhone1Blocked(0);\n setBillingPhone2Blocked(0);\n setOrderAvailabilityStatus(1);\n setDeliveryStatus(1);\n setMailedReminderToVendorStatus(0);\n setOrderCancelRequestStatus(0);\n setOrderCancellationToVendorStatus(0);\n setDisputeRaisedStatus(0);\n setOrderAcceptNewsletter(1);\n setOrderAcceptPromotionalMaterial(1);\n setBillingAdvanceAmount(0);\n setBillingBalanceAmount(0);\n setBillingGrossAmount(0f);\n setBillingMarginAmount(0f);\n setBillingNettCost(0f);\n setBillingPaymentGatewayRate(0f);\n setBillingStateId(0);\n setBillingTaxrate(0f);\n setBillingTotalAmount(0f);\n setCarYear(0);\n setCustomint1(0);\n setCustomint2(0);\n setCustPaymentMode(0);\n setCustPaymentStatus(0);\n setInvoiceId(0);\n setVendorPaymentMode(0);\n setShipmentRate(0);\n setShipmentCountryId(0);\n setShipmentCityId(0);\n setOrderType(0);\n setOrderStatus(0);\n setOrderRefundType(0);\n setOrderPriority(0);\n setOrderBulkType(0);\n setOrderCorporateType(0);\n setShipmentCityId(0);\n setShipmentCountryId(0);\n setShipmentRate(0f);\n setShipmentStateId(0);\n setOrderCancellationType(0);\n }", "public void init() {\n\t\tlog.info(\"Initialise StudentDAO\");\n\t\tquery_getStudent = new Query_GetStudent(dataSource);\n\t\tquery_insertStudent = new Query_InsertStudent(dataSource);\n\t\tquery_getStudentId = new Query_GetStudentID(dataSource);\n\t\tquery_updateStudent = new Query_UpdateStudent(dataSource);\n\t\tquery_deleteStudent = new Query_DeleteStudent(dataSource);\n\t\tquery_getAllStudentsOrderMatnr = new Query_GetAllStudentsOrderMatnr(\n\t\t\t\tdataSource);\n\t\tquery_getAllStudentsOrderNachname = new Query_GetAllStudentsOrderNachname(\n\t\t\t\tdataSource);\n\t}", "@Override\n\tpublic void initialize() {\n\t\tinitializeModel(getSeed());\n\t\tinitializeView();\n\t\tinitializeControllers();\n\t\t\n\t\tupdateScore(8);\n\t\tupdateNumberCardsLeft(86);\n\n\t}", "private void initialize() {\n\t\tfor(String key: count_e_f.keySet()){\n\t\t\tcount_e_f.put(key, 0.0);\n\t\t}\n\t\t\n\t\tfor(Integer key: total_f.keySet()){\n\t\t\ttotal_f.put(key, 0.0);\n\t\t}\n\t\t\n\t\t//This code is not efficient.\n//\t\tfor(Entry<String, Integer> german : mainIBM.gerWordsIdx.entrySet()){\n//\t\t\tfor(Entry<String, Integer> english : mainIBM.engWordsIdx.entrySet()){\n//\t\t\t\tcount_e_f.put(english.getValue() + \"-\" + german.getValue(), 0.0);\n//\t\t\t}\n//\t\t\ttotal_f.put(german.getValue(), 0.0);\n//\t\t}\t\n\n\t}", "private void init() {\n setMinutes(new int[] {});\n setHours(new int[] {});\n setDaysOfMonth(new int[] {});\n setMonths(new int[] {});\n setDaysOfWeek(new int[] {});\n }", "private void initFields() {\n\n tipPercent = 0.0;\n noPersons = 1;\n totalPay = 0.0;\n totalTip = 0.0;\n totalPerPerson = 0.0;\n\n }", "public void init() {\n if (mRealm.isClosed()) {\n mRealm = Realm.getDefaultInstance();\n }\n RealmResults<TranslationInfo> translationInfos;\n\n if (isOnlyFavorite) {\n translationInfos = mRealm.where(TranslationInfo.class)\n .equalTo(\"isFavourite\", isOnlyFavorite)\n .findAll();\n } else {\n translationInfos = mRealm.where(TranslationInfo.class)\n .findAll();\n }\n mRvHistoryAdapter.updateData(translationInfos);\n\n }", "public void init() {\n\t\tTypedQuery<Personne> query = em.createQuery(\"SELECT p FROM Personne p\", Personne.class);\n\t\tList<Personne> clients = query.getResultList();\n\t\tif (clients.size()==0) {\n\t\t\tSqlUtils.executeFile(\"exemple.sql\", em);\n\t\t}\n\t}", "public boolean initializeDatabase() {\n try {\n initializeCategory();\n initializeExpense();\n initializeIncome();\n initializeBalance();\n initializeUser();\n } catch (Throwable t) {\n\n System.out.println(t.getMessage());\n return false;\n }\n return true;\n }", "public void initialiseValues() {\n\t\tif (validationRule == null) { // NOSONAR\n\t\t\tvalidationRule = Optional.empty();\n\t\t}\n\t}", "private void init() {\n for (Node n : reader.getNodes().values()) {\n da_collegare.add(n);\n valori.put(n, Double.MAX_VALUE);\n precedenti.put(n, null);\n }\n valori.put(start_node, 0.0);\n da_collegare.remove(start_node);\n }", "private void init()\n\t{\n\t\tif (_invData == null)\n\t\t\t_invData = new InvestigateStore.MappedStores();\n\t}", "@Override\n\tprotected void initData(){\n\t\tsuper.initData();\n\t}", "private void initData(){\n\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 }", "public void init() {\n\t\tlong startTime = System.currentTimeMillis();\n\t\t\n\t\tfor(BusinessCategoryList categoryList : BusinessCategoryList.values()) {\n\t\t\tString[] names = categoryList.getValues().split(\",\");\n\t\t\tfor(String name : names) {\n\t\t\t\tget(name);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlog.debug(\"Dirty hack completed in {} ms.\", System.currentTimeMillis() - startTime);\n\t}" ]
[ "0.72415143", "0.71450084", "0.7111421", "0.70834327", "0.66712934", "0.66300136", "0.6630006", "0.65931326", "0.6585253", "0.65782267", "0.65484273", "0.65379024", "0.6528263", "0.6509669", "0.64070356", "0.6382539", "0.6374706", "0.6371908", "0.63607067", "0.6337409", "0.6320169", "0.6318262", "0.6318016", "0.631411", "0.63113225", "0.63010836", "0.6292649", "0.62670314", "0.6235443", "0.62323403", "0.623202", "0.6230945", "0.6230392", "0.62280786", "0.62170404", "0.62086576", "0.62045336", "0.6164508", "0.6162882", "0.61605185", "0.61554676", "0.61463666", "0.6125792", "0.6125289", "0.61181027", "0.6117526", "0.61123884", "0.6104489", "0.60845953", "0.60762954", "0.6067581", "0.60646397", "0.60612386", "0.6058302", "0.6058302", "0.6058302", "0.6058302", "0.6058302", "0.6058302", "0.6055905", "0.60466355", "0.60466355", "0.60407776", "0.6031146", "0.60300666", "0.60278493", "0.6023117", "0.60223734", "0.60190845", "0.6017838", "0.6016727", "0.6015389", "0.60137624", "0.60127354", "0.6006176", "0.60025156", "0.5997774", "0.59959465", "0.5995031", "0.5993045", "0.59889895", "0.5986591", "0.598356", "0.5982989", "0.5976187", "0.5975938", "0.5973898", "0.59680533", "0.59607494", "0.5958989", "0.595458", "0.5950206", "0.59470075", "0.5944623", "0.59437186", "0.5941319", "0.5940976", "0.59372336", "0.59321636", "0.5932091" ]
0.6310352
25
Sets the gameCodeRef to the current game
@Override public void setGameCodeRef(String gameCodeRef){ this.gameCodeRef = gameCodeRef; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void setGame(Game game) {\n this.game = game;\n }", "public void setGame(Game g)\r\n\t{\r\n\t\tgame = g;\r\n\t}", "public void setGame(Game game) {\n this.game = game;\n }", "void createGameCode(GameCode gameCode);", "void setGame (Game game) {\n this.game = game;\n }", "void setCode(String code);", "public abstract void setGame(Gyges game);", "public void newGame (){\r\n\t\tcounter = 1;\r\n\t\tcode = \"\";\r\n\t\tscore = 0;\r\n\t\tcodeguess = \"\";\r\n\t\tSystem.out.println(\"counter = \" + counter);\r\n\t\tdelay (1000);\r\n\t\tlevelup.play();\r\n\t\tdelay (1000);\r\n\t\tdisplay = true;\r\n\t\tgenerateCode(10);\r\n\t}", "public void setGame() {\n }", "public void setCode(Code code) {\n this.Code = code;\n }", "public void setGame(GameModel gameModel) {\n this.gameModel = gameModel;\n viewMatrix = null; // needs to be recalculated\n setPaused(gameModel == null);\n invalidate();\n }", "public void setRaceCode(com.walgreens.rxit.ch.cda.CE raceCode)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.CE target = null;\n target = (com.walgreens.rxit.ch.cda.CE)get_store().find_element_user(RACECODE$18, 0);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.CE)get_store().add_element_user(RACECODE$18);\n }\n target.set(raceCode);\n }\n }", "public void setGameController(GameController gameController) {\n this.gameController = gameController;\n }", "public void setMatch(Match game) {\n this.game = game;\n }", "private void setGameState(GAMESTATE gameState) {\r\n\t\tlog.info(\"GID \" + this.GID + \" GAME STATE has changed to \" + gameState );\r\n\t\tthis.gameState = gameState;\r\n\t\t\r\n\t}", "@Override\n public void setStartGame() {\n database.getReference(gameCodeRef).child(\"StartGame\").setValue(true);\n }", "void setCode(Integer aCode);", "GameCode getGameCode(String gameCode);", "public void setCode(byte[] code);", "public void setUpGame() {\n\t\tGameID = sql.getTheCurrentGameID() + 1;\r\n\t\tSystem.err.println(GameID);\r\n\t\ttheModel.shuffleDeck();\r\n\t\ttheModel.createPlayers();\r\n\t\ttheModel.displayTopCard();\r\n\t\t// theModel.chooseFirstActivePlayer();\r\n\t}", "public void setCode (String code) {\r\n\t\tthis.code = code;\r\n\t}", "public void setCode(int code) {\n this.code = code;\n }", "public void setCode(int code) {\n this.code = code;\n }", "public final void setCode(java.lang.String code)\n\t{\n\t\tsetCode(getContext(), code);\n\t}", "void startGame(int gameId) {\n game = new Game(gameId);\n }", "public void setGeocodeMatchCode(net.opengis.xls.GeocodingQOSType geocodeMatchCode)\n {\n synchronized (monitor())\n {\n check_orphaned();\n net.opengis.xls.GeocodingQOSType target = null;\n target = (net.opengis.xls.GeocodingQOSType)get_store().find_element_user(GEOCODEMATCHCODE$0, 0);\n if (target == null)\n {\n target = (net.opengis.xls.GeocodingQOSType)get_store().add_element_user(GEOCODEMATCHCODE$0);\n }\n target.set(geocodeMatchCode);\n }\n }", "protected void setCode(@Code int code) {\n\t\tthis.mCode = code;\n\t}", "public void setAppCode(String appCode)\n\t{\n\t\tthis.appCode = Toolbox.trim(appCode, 3);\n\t}", "public void setCode(final int code) {\n this.code = code;\n commited = true;\n }", "public void setCode(String code)\n {\n this.code = code;\n }", "public void setCurrentGameType(ChessFX.GameType t) {\n this.currentGameType = t;\n }", "public void setCode(String code){\n\t\tthis.code = code;\n\t}", "IPayerEntry setCode(CD value);", "public void setCode(String code) {\n\t\tCode = code;\n\t}", "public void setCurrentCode(int which) {\n // if current is null, then this is the first setCurrent(0)\n if ((currentIndex == which) && (current != null)) {\n return;\n }\n\n // get the text currently being edited\n if (current != null) {\n current.setState(editor.getText(),\n editor.getSelectionStart(),\n editor.getSelectionStop(),\n editor.getScrollPosition());\n }\n\n current = code[which];\n currentIndex = which;\n\n editor.setCode(current);\n editor.header.rebuild();\n }", "public void setCode(long value) {\n this.code = value;\n }", "public static void begin(String gamecode){\n \ttry {\n\t\t\tDBHandler.start(gamecode, c);\n\t\t\tchooseAlphaZombies(gamecode);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "private void startDBValue(String target){\n database.getReference(gameCodeRef).child(target).setValue(1);\n }", "public void setGameNumber(String gameNumber) {\n this.gameNumber = gameNumber;\n }", "@Override\n\tpublic void startGame(){\n\t\tsuper.currentPlayer = 1;\n\t}", "public void setCode(String code) {\n this.code = code;\n }", "public void setCode(String code) {\n this.code = code;\n }", "public void setCode(String code) {\n this.code = code;\n }", "public void setCode(String code) {\n this.code = code;\n }", "public void setCode(String code) {\n this.code = code;\n }", "public void setCode(String code) {\n this.code = code;\n }", "public void setCode (java.lang.Long code) {\r\n\t\tthis.code = code;\r\n\t}", "public void setCode(String code) {\r\n\t\tthis.code = code;\r\n\t}", "public void setCode(String code) {\r\n\t\tthis.code = code;\r\n\t}", "public void setCode(String code) {\r\n\t\tthis.code = code;\r\n\t}", "public void setGameId(String gameId) {\n this.gameIdDisplay.setText(gameId);\n }", "public void setSwiftCode(java.lang.String swiftCode)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SWIFTCODE$8, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SWIFTCODE$8);\n }\n target.setStringValue(swiftCode);\n }\n }", "public void setClassCode(java.lang.String classCode)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CLASSCODE$30);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(CLASSCODE$30);\n }\n target.setStringValue(classCode);\n }\n }", "public void resetGame() {\r\n\r\n\t\tplayerScore = 0;\r\n\t\tframe.setVisible(false);\r\n\t\tgame = new Game();\r\n\r\n\t}", "public void setCode(String cod){\n\t\tcodeService = cod;\n\t}", "@Override\n public void setGameState(GameState gameState) {\n this.gameState = gameState;\n }", "private void storeCode(String code) {\n SharedPreferences prefs = getSharedPreferences(\"slidecopy\", MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"code\", code);\n editor.apply();\n }", "public void setCode(Integer code) {\n this.code = code;\n }", "public final void setCode(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String code)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.Code.toString(), code);\n\t}", "public void initGame() {\n this.game = new Game();\n }", "public void setGameKey(String gameKey) {\n this.gameKey = gameKey == null ? null : gameKey.trim();\n }", "public void setCode(String code) {\n\t\tthis.code = code;\n\t}", "public void setCode(String code) {\n\t\tthis.code = code;\n\t}", "private void startGame() {\n\t\tmain.next_module = new Game(main, inputs, gameSelectionData);\n\t}", "public void setCode(Long code) {\n this.code = code;\n }", "public void setCode(Long code) {\n this.code = code;\n }", "void setGameName(String gameName);", "public void setMap()\n {\n gameManager.setMap( savedFilesFrame.getCurrent_index() );\n }", "GameCode getGameCode(Long gameId);", "void setCode(LineLoader in) {\n code=in;\n }", "void setGameDescription(String gameDescription);", "private void m11876a(Game game) {\n if (game == null) {\n this.f9680i.setVisibility(0);\n this.f9679h.setVisibility(8);\n this.f9678g.setText(R.string.f44);\n return;\n }\n this.f9680i.setVisibility(8);\n this.f9679h.setVisibility(0);\n C5343e.m17030a(this.f9679h, game.icon);\n this.f9678g.setText(game.name);\n }", "public void setCode(java.lang.String code) {\r\n this.code = code;\r\n }", "public boolean setCurrentGame(Game aNewCurrentGame)\r\n {\r\n boolean wasSet = false;\r\n currentGame = aNewCurrentGame;\r\n wasSet = true;\r\n return wasSet;\r\n }", "public void setGameScore(Integer gameScore) {\n this.gameScore = gameScore;\n }", "public void setCodeSystem(CodeSystem codeSystem) {\r\n\t\tthis.codeSystem = codeSystem;\r\n\t}", "public void xsetSwiftCode(org.apache.xmlbeans.XmlString swiftCode)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SWIFTCODE$8, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(SWIFTCODE$8);\n }\n target.set(swiftCode);\n }\n }", "public void setLoadGame() {\n this.loadeGame = true;\n }", "public void loadGame() {\n\t\tmanager.resumeGame();\n\t}", "private void startGame() {\r\n\t\tthis.gameMap.startGame();\r\n\t}", "public void setGameInfo(GameSetup setupInfo)\n {\n startGameFlag = true;\n startGameInfo = setupInfo;\n }", "public void setGameState(GameState gs){\n this.gameState = gs;\n }", "public void setGuess(Code guess) {\n this.guess = guess;\n }", "public void code (String code) throws LuchthavenException\r\n\t{\r\n\t\tluchthaven.setCode(code);\r\n\t}", "@Override\n\tpublic void setPositionCode(java.lang.String positionCode) {\n\t\t_dmGTShipPosition.setPositionCode(positionCode);\n\t}", "public void initializeGameRoom() {\n DatabaseReference game = database.getReference(gameCodeRef);\n game.child(\"NumberOfPlayers\").setValue(0);\n game.child(\"PlayersDoneBrainstorming\").setValue(0);\n game.child(\"PlayersDoneEliminating\").setValue(0);\n game.child(\"AllDoneBrainstorming\").setValue(false);\n game.child(\"AllDoneEliminating\").setValue(false);\n game.child(\"StartGame\").setValue(false);\n\n }", "public void setCode(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(CODE_PROP.get(), value);\n }", "public void setCode(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(CODE_PROP.get(), value);\n }", "private void setNextGame() {\n Persistence db = Persistence.getInstance();\n game = db.getNextGame();\n\n // set the initial grid in the model\n grid = game.getInitial();\n\n // get rid of everything on the view grid\n view.clearGrid(true);\n\n // put givens for new game into view\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if (grid.isGiven(i, j)) {\n view.setGiven(i, j, grid.getNumber(i, j));\n } // if given\n } // for j\n } // for i\n\n }", "public void setMainCode(Long mainCode) {\n this.mainCode = mainCode;\n }", "public void setSeasonCode(final SessionContext ctx, final String value)\r\n\t{\r\n\t\tsetProperty(ctx, SEASONCODE,value);\r\n\t}", "public void newGame() {\n gameString = playerPlays = computerPlays = \"\";\n pScore = cScore = 0;\n setLabels();\n }", "public GameLoop(Game game) {\n\t\tthis.game = game;\n\t}", "public void setAudioCode(String audioCode) {\n this.audioCode = audioCode;\n }", "private void setupGame(@NotNull String data) {\n if (game == null) {\n throw new IllegalArgumentException(\"Tried to start game with a null reference to GameGraphics\");\n }\n NewGameDto newGameDto = GameGraphics.gson.fromJson(data, NewGameDto.class);\n RoboRally.scheduleSync(() -> {\n game.setScreen(new GameScreen(game, newGameDto, this));\n writeToServer(ServerAction.FINISHED_SETUP + \"\");\n IPlayerHandler playerHandler = GameGraphics.getRoboRally().getPlayerHandler();\n if (playerHandler instanceof MultiPlayerHandler) {\n this.playerHandler = (MultiPlayerHandler) playerHandler;\n } else {\n throw new IllegalStateException(\"Player handler is not for multiplayer\");\n }\n\n }, 0);\n }", "public void setApplication(ClickCounter app) {\r\n theCounter = app;\r\n }", "public void switchGame() {\n \tplayerController.clearKeysPressed();\n game.game1 = !game.game1;\n if (game.game1) {\n \tgame.gameSnapshot = game.game1Snapshot;\n \tgame.rooms = game.game1Rooms;\n \tgame.characters = game.game1Characters;\n \tgame.player = game.player1;\n } else {\n \tgame.gameSnapshot = game.game2Snapshot;\n \tgame.rooms = game.game2Rooms;\n \tgame.characters = game.game2Characters;\n \tgame.player = game.player2;\n }\n \n currentNPCs = game.gameSnapshot.map.getNPCs(game.player.getRoom());\n getTileRenderer().setMap(game.player.getRoom().getTiledMap());\n getTileRenderer().clearPeople();\n getTileRenderer().addPerson((List<AbstractPerson>) ((List<? extends AbstractPerson>) currentNPCs));\n getTileRenderer().addPerson(game.player);\n }", "public void setBundleCode(java.lang.String bundleCode)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(BUNDLECODE$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(BUNDLECODE$0);\n }\n target.setStringValue(bundleCode);\n }\n }", "public void setCode(BizCodeEnum code) {\n this.code = code;\n }", "public void setCode(String value) {\n setAttributeInternal(CODE, value);\n }" ]
[ "0.61030084", "0.600516", "0.5982645", "0.5980898", "0.59212077", "0.5914281", "0.58156466", "0.58021307", "0.5746162", "0.5736753", "0.5661602", "0.56567013", "0.5616315", "0.55592453", "0.5558053", "0.55183816", "0.54891056", "0.5482428", "0.5480744", "0.5417632", "0.5400423", "0.5376414", "0.5376414", "0.53690076", "0.53655136", "0.53555983", "0.53526026", "0.53224427", "0.531081", "0.53098524", "0.5304107", "0.5292986", "0.52619416", "0.5254938", "0.52461344", "0.5237593", "0.5233687", "0.52293783", "0.52102256", "0.52018434", "0.51975346", "0.51975346", "0.51975346", "0.51975346", "0.51975346", "0.51975346", "0.5190499", "0.51878464", "0.51878464", "0.51878464", "0.51818216", "0.5181725", "0.51803935", "0.51744205", "0.51733625", "0.51535726", "0.51498646", "0.5142737", "0.5136074", "0.5129299", "0.51274526", "0.51192635", "0.51192635", "0.5113688", "0.5108335", "0.5108335", "0.5100621", "0.5099809", "0.5089602", "0.50696063", "0.506909", "0.5066846", "0.50571257", "0.50470537", "0.50447136", "0.5034376", "0.50308305", "0.5028778", "0.5024904", "0.50200856", "0.5008147", "0.5005617", "0.4993607", "0.49885827", "0.49871805", "0.49866664", "0.49817306", "0.49802157", "0.49585027", "0.4948473", "0.49404353", "0.4937742", "0.49324197", "0.49279147", "0.49178988", "0.4909568", "0.49092466", "0.49042952", "0.490026", "0.48985144" ]
0.78908336
0
Sets the nrPlayers to the given value
@Override public void setNrPlayers(int value) { this.nrPlayers = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setNumberOfPlayers(int numberOfPlayers) {\n this.numberOfPlayers = numberOfPlayers;\n }", "public void setMinimumPlayers(int nPlayers)\r\n {\n \r\n }", "public static void setPlayerCount(int playerCount) {\n PLAYER_COUNT = playerCount;\n }", "public void setPlayerNumber(int num) {\n playerNum = num;\n }", "private void getNumPlayers() {\n\t\tSystem.out.println(\"How many people are playing? (must be between \"+MIN_PLAYERS+\" and \"+MAX_PLAYERS+\")\");\n\t\tnumPlayers = GetInput.getInstance().anInteger(MIN_PLAYERS, MAX_PLAYERS);\n\t}", "public void setPlayers(Player a_players[], int a_numPlayers)\n {\n m_numPlayers = a_numPlayers;\n \n for(int i = 0; i < m_numPlayers; i++)\n {\n m_currentPlayers.add(a_players[i]);\n m_players.add(a_players[i]);\n }\n }", "public static int getNumPlayers(){\n\t\treturn numPlayers;\n\t}", "public void setPlayers(ArrayList<Integer> players) {\n this.players= new ArrayList<>(players);\n }", "public int getNumPlayers() {\n return numPlayers;\n }", "public int incrementPlayersNumber(){//setter/incrementer di numberofplayers chiamato da ServerRoom: qua ho cambiato! è qui che si setta il client id, e il primo della stanza ha id=1 scritta come era prima!\r\n\t\tint idToSend=numberOfPlayers;\r\n\t\tnumberOfPlayers++;\r\n\t\treturn idToSend;\r\n\t}", "public void setPlayers(int theCompPlayer) throws Exception {\r\n\t\tswitch(theCompPlayer) {\r\n\t\t\tcase 1:\r\n\t\t\t\tcompPlayer = 1;\r\n\t\t\t\totherPlayer = 2;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tcompPlayer = 2;\r\n\t\t\t\totherPlayer = 1;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new Exception(\"That player number is invalid\");\r\n\t\t}\r\n\t}", "public void setPlayerNumber(int playerNumber) {\n this.playerNumber = playerNumber;\n }", "public int getNumPlayers(){\n return m_numPlayers;\n }", "public void setRank(int value);", "@Override\npublic int getNumPlayers() {\n\treturn numPlayer;\n}", "@Override\n public void setNrPlayersChangedListener() {\n database.getReference(gameCodeRef).child(\"NumberOfPlayers\").addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n String value = String.valueOf(snapshot.getValue());\n if (!value.equals(null) && !value.equals(\"null\")) {\n setNrPlayers(Integer.parseInt(value));\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n Log.w(TAG, \"Failed to read value.\", error.toException());\n }\n });\n }", "public int getNumOfPlayers() {\n\t\treturn numOfPlayers;\n\t}", "@Override\r\n public void addPlayers(int numberOfPlayers) {\r\n for (int i = 0; i < numberOfPlayers; i++) {\r\n this.addPlayer();\r\n }\r\n }", "public Builder setRanking(int value) {\n bitField0_ |= 0x00000010;\n ranking_ = value;\n onChanged();\n return this;\n }", "public void setWinner(int num){\r\n \twinner = num;\r\n }", "public void setNumPlayed(int numPlayed)\n\t{\n\t\tthis.numPlayed = numPlayed;\n\t}", "public void setMinimumPlayers(int minimumPlayers) {\n if (minimumPlayers < 2) {\n setOptionValue(ArenaOption.MINIMUM_PLAYERS, 2);\n return;\n }\n setOptionValue(ArenaOption.MINIMUM_PLAYERS, minimumPlayers);\n }", "public int getNumPlayers(){\n\t\treturn this.players.size();\n\t}", "public void setPlayer(int play)\n {\n this.player=play;\n }", "public void setGame(int numPlayers) {\r\n\t\tif (numPlayers > MAX_PLAYERS || numPlayers < 1) {\r\n\t\t\tSystem.out.println(\"Too many players. Please choose a number 1-8.\");\r\n\t\t}\r\n\t\t//Set up gameDeck\r\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\tthis.gameDeck = new Deck();\r\n\t\tgameDeck.shuffle();\r\n\t\t//Set up players and empty board\r\n\t\tthis.numPlayers = numPlayers;\r\n\t\tboard = new ArrayList<Card>();\r\n\t\tplayers = new ArrayList<Player>();\r\n\t\tfor (int i = 0; i < numPlayers; i++) {\r\n\t\t\tSystem.out.println(\"Please enter player name: \");\r\n\t\t\tString name = scanner.nextLine();\r\n\t\t\tplayers.add(new Player(name));\r\n\t\t}\r\n\t\tscanner.close();\r\n\t}", "int getNumOfPlayers() {\n return this.numOfPlayers;\n }", "public int getNumPlayers() {\n\n\t\treturn this.playerCount;\n\t}", "public void setNumberShips(int numberShips);", "public void setPlayersAtGo()\n {\n for(int i = 0; i < m_numPlayers; i++)\n {\n m_gameBoard.addPlayerToSpace(i + 1, 0);\n }\n }", "public void setMaximumPlayers(int maximumPlayers) {\n setOptionValue(ArenaOption.MAXIMUM_PLAYERS, maximumPlayers);\n }", "public void setMaxPlayers(int maxPlayers) {\n\t\tthis.maxPlayers = maxPlayers;\n\t}", "public void setPlayerCount(short pPlayerCount) {\n\t\tthis.mPlayerCount = pPlayerCount;\n\t}", "public void changeNumberOfPlayers(int numberOfPlayers) {\n\t\tif (numberOfPlayers != currentNumberofPlayers) {\n\t\t\tcurrentNumberofPlayers = numberOfPlayers;\n\t\t\tint row = nameRow;\n\n\t\t\t//remove all of the fields\n\t\t\tfor (int i = 0; i < maxPlayer; i++) {\n\t\t\t\tremove(nameLabels[i]);\n\t\t\t\tremove(nameFields[i]);\n\t\t\t}\n\t\t\t//Add all fields needed\n\t\t\tfor (int i = 0; i < currentNumberofPlayers; i++) {\n\t\t\t\tadd(nameLabels[i], \"cell 2 \" + row + \", alignx center\");\n\t\t\t\tadd(nameFields[i], \"cell 2 \" + row + \", alignx left, alignx center\");\n\t\t\t\trow++;\n\t\t\t}\n\n\t\t\tthis.revalidate();\n\t\t\trepaint();\n\t\t}\n\t}", "private void wins(Player player){\n int win = 1;\n player.setWins(win);\n }", "public final void setN(final int koko) {\r\n this.n = koko;\r\n }", "public void setWins(int value) {\n this.wins = value;\n }", "public int playersCount(){\r\n\t\treturn players.size();\r\n\t}", "public void setPlayers(Player[] players) {\n this.players = players;\n }", "public int numPlayers() {\n return playerList.size();\n }", "public void setPlayers(){\n System.out.println();\n System.out.println(\"First, please enter the number of players:\");\n Scanner sc = new Scanner(System.in);\n int number;\n\n while(true){\n try {\n number = sc.nextInt();\n if(number > maxPlayer || number < minPlayer){\n System.out.println(\"Please enter a number between \" + minPlayer + \" and \" + maxPlayer+ \":\");\n continue;\n }\n } catch (InputMismatchException e){\n System.out.println(\"Invalid input! Please enter a number between \" + minPlayer + \" and \" + maxPlayer + \":\");\n sc.next();\n continue;\n }\n players = new ArrayList<>(number);\n for(int i = 0; i < number; i ++){\n players.add(new Player(\"Player \" + (i + 1)));\n }\n setNames();\n return;\n }\n }", "public void setMinPlayers(int minPlayers) {\n\t\tthis.minPlayers = minPlayers;\n\t}", "public void setnbMaxJR(int n) {\n // TODO Remove\n //System.err.println(\"MAX PLAYER R \"+n);\n this.maxRealPlayer = n;\n }", "public void setCurrentPlayer(int index){\n this.currentPlayer=index%4;\n }", "private void setLocalPlaylistCount(int val) {\n\t\tref.edit().putInt(COL_LOCAL_PLAYLIST_COUNTER, val).commit();\n\t}", "public void incrementNumberOfShips(int value) {\r\n\t\tnumberOfShips = numberOfShips + value;\r\n\t}", "public void setPlayerNumber(int playerNumber) {\n\t\tthis.playerNumber = playerNumber;\n\t}", "public int numPlayers(){\n return this.members.size();\n }", "public void setUserNumberOfRocks(int number) {\n\t\tfor (int x = 0; x < 14; x++) {\n\t\t\tif (x == 0 || x == 7) {\n\t\t\t\tbucket[x].setnumOfRocks(0, true);\n\t\t\t} else {\n\t\t\t\tbucket[x].setnumOfRocks(number, true);\n\t\t\t}\n\t\t}\n\t}", "public int getNumOfPlayers() {\n\t\treturn playerList.size();\n\t}", "private void increaseCurrentPlayerIndex() {\n\t\tcurrentPlayer++;\n\t\tif(currentPlayer>3)\n\t\t\tcurrentPlayer=0;\n\t}", "public void setNumVotes(int value) {\n this.numVotes = value;\n }", "public void sendNumOpponents(int numPlayers) {\n try {\n dOut.writeInt(numPlayers);\n dOut.flush();\n } catch (IOException e) {\n System.out.println(\"Could not send number of players\");\n e.printStackTrace();\n }\n }", "void setPlayerId(int playerId);", "private int promptNumPlayers() {\r\n Object[] options = {1, 2, 3, 4};\r\n int numPlr = (int) JOptionPane.showInputDialog(\r\n null,\r\n \"How many people are playing?\",\r\n \"Welcome!\",\r\n JOptionPane.PLAIN_MESSAGE,\r\n null,\r\n options,\r\n 1);\r\n\r\n players = new Player[numPlr];\r\n\r\n for (int i = 0; i < numPlr; i++) {\r\n players[i] = new Player();\r\n }\r\n\r\n return numPlr;\r\n }", "public int nrOfPlayers() {\n int playerCount = 0;\n for (Player player : players) {\n if (player.getName() != null) {\n playerCount++;\n }\n }\n\n return playerCount;\n }", "public void setPlayers(Hashtable<Integer, Player> players) {\r\n\t\tthis.players = players;\r\n\t}", "public void setUpPlayers(final JLabel amountOfPlayers){\n\t\tplayers = new Player[amountPlayers];\n\t\ttext = new JTextField[amountPlayers];\n\t\tfor(int i = 0; i < amountPlayers; i++){\n\t\t\tJLabel name = new JLabel(\"Name: \");\n\t\t\tname.setForeground(Color.WHITE);\n\t\t\ttext[i] = new JTextField(\"\",10);\n\t\t\tpanel.add(name);\n\t\t\tpanel.add(text[i]);\n\t\t}\n\t\tpanel.add(Box.createVerticalStrut(100));\n\t\tfinal JButton done = new JButton(\"Start Game\");\n\t\tdone.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstartButton();\n\t\t\t\tpanel.remove(done);\n\t\t\t\tpanel.remove(amountOfPlayers);\n\t\t\t}\n\t\t});\n\t\tpanel.add(done,BorderLayout.SOUTH);\n\t\tframe.revalidate();\n\t\tframe.repaint();\n\t}", "public void setCurrPlayer(int i) {\n if (currPlayer == -1) {\n currPlayer = i;\n }\n }", "public void SZTToEveryOtherPlayer(int value) {\n\t\tfor(Player p:players) {\n\t\t\tif(p!=current) {\n\t\t\t\tp.raiseScore(value);\n\t\t\t}\n\t\t}\n\t}", "public void setNumPoints(int np);", "public void setWins(int wins) {\n if (wins > 0) {\n this.wins = wins;\n }\n }", "@Override\r\n public void givePlayerPoints(int player, int plValuePosition, int points) {\r\n // Incrememnt player values by the points passed in\r\n this.players.get(player).\r\n changePlayerValueNumeric(plValuePosition, points);\r\n }", "@Override\n public void setChosenDeckNumber(int n) {\n gameboardPanel.setChosenDeckNumber(n);\n }", "public void setValue(int n) {\n\t\t\tthis.value = n;\n\t}", "public int countPlayers(){\n return players.size();\n }", "public void increaseTurnCount()\n\t{\n\t\tturnNumber++;\n\t\tthis.currentPlayerID++;\n\t\tthis.currentPlayerID = this.currentPlayerID % this.playerList.size();\n\t}", "public static void setPlayerIntComponent(ServerPlayerEntity serverPlayerEntity, int valueToStore) {\r\n // Set the int value for the given player\r\n SLEEP_TRIES.get(serverPlayerEntity).setValue(valueToStore);\r\n }", "public Builder setN(int value) {\n \n n_ = value;\n onChanged();\n return this;\n }", "public void setMaxPlayers(short maxPlayer) {\n\t\tif (maxPlayer <= 0 || maxPlayer > CommonConstants.MAX_PLAYERS) {\n\t\t\tthrow new IllegalArgumentException(\"Player count must be 1..\" + CommonConstants.MAX_PLAYERS);\n\t\t}\n\n\t\tShortPoint2D[] newPlayerStarts = new ShortPoint2D[maxPlayer];\n\t\tfor (int i = 0; i < maxPlayer; i++) {\n\t\t\tnewPlayerStarts[i] = i < playerCount ? playerStarts[i] : new ShortPoint2D(width / 2, height / 2);\n\t\t}\n\t\tthis.playerCount = maxPlayer;\n\t\tthis.playerStarts = newPlayerStarts;\n\n\t}", "private static void pickNumOfPlayers()\n\t{\n\t\tprintBorder();\n\t\tSystem.out.print(\"Enter 1 for one player or 2 for two player: \");\n\t\tnumOfPlayers = input.nextInt(); // Throws error if input is not an int\n\t\tif (numOfPlayers == 2) isMultiplayer = true;\n\t\tSystem.out.println();\n\t}", "@Override\r\n\tpublic void setNumeroPlayer(int numeroPlayer) {\n\t\tif(!(numeroPlayer>=0 || numeroPlayer<=1))\r\n\t\t\tthrow new PreConditionError(\"Error PreCondition: numeroPlayer>=0 || numeroPlayer<=1\");\r\n\r\n\t\tcheckInvariant();\r\n\r\n\t\tsuper.setNumeroPlayer(numeroPlayer);\r\n\r\n\t\tcheckInvariant();\r\n\r\n\t\t//post: getNumeroPlayer == numeroPlayer\r\n\t\tif(!(getNumeroPlayer()==numeroPlayer))\r\n\t\t\tthrow new PostConditionError(\"Error PostCondition: getNumeroPlayer()==numeroPlayer\");\r\n\t}", "public Builder setPlayerId(long value) {\n \n playerId_ = value;\n onChanged();\n return this;\n }", "public void setWinnumber(int Number) {\n\t\tif (Number != 0) {\n\t\t\tthis.winnumber = winnumber + Number;\n\t\t} else {\n\t\t\tthis.winnumber = 0;\n\t\t}\n\t}", "public int getPlayerCount() {\n\t\treturn playerCount;\n\t}", "public void setPlayers(ArrayList<Player> players) {\n this.players = players;\n }", "public int getPlayerCount() {\n \n \treturn playerCount;\n \t\n }", "public void setRank(int num)\r\n {\r\n //Check if the new rank is less than 0 before setting the new rank \r\n if(num < 0)\r\n {\r\n //Outouts a warning message\r\n System.out.println(\"WARNING:You cannot assign a negative time\");\r\n }\r\n else \r\n {\r\n this.rank = num;\r\n }//end if\r\n }", "public void setNickels(int n)\n {\n\tthis.nickels = n;\n\tchangeChecker();\n }", "public void raiseScoreOfEveryPlayer(int value) {\n\t\tfor(Player p:players) {\n\t\t\tp.raiseScore(value);\n\t\t}\n\t}", "public int getPlayerCount() {\n return 0;\n }", "public void setCount(int value) {\n this.count = value;\n }", "public void setCount(int value) {\n this.count = value;\n }", "public void setCount(int value) {\n this.count = value;\n }", "public void setWins() {\r\n this.wins++;\r\n }", "public void SetNPoints(int n_points);", "public void setPlayers(ArrayList<Player> players) {\n\t\tthis.players = players;\n\t}", "public void setnbMaxJV(int n) {\n this.maxVirtualPlayer = n;\n }", "private void setSpritesCount(int count) {\n this.count = count;\n }", "public int getNumberOfSelectedPlayers() {\n\t\treturn tmpTeam.size();\n\t}", "public void setChosenDeckNumber(int n){\n this.chosenDeckNumber = n;\n }", "public static void setPlayerScore(int score)\r\n\t{\r\n\t\tGame.playerScore = score;\r\n\t}", "public void setAttempts(int value) {\n this.attempts = value;\n }", "public void setNumSeats(int num) {\n numSeats = num;\n }", "public void setRank(int aRank)\n {\n this.ranks = aRank;\n }", "public int playerCount()\r\n\t{\r\n\t\tint count = 0;\r\n\t\tfor(Player player: this.players)\r\n\t\t{\r\n\t\t\tif(player != null)\r\n\t\t\t{\r\n\t\t\t\t++count;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public int returnAndUsePlayerNumber() {\r\n\t\tfor (int no = 1; no < this.playerNumbers.length; no++) {\r\n\t\t\tif (!this.playerNumbers[no]) {\r\n\t\t\t\tthis.playerNumbers[no] = true;\r\n\t\t\t\treturn no;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "public int getMaximumPlayers() {\n return maximumPlayers;\n }", "public void setPlayersPiece(int a_playersPiece) {\n this.playersPiece = a_playersPiece;\n }", "public Builder setPlayerIds(\n int index, long value) {\n ensurePlayerIdsIsMutable();\n playerIds_.set(index, value);\n onChanged();\n return this;\n }", "void setVisiblePlayers() {\n\n switch (team1Players) {\n\n case 6:\n\n tvt1p6.setVisibility(View.VISIBLE);\n\n spnPlayer6.setVisibility(View.VISIBLE);\n\n case 5:\n\n tvt1p5.setVisibility(View.VISIBLE);\n\n spnPlayer5.setVisibility(View.VISIBLE);\n\n case 4:\n\n tvt1p4.setVisibility(View.VISIBLE);\n\n spnPlayer4.setVisibility(View.VISIBLE);\n\n case 3:\n\n tvt1p3.setVisibility(View.VISIBLE);\n\n spnPlayer3.setVisibility(View.VISIBLE);\n\n case 2:\n\n tvt1p2.setVisibility(View.VISIBLE);\n\n spnPlayer2.setVisibility(View.VISIBLE);\n\n case 1:\n\n tvt1p1.setVisibility(View.VISIBLE);\n\n spnPlayer1.setVisibility(View.VISIBLE);\n\n break;\n\n }\n\n }" ]
[ "0.79450196", "0.7935872", "0.7121908", "0.70836014", "0.6782407", "0.66791016", "0.6602108", "0.658758", "0.6534241", "0.65129054", "0.64881283", "0.6472078", "0.6466902", "0.6424133", "0.6422792", "0.63735676", "0.6358204", "0.634661", "0.628081", "0.62726843", "0.6270993", "0.6267756", "0.6247519", "0.62214684", "0.6168744", "0.61528325", "0.6137177", "0.6110862", "0.6108474", "0.6092701", "0.6091375", "0.60737216", "0.6070679", "0.6057054", "0.6056154", "0.60495526", "0.60379833", "0.60334724", "0.59881675", "0.59821546", "0.59808284", "0.5977255", "0.59757054", "0.59736824", "0.59675515", "0.5958586", "0.5953079", "0.5938485", "0.5935553", "0.5924167", "0.59233814", "0.5899127", "0.58981854", "0.589442", "0.58637", "0.5863355", "0.58606744", "0.585986", "0.5859495", "0.58540076", "0.584933", "0.58191365", "0.5803113", "0.57951325", "0.5794735", "0.57821906", "0.57721984", "0.57719797", "0.5766664", "0.5765048", "0.57426244", "0.57410926", "0.57381237", "0.57312196", "0.5730647", "0.572931", "0.5718803", "0.56971854", "0.5695998", "0.56922317", "0.5692185", "0.5692185", "0.5692185", "0.56878024", "0.5675177", "0.56698835", "0.5669501", "0.56673443", "0.5661046", "0.56557614", "0.5653808", "0.5652577", "0.5646204", "0.5637253", "0.56342787", "0.5630627", "0.5625793", "0.56254894", "0.56169266", "0.5614062" ]
0.9028313
0
Creates a listener that updates the nrPlayers value each time the NumberOfPlayers value in the DB is updated.
@Override public void setNrPlayersChangedListener() { database.getReference(gameCodeRef).child("NumberOfPlayers").addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot snapshot) { String value = String.valueOf(snapshot.getValue()); if (!value.equals(null) && !value.equals("null")) { setNrPlayers(Integer.parseInt(value)); } } @Override public void onCancelled(@NonNull DatabaseError error) { Log.w(TAG, "Failed to read value.", error.toException()); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface RoomNbPlayersCallback {\n void onCallback(long value);\n }", "void notifyPlayerChanged(PlayerNumber newPlayer);", "public void getRoomNbPlayersDB(final RoomNbPlayersCallback myCallback, String location) {\n FirebaseDatabase mDatabase = FirebaseDatabase.getInstance();\n DatabaseReference mDbRef = mDatabase.getReference(location);\n RoomsNbPlayersListener = mDbRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n long room_nb_players = 0;\n for (DataSnapshot childrenSnapshot: dataSnapshot.getChildren()) {\n String children_name = childrenSnapshot.getKey();\n if((children_name.equals(\"Player 1\")) || (children_name.equals(\"Player 2\")) || (children_name.equals(\"Player 3\")) || (children_name.equals(\"Player 4\")))\n room_nb_players++;\n }\n myCallback.onCallback(room_nb_players);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n throw databaseError.toException();\n }\n });\n }", "private void updateNrPlayerValues(String target) {\n database.getReference(gameCodeRef).child(target).addListenerForSingleValueEvent(new ValueEventListener()\n {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n String value = String.valueOf(snapshot.getValue());\n if (value.isEmpty() || value == null || value.equals(null) || value.contains(\"null\")){\n startDBValue(target);\n value = \"1\";\n }\n else {\n increaseDBValue(target, Integer.parseInt(value));\n }\n switch (target){\n case \"NumberOfPlayers\":\n break;\n case \"PlayersDoneBrainstorming\":\n checkPlayersDoneBrainstorming(Integer.parseInt(value)+1);\n break;\n case \"PlayersDoneEliminating\":\n checkPlayersDoneEliminating(Integer.parseInt(value)+1);\n break;\n }\n }\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n Log.w(TAG,\"loadGamecode:onCancelled\", error.toException());\n }\n\n });\n }", "@Override\n public void setNrPlayers(int value) {\n this.nrPlayers = value;\n }", "public int incrementPlayersNumber(){//setter/incrementer di numberofplayers chiamato da ServerRoom: qua ho cambiato! è qui che si setta il client id, e il primo della stanza ha id=1 scritta come era prima!\r\n\t\tint idToSend=numberOfPlayers;\r\n\t\tnumberOfPlayers++;\r\n\t\treturn idToSend;\r\n\t}", "public void setNumberOfPlayers(int numberOfPlayers) {\n this.numberOfPlayers = numberOfPlayers;\n }", "public interface IIncrementerListener {\n\n void onUpdate(IIncrementerUpdater updater);\n}", "void registerUpdateListener(IUpdateListener listener);", "public int getNumPlayers(){\n return m_numPlayers;\n }", "void onListenerChanged(ListenerUpdate update);", "void onScoresChanged(int scores);", "@Override\npublic int getNumPlayers() {\n\treturn numPlayer;\n}", "long getListenerCount();", "public interface InsertNewGameRowListener {\n\n public void onNewRowInsertedInDb();\n}", "public void addUpdateListener(StoreUpdateListener listener);", "public static int getNumPlayers(){\n\t\treturn numPlayers;\n\t}", "int getNumOfPlayers() {\n return this.numOfPlayers;\n }", "public void onSaveListen() {\n _gamesList.get(_gamePos).getPlayers().add(playerName);\n // Increment the number of players that have joined the game\n _gamesList.get(_gamePos).setNumPlayers(_gamesList.get(_gamePos).getNumPlayers() + 1);\n\n TextView playersBlock = (TextView) findViewById(R.id.playersBlock);\n playersBlock.setText(\"\");\n List<String> players = _gamesList.get(_gamePos).getPlayers();\n for(int i = 0; i < players.size(); i++) {\n Log.d(\"GamePlayerSize\", Integer.toString(_gamesList.get(_gamePos).getPlayers().size()));\n if (i < players.size() - 1) {\n playersBlock.append(players.get(i) + \", \");\n }\n else {\n // Don't put a comma after the last one\n playersBlock.append(players.get(i));\n }\n }\n\n // Update the shared preferences with the edited game\n SharedPreferences gamesPref = this.getSharedPreferences(GAMES_FILE, MODE_PRIVATE);\n Gson gson = new Gson();\n\n SharedPreferences.Editor prefsEditor = gamesPref.edit();\n\n // Convert the games list into a json string\n String json = gson.toJson(_gamesList);\n Log.d(\"MainActivity\", json);\n\n // Update the _gamesMasterList with the modified _game\n prefsEditor.putString(GAME_KEY, json);\n prefsEditor.commit();\n\n Context context = getApplicationContext();\n CharSequence text = \"You have joined the game!\";\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }", "public interface ParticipantListener {\n void onParticipantsUpdated(UserDao provider, Collection<String> updatedParticipantIds);\n}", "public LogToPlayerSender listenForNewPlayers() {\n plugin.getServer().getPluginManager().registerEvents(this, plugin);\n return this;\n }", "private void registerListener(){\n game.addPropertyChangeListener(PROPERTY_GAME, evt -> {\r\n refresh();\r\n });\r\n }", "@Override\n\tpublic void onUpdate() {\n\t\tlistener.onUpdate();\n\t}", "protected void newPlayersClicked(ActionEvent e) {\n getPlayerNames();\n blackPlayer = 0;\n playerScores[0] = 0;\n playerScores[1] = 0;\n refreshScore();\n updateTurnInfo();\n startNewGame();\n }", "public void onLobby(){\n\t\tif(Bukkit.getPluginManager().isPluginEnabled(\"MVdWPlaceholderAPI\")){\n\t\t\tPlaceholderAPI.registerPlaceholder(SimplePlugin.getPlugin(ArenaPlugin.class), \"build_battle_players\",\n\t\t\t\t\tplaceholderReplaceEvent -> {\n\t\t\t\t\t\tint players = getArena().getPlayers(ArenaJoinMode.PLAYING).size();\n\t\t\t\t\t\treturn Integer.toString(players);\n\t\t\t\t\t});\n\n\t\t\tPlaceholderAPI.registerPlaceholder(SimplePlugin.getPlugin(ArenaPlugin.class), \"build_battle_time\",\n\t\t\t\t\tplaceholderReplaceEvent -> Common.plural(arena.getStartCountdown().getTimeLeft(), \"second\"));\n\n\t\t}\n\t}", "public int getNumPlayers() {\n return numPlayers;\n }", "public interface PlayerListener {\n void onPlayerClicked(PlayerDTO player);\n void onPlayerProfileUpdate(PlayerDTO player);\n void onVideoSession(PlayerDTO player);\n void onNewPlayerRequired();\n }", "@Override\n public void writeNewPlayer(Player player){\n if (gameCodeRef == null){\n throw new IllegalStateException(\"GameRoom is not set\");\n }\n DatabaseReference currentRef = database.getReference(gameCodeRef);\n currentRef.child(\"Players\").child(player.getUsername()).setValue(player.getUsername());\n updateNrPlayerValues(\"NumberOfPlayers\");\n }", "public int addPlayer(PlayerListener player) {\n\t\tfinal int playerID = this.players.size();\n\n\t\tthis.players.add(new Player(\"Player \" + playerID,\n\t\t\t\tgenerateRandomStartLocation(), player));\n\n\t\tif (this.players.size() == 1) {\n\t\t\tstartNewGame();\n\t\t}\n\n\t\treturn playerID;\n\t}", "public void addMessageCountObserver(@NonNull LifecycleOwner owner,\n @NonNull Observer<? super Integer> observer) {\n mNewNotificationCount.observe(owner, observer);\n }", "public void addCoinListener(@Nullable Game game, @Nullable ValueEventListener listener) {\n if (listener == null || game == null) throw new IllegalArgumentException();\n getDatabaseChildOfGame(game, DATABASE_COIN).addValueEventListener(listener);\n }", "public CollectScoresIterationListener() {\n this(1);\n }", "@Override\n\tpublic void addTrigger() {\n\t\tthis.listener = new ObjectListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onEvent(ObjectEvent event) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tRankTempInfo rankInfo = RankServerManager.getInstance().getRankTempInfo(player.getPlayerId());\n\t\t\t\tif(rankInfo!=null){\n\t\t\t\t\tgetTask().updateProcess((int)rankInfo.getSoul());\n\t\t\t\t}\n\t\t\n\t\t\t\t\n\t\t\t}\n\t\t};\n\t\tplayer.addListener(this.listener, EventNameType.SOUL_FIGHT);\n\t}", "public interface GameListener {\n\n /**\n * Called when a player makes a move in the game.\n * @param playerIndex Player identifier\n * @param move Move made\n */\n void moveAdded(int playerIndex, Move move);\n\n /**\n * Called when a move is undone.\n */\n void moveRemoved(Move move);\n\n /**\n * Called when a haslam.blackstone.players turn has started.\n * @param playerIndex Player identifier\n */\n void turnStarted(int playerIndex);\n\n /**\n * Called when the game has started.\n */\n void gameStarted();\n\n /**\n * Called when a previous game is resumed.\n */\n void gameResumed();\n\n /**\n * Called when the game has finished.\n */\n void gameFinished();\n\n /**\n * Called when the game requests a move from the user.\n */\n void userMoveRequested(int playerIndex);\n\n /**\n * Called when a new position is loaded by the user.\n * @param orderedMoves A list of moves made, in order, to assemble the new\n * position.\n */\n void positionLoaded(List<Move> orderedMoves);\n\n /**\n * Called when a position is cleared by the user.\n */\n void positionCleared();\n\n /**\n * Called when the user adds an external player.\n */\n void playerAdded();\n\n}", "public int getNumPlayers(){\n\t\treturn this.players.size();\n\t}", "public int getCurentPlayerNumber() {\n return players.size();\n }", "private void getNumPlayers() {\n\t\tSystem.out.println(\"How many people are playing? (must be between \"+MIN_PLAYERS+\" and \"+MAX_PLAYERS+\")\");\n\t\tnumPlayers = GetInput.getInstance().anInteger(MIN_PLAYERS, MAX_PLAYERS);\n\t}", "public void setPlayerNumber(int num) {\n playerNum = num;\n }", "public void setMinimumPlayers(int nPlayers)\r\n {\n \r\n }", "void addBoardListener(BoardListener boardListener);", "@Override\r\n public void addPlayers(int numberOfPlayers) {\r\n for (int i = 0; i < numberOfPlayers; i++) {\r\n this.addPlayer();\r\n }\r\n }", "@Override\n\tpublic void onPlayerTurnListener() {\n\n\t}", "private ChangeListener createMaxListener()\r\n\t\t{\r\n\t\treturn new ChangeListener()\r\n\t\t\t{\r\n\r\n\t\t\t//called when the max spinner value is changed\r\n\t\t\t@Override\r\n\t\t\tpublic void stateChanged(ChangeEvent e)\r\n\t\t\t\t{\r\n\t\t\t\tint spinMinValue = (int)spinMin.getValue();\r\n\t\t\t\tint spinMaxValue = (int)spinMax.getValue();\r\n\r\n\t\t\t\tif (spinMaxValue <= spinMinValue) { // verify if the max spin goes under the min limit and adjust the value if necessary\r\n\t\t\t\t\tif (--spinMinValue < min)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tspinMax.setValue(spinMaxValue = (spinMinValue=min)+1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tspinMin.setValue(spinMinValue);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (spinMaxValue > spinMinValue) // verify intervals are correct\r\n\t\t\t\t\t{\r\n\t\t\t\t\tdiceBuilder.setInterval(spinMinValue, spinMaxValue);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t};\r\n\r\n\t\t}", "private void initListener()\n {\n listenerTimer = new Timer();\n listenerTimer.schedule(new RemoteListner(this), 1000, 2000);\n }", "void onTimeUpdated(Consumer<Double> listener) {\n timeUpdatedListeners.add(listener);\n }", "protected void listener(Listener listener) {\n Bukkit.getServer().getPluginManager().registerEvents(listener, RedPractice.getInstance());\n }", "public void listen(int UPDATE_VALUE){\n \tif(this.filterType.filter(UPDATE_VALUE)) {\n \t\tthis.setBNumber(this.getBNumber() + UPDATE_VALUE);\n \t}\n }", "public void addGameListListener(GameListListener listener){\r\n super.addGameListListener(listener);\r\n\r\n if (listenerList.getListenerCount(GameListListener.class)==1){\r\n setDGState(Datagram.DG_GAMELIST_BEGIN, true);\r\n setDGState(Datagram.DG_GAMELIST_ITEM, true);\r\n }\r\n }", "public void addListener( DatabaseUpdaterListener listener ) {\n\t\tsynchronized( listeners_ ) {\n\t\t\tif( ! listeners_.contains(listener) ) { \n\t\t\t\tlisteners_.add(listener);\n\t\t\t}\n\t\t}\n\t}", "public void newLobby(ClientHandler firstClient, String nickname, int number) {\n clientToNames.put(firstClient, nickname);\n namesToClient.put(nickname, firstClient);\n nicknames.add(nickname);\n firstClient.setNickname(nickname);\n view.setNamesToClient(nickname, firstClient, false);\n\n firstClient.registerObserver(this);\n view.registerObserver(this);\n\n System.out.println(nickname + \" has joined the lobby number \" + lobbyID);\n\n playersNumber = number;\n\n System.out.println(\"The lobby number \"+ lobbyID +\" will contain \" + playersNumber + \" players\");\n\n view.waitingRoom(firstClient);\n\n firstClient.send(new InitialSetup());\n }", "public ObjectTracker(){\n NetworkTableInstance inst = NetworkTableInstance.getDefault(); \n monsterVision = inst.getTable(\"MonsterVison\");\t\n \n // monsterVision.addEntryListener(\n // \"ObjectTracker\",\n // (monsterVision, key, entry, value, flags) -> {\n // System.out.println(\"ObjectTracker changed value: \" + value.getValue());\n // }, \n // EntryListenerFlags.kNew | EntryListenerFlags.kUpdate);\n\n \n }", "void addServerStoredGroupChangeListener(ServerStoredGroupListener listener);", "public int getNumOfPlayers() {\n\t\treturn numOfPlayers;\n\t}", "public void setListener(NumberCellGeneratorListener listener) {\n mListener = listener;\n }", "void playerPositionChanged(Player player);", "@Override\n\tpublic void onChildChanged(DataSnapshot arg0, String arg1) {\n\t\tPlayerData data = arg0.getValue(PlayerData.class);\n\t\tPlayer p = new Player((int)data.getX(), (int)data.getY(), 50, 50);\n\t\tp.setUp(data.getUp());\n\t\tp.setDown(data.getDown());\n\t\tp.setLeft(data.getLeft());\n\t\tp.setRight(data.getRight());\n\t\tp.setHealth(data.getHealth());\n\t\tif(data.getSwing() == true) {\n\t\t\tp.setSwing();\n\t\t}\n\t\tplayers.set(Integer.parseInt(arg0.getKey()), p);\n\t}", "public void setPlayerNumber(int playerNumber) {\n this.playerNumber = playerNumber;\n }", "public void addUpdateListener(Consumer<List<S>> listener) {\n updateListeners.add(listener);\n }", "public int getNumPlayers() {\n\n\t\treturn this.playerCount;\n\t}", "public int getSize(){\r\n\t\treturn listeners.size();\r\n\t}", "public void configureSocketEvents() {\n socket.on(\"startGame\", new Emitter.Listener() {\n @Override\n public void call(Object... args) {\n JSONObject data = (JSONObject) args[0];\n\n try {\n String start = (String) data.getString(\"room\");\n if (start.equals(roomHost)) {\n startGame = true;\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }).on(\"playerNames\", new Emitter.Listener() {\n @Override\n public void call(Object... args) {\n JSONArray data = (JSONArray) args[0];\n try {\n\n for (int i = 0; i < data.length(); i++) {\n playerNames[i] = (String) data.getString(i);\n }\n for (int i = data.length(); i < maxPlayers; i++) {\n playerNames[i] = \"Empty\";\n }\n updateNames();\n } catch (JSONException e) {\n Gdx.app.log(\"multiplayer\", \"unable to update names\");\n }\n }\n }).on(\"maxPlayers\", new Emitter.Listener() {\n @Override\n public void call(Object... args) {\n JSONObject data = (JSONObject) args[0];\n try {\n maxPlayers = (int) data.getInt(\"maxPlayers\");\n } catch (JSONException e) {\n Gdx.app.log(\"multiplayer\", \"unable to get max players\");\n }\n }\n }).on(\"lobbyUpdate\", new Emitter.Listener() {\n @Override\n public void call(Object... args) {\n JSONObject data = (JSONObject) args[0];\n try {\n String room = (String) data.getString(\"id\");\n if (room.equals(roomHost)) {\n updateLobby();\n }\n } catch (JSONException e) {\n Gdx.app.log(\"multiplayer\", \"unable to get max players\");\n }\n }\n }).on(\"roomCanceled\", new Emitter.Listener() {\n @Override\n public void call(Object... args) {\n JSONObject data = (JSONObject) args[0];\n try {\n String room = (String) data.getString(\"roomid\");\n if (room.equals(roomHost)) {\n mainmenu = true;\n }\n } catch (JSONException e) {\n Gdx.app.log(\"multiplayer\", \"unable to get max players\");\n }\n }\n });\n }", "@Override\r\n\tpublic void onChannelOnlineCount(LinkedHashMap<String, Integer> online)\r\n\t{\n\t\tif (channelListener != null)\r\n\t\t{\r\n\t\t\tchannelListener.onChannelOnlineCount(online);\r\n\t\t}\r\n\t}", "public static void setPlayerCount(int playerCount) {\n PLAYER_COUNT = playerCount;\n }", "public interface OnTieGeneratedListener {\n\t public void onTieGenerated(Tie tie);\n\t }", "public ChessclubJinListenerManager(JinChessclubConnection source){\r\n super(source);\r\n\r\n this.source = source;\r\n }", "private void dbListeners() {\n // Set if image+text is being worked on currently\n //================================================\n mBeingWorkedOnListener = new ValueEventListener() {\n @Override\n public void onDataChange(final DataSnapshot dataSnapshot) {\n new AsyncTask<Void, Void, String>() {\n @Override\n protected String doInBackground(Void... voids) {\n return dataSnapshot.getValue(String.class);\n }\n\n @Override\n protected void onPostExecute(String s) {\n beingWorkedOn = s;\n }\n }.execute();\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n };\n\n dGlobalRef.child(\"beingWorkedOn\").addValueEventListener(mBeingWorkedOnListener);\n }", "public int getWinner() {\n for (int i = 0; i < nrOfPlayers(); i++) {\n if (players.get(i).isFinished()) {\n\n // PLAYERLISTENER : Trigger playerEvent for player that WON\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, players.get(i).getColour(), PlayerEvent.WON);\n listener.playerStateChanged(event);\n }\n return i;\n }\n }\n return -1;\n }", "void addListener(GameEventListener listener);", "public void addListener(int userID, int epoch, int listenerPort, String listenerType, int listenerid) {\n\t\tListener e = new Listener(userID, epoch, listenerPort, listenerType, listenerid);\n\t\tlisteners.add(e);\n\t}", "private int createAndAddLobby(int maxPlayers, String lobbyName, int trackID){\n\n\t\tDebugOutputHandler.printDebug(\"A new Lobby has been created\");\n\t\tLobby newLobby = new Lobby(++lobbyIdCounter, maxPlayers, lobbyName, trackID, this);\n\t\tif(lobbyMap.get(lobbyIdCounter) == null){\n\t\t\tlobbyMap.put(lobbyIdCounter, newLobby);\n\t\t\treturn lobbyIdCounter;\n\t\t}else{\n\t\t\treturn -1;\n\t\t}\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n roomName = roomsList.get(position);\n // Adding the player to an existing room: he will be player 2,3, or 4 depending on how many players already joined the room\n getRoomNbPlayersDB(new RoomChoice.RoomNbPlayersCallback() {\n @Override\n public void onCallback(long room_nb_players) {\n // Once the player has joined the room, this code will be run again as the DB has been modified\n // To avoid the player being registered inside the room multiple times, we check the boolean\n if((room_nb_players ==1) && (player_joined[0] == false)){\n writeStringDB(playerName,\"rooms/\" + roomName + \"/Player 2\" + \"/Name\");\n player_joined[0] = true; // The boolean must be an array to work inside this callback (no idea why?)\n Intent intent = new Intent(getApplicationContext(), WaitingRoom.class);\n intent.putExtra(\"roomName\", roomName);\n intent.putExtra(\"playerID\",2);\n startActivity(intent);\n finish();\n }else if ((room_nb_players ==2) && (player_joined[0] == false)){\n writeStringDB(playerName,\"rooms/\" + roomName + \"/Player 3\" + \"/Name\");\n player_joined[0] = true;\n Intent intent = new Intent(getApplicationContext(), WaitingRoom.class);\n intent.putExtra(\"roomName\", roomName);\n intent.putExtra(\"playerID\",3);\n startActivity(intent);\n finish();\n }else if ((room_nb_players ==3) && (player_joined[0] == false)){\n writeStringDB(playerName,\"rooms/\" + roomName + \"/Player 4\" + \"/Name\");\n player_joined[0] = true;\n Intent intent = new Intent(getApplicationContext(), WaitingRoom.class);\n intent.putExtra(\"roomName\", roomName);\n intent.putExtra(\"playerID\",4);\n startActivity(intent);\n finish();\n }else {\n //Message.message(getApplicationContext(), \"Player 1 doesn't want to play with you\");\n }\n }\n },\"rooms/\" + roomName);\n }", "int getNumberOfPlayers(){\n return players.size();\n }", "private void leaderboardBtnListener() {\n leaderboardBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new LeaderboardScreen(game));\n }\n });\n }", "public int countPlayers(){\n return players.size();\n }", "public void increaseTurnCount()\n\t{\n\t\tturnNumber++;\n\t\tthis.currentPlayerID++;\n\t\tthis.currentPlayerID = this.currentPlayerID % this.playerList.size();\n\t}", "public void newPlayer() {\r\n\t\tthis.nbMonster ++;\r\n\t\tthis.nbPlayer ++;\r\n\t}", "@Override\r\n\t\tpublic ApplicationListener createApplicationListener() {\n\t\t\treturn new FishchickenGame();\r\n\t\t}", "public int playersCount(){\r\n\t\treturn players.size();\r\n\t}", "@Override\n\tprotected void onOpen() {\n\t\tconnectionStore.addUpdateListener(this);\n\t\tupdateOptions();\n\t}", "public interface GpsUpdateListener\n {\n public void onGpsUpdate(GpsRecord gpsRecord);\n public void onClientConnected(String clientId);\n public void onClientDisconnected(String clientId);\n }", "public interface DatabaseListener {\n\n void databaseChanged(DatabaseEvent databaseEvent);\n\n}", "public void bind(ChangeListener listener) {\n mChangeObserver.add(listener);\n }", "@Override\n public void onCallback(long room_nb_players) {\n if((room_nb_players ==1) && (player_joined[0] == false)){\n writeStringDB(playerName,\"rooms/\" + roomName + \"/Player 2\" + \"/Name\");\n player_joined[0] = true; // The boolean must be an array to work inside this callback (no idea why?)\n Intent intent = new Intent(getApplicationContext(), WaitingRoom.class);\n intent.putExtra(\"roomName\", roomName);\n intent.putExtra(\"playerID\",2);\n startActivity(intent);\n finish();\n }else if ((room_nb_players ==2) && (player_joined[0] == false)){\n writeStringDB(playerName,\"rooms/\" + roomName + \"/Player 3\" + \"/Name\");\n player_joined[0] = true;\n Intent intent = new Intent(getApplicationContext(), WaitingRoom.class);\n intent.putExtra(\"roomName\", roomName);\n intent.putExtra(\"playerID\",3);\n startActivity(intent);\n finish();\n }else if ((room_nb_players ==3) && (player_joined[0] == false)){\n writeStringDB(playerName,\"rooms/\" + roomName + \"/Player 4\" + \"/Name\");\n player_joined[0] = true;\n Intent intent = new Intent(getApplicationContext(), WaitingRoom.class);\n intent.putExtra(\"roomName\", roomName);\n intent.putExtra(\"playerID\",4);\n startActivity(intent);\n finish();\n }else {\n //Message.message(getApplicationContext(), \"Player 1 doesn't want to play with you\");\n }\n }", "private void updateDB() {\r\n //if(!m_state.isEndingGame()) return;\r\n if(m_connectionName == null || m_connectionName.length() == 0 || !m_botAction.SQLisOperational()) {\r\n m_botAction.sendChatMessage(\"Database not connected. Not updating scores.\");\r\n return;\r\n }\r\n\r\n for(KimPlayer kp : m_allPlayers.values()) {\r\n try {\r\n m_botAction.SQLQueryAndClose(m_connectionName\r\n , \"INSERT INTO tblJavelim (fcName,fnGames,fnKills,fnDeaths) \"\r\n + \"VALUES ('\" + Tools.addSlashes(kp.m_name) + \"',1,\" + kp.m_kills + \",\" + kp.m_deaths + \") \"\r\n + \"ON DUPLICATE KEY UPDATE fnGames = fnGames + 1, fnKills = fnKills + VALUES(fnKills), fnDeaths = fnDeaths + VALUES(fnDeaths)\");\r\n } catch(SQLException e) {\r\n Tools.printStackTrace(e);\r\n }\r\n }\r\n\r\n if(m_mvp != null) {\r\n try {\r\n m_botAction.SQLQueryAndClose(m_connectionName\r\n , \"UPDATE tblJavelim SET fnMVPs = fnMVPs + 1 WHERE fcName='\" + Tools.addSlashes(m_mvp.m_name) + \"'\");\r\n } catch(SQLException e) {\r\n Tools.printStackTrace(e);\r\n }\r\n }\r\n\r\n if(m_winner != null && m_winner.size() != 0) {\r\n for(KimPlayer kp : m_winner) {\r\n try {\r\n m_botAction.SQLQueryAndClose(m_connectionName\r\n , \"UPDATE tblJavelim SET fnWins= fnWins + 1 WHERE fcName='\" + Tools.addSlashes(kp.m_name) + \"'\");\r\n } catch(SQLException e) {\r\n Tools.printStackTrace(e);\r\n }\r\n }\r\n }\r\n }", "@Subscribe\n public void onEvent(Change_Username event) {\n textView_player.setText(\"Welcome \"+event.getUsername());\n data.setUsername(event.getUsername());\n app.save();\n\n }", "public interface UpgradeListener {\n\tpublic void upgradeSpawned(int x, int y, String color, String MPID);\n\n\tpublic void upgradePickedUp(int PosAtList, String MPID);\n}", "public interface callbackUserScoreForAdmin {\n void onCallback(Score score, ArrayList<User> usersList, int position);\n }", "private void addUserChangeListener(){\n mDatabaseRef.child(userId).addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n User user = dataSnapshot.getValue(User.class);\n\n loggedInUser = user;\n\n playerText.setText(loggedInUser.email+\"vs. \"+loggedInUser.opponentEmail);\n if (user.myGame.gameInProgress == false && user.currentlyPlaying == true){\n if (loggedInUser.myGame.currentLetter.equals(\"X\")){\n //populates the gameBoard array,swapping x with y\n gameBoard[user.myGame.currentMove]=2;\n printMove(user.myGame.currentMove,\"O\");\n }else{\n gameBoard[user.myGame.currentMove] = 1;\n printMove(user.myGame.currentMove,\"X\");\n }\n //remove all of the buttons\n removeAllButtons();\n\n //make sure we draw a the line\n if(checkGameWon() == 0){\n checkTie();\n\n //initialize game values\n mDatabaseRef.child(loggedInUser.myId).child(\"myGame\").child(\"gameInProgress\").setValue(false);\n mDatabaseRef.child(loggedInUser.myId).child(\"myGame\").child(\"currentlyPlaying\").setValue(false);\n\n mDatabaseRef.child(loggedInUser.opponentId).child(\"myGame\").child(\"gameInProgress\").setValue(false);\n mDatabaseRef.child(loggedInUser.opponentId).child(\"myGame\").child(\"currentlyPlaying\").setValue(false);\n //initialize each user opponents\n mDatabaseRef.child(loggedInUser.myId).child(\"opponentId\").setValue(\"\");\n mDatabaseRef.child(loggedInUser.myId).child(\"opponentEmail\").setValue(\"\");\n\n mDatabaseRef.child(loggedInUser.opponentId).child(\"opponentId\").setValue(\"\");\n mDatabaseRef.child(loggedInUser.opponentId).child(\"opponentEmail\").setValue(\"\");\n\n Toast.makeText(GameActivity.this,\"Game Is Over\",Toast.LENGTH_LONG).show();\n\n\n }\n //if my turn,draw board and enable buttons\n else if(user.myGame.currentTurn.equals(user.myId)){\n turn.setText(\"Your Turn to make a move\");\n //make sure there was a move\n if (user.myGame.currentMove != -1){\n if (loggedInUser.myGame.currentLetter.equals(\"X\")){\n //populates the gameboard array\n gameBoard[user.myGame.currentMove] = 2;\n printMove(user.myGame.currentMove,\"O\");\n }else{\n gameBoard[user.myGame.currentMove] = 1;\n printMove(user.myGame.currentMove,\"X\");\n }\n //re-enable buttons\n updateButtons();\n }\n }else//not my turn\n {\n turn.setText(\"Waiting for other player\");\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "private void updatePlayersStatus() {\n PlayerModel[] playersInLobby = this.lobbyModel.getPlayersInLobby();\n int i = 0;\n for (; i < playersInLobby.length; i++) {\n final PlayerModel playerInLobby = playersInLobby[i];\n final TextField playerStatus = this.playersStatus[i];\n playerStatus.setColor(playerInLobby.isReady() ? Color.GREEN : Color.RED);\n playerStatus.setText(playerInLobby.getUsername());\n playerInLobby.clearPropertyChangeListeners();\n this.addPropertyChangeListener(playerInLobby, new PropertyChangeListener() {\n @Override\n public void propertyChange(PropertyChangeEvent evt) {\n String propertyName = evt.getPropertyName();\n if (propertyName.equals(\"username\")) {\n playerStatus.setText((String) evt.getNewValue());\n } else if (propertyName.equals(\"ready\")) {\n playerStatus.setColor((boolean) evt.getNewValue() ? Color.GREEN : Color.RED);\n }\n }\n });\n if (i >= 1 && this.host) {\n TextButton kickButton = kickButtons[i - 1];\n kickButton.clearListeners();\n kickButton.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent e, float x, float y) {\n Connection connection = ConnectionManager.getInstance().getConnection();\n if (connection instanceof ServerConnection) {\n UUID playerUUID = playerInLobby.getPlayerUUID();\n ServerSenderReceiver client = ((ServerConnection) connection).getClientByUUID(playerUUID);\n if (client != null) {\n connection.sendPacket(new KickPlayerPacket(playerUUID));\n ((ServerConnection) connection).removeClient(client);\n connection.getPlayer().getLobby().removePlayer(client.getPlayer());\n }\n }\n }\n });\n kickButton.setDisabled(false);\n }\n }\n for (int j = i; j < this.playersStatus.length; j++) {\n final TextField playerStatus = this.playersStatus[j];\n playerStatus.setColor(Color.RED);\n playerStatus.setText(\"\");\n if (j >= 1 && this.host) {\n TextButton kickButton = kickButtons[j - 1];\n kickButton.clearListeners();\n kickButton.setDisabled(true);\n }\n }\n }", "public synchronized void addProgressListener (ProgressListener lsnr) {\n if (listeners == null) {\n listeners = new java.util.Vector();\n }\n listeners.addElement(lsnr);\n }", "public static void playerWonInc(){\r\n\t\t_playerWon++;\r\n\t}", "boolean notifyWhenReady(int playerNr);", "public int getNumOfPlayers() {\n\t\treturn playerList.size();\n\t}", "public int numPlayers(){\n return this.members.size();\n }", "public void initialiseMatch(int numberOfPlayers) {\n\n maxPlayer = numberOfPlayers;\n List<Worker> list = new ArrayList<>();\n\n Board board = new Board();\n setBoard(board);\n\n for (int i = 0; i < numberOfPlayers; i++) {\n onlinePlayers.add(new Player());\n }\n for (PlayerInterface playerInterface : onlinePlayers) {\n for (int i = 0; i < 2; i++, counterId++) {\n Worker worker = new Worker(counterId);\n worker.setColor(color.get(0));\n worker.setPlayerWorker(playerInterface);\n list.add(worker);\n }\n color.remove(0);\n stateList.add(new AddNickname(playerInterface, this));\n playerInterface.setWorkerRef(list);\n playerInterface.setBoard(board);\n list.clear();\n }\n initialiseGodList();\n\n }", "public interface Listener {\n\n /** Called when the tracked downloads changed. */\n void onDownloadsChanged();\n }", "public interface Listener {\n\n /** Called when the tracked downloads changed. */\n void onDownloadsChanged();\n }", "@Override\n\tpublic int changeNumOfParticipants() {\n\t\treturn 0;\n\t}", "public synchronized void setNumberOfServers(int num) {\n\t\tif(num != this.numServers) {\n\t\t\tthis.updating = true;\n\t\t\tthis.prevNumServers = this.numServers;\n\t\t\tthis.numServers = num;\n\t\t\tthis.rehashUsers();\n\t\t\tthis.updating = false;\n\t\t\tthis.notifyAll();\n\t\t}\n\t}", "public void addSkyModelUpdateListener(SkyModelUpdateListener l) throws RemoteException {\n\t\tif (listeners.contains(l))\n\t\t\treturn;\n\n\t\t// note current time\n\n\t\t// find all archived data from now-1 hour to now\n\n\t\t// send data to new listener\n\n\t\t// add new listener to new list\n\t\tslogger.create().info().level(2).msg(\"Received request to add new listener: \" + l).send();\n\t\taddListeners.add(l);\n\t}" ]
[ "0.62660444", "0.6188508", "0.5873412", "0.5813658", "0.5809205", "0.57569987", "0.57261324", "0.5615186", "0.55521464", "0.55357605", "0.55102605", "0.5456137", "0.54458517", "0.5439049", "0.5434233", "0.5420355", "0.5388777", "0.5373996", "0.5361637", "0.5360676", "0.5351637", "0.53446", "0.5335098", "0.53172183", "0.53079146", "0.5296763", "0.52912384", "0.52572066", "0.52456814", "0.52258563", "0.5208856", "0.51934004", "0.51929104", "0.518556", "0.5167303", "0.51630396", "0.5155601", "0.51525766", "0.5144029", "0.51436746", "0.51287353", "0.51227576", "0.5110863", "0.5108984", "0.5104946", "0.51024574", "0.5098754", "0.50962365", "0.5087504", "0.5067889", "0.5064496", "0.5064032", "0.50615734", "0.50599307", "0.5059016", "0.50370497", "0.503011", "0.5029871", "0.5011797", "0.50075966", "0.49967033", "0.49899906", "0.49890622", "0.4982459", "0.4980735", "0.4979442", "0.4978056", "0.49770015", "0.49628237", "0.4961644", "0.49611384", "0.4949407", "0.4942186", "0.49388224", "0.4935531", "0.49282616", "0.49232626", "0.49131143", "0.49107096", "0.49081644", "0.4907696", "0.4898114", "0.4896368", "0.48958233", "0.48954844", "0.4890798", "0.48884583", "0.48864457", "0.48799878", "0.48754027", "0.48717606", "0.4871445", "0.48693326", "0.48613137", "0.4859627", "0.485458", "0.485458", "0.48496535", "0.48473665", "0.48452747" ]
0.70268005
0
Adds a new player to the database, and increases the number of players
@Override public void writeNewPlayer(Player player){ if (gameCodeRef == null){ throw new IllegalStateException("GameRoom is not set"); } DatabaseReference currentRef = database.getReference(gameCodeRef); currentRef.child("Players").child(player.getUsername()).setValue(player.getUsername()); updateNrPlayerValues("NumberOfPlayers"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void addingNewPlayer(){\r\n\t\t//hard code each score includng a total.\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\t\tSystem.out.println(\"Enter the name of the Player?\");\r\n\t\t\t\t\tString name = scan.next();\r\n\t\t\t\t\t\r\n\t\t\t//establishing the connection\r\n\t\t\tstatement = connection.createStatement();\r\n\t\t\t\r\n\t\t\t//inserting the quries assign to the String variables\r\n\t\t\tString query=\"insert into \" + tableName + \" values ('\" + name +\"', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\";\t\t\r\n\t\t\t\r\n\t\t\t//inserting the hard coded data into the table of the datbase\r\n\t\t\tstatement.execute(query);\r\n\t\t\t\r\n\t\t\t//closing the statement\r\n\t\t\tstatement.close();\r\n\t\t\t\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t System.out.println(\"SQL Exception occurs\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public void addPlayer(Player player) {\n //int id = Repository.getNextUniqueID();\n this.player = player;\n }", "public void addPlayer(String name) {\n if (nrOfPlayers() < 4) {\n players.add(new Player(name, nrOfPlayers() + 1));\n this.status = \"Initiated\";\n } else {\n throw new NoRoomForMorePlayersException();\n }\n }", "public void addPlayer(Player player){\n players.add(player);\n }", "@Override\r\n\tpublic Player add(final Player player) {\r\n\t\tfinal String sql = \"insert into player (playerid, name, balance, updated, deleted) values (?,?,?,?,?)\";\r\n\r\n\t\ttry {\r\n\t\t\tKeyHolder keyHolder = new GeneratedKeyHolder();\r\n\t\t\tjdbcTemplate.update(\r\n\t\t\t\t\tnew PreparedStatementCreator() {\r\n\t\t\t\t\t\tpublic PreparedStatement createPreparedStatement(Connection connection) throws SQLException {\r\n\t\t\t\t\t\t\tPreparedStatement ps = connection.prepareStatement(sql, new String[] {\"id\"});\r\n\t\t\t\t\t\t\tps.setString(1, player.getPlayerId());\r\n\t\t\t\t\t\t\tps.setString(2, player.getName());\r\n\t\t\t\t\t\t\tps.setDouble(3, player.getBalance());\r\n\t\t\t\t\t\t\tps.setTimestamp(4, CommonUtils.getCurrentTimestamp());\r\n\t\t\t\t\t\t\tps.setBoolean(5, false);;\r\n\t\t\t\t\t\t\treturn ps;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tkeyHolder);\r\n\t\t\tplayer.setId(keyHolder.getKey().longValue());\r\n\t\t\treturn player;\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(e.getMessage(), e);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Test\n public void testaddPlayer() {\n session.addPlayer(new Player(\"127.0.0.1\", \"Lars\"));\n // Test if the size of the list now is 2.\n assertEquals(2, session.getPlayers().size());\n }", "void addPlayer(Player newPlayer);", "@Override\r\n public void addPlayers(int numberOfPlayers) {\r\n for (int i = 0; i < numberOfPlayers; i++) {\r\n this.addPlayer();\r\n }\r\n }", "public void newPlayer() {\r\n\t\tthis.nbMonster ++;\r\n\t\tthis.nbPlayer ++;\r\n\t}", "private Player addNewPlayer(String username) {\n if (!playerExists(username)) {\n Player p = new Player(username);\n System.out.println(\"Agregado jugador \" + username);\n players.add(p);\n return p;\n }\n return null;\n }", "public void addPlayerToTheList(){\n \tif(!txtFieldPlayerName.getText().trim().isEmpty() && totPlayers <= maximumPlayersAllowed){\n\t\t\t\n \t\t//creates a new Player and adds the name that the user inputs from the textField\n\t\t\tplayer.add(new Player(txtFieldPlayerName.getText()));\n\t\t\n\t\t\tString playerName = \"\";\n\t\t\tint playerNr = 1;\n\t\t\t\n\t\t\tfor(Player p : player){\n\t\t\t\tplayerName += playerNr+\": \"+p.getName()+\"<br>\"; \n\t\t\t\tplayerNr++;\n\t\t\t}\n\t\t\t\n\t\t\ttotPlayers++;\n\t\t\tlblPlayerList.setText(\"<html><h2>PLAYER LIST</h2>\"+playerName+\"</html>\");\n\t\t\ttxtFieldPlayerName.setText(\"\");\n\t\t}\n\t\t\n\t\tif(totPlayers >= minimumPlayersAllowed){\n\t\t\tbtnPlay.setEnabled(true);\n\t\t}\n\t\t\n\t\tif(totPlayers >= maximumPlayersAllowed){\n\t\t\tbtnAddPlayer.setEnabled(false);\n\t\t\ttxtFieldPlayerName.setEnabled(false);\n\t\t}\n }", "public void addPlayerToTable(Player player){\n\t\tgamePlayers.add(player);\n\t}", "public void insertPlayer(TennisPlayer p) throws TennisDatabaseException {\n\t\t\n\t\tthis.root = insertPlayerRec(this.root, p);\n\t\t\n\t\tplayerCount++;\n\t\t\n\t}", "@RequestMapping(method = RequestMethod.POST, value = \"/players/{playerName}\")\n public void addPlayer(@PathVariable String playerName) {\n playerService.addPlayer(playerName);\n }", "public synchronized void addPlayer(PlayerHandler player) {\n\n if (activePlayers < numMaxPlayers) {\n\n players[activePlayers] = player;\n System.out.println(player.getName() + \" added to game as player \" + (activePlayers + 1));\n activePlayers++;\n return;\n }\n\n System.out.println(\"This room (\" + this.toString() + \") is full\");\n }", "public void addPlayerToPlayers(String username) throws IOException{\r\n\t\tScanner readPlayers = new Scanner(new BufferedReader(new FileReader(\"players.txt\")));\r\n\t\tint numberOfPlayers = readPlayers.nextInt();\r\n\t\tif(numberOfPlayers == 0) { // no need to store data to rewrite\r\n\t\t\ttry {\r\n\t\t\t\tFileWriter writer = new FileWriter(\"players.txt\");\r\n\t\t\t\tBufferedWriter playerWriter = new BufferedWriter(writer);\r\n\t\t\t\tnumberOfPlayers++;\r\n\t\t\t\tInteger numPlayers = numberOfPlayers; // allows conversion to string for writing\r\n\t\t\t\tplayerWriter.write(numPlayers.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(numPlayers.toString()); // write userId as 1 because only 1 player\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(username);\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.close();\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) {\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t/* Store all current usernames and userIds in a directory to rewrite to file */\r\n\t\t\tPlayerName[] directory = new PlayerName[numberOfPlayers];\r\n\t\t\t\r\n\t\t\tfor(int index = 0; index < numberOfPlayers; index++) {\r\n\t\t\t\tPlayerName playerName = new PlayerName();\r\n\t\t\t\tplayerName.setUserId(readPlayers.nextInt());\r\n\t\t\t\tplayerName.setUserName(readPlayers.next());\r\n\t\t\t\tdirectory[index] = playerName;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treadPlayers.close();\r\n\t\t\t/* Add a new player */\r\n\t\t\ttry {\r\n\t\t\t\tnumberOfPlayers++;\r\n\t\t\t\tFileWriter writer = new FileWriter(\"players.txt\");\r\n\t\t\t\tBufferedWriter playerWriter = new BufferedWriter(writer);\r\n\t\t\t\tInteger numPlayers = numberOfPlayers; // allows conversion to string for writing\r\n\t\t\t\tplayerWriter.write(numPlayers.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\"); // maintains format of players.txt\r\n\t\t\t\t\r\n\t\t\t\tfor(int index = 0; index < numberOfPlayers - 1; index++) { // - 1 because it was incremented\r\n\t\t\t\t\tInteger nextId = directory[index].getUserId();\r\n\t\t\t\t\tplayerWriter.write(nextId.toString());\r\n\t\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\t\tplayerWriter.write(directory[index].getUserName());\r\n\t\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tInteger lastId = numberOfPlayers;\r\n\t\t\t\tplayerWriter.write(lastId.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(username);\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.close();\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) {\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treadPlayers.close();\r\n\t}", "public int addPlayer(PlayerListener player) {\n\t\tfinal int playerID = this.players.size();\n\n\t\tthis.players.add(new Player(\"Player \" + playerID,\n\t\t\t\tgenerateRandomStartLocation(), player));\n\n\t\tif (this.players.size() == 1) {\n\t\t\tstartNewGame();\n\t\t}\n\n\t\treturn playerID;\n\t}", "public void addPlayer(Player player) {\n playerList.add(player);\n }", "public void addNewPlayer(Player p) {\n\t\t// if the player don't exists in the highscore list the player is added\n\t\tif(p.getType() == PlayerType.Agent) {\n\t\t\tif(highscore.get(p.getName()) == null) {\n\t\t\t\thighscore.put(p.getName(), 0);\n\t\t\t}\n\t\t}\n\t\tthis.playerList.add(p); \n\t}", "@Override\n \tpublic void createAndAddNewPlayer( int playerID )\n \t{\n \t\t//add player with default name\n \t\tPlayer newPlayer = new Player( playerID, \"Player_\"+playerID );\n \t\tgetPlayerMap().put( playerID, newPlayer );\n \t}", "public void addPlayer(String p) {\n this.playersNames.add(p);\n }", "public void addPlayer(String name) {\n players.add(new Player(name));\n }", "@Override\n public void addPlayer(Player player) {\n\n if(steadyPlayers.size()>0){\n PlayersMeetNotification.firePropertyChange(new PropertyChangeEvent(this, \"More than one Player in this Panel\",steadyPlayers,player));\n }\n steadyPlayers.add(player);\n\n }", "public void insertPlayer(Player player, int idTeam) {\n\t\ttry {\n\t\t\tStatement statement = null;\n\t\t\tconnection = connector.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\tjava.sql.Date pDate = new java.sql.Date(player.getDateOfBirth().getTime());\n\t\t\tString insertPlayer_sql = \"INSERT INTO \" + player_table\n\t\t\t\t\t+ \" (id, idTeam, name, lastname, dateOfBirth, height)\" + \"VALUES (NULL, \" + idTeam + \", '\"\n\t\t\t\t\t+ player.getName() + \"' , '\" + player.getLastname() + \"' , '\" + pDate + \"' , '\" + player.getHeight()\n\t\t\t\t\t+ \"')\";\n\t\t\tstatement.executeUpdate(insertPlayer_sql);\n\t\t} catch (SQLException e) {\n\t\t\tif (e.getErrorCode() == MYSQL_DUPLICATE_PK) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\t\t\t\talert.setHeaderText(\"Duplicity Error\");\n\t\t\t\talert.setContentText(\"This player is already in our database\");\n\t\t\t\talert.showAndWait();\n\t\t\t} else {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "public void addPlayer(String name) {\n\t\tcreateGameLobbyController.addPlayerToList(name);\n\t}", "public int addPlayer(String name) {\n\t\tUser user = users.get(userTurn);\n\t\tFootballPlayer player = market.findPlayer(name);\n\t\tdouble marketValue = player.getMarketValue();\n\t\tSystem.out.println(\"budget before buy\" + user.getBudget());\n\t\t\n\t\tif(tmpTeam.containsPlayer(name)) {\n\t\t\treturn 1;\n\t\t} \n\t\telse if(user.hasEnoughBudget(marketValue)) {\n\t\t\ttmpTeam.addPlayer(name, player);\n\t\t\tuser.updateBudget(marketValue, \"-\");\n\t\t\tSystem.out.println(\"budget \" + user.getBudget());\n\t\t\tSystem.out.println(\"marketvalue \" +marketValue);\n\t\t\tSystem.out.println(\"budget after buy\" + user.getBudget());\n\t\t\treturn 0;\n\t\t}\n\t\treturn -1;\n\t}", "public void addPlayer(String playerID) {\r\n\t\tplayerCount++;\r\n\t\tString name = guild.getMemberById(playerID).getEffectiveName();\r\n\t\t// Set up each player uniquely\r\n\t\tif (p2 == null) {\r\n\t\t\tp2 = new Player(1,playerID,GlobalVars.pieces.get(\"blue\"));\r\n\t\t\tp2.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[1][0]);\r\n\t\t\tp2.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[1][1]);\r\n\t\t\tplayers.add(p2);\r\n\t\t\tp1.setNextPlayer(p2);\r\n\t\t\tp2.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the BLUE adventurer\").queue();\r\n\t\t} else if (p3 == null) {\r\n\t\t\tp3 = new Player(2,playerID,GlobalVars.pieces.get(\"yellow\"));\r\n\t\t\tp3.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[2][0]);\r\n\t\t\tp3.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[2][1]);\r\n\t\t\tplayers.add(p3);\r\n\t\t\tp2.setNextPlayer(p3);\r\n\t\t\tp3.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the YELLOW adventurer\").queue();\r\n\t\t} else if (p4 == null) {\r\n\t\t\tp4 = new Player(3,playerID,GlobalVars.pieces.get(\"green\"));\r\n\t\t\tp4.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[3][0]);\r\n\t\t\tp4.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[3][1]);\r\n\t\t\tplayers.add(p4);\r\n\t\t\tp3.setNextPlayer(p4);\r\n\t\t\tp4.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the GREEN adventurer\").queue();\r\n\t\t}\r\n\t}", "boolean addPlayer(String player);", "public void addPlayer(Player p){\r\n this.players[PlayerFactory.nb_instances-1]=p;\r\n this.tiles[p.getX()+(p.getY()*this.width)]=p;\r\n }", "public void add() {\r\n // Getting the player name.\r\n DialogManager dialog = this.gui.getDialogManager();\r\n String name = dialog.showQuestionDialog(\"Name\", \"Enter your name:\", \"\");\r\n if (name != null) {\r\n this.scoreTable.add(new ScoreInfo(name, this.score.getValue()));\r\n try {\r\n this.scoreTable.save(new File(\"highscores\"));\r\n } catch (IOException e) {\r\n System.out.println(\"Failed creating a file.\");\r\n return;\r\n }\r\n }\r\n }", "public void addPlayer(Player player) {\n this.add(player);\n this.players.add(player);\n }", "@SqlUpdate(\"insert into PLAYERSTATS (SCOREID, USERID, TIMESTAMP, KILLS, SCORE) values \"\n + \"(:scoreId, :userId, :timestamp, :kills, :score)\")\n int insert(@BindBean PlayerStats playerStats);", "void addPerson(Player player);", "public void addVps(Player player) {\n }", "public void addPlayer(Player inPlayer) {\n\t\tgetPlayersInRoom().add(inPlayer);\n\t}", "public void addPlayers(ArrayList<Player> players) {\r\n\t\tthis.players = players;\r\n\t}", "public Player addNewPlayer(String username){\n\n // if no username is provided return error;\n if(username == null || username.isEmpty()){\n throw new ApplicationException(\"Please provide a username\");\n }\n // else return player by provided username via @Repository\n System.out.println(ANSI_BLUE + \"=== PLAYER \" + username + \" CREATED ===\" + ANSI_RESET);\n return gameRepository.addNewPlayer(username);\n\n }", "void playerAdded();", "public void addPlayer(EntityPlayerMP player)\r\n {\r\n int var2 = (int)player.posX >> 4;\r\n int var3 = (int)player.posZ >> 4;\r\n player.managedPosX = player.posX;\r\n player.managedPosZ = player.posZ;\r\n\r\n for (int var4 = var2 - this.playerViewRadius; var4 <= var2 + this.playerViewRadius; ++var4)\r\n {\r\n for (int var5 = var3 - this.playerViewRadius; var5 <= var3 + this.playerViewRadius; ++var5)\r\n {\r\n this.getPlayerInstance(var4, var5, true).addPlayer(player);\r\n }\r\n }\r\n\r\n this.players.add(player);\r\n this.filterChunkLoadQueue(player);\r\n }", "public void addPlayer(Player player) {\n\t\tif(players.isEmpty()) {\n\t\t\tcurrent=player;\n\t\t\tplayers.add(current);\n\t\t}\n\t\telse {\n\t\t\tplayers.add(player);\n\t\t}\n\t}", "@Test\n public void testAddPlayer() {\n System.out.println(\"addPlayer\");\n Player player = new Player(\"New Player\");\n Team team = new Team();\n team.addPlayer(player);\n assertEquals(player, team.getPlayers().get(0));\n }", "public void createPlayers() {\r\n\t\tPlayerList playerlist = new PlayerList();\r\n\t\tPlayer p = new Player();\r\n\t\tfor (int x = 0; x <= players; x++) {\r\n\t\t\tplayerlist.createPlayer(p);\r\n\t\t}\r\n\r\n\t\tScanner nameScanner = new Scanner(System.in);\r\n\r\n\t\tfor (int createdPlayers = 1; createdPlayers < players; createdPlayers++) {\r\n\t\t\tSystem.out.println(\"Enter next player's name:\");\r\n\t\t\tplayerlist.namePlayer(createdPlayers, nameScanner.nextLine());\r\n\t\t}\r\n\t\tnameScanner.close();\r\n\t}", "private void addPlayers(@NotNull MapHandler map, @NotNull NewGameDto newGameDto) {\n ComparableTuple<Integer, Stack<SpawnTile>> result = analyseMap(map);\n flagCount = result.key;\n Stack<SpawnTile> spawnTiles = result.value;\n if (!spawnTiles.isEmpty()) {\n for (PlayerDto player : newGameDto.players) {\n SpawnTile spawnTile = spawnTiles.pop();\n if (player.id == newGameDto.userId) {\n user = new Player(spawnTile.getX(), spawnTile.getY(), Direction.NORTH, map, new ComparableTuple<>(GameGraphics.mainPlayerName + \" (you)\", player.color), player.id);\n user.setDock(spawnTile.getSpawnNumber());\n players.add(user);\n } else {\n IPlayer onlinePlayer = new OnlinePlayer(spawnTile.getX(), spawnTile.getY(), Direction.NORTH, map, new ComparableTuple<>(player.name, player.color), player.id);\n onlinePlayer.setDock(spawnTile.getSpawnNumber());\n players.add(onlinePlayer);\n }\n }\n } else {\n for (int i = 0; i < playerCount; i++) {\n NonPlayer nonPlayer = new NonPlayer(i, 0, Direction.NORTH, map, new ComparableTuple<>(\"blue\", Color.BLUE));\n nonPlayer.setDock(i);\n players.add(nonPlayer);\n }\n }\n }", "public void addPlayerDuringGame(String playerName) {\n System.out.println(\"I want to add player \" + playerName + \" to the game!\");\n addPlayer(playerName);\n Collections.shuffle(players);\n }", "void addPlayer(IPlayer player);", "public boolean addPlayer(int pno){\n\t\t\n\t\t// Gets the coordinates of a non-wall and non-occupied space\n\t\tint[] pos = initiatePlayer(pno);\n\t\t\n\t\t// If a free space could not be found, return false and the client will be force quit\n\t\tif (pos == null){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Put the player into the HashMaps\n\t\tplayerPosition.put(pno, pos);\n\t\tcollectedGold.put(pno, 0);\n\t\t\n\t\treturn true;\n\t}", "public void addPlayer(int id, String name) {\n Color[] colors = new Color[]{Color.RED, Color.CYAN, Color.LIME, Color.YELLOW, Color.MAGENTA};\n Player player = new Player(id, colors[playerTracking.size()], name);\n playerTracking.add(player);\n\n onAddPlayer(player);\n }", "public void addPlayerToStats(Player player) {\n\t\tfindForPlayer(player);\n\t}", "@Override\n\tpublic int doCreate(Player player) throws Exception {\n\t\tif(player==null){\n\t\t\treturn 400;\n\t\t}\n\t\ttry {\n\t\t\tdao.doCreate(player);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\t//e.printStackTrace();\n\t\t\treturn 300;\n\t\t}\n\t\treturn 100;\n\t}", "public boolean addPlayer(GamePlayer player) {\n\t\tif (players.size() >= info.getMaximumPlayers())\n\t\t\treturn false;\n\t\tplayer.setCurrentGame(this);\n\t\tplayer.setJoinLocation(player.getPlayer().get().getLocation());\n\t\tplayers.add(player);\n\t\treturn true;\n\t}", "public void addUser() {\n\t\tthis.users++;\n\t}", "public boolean addPlayer(long idGame, Player player) {\n Game game = this.getGameById(idGame);\n\n if(game == null) {\n return false;\n }\n\n game.getPlayers().add(player);\n this.save(game);\n\n return true;\n }", "public int playersCount(){\r\n\t\treturn players.size();\r\n\t}", "public void addPlayer(Player p) {\n if (gameState != GameState.AWAITING_PLAYERS) {\n throw new GameStateInvalidException(\"Cannot add players once game is underway...\");\n }\n\n // ok, just add...\n if (!players.contains(p)) {\n players.add(p);\n }\n }", "public boolean addPlayer(Player player)\n\t{\n\t\treturn playerList.add(player);\n\t}", "public void addPlayer(Player player) {\r\n players.add(player);\r\n ((DefaultListModel<Player>) playerListGui.getModel()).addElement(player);\r\n }", "void newPlayer(String name, String institution){\n Player newPlayer = new Player(name, institution,0);\n boolean x = players.add(newPlayer);\n }", "public boolean addPlayer(Player p) {\n\t\tif(p != null && !squareOccuped()) {\n\t\t\tthis.player = p;\n\t\t\treturn true;\n\t\t} else return false;\n\t}", "public void addMember(Player player) {\n\t\tif (members.isEmpty()) {\n\t\t\tcacheParty(this); // Caches the party if it went from empty to not empty\n\t\t}\n\t\tmembers.add(player.getUniqueId());\n\t}", "private void addPlayerToGroup(Scoreboard board, Player player) {\n String playername = player.getName();\n board.registerNewTeam(playername);\n board.getTeam(playername).addPlayer(player);\n }", "public void addPlayer(FootballPlayer aPlayer) {\n\t\tplayers.add(aPlayer);\n\t}", "private void updateDB() {\r\n //if(!m_state.isEndingGame()) return;\r\n if(m_connectionName == null || m_connectionName.length() == 0 || !m_botAction.SQLisOperational()) {\r\n m_botAction.sendChatMessage(\"Database not connected. Not updating scores.\");\r\n return;\r\n }\r\n\r\n for(KimPlayer kp : m_allPlayers.values()) {\r\n try {\r\n m_botAction.SQLQueryAndClose(m_connectionName\r\n , \"INSERT INTO tblJavelim (fcName,fnGames,fnKills,fnDeaths) \"\r\n + \"VALUES ('\" + Tools.addSlashes(kp.m_name) + \"',1,\" + kp.m_kills + \",\" + kp.m_deaths + \") \"\r\n + \"ON DUPLICATE KEY UPDATE fnGames = fnGames + 1, fnKills = fnKills + VALUES(fnKills), fnDeaths = fnDeaths + VALUES(fnDeaths)\");\r\n } catch(SQLException e) {\r\n Tools.printStackTrace(e);\r\n }\r\n }\r\n\r\n if(m_mvp != null) {\r\n try {\r\n m_botAction.SQLQueryAndClose(m_connectionName\r\n , \"UPDATE tblJavelim SET fnMVPs = fnMVPs + 1 WHERE fcName='\" + Tools.addSlashes(m_mvp.m_name) + \"'\");\r\n } catch(SQLException e) {\r\n Tools.printStackTrace(e);\r\n }\r\n }\r\n\r\n if(m_winner != null && m_winner.size() != 0) {\r\n for(KimPlayer kp : m_winner) {\r\n try {\r\n m_botAction.SQLQueryAndClose(m_connectionName\r\n , \"UPDATE tblJavelim SET fnWins= fnWins + 1 WHERE fcName='\" + Tools.addSlashes(kp.m_name) + \"'\");\r\n } catch(SQLException e) {\r\n Tools.printStackTrace(e);\r\n }\r\n }\r\n }\r\n }", "public int countPlayers(){\n return players.size();\n }", "public void nextPlayer() {\r\n if (currentPlayer == totalPlayer) {\r\n currentPlayer = 1;\r\n } else {\r\n currentPlayer++;\r\n }\r\n }", "public static void addLife(Player p) {\n FileConfiguration config = DatabaseManager.getPlayerFileConfiguration(p);\n config.set(\"Lives\", config.getInt(\"Lives\") + 1);\n try {\n config.save(DatabaseManager.getPlayerFile(p));\n } catch (IOException e) {\n e.printStackTrace();\n Logger.logError(e.getMessage());\n Logger.logError(\"Issue adding player life.\");\n }\n }", "public boolean addPlayer(final Player player)\n {\n if (player == null || !player.isOnline()) {\n return false;\n }\n\n String playerName = player.getName().toLowerCase();\n\n if (!listeners.containsKey(playerName)) {\n listeners.put(playerName, player);\n\n player.setScoreboard(board);\n\n return true;\n }\n\n return false;\n }", "public void addMember(Player player) {\n this.members.add(player.getUniqueId().toString());\n }", "private void addPlayer(long gameId, long memberId)\r\n\t{\r\n\t\tGame game = gameService.lookupGame(gameId);\r\n\t\tMember member = memberDao.findById(memberId);\r\n\t\tlogger.debug(\"addPlayer game=\"+game.getName()+ \" member=\"+ member.getId());\r\n\t\t\r\n\t\t// check if member already in game, if so do not add (throw error too?)\r\n\t\tfor (Player p : game.getPlayers()) {\r\n\t\t\tif (p.getMember().getId() == member.getId()) {\r\n\t\t\t\tlogger.error(\"Member is already a player\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tPlayer player = new Player();\r\n\t\tplayer.setGame(game);\r\n\t\tplayer.setMember(member);\r\n\t\tplayer.setOrder(findNextPlayerOrder(game));\r\n\t\tplayerDao.create(player);\r\n\t\t\r\n\r\n\t}", "public String addOpponent(int playerId1, int playerId2) throws SQLException{\n\t\tConnection conn = null;\n\t\tPreparedStatement ps = null;\n\t\tint insert = 0;\n\t\t\n\t\tconn = getDataSource().getConnection();\n\n\t\tString opponentMappingExistsQuery = \"SELECT count(1) mappingcount from opponent where (player1 = ? and player2 = ?) or (player1 = ? and player2 = ?)\";\n\t\tps = conn.prepareStatement(opponentMappingExistsQuery);\n\t\tps.setInt(1, playerId1);\n\t\tps.setInt(2, playerId2);\n\t\tps.setInt(3, playerId2);\n\t\tps.setInt(4, playerId1);\n\t\tResultSet rs = ps.executeQuery();\n\t\tint mappingCount = 0;\n\t\twhile (rs.next()) {\n\t\t\tmappingCount = rs.getInt(\"mappingcount\");\n\t\t\tSystem.out.println(\"Mapping Count:\"+ mappingCount);\t\t\t\n\t\t}\n\t\t\n\t\tif(mappingCount == 0){\n\t\t\tString sql = \"insert into opponent\"\n\t\t\t\t\t+ \"(player1, player2) values(?,?)\";\n\n\t\t\t\tps = conn.prepareStatement(sql);\n\t\t\t\tps.setInt(1, playerId1);\n\t\t\t\tps.setInt(2, playerId2);\n\t\t\t\tinsert = ps.executeUpdate();\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tps.close();\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\treturn \"mapping created\";\n\n\t\t}else{\n\t\t\treturn \"mapping exists\";\n\t\t}\n\t\t\t\n\t}", "public abstract BossBar addPlayer(UUID player);", "public void addPlayer(String name, double attackStat, double blockStat){\n players.add(new Player(name, attackStat, blockStat));\n }", "public void buttonAdd(ActionEvent event) {\n\t\tPlayer player = new Player(textfieldName.getText(), textfieldDate.getText(), Integer.parseInt(textfieldLevel.getText()));\n\t\ttableview.getItems().add(player);\n\t}", "public void increaseTurnCount()\n\t{\n\t\tturnNumber++;\n\t\tthis.currentPlayerID++;\n\t\tthis.currentPlayerID = this.currentPlayerID % this.playerList.size();\n\t}", "@Override\r\n\tpublic void addPlayer(String playerName, int balance, int playerNumber) {\r\n\t\tColor[] colors = {Color.BLUE, Color.WHITE, Color.MAGENTA, Color.YELLOW, Color.BLACK, Color.GREEN};\r\n\t\tCar car = new Car.Builder()\r\n\t\t\t\t.primaryColor(colors[playerNumber])\r\n\t\t\t\t.secondaryColor(colors[5-playerNumber]).build();\r\n\t\tGUI.addPlayer(playerName, balance, car);\r\n\t\tGUI.setCar(1, playerName);\r\n\t}", "public void addEntity(Player player) {\n\t\tentities.add(player);\n\t}", "public void registerPlayer(BlackjackPlayer player) {\r\n getPlayers().add(player);\r\n }", "@Override\npublic int getNumPlayers() {\n\treturn numPlayer;\n}", "public boolean addPlayerItem(PlayerItem playerItem);", "public void addPlayer(final Player aPlayer)\r\n\t{\r\n\t\tmPlayer.setX(mStartX * Block.SIZE);\r\n\t\tmPlayer.setY(mStartY * Block.SIZE);\r\n\t\taddEntity(mPlayer);\r\n\t}", "public void setNumberOfPlayers(int numberOfPlayers) {\n this.numberOfPlayers = numberOfPlayers;\n }", "public int incrementPlayersNumber(){//setter/incrementer di numberofplayers chiamato da ServerRoom: qua ho cambiato! è qui che si setta il client id, e il primo della stanza ha id=1 scritta come era prima!\r\n\t\tint idToSend=numberOfPlayers;\r\n\t\tnumberOfPlayers++;\r\n\t\treturn idToSend;\r\n\t}", "private void increaseCurrentPlayerIndex() {\n\t\tcurrentPlayer++;\n\t\tif(currentPlayer>3)\n\t\t\tcurrentPlayer=0;\n\t}", "public void addPlayers(List<Player> players) {\n\n\t\tthis.players.addAll(players);\n\t}", "public void GameStart()\n\t\t{\n\t\t\tplayers_in_game++;\n\t\t}", "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 addPlayer(VirtualView client) throws GameEndedException {\n if (!running.get() || !setup.get()) throw new GameEndedException(\"game ended\");\n if (playerControllers.size() >= game.getPlayerNum()) {\n logError(\"too many players\");\n return;\n }\n Player player = new Player(client.getId(), colors.get(playerControllers.size()));\n PlayerController playerController = new PlayerController(player, client, this);\n game.addPlayer(player);\n playerControllers.add(playerController);\n client.setPlayerController(playerController);\n try {\n broadcastGameInfo(\"playerJoined\");\n broadcastMessage(client.getId() + \" joined! (\" + game.getPlayers().size() + \"/\" + game.getPlayerNum() + \") \");\n } catch (IOExceptionFromController e) {\n handleDisconnection(e.getController());\n }\n }", "public Player(String name) {\n setName(name);\n setId(++idCounter);\n setHealthPoints(100);\n setYourTurn(false);\n }", "public void update(Player player) {\n PlayerDAO playerDAO = DAOFactory.getInstance().getPlayerDAO();\n Player playerToUpdate = playerDAO.findById(player.getId());\n if (playerToUpdate.getId() == 0) {\n playerDAO.insert(player);\n System.out.println(\"Player \" + player.getName() + \" was inserted as it is not existing.\");\n return;\n }\n Statement statement;\n try {\n statement = connection.createStatement();\n\n int result = statement.executeUpdate(\n String.format(\"UPDATE Player SET CLUB_ID = '%s', NAME = '%s' WHERE ID = '%s';\",\n player.getCurrentClub().getId(), player.getName(), player.getId()));\n } catch (SQLException e) {\n e.printStackTrace();\n }\n System.out.println(\"Update in table Player succeed!\");\n }", "@Override\npublic void addPlayer(Player<T> x) {\n\tif (getNumPlayers() == 0) {\n\t\tcurrentPlayer = x;\n\t\tx.setNext(x);\n\t\tnumPlayer++;\n\t} else {\n\t\tPlayer<T> prevNode = this.currentPlayer;\n\t\tfor (int i = 0; i < getNumPlayers(); i++) {\n\t\t\tif (prevNode.getNext().equals(this.currentPlayer)) {\n\t\t\t\tx.setNext(currentPlayer);\n\t\t\t\tprevNode.setNext(x);\n\t\t\t}\n\t\tprevNode = prevNode.getNext(); \n\t\t}\n\tnumPlayer++;\n\t}\n}", "public void newPlayer(Client source) {\r\n\t\tthis.players.add(source);\r\n\r\n\t\t// Send a message to all clients that a new player has joined\r\n\t\tthis.queueMessage(new Message(Message.ALL_CLIENTS,\r\n\t\t\t\tsource.getPlayerNo(), \"@ \" + source.getPlayerNo() + \" \"\r\n\t\t\t\t\t\t+ source.getName()));\r\n\t}", "public void addPlayerShip()\n\t{\n\t\t//if a PlayerShip is already spawned, a new one will not be added\n\t\tif (gameObj[1].size() == 0)\n\t\t{\n\t\t\tgameObj[1].add(new PlayerShip());\n\t\t\tSystem.out.println(\"PlayerShip added\");\n\t\t}else{\n\t\t\tSystem.out.println(\"A player ship is already spawned\");\n\t\t}\n\t\t\n\t}", "public void autoAdd()\n {\n switch (this.getGameType())\n {\n case 1:\n for(int i = 0; i < this.participantNum; i++)\n {\n games.get(count - 1).addParticipant(swimmers.get(i).getId(),swimmers.get(i).compete(),swimmers.get(i).getPoints());\n }\n break;\n case 2:\n for(int i = 0; i < this.participantNum; i++)\n {\n games.get(count - 1).addParticipant(runners.get(i).getId(),runners.get(i).compete(),runners.get(i).getPoints());\n }\n break;\n case 3:\n for(int i = 0; i < this.participantNum; i++)\n {\n games.get(count - 1).addParticipant(cyclists.get(i).getId(),cyclists.get(i).compete(),cyclists.get(i).getPoints());\n }\n break;\n }\n\n }", "public void addWinners(int playerIndex) {\n this.winners.add(playerIndex);\n }", "public void addNewPlayerStatsToStats(String username) throws IOException{\r\n\t\tScanner statsReader = new Scanner(new BufferedReader(new FileReader(\"statistics.txt\")));\r\n\t\tint numberOfPlayers = statsReader.nextInt();\r\n\t\tPlayerStats[] statsDirectory = new PlayerStats[numberOfPlayers];\r\n\t\t\r\n\t\tfor(int count = 0; count < numberOfPlayers; count++) {\r\n\t\t\tPlayerStats tempPlayerStats = new PlayerStats();\r\n\t\t\t/* load temporary stats object with stats */\r\n\t\t\treadPlayerStats(tempPlayerStats, statsReader);\r\n\t\t\t/* add new stats object to directory */\r\n\t\t\tstatsDirectory[count] = tempPlayerStats;\r\n\t\t}\r\n\t\t\r\n\t\tstatsReader.close();\r\n\t\t/* rewrite the statistics file with user stats reset */\r\n\t\tFileWriter writer = new FileWriter(\"statistics.txt\");\r\n\t\tBufferedWriter statsWriter = new BufferedWriter(writer);\r\n\t\tnumberOfPlayers++;\r\n\t\tInteger numPlayers = numberOfPlayers;\r\n\t\tstatsWriter.write(numPlayers.toString()); // write the number of players\r\n\t\tstatsWriter.write(\"\\n\");\r\n\t\tfor(int count = 0; count < numberOfPlayers - 1; count++) { // - 1 because numberOfPlayers was incremented\r\n\t\t\tstatsWriter.write(statsDirectory[count].playerStatsToString()); // write player to statistics.txt\r\n\t\t}\r\n\t\t/* add new entry with 0s at end */\r\n\t\t\tInteger zero = 0;\r\n\t\t\tstatsWriter.write(username);\r\n\t\t\tstatsWriter.write(\"\\n\");\r\n\t\t\t\r\n\t\t\tfor(int count = 0; count < 5; count++) {\r\n\t\t\t\tstatsWriter.write(zero.toString());\r\n\t\t\t\tstatsWriter.write(\"\\n\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\tstatsWriter.close();\r\n\t}", "public String addPlayerRecord(PlayerRecord playerRecord){\n String str = \"Player record has been saved\";\n Collections.sort(this.topPlayers);\n if (topPlayers.size() < MAX_LIST_SIZE)\n topPlayers.add(playerRecord);\n else{\n if(topPlayers.get(MAX_LIST_SIZE-1).getScore() < playerRecord.getScore()){\n topPlayers.remove(MAX_LIST_SIZE-1);\n topPlayers.add(playerRecord);\n }\n else\n str = \"Player's score is too low to be added\";\n }\n Collections.sort(this.topPlayers);\n return str;\n }", "public World addPlayer(Player p){\r\n players.add(p);\r\n return this;\r\n }", "public Player() {\n\n\t\tnumberOfPlayers++;\n\t\tthis.playerNumber = \"Player \" + numberOfPlayers; \n\t\tthis.balance = 500.00; \n\t\tthis.numberOfLoans = 0;\n\t\tthis.score = 0;\n\t\tthis.inRound = true; \n\t}", "public Player addGoalTally(Player player,int goals) throws Exception {\r\n player.setGoal(player.getGoal()+goals);\r\n Player.dao.modify(player);\r\n return player;\r\n }", "public void addUser(String username, String password) {\n\t\t// Connect to database\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\t\n\t\t// Create new entry\n\t\tString newEntryString = \"INSERT INTO User (username, password, winNum, loseNum) VALUES (?, ?, 0, 0)\";\n\t\t\n\t\ttry {\n\t\t\tps = conn.prepareStatement(newEntryString);\n\t\t\tps.setString(1, username);\n\t\t\tps.setString(2, password);\n\t\t\tps.executeUpdate();\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\t// Close connections\n\t\t\ttry {\n\t\t\t\tif(rs != null)\n\t\t\t\t{\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t\tif(ps != null)\n\t\t\t\t{\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(SQLException sqle)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sqle: \" + sqle.getMessage());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void addPlayerToTheFirstEmptyPlace(Player p) {\r\n\t\tfor (int i = 0; i < NB_PLAYER_MAX; i++) {\r\n\t\t\tif (players.get(i) == null) {\r\n\t\t\t\tplayers.put(i, p);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}" ]
[ "0.760491", "0.72573704", "0.7243338", "0.69845456", "0.69302386", "0.6924533", "0.6898035", "0.6872906", "0.6855223", "0.68444675", "0.68068814", "0.68040216", "0.6741173", "0.67065126", "0.6666453", "0.66619223", "0.6643581", "0.662264", "0.66206837", "0.6566522", "0.64763886", "0.6456358", "0.6440307", "0.64326036", "0.63619924", "0.6350193", "0.6346262", "0.6337712", "0.6316652", "0.6299245", "0.62929535", "0.62895364", "0.62718534", "0.6260384", "0.6240666", "0.62321717", "0.61808884", "0.617273", "0.6171672", "0.6152656", "0.61296904", "0.61171114", "0.6105432", "0.6064342", "0.6047732", "0.60082704", "0.60019267", "0.5965655", "0.5961361", "0.5946717", "0.5946263", "0.5941025", "0.59391785", "0.59368324", "0.5929432", "0.59126425", "0.5911492", "0.59109133", "0.5909834", "0.5888188", "0.58837944", "0.58827406", "0.5882651", "0.5882031", "0.5881546", "0.5874829", "0.5859141", "0.58551395", "0.58496", "0.5836668", "0.58325166", "0.5826277", "0.5824913", "0.58201605", "0.57864785", "0.57850003", "0.57837665", "0.5774389", "0.5771493", "0.576995", "0.57693946", "0.5764629", "0.5760807", "0.5748436", "0.57455266", "0.57406265", "0.57276684", "0.56961906", "0.56919545", "0.56770635", "0.56698406", "0.56651783", "0.5663015", "0.56533015", "0.5651983", "0.56430894", "0.56377447", "0.5633781", "0.56256324", "0.56170493" ]
0.70915675
3
Updates the number of different player values: Number of players Players done brainstorming Players done eliminating Calls on internal methods depending on whats being changed.
private void updateNrPlayerValues(String target) { database.getReference(gameCodeRef).child(target).addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot snapshot) { String value = String.valueOf(snapshot.getValue()); if (value.isEmpty() || value == null || value.equals(null) || value.contains("null")){ startDBValue(target); value = "1"; } else { increaseDBValue(target, Integer.parseInt(value)); } switch (target){ case "NumberOfPlayers": break; case "PlayersDoneBrainstorming": checkPlayersDoneBrainstorming(Integer.parseInt(value)+1); break; case "PlayersDoneEliminating": checkPlayersDoneEliminating(Integer.parseInt(value)+1); break; } } @Override public void onCancelled(@NonNull DatabaseError error) { Log.w(TAG,"loadGamecode:onCancelled", error.toException()); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getNumPlayers() {\n\t\tSystem.out.println(\"How many people are playing? (must be between \"+MIN_PLAYERS+\" and \"+MAX_PLAYERS+\")\");\n\t\tnumPlayers = GetInput.getInstance().anInteger(MIN_PLAYERS, MAX_PLAYERS);\n\t}", "private void updatePlayersWorth(){\n for (Player e : playerList) {\n e.setPlayerWorth(getTotalShareValue(e) + e.getFunds());\n }\n }", "@Override\n public void setNrPlayers(int value) {\n this.nrPlayers = value;\n }", "public void setNumberOfPlayers(int numberOfPlayers) {\n this.numberOfPlayers = numberOfPlayers;\n }", "@Override\npublic int getNumPlayers() {\n\treturn numPlayer;\n}", "public int playersCount(){\r\n\t\treturn players.size();\r\n\t}", "public void countAllPoints() {\n\t\tfor(ClientThread player: players) {\n\t\t\tplayer.points = PointCounter.countPoint(player.clientCards);\n\t\t\tview.writeLog(player.name+\" : \"+player.points);\n\t\t}\n\t}", "public int getPlayerCount() {\n return 0;\n }", "public int getNumPlayers(){\n return m_numPlayers;\n }", "public int countPlayers(){\n return players.size();\n }", "public static int getNumPlayers(){\n\t\treturn numPlayers;\n\t}", "@Override\r\n public void allPlayersCreateValue() {\r\n // Loop through each player and create a new points value\r\n for (Player player : this.players) {\r\n player.createNewValue(0);\r\n }\r\n }", "public void increaseTurnCount()\n\t{\n\t\tturnNumber++;\n\t\tthis.currentPlayerID++;\n\t\tthis.currentPlayerID = this.currentPlayerID % this.playerList.size();\n\t}", "public static void setPlayerCount(int playerCount) {\n PLAYER_COUNT = playerCount;\n }", "int getNumOfPlayers() {\n return this.numOfPlayers;\n }", "public int playerCount()\r\n\t{\r\n\t\tint count = 0;\r\n\t\tfor(Player player: this.players)\r\n\t\t{\r\n\t\t\tif(player != null)\r\n\t\t\t{\r\n\t\t\t\t++count;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "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 int getNumPlayers() {\n return numPlayers;\n }", "public int getPlayerCount() {\n \n \treturn playerCount;\n \t\n }", "@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\n }\n }", "public void updatePlayerPoints() {\n setText(Integer.toString(owner.getPlayerPoints()) + \" points\");\n }", "public int getNumPlayers(){\n\t\treturn this.players.size();\n\t}", "public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}", "public int numPlayers() {\n return playerList.size();\n }", "public void incrementTimesPlayed() {\r\n\t\ttimesPlayed++;\r\n\t}", "public void setMinimumPlayers(int nPlayers)\r\n {\n \r\n }", "@Override\n public int getTotalHumanPlayers() {\n return totalHumanPlayers;\n }", "public static void playerWonInc(){\r\n\t\t_playerWon++;\r\n\t}", "public int numPlayers(){\n return this.members.size();\n }", "public void newPlayer() {\r\n\t\tthis.nbMonster ++;\r\n\t\tthis.nbPlayer ++;\r\n\t}", "private void increaseCurrentPlayerIndex() {\n\t\tcurrentPlayer++;\n\t\tif(currentPlayer>3)\n\t\t\tcurrentPlayer=0;\n\t}", "public int getPlayerCount() {\n\t\treturn playerCount;\n\t}", "public int playerCount() {\n\t\treturn playerList.size();\n\t}", "public int getNumPlayers() {\n\n\t\treturn this.playerCount;\n\t}", "public void incGamesPlayed() {\n gamesPlayed++;\n }", "public int getNumOfPlayers() {\n\t\treturn numOfPlayers;\n\t}", "void notifyPlayerChanged(PlayerNumber newPlayer);", "private void setInfoPlayers() {\n\n\t\t//PLAYER 1\n\t\tlblPlayer1name.setText(players.get(0).getName());\n\t\tlblCashP1.setText(\"\" + players.get(0).getMoney());\n\t\tlblBuildP1.setText(\"\" + players.get(0).getNumberBuildings());\n\t\tlblPropP1.setText(\"\" + players.get(0).getOwnproperties().size());\n\t\tlblPosP1.setText(\"\"+ players.get(0).getPosition());\n\n\t\t//PLAYER 2\n\t\tlblPlayer2name.setText(players.get(1).getName());\n\t\tlblCashP2.setText(\"\" + players.get(1).getMoney());\n\t\tlblBuildP2.setText(\"\" + players.get(1).getNumberBuildings());\n\t\tlblPropP2.setText(\"\" + players.get(1).getOwnproperties().size());\n\t\tlblPosP2.setText(\"\"+ players.get(1).getPosition());\n\t\t\n\t\tif(players.size() > 2){\n\t\t\t//PLAYER 3\n\t\t\tlblPlayerName3.setText(players.get(2).getName());\n\t\t\tlblCashP3.setText(\"\" + players.get(2).getMoney());\n\t\t\tlblBuildP3.setText(\"\" + players.get(2).getNumberBuildings());\n\t\t\tlblPropP3.setText(\"\" + players.get(2).getOwnproperties().size());\n\t\t\tlblPosP3.setText(\"\"+ players.get(2).getPosition());\n\n\t\t\tif(players.size() > 3){\n\t\t\t\t//PLAYER 4\n\t\t\t\tlblPlayerName4.setText(players.get(3).getName());\n\t\t\t\tlblCashP4.setText(\"\" + players.get(3).getMoney());\n\t\t\t\tlblBuildP4.setText(\"\" + players.get(3).getNumberBuildings());\n\t\t\t\tlblPropP4.setText(\"\" + players.get(3).getOwnproperties().size());\n\t\t\t\tlblPosP4.setText(\"\"+ players.get(3).getPosition());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public int incrementPlayersNumber(){//setter/incrementer di numberofplayers chiamato da ServerRoom: qua ho cambiato! è qui che si setta il client id, e il primo della stanza ha id=1 scritta come era prima!\r\n\t\tint idToSend=numberOfPlayers;\r\n\t\tnumberOfPlayers++;\r\n\t\treturn idToSend;\r\n\t}", "public int getNumberOfPlayers() {\n return listaJogadores.size() - listaJogadoresFalidos.size();\n }", "int getNumberOfPlayers(){\n return players.size();\n }", "private void increaseScore() {\n this.game.getPlayers().values().forEach(ship -> {\n ship.increaseScore();\n if (ship.getScore() % 5 == 0) {\n this.asteroidsLimit++;\n }\n });\n }", "public int nrOfPlayers() {\n int playerCount = 0;\n for (Player player : players) {\n if (player.getName() != null) {\n playerCount++;\n }\n }\n\n return playerCount;\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}", "public int trickWinner(){\n Card.NUMBER one = player1Play.getValue();\n Card.NUMBER two = player2Play.getValue();\n Card.NUMBER three = player3Play.getValue();\n Card.NUMBER four = player4Play.getValue();\n Card.SUIT oneSuit = player1Play.getSuit();\n Card.SUIT twoSuit = player2Play.getSuit();\n Card.SUIT threeSuit = player3Play.getSuit();\n Card.SUIT fourSuit = player4Play.getSuit();\n int[] value = new int[4];\n value[0] = Card.getValsVal(one, oneSuit, currentTrumpSuit);\n value[1] = Card.getValsVal(two, twoSuit, currentTrumpSuit);\n value[2] = Card.getValsVal(three, threeSuit, currentTrumpSuit);\n value[3] = Card.getValsVal(four, fourSuit, currentTrumpSuit);\n if(player1Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[0] += 10;\n }\n if(player2Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[1] += 10;\n }\n if(player3Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[2] += 10;\n }\n if(player4Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[3] += 10;\n }\n if(player1Play.getSuit() == currentTrumpSuit || value[0] == 7){\n value[0] += 20;\n }\n if(player2Play.getSuit() == currentTrumpSuit || value[1] == 7){\n value[1] += 20;\n }\n if(player3Play.getSuit() == currentTrumpSuit || value[2] == 7){\n value[2] += 20;\n }\n if(player4Play.getSuit() == currentTrumpSuit || value[3] == 7){\n value[3] += 20;\n }\n int winner = 0;\n int winVal = 0;\n for(int i = 0; i < 4; i++){\n if(value[i] > winVal){\n winVal = value[i];\n winner = i;\n }\n }\n return winner;\n }", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "public int getNumOfPlayers() {\n\t\treturn playerList.size();\n\t}", "@Override\n // report number of players on a given team (or all players, if null)\n\tpublic int numPlayers(String teamName) {\n\n int numPlayers = 0;\n\n\n if (teamName == null) {\n\n for (int i = 0; i < (stats.keySet()).toArray().length; i++) {\n\n numPlayers++;\n\n }\n\n return numPlayers;\n\n }\n\n else {\n\n Collection<SoccerPlayer> soccerPlayers = stats.values();\n\n for (SoccerPlayer sp: soccerPlayers) {\n\n if (sp.getTeamName().equals(teamName)){\n\n numPlayers++;\n }\n }\n\n return numPlayers;\n\n }\n\n\n\t}", "public void updateStats( ) {\r\n\t\tperseverance = owner.perseverance;\r\n\t\tobservation = owner.observation;\r\n\t\tintellect = owner.intellect;\r\n\t\tnegotiation = owner.negotiation;\r\n\t\ttact = owner.tact;\r\n\t\tstrength = owner.strength;\r\n\r\n\t\txCoord = owner.xCoord;\r\n\t\tyCoord = owner.yCoord;\r\n\r\n\t\tmaxHealth = 2400 + ( perseverance * 200 );\r\n\r\n\t\thealth = maxHealth;\r\n\r\n\t\tsetDamages( );\r\n\t}", "protected void setCounts(int doWhat){\n\tswitch(doWhat){\n\tcase 0: numPlayers++;\n\t break;\n\tcase 1: numPlayers--;\n\t break;\n\tcase 2: numNPCs++;\n\t break;\n\tcase 3: numNPCs--;\n\t break;\n\tdefault: break;\n\t}\n\t\n\tif (debug) System.out.println(\"# of Players= \" + numPlayers\n\t\t\t\t + \"# of NPCs = \" + numNPCs);\n }", "public void incrementD_CurrentNumberOfTurns() {\n d_CurrentNumberOfTurns++;\n }", "private void wins(Player player){\n int win = 1;\n player.setWins(win);\n }", "public void updateWithPointWonBy(Player player) {\n if(managerTennisMatch.statusTennisMatch == \"ClassicalGame\") {\n if (player == player1) {\n managerTennisMatch.checkScoreAndUpdateGame(player, player2);\n } else {\n managerTennisMatch.checkScoreAndUpdateGame(player, player1);\n }\n } else if(managerTennisMatch.statusTennisMatch == \"TieBreakInProgress\") {\n player.setScore(player.getScore() + 1);\n if((player1.getScore() >= 7 && player1.getScore() - player2.getScore() >= 2) || (player2.getScore() >= 7 && player2.getScore() - player1.getScore() >= 2)) {\n tennisSetList.get(tennisSetList.size() - 1).getBaseGameList().add(new TieBreakGame(player));\n player1.setScore(0);\n player2.setScore(0);\n }\n } else {\n return;\n }\n }", "public void update() {\n\t\t//Indicate that data is fetched\n\t\tactivity.showProgressBar();\n\t\n\t\tPlayer currentPlayer = dc.getCurrentPlayer();\n\t\tactivity.updatePlayerInformation(\n\t\t\t\tcurrentPlayer.getName(),\n\t\t\t\tgetGlobalRanking(),\n\t\t\t\tcurrentPlayer.getGlobalScore(),\n\t\t\t\tcurrentPlayer.getPlayedGames(),\n\t\t\t\tcurrentPlayer.getWonGames(),\n\t\t\t\tcurrentPlayer.getLostGames(),\n\t\t\t\tcurrentPlayer.getDrawGames());\n\n\t\tactivity.hideProgressBar();\n\t}", "public int loadedPlayers(){\n return playerMap.size();\n }", "public void updateStats(Player currHand, int handType, int numWinners) {\n\t\tInteger topRank;\n\t\tInteger btmRank;\n\t\tDouble handBet = currHand.getBet();\n\t\tif (currHand.getCard1().getRank() == 1 || currHand.getCard2().getRank() == 1) {\n\t\t\ttopRank = 14;\n\t\t\tbtmRank = Math.max(currHand.getCard1().getRank(), currHand.getCard2().getRank());\n\t\t\tif (btmRank == 1) {\n\t\t\t\tbtmRank = 14;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (currHand.getCard1().getRank() <= currHand.getCard2().getRank()) {\n\t\t\t\ttopRank = currHand.getCard2().getRank();\n\t\t\t\tbtmRank = currHand.getCard1().getRank();\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttopRank = currHand.getCard1().getRank();\n\t\t\t\tbtmRank = currHand.getCard2().getRank();\n\t\t\t}\n\t\t}\n\t\tif (topRank == btmRank) { //pocket pair\n\t\t\tif (topRank == 14) {\n\t\t\t\tif (handType == 0) {\n\t\t\t\t\tif (currBet <= handBet) {\n\t\t\t\t\t\tpocketHands[168]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse winningPocketHands[168] += 1./numWinners;\n\t\t\t\t//System.out.println(\"index: \" + 168);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (handType == 0) {\n\t\t\t\t\tif (currBet <= handBet) {\n\t\t\t\t\t\tpocketHands[154 + topRank]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse winningPocketHands[154 + topRank] += 1./numWinners;\n\t\t\t\t//System.out.println(\"index: \" + (154 + topRank));\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tint index = -1;\n\t\t\tfor (int j = 1; j < topRank-2; j++) {\n\t\t\t\tindex += j;\n\t\t\t}\n\t\t\tindex += btmRank-1;\n\t\t\tindex *= 2;\n\t\t\tif (currHand.getCard1().getSuit() == currHand.getCard2().getSuit()) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\tif (handType == 0) {\n\t\t\t\tif (currBet <= handBet) {\n\t\t\t\t\tpocketHands[index]++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse winningPocketHands[index] += 1./numWinners;\n\t\t\t//System.out.println(\"index: \" + index);\n\t\t}\n\t\t//currHand.getCard1().printCard();\n\t\t//currHand.getCard2().printCard();\n\n\t}", "public void updatePlayerInstances()\r\n {\r\n long var1 = this.theWorldServer.getTotalWorldTime();\r\n int var3;\r\n PlayerManager.PlayerInstance var4;\r\n\r\n if (var1 - this.previousTotalWorldTime > 8000L)\r\n {\r\n this.previousTotalWorldTime = var1;\r\n\r\n for (var3 = 0; var3 < this.playerInstanceList.size(); ++var3)\r\n {\r\n var4 = (PlayerManager.PlayerInstance)this.playerInstanceList.get(var3);\r\n var4.onUpdate();\r\n var4.processChunk();\r\n }\r\n }\r\n else\r\n {\r\n for (var3 = 0; var3 < this.playerInstancesToUpdate.size(); ++var3)\r\n {\r\n var4 = (PlayerManager.PlayerInstance)this.playerInstancesToUpdate.get(var3);\r\n var4.onUpdate();\r\n }\r\n }\r\n\r\n this.playerInstancesToUpdate.clear();\r\n\r\n if (this.players.isEmpty())\r\n {\r\n WorldProvider var5 = this.theWorldServer.provider;\r\n\r\n if (!var5.canRespawnHere())\r\n {\r\n this.theWorldServer.theChunkProviderServer.unloadAllChunks();\r\n }\r\n }\r\n }", "public void updateScore(){\r\n if (this.isArtist || winners.contains(this)) {\r\n this.score += pointsGainedLastRound;\r\n }\r\n pointsGainedLastRound = 0;\r\n placeLastRound = 0;\r\n }", "@Override\n\tpublic int getOnlinePlayerSum() {\n\t\treturn PlayerManager.getInstance().getOnlinePlayers().size();\n\t}", "public void setPlayerNumber(int num) {\n playerNum = num;\n }", "public void increaseWins(){\n this.numberOfWins=this.numberOfWins+1;\n }", "private void scoreSumUp(ArrayList<Player> players){\n for (Player player: players) {\n System.out.println(\"The Player \" + player.getUsername() + \" has total points of \" + player.getScore());\n }\n }", "@Override\r\n public void addPlayers(int numberOfPlayers) {\r\n for (int i = 0; i < numberOfPlayers; i++) {\r\n this.addPlayer();\r\n }\r\n }", "public float numRemainingPlays(List<Player> players) {\n\t\tfloat f = 0;\n\t\tfor (Player p: players) {\n\t\t\tf += (float)p.getHandCount();\n\t\t}\n\t\tf += (float)getDeckSize();\n\t\t\n\t\treturn f;\n\t}", "public void setPlayerCount(short pPlayerCount) {\n\t\tthis.mPlayerCount = pPlayerCount;\n\t}", "public void setWins() {\r\n this.wins++;\r\n }", "private void updatePlayersOptions(){\n\t\tfor(Player player : players.keySet()){\n\t\t\tif(player != null) {\n\t\t\t\tBlackjackHand hand = players.get(player).get(0);\n\t\t\t\tList<GameOptionsEnumeration> options = getGameOptions(player);\n\t\t\t\tupdateHandOptions(player, hand, options);\n\t\t\t}\n\t\t}\n\t}", "@Test\n void updateScore() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }", "public void SZTToEveryOtherPlayer(int value) {\n\t\tfor(Player p:players) {\n\t\t\tif(p!=current) {\n\t\t\t\tp.raiseScore(value);\n\t\t\t}\n\t\t}\n\t}", "public int getPlayerMoveAmount() {\n return 3;\n }", "private void _updateStatistics(String priority) {\n _numDropped++;\n if (\"0\".equals(priority)) {\n _numGuides++;\n } else if (\"1\".equals(priority)) {\n _numP1++;\n } else if (\"2\".equals(priority)) {\n _numP2++;\n } else if (\"3\".equals(priority)) {\n _numP3++;\n }\n }", "private void updatePlayerList() \n\t{\n\t\tplayerStatus.clear();\n\n\t\tfor(Player thisPlayer: players) // Add the status of each player to the default list model.\n\t\t{\n\t\t\tplayerStatus.addElement(thisPlayer.toString());\n\t\t}\n\n\t}", "int getCount(Side player) {\n return player == BLACK ? _countBlack : _countWhite;\n }", "@Override\r\n public void givePlayerPoints(int player, int plValuePosition, int points) {\r\n // Incrememnt player values by the points passed in\r\n this.players.get(player).\r\n changePlayerValueNumeric(plValuePosition, points);\r\n }", "public void changeNumberOfPlayers(int numberOfPlayers) {\n\t\tif (numberOfPlayers != currentNumberofPlayers) {\n\t\t\tcurrentNumberofPlayers = numberOfPlayers;\n\t\t\tint row = nameRow;\n\n\t\t\t//remove all of the fields\n\t\t\tfor (int i = 0; i < maxPlayer; i++) {\n\t\t\t\tremove(nameLabels[i]);\n\t\t\t\tremove(nameFields[i]);\n\t\t\t}\n\t\t\t//Add all fields needed\n\t\t\tfor (int i = 0; i < currentNumberofPlayers; i++) {\n\t\t\t\tadd(nameLabels[i], \"cell 2 \" + row + \", alignx center\");\n\t\t\t\tadd(nameFields[i], \"cell 2 \" + row + \", alignx left, alignx center\");\n\t\t\t\trow++;\n\t\t\t}\n\n\t\t\tthis.revalidate();\n\t\t\trepaint();\n\t\t}\n\t}", "public void incrementNumAttacked( ){\n this.numAttacked++;\n }", "public void SZTFromEveryOtherPlayer(int value) {\n\t\tfor(Player p:players) {\n\t\t\tif(p!=current) {\n\t\t\t\tp.lowerScore(value);\n\t\t\t\tcurrent.raiseScore(value);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void updateWinAvGames(Player player) {\n\t\tint gamesWon = 0;\n\t\tList<Game> games = listGames(player);\n\t\tfor (int i=0;i<games.size();i++) { \n\t\t\tif(games.get(i).isWon())\n\t\t\t\tgamesWon++;\n\t\t}\n\t\tdouble winAverage=(double) gamesWon / (double) games.size();\n\t\tplayer.setWinAvg(winAverage);\n\t}", "private void update(Observable s) {\n if(s instanceof SimpleLongProperty) {\n long packed = ((SimpleLongProperty) s).get();\n \n int tp1 = PackedScore.totalPoints(packed, TeamId.TEAM_1);\n int tp2 = PackedScore.totalPoints(packed, TeamId.TEAM_2);\n \n turnPoints1.set(PackedScore.turnPoints(packed, TeamId.TEAM_1));\n gamePoints1.set(PackedScore.gamePoints(packed, TeamId.TEAM_1));\n totalPoints1.set(tp1);\n \n turnPoints2.set(PackedScore.turnPoints(packed, TeamId.TEAM_2));\n gamePoints2.set(PackedScore.gamePoints(packed, TeamId.TEAM_2));\n totalPoints2.set(tp2);\n \n // not sure if I should manually update winning team here\n// updateWinningTeam(tp1, tp2);\n }\n }", "public int activePlayers() {\n int playerCount = 0;\n for (Player player : players) {\n if (player.getName() != null && player.getState()) {\n playerCount++;\n }\n }\n\n return playerCount;\n }", "public void scoringTrick(){\n wizardRule();\n winner.tricksWon++;\n winner = new Player();\n }", "public synchronized void updateScore(PlayerHandler playerHandler) {\n\n int points = teams.length * Server.TEAM_SCORE / numMaxPlayers;\n playerHandler.increaseCorrectAnswers();\n\n if(points < 3){\n points = 3;\n }\n\n if (playerHandler.getTeam() == teams[0]) {\n score -= points;\n System.out.println(score);\n return;\n }\n score += points;\n }", "@Override\n public int howManyActivated(){\n return (gameboardPanel.howManyActivated() + leaderCardsPanel.howManyActivated());\n }", "public void updateNumberOfVehicles() {\r\n numberOfVehicles = getVehicles().size();\r\n }", "@Override\n public void setNrPlayersChangedListener() {\n database.getReference(gameCodeRef).child(\"NumberOfPlayers\").addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n String value = String.valueOf(snapshot.getValue());\n if (!value.equals(null) && !value.equals(\"null\")) {\n setNrPlayers(Integer.parseInt(value));\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n Log.w(TAG, \"Failed to read value.\", error.toException());\n }\n });\n }", "public void updateTrack(PlayerColor playerColor, GoodType goodType, int numberOfPoints) {\n\n\n String numberOfPointString;\n int value;\n int sum;\n\n switch (playerColor){\n case BLUE:\n value = Integer.parseInt(bluePlayerTrack.get(goodType).getText());\n sum = value + numberOfPoints;\n numberOfPointString = String.valueOf(sum);\n bluePlayerTrack.get(goodType).setText(numberOfPointString);\n break;\n case GREEN:\n value = Integer.parseInt(greenPlayerTrack.get(goodType).getText());\n sum = value + numberOfPoints;\n numberOfPointString = String.valueOf(sum);\n greenPlayerTrack.get(goodType).setText(numberOfPointString);\n break;\n case RED:\n value = Integer.parseInt(redPlayerTrack.get(goodType).getText());\n sum = value + numberOfPoints;\n numberOfPointString = String.valueOf(sum);\n redPlayerTrack.get(goodType).setText(numberOfPointString);\n break;\n case YELLOW:\n value = Integer.parseInt(yellowPlayerTrack.get(goodType).getText());\n sum = value + numberOfPoints;\n numberOfPointString = String.valueOf(sum);\n yellowPlayerTrack.get(goodType).setText(numberOfPointString);\n break;\n }\n }", "private void calculatePlayerStats(int pos) {\r\n\r\n initializeStatisticVariables();\r\n StatistisDAO statDAO = new StatistisDAO(Statistics.this);\r\n DAOUtilities daoUtil = new DAOUtilities(Statistics.this);\r\n PlayerDAO playerDAO = new PlayerDAO(Statistics.this);\r\n BagDAO bagDAO = new BagDAO(Statistics.this);\r\n\r\n Player player = new Player();\r\n long id = playerDAO.readIDFromName(players.get(pos));\r\n player.setID(id);\r\n\r\n averageScore = daoUtil.getAverageAdjustedScorePlayer(player);\r\n averagePlusMinus = averageScore - 72;\r\n averageFront9Score = daoUtil.getAverageAdjustedFrontNineScorePlayer(player);\r\n averageFront9PlusMinus = averageFront9Score - 36;\r\n averageBack9Score = daoUtil.getAverageAdjustedBackNineScorePlayer(player);\r\n averageBack9PlusMinus = averageBack9Score - 36;\r\n averageHoleScore = averageScore / 18;\r\n averageHolePlusMinus = averageHoleScore - 4;\r\n\r\n\r\n // get the number of each holes\r\n numberOfPar3Holes = statDAO.getNHolesPar(3, player);\r\n numberOfPar4Holes = statDAO.getNHolesPar(4, player);\r\n numberOfPar5Holes = statDAO.getNHolesPar(5, player);\r\n numberOfHoles = numberOfPar3Holes\r\n + numberOfPar4Holes\r\n + numberOfPar5Holes;\r\n\r\n // get the hole stats\r\n float nfairwayholes = numberOfPar4Holes + numberOfPar5Holes;\r\n fairways = nfairwayholes<=0 ? 0 : statDAO.getNFairways(player) / nfairwayholes * 100.;\r\n if (numberOfHoles > 0) {\r\n girs = statDAO.getNGiR(player) / (float) numberOfHoles * 100.;\r\n chips = statDAO.getNumofChips(player) / (float) numberOfHoles;\r\n putts = statDAO.getNumofPutts(player) / (float) numberOfHoles;\r\n penalties = statDAO.getNumofPenalties(player) / (float) numberOfHoles * 18.;\r\n }\r\n\r\n // get the counts for par 3's\r\n if (numberOfPar3Holes > 0) {\r\n par3Girs = statDAO.getNGiR(3, player) / (float)numberOfPar3Holes * 100.;\r\n par3Chips = statDAO.getNumofChips(3, player) / (float) numberOfPar3Holes;\r\n par3Putts = statDAO.getNumofPutts(3, player) / (float) numberOfPar3Holes;\r\n par3Penalties = statDAO.getNumofPenalties(3, player) / (float) numberOfPar3Holes;\r\n }\r\n par3EagleCount = statDAO.getNHolesParScore(3, -2, player);\r\n par3BirdieCount = statDAO.getNHolesParScore(3, -1, player);\r\n par3ParCount = statDAO.getNHolesParScore(3, 0, player);\r\n par3BogeyCount = statDAO.getNHolesParScore(3, 1, player);\r\n par3DoubleBogeyCount = statDAO.getNHolesParScore(3, 2, player);\r\n par3TripleBogeyCount = statDAO.getNHolesParScore(3, 3, player);\r\n par3QuadBogeyPlusCount = statDAO.getNHolesParGreaterThanScore(3, 4, player);\r\n\r\n // get the counts for par 4's\r\n if (numberOfPar4Holes > 0) {\r\n par4Fairways = statDAO.getNFairways(4, player) / (float) numberOfPar4Holes * 100.;\r\n par4Girs = statDAO.getNGiR(4, player) / (float) numberOfPar4Holes * 100.;\r\n par4Chips = statDAO.getNumofChips(4, player) / (float) numberOfPar4Holes;\r\n par4Putts = statDAO.getNumofPutts(4, player) / (float) numberOfPar4Holes;\r\n par4Penalties = statDAO.getNumofPenalties(4, player) / (float) numberOfPar4Holes;\r\n }\r\n par4AlbatrossCount = statDAO.getNHolesParScore(4, -3, player);\r\n par4EagleCount = statDAO.getNHolesParScore(4, -2, player);\r\n par4BirdieCount = statDAO.getNHolesParScore(4, -1, player);\r\n par4ParCount = statDAO.getNHolesParScore(4, 0, player);\r\n par4BogeyCount = statDAO.getNHolesParScore(4, 1, player);\r\n par4DoubleBogeyCount = statDAO.getNHolesParScore(4, 2, player);\r\n par4TripleBogeyCount = statDAO.getNHolesParScore(4, 3, player);\r\n par4QuadBogeyPlusCount = statDAO.getNHolesParGreaterThanScore(4, 4, player);\r\n\r\n // get the counts for the par 5's\r\n if (numberOfPar5Holes > 0) {\r\n par5Fairways = statDAO.getNFairways(5, player) / (float) numberOfPar5Holes * 100.;\r\n par5Girs = statDAO.getNGiR(5, player) / (float) numberOfPar5Holes * 100.;\r\n par5Putts = statDAO.getNumofPutts(5, player) / (float) numberOfPar5Holes;\r\n par5Chips = statDAO.getNumofChips(5, player) / (float) numberOfPar5Holes;\r\n par5Penalties = statDAO.getNumofPenalties(5, player) / (float) numberOfPar5Holes;\r\n }\r\n par5AlbatrossCount = statDAO.getNHolesParScore(5, -3, player);\r\n par5EagleCount = statDAO.getNHolesParScore(5, -2, player);\r\n par5BirdieCount = statDAO.getNHolesParScore(5, -1, player);\r\n par5ParCount = statDAO.getNHolesParScore(5, 0, player);\r\n par5BogeyCount = statDAO.getNHolesParScore(5, 1, player);\r\n par5DoubleBogeyCount = statDAO.getNHolesParScore(5, 2, player);\r\n par5TripleBogeyCount = statDAO.getNHolesParScore(5, 3, player);\r\n par5QuadBogeyPlusCount = statDAO.getNHolesParGreaterThanScore(5, 4, player);\r\n\r\n // sum various scores\r\n albatrossCount = par4AlbatrossCount + par5AlbatrossCount;\r\n eagleCount = par3EagleCount + par4EagleCount + par5EagleCount;\r\n birdieCount = par3BirdieCount + par4BirdieCount + par5BirdieCount;\r\n parCount = par3ParCount + par4ParCount + par5ParCount;\r\n bogeyCount = par3BogeyCount + par4BogeyCount + par5BogeyCount;\r\n doubleBogeyCount = par3DoubleBogeyCount\r\n + par4DoubleBogeyCount\r\n + par5DoubleBogeyCount;\r\n tripleBogeyCount = par3TripleBogeyCount\r\n + par4TripleBogeyCount\r\n + par5TripleBogeyCount;\r\n quadBogeyPlusCount = par3QuadBogeyPlusCount\r\n + par4QuadBogeyPlusCount\r\n + par5QuadBogeyPlusCount;\r\n\r\n\r\n clubs = bagDAO.readClubsInBag(player);\r\n // Remove the putter\r\n int idx = 0;\r\n int pidx = -1;\r\n for (Club club : clubs) {\r\n if (club.getClub().equals(\"Putter\"))\r\n pidx = idx;\r\n idx++;\r\n }\r\n if (pidx >= 0)\r\n clubs.remove(pidx);\r\n // Fill the distances and accuracy\r\n for (Club club : clubs) {\r\n club.setAvgDist(statDAO.getClubAvgDist(player, club));\r\n club.setAccuracy(statDAO.getClubAccuracy(player, club, (float) 10));\r\n }\r\n\r\n\r\n // get the number of rounds played\r\n int courseCount = 0;\r\n\t\t//Calls the method that displays the stats on the screen\r\n\t\tfillInList(courseCount++);\r\n\t}", "void updatePlayer(Player player);", "public void updateScoreBoard() {\n Player player1 = playerManager.getPlayer(1);\n Player player2 = playerManager.getPlayer(2);\n MainActivity mainActivity = (MainActivity) this.getContext();\n\n mainActivity.updateScoreBoard(player1, player2);\n }", "private void setupPlayers() {\n\t\tuserData=(UserData) Main.currentStage.getUserData();\n\t\tnumberPlayers=userData.getNumberPlayers();\n\t\tplayerNames=userData.getPlayerNames();\n\t\tcurrentPlayer=userData.getFirstPlayer();\n\t\tlb_currentplayername.setText(playerNames[currentPlayer]);\n\t\tplayers =new Player[4];\n\t\tfor(int i=0;i<4;i++) {\n\t\t\tif(i<numberPlayers) {\n\t\t\t\tplayers[i]=new Player(playerNames[i], false, i) {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void rollDices() {\n\t\t\t\t\t\trotatedDice1();\n\t\t\t\t\t\trotatedDice2();\n\t\t\t\t\t\t//waiting for player choose what way to go then handler that choice\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t\telse {\n\t\t\t\tplayers[i]=new Player(playerNames[i], true, i) {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void rollDices() {\n\t\t\t\t\t\trotatedDice1();\n\t\t\t\t\t\trotatedDice2();\n\t\t\t\t\t\t//randomchoice and next player rolldice\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t\tswitch (i) {\n\t\t\t\tcase 0:{\n\t\t\t\t\tplayers[i].setHorseColor(yh0, yh1, yh2, yh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 1:{\n\t\t\t\t\tplayers[i].setHorseColor(bh0, bh1, bh2, bh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 2:{\n\t\t\t\t\tplayers[i].setHorseColor(rh0, rh1, rh2, rh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 3:{\n\t\t\t\t\tplayers[i].setHorseColor(gh0, gh1, gh2, gh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void setUpPlayers(){\n\t\tTreeMap<String,Integer> turnsDetails = new TreeMap<>();\n\t\tint e = 0;\n\t\tfor(Player i : allplayers) {\n\t\t\ti.fillHand();\n\t\t\tturnsDetails.put(i.getFirstLetter()+String.valueOf(e),e);\n\t\t\te++;\n\t\t}\n\t\t// populate the turn list\n //entryset returns a set view of mappings contained\n\t\tfor(Map.Entry<String,Integer> i : turnsDetails.entrySet())\n\t\t\tturns.add(i.getValue());\n\t}", "public static void set_players(){\n\t\tif(TossBrain.compselect.equals(\"bat\")){\n\t\t\tbat1=PlayBrain1.myteam[0];\n\t\t\tbat2=PlayBrain1.myteam[1];\n\t\t\tStriker=bat1;\n\t\t\tNonStriker=bat2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\tbat1=PlayBrain1.oppteam[0];\n\t\t\t\tbat2=PlayBrain1.oppteam[1];\n\t\t\t\tStriker=bat1;\n\t\t\t\tNonStriker=bat2;\n\n\t\t\t\t}\n\t}", "public void setPlayedTimes(int newPlayedTimes) {\n this.playedTimes = newPlayedTimes;\n }", "public static void update_scoreboard2(){\n\t\t//Update score\n\tif(check_if_wicket2){\n\t\t\n\t\twicket_2++;\n\t\tupdate_score2.setText(\"\"+team_score_2+\"/\"+wicket_2);\n\t}\n\telse{\n\t\tif(TossBrain.compselect.equals(\"bat\")){\n\t\t\ttempshot2=PlayArena2.usershot2;\n\t\tteam_score_2=team_score_2+PlayArena2.usershot2;\n\t\treq=req-tempshot2;\n\t\t}\n\t\telse{\n\t\t\ttempshot2=PlayArena2.compshot2;\n\t\t\tteam_score_2=team_score_2+PlayArena2.compshot2;\n\t\t\treq=req-tempshot2;\n\t\t\t}\n\t\tif(req<0)\n\t\t{\treq=0;}\n\t\t\n\t\tupdate_score2.setText(\"\"+team_score_2+\"/\"+wicket_2);\n\t}\n\t// Overs update\n\tif(over_ball_2==5){\n\t\tover_ball_2=0;\n\t\tover_overs_2++;\n\t\tover_totalballs_2--;\n\t}\n\telse{\n\t\tover_ball_2++;\n\tover_totalballs_2--;}\n\tupdate_overs2.setText(\"\"+over_overs_2+\".\"+over_ball_2+\" (\"+PlayMode.overs+\")\");\n\t\n\t//Check if_first_inning_over\n\tif(over_overs_2==Integer.parseInt(PlayMode.overs) || wicket_2==3 || PlayBrain1.team_score_1<team_score_2)\n\t\t\t{\n\t\tif_second_inning_over=true;\n\t\treference2.add(PlayArena2.viewscore2);\n\t\t\t}\n\t\n\t\n\t//Needed update\n\t\t\tupdate_runrate2.setText(\"<html>NEED<br>\"+req+\"<br>OFF<br>\"+over_totalballs_2+\" <br>BALLS</html>\");\n\t\t}", "public int getNumberOfSelectedPlayers() {\n\t\treturn tmpTeam.size();\n\t}", "public void sendNumOpponents(int numPlayers) {\n try {\n dOut.writeInt(numPlayers);\n dOut.flush();\n } catch (IOException e) {\n System.out.println(\"Could not send number of players\");\n e.printStackTrace();\n }\n }", "public int getPoints ( Player player );", "public void updatePlayerModel() {\n double average = 0.0;\n for (int i = 0; i < playerModelDiff1.size(); i++) {\n average += (double) playerModelDiff1.get(i);\n }\n if ( playerModelDiff1.size() > 0 )\n average = average / playerModelDiff1.size();\n playerModel[0] = average;\n\n //Update playerModel[1] - difficulty 4\n average = 0.0;\n for (int i = 0; i < playerModelDiff4.size(); i++) {\n average += (double) playerModelDiff4.get(i);\n }\n if ( playerModelDiff4.size() > 0 )\n average = average / playerModelDiff4.size();\n playerModel[1] = average;\n\n //Update playerModel[2] - difficulty 7\n average = 0.0;\n for (int i = 0; i < playerModelDiff7.size(); i++) {\n average += (double) playerModelDiff7.get(i);\n }\n if ( playerModelDiff7.size() > 0 )\n average = average / playerModelDiff7.size();\n playerModel[2] = average;\n }", "public void setPlayers(int theCompPlayer) throws Exception {\r\n\t\tswitch(theCompPlayer) {\r\n\t\t\tcase 1:\r\n\t\t\t\tcompPlayer = 1;\r\n\t\t\t\totherPlayer = 2;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tcompPlayer = 2;\r\n\t\t\t\totherPlayer = 1;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new Exception(\"That player number is invalid\");\r\n\t\t}\r\n\t}", "public void nextPlayer() {\r\n if (currentPlayer == totalPlayer) {\r\n currentPlayer = 1;\r\n } else {\r\n currentPlayer++;\r\n }\r\n }" ]
[ "0.7077757", "0.7035762", "0.69948125", "0.69702965", "0.6860906", "0.67904365", "0.67181975", "0.6693154", "0.6688415", "0.6673988", "0.66665286", "0.66272193", "0.65927315", "0.6535226", "0.65332896", "0.650556", "0.6497468", "0.6479667", "0.64683527", "0.64575493", "0.64531326", "0.64498955", "0.64201206", "0.64171433", "0.64121366", "0.641094", "0.63872045", "0.636376", "0.63456243", "0.63338053", "0.6332096", "0.6328942", "0.6315588", "0.62966585", "0.6294305", "0.62721807", "0.6263085", "0.6259556", "0.6258566", "0.6248432", "0.62335634", "0.6201821", "0.6188616", "0.6181896", "0.6160882", "0.6154014", "0.6139123", "0.6131464", "0.6119287", "0.60972506", "0.6092694", "0.60772854", "0.6072235", "0.60672015", "0.60640675", "0.60331726", "0.60318416", "0.6025502", "0.601788", "0.601651", "0.6008301", "0.6007263", "0.60054135", "0.60011387", "0.5992919", "0.5968511", "0.59672475", "0.5966968", "0.59642804", "0.5962504", "0.59571356", "0.59565127", "0.5942834", "0.5939118", "0.5935249", "0.5933134", "0.59217054", "0.5917788", "0.59117836", "0.59107554", "0.58914065", "0.58855665", "0.5879121", "0.58716816", "0.5864526", "0.5862412", "0.5860071", "0.5854161", "0.5852928", "0.5845921", "0.5843558", "0.58404374", "0.583918", "0.5818352", "0.5814874", "0.5812901", "0.58101803", "0.58097", "0.5804469", "0.5795273" ]
0.6609076
12
Checks if all players are done brainstorming by comparing the number of players with the number of players done brainstorming. Sets the field AllDoneBrainstorming to true, PlayersDoneEliminating to 0, and AllDoneEliminating to false
private void checkPlayersDoneBrainstorming(int nrDoneBrainstorming) { if (nrDoneBrainstorming == nrPlayers){ database.getReference(gameCodeRef).child("AllDoneBrainstorming").setValue(true); database.getReference(gameCodeRef).child("PlayersDoneEliminating").setValue(0); database.getReference(gameCodeRef).child("AllDoneEliminating").setValue(false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkPlayersDoneEliminating(int nrDoneEliminating) {\n if (nrDoneEliminating == nrPlayers){\n database.getReference(gameCodeRef).child(\"AllDoneEliminating\").setValue(true);\n database.getReference(gameCodeRef).child(\"PlayersDoneBrainstorming\").setValue(0);\n database.getReference(gameCodeRef).child(\"AllDoneBrainstorming\").setValue(false);\n }\n }", "public void isTrickComplete() {\n if(numPlays!=4){return;}\n if(player1Play == null | player2Play == null | player3Play == null | player4Play == null){return;}//should only call when all have played\n // reset numPlayed\n numPlays = 0;\n // find if the round is over\n currentMiddle.clear();\n trickNum++;\n try {\n sleep(200);//display all four cards before determining winner\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n int trickWinner;\n trickWinner = trickWinner();\n turn = trickWinner;\n if(trickWinner == 0 | trickWinner == 2){\n redTrickScore++;\n }\n else if(trickWinner == 1 | trickWinner == 3){\n blueTrickScore++;\n }\n player1Hand.remove(player1Play);//clear middle\n player2Hand.remove(player2Play);\n player3Hand.remove(player3Play);\n player4Hand.remove(player4Play);\n\n player1Play = null;\n player2Play = null;\n player3Play = null;\n player4Play = null;\n\n if(trickNum == 5){\n // reset everything for new round\n currentTrumpSuit = null;\n numPass = 0;\n isRoundOver();\n if(dealer == 3){\n dealer = 0;\n turn = 1;\n }\n else{\n dealer++;\n turn = dealer + 1;\n }\n gameStage = 0;\n deal();\n trickNum = 0;\n }\n\n\n\n }", "public static boolean canPrune() {\n\t\tboolean result = false;\n\t\tint projectedTotal = 0;\n\t\t\n\t\tint i = 0;\n\t\twhile(i<jobsChosen){\n\t\t\tprojectedTotal += board[i][currentCombo[i]];\n\t\t\ti++;\n\t\t}\n\t\twhile(i<numPeople){\n\t\t\tprojectedTotal += bestPossibleCombination[i];\n\t\t\ti++;\n\t\t}\n\t\tif(projectedTotal<bestTotal){//Cant be greater than current Best Total\n\t\t\tresult = true;\n\t\t}\n\t\treturn result;\n\t}", "protected boolean allBoatsArePlaced() {\n for(BoatDrawing boat : boatMap.values()) {\n if (!boat.isPlaced()) {\n return false;\n }\n }\n logMsg(\"click now on 'valider' button to begin game\");\n return true;\n }", "private void checkFinish() {\n for (Player temp: players) {\n if (temp.getNumberOfCards() == 0) {\n System.out.println(\"...................................................................................................................................................................\");\n System.out.println(\"Game finished.\\n\");\n System.out.println(Color.PURPLE.getPrintColor() + temp.getName() + \" is winner.\\n\" + Color.RESET.getPrintColor());\n setGameStatus();\n }\n }\n if (!gameStatus) {\n System.out.println(Color.RESET.getPrintColor() + \"Results:\\n\");\n for (Player temp: players) {\n if (temp.getNumberOfCards() != 0) {\n System.out.println(Color.CYAN.getPrintColor() + temp.toString());\n System.out.print(temp.handToString() + Color.RESET.getPrintColor());\n }\n }\n }\n }", "public void dealerTurn() {\r\n boolean dealerContinue = false;\r\n do {\r\n for (int i = 0; i < this.getPlayers().size(); i++) {\r\n BlackjackPlayer player = (BlackjackPlayer) this.getPlayers().get(i);\r\n if (this.getHand().addCards() < player.getHand().addCards() && this.getHand().addCards() < 21 && player.getHand().addCards() <= 21) {\r\n dealerContinue = true;\r\n break;\r\n } else if (this.getHand().addCards() >= player.getHand().addCards() || this.getHand().addCards() == 21) {\r\n dealerContinue = false;\r\n }\r\n }\r\n if (dealerContinue == true) {\r\n addDealerCard();\r\n System.out.println(\"Dealer has: \" + this.getHand().toString());\r\n System.out.println(\"Card Score: \" + this.getHand().addCards());\r\n System.out.println(\"\");\r\n }\r\n } while(dealerContinue == true && this.getHand().addCards() < 21);\r\n }", "@Override\n public boolean isFinished() {\n if (numBalls == -1) {\n return false;\n } else {\n return ballsShot >= numBalls;\n }\n }", "public boolean isDone() {\n //check if valid board\n assert isValidSolitaireBoard();\n if (numPiles == NUM_FINAL_PILES){\n //create array checkDonewith size NUM_FINAL_PILES\n int[] checkDone = new int[NUM_FINAL_PILES];\n \n /**\n the value in piles[i] needs to be unique, not greater than NUM_FINAL_PILES\n and no duplicates of the number\n each value is used as an index to the new array and their value is\n the checkDone's value. Eg. piles[2] = 4, checkDone[4] = 4\n if the checkDone[piles[i]] equals to piles[i], there is a duplicate.\n */\n for (int i = 0 ; i < numPiles; i++){\n if ((piles[i] <= NUM_FINAL_PILES) && (checkDone[piles[i] - 1] != piles[i])){\n checkDone[piles[i] - 1] = piles[i];\n }\n else\n return false;\n }\n return true;\n }\n else\n return false;\n }", "public static boolean processScoringTeams() {\r\n\t\tboolean done = true;\r\n\t\tint player1Tricks = 0;\r\n\t\tint player2Tricks = 0;\r\n\t\tint player3Tricks = 0;\r\n\t\tint player4Tricks = 0;\r\n\t\t\r\n\t\t//Get the value of all the players tricks taken.\r\n\t\tplayer1Tricks = FrameUtils.player1TricksTaken.getSelectedIndex();\r\n\t\tplayer2Tricks = FrameUtils.player2TricksTaken.getSelectedIndex();\r\n\t\tplayer3Tricks = FrameUtils.player3TricksTaken.getSelectedIndex();\r\n\t\tplayer4Tricks = FrameUtils.player4TricksTaken.getSelectedIndex();\r\n\t\t\r\n\t\t//Check if all the choice boxes have been selected.\r\n\t\tif (player1Tricks == -1 || player1Tricks == 0) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\tif (player2Tricks == -1 || player2Tricks == 0) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\tif (player3Tricks == -1 || player3Tricks == 0) {\r\n\t\t\tdone = false;\r\n\t\t\t//Needed because the player bid was not a nil and the index for\r\n\t\t\t//the tricks taken is never read, by design. This only happens on\r\n\t\t\t//bids that are nils.\r\n\t\t\tif (FrameUtils.player3Bid.getSelectedItem() != \"nil\" ||\r\n\t\t\t\t\tFrameUtils.player3Bid.getSelectedItem() != \"dbl\") {\r\n\t\t\t\tdone = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (player4Tricks == -1 || player4Tricks == 0) {\r\n\t\t\tdone = false;\r\n\t\t\t//Needed because the player bid was not a nil and the index for\r\n\t\t\t//the tricks taken is never read, by design. This only happens on\r\n\t\t\t//bids that are nils.\r\n\t\t\tif (FrameUtils.player4Bid.getSelectedItem() != \"nil\" ||\r\n\t\t\t\t\tFrameUtils.player4Bid.getSelectedItem() != \"dbl\") {\r\n\t\t\t\tdone = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Get the value of all the players tricks taken.\r\n\t\tplayer1Tricks = stringToInt(FrameUtils.player1TricksTaken.getSelectedItem());\r\n\t\tplayer2Tricks = stringToInt(FrameUtils.player2TricksTaken.getSelectedItem());\r\n\t\tplayer3Tricks = stringToInt(FrameUtils.player3TricksTaken.getSelectedItem());\r\n\t\tplayer4Tricks = stringToInt(FrameUtils.player4TricksTaken.getSelectedItem());\r\n\t\t\r\n\t\t//Check if tricks taken in a game equals 13.\r\n\t\tif (player1Tricks + player2Tricks + player3Tricks + player4Tricks != 13) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\r\n\t\t//Show dialog box reminder.\r\n\t\tif (!done) FrameUtils.showDialogBox(\"Tricks taken was entered wrong.\");\r\n\t\t\t\r\n\t\t//Save tricks taken data.\r\n\t\tsaveTricksTakenData();\r\n\t\t\r\n\t\treturn done;\r\n\t}", "private boolean caughtEmAll(){\n\t\tint howMany = 1;\n\t\tArrayList<Pokemon> pokedex = theTrainer.getPokedex();\n\t\tCollections.sort(pokedex);\n\t\tfor(int i = 0; i < pokedex.size() - 1; i++){\n\t\t\tif(pokedex.get(i+1).getPokemonID() != pokedex.get(i).getPokemonID()){\n\t\t\t\thowMany++;\n\t\t\t}\n\t\t}\n\t\treturn (howMany == 10);\n\t}", "Boolean checkEndGame() {\n for (WarPlayer player : players) {\n if (player.getHand().size() == 0)\n return true;\n }\n return false;\n }", "public boolean completed(){\n return !activeAttackers() && !attackersLeft();\n }", "private boolean done() {\n\n // If there is a false, then there are still gaps\n for (boolean[] row : board) {\n for (boolean item : row) {\n if (!item) return false;\n }\n }\n return true;\n }", "public boolean checkNotDone() {\n boolean notDone = false;\n blocksPut = 0;\n \n for(int y = 0; y < buildHeight+1; y++) {\n for(int z = 0; z < buildSize; z++) {\n for(int x = 0; x < buildSize; x++) {\n if(myIal.lookBlock(x, y, z).equals(\"air\")) {\n notDone = true;\n } else {\n blocksPut++;\n }\n }\n }\n }\n\n return notDone;\n }", "@Test\n\tpublic void TestDeal() {\n\t\tArrayList<Player> testPlayers = game.getPlayers();\n\t\tArrayList<Card> allCards = new ArrayList<Card>();\n\t\tSet<Card> allCardsSet = new HashSet<Card>();\n\t\tint handSize = testPlayers.get(0).getCards().size();\n\t\tboolean correctSize = true;\n\t\t\n\t\tfor(Player p : testPlayers) {\n\t\t\tallCards.addAll(p.getCards());\n\t\t\tif(Math.abs(p.getCards().size() - handSize) > 1)\n\t\t\t\tcorrectSize = false;\n\t\t}\n\t\tallCardsSet.addAll(allCards);\n\t\t\n\t\tAssert.assertEquals(correctSize, true);\n\t\tAssert.assertEquals(allCards.size(), 21);\n\t\tAssert.assertEquals(allCards.size(), allCardsSet.size());\n\t}", "public static boolean processBidding() {\r\n\t\tboolean done = true;\r\n\t\t\r\n\t\t//Check if all the choice boxes have been selected.\r\n\t\tif (FrameUtils.player1Bid.getSelectedIndex() == -1\r\n\t\t\t\t|| FrameUtils.player1Bid.getSelectedIndex() == 0) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\tif (FrameUtils.player2Bid.getSelectedIndex() == -1\r\n\t\t\t\t|| FrameUtils.player2Bid.getSelectedIndex() == 0) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\tif (FrameUtils.player3Bid.getSelectedIndex() == -1\r\n\t\t\t\t|| FrameUtils.player3Bid.getSelectedIndex() == 0) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\t\r\n\t\t//Don't check fourth player if playing three handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tif (FrameUtils.player4Bid.getSelectedIndex() == -1\r\n\t\t\t\t\t|| FrameUtils.player4Bid.getSelectedIndex() == 0) {\r\n\t\t\t\tdone = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Show dialog box reminder.\r\n\t\tif (!done) FrameUtils.showDialogBox(\"An incorrect bid was made.\");\r\n\t\t\r\n\t\t//Save bid data.\r\n\t\tsaveBidData();\r\n\t\t\t\r\n\t\treturn done;\r\n\t}", "public void checkWorkers() throws IOExceptionFromController {\n for (Player player : players) {\n if (!player.hasLost() && player.getWorkers().size() == 0) eliminatePlayer(player, \"outOfWorkers\");\n }\n }", "public boolean allGone()\n {\n return pellets.isEmpty();\n }", "private void CheckFaintedPokemon() {\n \tif(user.getTeam(user.getCurrentPokemonIndex()).getStats().getStatus()==Status.FNT){\n \t\tuser.getTeam(user.getCurrentPokemonIndex()).getInfo().setUsedInBattle(false);\n \t\tbattleMessage.add(user.getTeam(user.getCurrentPokemonIndex()).getInfo().getNickname()+\" has lost the battle. \");\n \t\tbattleOver=true;\n \t}\n \tif(opponent.getTeam(opponent.getCurrentPokemonIndex()).getStats().getStatus()==Status.FNT){\n \t\topponent.getTeam(opponent.getCurrentPokemonIndex()).getInfo().setUsedInBattle(false);\n \t\tCalculateXP(user.getTeam(),opponent.getTeam(opponent.getCurrentPokemonIndex()));\n \t\tbattleMessage.add(opponent.getTeam(opponent.getCurrentPokemonIndex()).getInfo().getNickname()+\" has lost the battle. \");\n \t\tbattleOver=true;\n \t}\n \t\n }", "private void checkResults() {\n\n if (Dealer.calcTotal() == p1.calcTotal()) {\n System.out.println(\"You and the dealer Tie, Here is your money back.\");\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (p1.calcTotal() > Dealer.calcTotal() && !bust) {\n System.out.println(\"You win!\");\n totalWinnings += betNum;\n p1.addPointCount(betNum);\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (Dealer.calcTotal() > 31) {\n System.out.println(\"Dealer busts. You Win!\");\n totalWinnings += betNum;\n p1.addPointCount(betNum);\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (Dealer.getTotal() > p1.calcTotal() && Dealer.getTotal() < 32) {\n System.out.println(\"Dealer Wins.\");\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n p1.subPointCount(betNum);\n }\n }", "public void kickOut(){\n Iterator<Player> iter = players.iterator();\n while (iter.hasNext()){\n Player player = iter.next();\n if(player.isBankrupt(minBet)){\n iter.remove();\n System.out.println(player + \" runs out of cash!\");\n }\n }\n }", "private void check4voteAndClean()\n\t{\n\t\tif( noBeepersPresent())\n\t\t{\tturnLeft();\n\t\t\tmove();\n\t\t\tpickAll();\n\t\t\tturnAround();\n\t\t\tmove();\n\t\t\tmove();\n\t\t\tpickAll();\n\t\t\tturnAround();\n\t\t\tmove();\n\t\t\tturnRight();\n\t\t}\n\t}", "public boolean allCalculationsDone() {\r\n return progressBarMap.isEmpty();\r\n }", "public void clearingResult() {\n\t\tview.writeLog(\"----All players have stopped drawing cards.----\");\n\t\tcountAllPoints();\n\t\tint dealerPoints = dealer.points;\n\t\tview.writeLog(\"The dealer (\" + dealer.name +\") got \"+ dealerPoints+\" points.\");\n\t\tfor(ClientThread player: players) {\n\t\t\tif(player != dealer) {\n\t\t\t\tif(dealerPoints > player.points) {\t//Losers.\n\t\t\t\t\tplayer.send(new Package(\"MESSAGE\",\"Dealer: \"+dealerPoints +\", you: \"+player.points+\". You lose a stack.\"));\n\t\t\t\t\tplayer.send(new Package(\"END\",-1));\n\t\t\t\t\tlosers ++;\n\t\t\t\t}else if(dealerPoints < player.points){\t//Winners.\n\t\t\t\t\tplayer.send(new Package(\"MESSAGE\",\"Dealer: \"+dealerPoints +\", you: \"+player.points+\". You win a stack.\"));\n\t\t\t\t\tplayer.send(new Package(\"END\",1));\n\t\t\t\t\twinners ++;\n\t\t\t\t}else {\t//Those who have same points with dealer.\n\t\t\t\t\tplayer.send(new Package(\"MESSAGE\",\"Dealer: \"+dealerPoints +\", you: \"+player.points+\". Your stacks remains.\"));\n\t\t\t\t\tplayer.send(new Package(\"END\",0));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Deal with the dealer.\n\t\tint dealerStackChange = losers - winners;\n\t\tview.writeLog(\"The dealer wins \"+ dealerStackChange +\"stack(s).\");\n\t\tdealer.send(new Package(\"MESSAGE\",winners +\" player defeat you, \"+losers+\" lose. Stack change: \"+dealerStackChange));\n\t\tdealer.send(new Package(\"END\", dealerStackChange));\n\t\tendGame();\n\t}", "@Override\n public void waitForAllInBoard() {\n this.lock.lock();\n try {\n // update pilot state\n this.repository.updatePilotState(PilotState.WAIT_FOR_BOARDING);\n\n // wait for all passengers\n while (!this.planeReadyToTakeOff) {\n this.pilotWaitForAllInBoard.await();\n }\n this.planeReadyToTakeOff = false;\n\n // update pilot state\n this.repository.updatePilotState(PilotState.FLYING_FORWARD);\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n this.lock.unlock();\n }\n }", "public boolean allPlayersReady() {\r\n for (Player player : players) {\r\n if (!player.isReady()) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public boolean isDone(){\n\t\tif(generated)\n\t\t\treturn curr >= deck.size();\n\t\treturn true;\n\t}", "public boolean gameContinue() {\n for (Player player : players) {\n if (player.getPoints() > END_GAME_POINTS) {\n return false;\n }\n }\n return true;\n }", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "private void recruitThingsPhase() {\n\n ClickObserver.getInstance().setTerrainFlag(\"RecruitingThings: PlaceThings\");\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(false);\n }\n });\n int numToDraw = 0;\n boolean flag;\n \n for (final Player p : playerList) {\n doneClicked = false;\n this.player = p;\n player.flipAllUp();\n ClickObserver.getInstance().setActivePlayer(player);\n flag = true;\n pause();\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getHelpText().setText(\"Recruitment Phase: \" + p.getName()\n + \", draw free/paid Things from The Cup, then click 'done'\");\n GUI.getRackGui().setOwner(player);\n TheCupGUI.update();\n }\n });\n \n while (isPaused) {\n while (!doneClicked) {\n if (freeClicked) {\n if (flag) {\n System.out.println(player.getName() + \" -clicked free\");\n numToDraw = (int)Math.ceil(player.getHexesOwned().size() / 2.0);\n System.out.println(numToDraw + \" -num to draw\");\n final int finNumToDraw = numToDraw;\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n TheCupGUI.setFieldText(\"\"+finNumToDraw);\n }\n });\n flag = false;\n }\n }\n if (paidClicked) {\n flag = true;\n if (flag) {\n \tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n \tPlayerBoard.getInstance().updateGold(player);\n }\n });\n flag = false;\n }\n }\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n player.flipAllDown();\n }\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(true);\n }\n });\n\n ClickObserver.getInstance().setTerrainFlag(\"\");\n }", "public boolean blockedGame() {\r\n int pointsperplayer = 0;\r\n if (playedDominoes.size() > 9) {\r\n if (end[0] == end[1]) {\r\n List<Domino> aux = new ArrayList();\r\n for (Domino d : playedDominoes) {\r\n if (d.getBothNumbers().contains(end[0])) {\r\n System.out.println(\"Adding domino\" + d.toString());\r\n aux.add(d);\r\n }\r\n }\r\n return aux.size() == 7;\r\n }\r\n }\r\n return false;\r\n }", "public static boolean isPlayersSetupDone() {\r\n\t\tboolean playersNamed = true;\r\n\r\n\t\t//Check if all the choice boxes have been selected.\r\n\t\tif (GameSetup.choiceBoxPlayer1.getSelectedIndex() == -1\r\n\t\t\t\t|| GameSetup.choiceBoxPlayer1.getSelectedIndex() == 0) {\r\n\t\t\tplayersNamed = false;\r\n\t\t}\r\n\t\tif (GameSetup.choiceBoxPlayer2.getSelectedIndex() == -1\r\n\t\t\t\t|| GameSetup.choiceBoxPlayer2.getSelectedIndex() == 0) {\r\n\t\t\tplayersNamed = false;\r\n\t\t}\r\n\t\tif (GameSetup.choiceBoxPlayer3.getSelectedIndex() == -1\r\n\t\t\t\t|| GameSetup.choiceBoxPlayer3.getSelectedIndex() == 0) {\r\n\t\t\tplayersNamed = false;\r\n\t\t}\r\n\t\t\r\n\t\t//Don't show fourth player if playing 3 handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tif (GameSetup.choiceBoxPlayer4.getSelectedIndex() == -1\r\n\t\t\t\t\t|| GameSetup.choiceBoxPlayer4.getSelectedIndex() == 0) {\r\n\t\t\t\tplayersNamed = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Show dialog box reminder.\r\n\t\tif (!playersNamed) FrameUtils.showDialogBox(\"All players must be selected.\");\r\n\t\t\r\n\t\t//Save player names.\r\n\t\tsavePlayerNames();\r\n\t\t\r\n\t\treturn playersNamed;\r\n\t}", "public boolean checkIfAllSunk(int PlayerOrAI)\n\t{\n\n\n\t\tint numberOfAIorPlayerShipsSunk = 0;\n\t\t//System.out.println(\"got to place ONE\");\n\t\t\n\n\t\tif (PlayerOrAI == 1)\n\t\t{\n\t\t\tfor(int x = 0; x < 2; x++) //aiBattleShipsList.length\n\t\t\t{\n\t\t\t\tif(aiBattleShipsList[x].getIsSunk())\n\t\t\t\t{\n\t\t\t\t\tnumberOfAIorPlayerShipsSunk++;\n\t\t\t\t\t//System.out.println(\"2\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(numberOfAIorPlayerShipsSunk == 2) \n\t\t\t{\n\t\t\t\tSystem.out.println(\"The Player has won!\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}\n\t\telse if (PlayerOrAI == 0)\n\t\t{\n\t\t\tfor(int x = 0; x < playerBattleShipsList.length; x++)\n\t\t\t{\t\n\t\t\t\tif(playerBattleShipsList[x].getIsSunk()){\n\t\t\t\t\tnumberOfAIorPlayerShipsSunk++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(numberOfAIorPlayerShipsSunk == 5) \n\t\t\t{\n\t\t\t\tSystem.out.println(\"The AI has won, unlucky\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public void tryDeal() {\n if(previousTie){\n previousTie = false;\n emptyHands();\n shuffle();\n }\n if (player.getBet() < 2) {\n errorFlag = true;\n userMessage = \"You must bet a minimum of $2\";\n return;\n } else if (player.getHand().size() > 0) {\n errorFlag = true;\n userMessage = \"You have already been dealt your initial hand\";\n return;\n } else {\n player.setHand(deal(player.getHand(), 2));\n if (player.getHand().get(0).getValue() == player.getHand().get(1).getValue()) {\n //User can split if they want to\n userMessage = \"Hit, Stand or Split\";\n splitDisabled = false;\n }else{\n userMessage = \"Hit or Stand\";\n }\n dealDisabled = true;\n againDisabled = true;\n doubleDisabled = false;\n standDisabled = false;\n hitDisabled = false;\n bettingDisabled = true;\n }\n }", "public void checkEndGame() {\n\t\t\n\t\tboolean gameFinished = false;\n\t\t//boolean playerOne = false;\n\t\t//boolean playerTwo = false;\n\t\t\n\t\t\n\t\tif (bucket[13].getnumOfRocks() == 0 && bucket[12].getnumOfRocks() == 0 && bucket[11].getnumOfRocks() == 0\n\t\t\t\t&& bucket[10].getnumOfRocks() == 0 && bucket[9].getnumOfRocks() == 0\n\t\t\t\t&& bucket[8].getnumOfRocks() == 0) {\n\n\t\t\tint left = bucket[6].getnumOfRocks() + bucket[5].getnumOfRocks() + bucket[4].getnumOfRocks()\n\t\t\t\t\t+ bucket[3].getnumOfRocks() + bucket[2].getnumOfRocks() + bucket[1].getnumOfRocks()\n\t\t\t\t\t+ bucket[0].getnumOfRocks();\n\n\t\t\tbucket[0].setnumOfRocks(left, c);\n\t\t\tbucket[6].setnumOfRocks(0, c);\n\t\t\tbucket[5].setnumOfRocks(0, c);\n\t\t\tbucket[4].setnumOfRocks(0, c);\n\t\t\tbucket[3].setnumOfRocks(0, c);\n\t\t\tbucket[2].setnumOfRocks(0, c);\n\t\t\tbucket[1].setnumOfRocks(0, c);\n\t\t\t\n\t\t\tgameFinished = true;\n\t\t}\n\n\t\tif (bucket[1].getnumOfRocks() == 0 && bucket[2].getnumOfRocks() == 0 && bucket[3].getnumOfRocks() == 0\n\t\t\t\t&& bucket[4].getnumOfRocks() == 0 && bucket[5].getnumOfRocks() == 0 && bucket[6].getnumOfRocks() == 0) {\n\n\t\t\tint right = bucket[13].getnumOfRocks() + bucket[12].getnumOfRocks() + bucket[11].getnumOfRocks();\n\t\t\tright = right + bucket[10].getnumOfRocks() + bucket[9].getnumOfRocks() + bucket[8].getnumOfRocks()\n\t\t\t\t\t+ bucket[7].getnumOfRocks();\n\n\t\t\tbucket[7].setnumOfRocks(right, c);\n\t\t\tbucket[13].setnumOfRocks(0, c);\n\t\t\tbucket[12].setnumOfRocks(0, c);\n\t\t\tbucket[11].setnumOfRocks(0, c);\n\t\t\tbucket[10].setnumOfRocks(0, c);\n\t\t\tbucket[9].setnumOfRocks(0, c);\n\t\t\tbucket[8].setnumOfRocks(0, c);\n\n\t\t\tgameFinished = true;\n\t\t}\n\t\t\n\t\t\n\t\tif(gameFinished==true){\n\t\t\tif(bucket[7].getnumOfRocks()<bucket[0].getnumOfRocks()){\n\t\t\t\tplayerOne=true;\n\t\t\t}else{\n\t\t\t\tplayerTwo=true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*if(playerOne==true){\n\t\t\tSystem.out.println(\"Player A won\");\n\t\t}\n\t\tif(playerTwo == true){\n\t\t\tSystem.out.println(\"Player B won\");\n\t\t}\n\t\t */\n\t\t\n\t}", "public boolean isSolved() {\n return towers[0].empty() && towers[1].empty() && towers[2].size() == numDisks;\n }", "public boolean isComplete() {\n return addedFrontWork.size() == 0 && addedBackWork.size() == 0 && sawAllDone.get();\n }", "public void run() {\r\n for(int i = group; i < 64; i += 4) {\r\n if(!m_teams[i].isOut()) {\r\n setSurvivingTeam(m_teams[i]);\r\n return;\r\n }\r\n }\r\n\r\n m_botAction.sendArenaMessage(\"No one won for Base \" + (group + 1));\r\n }", "void concludeRound() {\n\n ArrayList<Card> currentTopCards = getCurrentTopCards();\n transferCards(roundWinner, currentTopCards);\n eliminatePlayers();\n\n logger.log(\"Communal Deck: \" + deck);\n logger.log(divider);\n for (Player player : players) {\n logger.log(\"Hand: \" + player);\n }\n\n logger.log(\"Round complete.\");\n\n setGameState(GameState.ROUND_COMPLETE);\n }", "public boolean finished() {\n\t\t\n\t\tfor ( int i = 0; i <this.num; i++) {\n\t\t\tif (this.car[i]!=null) {\n\t\t\t\tif (this.car[i].checkFinished()==false) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public static void checkAllPlayers()\n\t{\n\t\ttry {\n\t\t\tSystem.out.println(outFile.getName()+\": \");\n\t\t\twriter = new FileWriter(outFile);\n\t\t\tfor(int i = 0; i < entrants.length; i++)\n\t\t\t{\n\t\t\t\tcheckIndex = i;\n\t\t\t\tcheckPlayer();\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\twriter.close();\n\t\t}catch(IOException e) {\n\t\t\tSystem.out.println(\"problem with output\");\n\t\t\t//return false;\n\t\t\t//System.exit(1);\n\t\t}\n\t}", "private boolean isGameEnded() {\n int playerOneRemainingSeeds = 0;\n int playerTwoRemainingSeeds = 0;\n\n boolean isEnded = false;\n\n Player playerOne = mContainersManager.getOwnerOf(0);\n Player playerTwo = mContainersManager.getOwnerOf(7);\n\n for (int i = 0 ; i < mNumberOfBowls; i++) {\n playerOneRemainingSeeds += mContainersManager.getNumberOfSeedsOf(i);\n }\n for (int j = (mNumberOfBowls + mNumberOfTrays) ; j < (mContainersManager.getNumberContainers() - 1); j++) {\n playerTwoRemainingSeeds += mContainersManager.getNumberOfSeedsOf(j);\n }\n\n if ((playerOneRemainingSeeds == 0) || (playerTwoRemainingSeeds == 0)) {\n isEnded = true;\n }\n\n // If the game is ended put all remaining seeds in the player bowl_selected and find the winner\n if (isEnded) {\n if (playerOneRemainingSeeds > 0) {\n for (int j = 0; j < mNumberOfBowls; j++) {\n mContainersManager.emptyBowl(j);\n }\n mContainersManager.putSeedsInTrayOf( playerOne, playerOneRemainingSeeds);\n } else {\n for (int j = (mNumberOfBowls + mNumberOfTrays);\n j < (mContainersManager.getNumberContainers() -1); j++)\n {\n mContainersManager.emptyBowl(j);\n }\n mContainersManager.putSeedsInTrayOf(playerTwo, playerTwoRemainingSeeds);\n }\n setWinner();\n }\n\n return isEnded;\n }", "public boolean checkWithFragmentingWarhead ()\n {\n List<Player> players = new ArrayList<>();\n\n for (Player playerIterate : player.playerThatSee(player.getSquare().getGameBoard()))\n {\n if (playerIterate.getSquare() != player.getSquare())\n players.add(playerIterate);\n }\n\n for (Player playerIterate : players)\n {\n if (playerIterate.getSquare().getPlayerList().size()>1)\n return true;\n }\n\n return false;\n }", "public boolean needsRepairing() {\n boolean returner = false;\n for (Pouch pouch : pouchesUsed) {\n returner = returner || pouch.needsRepair();\n }\n return returner;\n }", "public boolean checkWithFragmentingWarheadRocketJump ()\n {\n Map<Square, List<Player>> squarePlayerListMap = checkRocketJump();\n List<Player> playerList;\n\n for (Square squareIterate : squarePlayerListMap.keySet())\n {\n\n for (Player playerIterate : squarePlayerListMap.get(squareIterate))\n {\n playerList = new ArrayList<>();\n\n playerList.addAll(playerIterate.getSquare().getPlayerList());\n playerList.remove(player);\n\n if (playerList.size()>1)\n return true;\n\n }\n }\n\n return false;\n }", "@Override\r\n public boolean checkAllDecksEmpty(int plDeckPosition) {\r\n // Are all the decks empty\r\n boolean flag = true;\r\n \r\n // Loop through all decks at deck position for each player\r\n for (Player player : this.players) {\r\n if (!player.isDeckEmpty(plDeckPosition)) {\r\n flag = false;\r\n }\r\n }\r\n \r\n // Return the value\r\n return flag;\r\n }", "@Override\n public boolean currentPlayerHavePotentialMoves() {\n return !checkersBoard.getAllPotentialMoves(getCurrentPlayerIndex()).isEmpty();\n }", "public boolean deal() {\n int k, j;\n boolean enoughCards;\n\n // clear all hands\n for (j = 0; j < numPlayers; j++)\n hand[j].resetHand();\n\n enoughCards = true;\n for (k = 0; k < numCardsPerHand && enoughCards; k++) {\n for (j = 0; j < numPlayers; j++)\n if (deck.getNumCards() > 0)\n hand[j].takeCard(deck.dealCard());\n else {\n enoughCards = false;\n break;\n }\n }\n\n return enoughCards;\n }", "public void checkBombs() {\n for (Bomb bomb : bombs) {\n if (ship.intersects(bomb)) {\n ship.die();\n bomb.die();\n }\n\n if (bomb.getY() >= height)\n bomb.die();\n }\n }", "public void checkFinished() {\n int check = 0;\n for (int i = 0; i < cards.size(); i++) {\n if (cards.get(i).getTurned() == true) {\n check++;\n }\n }\n if (check == cards.size()) {\n clip.stop();\n resultGUI = new ResultGUI(p1Points, p2Points);\n resultGUI.setSize(700, 500);\n resultGUI.setVisible(true);\n setVisible(false);\n }\n }", "public void getChampionBans() {\n\t\tcreateBlueBanHighlight();\n\t\tcreatePurpleBanHighlight();\n\t\tblueBan = true;\n\t\tArrayList<String> temp = CHAMPIONLIST;\n\t while (numBlueBans < 3 || numPurpleBans < 3) {\n\t \ttry {\n\t \t\tArrayList<String> aL = findChampions();\n\t \t\tif (!aL.equals(temp)) {\n\t \t\t\taddChampions(panel, aL);\n\t \t\t\ttemp = aL;\n\t \t\t}\n\t \t\tThread.sleep(100);\n\t \t} catch (InterruptedException e) {\n\t \t\tcontinue;\n\t \t}\n\t }\n\t}", "public void endRound() {\n if (!myTurn()) {\n return;\n }\n if (this.board.getWinners().size() > 0 && this.playerId == board.getPlayers().get(board.getPlayers().size() - 1).playerId) {\n this.board.setRunning(false);\n }\n // currentPlayerNumber = (currentPlayerNumber + 1) % players.size();\n // current = players.get(currentPlayerNumber);\n this.removableBlockades = new ArrayList<>();\n coins = (float) 0;\n bought = false;\n specialAction.setDraw(0);\n specialAction.setRemove(0);\n specialAction.setSteal(0);\n history = new ArrayList<>();\n //for (int i = tmpDiscardPile.size(); i > 0; i--){\n // discardPile.add(tmpDiscardPile.remove(0));\n //}\n discardPile.addAll(tmpDiscardPile);\n tmpDiscardPile = new ArrayList<Card>();\n draw();\n board.endRound();\n }", "public boolean isDone() {\r\n\t\tint count = 0;\r\n\t\t//Checks the movieGuess array for '_' characters. If there are none we can safely assume the player has finished.\r\n\t\tfor(int x = 0; x < movieGuess.length; x++) {\r\n\t\t\tif(movieGuess[x] == '_')\t{\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//used a counter to avoid premature (i.e., before finishing the array traversal) true or false.\r\n\t\tif(count > 0)\r\n\t\t\treturn false;\t\r\n\t\telse\r\n\t\t\treturn true;\r\n\t}", "public boolean allSet(Player [] players) {\n\t\tfor (int i = 0; i < players.length; i++) {\n\t\t\tif (!players[i].allSet()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public int canPoseBombAndStillBeSafe() {\n Player currentPlayer = state.getCurrentPlayer();\n List<Player> players = state.getPlayers();\n Maze maze = state.getMaze();\n Cell[][] tabcells = maze.getCells();\n for (Player p : players) {\n if (!p.equals(currentPlayer)) {\n if (canBombThisEnemyAndRunSafe(currentPlayer,p)) {\n return 1;\n }\n }\n }\n return 0;\n }", "protected boolean processPlayerOfferedTakeback(int gameNum, String playerName, int takebackCount){\n return false;\n }", "public boolean isFinished() {\n\t\tif ((player1_moves | player2_moves) == COMPLETE) {\n\t\t\tfinished = true;\n\t\t\tcurrentPlayer = '\\0';\n\t\t}\n\t\tfor (int i : winning_cases) {\n\t\t\tif ((player1_moves & i) == i) {\n\t\t\t\twinner = 'X';\n\t\t\t\tfinished = true;\n\t\t\t} else if ((player2_moves & i) == i) {\n\t\t\t\twinner = 'O';\n\t\t\t\tfinished = true;\n\t\t\t}\n\t\t}\n\t\treturn finished;\n\t}", "@Override\n\tpublic boolean endChk() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tif ( rowChoice == 0 || totalPebbles == 0 ){\n\t\t\trunGame = false;\n\t\t}\n\t\treturn runGame;\n\t}", "public boolean deal()\n {\n int k, j;\n boolean enoughCards;\n\n // clear all hands\n for (j = 0; j < numPlayers; j++)\n hand[j].resetHand();\n\n enoughCards = true;\n for (k = 0; k < numCardsPerHand && enoughCards ; k++)\n {\n for (j = 0; j < numPlayers; j++)\n if (deck.getNumCards() > 0)\n hand[j].takeCard( deck.dealCard() );\n else\n {\n enoughCards = false;\n break;\n }\n }\n\n return enoughCards;\n }", "public boolean won()\n {\n for(int i=0;i<4;i++)\n {\n if(foundationPile[i].isEmpty() || foundationPile[i].peek().getRank()!=Rank.KING)\n return false; \n }\n return true;\n }", "public synchronized boolean isFull() {\r\n\t\treturn (this.players.size() == 6);\r\n\t}", "private boolean isComplete() {\n for (boolean b : bitfield) {\n if (!b) {\n return false;\n }\n }\n return true;\n }", "public boolean allPlayersReady() {\n // Si un jugador esta offline, lo ignora\n for (Player p : players) {\n if (p.isOnline() && !p.isReady())\n return false;\n }\n return true;\n }", "public boolean isSolved(){ return getRemainingValues() == 0; }", "private boolean allWorkComplete(int attempt) {\n boolean workComplete = (sm == null || syncManager.getFilesInTransfer().isEmpty()) &&\n list.getListSizeIncludingReservedFiles() <= 0;\n\n if (!workComplete || (workComplete && attempt > 2)) {\n return workComplete;\n } else {\n // Wait before another attempt\n SyncProcessManagerImpl.this.sleep(2000);\n return allWorkComplete(attempt + 1);\n }\n }", "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 }", "public boolean continueGame(){\n for (Player p : super.getPlayers()) {\n // check if p is dead\n if (p.isDead()) {\n return false;\n }\n }\n return true;\n }", "public boolean checkForEndgame() {\n\t\tCalculatePossibleMoves(true);\n\t\tint blackMoves = getNumberOfPossibleMoves();\n\t\tCalculatePossibleMoves(false);\n\t\tint redMoves = getNumberOfPossibleMoves();\n\t\t\n\t\tif (blackMoves == 0 && redMoves == 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "@Override\n public void setPlayerDoneBrainstorming(Player player, boolean value){\n DatabaseReference currentRef = database.getReference(gameCodeRef).child(\"Players\").child(player.getUsername());\n currentRef.child(\"DoneBrainstorming\").setValue(value);\n if(value){\n updateNrPlayerValues(\"PlayersDoneBrainstorming\");\n }\n }", "public boolean playersFilled() throws SQLException {\n\t\ttry {\n\t\t\tif (getPlayers().last() == true) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn false;\n\t}", "public void allPlayerLivesAreGone() {\n\t\t\n\t\t// If player01 has 0 lives..\n\t\tif(player01.getPlayerLives() == 0){\n\t\t\t\n\t\t\t// Invoke.\n\t\t\tplayer02.incrementNumberOfGamesWon();\n\t\t\t\n\t\t\t// Display message.\n\t\t\tSystem.out.println(\"Player 01 has no more lives left.\");\n\t\t\tSystem.out.println(\"------------------------\");\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"Player 02 wins the game!\");\n\t\t\tSystem.out.println(\"Well done Player 02!\");\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"------------------------\");\n\n\t\t\t// If player02 has 0 lives..\n\t\t} else {\n\t\t\t\n\t\t\tplayer01.incrementNumberOfGamesWon();\n\n\t\t\tSystem.out.println(\"Player 02 has no more lives left.\");\n\t\t\tSystem.out.println(\"------------------------\");\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"Player 01 wins the game!\");\n\t\t\tSystem.out.println(\"Well done Player 01!\");\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"------------------------\");\n\t\t}\t\t\n\t}", "private boolean incrementGazingCountAndCheck(int beingId,\n Palantir palantir) {\n // TODO - You fill in here.\n // @@ Something(s) important are missing here! Read the spec above..\n // @@ Fixed by adding the shutdown call in else statement\n if(mGazingThreads.incrementAndGet() <= mBeingCount.get()){\n return true;\n }\n else{\n //Shutdown if there has been an error and there are more\n //gazers than Palantiri\n mPresenter.shutdown();\n return false;\n }\n }", "public boolean endOfGame() {\n\t\tfor(CardGamePlayer player : playerList) {\n\t\t\tif(gameStarted && player.getNumOfCards() == 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static void playerEffectivelyEndsBattlePhase() {\r\n for (int index = 1; index <= 5; index++){\r\n SummonedMonster MonsterCPU = SummonedMonster.getNthSummonedMonster(index, false);\r\n if (MonsterCPU.isExisting) {\r\n MonsterCPU.canStillAttackThisTurn = false;\r\n }\r\n }\r\n endAttack(false);\r\n }", "public boolean completed(){\n int count = 0;\n for(int Y=0; Y<size; Y++){\n for(int X=0; X<size; X++){\n if(tiles[X][Y] instanceof EindVeld){\n EindVeld tmp = (EindVeld)tiles[X][Y];\n if(tmp.hasDoos())\n count++;\n }\n }\n }\n \n if(eindVelden == count){\n System.out.println(\"DOOLHOF COMPLEET !!!\");\n return true;\n }else{\n return false;\n }\n }", "public boolean roadBlocked(Player player)\n {\n int num = 0;\n int num2 = 0;\n int num3 = 0;\n if (person_to_play == 1)\n {\n num = check4CollisionWithRed(player);\n num2 = check4CollisionWithGreen(player);\n num3 = check4CollisionWithYellow(player);\n }\n else if (person_to_play == 2)\n {\n //println(\"inside road block\");\n num = check4CollisionWithBlue(player);\n num2 = check4CollisionWithGreen(player);\n num3 = check4CollisionWithYellow(player);\n //println(\"num=\"+num);\n }\n else if (person_to_play == 3)\n {\n num = check4CollisionWithBlue(player);\n num2 = check4CollisionWithRed(player);\n num3 = check4CollisionWithYellow(player);\n }\n else if (person_to_play == 4)\n {\n num = check4CollisionWithBlue(player);\n num2 = check4CollisionWithRed(player);\n num3 = check4CollisionWithGreen(player);\n }\n if (num > 1 || num2 > 1 || num3 > 1)\n {\n return true;\n }\n return false;\n }", "public static void isSolutionComplete(boolean[][] flag)\r\n\t{\r\n\t\tboolean indivFlag = true;\r\n\t\t\r\n\t\tfor(int i = 0; i < 9; ++i)\r\n\t\t{\r\n\t\t\tfor(int j = 0; j < 9; ++j)\r\n\t\t\t{\r\n\t\t\t\tif(flag[i][j] == false)\r\n\t\t\t\t{\r\n\t\t\t\t\tindivFlag = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(indivFlag == true)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(null, \"You finished the game\");\r\n\t\t}\r\n\t}", "public boolean runBattle() {\n // loop the battles here\n\n //battleAllies.addAll(structures);\n\n battle();\n \n findDefeated();\n cleanStatuses();\n \n // End condition of battle is: all enemies die, or character dies\n if(character.getCurrHP() <= 0){\n return false;\n } else {\n result = true;\n return true;\n }\n }", "public void clear() {\n for (int i = 0; i < if_you_items.length; i++) {\n if_you_items[i].setEnabled(true);\n }\n for (int i = 0; i < then_we_items.length; i++) {\n then_we_items[i].setEnabled(true);\n }\n non_promised_ministries.clear();\n non_promised_ministries.addAll(all_ministries);\n // if not at war, can't ask/offer peace\n if (game.getDiplomacy().getDiplomaticState(game.getTurn(), faction) != C.DS_WAR) {\n if_you_items[IfYouWill.PEACE.ordinal()].setEnabled(false);\n then_we_items[ThenWeWill.PEACE.ordinal()].setEnabled(false);\n }\n if (faction > C.HOUSE5) { // non-house\n non_promised_ministries.clear();\n if_you_items[IfYouWill.TECH.ordinal()].setEnabled(false);\n then_we_items[ThenWeWill.TECH.ordinal()].setEnabled(false);\n if_you_items[IfYouWill.VOTES.ordinal()].setEnabled(false);\n then_we_items[ThenWeWill.VOTES.ordinal()].setEnabled(false);\n return;\n }\n // search for promised votes and ministries in pending contracts of sender\n for (Contract con : game.getDiplomacy().getSentContracts()) {\n for (Term term : con.getTerms()) {\n if (term.getDonor() == game.getTurn()) {\n switch (term.getType()) {\n case VOTES:\n System.out.println(\"DBG no votes\");\n then_we_items[ThenWeWill.VOTES.ordinal()].setEnabled(false);\n break;\n case MINISTRY:\n non_promised_ministries.remove(new Integer(term.getAmount()));\n break;\n case MONEY:\n break;\n case STATE:\n break;\n case TECH:\n break;\n default:\n throw new AssertionError();\n }\n }\n if (term.getDonor() == faction) {\n switch (term.getType()) {\n case VOTES:\n System.out.println(\"DBG no votes\");\n if_you_items[IfYouWill.VOTES.ordinal()].setEnabled(false);\n break;\n case MINISTRY:\n non_promised_ministries.remove(new Integer(term.getAmount()));\n break;\n case MONEY:\n break;\n case STATE:\n break;\n case TECH:\n break;\n default:\n throw new AssertionError();\n }\n }\n }\n }\n // search for promised votes and ministries for sender and for receiver\n // those that are made with sender\n if (game.getRegency().getVotes()[game.getTurn()][Regency.CANDIDATE_IDX] > -1\n || game.getRegency().getVotes()[faction][Regency.CANDIDATE_IDX] == game.getTurn()) {\n then_we_items[ThenWeWill.VOTES.ordinal()].setEnabled(false);\n if_you_items[IfYouWill.VOTES.ordinal()].setEnabled(false);\n }\n int[] promises = game.getDiplomacy().getMinistryPromises(game.getTurn());\n for (int i = 0; i < promises.length; i++) {\n if (promises[i] > -1) {\n non_promised_ministries.remove(new Integer(promises[i]));\n }\n }\n promises = game.getDiplomacy().getMinistryPromises(faction);\n for (int i = 0; i < promises.length; i++) {\n if (promises[i] == game.getTurn()) {\n non_promised_ministries.remove(new Integer(promises[i]));\n }\n }\n if (non_promised_ministries.isEmpty()) {\n then_we_items[ThenWeWill.MINISTRY.ordinal()].setEnabled(false);\n if_you_items[IfYouWill.MINISTRY.ordinal()].setEnabled(false);\n }\n }", "public boolean endOfGame() {\n\t\tfor (int i = 0; i < getNumOfPlayers(); i++) {\n\t\t\tif (this.getPlayerList().get(i).getCardsInHand().isEmpty()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "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 static void clearBidsMade() {\r\n\t\tFrameUtils.player1Bid.select(\"\");\r\n\t\tFrameUtils.player2Bid.select(\"\");\r\n\t\tFrameUtils.player3Bid.select(\"\");\r\n\t\t\r\n\t\tMain.player1Bid = \"\";\r\n\t\tMain.player2Bid = \"\";\r\n\t\tMain.player3Bid = \"\";\r\n\t\t\r\n\t\t//Only clear the fourth player bid if playing 3 handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tFrameUtils.player4Bid.select(\"\");\r\n\t\t\tMain.player4Bid = \"\";\r\n\t\t}\r\n\t}", "public static void checkQueue(){\n if(Duel.getLobby().getQueue().size() >= 2){\n Duel.getGameManager().startingAGame();\n// for(Player player : Bukkit.getOnlinePlayers()){\n// if(Lobby.getQueue().get(0).equals(player.getUniqueId()) || Lobby.getQueue().get(1).equals(player.getUniqueId())){\n// Duel.getGameManager().startingAGame();\n// }\n// for(UUID uuid : Lobby.getQueue()){\n// Duel.getGameManager().startingAGame();\n// }\n }\n }", "public void endGame()\r\n {\r\n for (Cell c : gameBoard.bombList)\r\n {\r\n if (c.isBomb())\r\n {\r\n if (c.getText() == \"X\")\r\n {\r\n c.setId(\"correctFlag\");\r\n }\r\n else\r\n {\r\n c.setId(\"bombClicked\");\r\n }\r\n }\r\n else if (c.getText() == \"X\")\r\n {\r\n c.setId(\"incorrectFlag\");\r\n }\r\n c.setDisable(true);\r\n }\r\n if (gameBoard.emptyRemaining == 0)\r\n {\r\n win();\r\n }\r\n else\r\n {\r\n lose();\r\n }\r\n System.out.println(\"Game Over...\");\r\n scoreBoard.resetBtn.setDisable(false);\r\n }", "public boolean placementDone() {return placedShips == 4;}", "public boolean isGameWon(){\r\n for(Card c: this.cards){\r\n if (c.getFace() == false){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "void done(boolean allSucceeded);", "private void dealerTurns()\r\n\t{\r\n\t\t// loops until dealer stands or wins/loses\r\n\t\twhile ( !dealer.getStand() && !endGame )\r\n\t\t{\r\n\t\t\t// checks total score of dealer's hand\r\n\t\t\tif ( dealer.getTotal() < 17)\r\n\t\t\t{\r\n\t\t\t\t// adds card to dealer hand from cardDeck\r\n\t\t\t\tdealer.hit( cardDeck.draw() );\r\n\t\t\t\t\r\n\t\t\t\t// displays current dealer hand\r\n\t\t\t\tdisplayPlayerCards(DEALER_ID);\r\n\t\t\t\t\r\n\t\t\t\t// evaluates victory conditions\r\n\t\t\t\tevaluateWin(false);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t/* Dealer stands if they reach or already have 17 points in their hand.\r\n\t\t\t\tNo evaluation is called, because this will be handled by the final victory check. */\r\n\t\t\t\tdealer.stand();\r\n\t\t\t} // end if else\r\n\t\t} // end while\r\n\t}", "public void askToAll() {\n\t\tfor(ClientThread player: players) {\n\t\t\tif(player != dealer)\n\t\t\t\tplayer.send(new Package(\"ASK\",null));\n\t\t\telse {\n\t\t\t\tdealer.send(new Package(\"MESSAGE\",\"As dealer, you'll wait for other players...\"));\n\t\t\t}\n\t\t}\n\t}", "private void checkGridCompletion() {\n if (this.model.getPuzzle().isFilled()) {\n if (this.model.getPuzzle().isSolved()) {\n puzzleCompleted();\n }\n }\n }", "public boolean isCompleted() {\n \n // set amount of bottles to complete the level\n int bottlesAmount = 3;\n \n // if player collects the set amount, level is completed\n if (player.getBottles() == bottlesAmount)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public static boolean processScoring() {\r\n\t\tboolean done = true;\r\n\t\tint player1Tricks = 0;\r\n\t\tint player2Tricks = 0;\r\n\t\tint player3Tricks = 0;\r\n\t\tint player4Tricks = 0;\r\n\t\t\r\n\t\t//Gets the data for three players.\r\n\t\tplayer1Tricks = FrameUtils.player1TricksTaken.getSelectedIndex();\r\n\t\tplayer2Tricks = FrameUtils.player2TricksTaken.getSelectedIndex();\r\n\t\tplayer3Tricks = FrameUtils.player3TricksTaken.getSelectedIndex();\r\n\r\n\t\t//Gets the tricks taken if playing with four players.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tplayer4Tricks = FrameUtils.player4TricksTaken.getSelectedIndex();\r\n\t\t}\r\n\r\n\t\t//Check if all the choice boxes have been selected.\r\n\t\tif (player1Tricks == -1 || player1Tricks == 0) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\tif (player2Tricks == -1 || player2Tricks == 0) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\tif (player3Tricks == -1 || player3Tricks == 0) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\t\r\n\t\t//Don't check fourth player if playing three handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tif (player4Tricks == -1 || player4Tricks == 0) {\r\n\t\t\t\tdone = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Get the value of three players tricks taken.\r\n\t\tplayer1Tricks = stringToInt(FrameUtils.player1TricksTaken.getSelectedItem());\r\n\t\tplayer2Tricks = stringToInt(FrameUtils.player2TricksTaken.getSelectedItem());\r\n\t\tplayer3Tricks = stringToInt(FrameUtils.player3TricksTaken.getSelectedItem());\r\n\t\t\r\n\t\t//Get the value of the fourth player in a four handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tplayer4Tricks = stringToInt(FrameUtils.player4TricksTaken.getSelectedItem());\r\n\t\t}\r\n\t\t\r\n\t\t//Check if tricks taken in a three handed game equals 17.\r\n\t\tif (Main.isThreeHanded) {\r\n\t\t\tif (player1Tricks + player2Tricks + player3Tricks != 17) {\r\n\t\t\t\tdone = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Check if tricks taken in a non-three-handed game equals 13.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tif (player1Tricks + player2Tricks + player3Tricks + player4Tricks != 13) {\r\n\t\t\t\tdone = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Show dialog box reminder.\r\n\t\tif (!done) FrameUtils.showDialogBox(\"Tricks taken was entered wrong.\");\r\n\t\t\t\r\n\t\t//Save tricks taken data.\r\n\t\tsaveTricksTakenData();\r\n\t\t\r\n\t\treturn done;\r\n\t}", "public boolean completed()\r\n {\r\n if(pile.size() == 13)\r\n return true;\r\n return false;\r\n }", "private boolean allReady() {\n PlayerModel[] playersInLobby = this.lobbyModel.getPlayersInLobby();\n if (playersInLobby.length <= 1)\n return false;\n for (PlayerModel pl : playersInLobby) {\n if (!pl.isReady() && !(pl instanceof ClientPlayerModel))\n return false;\n }\n return true;\n }", "public void able()\n {\n // Enable all the buttons one by one\n for (int col = 0; col < COLUMNS; col++ )\n {\n // If the column is full, disable the corresponding button\n if (chessBoard[0][col] != 0)\n {\n drop[col].setEnabled(false);\n }\n // Else enable the button\n else\n {\n drop[col].setEnabled(true);\n }\n }\n }", "public boolean checkColumn() {\n\t\t// conditions fo player X\n\t\tif ((bt[0].getText().equals(\"X\") && bt[3].getText().equals(\"X\") && bt[6].getText().equals(\"X\"))\n\t\t\t\t|| (bt[1].getText().equals(\"X\") && bt[4].getText().equals(\"X\") && bt[7].getText().equals(\"X\"))\n\t\t\t\t|| (bt[2].getText().equals(\"X\") && bt[5].getText().equals(\"X\") && bt[8].getText().equals(\"X\"))) {\n\t\t\tjtf.setText(\" PLAYER X WON!\");\n\t\t\tjtf.setForeground(Color.red);\n\t\t\tjtf.setFont(new Font(\"Arial Black\", Font.BOLD, 50));\n\t\t\tfor (i = 0; i < xo.length; i++) {\n\t\t\t\tbt[i].setEnabled(false);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t// conditions fo player O\n\t\tif ((bt[0].getText().equals(\"O\") && bt[3].getText().equals(\"O\") && bt[6].getText().equals(\"O\"))\n\t\t\t\t|| (bt[1].getText().equals(\"O\") && bt[4].getText().equals(\"O\") && bt[7].getText().equals(\"O\"))\n\t\t\t\t|| (bt[2].getText().equals(\"O\") && bt[5].getText().equals(\"O\") && bt[8].getText().equals(\"O\"))) {\n\t\t\tjtf.setText(\" PLAYER O WON!\");\n\t\t\tjtf.setForeground(Color.blue);\n\t\t\tjtf.setFont(new Font(\"Arial Black\", Font.BOLD, 50));\n\t\t\tfor (i = 0; i < xo.length; i++) {\n\t\t\t\tbt[i].setEnabled(false);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean cardsDealt(int players){\n\t\tif(deck.size()==0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\n\t\t//TODO:\n\t\t//Implement for a variable # of players\n\t}", "public void dealGame()\n {\n for(int i=0; i<7;i++)\n for(int j=i;j<7;j++)\n {\n tableauHidden[j].push(deck.deal());\n }\n }", "public Boolean questionDone() {\n Boolean questionDone = true;\n for (Boolean currentTeam : teamHasAnswered.values()) questionDone = questionDone && currentTeam;\n return questionDone;\n }" ]
[ "0.68080765", "0.58999085", "0.57700676", "0.5751559", "0.57060504", "0.5644421", "0.5632383", "0.56102914", "0.5602953", "0.55554974", "0.5536772", "0.55304027", "0.5514823", "0.5496973", "0.5495052", "0.5489859", "0.54174286", "0.5413321", "0.5405954", "0.5381949", "0.53792816", "0.5372673", "0.5365392", "0.5355775", "0.53357434", "0.532695", "0.5315867", "0.5310466", "0.52954763", "0.52954763", "0.5275901", "0.52623785", "0.52518076", "0.52512634", "0.5248626", "0.5233371", "0.5223428", "0.52193177", "0.52185345", "0.5213415", "0.5211179", "0.51907676", "0.5187874", "0.5186453", "0.51799196", "0.51745176", "0.51738137", "0.51546055", "0.5147312", "0.5141478", "0.51384175", "0.5135964", "0.5130757", "0.5108364", "0.51030713", "0.5101496", "0.51010543", "0.50991255", "0.5095786", "0.5094079", "0.5090457", "0.50835586", "0.5070949", "0.50574976", "0.50565636", "0.5048466", "0.50380033", "0.50153095", "0.5004662", "0.5003959", "0.5002701", "0.50010014", "0.49994665", "0.49879128", "0.4982475", "0.4978829", "0.4967885", "0.49636033", "0.4961744", "0.49443328", "0.49416453", "0.4940994", "0.49341628", "0.4933188", "0.49325752", "0.49301487", "0.4923115", "0.4921766", "0.4920962", "0.49193525", "0.49160284", "0.4913581", "0.49135768", "0.49065083", "0.49049374", "0.4892089", "0.48908976", "0.48890397", "0.48842922", "0.48771405" ]
0.7268466
0
Checks if all players are done eliminating by comparing the number of players with the number of players done eliminating. Sets the field AllDoneEliminating to true, PlayersDoneBrainstorming to 0, and AllDoneBrainstorming to false
private void checkPlayersDoneEliminating(int nrDoneEliminating) { if (nrDoneEliminating == nrPlayers){ database.getReference(gameCodeRef).child("AllDoneEliminating").setValue(true); database.getReference(gameCodeRef).child("PlayersDoneBrainstorming").setValue(0); database.getReference(gameCodeRef).child("AllDoneBrainstorming").setValue(false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkPlayersDoneBrainstorming(int nrDoneBrainstorming) {\n if (nrDoneBrainstorming == nrPlayers){\n database.getReference(gameCodeRef).child(\"AllDoneBrainstorming\").setValue(true);\n database.getReference(gameCodeRef).child(\"PlayersDoneEliminating\").setValue(0);\n database.getReference(gameCodeRef).child(\"AllDoneEliminating\").setValue(false);\n }\n }", "public boolean isDone() {\n //check if valid board\n assert isValidSolitaireBoard();\n if (numPiles == NUM_FINAL_PILES){\n //create array checkDonewith size NUM_FINAL_PILES\n int[] checkDone = new int[NUM_FINAL_PILES];\n \n /**\n the value in piles[i] needs to be unique, not greater than NUM_FINAL_PILES\n and no duplicates of the number\n each value is used as an index to the new array and their value is\n the checkDone's value. Eg. piles[2] = 4, checkDone[4] = 4\n if the checkDone[piles[i]] equals to piles[i], there is a duplicate.\n */\n for (int i = 0 ; i < numPiles; i++){\n if ((piles[i] <= NUM_FINAL_PILES) && (checkDone[piles[i] - 1] != piles[i])){\n checkDone[piles[i] - 1] = piles[i];\n }\n else\n return false;\n }\n return true;\n }\n else\n return false;\n }", "public static boolean canPrune() {\n\t\tboolean result = false;\n\t\tint projectedTotal = 0;\n\t\t\n\t\tint i = 0;\n\t\twhile(i<jobsChosen){\n\t\t\tprojectedTotal += board[i][currentCombo[i]];\n\t\t\ti++;\n\t\t}\n\t\twhile(i<numPeople){\n\t\t\tprojectedTotal += bestPossibleCombination[i];\n\t\t\ti++;\n\t\t}\n\t\tif(projectedTotal<bestTotal){//Cant be greater than current Best Total\n\t\t\tresult = true;\n\t\t}\n\t\treturn result;\n\t}", "public void clearingResult() {\n\t\tview.writeLog(\"----All players have stopped drawing cards.----\");\n\t\tcountAllPoints();\n\t\tint dealerPoints = dealer.points;\n\t\tview.writeLog(\"The dealer (\" + dealer.name +\") got \"+ dealerPoints+\" points.\");\n\t\tfor(ClientThread player: players) {\n\t\t\tif(player != dealer) {\n\t\t\t\tif(dealerPoints > player.points) {\t//Losers.\n\t\t\t\t\tplayer.send(new Package(\"MESSAGE\",\"Dealer: \"+dealerPoints +\", you: \"+player.points+\". You lose a stack.\"));\n\t\t\t\t\tplayer.send(new Package(\"END\",-1));\n\t\t\t\t\tlosers ++;\n\t\t\t\t}else if(dealerPoints < player.points){\t//Winners.\n\t\t\t\t\tplayer.send(new Package(\"MESSAGE\",\"Dealer: \"+dealerPoints +\", you: \"+player.points+\". You win a stack.\"));\n\t\t\t\t\tplayer.send(new Package(\"END\",1));\n\t\t\t\t\twinners ++;\n\t\t\t\t}else {\t//Those who have same points with dealer.\n\t\t\t\t\tplayer.send(new Package(\"MESSAGE\",\"Dealer: \"+dealerPoints +\", you: \"+player.points+\". Your stacks remains.\"));\n\t\t\t\t\tplayer.send(new Package(\"END\",0));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Deal with the dealer.\n\t\tint dealerStackChange = losers - winners;\n\t\tview.writeLog(\"The dealer wins \"+ dealerStackChange +\"stack(s).\");\n\t\tdealer.send(new Package(\"MESSAGE\",winners +\" player defeat you, \"+losers+\" lose. Stack change: \"+dealerStackChange));\n\t\tdealer.send(new Package(\"END\", dealerStackChange));\n\t\tendGame();\n\t}", "public boolean completed(){\n return !activeAttackers() && !attackersLeft();\n }", "private boolean done() {\n\n // If there is a false, then there are still gaps\n for (boolean[] row : board) {\n for (boolean item : row) {\n if (!item) return false;\n }\n }\n return true;\n }", "Boolean checkEndGame() {\n for (WarPlayer player : players) {\n if (player.getHand().size() == 0)\n return true;\n }\n return false;\n }", "public void isTrickComplete() {\n if(numPlays!=4){return;}\n if(player1Play == null | player2Play == null | player3Play == null | player4Play == null){return;}//should only call when all have played\n // reset numPlayed\n numPlays = 0;\n // find if the round is over\n currentMiddle.clear();\n trickNum++;\n try {\n sleep(200);//display all four cards before determining winner\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n int trickWinner;\n trickWinner = trickWinner();\n turn = trickWinner;\n if(trickWinner == 0 | trickWinner == 2){\n redTrickScore++;\n }\n else if(trickWinner == 1 | trickWinner == 3){\n blueTrickScore++;\n }\n player1Hand.remove(player1Play);//clear middle\n player2Hand.remove(player2Play);\n player3Hand.remove(player3Play);\n player4Hand.remove(player4Play);\n\n player1Play = null;\n player2Play = null;\n player3Play = null;\n player4Play = null;\n\n if(trickNum == 5){\n // reset everything for new round\n currentTrumpSuit = null;\n numPass = 0;\n isRoundOver();\n if(dealer == 3){\n dealer = 0;\n turn = 1;\n }\n else{\n dealer++;\n turn = dealer + 1;\n }\n gameStage = 0;\n deal();\n trickNum = 0;\n }\n\n\n\n }", "private void checkFinish() {\n for (Player temp: players) {\n if (temp.getNumberOfCards() == 0) {\n System.out.println(\"...................................................................................................................................................................\");\n System.out.println(\"Game finished.\\n\");\n System.out.println(Color.PURPLE.getPrintColor() + temp.getName() + \" is winner.\\n\" + Color.RESET.getPrintColor());\n setGameStatus();\n }\n }\n if (!gameStatus) {\n System.out.println(Color.RESET.getPrintColor() + \"Results:\\n\");\n for (Player temp: players) {\n if (temp.getNumberOfCards() != 0) {\n System.out.println(Color.CYAN.getPrintColor() + temp.toString());\n System.out.print(temp.handToString() + Color.RESET.getPrintColor());\n }\n }\n }\n }", "@Test\n\tpublic void TestDeal() {\n\t\tArrayList<Player> testPlayers = game.getPlayers();\n\t\tArrayList<Card> allCards = new ArrayList<Card>();\n\t\tSet<Card> allCardsSet = new HashSet<Card>();\n\t\tint handSize = testPlayers.get(0).getCards().size();\n\t\tboolean correctSize = true;\n\t\t\n\t\tfor(Player p : testPlayers) {\n\t\t\tallCards.addAll(p.getCards());\n\t\t\tif(Math.abs(p.getCards().size() - handSize) > 1)\n\t\t\t\tcorrectSize = false;\n\t\t}\n\t\tallCardsSet.addAll(allCards);\n\t\t\n\t\tAssert.assertEquals(correctSize, true);\n\t\tAssert.assertEquals(allCards.size(), 21);\n\t\tAssert.assertEquals(allCards.size(), allCardsSet.size());\n\t}", "public static boolean isPlayersSetupDone() {\r\n\t\tboolean playersNamed = true;\r\n\r\n\t\t//Check if all the choice boxes have been selected.\r\n\t\tif (GameSetup.choiceBoxPlayer1.getSelectedIndex() == -1\r\n\t\t\t\t|| GameSetup.choiceBoxPlayer1.getSelectedIndex() == 0) {\r\n\t\t\tplayersNamed = false;\r\n\t\t}\r\n\t\tif (GameSetup.choiceBoxPlayer2.getSelectedIndex() == -1\r\n\t\t\t\t|| GameSetup.choiceBoxPlayer2.getSelectedIndex() == 0) {\r\n\t\t\tplayersNamed = false;\r\n\t\t}\r\n\t\tif (GameSetup.choiceBoxPlayer3.getSelectedIndex() == -1\r\n\t\t\t\t|| GameSetup.choiceBoxPlayer3.getSelectedIndex() == 0) {\r\n\t\t\tplayersNamed = false;\r\n\t\t}\r\n\t\t\r\n\t\t//Don't show fourth player if playing 3 handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tif (GameSetup.choiceBoxPlayer4.getSelectedIndex() == -1\r\n\t\t\t\t\t|| GameSetup.choiceBoxPlayer4.getSelectedIndex() == 0) {\r\n\t\t\t\tplayersNamed = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Show dialog box reminder.\r\n\t\tif (!playersNamed) FrameUtils.showDialogBox(\"All players must be selected.\");\r\n\t\t\r\n\t\t//Save player names.\r\n\t\tsavePlayerNames();\r\n\t\t\r\n\t\treturn playersNamed;\r\n\t}", "public boolean allCalculationsDone() {\r\n return progressBarMap.isEmpty();\r\n }", "public static boolean processScoringTeams() {\r\n\t\tboolean done = true;\r\n\t\tint player1Tricks = 0;\r\n\t\tint player2Tricks = 0;\r\n\t\tint player3Tricks = 0;\r\n\t\tint player4Tricks = 0;\r\n\t\t\r\n\t\t//Get the value of all the players tricks taken.\r\n\t\tplayer1Tricks = FrameUtils.player1TricksTaken.getSelectedIndex();\r\n\t\tplayer2Tricks = FrameUtils.player2TricksTaken.getSelectedIndex();\r\n\t\tplayer3Tricks = FrameUtils.player3TricksTaken.getSelectedIndex();\r\n\t\tplayer4Tricks = FrameUtils.player4TricksTaken.getSelectedIndex();\r\n\t\t\r\n\t\t//Check if all the choice boxes have been selected.\r\n\t\tif (player1Tricks == -1 || player1Tricks == 0) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\tif (player2Tricks == -1 || player2Tricks == 0) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\tif (player3Tricks == -1 || player3Tricks == 0) {\r\n\t\t\tdone = false;\r\n\t\t\t//Needed because the player bid was not a nil and the index for\r\n\t\t\t//the tricks taken is never read, by design. This only happens on\r\n\t\t\t//bids that are nils.\r\n\t\t\tif (FrameUtils.player3Bid.getSelectedItem() != \"nil\" ||\r\n\t\t\t\t\tFrameUtils.player3Bid.getSelectedItem() != \"dbl\") {\r\n\t\t\t\tdone = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (player4Tricks == -1 || player4Tricks == 0) {\r\n\t\t\tdone = false;\r\n\t\t\t//Needed because the player bid was not a nil and the index for\r\n\t\t\t//the tricks taken is never read, by design. This only happens on\r\n\t\t\t//bids that are nils.\r\n\t\t\tif (FrameUtils.player4Bid.getSelectedItem() != \"nil\" ||\r\n\t\t\t\t\tFrameUtils.player4Bid.getSelectedItem() != \"dbl\") {\r\n\t\t\t\tdone = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Get the value of all the players tricks taken.\r\n\t\tplayer1Tricks = stringToInt(FrameUtils.player1TricksTaken.getSelectedItem());\r\n\t\tplayer2Tricks = stringToInt(FrameUtils.player2TricksTaken.getSelectedItem());\r\n\t\tplayer3Tricks = stringToInt(FrameUtils.player3TricksTaken.getSelectedItem());\r\n\t\tplayer4Tricks = stringToInt(FrameUtils.player4TricksTaken.getSelectedItem());\r\n\t\t\r\n\t\t//Check if tricks taken in a game equals 13.\r\n\t\tif (player1Tricks + player2Tricks + player3Tricks + player4Tricks != 13) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\r\n\t\t//Show dialog box reminder.\r\n\t\tif (!done) FrameUtils.showDialogBox(\"Tricks taken was entered wrong.\");\r\n\t\t\t\r\n\t\t//Save tricks taken data.\r\n\t\tsaveTricksTakenData();\r\n\t\t\r\n\t\treturn done;\r\n\t}", "public void dealerTurn() {\r\n boolean dealerContinue = false;\r\n do {\r\n for (int i = 0; i < this.getPlayers().size(); i++) {\r\n BlackjackPlayer player = (BlackjackPlayer) this.getPlayers().get(i);\r\n if (this.getHand().addCards() < player.getHand().addCards() && this.getHand().addCards() < 21 && player.getHand().addCards() <= 21) {\r\n dealerContinue = true;\r\n break;\r\n } else if (this.getHand().addCards() >= player.getHand().addCards() || this.getHand().addCards() == 21) {\r\n dealerContinue = false;\r\n }\r\n }\r\n if (dealerContinue == true) {\r\n addDealerCard();\r\n System.out.println(\"Dealer has: \" + this.getHand().toString());\r\n System.out.println(\"Card Score: \" + this.getHand().addCards());\r\n System.out.println(\"\");\r\n }\r\n } while(dealerContinue == true && this.getHand().addCards() < 21);\r\n }", "public boolean isSolved() {\n return towers[0].empty() && towers[1].empty() && towers[2].size() == numDisks;\n }", "@Override\n public boolean currentPlayerHavePotentialMoves() {\n return !checkersBoard.getAllPotentialMoves(getCurrentPlayerIndex()).isEmpty();\n }", "public boolean isSolved(){ return getRemainingValues() == 0; }", "private void CheckFaintedPokemon() {\n \tif(user.getTeam(user.getCurrentPokemonIndex()).getStats().getStatus()==Status.FNT){\n \t\tuser.getTeam(user.getCurrentPokemonIndex()).getInfo().setUsedInBattle(false);\n \t\tbattleMessage.add(user.getTeam(user.getCurrentPokemonIndex()).getInfo().getNickname()+\" has lost the battle. \");\n \t\tbattleOver=true;\n \t}\n \tif(opponent.getTeam(opponent.getCurrentPokemonIndex()).getStats().getStatus()==Status.FNT){\n \t\topponent.getTeam(opponent.getCurrentPokemonIndex()).getInfo().setUsedInBattle(false);\n \t\tCalculateXP(user.getTeam(),opponent.getTeam(opponent.getCurrentPokemonIndex()));\n \t\tbattleMessage.add(opponent.getTeam(opponent.getCurrentPokemonIndex()).getInfo().getNickname()+\" has lost the battle. \");\n \t\tbattleOver=true;\n \t}\n \t\n }", "public ArrayList<Player> checkToEliminate() {\n ArrayList<Player> eliminated = new ArrayList<Player>();\n\n // Check which players are to be eliminated\n for (Player player : playersInGame) {\n if (player.peekCard() == null) {\n eliminated.add(player);\n }\n }\n\n // Eliminate players from model\n for (Player eliminatedPlayer : eliminated) {\n playersInGame.remove(eliminatedPlayer);\n }\n\n return eliminated;\n }", "private void check4voteAndClean()\n\t{\n\t\tif( noBeepersPresent())\n\t\t{\tturnLeft();\n\t\t\tmove();\n\t\t\tpickAll();\n\t\t\tturnAround();\n\t\t\tmove();\n\t\t\tmove();\n\t\t\tpickAll();\n\t\t\tturnAround();\n\t\t\tmove();\n\t\t\tturnRight();\n\t\t}\n\t}", "public boolean gameContinue() {\n for (Player player : players) {\n if (player.getPoints() > END_GAME_POINTS) {\n return false;\n }\n }\n return true;\n }", "public static boolean processBidding() {\r\n\t\tboolean done = true;\r\n\t\t\r\n\t\t//Check if all the choice boxes have been selected.\r\n\t\tif (FrameUtils.player1Bid.getSelectedIndex() == -1\r\n\t\t\t\t|| FrameUtils.player1Bid.getSelectedIndex() == 0) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\tif (FrameUtils.player2Bid.getSelectedIndex() == -1\r\n\t\t\t\t|| FrameUtils.player2Bid.getSelectedIndex() == 0) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\tif (FrameUtils.player3Bid.getSelectedIndex() == -1\r\n\t\t\t\t|| FrameUtils.player3Bid.getSelectedIndex() == 0) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\t\r\n\t\t//Don't check fourth player if playing three handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tif (FrameUtils.player4Bid.getSelectedIndex() == -1\r\n\t\t\t\t\t|| FrameUtils.player4Bid.getSelectedIndex() == 0) {\r\n\t\t\t\tdone = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Show dialog box reminder.\r\n\t\tif (!done) FrameUtils.showDialogBox(\"An incorrect bid was made.\");\r\n\t\t\r\n\t\t//Save bid data.\r\n\t\tsaveBidData();\r\n\t\t\t\r\n\t\treturn done;\r\n\t}", "private boolean caughtEmAll(){\n\t\tint howMany = 1;\n\t\tArrayList<Pokemon> pokedex = theTrainer.getPokedex();\n\t\tCollections.sort(pokedex);\n\t\tfor(int i = 0; i < pokedex.size() - 1; i++){\n\t\t\tif(pokedex.get(i+1).getPokemonID() != pokedex.get(i).getPokemonID()){\n\t\t\t\thowMany++;\n\t\t\t}\n\t\t}\n\t\treturn (howMany == 10);\n\t}", "public boolean allGone()\n {\n return pellets.isEmpty();\n }", "public boolean checkNotDone() {\n boolean notDone = false;\n blocksPut = 0;\n \n for(int y = 0; y < buildHeight+1; y++) {\n for(int z = 0; z < buildSize; z++) {\n for(int x = 0; x < buildSize; x++) {\n if(myIal.lookBlock(x, y, z).equals(\"air\")) {\n notDone = true;\n } else {\n blocksPut++;\n }\n }\n }\n }\n\n return notDone;\n }", "public boolean allSet(Player [] players) {\n\t\tfor (int i = 0; i < players.length; i++) {\n\t\t\tif (!players[i].allSet()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public void checkWorkers() throws IOExceptionFromController {\n for (Player player : players) {\n if (!player.hasLost() && player.getWorkers().size() == 0) eliminatePlayer(player, \"outOfWorkers\");\n }\n }", "public boolean isDone(){\n\t\tif(generated)\n\t\t\treturn curr >= deck.size();\n\t\treturn true;\n\t}", "public static void checkAllPlayers()\n\t{\n\t\ttry {\n\t\t\tSystem.out.println(outFile.getName()+\": \");\n\t\t\twriter = new FileWriter(outFile);\n\t\t\tfor(int i = 0; i < entrants.length; i++)\n\t\t\t{\n\t\t\t\tcheckIndex = i;\n\t\t\t\tcheckPlayer();\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\twriter.close();\n\t\t}catch(IOException e) {\n\t\t\tSystem.out.println(\"problem with output\");\n\t\t\t//return false;\n\t\t\t//System.exit(1);\n\t\t}\n\t}", "public boolean needsRepairing() {\n boolean returner = false;\n for (Pouch pouch : pouchesUsed) {\n returner = returner || pouch.needsRepair();\n }\n return returner;\n }", "public boolean cleanDoneTasks(){\n\t\tboolean removedAny = false; \n\t\tCollection<Task> tmp = new ArrayList<Task>();\n\t\t\n\t\tfor( Task task: m_Tasks ){\n\t\t\tif(task.done) {\n\t\t\t\ttmp.add(task);\n\t\t\t\tremovedAny = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(Task task : tmp){\n\t\t\tremoveTask(task);\n\t\t}\n\t\treturn removedAny;\n\t}", "void concludeRound() {\n\n ArrayList<Card> currentTopCards = getCurrentTopCards();\n transferCards(roundWinner, currentTopCards);\n eliminatePlayers();\n\n logger.log(\"Communal Deck: \" + deck);\n logger.log(divider);\n for (Player player : players) {\n logger.log(\"Hand: \" + player);\n }\n\n logger.log(\"Round complete.\");\n\n setGameState(GameState.ROUND_COMPLETE);\n }", "@Override\r\n public boolean checkAllDecksEmpty(int plDeckPosition) {\r\n // Are all the decks empty\r\n boolean flag = true;\r\n \r\n // Loop through all decks at deck position for each player\r\n for (Player player : this.players) {\r\n if (!player.isDeckEmpty(plDeckPosition)) {\r\n flag = false;\r\n }\r\n }\r\n \r\n // Return the value\r\n return flag;\r\n }", "public boolean continueGame(){\n for (Player p : super.getPlayers()) {\n // check if p is dead\n if (p.isDead()) {\n return false;\n }\n }\n return true;\n }", "public boolean cardsDealt(int players){\n\t\tif(deck.size()==0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\n\t\t//TODO:\n\t\t//Implement for a variable # of players\n\t}", "public boolean checkWithFragmentingWarhead ()\n {\n List<Player> players = new ArrayList<>();\n\n for (Player playerIterate : player.playerThatSee(player.getSquare().getGameBoard()))\n {\n if (playerIterate.getSquare() != player.getSquare())\n players.add(playerIterate);\n }\n\n for (Player playerIterate : players)\n {\n if (playerIterate.getSquare().getPlayerList().size()>1)\n return true;\n }\n\n return false;\n }", "public boolean isDone() {\r\n\t\tint count = 0;\r\n\t\t//Checks the movieGuess array for '_' characters. If there are none we can safely assume the player has finished.\r\n\t\tfor(int x = 0; x < movieGuess.length; x++) {\r\n\t\t\tif(movieGuess[x] == '_')\t{\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//used a counter to avoid premature (i.e., before finishing the array traversal) true or false.\r\n\t\tif(count > 0)\r\n\t\t\treturn false;\t\r\n\t\telse\r\n\t\t\treturn true;\r\n\t}", "public boolean allPlayersReady() {\r\n for (Player player : players) {\r\n if (!player.isReady()) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public int numVanished() {\n return this.vanishedPlayers.size();\n }", "public boolean completed(){\n int count = 0;\n for(int Y=0; Y<size; Y++){\n for(int X=0; X<size; X++){\n if(tiles[X][Y] instanceof EindVeld){\n EindVeld tmp = (EindVeld)tiles[X][Y];\n if(tmp.hasDoos())\n count++;\n }\n }\n }\n \n if(eindVelden == count){\n System.out.println(\"DOOLHOF COMPLEET !!!\");\n return true;\n }else{\n return false;\n }\n }", "public boolean isFinished() {\n\t\tif ((player1_moves | player2_moves) == COMPLETE) {\n\t\t\tfinished = true;\n\t\t\tcurrentPlayer = '\\0';\n\t\t}\n\t\tfor (int i : winning_cases) {\n\t\t\tif ((player1_moves & i) == i) {\n\t\t\t\twinner = 'X';\n\t\t\t\tfinished = true;\n\t\t\t} else if ((player2_moves & i) == i) {\n\t\t\t\twinner = 'O';\n\t\t\t\tfinished = true;\n\t\t\t}\n\t\t}\n\t\treturn finished;\n\t}", "public void kickOut(){\n Iterator<Player> iter = players.iterator();\n while (iter.hasNext()){\n Player player = iter.next();\n if(player.isBankrupt(minBet)){\n iter.remove();\n System.out.println(player + \" runs out of cash!\");\n }\n }\n }", "public void dealGame()\n {\n for(int i=0; i<7;i++)\n for(int j=i;j<7;j++)\n {\n tableauHidden[j].push(deck.deal());\n }\n }", "private void checkResults() {\n\n if (Dealer.calcTotal() == p1.calcTotal()) {\n System.out.println(\"You and the dealer Tie, Here is your money back.\");\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (p1.calcTotal() > Dealer.calcTotal() && !bust) {\n System.out.println(\"You win!\");\n totalWinnings += betNum;\n p1.addPointCount(betNum);\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (Dealer.calcTotal() > 31) {\n System.out.println(\"Dealer busts. You Win!\");\n totalWinnings += betNum;\n p1.addPointCount(betNum);\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (Dealer.getTotal() > p1.calcTotal() && Dealer.getTotal() < 32) {\n System.out.println(\"Dealer Wins.\");\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n p1.subPointCount(betNum);\n }\n }", "private void eliminatePlayers() {\n \n Iterator<Player> iter = players.iterator();\n\n while (iter.hasNext()) {\n Player player = iter.next();\n\n if (player.getList().isEmpty()) {\n iter.remove();\n if (player.getIsHuman()) {\n setGameState(GameState.HUMAN_OUT);\n }\n // need to remember that due to successive draws, the active player could run\n // out of cards\n // select a new random player if player gets eliminated\n if (!players.contains(activePlayer)) {\n selectRandomPlayer();\n }\n }\n }\n }", "public boolean checkIfAllSunk(int PlayerOrAI)\n\t{\n\n\n\t\tint numberOfAIorPlayerShipsSunk = 0;\n\t\t//System.out.println(\"got to place ONE\");\n\t\t\n\n\t\tif (PlayerOrAI == 1)\n\t\t{\n\t\t\tfor(int x = 0; x < 2; x++) //aiBattleShipsList.length\n\t\t\t{\n\t\t\t\tif(aiBattleShipsList[x].getIsSunk())\n\t\t\t\t{\n\t\t\t\t\tnumberOfAIorPlayerShipsSunk++;\n\t\t\t\t\t//System.out.println(\"2\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(numberOfAIorPlayerShipsSunk == 2) \n\t\t\t{\n\t\t\t\tSystem.out.println(\"The Player has won!\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}\n\t\telse if (PlayerOrAI == 0)\n\t\t{\n\t\t\tfor(int x = 0; x < playerBattleShipsList.length; x++)\n\t\t\t{\t\n\t\t\t\tif(playerBattleShipsList[x].getIsSunk()){\n\t\t\t\t\tnumberOfAIorPlayerShipsSunk++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(numberOfAIorPlayerShipsSunk == 5) \n\t\t\t{\n\t\t\t\tSystem.out.println(\"The AI has won, unlucky\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean isGameEnded() {\n int playerOneRemainingSeeds = 0;\n int playerTwoRemainingSeeds = 0;\n\n boolean isEnded = false;\n\n Player playerOne = mContainersManager.getOwnerOf(0);\n Player playerTwo = mContainersManager.getOwnerOf(7);\n\n for (int i = 0 ; i < mNumberOfBowls; i++) {\n playerOneRemainingSeeds += mContainersManager.getNumberOfSeedsOf(i);\n }\n for (int j = (mNumberOfBowls + mNumberOfTrays) ; j < (mContainersManager.getNumberContainers() - 1); j++) {\n playerTwoRemainingSeeds += mContainersManager.getNumberOfSeedsOf(j);\n }\n\n if ((playerOneRemainingSeeds == 0) || (playerTwoRemainingSeeds == 0)) {\n isEnded = true;\n }\n\n // If the game is ended put all remaining seeds in the player bowl_selected and find the winner\n if (isEnded) {\n if (playerOneRemainingSeeds > 0) {\n for (int j = 0; j < mNumberOfBowls; j++) {\n mContainersManager.emptyBowl(j);\n }\n mContainersManager.putSeedsInTrayOf( playerOne, playerOneRemainingSeeds);\n } else {\n for (int j = (mNumberOfBowls + mNumberOfTrays);\n j < (mContainersManager.getNumberContainers() -1); j++)\n {\n mContainersManager.emptyBowl(j);\n }\n mContainersManager.putSeedsInTrayOf(playerTwo, playerTwoRemainingSeeds);\n }\n setWinner();\n }\n\n return isEnded;\n }", "@Override\n public void setPlayerDoneEliminating(Player player, boolean value) {\n DatabaseReference currentRef = database.getReference(gameCodeRef).child(\"Players\").child(player.getUsername());\n currentRef.child(\"DoneEliminating\").setValue(value);\n if(value){\n updateNrPlayerValues(\"PlayersDoneEliminating\");\n }\n\n }", "protected boolean allBoatsArePlaced() {\n for(BoatDrawing boat : boatMap.values()) {\n if (!boat.isPlaced()) {\n return false;\n }\n }\n logMsg(\"click now on 'valider' button to begin game\");\n return true;\n }", "public boolean hasSolved()\r\n {\r\n for (Food food : getFoods())\r\n {\r\n //if food is moving the board is not solved yet\r\n if (food.hasVelocity())\r\n return false;\r\n \r\n //if the food is still in the playing area the board is not solved yet\r\n if (food.getRow() <= VALID_ROWS)\r\n return false;\r\n }\r\n \r\n return true;\r\n }", "private void recruitThingsPhase() {\n\n ClickObserver.getInstance().setTerrainFlag(\"RecruitingThings: PlaceThings\");\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(false);\n }\n });\n int numToDraw = 0;\n boolean flag;\n \n for (final Player p : playerList) {\n doneClicked = false;\n this.player = p;\n player.flipAllUp();\n ClickObserver.getInstance().setActivePlayer(player);\n flag = true;\n pause();\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getHelpText().setText(\"Recruitment Phase: \" + p.getName()\n + \", draw free/paid Things from The Cup, then click 'done'\");\n GUI.getRackGui().setOwner(player);\n TheCupGUI.update();\n }\n });\n \n while (isPaused) {\n while (!doneClicked) {\n if (freeClicked) {\n if (flag) {\n System.out.println(player.getName() + \" -clicked free\");\n numToDraw = (int)Math.ceil(player.getHexesOwned().size() / 2.0);\n System.out.println(numToDraw + \" -num to draw\");\n final int finNumToDraw = numToDraw;\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n TheCupGUI.setFieldText(\"\"+finNumToDraw);\n }\n });\n flag = false;\n }\n }\n if (paidClicked) {\n flag = true;\n if (flag) {\n \tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n \tPlayerBoard.getInstance().updateGold(player);\n }\n });\n flag = false;\n }\n }\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n player.flipAllDown();\n }\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(true);\n }\n });\n\n ClickObserver.getInstance().setTerrainFlag(\"\");\n }", "public void markAsUndone() {\n isDone = false;\n }", "public void clear() {\n for (int i = 0; i < if_you_items.length; i++) {\n if_you_items[i].setEnabled(true);\n }\n for (int i = 0; i < then_we_items.length; i++) {\n then_we_items[i].setEnabled(true);\n }\n non_promised_ministries.clear();\n non_promised_ministries.addAll(all_ministries);\n // if not at war, can't ask/offer peace\n if (game.getDiplomacy().getDiplomaticState(game.getTurn(), faction) != C.DS_WAR) {\n if_you_items[IfYouWill.PEACE.ordinal()].setEnabled(false);\n then_we_items[ThenWeWill.PEACE.ordinal()].setEnabled(false);\n }\n if (faction > C.HOUSE5) { // non-house\n non_promised_ministries.clear();\n if_you_items[IfYouWill.TECH.ordinal()].setEnabled(false);\n then_we_items[ThenWeWill.TECH.ordinal()].setEnabled(false);\n if_you_items[IfYouWill.VOTES.ordinal()].setEnabled(false);\n then_we_items[ThenWeWill.VOTES.ordinal()].setEnabled(false);\n return;\n }\n // search for promised votes and ministries in pending contracts of sender\n for (Contract con : game.getDiplomacy().getSentContracts()) {\n for (Term term : con.getTerms()) {\n if (term.getDonor() == game.getTurn()) {\n switch (term.getType()) {\n case VOTES:\n System.out.println(\"DBG no votes\");\n then_we_items[ThenWeWill.VOTES.ordinal()].setEnabled(false);\n break;\n case MINISTRY:\n non_promised_ministries.remove(new Integer(term.getAmount()));\n break;\n case MONEY:\n break;\n case STATE:\n break;\n case TECH:\n break;\n default:\n throw new AssertionError();\n }\n }\n if (term.getDonor() == faction) {\n switch (term.getType()) {\n case VOTES:\n System.out.println(\"DBG no votes\");\n if_you_items[IfYouWill.VOTES.ordinal()].setEnabled(false);\n break;\n case MINISTRY:\n non_promised_ministries.remove(new Integer(term.getAmount()));\n break;\n case MONEY:\n break;\n case STATE:\n break;\n case TECH:\n break;\n default:\n throw new AssertionError();\n }\n }\n }\n }\n // search for promised votes and ministries for sender and for receiver\n // those that are made with sender\n if (game.getRegency().getVotes()[game.getTurn()][Regency.CANDIDATE_IDX] > -1\n || game.getRegency().getVotes()[faction][Regency.CANDIDATE_IDX] == game.getTurn()) {\n then_we_items[ThenWeWill.VOTES.ordinal()].setEnabled(false);\n if_you_items[IfYouWill.VOTES.ordinal()].setEnabled(false);\n }\n int[] promises = game.getDiplomacy().getMinistryPromises(game.getTurn());\n for (int i = 0; i < promises.length; i++) {\n if (promises[i] > -1) {\n non_promised_ministries.remove(new Integer(promises[i]));\n }\n }\n promises = game.getDiplomacy().getMinistryPromises(faction);\n for (int i = 0; i < promises.length; i++) {\n if (promises[i] == game.getTurn()) {\n non_promised_ministries.remove(new Integer(promises[i]));\n }\n }\n if (non_promised_ministries.isEmpty()) {\n then_we_items[ThenWeWill.MINISTRY.ordinal()].setEnabled(false);\n if_you_items[IfYouWill.MINISTRY.ordinal()].setEnabled(false);\n }\n }", "public boolean finished() {\n\t\t\n\t\tfor ( int i = 0; i <this.num; i++) {\n\t\t\tif (this.car[i]!=null) {\n\t\t\t\tif (this.car[i].checkFinished()==false) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isComplete() {\n return addedFrontWork.size() == 0 && addedBackWork.size() == 0 && sawAllDone.get();\n }", "public synchronized boolean isFull() {\r\n\t\treturn (this.players.size() == 6);\r\n\t}", "@Override\n public boolean isFinished() {\n if (numBalls == -1) {\n return false;\n } else {\n return ballsShot >= numBalls;\n }\n }", "private boolean hasServerRemovedAllElements() {\n return getNumElementsRemoved() >= getNumElementsToRemove();\n }", "public boolean blockedGame() {\r\n int pointsperplayer = 0;\r\n if (playedDominoes.size() > 9) {\r\n if (end[0] == end[1]) {\r\n List<Domino> aux = new ArrayList();\r\n for (Domino d : playedDominoes) {\r\n if (d.getBothNumbers().contains(end[0])) {\r\n System.out.println(\"Adding domino\" + d.toString());\r\n aux.add(d);\r\n }\r\n }\r\n return aux.size() == 7;\r\n }\r\n }\r\n return false;\r\n }", "public boolean checkForEndgame() {\n\t\tCalculatePossibleMoves(true);\n\t\tint blackMoves = getNumberOfPossibleMoves();\n\t\tCalculatePossibleMoves(false);\n\t\tint redMoves = getNumberOfPossibleMoves();\n\t\t\n\t\tif (blackMoves == 0 && redMoves == 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public Boolean questionDone() {\n Boolean questionDone = true;\n for (Boolean currentTeam : teamHasAnswered.values()) questionDone = questionDone && currentTeam;\n return questionDone;\n }", "void done(boolean allSucceeded);", "public int isSafe(){\n int nbEnnemies = 0;\n List<Player> players = state.getPlayers();\n Player currentPlayer = state.getCurrentPlayer();\n for(Player p : players){\n if(!p.equals(currentPlayer)) {\n nbEnnemies += currentPlayerReachable(state.getCurrentPlayer(), p);\n //nbEnnemies += manhattan(currentPlayer, p); //naive version\n }\n }\n return nbEnnemies;\n }", "public boolean checkWithFragmentingWarheadRocketJump ()\n {\n Map<Square, List<Player>> squarePlayerListMap = checkRocketJump();\n List<Player> playerList;\n\n for (Square squareIterate : squarePlayerListMap.keySet())\n {\n\n for (Player playerIterate : squarePlayerListMap.get(squareIterate))\n {\n playerList = new ArrayList<>();\n\n playerList.addAll(playerIterate.getSquare().getPlayerList());\n playerList.remove(player);\n\n if (playerList.size()>1)\n return true;\n\n }\n }\n\n return false;\n }", "public static boolean processScoring() {\r\n\t\tboolean done = true;\r\n\t\tint player1Tricks = 0;\r\n\t\tint player2Tricks = 0;\r\n\t\tint player3Tricks = 0;\r\n\t\tint player4Tricks = 0;\r\n\t\t\r\n\t\t//Gets the data for three players.\r\n\t\tplayer1Tricks = FrameUtils.player1TricksTaken.getSelectedIndex();\r\n\t\tplayer2Tricks = FrameUtils.player2TricksTaken.getSelectedIndex();\r\n\t\tplayer3Tricks = FrameUtils.player3TricksTaken.getSelectedIndex();\r\n\r\n\t\t//Gets the tricks taken if playing with four players.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tplayer4Tricks = FrameUtils.player4TricksTaken.getSelectedIndex();\r\n\t\t}\r\n\r\n\t\t//Check if all the choice boxes have been selected.\r\n\t\tif (player1Tricks == -1 || player1Tricks == 0) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\tif (player2Tricks == -1 || player2Tricks == 0) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\tif (player3Tricks == -1 || player3Tricks == 0) {\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\t\r\n\t\t//Don't check fourth player if playing three handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tif (player4Tricks == -1 || player4Tricks == 0) {\r\n\t\t\t\tdone = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Get the value of three players tricks taken.\r\n\t\tplayer1Tricks = stringToInt(FrameUtils.player1TricksTaken.getSelectedItem());\r\n\t\tplayer2Tricks = stringToInt(FrameUtils.player2TricksTaken.getSelectedItem());\r\n\t\tplayer3Tricks = stringToInt(FrameUtils.player3TricksTaken.getSelectedItem());\r\n\t\t\r\n\t\t//Get the value of the fourth player in a four handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tplayer4Tricks = stringToInt(FrameUtils.player4TricksTaken.getSelectedItem());\r\n\t\t}\r\n\t\t\r\n\t\t//Check if tricks taken in a three handed game equals 17.\r\n\t\tif (Main.isThreeHanded) {\r\n\t\t\tif (player1Tricks + player2Tricks + player3Tricks != 17) {\r\n\t\t\t\tdone = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Check if tricks taken in a non-three-handed game equals 13.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tif (player1Tricks + player2Tricks + player3Tricks + player4Tricks != 13) {\r\n\t\t\t\tdone = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Show dialog box reminder.\r\n\t\tif (!done) FrameUtils.showDialogBox(\"Tricks taken was entered wrong.\");\r\n\t\t\t\r\n\t\t//Save tricks taken data.\r\n\t\tsaveTricksTakenData();\r\n\t\t\r\n\t\treturn done;\r\n\t}", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "public boolean endOfGame() {\n\t\tfor(CardGamePlayer player : playerList) {\n\t\t\tif(gameStarted && player.getNumOfCards() == 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private void checkGridCompletion() {\n if (this.model.getPuzzle().isFilled()) {\n if (this.model.getPuzzle().isSolved()) {\n puzzleCompleted();\n }\n }\n }", "private boolean isComplete() {\n for (boolean b : bitfield) {\n if (!b) {\n return false;\n }\n }\n return true;\n }", "private void unsetOneAllChecks() {\r\n\r\n checkIman.setEnabled(false);\r\n checkBonferroni.setEnabled(false);\r\n checkHolm.setEnabled(false);\r\n checkHochberg.setEnabled(false);\r\n checkHommel.setEnabled(false);\r\n checkHolland.setEnabled(false);\r\n checkRom.setEnabled(false);\r\n checkFinner.setEnabled(false);\r\n checkLi.setEnabled(false);\r\n\r\n }", "private void compruebaColisiones()\n {\n // Comprobamos las colisiones con los Ufo\n for (Ufo ufo : ufos) {\n // Las naves Ufo chocan con la nave Guardian\n if (ufo.colisionaCon(guardian) && ufo.getVisible()) {\n mensajeDialogo(0);\n juego = false;\n }\n // Las naves Ufo llegan abajo de la pantalla\n if ((ufo.getPosicionY() - ufo.getAlto() > altoVentana)) {\n mensajeDialogo(0);\n juego = false;\n }\n // El disparo de la nave Guardian mata a una nave Ufo\n if (ufo.colisionaCon(disparoGuardian) && ufo.getVisible()) {\n ufo.setVisible(false);\n disparoGuardian.setVisible(false);\n disparoGuardian.setPosicion(0, 0);\n ufosMuertos++;\n }\n }\n\n // El disparo de las naves Ufo mata a la nave Guardian\n if (guardian.colisionaCon(disparoUfo)) {\n disparoUfo.setVisible(false);\n mensajeDialogo(0);\n juego = false;\n }\n\n // Si el disparo Guardian colisiona con el disparo de los Ufo, se\n // eliminan ambos\n if (disparoGuardian.colisionaCon(disparoUfo)) {\n disparoGuardian.setVisible(false);\n disparoGuardian.setPosicion(0, 0);\n disparoUfo.setVisible(false);\n }\n }", "public void checkFinished() {\n int check = 0;\n for (int i = 0; i < cards.size(); i++) {\n if (cards.get(i).getTurned() == true) {\n check++;\n }\n }\n if (check == cards.size()) {\n clip.stop();\n resultGUI = new ResultGUI(p1Points, p2Points);\n resultGUI.setSize(700, 500);\n resultGUI.setVisible(true);\n setVisible(false);\n }\n }", "public boolean playersFilled() throws SQLException {\n\t\ttry {\n\t\t\tif (getPlayers().last() == true) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn false;\n\t}", "public boolean deal() {\n int k, j;\n boolean enoughCards;\n\n // clear all hands\n for (j = 0; j < numPlayers; j++)\n hand[j].resetHand();\n\n enoughCards = true;\n for (k = 0; k < numCardsPerHand && enoughCards; k++) {\n for (j = 0; j < numPlayers; j++)\n if (deck.getNumCards() > 0)\n hand[j].takeCard(deck.dealCard());\n else {\n enoughCards = false;\n break;\n }\n }\n\n return enoughCards;\n }", "protected boolean processPlayerOfferedTakeback(int gameNum, String playerName, int takebackCount){\n return false;\n }", "public void allPlayerLivesAreGone() {\n\t\t\n\t\t// If player01 has 0 lives..\n\t\tif(player01.getPlayerLives() == 0){\n\t\t\t\n\t\t\t// Invoke.\n\t\t\tplayer02.incrementNumberOfGamesWon();\n\t\t\t\n\t\t\t// Display message.\n\t\t\tSystem.out.println(\"Player 01 has no more lives left.\");\n\t\t\tSystem.out.println(\"------------------------\");\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"Player 02 wins the game!\");\n\t\t\tSystem.out.println(\"Well done Player 02!\");\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"------------------------\");\n\n\t\t\t// If player02 has 0 lives..\n\t\t} else {\n\t\t\t\n\t\t\tplayer01.incrementNumberOfGamesWon();\n\n\t\t\tSystem.out.println(\"Player 02 has no more lives left.\");\n\t\t\tSystem.out.println(\"------------------------\");\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"Player 01 wins the game!\");\n\t\t\tSystem.out.println(\"Well done Player 01!\");\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"------------------------\");\n\t\t}\t\t\n\t}", "public boolean isGameFinished() {\n if (listaJogadores.size() - listaJogadoresFalidos.size() == 1) {\n return true;\n } else {\n return false;\n }\n\n }", "public void cleanToAll() {\n\t\tfor(ClientThread player: players) {\n\t\t\tplayer.send(new Package(\"CLEAN\",null));\n\t\t}\n\t}", "public boolean checkColumn() {\n\t\t// conditions fo player X\n\t\tif ((bt[0].getText().equals(\"X\") && bt[3].getText().equals(\"X\") && bt[6].getText().equals(\"X\"))\n\t\t\t\t|| (bt[1].getText().equals(\"X\") && bt[4].getText().equals(\"X\") && bt[7].getText().equals(\"X\"))\n\t\t\t\t|| (bt[2].getText().equals(\"X\") && bt[5].getText().equals(\"X\") && bt[8].getText().equals(\"X\"))) {\n\t\t\tjtf.setText(\" PLAYER X WON!\");\n\t\t\tjtf.setForeground(Color.red);\n\t\t\tjtf.setFont(new Font(\"Arial Black\", Font.BOLD, 50));\n\t\t\tfor (i = 0; i < xo.length; i++) {\n\t\t\t\tbt[i].setEnabled(false);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t// conditions fo player O\n\t\tif ((bt[0].getText().equals(\"O\") && bt[3].getText().equals(\"O\") && bt[6].getText().equals(\"O\"))\n\t\t\t\t|| (bt[1].getText().equals(\"O\") && bt[4].getText().equals(\"O\") && bt[7].getText().equals(\"O\"))\n\t\t\t\t|| (bt[2].getText().equals(\"O\") && bt[5].getText().equals(\"O\") && bt[8].getText().equals(\"O\"))) {\n\t\t\tjtf.setText(\" PLAYER O WON!\");\n\t\t\tjtf.setForeground(Color.blue);\n\t\t\tjtf.setFont(new Font(\"Arial Black\", Font.BOLD, 50));\n\t\t\tfor (i = 0; i < xo.length; i++) {\n\t\t\t\tbt[i].setEnabled(false);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "private void clearAll(){\r\n List<FantasyMatch> allMatches = fmatchBean.findAll();\r\n for(FantasyMatch fm : allMatches){\r\n fmatchBean.remove(fm);\r\n }\r\n \r\n List<RosterPlayer> allRps= rpBean.findAll();\r\n for(RosterPlayer rp : allRps){\r\n rpBean.remove(rp);\r\n }\r\n \r\n List<FantasyTeam> allTeams = ftBean.findAll();\r\n for(FantasyTeam ft : allTeams){\r\n ftBean.remove(ft);\r\n }\r\n \r\n List<FantasyLeague> allLeagues = flBean.findAll();\r\n for(FantasyLeague fl : allLeagues){\r\n flBean.remove(fl);\r\n }\r\n \r\n List<FantasyUser> allUsers = fUserBean.findAll();\r\n for(FantasyUser fu : allUsers){\r\n fUserBean.remove(fu);\r\n }\r\n }", "public boolean isAllPiecesEaten(PrimaryColor playerColor) {\n\n\t\tArrayList<Piece> ediblePieces= getAllEdiblePiecesByColor(playerColor);\n\t\tif(ediblePieces.isEmpty()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean allDestroyed()\n {\n\n \tcalculateTotalHitsRequired();\n \tint hits = 0;\n \tfor (int row = 0; row < NUM_ROWS; row++){\n \t\tfor(int col = 0; col < NUM_COLS; col++){\n \t\t\tif(grid[row][col] == HIT)\n \t\t\t\thits++;\n \t\t}\n \t}\n \tif(hits == totalHitsRequired)\n \t\treturn true;\n\n return false;\n }", "public boolean completed()\r\n {\r\n if(pile.size() == 13)\r\n return true;\r\n return false;\r\n }", "public boolean gameOver(){\r\n if(isGame) return (currentPlayer.getChecks() == 0 || nextPlayer.getChecks() == 0 || currentPlayer.getQueens() == 4 || nextPlayer.getQueens() == 4 || (currentPlayer.cantMove() && nextPlayer.cantMove()));\r\n return getNumChecks(WHITE) == 0 || getNumChecks(BLACK) == 0 || getNumQueens(WHITE) == 4 || getNumQueens(BLACK) == 4;\r\n }", "boolean updateDeathsTillForget() {\n\t\tdeathsTillForget -= 1;\n\t\treturn (deathsTillForget < 1);\n\t}", "private boolean checkFinalPuzzle() throws Exception {\n for(int i = 0; i < puzzle.getColumns(); ++i) {\n var clues = puzzle.getColumnClue(i);\n var solver_col = searchBoard.getFilledGroups(i, TraversalType.COLUMN);\n if(clues.size() != solver_col.size()) {\n return false;\n }\n for(int j = 0; j < clues.size(); ++j) {\n if(!clues.get(j).equals(solver_col.get(j))) {\n return false;\n }\n }\n }\n for(int i = 0; i < puzzle.getRows(); ++i) {\n var clues = puzzle.getRowClue(i);\n var solver_row = searchBoard.getFilledGroups(i, TraversalType.ROW);\n if(clues.size() != solver_row.size()) {\n return false;\n }\n for(int j = 0; j < clues.size(); ++j) {\n if(!clues.get(j).equals(solver_row.get(j))) {\n return false;\n }\n }\n }\n return true;\n }", "public boolean endOfGame() {\n\t\tfor (int i = 0; i < getNumOfPlayers(); i++) {\n\t\t\tif (this.getPlayerList().get(i).getCardsInHand().isEmpty()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public void processPlayerCollision(ArrayList<Player> players) {\n for(Player p : players) {\n boolean collided = collision.generalCollision(this, p); //Test for general collision\n if(collided) //if general collision occurs\n {\n int collisionY = collision.testCollisionY(this, p); //change collision state for y axis\n int cornerCollision = collision.testCornerCollision(this, p);\n\n if(collisionY == Collision.COLLISION_TOP || cornerCollision == Collision.TOP_CORNERS) {\n if(p.getState() != DYING_STATE && getState() != DESTROYED_STATE) {\n setState(KOOPA_STUNNED);\n setVelocityX(0f);\n hitCounter++;\n shelled = true;\n if(pointsCollected == false) {\n game.scoreBoard.addScorePoints(100);\n pointsCollected = true;\n }\n }\n }\n else {\n if(getState() != DYING_STATE && getState() != DESTROYED_STATE && getState() != KOOPA_STUNNED && shelled == false && hitCounter == 0) //if enemy isn't dying or dead, kill player\n p.die();\n }\n }\n }\n }", "public void run() {\r\n for(int i = group; i < 64; i += 4) {\r\n if(!m_teams[i].isOut()) {\r\n setSurvivingTeam(m_teams[i]);\r\n return;\r\n }\r\n }\r\n\r\n m_botAction.sendArenaMessage(\"No one won for Base \" + (group + 1));\r\n }", "public boolean placementDone() {return placedShips == 4;}", "public void finishGame() {\n boolean didWin = true;\n\n int dimension = mBoardSquaresGrid.length;\n\n for(int i = 0; i < dimension; i++) {\n for(int j = 0; j < dimension; j++) {\n TileView tileView = mTileViewsGrid[i][j];\n BoardSquare boardSquare = mBoardSquaresGrid[i][j];\n\n int state = tileView.getState();\n boolean doesContainMine = boardSquare == null ? false : boardSquare.doesContainMine();\n\n if(state == TileView.COVERED) {\n // User did not place a flag over a mine.\n if(doesContainMine) {\n didWin = false;\n }\n\n // Uncover all tiles without flags.\n tileView.setState(TileView.UNCOVERED);\n }\n else if(state == TileView.FLAGGED_AS_MINE) {\n if(!doesContainMine) {\n // Uncover flags not covering mines.\n tileView.setState(TileView.UNCOVERED);\n }\n }\n }\n }\n publishGameResult(didWin);\n }", "public static void playerEffectivelyEndsBattlePhase() {\r\n for (int index = 1; index <= 5; index++){\r\n SummonedMonster MonsterCPU = SummonedMonster.getNthSummonedMonster(index, false);\r\n if (MonsterCPU.isExisting) {\r\n MonsterCPU.canStillAttackThisTurn = false;\r\n }\r\n }\r\n endAttack(false);\r\n }", "public static void isSolutionComplete(boolean[][] flag)\r\n\t{\r\n\t\tboolean indivFlag = true;\r\n\t\t\r\n\t\tfor(int i = 0; i < 9; ++i)\r\n\t\t{\r\n\t\t\tfor(int j = 0; j < 9; ++j)\r\n\t\t\t{\r\n\t\t\t\tif(flag[i][j] == false)\r\n\t\t\t\t{\r\n\t\t\t\t\tindivFlag = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(indivFlag == true)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(null, \"You finished the game\");\r\n\t\t}\r\n\t}", "static boolean isSolved() {\n\t\tfor (int i=0; i<Play.NUM[TOTAL]; i++) {\t\n\t\t\tif (!isPieceCorrect(Play.jigsawPieces.get(i))) { //check if the piece is in the correct position and orientation\n\t\t\t\treturn false; //return if even once piece is not\n\t\t\t}\n\t\t}\n\t\treturn true; //if the method reached here, then it means that all the pieces are correctly placed\n\t}", "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 static boolean isOptionsDone() {\r\n\t\tboolean gameOptionsDone = true;\r\n\t\t\r\n\t\t//Check if all the text fields are not blank or have correct data.\r\n\t\ttry {\r\n\t\t\tInteger.parseInt(GameOptions.bagValue.getSelectedItem());\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\tgameOptionsDone = false;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tInteger.parseInt(GameOptions.nilValueTextField.getText());\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\tgameOptionsDone = false;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tInteger.parseInt(GameOptions.doubleNilValueTextField.getText());\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\tgameOptionsDone = false;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tInteger.parseInt(GameOptions.winScoreTextField.getText());\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\tgameOptionsDone = false;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tInteger.parseInt(GameOptions.loseScoreTextField.getText());\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\tgameOptionsDone = false;\r\n\t\t}\r\n\t\r\n\t\t//Show dialog box reminder.\r\n\t\tif (!gameOptionsDone) FrameUtils.showDialogBox(\"You have entered incorrect data.\");\r\n\t\t\r\n\t\t//Save the options.\r\n\t\tsaveOptions();\r\n\t\t\r\n\t\t//Convert the options to ints.\r\n\t\tconvertOptionsToNumbers();\r\n\t\t\r\n\t\treturn gameOptionsDone;\r\n\t}", "public static boolean checkDefeat(){\n\t\tboolean found = false;\n\t\t\n\t\tfor (int i = gui.getCurUnitSelected() ; i < heroList.length && !found; i++){\n\t\t\tif (heroList[i].isAlive()){\n\t\t\t\tgui.setCurSelectedUnit(i);\n\t\t\t\tfound = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < gui.getCurUnitSelected() && !found; i++){\n\t\t\tif (heroList[i].isAlive()){\n\t\t\t\tgui.setCurSelectedUnit(i);\n\t\t\t\tfound = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn found;\n\t}", "public boolean deal()\n {\n int k, j;\n boolean enoughCards;\n\n // clear all hands\n for (j = 0; j < numPlayers; j++)\n hand[j].resetHand();\n\n enoughCards = true;\n for (k = 0; k < numCardsPerHand && enoughCards ; k++)\n {\n for (j = 0; j < numPlayers; j++)\n if (deck.getNumCards() > 0)\n hand[j].takeCard( deck.dealCard() );\n else\n {\n enoughCards = false;\n break;\n }\n }\n\n return enoughCards;\n }", "public boolean allPlayersReady() {\n // Si un jugador esta offline, lo ignora\n for (Player p : players) {\n if (p.isOnline() && !p.isReady())\n return false;\n }\n return true;\n }" ]
[ "0.65164", "0.5664674", "0.5652523", "0.5495186", "0.54689467", "0.5462751", "0.5455661", "0.5453483", "0.54456335", "0.5428715", "0.54035723", "0.5340873", "0.53356415", "0.53218496", "0.5312907", "0.53124243", "0.526904", "0.52687126", "0.52489036", "0.52348745", "0.5232934", "0.52108145", "0.5197", "0.51841605", "0.5174892", "0.5136465", "0.51329416", "0.5127908", "0.5127488", "0.51162076", "0.5093421", "0.50889695", "0.5080191", "0.50786567", "0.50665504", "0.50618047", "0.5053278", "0.5050322", "0.504698", "0.5042224", "0.5036987", "0.5031923", "0.50305754", "0.5025188", "0.501183", "0.4971937", "0.49602294", "0.494593", "0.49456608", "0.49391937", "0.4938975", "0.49387804", "0.49273077", "0.4925002", "0.4923519", "0.49156487", "0.49145377", "0.49118337", "0.49095213", "0.4903934", "0.4900076", "0.48743162", "0.48715615", "0.48695755", "0.48666906", "0.48635054", "0.48635054", "0.48631513", "0.48595133", "0.48521304", "0.48498482", "0.4844098", "0.4842515", "0.48424742", "0.48356688", "0.48335215", "0.4831243", "0.4829926", "0.48296702", "0.48288152", "0.4826873", "0.48231676", "0.4818703", "0.4817015", "0.48142287", "0.4812367", "0.4808897", "0.4804544", "0.48029536", "0.48006073", "0.4800296", "0.4795933", "0.479114", "0.47888738", "0.47879377", "0.47875997", "0.47872788", "0.47852167", "0.47809008", "0.47731325" ]
0.70947164
0
Sets the player field "DoneBrainstorming" to given value for a selected player. If the value is true it updates the PlayersDoneBrainstorming field in the database
@Override public void setPlayerDoneBrainstorming(Player player, boolean value){ DatabaseReference currentRef = database.getReference(gameCodeRef).child("Players").child(player.getUsername()); currentRef.child("DoneBrainstorming").setValue(value); if(value){ updateNrPlayerValues("PlayersDoneBrainstorming"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void setPlayerDoneEliminating(Player player, boolean value) {\n DatabaseReference currentRef = database.getReference(gameCodeRef).child(\"Players\").child(player.getUsername());\n currentRef.child(\"DoneEliminating\").setValue(value);\n if(value){\n updateNrPlayerValues(\"PlayersDoneEliminating\");\n }\n\n }", "private void checkPlayersDoneBrainstorming(int nrDoneBrainstorming) {\n if (nrDoneBrainstorming == nrPlayers){\n database.getReference(gameCodeRef).child(\"AllDoneBrainstorming\").setValue(true);\n database.getReference(gameCodeRef).child(\"PlayersDoneEliminating\").setValue(0);\n database.getReference(gameCodeRef).child(\"AllDoneEliminating\").setValue(false);\n }\n }", "@Override\n public void setAllDoneBrainstormingChangedListener() {\n database.getReference(gameCodeRef).child(\"AllDoneBrainstorming\").addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n String stringValue = String.valueOf(snapshot.getValue());\n if (!stringValue.equals(null) && !stringValue.equals(\"null\")){\n Boolean value = (Boolean) snapshot.getValue();\n if (value){\n Controller.getInstance().allPlayersDoneBrainstorming();\n }\n }\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n Log.w(TAG, \"Failed to read value.\", error.toException());\n }\n });\n\n }", "public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}", "public void setBuzzInPeriod() {\n\n passButton.setVisible(true);\n teamLabel.setText(\"\");\n\n if (teamHasAnswered.get(teamIndex)) {\n AppearanceSettings.setEnabled(false, submitAnswerButton, answerField, passButton);\n announcementsLabel.setText(\"It's time to buzz in! But you've already had your chance..\");\n } else {\n announcementsLabel.setText(\"Buzz in to answer the question!\");\n passButton.setEnabled(true);\n AppearanceSettings.setEnabled(false, submitAnswerButton, answerField);\n }\n }", "public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }", "public void testSetIsPlayable()\n {\n assertEquals(b1.getIsPlayable(), false);\n b1.setIsPlayable(true);\n assertEquals(b1.getIsPlayable(), true);\n\n }", "public void execute(FieldPlayer player){\n if (player.isBallWithinReceivingRange() || !player.getTeam().inControl()){\n player.getFSM().changeState(ChaseBall.Instance());\n\n return;\n } \n\n if (player.getSteering().PursuitIsOn()){\n player.getSteering().setTarget(player.getBall().getPos());\n }\n\n //if the player has 'arrived' at the steering target he should wait and\n //turn to face the ball\n if (player.isAtTarget()){\n player.getSteering().arriveOff();\n player.getSteering().pursuitOff();\n player.trackBall(); \n player.setVelocity(new Vector2D(0,0));\n } \n }", "public void setBluePlayer(Player bluePlayer) {\n\t\tthis.bluePlayer = bluePlayer;\n\t}", "public void setBattling(boolean b)\n\t{\n\t\tm_isBattling = b;\n\t\tif(!m_isBattling)\n\t\t\t/* If the player has finished battling kill their battlefield */\n\t\t\tm_battleField = null;\n\t}", "public static void betting()\n\t{\n\t\ttfBet.setEnabled(true);\n\t\tbtnPlay.setEnabled(true);\n\t\tbtnHit.setEnabled(false);\n\t\tbtnStay.setEnabled(false);\n\t\tbtnDouble.setEnabled(false);\n\t}", "public void setTurning(java.lang.Boolean value);", "public void setParking(java.lang.Boolean value);", "public void updatePlayer(Player player) {\n\t\t// update the flag GO TO JAIL in Player class\n\t}", "private void PLAYERS_ComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n if(PLAYERS_ComboBox1.getSelectedIndex() == 1)\n Machin_playin = true;\n else\n Machin_playin = false;\n \n }", "boolean setPlayer(String player);", "public void setOkForPickup(java.lang.Boolean okForPickup) {\r\n this.okForPickup = okForPickup;\r\n }", "private void checkPlayersDoneEliminating(int nrDoneEliminating) {\n if (nrDoneEliminating == nrPlayers){\n database.getReference(gameCodeRef).child(\"AllDoneEliminating\").setValue(true);\n database.getReference(gameCodeRef).child(\"PlayersDoneBrainstorming\").setValue(0);\n database.getReference(gameCodeRef).child(\"AllDoneBrainstorming\").setValue(false);\n }\n }", "private void nextButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nextButtonActionPerformed\n if(napakalakiModel.getCurrentPlayer() == null){\n this.nextButton.setEnabled(false);\n this.combatButton.setEnabled(false);\n this.playerView1.enableAfterNextButton();\n napakalakiModel.nextTurn();\n this.combatResultLabel.setText(\"\");\n // Llamo al setNapakalaki para que surjan efecto los cambios\n setNapakalaki(napakalakiModel); \n }\n else{\n // Si ha cumplido el mal rollo puede continuar\n if( napakalakiModel.getCurrentPlayer().validState() ){\n this.nextButton.setEnabled(false);\n this.combatButton.setEnabled(false);\n this.playerView1.enableAfterNextButton();\n napakalakiModel.nextTurn();\n this.combatResultLabel.setText(\"\");\n // Llamo al setNapakalaki para que surjan efecto los cambios\n setNapakalaki(napakalakiModel);\n }\n else{\n this.combatResultLabel.setText(\"No cumples las condiciones para pasar de turno.\");\n }\n } \n }", "@Override\n public void setPlayerBrainList(Player player, ArrayList<Brain> brains) {\n DatabaseReference currentRef = database.getReference(gameCodeRef).child(\"Players\").child(player.getUsername());\n currentRef.child(\"BrainList\").setValue(brains);\n }", "protected abstract void assignTeam(boolean playerR, boolean playerB);", "@Override\n public void setFinished() {\n finishedBanking = true;\n }", "private void setPlayer(BoardSquaresState player){\n\t\tif(player == BoardSquaresState.CROSS){\n\t\t\tselectedPlayer = BoardSquaresState.CROSS;\n\t\t\tplayerSelectionButton.setText(R.id.button_title, \"Cross\");\n\t\t\tplayerSelectionButton.setText(R.id.button_subtitle, \"You go first!\");\n\t\t\tplayerSelectionButton.setImageResource(R.id.selector_button_image, R.drawable.cross_1);\n\t\t\tplayerSelectionButton.setImageResource(R.id.item_set_image, R.drawable.btn_check_on_focused_holo_light);\n\t\t}\n\t\telse{\n\t\t\tselectedPlayer = BoardSquaresState.NOUGHT;\n\t\t\tplayerSelectionButton.setText(R.id.button_title, \"Nought\");\n\t\t\tplayerSelectionButton.setText(R.id.button_subtitle, \"Computer goes first!\");\n\t\t\tplayerSelectionButton.setImageResource(R.id.selector_button_image, R.drawable.nought_1);\n\t\t\tplayerSelectionButton.setImageResource(R.id.item_set_image, R.drawable.btn_check_on_focused_holo_light);\n\t\t}\n\n\t}", "public boolean setPlayer(Player aNewPlayer)\r\n {\r\n boolean wasSet = false;\r\n player = aNewPlayer;\r\n wasSet = true;\r\n return wasSet;\r\n }", "public boolean pickedup(Player player) {\n\t\treturn false;\n\t}", "void ballState(boolean hasBall, String ballPlayer) {\n if (hasBall) {\n hasBallLabel.setText(\"You have the ball\");\n hasBallLabel.setForeground(Color.RED);\n updateComboBox();\n } else {\n hasBallLabel.setText(ballPlayer + \" has the ball\");\n hasBallLabel.setForeground(Color.BLACK);\n }\n menuPlayersComboBox.setEnabled(hasBall);\n menuThrowButton.setEnabled(hasBall);\n menuRefreshButton.setEnabled(hasBall);\n }", "public void setDone(boolean value) {\n this.done = value;\n }", "private void handleAFKCommand(Player player, String playerName)\n {\n Server server = this.getServer();\n \n // whatever happens, this was explicit.\n this.afkPlayersAuto.put(playerName, false);\n \n if (!this.afkPlayers.containsKey(playerName) || !this.afkPlayers.get(playerName))\n {\n this.afkPlayers.put(playerName, true);\n \n server.broadcastMessage(ChatColor.YELLOW + playerName + \" is now away.\");\n \n // set the new player name, make sure to truncate it.\n playerName = ChatColor.GRAY + playerName;\n player.setPlayerListName(playerName.substring(0, Math.min(16, playerName.length())));\n }\n else \n {\n this.afkPlayers.put(playerName, false);\n \n // reset the player name, of course.\n player.setPlayerListName(playerName);\n server.broadcastMessage(ChatColor.YELLOW + playerName + \" is no longer away.\");\n }\n }", "public void setPlayerTurn(boolean playerTurn) {\n this.playerTurn = playerTurn;\n }", "public void set_isTripDone(boolean value) {\n\t\tsharedPreferences = context.getSharedPreferences(\"Login\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putBoolean(\"isTripDone\", value);\n\t\teditor.commit();\n\t}", "public void onClick(View v) {\n\t\t\t\tString name=editName.getText().toString(); \r\n\t\t\t\tint playerId=Integer.parseInt(editId.getText().toString());\r\n\t\t\t\tint handicap=Integer.parseInt(editHandicap.getText().toString());\r\n\t\t\t\tint code=Integer.parseInt(editCode.getText().toString());\r\n\t\t\t\tint status=editStatus.isChecked()?0:1;\r\n\t\t\t\t\r\n\t\t\t\t// check if REQUIRED fields are vacant \r\n\t\t\t\tif(name.equals(\"\")|| code<1 || handicap<1 || playerId<1)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (playerId<1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Select a player\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\treturn;\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\tToast.makeText(getApplicationContext(), \"Enter a name and handicap\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t} \t\r\n\t\t\t\telse \r\n\t\t\t\t{ //db = new DatabaseHelper(getApplicationContext());\r\n\t\t\t\t\tplayer=db.getPlayer(playerId);\r\n\t\t\t\t\tplayer.setName(name);\r\n\t\t\t\t\tplayer.setHandicap(handicap);\r\n\t\t\t\t\tplayer.setKey(code);\r\n\t\t\t\t\tplayer.setStatus(status);\r\n\t\t\t\t\tdb.updatePlayer(player);\r\n\t\t\t\t\t//db.close();\r\n\t\t\t\t\t// Save the Data in Database \r\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Saved Successfully \", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t}", "public void setWon(){\n won = true;\n }", "private void bust() {\n //Dialog box pop-up\n JOptionPane.showMessageDialog(this, this.getPlayerName() + \" busted with a value of: \" + this.getValue(), \"BUSTED!\", JOptionPane.INFORMATION_MESSAGE);\n busted = true; //Hand busted\n }", "public void playerMissedBall(){ active = false;}", "public void setAccepted_tou(boolean accepted_tou);", "private void ReplacePlayer()\n {\n String oldPlayer = GetPlayerString(mTeamsComboBox.getSelectedItem().toString(),\n mPositionComboBox.getSelectedItem().toString());\n if( oldPlayer == null )\n return;\n\n String newPlayer = GetPlayerString_UI();\n String team = mTeamsComboBox.getModel().getElementAt(mTeamsComboBox.getSelectedIndex()).toString();\n ReplacePlayer(team, oldPlayer, newPlayer);\n }", "public void setFlying ( boolean value ) {\n\t\texecute ( handle -> handle.setFlying ( value ) );\n\t}", "public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }", "private void endFreeze(Player player) {\r\n\t\tFrozenPlayerInfo info = frozenPlayers.remove(player.getUniqueId());\r\n\r\n\t\t// Again, two packets are sent, though we do not modify them this time.\r\n\t\tplayer.setAllowFlight(info.allowFlight);\r\n\t\tplayer.setFlying(info.isFlying);\r\n\t}", "public void setPlayerFinished(Player player) {\r\n Log.d(Thread.currentThread().getName(), \"setPlayerFinished(\" + player.getName() + \")\");\r\n for (int i = 0; i < players.size(); i++) {\r\n PlayerContainer pc = players.get(i);\r\n if (pc.player.getName().equals(player.getName())) {\r\n players.remove(pc);\r\n finishedPlayers.add(player);\r\n break;\r\n }\r\n }\r\n if (activePlayer.getName().equals(player.getName())) {\r\n nextTurn();\r\n }\r\n if (nextPlayer.getName().equals(player.getName())) {\r\n advanceNextPlayer();\r\n }\r\n }", "public void setWinner(boolean winner) {\n\t\tthis.winner = winner;\n\t}", "public Builder setEnableBattlePartySaving(boolean value) {\n \n enableBattlePartySaving_ = value;\n onChanged();\n return this;\n }", "public void endsGameAndSetsWinner(Player player) {\n this.winner = player.getId(); \n this.gameStarted = false; \n \n }", "public Builder setB27(boolean value) {\n bitField0_ |= 0x04000000;\n b27_ = value;\n onChanged();\n return this;\n }", "public void setActive(Player p, boolean value) {\n this.getInstance(p).setActive(value);\n }", "public static void set_players(){\n\t\tif(TossBrain.compselect.equals(\"bat\")){\n\t\t\tbat1=PlayBrain1.myteam[0];\n\t\t\tbat2=PlayBrain1.myteam[1];\n\t\t\tStriker=bat1;\n\t\t\tNonStriker=bat2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\tbat1=PlayBrain1.oppteam[0];\n\t\t\t\tbat2=PlayBrain1.oppteam[1];\n\t\t\t\tStriker=bat1;\n\t\t\t\tNonStriker=bat2;\n\n\t\t\t\t}\n\t}", "private void setBlackPlayer(Player player) {\r\n\t\tthis.blackPlayer = player;\r\n\t}", "@Override\n public void setBrakeModeEnabled(boolean enabled)\n {\n final String funcName = \"setBrakeModeEnabled\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"enabled=%s\", enabled);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n motor.setIdleMode(enabled ? IdleMode.kBrake : IdleMode.kCoast);\n }", "public void setControllable(Rowdy player) {\r\n\t\tthis.player = player;\r\n\t}", "public void setisDone(boolean b) {\r\n isDone = b;\r\n }", "public void setTripPaused(boolean value) {\n\t\tsharedPreferences = context.getSharedPreferences(\"TRIP\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putBoolean(\"isTripPaused\", value);\n\t\teditor.commit();\n\t}", "private void setBidded(){\n this.status = \"Bidded\";\n }", "private void setBlocked(boolean value) {\n\n blocked_ = value;\n }", "public void updateButton(boolean done) {\n\t\tdiceBtn.setDisable(done);\n\t\tendTurn.setDisable(!done);\n\t}", "public void updateWithPointWonBy(Player player) {\n if(managerTennisMatch.statusTennisMatch == \"ClassicalGame\") {\n if (player == player1) {\n managerTennisMatch.checkScoreAndUpdateGame(player, player2);\n } else {\n managerTennisMatch.checkScoreAndUpdateGame(player, player1);\n }\n } else if(managerTennisMatch.statusTennisMatch == \"TieBreakInProgress\") {\n player.setScore(player.getScore() + 1);\n if((player1.getScore() >= 7 && player1.getScore() - player2.getScore() >= 2) || (player2.getScore() >= 7 && player2.getScore() - player1.getScore() >= 2)) {\n tennisSetList.get(tennisSetList.size() - 1).getBaseGameList().add(new TieBreakGame(player));\n player1.setScore(0);\n player2.setScore(0);\n }\n } else {\n return;\n }\n }", "private void buyPlayer(FootballPlayer player, String playerName, int num) {\n\t\tint valid = game.addPlayer(playerName);\n\t\tif(valid==0) {\n\t\t\tplayerNameArray[num].setText(playerName);\n\t\t\timageArray[num].setIcon(MainGui.getShirt(player.getTeamName()));\n\t\t\tbuttonArray[num].setText(\"X\");\n\t\t\tlblBudgetText.setText(game.getCurrentUser().getBudget() + \" RGG\");\n\t\t\t\n\t\t} else if (valid==1) {\n\t\t\tJOptionPane.showMessageDialog(frame,\"You have already selected this player for your team\");\n\t\t} else if (valid==-1) {\n\t\t\tJOptionPane.showMessageDialog(frame,\"You don´t have enough budget too buy \" + playerName);\n\t\t}\n\t}", "public void setSinglePlayer(){\n isSinglePlayer = true;\n }", "public void changeTurn()\r\n {\r\n isPlayersTurn = !isPlayersTurn;\r\n }", "public void setFishing(boolean b)\n\t{\n\t\tm_isFishing = b;\n\t\tif(b == true)\n\t\t\tlastFishingTime = System.currentTimeMillis();\n\t\tif(m_map != null)\n\t\t{\n\t\t\t/* TODO: Tell clients to update this char to reflect whether player is fishing or not. */\n\t\t}\n\t}", "public void setBakery (boolean b)\n {\n bakery = b;\n }", "public void setBraking(double braking) {\r\n this.braking = braking;\r\n }", "public void acivatePlayer() {\n\t\tthis.setEnabled(true);\n\t}", "private void changeCurrentPlayerText() {\n\t\tString currentPlayer = textFieldCurrentPlayer.getText();\n\t\tif (currentPlayer.equals(\"Player1\")) {\n\t\t\ttextFieldCurrentPlayer.setText(\"Player2\");\n\t\t} else {\n\t\t\ttextFieldCurrentPlayer.setText(\"Player1\");\n\t\t} \n\t}", "public void bFieldGoal(View view) {\n scoreTeamB = scoreTeamB + 3;\n displayForTeamB(scoreTeamB);\n }", "public void setPlaying(boolean playing) {\n this.playing=playing;\n }", "public void setPickedUp(boolean pickedUp) {\r\n this.pickedUp = pickedUp;\r\n }", "private void brakeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_brakeActionPerformed\n\n roboLogic.brake();\n if (l.isRunning()) {\n l.stop();\n }\n if (r.isRunning()) {\n r.stop();\n }\n\n\n }", "public void setPlayer(String player) {\r\n this.player = player;\r\n }", "private void savePlayers() {\r\n this.passive_players.stream()\r\n .filter(E -> E.isChanged())\r\n .forEach(e -> {\r\n e.save();\r\n });\r\n }", "public void testGetIsPlayable()\n {\n assertEquals(b1.getIsPlayable(), false);\n b1.setIsPlayable(true);\n assertEquals(b1.getIsPlayable(), true);\n }", "public void checkSetPlayerTurn() // Check and if needed set the players turns so it is their turn.\n\t{\n\t\tswitch (totalPlayers) // Determine how many players there are...\n\t\t{\n\t\tcase 2: // For two players...\n\t\t\tswitch (gameState)\n\t\t\t{\n\t\t\tcase twoPlayersNowPlayerOnesTurn: // Make sure it's player one's turn.\n\t\t\t\tplayers.get(0).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\n\t\t\tcase twoPlayersNowPlayerTwosTurn: // Make sure it's player two's turn.\n\t\t\t\tplayers.get(1).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}", "public void playerSetFlag(List<String> playersList) {\n for (String playerId : playersList) {\n Player player = playerRepository.findBy_id(playerId);\n player.setFirst(false);\n player.setLast(false);\n playerRepository.save(player);\n }\n\n //setez First\n String idFirst = playersList.get(0);\n Player first = playerRepository.findBy_id(idFirst);\n first.setFirst(true);\n playerRepository.save(first);\n\n //setez Last\n String idLast = playersList.get(playersList.size() - 1);\n Player last = playerRepository.findBy_id(idLast);\n last.setLast(true);\n playerRepository.save(last);\n }", "public void setServiceBrake(boolean sBrake) {\n\t\tthis.serviceBrake = sBrake;\n\t\tthis.brakeFailureStatus();\n if(!this.brakeFailureActive){\n this.serviceBrake = sBrake;\n } else {\n\t\t\tthis.serviceBrake = false;\n\t\t}\n }", "public static boolean fletch(Player player, int buttonId) {\n\t\tif(!player.getAttr().get(\"fletching_bows\").getBoolean()) {\n\t\t\treturn false;\n\t\t}\n\t\tOptional<ProduciblePolicy> pol = Log.getProducibles((BowCarving) player.getAttr().get(\"fletching_bowcarving\").get(), buttonId);\n\t\t\n\t\tif(!pol.isPresent()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tplayer.closeWidget();\n\t\tif(Log.getAmount(buttonId) == 28) {\n\t\t\tBowCarving fletch = (BowCarving) player.getAttr().get(\"fletching_bowcarving\").get();\n\t\t\tfletch.current = pol.get();\n\t\t\tplayer.out(new SendEnterAmount(\"How many you would like to make?\", s -> () -> BowCarving.fletch(player, fletch.getCurrent(), Integer.parseInt(s))));\n\t\t\treturn true;\n\t\t}\n\t\tfletch(player, pol.get(), Log.getAmount(buttonId));\n\t\treturn true;\n\t}", "public Builder setPokeball(POGOProtos.Rpc.Item value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n pokeball_ = value.getNumber();\n onChanged();\n return this;\n }", "public void switchPlayer() {\n \tisWhitesTurn = !isWhitesTurn;\n }", "public boolean getIsCompletingGame()\r\n {\r\n return this.isCompletingGame; \r\n }", "@Override\n\tpublic void setPlayer(Player player) {\n\n\t}", "public void markAsDone() {\n this.isDone = true;\n this.completed = \"1\";\n }", "public boolean isSetPlayer() {\n return this.player != null;\n }", "public void setTallied(java.lang.Boolean value);", "public void setActivePlayer(Piece.COLOR activePlayer) {\n this.activePlayer = activePlayer;\n }", "public void setBIsGiveBreakfast(boolean bIsGiveBreakfast) {\n this.bIsGiveBreakfast = bIsGiveBreakfast;\n }", "public boolean setVibrate() {\n boolean isVibrate = checkVibrate();\n editor.putBoolean(Constans.KeyPreference.TURN_VIBRATE, !isVibrate);\n editor.commit();\n return !isVibrate;\n }", "public Builder setPokeballValue(int value) {\n \n pokeball_ = value;\n onChanged();\n return this;\n }", "public void setPlayer(Player player) {\r\n this.player = player;\r\n }", "public void switchPlayer(){\n\n if(playerToggle.equals(\"X\")){\n playerToggle = \"O\";\n }\n\n else{\n playerToggle = \"X\";\n }\n\n SwitchDialog dialog = new SwitchDialog();\n dialog.show(getSupportFragmentManager(), \"nextUser\");\n }", "public void setIsBidder(char isBidder) {\n\tthis.isBidder = isBidder;\n}", "public void setAchieved(Boolean newValue);", "public void setHasPlayer(boolean hasPlayer) {\n\t\tHasPlayer = hasPlayer;\n\t}", "private void recruitThingsPhase() {\n\n ClickObserver.getInstance().setTerrainFlag(\"RecruitingThings: PlaceThings\");\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(false);\n }\n });\n int numToDraw = 0;\n boolean flag;\n \n for (final Player p : playerList) {\n doneClicked = false;\n this.player = p;\n player.flipAllUp();\n ClickObserver.getInstance().setActivePlayer(player);\n flag = true;\n pause();\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getHelpText().setText(\"Recruitment Phase: \" + p.getName()\n + \", draw free/paid Things from The Cup, then click 'done'\");\n GUI.getRackGui().setOwner(player);\n TheCupGUI.update();\n }\n });\n \n while (isPaused) {\n while (!doneClicked) {\n if (freeClicked) {\n if (flag) {\n System.out.println(player.getName() + \" -clicked free\");\n numToDraw = (int)Math.ceil(player.getHexesOwned().size() / 2.0);\n System.out.println(numToDraw + \" -num to draw\");\n final int finNumToDraw = numToDraw;\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n TheCupGUI.setFieldText(\"\"+finNumToDraw);\n }\n });\n flag = false;\n }\n }\n if (paidClicked) {\n flag = true;\n if (flag) {\n \tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n \tPlayerBoard.getInstance().updateGold(player);\n }\n });\n flag = false;\n }\n }\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n player.flipAllDown();\n }\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(true);\n }\n });\n\n ClickObserver.getInstance().setTerrainFlag(\"\");\n }", "public void setPlayer(Player player) {\n this.player = player;\n }", "public void setPlayer(Player player) {\n this.player = player;\n }", "public Builder setAccepted(boolean value) {\n \n accepted_ = value;\n onChanged();\n return this;\n }", "@Override\r\n\tprotected void onBoSave() throws Exception {\n\t\t\r\n\t\t\r\n\t\tsuper.onBoSave();\r\n\t\t// 修改按钮属性\r\n\t\tif(myaddbuttun){\r\n\t\t\tgetButtonManager().getButton(IBillButton.Add).setEnabled(true);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Con)\r\n\t\t\t\t\t.setEnabled(true);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Pp)\r\n\t\t\t\t\t.setEnabled(false);\r\n\t\t\tmyaddbuttun=true;\r\n\t\t\t// 转到卡片面,实现按钮的属性转换\r\n\t\t\tgetBillUI().setCardUIState();\r\n\t\t\tsuper.onBoReturn();\r\n\t\t}else{\r\n\t\t\tgetButtonManager().getButton(IBillButton.Add).setEnabled(false);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Con)\r\n\t\t\t\t\t.setEnabled(false);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Pp)\r\n\t\t\t\t\t.setEnabled(true);\r\n\t\t\tmyaddbuttun=false;\r\n\t\t\t// 转到卡片面,实现按钮的属性转换\r\n\t\t\tgetBillUI().setCardUIState();\r\n\t\t\tsuper.onBoReturn();\r\n\t\t}\r\n\t}", "public void updatePlayersAFKState()\n {\n // Iterate through all players\n for (Map.Entry<UUID, PlayerAFKModel> entry : players.entrySet())\n {\n PlayerAFKModel playerAFKModel = entry.getValue();\n\n // Check if player has moved\n if( playerAFKModel.hasMoved() )\n {\n // Moved\n\n // Check if AFK\n if( playerAFKModel.isAFK() )\n {\n // Is AFK. Then player left AFK\n playerAFKModel.markAsNotAFK();\n this.playerLeftAFK(Bukkit.getPlayer(playerAFKModel.getPlayer().getUniqueId()));\n }\n\n // Restart AFK timer\n playerAFKModel.timerStartOrRestart();\n } else {\n // Player hasn't moved\n\n // Check if player is AFK\n if ( !playerAFKModel.isAFK() )\n {\n // Not AFK. Check for how long\n if( playerAFKModel.hasBeenAFKFor(this.timeItTakesToGoAFK) )\n {\n // AFK for too long. Mark them as AFK\n this.playerWentAFK( playerAFKModel.getPlayer() );\n }\n } else {\n // Player is AFK already. Increase timer\n this.updatePlayerAFKTimer( playerAFKModel.getPlayer() );\n }\n }\n }\n }", "public void setGameWon(Boolean won){\n\t\tm_gameWon = won;\n\t}", "public boolean applyWinner(UUID winner) {\r\n\t\tPennyGame plugin = PennyGame.getPlugin(PennyGame.class);\r\n\t\tRegisteredServiceProvider<Economy> rsp = plugin.getServer().getServicesManager().getRegistration(Economy.class);\r\n\t\tEconomy econ = rsp.getProvider();\r\n\t\tOfflinePlayer player = Bukkit.getOfflinePlayer(winner);\r\n\t\t\r\n\t\tif(econ.depositPlayer(player, jackpot).transactionSuccess()) {\r\n\t\t\tthis.tickets.clear();\r\n\t\t\tplugin.getSettings().set(\"jackpot\", startingPot);\r\n\t\t\tplugin.getSettings().set(\"last-winner\", player.getName());\r\n\t\t\tplugin.getSettings().set(\"last-winner-sum\", jackpot);\r\n\t\t\tplugin.saveSettings();\r\n\t\t\tjackpot = startingPot;\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private void jRadioButtonShootAlternativelyActionPerformed() {\r\n\t\tjRadioButtonShootAlternatively.setSelected(true);\r\n\t\tjRadioButtonShootUntilWater.setSelected(false);\r\n\t\tgame.setGameMode(GameMode.ALTERNATIVELY);\r\n\t}", "public void setIsCompletingGame(boolean state)\r\n {\r\n this.isCompletingGame= state; \r\n }" ]
[ "0.6681529", "0.66558194", "0.58751595", "0.55911547", "0.55102587", "0.55057037", "0.54615325", "0.5444105", "0.5436171", "0.54254985", "0.53895754", "0.53471553", "0.5291201", "0.52427596", "0.5230458", "0.51894504", "0.51780665", "0.5152055", "0.5117819", "0.51166236", "0.50902945", "0.5068225", "0.5054697", "0.5054107", "0.50465935", "0.5045946", "0.502214", "0.5010099", "0.5004222", "0.5004169", "0.49913943", "0.4989977", "0.49843478", "0.4983539", "0.49760446", "0.49728736", "0.4971153", "0.49703053", "0.49608472", "0.49477828", "0.4946778", "0.49331793", "0.492616", "0.49210313", "0.49209055", "0.49161202", "0.49160448", "0.49112448", "0.49099338", "0.4909423", "0.4899531", "0.48818392", "0.48817387", "0.48746496", "0.48736188", "0.48711944", "0.48709702", "0.48654506", "0.4865197", "0.48632392", "0.48551062", "0.48526064", "0.48503438", "0.48394457", "0.4823784", "0.4820279", "0.4819783", "0.4816127", "0.48068985", "0.4801095", "0.47990498", "0.479615", "0.47846913", "0.4782838", "0.47814184", "0.47678527", "0.4763169", "0.47560248", "0.4755897", "0.47552216", "0.4753375", "0.47531542", "0.47488573", "0.4747471", "0.47458705", "0.47396496", "0.4738096", "0.47378042", "0.47363138", "0.47352228", "0.47345778", "0.4730102", "0.47300792", "0.47197536", "0.47174168", "0.47155353", "0.4714812", "0.47026932", "0.47004232", "0.4700065" ]
0.8326602
0
Sets the player field "DoneEliminating" to given value for a selected player. If the value is true it updates the PlayersDoneEliminating field in the database
@Override public void setPlayerDoneEliminating(Player player, boolean value) { DatabaseReference currentRef = database.getReference(gameCodeRef).child("Players").child(player.getUsername()); currentRef.child("DoneEliminating").setValue(value); if(value){ updateNrPlayerValues("PlayersDoneEliminating"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void setPlayerDoneBrainstorming(Player player, boolean value){\n DatabaseReference currentRef = database.getReference(gameCodeRef).child(\"Players\").child(player.getUsername());\n currentRef.child(\"DoneBrainstorming\").setValue(value);\n if(value){\n updateNrPlayerValues(\"PlayersDoneBrainstorming\");\n }\n }", "private void checkPlayersDoneEliminating(int nrDoneEliminating) {\n if (nrDoneEliminating == nrPlayers){\n database.getReference(gameCodeRef).child(\"AllDoneEliminating\").setValue(true);\n database.getReference(gameCodeRef).child(\"PlayersDoneBrainstorming\").setValue(0);\n database.getReference(gameCodeRef).child(\"AllDoneBrainstorming\").setValue(false);\n }\n }", "CratePrize removeEditingUser(Player player);", "public boolean pickedup(Player player) {\n\t\treturn false;\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n for (int i = 0; i < p.length; i++) {\n if (pChecked[i]) { // if a name is selected\n\n selectedPlayers.remove(p[i]); // remove the player from the list of selected players\n players.remove(p[i]); // remove it from the list of names to save\n savedNames = players.toString(); // convert the list of names to a single string that will be saved later\n savedNames = savedNames.replaceAll(\"\\\\[\", \"\").replaceAll(\"\\\\]\", \"\"); // the new string will include the list's square brackets. This removes them.\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"savedNames\", savedNames); // save the new list of players' names\n editor.commit();\n pChecked[i] = false; // untick the name\n }\n }\n }", "public void cmdRemovePlayer(User teller, Player player) {\n boolean removed = tournamentService.removePlayer(player);\n tournamentService.flush();\n if (!removed) {\n command.tell(teller, \"I''m not able to find {0} in the tournament.\", player);\n } else {\n command.tell(teller, \"Done. Player {0} is no longer in the tournament.\", player);\n }\n }", "private void endFreeze(Player player) {\r\n\t\tFrozenPlayerInfo info = frozenPlayers.remove(player.getUniqueId());\r\n\r\n\t\t// Again, two packets are sent, though we do not modify them this time.\r\n\t\tplayer.setAllowFlight(info.allowFlight);\r\n\t\tplayer.setFlying(info.isFlying);\r\n\t}", "protected void processPlayerDeparted(String name) {\n Player player = tournamentService.findPlayer(name);\n if (player == null) {\n alertManagers(\"Departing player {0} is on my notify list, but I don''t have him in the tournament roster.\", name);\n return;\n }\n player.setState(PlayerState.OFFLINE);\n Game game = tournamentService.findPlayerGame(player);\n if (!game.status.isFinished()) {\n tellManagers(\"{0} departed\", name);\n }\n }", "private void deleteButtonClick() {\n\n final CharSequence[] p = new CharSequence[players.size()]; // create char array of players\n final boolean[] pChecked = new boolean[p.length]; // array to record whether or not a player is selected\n for (int i = 0; i < players.size(); i++) {\n p[i] = players.get(i).toString();\n }\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n if (players.size() > 0) {\n builder.setTitle(\"Select the players to delete...\"); // dialog shows user list of saved players and tick boxes to select them\n builder.setPositiveButton(\"Remove\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) { // when the user presses the \"Remove\" button\n\n for (int i = 0; i < p.length; i++) {\n if (pChecked[i]) { // if a name is selected\n\n selectedPlayers.remove(p[i]); // remove the player from the list of selected players\n players.remove(p[i]); // remove it from the list of names to save\n savedNames = players.toString(); // convert the list of names to a single string that will be saved later\n savedNames = savedNames.replaceAll(\"\\\\[\", \"\").replaceAll(\"\\\\]\", \"\"); // the new string will include the list's square brackets. This removes them.\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"savedNames\", savedNames); // save the new list of players' names\n editor.commit();\n pChecked[i] = false; // untick the name\n }\n }\n }\n });\n\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n }\n });\n\n builder.setMultiChoiceItems(p, new boolean[p.length], new DialogInterface.OnMultiChoiceClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which, boolean isChecked) { // Fills the dialog with the saved players' names a tick boxes to select them\n pChecked[which] = isChecked;\n }\n });\n } else {\n builder.setTitle(\"No players saved.\"); // If the user tries to delete players when no players are saved\n builder.setPositiveButton(\"I see...\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n });\n }\n builder.show();\n }", "public void setPlayerFinished(Player player) {\r\n Log.d(Thread.currentThread().getName(), \"setPlayerFinished(\" + player.getName() + \")\");\r\n for (int i = 0; i < players.size(); i++) {\r\n PlayerContainer pc = players.get(i);\r\n if (pc.player.getName().equals(player.getName())) {\r\n players.remove(pc);\r\n finishedPlayers.add(player);\r\n break;\r\n }\r\n }\r\n if (activePlayer.getName().equals(player.getName())) {\r\n nextTurn();\r\n }\r\n if (nextPlayer.getName().equals(player.getName())) {\r\n advanceNextPlayer();\r\n }\r\n }", "private void removePlayerFromTheGame(){\n ServerConnection toRemove = currClient;\n\n currClient.send(\"You have been removed from the match!\");\n updateCurrClient();\n server.removePlayerFromMatch(gameID, toRemove);\n\n if ( toRemove == client1 ){\n this.client1 = null;\n }\n else if ( toRemove == client2 ){\n this.client2 = null;\n }\n else {\n client3 = null;\n }\n gameMessage.notify(gameMessage);\n\n if ( (client1 == null && client2 == null) || (client2 == null && client3 == null) || (client1 == null && client3 == null) ){\n gameMessage.notify(gameMessage);\n }\n if ( liteGame.isWinner() ) endOfTheGame = true;\n playerRemoved = true;\n }", "@Override\n public void setAllDoneEliminatingChangedListener() {\n database.getReference(gameCodeRef).child(\"AllDoneEliminating\").addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n String stringValue = String.valueOf(snapshot.getValue());\n if (!stringValue.equals(null) && !stringValue.equals(\"null\")){\n Boolean value = (Boolean) snapshot.getValue();\n if (value){\n Controller.getInstance().allPlayersDoneEliminating();\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n Log.w(TAG, \"Failed to read value.\", error.toException());\n }\n });\n }", "private void quit() {\n\t\t\tArrayList<ClientThread> delList = new ArrayList<ClientThread>();\n\t\t\tdelList.add(this);\n\t\t\tplayers.removeAll(delList);\n\t\t\twaitingPlayers.removeAll(delList);\n\t\t\tview.changeInAndWait(players.size(),waitingPlayers.size());\t\t\n\t\t\tif(dealer == this) {\n\t\t\t\tdealer = null;\n\t\t\t\tview.writeLog(\"Dealer: \" + name + \" has quited. NO DEALER NOW.\");\n\t\t\t}else view.writeLog(\"Player: \" + name + \" has quited.\");\n\t\t\tstatusCheck();\n\t\t}", "public void endsGameAndSetsWinner(Player player) {\n this.winner = player.getId(); \n this.gameStarted = false; \n \n }", "public void eliminatePlayer(Character player){\r\n\t\tplayer.setAsPlayer(false);\r\n\t\tSystem.err.println(player.getName() + \" was eliminated\");\r\n\t}", "boolean removePlayer(String player);", "public static boolean DeleteOtherPlayer(Context context) {\n SharedPreferences prefs = context.getSharedPreferences(PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n prefs.edit().remove(\"OtherPlayer\");\n //prefs.edit().commit();\n prefs.edit().apply();\n return true;\n }", "public void setDone(boolean value) {\n this.done = value;\n }", "public void resetPlayerPassed() {\n d_PlayerPassed = false;\n }", "public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }", "private void removePlayerFromLobby() {\n\n //Added Firebase functionality assuming var player is the player who wants to leave the game.\n }", "public static boolean isDealerSelectionDone() {\r\n\t\tboolean dealerSelected = false;\r\n\t\t\r\n\t\t//Check if the dealer has been selected.\r\n\t\tif (GameSetup.player1IsDealer.getState()) {\r\n\t\t\tdealerSelected = true;\r\n\t\t}\r\n\t\tif (GameSetup.player2IsDealer.getState()) {\r\n\t\t\tdealerSelected = true;\r\n\t\t}\r\n\t\tif (GameSetup.player3IsDealer.getState()) {\r\n\t\t\tdealerSelected = true;\r\n\t\t}\r\n\t\t\r\n\t\t//Don't show fourth player if playing 3 handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tif (GameSetup.player4IsDealer.getState()) {\r\n\t\t\t\tdealerSelected = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Show dialog box reminder.\r\n\t\tif (!dealerSelected) FrameUtils.showDialogBox(\"A dealer must be selected.\");\r\n\t\t\r\n\t\t//Save who the dealer is.\r\n\t\tsaveDealerName();\r\n\t\t\t\r\n\t\treturn dealerSelected;\r\n\t}", "public boolean deletePlayerItem(PlayerItem playerItem);", "private void savePlayers() {\r\n this.passive_players.stream()\r\n .filter(E -> E.isChanged())\r\n .forEach(e -> {\r\n e.save();\r\n });\r\n }", "public void delPlayer(final Integer user_id) {\n if (Objects.equals(user_id, current_id)) {\n playersOnGame.clear();\n\n }\n else {\n // Search and remove a player from list\n for ( Player p : playersOnGame) {\n if (p.getUserId() == user_id) {\n playersOnGame.remove(p);\n break;\n }\n }\n }\n\n // Check if the current client is deleted\n if (Objects.equals(user_id, current_id)) {\n playerListLay.removeAllViews();\n playerCards.clear();\n Log.v(\"Del\", String.valueOf(user_id));\n }\n else {\n // Search and remove a player from list\n for (LinearLayout lay : playerCards) {\n if (lay.getTag() == user_id) {\n playerListLay.removeView(lay);\n playerCards.remove(lay);\n break;\n }\n }\n }\n\n // Update number of players\n playerNum.setText(String.valueOf(playersOnGame.size()));\n }", "public void onPlayerDisconnect(Player player)\r\n \t{\r\n \t\tPlayerData data = plugin.getPlayerDataCache().getData(player);\r\n \r\n \t\tdata.setFrenzyEnabled(false);\r\n \t\tdata.setSuperPickaxeEnabled(false);\r\n \t\tdata.setUnlimitedAmmoEnabled(false);\r\n \t}", "public void removeFromGame(){\n this.isInGame = false;\n }", "public void removePlayer(String name) {\n\t\tUser user = users.get(userTurn);\n\t\tFootballPlayer player = market.findPlayer(name);\n\t\tdouble marketValue = player.getMarketValue();\n\t\t\n\t\tif (tmpTeam.size() > 0) {\n\t\t\tuser.updateBudget(marketValue, \"+\");\n\t\t\ttmpTeam.removePlayer(name);\n\t\t}\n\t\tSystem.out.println(\"budget after sell\" + user.getBudget());\n\t}", "private void ReplacePlayer()\n {\n String oldPlayer = GetPlayerString(mTeamsComboBox.getSelectedItem().toString(),\n mPositionComboBox.getSelectedItem().toString());\n if( oldPlayer == null )\n return;\n\n String newPlayer = GetPlayerString_UI();\n String team = mTeamsComboBox.getModel().getElementAt(mTeamsComboBox.getSelectedIndex()).toString();\n ReplacePlayer(team, oldPlayer, newPlayer);\n }", "public void execute(FieldPlayer player){\n if (player.isBallWithinReceivingRange() || !player.getTeam().inControl()){\n player.getFSM().changeState(ChaseBall.Instance());\n\n return;\n } \n\n if (player.getSteering().PursuitIsOn()){\n player.getSteering().setTarget(player.getBall().getPos());\n }\n\n //if the player has 'arrived' at the steering target he should wait and\n //turn to face the ball\n if (player.isAtTarget()){\n player.getSteering().arriveOff();\n player.getSteering().pursuitOff();\n player.trackBall(); \n player.setVelocity(new Vector2D(0,0));\n } \n }", "public synchronized void delPlayer(@NotNull PlayerInterface player) {\n\n for(BoardCell boardCell[] : board.getGrid()) {\n for(BoardCell b : boardCell) {\n if(b.getWorker() != null) {\n if(b.getWorker().getPlayerWorker().getNickname().equals(player.getNickname())) {\n b.setWorker(null);\n }\n }\n }\n }\n player.getWorkerRef().clear();\n for (int i = 0; i < onlinePlayers.size(); i++) {\n if(onlinePlayers.get(i).getNickname().equals(player.getNickname())) {\n if(started) {\n stateList.remove(i);\n onlinePlayers.remove(i);\n nickNames.remove(player.getNickname());\n }\n break;\n }\n }\n }", "private void checkPlayersDoneBrainstorming(int nrDoneBrainstorming) {\n if (nrDoneBrainstorming == nrPlayers){\n database.getReference(gameCodeRef).child(\"AllDoneBrainstorming\").setValue(true);\n database.getReference(gameCodeRef).child(\"PlayersDoneEliminating\").setValue(0);\n database.getReference(gameCodeRef).child(\"AllDoneEliminating\").setValue(false);\n }\n }", "@EventHandler\r\n\tpublic void onPlayerQuit(PlayerQuitEvent event) {\r\n\t\tUUID uuid = event.getPlayer().getUniqueId();\r\n\t\tmain.getPlayers().get(uuid).saveTask.cancel();\r\n\t\tmain.getPlayers().get(uuid).savePlayer();\r\n\t\tmain.getPlayers().remove(uuid);\r\n\t\t\r\n\t}", "public static void clearPlayerNames() {\r\n\t\tif (GameSetup.choiceBoxPlayer1.isEnabled()) {\r\n\t\t\tGameSetup.choiceBoxPlayer1.select(0);\r\n\t\t\tMain.player1 = \"\";\r\n\t\t}\r\n\r\n\t\tif (GameSetup.choiceBoxPlayer2.isEnabled()) {\r\n\t\t\tGameSetup.choiceBoxPlayer2.select(0);\r\n\t\t\tMain.player2 = \"\";\r\n\t\t}\r\n\r\n\t\tif (GameSetup.choiceBoxPlayer3.isEnabled()) {\r\n\t\t\tGameSetup.choiceBoxPlayer3.select(0);\r\n\t\t\tMain.player3 = \"\";\r\n\t\t}\r\n\t\t\r\n\t\t//Don't show fourth player if playing 3 handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tif (GameSetup.choiceBoxPlayer4.isEnabled()) {\r\n\t\t\t\tGameSetup.choiceBoxPlayer4.select(0);\r\n\t\t\t\tMain.player4 = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void execute(Player player, ArrayList<Player> players, Game game) {\n Card card = player.getHand().get(0);\n if (card instanceof Copper) {\n //game.getSupply().getCardList().get(4).drawCard();\n }\n if (card instanceof Silver) {\n //game.getSupply().getCardList().get(5).drawCard();\n }\n\n player.getHand().remove(card);\n player.setBuyingPower();\n }", "@Override\n public void execute(Player sourcePlayer) throws RemoteException {\n if (sourcePlayer.hasPassed(CheckpointColor.RED) &&\n sourcePlayer.hasPassed(CheckpointColor.BLU) &&\n sourcePlayer.hasPassed(CheckpointColor.GRN) &&\n sourcePlayer.hasPassed(CheckpointColor.YLW)) {\n\n // Remove the checkpoints (and notify the observers)\n sourcePlayer.setPassed(CheckpointColor.RED, false);\n sourcePlayer.setPassed(CheckpointColor.BLU, false);\n sourcePlayer.setPassed(CheckpointColor.GRN, false);\n sourcePlayer.setPassed(CheckpointColor.YLW, false);\n setChanged();\n notifyObservers();\n\n // Now execute whatever happens as a result\n executeThis.execute(sourcePlayer);\n }\n\n // Otherwise, don't do anything\n setChanged();\n notifyObservers();\n }", "private void eliminatePlayers() {\n \n Iterator<Player> iter = players.iterator();\n\n while (iter.hasNext()) {\n Player player = iter.next();\n\n if (player.getList().isEmpty()) {\n iter.remove();\n if (player.getIsHuman()) {\n setGameState(GameState.HUMAN_OUT);\n }\n // need to remember that due to successive draws, the active player could run\n // out of cards\n // select a new random player if player gets eliminated\n if (!players.contains(activePlayer)) {\n selectRandomPlayer();\n }\n }\n }\n }", "public void desactivatePlayer() {\n\t\tthis.setEnabled(false);\n\t}", "public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}", "public void discardLeader(int bool){\n this.leaderCardsPanel.discardLeaderCard(bool);\n }", "@Override\n public void run() {\n try {\n pendingConfirms.remove(target.getName(),sender.getName());\n } catch (Exception ignored) {/*player has already confirmed*/}\n }", "public boolean vanished(Player player) {\n return vanished.contains(player);\n }", "public void updatePlayer(Player player) {\n\t\t// update the flag GO TO JAIL in Player class\n\t}", "public static void clearDealerName() {\r\n\t\tMain.dealerIsPlayer1 = false;\r\n\t\tMain.dealerIsPlayer2 = false;\r\n\t\tMain.dealerIsPlayer3 = false;\r\n\t\t\r\n\t\tGameSetup.player1IsDealer.setState(false);\r\n\t\tGameSetup.player2IsDealer.setState(false);\r\n\t\tGameSetup.player3IsDealer.setState(false);\r\n\r\n\t\tMain.curDealer = \"\";\r\n\t\tMain.startDealer = \"\";\r\n\t\t\r\n\t\t//Don't show fourth player if playing 3 handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tMain.dealerIsPlayer4 = false;\r\n\t\t\tGameSetup.player4IsDealer.setState(false);\r\n\t\t}\r\n\t}", "public void disable() {\n // Iterate through all players\n for (Map.Entry<UUID, PlayerAFKModel> entry : players.entrySet())\n {\n Player player = Bukkit.getPlayer(entry.getValue().getPlayer().getUniqueId());\n\n // Check if player fetch was successful\n if (player != null) {\n // Check if player is AFK\n if( entry.getValue().isAFK() )\n {\n // Is AFK. Update AFK timer before removal\n entry.getValue().updateAFKTimer();\n entry.getValue().markAsNotAFK();\n }\n } else {\n ConsoleUtil.logError(SuitePluginManager.Statistics.Name.full,\n \"Failed to disable AFK Manager. Report to developer!\");\n }\n }\n players.clear();\n }", "public void markAsUndone() {\n isDone = false;\n }", "public boolean isPickItUp(int playerID, Card discard){\n if(turn == playerID && gameStage == 1 && dealer == playerID){\n currentTrumpSuit = middleCardSuit;\n // make dealer discard a card and give them the middle card\n if(dealer == 0){\n //discard card that player taps\n if(player1Hand.get(0) == discard){\n player1Hand.remove(0);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(1) == discard){\n player1Hand.remove(1);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(2) == discard){\n player1Hand.remove(2);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(3) == discard){\n player1Hand.remove(3);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(4) == discard){\n player1Hand.remove(4);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n }\n }\n return false;\n }", "public void isOrderUpTrump(int playerID){\n if(turn == playerID && gameStage == 1 && dealer != 0){\n currentTrumpSuit = middleCardSuit;\n // make dealer discard a card and give them the middle card\n if(dealer == 1){\n // remove a card from the player's hand and add the middle card\n player2Hand.remove(2);\n player2Hand.add(middleCard);\n turn = 2;\n gameStage = 3;\n }\n else if(dealer == 2){\n // remove a card from the player's hand and add the middle card\n player3Hand.remove(2);\n player3Hand.add(middleCard);\n turn = 3;\n gameStage = 3;\n }\n else if(dealer == 3){\n // remove a card from the player's hand and add the middle card\n player4Hand.remove(2);\n player4Hand.add(middleCard);\n turn = 0;\n gameStage = 3;\n }\n }\n }", "public boolean unloadPlayer(P player){\n if(playerMap.containsKey(player)){\n //Player is safe to unload\n playerMap.remove(player);\n return true;\n } else {\n //Player isn't safe to save\n System.out.println(\"Tried to unload player \" + player.getName() + \"'s data, but it's not available\");\n return false;\n }\n }", "public void set_isTripDone(boolean value) {\n\t\tsharedPreferences = context.getSharedPreferences(\"Login\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putBoolean(\"isTripDone\", value);\n\t\teditor.commit();\n\t}", "public void setDone(boolean doneIt)\n {\n notDone = doneIt;\n }", "public void setPickedUp(boolean pickedUp) {\r\n this.pickedUp = pickedUp;\r\n }", "private void weakenPlayer(int player, double value) {\n\t\tif (player == LOCAL) {\n\t\t\tif (locStatBonus - value > 0.05) {\n\t\t\t\tlocStatBonus -= value;\n\t\t\t}\n\t\t} else if (player == OPPONENT) {\n\t\t\tif (oppStatBonus - value > 0.05) {\n\t\t\t\toppStatBonus -= value;\n\t\t\t}\n\t\t}\n\t\tweakenPlayerAnimation(player);\n\t}", "private void deleteFakeTeam(Player player) {\n\t\tPacketContainer packet = new PacketContainer(PacketType.Play.Server.SCOREBOARD_TEAM);\n\t\tpacket.getStrings().write(0, FakeTeamName);\n\t\tpacket.getIntegers().write(1, 1); // Set remove mode\n\t\t\n\t\ttry {\n\t\t\tProtocolLibrary.getProtocolManager().sendServerPacket(player, packet);\n\t\t} catch (InvocationTargetException e) {\n\t\t\t// Should never happen unless packet changes\n\t\t\tthrow new AssertionError(e);\n\t\t}\n\t}", "@EventHandler\n public void onPlayerQuitEvent(PlayerQuitEvent e)\n {\n String playerName = e.getPlayer().getName();\n \n this.afkPlayers.remove(playerName);\n this.afkPlayersAuto.remove(playerName);\n this.afkLastSeen.remove(playerName);\n }", "@Override\n public void actionPerformed(ActionEvent e)\n {\n this.appFrame.getInfoPanel().cleanUp();\n\n // Here I assume the player is not null, because only valid player will be shown in the combo box\n this.gameStatus.setSelectedPlayer(\n (GuiPlayer)this.appFrame.getToolbarPanel().getSelectionComboBox().getSelectedItem());\n\n // Update balance label\n JLabel playerBalanceLabel = this.appFrame.getInfoPanel().getPlayerBalanceLabel();\n playerBalanceLabel.setText(String.format(\"Balance: %d\", this.gameStatus.getSelectedPlayer().getPoints()));\n }", "@Override\n\tpublic void handleDone(Player player, Task task, Game game) {\n\t\t\n\t}", "protected boolean processPlayerDeclined(int gameNum, String playerName, String offer){\n return false;\n }", "public void Gamefinished()\n\t\t{\n\t\t\tplayers_in_game--;\n\t\t}", "public void chooseWorker(){\n resetUpdate();\n\n gameMessage.setSpace1(clientMessage.getSpace1());\n gameMessage.notify(gameMessage);\n\n if ( liteGame.getCurrWorker() == null ){\n removePlayerFromTheGame();\n }\n }", "public boolean setPlayer(Player aNewPlayer)\r\n {\r\n boolean wasSet = false;\r\n player = aNewPlayer;\r\n wasSet = true;\r\n return wasSet;\r\n }", "public void isPickingUpPowerup(Player player) {\n if (player.getActivePowerup() == null) {\n for (Powerup powerup : powerups) {\n if (powerup.getBoundsInParent().intersects(player.getBoundsInParent())) {\n player.setActivePowerup(powerup);\n fieldPane.getChildren().remove(powerup);\n cleanup.add(powerup);\n }\n }\n }\n }", "boolean setPlayer(String player);", "void removeFromGame() {\n\t\t// remove from game\n\t\t//only for multi-player\n\t}", "public void setRejected(boolean value) {\n this.rejected = value;\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n activedicenumberselected = 0;\n AttackedPlayer = 99;\n if (listenforplayerwormnumber) {\n activeplayerwormnumberselected = setwormnumber;\n AttackedPlayer = setattackedplayernumber;\n }\n\n if (activeplayerwormnumberselected != 0 && AttackedPlayer != 99) {\n if (Dice.getDiceSum() == PlayerWormsArray.get(AttackedPlayer).getPlayerWormsArrayListWormValue(0)) {\n currentplayeractions.performTakeWormFromPlayer(PlayerWormsArray.get(AttackedPlayer).getPlayerWormsArrayListWormValue(0));\n PlayerWormsArray.get(AttackedPlayer).RemoveStolenWormFromPlayer();\n currentplayeractions.setDiceRollAvailable(true);\n TakeWormFromPlayerAvailable = false;\n TakeWormFromGrillAvailable = false;\n listenfordicenumber = false;\n listenforplayerwormnumber = false;\n listenforgrillwormnumber = false;\n EndPlayerTurn = true;\n }\n }\n performGamePanelUpdate();\n }", "@Override\n public void doRemove()\n {\n Player target = p.getServer().getPlayer(targetID);\n if (target == null)\n return;\n\n // teleport them back to their original location\n target.teleport(originalLocation);\n\n // remove flying and immobolize effects\n for (O2EffectType effectType : additionalEffects)\n {\n Ollivanders2API.getPlayers().playerEffects.removeEffect(targetID, effectType);\n }\n }", "public void setPlayer(Player p){\r\n playerModel=p; \r\n jEnemigoDatos.setText(p.getEnemy().getName());\r\n /*if(p.getBadConsequence()==null)\r\n jMalRolloDatos.setText(\"No\");\r\n else\r\n jMalRolloDatos.setText(\"Si\");*/\r\n if(p.isDead())\r\n jMuertoDatos.setText(\"Si\");\r\n else\r\n jMuertoDatos.setText(\"No\");\r\n \r\n jNivelDatos.setText(p.getLevels()+\"\");\r\n jCombatLevelDatos.setText(p.getCombatLevel()+\"\");\r\n jNombreDatos.setText(p.getName());\r\n if(p.canISteal())\r\n jRobarDatos.setText(\"Si\");\r\n else\r\n jRobarDatos.setText(\"No\");\r\n \r\n jNSectDatos.setText(Integer.toString(CultistPlayer.getTotalCultistPlayer()));\r\n \r\n if(playerModel.getClass() == CultistPlayer.class){\r\n jSectarioDatos.setText(\"Si\");\r\n //String text=(CultistPlayer)playerModel.getMyCultist().getGainedLevels()+\"\";\r\n //jSectarioDatos.setText(\"\"+(CultistPlayer)playerModel.getGainedLevels());\r\n \r\n }else\r\n jSectarioDatos.setText(\"No\");\r\n \r\n /*if(playerModel.getBadConsequence().isEmpty())\r\n pendingBadView1.setVisiblePending(false);\r\n else*/\r\n pendingBadView1.setVisiblePending(true);\r\n pendingBadView1.limpiar();\r\n \r\n // A continuación se actualizan sus tesoros \r\n fillTreasurePanel (jpVisibles, playerModel.getVisibleTreasures()); \r\n fillTreasurePanel (jpOcultos, playerModel.getHiddenTreasures()); \r\n btRobar.setEnabled(playerModel.canISteal());\r\n manejarBotones(true);\r\n repaint(); \r\n revalidate();\r\n }", "public ArrayList<Player> checkToEliminate() {\n ArrayList<Player> eliminated = new ArrayList<Player>();\n\n // Check which players are to be eliminated\n for (Player player : playersInGame) {\n if (player.peekCard() == null) {\n eliminated.add(player);\n }\n }\n\n // Eliminate players from model\n for (Player eliminatedPlayer : eliminated) {\n playersInGame.remove(eliminatedPlayer);\n }\n\n return eliminated;\n }", "@Override\n public void removePlayer(Player player){\n this.steadyPlayers.remove(player);\n }", "public static void savePlayerNames() {\r\n\t\tMain.player1 = GameSetup.choiceBoxPlayer1.getSelectedItem();\r\n\t\tMain.player2 = GameSetup.choiceBoxPlayer2.getSelectedItem();\r\n\t\tMain.player3 = GameSetup.choiceBoxPlayer3.getSelectedItem();\r\n\t\t\r\n\t\t//Don't show fourth player if playing 3 handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tMain.player4 = GameSetup.choiceBoxPlayer4.getSelectedItem();\r\n\t\t}\r\n\t}", "public void selectProtectPlayer(Player[] players){\n int x,xTemp;\n Player playerSelected;\n if( team == 0){\n xTemp = 0;\n for(Player p : players ){\n x = (int) p.getPosition().getX();\n if( x > xTemp && p != playerOne ){\n xTemp = x;\n playerSelected = p;\n }\n }\n playerOne = playerSelected;\n }else{\n xTemp = 14;\n for(Player p : players ){\n x = (int) p.getPosition().getX();\n if( x < xTemp && p != playerOne ){\n xTemp = x;\n playerSelected = p;\n }\n }\n playerOne = playerSelected;\n }\n }", "private void onParticipantsSelectionChange(Participant newValue) {\n boolean disabledBecauseOfSelection = newValue == null;\n buttonParticipantEdit.setDisable(disabledBecauseOfSelection);\n buttonParticipantRemove.setDisable(disabledBecauseOfSelection);\n }", "public void setValidated(Player p, boolean value) {\n this.getInstance(p).setValidated(value);\n }", "public static void dropPlayer(League theLeague, Team theTeam, Scanner keyboard) {\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"---Drop Player---\");\r\n\t\tSystem.out.println(\"\");\r\n\t\ttheTeam.teamToStringNum();\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\" 0 - Return to Team Menu\");\r\n\t\tSystem.out.println(\"1-\" + theTeam.getRoster().size() + \" - Select a player to be dropped\");\r\n\t\tint dropChoice = Input.validInt(0, theTeam.getRoster().size(), keyboard);\r\n\t\tif (dropChoice == 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tPlayer thePlayer = theTeam.getTeamPlayer(dropChoice - 1);\r\n\r\n\t\tthePlayer.setFreeAgent();\r\n\t\ttheLeague.playerList().set(thePlayer.getId(), thePlayer);\r\n\t\ttheTeam.getRoster().remove(thePlayer);\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"***You have dropped \" + thePlayer.playerToString() + \"***\");\r\n\t}", "public static boolean isPlayersSetupDone() {\r\n\t\tboolean playersNamed = true;\r\n\r\n\t\t//Check if all the choice boxes have been selected.\r\n\t\tif (GameSetup.choiceBoxPlayer1.getSelectedIndex() == -1\r\n\t\t\t\t|| GameSetup.choiceBoxPlayer1.getSelectedIndex() == 0) {\r\n\t\t\tplayersNamed = false;\r\n\t\t}\r\n\t\tif (GameSetup.choiceBoxPlayer2.getSelectedIndex() == -1\r\n\t\t\t\t|| GameSetup.choiceBoxPlayer2.getSelectedIndex() == 0) {\r\n\t\t\tplayersNamed = false;\r\n\t\t}\r\n\t\tif (GameSetup.choiceBoxPlayer3.getSelectedIndex() == -1\r\n\t\t\t\t|| GameSetup.choiceBoxPlayer3.getSelectedIndex() == 0) {\r\n\t\t\tplayersNamed = false;\r\n\t\t}\r\n\t\t\r\n\t\t//Don't show fourth player if playing 3 handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tif (GameSetup.choiceBoxPlayer4.getSelectedIndex() == -1\r\n\t\t\t\t\t|| GameSetup.choiceBoxPlayer4.getSelectedIndex() == 0) {\r\n\t\t\t\tplayersNamed = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Show dialog box reminder.\r\n\t\tif (!playersNamed) FrameUtils.showDialogBox(\"All players must be selected.\");\r\n\t\t\r\n\t\t//Save player names.\r\n\t\tsavePlayerNames();\r\n\t\t\r\n\t\treturn playersNamed;\r\n\t}", "public void updateButton(boolean done) {\n\t\tdiceBtn.setDisable(done);\n\t\tendTurn.setDisable(!done);\n\t}", "public static void showPreviousSelectedDealer() {\r\n\t\tGameSetup.player1IsDealer.setState(Main.dealerIsPlayer1);\r\n\t\tGameSetup.player2IsDealer.setState(Main.dealerIsPlayer2);\r\n\t\tGameSetup.player3IsDealer.setState(Main.dealerIsPlayer3);\r\n\t\t\r\n\t\t//Don't show fourth player if playing 3 handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tGameSetup.player4IsDealer.setState(Main.dealerIsPlayer4);\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(frame, \n\t\t\t\t\t\t\"Do you want to delete the selected projects?\\nThis action cannot be undone!\", \n\t\t\t\t\t\t\"Delete Selected\", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\n\t\t\t\tif(choice == 0){\n\t\t\t\t\tSystem.out.println(\"Delete\");\n\t\t\t\t\tString[] selected = sel.getSelected(); \n\t\t\t\t\tfor(int i=0;i<selected.length;i++) {\n\t\t\t\t\t\n\t\t\t\t\t\tint index = portfolio.findByCode(selected[i]);\n\t\t\t\t\t\tportfolio.remove(index, config.isUpdateDB());\n\t\t\t\t\t\tsel.remove(index);\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfpTable.setModel((TableModel) new ProjectTableModel(portfolio.getFinishedProjects()));\n\t\t\t\topTable.setModel((TableModel) new ProjectTableModel(portfolio.getOngoingProjects()));\n\t\t\t\ttoggleSaved(false);\n\t\t\t}", "public void tryRehearse() {\n if (currentPlayer.isEmployed() == true) {\n if(!currentPlayer.getHasPlayed()){\n currentPlayer.rehearse();\n }\n else{ \n view.showPopUp(currentPlayer.isComputer(), \"You've already moved, rehearsed or acted this turn. Try a different command or click `end turn` to end your turn.\");\n }\n }\n else {\n view.showPopUp(currentPlayer.isComputer(), \"You're not employed, so you need to take a role before you can rehearse.\");\n }\n view.updateSidePanel(playerArray);\n }", "private void eliminatePlayer(Player loser){\n players.remove(loser);\n }", "public void deleteFile() {\n String newName = playerList.getSelectionModel().getSelectedItem();\n File user = new File(\"SaveData\\\\UserData\\\\\" + newName + \".txt\");\n if (user.delete()) {\n input.setStyle(\"-fx-border-color: default\");\n playerList.getItems().remove(newName);\n\n MAIN_MENU_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n\n } else {\n ERROR_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n input.setStyle(\"-fx-border-color: red\");\n }\n }", "public void onClick(View v) {\n\t\t\t\tString name=editName.getText().toString(); \r\n\t\t\t\tint playerId=Integer.parseInt(editId.getText().toString());\r\n\t\t\t\tint handicap=Integer.parseInt(editHandicap.getText().toString());\r\n\t\t\t\tint code=Integer.parseInt(editCode.getText().toString());\r\n\t\t\t\tint status=editStatus.isChecked()?0:1;\r\n\t\t\t\t\r\n\t\t\t\t// check if REQUIRED fields are vacant \r\n\t\t\t\tif(name.equals(\"\")|| code<1 || handicap<1 || playerId<1)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (playerId<1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Select a player\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\treturn;\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\tToast.makeText(getApplicationContext(), \"Enter a name and handicap\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t} \t\r\n\t\t\t\telse \r\n\t\t\t\t{ //db = new DatabaseHelper(getApplicationContext());\r\n\t\t\t\t\tplayer=db.getPlayer(playerId);\r\n\t\t\t\t\tplayer.setName(name);\r\n\t\t\t\t\tplayer.setHandicap(handicap);\r\n\t\t\t\t\tplayer.setKey(code);\r\n\t\t\t\t\tplayer.setStatus(status);\r\n\t\t\t\t\tdb.updatePlayer(player);\r\n\t\t\t\t\t//db.close();\r\n\t\t\t\t\t// Save the Data in Database \r\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Saved Successfully \", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t}", "public void clickedSpeakerDelete() {\n\t\tif(mainWindow.getSelectedRowSpeaker().length <= 0) ApplicationOutput.printLog(\"YOU DID NOT SELECT ANY PRESENTATION\");\n\t\telse if(mainWindow.getSelectedRowSpeaker().length > 1) ApplicationOutput.printLog(\"Please select only one presentation to edit\");\n\t\telse {\n\t\t\tint tmpSelectedRow = mainWindow.getSelectedRowSpeaker()[0];\n\t\t\tSpeakers tmpSpeaker = speakersList.remove(tmpSelectedRow);\t\t\t\n\t\t\tappDriver.hibernateProxy.deleteSpeaker(tmpSpeaker);\t\n\t\t\trefreshSpeakerTable();\t\t\t\n\t\t}\n\t}", "public void fortifyOrQuit(){\n gameState = GameState.FORTIFYORQUIT;\n notifyObservers();\n }", "public void kickOut(){\n Iterator<Player> iter = players.iterator();\n while (iter.hasNext()){\n Player player = iter.next();\n if(player.isBankrupt(minBet)){\n iter.remove();\n System.out.println(player + \" runs out of cash!\");\n }\n }\n }", "public void endUserTurn() {\n\t\tupdateUserTeam();\n\n\t\tusers.get(userTurn).setTransferFinished(true);\n\t\tPlayRound.endUserTurn();\n\t\tMainGui.showCardLayout(\"panelPlayRound\");\n\n\t}", "public void playerHasUsedSuggestion() {\n suggestionMade = true;\n }", "public static void kickPlayer(){\n\t\t// remove player\n\t\tplayers.get(curr).kick();\n\t\t// decrement number of players\n\t\tnumPlayers--;\n\t\t// update players on the board\n\t\tboard.updatePlayers(players);\n\t\tSystem.out.println(\"Kicked \"+players.get(curr).getColorName()+\" player.\");\n\t}", "public void playerSetFlag(List<String> playersList) {\n for (String playerId : playersList) {\n Player player = playerRepository.findBy_id(playerId);\n player.setFirst(false);\n player.setLast(false);\n playerRepository.save(player);\n }\n\n //setez First\n String idFirst = playersList.get(0);\n Player first = playerRepository.findBy_id(idFirst);\n first.setFirst(true);\n playerRepository.save(first);\n\n //setez Last\n String idLast = playersList.get(playersList.size() - 1);\n Player last = playerRepository.findBy_id(idLast);\n last.setLast(true);\n playerRepository.save(last);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(cbElPuesto.getSelectedIndex()!=0) {\n\t\t\t\t\tString eliminar=((String) cbElPuesto.getSelectedItem());\n\t\t\t\t\tSystem.out.println(eliminar);\n\t\t\t\t\tdata.setQuery(\"DELETE FROM TipoPuesto WHERE puesto='\"+eliminar+\"'\");\n\t\t\t\t\tcbElPuesto.removeAllItems();\n\t\t\t\t\tcbEdPuesto.removeAllItems();\n\t\t\t\t\tcbElPuesto.addItem(\"Seleccione un hospital...\");\n\t\t\t\t\tcbEdPuesto.addItem(\"Seleccione un hospital...\");\n\t\t\t\t\tJOptionPane.showMessageDialog(btnEliminar,\"Eliminación exitosa\");\n\t\t\t\t\tregistros=(ResultSet) data.getQuery(\"Select * from TipoPuesto\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\twhile(registros.next()) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcbElPuesto.addItem(registros.getString(\"puesto\"));\n\t\t\t\t\t\t\tcbEdPuesto.addItem(registros.getString(\"puesto\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}", "public void setRemove(Boolean newValue);", "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 }", "@Override\n\tpublic void deletePlayer(Joueur joueur) {\n\t\t\n\t}", "public abstract boolean depleteItem();", "public void removePlayer(String name) {\n for (Player player : players) {\n if (player.getName() != null && player.getName().equals(name)) {\n player.setState(false);\n for (Piece piece : player.getPieces()) {\n piece.setPosition(0);\n }\n\n // PLAYERLISTENER : Trigger playerEvent for player that LEFTGAME\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, player.getColour(), PlayerEvent.LEFTGAME);\n listener.playerStateChanged(event);\n }\n\n if (player.getName().equals(players.get(activePlayer).getName())) {\n this.setNextActivePlayer();\n }\n }\n }\n }", "public void attackOrQuit(){\n gameState = GameState.ATTACKORQUIT;\n notifyObservers();\n }", "public void requestDeletePose()\r\n {\r\n // ASK THE USER TO MAKE SURE THEY WANT TO GO AHEAD WITH IT\r\n AnimatedSpriteEditor singleton = AnimatedSpriteEditor.getEditor();\r\n AnimatedSpriteEditorGUI gui = singleton.getGUI();\r\n int selection = JOptionPane.showOptionDialog( gui, \r\n DELETE_POSE_TEXT,\r\n DELETE_POSE_TITLE_TEXT, \r\n JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,\r\n null, null, null);\r\n \r\n // IF THE USER CLICKED OK, THEN EXPORT THE POSE\r\n if (selection == JOptionPane.YES_OPTION)\r\n {\r\n if (gui.getPosesCount() <= 1)\r\n {\r\n \t selection = JOptionPane.showOptionDialog( \r\n \t\t\t gui, \r\n DELETE_ONLY_POSE_TEXT,\r\n DELETE_ONLY_POSE_TITLE_TEXT, \r\n JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,\r\n null, null, null);\r\n \t if (selection == JOptionPane.YES_OPTION)\r\n \t {\r\n \t\t singleton.getFileManager().requestDeleteState();\r\n \t }\r\n }\r\n else{\r\n \tposeIO.deletePose(currentPoseName);\r\n \tsingleton.getFileManager().reloadSpriteType();\r\n }\r\n }\r\n }", "public void giveUp() {\n if (!finished)\n player.kill();\n }", "public Boolean autodelete();" ]
[ "0.641798", "0.62074167", "0.5567685", "0.5537385", "0.54358953", "0.5409029", "0.5378445", "0.535365", "0.5348681", "0.53353024", "0.5331715", "0.5318771", "0.53008765", "0.5276042", "0.5259469", "0.52056324", "0.517578", "0.5173195", "0.51689374", "0.51668173", "0.5158018", "0.51567054", "0.5156134", "0.5153536", "0.5120961", "0.5117717", "0.5107907", "0.51039284", "0.5091667", "0.50867087", "0.5060121", "0.5052002", "0.5019126", "0.5000915", "0.50001264", "0.49926504", "0.49764588", "0.49761823", "0.4953841", "0.4951266", "0.49414444", "0.49350306", "0.4933834", "0.49318793", "0.4919032", "0.49187917", "0.48982736", "0.48763403", "0.48749667", "0.486434", "0.48549527", "0.48536003", "0.4851647", "0.4850193", "0.484908", "0.4845968", "0.4838245", "0.48376468", "0.4829517", "0.48184326", "0.48149982", "0.481113", "0.48053068", "0.4803399", "0.47996852", "0.47947693", "0.47938973", "0.47919053", "0.4782879", "0.4777155", "0.47718105", "0.47686076", "0.4767289", "0.4765295", "0.47648063", "0.476413", "0.47568503", "0.47564512", "0.4756349", "0.47525385", "0.47512335", "0.4750303", "0.47493866", "0.47430244", "0.47407916", "0.47403172", "0.4739103", "0.47388384", "0.4736817", "0.473596", "0.47340435", "0.47335568", "0.47314265", "0.47286466", "0.4724997", "0.47242132", "0.47226447", "0.47124583", "0.47117662", "0.47106978" ]
0.79034
0
Listener for allDoneBrainstorming Informs the controller that everyone is done brainstorming
@Override public void setAllDoneBrainstormingChangedListener() { database.getReference(gameCodeRef).child("AllDoneBrainstorming").addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot snapshot) { String stringValue = String.valueOf(snapshot.getValue()); if (!stringValue.equals(null) && !stringValue.equals("null")){ Boolean value = (Boolean) snapshot.getValue(); if (value){ Controller.getInstance().allPlayersDoneBrainstorming(); } } } @Override public void onCancelled(@NonNull DatabaseError error) { Log.w(TAG, "Failed to read value.", error.toException()); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void done()\n\t{\n\t\tgetController().done();\n\t}", "@Override\n public void setFinished() {\n finishedBanking = true;\n }", "private void submit() {\r\n\t\tassignTracked();\r\n\t\tBkitPoma.startLoading(constants.BkitPoma_startLoading_wating());\r\n\t\tpostSubmit();\r\n\t}", "public void formProcessingComplete(){}", "public void formProcessingComplete()\r\n {\r\n return;\r\n }", "public void battleComplete() {\n\t}", "public void afterDone() {\n }", "public void afterDone() {\n }", "public void markAsDone() {\n this.done = true;\n }", "protected void markAsDone() {\n isDone = true;\n }", "public void markAsDone() {\n isDone = true;\n }", "public void markAsDone() {\n isDone = true;\n }", "public void markAsDone() {\n isDone = true;\n }", "public void markAsDone(){\n isDone = true;\n }", "public void faitTonBoulot() throws AbortException {\n\t\tMessenger.setMaxProgress(10);\n\t\tfor( int i=0 ; i<15 ; i++ ) {\n\t\t\tMessenger.printMsg(Messenger.TRACE, \" blabla \" + i + \" \" + Thread.currentThread() + \" \" + Thread.currentThread().getState());\n\t\t\tif( (i%2) == 0 ) Messenger.diskAccess();\n\t\t\telse if( (i%3) == 0 ) Messenger.dbAccess();\n\t\t\telse if( (i%5) == 0 ) Messenger.procAccess();\n\t\t\t//\t\t\tif( i == 3) {int[] x = new int[0]; x[12] = 6;}\n\t\t\t//try {\n\t\t\tthis.processUserRequest();\n\t\t\tMessenger.setProgress(i);\n\t\t\t//\t\t\t} catch (AbortException e1) {\n\t\t\t//\t\t\t\treturn ;\n\t\t\t//\t\t\t}\n\t\t\ttry {\n\t\t\t\tThread.sleep(5000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tMessenger.printStackTrace(e);\n\t\t\t}\n\t\t}\n\t\tMessenger.noMoreAccess();\n\t}", "private void completeListener() {\n buttonPanel.getCompleteTask().addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n for (int i = 0;i<toDoList.toDoListLength();i++) {\n JRadioButton task = toDoButtonList.get(i);\n if (task.isSelected()&& !task.getText().equals(\"\")){\n toDoList.getTask(i).setComplete();\n }\n }\n refresh();\n }\n });\n }", "public void allFinished() {\n\t}", "public static void submitPendingOperations()\n {\n DELEGATE.submitPendingOperations();\n }", "@Override\n\tprotected void done() {\n\t\t//close the monitor \n\t\tprogressMonitorReporter.closeMonitor();\n\t\t\n\t\t//Inform application that operation isn't being in progress. \n\t\tapplicationInteractor.setOperationInProgress(false);\n\t}", "@Override\n public void execute() {\n ballCount = conveyor.getBallCount();\n SmartDashboard.putNumber(\"Ball Count\", conveyor.getBallCount());\n if(ballCount == 4){\n complete = true;\n conveyor.setDone(complete);\n } else {\n complete = false;\n conveyor.setDone(complete);\n }\n SmartDashboard.putBoolean(\"Intake Complete?\", complete);\n \n //conveyor.rightWithSensor();\n if(ballCount == 0){ // right one\n conveyor.engageConveyor(false, 0.5);\n } else if(ballCount == 1) { // left one\n conveyor.engageConveyor(true, 0.5);\n stage2 = false;\n } else if(ballCount == 2 && !stage2){\n //System.out.println(\"Moving balls up\");\n conveyor.conveyorFeedTime();\n if(conveyor.doneBoolean()){\n //System.out.println(\"Ready for 3rd and 4th balls\");\n stage2 = true;\n }\n } else if(stage2 && ballCount == 2) {\n //System.out.println(\"3rd\");\n conveyor.engageConveyor(false, 0.375);\n } else if(ballCount == 3){\n conveyor.engageConveyor(true, 0.375);\n } else {\n conveyor.setConveyorMotors(0, 0, 0, 0);\n }\n \n }", "protected void fireQueueComplete() {\n for (UploadListener uploadListener : uploadListeners) {\n uploadListener.queueUploadComplete();\n }\n }", "public void baocun() {\n\t\t\n\t}", "void done(boolean allSucceeded);", "private void done(boolean exceptionOccurred) {\n\t\tif (afterWorkComplete != null) {\n\t\t\tafterWorkComplete.accept(exceptionOccurred);\n\t\t}\n\t\tformMode();\n\t}", "protected void end() {\n \tRobot.drive.brake();\n }", "public void markAsDone() {\n this.isDone = true;\n\n }", "@Override\n\tpublic void applyBrake() {\n\t\tSystem.out.println(\"applyBrake\");\n\t\t\n\t\t\n\t}", "public synchronized void b() {\n if (!this.c && n.isFinished() && l.isFinished() && m.isFinished() && k.isFinished() && j.isFinished() && i.isFinished() && h.isFinished()) {\n this.c = true;\n }\n if (this.c && this.b) {\n LocalBroadcastManager.getInstance(AppApplication.getInstance()).sendBroadcast(new Intent().setAction(WxNotifyRefrshReceiver.b).putExtra(CleanSwitch.CLEAN_DATA, WxNotifyRefrshReceiver.c));\n }\n }", "@Override \n\t\t public void afterCompletion(HttpServletRequest request, \n\t\t HttpServletResponse response, Object object, Exception ex) \n\t\t throws Exception { \n\t\t System.out.println(\"AfterCompletion\");\n\t\t \n\n\t\t\t \n\t\t\n\t\t }", "public void applyBrake() {\n\t\t\r\n\t}", "public void markAsDone() {\r\n this.isDone = true;\r\n }", "public void markAsDone() {\n this.isDone = true;\n }", "public void markAsDone() {\n this.isDone = true;\n }", "public void markAsDone() {\n this.isDone = true;\n }", "public void postPerform() {\n // nothing to do by default\n }", "@Override\n\t\tpublic void done() {\n\t\t\tToolkit.getDefaultToolkit().beep();\n\t\t\t//JOptionPane.showMessageDialog(panel,\n\t\t\t//\t\t\"Rotina concluída com sucesso\",\n\t\t\t//\t\t\"Atualização de Grupos de Documentos\", JOptionPane.OK_OPTION);\n\t\t\tjButtonConsulta.setEnabled(true);\n\t\t\tjButtonFechar.setEnabled(true);\n\t\t\tsetCursor(null); //turn off the wait cursor\n\n\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tMain.buscarAFondo();\n\t\t\t}", "public void complete() {\n\t}", "@Override\n public void afterCompletion(boolean arg0) throws EJBException,\n \t\tRemoteException {\n \tSystem.out.println(\"taskerBean transaction done\");\n }", "@Override\n\tprotected void done_contracting() {\n\t\tprofile_box_.box_pane().set_advancing(true);\n\t\tVoteBoxFactory.instance().setup_finished(profile_box_);\n\t}", "private void checkPlayersDoneBrainstorming(int nrDoneBrainstorming) {\n if (nrDoneBrainstorming == nrPlayers){\n database.getReference(gameCodeRef).child(\"AllDoneBrainstorming\").setValue(true);\n database.getReference(gameCodeRef).child(\"PlayersDoneEliminating\").setValue(0);\n database.getReference(gameCodeRef).child(\"AllDoneEliminating\").setValue(false);\n }\n }", "protected void synchronizationDone() {\n }", "@Override\r\n\tpublic void done() {\n\t\tSystem.out.println(\"done\");\r\n\t}", "private void onOK() {\n OKDisposalProcess();\n }", "public void markAsDone() {\n this.isDone = true;\n this.completed = \"1\";\n }", "@Override\n\tpublic void onComplete() {\n\t\tSystem.out.println(\"Its Done!!!\");\n\t}", "@Override\n public void beforeCompletion() throws EJBException, RemoteException {\n \tSystem.out.println(\"taskerBean transaction almost done\");\n }", "@Override\r\n\tpublic void pending() {\n\t\tSystem.out.println(\"pending\");\r\n\t}", "@Override\r\n\tpublic void doWork() {\n\t\tSystem.out.println(\"Barking Bow Bow\");\r\n\t}", "public void treatment()\n {\n\t\tCommunicationManagerServer cms = CommunicationManagerServer.getInstance();\n\t\tDataServerToComm dataInterface = cms.getDataInterface();\n\t\t/** On récupère et stocke l'adresse IP du serveur\n\t\t */\n\t\tdataInterface.updateUserChanges(user);\n\n\t /** Création du message pour le broadcast des informations**/\n\t updatedAccountMsg message = new updatedAccountMsg(this.user);\n\t\tmessage.setPort(this.getPort());\n\t cms.broadcast(message);\n\t}", "public void markAsDone() {\n // TODO consider adding assertion here\n isDone = true;\n }", "@Override\n\tpublic void finish() throws DPFTRuntimeException {\n\t\tDPFTLogger.info(this, \"Updating Outbound Control Records...\");\n\t\tDPFTOutboundDboSet rSet = (DPFTOutboundDboSet) this.getPreviousAction().getResultSet();\n\t\tDPFTOutboundControlDboSet ctrlSet = rSet.getControlTableRecords(\"process_status='\" + GlobalConstants.DPFT_OBND_STAT_RUN + \"'\");\n\t\tctrlSet.taskComplete();\n\t\tctrlSet.close();\n\t\t\n\t\t//send Notification\n\t\tString cmp_code = ctrlSet.getDbo(0).getString(\"camp_code\");\n\t\tfor(String sf: success_ftp_files){\n\t\t\tObject[] params = {sf, this.getOutFileRemoteDir()};\n\t\t\tDPFTUtil.pushNotification(\n\t\t\t\t\tDPFTUtil.getCampaignOwnerEmail(cmp_code), \n\t\t\t\t\tnew DPFTMessage(\"CUSTOM\", \"TFB00011I\", params)\n\t\t\t);\n\t\t}\n\t\tsuccess_ftp_files.clear();\n\t}", "@Override\n public void done() {\n Toolkit.getDefaultToolkit().beep();\n //release_plan_btn.setEnabled(true);\n setCursor(null); //turn off the wait cursor\n JOptionPane.showMessageDialog(null, \"Plan released !\\n\");\n\n }", "@Override\r\n public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n Exception ex) throws Exception {\n\r\n }", "public void setDone() {\n isDone = true;\n }", "@Override\n public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception {\n }", "@Override\n\tprotected void doAfterCompletion(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object obj, Exception e) {\n\t\t\n\t}", "@Override\n public void done() {\n Toolkit.getDefaultToolkit().beep();\n //close_plan_btn.setEnabled(true);\n setCursor(null); //turn off the wait cursor\n JOptionPane.showMessageDialog(null, \"Plan released !\\n\");\n\n }", "public void done() {\n isDone = true;\n }", "public void complete()\n {\n isComplete = true;\n }", "public void done() {\n\t\t}", "public void handleEntrance(){\r\n\t\t\tcarsArriving();\r\n\t\t\tcarsEntering(entrancePassQueue);\r\n\t\t\tcarsEntering(entranceCarQueue); \t\r\n\t\t}", "@Override\r\n\tpublic void doAfterJob() {\n\r\n\t}", "public void markDone() {\n isDone = true;\n }", "@Override\n\tprotected void done() {\n\t\tif (isCancelled()) {\n\t\t\tSystem.out.printf(\"%s: Has been canceled\\n\", name);\n\t\t} else {\n\t\t\tSystem.out.printf(\"%s: Has finished\\n\", name);\n\t\t}\n\t}", "void finalizeBath(boolean isCancelled);", "public void done() {\r\n\t Toolkit.getDefaultToolkit().beep();\r\n\t jtaResultado.append(\"Fet!\\n\");\r\n\t }", "public void afterExecution(final Object bapiObject) {\n }", "@Override\n\tpublic void work() {\n\t\tSystem.out.println(\"Accountant accounting.\");\n\t}", "@Override\n\tpublic void complete()\n\t{\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n adaptee.btnBill_actionPerformed(e);\r\n\t}", "public void performBatchComplete() {\n ArrayList arrayList = new ArrayList(this.batch);\n this.batch.clear();\n this.mainThreadHandler.sendMessage(this.mainThreadHandler.obtainMessage(8, arrayList));\n logBatch(arrayList);\n }", "protected void afterActiveHandled() {\n\t}", "public void processAllBeings() throws Exception {\n // Call the BeingManager.getBeings() method to iterate through\n // the BeingBlockers and execute each BeingBlocker to run as\n // a ManagedBlocker in the common fork-join pool via the\n // managedBlock() method.\n\n // TODO -- you fill in here.\n \n\n // Don't continue with any processing until all Beings are\n // ready to run.\n // TODO -- You fill in here.\n \n\n // Don't continue until all Beings have finished their gazing.\n // TODO -- You fill in here.\n \n }", "private void completedButtonListener() {\n JButton completedButton = gui.getButton_Completed();\n\n ActionListener actionListener = (ActionEvent actionEvent) -> {\n gui.getCompleted_Text().setText(\"\");\n gui.getFrame_Completed().setVisible(true);\n gui.getFrame_Completed().setSize(415, 250);\n gui.getCompleted_TextArea().setEditable(false);\n for (int key : requestsAnswered.keySet()) {\n gui.getCompleted_TextArea().append(requestsAnswered.get(key).getFormattedRequest());\n }\n };\n\n completedButton.addActionListener(actionListener);\n\n }", "@Override\n\tpublic void doBusiness() {\n\t\tsuper.doBusiness();\n\t}", "@Override\n public void onTakeTeaBagRaised() {\n }", "private void brakeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_brakeActionPerformed\n\n roboLogic.brake();\n if (l.isRunning()) {\n l.stop();\n }\n if (r.isRunning()) {\n r.stop();\n }\n\n\n }", "public void postProcessing() {\n //empty\n }", "@Override\n\tpublic void breath() {\n\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tLibrarianSuccess.main(new String[]{});\r\n\t\t\t\tframe.dispose();\r\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tprotected void onBoSave() throws Exception {\n\t\t\r\n\t\t\r\n\t\tsuper.onBoSave();\r\n\t\t// 修改按钮属性\r\n\t\tif(myaddbuttun){\r\n\t\t\tgetButtonManager().getButton(IBillButton.Add).setEnabled(true);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Con)\r\n\t\t\t\t\t.setEnabled(true);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Pp)\r\n\t\t\t\t\t.setEnabled(false);\r\n\t\t\tmyaddbuttun=true;\r\n\t\t\t// 转到卡片面,实现按钮的属性转换\r\n\t\t\tgetBillUI().setCardUIState();\r\n\t\t\tsuper.onBoReturn();\r\n\t\t}else{\r\n\t\t\tgetButtonManager().getButton(IBillButton.Add).setEnabled(false);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Con)\r\n\t\t\t\t\t.setEnabled(false);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Pp)\r\n\t\t\t\t\t.setEnabled(true);\r\n\t\t\tmyaddbuttun=false;\r\n\t\t\t// 转到卡片面,实现按钮的属性转换\r\n\t\t\tgetBillUI().setCardUIState();\r\n\t\t\tsuper.onBoReturn();\r\n\t\t}\r\n\t}", "public void bienvenida(){\n System.out.println(\"Bienvenid@ a nuestro programa de administracion de parqueos\");\n }", "@Override\n public void doAfterAllAnalysed(AnalysisContext context) {\n\n }", "public static void bakeAll() {\n for (HandlerList h : ALL_LISTS) {\n h.bake();\n }\n }", "public void quitarTodosFin() {\n\t\tfor (Estado e : _acept)\n\t\t\te.cambioFin(false);\n\t}", "public void backEndProcesses() {\n\n }", "public void finishedAllRequests() {\n hasMoreRequests = false;\n }", "public void OnRun()\r\n {\r\n try\r\n {\r\n Init();\r\n }\r\n catch(Exception ex)\r\n {\r\n eventLogger.error(ex);\r\n }\r\n \r\n try\r\n {\r\n this.types = this.config.getTypes();\r\n \r\n// this.checkList = dao.CheckLastRun();\r\n \r\n// if (checkList.size()>0)\r\n// {\r\n// Vector<Integer> checkListLastRun = checkList;\r\n// \r\n// checkList = new Vector<Integer>();\r\n// \r\n// CollectInvitees(true);\r\n// CollectInvitees(false);\r\n// \r\n// // lasttime missing some mails\r\n// RemoveSearched(checkListLastRun);\r\n// }\r\n// else\r\n// {\r\n dao.CleanChecklist();\r\n \r\n CollectInvitees(true);\r\n CollectInvitees(false);\r\n \r\n for(Integer id : this.checkList)\r\n {\r\n dao.BuildChecklist(id);\r\n }\r\n// }\r\n \r\n SendEmails();\r\n }\r\n catch(Exception ex)\r\n {\r\n eventLogger.warn(ex);\r\n }\r\n }", "@Override\n\tpublic void afterAction(String method, HttpServletRequest request, HttpServletResponse response) {\n\t}", "public void markAsUndone() {\n isDone = false;\n }", "@Override\n public void onComplete() {\n System.out.println (\"Suree onComplete\" );\n }", "protected void succeed()\r\n {\r\n // inform user\r\n ((OwMainAppContext) getContext()).postMessage(getContext().localize(\"plug.owdocprops.OwFieldView.saved\", \"The changes have been applied.\"));\r\n }", "@Override\r\n\tpublic void done() {\n\t\t\r\n\t}", "public abstract void executeBagButton();", "public void done() {\n done = true;\n }", "public void done() {\n \t\t\t\t\t\t}", "@Override\r\n\tpublic void complete() {\n\r\n\t}", "public void finishHandling(Barge barge, int time) {\r\n\r\n\t\t// remove the barge from appointments of terminal\r\n\t\tthis.appointments.remove(barge);\r\n\t\tthis.numHandling--;\r\n\t\t\r\n\t\t//this.state = Terminal.IDLE;\r\n\t\t\r\n\t\t// let the barge decide what to do after it finished handling\r\n\t\tbarge.afterFinish(time, this);\r\n\t\tif (Port.eventsToExcel.equals(\"Yes\")) {\r\n\t\t\tPort.stats.addEvent(time, barge.bargeNumber,\r\n\t\t\t\t\t(\"Finished handling at Terminal \" + this.toString()));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tif (this.queue.size() == 0) {\r\n\t\t\tthis.state = Terminal.IDLE;\r\n\t\t} else if (Port.terminalLogic.equals(\"Unreserved\") ) {\r\n\t\t\tBarge nextBarge = this.queue.peek();\r\n\t\t\tPort.schedule.schedule(ScheduleParameters.createOneTime(time,\r\n\t\t\t\t\tScheduleParameters.LAST_PRIORITY), this, \"handleBarge\",\r\n\t\t\t\t\tnextBarge, time);\r\n\r\n\t\t} else if (Port.terminalLogic.equals(\"Reserved\")) {\r\n//\t\t\tSystem.out.print(\"queue \"+this.queue);\r\n//\t\t\tSystem.out.print(\" appointments \"+this.appointments);\r\n//\t\t\tSystem.out.println(this.name);\r\n\r\n\t\t\tif (!checkNextPossibleBargeToHandle(time)){\r\n\t\t\t\tthis.state = Terminal.IDLE;\r\n\t\t\t}\r\n\r\n\t\t\t/*Barge nextBargeInSchedule = (Barge) this.appointments.keySet().toArray()[0];\r\n\t\t\tif (this.queue.contains(nextBargeInSchedule) == true) {\r\n\t\t\t\tPort.schedule.schedule(ScheduleParameters.createOneTime(time,\r\n\t\t\t\t\t\tScheduleParameters.LAST_PRIORITY), this, \"handleBarge\",\r\n\t\t\t\t\t\tnextBargeInSchedule, time);\r\n\t\t\t} else {\r\n\t\t\t\tint lstNextAppointment = this.appointments\r\n\t\t\t\t\t\t.get(nextBargeInSchedule)[1];\r\n\t\t\t\tboolean startNextBarge = false;\r\n\t\t\t\tfor (Barge nextBarge : this.queue) {\r\n\t\t\t\t\t//System.out.print(nextBarge);\r\n\t\t\t\t\t//System.out.print(nextBarge.terminals);\r\n\t\t\t\t\t//System.out.print(\" handeling times\"+ nextBarge.handlingTimes);\r\n\t\t\t\t\t//System.out.println(\" \"+this.name);\r\n\t\t\t\t\tint expectedEndTimeThisBarge = time + nextBarge.handlingTimes.get(nextBarge.terminals.indexOf(this));\r\n\t\t\t\t\tif (expectedEndTimeThisBarge <= lstNextAppointment) {\r\n\t\t\t\t\t\tPort.schedule.schedule(ScheduleParameters\r\n\t\t\t\t\t\t\t\t.createOneTime(time,\r\n\t\t\t\t\t\t\t\t\t\tScheduleParameters.LAST_PRIORITY),\r\n\t\t\t\t\t\t\t\tthis, \"handleBarge\", nextBarge, time);\r\n\t\t\t\t\t\tstartNextBarge = true;\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\tif (startNextBarge == false) {\r\n\t\t\t\t\tthis.state = Terminal.IDLE;\r\n\t\t\t\t}\r\n\t\t\t}*/\r\n\t\t}\r\n\r\n\r\n\r\n\t}", "public void SetDone(){\n this.isDone = true;\n }", "@Override\n\tpublic void QuestionDone() {\n\t\t\n\t}" ]
[ "0.59672153", "0.5706678", "0.5685895", "0.56581634", "0.5585082", "0.54582506", "0.5428556", "0.5428556", "0.54280525", "0.54109514", "0.54066867", "0.54066867", "0.54066867", "0.54053175", "0.53914434", "0.5374124", "0.53552043", "0.5353591", "0.5345121", "0.5342092", "0.5336236", "0.5325238", "0.53207004", "0.53195375", "0.53184134", "0.5309142", "0.52959216", "0.52906525", "0.5273877", "0.5264738", "0.5254707", "0.5242297", "0.5242297", "0.5242297", "0.52365893", "0.5230576", "0.52284926", "0.5222883", "0.5207706", "0.5206136", "0.5196631", "0.5192753", "0.5183946", "0.51771015", "0.51753926", "0.5161683", "0.5147295", "0.5143238", "0.5136623", "0.51226777", "0.5115025", "0.5108839", "0.5100067", "0.5088119", "0.5087926", "0.5069061", "0.50674236", "0.50665104", "0.5063938", "0.5055048", "0.50547284", "0.50537014", "0.5050101", "0.5048436", "0.5041217", "0.5036148", "0.50177926", "0.50169474", "0.50113785", "0.50071615", "0.5005744", "0.5004415", "0.50027406", "0.5000548", "0.49999282", "0.49870998", "0.49869207", "0.49852055", "0.49829793", "0.49805787", "0.49781847", "0.49722052", "0.49631077", "0.49610695", "0.49584392", "0.49580544", "0.49576664", "0.49528003", "0.4949824", "0.49477226", "0.4935238", "0.49339235", "0.49329942", "0.4926661", "0.492633", "0.49174863", "0.49137366", "0.49134243", "0.4911788", "0.491166", "0.49093342" ]
0.0
-1
Listener for AllDoneEliminating Informs the controller that the players are done eliminating
@Override public void setAllDoneEliminatingChangedListener() { database.getReference(gameCodeRef).child("AllDoneEliminating").addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot snapshot) { String stringValue = String.valueOf(snapshot.getValue()); if (!stringValue.equals(null) && !stringValue.equals("null")){ Boolean value = (Boolean) snapshot.getValue(); if (value){ Controller.getInstance().allPlayersDoneEliminating(); } } } @Override public void onCancelled(@NonNull DatabaseError error) { Log.w(TAG, "Failed to read value.", error.toException()); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Se elimino los datos del equipo\");\r\n\t}", "@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Eliminar los datos del equipo\");\r\n\t}", "public void processEliminar() {\n }", "private void quit() {\n\t\t\tArrayList<ClientThread> delList = new ArrayList<ClientThread>();\n\t\t\tdelList.add(this);\n\t\t\tplayers.removeAll(delList);\n\t\t\twaitingPlayers.removeAll(delList);\n\t\t\tview.changeInAndWait(players.size(),waitingPlayers.size());\t\t\n\t\t\tif(dealer == this) {\n\t\t\t\tdealer = null;\n\t\t\t\tview.writeLog(\"Dealer: \" + name + \" has quited. NO DEALER NOW.\");\n\t\t\t}else view.writeLog(\"Player: \" + name + \" has quited.\");\n\t\t\tstatusCheck();\n\t\t}", "public abstract void onRemoveAction();", "private void removeListener() {\n buttonPanel.getRemoveTask().addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n for (int i = 0;i<toDoList.toDoListLength();i++) {\n JRadioButton task = toDoButtonList.get(i);\n if (task.isSelected()&& !task.getText().equals(\"\")) {\n toDoList.removeTask(i);\n }\n }\n refresh();\n }\n });\n }", "@Override\n\tpublic void checkBotonEliminar() {\n\n\t}", "public void enleverTousLesObs() {\n\n\t\tobstaclesList.removeAll(obstaclesList);\n\t}", "public void deleteTeam(ActionEvent actionEvent) {}", "protected void processPlayerDeparted(String name) {\n Player player = tournamentService.findPlayer(name);\n if (player == null) {\n alertManagers(\"Departing player {0} is on my notify list, but I don''t have him in the tournament roster.\", name);\n return;\n }\n player.setState(PlayerState.OFFLINE);\n Game game = tournamentService.findPlayerGame(player);\n if (!game.status.isFinished()) {\n tellManagers(\"{0} departed\", name);\n }\n }", "public void enleverlaDerniereObs() {\n\n\t\tobstaclesList.remove(obstaclesList.size()-1);\n\t}", "public void firePluginRemoved()\n\t{\n\t\tfor (PluginListener pl : this.pluginListeners)\n\t\t{\n\t\t\tpl.pluginRemoved(pluginEvent);\n\t\t}\t\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tUser zws = alllist.getSelectedValue();\r\n\t\t\t\tam.removeElement(zws);\r\n\t\t\t\tall.remove(zws);\r\n\t\t\t\tvm.addElement(zws);\r\n\t\t\t\tverwalter.remove(zws);\r\n\t\t\t}", "@Override\n public void onRemovedAll() {\n Toast.makeText(this, R.string.removed_all_recordings, Toast.LENGTH_SHORT).show();\n setResult(RESULT_OK);\n finish();\n }", "public void done(ActionEvent actionEvent) {\n\t\t_missingNamesList.clear();\n\t\t_mediator.setMissingNames(_missingNamesList, \"\");\n\t\texit(pane);\n\t}", "public void processRemoveStation() {\n AppYesNoDialogSingleton dialog = AppYesNoDialogSingleton.getSingleton();\n \n // POP UP THE DIALOG\n dialog.show(\"Remove Station\", \"Are you sure you want to remove this station?\");\n \n // DO REMOVE LINE \n dataManager.removeStation(); \n }", "public void buttonDelete(ActionEvent event) {\n\t\tObservableList<Player> allProduct, SinglePlayer;\n\t\tallProduct = tableview.getItems();\n\t\tSinglePlayer = tableview.getSelectionModel().getSelectedItems();\n\t\tSinglePlayer.forEach(allProduct::remove);\n\t}", "@Override\n\tpublic void handleDone(Player player, Task task, Game game) {\n\t\t\n\t}", "@Override\n\tpublic void onRemove(final CSimulation game, final CUnit unit) {\n\t}", "private void onRemove() throws Exception\n {\n // get the target list selection\n Object selection[] = _lstTarget.getSelectedValues();\n\n // iterate the selection\n TransferEntity te;\n EntityDobj table;\n for(int i = 0; selection != null && i < selection.length; i++)\n {\n // get the te\n te = (TransferEntity)selection[i];\n if(te != null)\n {\n // get the associate entitydobj\n table = _dt.getSourceDataSource().getEntity(te.getSourceEntityName());\n if(table != null)\n {\n // add to the source list\n _lstSource.addItem(table);\n\n // remove from ds\n _dt.removeTransferEntity(te, true);\n }\n }\n }\n\n // remove the selection from the target list\n for(int i = 0; selection != null && i < selection.length; i++)\n {\n // get the table\n te = (TransferEntity)selection[i];\n if(te != null)\n _lstTarget.removeItem(te);\n }\n }", "private void notifyFinishGame(GameResult result) {\r\n\t\tfor (Player e : spectators)\r\n\t\t\te.finishGame(result);\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n String[] buttons = { \"Yes\", \"No\" };\n int returnValue = JOptionPane.showOptionDialog(frame, \"Are you sure you want to delete this user?\", \"Confirm Deletion\",\n JOptionPane.WARNING_MESSAGE, 0, null, buttons, buttons[1]);\n\n if (returnValue == 0) {\n Billboard billboard = billboardList.get(billboardJList.getSelectedIndex());\n\n Request deleteBillboard = Request.deleteBillboardReq(billboard.getBillboardName(), connector.session);\n\n Response response;\n\n try {\n response = deleteBillboard.Send(connector);\n } catch (IOException excep) {\n JOptionPane.showMessageDialog(null, \"Cannot delete billboard\");\n return;\n }\n\n // check status of response\n boolean status = response.isStatus();\n\n if (!status) {\n String errorMsg = (String) response.getData();\n JOptionPane.showMessageDialog(null, \"Cannot delete billboard. Error: \" + errorMsg);\n }\n\n if (status) {\n billboardList.remove(billboard);\n model.removeElement(billboard.getBillboardName());\n billboardJList.setModel(model);\n JOptionPane.showMessageDialog(null, \"Billboard successfully deleted.\");\n }\n }\n }", "@FXML public void deleteBT_handler(ActionEvent e) {\n\t\tif(list.getSelectionModel().getSelectedIndex() == -1) {\n\t\t\tAlert error = new Alert(AlertType.ERROR, \"Nothing Selected.\\nPlease select correctly or add new User\", ButtonType.OK);\n\t error.showAndWait();\n\t\t}\n\t\telse {\n\t\t\tAlert warning = new Alert(AlertType.WARNING,\"Delete this User from list?\", ButtonType.YES, ButtonType.NO);\n\t warning.showAndWait();\n\t if(warning.getResult() == ButtonType.NO){\n\t return;\n\t }\n\t\n\t int idx = list.getSelectionModel().getSelectedIndex();\n\t if(list.getSelectionModel().getSelectedItem().getUserName().equals(\"stock\")) {\n\t \tAlert error = new Alert(AlertType.ERROR, \"You can't delete stock username\", ButtonType.OK);\n\t error.showAndWait();\n\t \treturn;\n\t }\n\t obs.remove(idx);\n\t mgUsr.arrList.remove(idx);\n\t\t}\n\t}", "@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 }", "@FXML\n\tvoid eliminarEmpleado(ActionEvent event) {\n\t\tif (gestionando.equals(\"Empleado\")) {\n\t\t\tif (txtCedula.getText().trim().equals(\"\")) {\n\t\t\t\tUtilidades.mostrarMensaje(\"Alerta\", \"Por favor ingrese la cedula del empleado a eliminar\");\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tif (administradorDelegado.eliminarEmpleado(txtCedula.getText().trim())) {\n\t\t\t\t\t\tUtilidades.mostrarMensaje(\"Exito\", \"Se ha eliminado el empleado exitosamente\");\n\t\t\t\t\t\tllenarTabla();\n\t\t\t\t\t\tvaciarCampos();\n\t\t\t\t\t}\n\t\t\t\t} catch (PersonaNoRegistradaException | TipoClaseException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\tUtilidades.mostrarMensaje(e.getMessage(), e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else if (gestionando.equals(\"Recolector\")) {\n\t\t\tif (txtCedula.getText().trim().equals(\"\")) {\n\t\t\t\tUtilidades.mostrarMensaje(\"Alerta\", \"Por favor ingrese la cedula del recolector a eliminar\");\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tif (administradorDelegado.eliminarRecolector(txtCedula.getText().trim())) {\n\t\t\t\t\t\tUtilidades.mostrarMensaje(\"Exito\", \"Se ha eliminado al recolector exitosamente\");\n\t\t\t\t\t\tllenarTabla();\n\t\t\t\t\t\tvaciarCampos();\n\t\t\t\t\t}\n\t\t\t\t} catch (PersonaNoRegistradaException | TipoClaseException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\tUtilidades.mostrarMensaje(e.getMessage(), e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public abstract void onRemove();", "public void deal() {\r\n\t\tfor(Player p : players) {\r\n\t\t\tp.recieveCards();\r\n\t\t}\r\n\t\t/*Deals the cards onto the board, 5 cards */\r\n\t\tfor(int i = 0; i < 5; i++) {\r\n\t\t\tboard.add(gameDeck.deal());\r\n\t\t}\r\n\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tfor(int i = 0; i <deleteButtons.size(); i++) {\n\t\t\t\t\t\tif(e.getSource() == deleteButtons.get(i)) {\n\t\t\t\t\t\t\tdutchList.remove(i + 1);\n\t\t\t\t\t\t\tdutchList.revalidate();\n\t\t\t\t\t\t\tsetSize(getSize().width, getSize().height - 40);\n\t\t\t\t\t\t\tdeleteButtons.remove(i);\n\t\t\t\t\t\t\tlist.remove(i + 1);\n\t\t\t\t\t\t\tSystem.out.println(deleteButtons.size());\n\t\t\t\t\t\t\tSystem.out.println(list.size());\n\t\t\t\t\t\t\tcalculateDutch();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "public void onRemoveParticipant() {\n Participant participant = outputParticipants.getSelectionModel().getSelectedItem();\n\n if (participant == null) {\n AlertHelper.showError(LanguageKey.ERROR_PARTICIPANT_NULL, null);\n return;\n }\n\n if (controller.removeParticipant(participant)) {\n return;\n }\n\n AlertHelper.showError(LanguageKey.ERROR_PARTICIPANT_REMOVE, null);\n }", "public void removed() {\n }", "private void onPeersCleared()\n {\n for (PeerListener listener : getListeners()) {\n listener.onPeersCleared();\n }\n }", "@FXML\n public void removeListItem(ActionEvent event) throws IOException {\n int removeItemIndex = unseenPacketList.getSelectionModel().getSelectedIndex();\n if (removeItemIndex < 0) {\n \tJOptionPane.showMessageDialog(null, \"Cannot remove from already empty list.\");\n } else {\n \tUpdateHandler.getAllPacketsList().remove(removeItemIndex);\n unseenPacketList.getItems().remove(removeItemIndex);\n UpdateHandler.getUnseenPacketListIndex().remove(removeItemIndex);\n }\n \n }", "public void quitarParticipante(UsuarioDeLista echado){\r\n\t\ttry {\r\n\t\t\tthis.participantes.remove(echado);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());//Seria mejor poner un messagebox.\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n public void run() {\n try {\n pendingConfirms.remove(target.getName(),sender.getName());\n } catch (Exception ignored) {/*player has already confirmed*/}\n }", "public void Gamefinished()\n\t\t{\n\t\t\tplayers_in_game--;\n\t\t}", "public void updateDeletions() {\r\n for (Lane l : lanes) {\r\n Vehicle[] vehArray = l.getVehicles().toArray(new Vehicle[0]);\r\n for (Vehicle v : vehArray) {\r\n if (v.getHeadSegment().equals(l.getLastSegment())) {\r\n l.getVehicles().remove(v);\r\n numberOfVehicles--;\r\n if (v instanceof Car) {\r\n SimulationStats.incrementCars();\r\n SimulationStats.addEvent(SimulationStats.createVehicleLeavingEvent(v));\r\n } else if (v instanceof Truck) {\r\n SimulationStats.incrementTrucks();\r\n SimulationStats.addEvent(SimulationStats.createVehicleLeavingEvent(v));\r\n }\r\n }\r\n }\r\n }\r\n }", "public void endBattle() {\n for (BattleEffect btlEff : effectsToRemove) {\n btlEff.remove();\n }\n playerInCombat.resetHealthAndMana();\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 void actionPerformed(ActionEvent e) {\n\t\t\t\ttry{\n\t\t\t\t\tdodelete();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch(Exception ex)\n\t\t\t\t{\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "@Override\r\n\tpublic void deleteObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "public void entityRemoved() {}", "@Override\n\tpublic void eliminar() {\n\t\t\n\t}", "public void clearingResult() {\n\t\tview.writeLog(\"----All players have stopped drawing cards.----\");\n\t\tcountAllPoints();\n\t\tint dealerPoints = dealer.points;\n\t\tview.writeLog(\"The dealer (\" + dealer.name +\") got \"+ dealerPoints+\" points.\");\n\t\tfor(ClientThread player: players) {\n\t\t\tif(player != dealer) {\n\t\t\t\tif(dealerPoints > player.points) {\t//Losers.\n\t\t\t\t\tplayer.send(new Package(\"MESSAGE\",\"Dealer: \"+dealerPoints +\", you: \"+player.points+\". You lose a stack.\"));\n\t\t\t\t\tplayer.send(new Package(\"END\",-1));\n\t\t\t\t\tlosers ++;\n\t\t\t\t}else if(dealerPoints < player.points){\t//Winners.\n\t\t\t\t\tplayer.send(new Package(\"MESSAGE\",\"Dealer: \"+dealerPoints +\", you: \"+player.points+\". You win a stack.\"));\n\t\t\t\t\tplayer.send(new Package(\"END\",1));\n\t\t\t\t\twinners ++;\n\t\t\t\t}else {\t//Those who have same points with dealer.\n\t\t\t\t\tplayer.send(new Package(\"MESSAGE\",\"Dealer: \"+dealerPoints +\", you: \"+player.points+\". Your stacks remains.\"));\n\t\t\t\t\tplayer.send(new Package(\"END\",0));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Deal with the dealer.\n\t\tint dealerStackChange = losers - winners;\n\t\tview.writeLog(\"The dealer wins \"+ dealerStackChange +\"stack(s).\");\n\t\tdealer.send(new Package(\"MESSAGE\",winners +\" player defeat you, \"+losers+\" lose. Stack change: \"+dealerStackChange));\n\t\tdealer.send(new Package(\"END\", dealerStackChange));\n\t\tendGame();\n\t}", "@Override\n public void onDone() {\n mOverlay.remove(mEyesGraphic);\n }", "public void dvRemoved()\r\n/* 61: */ {\r\n/* 62:132 */ this.numDVRecords -= 1;\r\n/* 63: */ }", "@Override\n\tpublic void deletePlayer(Joueur joueur) {\n\t\t\n\t}", "@EventHandler(priority = EventPriority.MONITOR)\n public void PlayerQuit(PlayerQuitEvent e){\n plugin.playerIslands.remove(e.getPlayer().getName());\n }", "private void excluirAction() {\r\n Integer i = daoPedido.excluir(this.pedidoVO);\r\n\r\n if (i != null && i > 0) {\r\n msg = activity.getString(R.string.SUCCESS_excluido, pedidoVO.toString());\r\n Toast.makeText(activity, msg + \"(\" + i + \")\", Toast.LENGTH_SHORT).show();\r\n Log.i(\"DB_INFO\", \"Sucesso ao Alterar: \" + this.pedidoVO.toString());\r\n\r\n// this.adapter.remove(this.pedidoVO);\r\n this.refreshData(2);\r\n } else {\r\n msg = activity.getString(R.string.ERROR_excluir, pedidoVO.toString());\r\n Toast.makeText(activity, msg, Toast.LENGTH_SHORT).show();\r\n Log.e(\"DB_INFO\", \"Erro ao Excluir: \" + this.pedidoVO.toString());\r\n }\r\n }", "public void eliminarDatosEnEntidad(String entidad, ArrayList entidadencontrada)\r\n\t{\r\n\t\tif(entidad.equalsIgnoreCase(\"Rol\"))\r\n\t\t{\r\n\t\t\tRol encontrado = (Rol)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t RolBD.eliminar(encontrado.getIdrol(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Prueba\"))\r\n\t\t{\r\n\t\t\tPrueba encontrado = (Prueba)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \tString nombrepru = encontrado.getNombre();\r\n\t \tif(nombrepru.equalsIgnoreCase(\"Vacante Exclusivo\") || nombrepru.equalsIgnoreCase(\"Vacante Multiple\") || nombrepru.equalsIgnoreCase(\"Prueba Libre\"))\r\n\t \t{\r\n\t \t\tJOptionPane.showMessageDialog(this,\"La prueba \"+nombrepru+\" no puede ser eliminada por ser parte importante de la base del conocimiento.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\ttry\r\n\t\t\t {\r\n\t\t\t Conector conector = new Conector();\r\n\t\t\t conector.iniciarConexionBaseDatos();\r\n\t\t\t PruebaBD.eliminar(encontrado.getIdprueba(), conector);\r\n\t\t\t conector.terminarConexionBaseDatos();\r\n\t\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t\t }\r\n\t\t\t catch (Exception e)\r\n\t\t\t\t\t{\r\n\t\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t\t}\r\n\t \t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Pregunta\"))\r\n\t\t{\r\n\t\t\tPregunta encontrado = (Pregunta)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t PreguntaBD.eliminar(encontrado.getIdpregunta(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Escala\"))\r\n\t\t{\r\n\t\t\tEscala encontrado = (Escala)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t EscalaBD.eliminar(encontrado.getIdescala(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Competencia\"))\r\n\t\t{\r\n\t\t\tCompetencia encontrado = (Competencia)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t CompetenciaBD.eliminar(encontrado.getIdcompetencia(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Caracteristica\"))\r\n\t\t{\r\n\t\t\tCaracteristica encontrado = (Caracteristica)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t CaracteristicaBD.eliminar(encontrado.getIdcaracteristica(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t}", "@Override\n\tpublic void eliminar() {\n\n\t}", "@Override\n\tprotected void done()\n\t{\n\t\tgetController().done();\n\t}", "private void movementPhase() {\n ClickObserver.getInstance().setCreatureFlag(\"\");\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(false);\n TheCupGUI.update();\n Board.removeCovers();\n }\n });\n for (Player p : playerList) {\n \tplayer = p;\n player.flipAllUp();\n\t ClickObserver.getInstance().setActivePlayer(player);\n\t ClickObserver.getInstance().setCreatureFlag(\"Movement: SelectMovers\");\n\t InfoPanel.uncover(player.getName());\n\t if (p.getHexesWithPiece().size() > 0) {\n\t \tClickObserver.getInstance().setClickedTerrain(p.getHexesWithPiece().get(0));\n\t }\n\t pause();\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \tClickObserver.getInstance().whenTerrainClicked();\n \t GUI.getHelpText().setText(\"Movement Phase: \" + player.getName()\n + \", Move your armies\");\n \t Game.getRackGui().setOwner(player);\n }\n });\n\t \n\t while (isPaused) {\n \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t }\n\t InfoPanel.cover(player.getName());\n player.flipAllDown();\n }\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(true);\n }\n });\n ClickObserver.getInstance().setCreatureFlag(\"\");\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(!chesses.isEmpty()) {\r\n\t\t\t\t\tChess to_remove = chesses.getLast();\r\n\t\t\t\t\tPoint to_delete = to_remove.getCor();\r\n\t\t\t\t\tisChess[to_delete.x][to_delete.y] = 0;\r\n\t\t\t\t\tchesses.remove(chesses.size() - 1);\r\n\t\t\t\t\tturn = 1 - turn;\t\r\n\t\t\t\t\trepaint();\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n public void removed(Entity e) {\n AI ai = AIm.get(e);\n if (ai.active) {\n ai.active = false;\n startMove = startAction = true;\n groupAiDone= false;\n screen.processTurn();\n // Future note: This transition comes quite abruptly.\n // It would be nice to somehow delay it, but because\n // the entity has just been removed, it won't be\n // processed any more. Perhaps give processTurn()\n // a boolean argument which will pause for a second\n // or so before selecting the new entity and moving\n // the camera on.\n\n }\n }", "@FXML\n void confirmDelete () {\n\n// cycles through all Elements to be deleted\n for (Element element : app.deleteElements) {\n\n// if it is a Timeline, it removes it\n if (element instanceof Timeline) {\n app.timelines.remove(element);\n }\n\n// if it is an Event, it finds the relevant Timeline, then removes the Event\n if (element instanceof Event) {\n for (Timeline timeline : app.timelines) {\n if (timeline == ((Event) element).timeline) {\n timeline.events.remove(element);\n }\n }\n }\n }\n\n exitDeleteWindow();\n\n// creates a message for the user\n setMessage(\"Exited Delete Mode: \" + app.deleteElements.size() + \" elements deleted\", false);\n }", "@EventHandler\n public void onLog(PlayerQuitEvent e) {\n lastAttack.remove(e.getPlayer());\n }", "@FXML\r\n private void excluir(ActionEvent event) {\n selecionado = tabelaCliente.getSelectionModel()\r\n .getSelectedItem();\r\n \r\n //Verifico se tem cliente selecionado\r\n if(selecionado != null){ //existe cliente selecionado\r\n \r\n //Pegando a resposta da confirmacao do usuario\r\n Optional<ButtonType> btn = \r\n mensagemDeConfirmacao(\"Deseja mesmo excluir?\",\r\n \"EXCLUIR\");\r\n \r\n //Verificando se apertou o OK\r\n if(btn.get() == ButtonType.OK){\r\n \r\n //Manda para a camada de serviço excluir\r\n servico.excluir(selecionado);\r\n \r\n //mostrar mensagem de sucesso\r\n mensagemSucesso(\"cliente excluído com sucesso\");\r\n \r\n //Atualizar a tabela\r\n listarClienteTabela(); \r\n \r\n }\r\n \r\n \r\n \r\n }else{\r\n mensagemErro(\"Selecione um cliente.\");\r\n }\r\n \r\n }", "void onAttackDestroyed(AttackObject attack) {\n attacksToDelete.add(attack);\n if(attack.isPlayerAttack()){\n playerAttackCount--;\n }\n }", "@FXML\n\tprivate void deleteSelected(ActionEvent event) {\n\t\tint selectedIndex = taskList.getSelectionModel().getSelectedIndex();\n\t\tString task = taskList.getItems().get(selectedIndex);\n\t\ttaskList.getSelectionModel().clearSelection();\n\t\ttaskList.getItems().remove(task);\n\t\tchatView.setText(\"\");\n\t\ttaskList.getItems().removeAll();\n\t\tString task_split[] = task.split(\" \", 2);\n\t\tString removeTask = task_split[1];\n\t\tif (task.contains(\"due by\")) {\n\t\t\tString[] taskDate = task_split[1].split(\"\\\\s+\");\n\t\t\tSystem.out.println(taskDate);\n\t\t\tString end = taskDate[taskDate.length - 3];\n\t\t\tSystem.out.println(end);\n\t\t\tremoveTask = task_split[1].substring(0, task_split[1].indexOf(end)).trim();\n\t\t\tSystem.out.println(removeTask);\n\n\t\t}\n\t\tclient.removeTask(removeTask.replace(\"\\n\", \"\"));\n\t}", "@Override\n public void doRemove()\n {\n Player target = p.getServer().getPlayer(targetID);\n if (target == null)\n return;\n\n // teleport them back to their original location\n target.teleport(originalLocation);\n\n // remove flying and immobolize effects\n for (O2EffectType effectType : additionalEffects)\n {\n Ollivanders2API.getPlayers().playerEffects.removeEffect(targetID, effectType);\n }\n }", "private void depurarElementos() {\n\t\tfor(int i=0; i<JuegoListener.elementos.size();i++){\n\t\t\tif (!JuegoListener.elementos.get(i).estaVivo())\n\t\t\t\tJuegoListener.elementos.remove(i);\n\t\t}\n\t\t\n\t}", "public void cancel(){\n\t\tstartTime = -1;\n\t\tplayersFinished = new ArrayList<>();\n\t\tplayersFinishedMarked = new ArrayList<Player>();\n\t\tDNFs = new ArrayList<>();\n\t\ttempNumber = 0;\n\t\tmarkedNum = 0;\n\t\t//normally we'd mark started racers as such, but we are don't know how many started.\n\t}", "public void cleanToAll() {\n\t\tfor(ClientThread player: players) {\n\t\t\tplayer.send(new Package(\"CLEAN\",null));\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onCompleted() {\n\t\t\t\tSystem.out.println(\"Completed Operations\");\n\t\t\t\tconnected_clients.remove(responseObserver);\n\t\t\t}", "public void quitarTodosFin() {\n\t\tfor (Estado e : _acept)\n\t\t\te.cambioFin(false);\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(frame, \n\t\t\t\t\t\t\"Do you want to delete the selected projects?\\nThis action cannot be undone!\", \n\t\t\t\t\t\t\"Delete Selected\", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\n\t\t\t\tif(choice == 0){\n\t\t\t\t\tSystem.out.println(\"Delete\");\n\t\t\t\t\tString[] selected = sel.getSelected(); \n\t\t\t\t\tfor(int i=0;i<selected.length;i++) {\n\t\t\t\t\t\n\t\t\t\t\t\tint index = portfolio.findByCode(selected[i]);\n\t\t\t\t\t\tportfolio.remove(index, config.isUpdateDB());\n\t\t\t\t\t\tsel.remove(index);\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfpTable.setModel((TableModel) new ProjectTableModel(portfolio.getFinishedProjects()));\n\t\t\t\topTable.setModel((TableModel) new ProjectTableModel(portfolio.getOngoingProjects()));\n\t\t\t\ttoggleSaved(false);\n\t\t\t}", "void removeFromGame() {\n\t\t// remove from game\n\t\t//only for multi-player\n\t}", "protected void dismissFighter( ArrayList <Luchador> list,ArrayList <ObjetoEquipable> inventory,ArrayList <String> checker) {\n ListaLuchadores.eliminarLuchadorAsk(list, inventory, checker);\r\n if (list.size()<1){\r\n System.exit(0);\r\n }\r\n }", "@EventHandler\r\n\tpublic void onPlayerQuit(PlayerQuitEvent event) {\r\n\t\tUUID uuid = event.getPlayer().getUniqueId();\r\n\t\tmain.getPlayers().get(uuid).saveTask.cancel();\r\n\t\tmain.getPlayers().get(uuid).savePlayer();\r\n\t\tmain.getPlayers().remove(uuid);\r\n\t\t\r\n\t}", "void removeFromQueue(ActionEvent event){\n model.getQueueList().remove(podcast);\n podcast.setQueued(false);\n podcast.togglePlaying();\n cm.hide();\n }", "private synchronized void notifyCompleted() {\n // since there will be no more observer messages after this, there\n // is no need to keep any observers registered after we finish here\n // so get the observers one last time, and at the same time\n // remove them from the table\n Observer[] observers = observersTable.remove(this);\n if (observers != null) {\n for (Observer observer : observers) {\n observer.completed(this);\n }\n observersTable.remove(this);\n }\n\n }", "protected void notifyDeleted(List<T> objects){\n\t\tfor( ModelEvents<T> observer : this.ObserverList){\r\n\t\t\tobserver.dataDeleted(objects);\r\n\t\t}\r\n\t}", "public void deleteIObservers( )\n {\n observers.removeAllElements();\n }", "void onGroupeDelete();", "@Override\n public void onRemoval() {\n try {\n if (eOutputHatches != null) {\n for (GT_MetaTileEntity_Hatch_ElementalContainer hatch_elemental : eOutputHatches) {\n hatch_elemental.id = -1;\n }\n for (GT_MetaTileEntity_Hatch_ElementalContainer hatch_elemental : eInputHatches) {\n hatch_elemental.id = -1;\n }\n for (GT_MetaTileEntity_Hatch_OutputData hatch_data : eOutputData) {\n hatch_data.id = -1;\n hatch_data.q = null;\n }\n for (GT_MetaTileEntity_Hatch_InputData hatch_data : eInputData) {\n hatch_data.id = -1;\n }\n for (GT_MetaTileEntity_Hatch_Uncertainty hatch : eUncertainHatches) {\n hatch.getBaseMetaTileEntity().setActive(false);\n }\n for (GT_MetaTileEntity_Hatch_Param hatch : eParamHatches) {\n hatch.getBaseMetaTileEntity().setActive(false);\n }\n }\n cleanOutputEM_EM();\n if (ePowerPass && getEUVar() > V[3] || eDismantleBoom && mMaxProgresstime > 0 && areChunksAroundLoaded_EM()) {\n explodeMultiblock();\n }\n } catch (Exception e) {\n if (DEBUG_MODE) {\n e.printStackTrace();\n }\n }\n }", "private void completeListener() {\n buttonPanel.getCompleteTask().addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n for (int i = 0;i<toDoList.toDoListLength();i++) {\n JRadioButton task = toDoButtonList.get(i);\n if (task.isSelected()&& !task.getText().equals(\"\")){\n toDoList.getTask(i).setComplete();\n }\n }\n refresh();\n }\n });\n }", "public void actionPerformed(ActionEvent e) {\n if (e.getActionCommand().equals(\"Delete\")) { //cuando apretamos el boton\n GameManager gameManager = new GameManager();\n if (gameManager.checkGame(dgv.getGameName())) {\n if (JOptionPane.OK_OPTION == dgv.confirmDeleteGame()) {\n gameManager.deleteGame(dgv.getGameName());\n JsonGame.deleteJsonGame(dgv.getGameName());\n }\n } else {\n dgv.printErrorNoExistance();\n }\n }\n\n if (e.getActionCommand().equals(\"Return\")) { //cuando apretamos el boton\n dgv.setVisible(false);\n PlayView pv = new PlayView();\n PlayViewController pvc = new PlayViewController(pv,userName);\n pv.mainController(pvc);\n\n }\n if (e.getActionCommand().equals(\"Config\")) { //cuando apretamos el boton\n dgv.setVisible(false);\n SettingView sv = new SettingView();\n SettingViewController svc = new SettingViewController(sv, userName);\n sv.mainController(svc);\n }\n\n }", "@EventHandler(ignoreCancelled = true, priority = EventPriority.NORMAL)\n\tprivate void onQuit(PlayerQuitEvent event) {\n\t\tList<RegisteredCallback> list = entries.get(event.getPlayer());\n\t\tif(list == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//copy list: can get modified while iterating\n\t\tfor(RegisteredCallback callback : new ArrayList<>(list)) {\n\t\t\tif(!callback.active) {\n\t\t\t\tcontinue; //callbacks can unregister each other\n\t\t\t}\n\t\t\t\n\t\t\tcallback.timing.startTiming();\n\t\t\ttry {\n\t\t\t\tcallback.getCallback().onQuit(event.getPlayer());\n\t\t\t} catch (Throwable t) {\n\t\t\t\tplugin.getLogger().log(Level.SEVERE, \"Error handling callback in \" + getClass().getSimpleName(), t);\n\t\t\t}\n\t\t\tcallback.timing.stopTiming();\n\t\t\ttryUnregister(event.getPlayer(), callback);\n\t\t}\n\t\t\n\t\tlist = entries.remove(event.getPlayer());\n\t\tif(list != null && !list.isEmpty()) {\n\t\t\tfor(RegisteredCallback callback : list) {\n\t\t\t\tplugin.getLogger().severe(getClass().getSimpleName()\n\t\t\t\t\t\t+ \" callback registered during player quitting: \" + callback.getCallback().getClass().getName());\n\t\t\t\tcallback.active = false;\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Player> checkToEliminate() {\n ArrayList<Player> eliminated = new ArrayList<Player>();\n\n // Check which players are to be eliminated\n for (Player player : playersInGame) {\n if (player.peekCard() == null) {\n eliminated.add(player);\n }\n }\n\n // Eliminate players from model\n for (Player eliminatedPlayer : eliminated) {\n playersInGame.remove(eliminatedPlayer);\n }\n\n return eliminated;\n }", "public synchronized void delPlayer(@NotNull PlayerInterface player) {\n\n for(BoardCell boardCell[] : board.getGrid()) {\n for(BoardCell b : boardCell) {\n if(b.getWorker() != null) {\n if(b.getWorker().getPlayerWorker().getNickname().equals(player.getNickname())) {\n b.setWorker(null);\n }\n }\n }\n }\n player.getWorkerRef().clear();\n for (int i = 0; i < onlinePlayers.size(); i++) {\n if(onlinePlayers.get(i).getNickname().equals(player.getNickname())) {\n if(started) {\n stateList.remove(i);\n onlinePlayers.remove(i);\n nickNames.remove(player.getNickname());\n }\n break;\n }\n }\n }", "public void disconnectListeners(){\n for(int i=0; i<3; i++){\n for(int j=0; j<3; j++){\n grid[i][j].removeActionListener(this);\n }\n }\n }", "public void suppHandler(ActionEvent event) throws Exception\n\t{\n\t String id= new String();\n\t\tfor (Button bouton : list_bouton)\n\t\t{\n\t\t\tif(event.getSource()==bouton)\n\t\t\t{\n\t\t bouton.setOnAction(new EventHandler<ActionEvent>() {\n private String args;\n\n\t\t\t@Override\n\t\t public void handle(ActionEvent arg0) {\n\t\t\t\t try {\n\t\t\t\t\t\n\t\t\t\t sup= new Supprimer();\n\t\t\t\t ((Node) event.getSource()).getScene().getWindow().hide(); \n\t\t\t\t} catch (Exception e) {e.printStackTrace();} \n\t\t\t\t\t}});\n\t\t ChoixControler.selectedDomaine=bouton.getId();\n\t\t }\n\t\t }\n\t\t\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void eliminar() {\n\r\n\t\t\t}", "public ActionListener deletePlayerSelected() {\n return new ActionListener() {\n\n @Override\n public void actionPerformed(ActionEvent e) {\n controll.deletePlayerWindow();\n }\n };\n }", "private void recruitThingsPhase() {\n\n ClickObserver.getInstance().setTerrainFlag(\"RecruitingThings: PlaceThings\");\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(false);\n }\n });\n int numToDraw = 0;\n boolean flag;\n \n for (final Player p : playerList) {\n doneClicked = false;\n this.player = p;\n player.flipAllUp();\n ClickObserver.getInstance().setActivePlayer(player);\n flag = true;\n pause();\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getHelpText().setText(\"Recruitment Phase: \" + p.getName()\n + \", draw free/paid Things from The Cup, then click 'done'\");\n GUI.getRackGui().setOwner(player);\n TheCupGUI.update();\n }\n });\n \n while (isPaused) {\n while (!doneClicked) {\n if (freeClicked) {\n if (flag) {\n System.out.println(player.getName() + \" -clicked free\");\n numToDraw = (int)Math.ceil(player.getHexesOwned().size() / 2.0);\n System.out.println(numToDraw + \" -num to draw\");\n final int finNumToDraw = numToDraw;\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n TheCupGUI.setFieldText(\"\"+finNumToDraw);\n }\n });\n flag = false;\n }\n }\n if (paidClicked) {\n flag = true;\n if (flag) {\n \tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n \tPlayerBoard.getInstance().updateGold(player);\n }\n });\n flag = false;\n }\n }\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n player.flipAllDown();\n }\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(true);\n }\n });\n\n ClickObserver.getInstance().setTerrainFlag(\"\");\n }", "private void deal() {\n int index = 0;\n while (!deck.isEmpty()) {\n Card card = deck.get(0);\n players.get(index).receiveCard(card);\n deck.remove(0);\n if (index < players.size() - 1) {\n index++;\n } else {\n index = 0;\n }\n }\n }", "private void exitListener() {\n buttonPanel.getQuit().addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n toDoList.saveAll(fileLocation);\n System.exit(0);\n }\n });\n }", "@Override\n protected void updateEliminations() {\n\n }", "public void actionPerformed(ActionEvent e)\r\n {\r\n\t// Add and remove items from the customer queue\r\n\t\r\n\tif (e.getSource() == dispenseButton)\r\n\t{\r\n\t dispense();\t\r\n\t}\r\n\telse\r\n\t{\r\n\t serve();\r\n\t}\r\n\tupdateDisplay();\r\n }", "private void eliminatePlayers() {\n \n Iterator<Player> iter = players.iterator();\n\n while (iter.hasNext()) {\n Player player = iter.next();\n\n if (player.getList().isEmpty()) {\n iter.remove();\n if (player.getIsHuman()) {\n setGameState(GameState.HUMAN_OUT);\n }\n // need to remember that due to successive draws, the active player could run\n // out of cards\n // select a new random player if player gets eliminated\n if (!players.contains(activePlayer)) {\n selectRandomPlayer();\n }\n }\n }\n }", "public void clearParticipation(ActionEvent e)\n {\n ArrayList joueurs = ((JoueursTableModel)sorter.getTableModel()).getJoueurs();\n for (Iterator iter = joueurs.iterator(); iter.hasNext();)\n {\n Joueur j = (Joueur) iter.next();\n j.setNbParticipation(0);\n }\n ((JoueursTableModel)sorter.getTableModel()).fireTableDataChanged();\n }", "@Override\n\tpublic void informEnd(List<String> winners) {\n\t}", "public void onDelete() {\n if (DEBUG) Log.e(Thread.currentThread().getStackTrace()[2].getClassName(), Thread.currentThread().getStackTrace()[2].getMethodName());\n showDialog(R.id.dialog_confirm_delete);\n }", "public void shutdown() {\n\t\tfor(Player player : new ArrayList<>(entries.keySet())) {\n\t\t\tonQuit(new PlayerQuitEvent(player, (Component) null, PlayerQuitEvent.QuitReason.DISCONNECTED));\n\t\t}\n\t}", "public void eliminarManoObra(ActionEvent actionEvent) {\r\n manoobraDao manobraDao = new manoobraDaoImpl();\r\n String msg;\r\n if (manobraDao.eliminarManoObra(this.manoobra.getCodigoManob())) {\r\n msg = \"Mano de Obra eliminada correctamente\";\r\n FacesMessage message1 = new FacesMessage(FacesMessage.SEVERITY_INFO, msg, null);\r\n FacesContext.getCurrentInstance().addMessage(null, message1);\r\n } else {\r\n msg = \"No se elimino la Mano de Obra\";\r\n FacesMessage message2 = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, null);\r\n FacesContext.getCurrentInstance().addMessage(null, message2);\r\n }\r\n \r\n }", "public void endGame() {\n\t\twaitingPlayers.addAll(players);\n\t\tplayers.clear();\n\t\tfor(ClientThread player: waitingPlayers) {\n\t\t\tplayer.points = 0;\n\t\t\tplayer.clientCards.clear();\n\t\t}\n\t\twinners = 0;\n\t\tlosers = 0;\n\t\tpassCounter = 0;\n\t\tdeck.init();\n\t\tview.changeInAndWait(players.size(), waitingPlayers.size());\n\t\tview.writeLog(\"-------------GAME END--------------\");\n\t\tstatus = \"waiting\";\n\t\tstatusCheck();\n\t}", "void deleteButton_actionPerformed(ActionEvent e) {\n doDelete();\n }", "public void onEvent(Event event) throws Exception {\n\t\t\t\t\t\n\t\t\t\t\tif (event.getName().equals(\"onYes\")) {\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\tfor(Materias materia:materiaDelete){\n\t\t\t\t\t\t\t\tnew MateriasHome().delete(materia);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tBindUtils.postNotifyChange(null, null,this, \"*\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\trefresh();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tClients.showNotification(\"Registro eliminado correctamente\");\n\t\t\t\t\t\t}catch(RuntimeException re){\n\t\t\t\t\t\t\tthrow re;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "@Override\r\n\tpublic void eliminar(IndicadorActividadEscala iae) {\n\r\n\t}", "void onCleanup() {\n\t\tdimensionMap.forEachValue(e -> {\n\t\t\te.releaseAllChunkData();\n\t\t\treturn true;\n\t\t});\n\t\tdimensionMap.clear();\n\t\tconnectedPlayers.clear();\n\t}", "@Override\n protected void onDeath(final Creature killer) {\n getDeathPenalty().checkCharmOfLuck();\n\n if (isInStoreMode()) {\n setPrivateStoreType(Player.STORE_PRIVATE_NONE);\n }\n if (isProcessingRequest()) {\n final Request request = getRequest();\n if (isInTrade()) {\n final Player partner = request.getOtherPlayer(this);\n sendPacket(SendTradeDone.FAIL);\n partner.sendPacket(SendTradeDone.FAIL);\n }\n request.cancel();\n }\n //cubicdata\n deleteCubics();\n deleteAgathion();\n\n boolean checkPvp = true;\n if (ServerConfig.ALLOW_CURSED_WEAPONS) {\n if (isCursedWeaponEquipped()) {\n CursedWeaponsManager.getInstance().dropPlayer(this);\n checkPvp = false;\n } else if (killer != null && killer.isPlayer() && killer.isCursedWeaponEquipped()) {\n CursedWeaponsManager.getInstance().increaseKills(((Player) killer).getCursedWeaponEquippedId());\n checkPvp = false;\n }\n }\n\n if (checkPvp) {\n doPKPVPManage(killer);\n\n altDeathPenalty(killer);\n }\n\n //And in the end of process notify death penalty that owner died :)\n getDeathPenalty().notifyDead(killer);\n\n setIncreasedForce(0);\n\n if (isInParty() && getParty().isInReflection() && getParty().getReflection() instanceof DimensionalRift) {\n ((DimensionalRift) getParty().getReflection()).memberDead(this);\n }\n\n stopWaterTask();\n stopMountFeedTask();\n\n if (!isSalvation() && isOnSiegeField() && isCharmOfCourage()) {\n ask(new ConfirmDlg(SystemMsg.YOUR_CHARM_OF_COURAGE_IS_TRYING_TO_RESURRECT_YOU, 60000), new ReviveAnswerListener(this, 100, false, 60000));\n setCharmOfCourage(false);\n }\n\n if (AllSettingsConfig.AltKillAnnounce && killer != null && killer.isPlayer())\n AnnouncementUtils.announceToAll(killer.getName() + \" убил игрока \" + getName() + \"!\");\n\n super.onDeath(killer);\n }" ]
[ "0.6018421", "0.59518254", "0.58729625", "0.5856929", "0.5819042", "0.58111334", "0.580402", "0.5794528", "0.5786696", "0.5780891", "0.5705528", "0.565968", "0.5644352", "0.56393313", "0.5629771", "0.56222236", "0.560471", "0.56032866", "0.56017286", "0.5597914", "0.5580557", "0.55568564", "0.5556352", "0.5553822", "0.5553319", "0.5549215", "0.5548423", "0.55180603", "0.55103385", "0.55061966", "0.5505601", "0.5505397", "0.5504449", "0.5494421", "0.5487649", "0.5482334", "0.54802424", "0.5479019", "0.5461332", "0.5439296", "0.54293495", "0.5422777", "0.5412631", "0.5404434", "0.5402614", "0.5391819", "0.538678", "0.53774077", "0.5362633", "0.53562385", "0.5352117", "0.53460926", "0.53426486", "0.53404146", "0.53282785", "0.5314677", "0.5310514", "0.5307958", "0.5306971", "0.53059447", "0.5304722", "0.53041255", "0.52977675", "0.5294761", "0.52940536", "0.5293237", "0.5292181", "0.52891487", "0.5275604", "0.5266583", "0.52604735", "0.5260421", "0.525957", "0.52592504", "0.5258082", "0.525719", "0.5253085", "0.52508086", "0.5250591", "0.52485716", "0.5247558", "0.52463835", "0.5246285", "0.5244667", "0.5243354", "0.52414864", "0.523838", "0.52317065", "0.5229811", "0.52292013", "0.5225999", "0.52166855", "0.5205379", "0.5204913", "0.52018535", "0.52008593", "0.519852", "0.5197185", "0.5191527", "0.5187596", "0.5187536" ]
0.0
-1
Updates the player's list of brains with a given ArrayList of brains
@Override public void setPlayerBrainList(Player player, ArrayList<Brain> brains) { DatabaseReference currentRef = database.getReference(gameCodeRef).child("Players").child(player.getUsername()); currentRef.child("BrainList").setValue(brains); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BowlingGame(List<BowlingPlayer> bowlingPlayers){\n _bowlingPlayers = bowlingPlayers;\n }", "void updateBetsResults(ArrayList<Bet> allBetsOfMatch) throws DAOException;", "void updateLeaderSlot(String username, ArrayList<LightLeaderCard> leaderSlot);", "public void updateLobby(Set<String> players) {\r\n lobbyFrame.updateList(players);\r\n }", "public void updateConnectedPlayers(ArrayList<Player> connectedPlayers) throws RemoteException{\n match.setPlayers(connectedPlayers);\n for (int i=0;i<match.getPlayers().size();i++){\n System.out.println(\"[LOBBY]: Player \"+ match.getPlayers().get(i).getNickname()+ \" is in lobby\");\n }\n System.out.println(\"[LOBBY]: Refreshing Lobby..\");\n Platform.runLater(() -> firstPage.refreshPlayersInLobby());// Update on JavaFX Application Thread\n }", "private void updateAllBonuses() {\n\t\tfor(int i = 0; i < bonuses.length; i++)\n\t\t\tbonuses[i] = 0;\n\t\tfor(Item item : getItems()) {\n\t\t\tupdateBonus(null, item);\n\t\t}\n\t}", "public void reUpdateTargetList(CopyOnWriteArrayList<Balloon> newList) {\r\n\t\tballoons = newList;\r\n\t}", "@Override\n public void update(ArrayList<League> leagues) {\n\n }", "public final void mo23328bw(List<C40588xx> list) {\n AppMethodBeat.m2504i(53842);\n if (this.kSg == null) {\n this.kSg = new ArrayList();\n } else {\n this.kSg.clear();\n }\n this.kSg = list;\n notifyDataSetChanged();\n AppMethodBeat.m2505o(53842);\n }", "public void placeBets(){\n System.out.println();\n System.out.println(\"Let's place your bet!\");\n System.out.println();\n for(Player player: players){\n player.placeBet(minBet, maxBet);\n }\n System.out.println();\n }", "public void updateList(long t) {\n\t\tfor (int i = 0; i < ballList.size(); i++) {\n\t\t\tballList.get(i).move(t);\n\t\t\t//System.out.printf(\"ball %d at %d %d\\n\", i, ballList.get(i).getX(), ballList.get(i).getY());\n\t\t}\n\t}", "public void setBannedList(boolean b){\n useList = b;\n }", "private void updatePlayerList() \n\t{\n\t\tplayerStatus.clear();\n\n\t\tfor(Player thisPlayer: players) // Add the status of each player to the default list model.\n\t\t{\n\t\t\tplayerStatus.addElement(thisPlayer.toString());\n\t\t}\n\n\t}", "public static void initializeBronzeItems(Player player) {\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 146, 93,\n\t\t\t\tBRONZE_ITEMS[0]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 147, 93,\n\t\t\t\tBRONZE_ITEMS[1]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 148, 93,\n\t\t\t\tBRONZE_ITEMS[2]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 149, 93,\n\t\t\t\tBRONZE_ITEMS[3]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 150, 93,\n\t\t\t\tBRONZE_ITEMS[4]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 151, 93,\n\t\t\t\tBRONZE_ITEMS[5]);\n\t}", "public void setBonos(List<BonoEntity> bonos) {\r\n this.bonos = bonos;\r\n }", "void refreshPlayerList(Map<String, IPlayerConfig> playerList) throws RpcException;", "public abstract void activate(final Player player, CopyOnWriteArrayList<Bubble> bubbles);", "public final void setBannersList(final List<HeroBean> aBannersList) {\r\n this.bannersList = (List<HeroBean>) aBannersList;\r\n }", "public void replaceData(List<BountyHallInfo> bountyHallInfos) {\n mList = bountyHallInfos;\n // 调用以下方法更新后,会依次调用getItemViewType和onBindViewHolder方法\n notifyDataSetChanged();\n }", "public void setBbanStructures(List<BbanStructureDTO> bbanStructures) {\n this.bbanStructures = bbanStructures;\n }", "public void setList(ArrayList<Song> theSongs) {\n songs1 = theSongs;\n songsNumber = songs1.size();\n }", "public void updatePlayers(ArrayList<PlayerDeck> decks)\n\t{\n\t\tplayers = decks;\n\t\trepaint();\n\t}", "@Override\n\tpublic List<Baidu> savaList(List<Baidu> bl) {\n\t\tbaiduDao.save(bl);\n\t\treturn bl;\n\t}", "public LobbyPacket(List<Player> players) {\n this.players = players.toArray(new Player[players.size()]);\n }", "public static void recap(ArrayList<Player> playerList){\n for (int i = 0; i < playerList.size();i++){\n System.out.println(\"Player \" + i + \" found \" + playerList.get(i).getNumEggs() + \" eggs\");\n playerList.get(i).printBasket();\n System.out.println();\n } \n }", "public void rebound (ArrayList<PongItem> t) {\n\t\tfor (int i=1; i<t.size(); i++) {\n\t\t\tif (this.collision(t.get(i)) == true) {\n\t\t\t\tsetSpeedX(- this.getSpeedX());\n\t\t\t\tsetPosX(t.get(i).getPosX() + t.get(i).getWidth());\n\t\t\t}\n\t\t} \n\t\t\n\t\tif (Pong.solo) { /* permet à la balle de rebondir sur le \"mur\" de droite si on joue en solo */\n\t\t\tif (this.getPosX() >= Pong.SIZE_PONG_X - this.getHeight()) {\n\t\t\t\tsetSpeedX(- this.getSpeedX());\n\t\t\t}\n\t\t}\n\t\t/* Permet à la balle de rebondir sur les mur du haut et du bas */\n\t\tif (this.getPosY() <= 0 || this.getPosY() >= Pong.SIZE_PONG_Y - this.getHeight()) {\n\t\t\tsetSpeedY(- this.getSpeedY());\n\t\t}\n\t\t\n\t}", "private void refreshPlayerList() {\n List<MarketItem> items = new ArrayList<>();\n EntityRef player = localPlayer.getCharacterEntity();\n for (int i = 0; i < inventoryManager.getNumSlots(player); i++) {\n EntityRef entity = inventoryManager.getItemInSlot(player, i);\n\n if (entity.getParentPrefab() != null) {\n MarketItem item;\n\n if (entity.hasComponent(BlockItemComponent.class)) {\n String itemName = entity.getComponent(BlockItemComponent.class).blockFamily.getURI().toString();\n item = marketItemRegistry.get(itemName, 1);\n } else {\n item = marketItemRegistry.get(entity.getParentPrefab().getName(), 1);\n }\n\n items.add(item);\n }\n }\n\n tradingScreen.setPlayerItems(items);\n }", "public void add_bet_money(List<coins> bet,List<coins> currentmoney){\n\t\tfor(int i=0;i<currentmoney.size();i++) {\n\t\t\tcurrentmoney.get(i).qtt+=bet.get(i).qtt;\n\t\t}\n }", "void inPut(ArrayList<SanPham> list);", "public void updateList(List<?> listOfObjects){\n this.radioObjects = listOfObjects;\n }", "public void refresh(ArrayList pNewList) {\n listLivingBeings.setListData(pNewList.toArray());\n if (!pNewList.isEmpty()) {\n listLivingBeings.setSelectedIndex(0);\n }\n }", "void updateCoefficientForBets(ArrayList<Bet> bets) throws DAOException;", "public void setPlayers(ArrayList<Player> players) {\n this.players = players;\n }", "void updateCards(List<CardEntity> data);", "void updateCardSlots(String username, LightCardSlots cardSlots);", "void updateList(ShoppingList _ShoppingList);", "public void updateInventory(ArrayList<Player> players) {\n inventoryArea.selectAll();\n inventoryArea.replaceSelection(\"\");\n for(Player p : players) {\n inventoryArea.append(\"\\n\" + p.toString());\n inventoryArea.setCaretPosition(inventoryArea.getDocument().getLength());\n\n }\n }", "public void updated(ServerList list);", "@Override\n public void setBuffs (ArrayList<Buff> buffs) {\n this.buffs = buffs;\n }", "public void editPlayer(Nimsys nimSys,ArrayList<Player> list,Scanner keyboard) {\r\n\t\tboolean flag=false;\r\n\t\tIterator<Player> aa = list.iterator();\r\n\t\twhile (aa.hasNext()) {\r\n\t\t\tPlayer in = aa.next();\r\n\t\t\tif(in.getUserName().equals(nimSys.commands[0])){\r\n\t\t\t\tin.setSurName(nimSys.commands[1]);\r\n\t\t\t\tin.setGivenName(nimSys.commands[2]);\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\tif(flag == false)\r\n\t\t\tSystem.out.println(\"The player does not exist.\");\r\n\t\t\r\n\t}", "public void updateAnimalList(){\r\n // if (animals != null && animals.size() > 0)\r\n // {\r\n // \r\n // }\r\n // else\r\n // {\r\n animals.clear();\r\n \r\n for (fit5042.assign.repository.entity.Animal animal : animalManagedBean.getAllAnimals())//for each animal entry in the Entity Class Animal, get all animals\r\n {\r\n animals.add(animal); //add Animal data to the ArrayList<Animal> animals\r\n }\r\n \r\n setAnimal(animals); //set the global ArrayList attribute with the local ArrayList attribute\r\n // }\r\n }", "public void giveCards(Deck deck, ArrayList<Cards> player1, ArrayList<Cards> player2)\n {\n player1.add(deck.getCard());\n player2.add(deck.getCard());\n player1.add(deck.getCard());\n player2.add(deck.getCard());\n }", "void updateState() {\n String[] players = client.getPlayers();\n System.out.println(Arrays.toString(players));\n\n if(oldPlayerNum != players.length){\n oldPlayerNum = players.length;\n updateComboBox();\n }\n\n playersListModel.clear();\n\n for (int i = 0; i < players.length; i++) {\n playersListModel.add(i, players[i]);\n }\n\n // SECOND check if player holding the ball / update GUI accordingly\n String[] playerBall = client.whoIsBall();\n boolean serverSideBall = Integer.parseInt(playerBall[1]) == client.getId();\n\n if (client.hasBall != serverSideBall) { // If the server says something different\n client.hasBall = serverSideBall;\n ballState(serverSideBall, playerBall[0]);\n }\n // THIRD if you are holding the ball update gui so that ball is throwable\n\n }", "public void continueTakeFromMarketAfterChoosenWhiteMarble(ArrayList<Resource> whiteMarbleList) throws NotEnoughSpaceInStorageException, IOException, InterruptedException {\n for(Resource r : whiteMarbleList){\n currentPlayer.addToBuffer(r);\n }\n\n currentPlayer.takeFromMarket();\n }", "public void swapGameStones(ArrayList<Integer> stoneIDs){\n\t\tint turn = DBCommunicator.requestInt(\"SELECT id FROM beurt WHERE spel_id = \" + id + \" ORDER BY id DESC\");\n\t\tturn ++;\n\t\t\n\t\tDBCommunicator.writeData(\"INSERT INTO beurt (id, spel_id, account_naam, score, aktie_type) Values(\" + turn + \", \" + id + \", '\" + app.getCurrentAccount().getUsername() + \"',0 , 'Swap')\");\n\t\t\n\t\tfor(int stoneID : stoneIDs){\n\t\t\tboolean swapped = false;\n\t\t\twhile(!swapped){\n\t\t\t\tint letterID = (int) (Math.random() * 105);\n\t\t\t\t\n\t\t\t\tString character = DBCommunicator.requestData(\"SELECT karakter FROM pot WHERE spel_id = \" + id + \" AND letter_id = \" + letterID);\n\t\t\t\tif(character != null){\n\t\t\t\t\tboolean inStones = false;\n\t\t\t\t\tfor(int e = 0; e < gameStones.size(); e++){\n\t\t\t\t\t\tif(gameStones.get(e) == letterID){\n\t\t\t\t\t\t\tinStones = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(!inStones){\n\t\t\t\t\t\tfor(int e = 0; e < gameStones.size(); e++){\n\t\t\t\t\t\t\tif(gameStones.get(e) == stoneID){\n\t\t\t\t\t\t\t\tswapped = true;\n\t\t\t\t\t\t\t\tgameStones.set(e, letterID);\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}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int stoneID : gameStones){\n\t\t\tif(stoneID != 0){\n\t\t\t\tSystem.out.println(\"PLACE \" + id + \" \" + stoneID + \" \" + turn);\n\t\t\t\tDBCommunicator.writeData(\"INSERT INTO letterbakjeletter (spel_id, letter_id, beurt_id) VALUES (\" + id + \", \" + stoneID + \", \" + turn + \")\");\n\t\t\t}\n\t\t}\n\t\tthis.setStoneLetters();\n\t\tthis.fillStoneChars();\n\t}", "public bc m21443a(List<ba> list) {\n this.f18796b = list;\n return this;\n }", "private void buildBoats(final List<String> subNames) {\n boats = subNames.stream()\n .map(boatName -> new ShipId(boatName, side))\n .map(this::buildBoat)\n .filter(Optional::isPresent)\n .map(Optional::get)\n .collect(Collectors.toList());\n }", "void m6863a(List<Venue> list) {\n this.f5238i = list;\n }", "public void updateList()\r\n\t{\r\n\t\tclientQueue.offer(name);\r\n\t}", "private void placeBombs() {\n\t\tfor (int i = 0; i < NUM_BOMBS; i++) {\n\t\t\tplaceBomb();\n\t\t}\n\t}", "public AntigooSync(ArrayList<BlockPos> updateList) {\n this.antigooList = updateList;\n }", "public void assignBoat(Boat boat) {\n\t\tboatList.add(boat);\n\t}", "public void setAchievments(ArrayList<Achievment> arrayList) {\r\n\t\tDB db = new DB();\r\n\t\tTransaction trans = db.session.beginTransaction();\r\n\t\ttry {\r\n\t\t\tfor (Achievment achiev : arrayList)\r\n\t\t\t\tdb.session.saveOrUpdate(achiev);\r\n\t\t\ttrans.commit();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\ttrans.rollback();\r\n\t\t}\r\n\t}", "private List<Boat> playStateBoats() {\n\t\tList<Boat> output = new ArrayList<>();\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tBoat boat = this.boats.get(generator.nextInt(this.boats.size() - 1));\n\t\t\toutput.add(boat);\n\t\t\tthis.boats.remove(boat);\n\t\t}\n\t\treturn output;\n\t}", "@Override\n\tpublic void savePengdingWaybill(List<WaybillPendingEntity> pendingList) {\n\t\t\n\t}", "public void setBonusList(BonusList bonusList) {\r\n/* 372 */ this._bonusList = bonusList;\r\n/* */ }", "public void updateBiddings(SimpleList<Bidding> biddings) throws IOException {\r\n\t\tbiddingPersistence.updateBiddings(biddings);\r\n\t}", "public void updateJList() {\n list.setModel(toListModel(auctionItemList));\n }", "public void applyBrake() {\n\t\t\r\n\t}", "public void updateClientBag()\n\t{\n\t\tfor(int i = 0; i < getBag().getItems().size(); i++)\n\t\t\tupdateClientBag(i);\n\t}", "static void swap(List<CustomCharacter> list, int a, int b){\n CustomCharacter temp = getClone(list, a);\n list.set(a, list.get(b));\n list.set(b, temp);\n }", "@Override\n public void initializeBoard(List<DevelopmentCard> towersCardsList) {\n List<String> list = new ArrayList<>();\n towersCardsList.forEach((developmentCard -> list.add(developmentCard.getName())));\n try {\n if (getClientInterface() != null)\n getClientInterface().setTowersCards(list);\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending tower cards error\");\n }\n }", "private void modify(List listString){\n\t}", "public void setPlayers(ArrayList<Player> players) {\n\t\tthis.players = players;\n\t}", "public BrokersStatus(List<BrokerStatus> inBrokers)\r\n {\r\n brokers = inBrokers;\r\n }", "public void setBuisness(List<List<Seat>> buisness) {\n\t\tthis.buisness = buisness;\n\t}", "@Override\n public void updateLists(ItemList userItemList, ItemList auctionItemList) {\n this.auctionItemList = auctionItemList;\n this.userItemList = userItemList;\n updateJList();\n }", "public void setArrayList(ArrayList<Chalet> arrayList) {\n this.arrayList.addAll(arrayList);\n notifyDataSetChanged();// to update the sutats\n }", "public void updateList(List<T> ListObject) throws DaoException;", "public static void putCraftableItemInArrayList() {\n\n craftableItem.addItemToCraftableList(campfire);\n craftableItem.addItemToCraftableList(raft);\n craftableItem.addItemToCraftableList(axe);\n craftableItem.addItemToCraftableList(spear);\n }", "public void setData(List<Player> players, Player owningPlayer) {\n this.players = players;\n thisPlayer = owningPlayer;\n }", "public void setD_PlayerList(ArrayList<Player> p_PlayerList) {\n d_PlayerList = p_PlayerList;\n }", "public void addBoat(Boat b){\r\n boats.add(b);\r\n }", "public void trackBullets(){\n // bossbullet control, if it hit the bound, remove the bullet\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n tempBullet.update();\n tempBullet.drawBullet();\n // print (tempBullet.posX, tempBullet.posY,'\\n');\n if(tempBullet.detectBound()){\n bossBullets.remove(i);\n continue;\n }\n\n if(tempBullet.hitObject(Main.player) && !Main.player.invincible){\n Main.player.decreaseHealth(1);\n Main.player.posX = width / 2;\n Main.player.posY = height * 9 / 10;\n Main.player.invincible = true;\n Main.player.invincibleTime = millis();\n }\n\n }\n }", "public void playerSetFlag(List<String> playersList) {\n for (String playerId : playersList) {\n Player player = playerRepository.findBy_id(playerId);\n player.setFirst(false);\n player.setLast(false);\n playerRepository.save(player);\n }\n\n //setez First\n String idFirst = playersList.get(0);\n Player first = playerRepository.findBy_id(idFirst);\n first.setFirst(true);\n playerRepository.save(first);\n\n //setez Last\n String idLast = playersList.get(playersList.size() - 1);\n Player last = playerRepository.findBy_id(idLast);\n last.setLast(true);\n playerRepository.save(last);\n }", "public void updateBoat(List<Member> members,List<Boat> boats,Boat boat,Member member) throws WorkShopException {\n try {\n Member beforeMember = boat.getMember();\n beforeMember.removeBoat(boat);\n member.removeBoat(boat);\n member.addBoat(boat);\n boat.setMember(member);\n fileService.writeBoats(boats);\n fileService.writeMembers(members);\n \n } catch (WorkShopException e) {\n throw e;\n } catch (Exception e) {\n throw new WorkShopException(e);\n }\n }", "@Override\n public void getAllBrains(Dataholder dataholder) {\n database.getReference(gameCodeRef).child(\"Players\").addListenerForSingleValueEvent(new ValueEventListener()\n {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n ArrayList<Brain> brains = new ArrayList<>();\n for (DataSnapshot playersSnapshot : snapshot.getChildren()) {\n for (DataSnapshot brainSnapshot : playersSnapshot.getChildren()) {\n for (DataSnapshot brain2Snapshot : brainSnapshot.getChildren()){\n if (!(brain2Snapshot.getValue() instanceof String) && !(brain2Snapshot.getValue() instanceof Boolean)){\n Brain brain = brain2Snapshot.getValue(Brain.class);\n brains.add(brain);\n }\n }\n }\n }\n dataholder.setBrains(brains);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n Log.w(TAG,\"loadGamecode:onCancelled\", error.toException());\n }\n\n });\n }", "public void baptism() {\n for (Card targetCard : Battle.getInstance().getActiveAccount().getActiveCardsOnGround().values()) {\n if (targetCard instanceof Minion) {\n targetCard.setHolyBuff(2, 1);\n }\n }\n }", "public void setHand(ArrayList<Card> c){//using this to so that the controller can set the hand to whatever amount the getCard() method give--- this will all happen in the controller\n\t\thand = c;//set the arraylist of cards into the hand we created in this Player class\n\t}", "public void setPlayersListArea(String playersList) {\n this.playersListArea.setText(playersList);\n }", "ArrayList<IPlayer> buildPlayerList();", "private static void addBoatToList(Boat b) {\n\t\tboats.add(b);\n\t}", "public void updateVillagePools(){\r\n\t\tCollections.shuffle(this.marketPool);\r\n\t\tfor(int i = 0; i < this.getnVillages(); i++){\r\n\t\t\tVillage curr = this.vVillages[i];\r\n\t\t\tcurr.setMarketPool(this.marketPool);\r\n\t\t}\r\n\t}", "public void setPlayers(ArrayList<Integer> players) {\n this.players= new ArrayList<>(players);\n }", "void askLobbyID(ArrayList<Lobby> lobbies);", "public Robber() {\n\t\t// robberPlayers = (ArrayList<Player>) GSC.players.clone();\n\t}", "public void update(GameBoard gameBoard, Player link, ArrayList<Enemy> goblinsList, Arrow arrow) {\r\n assert gameBoard.getRowCount() == this.rowCount && gameBoard.getColumnCount() == this.columnCount;\r\n for (int row = 0; row < this.rowCount; row++) {\r\n for (int column = 0; column < this.columnCount; column++) {\r\n GameBoard.CellValue cellValue = gameBoard.getCellValue(row, column);\r\n if (cellValue == zelda.GameBoard.CellValue.ENEMY) {\r\n this.cellViews[row][column].setFill(new ImagePattern(southStance));\r\n //this.cellViews[row][column].setFill(Color.RED);\r\n } else if (cellValue == zelda.GameBoard.CellValue.SCRAPHEAP) {\r\n this.cellViews[row][column].setFill(new ImagePattern(new Image(\"/res/tomb.png\")));\r\n //this.cellViews[row][column].setFill(Color.BLUE);\r\n } else if (cellValue == zelda.GameBoard.CellValue.ARROW) {\r\n this.cellViews[row][column].setFill(new ImagePattern(arrow.getStance()));\r\n } else if (cellValue == zelda.GameBoard.CellValue.LINK) {\r\n this.cellViews[row][column].setFill(new ImagePattern(link.getStance()));\r\n } else {\r\n this.cellViews[row][column].setFill(Color.TRANSPARENT);\r\n }\r\n }\r\n }\r\n }", "public Auction(PropertySquare property, List<Player> players, Bank bank) {\n this.property = property;\n this.players = players;\n this.bank = bank;\n this.bids = new HashMap<>();\n\n for(Player player : players){\n this.bids.put(player, null);\n }\n }", "private void updateTurnsObjectQueue() {\n while(!playersTurns.isEmpty())\n playersTurns.poll();\n loadPlayersIntoQueueOfTurns();\n }", "public void setStocksAtHome(List<String> stockList){\n HashSet<String> hashSet = new HashSet<String>(stockList);\n List<String> stocksAtHome = getStocksAtHome();\n hashSet.addAll(stocksAtHome);\n\n //To proceed with easy storage\n stockList = new ArrayList<String>(hashSet);\n\n Gson gson = new GsonBuilder().create();\n String gsonStockList = gson.toJson(stockList);\n editor.putString(STOCK_HOME_SET, gsonStockList);\n editor.commit();\n }", "private static void assignBankAccounts() {\n\t\tfor (Customer customer : customerList) {\n\t\t\t//make sure customer has no current accounts before adding serialized accounts\n\t\t\tcustomer.clearAccounts();\n\t\t\t\n\t\t\tfor (BankAccount account : accountList) {\n\t\t\t\tif (account.getCustomer().getUsername().equals(customer.getUsername())) {\n\t\t\t\t\tcustomer.addAccount(account);\n\t\t\t\t} else if (account.getJointCustomer() != null\n\t\t\t\t\t\t&& account.getJointCustomer().getUsername().equals(customer.getUsername()))\n\t\t\t\t\tcustomer.addAccount(account);\n\t\t\t}\n\t\t}\n\t}", "public void updatePosition(List<CollisionObject> collidables) {\n double start = 0;\n // If the boat does not need to regenerate stamina, then they accelerate\n if (!regen) {\n this.accelerate();\n // When stamina gets low, regen is set to true, meaning the boat will regenerate stamina\n if (stamina <= 0.2) {\n regen = true;\n }\n } else {\n //We calculate a random number here so that we can add some variety\n //to the AI boat's behaviour\n while (start <= 0.3 ) {\n start = Math.random();\n }\n if (stamina >= start ) {\n regen = false;\n }\n }\n this.check_turn(collidables);\n super.updatePosition();\n\n }", "@Override\r\n\tpublic void update(List<GroupMember> list) {\n\t\tif(list == null) return;\r\n\t\tfor(int i=0;i<list.size();i++)\r\n\t\t\tupdate(list.get(i));\r\n\t}", "public SafetyPile(ArrayList<Card> list){\r\n super();\r\n this.cards.addAll(list);\r\n }", "void mo29842a(IObjectWrapper iObjectWrapper, zzatk zzatk, List<String> list) throws RemoteException;", "@Override\n\tpublic void saveLocal(ArrayList<Brick> bmBricks, ArrayList<Ball> balls, ArrayList<PowerUp> powUps,\n\t\t\tArrayList<Alien> aliens, Player p, Paddle pad, String username) {\n\t\t\n\t}", "private void initItems() {\n\t\t// clouds\n\t\tclouds = new ArrayList<Cloud>();\n\t\tfor (int i = 0; i < CLOUDS_NUMBER; i++) {\n\t\t\tswitch (i) {\n\t\t\tcase 1:\n\t\t\t\tCloud cloud = new Cloud(20, 400);\n\t\t\t\tcloud.isRight = false;\n\t\t\t\tcloud.velocity.set(Cloud.CLOUD_MAX_VELOCITY, 0);\n\t\t\t\tclouds.add(cloud);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tcloud = new Cloud(800, 300);\n\t\t\t\tcloud.isRight = false;\n\t\t\t\tcloud.velocity.set(Cloud.CLOUD_MAX_VELOCITY, 0);\n\t\t\t\tclouds.add(cloud);\n\t\t\tcase 3:\n\t\t\t\tcloud = new Cloud(800, 200);\n\t\t\t\tcloud.isRight = true;\n\t\t\t\tcloud.velocity.set(-Cloud.CLOUD_MAX_VELOCITY / 2, 0);\n\t\t\t\tclouds.add(cloud);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// bats\n\t\tbats = new ArrayList<Bat>();\n\t\tfor (int i = 0; i < BATS_NUMBER; i++) {\n\t\t\tswitch (i) {\n\t\t\tcase 1:\n\t\t\t\tBat bat = new Bat(410, 400, Assets.BatRegion.getRegionWidth() / 3.4f,\n\t\t\t\t\t\tAssets.BatRegion.getRegionHeight() / 3.4f);\n\t\t\t\tbat.isRight = false;\n\t\t\t\tbat.angle = 0f;\n\t\t\t\tbat.fixAngle = 0f;\n\t\t\t\tbat.interval = 16;\n\t\t\t\tbats.add(bat);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tbat = new Bat(100, 250, Assets.BatRegion.getRegionWidth() / 5.0f,\n\t\t\t\t\t\tAssets.BatRegion.getRegionHeight() / 5.0f);\n\t\t\t\tbat.isRight = false;\n\t\t\t\tbat.angle = 0f;\n\t\t\t\tbat.fixAngle = 0f;\n\t\t\t\tbat.interval = 16;\n\t\t\t\tbats.add(bat);\n\t\t\tcase 3:\n\t\t\t\tbat = new Bat(700, 140, Assets.BatRegion.getRegionWidth() / 2.4f,\n\t\t\t\t\t\tAssets.BatRegion.getRegionHeight() / 2.4f);\n\t\t\t\tbat.isRight = false;\n\t\t\t\tbat.angle = 360f - 20f;\n\t\t\t\tbat.fixAngle = 360f - 20f;\n\t\t\t\tbat.interval = 16;\n\t\t\t\tbats.add(bat);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private void buildBoatsInOrder(List<Boat> boats) {\n List<Boat> newList = new ArrayList<>(boats);\n newList.add(player);\n boatsInOrder = new ArrayList<>();\n while (!newList.isEmpty()) {\n Boat highest = null;\n for (Boat boat:newList) {\n\n if (highest == null) {\n highest = boat;\n }else if (boat.getCumulativeLegTime() < highest.getCumulativeLegTime()) {\n highest = boat;\n }\n }\n boatsInOrder.add(boatsInOrder.size(),highest);\n newList.remove(highest);\n }\n }", "public void addPlayers(ArrayList<Player> players) {\r\n\t\tthis.players = players;\r\n\t}", "private void setParkCombo(ArrayList<String> parkList) {\n\t\tlist = FXCollections.observableArrayList(parkList);\n\t\tparkNameCombo.setItems(list);\n\t}" ]
[ "0.65133876", "0.58506536", "0.58499163", "0.5844934", "0.58153224", "0.57061976", "0.56618124", "0.5631095", "0.5593717", "0.55331236", "0.54927397", "0.54896283", "0.54783815", "0.5474074", "0.5471707", "0.5466119", "0.5457933", "0.54514664", "0.541447", "0.5400595", "0.53922325", "0.5390699", "0.5381385", "0.5369633", "0.53673655", "0.53583705", "0.53549325", "0.5352637", "0.5339411", "0.5331799", "0.53181374", "0.5311213", "0.5310974", "0.529229", "0.52413887", "0.5238069", "0.52129126", "0.52128285", "0.5208025", "0.51982427", "0.519291", "0.5172609", "0.5171052", "0.51690215", "0.5154555", "0.5139612", "0.5132576", "0.5128164", "0.5126295", "0.51262814", "0.51223356", "0.512021", "0.51196873", "0.511711", "0.5104914", "0.5101799", "0.50909567", "0.50861555", "0.50810444", "0.5067715", "0.506762", "0.5066878", "0.5060626", "0.50502807", "0.5049662", "0.50425476", "0.5036996", "0.5024847", "0.50213164", "0.5012054", "0.49999073", "0.4997867", "0.49977916", "0.49968785", "0.49962464", "0.4994859", "0.4990658", "0.49822176", "0.49687874", "0.4963714", "0.4952943", "0.4951702", "0.49505073", "0.49439374", "0.4939389", "0.49357682", "0.49299166", "0.49284324", "0.49229822", "0.49203613", "0.49137196", "0.4904119", "0.49039072", "0.4900815", "0.4893184", "0.48809764", "0.48796538", "0.48733288", "0.4869751", "0.48659882" ]
0.7500451
0
Gets all the brains saved in the database for the game, and saves them in a dataholder class.
@Override public void getAllBrains(Dataholder dataholder) { database.getReference(gameCodeRef).child("Players").addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot snapshot) { ArrayList<Brain> brains = new ArrayList<>(); for (DataSnapshot playersSnapshot : snapshot.getChildren()) { for (DataSnapshot brainSnapshot : playersSnapshot.getChildren()) { for (DataSnapshot brain2Snapshot : brainSnapshot.getChildren()){ if (!(brain2Snapshot.getValue() instanceof String) && !(brain2Snapshot.getValue() instanceof Boolean)){ Brain brain = brain2Snapshot.getValue(Brain.class); brains.add(brain); } } } } dataholder.setBrains(brains); } @Override public void onCancelled(@NonNull DatabaseError error) { Log.w(TAG,"loadGamecode:onCancelled", error.toException()); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<Besoin> getAllBesion() {\n\t\treturn dao.getAllBesion();\n\t}", "public void saveBorrowings() {\n\t}", "@Override\r\n\tpublic List<Buss> findbid() {\n\t\treturn dao.findbid();\r\n\t}", "public ArrayList<Bike> getAllAvailableBikes() {\n bikelist = new ArrayList<>();\n \n try(Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(ALL_AVAILABLE_BIKES);\n ResultSet rs = ps.executeQuery()){\n \n while(rs.next()){\n Bike bike = getBikeFromRS(rs);\n bikelist.add(bike);\n }\n \n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n }\n return bikelist;\n }", "public static void saveBidData() {\r\n\t\tMain.player1Bid = FrameUtils.player1Bid.getSelectedItem();\r\n\t\tMain.player2Bid = FrameUtils.player2Bid.getSelectedItem();\r\n\t\tMain.player3Bid = FrameUtils.player3Bid.getSelectedItem();\r\n\t\t\r\n\t\t//Saves the bid data if playing with four players.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tMain.player4Bid = FrameUtils.player4Bid.getSelectedItem();\r\n\t\t}\r\n\t}", "public List<Boat> getBoats() { return this.boatList; }", "public void playDB(){\n\t\tboolean emptyPot = false;\n\t\tint points = myPC.count(myPC.createWords(myField.getTiles(), myField.getNewWords()), myField.getTiles(), myField.getNewWords().size());\n\t\tint turn = DBCommunicator.requestInt(\"SELECT id FROM beurt WHERE spel_id = \" + id + \" AND account_naam = '\" + app.getCurrentAccount().getUsername() + \"' ORDER BY id DESC\");\n\t\tturn += 2;\n\t\t\n\t\tDBCommunicator.writeData(\"INSERT INTO beurt (id, spel_id, account_naam, score, aktie_type) VALUES (\" + turn + \", \" + id + \", '\" + app.getCurrentAccount().getUsername() + \"', \" + points + \", 'Word')\");\n\t\t\n\t\tHashMap<String, GameStone> newWords = myField.getNewWords();\n\t\tSystem.out.println(newWords);\n\t\tArrayList<Integer> addedInts = new ArrayList<Integer>();\n\t\t\n\t\tfor(Entry<String, GameStone> word : newWords.entrySet()){\n\t\t\tSystem.out.println(word.getKey());\n\t\t\tString key = word.getKey();\n\t\t\tint x = 0;\n\t\t\tint y = 0;\n\t\t\t\n\t\t\tString[] cords = key.split(\",\");\n\t\t\tx = Integer.parseInt(cords[0]);\n\t\t\ty = Integer.parseInt(cords[1]);\n\t\t\t\n\t\t\t\n\t\t\tint stoneID = word.getValue().getID();\n\t\t\tSystem.out.println(stoneID);\n\t\t\tString character = DBCommunicator.requestData(\"SELECT letterType_karakter FROM letter WHERE id = \" + stoneID + \" AND spel_id = \" + id);\n\t\t\tSystem.out.println(character);\n\t\t\tif(!character.equals(\"?\")){\n\t\t\t\tDBCommunicator.writeData(\"INSERT INTO gelegdeletter (letter_id, spel_id, beurt_id, tegel_x, tegel_y, tegel_bord_naam, blancoletterkarakter)\"\n\t\t\t\t\t\t+ \" VALUES(\" + stoneID + \", \" + id + \", \" + turn + \", \" + x + \", \" + y + \", 'Standard', NULL)\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tDBCommunicator.writeData(\"INSERT INTO gelegdeletter (letter_id, spel_id, beurt_id, tegel_x, tegel_y, tegel_bord_naam, blancoletterkarakter)\"\n\t\t\t\t\t\t+ \" VALUES(\" + stoneID + \", \" + id + \", \" + turn + \", \" + x + \", \" + y + \", 'Standard', '\" + word.getValue().getLetter() + \"')\");\n\t\t\t}\n\t\t\t\n\t\t\tfor(int e = 0; e < gameStones.size(); e++){\n\t\t\t\tif(gameStones.get(e) == stoneID){\n\t\t\t\t\t\n\t\t\t\t\tint potSize = DBCommunicator.requestInt(\"SELECT COUNT(letter_id) FROM pot WHERE spel_id = \" + id);\n\t\t\t\t\tif(potSize != 0){\n\t\t\t\t\t\tboolean added = false;\n\t\t\t\t\t\twhile(!added){\n\t\t\t\t\t\t\tint letterID = (int) (Math.random() * 105);\n\t\t\t\t\t\t\tSystem.out.println(letterID);\n\t\t\t\t\t\t\tString randCharacter = DBCommunicator.requestData(\"SELECT karakter FROM pot WHERE spel_id = \" + id + \" AND letter_id = \" + letterID);\n\t\t\t\t\t\t\tif(randCharacter != null){\n\t\t\t\t\t\t\t\tboolean inStones = false;\n\t\t\t\t\t\t\t\tfor(int a = 0; a < gameStones.size(); a++){\n\t\t\t\t\t\t\t\t\tSystem.out.println(gameStones.get(a));\n\t\t\t\t\t\t\t\t\tif(gameStones.get(a) == letterID){\n\t\t\t\t\t\t\t\t\t\tinStones = true;\n\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\tif(!inStones){\n\t\t\t\t\t\t\t\t\tgameStones.set(e,letterID);\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"PLACE \"+ id +\" \"+ letterID +\" \"+ turn);\n\t\t\t\t\t\t\t\t\tDBCommunicator.writeData(\"INSERT INTO letterbakjeletter (spel_id, letter_id, beurt_id) VALUES (\" + id + \", \" + letterID + \", \" + turn + \")\");\n\t\t\t\t\t\t\t\t\taddedInts.add(letterID);\n\t\t\t\t\t\t\t\t\tadded = true;\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\telse{\n\t\t\t\t\t\temptyPot = true;\n\t\t\t\t\t\tgameStones.remove(e);\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}\n\t\t\n\t\tArrayList<Integer> nonAddedInts = new ArrayList<Integer>();\n\t\tfor(int e : gameStones){\n\t\t\tnonAddedInts.add(e);\n\t\t}\n\t\t\n\t\tfor(int a : addedInts){\n\t\t\tfor(int e = 0; e < nonAddedInts.size(); e++){\n\t\t\t\tif(a == nonAddedInts.get(e)){\n\t\t\t\t\tnonAddedInts.remove(e);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int e : nonAddedInts){\n\t\t\tSystem.out.println(\"PLACE \"+ id +\" \"+ e +\" \"+ turn);\n\t\t\tDBCommunicator.writeData(\"INSERT INTO letterbakjeletter (spel_id, letter_id, beurt_id) VALUES (\" + id + \", \" + e + \", \" + turn + \")\");\n\t\t}\n\t\t\t\t\n\t\tif(emptyPot && (gameStones.size() == 0)){\n\t\t\tDBCommunicator.writeData(\"UPDATE spel SET toestand_type = 'Finished' WHERE id = \" + id );\n\t\t\tendGame(true);\n\t\t}\n\t\telse{\n\t\t\tthis.setStoneLetters();\n\t\t\tthis.fillStoneChars();\n\t\t}\n\t}", "public ArrayList<Bike> getAllBikes (){\n bikelist = new ArrayList<>();\n \n try(\n Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(ALL_BIKES);\n ResultSet rs = ps.executeQuery()){\n \n while(rs.next()){\n \n \tBike bike = getBikeFromRS(rs);\n bikelist.add(bike);\n }\n \n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n }\n return bikelist;\n }", "public ArrayList<Bike> getAllBikes(int dockingStationId){ //All bikes currently in the selected docking station\n ArrayList<Bike> BList = new ArrayList<>();\n\n try(Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(BIKES_AT_STATION + dockingStationId);\n ResultSet rs = ps.executeQuery()){\n \n while(rs.next()){\n Bike bike = getBikeFromRS(rs);\n BList.add(bike);\n }\n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n }\n return BList;\n }", "public List<Bank> findAllBanks() {\n return em.createNamedQuery(\"Bank.findAll\").getResultList();\n\n }", "public List<Brands> LoadAllBrands() {\n Brands brands = null;\n List<Brands> brandsList = new ArrayList<>();\n try {\n Connection connection = DBConnection.getConnectionToDatabase();\n // String sql = \"SELECT * FROM `humusam_root`.`Users` WHERE UserEmail=\" + email;\n String sql = \"SELECT * FROM `brands`\";\n Statement statment = connection.createStatement();\n ResultSet set = statment.executeQuery(sql);\n ListBrands(brandsList, set);\n } catch (SQLException exception) {\n System.out.println(\"sqlException in Application in LoadAllBrands Section : \" + exception);\n exception.printStackTrace();\n }\n\n return brandsList;\n }", "private void buildBoats() {\n\t\tboats.add(new Boat(\"red\"));\n\t\tboats.add(new Boat(\"pink\"));\n\t\tboats.add(new Boat(\"blue\"));\n\t\tboats.add(new Boat(\"yellow\"));\n\t\tboats.add(new Boat(\"orange\"));\n\t\tboats.add(new Boat(\"green\"));\n\t\tboats.add(new Boat(\"purple\"));\n\t}", "public SimpleList<Bidding> getBiddingsList() throws IOException{\r\n\t\treturn biddingPersistence.getAllBiddings();\r\n\t}", "public Map<Integer, BankClient> getBankDatabase() {\n return bankDatabase;\n }", "public Map<Integer, Lobby> getLobbys()\r\n\t{\r\n\t\treturn getInstanceMap(\"lobbys\", new HashMap<Integer, Lobby>());\r\n\t}", "public List<MLocoBoggie> getboogie() {\n\t\t\t\tList<MLocoBoggie> getboogies = new ArrayList<>();\n\t\t\t\tobj_boogierepo.findAll()\n\t\t\t\t.forEach(getboogies::add);\n\n\t\t\t\treturn getboogies;\t\t\t\t\n\t\t\t\t\t\t}", "ArrayList<Bet> selectPlayingBetsOfAccount(Account account) throws DAOException;", "ArrayList<Bet> selectLostBetsOfAccount(Account account) throws DAOException;", "public ArrayList<Billing> getBillings() \n\t{\n\t\treturn billings;\n\t}", "private List<Boat> playStateBoats() {\n\t\tList<Boat> output = new ArrayList<>();\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tBoat boat = this.boats.get(generator.nextInt(this.boats.size() - 1));\n\t\t\toutput.add(boat);\n\t\t\tthis.boats.remove(boat);\n\t\t}\n\t\treturn output;\n\t}", "ArrayList<Bet> selectWonBetsOfAccount(Account account) throws DAOException;", "List<WayBill> getAllWayBill();", "Databank getBank();", "public ArrayList<Bot> getAllBots() {\n final String errorMessage = \"Error getting all bots\";\n ResultSet retrievedBots = dbConnector.selectQuery(\"SELECT c.name, bot_id, active_time, probability, activity_status\" +\n \" FROM Bots as b, Company as c WHERE b.company_id = c.company_id;\");\n ArrayList<Bot> bots = null;\n try {\n bots = new ArrayList<Bot>();\n while (retrievedBots.next()) {\n bots.add(toBot(retrievedBots));\n }\n } catch (SQLException e) {\n System.out.println(errorMessage);\n }\n return bots;\n }", "public List<Bloques> getDataListBloques() {\n\t\tif(dataListBloques == null){\n\t\t\tdataListBloques = new ArrayList<Bloques>();\n\t\t\tdataListBloques = bloquesFacade.findByLike(\"SELECT B FROM Bloques B ORDER BY B.nombre\");\n\t\t}\n\t\treturn dataListBloques;\n\t}", "Collection<BuildingBlock> findAllBuildingBlocks() throws BusinessException;", "public List<BbanStructureDTO> getBbanStructures() {\n return bbanStructures;\n }", "public ArrayList<Cell> findPlacesToGiveBirth() {\r\n\r\n // Randomly choose the number of babies.\r\n int numOfBabyToBeBorn = new Random().nextInt(this.numOfBaby()) + 1;\r\n\r\n ArrayList<Cell> newEmpty = this.getNeighbours(1);\r\n Collections.shuffle(newEmpty);\r\n\r\n ArrayList<Cell> placeToBeBorn = new ArrayList<Cell>();\r\n\r\n int countEmptyCell = 0;\r\n\r\n for (int findEmpt = 0; findEmpt < newEmpty.size()\r\n && countEmptyCell < numOfBabyToBeBorn; findEmpt++, countEmptyCell++) {\r\n if (newEmpty.get(findEmpt).getInhabit() == null \r\n && isTerrainAccessiable(newEmpty.get(findEmpt))) {\r\n placeToBeBorn.add(newEmpty.get(findEmpt));\r\n }\r\n }\r\n return placeToBeBorn;\r\n }", "private void placeBombs() {\n\t\tfor (int i = 0; i < NUM_BOMBS; i++) {\n\t\t\tplaceBomb();\n\t\t}\n\t}", "public List<Bill> findAllBill() {\n\treturn iBillRespository.findAll();\n}", "public List<Bank> findAll() {\n return em.createQuery(\"SELECT b FROM Bank b\").getResultList();\n }", "@Override\n public void saveChildrenData() {\n boats.forEach(boatDAO::save);\n }", "private void pullBikes() {\n try {\n if (!connected) {\n this.reconnectSupplier();\n }\n\n synchronized (this.writeLock) {\n if (!this.dataVersion.equals(supplier.getDataVersion())) {\n DataPatch<ArrayList<Bike>> dataPatch = supplier.getNewBikes(dataVersion);\n for (Bike bike : dataPatch.getData()) {\n cache.put(bike.getItemNumber(), bike);\n }\n dataVersion = dataPatch.getDataVersion();\n }\n }\n } catch (RemoteException e) {\n System.out.println(\"Cannot load new bikes from supplier, keep using cached data\");\n e.printStackTrace();\n connected = false; // connection lost so remove reference to supplier, reacquire later\n }\n }", "ArrayList<Bet> selectBetsOfCurrency(String currency) throws DAOException;", "protected static List<Critter> getBabies() {\n return babies;\n }", "public ArrayList<BikeData> getAllBikeData (Bike bike){\n ArrayList<BikeData> datalist = new ArrayList<>();\n \n try(\n Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(BIKE_DATA_1 + bike.getBikeId() + BIKE_DATA_2);\n ResultSet rs = ps.executeQuery()){\n \n while(rs.next()){\n int bikeId = rs.getInt(cBikeID);\n LocalDateTime dateTime = rs.getTimestamp(cDateTime).toLocalDateTime();\n double latitude = rs.getDouble(cLatitude);\n double longitude = rs.getDouble(cLongitude);\n double chargingLevel = rs.getDouble(cChargingLevel);\n \n BikeData bd = new BikeData(bikeId, dateTime, latitude, longitude, chargingLevel);\n datalist.add(bd);\n }\n \n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n }\n return datalist;\n }", "public ImmutableList<B> getBidders() {\n return this.bidders;\n }", "private void saveBattles(Battle[] battles) {\n\t\t// System.out.println(\"saving battles\" + battles.length);\n\t\t\n\t\tfor ( Battle battle : battles ) {\n\t\t\n\t\t\t// filter battles, only keep \n\t\t\tGameMode mode = battle.getMode().getName();\n\t\t\t\n\t\t\tString type = null;\n\t\t\tif ( mode == GameMode.Ladder || mode == GameMode.Challenge ) {\n\t\t\t\ttype = mode.name();\n\t\t\t}\n\t\t\t/*else if ( mode == GameMode.Showdown_Ladder && \"clanWarWarDay\".equals(battle.getType())) {\n\t\t\t\ttype = \"clanWarWarDay\";\n\t\t\t}*/\n\t\t\t\n\t\t\tif (type != null ) {\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tif ( !headerWritten) {\n\t\t\t\t\t\tbw.write(battle.toCsvHeader(\"^\"));\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\theaderWritten = true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbw.write(battle.toCsv(\"^\", type));\n\t\t\t\t\tbw.newLine();\n\t\t\t\t} catch (IOException 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\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(mode + \" \" +battle.getType());\n\t\t\t\n\t\t\t\n\t\t\t// add new players..\n\t\t\tList<Player> players = battle.getOpponent();\n\t\t\t\n\t\t\tfor ( Player player : players) {\n\t\t\t\tif (!donePlayers.containsKey(player.getTag()) ) {\n\t\t\t\t\tPlayerId playerId = new PlayerId(player.getTag(), player.getName());\n\t\t\t\t\twaitingPlayers.add(playerId);\n\t\t\t\t\tdonePlayers.put(player.getTag(), playerId);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tbw.flush();\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\n\t\t}\n\t}", "private void insertBoger() {\r\n\t\tEmne emne;\r\n\t\tBog bog;\r\n\t\tForfatter forfatter;\r\n\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-1\", emne, 2001,1);\r\n\t\tforfatter = _database.getForfatter().get(0);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-1\", emne, 2001,2);\r\n\t\tforfatter = _database.getForfatter().get(0);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-2\", emne, 2002,1);\r\n\t\tforfatter = _database.getForfatter().get(1);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t\temne = _database.getEmne().get(1);\r\n\t\tbog = new BogEksemplar(\"Titel-3\", emne, 2003,1);\r\n\t\tforfatter = _database.getForfatter().get(1);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-4\", emne, 2001,1);\r\n\t\tforfatter = _database.getForfatter().get(2);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t}", "@Override\n public List<BloodBank> findAll() {\n return findResults( \"BloodBank.findAll\", null );\n }", "public DataBank getDataBank() {\n return dataBank;\n }", "public ArrayList load() {\n File savefile = new File(\"bookings.txt\");\r\n try {\r\n if (savefile.createNewFile()) {\r\n System.out.println(\"Save file doesnt exist, creating...\");\r\n\r\n try {\r\n FileWriter writer = new FileWriter(savefile);\r\n\r\n for (int x = 0; x <= 89; x = x + 1) {\r\n String stringbuild = (x + \",false,none\");\r\n writer.write(stringbuild + \"\\n\");\r\n }\r\n writer.flush();\r\n writer.close();\r\n } catch (IOException ex) {\r\n Logger.getLogger(ParseBookings.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n } else {\r\n System.out.println(\"Save file exists. Will load...\");\r\n }\r\n } catch (IOException ex) {\r\n Logger.getLogger(ParseBookings.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n System.out.println(\"Loading Started...\");\r\n\r\n ArrayList Seats = new ArrayList();\r\n ArrayList Seats_Bronze = new ArrayList();\r\n ArrayList Seats_Silver = new ArrayList();\r\n ArrayList Seats_Gold = new ArrayList();\r\n\r\n try {\r\n File file = new File(\"bookings.txt\");\r\n FileReader filereader = new FileReader(file);\r\n BufferedReader bufferedreader = new BufferedReader(filereader);\r\n\r\n String buffer;\r\n while ((buffer = bufferedreader.readLine()) != null) {\r\n String[] buffersplit = buffer.split(\",\", -1);\r\n int index = Integer.parseInt(buffersplit[0]);\r\n if (index < 30) {\r\n //System.out.println(\"Bronze @ \"+index);\r\n\r\n Seat_Bronze bseat_ = new Seat_Bronze();\r\n bseat_.setID(index);\r\n bseat_.setBooked(Boolean.parseBoolean(buffersplit[1]), buffersplit[2]);\r\n Seats_Bronze.add(bseat_);\r\n\r\n } else if (59 >= index && index > 29) {\r\n //System.out.println(\"Silver @ \"+index);\r\n\r\n Seat_Silver sseat_ = new Seat_Silver();\r\n sseat_.setID(index);\r\n sseat_.setBooked(Boolean.parseBoolean(buffersplit[1]), buffersplit[2]);\r\n Seats_Silver.add(sseat_);\r\n\r\n } else {\r\n //System.out.println(\"Gold @\"+index);\r\n\r\n Seat_Gold gseat_ = new Seat_Gold();\r\n gseat_.setID(index);\r\n gseat_.setBooked(Boolean.parseBoolean(buffersplit[1]), buffersplit[2]);\r\n Seats_Gold.add(gseat_);\r\n\r\n }\r\n\r\n }\r\n\r\n Seats.add(Seats_Bronze);\r\n Seats.add(Seats_Silver);\r\n Seats.add(Seats_Gold);\r\n System.out.println(\"Loading Complete.\");\r\n System.out.println(\"Loaded B/S/G: \" + Seats_Bronze.size() + \"/\" + Seats_Silver.size() + \"/\" + Seats_Gold.size());\r\n\r\n return Seats;\r\n\r\n } catch (FileNotFoundException ex) {\r\n Logger.getLogger(ParseBookings.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(ParseBookings.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return null;\r\n }", "public ArrayList<GenericHunt> getCurrentHunts(){\n SQLiteDatabase db = this.getReadableDatabase();\n ArrayList<GenericHunt> hunts = new ArrayList<GenericHunt>();\n Cursor cursor = db.rawQuery(AppConstants.SELECT_ALL_HUNTS, null);\n\n if(cursor.moveToFirst()){\n do {\n GenericHunt hunt = new GenericHunt();\n hunt.setQuery(cursor.getString(cursor.getColumnIndex(AppConstants.QUERYNAME)));\n hunt.setPriceMin(cursor.getDouble(cursor.getColumnIndex(AppConstants.PRICEMIN)));\n hunt.setPriceMax(cursor.getDouble(cursor.getColumnIndex(AppConstants.PRICEMAX)));\n //TODO - Store lists in db as JSON objects\n String webs = cursor.getString(cursor.getColumnIndex(AppConstants.WEBSITESTRING));\n hunt.setWebsite(webs);\n String locs = cursor.getString(cursor.getColumnIndex(AppConstants.COUNTRIESTRING));\n hunt.setLocation(locs);\n hunt.setSearchType(cursor.getInt(cursor.getColumnIndex(AppConstants.SEARCHTYPE)) != 0);\n hunt.setHuntFrequency(cursor.getLong(cursor.getColumnIndex(AppConstants.HUNTFREQUENCY)));\n hunt.setNotificationType(cursor.getInt(cursor.getColumnIndex(AppConstants.NOTIFICATIONTYPE)) != 0);\n hunt.setHuntConnectionType(cursor.getInt(cursor.getColumnIndex(AppConstants.HUNTCONNECTIONTYPE)) != 0);\n //String huntKey = cursor.getString(cursor.getColumnIndex(AppConstants.LISTINGKEY));\n //TODO - Call sql using FK here to get all listings in Listings table with same FK. Set to listings arraylist\n\n hunts.add(hunt);\n }\n while (cursor.moveToNext());\n }\n cursor.close();\n return hunts;\n }", "private ArrayList<Boat> createLoadedBoats(LoadedMap map)\n throws BadMapException{\n ArrayList<Boat> boats = new ArrayList<>();\n boolean parsingBoat = false;\n int length = 0;\n int boatId = 1;\n ArrayList<int[]> coordinates = new ArrayList<>();\n\n for (int line = 0; line < map.getInterMatrix().length; line++) {\n for (int column = 0; column < map.getInterMatrix()[line].length; column++) {\n if (wrongPositioning(column, line, map)){\n throw new BadMapException(\"Bad boat positioning\");\n } if ((!parsingBoat)&& map.getInterMatrix()[line][column].equals(\"X\")) {\n parsingBoat = true;\n coordinates = new ArrayList<>();\n length = 1;\n int[] pos = {column, line};\n coordinates.add(pos);\n\n } else if (parsingBoat && (!map.getInterMatrix()[line][column].equals(\"X\"))) {\n //END OF HORIZONTAL PARSING OF X (BOAT)\n if (length == 1) {\n //EITHER A vertical boat, or a 1x1 boat\n boatId = checkForVerticalBoat(coordinates, boatId, map, boats);\n\n } else {\n Boat b = new Boat(length, boatId, coordinates);\n boats.add(b);\n boatId += 1;\n }\n parsingBoat = false;\n } else if (parsingBoat && map.getInterMatrix()[line][column].equals(\"X\")) {\n //next horizontal in row is an X\n length += 1;\n int[] tile = {column, line};\n coordinates.add(tile);\n }\n }\n }\n return boats;\n }", "private Battle[] getNewBattles(int playerCount){\n\t\t\n\t\tList<PlayerId> players = new ArrayList<>();\n\t\t\n\t\tString playerStr = \"\";\n\t\t\n\t\t// FIXME list check size\n\t\tfor ( int idx = 0; idx < playerCount; idx++) {\n\t\t\tPlayerId playerId = waitingPlayers.removeLast();\n\t\t\tplayers.add(playerId);\n\t\t\tif ( idx != 0 ) {\n\t\t\t\tplayerStr += \",\";\n\t\t\t}\n\t\t\tplayerStr += playerId.getTag();\n\t\t}\n\t\t\n\t\t\n\t\t// add player to done\n\t\t/*for ( PlayerId player : players) {\n\t\t\tdonePlayers.put(player.getTag(), player);\n\t\t}*/\n\t\t\n\t\ttry {\n\t\t\tBattle[] battles = QueryBuilder.selectPlayerBattles(playerStr ).execute();\n\t\t\treturn battles;\n\t\t} \n\t\tcatch (CrServiceException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t\t// Error occurs in query\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"Error sleep a little ...\");\n\t\t\t\tThread.sleep(2000);\n\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\treturn new Battle[] {};\n\t\t}\n\t\t\n\t}", "List<BInformation> findAll();", "public List<AccesorioBicicletaEntity> getAccesorioBici() {\r\n LOGGER.info(\"Inicia proceso de consultar todas las Bicicletaes\");\r\n // Note que, por medio de la inyección de dependencias se llama al método \"findAll()\" que se encuentra en la persistencia.\r\n List<AccesorioBicicletaEntity> acc = persistence.findAll();\r\n LOGGER.info(\"Termina proceso de consultar todas las Bicicletaes\");\r\n return acc;\r\n }", "public Boat getBoat(int i) {\n\t\treturn boatList.get(i);\n\t}", "public void fillBombs()\r\n {\r\n for (int i = 0; i < gameBoard.BOMB_COUNT; i++)\r\n {\r\n Cell tempCell = new Cell(true);\r\n tempCell.makeBomb();\r\n initBombClick(tempCell);\r\n gameBoard.bombList.add(tempCell);\r\n }\r\n for (int j = gameBoard.BOMB_COUNT; j < (gameBoard.BOARD_WIDTH * gameBoard.BOARD_WIDTH); j++)\r\n {\r\n Cell tempCell = new Cell(false);\r\n initEmptyClick(tempCell);\r\n gameBoard.bombList.add(tempCell);\r\n }\r\n Collections.shuffle(gameBoard.bombList);\r\n }", "protected static List<Critter> getBabies() {\n\t\t\treturn babies;\n\t\t}", "protected static List<Critter> getBabies() {\n\t\t\treturn babies;\n\t\t}", "public final List<HeroBean> getBannersList() {\r\n return bannersList;\r\n }", "public List<Boek> alleBoekenLijst () {\n return em.createNamedQuery(\"BoekEntity.zoekAllen\", Boek.class).getResultList();\n //return em.createQuery(\"SELECT b FROM Book b\", Book.class).getResultList();\n }", "public List<BidListModel> getAllBids() {\n return bidListRep.findAll();\n }", "ArrayList<Bet> takeBets(ResultSet set) throws SQLException;", "public BowlingGame getGame();", "public void getAll() {\n\n PokeStubDTOWrapper wrappedPokemonStubs = restTemplate.getForObject(\"https://pokeapi.co/api/v2/pokemon?limit=1118\", PokeStubDTOWrapper.class);\n List<PokeStubDTO> pokemonStubList = wrappedPokemonStubs.getDTOs();\n\n for (PokeStubDTO pokeStub: pokemonStubList) {\n PokeDTO pokeDTO = restTemplate.getForObject(pokeStub.getUrl(), PokeDTO.class);\n\n Optional<Pokemon> pokemonInDB = pokemonRepository.findByName(pokeDTO.getName());\n\n if(pokemonInDB.isEmpty()){\n savePokemon(pokeDTO);\n System.out.println(\"saved: \" + pokeDTO.getName());\n\n } else {\n System.out.println(pokeDTO.getName()+ \" already exists in DB\");\n }\n }\n }", "private void preloadDb() {\n String[] branches = getResources().getStringArray(R.array.branches);\n //Insertion from xml\n for (String b : branches)\n {\n dataSource.getTherapyBranchTable().insertTherapyBranch(b);\n }\n String[] illnesses = getResources().getStringArray(R.array.illnesses);\n for (String i : illnesses)\n {\n dataSource.getIllnessTable().insertIllness(i);\n }\n String[] drugs = getResources().getStringArray(R.array.drugs);\n for (String d : drugs)\n {\n dataSource.getDrugTable().insertDrug(d);\n }\n }", "public List<Building> getBoardBuildings() {\n return mPersonalBoardCards.getBoardBuildings();\n }", "public List<List<Seat>> getBuisness() {\n\t\treturn buisness;\n\t}", "static void populateDB() {\n initializeJSON();\n JSONArray thisArray = new JSONArray(getRateString());\n JSONObject desiredObject = thisArray.getJSONObject(0);\n Iterator<String> keyList = desiredObject.keys();\n\n CurrencyInterface dbConn = new DatabaseConnection();\n while (keyList.hasNext()) {\n String abbrev = keyList.next().toString();\n Object actualRates = desiredObject.get(abbrev);\n String actualRateStr = actualRates.toString();\n double rate = Double.parseDouble(actualRateStr);\n rate = 1/rate;\n // ^ actualRates produces an Integer object, can't cast directly to a Double\n // Also inverting value since values are given as USD/x where my calculations are x/USD.\n dbConn.saveCurrency(new Currency(abbrev, rate));\n }\n }", "List<Bill> all() throws SQLException;", "private void initItems() {\n\t\t// clouds\n\t\tclouds = new ArrayList<Cloud>();\n\t\tfor (int i = 0; i < CLOUDS_NUMBER; i++) {\n\t\t\tswitch (i) {\n\t\t\tcase 1:\n\t\t\t\tCloud cloud = new Cloud(20, 400);\n\t\t\t\tcloud.isRight = false;\n\t\t\t\tcloud.velocity.set(Cloud.CLOUD_MAX_VELOCITY, 0);\n\t\t\t\tclouds.add(cloud);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tcloud = new Cloud(800, 300);\n\t\t\t\tcloud.isRight = false;\n\t\t\t\tcloud.velocity.set(Cloud.CLOUD_MAX_VELOCITY, 0);\n\t\t\t\tclouds.add(cloud);\n\t\t\tcase 3:\n\t\t\t\tcloud = new Cloud(800, 200);\n\t\t\t\tcloud.isRight = true;\n\t\t\t\tcloud.velocity.set(-Cloud.CLOUD_MAX_VELOCITY / 2, 0);\n\t\t\t\tclouds.add(cloud);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// bats\n\t\tbats = new ArrayList<Bat>();\n\t\tfor (int i = 0; i < BATS_NUMBER; i++) {\n\t\t\tswitch (i) {\n\t\t\tcase 1:\n\t\t\t\tBat bat = new Bat(410, 400, Assets.BatRegion.getRegionWidth() / 3.4f,\n\t\t\t\t\t\tAssets.BatRegion.getRegionHeight() / 3.4f);\n\t\t\t\tbat.isRight = false;\n\t\t\t\tbat.angle = 0f;\n\t\t\t\tbat.fixAngle = 0f;\n\t\t\t\tbat.interval = 16;\n\t\t\t\tbats.add(bat);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tbat = new Bat(100, 250, Assets.BatRegion.getRegionWidth() / 5.0f,\n\t\t\t\t\t\tAssets.BatRegion.getRegionHeight() / 5.0f);\n\t\t\t\tbat.isRight = false;\n\t\t\t\tbat.angle = 0f;\n\t\t\t\tbat.fixAngle = 0f;\n\t\t\t\tbat.interval = 16;\n\t\t\t\tbats.add(bat);\n\t\t\tcase 3:\n\t\t\t\tbat = new Bat(700, 140, Assets.BatRegion.getRegionWidth() / 2.4f,\n\t\t\t\t\t\tAssets.BatRegion.getRegionHeight() / 2.4f);\n\t\t\t\tbat.isRight = false;\n\t\t\t\tbat.angle = 360f - 20f;\n\t\t\t\tbat.fixAngle = 360f - 20f;\n\t\t\t\tbat.interval = 16;\n\t\t\t\tbats.add(bat);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private void LoadingDatabaseGameLocation() {\n\n\t\tCursor cursor = helper.getDataAll(GamelocationTableName);\n\n\t\t// id_counter = cursor.getCount();\n\n\t\tGAME_LIST.clear();\n\n\t\twhile (cursor.moveToNext()) {\n\t\t\t// loading each element from database\n\t\t\tString ID = cursor.getString(ID_GAME_LCOATION_COLUMN);\n\t\t\tString Description = cursor\n\t\t\t\t\t.getString(DESCRIPTION_GAME_LCOATION_COLUMN);\n\t\t\tString isGameVisited = cursor.getString(GAME_IS_VISITED_COLUMN);\n\n\t\t\tGAME_LIST.add(new gameLocation(ID, Description,\n\t\t\t\t\tisUsed(isGameVisited)));\n\t\t\t\n\t\t\tLog.d(TAG, \"game ID : \"+ ID);\n\t\t\t\n\t\t} // travel to database result\n\n\t}", "public List<Bed> solvedBeds() {\n // TODO: Fix me.\n return bed;\n }", "public @NotNull Set<Bidder> findAllBidders() throws BazaarException;", "public ArrayList<BikeData> getAllRecentData (){\n ArrayList<BikeData> datalist = new ArrayList<>();\n \n try(\n Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(ALL_RECENT_DATA);\n ResultSet rs = ps.executeQuery()){\n \n while(rs.next()){\n int bikeId = rs.getInt(cBikeID);\n LocalDateTime dateTime = rs.getTimestamp(cDateTime).toLocalDateTime();\n double latitude = rs.getDouble(cLatitude);\n double longitude = rs.getDouble(cLongitude);\n double chargingLevel = rs.getDouble(cChargingLevel);\n\n BikeData bd = new BikeData(bikeId, dateTime, latitude, longitude, chargingLevel);\n datalist.add(bd);\n }\n \n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n }\n return datalist;\n }", "private void initialiseBags() {\r\n\t\t//Player one bag\r\n\t\taddToBag1(GridSquare.Type.a, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.b, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.c, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.d, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.e, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.f, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.g, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.h, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.i, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.j, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.k, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.l, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.m, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.n, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.o, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.p, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.q, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.r, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.s, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.t, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.u, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.v, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.w, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.x, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\t\r\n\t\t//Player two bag\r\n\t\taddToBag2(GridSquare.Type.A, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.B, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.C, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.D, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.E, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.F, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.G, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.H, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.I, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.J, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.K, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.L, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.M, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.N, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.O, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.P, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.Q, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.R, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.S, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.T, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.U, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.V, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.W, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.X, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t}", "public Map<String, Integer> getDataBosses() {\r\n\t\treturn dataBosses;\r\n\t}", "public ArrayList<Habitacion> cargarHabitaciones() {\n HabitacionDAO hdao = new HabitacionDAO();\n return hdao.cargarHabitacion();\n }", "ArrayList<Bet> selectAllBetsOfAccount(String login) throws DAOException;", "public static void saveData() throws FileNotFoundException {\t\n\t\t\t\n\tScanner inputStream = new Scanner(new File(\"bookings.dat\"));\n\t\ttry {\n\t\t\t\n\t\t\tBookingList.surName = inputStream.nextLine();\n\t\t\tBookingList.tableNo = inputStream.nextLine();\n\t\t\tBookingList.sittingTime = inputStream.nextLine();\n\t\t\tBookingList.partyOf = inputStream.nextLine();\n\t\t\t\t\n\t\t\tBooking<?> bookingData = new Booking<Object>(null, surName, tableNo, sittingTime, partyOf);\n\t\t\tb1.insert(bookingData);\n\t\t\t\t\n\t\t}finally {\n\t\t\tinputStream.close();\n\t\t}\n\t\t\t\n\t}", "public BowlingGame(List<BowlingPlayer> bowlingPlayers){\n _bowlingPlayers = bowlingPlayers;\n }", "public static String getBills(){\n return \"select * from current_bills\";\n }", "public static List<Boekhouding.Bank> oldBankinstellingToNewBank() {\r\n List<Boekhouding.Bank> newBanken = new ArrayList();\r\n List<Old.Boekhouding.Bankinstelling> bankInstellingen = Import.getBankinstellingen().stream().map(b -> (Old.Boekhouding.Bankinstelling) b).collect(Collectors.toList());\r\n\r\n bankInstellingen.forEach(b -> {\r\n newBanken.add(new Bank(b.getId_bank(), b.getNaam(), b.getBankcode()));\r\n });\r\n return newBanken;\r\n }", "public int getBoatId() {\n return boatId;\n }", "public List<Bill> getBill() {\n\tString sql =\"SELECT * FROM bills JOIN employees e on bills.Id_employees = e.Id_employees JOIN food f on bills.Id_food = f.Id_food\";\n\tList<Bill> list = new ArrayList<Bill>();\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\n\t\twhile(resultSet.next()) {\n\t\t\tBill getBill = new Bill();\n\t\t\tgetBill.setId(resultSet.getInt(\"Id_bills\"));\n\t\t\tgetBill.setFood(resultSet.getString(\"Name\"));\n\t\t\tgetBill.setEmployyes(resultSet.getString(\"Name_and_surname\"));\n\t\t\tgetBill.setPrice(resultSet.getDouble(\"Price\"));\n\t\t\tgetBill.setSerialNumber(resultSet.getString(\"Serial_Number_Bill\"));\n\t\t\tgetBill.setTotal(resultSet.getDouble(\"TOTAL\"));\n\t\t\tlist.add(getBill);\n\t\t}\n\t\t\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n}", "public interface BannedDAO {\n public void addBanned(Banned banned) throws SQLException;\n public void updateBanned(Long banned_id, Banned banned) throws SQLException;\n public Banned getBannedById(Long banned_id) throws SQLException;\n public Collection getAllBanneds() throws SQLException;\n public void deleteBanned(Banned banned) throws SQLException;\n}", "@Override\r\n\tpublic List<BackStone> findAllBackStone() {\n\t\tLOGGER.info(\"查找所有的退石记录:>>\" );\r\n\t\treturn backStoneDao.findAllBackStone();\r\n\t}", "public ArrayList<BikeData> getAllTravellingData (){\n ArrayList<BikeData> datalist = new ArrayList<>();\n \n try(\n Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(ALL_TRAVEL_DATA);\n ResultSet rs = ps.executeQuery()){\n \n while(rs.next()){\n int bikeId = rs.getInt(cBikeID);\n LocalDateTime dateTime = rs.getTimestamp(cDateTime).toLocalDateTime();\n double latitude = rs.getDouble(cLatitude);\n double longitude = rs.getDouble(cLongitude);\n double chargingLevel = rs.getDouble(cChargingLevel);\n \n BikeData bd = new BikeData(bikeId, dateTime, latitude, longitude, chargingLevel);\n datalist.add(bd);\n }\n \n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n }\n return datalist;\n }", "public static boolean getDb() {\n boolean drinkOK = false, ingredientOK = false;\n String responseBody = getWebData(\"getIngredients.php\");\n // If the getWebData returns error the HTTP-get has failed and\n // the paring shall not be done.\n if (responseBody.equals(\"error\"))\n return false;\n Log.d(\"getDB\", responseBody);\n try {\n // Prepare the JSON to be parsed.\n JSONObject json = new JSONObject(responseBody);\n JSONArray jArray = json.getJSONArray(\"ingredients\");\n Log.d(\"getDrinks.php\", jArray.toString());\n for (int i = 0; i < jArray.length(); ++i) {\n JSONObject jObject;\n jObject = jArray.getJSONObject(i);\n // Parses the JSON and creates the ContentValues object.\n ContentValues values = new Ingredient(jObject.getInt(\"_id\"), jObject.getString(\"name\"),\n jObject.getString(\"url\"), jObject.getString(\"ingredienttype\"), jObject.getInt(\"alcohollevel\"),\n jObject.getString(\"description\")).getContentValues();\n // Insets the data into the SQLite.\n Uri myBarUriIngredient = MyBarApplication.contentResolver().insert(\n MyBarContentProvider.CONTENTURI_INGREDIENT, values);\n Log.d(Data.class.getClass().getName(),\n \"Inserted Ingredient. Created row: \" + myBarUriIngredient.toString());\n }\n ingredientOK = true;\n\n } catch (JSONException e) {\n Log.e(\"JSONError ingredients\", e.toString());\n ingredientOK = false;\n }\n\n responseBody = getWebData(\"getDrinks.php\");\n Log.d(\"getDB\", responseBody);\n try {\n // Prepare the JSON to be parsed.\n JSONObject json = new JSONObject(responseBody);\n // Creates the JSON array from the drinks array.\n JSONArray jArray = json.getJSONArray(\"drinks\");\n // Print the json to the Log.d.\n Log.d(\"getDrinks.php\", jArray.toString());\n for (int i = 0; i < jArray.length(); ++i) {\n JSONObject jObject = jArray.getJSONObject(i);\n // Gets the values from the JSON-data.\n ContentValues values = new Drink(jObject.getInt(\"_id\"), jObject.getString(\"name\"),\n jObject.getString(\"url\"), jObject.getString(\"glass\"), jObject.getString(\"ingredient\"),\n jObject.getString(\"description\"), jObject.getInt(\"rating\"),\n // Sets favorite to 0 and gets the content values.\n 0).getContentValues();\n // Insets the data into the SQLite\n Uri myBarUriDrink = MyBarApplication.contentResolver().insert(MyBarContentProvider.CONTENTURI_DRINK,\n values);\n Log.d(Data.class.getClass().getName(), \"Inserted Drink. Created row: \" + myBarUriDrink.toString());\n }\n // Sets the return variable.\n drinkOK = true;\n } catch (JSONException e) {\n // Prints to Log.d.\n Log.e(\"JSONError drinks\", e.toString());\n drinkOK = false;\n }\n\n return ingredientOK & drinkOK;\n }", "public void loadLiabilitiesBuildingBlocks() {\n\t\tif (this.loadLiabilityTypesFromDB) {\n\t\t\tthis.liabilitiesTypeBuildingBlocks = this.buildingBlockService.findBuildingBlocksbyBranchIdAndBuildingBlockType(this.sessionBean.getCurrentBranch()\n\t\t\t\t\t.getId(), BuildingBlockConstant.LIABILITY_TYPE);\n\t\t\tthis.loadLiabilityTypesFromDB = false;\n\t\t}\n\t}", "public static List<Bike> getListOfBike() {\n return new ArrayList<Bike>(listOfBike);\n }", "public Bomb[] getBombs() {\r\n\t\treturn bombs;\r\n\t}", "public List<String> getAllBrands() {\n ArrayList<String> alData = new ArrayList<>();\n // Select All Query\n String selectQuery = \"SELECT \" + KEY_BRAND_NAME + \" FROM \" + REGISTER_TABLE;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n DataBaseHelper dataBaseHelper = new DataBaseHelper();\n\n dataBaseHelper.set_brand_name(cursor.getString(0));\n alData.add(dataBaseHelper.get_brand_name());\n //uncomment below if we want to get all these details\n //dataBaseHelper.set_brand_id(cursor.getString(1));\n //dataBaseHelper.set_model_name(cursor.getString(2));\n //dataBaseHelper.set_model_id(cursor.getString(3));\n // Adding data to list\n //dataBaseHelperList.add(dataBaseHelper);\n } while (cursor.moveToNext());\n }\n\n // return recent list\n return alData;\n }", "public static Bank getBank() {\n return Bank;\n }", "public static ArrayList<Table> listBan(int idKhuVuc){\n ArrayList<Table> listban = null;\n SVConnect connect = new SVConnect();\n String url = SVConnect.urlAPI + \"area/\" + idKhuVuc;\n try {\n String result = connect.sendGet(url);\n System.out.println(result);\n Gson gson = new Gson();\n listban = gson.fromJson(result, new TypeToken<ArrayList<Table>>(){}.getType());\n System.out.println(listban.toString());\n return listban;\n } catch (Exception ex) {\n Logger.getLogger(UserDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null; \n }", "public void saveInformation(){\n market.saveInformationOfMarket();\n deckProductionCardOneBlu.saveInformationOfProductionDeck();\n deckProductionCardOneGreen.saveInformationOfProductionDeck();\n deckProductionCardOneViolet.saveInformationOfProductionDeck();\n deckProductionCardOneYellow.saveInformationOfProductionDeck();\n deckProductionCardThreeBlu.saveInformationOfProductionDeck();\n deckProductionCardThreeGreen.saveInformationOfProductionDeck();\n deckProductionCardThreeYellow.saveInformationOfProductionDeck();\n deckProductionCardThreeViolet.saveInformationOfProductionDeck();\n deckProductionCardTwoBlu.saveInformationOfProductionDeck();\n deckProductionCardTwoGreen.saveInformationOfProductionDeck();\n deckProductionCardTwoViolet.saveInformationOfProductionDeck();\n deckProductionCardTwoYellow.saveInformationOfProductionDeck();\n\n\n }", "int getBombsPlaced () {\n return bombsPlaced;\n }", "PersistentDataHolder getDataHolder();", "private void loadPosBoats(GameData gameData){\n for(Boat b : gameData.getBoatArray()) {\n for(int[] pos : b.getPositions()){\n gameData.getMatrix()[pos[1]][pos[0]] = b.getBoatid();\n }\n }\n }", "@Override\r\n\tpublic List<SbiBank> DisplayingRecord() {\n\t\tTransaction tx=null;\r\n\t\tSession ses=HBNutility.getSession();\r\n\t\ttx=ses.beginTransaction();\r\n\t\tCriteria ct=ses.createCriteria(SbiBank.class);\r\n\t\tList<SbiBank> sb=ct.list();\r\n\t\treturn sb;\r\n\t}", "List<Bill> findAll();", "private void BScreate() {\n\n\t\tint sum=0;//全枝数のカウント\n\t\tfor(int i=0;i<banknode;i++) sum+=Bank.get(i).deg;\n\n\t\t//e,d,nの決定\n\t\tif(NW==\"BA\"){\n\t\tfor(int i=0;i<banknode;i++) {\n\t\t\tBank.get(i).totalassets=E*((double)Bank.get(i).deg/(double)sum);\n\t\t\tBank.get(i).n=Bank.get(i).totalassets*Bank.get(i).CAR;\n\t\t\tBank.get(i).d=Bank.get(i).totalassets-Bank.get(i).n;\n\t\t\tBank.get(i).buffer=Bank.get(i).totalassets;\n\t\t}\n\t\t}\n\n\t\tif(NW==\"CM\"){\n\t\t\tfor(int i=0;i<banknode;i++){\n\t\t\t\tBank.get(i).totalassets=E/banknode;\n\t\t\t\tBank.get(i).n=Bank.get(i).totalassets*asyCAR;\n\t\t\t\tBank.get(i).forcelev=megaCAR;\n\t\t\t\tBank.get(i).d=Bank.get(i).totalassets-Bank.get(i).n;\n\t\t\t\tBank.get(i).buffer=Bank.get(i).totalassets;\n\t\t\t}\n\n\t\t}\n\n\t}", "private static void saveBb() {\n // if the name field is empty then display a message to the user and return\n if (tf_name.getText().equals(\"\")) {\n lbl_message.setText(\"Billboard must have a name\");\n return;\n }\n // if the name field is populated then attempt to add the billboard\n try {\n // populate the static instance \"billboard\" with the billboard data entered by the user\n populateBillboard();\n // set the action request to the server\n user.setAction(\"Edit Billboard\");\n // attempt connection to the server\n if (AttemptConnect()) {\n // Send user object to server\n objectStreamer.Send(user);\n objectStreamer.Send(billboard);\n // Await confirmation that the billboard was edited successfully\n if (dis.readBoolean()) {\n // display confirmation message to the user and post log confirmation\n lbl_message.setText(\"Billboard saved\");\n Log.Confirmation(\"New billboard saved successfully\");\n }\n // If billboard not edited then display message to the user\n else {\n lbl_message.setText(\"Unable to edit billboard\");\n Log.Error(\"Error when attempting to saved billboard\");\n }\n // Disconnect from server\n AttemptDisconnect();\n }\n // Post message to user if unable to connect to server\n else {\n Log.Error(\"Unable to connect to server\");\n }\n // clear all user input fields\n resetFields();\n // disable user input fields\n fieldsEnabled(false);\n }\n // catch any unanticipated exceptions and print to console\n catch (Exception e) {\n e.printStackTrace();\n Log.Error(\"Add billboard attempt request failed\");\n }\n }", "public AbysswalkerGame(DataBase db) { this.db = db; }", "public List<MLocoBrakeType> getbreaktyp() {\n\t\t\tList<MLocoBrakeType> getbreaktype = new ArrayList<>();\t\t\t\n\t\t\tobj_breaktyperepo.findAll()\n\t\t\t.forEach(getbreaktype::add);\n\t\t\treturn getbreaktype;\n\t\t\t\n\t\t\t\t\t}", "public ArrayList<BankAccount> getAccounts() {\n\t\tString sql = \"SELECT id, name, balance, balance_saving FROM accounts WHERE id > ?\";\n\n\t\tArrayList<BankAccount> bankAccounts = new ArrayList<>();\n\n\t\ttry (PreparedStatement pstmt = dbConnection.prepareStatement(sql)) {\n\t\t\t// set the value\n\t\t\tpstmt.setInt(1, 0);\n\n\t\t\tResultSet rs = pstmt.executeQuery();\n\n\t\t\t// loop through the result set\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString name = rs.getString(\"name\");\n\t\t\t\tint checking_balance = rs.getInt(\"balance\");\n\t\t\t\tint saving_balance = rs.getInt(\"balance_saving\");\n\n\t\t\t\tBankAccount bankAccount = new BankAccount(id, name, checking_balance, saving_balance);\n\t\t\t\tbankAccounts.add(bankAccount);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\treturn bankAccounts;\n\t}", "public List<BonoEntity> getBonos() {\r\n return bonos;\r\n }", "private PotCollection loadPotList(){\n SharedPreferences preferences = getSharedPreferences(SHAREDPREF_SET, MODE_PRIVATE);\n int sizeOfPotList = preferences.getInt(SHAREDPREF_ITEM_POTLIST_SIZE, 0);\n for(int i = 0; i<sizeOfPotList; i++){\n Log.i(\"serving calculator\", \"once\");\n String potName = preferences.getString(SHAREDPREF_ITEM_POTLIST_NAME+i, \"N\");\n int potWeight = preferences.getInt(SHAREDPREF_ITEM_POTLIST_WEIGHT+i, 0);\n Pot tempPot = new Pot(potName, potWeight);\n potList.addPot(tempPot);\n }\n return potList;\n }" ]
[ "0.592895", "0.57870656", "0.5779027", "0.5776196", "0.57653886", "0.57301885", "0.56986886", "0.5669815", "0.56642973", "0.5651253", "0.5588436", "0.55846506", "0.5551296", "0.5522019", "0.5512533", "0.5467831", "0.54574895", "0.541328", "0.54058766", "0.5394261", "0.53883976", "0.53785515", "0.5365617", "0.53531396", "0.5322645", "0.5312221", "0.53113043", "0.5310466", "0.53085095", "0.530193", "0.5294481", "0.52822566", "0.52705604", "0.5266572", "0.5213923", "0.5211265", "0.520644", "0.51863045", "0.5186276", "0.51804775", "0.5161751", "0.51606196", "0.5157222", "0.5151182", "0.51412827", "0.51411945", "0.5133258", "0.5112943", "0.51093215", "0.51022226", "0.51022226", "0.50871205", "0.5083713", "0.50792205", "0.5072914", "0.5059133", "0.5053429", "0.5044507", "0.50376534", "0.5036258", "0.5028767", "0.50260735", "0.5016804", "0.5010585", "0.5010138", "0.5008795", "0.5005608", "0.5003287", "0.49903557", "0.49835446", "0.4979702", "0.49779934", "0.49683774", "0.496754", "0.49504662", "0.49467432", "0.4942278", "0.49418527", "0.49383837", "0.49363178", "0.49349195", "0.49332365", "0.49314702", "0.49290898", "0.49231294", "0.49196953", "0.49159694", "0.49158153", "0.49142128", "0.4913256", "0.49120235", "0.49020392", "0.49016", "0.48992738", "0.48961082", "0.48956138", "0.48805434", "0.48785535", "0.48701528", "0.48698574" ]
0.65363234
0
Sets the variable "StartGame" to true
@Override public void setStartGame() { database.getReference(gameCodeRef).child("StartGame").setValue(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startGame() {\n \t\ttimeGameStarted = System.nanoTime();\n \t\tisStarted = true;\n \n \t}", "public void startGame() {\r\n this.setupGame();\r\n }", "public void startGame() \n\t{\n\t\tgamePanel.startGame();\n\t}", "private void startGame() {\r\n gameRunning = true;\r\n gameWindow.getStartButton().setText(\"Stop\");\r\n gameThread = new Thread(new GameLoopThread());\r\n gameThread.start();\r\n }", "public void setGameStarted(boolean gameStarted) {\n this.gameStarted = gameStarted; \n }", "private void startGame()\n {\n if (heroPlayer != null && antagonistPlayer != null && location != null && currentPlayerName != \"null\")\n {\n gameStarted = true;\n }\n }", "public void startGame() {\n status = Status.COMPLETE;\n }", "private void startGame() {\r\n\t\tthis.gameMap.startGame();\r\n\t}", "public boolean gameStart() {\r\n if (game == null) {\r\n board = new Board();\r\n if (ai) {\r\n Logging.log(\"Starting as AI\");\r\n player = new BaasAI(this, \"14ply.book\");\r\n } else {\r\n Logging.log(\"Starting as Human\");\r\n player = new HumanPlayer(this);\r\n }\r\n game = new Game(this);\r\n game.start();\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "private void startGame() {\n\t\tmain.next_module = new Game(main, inputs, gameSelectionData);\n\t}", "public void getStart(boolean isGameStarted){\n this.isGameStarted = isGameStarted;\n }", "public void beginGame() {\r\n data.gameState = 3;\r\n data.gameStartFlag = true;\r\n setChanged();\r\n notifyObservers(data);\r\n data.gameStartFlag = false; //Set the gameStart flag to false so the relevant update lines aren't ever run a second time\r\n }", "private void startGame() {\r\n setGrid();\r\n setSnake();\r\n newPowerUp();\r\n timer.start();\r\n }", "public void setInGame() {\n this.inGame = true;\n }", "public void GameStart()\n\t\t{\n\t\t\tplayers_in_game++;\n\t\t}", "public boolean gameStarted() {\n\t\treturn startGame;\n\t}", "public void startGame() {\n \t\tcontroller = new GameController(gameConfig, players);\n \t\tcontroller.LOG = controller.LOG + \"#MPClient\";\n \n controller.setCurrentPlayer(firstTurnPid);\n \n \t\tsendStartGame();\n \t}", "public void setLoadGame() {\n this.loadeGame = true;\n }", "void startGame();", "void startGame();", "void startGame();", "private void startGame() {\n betOptionPane();\n this.computerPaquetView.setShowJustOneCard(true);\n blackjackController.startNewGame(this);\n }", "private void startGame() {\n gameCountDownTimer = getGameTimer();\n gameCountDownTimer.start();\n animateBalloonView(balloon1, true);\n animateBalloonView(balloon2, true);\n animateBalloonView(balloon3, true);\n animateBalloonView(balloon4, true);\n animateBalloonView(balloon5, true);\n currentScreenGameState = GameState.PLAYING;\n String controlButtonTitle = getResources().getString(R.string.pause_btn);\n conttroler.setText(controlButtonTitle);\n setCurrentScreenCover();\n invalidateOptionsMenu();\n }", "public static void startGamePlay() {\r\n\t\tif(!STATUS.equals(Gamestatus.PREPARED)) {\r\n\t\t\tSystem.err.println(\"Invalid Gamestatus! Cannot start unprepared gameplay\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\tSTATUS = Gamestatus.RUNNING;\r\n\t\tclock = new GameClock();\r\n\t\tclock.start(GameTickExecutor.DEFAULT_GAMETICK);\r\n\t}", "public void start() {\n \tthis.currentState = this.initialState;\n \tstop=false; //indica que el juego no se ha detenido\n \tnotifyObservers(new GameEvent<S, A>(EventType.Start,null,currentState,\n \t\t\t\t\tnull,\"The game started\"));\n\n }", "public void startGame() {\n\t\tinitChips();\n\t\tassignAndStartInitialProjects();\n\t}", "@Override\n\tpublic void startGame(){\n\t\tsuper.currentPlayer = 1;\n\t}", "public void setHaveGame()\n\t{\n\t\tthis.haveGame = true;\n\t\tthis.isTurn = true;\n\t\tSystem.out.println(\"Setting have game\");\n\t}", "public void start() {\n ArrayList<String> names = new ArrayList<>();\n game.initialize(names);\n //game.play(this.mainPkmn, this.attack);\n\n }", "public void setStart(){\n\t\tthis.isStart=true;\n\t}", "public boolean Start(){\r\n\t\tif (this.getGameState().equals(GAMESTATE.READY_TO_START)){\r\n\t\t\tsetGameState(GAMESTATE.RUNNING);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "void askStartGame();", "public boolean startGame() {\n\t\tif(!ackReadyToPlay){\n\t\t\tackReadyToPlay = true;\n\t\t\tSystem.out\n\t\t\t.println(\"PPL: StartGameBean vom typ RESULT empfangen von: \" + jid);\n\t\t\treturn game.playerReadyToPlay(this);\n\t\t}\n\t\treturn false;\n\t}", "public static void startGame()\r\n\t{\r\n\t\tnew ModeFrame();\r\n\t}", "public void startGame() {\n\t\tif (chordImpl.getPredecessorID().compareTo(chordImpl.getID()) > 0) {\n\t\t\tGUIMessageQueue.getInstance().addMessage(\"I Start!\");\n\t\t\tshoot();\n\t\t}\n\t}", "public void startGame()\n\t{\n\t\tdead = false;\n\t\tpaused = false;\n\t\ttime = 0;\n\t\tclock = 0;\n\t\tdirection = RIGHT;\n\t\tdirection2 = RIGHT2;\n\t\thead = new Point(0, -1);\n\t\thead2 = new Point(58, -1);\n\t\ttronBody.clear();\n\t\ttronBody2.clear();\n\t\ttimer.start();\n\t\tlast_direction = 'R';\n\t\tlast_key = 'R';\n\t\tlast_direction2 = 'R';\n\t\tlast_key2 = 'R';\n\t\t\n\t}", "public void startGame(){\n\t\tIntent intent = new Intent(getApplicationContext(), AndroidLauncher.class);\n\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);\n\t\tintent.putExtra(Bluetooth.PRIMARY_BT_GAME, String.valueOf(false));\n\t\tintent.putExtra(Bluetooth.SECONDARY_BT_GAME, String.valueOf(true));\n\t\tstartActivity(intent);\n\t}", "public void startGame() {\n\t\ttank1.create(20, 530, 0, 0);\n\t\ttank1.setDefaults();\n\t\ttank2.create(960, 530, 0, 0);\n\t\ttank2.setDefaults();\n\t\tobjects.add(tank1);\n\t\tobjects.add(tank2);\n\t\tground = new Groundmod2((int) (Math.random() * 4));\n\t\tturn = Turn.PLAYER1;\n\t\tgrabFocus();\n\t}", "private void startGame() {\n\t\tentities.clear();\n\t\tinitEntities();\n\t\t\n\t\t// blank out any keyboard settings we might currently have\n\t\tleftPressed = false;\n\t\trightPressed = false;\n\t\tfirePressed = false;\n\t}", "public void startGame(){\n\t\tsc = new Scanner(System.in);\n\t\tgui.setScreenID(screenNumber);\n\t\tgui.start();\n\t}", "private void start() // Start the game\n\t{\n\t\tdouble startingPlayerDecider = 0; // Used in the process of deciding who goes first.\t\n\n\t\tif (needToReset == true) // If the game needs to be reset...\n\t\t{\n\t\t\treset(); // Then do so..\n\t\t}\n\n\t\tswitch (gameState) // Check the state of the game and change the messages as needed.\n\t\t{\n\t\tcase waitingForStart:\n\t\t\tlabelGameState.setText(\"Welcome to dig for diamonds.\");\t\n\t\t\tbuttonStart.setText(\"Next\"); // The start button now acts as the next button.\n\t\t\tgameState = GameState.gameWelcome;\n\t\t\tgameStateString = gameStateToString();\n\t\t\tbreak;\n\t\tcase gameWelcome:\n\t\t\tlabelGameState.setText(\"We shall now randomly decide who goes first.\");\t\n\t\t\tgameState = GameState.decideWhoGoesFirst;\n\t\t\tgameStateString = gameStateToString();\n\t\t\tbreak;\n\t\tcase decideWhoGoesFirst:\n\t\t\tswitch(totalPlayers) // Decide based on the number of players who goes first.\n\t\t\t{\n\t\t\tcase 2: // For two players...\n\t\t\t\tstartingPlayerDecider = control.randomNumber(100,0); // Generate a random number between 0 and 100\n\n\t\t\t\tif (startingPlayerDecider >= 50) // If it is greater then or equal to 50...\n\t\t\t\t{\n\t\t\t\t\tplayers.get(0).setIsPlayerTurn(true); // Player 1 goes first.\t\n\t\t\t\t\tlabelGameState.setText(\"Player 1 shall go first this time.\");\t\n\t\t\t\t\tgameState = GameState.twoPlayersPlayerOneGoesFirst;\n\t\t\t\t\tgameStateString = gameStateToString();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tplayers.get(1).setIsPlayerTurn(true); // Else player two goes first.\n\t\t\t\t\tlabelGameState.setText(\"Player 2 shall go first this time.\");\t\n\t\t\t\t\tgameState = GameState.twoPlayersPlayerTwoGoesFirst;\n\t\t\t\t\tgameStateString = gameStateToString();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase twoPlayersPlayerOneGoesFirst:\n\t\t\tgameState = GameState.twoPlayersNowPlayerOnesTurn;\n\t\t\tlabelGameState.setText(\"It is now \" + players.get(0).getPlayerName() + \"'s turn.\");\t\n\t\t\tgameStateString = gameStateToString();\n\t\t\tbreak;\n\t\tcase twoPlayersPlayerTwoGoesFirst:\n\t\t\tgameState = GameState.twoPlayersNowPlayerTwosTurn;\n\t\t\tlabelGameState.setText(\"It is now \" + players.get(1).getPlayerName() + \"'s turn.\");\t\n\t\t\tgameStateString = gameStateToString();\n\t\t\tbreak;\n\t\t}\t\t\n\t}", "public void startGame(){\n\t\tSystem.out.println(\"UNI: nas2180\\n\" +\n\t\t\t\t\"Hello, lets play Rock Paper Scissors Lizard Spock!\\n\");\n\t\tSystem.out.println(\"Rules:\\n Scissors cuts Paper\\n \" +\n\t\t\t\t\"Paper covers Rock\\n \" +\n\t\t\t\t\"Rock crushes Lizard\\n \" +\n\t\t\t\t\"Lizard poisons Spock\\n \" +\n\t\t\t\t\"Spock smashes Scissors\\n \" +\n\t\t\t\t\"Scissors decapitates Lizard\\n \" +\n\t\t\t\t\"Lizard eats Paper\\n \" +\n\t\t\t\t\"Paper disproves Spock\\n \" +\n\t\t\t\t\"Spock vaporizes Rock\\n \" +\n\t\t\t\t\"(and as it always has) Rock crushes Scissors\\n\");\n\t\tthisGame = new GameResult();\n\t\tplayRound();\n\t}", "public void sendStartGame() {\n \t\tclient.sendTCP(new StartGame());\n \t}", "public Game startGame(Game game);", "public void startGame(GameMode gameMode, PlayerType startPlayer) {\n\t\tif (gameMode.equals(GameMode.SINGLEPLAYER)) {\n\t\t\tplayer1 = new Player(PlayerType.HUMAN, BLACK);\n\t\t\tplayer2 = new Player(PlayerType.AI, WHITE);\n\t\t\tplayer2.ai.setReversi(this);\n\n\t\t\tplayer1.setTurn(true);\n\t\t\tplayer1.setName(\"You\"); // Default name for single player\n\t\t} else { // The start player must be black\n\t\t\tif (startPlayer.equals(PlayerType.SERVER)) {\n\t\t\t\tplayer1 = new Player(PlayerType.AI, WHITE);\n\t\t\t\tplayer2 = new Player(PlayerType.SERVER, BLACK); // Start player\n\n\t\t\t\tplayer2.setTurn(true);\n\t\t\t} else {\n\t\t\t\tplayer1 = new Player(PlayerType.AI, BLACK); // Start player\n\t\t\t\tplayer2 = new Player(PlayerType.SERVER, WHITE);\n\n\t\t\t\tplayer1.setTurn(true);\n\t\t\t}\n\n\t\t\tplayer1.ai.setReversi(this);\n\t\t}\n\n\t\t// Set the scores\n\t\tplayer1.setScore(2);\n\t\tplayer2.setScore(2);\n\t}", "public void startGame(int map) {\r\n if (!state[0]) {\r\n menu.setVisible(false);\r\n if (game == null) {\r\n game = new Game();\r\n game.setPreferredSize(new Dimension(GAME_WIDTH, GAME_HEIGHT));\r\n }\r\n game.map = map;\r\n frame.add(game, BorderLayout.CENTER);\r\n state[0] = true;\r\n game.setVisible(true);\r\n frame.pack();\r\n game.init();\r\n game.start();\r\n }\r\n }", "public void start(){\n started = true;\n bot.setHumanInputEnabled(false);\n scriptStart();\n }", "public void startGame() {\n\t\t//Start the rendering first\n\t\tgetRenderer().startRendering();\n\t\t\n\t\t//Start the game thread after that.\n\t\tgetGameThread().start();\n\t}", "public void startTurn() {\n nMovesBeforeGrabbing = 1;\n nMovesBeforeShooting = 0;\n\n if (damages.size() > 2)\n nMovesBeforeGrabbing = 2;\n\n if (damages.size() > 5)\n nMovesBeforeShooting = 1;\n\n playerStatus.isActive = true;\n }", "private void enterSinglePlayerMode(Game game) {\n if (!game.isStarted() && !game.isGameOver()) {\n game.startGame();\n initSubSystems(game);\n stateSession.initialGame = new Game(game);\n }\n }", "public static void start() {\n \t\tMainGame.display.disp(\"What type of monster do you want to fight?:\");\r\n \t\t//Display the buttons for the choice of monster\r\n \t\tMainGame.display.Enable(MainGame.display.warriorM, MainGame.display.fighterM);\r\n \t}", "public void startGame() {\n running = true;\n\n Thread t = new Thread(animator);\n t.start();\n\n }", "public StartGame() {\n\t\tmessageType = CabalWireformatType.GAME_START;\n\t\tscenario = location = timePeriod = NULL; \n\t\tturn = maxTurn = 0;\n\t\t// startingFaction is null!!\n\t\tallMissions = new LinkedList<MissionConceptDTO>();\n\t}", "public void GameGuiStart(){\n\t\ttgs = new TamaGUIStart();\n\t\ttgs.TamaStartGUIStarter(ge);\n\t}", "void pauseGame() {\n myGamePause = true;\n }", "private void startGame() {\r\n\t\tthis.lobbyTimerActive = false;\r\n\t\tthis.gameStarted = true;\r\n\t\tthis.queueMessage(\"% START\");\r\n\t\tthis.dealer = new Dealer(this, this.players);\r\n\r\n\t\t// Start the dealer thread\r\n\t\tThread dealerThread = new Thread(dealer);\r\n\t\tdealerThread.start();\r\n\t}", "public void startGame() {\n\t\timages = new ImageContainer();\n\t\ttimer = new Timer(15, this);\n\t\ttimer.setRepeats(true);\n\t\tlevelStartTimer = new Timer(2000, this);\n\t\thighScore = new HighScore();\n\t\tpacmanAnimation = new PacmanAnimation(images.pacman, new int[] { 3, 2,\n\t\t\t\t0, 1, 2 });\n\t\tactualLevel = 1;\n\t\tinitNewLevel();\n\t}", "public static void setupNewGamePlay() {\r\n\t\tSTATUS = Gamestatus.PREPARED;\r\n\t\tGameplay.getInstance().start();\r\n\t\tgui.setMenu(new GameplayMenu(), true);\r\n\t}", "public void startGame() {\r\n\t\t\r\n\t\tmultiplayerPanel.setVisible(false);\r\n\t\tif(waitingPanel != null) waitingPanel.setVisible(false);\r\n\t\tmultiplayerPanel.removeAll();\r\n\t\t\r\n\t\tgameSetupMultiplayer();\r\n\t\t\r\n\t\t\r\n\t}", "public void startNewGame();", "public void start(){\r\n\t\tcantStop.getGameBoard().startNewTurn();\r\n\t\tallowNewRoll();\r\n\t}", "public synchronized void start(){\n\t\tthis.running = true;\n\t\tthis.thread = new Thread(this,\"Game\");\n\t\tthread.start();\n\n\t}", "boolean hasStartGameRequest();", "public GameStart() {\n\t\tsuper(\"First 2D Game\");\n\t}", "public void startGameSession() {\n\t\tfor (GamePlayer player : listOfPlayers) {\n\t\t\tif (player != null) {\n\t\t\t\t// set to first lap\n\t\t\t\tplayer.currentLap = 1;\n\t\t\t}\n\t\t}\n\t}", "private void StartGameButtonActionPerformed(java.awt.event.ActionEvent evt) {\n StartGame();\n }", "public void startDummyGame()\n\t{\n\t\t//game.dummyGame();\n\t}", "private void startNewGame()\n {\n \n \t//this.mIsSinglePlayer = isSingle;\n \n \tmGame.clearBoard();\n \n \tfor (int i = 0; i < mBoardButtons.length; i++)\n \t{\n \t\tmBoardButtons[i].setText(\"\");\n \t\tmBoardButtons[i].setEnabled(true);\n \t\tmBoardButtons[i].setOnClickListener(new ButtonClickListener(i));\n \t\t//mBoardButtons[i].setBackgroundDrawable(getResources().getDrawable(R.drawable.blank));\n \t}\n \n \t\tmPlayerOneText.setText(\"Player One:\"); \n \t\tmPlayerTwoText.setText(\"Player Two:\"); \n \n \t\tif (mPlayerOneFirst) \n \t{\n \t\t\tmInfoTextView.setText(R.string.turn_player_one); \n \t\tmPlayerOneFirst = false;\n \t}\n \telse\n \t{\n \t\tmInfoTextView.setText(R.string.turn_player_two); \n \t\tmPlayerOneFirst = true;\n \t}\n \t\n \n \tmGameOver = false;\n }", "void startGame() {\n System.out.println(\"What game do you want to play?\\n\" + \"1. Lotto\\n\" + \"2. Small Lotto\\n\" + \"3. Quit\");\n input = scanner.next();\n changeGame();\n }", "public void startGame() {\n\t\tfor(Chess.RowConfiguration rowConfiguration : Chess.getRowConfigurations()) {\n\t\t\tint row = rowConfiguration.row;\n\t\t\tClass[] pieceClasses = rowConfiguration.pieces;\n\t\t\tChess.Color sideColor = rowConfiguration.sideColor;\n\n\t\t\tfor(int col = 0; col < Chess.NUM_COLS; col++) {\n\t\t\t\taddPiece(pieceClasses[col], sideColor, board.getSpot(row, col));\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.inPlay = true;\n\t\t\n\t\tstartNewTurn();\n\t\t\n\t\tif(eventListener != null) {\n\t\t\teventListener.onGameStarted();\n\t\t}\n\t}", "public void startGame() {\n loadPlayersIntoQueueOfTurns();\n nextPlayerInTurn();\n eventListener.addEventObject(new RoundEvent(EventNamesConstants.GameStarted));\n }", "private void startNewGame( ){\n\n mGame.clearBoard();\n mGameOver = false;\n\n // Reset all buttons\n for (int i = 0; i < mBoardButtons.length; i++) {\n mBoardButtons[i].setText(\"\");\n mBoardButtons[i].setEnabled(true);\n mBoardButtons[i].setOnClickListener(new ButtonClickListener(i));\n }\n // Human goes first\n mDiffTextView.setText(mGame.dificult);\n mInfoTextView.setText(\"You go first.\");\n\n }", "void pauseGame() {\n myShouldPause = true;\n }", "void pauseGame() {\n myShouldPause = true;\n }", "public void startNewGame() {\n\t\tif (this.currentPlayer != -1) {\n\t\t\tthrow new RuntimeException(\"The game has already started.\");\n\t\t}\n\n\t\tif (this.players.size() == 0) {\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"The game cannot be started with a single player\");\n\t\t}\n\n\t\tthis.currentPlayer = 0;\n\n\t\tstartTurn();\n\t}", "void start() {\n myGameOver = false;\n myDisplay.setCurrent(this);\n repaint();\n }", "public synchronized boolean startGame(String gameName) {\n\t\tif(!isActive()) {\n\t\t\tGameProtocolFactory game1 = GameManager.getInstance().searchGame(gameName);\n\t\t\tif (game1!=null){\n\t\t\t\tthis.currentGame = game1.create(this); //when creates called, game starts\n\t\t\t\tlogger.info(gameName + \" game starting\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tlogger.info(gameName + \" DOSENT EXIST\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\tlogger.info(\"A different game is already in session\");\n\t\t\treturn false;\n\t\t}\n\t}", "void onStartGameRequested();", "public synchronized void startGame() {\n PreGameState preGameState = new PreGameState();\n pickTeamState = preGameState.startGame(players);\n state = State.PICK_TEAM;\n teamSelection = new HashSet<>();\n }", "private void setGameStatus() {\n this.gameStatus = false;\n }", "public void startGame() {\n StartButton = (ImageButton) findViewById(R.id.imageButton_Start); //we are making a new Button\n StartButton.setOnClickListener(new View.OnClickListener() { //when we are pressing the button this will happen\n @Override\n public void onClick(View view) {\n stopPlaying();\n startGameActivity();\n }\n });\n }", "private void consoleGameStart(){\n\t\tconsoleGetOptions();\n\t\t\n\t\t//diplay the board\n\t\tconsoleBoardDisplay();\n\t\tdo{\t\n\t\t\t//either player makes a move\t\t\n\t\t\tif (ttt.isPlayerTurn()) consoleBoardInput();\n\t\t\telse ttt.computeMove();\n\t\t\tconsoleBoardDisplay();\n\t\t\t\n\t\t\t//check for winning states and draw states\n\t\t\tif (ttt.checkWin()){\n\t\t\t\tif (ttt.isPlayerTurn()) System.out.println(\"Computer Wins\");\n\t\t\t\telse System.out.println(\"Player Wins\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (ttt.checkDraw()){\n\t\t\t\tSystem.out.println(\"Its a Draw Game\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}while (true);\n\t}", "private void gameStart(){\n\t\tRandom randomGenerator = new Random();\n\t\tint ranNum = randomGenerator.nextInt(teamNum);\n\t\tSystem.out.println(\"The team to go first will be \" + teams[ranNum].getName());\n\t\tgameHelper(ranNum); //process all 25 questions until it's over\n\t\tfinalRound();\n\t\tprintFinalWinner();\n\t\t\n\t\t\n\t}", "public void firstGameCheck()\n {\n if(count > 0)\n {\n this.gameStart();\n System.out.println(\"Result:\");\n this.printGameResult();\n System.out.print(\"\\n\");\n }else\n {\n System.out.println(\"\\nGame Running Failed! \\n >>>>>>>>>>>>>> Please setting game first\\n\");\n }\n }", "void start () {\n System.out.println(\"Starting the game\");\n score = 0;\n updateScore();\n stepDelay = startingSpeed;\n isFalling = false;\n gameOver = false;\n board.clear();\n board.clearTemp();\n setNormalSpeed();\n spawnNewPiece();\n updateView();\n resetLoop();\n }", "public void start(){\n\t\tthis.timer.start();\n\t\t\n\t\t/*this.BGM.play();\t//make it play once we have the background after the game start\n\t\tthis.BGM.loop(1);\t//make it loop constantly\n\t\t\n\t\t//once we start the BGM, start calculating the time\n\t\t//we minus this.time because if the game is restarted, we want to adjust the time displayed\n\t\t//on the label since the paused time does not account\n\t\tthis.startTime = System.nanoTime() - this.time;\t//in nanoTime*/\n\t\t\n\t\tthis.stop = false;\n\t}", "public void startCommand() {\r\n _playing = true;\r\n }", "void startGame(int gameId) {\n game = new Game(gameId);\n }", "public boolean\t\t\t\t\t\tisGameStarted()\t\t\t\t\t\t\t\t{ return this.gameStarted; }", "public void startGame() throws JSONException {\n\t\tJSONObject json = new JSONObject();\n\t\tJSONObject json2 = new JSONObject();\n\t\tjson.put(\"Spiel starten\", json2);\n\n\t\tclient.send(json);\n\t}", "public void forceStart() {\r\n\t\tchaseObj = true;\r\n\t}", "private void startNewGame(Graphics g){\n\t\tclearBoard(g);\n\t\tb.init();\n\t\tgameStarted = true;\n\t\tgameOver = false;\n\t}", "private void startGame() {\n\t\ttimer = new Timer();\n\t\ttimer.scheduleAtFixedRate(new ScheduleTask(), 5, BreakoutBall.BALLSPEED);\n\t}", "private void startGame() {\n hideView(R.id.title);\n hideView(R.id.score);\n gameView.setVisibility(View.VISIBLE);\n level=0;\n totalPoints =0;\n gameView.setTotalPoints(totalPoints);\n startLevel();\n }", "public synchronized void start() {\n\t\tif(isRunning) return; //If the game is already running, exit method\n\t\tisRunning = true; //Set boolean to true to show that it is running\n\t\tthread = new Thread(this); //Create a new thread\n\t\tthread.start(); //Start the thread\n\t}", "void startGame() {\n if (getHealth() <= 0) {\n startAgain();\n }\n int level = getLevel();\n if (level == 1) {\n Intent intent = new Intent(this, Level1Activity.class);\n intent.putExtra(sendPlayer, currPlayer);\n startActivity(intent);\n } else if (level == 2) {\n Intent intent = new Intent(this, Level2Activity.class);\n intent.putExtra(sendPlayer, currPlayer);\n startActivity(intent);\n } else if (level == 3) {\n Intent intent = new Intent(this, Level3Activity.class);\n intent.putExtra(sendPlayer, currPlayer);\n startActivity(intent);\n }\n }", "public static void startGame(CommandSender cs){\n if (isRunning){\n cs.sendMessage(ChatColor.RED + \"Game is already running!\");\n }\n else if (hiderSpawn == null || seekerSpawn == null){\n cs.sendMessage(ChatColor.RED + \"Make sure you set the spawn locations right!\");\n cs.sendMessage(ChatColor.RED + \"Do /setspawnlocation [seeker/hider] at the appropriate locations.\");\n }\n else if (Bukkit.getOnlinePlayers().size() < 3){\n cs.sendMessage(ChatColor.RED + \"Not enough players to start! Make sure there's at least 3 players online!\");\n }\n else{\n isRunning = true;\n if(gameThread == null){\n gameThread = new Thread(new GameManager());\n gameThread.start();\n }\n }\n }", "private void handleStartGame()\n {\n String name = nameInputLabel.getText();\n if (name != null)\n {\n gameScreen.setPlayerName(name.replaceAll(\";\", \" \").trim());\n }\n else\n {\n gameScreen.setPlayerName(\"\");\n }\n \n // Set the new screen state\n gameScreen.setState(gameScreen.getLevelSplashState());\n }", "public void startClick() {\n if(!isRunning){\n startButton.setText(\"Pause\");\n isRunning = true;\n isMovable = false;\n board.finalizeBoard();\n setFocusTraversable(true);\n aliveLabel.setText(Integer.toString(board.getCellsAlive()));\n draw();\n timeline.play();\n }else{\n startButton.setText(\"Start\");\n isRunning = false;\n isMovable = false;\n board.finalizeBoard();\n setFocusTraversable(true);\n aliveLabel.setText(Integer.toString(board.getCellsAlive()));\n draw();\n timeline.pause();\n }\n }", "void gameStarted();" ]
[ "0.7932197", "0.76830125", "0.75743616", "0.7549111", "0.751591", "0.75136787", "0.75116485", "0.74995714", "0.7451776", "0.73699427", "0.7307206", "0.73016703", "0.7300614", "0.7253851", "0.7223504", "0.7181396", "0.7138277", "0.7116495", "0.71038175", "0.71038175", "0.71038175", "0.7033893", "0.70099187", "0.69982827", "0.69967484", "0.6989728", "0.6983551", "0.69826895", "0.6980719", "0.69571114", "0.6934481", "0.6932742", "0.6928943", "0.6927143", "0.6912547", "0.68950415", "0.68893915", "0.68863785", "0.68335557", "0.6830527", "0.68267584", "0.6820492", "0.6780736", "0.6777743", "0.6773611", "0.6751098", "0.6745092", "0.6743784", "0.67372483", "0.6733873", "0.6723544", "0.6716908", "0.6711741", "0.6704233", "0.67031837", "0.6700403", "0.6691612", "0.66901284", "0.6684999", "0.6652702", "0.6646908", "0.66329163", "0.6629069", "0.66252106", "0.66190606", "0.6609856", "0.66061205", "0.65948194", "0.6587074", "0.65808725", "0.6568277", "0.65609044", "0.65582645", "0.65582645", "0.65178233", "0.65159947", "0.64946365", "0.6487999", "0.6477412", "0.64770555", "0.64766103", "0.6473377", "0.6472988", "0.6469035", "0.64575654", "0.6443487", "0.6439622", "0.6434546", "0.6415355", "0.6399198", "0.63941705", "0.6394114", "0.6379151", "0.63765436", "0.63724446", "0.63724375", "0.636117", "0.63596964", "0.6352152", "0.6350318" ]
0.8164419
0
Sets a listener for the variable "StartGame" and notifies the controller when its set to true.
@Override public void setStartGameChangedListener() { database.getReference(gameCodeRef).child("StartGame").addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot snapshot) { String stringValue = String.valueOf(snapshot.getValue()); if (!stringValue.equals(null) && !stringValue.equals("null")){ Boolean value = (Boolean) snapshot.getValue(); if (value){ Controller.getInstance().startGameChangedToTrue(); } } } @Override public void onCancelled(@NonNull DatabaseError error) { Log.w(TAG, "Failed to read value.", error.toException()); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void start() {\n \tthis.currentState = this.initialState;\n \tstop=false; //indica que el juego no se ha detenido\n \tnotifyObservers(new GameEvent<S, A>(EventType.Start,null,currentState,\n \t\t\t\t\tnull,\"The game started\"));\n\n }", "public void startGame() {\n \t\tcontroller = new GameController(gameConfig, players);\n \t\tcontroller.LOG = controller.LOG + \"#MPClient\";\n \n controller.setCurrentPlayer(firstTurnPid);\n \n \t\tsendStartGame();\n \t}", "public void startGame() {\n status = Status.COMPLETE;\n }", "public void startGame() \n\t{\n\t\tgamePanel.startGame();\n\t}", "public void startGame() {\r\n this.setupGame();\r\n }", "void onStartGameRequested();", "private void startGameButton() {\n startGame = new JButton(\"Aloita peli!\");\n ActionListener startGameListener = new ActionListener() {\n public void actionPerformed(ActionEvent actionEvent) {\n controller.startGame();\n }\n };\n startGame.addActionListener(startGameListener);\n }", "public void startGame() {\n loadPlayersIntoQueueOfTurns();\n nextPlayerInTurn();\n eventListener.addEventObject(new RoundEvent(EventNamesConstants.GameStarted));\n }", "private void startGame()\n {\n if (heroPlayer != null && antagonistPlayer != null && location != null && currentPlayerName != \"null\")\n {\n gameStarted = true;\n }\n }", "public void startGame() {\n \t\ttimeGameStarted = System.nanoTime();\n \t\tisStarted = true;\n \n \t}", "private void start() {\n GameStateManager gameStateManager = new GameStateManager();\n JPanel jPanel = gameStateManager.getGameState().getJPanel();\n jPanel.setVisible(true);\n GUI gui = GUI.getInstance();\n gui.setjPanel(jPanel);\n gui.addKeyListener(gameStateManager);\n GameStateObserver gameStateObserver = new GameStateObserver(gameStateManager,gui);\n gameStateManager.addObserver(gameStateObserver);\n }", "public void beginGame() {\r\n data.gameState = 3;\r\n data.gameStartFlag = true;\r\n setChanged();\r\n notifyObservers(data);\r\n data.gameStartFlag = false; //Set the gameStart flag to false so the relevant update lines aren't ever run a second time\r\n }", "public void GameStart()\n\t\t{\n\t\t\tplayers_in_game++;\n\t\t}", "@Override\n public void setStartGame() {\n database.getReference(gameCodeRef).child(\"StartGame\").setValue(true);\n }", "public void gameModelStart(GameState gameState) {\n\t\tsetChanged();\r\n\t\tgameState.setMessage(Message.Start);\r\n\t\tnotifyObservers(gameState);\r\n\t}", "private void startGame() {\r\n gameRunning = true;\r\n gameWindow.getStartButton().setText(\"Stop\");\r\n gameThread = new Thread(new GameLoopThread());\r\n gameThread.start();\r\n }", "public void startGame(){\n\n\t\tGame.updatePlayer(players.get(curr));\n\t\tGameBoard gb = new GameBoard();\n\t\tthis.registerObserver(gb);\n\t\tgb.update(this, board);\n\n\t}", "public void notifyTurn()\n {\n playerObserver.onTurnStart();\n }", "void onEDHGameStart();", "private void startGame() {\n\t\tmain.next_module = new Game(main, inputs, gameSelectionData);\n\t}", "@FXML\n public void btnStartGame(Event e)\n {\n\n LobbyPlayer lobbyPlayer = PlayerSingleton.getPlayer().getLobbyPlayer();\n try {\n List<LobbyPlayer> lobbyPlayerList = LobbyServerConnection.getInstance().getPlayerList(lobbyPlayer);\n\n List<Player> pl = new ArrayList<>();\n\n for (LobbyPlayer lp :lobbyPlayerList) {\n Player p = new Player(lp.getUniqueId(), lp.getName());\n pl.add(p);\n }\n\n //game gets starter on server\n GameServerConnection.getInstance().startGame(pl);\n sleep();\n //tartGamevanuit lobby\n LobbyServerConnection.getInstance().startGame(lobbyPlayer);\n\n } catch (RemoteException e1) {\n log.warning(e1.toString());\n log.warning(\"couldn't create a game\");\n }\n }", "public interface OnEDHGameStartListener {\n // TODO: Update argument type and name\n void onEDHGameStart();\n }", "private void startGame() {\r\n setGrid();\r\n setSnake();\r\n newPowerUp();\r\n timer.start();\r\n }", "public boolean onStart(View view) {\n afterCheck=false;\n // challenge.setEnabled(true);\n userTurn = random.nextBoolean();\n TextView text = (TextView) findViewById(R.id.ghostText);\n text.setText(\"\");\n TextView label = (TextView) findViewById(R.id.gameStatus);\n\n\n if (userTurn) {\n label.setText(USER_TURN);\n startCheck=2;\n } else {\n label.setText(COMPUTER_TURN);\n startCheck=1;\n // challenge.setEnabled(false);\n //computerTurn();\n handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n //Do something after 2seconds\n //invoke computerturn\n computerTurn();\n }\n }, 2000);\n }\n return true;\n }", "public void actionPerformed(ActionEvent e){\n\t\t\tstartGame();\n\t\t}", "private void startGame() {\r\n\t\tthis.gameMap.startGame();\r\n\t}", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tSystem.out.println(\"onStart\");\n\t\t\t\tif(listener!=null) listener.onMessage(\"onStart\");\n\t\t\t\tisRun = true;\n\t\t\t}", "public void sendStartGame() {\n \t\tclient.sendTCP(new StartGame());\n \t}", "public void gameInit() {\n lobbyRoom.sendPortToAll();\n lobbyRoom.sendPlayers(game.getCars());\n lobbyRoom.sendTrack(game.getTrack());\n lobbyRoom.sendPowerupManager(game.getManager());\n this.running = true;\n }", "void startGame();", "void startGame();", "void startGame();", "@Override\n\tpublic void start() {\n\t\tif(Boolean.parseBoolean(this.configuration.get(ConfigurationEnum.KEYBOARD_LISTENER_ACTIVE.toString()))){\n\t\t\tthis.keyboardListener.registerNativeHook();\n\t\t\tthis.keyboardListenerIsActive = true;\n\t\t}\n\t\t//If the mouse listener is active by configuration\n\t\tif(Boolean.parseBoolean(this.configuration.get(ConfigurationEnum.MOUSE_LISTENER_ACTIVE.toString()))){\n\t\t\tthis.mouseListener.registerNativeHook();\n\t\t\tthis.mouseListenerIsActive = true;\n\t\t}\n\t\t//If the mouse motion listener is active by configuration\n\t\tif(Boolean.parseBoolean(this.configuration.get(ConfigurationEnum.MOUSE_LISTENER_ACTIVE.toString()))){\n\t\t\tthis.mouseMotionListener.registerNativeHook();\n\t\t\tthis.mouseMotionListenerIsActive = true;\n\t\t}\n\t\t//If the mouse wheel listener is active by configuration\n\t\tif(Boolean.parseBoolean(this.configuration.get(ConfigurationEnum.MOUSE_WHEEL_LISTENER_ACTIVE.toString()))){\n\t\t\tthis.mouseWheelListener.registerNativeHook();\n\t\t\tthis.mouseWheelListenerIsActive = true;\n\t\t}\n\t}", "protected abstract void startListener();", "public void setGameStarted(boolean gameStarted) {\n this.gameStarted = gameStarted; \n }", "private void handleStartGame()\n {\n String name = nameInputLabel.getText();\n if (name != null)\n {\n gameScreen.setPlayerName(name.replaceAll(\";\", \" \").trim());\n }\n else\n {\n gameScreen.setPlayerName(\"\");\n }\n \n // Set the new screen state\n gameScreen.setState(gameScreen.getLevelSplashState());\n }", "public void start() {\n ArrayList<String> names = new ArrayList<>();\n game.initialize(names);\n //game.play(this.mainPkmn, this.attack);\n\n }", "@Override\n public Boolean call() throws RemoteException {\n stateGame = applicationServerGameInterface.startMessage(playerId);\n return true;\n }", "@FXML\n void startGame(ActionEvent event) {\n logic.viewUpdated();\n }", "public boolean gameStart() {\r\n if (game == null) {\r\n board = new Board();\r\n if (ai) {\r\n Logging.log(\"Starting as AI\");\r\n player = new BaasAI(this, \"14ply.book\");\r\n } else {\r\n Logging.log(\"Starting as Human\");\r\n player = new HumanPlayer(this);\r\n }\r\n game = new Game(this);\r\n game.start();\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "private void startGame() {\r\n\t\tlog(mName + \": print an opening message (something useful, it is up to you)\");\r\n\t\tnew Thread(new Host(mRightPercent)).start();\r\n\r\n\t\tfor (Contestant c : Contestant.mGame.getContestants()) {\r\n\t\t\tlog(mName + \": Welcome \" + c.getName() + \" to the game.\");\r\n\t\t\tsynchronized (c.mConvey) {\r\n\t\t\t\tc.mConvey.notify();\r\n\t\t\t}\r\n\r\n\t\t\tsynchronized (intro) {\r\n\t\t\t\twaitForSignal(intro, null);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tsynchronized (Contestant.mGame) {\r\n\t\t\tContestant.mGame.setGameStarted(true);\r\n\t\t\tContestant.mGame.notify();\r\n\t\t}\r\n\t}", "private void StartGameButtonActionPerformed(java.awt.event.ActionEvent evt) {\n StartGame();\n }", "private void startGame() {\n gameCountDownTimer = getGameTimer();\n gameCountDownTimer.start();\n animateBalloonView(balloon1, true);\n animateBalloonView(balloon2, true);\n animateBalloonView(balloon3, true);\n animateBalloonView(balloon4, true);\n animateBalloonView(balloon5, true);\n currentScreenGameState = GameState.PLAYING;\n String controlButtonTitle = getResources().getString(R.string.pause_btn);\n conttroler.setText(controlButtonTitle);\n setCurrentScreenCover();\n invalidateOptionsMenu();\n }", "public boolean startGame() {\n\t\tif(!ackReadyToPlay){\n\t\t\tackReadyToPlay = true;\n\t\t\tSystem.out\n\t\t\t.println(\"PPL: StartGameBean vom typ RESULT empfangen von: \" + jid);\n\t\t\treturn game.playerReadyToPlay(this);\n\t\t}\n\t\treturn false;\n\t}", "public void startGame() {\n\t\tif (chordImpl.getPredecessorID().compareTo(chordImpl.getID()) > 0) {\n\t\t\tGUIMessageQueue.getInstance().addMessage(\"I Start!\");\n\t\t\tshoot();\n\t\t}\n\t}", "public void startListener(){\n new Thread(() -> this.run()).start();\n }", "public void setLaunchGameButtonListener(LaunchGameListener launchGameButtonListener){\r\n\t\tthis.launchGameListener = launchGameButtonListener;\r\n\t}", "@Override\n\tpublic void onGameStarted(String arg0, String arg1, String arg2) {\n\t\t\n\t}", "void addListener(GameEventListener listener);", "public void startGame() {\n running = true;\n\n Thread t = new Thread(animator);\n t.start();\n\n }", "public void startGame(View view) {\r\n start_flg = true;\r\n startLayout.setVisibility(View.INVISIBLE);\r\n\r\n // check if chrono is not running\r\n if (!running) {\r\n chronometer.setBase(SystemClock.elapsedRealtime());\r\n chronometer.start();\r\n running = true;\r\n }\r\n\r\n\r\n if (frameHeight == 0) {\r\n frameHeight = gameFrame.getHeight();\r\n frameWidth = gameFrame.getWidth();\r\n initialFrameWidth = frameWidth;\r\n\r\n boxSize = box.getHeight();\r\n boxX = box.getX();\r\n boxY = box.getY();\r\n }\r\n\r\n frameWidth = initialFrameWidth;\r\n\r\n box.setX(0.0f);\r\n black.setY(3000.0f);\r\n orange.setY(3000.0f);\r\n pink.setY(3000.0f);\r\n\r\n blackY = black.getY();\r\n orangeY = orange.getY();\r\n pinkY = pink.getY();\r\n\r\n box.setVisibility(View.VISIBLE);\r\n black.setVisibility(View.VISIBLE);\r\n orange.setVisibility(View.VISIBLE);\r\n pink.setVisibility(View.VISIBLE);\r\n\r\n timeCount = 0;\r\n score = 0;\r\n String a = \"Score : 0\";\r\n scoreLabel.setText(a);\r\n\r\n\r\n timer = new Timer();\r\n timer.schedule(new TimerTask() {\r\n @Override\r\n public void run() {\r\n if (start_flg) {\r\n handler.post(new Runnable() {\r\n @Override\r\n public void run() {\r\n changePos();\r\n }\r\n });\r\n }\r\n }\r\n }, 0, 20);\r\n }", "public boolean Start(){\r\n\t\tif (this.getGameState().equals(GAMESTATE.READY_TO_START)){\r\n\t\t\tsetGameState(GAMESTATE.RUNNING);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "void gameStarted();", "void gameStarted();", "public void startGameView(View view) {\r\n Log.d(TAG, \"button pressed\");\r\n startTime = System.currentTimeMillis();\r\n\r\n gameRunning = true;\r\n\r\n// startTimer();\r\n startRegTimer();\r\n }", "public void startGame() {\n\t\tfor(Chess.RowConfiguration rowConfiguration : Chess.getRowConfigurations()) {\n\t\t\tint row = rowConfiguration.row;\n\t\t\tClass[] pieceClasses = rowConfiguration.pieces;\n\t\t\tChess.Color sideColor = rowConfiguration.sideColor;\n\n\t\t\tfor(int col = 0; col < Chess.NUM_COLS; col++) {\n\t\t\t\taddPiece(pieceClasses[col], sideColor, board.getSpot(row, col));\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.inPlay = true;\n\t\t\n\t\tstartNewTurn();\n\t\t\n\t\tif(eventListener != null) {\n\t\t\teventListener.onGameStarted();\n\t\t}\n\t}", "public void startGame() {\n\t\t//Start the rendering first\n\t\tgetRenderer().startRendering();\n\t\t\n\t\t//Start the game thread after that.\n\t\tgetGameThread().start();\n\t}", "public void startTurn(GameState turnController)\n\t{\n\t\tthis.turnController = turnController;\n\n\t\tdoneWithTurn = false;\n\t\t\n\t\tthis.updateStats();\n\t\tthis.applyEffects();\n\t}", "public void start() {\n\n\t\t// There will be no established screen at startup.\n\t\tif (screen != null)\n\t\t\tthrow new RuntimeException(\"Multiple instances of the game cannot be run.\");\n\n\t\t// Fire up the main menu screen.\n\t\tsetCurrentScreen(new MainMenuScreen());\n\t}", "public boolean gameStarted() {\n\t\treturn startGame;\n\t}", "private void startGame() {\r\n\t\tthis.lobbyTimerActive = false;\r\n\t\tthis.gameStarted = true;\r\n\t\tthis.queueMessage(\"% START\");\r\n\t\tthis.dealer = new Dealer(this, this.players);\r\n\r\n\t\t// Start the dealer thread\r\n\t\tThread dealerThread = new Thread(dealer);\r\n\t\tdealerThread.start();\r\n\t}", "@Override\n public void onStart() {\n GuiMain gui = new GuiMain(this);\n gui.setVisible(true);\n log(\"Script is starting!\");\n\n }", "@Override\n\tpublic void start() \n\t{\n\t\tServerPoller.getServerPoller().setObserver(this);\n\t\tList<Game> gamelist = Reference.GET_SINGLETON().proxy.getGameList();\n\t\tGameInfo[] games = new GameInfo[gamelist.size()];\n\t\tint counter = 0;\n\t\tfor(Game game: gamelist)\n\t\t{\n\t\t\tGameInfo thisgame = new GameInfo();\n\t\t\tthisgame.setId(game.getId());\n\t\t\tthisgame.setTitle(game.getTitle());\n\t\t\tfor(Player player : game.getPlayers())\n\t\t\t{\n\t\t\t\tPlayerInfo player_info = new PlayerInfo(player);\n\t\t\t\tplayer_info.setColor(player.getColor());\n\t\t\t\tif(!(player.color == null))thisgame.addPlayer(player_info);\n\t\t\t}\n\t\t\tgames[counter] = thisgame;\n\t\t\tcounter++;\n\t\t}\n\n\t\tif (Reference.GET_SINGLETON().getPlayer_color() != null) return;\n\t\tif (!hasChanged(games, oldGames)) return;\n\t\toldGames = games;\n\t\t\n\t\tReference ref = Reference.GET_SINGLETON();\n\t\t\n\t\tPlayerInfo ourguy = new PlayerInfo();\n\t\t\n\t\tourguy.setId(ref.player_id);\n\t\tourguy.setName(ref.name);\n\t\t\n\t\tgetJoinGameView().setGames(games, ourguy);\n\n\t\tif (getJoinGameView().isModalShowing()) getJoinGameView().closeModal();\n\t\tif(!getJoinGameView().isModalShowing())\n\t\t{\n\t\t\tgetJoinGameView().showModal();\n\t\t}\n\t}", "public synchronized void start(){\n\t\tthis.running = true;\n\t\tthis.thread = new Thread(this,\"Game\");\n\t\tthread.start();\n\n\t}", "void startGame(int gameId) {\n game = new Game(gameId);\n }", "public void start(){\n started = true;\n bot.setHumanInputEnabled(false);\n scriptStart();\n }", "public void startGame(){\n\t\tsc = new Scanner(System.in);\n\t\tgui.setScreenID(screenNumber);\n\t\tgui.start();\n\t}", "@Override\n\tpublic void startGame(){\n\t\tsuper.currentPlayer = 1;\n\t}", "public void setGameController(GameController gameController) {\n this.gameController = gameController;\n }", "public PropertyChangeListener[] startGame() {\r\n GameInfo.getInstance().setStatus(1);\r\n return pcs.getPropertyChangeListeners();\r\n }", "private void registerListener(){\n game.addPropertyChangeListener(PROPERTY_GAME, evt -> {\r\n refresh();\r\n });\r\n }", "public GameAboutToStartEvent() {\n this.seconds = FIVE_SECONDS;\n }", "public void startGame() {\r\n\t\t\r\n\t\tmultiplayerPanel.setVisible(false);\r\n\t\tif(waitingPanel != null) waitingPanel.setVisible(false);\r\n\t\tmultiplayerPanel.removeAll();\r\n\t\t\r\n\t\tgameSetupMultiplayer();\r\n\t\t\r\n\t\t\r\n\t}", "void listenAndSwitchNewGame() {\n Button button = findViewById(R.id.newButton2048);\n button.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n boardManager = new BoardManager2048();\n switchToActivity(GameActivity2048.class);\n }\n });\n }", "public void start() {\n\t\tthis.controller.run();\n\t}", "public synchronized void start() {\n\t\trunning=true;\n\t\tnew Thread(this).start();\n\t\t\n\t\tif(JOptionPane.showConfirmDialog(this, \"Do you want to run the server\")==0){\n\t\t\tsocketServer = new GameServer(this);\n\t\t\tsocketServer.start();\n\t\t\t\n\t\t}\n\t\tsocketClient=new GameClient(this, \"localhost\");\n\t\tsocketClient.start();\n\t}", "@RequestMapping(\"/start\")\n public void initialTurn() {\n playerService.initialTurn();\n }", "@Override\r\n\tpublic void start() {\n\t\tthis.controller.start();\r\n\t}", "public void startListening()\n {\n if (!listening) {\n sensorManager.requestTriggerSensor(listener, motion);\n listening = true;\n }\n }", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tsensorManager.registerListener(this, pSensor, SensorManager.SENSOR_DELAY_UI);\n\t\ttester.start();\n\t}", "public void startGame() {\n StartButton = (ImageButton) findViewById(R.id.imageButton_Start); //we are making a new Button\n StartButton.setOnClickListener(new View.OnClickListener() { //when we are pressing the button this will happen\n @Override\n public void onClick(View view) {\n stopPlaying();\n startGameActivity();\n }\n });\n }", "@FXML\n private void startGame(){\n AnchorPane anchorPane = new AnchorPane();\n Scene gameScene = new Scene(anchorPane, 800, 600);\n Stage gameStage = new Stage();\n GameView gameView = new GameView(anchorPane, gameScene, gameStage);\n gameView.gameStart();\n }", "@Override\n public void startGame() {\n timer.scheduleAtFixedRate(new TimerTask() {\n @Override\n public void run() {\n update();\n }\n }, 0, 2);\n }", "protected void listener(Listener listener) {\n Bukkit.getServer().getPluginManager().registerEvents(listener, RedPractice.getInstance());\n }", "private void startGame() {\n betOptionPane();\n this.computerPaquetView.setShowJustOneCard(true);\n blackjackController.startNewGame(this);\n }", "void registerGameStateListener(EngineListener listener);", "StartGameStatus start(Level level);", "@Override\n public void initialize(AppStateManager stateManager, Application app) {\n super.initialize(stateManager, app);\n this.app = (SimpleApplication) app;\n playerNode = (Node) this.app.getRootNode().getChild(Constants.UserData.PLAYER_NODE);\n player = playerNode.getChild(Constants.UserData.PLAYER);\n playerPhysics = player.getControl(BetterCharacterControl.class);\n playerControl = player.getControl(PlayerControl.class);\n isRunning = true;\n\n\n //Set mapping\n inputManager = app.getInputManager();\n inputManager.addMapping(Constants.Mapping.UP, new KeyTrigger(KeyInput.KEY_UP),\n new KeyTrigger(KeyInput.KEY_W));\n inputManager.addMapping(Constants.Mapping.DOWN, new KeyTrigger(KeyInput.KEY_DOWN),\n new KeyTrigger(KeyInput.KEY_S));\n inputManager.addMapping(Constants.Mapping.LEFT, new KeyTrigger(KeyInput.KEY_LEFT),\n new KeyTrigger(KeyInput.KEY_A));\n inputManager.addMapping(Constants.Mapping.RIGHT, new KeyTrigger(KeyInput.KEY_RIGHT),\n new KeyTrigger(KeyInput.KEY_D));\n\n // Add listeners here\n inputManager.addListener(Movement, Constants.Mapping.UP, Constants.Mapping.DOWN,\n Constants.Mapping.LEFT, Constants.Mapping.RIGHT);\n\n }", "public void startGame() {\n\t\tinitChips();\n\t\tassignAndStartInitialProjects();\n\t}", "public static void startGamePlay() {\r\n\t\tif(!STATUS.equals(Gamestatus.PREPARED)) {\r\n\t\t\tSystem.err.println(\"Invalid Gamestatus! Cannot start unprepared gameplay\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\tSTATUS = Gamestatus.RUNNING;\r\n\t\tclock = new GameClock();\r\n\t\tclock.start(GameTickExecutor.DEFAULT_GAMETICK);\r\n\t}", "public void getStart(boolean isGameStarted){\n this.isGameStarted = isGameStarted;\n }", "private void startNewGame() {\n final GameSettingsPanel settings = new GameSettingsPanel();\n settings.addPropertyChangeListener(this);\n final int result = JOptionPane.showOptionDialog(null, settings, \"New Game Settings\",\n JOptionPane.DEFAULT_OPTION,\n JOptionPane.PLAIN_MESSAGE, null, null,\n null);\n\n if (result == 0) {\n settings.applyChanges();\n myWelcome = false;\n setPreferredSize(new Dimension(myWidth, myHeight));\n\n myBoardString = myBoard.toString();\n myGameOver = false;\n myTimer = new Timer(INITIAL_TIMER_DELAY, new TimerListener());\n\n myBoard.addObserver(this);\n firePropertyChange(\"new game\", null, myBoard);\n\n myTimer.start();\n myBoard.newGame();\n enableGamePlayKeys();\n\n }\n }", "protected void notifyStart(\n )\n {\n for(IListener listener : listeners)\n {listener.onStart(this);}\n }", "public Game startGame(Game game);", "public void startNewGame();", "public void Start() \r\n {\r\n // Set the canvas as the current phone's screen\r\n mDisplay.setCurrent(this);\r\n\r\n // we call our own initialize function to setup all game objects\r\n GameInitialize();\r\n\r\n // Here we setup the thread and start it\r\n Thread thread = new Thread(this);\r\n thread.start();\r\n }", "void askStartGame();", "public void playerTurnStart() {\n\r\n\t}", "public void start()\n\t{\n\t\tview.showWindow();\n\t\taddListeners();\n\t}", "public GameController() {\n GameLoop.getInstance();\n }" ]
[ "0.6897829", "0.68804216", "0.6727288", "0.6653285", "0.6570202", "0.6437939", "0.63963354", "0.6359516", "0.6336541", "0.6328113", "0.63271695", "0.63230395", "0.6319155", "0.6314938", "0.62342155", "0.6222789", "0.6214617", "0.62026405", "0.61897886", "0.61254114", "0.60955656", "0.6077463", "0.60672945", "0.60645527", "0.60597014", "0.60589373", "0.6044883", "0.6038605", "0.60034275", "0.5998845", "0.5998845", "0.5998845", "0.59967905", "0.5996719", "0.5982044", "0.59565914", "0.5930727", "0.59199554", "0.59104896", "0.5894882", "0.5886842", "0.5882028", "0.58776784", "0.5875644", "0.58727807", "0.58670634", "0.58654827", "0.5864316", "0.58624434", "0.5861681", "0.58614093", "0.5852196", "0.58354336", "0.58354336", "0.5832614", "0.58215857", "0.5819871", "0.58060557", "0.5805676", "0.58005226", "0.5794327", "0.57873327", "0.5786297", "0.5779843", "0.5774595", "0.57726574", "0.5765646", "0.57605594", "0.5757626", "0.57428753", "0.5723647", "0.57141465", "0.571375", "0.57123303", "0.5708392", "0.57044107", "0.5696593", "0.5695182", "0.5685091", "0.5675983", "0.5670429", "0.5669321", "0.5667338", "0.56626874", "0.5658729", "0.5656038", "0.5655066", "0.56504166", "0.56453264", "0.56430215", "0.5642201", "0.5639103", "0.56382436", "0.5637436", "0.5635683", "0.5627324", "0.5625228", "0.5622498", "0.5616303", "0.56161094" ]
0.6273183
14
if (event.getClickCount() < 2) return;
public void tableClicked(KDTMouseEvent event) { int iIndex = kdtRWOItemSpEntry.getColumnIndex("i"); int colIndex = event.getColIndex(); int rowIndex = event.getRowIndex(); IEnum newIType = null; IRow row = kdtRWOItemSpEntry.getRow(rowIndex); if (iIndex == colIndex) { // I状态 IEnum iType = (IEnum) row.getCell(colIndex).getValue(); if (PublicUtils.equals(IEnum.I, iType)) { newIType = IEnum.H; } else if (PublicUtils.equals(IEnum.H, iType)) { newIType = IEnum.I; } else return; WInfo w = (WInfo) row.getCell("w").getValue(); if (w == null) return; //String typeCode = w.getTypeCode(); for (int i = 0; i < kdtRWOItemSpEntry.getRowCount(); i++) { WInfo newW = (WInfo) kdtRWOItemSpEntry.getRow(i).getCell("w").getValue(); if (newW == null) continue; if (PublicUtils.equals(IEnum.X, kdtRWOItemSpEntry.getRow(i).getCell("i").getValue())) continue; // String newTypeCode = newW.getTypeCode(); if (PublicUtils.equals(w.getNumber(), newW.getNumber())) { kdtRWOItemSpEntry.getRow(i).getCell("i").setValue(newIType); resetItemSpEditorLocked(kdtRWOItemSpEntry.getRow(i)); } } appendItemSpFoot(); // storeFields(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void mouseClicked(MouseEvent e) {\n if (e.getClickCount() == 2) {\n getDoubleClick();\n }\n }", "protected void dopositiveClick2() {\n\n }", "public static void clickEvent() {\n counterClicks += 1;\n }", "@Override\r\n\tpublic void clickSub(int count) {\n\t\t\r\n\t}", "public void clickAction(int clickCount);", "@Override\n public boolean performClick() {\n throwEvents = true;\n return super.performClick();\n }", "public void singleClick() throws Exception {\n }", "public void singleClick() throws Exception {\n }", "@Override\n public void mouseClicked(MouseEvent e) {\n if (e.getClickCount() == 2) { \n openScheduleTable(); \n }\n }", "@Override\n protected void clickAction(int numClicks) {\n exit(true);\n }", "@Override\n public void mouseReleased(MouseEvent e){\n String boton = W.detClick( e.getButton() );\n \n //Obtener cantidad de Clicks\n int clickCont = e.getClickCount();\n \n System.out.println(\"->Mouse: Has soltado Click \" + boton );\n System.out.println(\" Cantidad de Clicks: \" + clickCont );\n }", "public void mouseClicked(MouseEvent e) {\n int modifiers = e.getModifiers();\n int clickCount = e.getClickCount();\n Point point = e.getPoint();\n \n if (super.toolHandler == null) {\n return;\n } else if (!super.toolHandler.supportsTool(ToolBox.TOOL_POINTER)) { // _POINTER because double click should be supported by all that supports the pointer tool.\n return;\n }\n \n if ((modifiers & MouseEvent.BUTTON1_MASK) != 0) {\n if (clickCount == 2) {\n super.toolHandler.doubleClick(point);\n }\n }\n }", "@Override\r\n public void mouseClicked(MouseEvent e) {\n\r\n }", "public void mouseClicked(MouseEvent e)\n\t{\n\t\tif (e.getClickCount() > 1)\n\t\t{\n\t\t\ttoggleFullScreen();\n\t\t}\n\t}", "@SuppressWarnings(\"EmptyMethod\")\n\t@Override\n public boolean performClick() {\n return super.performClick();\n }", "private void button1MouseClicked(MouseEvent e) {\n }", "@Override\n public void mouseClicked(MouseEvent e) {\n if (e.getClickCount()==1) {\n this.datos();\n }\n if (e.getClickCount()==2) {\n this.eliminar(); \n } \n \n }", "public void mouseClicked(MouseEvent e) { \r\n }", "@Override\n public void mouseClicked(MouseEvent e){\n String boton = W.detClick( e.getButton() );\n \n System.out.println(\" Mouse: Click \" + boton ); \n }", "@Override\r\n public void mouseClicked(MouseEvent e) {\n System.out.println(e.getButton());\r\n\r\n // MouseEvent.BUTTON3 es el boton derecho\r\n }", "void contentList_mouseClicked(MouseEvent e) {\n if (e.getClickCount() > 1) {\n doView();\n }\n\n }", "@Override\n public void mouseClicked(MouseEvent e) {\n clicked = true;\n }", "private void button1MouseClicked(MouseEvent e) {\n\t}", "public void mouseClicked(MouseEvent event){\n if (event.getClickCount() == 2) {\r\n //call bookListMethod\r\n bookListMethod();\r\n }\r\n }", "@Override\n public boolean performClick() {\n return super.performClick();\n }", "private void doSelect(MouseEvent e) {\n if (e != null && e.getClickCount() > 1)\n doOK();\n }", "@Override\n public void mouseClicked(MouseEvent e) {\n\n }", "public void mouseClicked(MouseEvent e) {\n\n }", "@Override\n\tpublic boolean tap(float x, float y, int count, int button) {\n\t\treturn false;\n\t}", "public void mouseClicked(MouseEvent e) {\n\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\r\n\t}", "private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {\n }", "private boolean isDoubleClickedElement(MouseEvent evt) {\n\t\tif (evt.getButton() == Constants.LEFT_MOUSE_BUTTON && !aufzugschacht.mainFrameIsAnyButtonSelected) {\n\t\t\tCalendar thisTime = Calendar.getInstance();\n\t\t\tif (clicked) {\n\t\t\t\tlong millis = thisTime.getTimeInMillis();\n\t\t\t\tif (millis - oldTime.getTimeInMillis() < 300) {\n\t\t\t\t\tclicked = false;\n\t\t\t\t\toldTime = thisTime;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\toldTime = thisTime;\n\t\t\t} else {\n\t\t\t\tclicked = true;\n\t\t\t\toldTime = thisTime;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public void mouseClicked(MouseEvent arg0) {\n \n }", "@Override\n\tpublic void onClick(ClickEvent arg0) {\n\t\t\n\t}", "public void mouseClicked(MouseEvent event) { \n\t\t\n\t}", "@Override\n \tpublic void mouseDoubleClicked(MouseEvent me) {\n \t}", "@Override\n public void mouseClicked(MouseEvent e) {\n \n }", "@Override\r\n public void mouseClicked(MouseEvent e) {\n }", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "@Override\r\n public boolean mousePressed(MouseEvent e) {\r\n state = 2;\r\n return true;\r\n }", "public abstract void mouseDoubleClicked(MouseDoubleClickedEvent event);", "@Override\n\tprotected void OnClick() {\n\t\t\n\t}", "public void mouseClicked(MouseEvent e)\n {}", "private static GeneralClickAction clickAndPressBackIfAccidentallyLongClicked() {\n return new GeneralClickAction(\n Tap.SINGLE, GeneralLocation.CENTER, Press.FINGER, ViewActions.pressBack());\n }", "@Override\n public void mouseClicked(MouseEvent e) {\n }", "@Override\n\tpublic void nativeMouseClicked(NativeMouseEvent e) {\n\t\t\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\tif(this.chance==1)\r\n\t\t{\r\n\t\t\tmouseX = arg0.getX();\r\n\t\t\tmouseY= arg0.getY();\r\n\t\t\tclick=1;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "public void mouseClicked(MouseEvent e) { // Methode um MausEvent zu untersuchen\r\n\t\t\t\tclickCounter++;\r\n\t\t\t\tif (clickCounter % 2 == 0) { \r\n\t\t\t\t\tmenu.setVisible(false); // bei 2 klicks geht das menü wieder zu\r\n\t\t\t\t} else {\r\n\t\t\t\t\tpopMenu(); // das popMenu wird aufgerufen\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\r\n\tpublic void clickAdd(int count) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t}", "public void mouseClicked(MouseEvent e) {\n \t\t\r\n \t}", "public void mouseClicked(MouseEvent event){}", "@Override\n public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\r\n\t public boolean longClick() {\n\t return LongClick();\r\n\t }", "private void jButton3MouseClicked(java.awt.event.MouseEvent evt) {\n }", "public void mouseClicked( MouseEvent event ){}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\n\t}", "private void jButton4MouseClicked(java.awt.event.MouseEvent evt) {\n }", "private void jButton4MouseClicked(java.awt.event.MouseEvent evt) {\n }", "@Override\n\tpublic void mouseClicked(MouseEvent e)\n\t{\n\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\r\n\t}", "public void mouseClicked(MouseEvent e) \t{\n\t\t\t\t\r\n\t\t\t}", "private void button1MousePressed(MouseEvent e) {\n }", "@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t}", "public void onClicked();", "public void mouseClicked(int ex, int ey, int button) {\r\n\t}", "public void mouseClicked(MouseEvent event){\n\t\t//Don't do anything, click defined elsewhere\n\t\t//Java clicks are too picky\n\t}", "public void mouseClicked(MouseEvent e) {\n\t}", "public void mouseClicked(MouseEvent e) {\n\t}", "public void mouseClicked(MouseEvent e) {\n\t}", "@Override\r\n\tpublic boolean onDoubleTapEvent(MotionEvent e) {\n\t\treturn false;\r\n\t}" ]
[ "0.74183923", "0.6759659", "0.67134464", "0.6703238", "0.66576153", "0.66223514", "0.6594924", "0.6594924", "0.65758806", "0.6563159", "0.6556339", "0.647464", "0.6442416", "0.63698936", "0.63688636", "0.63169986", "0.631569", "0.63138527", "0.6309551", "0.6309302", "0.6294055", "0.62931895", "0.6291261", "0.6285368", "0.62721187", "0.62698215", "0.6246798", "0.62424886", "0.6239003", "0.62332046", "0.6206234", "0.6206234", "0.62016696", "0.6198579", "0.619821", "0.6176583", "0.6174462", "0.6173678", "0.61724806", "0.61715126", "0.6166458", "0.6166458", "0.6166458", "0.6166458", "0.616437", "0.6162004", "0.6159599", "0.6157081", "0.6152408", "0.61483395", "0.61465555", "0.61447245", "0.61373603", "0.61357623", "0.61357623", "0.61357623", "0.61357623", "0.61357623", "0.61357623", "0.61357623", "0.61357623", "0.61357623", "0.61357623", "0.61357623", "0.61357623", "0.61357623", "0.61357623", "0.61333644", "0.6123349", "0.61219937", "0.61219525", "0.6117902", "0.6116426", "0.61115724", "0.61115724", "0.61054915", "0.60928124", "0.609278", "0.6075769", "0.6075769", "0.6075769", "0.6075769", "0.6075769", "0.6075769", "0.6071076", "0.6071076", "0.607029", "0.60688007", "0.60688007", "0.6067515", "0.60600525", "0.6059237", "0.60563135", "0.6054523", "0.60508126", "0.6036416", "0.6034746", "0.6032862", "0.6032862", "0.6032862", "0.6032786" ]
0.0
-1
KDTSelectManager selectManager = kdTable.getSelectManager(); KDTSelectBlock selectBlock = selectManager.get(0);
private void prmtRepairItem_dataChange(KDTable kdTable, RepairItemEntryInfo[] repairItemEntryInfos) { try { super.isNotNull(); } catch (Exception e) { UIUtils.handUIExceptionAndAbort(e); } if (PublicUtils.isEmpty(txtMile.getText())) { MsgBoxEx.showInfo("进厂行驶里程不能为空"); return; } // if(selectBlock == null) int beginRowIndex = kdTable.getRowCount(); // else beginRowIndex = selectBlock.getBeginRow(); // if (beginRowIndex > 0 && selectBlock == null) // beginRowIndex--; // boolean isFirstRowIndex = true; // 已全部结算,不允许添加数据 try { if (!canChangeBillHeadValue()) { MsgBoxEx.showInfo("已全部结算,不允许添加新项目!"); prmtRepairItem.setValue(null); return; } } catch (Exception exc) { UIUtils.handUIException(exc); } isModify = true; int i = 0; int rowIndex = beginRowIndex; for (int length = repairItemEntryInfos.length; i < length; i++) { RepairItemEntryInfo repairItemEntryInfo = repairItemEntryInfos[i]; RepairItemInfo repairItemInfo = repairItemEntryInfo.getParent(); // repairItemNums = repairItemNums + repairItemInfo.getNumber() + // ";"; /* * if(isFirstRowIndex) { if (beginRowIndex==0) insertLine(kdTable, * rowIndex); else if (kdTable.getCell(rowIndex, * "repairItem").getValue() != null || kdTable.getCell(rowIndex, * "material").getValue() != null) insertLine(kdTable, rowIndex); * * } else { insertLine(kdTable, rowIndex); * * } */ insertLine(kdTable, rowIndex); kdTable.getCell(rowIndex, "repairItem").setValue(repairItemInfo); kdTable.getCell(rowIndex, "t").setValue(TEnum.L); kdTable.getCell(rowIndex, "itemspNum").setValue( repairItemInfo.getNumber()); kdTable.getCell(rowIndex, "itemspName").setValue( repairItemInfo.getName()); kdTable.getCell(rowIndex, "issueQty").setValue(null); kdTable.getCell(rowIndex, "unIssueQty").setValue(null); try { /** 计算标准工时、工时单价、工时成本 */ BigDecimal workTimeQty = getRepairItemWorkTimeQty(repairItemInfo); kdTable.getCell(rowIndex, "worktimeQty").setValue(workTimeQty); kdTable.getCell(rowIndex, "worktimePrice").setValue(workTimeStdPrice); kdTable.getCell(rowIndex, "worktimeCost").setValue(workTimeQty.multiply(workTimeStdPrice)); // 出关联配件 RepairItemSpEntryCollection repairItemSpEntryCol = getRepairItemSPEntryCollection(repairItemInfo); BigDecimal defaultRepairItemTaxPrice = repairItemInfo.getBigDecimal("price"); // 参考售价(含税) if (PublicUtils.equals(repairItemInfo, defaultRepairItemForTXT)) { kdTable.getCell(rowIndex, "price").setValue(BIGDEC0); } else { if (defaultRepairItemTaxPrice != null && defaultRepairItemTaxPrice.compareTo(BIGDEC0) != 0) { BigDecimal taxRate = PublicUtils.getBigDecimal(kdTable.getRow(rowIndex).getCell("taxRate").getValue()); BigDecimal defaultPrice = defaultRepairItemTaxPrice.divide(BIGDEC1.add(taxRate.divide(BIGDEC100,10, BigDecimal.ROUND_HALF_UP)), 10,BigDecimal.ROUND_HALF_UP); kdTable.getCell(rowIndex, "price").setValue(defaultPrice); } else { if (PublicUtils.isEmpty(repairItemSpEntryCol)) { // 无关联配件时 // , // 未设参考售价时 // , // 默认39 // , // 否则为0 kdTable.getCell(rowIndex, "price").setValue(new BigDecimal(39)); } else { kdTable.getCell(rowIndex, "price").setValue(BIGDEC0); } } } if (repairItemInfo.getNumber().startsWith("FDJQ")) { kdTable.getCell(rowIndex, "qty").setValue(new BigDecimal(-1)); } if (rowIndex > 0) { WInfo wInfo = (WInfo) kdTable.getRow(0).getCell("w") .getValue(); if (wInfo != null) { kdTable.getCell(rowIndex, "w").setValue(wInfo); kdtRWOItemSpEntry.getRow(rowIndex).getCell("settlementObject").setValue(wInfo.getSettleObject()); } } calItemSpEntryAmount(kdTable.getRow(rowIndex)); // 维修项目分录ID String repairItemEntryId = ((RepairWORWOItemSpEntryInfo) kdTable.getRow(rowIndex).getUserObject()).getString("id"); rowIndex++; // 自动带出关联配件 if (!PublicUtils.isEmpty(repairItemSpEntryCol)) { String orgId = orgUnitInfo.getString("id"); for (int j = 0; j < repairItemSpEntryCol.size(); j++) { RepairItemSpEntryInfo repairItemSpEntryInfo = repairItemSpEntryCol.get(j); MaterialInfo materialInfo = repairItemSpEntryInfo.getMaterial(); BigDecimal qty = PublicUtils.getBigDecimal(repairItemSpEntryInfo.getBigDecimal("qty")); BigDecimal price = PublicUtils.getBigDecimal(repairItemSpEntryInfo.getBigDecimal("price")); BigDecimal discountRate = PublicUtils.getBigDecimal(repairItemSpEntryInfo.getBigDecimal("discountRate")); BigDecimal costPrice = getMaterialCostPrice(orgId,materialInfo); insertLine(kdTable, rowIndex); kdTable.getCell(rowIndex, "costAmount").setValue(costPrice); kdTable.getCell(rowIndex, "material").setValue(materialInfo); kdTable.getCell(rowIndex, "t").setValue(TEnum.P); kdTable.getCell(rowIndex, "itemspNum").setValue(materialInfo.getNumber()); kdTable.getCell(rowIndex, "itemspName").setValue(materialInfo.getName()); kdTable.getCell(rowIndex, "qty").setValue(qty); String sql = String.format("select isnull(FPrice,0) FPrice,FTaxRate from T_BD_MaterialSales where FMaterialID='%s' and FOrgUnit='%s'", materialInfo.getString("id"), orgUnitInfo.getString("id")); IRowSet rs = DBUtils.executeQuery(null, sql); if (rs != null && rs.next()) { if (rs.getBigDecimal("FTaxRate") != null && !PublicUtils.equals(BigDecimal.ZERO, rs.getBigDecimal("FTaxRate"))) { kdTable.getCell(rowIndex, "taxRate").setValue(rs.getBigDecimal("FTaxRate")); } } BigDecimal retailDiscountRate = BIGDEC0; HashMap<String, BigDecimal> hashDiscountRate = getDiscountRate(); if (!PublicUtils.isEmpty(hashDiscountRate)) { retailDiscountRate = hashDiscountRate.get(DiscountDate_Retail); } kdTable.getCell(rowIndex, "discountRate").setValue(retailDiscountRate); kdTable.getCell(rowIndex, "unIssueQty").setValue(qty); if (rowIndex > 0) { WInfo wInfo = (WInfo) kdTable.getRow(0).getCell("w").getValue(); if (wInfo != null) { kdTable.getCell(rowIndex, "w").setValue(wInfo); kdtRWOItemSpEntry.getRow(rowIndex).getCell("settlementObject").setValue(wInfo.getSettleObject()); } } kdTable.getRow(rowIndex).getCell("itemspName").getStyleAttributes().setLocked(!hasPermission_OprtRetailItemspName); // 关联维修项目参考售价未配置或为0时,关联配件取自身的参考售价,否则为0----取消 // if (defaultRepairItemTaxPrice == null || // defaultRepairItemTaxPrice.compareTo(BIGDEC0) == 0) { // String sql = String.format( // "select isnull(FPrice,0) from T_BD_MaterialSales where FMaterialID='%s' and FOrgUnit='%s'" // , //materialInfo.getString("id"),orgUnitInfo.getString("id" // )); // IRowSet rs = DBUtils.executeQuery(null, sql); // if (rs != null && rs.next()) { // kdTable.getCell(rowIndex, // "price").setValue(rs.getBigDecimal(1)); // // } else { // throw new EASBizException(new // NumericExceptionSubItem( // "",String.format("物料[%s],销售组织[%s]未分配销售页签,请先分配" // ,materialInfo // .getName(),orgUnitInfo.getString("name")))); // } // } else { // kdTable.getCell(rowIndex, "price").setValue(BIGDEC0); // } kdTable.getCell(rowIndex, "price").setValue(price); kdTable.getCell(rowIndex, "discountRate").setValue(discountRate); IRow row = kdTable.getRow(rowIndex); calItemSpEntryAmount(row); // 默认首次计算出初始的实际含税单价 BigDecimal taxPrice = (BigDecimal) row.getCell("taxPrice").getValue(); // 含税 // BigDecimal discountRate = (BigDecimal) // row.getCell("discountRate").getValue(); BigDecimal initFactPrice = taxPrice.multiply(BIGDEC1.subtract(discountRate.divide(BIGDEC100, 10,BigDecimal.ROUND_HALF_UP))); row.getCell("initFactPrice").setValue(initFactPrice); kdTable.getCell(rowIndex, "price").getStyleAttributes().setLocked(!hasPermission_OprtRetailPrice); kdTable.getCell(rowIndex, "taxPrice").getStyleAttributes().setLocked(!hasPermission_OprtRetailPrice); kdTable.getCell(rowIndex, "relateItemEntryId").setValue(repairItemEntryId); resetItemSpEditorLocked(kdTable.getRow(rowIndex)); rowIndex++; } } storeFields(); } catch (Exception e) { UIUtils.handUIException(e); } // isFirstRowIndex = false; } int qtyIndex = kdTable.getColumnIndex("qty"); kdTable.getEditManager().editCellAt(beginRowIndex, qtyIndex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Select getSelect()\n {\n return select;\n }", "@Override\n\tpublic void select() {\n\t}", "private void MenuBlockStartActionPerformed(java.awt.event.ActionEvent evt) {\n BlockStart = this.jTable1.getSelectedRow();\n }", "public void select() {}", "public void select();", "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 }", "Select(){\n }", "List<TbFreightTemplate> selectAll();", "public void select ();", "Select createSelect();", "Object getSelection();", "void diagramSelection(DynamicTable table, String line, int product) {\n\n float longDif = longitudeMaxO - longitudeMinO;\n float latDif = latitudeMaxO - latitudeMinO;\n\n if (longDif > latDif){\n areaDifference = longDif;\n } else {\n areaDifference = latDif;\n }\n areaDifference = ec.ceiling(areaDifference,0);\n\n //................FLOOR VALUE - ........................\n float latitudeMin = ec.floor(latitudeMinO,0);\n float longitudeMin = ec.floor(longitudeMinO,0);\n\n //................CEILING ......................\n float latitudeMax = ec.ceiling(latitudeMaxO,0);\n float longitudeMax = ec.ceiling(longitudeMaxO,0);\n\n // ....... Initialize the value of the areadifference ARRAY[] .............\n for (int tf = 0; tf < sc.MAX1; tf++) {\n if ((tf+1) == areaDifference) {\n trueFalse[tf] = \"true\";\n } else {\n trueFalse[tf] = \"\";\n } // if (tf == areaDifference)\n } // for int tf\n\n //................CREATE SELECT BOXES.................\n Select tableSelect = new Select(sc.TABLESIZE +\n \"\\\" onChange=\\\"updateMenus(this); updatePTable(this); \" +\n \"writeIt(plongitudewest.value,platitudenorth.value,ptable.value)\");\n tableSelect.addOption(new Option(\"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \" +\n \"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \" +\n \"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \" +\n \"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"));\n tableSelect.addOption(new Option(\"\"));\n tableSelect.addOption(new Option(\"\"));\n\n Select blockSelect = new Select(sc.BLOCKSIZE);\n blockSelect.addOption(new Option(\"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \" +\n \"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \" +\n \"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \" +\n \"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"));\n blockSelect.addOption(new Option(\"\"));\n blockSelect.addOption(new Option(\"\"));\n if (dbg) System.out.println(\"blocksize <br>\");\n\n //................IF STATEMENT for DIAGRAM................\n\n if ( (product == INVEN) || (product == MEANS) ) { // inventories, means\n\n //................DIAGRAM:................\n String latNJavaScript = \"\\\" onChange=\\\"writeIt(\" + sc.LONGITUDEWEST +\n \".value,\" + sc.LATITUDENORTH + \".value,ptable.value);\\\"\\n\";\n String latSJavaScript = \"\\\" onFocus=\\\"this.blur()\";\n String lonWJavaScript = \"\\\" onChange=\\\"writeIt(\" + sc.LONGITUDEWEST +\n \".value,\" + sc.LATITUDENORTH + \".value,ptable.value);\\\"\\n\";\n String lonEJavaScript = \"\\\" onFocus=\\\"this.blur()\";\n\n table.addRow(ec.latlonRangeInput(\n \"Select Top right Corner\",\n 6,\n new Float (latitudeMin).toString(),\n new Float (latitudeMax).toString(),\n new Float (longitudeMin).toString(),\n new Float (longitudeMax).toString(),\n \"<b><font color=green>N</font></b>\", \"<b>S</b>\",\n \"<b><font color=green>W</font></b>\", \"<b>E</b>\",\n latNJavaScript, latSJavaScript,\n latNJavaScript, latSJavaScript,\n \"\"));\n //BREAKS\n table.addRow(ec.crSpanColsRow(\"<br>\",2));\n\n //TABLE SIZE input box\n //TextField txt2 = new TextField(sc.TABLESIZE, 10, 10, \"\");\n table.addRow(ec.cr2ColRow(\n \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" +\n \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" +\n chFSize(\"Table Size:<br><i>(degrees square)</i>\",\"-1\"),\n tableSelect.toHTML()));\n\n //BLOCK SIZE Size input box\n //txt2 = new TextField(sc.BLOCKSIZE, 10, 10, \"\");\n table.addRow(ec.cr2ColRow(\n \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" +\n \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" +\n chFSize(\"Block Size: <br><i>(minutes square)</i>\",\"-1\"),\n blockSelect.toHTML()));\n //BREAKS\n table.addRow(ec.crSpanColsRow(\"<br>\",2));\n\n if (dbg) System.out.println(\"blockSelect = \" + blockSelect + \"<br>\");\n\n } else { // ROSES, HISTO, SCATT, TIMES\n\n //................DIAGRAM:................\n table.addRow(ec.latlonRangeInput(\n \"Enter Range Selection\",\n 6,\n new Float (latitudeMin).toString(),\n new Float (latitudeMax).toString(),\n new Float (longitudeMin).toString(),\n new Float (longitudeMax).toString(),\n \"<b><font color=green>N</font></b>\",\n \"<b><font color=green>S</font></b>\",\n \"<b><font color=green>W</font></b>\",\n \"<b><font color=green>E</font></b>\",\n \"\", \"\", \"\", \"\", \"\"));\n table.addRow(ec.crSpanColsRow(\"<br>\",2));\n\n } // if ((product == 1) ...\n }", "public void selectDeal() {\n\t}", "public abstract ETreeTableRecord<T> getSelectedRecord();", "public void widgetSelected(SelectionEvent e) {\n table.setSelection(new TableItem[]{cursor.getRow()});\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n mAdapter.setSelectPosition(position);\n if (mAdapter.getSelectTable() != null) {\n if (mAdapter.getSelectTable().lock) {\n Toast.makeText(getActivity(),\"餐桌被锁\",Toast.LENGTH_LONG).show();\n return;\n }\n mAdapter.notifyDataSetChanged();\n mChangeTableFragment.displayView(mChangeTableFragment.SECOND_STEP);\n }\n }", "public int getSelectedLayer ()\n {\n return _table.getSelectedRow();\n }", "public SelectStatement getSelectStatement() {\r\n return selectStatement;\r\n }", "public final CQLParser.selectionBlock_return selectionBlock() throws RecognitionException {\n CQLParser.selectionBlock_return retval = new CQLParser.selectionBlock_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token SELECT1=null;\n Token FROM2=null;\n Token ID3=null;\n Token char_literal4=null;\n CQLParser.labelDefinition_return l = null;\n\n CQLParser.selectionBlockDefinition_return sd = null;\n\n CQLParser.selectionBlockOptions_return so = null;\n\n\n Object SELECT1_tree=null;\n Object FROM2_tree=null;\n Object ID3_tree=null;\n Object char_literal4_tree=null;\n RewriteRuleTokenStream stream_110=new RewriteRuleTokenStream(adaptor,\"token 110\");\n RewriteRuleTokenStream stream_FROM=new RewriteRuleTokenStream(adaptor,\"token FROM\");\n RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,\"token ID\");\n RewriteRuleTokenStream stream_SELECT=new RewriteRuleTokenStream(adaptor,\"token SELECT\");\n RewriteRuleSubtreeStream stream_selectionBlockDefinition=new RewriteRuleSubtreeStream(adaptor,\"rule selectionBlockDefinition\");\n RewriteRuleSubtreeStream stream_selectionBlockOptions=new RewriteRuleSubtreeStream(adaptor,\"rule selectionBlockOptions\");\n RewriteRuleSubtreeStream stream_labelDefinition=new RewriteRuleSubtreeStream(adaptor,\"rule labelDefinition\");\n errorMessageStack.push(\"SELECT block\"); \n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:192:2: ( SELECT FROM ID l= labelDefinition sd= selectionBlockDefinition so= selectionBlockOptions ';' -> ^( SELECT ^( DATA_SOURCE ID ) $l $sd $so) )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:192:4: SELECT FROM ID l= labelDefinition sd= selectionBlockDefinition so= selectionBlockOptions ';'\n {\n SELECT1=(Token)match(input,SELECT,FOLLOW_SELECT_in_selectionBlock293); \n stream_SELECT.add(SELECT1);\n\n FROM2=(Token)match(input,FROM,FOLLOW_FROM_in_selectionBlock295); \n stream_FROM.add(FROM2);\n\n ID3=(Token)match(input,ID,FOLLOW_ID_in_selectionBlock297); \n stream_ID.add(ID3);\n\n pushFollow(FOLLOW_labelDefinition_in_selectionBlock301);\n l=labelDefinition();\n\n state._fsp--;\n\n stream_labelDefinition.add(l.getTree());\n pushFollow(FOLLOW_selectionBlockDefinition_in_selectionBlock305);\n sd=selectionBlockDefinition();\n\n state._fsp--;\n\n stream_selectionBlockDefinition.add(sd.getTree());\n pushFollow(FOLLOW_selectionBlockOptions_in_selectionBlock309);\n so=selectionBlockOptions();\n\n state._fsp--;\n\n stream_selectionBlockOptions.add(so.getTree());\n char_literal4=(Token)match(input,110,FOLLOW_110_in_selectionBlock311); \n stream_110.add(char_literal4);\n\n\n\n // AST REWRITE\n // elements: l, ID, so, sd, SELECT\n // token labels: \n // rule labels: retval, so, sd, l\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n RewriteRuleSubtreeStream stream_so=new RewriteRuleSubtreeStream(adaptor,\"rule so\",so!=null?so.tree:null);\n RewriteRuleSubtreeStream stream_sd=new RewriteRuleSubtreeStream(adaptor,\"rule sd\",sd!=null?sd.tree:null);\n RewriteRuleSubtreeStream stream_l=new RewriteRuleSubtreeStream(adaptor,\"rule l\",l!=null?l.tree:null);\n\n root_0 = (Object)adaptor.nil();\n // 193:3: -> ^( SELECT ^( DATA_SOURCE ID ) $l $sd $so)\n {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:193:6: ^( SELECT ^( DATA_SOURCE ID ) $l $sd $so)\n {\n Object root_1 = (Object)adaptor.nil();\n root_1 = (Object)adaptor.becomeRoot(stream_SELECT.nextNode(), root_1);\n\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:193:15: ^( DATA_SOURCE ID )\n {\n Object root_2 = (Object)adaptor.nil();\n root_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(DATA_SOURCE, \"DATA_SOURCE\"), root_2);\n\n adaptor.addChild(root_2, stream_ID.nextNode());\n\n adaptor.addChild(root_1, root_2);\n }\n adaptor.addChild(root_1, stream_l.nextTree());\n adaptor.addChild(root_1, stream_sd.nextTree());\n adaptor.addChild(root_1, stream_so.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n errorMessageStack.pop(); \n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "public void select(String data, String objectName) {\n\t\n}", "SELECT createSELECT();", "@Override\n public void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\ttable.setSelection(new TableItem[] {tcursor.getRow()});\n\t\t\t}", "String getSelect();", "String getSelect();", "ErpOaLicKey selectByPrimaryKey(String licFlow);", "public void selectB() { }", "public void selectSlot() {\n\t\t\r\n\t}", "ApiSubCtgrVO selectApiSubCtgr(ApiSubCtgrRequest.ApiSubCtgrDetilRequest apiSubCtgrDetilRequest);", "@Override\n public void selectGolem(int id) {\n }", "void defSelect(Variable var){\r\n \t//if (isSelectAll()){\r\n \t\taddSelect(var);\r\n \t//}\r\n }", "public void widgetSelected(SelectionEvent e)\n\t\t\t{\n\t\t\t\tif (tmDataSourceFormComposite.getDataSourceInstances() == null)\n\t\t\t\t\treturn;\n\t\t\t\tCursor hglass = new Cursor(getDisplay(), SWT.CURSOR_WAIT);\n\t\t\t\tCursor arrow = new Cursor(getDisplay(), SWT.CURSOR_ARROW);\n\t\t\t\tsetCursor(hglass);\n\t\t\t\ttranslateSegment(getIOldSegmentPosition());\n\t\t\t\tshowAltTrans(getIOldSegmentPosition(), 0, 0);\n\t\t\t\tsetCursor(arrow);\n\t\t\t}", "@Override\r\n\tprotected Object getSelectData() {\n\t\treturn null;\r\n\t}", "public void selectAllAccessibleSelection() {\n // To be fully implemented in a future release\n }", "private Object getTable() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "Block getHiveBlock();", "public datakontrak() {\n initComponents();\n this.setLocationRelativeTo(this);\n tb_kontrak.changeSelection(0, 0, true, false);\n }", "public void select()\n {\n super.select();\n SwingUtilities.invokeLater(() -> _sqlPanel.getSQLEntryPanel().requestFocus());\n }", "@Override\n public KlantBedrijf select(int id) {\n return null;\n }", "public void parseSelect(StatementTree sTree) {\r\n\r\n\t}", "private void selectLastUsed() {\n // Set the initial selection of the table:\n if (initSelection != null) {\n boolean found = false;\n for (int i = 0; i < table.getRowCount(); i++) {\n if (tableModel.getElementAt(i).getFile().getPath().\n equals(initSelection)) {\n table.setRowSelectionInterval(i, i);\n found = true;\n break;\n }\n }\n if (!found && (table.getRowCount() > 0)) {\n table.setRowSelectionInterval(0, 0);\n }\n }\n else {\n if (table.getRowCount() > 0) {\n table.setRowSelectionInterval(0, 0);\n }\n }\n }", "public Block getBlock(int index){\n\t\treturn ds[index];\n\t}", "public SelectionKey getSelectionKey(){\n return key;\n }", "public Object getTablePelanggan() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public DataPoint getSelDataPoint() { return _selPoint; }", "public Table getSelectedTable() {\n Integer id = (Integer)super.getSelectedItem();\n if (id == null) {\n return null;\n }\n try {\n return tableHome.getTable(id.intValue());\n }\n catch (PersistenceException ex) {\n // Cas impossible : Le model contient obligatoirement des Id valide\n ex.printStackTrace();\n return null;\n }\n }", "private void setTableSingleSelection() {\n stuffTable.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );\n employeeTable.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );\n sellerTable.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );\n salesmanTable.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );\n customerTable.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );\n commisionerTable.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );\n WarehouseTB.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );\n ContainerTB.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );\n ProducerTable.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );\n SaleTable.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );\n PurchaseTable.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );\n SalaryTable.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );\n IncomeTable.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );\n OutcomeTable.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );\n DebtTable.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );\n CreditTable.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );\n }", "protected abstract void select();", "@Test(timeout = 4000)\n public void test39() throws Throwable {\n DynamicSelectModel dynamicSelectModel0 = new DynamicSelectModel();\n StandaloneComponent standaloneComponent0 = dynamicSelectModel0.getTopLevelComponent();\n assertNull(standaloneComponent0);\n }", "public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void onSelect(Statement select, Connection cx, SimpleFeatureType featureType) throws SQLException {\r\n }", "MCTS.State select(MCTS.State node);", "TbFreightTemplate selectByPrimaryKey(Long id);", "@Override\n public Collection<KlantBedrijf> select() {\n return null;\n }", "public void selectAt(MouseEvent e) {\r\n \t\tactivateSelect();\r\n \t\tmouseListner.mousePressed(e);\r\n \t}", "@Override\n SqlSelect wrapSelect(SqlNode node) {\n throw new UnsupportedOperationException();\n }", "@Test\n public void testORMUsageToretrieveBlocks() throws DataloadGeneratorException {\n List<BlockDefEntityWrap> tbsBlockEntity = getTbsBlockEntity();\n// System.out.println(\"BlockDiagCodeMappingTEntity - \" + tbsBlockSaved);\n System.out.println(\"BlockDefTEntity - \" + tbsBlockEntity);\n// assertNotNull(tbsBlockSaved);\n }", "public DBState() {\n\t\t\tthis.expandedElements=treeViewer.getExpandedElements();\n\t\t\tthis.treeSelection=treeViewer.getSelection();\n\t\t\tthis.tableSelection=txTableViewer.getSelection();\n\t\t}", "public void updateSelection() {\n\t\t\n\t}", "private void geselecteerdSymbool()\n {\n /**\n * selecteren van vak\n */\n vulKeuzeBordIn();\n GraphicsContext gc = canvasKeuzeveld[0][keuzeID].getGraphicsContext2D();\n tekenRechtHoek(gc, 0, 0, 30, 30, Color.RED);\n }", "@Override\n\tpublic ElectricalCheck select(ElectricalCheck entity) {\n\t\treturn null;\n\t}", "@FXML\r\n void PlacementSelect(MouseEvent event) {\r\n \t p=TablePlacement.getSelectionModel().getSelectedItem();\r\n \t\tSelectedPlacement.setText(p.toString());\r\n \t\tNote.setText(p.getNote());\r\n \t\t\r\n }", "int getBlockId();", "protected void initializer() {\n\t\tselect = new DBSelect();\n\t\ttry {\n\t\t\tselect.setDriverName(\"com.ibm.as400.access.AS400JDBCDriver\");\n\t\t\tselect.setUrl(\"jdbc:as400://192.168.101.14\");\n\t\t\tselect.setCommand(\n\t\t\t\"SELECT DISTINCT artitda.codaat, articulo.descma, articulo.des1ma, articulo.des2ma, articulo.unvema, SUBSTR(VARCHAR(ARTITDA.CODAAT), 1, 2) as departamento, SUBSTR(VARCHAR(ARTITDA.CODAAT), 3, 2) as lineaseccion, costos.coslllca, artitda.prevat, artitda.impuat as impuesto, articulo.empvma as empaque, articulo.povema as descuentoempaque, articulo.deemma as descuentoempleado, articulo.esrema, articulo.fecama \t\t\tFROM SISTEMA.ARTICULO as articulo inner join COMPRAS.LMLCA03 as costos on (articulo.codama = costos.artillca) inner join COMPRAS.ARTITDA as artitda on (articulo.codama = artitda.codaat) \t\t\tWHERE artitda.codaat IN (SELECT articulo.codama FROM SISTEMA.ARTICULO as articulo, COMPRAS.ARTITDA as artitda \t\t\tWHERE (CAST (ARTITDA.TIENAT AS SMALLINT) = 3) AND (ARTICULO.ESREMA = 'V') AND (ARTITDA.EXACAT <> 0) AND ((SUBSTR(VARCHAR(ARTITDA.CODAAT), 1, 2) = '90') OR (ARTITDA.CODAAT < 3500000)) and (articulo.codama = artitda.codaat) )\"); \n\t\t\t\t//\"SELECT * FROM COMPRAS.ARTITDA, SISTEMA.ARTICULO WHERE (COMPRAS.ARTITDA.CODAAT = SISTEMA.ARTICULO.CODAMA) AND (CAST (COMPRAS.ARTITDA.TIENAT AS SMALLINT) = 3) AND (SISTEMA.ARTICULO.ESREMA = 'V') AND (COMPRAS.ARTITDA.EXACAT <> 0) AND ((SUBSTR(VARCHAR(COMPRAS.ARTITDA.CODAAT), 1, 2) = '90') OR (COMPRAS.ARTITDA.CODAAT < 3500000))\");\n\t\t\t//\"SELECT count(*) FROM SISTEMA.ARTICULO as articulo inner join COMPRAS.ARTITDA as artitda on (articulo.codama = artitda.codaat) WHERE (CAST (ARTITDA.TIENAT AS SMALLINT) = 3) AND (ARTICULO.ESREMA = 'V') AND (ARTITDA.EXACAT <> 0) AND ((SUBSTR(VARCHAR(ARTITDA.CODAAT), 1, 2) = '90') OR (ARTITDA.CODAAT < 3500000))\"\t\t\t\n\t\t\t//DBParameterMetaData parmMetaData = select.getParameterMetaData();\n\t\t} catch (SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public Expression getSelectExpression() {\n return select;\n }", "@Override\n protected void processSelect() {\n \n }", "@Override\r\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "public JwSqlSelect getSelect()\n {\n JwSqlSelect st = createSelect();\n populateSelectColumnsToCompose(st, ALIAS);\n st.from(TABLE, ALIAS);\n return st;\n }", "public JwSqlSelect getSelect()\n {\n JwSqlSelect st = createSelect();\n populateSelectColumnsToCompose(st, ALIAS);\n st.from(TABLE, ALIAS);\n return st;\n }", "@Deprecated public Block getBlock(){\n return this.block!=null?this.block.build():null;\n }", "void select();", "public jHistorialSeleccionarVoluntario() {\n initComponents();\n \n \n }", "private void initView() {\n mGridView = (GridView) view.findViewById(R.id.gridViewTables);\n mAdapter = new TableManageAdapter(getActivity(), MainScreenActivity.CHANGE_TABLE_FRAGMENT);\n mGridView.setAdapter(mAdapter);\n mGridView.setOnItemClickListener(new OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n // TODO Auto-generated method stub\n mAdapter.setSelectPosition(position);\n if (mAdapter.getSelectTable() != null) {\n if (mAdapter.getSelectTable().lock) {\n Toast.makeText(getActivity(),\"餐桌被锁\",Toast.LENGTH_LONG).show();\n return;\n }\n mAdapter.notifyDataSetChanged();\n mChangeTableFragment.displayView(mChangeTableFragment.SECOND_STEP);\n }\n }\n });\n }", "private void selectDetailWithMouse() {\n int selectedRowIndex=jt.convertRowIndexToModel(jt.getSelectedRow());\n String[] choices={\"Update Row\",\"Delete\",\"Cancel\"};\n int option=JOptionPane.showOptionDialog(rootPane, \"Product ID: \"+jtModel.getValueAt(selectedRowIndex, 0).toString()+\"\\n\"+\"Product Name: \"+jtModel.getValueAt(selectedRowIndex,1), \"View Data\", WIDTH, HEIGHT,null , choices, NORMAL);\n if(option==0)\n {\n tfPaintId.setText(jtModel.getValueAt(selectedRowIndex,0).toString());\n tfName.setText(jtModel.getValueAt(selectedRowIndex, 1).toString());\n tfPrice.setText(jtModel.getValueAt(selectedRowIndex, 2).toString());\n tfColor.setText(jtModel.getValueAt(selectedRowIndex, 3).toString());\n tfQuantity.setText(jtModel.getValueAt(selectedRowIndex, 8).toString());\n rwCombo.setSelectedItem(jtModel.getValueAt(selectedRowIndex, 4));\n typeCombo.setSelectedItem(jtModel.getValueAt(selectedRowIndex, 6));\n bCombo.setSelectedItem(jtModel.getValueAt(selectedRowIndex, 5));\n switch(jtModel.getValueAt(selectedRowIndex, 7).toString()) {\n case \"High\":\n high.setSelected(true);\n break;\n case \"Mild\":\n mild.setSelected(true);\n break;\n case \"Medium\":\n medium.setSelected(true);\n break;\n }\n }\n else if(option==1)\n {\n jtModel.removeRow(selectedRowIndex);\n JOptionPane.showMessageDialog(rootPane,\" Detail successfully deleted\");\n }\n else \n {\n \n } \n }", "@Override\n public void widgetDefaultSelected(SelectionEvent selectionEvent) {\n }", "@Override\n public void widgetDefaultSelected(SelectionEvent selectionEvent) {\n }", "@Override\n public void widgetDefaultSelected(SelectionEvent selectionEvent) {\n }", "@Override\n public void widgetDefaultSelected(SelectionEvent selectionEvent) {\n }", "@Override\n public void widgetDefaultSelected(SelectionEvent selectionEvent) {\n }", "@Override\n public void widgetDefaultSelected(SelectionEvent selectionEvent) {\n }", "default public void clickSelect() {\n\t\tremoteControlAction(RemoteControlKeyword.SELECT);\n\t}", "public QLDSV() {\n initComponents();\n this.setLocationRelativeTo(null);\n cn = ConnectSQL.ketnoi(\"FPL_DAOTAO\");\n model = (DefaultTableModel) tblShow.getModel();\n loadData();\n display(0);\n tblShow.setRowSelectionInterval(0, 0);\n\n }", "public void consoleSelectItem() throws SQLException{\n System.out.println(\"came here\");\n ConsoleClass obj = new ConsoleClass();\n String item = console_actionItemList.getSelectionModel().getSelectedItem();\n obj.consoleSelectItem(this,item);\n }", "private JXTable getSelectedTable() {\n JScrollPane scrollPane = (JScrollPane) closeableTabbedPane1.getSelectedComponent();\n\n return (JXTable) scrollPane.getViewport().getView();\n }", "public CellSelection getSelectCell() {\n return selection;\n }", "public K select(int k);", "public Block getBlock() {\n return (Block)getChild(0);\n }", "HelpInfo selectByPrimaryKey(Integer hId);", "private void ini_SelectDB()\r\n\t{\r\n\r\n\t}", "@Override\n\tpublic ResultSet select() {\n\t\treturn null;\n\t}", "@Override\n public byte[] getSelectedData() {\n return null;\n }", "protected Block getBlock() {\r\n return this.block;\r\n }", "@Override\r\n\tpublic List<GbAttachDto> gbViewSelect2(String br_uuid) {\n\t\treturn null;\r\n\t}", "public List<ErpBookInfo> selData();", "public void selectCt(Integer index) {\n\t\tlog.info(\"-----selectCt()-----\");\n\t\tlog.info(String.format(\"-----selected: %s\", selected.getCtTraKho().getCttrakhoThutu()));\n\t\t//int index = selected.getCtXuatKho().getCtxuatkhoThutu().intValue() - 1;\n\t\tTonKho tk = selected.getTonKho();\n\t\tCtTraKho ctx = selected.getCtTraKho();\n\t\tupdateItem = index;\n\t\ttonkhoMa = tk.getTonkhoMa().toString();\n\t\tlog.info(\"-----ton kho: \" + tonkho);\n\t\t\n\t\t//DecimalFormat df = new DecimalFormat(\"###.##\");\n\t\ttonkho = tk.getTonkhoTon();\n\t\tdmtMa = ctx.getDmthuocMaso().getDmthuocMa();\n\t\txuat = ctx.getCttrakhoSoluong();\n\t\t\n\t}", "public Object getSelection() {\n return selection;\n }", "public int getSelectionMode() {\n/* 2902 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "IProductInfo getM_piSelectedItem();", "public BlockStmt\ngetInitiationPart();", "Kaiwa selectByPrimaryKey(String maht);", "@Test\r\n public void getSelectAsSdt() throws Exception\r\n {\n final String HTML = \"\\n <html>\\n <select name='ComboBox' size='1'>\\n <option value='val1'>item1</option>\\n <option value='val2'></option> \\n </select>\\n </html>\\n \";\r\n\r\n HtmlLoadOptions htmlLoadOptions = new HtmlLoadOptions();\r\n htmlLoadOptions.setPreferredControlType(HtmlControlType.STRUCTURED_DOCUMENT_TAG);\r\n\r\n Document doc = new Document(new MemoryStream(Encoding.getUTF8().getBytes(HTML)), htmlLoadOptions);\r\n NodeCollection nodes = doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG, true);\r\n\r\n StructuredDocumentTag tag = (StructuredDocumentTag) nodes.get(0);\r\n //ExEnd\r\n\r\n Assert.assertEquals(2, tag.getListItems().getCount());\r\n\r\n Assert.assertEquals(\"val1\", tag.getListItems().get(0).getValue());\r\n Assert.assertEquals(\"val2\", tag.getListItems().get(1).getValue());\r\n }", "@Override\r\n\tpublic void adminSelectUpdate() {\n\t\t\r\n\t}" ]
[ "0.5787117", "0.55516404", "0.5533364", "0.55135757", "0.5369034", "0.53654176", "0.5347834", "0.53313607", "0.5290957", "0.52807844", "0.5270662", "0.52602524", "0.5256539", "0.52512264", "0.52269727", "0.5222093", "0.5216575", "0.52134794", "0.5213459", "0.5208335", "0.5207481", "0.51796484", "0.51727825", "0.51727825", "0.51678663", "0.5164326", "0.51579934", "0.5154859", "0.514551", "0.5132217", "0.51125276", "0.5104601", "0.5100265", "0.509822", "0.509406", "0.5092136", "0.50916106", "0.50877917", "0.50747085", "0.5063151", "0.50629824", "0.5059769", "0.5057896", "0.5046178", "0.50433713", "0.502538", "0.50217885", "0.4996822", "0.4994612", "0.4993442", "0.4990299", "0.4971584", "0.4970953", "0.49633145", "0.49623743", "0.49578822", "0.49576256", "0.4937902", "0.49342215", "0.49334437", "0.4924302", "0.4919831", "0.49100506", "0.49092513", "0.4901483", "0.48994702", "0.4898439", "0.4898439", "0.48939264", "0.48908296", "0.48904565", "0.4889462", "0.48735592", "0.487342", "0.487342", "0.487342", "0.487342", "0.487342", "0.487342", "0.4869469", "0.48680884", "0.485071", "0.4847968", "0.48478997", "0.48467892", "0.4846753", "0.48390323", "0.48340747", "0.4830526", "0.48265406", "0.4823432", "0.4822634", "0.48184168", "0.48147812", "0.4813716", "0.480729", "0.48037955", "0.48006034", "0.4800214", "0.4799955", "0.4795973" ]
0.0
-1
kdtRWOItemSpEntry.getColumn("originalEntryId").getStyleAttributes(). setHided(false); kdtRWOItemSpEntry.getColumn("originalQty").getStyleAttributes(). setHided(false);
@Override public void actionSplitLine_actionPerformed(ActionEvent e) throws Exception { // kdtRWOItemSpEntry.getColumn("originalQty").getStyleAttributes(). // setHided(false); if (PublicUtils.isEmpty(editData.getString("id"))) { throw new EASBizException(new NumericExceptionSubItem("", "未保存工单,不允许分担!")); } if (!PublicUtils.equals(getOprtState(), OprtState.EDIT)) { throw new EASBizException(new NumericExceptionSubItem("", "非修改状态,不允许分担!")); } Integer[] iSel = KDTableUtils.getSelectedRowIndex(kdtRWOItemSpEntry, false); int selRowIndex = iSel[0].intValue(); IRow selRow = kdtRWOItemSpEntry.getRow(selRowIndex); TEnum tType = (TEnum) selRow.getCell("t").getValue(); IEnum iType = (IEnum) selRow.getCell("i").getValue(); BigDecimal unIssueQty = PublicUtils.getBigDecimal(selRow.getCell( "unIssueQty").getValue()); BigDecimal qty = PublicUtils.getBigDecimal(selRow.getCell("qty") .getValue()); if (qty.compareTo(BIGDEC0) == 0) { throw new EASBizException(new NumericExceptionSubItem("", "数量为0的数据行,不允许分担!")); } if (PublicUtils.equals(TEnum.P, tType) && unIssueQty.compareTo(BIGDEC0) != 0) { // 配件行 throw new EASBizException(new NumericExceptionSubItem("", "配件未完全出库,不允许分担!")); } if (PublicUtils.equals(IEnum.X, iType)) { throw new EASBizException(new NumericExceptionSubItem("", "已结账数据行,不允许分担!")); } Map uictx = new HashMap(); uictx.put("ui", this); uictx.put("kdtable", kdtRWOItemSpEntry); uictx.put("originalRow", selRow); BigDecimal amount = PublicUtils.getBigDecimal(selRow.getCell("amount") .getValue()); String itemspName = (String) selRow.getCell("itemspName").getValue(); IUIFactory iUIFactory = UIFactory.createUIFactory(UIFactoryName.MODEL); IUIWindow iUIWindowSizesHEdit = iUIFactory.create( RepairWOAllocateExpenseUI.class.getName(), uictx); RepairWOAllocateExpenseUI allocateExpenseUI = (RepairWOAllocateExpenseUI) iUIWindowSizesHEdit .getUIObject(); allocateExpenseUI.setUITitle(String.format("[%s]", itemspName)); iUIWindowSizesHEdit.show(); for (int i = 0; i < kdtRWOItemSpEntry.getRowCount(); i++) { IRow row = kdtRWOItemSpEntry.getRow(i); RepairWORWOItemSpEntryInfo itemSpEntryInfo = (RepairWORWOItemSpEntryInfo) row .getUserObject(); if (itemSpEntryInfo != null && PublicUtils.isEmpty(itemSpEntryInfo.getString("id"))) itemSpEntryInfo.setId(BOSUuid.create("FF1F0E1A")); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void hideColumn() {\n remindersTable.getColumnModel().getColumn(0).setMinWidth(0);\n remindersTable.getColumnModel().getColumn(0).setMaxWidth(0);\n remindersTable.getColumnModel().getColumn(0).setWidth(0);\n }", "public void getGroupHideColumn() {\r\n\t\tString showHide = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(WsrdConstants.HIDESHOWCOLUMN);\r\n\t\tif(showHide.equalsIgnoreCase(WsrdConstants.SHOW_AUTHOR_INFO)) {\r\n\t\t\twsrdModel.setGroupShowHide(WsrdConstants.HIDE_AUTHOR_INFO);\r\n\t\t\twsrdModel.setShowHideFlag(true);\r\n\t\t}\r\n\t\tif(showHide.equalsIgnoreCase(WsrdConstants.HIDE_AUTHOR_INFO)) {\r\n\t\t\twsrdModel.setGroupShowHide(WsrdConstants.SHOW_AUTHOR_INFO);\r\n\t\t\twsrdModel.setShowHideFlag(false);\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void addNoFields() {\n fieldTable.addStyleName(\"hidden\");\n noFields.removeStyleName(\"hidden\");\n\n }", "private void removeNoFields() {\n fieldTable.removeStyleName(\"hidden\");\n noFields.addStyleName(\"hidden\");\n }", "public void getApHideColumn(){\r\n\t\tString showHide = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(WsrdConstants.HIDESHOWCOLUMN);\r\n\t\tif(showHide.equalsIgnoreCase(WsrdConstants.SHOW_AUTHOR_INFO)) {\r\n\t\t\twsrdModel.setApShowHide(WsrdConstants.HIDE_AUTHOR_INFO);\r\n\t\t\twsrdModel.setShowHideFlag(true);\r\n\t\t}\r\n\t\tif(showHide.equalsIgnoreCase(WsrdConstants.HIDE_AUTHOR_INFO)) {\r\n\t\t\twsrdModel.setApShowHide(WsrdConstants.SHOW_AUTHOR_INFO);\r\n\t\t\twsrdModel.setShowHideFlag(false);\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void getUnitHideColumn() {\r\n\t\tString showHide = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(WsrdConstants.HIDESHOWCOLUMN);\r\n\t\tif(showHide.equalsIgnoreCase(WsrdConstants.SHOW_AUTHOR_INFO)) {\r\n\t\t\twsrdModel.setUnitShowHide(WsrdConstants.HIDE_AUTHOR_INFO);\r\n\t\t\twsrdModel.setShowHideFlag(true);\r\n\t\t}\r\n\t\tif(showHide.equalsIgnoreCase(WsrdConstants.HIDE_AUTHOR_INFO)) {\r\n\t\t\twsrdModel.setUnitShowHide(WsrdConstants.SHOW_AUTHOR_INFO);\r\n\t\t\twsrdModel.setShowHideFlag(false);\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void hideEditDelete() {\n\t\tButton editButton = (Button) findViewById(R.id.b_recipeEdit);\n\t\tButton deleteButton = (Button) findViewById(R.id.b_recipeDelete);\n\t\teditButton.setVisibility(4);\n\t\tdeleteButton.setVisibility(4);\n\t}", "@Override\n public void hideCategoryOtherEditTextField() {\n mEditTextProductCategoryOther.setVisibility(View.INVISIBLE);\n }", "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}", "@Override\n protected void updateItem(Boolean t, boolean empty) {\n super.updateItem(t, empty);\n if(!empty){\n setGraphic(cellButton);\n }\n else{\n setGraphic(null);\n }\n }", "public void hidePlanels(){\n\t\tlblGradesSubj.getElement().setAttribute(\"style\", \"background: #e5e5e5;\");\n\t\tfilterPanel.addStyleName(LoginPopUpCBundle.INSTANCE.css().PopupMainVSmall());\n\t\tfilterPanel.removeStyleName(LoginPopUpCBundle.INSTANCE.css().PopupMainExtraLarge());\n\n\t\tlblStandards.getElement().getStyle().clearBackgroundColor();\n\t\tstandardsPanel.setVisible(false);\n\t\tgradesPanel.setVisible(true);\n\t}", "@Override \r\n public void setUI(TableUI ui) \r\n {\n super.setUI(new BasicTableUI(){ \r\n public void paint(Graphics g, JComponent c) { \r\n Rectangle r=g.getClipBounds(); \r\n int firstRow=table.rowAtPoint(new Point(0,r.y)); \r\n int lastRow=table.rowAtPoint(new Point(0,r.y+r.height)); \r\n // -1 is a flag that the ending point is outside the table \r\n if (lastRow<0) \r\n lastRow=table.getRowCount()-1; \r\n for (int i=firstRow; i<=lastRow; i++) \r\n paintRow(i,g); \r\n } \r\n private void paintRow(int row, Graphics g) \r\n { \r\n Rectangle r=g.getClipBounds(); \r\n for (int i=0; i<table.getColumnCount();i++) \r\n { \r\n Rectangle r1=table.getCellRect(row,i,true); \r\n if (r1.intersects(r)) // at least a part is visible \r\n { \r\n int sk=i;//((CTable)table).map.visibleCell(red,i); \r\n paintCell(row,sk,g,r1); \r\n // increment the column counter \r\n //i+=((CTable)table).map.span(row,sk)-1; \r\n //i++; \r\n } \r\n } \r\n } \r\n private void paintCell(int row, int column, Graphics g,Rectangle area) \r\n { \r\n int verticalMargin = table.getRowMargin(); \r\n int horizontalMargin = table.getColumnModel().getColumnMargin(); \r\n \r\n Color c = g.getColor(); \r\n g.setColor(table.getGridColor()); \r\n g.drawRect(area.x,area.y,area.width-1,area.height-1); \r\n g.setColor(c); \r\n \r\n area.setBounds(area.x + horizontalMargin/2, \r\n area.y + verticalMargin/2, \r\n area.width - horizontalMargin, \r\n area.height - verticalMargin); \r\n \r\n if (table.isEditing() && table.getEditingRow()==row && \r\n table.getEditingColumn()==column) \r\n { \r\n Component component = table.getEditorComponent(); \r\n component.setBounds(area); \r\n component.validate(); \r\n } \r\n else \r\n { \r\n TableCellRenderer renderer = table.getCellRenderer(row, column); \r\n Component component = table.prepareRenderer(renderer, row, column); \r\n if (component.getParent() == null) \r\n rendererPane.add(component); \r\n rendererPane.paintComponent(g, component, table, area.x, area.y, \r\n area.width, area.height, true); \r\n } \r\n } \r\n }); \r\n }", "private void hideSave() {\n\t\tButton saveButton = (Button) findViewById(R.id.b_recipeSave);\n\t\tsaveButton.setVisibility(4);\n\t}", "private void hideTemporaryUntilFixed() {\n //\n// jButton8.setVisible(false);// Add cursors button (cursors for the graph to the right)\n// jButton9.setVisible(false);// Remove cursors button (cursors for the graph to the right)\n //\n }", "public void setShowLegend(boolean aValue)\n{\n if(aValue==isShowLegend()) return;\n _legend.setVisible(aValue);\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 void visibility(boolean state){ this.table.setVisible(state);}", "private void resetHiddenCols() {\n\t\tpopup.removeAll();\n\t\tidMap.clear();\n\t\titemMap.clear();\n\t\thiddenCols.clear();\n\t}", "public void hidePrimaryLines(){\n\t\tLinkedList<Line> primary = lineLists.get(0);\n\t\tfor (Line l : primary){\n\t\t\tl.setVisible(false);\n\t\t}\n\t\tshowPrimaryLines = false;\n\t}", "public void hide() {\n visible=false;\n }", "public void hide() {\n isVisible = false;\n this.saveBorderColor(Color.BLACK);\n this.setBorderColor(Color.BLACK);\n }", "void disableEdit() {\n\t\tnameField.setEditable(false);\n\t\tssnField.setEditable(false);\n\t\ttakenDateField.setEditable(false);\n\t\ttotalScoreField.setEditable(false);\n\t\tadvisorField.setEditable(false);\n\t\t\n\t}", "@Override\n public boolean stopCellEditing() {\n clicked=false;\n return super.stopCellEditing();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdgView.stopEditMode();\n\t\t\t\tbtn_edit_com.setVisibility(View.GONE);\n\t\t\t}", "@Override\n public void postHideEt() {\n }", "@Test\n public void testNullVisibilityAction() {\n JXTable table = new JXTable();\n ColumnControlButton columnControl = new ColumnControlButton(table) {\n\n @Override\n protected ColumnVisibilityAction createColumnVisibilityAction(TableColumn column) {\n if (column.getModelIndex() == 0) return null;\n return super.createColumnVisibilityAction(column);\n }\n \n \n };\n table.setColumnControl(columnControl);\n table.setColumnControlVisible(true);\n table.setModel(sortableTableModel);\n }", "private void hideButton(){\n // Si onget Client\n if(numOnglet() == 0 ){\n jBtn_ProspectToClient.setVisible(false);\n if(jTable_Clients.getRowCount() == 0){\n jBtn_Modifier.setVisible(false);\n jBtn_Supprimer.setVisible(false);\n }\n }else{\n if(jTable_Prospects.getRowCount() == 0){\n jBtn_Modifier.setVisible(false);\n jBtn_Supprimer.setVisible(false);\n jBtn_ProspectToClient.setVisible(false);\n }\n }\n }", "@Override\r\n\t\tpublic boolean editItem() {\n\t\t\treturn false;\r\n\t\t}", "protected boolean shouldShowItemNone() {\n return false;\n }", "public void tableClicked(KDTMouseEvent event) {\n\t\t\t\tint iIndex = kdtRWOItemSpEntry.getColumnIndex(\"i\");\r\n\t\t\t\tint colIndex = event.getColIndex();\r\n\t\t\t\tint rowIndex = event.getRowIndex();\r\n\t\t\t\tIEnum newIType = null;\r\n\t\t\t\tIRow row = kdtRWOItemSpEntry.getRow(rowIndex);\r\n\t\t\t\tif (iIndex == colIndex) { // I状态\r\n\t\t\t\t\tIEnum iType = (IEnum) row.getCell(colIndex).getValue();\r\n\t\t\t\t\tif (PublicUtils.equals(IEnum.I, iType)) {\r\n\t\t\t\t\t\tnewIType = IEnum.H;\r\n\t\t\t\t\t} else if (PublicUtils.equals(IEnum.H, iType)) {\r\n\t\t\t\t\t\tnewIType = IEnum.I;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\tWInfo w = (WInfo) row.getCell(\"w\").getValue();\r\n\t\t\t\t\tif (w == null)\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t//String typeCode = w.getTypeCode();\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (int i = 0; i < kdtRWOItemSpEntry.getRowCount(); i++) {\r\n\t\t\t\t\t\tWInfo newW = (WInfo) kdtRWOItemSpEntry.getRow(i).getCell(\"w\").getValue();\r\n\t\t\t\t\t\tif (newW == null)\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tif (PublicUtils.equals(IEnum.X, kdtRWOItemSpEntry.getRow(i).getCell(\"i\").getValue()))\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t//\tString newTypeCode = newW.getTypeCode();\r\n\t\t\t\t\t\tif (PublicUtils.equals(w.getNumber(), newW.getNumber())) {\r\n\t\t\t\t\t\t\tkdtRWOItemSpEntry.getRow(i).getCell(\"i\").setValue(newIType);\r\n\t\t\t\t\t\t\tresetItemSpEditorLocked(kdtRWOItemSpEntry.getRow(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\tappendItemSpFoot();\r\n\t\t\t\t//\tstoreFields();\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "@Override\n public void setVisible (boolean f)\n { \n }", "public void setHiddenOrReadOnly() {\n if(getField_type().toLowerCase().matches(\"view|vfunction\")) {\n if(!getType().toLowerCase().matches(\"hidden\")){\n setSaveRequired(\"read\");\n }\n }\n }", "private Map<String, Object> dropDisplaySizes(Map<String, Object> response) {\n @SuppressWarnings(\"unchecked\")\n List<Map<String, Object>> columns = (List<Map<String, Object>>) response.get(\"columns\");\n List<Map<String, Object>> columnsWithoutDisplaySizes = columns.stream()\n .peek(column -> column.remove(\"display_size\"))\n .collect(Collectors.toList());\n response.put(\"columns\", columnsWithoutDisplaySizes);\n return response;\n }", "public native void deselectAllCells() /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n self.deselectAllCells();\r\n }-*/;", "@Override\n\tpublic CellStyle getRowStyle() {\n\t\treturn null;\n\t}", "public void setCollapsed(boolean collapsed) {\n super.setCollapsed(collapsed);\n\n if (_spItem != null) {\n _spItem.getTable().set(GUI_COLLAPSED, collapsed);\n }\n }", "public void setC_Decoris_PreSalesLine_ID (int C_Decoris_PreSalesLine_ID);", "public void hideAvailTable() {\n availTable.setVisible(false);\n }", "public void modify( CellStyle style );", "@Override\n\t\t\t\tpublic void hideCross() {\n\t\t\t\t\t\n\t\t\t\t}", "private CellTable<QualityDataSetDTO> addColumnToTable(\r\n final CellTable<QualityDataSetDTO> table,\r\n ListHandler<QualityDataSetDTO> sortHandler, boolean isEditable) {\r\n if (table.getColumnCount() != TABLE_ROW_COUNT) {\r\n Label searchHeader = new Label(\"Applied QDM Elements\");\r\n searchHeader.getElement().setId(\"searchHeader_Label\");\r\n searchHeader.setStyleName(\"measureGroupingTableHeader\");\r\n searchHeader.getElement().setAttribute(\"tabIndex\", \"-1\");\r\n com.google.gwt.dom.client.TableElement elem = table.getElement().cast();\r\n TableCaptionElement caption = elem.createCaption();\r\n caption.appendChild(searchHeader.getElement());\r\n selectionModel = new MultiSelectionModel<QualityDataSetDTO>();\r\n table.setSelectionModel(selectionModel);\r\n\r\n // Name Column\r\n Column<QualityDataSetDTO, SafeHtml> nameColumn = new Column<QualityDataSetDTO, SafeHtml>(\r\n new SafeHtmlCell()) {\r\n @Override\r\n public SafeHtml getValue(QualityDataSetDTO object) {\r\n StringBuilder title = new StringBuilder();\r\n StringBuilder value = new StringBuilder();\r\n String qdmType = new String();\r\n // if the QDM element is not user defined, add (G) for Grouping or (E) for extensional.\r\n if (!object.getOid().equalsIgnoreCase(ConstantMessages.USER_DEFINED_QDM_OID)) {\r\n if (object.getTaxonomy().equalsIgnoreCase(\"Grouping\")) {\r\n qdmType = GROUPING_QDM;\r\n } else {\r\n qdmType = EXTENSIONAL_QDM;\r\n }\r\n }\r\n if ((object.getOccurrenceText() != null)\r\n && !object.getOccurrenceText().equals(\"\")) {\r\n value = value.append(object.getOccurrenceText() + \" of \"\r\n + object.getCodeListName()).append(qdmType);\r\n title = title.append(\"Name : \").append(value);\r\n } else {\r\n value = value.append(object.getCodeListName()).append(qdmType);\r\n title = title.append(\"Name : \").append(value);\r\n }\r\n title.append(\"\");\r\n return CellTableUtility.getColumnToolTip(value.toString(),\r\n title.toString());\r\n }\r\n };\r\n table.addColumn(nameColumn, SafeHtmlUtils\r\n .fromSafeConstant(\"<span title=\\\"Name\\\">\" + \"Name\"\r\n + \"</span>\"));\r\n\r\n // OID Column\r\n Column<QualityDataSetDTO, SafeHtml> oidColumn = new Column<QualityDataSetDTO, SafeHtml>(\r\n new SafeHtmlCell()) {\r\n @Override\r\n public SafeHtml getValue(QualityDataSetDTO object) {\r\n StringBuilder title = new StringBuilder();\r\n String oid = null;\r\n if (object.getOid().equalsIgnoreCase(\r\n ConstantMessages.USER_DEFINED_QDM_OID)) {\r\n title = title.append(\"OID : \").append(\r\n ConstantMessages.USER_DEFINED_QDM_NAME);\r\n oid = ConstantMessages.USER_DEFINED_CONTEXT_DESC;\r\n } else {\r\n title = title.append(\"OID : \").append(object.getOid());\r\n oid = object.getOid();\r\n }\r\n return getOIDColumnToolTip(oid, title,\r\n object.getHasModifiedAtVSAC(),\r\n object.isNotFoundInVSAC());\r\n }\r\n };\r\n table.addColumn(oidColumn, SafeHtmlUtils\r\n .fromSafeConstant(\"<span title=\\\"OID\\\">\" + \"OID\"\r\n + \"</span>\"));\r\n\r\n // DataType Column\r\n\r\n Column<QualityDataSetDTO, SafeHtml> dataTypeColumn = new Column<QualityDataSetDTO, SafeHtml>(\r\n new SafeHtmlCell()) {\r\n @Override\r\n public SafeHtml getValue(QualityDataSetDTO object) {\r\n StringBuilder title = new StringBuilder();\r\n title = title.append(\"Datatype : \").append(\r\n object.getDataType());\r\n return getDataTypeColumnToolTip(object.getDataType(),\r\n title, object.getHasModifiedAtVSAC(),\r\n object.isDataTypeHasRemoved());\r\n }\r\n };\r\n table.addColumn(dataTypeColumn, SafeHtmlUtils\r\n .fromSafeConstant(\"<span title=\\\"Datatype\\\">\" + \"Datatype\"\r\n + \"</span>\"));\r\n\r\n // Expansion Identifier Column\r\n Column<QualityDataSetDTO, SafeHtml> expansionColumn = new Column<QualityDataSetDTO, SafeHtml>(\r\n new SafeHtmlCell()) {\r\n @Override\r\n public SafeHtml getValue(QualityDataSetDTO object) {\r\n if (object.getExpansionIdentifier() != null) {\r\n StringBuilder title = new StringBuilder();\r\n title = title.append(\"Expansion Identifier : \").append(\r\n object.getExpansionIdentifier());\r\n return CellTableUtility.getColumnToolTip(\r\n object.getExpansionIdentifier(), title.toString());\r\n }\r\n\r\n return null;\r\n }\r\n };\r\n table.addColumn(expansionColumn, SafeHtmlUtils\r\n .fromSafeConstant(\"<span title=\\\"Expansion Identifier\\\">\"\r\n + \"Expansion Identifier\" + \"</span>\"));\r\n\r\n // Version Column\r\n Column<QualityDataSetDTO, SafeHtml> versionColumn = new Column<QualityDataSetDTO, SafeHtml>(\r\n new SafeHtmlCell()) {\r\n @Override\r\n public SafeHtml getValue(QualityDataSetDTO object) {\r\n StringBuilder title = new StringBuilder();\r\n String version = null;\r\n if (!object.getOid().equalsIgnoreCase(\r\n ConstantMessages.USER_DEFINED_QDM_OID)) {\r\n if (object.getExpansionIdentifier() == null) {\r\n if ((object.getVersion() != null) &&\r\n (object.getVersion().equalsIgnoreCase(\"1.0\")\r\n || object.getVersion().equalsIgnoreCase(\"1\"))) {\r\n title = title.append(\"Version : \").append(\r\n \"Most Recent\");\r\n version = \"Most Recent\";\r\n } else {\r\n title = title.append(\"Version : \").append(object.getVersion());\r\n version = object.getVersion();\r\n }\r\n } else {\r\n version = \"\";\r\n }\r\n } else {\r\n version = \"\";\r\n }\r\n return CellTableUtility.getColumnToolTip(version,\r\n title.toString());\r\n }\r\n };\r\n table.addColumn(versionColumn, SafeHtmlUtils\r\n .fromSafeConstant(\"<span title=\\\"Version\\\">\" + \"Version\"\r\n + \"</span>\"));\r\n\r\n\r\n table.setColumnWidth(0, 25.0, Unit.PCT);\r\n table.setColumnWidth(1, 25.0, Unit.PCT);\r\n table.setColumnWidth(2, 20.0, Unit.PCT);\r\n table.setColumnWidth(3, 14.0, Unit.PCT);\r\n table.setColumnWidth(4, 14.0, Unit.PCT);\r\n table.setColumnWidth(5, 2.0, Unit.PCT);\r\n }\r\n\r\n return table;\r\n }", "public void hideClusterItems() {\n\n\t\tfor (EASTINProperty prop : activeETNACluster.getAttributesToHide()) {\n\t\t\tif (activeETNACluster.getAttributesToShowInView().contains(prop))\n\t\t\t\tactiveETNACluster.getAttributesToShowInView().remove(prop);\n\t\t}\n\n\t\tfor (EASTINProperty prop : activeETNACluster.getMeasuresToHide()) {\n\t\t\tif (activeETNACluster.getMeasuresToShowInView().contains(prop))\n\t\t\t\tactiveETNACluster.getMeasuresToShowInView().remove(prop);\n\t\t}\n\n\t\tthis.activeETNACluster.setShowItems(true);\n\n\t}", "@Override\r\n\t\t\t\t\tpublic boolean stopCellEditing() {\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}", "private void enableRemove(){\n addSubmit.setDisable(true);\n removeSubmit.setDisable(false);\n setSubmit.setDisable(true);\n addCS.setDisable(true);\n removeCS.setDisable(false);\n setCS.setDisable(true);\n addIT.setDisable(true);\n removeIT.setDisable(false);\n setIT.setDisable(true);\n addECE.setDisable(true);\n removeECE.setDisable(false);\n setECE.setDisable(true);\n partTime.setDisable(true);\n fullTime.setDisable(true);\n management.setDisable(true);\n dateAddText.setDisable(true);\n dateRemoveText.setDisable(false);\n dateSetText.setDisable(true);\n nameAddText.setDisable(true);\n nameRemoveText.setDisable(false);\n nameSetText.setDisable(true);\n hourlyAddText.setDisable(true);\n annualAddText.setDisable(true);\n managerRadio.setDisable(true);\n dHeadRadio.setDisable(true);\n directorRadio.setDisable(true);\n //codeAddText.setDisable(true);\n hoursSetText.setDisable(true);\n }", "@Test\n public void testSetAllColumnsToInvisible() {\n // This test will not work in a headless configuration.\n if (GraphicsEnvironment.isHeadless()) {\n return;\n }\n final JXTable table = new JXTable(10, 2);\n table.setColumnControlVisible(true);\n wrapWithScrollingInFrame(table, \"\");\n table.getColumnExt(0).setVisible(false);\n assertEquals(1, table.getColumnCount());\n table.getColumnExt(0).setVisible(false);\n assertEquals(0, table.getColumnCount());\n }", "public native void setLegendOff();", "public void unsetShowNarration()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(SHOWNARRATION$18);\n }\n }", "@Override\n protected void updateItem(Boolean t, boolean empty) {\n super.updateItem(t, empty);\n if (!empty) {\n setGraphic(cellButton);\n }\n }", "@FXML\n private void selectedCboCategory(ActionEvent event){\n\n TextFieldEditableProperty(false,.50);\n }", "@Override\n\tpublic void hideCross() {\n\n\t}", "private void actionSmallerCells() {\n layoutPanel.changeCellSize(false);\n }", "private void setMembershipPanelEdiableFalse() {\n \n accountNrTF.setEditable(false);\n fromDateTF.setEditable(false);\n groupTrainingCB.setEnabled(false);\n monthPayTF.setEditable(false);\n pbsDateTF.setEditable(false);\n pbsNumberTF.setEditable(false);\n regNrTF.setEditable(false);\n balanceTF.setEditable(false);\n poolsCB.setEnabled(false);\n timeLimitCB.setEnabled(false);\n endDateTF.setEditable(false);\n membershipDropD.setEnabled(false);\n }", "private void reTable() {\n\t\tObservableList<Shape> circles = m.drawDataProperty();\n\t\ttv.setItems(circles);\t\t\n\t}", "protected void addHiddenPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_EntityAttribute_hidden_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_EntityAttribute_hidden_feature\", \"_UI_EntityAttribute_type\"),\n\t\t\t\t PersistencePackage.Literals.ENTITY_ATTRIBUTE__HIDDEN,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,\n\t\t\t\t getString(\"_UI_ModelPropertyCategory\"),\n\t\t\t\t null));\n\t}", "@Override\n public void cancelEdit() {\n super.cancelEdit();\n setText(getItem().toString());\n setGraphic(getTreeItem().getGraphic());\n }", "public void userClickedOnTable()\r\n {\r\n this.detailedStudentViewButton.setDisable(false);\r\n }", "public void editButtonClicked() {\n setButtonsDisabled(false, true, true);\n setAllFieldsAndSliderDisabled(false);\n }", "public void hideColumn(Object colId) {\n\t\tif (getColumnCount() > 1) {\n\t\t\ttry {\n\t\t\t\tHiddenColumn col = new HiddenColumn();\n\t\t\t\tcol.lastIndex = getColumnIndex(colId);\n\t\t\t\tcol.column = getColumn(col.lastIndex);\n\t\t\t\tsuper.removeColumn(col.column);\n\t\t\t\thiddenCols.put(colId, col);\n\t\t\t\t(itemMap.get(colId)).setSelected(false);\n\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic boolean stopCellEditing() {\n\t\treturn false;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n table = new javax.swing.JTable();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Item - ROL\");\n setResizable(false);\n\n table.setFont(new java.awt.Font(\"Arial\", 0, 16)); // NOI18N\n table.setForeground(new java.awt.Color(0, 0, 51));\n table.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Item Code\", \"Description\", \"ROL\", \"Available Qty\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n table.setRowHeight(25);\n table.setSelectionBackground(new java.awt.Color(0, 153, 102));\n table.setSelectionForeground(new java.awt.Color(255, 255, 204));\n table.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n table.getTableHeader().setReorderingAllowed(false);\n jScrollPane1.setViewportView(table);\n if (table.getColumnModel().getColumnCount() > 0) {\n table.getColumnModel().getColumn(0).setResizable(false);\n table.getColumnModel().getColumn(1).setResizable(false);\n table.getColumnModel().getColumn(3).setResizable(false);\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(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 607, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)\n );\n\n pack();\n }", "public void hide() {\n hidden = true;\n }", "@Override\r\n\t\t\t\t\tprotected void updateItem(Object arg0, boolean arg1) {\n\t\t\t\t\t\tsuper.updateItem(arg0, arg1);\r\n\t\t\t\t\t\tif (arg1) {\r\n\t\t\t\t\t\t\tsetGraphic(null);\r\n\t\t\t\t\t\t\tsetText(null);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tbtn.setOnAction(new EventHandler<ActionEvent>() {\r\n\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void handle(ActionEvent arg0) {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\t\t\t\t\t\tProducts data=(Products) tbl_view.getItems().get(getIndex());\r\n\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\tProducts data=(Products) tbl_view.getSelectionModel().getSelectedItem();\r\n\t\t\t\t\t\t\t\t\tSystem.out.println(data.toString());\r\n\t\t\t\t\t\t\t\t\tif(ConnectionManager.queryInsert(conn, \"DELETE FROM dbo.product WHERE id=\"+data.getId())>0) {\r\n\t\t\t\t\t\t\t\t\t\ttxt_cost.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_date.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_name.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_price.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_qty.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_reorder.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_search.clear();\r\n\t\t\t\t\t\t\t\t\t\tfetchData(FETCH_DATA);\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\r\n\t\t\t\t\t\t\tsetGraphic(btn);\r\n\t\t\t\t\t\t\tsetText(null);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}", "protected void hideViewContents() {\n\t\tnoData.heightHint = -1;\n\t\tyesData.heightHint = 0;\n\n\t\tnoData.exclude = false;\n\t\tyesData.exclude = true;\n\n\t\tnoLabel.setVisible(true);\n\t\tyesComposite.setVisible(false);\n\t\tredraw();\n\t}", "@FXML\n void disableHourlyCode() {\n annualAddText.setDisable(false);\n managerRadio.setDisable(true);\n dHeadRadio.setDisable(true);\n directorRadio.setDisable(true);\n hourlyAddText.setDisable(true);\n }", "@SuppressWarnings(\"unchecked\")\r\n \tpublic void testToggleMarkerHidingWithMandatoryMarkerOn() {\r\n \t\tfinal ITextRidget ridget = getRidget();\r\n \t\tfinal Text control = getWidget();\r\n \r\n \t\tfinal Color mandatoryMarkerBg = new Color(control.getDisplay(), 255, 255, 175);\r\n \t\tfinal Color whiteBg = control.getDisplay().getSystemColor(SWT.COLOR_WHITE);\r\n \r\n \t\ttry {\r\n \t\t\tridget.setMandatory(true);\r\n \t\t\tridget.setText(\"\");\r\n \r\n \t\t\tassertEquals(mandatoryMarkerBg, control.getBackground());\r\n \r\n \t\t\tridget.hideMarkersOfType(MandatoryMarker.class);\r\n \r\n \t\t\tassertEquals(whiteBg, control.getBackground());\r\n \r\n \t\t\tridget.showMarkersOfType(MandatoryMarker.class);\r\n \r\n \t\t\tassertEquals(mandatoryMarkerBg, control.getBackground());\r\n \t\t} finally {\r\n \t\t\tmandatoryMarkerBg.dispose();\r\n \t\t}\r\n \t}", "public void removeBtn(){\r\n\t\t\r\n\t\tWorkflowEntry entryToBeRemoved = (WorkflowEntry) tableView.getSelectionModel().getSelectedItem();\r\n\t\t\r\n\t\tdata.remove(entryToBeRemoved);\r\n\t\t\r\n\t}", "public void setBorderStyle(PDBorderStyleDictionary bs) {\n/* 376 */ getCOSObject().setItem(COSName.BS, bs);\n/* */ }", "private void clearBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clearBtnMouseClicked\n clearFields();\n //by Default hide Update button\n deleteBtn.setVisible(false);\n\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n setVisible(false);\n \n }", "void hideNoneParametersView();", "@FXML\n void disableAnnualCode() {\n annualAddText.setDisable(true);\n managerRadio.setDisable(true);\n dHeadRadio.setDisable(true);\n directorRadio.setDisable(true);\n hourlyAddText.setDisable(false);\n }", "public void mo71533d(boolean z) {\n super.mo71533d(z);\n if (z) {\n this.mWidgetContainer.setVisibility(4);\n } else {\n this.mWidgetContainer.setVisibility(0);\n }\n }", "public void setSelectedItemBarVisible(boolean visible) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_selectedItemBar_propertyVisible\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_selectedItemBar_propertyVisible\", visible);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setSelectedItemBarVisible(\" + visible + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "@Test\n public void test23() throws Throwable {\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot();\n SortOrder sortOrder0 = combinedDomainCategoryPlot0.getColumnRenderingOrder();\n combinedDomainCategoryPlot0.setRangeCrosshairVisible(true);\n LegendItemCollection legendItemCollection0 = combinedDomainCategoryPlot0.getLegendItems();\n }", "protected void hideColumn(TableColumn column) {\n \t\t\r\n \t\tcolumn.setData(COLUMN_WIDTH_SAVED_KEY_NAME, column.getWidth()); // save the current width so that we could restore it when the column is shown again\r\n \r\n \t\tcolumn.setResizable(false);\r\n \t\tcolumn.setWidth(0);\r\n \t}", "public void hide(){\n background.setOpacity(0);\n text.setOpacity(0);\n }", "private void setMemberInformationPanelEditableFalse() {\n \n fNameTF.setEditable(false);\n lNameTF.setEditable(false);\n cprTF.setEditable(false);\n cityTF.setEditable(false);\n adressTF.setEditable(false);\n emailTF.setEditable(false);\n memberIdTF.setEditable(false);\n fNameTF.setEditable(false);\n phoneTF.setEditable(false);\n postalCodeTF.setEditable(false);\n adressNrTF.setEditable(false);\n changePictureBTN.setEnabled(false);\n }", "private void applyVisibilityFlags() {\n if (rangeRings == null) {\n return;\n }\n try {\n boolean visibility = getDisplayVisibility();\n rangeRings.setRangeRingsVisible(rrVisible && visibility);\n rangeRings.setAzimuthLinesVisible(radVisible && visibility);\n rangeRings.setLabelsVisible(lblVisible && visibility);\n } catch (Exception exc) {}\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void setEditable(boolean isEditable) {\n\t\tint size = lnr_form.getChildCount();\n\t\tif (isEditable) {\n\t\t\tfor (int i = 0; i < size; i++) {\n\n\t\t\t\tView v = lnr_form.getChildAt(i);\n\t\t\t\tHashMap<String, String> row = (HashMap<String, String>) v.getTag();\n\t\t\t\tif (((LinearLayout) v.findViewById(R.id.lnrGgroup)).getVisibility() == View.VISIBLE) {\n\n\t\t\t\t} else {\n\t\t\t\t\tif (row.get(TYPE).equals(TEXT)) {\n\t\t\t\t\t\t((LinearLayout) v.findViewById(R.id.lnrEdit)).setVisibility(View.VISIBLE);\n\t\t\t\t\t} else if (row.get(TYPE).equals(TEXTAREA)) {\n\t\t\t\t\t\t((LinearLayout) v.findViewById(R.id.lnrEditArea)).setVisibility(View.VISIBLE);\n\t\t\t\t\t} else if (row.get(TYPE).equals(DATE)) {\n\t\t\t\t\t\t((LinearLayout) v.findViewById(R.id.lnrEditClickable)).setVisibility(View.VISIBLE);\n\t\t\t\t\t} else if (row.get(TYPE).equals(TIME)) {\n\t\t\t\t\t\t((LinearLayout) v.findViewById(R.id.lnrEditClickable)).setVisibility(View.VISIBLE);\n\t\t\t\t\t} else if (row.get(TYPE).equals(SELECT)) {\n\t\t\t\t\t\t((LinearLayout) v.findViewById(R.id.lnrSpin)).setVisibility(View.VISIBLE);\n\t\t\t\t\t} else if (row.get(TYPE).equals(MULTIPLESELECT)) {\n\t\t\t\t\t\t((LinearLayout) v.findViewById(R.id.lnrEditClickable)).setVisibility(View.VISIBLE);\n\t\t\t\t\t} else if (row.get(TYPE).equals(LABEL)) {\n\t\t\t\t\t\t((LinearLayout) v.findViewById(R.id.lnrLabel)).setVisibility(View.VISIBLE);\n\t\t\t\t\t}\n\n\t\t\t\t\t((LinearLayout) v.findViewById(R.id.lnrReadOnly)).setVisibility(View.GONE);\n\t\t\t\t}\n\n\t\t\t}\n\t\t} else {\n\t\t\tfor (int i = 0; i < size; i++) {\n\n\t\t\t\tView v = lnr_form.getChildAt(i);\n\t\t\t\tHashMap<String, String> row = (HashMap<String, String>) v.getTag();\n\t\t\t\tif (((LinearLayout) v.findViewById(R.id.lnrGgroup)).getVisibility() == View.VISIBLE) {\n\n\t\t\t\t} else {\n\t\t\t\t\tif (row.get(TYPE).equals(TEXT)) {\n\t\t\t\t\t\t((LinearLayout) v.findViewById(R.id.lnrEdit)).setVisibility(View.GONE);\n\t\t\t\t\t} else if (row.get(TYPE).equals(TEXTAREA)) {\n\t\t\t\t\t\t((LinearLayout) v.findViewById(R.id.lnrEditArea)).setVisibility(View.GONE);\n\t\t\t\t\t} else if (row.get(TYPE).equals(DATE)) {\n\t\t\t\t\t\t((LinearLayout) v.findViewById(R.id.lnrEditClickable)).setVisibility(View.GONE);\n\t\t\t\t\t} else if (row.get(TYPE).equals(TIME)) {\n\t\t\t\t\t\t((LinearLayout) v.findViewById(R.id.lnrEditClickable)).setVisibility(View.GONE);\n\t\t\t\t\t} else if (row.get(TYPE).equals(SELECT)) {\n\t\t\t\t\t\t((LinearLayout) v.findViewById(R.id.lnrSpin)).setVisibility(View.GONE);\n\t\t\t\t\t} else if (row.get(TYPE).equals(MULTIPLESELECT)) {\n\t\t\t\t\t\t((LinearLayout) v.findViewById(R.id.lnrEditClickable)).setVisibility(View.GONE);\n\t\t\t\t\t} else if (row.get(TYPE).equals(LABEL)) {\n\t\t\t\t\t\t((LinearLayout) v.findViewById(R.id.lnrLabel)).setVisibility(View.GONE);\n\t\t\t\t\t}\n\n\t\t\t\t\t((LinearLayout) v.findViewById(R.id.lnrReadOnly)).setVisibility(View.VISIBLE);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t}", "@SuppressWarnings(\"unchecked\")\r\n \tpublic void testToggleMandatoryMarkerWithMarkerHidingOn() {\r\n \t\tfinal ITextRidget ridget = getRidget();\r\n \t\tfinal Text control = getWidget();\r\n \r\n \t\tfinal Color whiteBg = control.getDisplay().getSystemColor(SWT.COLOR_WHITE);\r\n \r\n \t\tridget.setText(\"\");\r\n \t\tridget.hideMarkersOfType(MandatoryMarker.class);\r\n \r\n \t\tassertEquals(whiteBg, control.getBackground());\r\n \r\n \t\tridget.setMandatory(true);\r\n \r\n \t\tassertEquals(whiteBg, control.getBackground());\r\n \r\n \t\tridget.setMandatory(false);\r\n \r\n \t\tassertEquals(whiteBg, control.getBackground());\r\n \r\n \t\tridget.showMarkersOfType(MandatoryMarker.class);\r\n \r\n \t\tassertEquals(whiteBg, control.getBackground());\r\n \t}", "public void formatFields() {\r\n if( getFunctionType() == TypeConstants.DISPLAY_MODE ){\r\n ratesBaseWindow.btnOK.setEnabled(false);\r\n }\r\n }", "public void setDeleteButtonVisible(boolean visible) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_deleteButton_propertyVisible\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_deleteButton_propertyVisible\", visible);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setDeleteButtonVisible(\" + visible + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "private void setStyleAttributes(Fig fig, Map<String, String> attributeMap) {\n\n for (Map.Entry<String, String> entry : attributeMap.entrySet()) {\n final String name = entry.getKey();\n final String value = entry.getValue();\n\n if (fig instanceof FigCompartmentBox) {\n FigCompartmentBox fcb = (FigCompartmentBox) fig;\n if (\"operationsVisible\".equals(name)) {\n fcb.showCompartment(Model.getMetaTypes().getOperation(),\n value.equalsIgnoreCase(\"true\"));\n } else if (\"attributesVisible\".equals(name)) {\n fcb.showCompartment(Model.getMetaTypes().getAttribute(),\n value.equalsIgnoreCase(\"true\"));\n } else if (\"enumerationLiteralsVisible\".equals(name)) {\n fcb.showCompartment(Model.getMetaTypes()\n .getEnumerationLiteral(), value\n .equalsIgnoreCase(\"true\"));\n } else if (\"extensionPointVisible\".equals(name)) {\n fcb.showCompartment(Model.getMetaTypes()\n .getExtensionPoint(), value\n .equalsIgnoreCase(\"true\"));\n }\n }\n if (\"stereotypeVisible\".equals(name)) {\n ((StereotypeContainer) fig).setStereotypeVisible(value\n .equalsIgnoreCase(\"true\"));\n } else if (\"visibilityVisible\".equals(name)) {\n ((VisibilityContainer) fig).setVisibilityVisible(value\n .equalsIgnoreCase(\"true\"));\n } else if (\"pathVisible\".equals(name)) {\n ((PathContainer) fig).setPathVisible(value\n .equalsIgnoreCase(\"true\"));\n }\n }\n }", "private void AdditionalSetUpTable() {\n TableColumnModel stuffcm = stuffTable.getColumnModel();\n \n //update: 22 juni 2006 add column code and modal so we can remove them in propertiesComboBox\n //ActionPerformed when we click \"Additonal Properties\"\n //we have to reference name column so we can put category and code column\n //in the left of the name column\n category = stuffcm.getColumn(0);\n code = stuffcm.getColumn(1);\n \n modal = stuffcm.getColumn(3);\n sale = stuffcm.getColumn(4);\n quantity = stuffcm.getColumn(5);\n \n //update: 2 july 2006, add two column; s = t, Third T\n s_t = stuffcm.getColumn(17);\n third = stuffcm.getColumn(18);\n \n //make it middle\n class MiddleCellEditor extends DefaultTableCellRenderer {\n MiddleCellEditor() {\n super();\n setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n }\n }\n quantity.setCellRenderer( new MiddleCellEditor() );\n \n length = stuffcm.getColumn(8);\n length.setCellRenderer( new MiddleCellEditor() );\n width = stuffcm.getColumn(9);\n width.setCellRenderer( new MiddleCellEditor() );\n height = stuffcm.getColumn(10);\n height.setCellRenderer( new MiddleCellEditor() );\n volume = stuffcm.getColumn(11);\n volume.setCellRenderer( new MiddleCellEditor() );\n primary = stuffcm.getColumn(12);\n measurement = stuffcm.getColumn(13);\n measurement.setCellRenderer( new MiddleCellEditor() );\n secondary = stuffcm.getColumn(14);\n produceritem = stuffcm.getColumn(15);\n selleritem = stuffcm.getColumn(16);\n //index column\n TableColumn stuffcol = stuffcm.getColumn(7);\n stuffTable.removeColumn(stuffcol);\n //comment column\n stufftc = stuffTable.getColumnModel().getColumn(6);\n if(!displayComment.isSelected())\n stuffTable.removeColumn(stufftc);\n \n //remove all column first for the first time\n stuffTable.removeColumn(modal);\n stuffTable.removeColumn(sale);\n stuffTable.removeColumn(quantity);\n stuffTable.removeColumn(code);\n stuffTable.removeColumn(category);\n stuffTable.removeColumn(s_t);\n stuffTable.removeColumn(third);\n \n propertiesComboBoxActionPerformed(null);\n \n //additional setup for \"index\" and \"comment\" column on employeeTable\n TableColumnModel employeecm = employeeTable.getColumnModel();\n //index column\n TableColumn employeecol = employeecm.getColumn(9);\n employeeTable.removeColumn(employeecol);\n //comment column\n employeetc = employeecm.getColumn(8);\n if(!displayCommentEmployee.isSelected())\n employeeTable.removeColumn(employeetc);\n \n //additional setup for sellerTable\n TableColumnModel sellercm = sellerTable.getColumnModel();\n //index column\n TableColumn sellercol = sellercm.getColumn(4);\n sellerTable.removeColumn(sellercol);\n //comment column\n sellertc = sellercm.getColumn(3);\n if(!displayCommentSeller.isSelected())\n sellerTable.removeColumn(sellertc);\n \n //additional setup for salesmanTable\n TableColumnModel salesmancm = salesmanTable.getColumnModel();\n //index column\n TableColumn salesmancol = salesmancm.getColumn(8);\n salesmanTable.removeColumn(salesmancol);\n //comment column\n salesmantc = salesmancm.getColumn(7);\n if(!displayCommentSeller.isSelected())\n salesmanTable.removeColumn(salesmantc);\n \n //additional setup for ProducerTable\n TableColumnModel producercm = ProducerTable.getColumnModel();\n //index column\n TableColumn producercol = producercm.getColumn(4);\n ProducerTable.removeColumn(producercol);\n //comment column\n producertc = producercm.getColumn(3);\n if(!DisplayCommentProducer.isSelected())\n ProducerTable.removeColumn(producertc);\n \n //additional setup for customerTable\n TableColumnModel customercm = customerTable.getColumnModel();\n //index column\n TableColumn customercol = customercm.getColumn(4);\n customerTable.removeColumn(customercol);\n //comment column\n customertc = customercm.getColumn(3);\n if(!displayCommentCustomer.isSelected())\n customerTable.removeColumn(customertc);\n \n //additional setup for commisionerTable\n TableColumnModel commisionercm = commisionerTable.getColumnModel();\n //index column\n TableColumn commisionercol = commisionercm.getColumn(4);\n commisionerTable.removeColumn(commisionercol);\n //comment columnlist\n commisionertc = commisionercm.getColumn(3);\n if(!displayCommentCommisioner.isSelected())\n commisionerTable.removeColumn(commisionertc);\n \n //additional setup for debtcreditTable\n// TableColumn debtcreditcol = DebtCreditTable.getColumnModel().getColumn(5);\n// DebtCreditTable.removeColumn(debtcreditcol);\n \n //additional setup for debt table\n TableColumn debtcol = DebtTable.getColumnModel().getColumn(5);\n DebtTable.removeColumn(debtcol);\n \n //additional setup for sale ( edit trans ) table\n TableColumn salecol = SaleTable.getColumnModel().getColumn(6);\n SaleTable.removeColumn(salecol);\n \n //additional setup for purchase ( edit trans ) table\n TableColumn purchasecol = PurchaseTable.getColumnModel().getColumn(6);\n PurchaseTable.removeColumn(purchasecol);\n \n //additional setup for credit table\n TableColumn creditcol = CreditTable.getColumnModel().getColumn(5);\n CreditTable.removeColumn(creditcol);\n \n //additional setup for warehouseTB\n TableColumn warehouseindexcol = WarehouseTB.getColumnModel().getColumn(3);\n WarehouseTB.removeColumn(warehouseindexcol);\n \n //additional setup for containerTB\n TableColumn containerindexcol = ContainerTB.getColumnModel().getColumn(4);\n ContainerTB.removeColumn(containerindexcol);\n }", "@Override\r\n\tpublic void cancelCellEditing() {\n\r\n\t}", "public void hideIt(){\n this.setVisible(false);\n }", "private void updateItemDisplay(){\n String[] columnNames = new String[model.getColumns()];\n for(int i = 0; i<columnNames.length; i++){\n columnNames[i] = String.valueOf(i);\n }\n view.updateItemsDisplay(model.itemMapTo2DArray(model.getVendMacItemMap()), columnNames);\n }", "@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}", "public void setHidden(Boolean hidden){\n m_hidden = hidden;\n }", "public void setIndexEditAttributeValue() throws ServiceException {\r\n\t\t\tString index = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"index\");\r\n\t\t\tif(CommonUtils.isStringNotEmpty(index)){\r\n\t\t\t\tLong record = Integer.valueOf(index).longValue();\r\n\t\t\t\twsrdModel.setIndex(record);\r\n\t\t\t\tUiAirplaneModel model = uiAirplaneModel.getAirplaneList().get(Integer.valueOf(index));\r\n\t\t\t\t\r\n\t\t\t\tif(ObjectUtil.isListNotEmpty(model.getApNamesList())){\r\n\t\t\t\t\tfor(UiAirplaneModel val : model.getApNamesList()){\r\n\t\t\t\t\t\tval.setInputDisplayItem(false);\r\n\t\t\t\t\t\tval.setOutputDisplayItem(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tuiAirplaneModel.setSelectedEditGrp(showGroupsName(model));\r\n\t\t\t\tuiAirplaneModel.setApNamesList(model.getApNamesList());\r\n\t\t\t}else{\r\n\t\t\t\twsrdModel.setIndex(null);\r\n\t\t\t\tUiAirplaneModel model = uiAirplaneModel.getNewAirplane().get(0);\r\n\t\t\t\tloadAirPopup(model.getAirplaneNames());\r\n\t\t\t\tuiAirplaneModel.setSelectedGrp(showGroupsName(model));\r\n\t\t\t}\r\n\t\t\twsrdModel.setDuplicateErrorMsg(\"showPop1('AirplaneNamesPanel')\");\r\n\t\t}", "@Override\n\tpublic void hide() {\n\n\t}", "@Override\n\tpublic void hide() {\n\n\t}", "@Override\n\tpublic void hide() {\n\n\t}" ]
[ "0.5920909", "0.5917374", "0.5873319", "0.58657736", "0.58650845", "0.5834518", "0.5582152", "0.52953154", "0.5191816", "0.51872337", "0.5172309", "0.51218635", "0.5094027", "0.5084632", "0.5073455", "0.50690365", "0.5067069", "0.5056764", "0.5047959", "0.5047285", "0.5038163", "0.5036652", "0.50300676", "0.5013349", "0.5013068", "0.49706176", "0.4969837", "0.4964598", "0.49617612", "0.4951517", "0.49470395", "0.4937428", "0.49149254", "0.49139524", "0.49021658", "0.48998418", "0.48945242", "0.48868304", "0.4886438", "0.48590198", "0.48509422", "0.48499042", "0.48469782", "0.48406047", "0.4821214", "0.4812207", "0.48072094", "0.48016977", "0.4786726", "0.4785791", "0.47845", "0.47743466", "0.47721222", "0.47637883", "0.47586566", "0.4757893", "0.4753926", "0.47527438", "0.47509027", "0.47508192", "0.474624", "0.4745737", "0.47434077", "0.47429362", "0.47429332", "0.47420248", "0.4739734", "0.4734256", "0.47337174", "0.4731437", "0.47282532", "0.47234586", "0.4723197", "0.47139832", "0.47137123", "0.47091016", "0.47091007", "0.4702829", "0.46986654", "0.46974894", "0.46966422", "0.46870166", "0.46847734", "0.4675958", "0.4668018", "0.46657667", "0.46636775", "0.46635884", "0.46635884", "0.46635884", "0.46635884", "0.46635884", "0.46635884", "0.46635884", "0.46635884", "0.46549752", "0.46543944", "0.4654358", "0.4654358", "0.4654358" ]
0.51632595
11
Auto wired constructor with dependencies.
public CreateElectionParametersShellComponent(final CryptographyHelper cryptographyHelper) { this.cryptographyHelper = cryptographyHelper; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AutowireService() {\n\t\tSystem.out.println(\"Default constructor used\");\n\t}", "public DepControlar() {\n \n initComponents();\n depservice = new DepService();\n }", "public Dependency() \r\n {\r\n }", "private ServiceLocator(){}", "private ServiceFactory() {}", "private Injector() {\n }", "@ServiceInit\n public void init() {\n }", "void init(ReflectionService reflectionService);", "public CampingBean() {\n }", "public ProxyBean() {\n }", "protected Injector() {\n }", "public LabConstructUserServiceImpl() {\n\t}", "public ISeeYouBean() {\n }", "public DebtorsAgingBean() {\n }", "@Inject\n\tpublic ProviderBikes() { //has dependencies of its own that's why constructot\n\t\t\t\t\t\t\t\t\t\t//with @Inject annotation\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t\tSystem.out.println(\"Inside the constructor of the provide class\");\n\t}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "public static void initializeDiContainer() {\n addDependency(new CamelCaseConverter());\n addDependency(new JavadocGenerator());\n addDependency(new TemplateResolver());\n addDependency(new PreferenceStoreProvider());\n addDependency(new CurrentShellProvider());\n addDependency(new ITypeExtractor());\n addDependency(new DialogWrapper(getDependency(CurrentShellProvider.class)));\n addDependency(new PreferencesManager(getDependency(PreferenceStoreProvider.class)));\n addDependency(new ErrorHandlerHook(getDependency(DialogWrapper.class)));\n\n addDependency(new BodyDeclarationOfTypeExtractor());\n addDependency(new GeneratedAnnotationPredicate());\n addDependency(new GenericModifierPredicate());\n addDependency(new IsPrivatePredicate(getDependency(GenericModifierPredicate.class)));\n addDependency(new IsStaticPredicate(getDependency(GenericModifierPredicate.class)));\n addDependency(new IsPublicPredicate(getDependency(GenericModifierPredicate.class)));\n addDependency(new GeneratedAnnotationContainingBodyDeclarationFilter(getDependency(GeneratedAnnotationPredicate.class)));\n addDependency(new PrivateConstructorRemover(getDependency(IsPrivatePredicate.class),\n getDependency(GeneratedAnnotationContainingBodyDeclarationFilter.class)));\n addDependency(new BodyDeclarationOfTypeExtractor());\n addDependency(new BuilderClassRemover(getDependency(BodyDeclarationOfTypeExtractor.class),\n getDependency(GeneratedAnnotationContainingBodyDeclarationFilter.class),\n getDependency(IsPrivatePredicate.class),\n getDependency(IsStaticPredicate.class),\n getDependency(PreferencesManager.class)));\n addDependency(new JsonDeserializeRemover(getDependency(PreferencesManager.class)));\n addDependency(new StagedBuilderInterfaceRemover(getDependency(BodyDeclarationOfTypeExtractor.class),\n getDependency(GeneratedAnnotationContainingBodyDeclarationFilter.class)));\n addDependency(new StaticBuilderMethodRemover(getDependency(IsStaticPredicate.class), getDependency(IsPublicPredicate.class),\n getDependency(GeneratedAnnotationContainingBodyDeclarationFilter.class)));\n addDependency(new BuilderAstRemover(getDependencyList(BuilderRemoverChainItem.class)));\n\n addDependency(new BuilderRemover(getDependency(PreferencesManager.class), getDependency(ErrorHandlerHook.class),\n getDependency(BuilderAstRemover.class)));\n addDependency(new CompilationUnitSourceSetter());\n addDependency(new HandlerUtilWrapper());\n addDependency(new WorkingCopyManager());\n addDependency(new WorkingCopyManagerWrapper(getDependency(HandlerUtilWrapper.class)));\n addDependency(new CompilationUnitParser());\n addDependency(new GeneratedAnnotationPopulator(getDependency(PreferencesManager.class)));\n addDependency(new MarkerAnnotationAttacher());\n addDependency(new ImportRepository());\n addDependency(new ImportPopulator(getDependency(PreferencesManager.class), getDependency(ImportRepository.class)));\n addDependency(new BuilderMethodNameBuilder(getDependency(CamelCaseConverter.class),\n getDependency(PreferencesManager.class),\n getDependency(TemplateResolver.class)));\n addDependency(new PrivateConstructorAdderFragment());\n addDependency(new JsonPOJOBuilderAdderFragment(getDependency(PreferencesManager.class), getDependency(ImportRepository.class)));\n addDependency(new EmptyBuilderClassGeneratorFragment(getDependency(GeneratedAnnotationPopulator.class),\n getDependency(PreferencesManager.class),\n getDependency(JavadocGenerator.class),\n getDependency(TemplateResolver.class),\n getDependency(JsonPOJOBuilderAdderFragment.class)));\n addDependency(new BuildMethodBodyCreatorFragment());\n addDependency(new BuildMethodDeclarationCreatorFragment(getDependency(PreferencesManager.class),\n getDependency(MarkerAnnotationAttacher.class),\n getDependency(TemplateResolver.class)));\n addDependency(new JavadocAdder(getDependency(JavadocGenerator.class), getDependency(PreferencesManager.class)));\n addDependency(new BuildMethodCreatorFragment(getDependency(BuildMethodDeclarationCreatorFragment.class),\n getDependency(BuildMethodBodyCreatorFragment.class)));\n addDependency(new FullyQualifiedNameExtractor());\n addDependency(new StaticMethodInvocationFragment());\n addDependency(new OptionalInitializerChainItem(getDependency(StaticMethodInvocationFragment.class), getDependency(PreferencesManager.class)));\n addDependency(new BuiltInCollectionsInitializerChainitem(getDependency(StaticMethodInvocationFragment.class), getDependency(PreferencesManager.class)));\n addDependency(new FieldDeclarationPostProcessor(getDependency(PreferencesManager.class), getDependency(FullyQualifiedNameExtractor.class),\n getDependency(ImportRepository.class), getDependencyList(FieldDeclarationPostProcessorChainItem.class)));\n addDependency(new BuilderFieldAdderFragment(getDependency(FieldDeclarationPostProcessor.class)));\n addDependency(new WithMethodParameterCreatorFragment(getDependency(PreferencesManager.class), getDependency(MarkerAnnotationAttacher.class)));\n addDependency(new RegularBuilderWithMethodAdderFragment(getDependency(PreferencesManager.class),\n getDependency(JavadocAdder.class),\n getDependency(MarkerAnnotationAttacher.class),\n getDependency(BuilderMethodNameBuilder.class),\n getDependency(WithMethodParameterCreatorFragment.class)));\n addDependency(new BuilderFieldAccessCreatorFragment());\n addDependency(new TypeDeclarationToVariableNameConverter(getDependency(CamelCaseConverter.class)));\n addDependency(new FieldSetterAdderFragment(getDependency(BuilderFieldAccessCreatorFragment.class)));\n addDependency(new IsRegularBuilderInstanceCopyEnabledPredicate(getDependency(PreferencesManager.class)));\n addDependency(new RegularBuilderCopyInstanceConstructorAdderFragment(getDependency(TypeDeclarationToVariableNameConverter.class),\n getDependency(IsRegularBuilderInstanceCopyEnabledPredicate.class)));\n addDependency(new PublicConstructorWithMandatoryFieldsAdderFragment());\n addDependency(new RegularBuilderClassCreator(getDependency(PrivateConstructorAdderFragment.class),\n getDependency(EmptyBuilderClassGeneratorFragment.class),\n getDependency(BuildMethodCreatorFragment.class),\n getDependency(BuilderFieldAdderFragment.class),\n getDependency(RegularBuilderWithMethodAdderFragment.class),\n getDependency(JavadocAdder.class),\n getDependency(RegularBuilderCopyInstanceConstructorAdderFragment.class),\n getDependency(PublicConstructorWithMandatoryFieldsAdderFragment.class)));\n addDependency(new StaticBuilderMethodSignatureGeneratorFragment(getDependency(GeneratedAnnotationPopulator.class), getDependency(PreferencesManager.class)));\n addDependency(new BuilderMethodDefinitionCreatorFragment(getDependency(TemplateResolver.class),\n getDependency(PreferencesManager.class),\n getDependency(JavadocAdder.class), getDependency(StaticBuilderMethodSignatureGeneratorFragment.class)));\n addDependency(new BlockWithNewBuilderCreationFragment());\n addDependency(\n new RegularBuilderBuilderMethodCreator(getDependency(BlockWithNewBuilderCreationFragment.class),\n getDependency(BuilderMethodDefinitionCreatorFragment.class)));\n addDependency(new PrivateConstructorMethodDefinitionCreationFragment(getDependency(PreferencesManager.class),\n getDependency(GeneratedAnnotationPopulator.class),\n getDependency(CamelCaseConverter.class)));\n addDependency(new SuperFieldSetterMethodAdderFragment(getDependency(BuilderFieldAccessCreatorFragment.class)));\n addDependency(new PrivateConstructorBodyCreationFragment(getDependency(TypeDeclarationToVariableNameConverter.class),\n getDependency(FieldSetterAdderFragment.class),\n getDependency(BuilderFieldAccessCreatorFragment.class),\n getDependency(SuperFieldSetterMethodAdderFragment.class)));\n addDependency(new ConstructorInsertionFragment());\n addDependency(new PrivateInitializingConstructorCreator(\n getDependency(PrivateConstructorMethodDefinitionCreationFragment.class),\n getDependency(PrivateConstructorBodyCreationFragment.class),\n getDependency(ConstructorInsertionFragment.class)));\n addDependency(new FieldPrefixSuffixPreferenceProvider(getDependency(PreferenceStoreProvider.class)));\n addDependency(new FieldNameToBuilderFieldNameConverter(getDependency(PreferencesManager.class),\n getDependency(FieldPrefixSuffixPreferenceProvider.class),\n getDependency(CamelCaseConverter.class)));\n addDependency(new TypeDeclarationFromSuperclassExtractor(getDependency(CompilationUnitParser.class),\n getDependency(ITypeExtractor.class)));\n addDependency(new BodyDeclarationVisibleFromPredicate());\n addDependency(new ApplicableFieldVisibilityFilter(getDependency(BodyDeclarationVisibleFromPredicate.class)));\n addDependency(new ClassFieldCollector(getDependency(FieldNameToBuilderFieldNameConverter.class),\n getDependency(PreferencesManager.class), getDependency(TypeDeclarationFromSuperclassExtractor.class),\n getDependency(ApplicableFieldVisibilityFilter.class)));\n addDependency(new RecordFieldCollector(getDependency(FieldNameToBuilderFieldNameConverter.class)));\n addDependency(new BodyDeclarationFinderUtil(getDependency(CamelCaseConverter.class)));\n addDependency(new SuperConstructorParameterCollector(getDependency(FieldNameToBuilderFieldNameConverter.class),\n getDependency(PreferencesManager.class), getDependency(TypeDeclarationFromSuperclassExtractor.class),\n getDependency(BodyDeclarationVisibleFromPredicate.class),\n getDependency(BodyDeclarationFinderUtil.class)));\n addDependency(new SuperClassSetterFieldCollector(getDependency(PreferencesManager.class),\n getDependency(TypeDeclarationFromSuperclassExtractor.class),\n getDependency(CamelCaseConverter.class),\n getDependency(BodyDeclarationFinderUtil.class)));\n addDependency(new ApplicableBuilderFieldExtractor(Arrays.asList(\n getDependency(SuperConstructorParameterCollector.class),\n getDependency(ClassFieldCollector.class),\n getDependency(SuperClassSetterFieldCollector.class),\n getDependency(RecordFieldCollector.class))));\n addDependency(new ActiveJavaEditorOffsetProvider());\n addDependency(new ParentITypeExtractor());\n addDependency(new IsTypeApplicableForBuilderGenerationPredicate(getDependency(ParentITypeExtractor.class)));\n addDependency(new CurrentlySelectedApplicableClassesClassNameProvider(getDependency(ActiveJavaEditorOffsetProvider.class),\n getDependency(IsTypeApplicableForBuilderGenerationPredicate.class),\n getDependency(ParentITypeExtractor.class)));\n addDependency(new BuilderOwnerClassFinder(getDependency(CurrentlySelectedApplicableClassesClassNameProvider.class),\n getDependency(PreferencesManager.class), getDependency(GeneratedAnnotationPredicate.class)));\n addDependency(new BlockWithNewCopyInstanceConstructorCreationFragment());\n addDependency(new CopyInstanceBuilderMethodDefinitionCreatorFragment(getDependency(TemplateResolver.class),\n getDependency(PreferencesManager.class),\n getDependency(JavadocAdder.class), getDependency(StaticBuilderMethodSignatureGeneratorFragment.class)));\n addDependency(new RegularBuilderCopyInstanceBuilderMethodCreator(getDependency(BlockWithNewCopyInstanceConstructorCreationFragment.class),\n getDependency(CopyInstanceBuilderMethodDefinitionCreatorFragment.class),\n getDependency(TypeDeclarationToVariableNameConverter.class),\n getDependency(IsRegularBuilderInstanceCopyEnabledPredicate.class)));\n addDependency(new JsonDeserializeAdder(getDependency(ImportRepository.class)));\n addDependency(new GlobalBuilderPostProcessor(getDependency(PreferencesManager.class), getDependency(JsonDeserializeAdder.class)));\n addDependency(new DefaultConstructorAppender(getDependency(ConstructorInsertionFragment.class), getDependency(PreferencesManager.class),\n getDependency(GeneratedAnnotationPopulator.class)));\n addDependency(new RegularBuilderCompilationUnitGenerator(getDependency(RegularBuilderClassCreator.class),\n getDependency(RegularBuilderCopyInstanceBuilderMethodCreator.class),\n getDependency(PrivateInitializingConstructorCreator.class),\n getDependency(RegularBuilderBuilderMethodCreator.class), getDependency(ImportPopulator.class),\n getDependency(BuilderRemover.class),\n getDependency(GlobalBuilderPostProcessor.class),\n getDependency(DefaultConstructorAppender.class)));\n addDependency(new RegularBuilderUserPreferenceDialogOpener(getDependency(CurrentShellProvider.class)));\n addDependency(new RegularBuilderDialogDataConverter());\n addDependency(new RegularBuilderUserPreferenceConverter(getDependency(PreferencesManager.class)));\n addDependency(new RegularBuilderUserPreferenceProvider(getDependency(RegularBuilderUserPreferenceDialogOpener.class),\n getDependency(PreferencesManager.class),\n getDependency(RegularBuilderDialogDataConverter.class),\n getDependency(RegularBuilderUserPreferenceConverter.class)));\n addDependency(new RegularBuilderCompilationUnitGeneratorBuilderFieldCollectingDecorator(getDependency(ApplicableBuilderFieldExtractor.class),\n getDependency(RegularBuilderCompilationUnitGenerator.class),\n getDependency(RegularBuilderUserPreferenceProvider.class)));\n addDependency(new IsEventOnJavaFilePredicate(getDependency(HandlerUtilWrapper.class)));\n\n // staged builder dependencies\n addDependency(new StagedBuilderInterfaceNameProvider(getDependency(PreferencesManager.class),\n getDependency(CamelCaseConverter.class),\n getDependency(TemplateResolver.class)));\n addDependency(new StagedBuilderWithMethodDefiniationCreatorFragment(getDependency(PreferencesManager.class),\n getDependency(BuilderMethodNameBuilder.class),\n getDependency(MarkerAnnotationAttacher.class),\n getDependency(StagedBuilderInterfaceNameProvider.class),\n getDependency(WithMethodParameterCreatorFragment.class)));\n addDependency(new StagedBuilderInterfaceTypeDefinitionCreatorFragment(getDependency(JavadocAdder.class)));\n addDependency(new StagedBuilderInterfaceCreatorFragment(getDependency(StagedBuilderWithMethodDefiniationCreatorFragment.class),\n getDependency(StagedBuilderInterfaceTypeDefinitionCreatorFragment.class),\n getDependency(StagedBuilderInterfaceTypeDefinitionCreatorFragment.class),\n getDependency(BuildMethodDeclarationCreatorFragment.class),\n getDependency(JavadocAdder.class),\n getDependency(GeneratedAnnotationPopulator.class)));\n addDependency(new StagedBuilderCreationBuilderMethodAdder(getDependency(BlockWithNewBuilderCreationFragment.class),\n getDependency(BuilderMethodDefinitionCreatorFragment.class)));\n addDependency(new NewBuilderAndWithMethodCallCreationFragment());\n addDependency(new StagedBuilderCreationWithMethodAdder(getDependency(StagedBuilderWithMethodDefiniationCreatorFragment.class),\n getDependency(NewBuilderAndWithMethodCallCreationFragment.class), getDependency(JavadocAdder.class)));\n addDependency(new StagedBuilderStaticBuilderCreatorMethodCreator(getDependency(StagedBuilderCreationBuilderMethodAdder.class),\n getDependency(StagedBuilderCreationWithMethodAdder.class),\n getDependency(PreferencesManager.class)));\n addDependency(new StagedBuilderWithMethodAdderFragment(\n getDependency(StagedBuilderWithMethodDefiniationCreatorFragment.class),\n getDependency(MarkerAnnotationAttacher.class)));\n addDependency(new InterfaceSetter());\n addDependency(new StagedBuilderClassCreator(getDependency(PrivateConstructorAdderFragment.class),\n getDependency(EmptyBuilderClassGeneratorFragment.class),\n getDependency(BuildMethodCreatorFragment.class),\n getDependency(BuilderFieldAdderFragment.class),\n getDependency(StagedBuilderWithMethodAdderFragment.class),\n getDependency(InterfaceSetter.class),\n getDependency(MarkerAnnotationAttacher.class)));\n addDependency(new StagedBuilderStagePropertyInputDialogOpener(getDependency(CurrentShellProvider.class)));\n addDependency(new StagedBuilderStagePropertiesProvider(getDependency(StagedBuilderInterfaceNameProvider.class),\n getDependency(StagedBuilderStagePropertyInputDialogOpener.class)));\n addDependency(new StagedBuilderCompilationUnitGenerator(getDependency(StagedBuilderClassCreator.class),\n getDependency(PrivateInitializingConstructorCreator.class),\n getDependency(StagedBuilderStaticBuilderCreatorMethodCreator.class),\n getDependency(ImportPopulator.class),\n getDependency(StagedBuilderInterfaceCreatorFragment.class),\n getDependency(BuilderRemover.class),\n getDependency(GlobalBuilderPostProcessor.class),\n getDependency(DefaultConstructorAppender.class)));\n addDependency(new StagedBuilderCompilationUnitGeneratorFieldCollectorDecorator(\n getDependency(StagedBuilderCompilationUnitGenerator.class),\n getDependency(ApplicableBuilderFieldExtractor.class),\n getDependency(StagedBuilderStagePropertiesProvider.class)));\n\n // Generator chain\n addDependency(new GenerateBuilderExecutorImpl(getDependency(CompilationUnitParser.class),\n getDependencyList(BuilderCompilationUnitGenerator.class),\n getDependency(IsEventOnJavaFilePredicate.class), getDependency(WorkingCopyManagerWrapper.class),\n getDependency(CompilationUnitSourceSetter.class),\n getDependency(ErrorHandlerHook.class),\n getDependency(BuilderOwnerClassFinder.class)));\n addDependency(new GenerateBuilderHandlerErrorHandlerDecorator(getDependency(GenerateBuilderExecutorImpl.class),\n getDependency(ErrorHandlerHook.class)));\n addDependency(new StatefulBeanHandler(getDependency(PreferenceStoreProvider.class),\n getDependency(WorkingCopyManagerWrapper.class), getDependency(ImportRepository.class)));\n addDependency(\n new StateInitializerGenerateBuilderExecutorDecorator(\n getDependency(GenerateBuilderHandlerErrorHandlerDecorator.class),\n getDependency(StatefulBeanHandler.class)));\n }", "protected Spring() {}", "public AutowireService(EntityTobeAutowired autowired) {\n\t\tSystem.out.println(\"Autowired by constructor used\");\n\t\tthis.autowired = autowired;\n\t}", "public DependencyManager()\n\t{\n\t\tmap.put(VARIABLES, new ArrayList<>());\n\t\tmap.put(VARSTRATEGY, BASE_STRATEGY);\n\t}", "@Inject\n public BluetoothProbeFactory() {\n }", "private RecipleazBackendService() {\n }", "private MissaJpaController() {\r\n }", "public ObjetosBeans() {\n this.init();\n }", "public Service(){\n\t\t\n\t}", "@PostConstruct\n\tpublic void initializer()\n\t{\n\t\tCustomerDTO customerDTO = new CustomerDTO();\n\t\tcustomerDTO.setFuellid(true);\n\t\tcustomerDTO.setCity(\"DL\"); \n\t}", "public NaviProxyFactoryBean() {\r\n\r\n }", "public Facade() {\n\t\tinitResources();\n\t}", "public JTFImporter() {\n super();\n\n Managers.getManager(IBeansManager.class).inject(this);\n }", "private InjectorManager() {\n // no prepared injectors\n }", "public ClientServiceImpl() {\r\n\t}", "@Autowired\r\npublic void setDependency1(Dependency1 dependency1) {\r\n\tthis.dependency1=dependency1;\r\n}", "public InjectingComponentType() {\n }", "public Activator() {\r\n\t}", "@PostConstruct\n protected void init() {\n direccionRegionalList = new ArrayList<InstitucionRequerida>();\n direccionRegionalList = institucionRequeridaServicio.getDireccionRegionalList();\n gadList = new ArrayList<InstitucionRequerida>();\n gadList = institucionRequeridaServicio.getGADList();\n registroMixtoList = new ArrayList<InstitucionRequerida>();\n registroMixtoList = institucionRequeridaServicio.getRegistroMixtoList();\n }", "public AuthService() {\n//\t\tthis.dao = new UsuarioDAO();\n//\t\tthis.repository = repository;\n\t}", "private Service() {}", "@PostConstruct\n public void init() {\n }", "@PostConstruct\n public void init() {\n eventBus.register(this);\n }", "@Inject\n\tpublic OfyFactory(Injector injector) {\n\t\tthis.injector = injector;\n\n\t\tlong time = System.currentTimeMillis();\n\n\t\tthis.register(Customer.class);\n\t\tthis.register(EmailLookup.class);\n\t\tthis.register(SavingsAccount.class);\n\t\tthis.register(Transaction.class);\n\n\t\tlong millis = System.currentTimeMillis() - time;\n\t\tlog.info(\"Registration took \" + millis + \" millis\");\n\t}", "private ObjectRepository() {\n\t}", "@PostConstruct\r\n\tvoid init() {\n\t}", "private ServiceLocator() {\r\n\t\t\r\n\t}", "@Before\n @Override\n public void init() {\n }", "public RiftsawServiceLocator() {\n }", "private void initService() {\r\n\t}", "public SwerveAutoTest() {\n // Initialize base classes.\n // All via self-construction.\n\n // Initialize class members.\n // All via self-construction.\n }", "public FuncionarioBean() {\n }", "@Autowired\n public TodoServiceImpl(final TodoDAO todoDAO) {\n super(todoDAO);\n }", "private AnagramService() {\n\t}", "private EagerInitilization(){}", "public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }", "private EagerlySinleton()\n\t{\n\t}", "private BankCustomerFacade() {\n }", "public ClasificacionBean() {\r\n }", "public Orders()\n {\n setEntityDelegate(DELEGATE);\n _init();\n }", "public ConfigurationMaintainer() {\n\t}", "@Inject\n public MachineMonkeyRestApiImpl() {\n }", "@Override\n\tpublic void init(BundleContext context, DependencyManager manager)\n\t\t\tthrows Exception {\n\t\tmanager.add(createComponent()\n\t\t\t\t.setInterface(Object.class.getName(), null)\n\t\t\t\t.setImplementation(ConsoleClient.class)\n\t\t\t\t.add(createServiceDependency().setService(AgendaService.class).setRequired(true))\n\t\t);\n\t\t\n\t}", "@PostConstruct\n public void init() {\n c=new Cliente();\n lc=null;\n }", "private void createDependencies(){\n client = new FireStoreClient(this);\n authentication = new FirestoreAuthentication();\n }", "protected Depot() {\n\t\tthis(null);\n\t}", "public ClientController() {\n }", "@Autowired\n public TradeService(\n TradeRepository tradeRepository,\n TraderService traderService\n ) {\n this.tradeRepository = tradeRepository;\n this.traderService = traderService;\n }", "@PostConstruct\n\tpublic void inicializar() {\n\t}", "@PostConstruct\r\n\tpublic void init(){\r\n\t\tconta = new Conta();\r\n\t\tservice = new ContaService();\r\n\t\tconta.setDataAbertura(Calendar.getInstance());\r\n\t}", "public ClienteBean() {\n }", "@PostConstruct\n\tpublic void init() {\n\t}", "@PostConstruct\n\tpublic void init() {\n\t}", "public DefaultCoupledResource() {\n }", "@Before\n public void init() {\n }", "@PostConstruct\n\tpublic void init() {\n\n\t}", "@PostConstruct\n\tpublic void init() {\n\n\t}", "public TestService() {}", "@Autowired\n public SupplierService(final ISupplierDAO dao) {\n super(dao, Supplier.class, SupplierPOJO.class);\n this.dao = dao;\n }", "public PersonBean() {\n\t}", "public void init() {\n\t\tregisterBeanDefinitionParser(\"component-scan\", new AutoComponentScanBeanDefinitionParser());\n\t}", "public ServiceFactoryImpl() {\n\t\tsuper();\n\t}", "private ServiceGen() {\n }", "public AlbumService() {\n super();\n }", "public CompanyFacade() {\n }", "private InterpreterDependencyChecks() {\r\n\t\t// Hides default constructor\r\n\t}", "@Bean\r\n\tpublic ICoach swimCoach()\r\n\t{\r\n\t\treturn new SwimCoach(sadFortuneService());\t\t//CONSTRUCTOR DEPENDENCY \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//(call the sadFortuneService Class who implements the IFortuneService)\r\n\t}", "@Before\n public void initialize() throws BeansException, MalformedURLException {\n wsClient = EasyMock.createMock(CaAERSParticipantServiceWSClient.class);\n xsltTransformer = EasyMock.createMock(XSLTTransformer.class);\n caAERSRegistrationServiceInvocationStrategy = new CaAERSRegistrationServiceInvocationStrategy(xsltTransformer,\n wsClient, RETRY_COUNT);\n caAERSUpdateRegistrationServiceInvocationStrategy = new CaAERSUpdateRegistrationServiceInvocationStrategy(\n xsltTransformer, wsClient, RETRY_COUNT);\n }", "public InitService() {\n super(\"InitService\");\n }", "private ClientController() {\n }", "private ServiceGenerator() {\n }", "private ServiceGenerator() {\n }", "public Driver() {\n setupFiles();\n }", "@Autowired\n public DevBootstrap(AuthorRepository authorRepository, BookRepository bookRepository, PublisherRepository publisherRepository) {\n this.authorRepository = authorRepository;\n this.bookRepository = bookRepository;\n this.publisherRepository = publisherRepository;\n }", "private Driver(){\n }", "public Bean() {\n\t}", "public UserController(UserService service) {\n\t\tSystem.out.println(\"Autowiring using parameterized constructor\");\n\t\tthis.service = service;\n\t}", "@Override\r\n public void init() throws Exception {\r\n context = SpringApplication.run(getClass(), savedArgs);\r\n context.getAutowireCapableBeanFactory().autowireBean(this);\r\n }", "public ScControl()\n {\n register();\n install();\n }", "public UserService() {\n }", "public WeatherService() {\n }", "@Before\n\tpublic void init() {\n\t}", "public void init() {\r\n\t\tlog.info(\"init()\");\r\n\t\tobjIncidencia = new IncidenciaSie();\r\n\t\tobjObsIncidencia = new ObservacionIncidenciaSie();\r\n\t\tobjCliente = new ClienteSie();\r\n\t\tobjTelefono = new TelefonoPersonaSie();\r\n\t}", "public LibraryAdapterFactory() {\r\n\t}", "public BeansCompany() {\n\t\tsuper();\n\t}" ]
[ "0.7149536", "0.6602515", "0.65193343", "0.636442", "0.6360622", "0.63315916", "0.6276332", "0.6249655", "0.62393075", "0.6213136", "0.62127435", "0.62095886", "0.62040365", "0.6190298", "0.61614794", "0.61542016", "0.61536974", "0.6151307", "0.613872", "0.61229384", "0.6102487", "0.6098106", "0.6095874", "0.6084831", "0.6072884", "0.6035431", "0.60319513", "0.6022236", "0.6019818", "0.6015208", "0.6008776", "0.60037994", "0.5990622", "0.59868425", "0.5984296", "0.5984233", "0.5980136", "0.597694", "0.59762925", "0.5970992", "0.59698045", "0.59690976", "0.59633833", "0.5952048", "0.595145", "0.5942933", "0.59422934", "0.5937998", "0.5932635", "0.59247243", "0.592015", "0.5917289", "0.5914994", "0.5913133", "0.59090275", "0.5905063", "0.5898728", "0.58976626", "0.58968943", "0.58959603", "0.58920515", "0.5879924", "0.587566", "0.587", "0.5867919", "0.58665603", "0.5865743", "0.58657235", "0.58657235", "0.58553827", "0.58537585", "0.5853591", "0.5853591", "0.58468264", "0.5846554", "0.5845555", "0.58442736", "0.58423674", "0.5839825", "0.58375514", "0.58296555", "0.58267534", "0.58178866", "0.5815157", "0.5811155", "0.58107764", "0.5809739", "0.5809739", "0.58045787", "0.57903457", "0.57894856", "0.5786006", "0.57830745", "0.57783484", "0.57769436", "0.5770336", "0.57688373", "0.5767837", "0.5766866", "0.5765287", "0.5763417" ]
0.0
-1
Constructor allow the fields to be set.
public CreateElectionParametersOptions(final File publish, final String name, final boolean noTellers, final int numberOfTellers, final int thresholdTellers, final int dsaL, final int dsaN, final int primeCertainty) { this.publish = publish; this.name = name; this.noTellers = noTellers; this.numberOfTellers = numberOfTellers; this.thresholdTellers = thresholdTellers; this.dsaL = dsaL; this.dsaN = dsaN; this.primeCertainty = primeCertainty; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "private Request() {\n initFields();\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override public void init()\n\t\t{\n\t\t}", "public Field() {\r\n\t}", "public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }", "@Override\n\tprotected void initializeFields() {\n\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "private TigerData() {\n initFields();\n }", "public InitialData(){}", "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 AirField() {\n\n\t}", "protected Settlement() {\n // empty constructor\n }", "public void init() {\r\n\t\t// to override\r\n\t}", "private Response() {\n initFields();\n }", "public BaseParameters(){\r\n\t}", "private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }", "@Override\n protected void init() {\n }", "public RequestValues() {\n //mUserId = userId;\n }", "public PSRelation()\n {\n }", "@Override\r\n\tpublic void init() {}", "public Pasien() {\r\n }", "public Parameters() {\n\t}", "private FundInfo() {\n initFields();\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}", "public AirAndPollen() {\n\n\t}", "public void init() {\n \n }", "@Override\n public void init() {\n }", "public UBERequest() {\r\n }", "@Override\n public void init() {}", "protected void init() {\n setUUIDString();\n setNoteCreatedAt();\n setNoteUpdatedAt();\n setCreator(ParseUser.getCurrentUser());\n addAuthor(ParseUser.getCurrentUser());\n setACL(new ParseACL(ParseUser.getCurrentUser()));\n }", "public DesastreData() { //\r\n\t}", "public Car() {\r\n this(\"\", \"\", \"\", 0, Category.EMPTY, 0.00, \"\", 0, \"\", 0.00, \"\", DriveTrain.EMPTY,\r\n Aspiration.EMPTY, 0.00, 0.00, 0.00, 0.00, 0.0, 0.0, 0.0, 0.0, 0.0);\r\n }", "protected Book() {\n this.title = \"Init\";\n this.author = \"Init\";\n this.bookCategories = new HashSet<>(10);\n }", "public Car () {\n\n Make = \"\";\n Model = \"\";\n Year = 2017;\n Price = 0.00;\n }", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "public Person() {\n\t\tname \t= \"\";\n\t\taddress = \"\";\n\t\tcity \t= \"\";\n\t\tage \t= 0;\n\t}", "@Override\n public void init() {\n\n super.init();\n\n }", "private FieldInfo() {\r\n\t}", "protected Asignatura()\r\n\t{}", "public NewBooking() {\n initComponents();\n setDate();\n setTime();\n loadcmbOrigin();\n loadcmbDestination();\n }", "public Field(String watermark,\n String showfieldname,\n String saveRequired,\n String jfunction,\n String onChange,\n String onKeyDown,\n String defaultValue,\n String type,\n String sqlValue,\n String field_name,\n String relation,\n String states,\n String relationField,\n String onClickVList,\n String jIdList,\n String name,\n String searchRequired,\n String id,\n String placeholder,\n String value,\n String fieldType,\n String onclicksummary,\n String newRecord,\n List<Field> dListArray,\n List<OptionModel> mOptionsArrayList,\n String onclickrightbutton,\n String webSaveRequired,\n String field_type) {\n\n this.watermark = watermark;\n this.showfieldname = showfieldname;\n this.saveRequired = saveRequired;\n this.jfunction = jfunction;\n this.onChange = onChange;\n this.onKeyDown = onKeyDown;\n this.defaultValue = defaultValue;\n this.type = type;\n this.sqlValue = sqlValue;\n this.field_name = field_name;\n this.relation = relation;\n this.states = states;\n this.relationField = relationField;\n this.onClickVList = onClickVList;\n this.jIdList = jIdList;\n this.name = name;\n this.searchRequired = searchRequired;\n this.id = id;\n this.placeholder = placeholder;\n this.value = value;\n this.fieldType = fieldType;\n this.onclicksummary = onclicksummary;\n this.newRecord = newRecord;\n this.dListArray = dListArray;\n this.optionsArrayList = mOptionsArrayList;\n this.onclickrightbutton = onclickrightbutton;\n this.webSaveRequired = webSaveRequired;\n this.field_type = field_type;\n\n// this( watermark, showfieldname, saveRequired, jfunction,\n// onChange, onKeyDown, defaultValue, type, sqlValue,\n// field_name, relation, states, relationField,\n// onClickVList, jIdList, name, \"\",\n// searchRequired, id, placeholder, value,\n// fieldType, onclicksummary, newRecord, \"\",\n// dListArray,mOptionsArrayList,onclickrightbutton);\n }", "public Pitonyak_09_02() {\r\n }", "protected void init() {\n // to override and use this method\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public FormFieldsReport() {}", "@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n public void init() {\n }", "public mapper3c() { super(); }", "public void initialize() {\n\n fechaDeLaVisita.set(LocalDate.now());\n\n if (medico.get() != null) {\n medico.get().clear();\n } else {\n medico.set(new Medico());\n }\n\n turnoVisita.set(\"\");\n visitaAcompanadaSN.set(false);\n lugarVisita.set(\"\");\n if (causa.get() != null) {\n causa.get().clear();\n } else {\n causa.set(new Causa());\n }\n\n if (promocion.get() != null) {\n promocion.get().clear();\n } else {\n promocion.set(new Promocion());\n }\n\n observacion.set(\"\");\n persistida.set(false);\n persistidoGraf.set(MaterialDesignIcon.SYNC_PROBLEM.graphic());\n\n fechaCreacion.set(LocalDateTime.now());\n\n }", "public CalccustoRequest()\r\n\t{\r\n\t}", "public void initialize()\n {\n }", "public FieldScrapper() \r\n {\r\n }", "public Chauffeur() {\r\n\t}", "@Override\n\t\tprotected void initialise() {\n\n\t\t}", "private WebRequest() {\n initFields();\n }", "public PaymentDetails () {\n\t}", "@Override\n void init() {\n }", "public Company() {\r\n\t\tsuper();\r\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}", "public CompanyData() {\r\n }", "protected Product()\n\t{\n\t}", "protected Approche() {\n }", "public Tbdtokhaihq3() {\n super();\n }", "public QBXMLRequest() {\n }", "protected void initialize() {}", "protected void initialize() {}", "public Zeffit()\n {\n // TODO: initialize instance variable(s)\n }", "protected Product() {\n\t\t\n\t}", "public Aanbieder() {\r\n\t\t}", "public Person()\n\t{\n\t\tthis.age = -1;\n\t\tthis.name = \"Unknown\";\n\t}", "private Params()\n {\n }", "@Override\n public void initialize() {\n \n }", "public Car()\n {\n \tsuper();\n bodyType = null;\n noOfDoors = 0;\n noOfSeats = 0;\n }", "public Company() {\n\t\tsuper();\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public CyanSus() {\n\n }", "public Data() {\n \n }", "public MyPractice()\n\t{\n\t\t//Unless we specify values all data members\n\t\t//are a zero, false, or null\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 public void init() {\n\n }", "public void init() {\n\t\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "protected Betaling()\r\n\t{\r\n\t\t\r\n\t}" ]
[ "0.74948794", "0.70504737", "0.6923182", "0.6881568", "0.6870727", "0.68705857", "0.6831775", "0.6796321", "0.67710143", "0.6767139", "0.6753934", "0.6724847", "0.67184263", "0.6717854", "0.6706322", "0.6698559", "0.66817945", "0.66525406", "0.6649274", "0.66359514", "0.6617931", "0.6608024", "0.6607482", "0.66032845", "0.65945494", "0.6582933", "0.6582933", "0.6582933", "0.65748656", "0.6569811", "0.65649277", "0.6556025", "0.6552976", "0.65524113", "0.65190065", "0.6517913", "0.6503116", "0.65001345", "0.6495487", "0.6487126", "0.6482852", "0.6479588", "0.6476434", "0.64741534", "0.64733815", "0.64707905", "0.64691055", "0.6461075", "0.6450587", "0.64502645", "0.6446844", "0.64465785", "0.6445369", "0.64431345", "0.6442319", "0.644006", "0.64390856", "0.6432288", "0.64308846", "0.64307594", "0.6429697", "0.64291257", "0.64168847", "0.6413589", "0.6413589", "0.6413589", "0.64070165", "0.640641", "0.6404385", "0.6396763", "0.6392269", "0.63905734", "0.63905734", "0.638894", "0.6384204", "0.6383776", "0.63819635", "0.6381036", "0.63802886", "0.6372435", "0.6371913", "0.63662624", "0.63662624", "0.63662624", "0.63662624", "0.63662624", "0.63662624", "0.6364494", "0.63644826", "0.6360118", "0.635765", "0.635765", "0.635765", "0.635765", "0.635765", "0.6356345", "0.6356345", "0.6353565", "0.63526356", "0.6351527", "0.6346813" ]
0.0
-1
Constructor for reflective instantiation.
private CreateElectionParametersOptions() { // Do nothing. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Instantiation(){}", "Reproducible newInstance();", "public Reflect() {\n this(MethodReflectorFactory.class);\n }", "protected abstract void construct();", "defaultConstructor(){}", "public Constructor(){\n\t\t\n\t}", "private ReflectionUtil()\n {\n }", "private void __sep__Constructors__() {}", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "public ParameterizedInstantiateFactory() {\r\n super();\r\n }", "public Dynamic() {\n }", "public native void constructor();", "public DescriptorCacheImpl() {\n super();\n \n LOG2.debug(\"New instance!\");\n \n _typeMap = new HashMap();\n _xmlNameMap = new HashMap();\n _missingTypes = new ArrayList();\n }", "public Activator() {\r\n\t}", "public MethodInfoImpl() {\n }", "public ClassTemplate() {\n\t}", "private void translateConstructor( ) {\n \n Set<MethodInfoFlags> flags = EnumSet.noneOf( MethodInfoFlags.class );\n \n AVM2Method method = new AVM2Method( null, flags );\n avm2Class.avm2Class.constructor = method;\n \n AVM2MethodBody body = method.methodBody;\n body.maxStack = 1;\n body.maxRegisters = 1;\n body.maxScope = 11;\n body.scopeDepth = 10;\n \n InstructionList il = body.instructions;\n \n// il.append( OP_getlocal0 );\n// il.append( OP_pushscope );\n il.append( OP_getlocal0 );\n il.append( OP_constructsuper, 0 );\n \n// il.append( OP_findpropstrict, new AVM2QName( PUBLIC_NAMESPACE, \"drawTest\" ));\n il.append( OP_getlocal0 );\n \n il.append( OP_callpropvoid, new AVM2QName( EmptyPackage.namespace, \"drawTest\" ), 0 );\n\n il.append( OP_returnvoid );\n }", "private SystemInfo() {\r\n // forbid object construction \r\n }", "@SuppressWarnings(\"unchecked\")\n public T newInstance()\n throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n if (constructor_ == null) {\n constructor_ = getRawClass().getConstructor();\n }\n\n return (T)constructor_.newInstance();\n }", "public T newInstance();", "private ObjectFactory() { }", "public ObjectFactory() {\n\t}", "public ObjectFactory() {\r\n\t}", "public Instance() {\n }", "void DefaultConstructor(){}", "public ObjectFactory() {\n super(grammarInfo);\n }", "@Override\r\n\tpublic CMObject newInstance()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn this.getClass().getDeclaredConstructor().newInstance();\r\n\t\t}\r\n\t\tcatch(final Exception e)\r\n\t\t{\r\n\t\t\tLog.errOut(ID(),e);\r\n\t\t}\r\n\t\treturn new StdBehavior();\r\n\t}", "public Vector() {\n construct();\n }", "Constructor() {\r\n\t\t \r\n\t }", "public interface Reflection {\n\t/**\n\t * Creates the template which specifies which constructor to \n\t * call upon. The specifies the classes of the arguments which\n\t * need to be given to the constructor.\n\t */\n\t@SuppressWarnings(\"unchecked\")\n\tpublic Class[] getTemplate();\n\t\n\t/**\n\t * Create the object array which serves as the parameters \n\t * to construct another object of this type.\n\t */\n\tpublic Object[] getConstructorArgs ();\n}", "public FeatureExtraction() {\n\t}", "public ClassInfo() {\n }", "public PTypeSkel instanciate(PTypeSkel.InstanciationBindings iBindings) {\n PTypeSkel[] ps = new PTypeSkel[this.params.length];\n for (int i = 0; i < ps.length; i++) {\n ps[i] = this.params[i].instanciate(iBindings);\n }\n return create(this.defDictGetter, this.srcInfo, this.tconProps, this.ext, ps);\n// /* DEBUG */ PTypeRefSkel t = create(this.defDictGetter, this.srcInfo, this.tconProps, this.ext, ps);\n// /* DEBUG */ System.out.print(\"INSTANCIATE ! \"); System.out.print(this); System.out.print(\" => \"); System.out.println(t);\n// /* DEBUG */ return t;\n }", "void init(ReflectionService reflectionService);", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }", "public AnalysisDef() {}", "@Override\r\n public void instantiate() {\r\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }" ]
[ "0.7881425", "0.7317621", "0.70323783", "0.679486", "0.66558707", "0.65678525", "0.6565601", "0.65541065", "0.6519801", "0.6501306", "0.6494287", "0.649358", "0.6485318", "0.6433569", "0.6389513", "0.6367162", "0.6342249", "0.63359755", "0.6332813", "0.632344", "0.6306783", "0.6271404", "0.6255731", "0.62476134", "0.62441444", "0.62367356", "0.6215762", "0.62069064", "0.62055504", "0.61834806", "0.6163358", "0.61541384", "0.614367", "0.6138061", "0.612544", "0.612544", "0.612544", "0.6123189", "0.6112813", "0.6101575", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263", "0.6083263" ]
0.0
-1
Created by Code Generator on 20191014
public interface QueryAllianceDao extends BaseMapper<Alliance> { // List<AllianceRecord> findAlliancePage(Page<AllianceRecord> page, @Param("record") AllianceRecord record, @Param("search") String search, @Param("orderBy") String orderBy, @Param("startingCycleStartTime") Date startingCycleStartTime, @Param("startingCycleEndTime") Date startingCycleEndTime, @Param("leftNumber") Integer leftNumber, @Param("rightNumber") Integer rightNumber); //rpc分页列表 List<AllianceRecord> findAlliancePageShip(Page<AllianceRecord> page, @Param("record") AllianceRecord record, @Param("search") String search, @Param("orderBy") String orderBy, @Param("startingCycleStartTime") Date startingCycleStartTime, @Param("startingCycleEndTime") Date startingCycleEndTime); //根据userID查询当月的订单 List<Map> getCurrentMonthOrderByUserId(@Param("id") Long id); //根据userID 查询盟友信息 AllianceRecord selectAllianceOneByUserId(@Param("id") Long id); //查询自营商品 public List<Map> getSelfProductByUserId(@Param("id") Long id); //充值套餐 @Select("select CONCAT('充值',value) as title,value from t_config_field where group_id=1") List<JSONObject> getSetMeal(); //查询邀请码 Long selectUserIdByInvitationCode(@Param("invitationCode") String invitationCode); //查询盟友详情 AllianceRecord allianceDetails(@Param("id") Long id); //查询电话号码是否存在 @Select("select alliance_phone from t_alliance where alliance_phone=#{phone} ") String queryPhone(@Param("phone") String phone); //查询自己的团队 List<AllianceRecord> myTeam(Page<AllianceRecord> page, @Param("id") Long id, @Param("record") AllianceRecord record, @Param("search") String search); //查询自己的订单总额 @Select("select total_price as totalPrice,user_id as userId from t_order where id=#{orderId}") public JSONObject queryOrderMoney(@Param("orderId") Long orderId); //一周内加入的盟友 @Select("select b.* from t_alliance a INNER JOIN t_alliance b ON b.invitor_alliance_id=a.id where a.user_id=#{userId} and DATE_SUB(CURDATE(), INTERVAL 7 DAY)<b.alliance_ship_time") public List<Alliance> queryWeekAlliance(@Param("userId")Long userId); //一周内发货订单 @Select("select * from t_order where user_id = 11 and status='DELIVERED_CONFIRM_PENDING' and DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= created_date\n") public List<JSONObject> queryWeekOrderDeliver(@Param("userId") Long userId); //一周内盟友下单 @Select("select a.alliance_name as allianceName,o.* from t_order o,(select b.user_id,b.alliance_name from t_alliance a INNER JOIN t_alliance b ON b.invitor_alliance_id=a.id where a.user_id=#{userId}\n" + "and b.alliance_ship=0) as a where o.user_id = a.user_id and DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= o.created_date and o.status='PAID_CONFIRM_PENDING'") public List<JSONObject> queryWeekOrder(@Param("userId") Long userId); //重置userID @Update("update t_alliance set user_id=null where id=#{id}") Integer resetUserId(@Param("id")Long id); //团队下单奖励 //团队盟友升级 //删除表的数据 @Delete("delete from ${tableName}") public Integer deleteTableData(@Param("tableName") String tableName); //获取数据库json字段信息测试 @Select("select JSON_EXTRACT(t_product_settlement_proportion.proportion, '$.value') from t_product_settlement_proportion") public List<Float> getJson(); //查询userid @Select("select id from t_user where phone=${phone}") Long queryUserIdByPhone(@Param("phone") String phone); //同步t_user real_name 和 alliance表 alliance_name @Update("update t_user set real_name=#{name} where phone=#{alliancePhone}") Integer upUserRealNameByPhone(@Param("alliancePhone") String alliancePhone,@Param("name") String name); //获取所有盟友的id @Select("select id from t_alliance") List<Long> getAllAllianceIds(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "public void mo38117a() {\n }", "@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}", "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\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 }", "private void kk12() {\n\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void mo4359a() {\n }", "public void method_4270() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo70713b();", "@Override\n public int describeContents() { return 0; }", "private void m50366E() {\n }", "public void mo6081a() {\n }", "private static void cajas() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo12930a() {\n }", "protected void mo6255a() {\n }", "public void mo115190b() {\n }", "@Override\n\tpublic void nadar() {\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}", "public void mo1531a() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo9848a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void mo21877s() {\n }", "protected boolean func_70814_o() { return true; }", "private void poetries() {\n\n\t}", "public void mo12628c() {\n }", "@Override\n\tprotected void interr() {\n\t}", "public void mo21793R() {\n }", "public abstract Object mo1185b();", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public void mo21825b() {\n }", "public abstract Object mo1771a();", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public abstract void mo6549b();", "@Override\n\tpublic void anular() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "public void mo23813b() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "public void mo21785J() {\n }", "public void mo21779D() {\n }", "@Override public int describeContents() { return 0; }", "@Override\n\tprotected void getExras() {\n\n\t}", "zzafe mo29840Y() throws RemoteException;", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo21782G() {\n }", "public void m23075a() {\n }", "zzang mo29839S() throws RemoteException;", "public void mo21794S() {\n }", "public void mo3376r() {\n }", "public abstract Object mo26777y();", "@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}", "public void mo21878t() {\n }", "Consumable() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "public void mo21791P() {\n }", "public final void mo91715d() {\n }", "@Override\r\n\tpublic void init() {}", "public void mo21795T() {\n }", "public abstract void mo27385c();", "public abstract void mo56925d();", "protected abstract Set method_1559();", "public void mo21792Q() {\n }", "public void smell() {\n\t\t\n\t}", "public void mo21787L() {\n }", "public void mo44053a() {\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}", "public void mo97908d() {\n }", "public void mo3749d() {\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "private void init() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\n public void init() {\n\n }", "@Override\n protected void prot() {\n }", "public abstract String mo118046b();", "@Override\n protected void init() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}" ]
[ "0.59231997", "0.58876604", "0.5847965", "0.5750648", "0.57480264", "0.57480264", "0.5686354", "0.5647087", "0.56393373", "0.5601981", "0.5601981", "0.5601981", "0.5601981", "0.5601981", "0.5601981", "0.5601981", "0.55949086", "0.5587495", "0.5576187", "0.55725724", "0.5562545", "0.55417114", "0.55187017", "0.55161756", "0.5497034", "0.5495715", "0.549108", "0.5488118", "0.5485929", "0.54732686", "0.54726434", "0.54643595", "0.5463349", "0.54594284", "0.54569244", "0.5452569", "0.54423887", "0.5441557", "0.54412615", "0.5439599", "0.5422945", "0.54101855", "0.54053485", "0.5403328", "0.5400358", "0.5397855", "0.5382603", "0.53764117", "0.53742176", "0.5371003", "0.536543", "0.5353148", "0.53457034", "0.5341658", "0.534091", "0.53407246", "0.53398246", "0.53394496", "0.5330226", "0.53223634", "0.5321416", "0.53168416", "0.53129476", "0.53128564", "0.5307599", "0.53066933", "0.5305148", "0.5304435", "0.5304383", "0.5304383", "0.5304383", "0.5304383", "0.5304383", "0.5303252", "0.5295352", "0.52952343", "0.5292769", "0.52884394", "0.52839047", "0.5278902", "0.5278631", "0.5274372", "0.52682525", "0.52673995", "0.52596676", "0.5253731", "0.52404344", "0.5238847", "0.5238847", "0.5238847", "0.5237388", "0.52368784", "0.52340066", "0.5230859", "0.52276653", "0.52264124", "0.52247816", "0.5213788", "0.5209284", "0.52067804", "0.5205552" ]
0.0
-1
TODO Autogenerated method stub
@Override public int calculate(int a, int b) { return (a + b) * 2; }
{ "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
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, 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 public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@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 void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@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\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\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}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\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\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\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 void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@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 boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_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\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.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_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\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 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\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\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.menu, menu);\r\n return true;\r\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.7249256", "0.72037125", "0.7197713", "0.7180111", "0.71107703", "0.70437056", "0.70412415", "0.7014533", "0.7011124", "0.6983377", "0.69496083", "0.69436663", "0.69371194", "0.69207716", "0.69207716", "0.6893342", "0.6886841", "0.6879545", "0.6877086", "0.68662405", "0.68662405", "0.68662405", "0.68662405", "0.68546635", "0.6850904", "0.68238425", "0.6820094", "0.6817109", "0.6817109", "0.6816499", "0.6809805", "0.68039787", "0.6801761", "0.6795609", "0.6792361", "0.67904586", "0.67863315", "0.67613983", "0.67612505", "0.67518395", "0.6747958", "0.6747958", "0.67444956", "0.674315", "0.672999", "0.67269987", "0.67268807", "0.67268807", "0.67242754", "0.67145765", "0.6708541", "0.6707851", "0.6702594", "0.6702059", "0.6700578", "0.6698895", "0.66905326", "0.6687487", "0.6687487", "0.66857284", "0.66845626", "0.6683136", "0.66816247", "0.66716284", "0.66714823", "0.66655463", "0.6659545", "0.6659545", "0.6659545", "0.6658646", "0.6658646", "0.6658646", "0.6658615", "0.6656098", "0.665457", "0.6653698", "0.66525924", "0.6651066", "0.66510355", "0.6649152", "0.6648921", "0.6648275", "0.6647936", "0.66473657", "0.66471183", "0.6644802", "0.66427094", "0.66391647", "0.66359305", "0.6635502", "0.6635502", "0.6635502", "0.66354305", "0.66325855", "0.66324854", "0.6630521", "0.66282266", "0.66281354", "0.66235965", "0.662218", "0.66216594" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); // noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.79041183", "0.7805934", "0.77659106", "0.7727251", "0.7631684", "0.7621701", "0.75839096", "0.75300384", "0.74873656", "0.7458051", "0.7458051", "0.7438486", "0.742157", "0.7403794", "0.7391802", "0.73870087", "0.7379108", "0.7370295", "0.7362194", "0.7355759", "0.73454577", "0.734109", "0.73295504", "0.7327726", "0.73259085", "0.73188347", "0.731648", "0.73134047", "0.7303978", "0.7303978", "0.7301588", "0.7298084", "0.72932935", "0.7286338", "0.7283324", "0.72808945", "0.72785115", "0.72597474", "0.72597474", "0.72597474", "0.725962", "0.7259136", "0.7249966", "0.7224023", "0.721937", "0.7216621", "0.72045326", "0.7200649", "0.71991026", "0.71923256", "0.71851367", "0.7176769", "0.7168457", "0.71675026", "0.7153402", "0.71533287", "0.71352696", "0.71350807", "0.71350807", "0.7129153", "0.7128639", "0.7124181", "0.7123387", "0.7122983", "0.71220255", "0.711715", "0.711715", "0.711715", "0.711715", "0.7117043", "0.71169263", "0.7116624", "0.71149373", "0.71123946", "0.7109806", "0.7108778", "0.710536", "0.7098968", "0.70981944", "0.7095771", "0.7093572", "0.7093572", "0.70862055", "0.7082207", "0.70808214", "0.7080366", "0.7073644", "0.7068183", "0.706161", "0.7060019", "0.70598614", "0.7051272", "0.70374316", "0.70374316", "0.7035865", "0.70352185", "0.70352185", "0.7031749", "0.703084", "0.7029517", "0.7018633" ]
0.0
-1
Refer to the javadoc for ConnectionResult to see what error codes might be returned in onConnectionFailed.
@Override public void onConnectionFailed(ConnectionResult result) { Log.i(TAG, "Connection failed: ConnectionResult.getErrorCode() = " + result.getErrorCode()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onConnectionFailed(ConnectionResult result) {\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.e(TAG, \"onConnectionFailed: ConnectionResult.getErrorCode() = \" + connectionResult.getErrorCode());\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(\"Feelknit\", \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\n }", "@Override\r\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(\"onConnectionFailed \", \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\r\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(\"Connection failed:\", \" ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(ConnectionResult conRes) {}", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.e(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n return;\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n Fog.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed. Error: \" + result.getErrorCode());\n }", "@Override public void onConnectionFailed(ConnectionResult connectionResult) {\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.d(LCAT, \"onConnectionFailed:\" + connectionResult);\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {}", "@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\t\t\n\t}", "@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\t\t\n\t}", "@Override\n public void onConnectionFailed(ConnectionResult arg0) {\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\n\t}", "@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\t\t// TODO Auto-generated method stub\n\n\t}", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.d(\"SCXTT\", \" onConnectionFailed \" + result.toString());\n\n }", "@Override\n public void onConnectionFailed(ConnectionResult arg0) {\n\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\t\tLog.e(TAG, \"onConnectionFailed: ConnectionResult.getErrorCode() = \"\n\t\t\t\t+ connectionResult.getErrorCode());\n\t\t// TODO(Developer): Check error code and notify the user of error state and resolution.\n\t\tToast.makeText(this,\n\t\t\t\t\"Could not connect to Google API Client: Error \" + connectionResult.getErrorCode(),\n\t\t\t\tToast.LENGTH_SHORT).show();\n\n\t}", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n // Refer to the reference doc for ConnectionResult to see what error codes might\n // be returned in onConnectionFailed.\n Log.d(TAG, \"Play services connection failed: ConnectionResult.getErrorCode() = \"\n + connectionResult.getErrorCode());\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n // Refer to the reference doc for ConnectionResult to see what error codes might\n // be returned in onConnectionFailed.\n Log.d(TAG, \"Play services connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n // Refer to the reference doc for ConnectionResult to see what error codes might\n // be returned in onConnectionFailed.\n Log.d(TAG, \"Play services connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(\"mainActivity\", \"onConnectionFailed:\" + connectionResult);\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult result) {\n\t\tLog.d(\"ANDROID\", \"faild contected\");\n\t}", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n\n Log.e(TAG, \"onConnectionFailed: ConnectionResult.getErrorCode() = \"\n + connectionResult.getErrorCode());\n\n Toast.makeText(this,\n \"Could not connect to Google API Client: Error \" + connectionResult.getErrorCode(),\n Toast.LENGTH_SHORT).show();\n }", "@Override\npublic void onConnectionFailed(ConnectionResult arg0) {\n\t\n}", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Toast.makeText(this,\n \"Could not connect to Google API Client: Error \" + connectionResult.getErrorCode(),\n Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n // Can it be resolved, for example by installing a new version?\n log(\"Connection failed\");\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n log(\"Trying to resolve the error...\");\n connectionResult.startResolutionForResult(\n this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n } catch (IntentSender.SendIntentException e) {\n log(\"Exception during resolution: \" + e.toString());\n }\n } else {\n // No resolution is available\n showErrorDialog(connectionResult.getErrorCode());\n }\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\t\tToast.makeText(context, \"Connection Failed\", Toast.LENGTH_SHORT).show();\n\t}", "@Override\n\t\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\t if (connectionResult.hasResolution()) {\n\t try {\n\t // Start an Activity that tries to resolve the error\n\t connectionResult.startResolutionForResult(activity, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\t } catch (IntentSender.SendIntentException e) {\n\t // Log the error\n\t e.printStackTrace();\n\t }\n\t } else {\n\t /*\n\t * If no resolution is available, display a dialog to the\n\t * user with the error.\n\t */\n\n\t }\n\t\t\t\n\t\t}", "protected void onConnectionError() {\n\t}", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(getActivity(), CONNECTION_FAILURE_RESOLUTION_REQUEST);\n }\n catch (IntentSender.SendIntentException e) {\n e.printStackTrace();\n }\n }\n else {\n Log.i(TAG, \"Connection Failed: Error Code = \" + connectionResult.getErrorCode());\n }\n }", "public void onConnectionError()\n\t\t{\n\t\t}", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n // An unresolvable error has occurred and a connection to Google APIs\n // could not be established. Display an error message, or handle\n // the failure silently\n }", "public void OnConnectionError();", "@Override\n\tpublic void onConnectionFailed(ConnectionResult result) {\n\t\tLog.i(\"onConnectionFailed\", result.toString());\n\t\tif (result.hasResolution()) {\n\t\t\ttry {\n\t\t\t\tresult.startResolutionForResult(this, REQUEST_CODE_RESOLVE_ERR);\n\t\t\t} catch (SendIntentException e) {\n\t\t\t\tmPlusClient.connect();\n\t\t\t}\n\t\t}\n\n\t}", "void connectFailed();", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.w(TAG, \"Connection failed. Cause: \" + result.toString());\n if (!result.hasResolution()) {\n Log.w(TAG, String.valueOf(result.getErrorCode()));\n return;\n }\n\n if (!authInProgress) {\n try {\n Log.w(TAG, \"Attempting to resolve failed connection\");\n authInProgress = true;\n result.startResolutionForResult(SensorNew.this, REQUEST_OAUTH);\n } catch (IntentSender.SendIntentException e) {\n Log.w(TAG, \"Exception while starting resolution activity: \" + e.getMessage());\n }\n }\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n hideProgressDialog();\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.e(TAG, \"location service connection lost\");\n Toast.makeText(this, R.string.conn_failed, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed\");\n if (!result.hasResolution()) {\n GooglePlayServicesUtil.getErrorDialog(result.getErrorCode(), this, 0).show();\n return;\n }\n try {\n Log.i(TAG, \"trying to resolve the Connection failed error...\");\n result.startResolutionForResult(this, REQUEST_CODE);\n } catch (IntentSender.SendIntentException e) {\n Log.e(TAG, \"Exception while starting resolution activity\", e);\n }\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(Constants.GOOGLE_MAP_ERROR_TAG, Constants.GOOGLE_MAP_ERROR);\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(\n this,\n CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n //Do nothing, no location available so use default default in server spinner\n }\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(\n this,\n LocationUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n\n } catch (IntentSender.SendIntentException e) {\n\n // Log the error\n e.printStackTrace();\n }\n } else {\n\n // If no resolution is available, display a dialog to the user with the error.\n showErrorDialog(connectionResult.getErrorCode());\n }\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\n\t\t/*\n\t\t * Google Play services can resolve some errors it detects.\n\t\t * If the error has a resolution, try sending an Intent to\n\t\t * start a Google Play services activity that can resolve\n\t\t * error.\n\t\t */\n\t\tif (connectionResult.hasResolution()) {\n\t\t\ttry {\n\n\t\t\t\t// Start an Activity that tries to resolve the error\n\t\t\t\tconnectionResult.startResolutionForResult(\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\tLocationUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n\t\t\t\t/*\n\t\t\t\t * Thrown if Google Play services canceled the original\n\t\t\t\t * PendingIntent\n\t\t\t\t */\n\n\t\t\t} catch (IntentSender.SendIntentException e) {\n\n\t\t\t\t// Log the error\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\n\t\t\t// If no resolution is available, display a dialog to the user with the error.\n\t\t\tshowErrorDialog(connectionResult.getErrorCode());\n\t\t}\n\t}", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\t\tif (connectionResult.hasResolution()) {\n\t\t\ttry {\n\t\t\t\t// Start an Activity that tries to resolve the error\n\t\t\t\tconnectionResult.startResolutionForResult(this, 9000);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n\t\t\t} catch (IntentSender.SendIntentException e) {\n\n\t\t\t\t// Log the error\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n\t\t\tLog.i(\"LOCATION\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n\t\t}\n\t}", "@Override\n public void onSuccess(Void unusedResult) {\n Discoverer.this.eventListener.trigger(EVENT_LOG, \"Connection requested with: \" + endpointId);\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\t\tif (connectionResult.hasResolution()) {\n\t\t\ttry {\n\n\t\t\t\t// Start an Activity that tries to resolve the error\n\t\t\t\tconnectionResult.startResolutionForResult(getActivity(), LocationUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n\t\t\t\t/*\n\t\t\t\t * Thrown if Google Play services canceled the original PendingIntent\n\t\t\t\t */\n\n\t\t\t} catch (IntentSender.SendIntentException e) {\n\n\t\t\t\t// Log the error\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\n\t\t\t// If no resolution is available, display a dialog to the user with the error.\n\t\t\tshowErrorDialog(connectionResult.getErrorCode());\n\t\t}\n\n\t}", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(getActivity(), CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n\n }", "@Override public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\",\n \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n // Thrown if Google Play services canceled the original PendingIntent\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /* If no resolution is available, display a dialog to the\n * user with the error. */\n Log.i(LOG_TAG, \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n if (connectionResult.hasResolution() && mContext instanceof Activity) {\n try {\n Activity activity = (Activity) mContext;\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(activity, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n BBVAMapsLog.e(TAG, e.getMessage());\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n BBVAMapsLog.e(TAG, \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n\n /*\n * Google Play services can resolve some errors it detects.\n * If the error has a resolution, try sending an Intent to\n * start a Google Play services activity that can resolve\n * error.\n */\n if (connectionResult.hasResolution()) {\n\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(activity,\n \t\tLocationUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n\n /*\n * If no resolution is available, put the error code in\n * an error Intent and broadcast it back to the main Activity.\n * The Activity then displays an error dialog.\n * is out of date.\n */\n } else {\n\n Intent errorBroadcastIntent = new Intent(LocationUtils.ACTION_CONNECTION_ERROR);\n errorBroadcastIntent.addCategory(LocationUtils.CATEGORY_LOCATION_SERVICES)\n .putExtra(LocationUtils.EXTRA_CONNECTION_ERROR_CODE,\n connectionResult.getErrorCode());\n LocalBroadcastManager.getInstance(activity).sendBroadcast(errorBroadcastIntent);\n }\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.e(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(\"LoginActivity\", \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "public abstract void mo27384b(OnConnectionFailedListener onConnectionFailedListener);", "@Override\n protected void onActivityResult(\n int requestCode, int resultCode, Intent data) {\n // Decide what to do based on the original request code\n switch (requestCode) {\n case CONNECTION_FAILURE_RESOLUTION_REQUEST :\n /*\n * If the result code is Activity.RESULT_OK, try\n * to connect again\n */\n switch (resultCode) {\n case Activity.RESULT_OK :\n /*\n * Try the request again?\n */\n\n break;\n }\n }\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult)\n {\n swipeRefreshLayout.setVisibility(View.GONE);\n showError(R.drawable.ic_location_disabled_black,\n R.string.error_message_update_google_play_services,\n R.string.fix_error_no_fix);\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(\"MainActivity\", \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\t\t/*\n\t\t * Google Play services can resolve some errors it detects. If the error\n\t\t * has a resolution, try sending an Intent to start a Google Play\n\t\t * services activity that can resolve error.\n\t\t */\n\t\tif (connectionResult.hasResolution()) {\n\t\t\ttry {\n\t\t\t\t// Start an Activity that tries to resolve the error\n\t\t\t\tconnectionResult.startResolutionForResult(this,\n\t\t\t\t\t\tCONNECTION_FAILURE_RESOLUTION_REQUEST);\n\t\t\t\t/*\n\t\t\t\t * Thrown if Google Play services canceled the original\n\t\t\t\t * PendingIntent\n\t\t\t\t */\n\t\t\t} catch (IntentSender.SendIntentException e) {\n\t\t\t\t// Log the error\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\"Sorry. Location services not available to you\", Toast.LENGTH_LONG).show();\n\t\t}\n\t}", "public int getConnectionStatus()\r\n { return connectionStatus; }", "@Override\n\tpublic void connectionSucceeded(String message) {\n\t}", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"GoogleApiClient connection failed: \" + result.toString());\n\n if (!result.hasResolution()) {\n\n // show the localized error dialog.\n GoogleApiAvailability.getInstance().getErrorDialog(this, result.getErrorCode(), 0).show();\n return;\n }\n\n /**\n * The failure has a resolution. Resolve it.\n * Called typically when the app is not yet authorized, and an authorization\n * dialog is displayed to the user.\n */\n\n try {\n\n result.startResolutionForResult(this, REQUEST_CODE_RESOLUTION);\n\n } catch (IntentSender.SendIntentException e) {\n\n Log.e(TAG, \"Exception while starting resolution activity\", e);\n }\n }", "protected abstract void showConnectError();", "protected void onConnectionFailed(Endpoint endpoint) {}", "@Override\n\tpublic void connectionFailed(String message) {\n\t\tToast.makeText(this, \"Connection Failed !\", Toast.LENGTH_SHORT).show();\n\t}", "public void testConnecitonFails() {\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tConnection c = new Connection(\"localhost\", 4444, this, this);\n\t\t\t// this connection should fail... wait for that:\n\t\t\tfor (int i=0; i<10; i++) {\n\t\t\t\t// if we have a result before our max-wait-time, break\n\t\t\t\tif (connectionStatus != null)\n\t\t\t\t\tbreak;\n\t\t\t\tThread.sleep(500);\n\t\t\t}\n\t\t\t\n\t\t\tassertTrue(connectionStatus != null && connectionStatus.booleanValue() == false);\n\t\t} catch (Exception e) {\n\t\t\tassertTrue(\"should not get an exception\", false);\n\t\t}\n\t}", "@Override\n public void onFailure(int i) {\n System.out.println(\"pca connect: Failed to connect = \" + i);\n }", "@ReactMethod\n public void connectionStatus(Callback connectionStatusResult) {\n ConnectivityManager connManager = (ConnectivityManager) getReactApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo mWifi = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);\n if (mWifi.isConnected()) {\n connectionStatusResult.invoke(true);\n } else {\n connectionStatusResult.invoke(false);\n }\n }", "public void onConnectionFailed(ConnectionResult connectionResult) {\r\n /*\r\n * Google Play services can resolve some errors it detects.\r\n * If the error has a resolution, try sending an Intent to\r\n * start a Google Play services activity that can resolve\r\n * error.\r\n */\r\n if (connectionResult.hasResolution()) {\r\n try {\r\n // Start an Activity that tries to resolve the error\r\n connectionResult.startResolutionForResult(\r\n this,\r\n CONNECTION_FAILURE_RESOLUTION_REQUEST);\r\n /*\r\n * Thrown if Google Play services canceled the original\r\n * PendingIntent\r\n */\r\n } catch (IntentSender.SendIntentException e) {\r\n // Log the error\r\n e.printStackTrace();\r\n }\r\n } else {\r\n Toast.makeText(getApplicationContext(), \"Sorry. Location services not available to you\", Toast.LENGTH_LONG).show();\r\n }\r\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Toast.makeText(getBaseContext(), R.string.google_api_client_connection_failed, Toast.LENGTH_LONG).show();\n googleApiClient.connect();\n }", "@Override\r\n protected void onActivityResult(\r\n int requestCode, int resultCode, Intent data) {\r\n // Decide what to do based on the original request code\r\n switch (requestCode) {\r\n\r\n case CONNECTION_FAILURE_RESOLUTION_REQUEST:\r\n /*\r\n * If the result code is Activity.RESULT_OK, try\r\n * to connect again\r\n */\r\n switch (resultCode) {\r\n case Activity.RESULT_OK:\r\n mLocationClient.connect();\r\n break;\r\n }\r\n\r\n }\r\n }", "@Override\r\n public void connectFailed() {\n super.connectFailed();\r\n Commons.showToast(act, \"连接失败\");\r\n act.dismissLoadDialog();\r\n }", "@Override\n public void onConnectFailed()\n {\n Log.e(\"Dudu_SDK\",\n \"获取NS 业务服务器失败...onConnectFailed ... reconnect()...5 seconds later ...\");\n reconnect();\n if (connectCallBack != null)\n connectCallBack.onConnectFailed();\n }" ]
[ "0.8234315", "0.81696045", "0.81696045", "0.81696045", "0.8165342", "0.815472", "0.815381", "0.81204534", "0.8109111", "0.8099556", "0.80961084", "0.8075019", "0.8059573", "0.80544144", "0.8042482", "0.79683757", "0.79420555", "0.7930617", "0.79002225", "0.78676206", "0.78069586", "0.78069586", "0.7788155", "0.77829874", "0.7781024", "0.7781024", "0.7781024", "0.77714354", "0.77230746", "0.77042574", "0.77022177", "0.77022177", "0.76829016", "0.75888294", "0.75606185", "0.7457972", "0.7384279", "0.7384279", "0.7374309", "0.7304837", "0.72680116", "0.72042334", "0.7185479", "0.71765214", "0.71645653", "0.71043086", "0.70630866", "0.7056029", "0.70526433", "0.70192194", "0.69831514", "0.6967032", "0.68851715", "0.6830902", "0.68234277", "0.67987204", "0.67978466", "0.675224", "0.6675353", "0.6648318", "0.6637001", "0.66238236", "0.6596342", "0.65858275", "0.6584455", "0.6584455", "0.65822554", "0.6581067", "0.65803415", "0.65765613", "0.65730083", "0.6555033", "0.65443665", "0.6536209", "0.6536209", "0.6536209", "0.6536209", "0.6536209", "0.6536209", "0.6536209", "0.6458933", "0.6442349", "0.6414174", "0.6408932", "0.63932943", "0.6340072", "0.6299975", "0.62787217", "0.6226495", "0.62234193", "0.6221885", "0.6217359", "0.6215386", "0.6201826", "0.61983854", "0.6196669", "0.6168493", "0.6164888", "0.6147864", "0.6136288" ]
0.8279333
0
The connection to Google Play services was lost for some reason. We call connect() to attempt to reestablish the connection.
@Override public void onConnectionSuspended(int cause) { Log.i(TAG, "Connection suspended"); mGoogleApiClient.connect(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void connectGoogleApiAgain(){\n if (!mGoogleApiClient.isConnected()) {\n ConnectionResult connectionResult =\n mGoogleApiClient.blockingConnect(30, TimeUnit.SECONDS);\n\n if (!connectionResult.isSuccess()) {\n Log.e(TAG, \"DataLayerListenerService failed to connect to GoogleApiClient, \"\n + \"error code: \" + connectionResult.getErrorCode());\n }\n }\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(\"MainActivity\", \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.e(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Toast.makeText(getBaseContext(), R.string.google_api_client_connection_failed, Toast.LENGTH_LONG).show();\n googleApiClient.connect();\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n // An unresolvable error has occurred and a connection to Google APIs\n // could not be established. Display an error message, or handle\n // the failure silently\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(\"LoginActivity\", \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Toast.makeText(this,\n \"Could not connect to Google API Client: Error \" + connectionResult.getErrorCode(),\n Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionSuspended(int cause) {\n Log.e(TAG, \"Connection suspended\");\n mGoogleApiClient.connect();\n }", "@Override\n public void onConnectionSuspended(int cause) {\n Log.i(TAG, \"Connection suspended\");\n mGoogleApiClient.connect();\n }", "@Override\n public void onConnectionSuspended(int cause) {\n Log.i(TAG, \"Connection suspended\");\n mGoogleApiClient.connect();\n }", "@Override\r\n public void onConnectionFailed(ConnectionResult result) {\n mGoogleApiClient.reconnect();\r\n map.clear();\r\n markerCount = 0;\r\n }", "@Override\n public void onConnectionSuspended(int cause) {\n Log.i(\"Feelknit\", \"Connection suspended\");\n mGoogleApiClient.connect();\n }", "@Override\n public void onConnectionSuspended(int cause) {\n Log.i(DEBUG_TAG, \"Connection suspended\");\n mGoogleApiClient.connect();\n }", "private void requestConnection() {\n getGoogleApiClient().connect();\n }", "@Override\n public void onConnectionSuspended(int cause) {\n Log.d(TAG, \"Play services connection suspended\");\n }", "@Override\n public void onConnectionSuspended(int cause) {\n Log.d(TAG, \"Play services connection suspended\");\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n // Refer to the reference doc for ConnectionResult to see what error codes might\n // be returned in onConnectionFailed.\n Log.d(TAG, \"Play services connection failed: ConnectionResult.getErrorCode() = \"\n + connectionResult.getErrorCode());\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n // Refer to the reference doc for ConnectionResult to see what error codes might\n // be returned in onConnectionFailed.\n Log.d(TAG, \"Play services connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n // Refer to the reference doc for ConnectionResult to see what error codes might\n // be returned in onConnectionFailed.\n Log.d(TAG, \"Play services connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }", "@Override\r\n public void onConnectionSuspended(int cause) {\n mGoogleApiClient.connect();\r\n map.clear();\r\n markerCount = 0;\r\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n\n Log.e(TAG, \"onConnectionFailed: ConnectionResult.getErrorCode() = \"\n + connectionResult.getErrorCode());\n\n Toast.makeText(this,\n \"Could not connect to Google API Client: Error \" + connectionResult.getErrorCode(),\n Toast.LENGTH_SHORT).show();\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\t\t/*\n\t\t * Google Play services can resolve some errors it detects. If the error\n\t\t * has a resolution, try sending an Intent to start a Google Play\n\t\t * services activity that can resolve error.\n\t\t */\n\t\tif (connectionResult.hasResolution()) {\n\t\t\ttry {\n\t\t\t\t// Start an Activity that tries to resolve the error\n\t\t\t\tconnectionResult.startResolutionForResult(this,\n\t\t\t\t\t\tCONNECTION_FAILURE_RESOLUTION_REQUEST);\n\t\t\t\t/*\n\t\t\t\t * Thrown if Google Play services canceled the original\n\t\t\t\t * PendingIntent\n\t\t\t\t */\n\t\t\t} catch (IntentSender.SendIntentException e) {\n\t\t\t\t// Log the error\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\"Sorry. Location services not available to you\", Toast.LENGTH_LONG).show();\n\t\t}\n\t}", "@Override\n public void onConnectionSuspended(int i) {\n if (i == GoogleApiClient.ConnectionCallbacks.CAUSE_NETWORK_LOST) {\n com.google.android.gms.fit.samples.common.logger.Log.i(TAG, \"Connection lost. Cause: Network Lost.\");\n } else if (i == GoogleApiClient.ConnectionCallbacks.CAUSE_SERVICE_DISCONNECTED) {\n com.google.android.gms.fit.samples.common.logger.Log.i(TAG, \"Connection lost. Reason: Service Disconnected\");\n }\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\t\tLog.e(TAG, \"onConnectionFailed: ConnectionResult.getErrorCode() = \"\n\t\t\t\t+ connectionResult.getErrorCode());\n\t\t// TODO(Developer): Check error code and notify the user of error state and resolution.\n\t\tToast.makeText(this,\n\t\t\t\t\"Could not connect to Google API Client: Error \" + connectionResult.getErrorCode(),\n\t\t\t\tToast.LENGTH_SHORT).show();\n\n\t}", "private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(mActivity);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n Log.d(Util.TAG_GOOGLE, \"\" + connectionStatusCode);\n // showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }", "public void onConnectionFailed(ConnectionResult connectionResult) {\r\n /*\r\n * Google Play services can resolve some errors it detects.\r\n * If the error has a resolution, try sending an Intent to\r\n * start a Google Play services activity that can resolve\r\n * error.\r\n */\r\n if (connectionResult.hasResolution()) {\r\n try {\r\n // Start an Activity that tries to resolve the error\r\n connectionResult.startResolutionForResult(\r\n this,\r\n CONNECTION_FAILURE_RESOLUTION_REQUEST);\r\n /*\r\n * Thrown if Google Play services canceled the original\r\n * PendingIntent\r\n */\r\n } catch (IntentSender.SendIntentException e) {\r\n // Log the error\r\n e.printStackTrace();\r\n }\r\n } else {\r\n Toast.makeText(getApplicationContext(), \"Sorry. Location services not available to you\", Toast.LENGTH_LONG).show();\r\n }\r\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.e(TAG, \"location service connection lost\");\n Toast.makeText(this, R.string.conn_failed, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onConnectionSuspended(int cause) {\n\n Log.i(TAG, \"GoogleApiClient connection suspended\");\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(Constants.GOOGLE_MAP_ERROR_TAG, Constants.GOOGLE_MAP_ERROR);\n }", "@Override\n protected void onStop() {\n if (null != googleClient && googleClient.isConnected()) {\n googleClient.disconnect();\n }\n super.onStop();\n }", "@Override\n public void onConnectionSuspended(int i) {\n Log.d(TAG, \"Play services connection suspended\");\n }", "private void checkGooglePlayServices() {\n\t\tint status = GooglePlayServicesUtil\n\t\t\t\t.isGooglePlayServicesAvailable(getApplicationContext());\n\t\tif (D) {\n\t\t\tif (status == ConnectionResult.SUCCESS) {\n\t\t\t\t// Success! Do what you want\n\t\t\t\tLog.i(TAG, \"Google Play Services all good\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_MISSING) {\n\t\t\t\tLog.e(TAG, \"Google Play Services not in place\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED) {\n\t\t\t\tLog.e(TAG, \"Google Play Serivices outdated\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_DISABLED) {\n\t\t\t\tLog.e(TAG, \"Google Plauy Services disabled\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_INVALID) {\n\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\"Google Play Serivices invalid but wtf does that mean?\");\n\t\t\t} else {\n\t\t\t\tLog.e(TAG, \"No way this is gonna happen\");\n\t\t\t}\n\t\t}\n\t}", "private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }", "private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }", "private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }", "@Override\n public void connectionLost(Throwable cause) {\n Log.d(TAG, \"Connection lost\");\n }", "private void connectionFailed() {\n // Send a failure message back to the Activity\n Message msg = handler.obtainMessage(SdlRouterService.MESSAGE_LOG);\n Bundle bundle = new Bundle();\n bundle.putString(LOG, \"Unable to connect device\");\n msg.setData(bundle);\n handler.sendMessage(msg);\n\n // Start the service over to restart listening mode\n // BluetoothSerialServer.this.start();\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode,\n Intent data) {\n // Decide what to do based on the original request code\n switch (requestCode) {\n case CONNECTION_FAILURE_RESOLUTION_REQUEST:\n // If the result code is OK, try to connect again\n log(\"Resolution result code is: \" + resultCode);\n switch (resultCode) {\n case Activity.RESULT_OK:\n // Try to connect again here\n mGoogleApiClient.connect();\n break;\n }\n break;\n }\n }", "@Override\n\tprotected void onResume()\n\t{\n\t\tsuper.onResume();\n\n\t\tint resCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());\n\t\tif (resCode != ConnectionResult.SUCCESS)\n\t\t{\n\t\t\tGooglePlayServicesUtil.getErrorDialog(resCode, this, 1);\n\t\t}\n\t}", "@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\n\t\t/*\n\t\t * Google Play services can resolve some errors it detects.\n\t\t * If the error has a resolution, try sending an Intent to\n\t\t * start a Google Play services activity that can resolve\n\t\t * error.\n\t\t */\n\t\tif (connectionResult.hasResolution()) {\n\t\t\ttry {\n\n\t\t\t\t// Start an Activity that tries to resolve the error\n\t\t\t\tconnectionResult.startResolutionForResult(\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\tLocationUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n\t\t\t\t/*\n\t\t\t\t * Thrown if Google Play services canceled the original\n\t\t\t\t * PendingIntent\n\t\t\t\t */\n\n\t\t\t} catch (IntentSender.SendIntentException e) {\n\n\t\t\t\t// Log the error\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\n\t\t\t// If no resolution is available, display a dialog to the user with the error.\n\t\t\tshowErrorDialog(connectionResult.getErrorCode());\n\t\t}\n\t}", "private void acquireGooglePlayServices() {\r\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\r\n final int connectionStatusCode = apiAvailability.isGooglePlayServicesAvailable(getActivity());\r\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\r\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\r\n }\r\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n\n /*\n * Google Play services can resolve some errors it detects.\n * If the error has a resolution, try sending an Intent to\n * start a Google Play services activity that can resolve\n * error.\n */\n if (connectionResult.hasResolution()) {\n\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(activity,\n \t\tLocationUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n\n /*\n * If no resolution is available, put the error code in\n * an error Intent and broadcast it back to the main Activity.\n * The Activity then displays an error dialog.\n * is out of date.\n */\n } else {\n\n Intent errorBroadcastIntent = new Intent(LocationUtils.ACTION_CONNECTION_ERROR);\n errorBroadcastIntent.addCategory(LocationUtils.CATEGORY_LOCATION_SERVICES)\n .putExtra(LocationUtils.EXTRA_CONNECTION_ERROR_CODE,\n connectionResult.getErrorCode());\n LocalBroadcastManager.getInstance(activity).sendBroadcast(errorBroadcastIntent);\n }\n }", "@Override\n protected void onStop() {\n super.onStop();\n if (googleApiClient != null) {\n Log.i(TAG, \"In onStop() - disConnecting...\");\n googleApiClient.disconnect();\n }\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult)\n {\n swipeRefreshLayout.setVisibility(View.GONE);\n showError(R.drawable.ic_location_disabled_black,\n R.string.error_message_update_google_play_services,\n R.string.fix_error_no_fix);\n }", "@Override\n protected ConnectionResult doInBackground(Void... params) {\n ConnectionResult connectionResult = googleApiClient.blockingConnect(\n Constants.GOOGLE_API_CLIENT_TIMEOUT_S, TimeUnit.SECONDS);\n\n return connectionResult;\n }", "private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(getActivity());\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\t\tif (connectionResult.hasResolution()) {\n\t\t\ttry {\n\t\t\t\t// Start an Activity that tries to resolve the error\n\t\t\t\tconnectionResult.startResolutionForResult(this, 9000);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n\t\t\t} catch (IntentSender.SendIntentException e) {\n\n\t\t\t\t// Log the error\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n\t\t\tLog.i(\"LOCATION\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n\t\t}\n\t}", "private void connectionLost() {\n // Send a failure message back to the Activity\n Message msg = handler.obtainMessage(SdlRouterService.MESSAGE_LOG);\n Bundle bundle = new Bundle();\n bundle.putString(LOG, \"Device connection was lost\");\n msg.setData(bundle);\n handler.sendMessage(msg);\n handler.postDelayed(new Runnable() { //sends this stop back to the main thread to exit the reader thread\n @Override\n public void run() {\n stop();\n }\n }, 250);\n }", "@Override\n protected void onStop() {\n if (mGoogleApiClient.isConnected()) {\n mGoogleApiClient.disconnect();\n }\n\n super.onStop();\n }", "private void connectionFailed() {\n if (debugging)\n Log.d(TAG, \"connection Failed\");\n setState(EBluetoothStates.DISCONNECTED);\n if (mConnectionManager != null) {\n mConnectionManager.closeSocket();\n }\n }", "private boolean checkGooglePlayServices() {\n int code = GooglePlayServicesUtil.isGooglePlayServicesAvailable(mActivity);\n if (code != ConnectionResult.SUCCESS) {\n Dialog dialog = GooglePlayServicesUtil.getErrorDialog(code, mActivity, Constants.RequestCode.HANDLE_GMS,\n new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialogInterface) {\n mActivity.finish();\n }\n });\n if (dialog != null) {\n dialog.show();\n }\n\n return false;\n }\n\n return true;\n }", "@Override\n\t\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\t\t\tLocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, appLocationService);\n\n\t\t}", "private void connectionLost() {\n setState(EBluetoothStates.CONNECTING);\n // Send a failure message back to the Activity\n // updateActivity(General.MessageType.ERROR, General.OnDeviceConnectionLost);\n }", "private void disConnect() {\n Auth.GoogleSignInApi.revokeAccess(mGoogleApiClient).setResultCallback(\n new ResultCallback<Status>() {\n @Override\n public void onResult(Status status) {\n m_tvStatus.setText(R.string.status_notconnected);\n m_tvEmail.setText(\"\");\n m_tvDispName.setText(\"\");\n }\n });\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult result) {\n\t\tLog.d(\"ANDROID\", \"faild contected\");\n\t}", "private void connectionLost() {\n Log.d(TAG, \"BluetoothManager :: connectionLost()\");\n setState(STATE_LISTEN); //추가됨\n\n // Send a failure message back to the Activity\n // WARNING: This makes too many toast.\n //이것도 어차피 연결잃었다고하는거 알려주는거라 안해도 상관 없다.\n /*\n Message msg = mHandler.obtainMessage(MESSAGE_TOAST);\n Bundle bundle = new Bundle();\n bundle.putString(SERVICE_HANDLER_MSG_KEY_TOAST, \"연결되있던장치와 연결을 잃었어요\");\n msg.setData(bundle);\n mHandler.sendMessage(msg);\n */\n // Reserve re-connect timer\n reserveRetryConnect(); //수정됨\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult result) {\n\t\tLog.i(\"onConnectionFailed\", result.toString());\n\t\tif (result.hasResolution()) {\n\t\t\ttry {\n\t\t\t\tresult.startResolutionForResult(this, REQUEST_CODE_RESOLVE_ERR);\n\t\t\t} catch (SendIntentException e) {\n\t\t\t\tmPlusClient.connect();\n\t\t\t}\n\t\t}\n\n\t}", "@Override\n public void onConnectFailed()\n {\n Log.e(\"Dudu_SDK\",\n \"获取NS 业务服务器失败...onConnectFailed ... reconnect()...5 seconds later ...\");\n reconnect();\n if (connectCallBack != null)\n connectCallBack.onConnectFailed();\n }", "private void checkGooglePlayServiceSDK() {\n //To change body of created methods use File | Settings | File Templates.\n final int googlePlayServicesAvailable = GooglePlayServicesUtil.isGooglePlayServicesAvailable(context);\n Log.i(TAG, \"googlePlayServicesAvailable:\" + googlePlayServicesAvailable);\n\n switch (googlePlayServicesAvailable) {\n case ConnectionResult.SERVICE_MISSING:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_NOT_INSTALLED);\n break;\n case ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_SERVICE_UPDATE_REQUIRED);\n break;\n case ConnectionResult.SERVICE_DISABLED:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_DISABLED);\n break;\n case ConnectionResult.SERVICE_INVALID:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_INVALID);\n break;\n }\n }", "@Override\n protected void onStop() {\n mGoogleApiClient.disconnect();\n super.onStop();\n }", "@Override\n protected void onStop() {\n mGoogleApiClient.disconnect();\n super.onStop();\n }", "@Override\n protected void onStart() {\n super.onStart();\n\n\n GoogleApiAvailability GMS_Availability = GoogleApiAvailability.getInstance();\n int GMS_CheckResult = GMS_Availability.isGooglePlayServicesAvailable(this);\n\n if (GMS_CheckResult != ConnectionResult.SUCCESS) {\n\n // Would show a dialog to suggest user download GMS through Google Play\n GMS_Availability.getErrorDialog(this, GMS_CheckResult, 1).show();\n }else{\n mGoogleApiClient.connect();\n }\n }", "@Override\n\tpublic void onDisconnected() {\n\t\tToast.makeText(context, \"Disconnected. Please re-connect.\",Toast.LENGTH_SHORT).show();\n\t}", "public boolean googleServiceCheck() {\n int isServiceAvailable = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\n if (isServiceAvailable == ConnectionResult.SUCCESS) {\n return true;\n } else if (GooglePlayServicesUtil.isUserRecoverableError(isServiceAvailable)) {\n Dialog dialog = GooglePlayServicesUtil.getErrorDialog(isServiceAvailable, this, GPS_ERROR_DIALOG_REQUEST);\n dialog.show();\n } else {\n Toast.makeText(this, \"Can't connect to Google Play Service\", Toast.LENGTH_SHORT).show();\n }\n return false;\n }", "@Override\n protected void onStart() {\n super.onStart();\n if (!mGoogleApiClient.isConnected()) {\n mGoogleApiClient.connect();\n }\n }", "protected void onConnectionError() {\n\t}", "@Override\r\n protected void onStop() {\n super.onStop();\r\n if (mGoogleApiClient.isConnected()) {\r\n mGoogleApiClient.disconnect();\r\n }\r\n }", "public boolean isGooglePlayServicesAvailable() {\n final int connectionStatusCode =\n GooglePlayServicesUtil.isGooglePlayServicesAvailable(context);\n if (GooglePlayServicesUtil.isUserRecoverableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n return false;\n } else if (connectionStatusCode != ConnectionResult.SUCCESS ) {\n return false;\n }\n return true;\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n\n }", "private boolean servicesConnected(Activity activity) {\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(activity);\n // If Google Play services is available\n if (ConnectionResult.SUCCESS == resultCode) {\n return true;\n // Google Play services was not available for some reason.\n // resultCode holds the error code.\n } else {\n // Get the error dialog from Google Play services\n Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(resultCode, activity, LocationFailureHandler.CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n // If Google Play services can provide an error dialog\n if (errorDialog != null) {\n \terrorDialog.show();\n } else {\n }\n return false;\n }\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n return;\n }", "@Override public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\",\n \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(\n this,\n CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n //Do nothing, no location available so use default default in server spinner\n }\n }", "private void connectionLost() {\n// mConnectionLostCount++;\n// if (mConnectionLostCount < 3) {\n// \t// Send a reconnect message back to the Activity\n//\t Message msg = mHandler.obtainMessage(RemoteBluetooth.MESSAGE_TOAST);\n//\t Bundle bundle = new Bundle();\n//\t bundle.putString(RemoteBluetooth.TOAST, \"Device connection was lost. Reconnecting...\");\n//\t msg.setData(bundle);\n//\t mHandler.sendMessage(msg);\n//\t \n// \tconnect(mSavedDevice); \t\n// } else {\n \tsetState(STATE_LISTEN);\n\t // Send a failure message back to the Activity\n\t Message msg = mHandler.obtainMessage(RemoteBluetooth.MESSAGE_TOAST);\n\t Bundle bundle = new Bundle();\n\t bundle.putString(RemoteBluetooth.TOAST, \"Device connection was lost\");\n\t msg.setData(bundle);\n\t mHandler.sendMessage(msg);\n// }\n }", "private boolean servicesConnected() {\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\n if (ConnectionResult.SUCCESS == resultCode) {\n return true;\n }\n else {\n Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 0);\n if (dialog != null) {\n ErrorDialogFragment errorFragment = new ErrorDialogFragment();\n errorFragment.setDialog(dialog);\n errorFragment.show(getSupportFragmentManager(), Constants.APPTAG);\n }\n return false;\n }\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {}", "@Override\n public void onStop() {\n mGoogleApiClient.disconnect();\n super.onStop();\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n }", "@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n super.onActivityResult(requestCode, resultCode, data);\r\n switch (requestCode) {\r\n case REQUEST_CODE_RESOLUTION:\r\n retryConnecting();\r\n break;\r\n }\r\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n // Thrown if Google Play services canceled the original PendingIntent\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /* If no resolution is available, display a dialog to the\n * user with the error. */\n Log.i(LOG_TAG, \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(getActivity(), CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed\");\n if (!result.hasResolution()) {\n GooglePlayServicesUtil.getErrorDialog(result.getErrorCode(), this, 0).show();\n return;\n }\n try {\n Log.i(TAG, \"trying to resolve the Connection failed error...\");\n result.startResolutionForResult(this, REQUEST_CODE);\n } catch (IntentSender.SendIntentException e) {\n Log.e(TAG, \"Exception while starting resolution activity\", e);\n }\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n\n }", "@Override\n protected void onPause() {\n super.onPause();\n if (googleApiClient != null) {\n googleApiClient.stopAutoManage(this);\n googleApiClient.disconnect();\n }\n }", "private boolean isGooglePlayServicesAvailable() {\n int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n if (ConnectionResult.SUCCESS == status) {\n return true;\n } else {\n GooglePlayServicesUtil.getErrorDialog(status, this, 0).show();\n return false;\n }\n }", "@Override\n public void connectionLost(Throwable cause) {\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n switch (requestCode) {\n case REQUEST_CODE_RESOLUTION:\n retryConnecting();\n break;\n }\n }", "private boolean checkPlayServices()\n {\n\tint resultCode=-5000;\n\ttry {\n\t\tresultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\t} catch (Exception e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\tif (resultCode != ConnectionResult.SUCCESS)\n\t{\n\t if (GooglePlayServicesUtil.isUserRecoverableError(resultCode))\n\t {\n\t \tLog.i(Globals.TAG, \"dialog gorunecek\");\n\t \tGooglePlayServicesUtil.getErrorDialog(resultCode, this, PLAY_SERVICES_RESOLUTION_REQUEST).show();\n\t \tLog.i(Globals.TAG, \"dialog kapandi\");\n\t }\n\t else\n\t {\n\t\t\tLog.i(Globals.TAG, \"This device is not supported.\");\n\t\t\tint RQS_GooglePlayServices = 1;\n\t\t\t GooglePlayServicesUtil.getErrorDialog(resultCode, this, RQS_GooglePlayServices);\n\t\t\tfinish();\n\t }\n\t return false;\n\t}\n\treturn true;\n }", "@Override\n public void onFailure(Call<ChallengeResponse> call, Throwable t) {\n Toast.makeText(getBaseContext(), \"Please check your connection!\", Toast.LENGTH_LONG).show();\n finish();\n\n }", "@Override\r\n protected void onPause() {\n if (connectivityRegistered) {\r\n // If it has, unregister the listener\r\n unregisterConnectivityListener();\r\n }\r\n super.onPause();\r\n }" ]
[ "0.75260144", "0.7320096", "0.7318053", "0.7318053", "0.7318053", "0.7318053", "0.7318053", "0.7318053", "0.7318053", "0.7292153", "0.7290903", "0.7174132", "0.7091109", "0.699247", "0.68724185", "0.68633896", "0.68633896", "0.68051785", "0.6798532", "0.6765093", "0.6623286", "0.6578483", "0.6578483", "0.65672344", "0.6558392", "0.6558392", "0.65540206", "0.6535027", "0.652463", "0.65194035", "0.6506449", "0.65063447", "0.649197", "0.6470381", "0.64238495", "0.64096326", "0.6396764", "0.638292", "0.6336726", "0.6334341", "0.6334341", "0.6334341", "0.63228214", "0.63125914", "0.62955946", "0.62610495", "0.623983", "0.6236343", "0.62315464", "0.6222174", "0.62058103", "0.6175187", "0.6169795", "0.6155473", "0.6149991", "0.6136323", "0.61115015", "0.6102764", "0.6070715", "0.60705507", "0.6059159", "0.60568315", "0.60476345", "0.6041239", "0.6039763", "0.60264105", "0.60233605", "0.60233605", "0.6017684", "0.6015695", "0.6011638", "0.60080826", "0.60077", "0.59979594", "0.5993672", "0.5992874", "0.5982165", "0.5977969", "0.59741616", "0.59587765", "0.5958669", "0.5943752", "0.594073", "0.59245604", "0.5923563", "0.5922822", "0.5922822", "0.59153163", "0.59141123", "0.58938986", "0.58867157", "0.5879717", "0.5879717", "0.58780664", "0.5877528", "0.5873313", "0.5866111", "0.58552647", "0.58522516", "0.58423793" ]
0.69638294
14
/ Query the USGS API for data at the end of interval
private void createAndStartTimer() { CountDownTimer timer = new CountDownTimer(INTERVAL, SECOND) { @Override public void onTick(long millisUntilFinished) { } @Override public void onFinish() { /* Get the saved JSON file and store in variable */ /* will be implemented later */ /* Get the new JSON file */ Log.d("timer", "finished one timer cycle"); new DownloadDataTask().execute(USGS_URL); try { // get the most recent earthquake mostRecentEarthquake = getFirstEarthquakeFromJson(); } catch (JSONException e) { e.printStackTrace(); } // notify user of earthquake Intent i = new Intent(getBaseContext(), EarthquakeWatchService.class); i.putExtra("earthquake", mostRecentEarthquake); startService(i); createAndStartTimer(); } }; timer.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void queryTimeSeries(final Message<JsonObject> msg) {\n\n final JsonObject query = msg.body();\n LOG.debug(\"{}\\n{}\", address, query.encodePrettily());\n\n // get the paramsters from the query\n final Range range = rangeParser.parse(query.getJsonObject(\"range\").getString(\"from\"),\n query.getJsonObject(\"range\").getString(\"to\"));\n final long interval = intervalParser.parseToLong(query.getString(\"interval\"));\n final JsonArray targets = query.getJsonArray(\"targets\")\n .stream()\n .map(o -> ((JsonObject) o).getString(\"target\"))\n .collect(toJsonArray());\n\n //build the query and options\n final JsonObject tsQuery = $and(obj(\"n.begin\", $gte(range.getStart())),\n obj(\"n.begin\", $lte(range.getEnd())),\n obj(\"t.name\", $in(targets)));\n\n final FindOptions findOptions = new FindOptions().setFields(obj().put(\"t.name\", 1)\n .put(\"n.begin\", 1)\n .put(\"n.value\", 1)\n .put(\"_id\", 0)).setSort(obj(\"n.begin\", 1));\n\n long start = System.currentTimeMillis();\n //execute search and process response\n client.findWithOptions(collectionName, tsQuery, findOptions, result -> {\n\n if (result.succeeded()) {\n JsonArray resp = processResponse(range, r -> range.splitEvery(interval), targets, result);\n long end = System.currentTimeMillis();\n LOG.debug(\n \"Sending response with {} timeseries and {} datapoints (after {} ms)\",\n resp.size(),\n resp.stream()\n .map(o -> ((JsonObject) o).getJsonArray(\"datapoints\"))\n .collect(Collectors.summingInt(JsonArray::size)),\n (end - start));\n msg.reply(resp);\n\n } else {\n LOG.error(\"Annotation query failed\", result.cause());\n msg.reply(arr());\n }\n\n });\n }", "public List<Pair<Integer>> getTrend(String collectionId, String analysisId, String query, String beginDate, String endDate,\r\n String interval) {\r\n List<Pair<Integer>> toReturn = new ArrayList<Pair<Integer>>();\r\n if (null == collectionId || null == analysisId || null == query || null == beginDate || null == endDate\r\n || 0 == collectionId.length() || 0 == analysisId.length() || 0 == beginDate.length() || 0 == endDate.length()) {\r\n setError(\"APIL_0100\", \"argument's not valid.\");\r\n return toReturn;\r\n }\r\n\r\n if (!IntervalType.DAY.equals(interval) && !IntervalType.MONTH.equals(interval) && !IntervalType.YEAR.equals(interval)) {\r\n setError(\"APIL_0165\", \"interval type's not valid: \" + interval);\r\n return toReturn;\r\n }\r\n\r\n String[] paramFields = {\"collection_id\", \"analysis_id\", \"query\", \"date_begin\", \"date_end\", \"interval\", \"item_delimiter\",\r\n \"freq_delimiter\"};\r\n SocketMessage request = new SocketMessage(\"retriever\", \"time_series\", SocketMessage.PriorityType.EMERGENCY, SocketMessage.TransferType.BI_WAY, \"\",\r\n paramFields);\r\n request.setValue(\"collection_id\", collectionId);\r\n request.setValue(\"analysis_id\", analysisId);\r\n request.setValue(\"query\", query);\r\n request.setValue(\"date_begin\", beginDate);\r\n request.setValue(\"date_end\", endDate);\r\n request.setValue(\"interval\", interval);\r\n request.setValue(\"item_delimiter\", ITEM_DELIMITER);\r\n request.setValue(\"freq_delimiter\", FREQ_DELIMITER);\r\n\r\n SocketMessage response = handleMessage(request);\r\n if (!isSuccessful(response)) {\r\n if (\"\".equals(response.getErrorCode())) {\r\n setError(\"APIL_0501\", \"getting trend wasn't successful: coll_id=\" + collectionId + \"/analysis_id=\" + analysisId\r\n + \"/query=\" + query);\r\n } else {\r\n wrapError(\"APIL_0501\", \"getting trend wasn't successful: coll_id=\" + collectionId + \"/analysis_id=\" + analysisId\r\n + \"/query=\" + query);\r\n }\r\n } else {\r\n toReturn = Tools.getPairListInt(response.getValue(\"time_series\"), ITEM_DELIMITER, FREQ_DELIMITER);\r\n }\r\n return toReturn;\r\n }", "private void getDataFromApi() throws IOException {\n DateTime now = new DateTime(System.currentTimeMillis());\n Events events = mService.events().list(\"primary\")\n .setTimeMin(now)\n .setOrderBy(\"startTime\")\n .setSingleEvents(true)\n .execute();\n List<Event> items = events.getItems();\n ScheduledEvents scheduledEvents;\n EventsList.clear();\n for (Event event : items) {\n DateTime start = event.getStart().getDateTime();\n if (start == null) {\n start = event.getStart().getDate();\n }\n DateTime end = event.getEnd().getDateTime();\n if (end == null) {\n end = event.getStart().getDate();\n }\n scheduledEvents = new ScheduledEvents();\n scheduledEvents.setEventId(event.getId());\n scheduledEvents.setDescription(event.getDescription());\n scheduledEvents.setEventSummery(event.getSummary());\n scheduledEvents.setLocation(event.getLocation());\n scheduledEvents.setStartDate(dateTimeToString(start));\n scheduledEvents.setEndDate(dateTimeToString(end));\n StringBuffer stringBuffer = new StringBuffer();\n if(event.getAttendees()!=null) {\n for (EventAttendee eventAttendee : event.getAttendees()) {\n if(eventAttendee.getEmail()!=null)\n stringBuffer.append(eventAttendee.getEmail() + \" \");\n }\n scheduledEvents.setAttendees(stringBuffer.toString());\n }\n else{\n scheduledEvents.setAttendees(\"\");\n }\n EventsList.add(scheduledEvents);\n }\n }", "private void queryEndingAtValue(JSONArray data) {\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n \tObject objEndValue;\n\n if ( data.length() >= 2 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t\tobjEndValue = data.get(1);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"queryEndingAtValue : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase urlRef = new Firebase(strURL);\n\n if(isUsed != true)\n isUsed = true;\n ValueEventListener listener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n JSONObject resultObj;\n\t\t\t\ttry {\n HashMap result = snapshot.getValue(HashMap.class);\n if (result == null)\n resultObj = new JSONObject();\n else\n resultObj = new JSONObject(result);\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"queryEndingAtValue().addListenerForSingleValueEvent failed: \" + firebaseError.getMessage());\n PluginResult pluginResult = new PluginResult(Status.ERROR, \"queryEndingAtValue failded: \" + firebaseError.getMessage());\n mCallbackContext.sendPluginResult(pluginResult);\n }\n };\n\n if( objEndValue.getClass() == Double.class )\n \turlRef.endAt(((Double)objEndValue).doubleValue()).addListenerForSingleValueEvent(listener);\n else if(objEndValue.getClass() == Boolean.class )\n \turlRef.endAt(((Boolean)objEndValue).booleanValue()).addListenerForSingleValueEvent(listener);\n else if( objEndValue.getClass() == String.class )\n \turlRef.endAt((String)objEndValue).addListenerForSingleValueEvent(listener);\n else\n \turlRef.endAt(objEndValue.toString()).addListenerForSingleValueEvent(listener);\n }", "@RequestMapping(path = \"/last24hDeliveredItems\", method = RequestMethod.GET)\n public List<DeliveredItem> getLast24hDeliveredItems() {\n Query queryObject = new Query(\"Select * from delivery_item\", \"blablamove\");\n QueryResult queryResult = BlablamovebackendApplication.influxDB.query(queryObject);\n\n InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();\n System.out.println(\"queryResult : \" + queryResult);\n List<DeliveredItem> deliveredItemList = resultMapper\n .toPOJO(queryResult, DeliveredItem.class);\n\n LocalDateTime stop = LocalDateTime.now().minusHours(0);\n LocalDateTime start = LocalDateTime.now().minusHours(24).withSecond(0).withMinute(0).withNano(0);\n\n return deliveredItemList.stream().filter(deliveredItem -> instantIsBetweenDates(deliveredItem.getTime(), start, stop)).collect(Collectors.toList());\n }", "public List<Pair<Integer>> getCustomTrend(String collectionId, String analysisId, String fieldValue, String query,\r\n String beginDate, String endDate, String interval) {\r\n List<Pair<Integer>> toReturn = new ArrayList<Pair<Integer>>();\r\n // query can be length of 0 (in the case of \"DOCUMENT\" as Frequency Type), so it's not included in wrong argument condition\r\n if (null == collectionId || null == analysisId || null == fieldValue || null == query || null == beginDate\r\n || null == endDate || 0 == collectionId.length() || 0 == analysisId.length() || 0 == fieldValue.length()\r\n || 0 == beginDate.length() || 0 == endDate.length()) {\r\n setError(\"APIL_0100\", \"argument's not valid.\");\r\n return toReturn;\r\n }\r\n\r\n if (!IntervalType.DAY.equals(interval) && !IntervalType.MONTH.equals(interval) && !IntervalType.YEAR.equals(interval)) {\r\n setError(\"APIL_0165\", \"interval type's not valid: \" + interval);\r\n return toReturn;\r\n }\r\n\r\n String[] paramFields = {\"collection_id\", \"analysis_id\", \"field_value\", \"query\", \"date_begin\", \"date_end\", \"interval\",\r\n \"item_delimiter\", \"freq_delimiter\"};\r\n SocketMessage request = new SocketMessage(\"retriever\", \"custom_time_series\", SocketMessage.PriorityType.EMERGENCY, SocketMessage.TransferType.BI_WAY,\r\n \"\", paramFields);\r\n request.setValue(\"collection_id\", collectionId);\r\n request.setValue(\"analysis_id\", analysisId);\r\n request.setValue(\"field_value\", fieldValue);\r\n request.setValue(\"query\", query);\r\n request.setValue(\"date_begin\", beginDate);\r\n request.setValue(\"date_end\", endDate);\r\n request.setValue(\"interval\", interval);\r\n request.setValue(\"item_delimiter\", ITEM_DELIMITER);\r\n request.setValue(\"freq_delimiter\", FREQ_DELIMITER);\r\n\r\n SocketMessage response = handleMessage(request);\r\n if (!isSuccessful(response)) {\r\n if (\"\".equals(response.getErrorCode())) {\r\n setError(\"APIL_0491\", \"getting custom trend wasn't successful: coll_id=\" + collectionId + \"/analysis_id=\"\r\n + analysisId + \"/field_value=\" + fieldValue + \"/query=\" + query);\r\n } else {\r\n wrapError(\"APIL_0491\", \"getting custom trend wasn't successful: coll_id=\" + collectionId + \"/analysis_id=\"\r\n + analysisId + \"/field_value=\" + fieldValue + \"/query=\" + query);\r\n }\r\n } else {\r\n toReturn = Tools.getPairListInt(response.getValue(\"time_series\"), ITEM_DELIMITER, FREQ_DELIMITER);\r\n }\r\n\r\n return toReturn;\r\n }", "private void queryLimitedToLast(JSONArray data) {\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n \tint nLimit = 0;\n\n if ( data.length() >= 2 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t\tnLimit = data.getInt(1);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"queryLimitedToLast : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase urlRef = new Firebase(strURL);\n\n if(isUsed != true)\n isUsed = true;\n // Read data and react to changes\n urlRef.limitToLast(nLimit).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n JSONObject resultObj;\n\t\t\t\ttry {\n HashMap result = snapshot.getValue(HashMap.class);\n if (result == null)\n resultObj = new JSONObject();\n else\n resultObj = new JSONObject(result);\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"LimitedToLast(limit).addListenerForSingleValueEvent failed: \" + firebaseError.getMessage());\n PluginResult pluginResult = new PluginResult(Status.ERROR, \"queryLimitedToLast failded: \" + firebaseError.getMessage());\n mCallbackContext.sendPluginResult(pluginResult);\n }\n });\n }", "@Test\n public void testTransplantListEndpointQueryAge() {\n String lowerBound = \"1970-01-01\";\n String upperBound = \"2018-09-27\";\n ResponseEntity response = dataController.getTransplantWaitingListRange(null,null,\"12\",null,upperBound, lowerBound);\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }", "@Test\n public void testTransplantListEndpointQueryRegion() {\n String lowerBound = \"1970-01-01\";\n String upperBound = \"2018-09-27\";\n ResponseEntity response = dataController.getTransplantWaitingListRange(null,null,null,\"Auckland\",upperBound, lowerBound);\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }", "public void getLatestDataFromMyAPI(String urlprimit) throws URISyntaxException, IOException {\n dateCurente.clear();\n ContextForStrategy contextForStrategy = new ContextForStrategy(new GetLastDataStrategy());\n dateCurente = contextForStrategy.executeStrategy(urlprimit);\n int i = 0;\n for(StructuraDateAQI element : dateCurente)\n {\n datefinale.add(new DataFromWAQI(element.getPM25(), element.getPM10(), element.getO3(), element.getNO2(), element.getSO2(), element.getCO(), element.getLatitude(), element.getLongitude(), element.getDataSiOra(),element.getLocationName(), element.getUserSender()));\n if(element.getPM10()>100)\n {\n String realadress = GetRealAdressWithLatLng.getAddress(Double.parseDouble(element.getLatitude()),Double.parseDouble(element.getLongitude()), context);\n createNotification(\"Indicele PM10 are valoare \"+element.getPM10()+ \" ajungand la un nivel critic\\n\" +\n \"Locatia exacta: \"+realadress + \"\\n\"+\n \"User-ul care a generat datele este \"+element.getUserSender());\n }\n i++;\n }\n }", "private void getFlowData() {\n\t\tdbService.getCacheLastUpdated(Tables.STATIONS, new ListCallback<GenericRow>() {\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<GenericRow> result) {\n\t\t\t\tString currentMap = localStorage.getItem(\"KEY_CURRENT_MAP\");\n\t\t\t\tboolean shouldUpdate = true;\n\n\t\t\t\tif (!result.isEmpty()) {\n\t\t\t\t\tdouble now = System.currentTimeMillis();\n\t\t\t\t\tdouble lastUpdated = result.get(0).getDouble(CachesColumns.CACHE_LAST_UPDATED);\n\t\t\t\t\tshouldUpdate = (Math.abs(now - lastUpdated) > (3 * 60000)); // Refresh every 3 minutes.\n\t\t\t\t}\n\n\t\t\t view.showProgressIndicator();\n\t\t\t \n\t\t\t if (!currentMap.equalsIgnoreCase(\"seattle\")) {\n\t\t\t \tshouldUpdate = true;\n\t\t\t\t\tlocalStorage.setItem(\"KEY_CURRENT_MAP\", \"seattle\");\n\t\t\t }\n\t\t\t \n\t\t\t if (shouldUpdate) {\n\t\t\t \ttry {\n\t\t\t \t String url = Consts.HOST_URL + \"/api/flowdata/MinuteDataNW\";\n\t\t\t \t JsonpRequestBuilder jsonp = new JsonpRequestBuilder();\n\t\t\t \t jsonp.setTimeout(30000); // 30 seconds\n\t\t\t \t jsonp.requestObject(url, new AsyncCallback<FlowDataFeed>() {\n\n\t\t\t \t\t\t@Override\n\t\t\t \t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t \t\t\t\tview.hideProgressIndicator();\n\t\t\t \t\t\t\tGWT.log(\"Failure calling traffic flow api.\");\n\t\t\t \t\t\t}\n\n\t\t\t \t\t\t@Override\n\t\t\t \t\t\tpublic void onSuccess(FlowDataFeed result) {\n\t\t\t \t\t\t\tstationItems.clear();\n\t\t\t \t\t\t\t\n\t\t\t \t\t\t\tif (result.getFlowData() != null) {\n\t\t\t \t\t\t\t\tint numStations = result.getFlowData().getStations().length();\n\t\t\t \t\t\t\t\tString timestamp = result.getFlowData().getTimestamp();\n\t\t\t \t\t\t\t\ttimestamp = timestamp.replaceAll(\"PST|PDT\", \"\");\n\t\t\t \t\t\t\t\tDate date = parseDateFormat.parse(timestamp);\n\t\t\t \t\t\t\t\tString lastUpdated = displayDateFormat.format(date);\n\t\t\t \t\t\t\t\tlocalStorage.setItem(\"KEY_LAST_UPDATED\", lastUpdated);\n\t\t\t \t\t\t\t\tStationItem item;\n\t\t\t \t\t\t\t\t\n\t\t\t \t\t\t\t\tfor (int i = 0; i < numStations; i++) {\n\t\t\t \t\t\t\t\t\tString stationId = result.getFlowData().getStations().get(i).getId();\n\t\t\t \t\t\t\t\t\tString status = result.getFlowData().getStations().get(i).getStat();\n\t\t\t \t\t\t\t\t\t\n\t\t\t \t\t\t\t\t\tif (stationItemsMap.containsKey(stationId) && status.equalsIgnoreCase(\"good\")) {\n\t\t\t\t \t\t\t\t\t\titem = new StationItem();\n\t\t\t\t \t\t\t\t\t\t\n\t\t\t\t \t\t\t\t\t\titem.setId(stationId);\n\t\t\t \t\t\t\t\t\t\titem.setVolume(result.getFlowData().getStations().get(i).getVol());\n\t\t\t \t\t\t\t\t\t\titem.setSpeed(result.getFlowData().getStations().get(i).getSpd());\n\t\t\t \t\t\t\t\t\t\titem.setOccupancy(result.getFlowData().getStations().get(i).getOcc());\n\t\t\t \t\t\t\t\t\t\t\n\t\t\t \t\t\t\t\t\t\tstationItems.add(item);\n\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}\n\t\t\t \t\t\t\t\n\t\t\t \t\t\t\t// Purge existing stations covered by incoming data\n\t\t\t \t\t\t\tdbService.deleteStations(new VoidCallback() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\t\t\t\t\t// Bulk insert all the new stations and data.\n\t\t\t\t\t\t\t\t\t\tdbService.insertStations(stationItems, new RowIdListCallback() {\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t\t\t\tview.hideProgressIndicator();\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onSuccess(List<Integer> rowIds) {\n\t\t\t\t\t\t\t\t\t\t\t\t// Update the cache table with the time we did the update\n\t\t\t\t\t\t\t\t\t\t\t\tList<CacheItem> cacheItems = new ArrayList<CacheItem>();\n\t\t\t\t\t\t\t\t\t\t\t\tcacheItems.add(new CacheItem(Tables.STATIONS, System.currentTimeMillis()));\n\t\t\t\t\t\t\t\t\t\t\t\tdbService.updateCachesTable(cacheItems, new VoidCallback() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Get all the stations and data just inserted.\n\t\t\t\t\t\t\t\t\t\t\t\t \tdbService.getStations(new ListCallback<GenericRow>() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onSuccess(List<GenericRow> result) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetStations(result);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t});\n\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}\n\t\t\t \t\t});\n\n\t\t\t \t} catch (Exception e) {\n\t\t\t \t\t// TODO Do something with the exception\n\t\t\t \t}\n\t\t\t } else {\n\t\t\t \tdbService.getStations(new ListCallback<GenericRow>() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onSuccess(List<GenericRow> result) {\n\t\t\t\t\t\t\tgetStations(result);\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 }\n\t\t\t}\n\t\t});\n\t}", "public interface RestApi {\n\n @GET(\"/ride.asp\")\n Call<List<Model>> getData (@Query(\"userid\") int userId,\n @Query(\"from_name\") String fromName,\n @Query(\"from_lat\") double lat,\n @Query(\"from_lng\") double lng,\n @Query(\"to_name\") String toName,\n @Query(\"to_lat\") double toLat,\n @Query(\"to_lng\") double toLng,\n @Query(\"time\") long time);\n}", "@GET(\"api/valuedates\")\n Call<String> getNextValueDate(@Query(\"CurrencyPair\") String currencyPair, @Query(\"ValueType\") String valueType);", "private List<String> getDataFromApi() throws IOException {\n // List the next 10 events from the primary calendar.\n DateTime now = new DateTime(System.currentTimeMillis());\n Date nowToday = new Date(System.currentTimeMillis());\n Date now2 = new Date();\n Log.d(\"TIME\", now2.toString()); // Fri Apr 14 11:45:53 GMT-04:00 2017\n String show = DateFormat.getTimeInstance().format(nowToday); // 오후 4:22:40\n String show2 = DateFormat.getDateInstance().format(nowToday); // 2017. 4. 7.\n String show3 = DateFormat.getDateTimeInstance().format(nowToday); // 2017. 4. 7. 오후 4:22:40\n // String show4 = DateFormat.getDateInstance().format(now); 이건 안됌 에러\n\n\n java.text.SimpleDateFormat toDateTime = new java.text.SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssZ\");\n //Date todayDate = new Date();\n // String todayName = dayName.format(todayDate);\n\n java.util.Calendar calendar = java.util.Calendar.getInstance();\n\n calendar.setTime(nowToday);\n calendar.add(Calendar.HOUR, 2);\n Date twoFromNow = calendar.getTime();\n\n\n\n List<String> eventStrings = new ArrayList<String>();\n Events events = mService.events().list(\"primary\")\n .setMaxResults(10)\n .setTimeMin(now)\n .setTimeMax(new DateTime(twoFromNow, TimeZone.getDefault()))\n .setOrderBy(\"startTime\")\n .setSingleEvents(true)\n .execute();\n\n\n List<Event> items = events.getItems();\n // List<Map<String, String>> pairList = new ArrayList<Map<String, String>>();\n // String nowDay = now.toString().substring(0, now.toString().indexOf(\"T\"));\n\n\n for (Event event : items) {\n DateTime start = event.getStart().getDateTime();\n\n // Only get events with exact start time set, exclude all day\n if (start != null) {\n eventStrings.add(\n String.format(\"%s //// %s)\", event.getSummary(), start));\n }\n\n\n }\n\n return eventStrings;\n }", "public void customLoadMoreDataFromApi() {\n // This method probably sends out a network request and appends new data items to your adapter. \n // Use the offset value and add it as a parameter to your API request to retrieve paginated data.\n // Deserialize API response and then construct new objects to append to the adapter\n \tmakeGoogleApiCall();\n \t\n }", "private void querys() {\n\t try {\r\n\t\tBoxYieldRptFactory.getRemoteInstance().SteDate();\r\n\t } catch (EASBizException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t } catch (BOSException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t }\r\n\t}", "public void refresh() {\n if (this.monitorApiKey.length() == 0) {\n return;\n }\n String params =\n String.format(\"api_key=%s&format=xml&custom_uptime_ratios=1-7-30-365\", this.monitorApiKey);\n byte[] xml = loadPageWithRetries(params);\n Match doc;\n try {\n doc = $(new ByteArrayInputStream(xml));\n } catch (SAXException | IOException e) {\n throw new CouldNotRefresh(e);\n }\n String[] customRatios = doc.find(\"monitor\").attr(\"custom_uptime_ratio\").split(\"-\");\n this.last24HoursUptimeRatio = customRatios[0];\n this.last7DaysUptimeRatio = customRatios[1];\n this.last30DaysUptimeRatio = customRatios[2];\n this.last365DaysUptimeRatio = customRatios[3];\n }", "abstract public int getServiceInterval();", "private void getDayNonSedTimeData(String accessToken) {\r\n String[] taskParams = new String[2];\r\n taskParams[0] = accessToken;\r\n\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(getString(R.string.fitbit_date_format));\r\n String formattedEndDate = dateFormat.format(endDate.getTime());\r\n\r\n taskParams[1] = \"https://api.fitbit.com/1/user/-/activities/steps/date/\"\r\n + formattedEndDate + \"/1d/15min.json\";\r\n\r\n updateRequestCount(taskParams.length - 1);\r\n\r\n new FitbitGetRequestTask(this).execute(taskParams);\r\n }", "public void loadNextDataFromApi(int offset) {\n // Send an API request to retrieve appropriate paginated data\n // --> Send the request including an offset value (i.e `page`) as a query parameter.\n // --> Deserialize and construct new model objects from the API response\n // --> Append the new data objects to the existing set of items inside the array of items\n // --> Notify the adapter of the new items made with `notifyItemRangeInserted()`\n PostFetch postFetch = new PostFetch(getContext(), new AppUtils.MyInterface() {\n @Override\n public void myMethod(String response) {\n if(response.equals(\"0\")){\n Toast.makeText(getContext(), \"No internet connection\", Toast.LENGTH_SHORT).show();\n }\n else if(response.equals(\"1\")){\n Toast.makeText(getContext(), \"Unable to connect to server\", Toast.LENGTH_SHORT).show();\n }\n else {\n AppUtils.addPostsToAdapter(getContext(), response, mAdapter);\n }\n }\n });\n postFetch.execute(url, Integer.valueOf(offset*10).toString(), AppUtils.PAGE_SIZE);\n }", "@Override\n public void onFinish() {\n Log.d(\"timer\", \"finished one timer cycle\");\n new DownloadDataTask().execute(USGS_URL);\n try {\n // get the most recent earthquake\n mostRecentEarthquake = getFirstEarthquakeFromJson();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n // notify user of earthquake\n Intent i = new Intent(getBaseContext(), EarthquakeWatchService.class);\n i.putExtra(\"earthquake\", mostRecentEarthquake);\n startService(i);\n createAndStartTimer();\n }", "@Test(description = \"This test verifies api response time\", groups = { \"topmonitor\" }, enabled = false)\n\tpublic void testResponseTime() {\n\t\tString api = \"http://economictimes.indiatimes.com/homefeed.cms?feedtype=etjson&curpg=1\";\n\t\tLong startTime = System.currentTimeMillis();\n\t\tApiHelper.getAPIResponse(api);\n\t\tLong endTime = System.currentTimeMillis();\n\t\tLong totalTime = endTime - startTime;\n\t\tDBUtil.dbInsertApi(new Date(), api, totalTime.doubleValue());\n\t}", "public interface ApiService {\n @GET(\"charts/transactions-per-second\")\n Observable<Chart> getChartsTransactionsPerSecond(@Query(\"timespan\") String timespan,\n @Query(\"rollingAverage\") String rollingAverage, @Query(\"start\") String start,\n @Query(\"format\") String format, @Query(\"sampled\") String sampled);\n\n @GET(\"stats\")\n Observable<Stat> getStats();\n\n @GET(\"pools?timespan=5days\")\n Observable<Pool> getPools(@Query(\"timespan\") String timespan);\n}", "private ArrayList<Transaction> getTransactionsOfTheDay(int assetID) throws Exception {\n int i = 1;\n ArrayList<Transaction> currentTransactions = new ArrayList<Transaction>();\n ArrayList<Transaction> allTransactions = new ArrayList<Transaction>();\n\n while (true) {\n String url = MASTER_URL + ASSETS + assetID + \"/history_paginate.api?page=\" + i;\n\n URL obj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\n // request method\n con.setRequestMethod(\"GET\");\n\n // request headers\n con.setRequestProperty(\"token\", USER_TOKEN);\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n // reading input stream\n BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n String inputLine;\n String response = \"\";\n while ((inputLine = in.readLine()) != null) {\n response += inputLine;\n }\n in.close();\n\n DateTime assetActiveDateTime = new DateTime().minusDays(1);\n// System.out.println(assetActiveDateTime);\n int day = assetActiveDateTime.getDayOfMonth();\n int month = assetActiveDateTime.getMonthOfYear();\n int year = assetActiveDateTime.getYear();\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(org.codehaus.jackson.map.DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n String emptyHistory = \"{\\\"history\\\":[]\";\n if (!response.substring(0,13).equals(emptyHistory)) {\n String arrayResponse = response.substring(11, response.length() - 1);\n CollectionType constructCollectionType =\n TypeFactory.defaultInstance().constructCollectionType(ArrayList.class,\n Transaction.class);\n currentTransactions = mapper.readValue(arrayResponse, constructCollectionType);\n for (Transaction t : currentTransactions){\n DateTime checkoutDateTime = t.getCheckOutDateTime();\n if (day == checkoutDateTime.getDayOfMonth() &&\n month == checkoutDateTime.getMonthOfYear() &&\n year == checkoutDateTime.getYear()) {\n allTransactions.add(t);\n }\n }\n// System.out.println(allTransactions);\n currentTransactions.clear();\n } else {\n break;\n }\n i++;\n }\n return allTransactions;\n }", "@Scheduled(cron=\"0 0 9 * * ? \")\r\n\t@Override\r\n\tpublic void getNewsFromIDataAPI() {\n\t\ttry {\r\n\t\t\t\r\n\t\t\tList<NewsType> newsTypeArray=newsTypeRepository.findAllByFlag(0);\r\n\t\t\t\r\n\t\t\tfor(NewsType n: newsTypeArray) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tString catId=n.getCatId();\r\n\t\t\t\t\tString url = \"http://api01.bitspaceman.com:8000/news/toutiao?apikey=np5SpQ7QGzm7HgvX8Aw8APA5NDq6Bpj5m4eo4hX5qJFLm0G0Oqt31xJzjIEeJFTv&catid=\"+n.getCatId();\r\n\t\t\t\t\tString json = IDataAPI.getRequestFromUrl(url);\r\n\t\t\t\t\tlog.info(json);\r\n\t\t\t\t\tGson gson=new Gson();\r\n\t\t\t\t\tToutiaoResponseDto toutiaoResponseDto=gson.fromJson(json, ToutiaoResponseDto.class);\r\n\t\t\t\t\t\r\n\t\t\t\t\tList<NewsInfo> newsInfoArray=new ArrayList<NewsInfo>();\r\n\t\t\t\t\tfor(ToutiaoDataResponseDto toutiao :toutiaoResponseDto.getData()) {\r\n\t\t\t\t\t\tnewsInfoArray.add(new NewsInfo(toutiao,catId));\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tList<NewsInfo> iter=(List<NewsInfo>) newsInfoRepository.saveAll(newsInfoArray);\r\n\t\t\t\t\t}catch (Exception e) {\r\n\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t\tlog.info(e.getMessage());\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(\"true\".equals(toutiaoResponseDto.getHasNext())) {\r\n\t\t\t\t\t\tgetNewsFromIDataAPIByPageToken(toutiaoResponseDto.getPageToken(),catId);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch(Exception e) {\r\n\t\t\t\t\tcontinue;\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\tlog.info(e.getMessage());\r\n\t\t}\r\n\t}", "@Override\n public void onRefresh() {\n updateListings();\n new GetDataTask().execute();\n }", "@Override\n public void refreshData() {\n\n if (InternetConnection.checkConnection(context)) {\n ApiService apiService = RetroClient.getApiService();\n Call<String> call = apiService.getFactdata();\n Log.e(TAG, \"request ongetData url :\" + call.request().url());\n call.enqueue(new Callback<String>() {\n @Override\n public void onResponse(Call<String> call, Response<String> response) {\n Log.e(TAG, \"response : ongetData :\" + response.body());\n parseResponse(response.body());\n }\n\n @Override\n public void onFailure(Call<String> call, Throwable t) {\n Log.e(TAG, \"onFailure ongetData : \" + t.getMessage());\n }\n });\n } else {\n factDataView.displayMessage(context.getString(R.string.nonetwork), false);\n }\n }", "private List<String> getDataFromApi() throws IOException {\n // List the next 10 events from the primary calendar.\n DateTime now = new DateTime(System.currentTimeMillis());\n List<String> eventStrings = new ArrayList<String>();\n Events events = mService.events().list(\"primary\")\n .setMaxResults(10)\n .setTimeMin(now)\n .setOrderBy(\"startTime\")\n .setSingleEvents(true)\n .execute();\n List<Event> items = events.getItems();\n\n for (Event event : items) {\n DateTime start = event.getStart().getDateTime();\n if (start == null) {\n // All-day events don't have start times, so just use\n // the start date.\n start = event.getStart().getDate();\n }\n eventStrings.add(\n String.format(\"%s (%s)\", event.getSummary(), start));\n }\n return eventStrings;\n }", "private List<String> getDataFromApi() throws IOException {\n String spreadsheetId = \"1qtzLH2JKOURnvIrc3Q-mlCfQLHtfNbUmZnAiRGJWHBM\";\n int a = 2;\n idAvailcheck = true;\n String range = \"Class Data!\".concat(\"A\"+ a++ + \":J\");\n\n List<List<Object>> arrData = getData(sId , sPassword ,sFName,sLName,sClass,sSection,sEmail,sPhone,\"d\",sSemester);\n\n ValueRange oRange = new ValueRange();\n oRange.setRange(range); // I NEED THE NUMBER OF THE LAST ROW\n oRange.setValues(arrData);\n\n\n List<ValueRange> oList = new ArrayList<>();\n oList.add(oRange);\n\n\n BatchUpdateValuesRequest oRequest = new BatchUpdateValuesRequest();\n oRequest.setValueInputOption(\"RAW\");\n oRequest.setData(oList);\n\n\n\n\n\n\n\n\n Log.v(\"mode\",mode);\n\n\n if(mode==\"classfeed\") {\n spreadsheetId = \"1nzKRlq7cQrI_XiJGxJdNax5oB91bR_SypiazWO2JTuU\"; range = \"Class Name!\".concat(\"A\"+ a++ + \":S\");\n }\n if(mode==\"sectionfeed\") {\n\n spreadsheetId = \"1nzKRlq7cQrI_XiJGxJdNax5oB91bR_SypiazWO2JTuU\"; range = \"Sections!\".concat(\"A\"+ a++ + \":S\");\n\n }else if(mode.equals(\"timestamp\"))\n {\n spreadsheetId = \"1nzKRlq7cQrI_XiJGxJdNax5oB91bR_SypiazWO2JTuU\";\n range = \"Timestamp!\".concat(\"A\"+ 4 + \":A\");\n }\n\n\n List<String> results = new ArrayList<String>();\n\n\n\n ValueRange response = this.mService.spreadsheets().values()\n .get(spreadsheetId, range)\n .execute();\n List<List<Object>> values = response.getValues();\n\n if(mode.equals(\"classfeed\")) {\n\n classResults = response.getValues();\n\n }\n else if(mode.equals(\"sectionfeed\")) {\n\n sectionResults = response.getValues();\n\n\n }\n Log.v(\"responseMode\",mode);\n Log.v(\"response\", String.valueOf(response.getValues()));\n\n if (values != null) {\n\n\n\n\n results.add(\"\");\n\n\n for (List row : values) {\n\n if(initialGetMiscData)\n break;\n\n\n\n if(mode==\"classfeed\")\n {\n\n String dept = String.valueOf(row.get(1));\n\n\n\n\n if (dept.equals(sDepartment)) {\n String retrievedClass = String.valueOf(row.get(0));\n\n\n Log.v(\"retreievedClass\",retrievedClass);\n className.add(String.valueOf(row.get(0)));\n\n\n\n }\n }\n\n if(mode==\"sectionfeed\") {\n String dept = String.valueOf(row.get(1));\n\n Spinner classSpinner = (Spinner) findViewById(R.id.spinner_class);\n sClass = String.valueOf(classSpinner.getSelectedItem());\n if (sClass.equals(dept)) {\n\n\n sectionName.add(String.valueOf(row.get(0)));\n\n\n }\n }\n\n\n if(mode==\"Submit\") {\n\n\n String Str1 = String.valueOf(row.get(0));\n\n if (Str1.equals(\"0\")) {\n\n\n break;\n }\n\n if (Str1.equals(sId)) {\n\n idAvailcheck = false;\n }\n\n\n range = \"Class Data!\".concat(\"A\" + a++ + \":J\");\n\n\n\n }\n\n\n\n }\n\n }\n\n if(mode==\"Submit\") {\n oRange.setRange(range); // I NEED THE NUMBER OF THE LAST ROW\n if (idAvailcheck) { // Check if id is not taken\n BatchUpdateValuesResponse oResp1 = mService.spreadsheets().values().batchUpdate(spreadsheetId, oRequest).execute();\n range = \"Class Data!\".concat(\"A\" + a++ + \":J\");\n arrData = getDataAsZero(\"0\");\n oRange.setValues(arrData);\n oRange.setRange(range);\n oResp1 = mService.spreadsheets().values().batchUpdate(spreadsheetId, oRequest).execute();\n } else {\n\n\n\n }\n }\n\n\n\n return results;\n\n\n\n }", "private static String readEnergyJSON(Date start, Date end, String resolution, String point) throws IOException {\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd+HH:mm:ss\");\n df.setTimeZone(SimpleTimeZone.getTimeZone(\"US/Central\"));\n String url_string = \"https://rest.buildingos.com/reports/timeseries/?start=\" + df.format(start) + \"&resolution=\" + resolution + \"&end=\" + df.format(end) + \"&name=\" + point;\n URL consumption_url = new URL(url_string);\n Log.i(\"url\", consumption_url.toString());\n InputStream in = consumption_url.openStream();\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n String result, line = reader.readLine();\n result = line;\n while((line=reader.readLine())!=null) {\n result += line;\n }\n String json_string = result;\n JSONObject all_electricity_page = null;\n String return_string = \"\";\n\n try {\n all_electricity_page = (JSONObject) new JSONTokener(json_string).nextValue();\n JSONArray results = (JSONArray)all_electricity_page.get(\"results\");\n for (int i = 0; i < results.length(); i++) {\n Double value = -2.0;\n try {\n if (results.get(i) != JSONObject.NULL\n && ((JSONObject)results.get(i)).get(point) != JSONObject.NULL) {\n value = ((JSONObject) ((JSONObject) results.get(i)).get(point)).getDouble(\"value\");\n //Log.i(\"not null\", \"getting here? value = \" + value);\n\n }\n else {\n value = 0.0;\n String timestamp_string = ((JSONObject) results.get(i)).getString(\"startTimestamp\");\n Log.i(\"null\", \"adding -1.0? point=\" + point + \" time=\" + timestamp_string);\n }\n\n String timestamp_string = ((JSONObject) results.get(i)).getString(\"startTimestamp\");\n return_string += timestamp_string + \";\" + value + \"\\n\";\n }\n catch (Exception e) {\n //System.out.println(results.get(i));\n e.printStackTrace();\n //Log.i(\"null error?\", \"error: value = \" + value);\n //Log.i(\"null error?\", e.toString());\n }\n }\n\n } catch (JSONException e) {\n //didn't find any results - url must have been wrong, or bad connection\n e.printStackTrace();\n Log.i(\"readEnergyJSON\", \"bad url? \" + e.toString());\n }\n return return_string;\n }", "private void fetchUpComingChannels() {\n\n // showing refresh animation before making http call\n swipeRefreshLayout.setRefreshing(true);\n\n //Queue use default volley Response and Error listener\n RequestManager\n .queue()\n .useBackgroundQueue()\n .addRequest(new UpcomingChannelJsonRequest(offSet++), mRequestCallback)\n .start();\n }", "private void UI_RefreshSensorData ()\r\n\t{\r\n\t\t\t\t\r\n\t\tlong now = System.currentTimeMillis();\r\n\t\t\r\n\t\tif (now-ts_last_rate_calc>1000)\r\n\t\t{\r\n\t\t\tsensor_event_rate=last_nAccVal/((now-ts_last_rate_calc)/1000.0);\r\n\t\t\tts_last_rate_calc=now;\r\n\t\t}\r\n\t}", "public void fetchResults() {\n String requestUrl = \"http://192.168.1.40:8090/trending\";\n StringRequest request = new StringRequest(\n Request.Method.POST,\n requestUrl,\n trendingGetData,\n errorListener){\n\n protected Map<String, String> getParams() throws com.android.volley.AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"memberID\", \"MMM111\");\n return params;\n };\n };\n RequestQueue queue = Volley.newRequestQueue(this);\n queue1 = Volley.newRequestQueue(this);\n queue2 = Volley.newRequestQueue(this);\n queue.add(request);\n }", "public void loadNextDataFromApi(int offset) {\n // Send an API request to retrieve appropriate paginated data\n // --> Send the request including an offset value (i.e `page`) as a query parameter.\n // --> Deserialize and construct new model objects from the API response\n // --> Append the new data objects to the existing set of items inside the array of items\n // --> Notify the adapter of the new items made with `notifyItemRangeInserted()`\n\n Toast.makeText(getActivity(), \"new data loading\", Toast.LENGTH_SHORT).show();\n\n final Integer count =Integer.parseInt(dataoffset)+10;\n dataoffset=count.toString();\n\n\n JsonObjectRequest fetchAllStores = new JsonObjectRequest(Request.Method.POST, \"http://omtii.com/mile/fetchpagegroupchat.php?mobno=\"+mobileno+\"&dataoffset=\"+count.toString(), null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n Log.d(TAG, \"more data query : \" + \"http://omtii.com/mile/fetchpagegroupchat.php?mobno=\"+mobileno+\"&dataoffset=\"+count.toString());\n\n Log.d(TAG, \"Fetch Stores: \" + response);\n showStores(response);\n //MyRecyclerView.setAdapter(adapter);\n System.err.println(\"adpter attached\");\n adapter.notifyDataSetChanged();\n System.err.println(\"data set changed attached\");\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(TAG, \"Fetch Stores Error: \" + error.getMessage());\n }\n });\n ApplicationController.getInstance().addToRequestQueue(fetchAllStores);\n }", "private void queryStartingAtValue(JSONArray data) {\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n \tObject objStartValue;\n\n if ( data.length() >= 2 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t\tobjStartValue = data.get(1);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"queryStartingAtValue : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase urlRef = new Firebase(strURL);\n\n if(isUsed != true)\n isUsed = true;\n ValueEventListener listener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n JSONObject resultObj;\n\t\t\t\ttry {\n HashMap result = snapshot.getValue(HashMap.class);\n if (result == null)\n resultObj = new JSONObject();\n else\n resultObj = new JSONObject(result);\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"queryStartingAtValue().addListenerForSingleValueEvent failed: \" + firebaseError.getMessage());\n PluginResult pluginResult = new PluginResult(Status.ERROR, \"queryStartingAtValue failded: \" + firebaseError.getMessage());\n mCallbackContext.sendPluginResult(pluginResult);\n }\n };\n // Read data and react to changes\n if( objStartValue.getClass() == Double.class )\n \turlRef.startAt(((Double)objStartValue).doubleValue()).addListenerForSingleValueEvent(listener);\n else if(objStartValue.getClass() == Boolean.class )\n \turlRef.startAt(((Boolean)objStartValue).booleanValue()).addListenerForSingleValueEvent(listener);\n else if( objStartValue.getClass() == String.class )\n \turlRef.startAt((String)objStartValue).addListenerForSingleValueEvent(listener);\n else\n \turlRef.startAt(objStartValue.toString()).addListenerForSingleValueEvent(listener);\n\n }", "public void interval() {\n APIlib.getInstance().addJSLine(jsBase + \".interval();\");\n }", "public static void query() {\n\n GPS = \"24.9684297,121.1959266\";\n\n SimpleDateFormat sdFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date nowDate = new Date();\n\n String startDayStr = \"2017-01-09\";\n Calendar cal = Calendar.getInstance();\n cal.setTime(nowDate);\n // cal.add(Calendar.MONTH, 3);\n cal.add(Calendar.MONTH, 1);\n String endDayStr = sdFormat.format(cal.getTime());\n\n String query = String.format(\"▽活動搜尋▼▽start_day▼%s▽end_day▼%s\", startDayStr, endDayStr);\n\n System.out.println(\"伺服器狀態測試查詢... \" + query + \" \" + GPS + \" \" + radius);\n Socket client = new Socket();\n InetSocketAddress isa = new InetSocketAddress(address, port);\n try {\n client.connect(isa, 10000);\n\n DataOutputStream out = new DataOutputStream(client.getOutputStream());\n out.writeUTF(query + \" \" + GPS + \" \" + radius + \" \" + whichFucntion + \" \" + \"test \" + quantity);\n client.shutdownOutput();\n ObjectInputStream in = new ObjectInputStream(client.getInputStream());\n Object obj = in.readObject();\n\n//\t\t\tSystem.out.println(obj.toString());\n SearchResultShopData searchResultShopData = (SearchResultShopData) obj;\n ArrayList<ShopData> a = (ArrayList<ShopData>) searchResultShopData.getShopDataList();\n//\t\t\tSystem.out.println(\"searchResultShopData.getStaut() : \" + searchResultShopData.getStaut());\n if (searchResultShopData.getStaut() == 1) {\n for (int i = 0; i < a.size(); i++) {\n if (a.get(i).getSearchEngine().equals(ShopData.SEARCH_ENGINE_ATTRIBUTE_FB_ACTIVITY_SOLR)) {\n FBShopActivityDescription fbShopActivityDescription = (FBShopActivityDescription) a.get(i);\n System.out.println(\"/////////////////////////start////////////////////////\");\n System.out.println(\"活動名稱:\" + fbShopActivityDescription.getTitle());\n System.out.println(\"活動發文連結:\" + fbShopActivityDescription.getHttp());\n System.out.println(\"GPS:\" + fbShopActivityDescription.getLatitude() + \",\" + fbShopActivityDescription.getLongitude());\n System.out.println();\n System.out.println(\"*******************活動摘要資訊********************\");\n System.out.println(\"活動開始時間:\" + fbShopActivityDescription.getStartDate());\n System.out.println(\"活動結束時間:\" + fbShopActivityDescription.getEndDate());\n System.out.println(\"活動地點:\" + fbShopActivityDescription.getAddress());\n System.out.println(\"~~~~~~~~~~~~~~~~~~HighlightFBPost~~~~~~~~~~~~~~~~~~~~\");\n System.out.println(fbShopActivityDescription.getDescription());\n System.out.println(\"////////////////////////end/////////////////////////\");\n System.out.println();\n }\n }\n }\n out.flush();\n out.close();\n out = null;\n in.close();\n in = null;\n client.close();\n client = null;\n } catch (java.io.IOException e) {\n System.err.println(\"SocketClient 連線有問題 !\");\n System.err.println(\"IOException :\" + e.toString());\n } catch (ClassNotFoundException e) {\n System.err.println(\"ClassNotFoundException :\" + e.toString());\n } catch (Exception e) {\n System.err.println(\"Exception :\" + e.toString());\n }\n\n }", "void setStatisticsInterval(long interval, TimeUnit timeUnit);", "public static void queryUberAndStore(LocationAndTime locationAndTime,UberClientUtil uberClient){\n Map requestMap=new HashMap<>();\n requestMap.put(\"startLatitude\",locationAndTime.getStartLatitude());\n requestMap.put(\"startLongitude\",locationAndTime.getStartLongitude());\n requestMap.put(\"endLatitude\",locationAndTime.getEndLatitude());\n requestMap.put(\"endLongitude\",locationAndTime.getEndLongitude());\n List<Price> prices=uberClient.getPriceRequest(requestMap).getPrices();\n LocalDateTime localDateTime=Instant.ofEpochMilli(locationAndTime.getJourneyStartTime().getTime()).atZone( ZoneId.systemDefault()).toLocalDateTime();\n LocalDateTime now=LocalDateTime.now();\n LocalDateTime toDateTime=LocalDateTime.of( now.getYear(),now.getMonthValue(),now.getDayOfMonth() , localDateTime.getHour(), localDateTime.getMinute(), localDateTime.getSecond());\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\");\n if(prices!=null){\n for(Price price:prices){\n price.setCurrentDate(formatter.format(toDateTime.atZone(ZoneId.systemDefault()).toInstant()));\n csvUtilUber.writeRecordToFile(price);\n }\n }\n\n\n\n\n }", "public void setPollingInterval(int seconds) {\n pollingInterval = seconds;\n }", "public void setRefreshInterval(String interval) {\n tozAdCampaignRetrievalInterval = parseIntegerValue(interval,0);\n AppyAdService.getInstance().debugOut(TAG,\"Set refresh interval to \"+tozAdCampaignRetrievalInterval);\n }", "private boolean handleHttpRequests(int[] timeInterval) {\n //generate 3 random data\n int userId1 = ThreadLocalRandom.current().nextInt(POPULATION);\n int userId2 = ThreadLocalRandom.current().nextInt(POPULATION);\n int userId3 = ThreadLocalRandom.current().nextInt(POPULATION);\n\n int timeInterval1 = ThreadLocalRandom.current().nextInt(timeInterval[1] - timeInterval[0]+1) + timeInterval[0];\n int timeInterval2 = ThreadLocalRandom.current().nextInt(timeInterval[1] - timeInterval[0]+1) + timeInterval[0];\n int timeInterval3 = ThreadLocalRandom.current().nextInt(timeInterval[1] - timeInterval[0]+1) + timeInterval[0];\n int stepCount1 = ThreadLocalRandom.current().nextInt(5000);\n int stepCount2 = ThreadLocalRandom.current().nextInt(5000);\n int stepCount3 = ThreadLocalRandom.current().nextInt(5000);\n\n try {\n long startTime = System.currentTimeMillis();\n Response response = postUserData(userId1,DAY_NUM,timeInterval1,stepCount1);\n countResponse(startTime,response);\n\n startTime = System.currentTimeMillis();\n response = postUserData(userId2,DAY_NUM,timeInterval2,stepCount2);\n countResponse(startTime,response);\n\n startTime = System.currentTimeMillis();\n response = getCurrentUserData(userId1);\n countResponse(startTime,response);\n\n startTime = System.currentTimeMillis();\n response = getSingleUserData(userId1, DAY_NUM);\n countResponse(startTime,response);\n\n startTime = System.currentTimeMillis();\n response = postUserData(userId3,DAY_NUM,timeInterval3,stepCount3);\n countResponse(startTime,response);\n\n } catch (Exception e) {\n // System.out.println(\"Exception in Post1: \" + e.getClass().getSimpleName());\n System.out.println(e.getMessage() + \"\\n\" + e.getCause());\n return false;\n }\n\n printer.numOfRequestsSent(5);\n return true;\n }", "@Override\n protected String doInBackground(String... params) {\n JSONObject jsonobj;\n jsonobj = new JSONObject();\n try {\n long val = Long.parseLong(Register.frequecy)*60 + System.currentTimeMillis()/1000;\n JSONArray arr = new JSONArray();\n arr.put(bp);arr.put(ecg);arr.put(pulse);\n jsonobj.put(\"sensorId\", arr);\n jsonobj.put(\"frequency\" , 5);\n jsonobj.put(\"tillWhen\" , val);\n StringEntity se = new StringEntity(jsonobj.toString());\n se.setContentType(\"application/json;charset=UTF-8\");\n se.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE, \"application/json;charset=UTF-8\"));\n HttpClient httpclient = new DefaultHttpClient();\n URL url = new URL(\"http://10.42.0.58:6300/monitor/register_frequency\");\n HttpPost httppostreq = new HttpPost(url.toString());\n httppostreq.setEntity(se);\n HttpResponse response;\n response = httpclient.execute(httppostreq);\n String resp_text = EntityUtils.toString(response.getEntity());\n // Convert String to json object\n JSONObject json = new JSONObject(resp_text);\n id = json.getString(\"id\");\n while(true){\n Thread.sleep(5000);\n String urlGET = \"http://10.42.0.58:6300/monitor/getresults?id=\"+id;\n HttpGet getMethod = new HttpGet(urlGET);\n HttpResponse response1 = null;\n HttpClient httpClient = new DefaultHttpClient();\n response1 = httpClient.execute(getMethod);\n String resp_text1 = EntityUtils.toString(response1.getEntity());\n // Convert String to json object\n JSONObject json1 = new JSONObject(resp_text1);\n String message = json1.getString(\"Message\");\n if(message.equalsIgnoreCase(\"pending\")){\n //publishProgress(\"Session ended\");\n //break;\n continue;\n\n }\n Log.d(\"message\",resp_text1);\n String bpMsg = json1.getString(\"bp\");\n String ecgMsg = json1.getString(\"ecg\");\n String pulseMsg = json1.getString(\"pulse\");\n String msg = json1.getString(\"Message\");\n if(msg.equalsIgnoreCase(\"Last data packet\")){\n publishProgress(\"Session ended\");\n break;\n\n }\n\n /*String bpMsg = Register.bp;\n String ecgMsg = Register.ecg;\n String pulseMsg = Register.pulse;\n publishProgress(bpMsg+\",\"+ecgMsg+\",\"+pulseMsg);\n Random r = new Random();\n ecg = Integer.toString(r.nextInt(100));\n bp = Integer.toString(r.nextInt(100));\n pulse = Integer.toString(r.nextInt(100));*/\n publishProgress(bpMsg+\",\"+ecgMsg+\",\"+pulseMsg);\n }\n //bp = json.getString(\"bp\");\n //pulse = json.getString(\"pulse\");\n //Intent i = new Intent(getApplicationContext(),MainActivity.class);\n //startActivity(i);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "void endPeriodic() {\n\t\tupdateDashboard();\n\t}", "public void FetchOutfit(double clo_value_request) {\n mCloRequest = clo_value_request;\n mHasCloRequest = true;\n if (mTasksLeft==0){\n onAllTasksCompleted();\n }\n }", "private List<String> getDataFromApi() throws IOException {\n // List the next 10 events from the primary calendar.\n DateTime now = new DateTime(System.currentTimeMillis());\n Date nowToday = new Date(System.currentTimeMillis());\n Date now2 = new Date();\n Log.d(\"TIME\", now2.toString()); // Fri Apr 14 11:45:53 GMT-04:00 2017\n String show = DateFormat.getTimeInstance().format(nowToday); // 오후 4:22:40\n String show2 = DateFormat.getDateInstance().format(nowToday); // 2017. 4. 7.\n String show3 = DateFormat.getDateTimeInstance().format(nowToday); // 2017. 4. 7. 오후 4:22:40\n // String show4 = DateFormat.getDateInstance().format(now); 이건 안됌 에러\n Log.d(\"@@@@@LOOK HERE TIME@@\", show);\n Log.d(\"@@@@@LOOK HERE DATE@@\", show2);\n Log.d(\"@@@@@LOOK HERE DATETIME\", show3);\n List<String> eventStrings = new ArrayList<String>();\n Events events = mService.events().list(\"primary\")\n .setMaxResults(10)\n .setTimeMin(now)\n .setOrderBy(\"startTime\")\n .setSingleEvents(true)\n .execute();\n\n\n List<Event> items = events.getItems();\n // List<Map<String, String>> pairList = new ArrayList<Map<String, String>>();\n String nowDay = now.toString().substring(0, now.toString().indexOf(\"T\"));\n\n\n for (Event event : items) {\n DateTime start = event.getStart().getDateTime();\n if (start == null) {\n // All-day events don't have start times, so just use\n // the start date.\n start = event.getStart().getDate();\n }\n\n eventStrings.add(\n String.format(\"%s (%s)\", event.getSummary(), start));\n }\n List<String> realStrings = new ArrayList<String>();\n for (String a:eventStrings\n ) {\n // Log.d(\"@@@@\", a);\n String day;\n String korTimeSpeech = null;\n String newSpeech = null;\n day = a.substring(a.indexOf(\"(\"), a.indexOf(\")\"));\n day = day.substring(1);\n\n if(day.length() > 16) {\n int hour = Integer.parseInt(day.substring(11, 13));\n if(hour < 12) {\n korTimeSpeech = \"오전 \";\n } else{\n korTimeSpeech = \"오후 \";\n hour = hour - 12;\n }\n korTimeSpeech = korTimeSpeech + hour + \"시 \" + day.substring(14, 16) + \"분에 \";\n newSpeech = a.substring(0, a.indexOf(\"(\"));\n newSpeech = korTimeSpeech + newSpeech;\n //Make it in day format\n day = day.substring(0, day.indexOf(\"T\"));\n }else {\n // korTimeSpeech = day.substring(11, 13) + \"시 \" + day.substring(14, 16) + \"분에 \";\n newSpeech = a.substring(0, a.indexOf(\"(\"));\n newSpeech = newSpeech;\n }\n\n if (day.equals(nowDay)) {\n realStrings.add(newSpeech);\n }\n }\n\n return realStrings;\n }", "IndexData finLastQueuedData();", "public void suspendUser(int api_key){\n User user= getUser(api_key); \n try {\n TimeUnit.SECONDS.sleep(5);\n user.setStartDate(new Date());\n user.setHitCount(0);\n } catch (InterruptedException ex) {\n Logger.getLogger(UserController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Test\n public void testTransplantListEndpoint() {\n String lowerBound = \"1970-01-01\";\n String upperBound = \"2018-09-27\";\n ResponseEntity response = dataController.getTransplantWaitingListRange(null,null,null,null,upperBound, lowerBound);\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }", "private ArrayList<TweetData> query(QueryTargetInfo info) {\n String url;\n ArrayList<TweetData> tweets = new ArrayList<TweetData>();\n InputStream is = null;\n\n // lastSeenId should have been set earlier.\n // However, if it is still null, just use \"0\".\n if (info.lastSeenId == null) {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=0\",\n URL_BASE, info.query, RPP);\n } else if (info.smallestId == null) {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=%s\",\n URL_BASE, info.query, RPP, info.lastSeenId);\n } else {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=%s&max_id=%s\",\n URL_BASE, info.query, RPP, info.lastSeenId, info.smallestId);\n }\n\n try {\n do {\n URL searchURL = new URL(url);\n HttpsURLConnection searchConnection = (HttpsURLConnection)searchURL.openConnection();\n\n searchConnection.setRequestProperty(\"Host\", \"api.twitter.com\");\n searchConnection.setRequestProperty(\"User-Agent\", \"BirdCatcher\");\n searchConnection.setRequestProperty(\"Authorization\", \"Bearer \" + kBearerToken);\n\n is = searchConnection.getInputStream();\n\n JSONTokener jsonTokener = new JSONTokener(is);\n\n JSONObject json = new JSONObject(jsonTokener);\n\n is.close();\n\n url = getNextLink(json, url, info);\n\n tweets.addAll(getTweets(json, info));\n\n Thread.sleep(1000);\n\n is = null;\n } while (url != null);\n } catch (Exception e) {\n Logger.logError(\"Error performing query\", e);\n\n if (is != null) {\n try {\n java.io.BufferedReader in =\n new java.io.BufferedReader(new java.io.InputStreamReader(is));\n\n String response = \"Response from Twitter:\\n\";\n String temp;\n\n while ((temp = in.readLine()) != null) {\n response += (temp + \"\\n\");\n }\n\n Logger.logDebug(response);\n\n response = null;\n temp = null;\n } catch (Exception ex) {\n }\n }\n\n return tweets;\n }\n\n return tweets;\n }", "private void getStudentSubscriptionEndDate() {\n String DeviceID = mAppUtils.getDeviceID();\n LoginUser = (LoginUser) mSharePref.getLoginUser();\n if (!mAppUtils.getConnectionState()) {\n mAppUtils.displayNoInternetSnackBar(findViewById(android.R.id.content));\n } else if (DeviceID == null)\n mAppUtils.displaySnackBarWithMessage(findViewById(android.R.id.content),\n getResources().getString(R.string.error_device_id_not_found));\n else {\n mProgressDialog.setMessage(\"Please wait...\");\n mProgressDialog.show();\n DebugLog.v(\"Device\", \"Studen ID \" + LoginUser.getStudentID());\n mApiCall.getUserSubscription(LoginUser.getStudentID(), DeviceID,\n new OnTaskCompleted(this), mApiCall.GetUserSubscription);\n\n }\n }", "@Override\n public void unsubscribe() {\n try {\n assert future != null;\n future.get(5, TimeUnit.SECONDS); //wait for all the scheduled values fired\n } catch (Exception e) {\n Throwables.propagate(e); //just hide the checked exception\n }\n }", "ArrayList<Serie> getSeries(){\n\n Uri builtUri = Uri.parse(seriesURL)\n .buildUpon()\n .build();\n String url = builtUri.toString();\n\n return doCallSerie(url);\n }", "@Override\n protected Void doInBackground(Integer... params) {\n try {\n\n Intent itnt = getIntent();\n String url = getResources().getString(R.string.jobServiceUrl) + \"statistics/getTehnologyTrend?\" + itnt.getStringExtra(\"searchParams\");\n\n// String url = \"http://192.168.1.1:8080/webService/statistics/getTehnologyTrend?tehnologyIds=1,3,6,4,7,10,13&startDate=2014-08-03&endDate=2015-03-03\";\n\n RestService rs = new RestService();\n\n monthlyTrendsList = new ArrayList<MonthlyTrend>();\n monthlyTrendsList = rs.getList(url, MonthlyTrend[].class);\n\n\n } catch (Exception e) {\n Log.e(\"JobListActivity\", e.getMessage(), e);\n }\n\n return null;\n }", "@Test\n\tpublic void testListReservationsOfUserAfterInterval() {\n\t\t// create a reservation\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t// list start is now\n\t\tDate listStart = cal.getTime();\n\t\tcal.add(Calendar.HOUR, 24);\n\t\t// list end is now + 24h\n\t\tDate listEnd = cal.getTime();\n\n\t\t// first reservation is 1 second after list end\n\t\tcal.add(Calendar.SECOND, 1);\n\t\tDate reservation1StartDate = cal.getTime();\n\t\tcal.add(Calendar.HOUR, +2);\n\t\tDate reservation1EndDate = cal.getTime();\n\t\tdataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(), reservation1StartDate,\n\t\t\t\treservation1EndDate);\n\n\t\t// should not find above reservation\n\t\tCollection<Reservation> reservationsOfUser;\n\t\treservationsOfUser = bookingManagement.listReservationsOfUser(USER_ID, listStart, listEnd);\n\n\t\tassertNotNull(reservationsOfUser);\n\t\tassertTrue(reservationsOfUser.isEmpty());\n\t}", "private String getResultByUrl(String url) {\r\n\r\n\t\tRequestConfig.Builder requestBuilder = RequestConfig.custom();\r\n\t\trequestBuilder = requestBuilder.setConnectTimeout(75000);\r\n\t\trequestBuilder = requestBuilder.setConnectionRequestTimeout(75000);\r\n\t\trequestBuilder.setSocketTimeout(75000);\r\n\r\n\t\tHttpClientBuilder builder = HttpClientBuilder.create();\r\n\t\tbuilder.setDefaultRequestConfig(requestBuilder.build());\r\n\t\tclient = builder.build();\r\n\r\n\t\trequest = new HttpGet(url);\r\n\t\trequest.addHeader(\"Accept\", \"application/json\");\r\n\r\n\t\tHttpResponse response = null;\r\n\t\tString r = \"\";\r\n\r\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < 7; i++) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tSystem.out.println(\"Sending request: \" + url);\r\n\t\t\t\t\tresponse = client.execute(request);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} catch (ConnectionPoolTimeoutException e) {\r\n\t\t\t\t\tSystem.out.println(\"Connection timeout. Trying again...\");\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tTimeUnit.SECONDS.sleep(10);\r\n\t\t\t\t\t} catch (InterruptedException ex) {\r\n\t\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"Response Code : \"\r\n\t\t\t\t\t+ response.getStatusLine().getStatusCode());\r\n\r\n\t\t\tbr = new BufferedReader(new InputStreamReader(response.getEntity()\r\n\t\t\t\t\t.getContent()));\r\n\r\n\t\t\tStringBuffer result = new StringBuffer();\r\n\t\t\tString line = \"\";\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tresult.append(line);\r\n\t\t\t}\r\n\t\t\tSystem.out.println(result + \"\\n\");\r\n\t\t\ttry {\r\n\t\t\t\tTimeUnit.SECONDS.sleep(1);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tr = result.toString();\r\n\t\t\tGson gson = new GsonBuilder().setPrettyPrinting().create();\r\n\r\n\t\t\tJsonObject jsonResult = gson.fromJson(result.toString(),\r\n\t\t\t\t\tJsonObject.class);\r\n\t\t\tif (jsonResult.get(\"backoff\") != null) {\r\n\t\t\t\tint backoff = (jsonResult.get(\"backoff\")).getAsInt();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tSystem.out.println(\"Received backoff. Waiting for \"\r\n\t\t\t\t\t\t\t+ backoff + \"seconds...\");\r\n\t\t\t\t\tTimeUnit.SECONDS.sleep(backoff + 5);\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\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\treturn r;\r\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 }", "List<InsureUnitTrend> queryInsureDate();", "@Test\n public void testTransplantListEndpointQueryBloodtype() {\n String lowerBound = \"1970-01-01\";\n String upperBound = \"2018-09-27\";\n ResponseEntity response = dataController.getTransplantWaitingListRange(\"AB+\",null,null,null,upperBound, lowerBound);\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }", "@Override\r\n\tpublic Vector<Log> get(Timestamp begin, Timestamp end) {\n\t\tConnection con = MysqlDatabase.getInstance().getConnection();\r\n\t\tVector<Log> ret = new Vector<Log>();\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(GetAll);\r\n\t\t\tps.setTimestamp(1, begin);\r\n\t\t\tps.setTimestamp(2, end);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tret.add(generate(rs));\r\n\t\t\t}\r\n\t\t\tcon.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public void realTimeUpdate() {\n if ( millis() - lastTime >= 60000 ) {\n // *Load all_hour data\n eqData.init(hourURL);\n eqData.update(hour);\n println( \"all_hour data updated!\" );\n isHour = true;\n lastTime = millis();\n }\n}", "private void fetchNextBlock() {\n try {\n \tSearchClient _client = new SearchClient(\"cubansea-instance\");\n \tWebSearchResults _results = _client.webSearch(createNextRequest());\n \t\tfor(WebSearchResult _result: _results.listResults()) {\n \t\t\tresults.add(new YahooSearchResult(_result, cacheStatus+1));\n \t\t\tcacheStatus++;\n \t\t}\n \t\tif(resultCount == -1) resultCount = _results.getTotalResultsAvailable().intValue();\n } catch (IOException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t} catch (SearchException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t}\n\t}", "@Override\n public void queryRecords() throws VizException {\n\n ResourceName rscName = getResourceData().getResourceName();\n\n DataTime cycleTime = rscName.getCycleTime();\n\n // latest should already be resolved here.\n if (rscName.isLatestCycleTime()) {\n return;\n }\n\n List<DataTime> availableTimes = new ArrayList<>();\n\n if (cycleTime != null && gridRscData.getPluginName()\n .equalsIgnoreCase(GempakGrid.gempakPluginName)) {\n try {\n String dataLocation = null;\n try {\n dataLocation = GempakGrid\n .getGempakGridPath(gridRscData.getGdfile());\n\n } catch (VizException e) {\n statusHandler.error(\"Unable to specify location for \"\n + gridRscData.getPluginName() + \" \"\n + gridRscData.getGdfile(), e);\n return;\n }\n String[] gridAvailableTimes = GempakGrid.getAvailableGridTimes(\n dataLocation, cycleTime.toString(),\n gridRscData.getGdfile().toLowerCase());\n for (int ii = 0; ii < gridAvailableTimes.length; ii++) {\n availableTimes.add(new DataTime(gridAvailableTimes[ii]));\n }\n } catch (Exception e) {\n return;\n }\n } else {\n availableTimes = gridRscData.getAvailableDataTimes();\n }\n\n ArrayList<DataTime> dataTimes = new ArrayList<>();\n\n // loop thru all the times for the grib records for this model and\n // if the time matches the cycle time for this resource and if\n // it hasn't already been added, add it to the queue of data objects\n // to be processed by the abstract class.\n for (DataTime dt : availableTimes) {\n\n // create a dataTime without a possible validPeriod.\n DataTime availTime = new DataTime(dt.getRefTime(),\n dt.getFcstTime());\n DataTime refTime = new DataTime(dt.getRefTime());\n\n if (cycleTime != null) {\n if (cycleTime.equals(refTime)) {\n if (!dataTimes.contains(availTime)) {\n dataTimes.add(availTime);\n }\n }\n } else { // for grid analysis\n dataTimes.add(availTime);\n }\n }\n setDataTimesForDgdriv(dataTimes);\n setAllFramesAsPopulated();\n }", "void fetchNudges() {\n Log.d(LOG_TAG, \"Fetch nudges started\");\n mExecutors.networkIO().execute(() -> {\n try {\n\n if (mNudgeAdapter != null) {\n\n if (mUserRef != null) {\n //Fetch more data\n if (mNudgeAdapter.getItemCount() != 0) {\n DocumentSnapshot snapshot = mFirestoreAdapter.getSnapshot(mFirestoreAdapter.getItemCount() - 1);\n\n mNudgesQuery = mUserRef\n .collection(ReferenceNames.NUDGES)\n .orderBy(ReferenceNames.TIMESTAMP, Query.Direction.DESCENDING)\n .limit(fetchLimit)\n .startAfter(snapshot);\n\n } else {\n\n mNudgesQuery = mUserRef\n .collection(ReferenceNames.NUDGES)\n .orderBy(ReferenceNames.TIMESTAMP, Query.Direction.DESCENDING)\n .limit(fetchLimit);\n\n }\n } else Log.d(LOG_TAG, \"fetchNudges, user reference is null \");\n\n Log.d(LOG_TAG, \"Fetch Nudges, setting query\");\n mNudgeAdapter.setQuery(mNudgesQuery);\n }\n } catch (Exception e) {\n // Server probably invalid\n e.printStackTrace();\n }\n });\n }", "void requestRateLimited();", "private void getSleepData() {\n\n }", "public JSONObject getAllStatistics() throws UnirestException;", "public void customLoadMoreDataFromApi(int offset) {\n // This method probably sends out a network request and appends new data items to your adapter. \n // Use the offset value and add it as a parameter to your API request to retrieve paginated data.\n // Deserialize API response and then construct new objects to append to the adapter\n \tAsyncHttpClient client = new AsyncHttpClient();\n\t\t//https://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=%s&start=%d&imgsz=medium\n\t\t//client.get(\"https://ajax.googleapis.com/ajax/services/search/images?\"+\"start=\"+0+\"&v=1.0&q=\"+Uri.encode(query),\n\t\tclient.get(getQueryString(offset*8) + Uri.encode(query),\n\t\t\t\tnew JsonHttpResponseHandler(){\n\t\t\t@Override\n\t\t\tpublic void onSuccess(JSONObject response){\n\t\t\t\tJSONArray imageJsonResults = null;\n\t\t\t\ttry{\n\t\t\t\t\timageJsonResults = response.getJSONObject(\"responseData\").getJSONArray(\"results\");\n\t\t\t\t\timageAdapter.addAll(ImageResult.fromJSONArray(imageJsonResults));\t\n\t\t\t\t}catch(JSONException e){\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n \t\n \t\n }", "private void getData() {\n ApiInterface apiInterface = ServiceGenerator.createService(ApiInterface.class);\n Call<TermsConditionApi> call = apiInterface.getTermsCondition();\n call.enqueue(new Callback<TermsConditionApi>() {\n @Override\n public void onResponse(Call<TermsConditionApi> call, Response<TermsConditionApi> response) {\n if (response.isSuccessful()) {\n if (response.body().getStatus().equals(200)) {\n data = response.body().getData();\n } else {\n }\n } else {\n\n }\n }\n\n @Override\n public void onFailure(Call<TermsConditionApi> call, Throwable t) {\n// Toast.makeText(HomeActivity.this, \"\" + t.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n }", "public void customLoadMoreDataFromApi(int offset) {\n// Log.d(TAG, \"page = \" + offset);\n populateTimeline();\n // This method probably sends out a network request and appends new data items to your adapter.\n // Use the offset value and add it as a parameter to your API request to retrieve paginated data.\n // Deserialize API response and then construct new objects to append to the adapter\n }", "OffsetDateTime usageEnd();", "@Override\n\tpublic void update(long interval) {\n\n\t}", "ResponseEntity<List<TOURatesHistory>> getTouRatesHistory();", "public List<TimeseriesData> getTimeSeriesData(String query, long startTimeInEpocMillis, long endTimeInEpochMillis,\n String granularity) {\n List<TimeseriesData> timeSeriesData = new ArrayList<>();\n WavefrontMetricQueryResponse queryResponse =\n queryMetric(query, startTimeInEpocMillis, endTimeInEpochMillis, granularity);\n if (null != queryResponse && null != queryResponse.getTimeseries()) {\n for (Timeseries timeseries : queryResponse.getTimeseries()) {\n TimeseriesData data = new TimeseriesData();\n if (CollectionUtils.isEmpty(timeseries.getTags())) {\n data.setTags(new HashMap<>());\n } else {\n data.setTags(timeseries.getTags());\n }\n data.setData(timeseries.getData());\n data.getTags().put(\"host\", timeseries.getHost());\n timeSeriesData.add(data);\n }\n return timeSeriesData;\n }\n return timeSeriesData;\n }", "@RequestMapping(path = \"/last24hDeliveryIssues\", method = RequestMethod.GET)\n\tpublic List<DeliveryIssue> getLast24hDeliveryIssues() {\n\t\tQuery queryObject = new Query(\"Select * from delivery_issue\", \"blablamove\");\n\t\tQueryResult queryResult = BlablamovebackendApplication.influxDB.query(queryObject);\n\n\t\tInfluxDBResultMapper resultMapper = new InfluxDBResultMapper();\n\t\tSystem.out.println(\"queryResult : \" + queryResult);\n\t\tList<DeliveryIssue> deliveryIssueList = resultMapper\n\t\t\t\t.toPOJO(queryResult, DeliveryIssue.class);\n\n\t\tLocalDateTime stop = LocalDateTime.now().minusHours(0);\n\t\tLocalDateTime start = LocalDateTime.now().minusHours(24).withSecond(0).withMinute(0).withNano(0);\n\n\t\treturn deliveryIssueList.stream().filter(deliveryIssue -> instantIsBetweenDates(deliveryIssue.getTime(), start, stop)).collect(Collectors.toList());\n\t}", "private synchronized void getRawData (Date begin, Date end, Vector<SensorData> data) {\n for (SensorData sensorData : rawData) {\n if ((sensorData.getDate().before(end) || sensorData.getDate()\n .equals(end))\n && (sensorData.getDate().after(begin) || sensorData\n .getDate().equals(begin))) {\n data.add(sensorData);\n }\n }\n }", "net.webservicex.www.WeatherForecasts getWeatherForecasts();", "public interface GrafanaService {\n @GET(\"/render\")\n Call<List<ParsedStatElement>> getData(@Query(\"from\") String from, @Query(\"until\") String until, @Query(\"target\") String target, @Query(\"format\") String format);\n}", "private void loadDataFromFirebase() {\n\n db.collection(\"users\").document(userId).collection(\"sleep\")\n .orderBy(\"dateTime\", Query.Direction.ASCENDING)\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n\n for (QueryDocumentSnapshot querySnapshot : task.getResult()) {\n\n timestampToDate = querySnapshot.getTimestamp(\"dateTime\").toDate();\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\", Locale.ENGLISH);\n dayDate = sdf.format(timestampToDate);\n sensorPressure = querySnapshot.getBoolean(\"sensorPressure\");\n sleepDateTimeData.add(new SleepDateTimeData(dayDate, sensorPressure, timestampToDate));\n i++;\n }\n\n accumulateData();\n\n }\n\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(SleepActivity.this, \"Problem ---1---\", Toast.LENGTH_SHORT).show();\n Log.w(\"!---1---\", e.getMessage());\n }\n });\n }", "public void loadNextDataFromApi(int offset) {\n client.getMoreMentionsTimeline(maxId, new JsonHttpResponseHandler(){\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n\n for (int i = 0; i < response.length(); i++){\n //get json object in the position index\n //create a tweet object with json object\n //add the tweet object to the arraylist of tweets\n //notify changes to adapter\n Tweet tweet = null;\n try {\n tweet = Tweet.fromJson(response.getJSONObject(i));\n tweets.add(tweet);\n adapter.notifyItemInserted(tweets.size() - 1);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (tweet.uid < maxId){\n maxId = tweet.uid;\n Log.d(\"MaxId\", String.valueOf(maxId));\n }\n\n }\n }\n });\n\n }", "private VoltTable[] getTransactionData(long interval, final long now) {\n ParameterSet parameters = new ParameterSet();\n parameters.setParameters((byte)interval, now);\n \n return this.executeOncePerSite(SysProcFragmentId.PF_txnData,\n SysProcFragmentId.PF_txnDataAggregator,\n parameters);\n }", "public static void getFlightSearchData() {\n\t HttpClient httpclient =HttpClientBuilder.create().build();\r\n//\t String url = \"http://finance.yahoo.com/q/hp?s=005930.KS+Historical+Prices\";\r\n\t String url =\"https://www.rome2rio.com/api/json/GetFlightPricesAsyncProgress?id=http%3A%2F%2Fpartners.api.skyscanner.net%2Fapiservices%2Fpricing%2Fuk1%2Fv1.0%2Feca848208a19428887cb0f9acd45798f_ecilpojl_5390203AB08027B40F6AC23E253711B9%20ICN%20OKA%2CICN%2COKA%2CSkyScanner%2Chttp%3A%2F%2Fwww.skyscanner.com%2F&version=201605050453&\";\r\n//\t String url =\"https://www.rome2rio.com/api/json/GetFlightPricesAsyncStart?origins=ICN&destinations=OKA&outDate=5-12-2016&retDate=5-19-2016&adults=1&children=0&infants=0&cabin=e&currency=KRW&version=201605050453&\";\r\n\t try\r\n\t { \r\n\t \tHttpGet request = new HttpGet(url);\r\n\t\t\tHttpResponse res = httpclient.execute(request);\r\n/*\t \t// Specify values for path parameters (shown as {...}) \r\n\t URIBuilder builder = new URIBuilder(\"http://evaluate.rome2rio.com/api/1.2/json/Search/\");\r\n\t \r\n\t // Specify your developer key \r\n\t builder.setParameter(\"key\", \"Z2CA71LM\"); \r\n\t // Specify values for the following required parameters \r\n\t builder.setParameter(\"oName\", \"ICN\"); \r\n\t builder.setParameter(\"dName\", \"LAX\");\r\n//\t builder.setParameter(\"oPos\", \"New York Kennedy\");\r\n//\t builder.setParameter(\"dPos\", \"40.64441,-73.78275\");\r\n//\t builder.setParameter(\"flags\", \"0x000FFFF0\");\r\n//\t builder.setParameter(\"flags\", \"0x000FFFFE\");\r\n\t builder.setParameter(\"flags\", \"0x000FFFFC\");\r\n\t \r\n//\t URI uri = builder.build(); \r\n\t HttpGet request = new HttpGet(uri); \r\n\t HttpResponse response = httpclient.execute(request); \r\n*/\t \r\n\t\t\tHttpEntity entity = res.getEntity();\r\n\t if (entity != null) { \r\n\t System.out.println(\"EntityUtil:\" + EntityUtils.toString(entity)); \r\n\t }\r\n//\t return EntityUtils.toString(entity);\r\n\t\t\tlogger.info(\"aaa: {}\", entity.toString());\r\n\t }\r\n\t catch(Exception e) \r\n\t { \r\n\t System.out.println(e.getMessage()); \r\n//\t return null;\r\n\t } \r\n\t \r\n\t}", "public int getRefreshInterval() {\n return (tozAdCampaignRetrievalInterval);\n }", "public interface UitOAuthApi\n{\n @GET(\"/search?rows=15&group=event&datetype=today&q=*:*&fq=type:event&fq=language:nl&fq=-category_id:0.3.1.0.0\")\n void getCurrentEvents(@Query(\"start\") int startIndex,\n @Query(\"pt\") String latLong,\n @Query(\"sort\") String sort,\n @Query(\"sfield\") String locationType,\n @Query(\"d\") String radius,\n Callback<RootObject> callback);\n\n @GET(\"/search?start=0&group=event&sort=startdate+asc&fq=type:event&fq=language:nl&past=true\")\n void getFavoriteEvents(@Query(\"q\") String favoriteQuery,\n Callback<RootObject> callback);\n\n @GET(\"/search?rows=15&group=event&fq=type:event&fq=language:nl\")\n void getFilteredEvents(@Query(\"start\") int startIndex,\n @Query(\"q\") String searchQuery,\n @Query(\"sort\") String sort,\n @Query(\"sfield\") String locationType,\n @Query(\"pt\") String latLong,\n @Query(\"d\") String radius,\n @Query(\"zipcode\") String zipCodeWithRadius,\n @Query(\"datetype\") String when,\n @Query(\"fq\") List<String> extraSearchItems,\n Callback<RootObject> callback);\n}", "public void addTimer(){\n RequestQueue rq = Volley.newRequestQueue(getApplicationContext());\n\n StringRequest request = new StringRequest(Request.Method.POST, URL, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n //display\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error)\n {\n error.printStackTrace();\n }\n }) {\n @Override\n public String getBodyContentType() {\n return \"application/json; charset=utf-8\";\n }\n\n @Override\n public byte[] getBody() {\n Gson gson = new Gson();\n String json = gson.toJson(dateStart);\n json = json.concat(\",\").concat(gson.toJson(dateEnd));\n\n try{ return (json).getBytes(\"utf-8\"); }\n catch (UnsupportedEncodingException e) { return null; }\n }\n };\n rq.add(request);\n }", "public List<PostEntity> getInterval(int auth_id, String token, int s, int c, String order, String query, String date) {\n\n\n if (sessionRepository.findAll().stream().anyMatch(session -> session.getUser_id() == auth_id && session.getToken().equals(token))) {\n\n List<ProviderEntity> providerList = userService.getProviderListForUser(auth_id, token, auth_id, 0, 10);\n\n StringBuilder sb = new StringBuilder();\n\n for(var provider : providerList)\n {\n sb.append(\"list=\").append(provider.getId()).append(\"&\");\n }\n\n System.out.println(sb.toString());\n return ingestionLinker.getInterval(s, c, sb.toString(), order, query, date);\n }\n\n return null;\n }", "public interface Weather {\n @GET(\"/data/2.5/forecast/daily?mode=json\")\n Call<Result> forecast(@Query(\"q\") String q, @Query(\"units\") String units, @Query(\"cnt\") int cnt, @Query(\"appid\") String appid);\n}", "@Scheduled(fixedRate = 500)\n public void processStatisticsUntil() {\n List<Transaction> allByTimestampAfter = transactionRepository.findAllByTimestampAfter(Instant.now().toEpochMilli() - minuteInMillis);\n Statistics statistics = statisticsCache.getStatistics();\n DoubleSummaryStatistics amountSummaryStatistics = allByTimestampAfter.stream().mapToDouble(Transaction::getAmount).summaryStatistics();\n statistics.setAvg(amountSummaryStatistics.getAverage());\n statistics.setCount(amountSummaryStatistics.getCount());\n statistics.setMax(amountSummaryStatistics.getMax());\n statistics.setMin(amountSummaryStatistics.getMin());\n statistics.setSum(amountSummaryStatistics.getSum());\n log.debug(\"stats {} \", statistics);\n }", "@Override\n public int getSamplingInterval(String pvName, PostProcessing downSamplingIdentify, Timestamp startTime, Timestamp endTime) {\n if (hadoopRetrieveService == null) {\n initialize();\n }\n// System.out.println(hadoopRetrieveService == null);\n return hadoopRetrieveService.getSamplingInterval(downSamplingIdentify, startTime, endTime,\n getSamplePeriod(pvName));\n }", "public final void downTime() {\n RxDisposableManager.getInstance().add(getTAG(), Observable.interval(0, 1, TimeUnit.SECONDS).take(61).compose(RxUtil.applyIO()).subscribe(new CouponGetActivity$downTime$sub$1(this)));\n }", "void queriesEnd();", "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 }", "@Override\n public Stoptime[] getStoptimes(String stopGtfsId) throws Exception {\n String query = getStopTimesQuery(stopGtfsId);\n String json = new GraphQLAPIQuery(apiUrl, query).execute();\n \n Stop deserialized = new GsonBuilder()\n .registerTypeAdapter(Stop.class, new TransitDataJsonDeserializer())\n .create()\n .fromJson(json, Stop.class);\n \n return deserialized.getStoptimes();\n }", "public interface ApiService {\n\n @GET(\"/api/v1/rates/daily/\")\n Call<List<ExchangeRate>> getTodayExchangeRates();\n\n}", "private void buildTimeChartUrl() {\n url = \"http://q.lizone.net/index/index/fenshi/label/\" + dataItem.label + \"/\";//api 2.0\n }", "public void customLoadMoreDataFromApi(int offset) {\n }", "int maxReturnEventsForQuery();", "public static String sendLiveRequest(){\n\n // The following line initializes the HttpGet Object with the URL in order to send a request\n HttpGet get = new HttpGet(BASE_URL + ENDPOINT + \"?access_key=\" + ACCESS_KEY);\n\n try {\n CloseableHttpResponse response = httpClient.execute(get);\n HttpEntity entity = response.getEntity();\n\n // the following line converts the JSON Response to an equivalent Java Object\n JSONObject exchangeRates = new JSONObject(EntityUtils.toString(entity));\n \n Date timeStampDate = new Date((long)(exchangeRates.getLong(\"timestamp\")*1000)); \n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n String formattedDate = dateFormat.format(timeStampDate);\n \n String USDUAH = \"1 \" + exchangeRates.getString(\"source\") + \" in UAH : \" + exchangeRates.getJSONObject(\"quotes\").getDouble(\"USDUAH\") + \" (Date: \" + formattedDate + \")\";\n String USDEUR = \"1 \" + exchangeRates.getString(\"source\") + \" in EUR : \" + exchangeRates.getJSONObject(\"quotes\").getDouble(\"USDEUR\") + \" (Date: \" + formattedDate + \")\"; \n String USDGBP = \"1 \" + exchangeRates.getString(\"source\") + \" in GBP : \" + exchangeRates.getJSONObject(\"quotes\").getDouble(\"USDGBP\") + \" (Date: \" + formattedDate + \")\";\n String USDJPY = \"1 \" + exchangeRates.getString(\"source\") + \" in JPY : \" + exchangeRates.getJSONObject(\"quotes\").getDouble(\"USDJPY\") + \" (Date: \" + formattedDate + \")\";\n return USDUAH+\"\\n\"+USDEUR+\"\\n\"+USDGBP+\"\\n\"+USDJPY;\n } catch (ClientProtocolException e) { \n e.printStackTrace();\n Main.logger.log(Level.SEVERE, \"Exception: \", e);\n } catch (IOException e) {\n e.printStackTrace();\n Main.logger.log(Level.SEVERE, \"Exception: \", e);\n } catch (ParseException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n Main.logger.log(Level.SEVERE, \"Exception: \", e);\n }\n\t\treturn null;\n }", "public interface RxDouBanService {\n @GET(\"top250\")\n Observable<DouBan> getDouBanTop250(@Query(\"start\") int start, @Query(\"count\") int count);\n}", "private void handleTemporalQuery(RoutingContext routingContext) {\n LOGGER.debug(\"Info: handleTemporalQuery method started.\");\n /* Handles HTTP request from client */\n HttpServerRequest request = routingContext.request();\n /* Handles HTTP response from server to client */\n HttpServerResponse response = routingContext.response();\n /* HTTP request instance/host details */\n String instanceID = request.getHeader(HEADER_HOST);\n // get query parameters\n MultiMap params = getQueryParams(routingContext, response).get();\n MultiMap headerParams = request.headers();\n // validate request params\n Future<Boolean> validationResult = validator.validate(params);\n validationResult.onComplete(validationHandler -> {\n if (validationHandler.succeeded()) {\n // parse query params\n NGSILDQueryParams ngsildquery = new NGSILDQueryParams(params);\n // create json\n QueryMapper queryMapper = new QueryMapper();\n JsonObject json = queryMapper.toJson(ngsildquery, true);\n Future<List<String>> filtersFuture =\n catalogueService.getApplicableFilters(json.getJsonArray(\"id\").getString(0));\n json.put(JSON_INSTANCEID, instanceID);\n LOGGER.debug(\"Info: IUDX temporal json query;\" + json);\n /* HTTP request body as Json */\n JsonObject requestBody = new JsonObject();\n requestBody.put(\"ids\", json.getJsonArray(\"id\"));\n filtersFuture.onComplete(filtersHandler -> {\n if (filtersHandler.succeeded()) {\n json.put(\"applicableFilters\", filtersHandler.result());\n if (json.containsKey(IUDXQUERY_OPTIONS)\n && JSON_COUNT.equalsIgnoreCase(json.getString(IUDXQUERY_OPTIONS))) {\n executeCountQuery(json, response);\n } else {\n executeSearchQuery(json, response);\n }\n } else {\n LOGGER.error(\"catalogue item/group doesn't have filters.\");\n }\n });\n } else if (validationHandler.failed()) {\n LOGGER.error(\"Fail: Bad request;\");\n handleResponse(response, ResponseType.BadRequestData,\n validationHandler.cause().getMessage());\n }\n });\n\n }", "@RequestMapping(path = \"/last24hCanceledRoutes\", method = RequestMethod.GET)\n public List<RouteCanceled> getLast24hCanceledRoutes() {\n Query queryObject = new Query(\"Select * from route_canceled\", \"blablamove\");\n QueryResult queryResult = BlablamovebackendApplication.influxDB.query(queryObject);\n\n InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();\n System.out.println(\"queryResult : \" + queryResult);\n List<RouteCanceled> routeCanceledList = resultMapper\n .toPOJO(queryResult, RouteCanceled.class);\n\n LocalDateTime stop = LocalDateTime.now().minusHours(0);\n LocalDateTime start = LocalDateTime.now().minusHours(24).withSecond(0).withMinute(0).withNano(0);\n\n return routeCanceledList.stream().filter(routeCanceled -> instantIsBetweenDates(routeCanceled.getTime(), start, stop)).collect(Collectors.toList());\n }" ]
[ "0.6212057", "0.584421", "0.56214297", "0.5593522", "0.55005574", "0.5422862", "0.53591996", "0.5297793", "0.52971566", "0.5282749", "0.52454376", "0.5243795", "0.5228543", "0.52189", "0.5205255", "0.5198698", "0.51564485", "0.51439816", "0.5135881", "0.5134343", "0.5132579", "0.5120886", "0.5115349", "0.5101796", "0.5085521", "0.5082536", "0.5079038", "0.5067722", "0.50560707", "0.50558347", "0.5042935", "0.50364727", "0.50263435", "0.5016435", "0.50141805", "0.49983796", "0.49832052", "0.4976796", "0.49567458", "0.49379063", "0.4937036", "0.4935958", "0.49328482", "0.49313003", "0.49243137", "0.49203044", "0.4912089", "0.4908329", "0.48997337", "0.48994395", "0.4896263", "0.48915857", "0.4878488", "0.48744258", "0.4868157", "0.48611802", "0.48554194", "0.48487365", "0.483664", "0.4833639", "0.48302606", "0.48274148", "0.4810423", "0.48099", "0.48083854", "0.4808042", "0.4803282", "0.4798906", "0.47862384", "0.47653478", "0.476179", "0.47540283", "0.47526637", "0.4744757", "0.47447568", "0.47436866", "0.47422758", "0.4741588", "0.47409624", "0.47404513", "0.47401777", "0.47399822", "0.47396904", "0.47381264", "0.47339684", "0.47333747", "0.47201255", "0.4713478", "0.4707348", "0.47054243", "0.47021782", "0.46925008", "0.46901324", "0.46851406", "0.46823028", "0.46802938", "0.46786216", "0.46768978", "0.4670422", "0.46669915", "0.46653393" ]
0.0
-1
/ Get the saved JSON file and store in variable / will be implemented later / Get the new JSON file
@Override public void onFinish() { Log.d("timer", "finished one timer cycle"); new DownloadDataTask().execute(USGS_URL); try { // get the most recent earthquake mostRecentEarthquake = getFirstEarthquakeFromJson(); } catch (JSONException e) { e.printStackTrace(); } // notify user of earthquake Intent i = new Intent(getBaseContext(), EarthquakeWatchService.class); i.putExtra("earthquake", mostRecentEarthquake); startService(i); createAndStartTimer(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private JsonObject loadJSONFile(String jsonFilePath) throws IOException {\r\n\tInputStream is = new FileInputStream(jsonFilePath);\r\n\tJsonReader jsonReader = Json.createReader(is);\r\n\tJsonObject json = jsonReader.readObject();\r\n\tjsonReader.close();\r\n\tis.close();\r\n\treturn json;\r\n }", "private void writeToFile() {\n try {\n FileOutputStream fos = new FileOutputStream(f);\n String toWrite = myJSON.toString(4);\n byte[] b = toWrite.getBytes();\n fos.write(b);\n fos.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public String fileToString(String file){\n String path = new File(\"./Users/Colin/AndroidStudioProjects/FlightCompare/app/json/flights.json\").getAbsolutePath();\n File fileObj = new File(path);\n Log.d(\"Reading JSON file\", \"File exists: \" + fileObj.exists());\n Log.d(\"Reading JSON file\", \"File is directory: \" + fileObj.isDirectory());\n Log.d(\"Reading JSON file\", \"File can read: \" + fileObj.canRead());\n Log.d(\"Reading JSON file\", \"Current directory: \" + path);\n Log.d(\"Reading JSON file\", \"The path is: \" + file);\n try(Scanner in = new Scanner(new File(file))){\n StringBuilder sb = new StringBuilder();\n while(in.hasNextLine()){\n sb.append(in.nextLine());\n sb.append('\\n');\n }\n in.close();\n\n return sb.toString();\n }\n catch (FileNotFoundException ex){\n ex.printStackTrace();\n }\n return null;\n }", "public String getJson()\n {\n String json=null;\n try\n {\n // Opening cities.json file\n InputStream is = getAssets().open(\"cities.json\");\n // is there any content in the file\n int size = is.available();\n byte[] buffer = new byte[size];\n // read values in the byte array\n is.read(buffer);\n // close the stream --- very important\n is.close();\n // convert byte to string\n json = new String(buffer, \"UTF-8\");\n }\n catch (IOException ex)\n {\n ex.printStackTrace();\n return json;\n }\n return json;\n }", "public static JSONObject loadMOTD() {\n File JSONFile = new File(plugin.getDataFolder() + \"/motd.json\");\n \n if (!JSONFile.exists()){\n Logger.getLogger(MOTDHandler.class.getName()).log(Level.INFO, \"motd.json was not found in the config directory. Attempting to create a blank file.\");\n boolean worked = saveMOTD(new JSONObject());\n if (worked) Logger.getLogger(MOTDHandler.class.getName()).log(Level.INFO, \"motd.json created!\");\n else Logger.getLogger(MOTDHandler.class.getName()).log(Level.INFO, \"JawaToolBox was unable to generate the blank motd.json. This is likely a permissions problem.\");\n return new JSONObject();\n }\n\n try {\n String source = new String(Files.readAllBytes(Paths.get(JSONFile.toURI())));\n return new JSONObject(source);\n } catch (FileNotFoundException ex) {\n return new JSONObject();\n } catch (IOException ex) {\n Logger.getLogger(MOTDHandler.class.getName()).log(Level.SEVERE, \"Something went wrong JawaToolBox wasn't able to read the motd.json. Check directory permissions.\");\n Logger.getLogger(MOTDHandler.class.getName()).log(Level.SEVERE, null, ex);\n return new JSONObject();\n }\n }", "public static String getJSONData( String filePath, boolean assetFile )\n {\n FileReader reader = null;\n String jsonData = null;\n\n if( assetFile )\n {\n AssetManager mgr = WeatherLionApplication.getAppContext().getAssets();\n String filename;\n\n try\n {\n filename = WeatherLionApplication.OPEN_SOURCE_LICENCE;\n InputStream in = mgr.open( filename, AssetManager.ACCESS_BUFFER );\n Writer writer = new StringWriter();\n char[] buffer = new char[ 1024 ];\n\n try\n {\n Reader assetReader = new BufferedReader( new InputStreamReader( in, StandardCharsets.UTF_8 ) );\n int n;\n\n while ( ( n = assetReader.read( buffer ) ) != -1 )\n {\n writer.write( buffer, 0, n) ;\n }// end of while loop\n }// end of try block\n catch ( IOException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::getJSONData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n\n jsonData = writer.toString();\n\n in.close();\n }// end of try block\n catch ( IOException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::getJSONData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n }// end of if block\n else\n {\n try\n {\n File file = new File( filePath );\n\n // if the is a file present then it will contain a list with at least on object\n if( file.exists() )\n {\n reader = new FileReader( file );\n jsonData = reader.toString();\n }// end of if block\n\n }// end of try block\n catch ( FileNotFoundException | JsonSyntaxException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::getJSONData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n finally\n {\n // close the file reader object\n if( reader != null )\n {\n try\n {\n reader.close();\n } // end of try block\n catch (IOException e)\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE,\n e.getMessage(),TAG + \"::getJSONData [line: \"\n + UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n }// end of if block\n }// end of finally block\n }// end of else block\n\n return jsonData;\n }", "private void save(String fileName, String json){\n mJSonNotifications = getSharedPreferences(fileName, MODE_PRIVATE);\n mJSonNotifications.edit().putString(fileName, json).apply();\n }", "private void saveInFile() {\n try {\n FileOutputStream fos = openFileOutput(FILENAME,\n Context.MODE_PRIVATE);//goes stream based on filename\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos)); //create buffer writer\n Gson gson = new Gson();\n gson.toJson(countbookList, out);//convert java object to json string & save in output\n out.flush();\n fos.close();\n } catch (FileNotFoundException e) {\n throw new RuntimeException();\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }", "@GetMapping(\"/getJson\")\r\n\tpublic HashMap<String, Object> getJsonValue() throws IOException {\n\r\n\t\tHashMap<String, Object> globalVariable = null;\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\t\tString path = \"rules/backUp.json\";\r\n\r\n\t\tResourceLoader resource = new DefaultResourceLoader();\r\n\t\torg.springframework.core.io.Resource resource2 = resource.getResource(\"classpath:\" + path);\r\n\r\n\t\tReader reader = new InputStreamReader(resource2.getInputStream());\r\n\t\tSystem.out.println(\"reader ouput \" + reader.toString());\r\n\t\tString fileData = FileCopyUtils.copyToString(reader);\r\n\t\tSystem.out.println(\" filedate is \" + fileData);\r\n\r\n\t\tTypeReference<HashMap<String, Object>> typeRef = new TypeReference<HashMap<String, Object>>() {\r\n\t\t};\r\n\t\tHashMap<String, Object> readValue = mapper.readValue(fileData, typeRef);\r\n\t\treturn readValue;\r\n\t}", "public String loadJSONFromAsset() {\n String json = null;\n try {\n json = new String(buffer, \"UTF-8\");\n } catch (UnsupportedEncodingException e1) {\n e1.printStackTrace();\n }\n\n return json;\n }", "private void saveInFile() {\n try {\n FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE);\n\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos));\n\n Gson gson = new Gson();\n Log.d(\"PersonList\", personList.toString());\n gson.toJson(personList, out);\n out.flush();\n\n fos.close();\n\n } catch (FileNotFoundException e){\n throw new RuntimeException();\n } catch (IOException e){\n e.printStackTrace();\n }\n\n }", "public void crearPrimerFichero(){\n File f=new File(getApplicationContext().getFilesDir(),\"datos.json\");\n // si no existe lo creo\n if(!f.exists()) {\n String filename = \"datos.json\";\n String fileContents = \"[]\";\n FileOutputStream outputStream;\n\n try {\n outputStream = openFileOutput(filename, Context.MODE_PRIVATE);\n outputStream.write(fileContents.getBytes());\n outputStream.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n }", "public void guardarEnJSON () {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String s = gson.toJson(this);\n try {\n FileWriter fw = new FileWriter(\"files/graph.json\");\n fw.write(s);\n fw.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void saveJSON(String fileName, Object o){\n // System.err.println(\"accessing disk\");\n Gson gson = new Gson();\n try(FileWriter writer = new FileWriter(fileName)){\n gson.toJson(o, writer);\n //System.err.println(\"\\n Token stored\");\n }catch (IOException e) {\n e.printStackTrace();\n }\n }", "public String loadJSONFromAsset() {\n String json;\n String file = \"assets/words.json\";\n\n try {\n InputStream is = this.getClass().getClassLoader().getResourceAsStream(file);\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "private static void loadJsonFile() throws FileNotFoundException {\n Log.println(Log.INFO, \"FileAccessing\", \"Loading settings file.\");\n StringBuilder stringBuilder = new StringBuilder();\n InputStreamReader inputStreamReader = new InputStreamReader(context.openFileInput(\"settingDetails.json\"), StandardCharsets.UTF_8);\n try (BufferedReader reader = new BufferedReader(inputStreamReader)) {\n String line = reader.readLine();\n while (line != null) {\n stringBuilder.append(line).append('\\n');\n line = reader.readLine();\n }\n } catch (IOException e) {\n Log.println(Log.ERROR, \"FileAccessing\", \"Settings file reading error.\");\n throw new FileNotFoundException();\n }\n if (stringBuilder.toString().equals(\"\")) {\n Log.println(Log.INFO, \"FileAccessing\", \"Settings file does not exist.\");\n throw new FileNotFoundException();\n }\n\n Gson gson = new Gson();\n JsonObject jsonObject = gson.fromJson(stringBuilder.toString(), JsonObject.class);\n if (jsonObject == null) {\n throw new FileNotFoundException();\n }\n JsonArray mappingControls = (JsonArray) jsonObject.get(\"mappingControls\");\n\n TaskDetail.actionToTask.clear();\n for (JsonElement o : mappingControls) {\n JsonObject individualMapping = (JsonObject) o;\n byte combinedAction = individualMapping.get(\"combinedAction\").getAsByte();\n int outerControl = individualMapping.get(\"task\").getAsInt();\n TaskDetail.actionToTask.put(combinedAction, TaskDetail.taskDetails.get(outerControl));\n }\n\n int setting = 0;\n JsonArray generalSettings = (JsonArray) jsonObject.get(\"generalSettings\");\n for (JsonElement o : generalSettings) {\n JsonObject individualSetting = (JsonObject) o;\n int status = individualSetting.get(\"status\").getAsInt();\n SettingDetail.settingDetails.get(setting++).changeSetting(status);\n }\n\n DeviceDetail.deviceDetails.clear();\n JsonArray deviceList = (JsonArray) jsonObject.get(\"devices\");\n for (JsonElement o : deviceList) {\n JsonObject individualDevice = (JsonObject) o;\n String deviceName = individualDevice.get(\"name\").getAsString();\n String deviceMac = individualDevice.get(\"mac\").getAsString();\n DeviceDetail.deviceDetails.add(new DeviceDetail(deviceMac, deviceName));\n }\n\n SensitivitySetting.sensitivitySettings.clear();\n JsonArray sensitivityList = (JsonArray) jsonObject.get(\"sensitivities\");\n for (JsonElement o : sensitivityList) {\n JsonObject individualSensitivity = (JsonObject) o;\n int multiplicativeFactor = individualSensitivity.get(\"factor\").getAsInt();\n int sensitivity = individualSensitivity.get(\"sensitivity\").getAsInt();\n SensitivitySetting.sensitivitySettings.add(new SensitivitySetting(multiplicativeFactor, sensitivity));\n }\n\n int currentDevice = jsonObject.get(\"currentlySelected\").getAsInt();\n DeviceDetail.setIndexSelected(currentDevice);\n\n updateAllSetting(false);\n }", "private static void exportJsonFile(File configFile) {\n Gson gson = new Gson();\n \n // Java object to JSON, and assign to a String\n String jsonInString = gson.toJson(GameConfig.getInstance());\n \n try {\n FileWriter writer = new FileWriter(configFile);\n \n writer.append(jsonInString);\n writer.flush();\n writer.close();\n } catch (IOException e) {\n LogUtils.error(\"exportJsonFile => \",e);\n }\n }", "public void writeToFile (String json) {\n // reset fos to null for checks\n FileOutputStream fos = null;\n try {\n String FILE_NAME = \"ExportedLearningCards.json\";\n fos = openFileOutput(FILE_NAME, MODE_PRIVATE);\n fos.write(json.getBytes());\n Toast.makeText(this, \"Saved to \" + getFilesDir() + \"/\" + FILE_NAME,\n Toast.LENGTH_LONG).show();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (fos != null) {\n try {\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "private static String readJsonFile (String fileName) {\n if (!fileName.endsWith(\".json\")){\n throw new IllegalArgumentException(\"Invalid file name\");\n }\n String jsonStr = \"\";\n try{\n isFileExistOrCreatIt(fileName);\n File jsonFile = new File(\"src//main//resources\"+\"//\"+fileName);\n Reader reader = new InputStreamReader(new FileInputStream(jsonFile),\"utf-8\");\n int ch = 0;\n StringBuffer sb = new StringBuffer();\n while((ch = reader.read())!=-1){\n sb.append((char) ch);\n }\n reader.close();\n jsonStr = sb.toString();\n return jsonStr;\n\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "private void read() {\n\n\t\t\t\tString road=getActivity().getFilesDir().getAbsolutePath()+\"product\"+\".txt\";\n\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(road); \n\t\t\t\t\tFileInputStream fis = new FileInputStream(file); \n\t\t\t\t\tint length = fis.available(); \n\t\t\t\t\tbyte [] buffer = new byte[length]; \n\t\t\t\t\tfis.read(buffer); \n\t\t\t\t\tString res1 = EncodingUtils.getString(buffer, \"UTF-8\"); \n\t\t\t\t\tfis.close(); \n\t\t\t\t\tjson(res1.toString());\n\t\t\t\t} catch (IOException 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}", "public static void initialize() {\r\n\t\tjson = new JSONFile(filePath);\t\r\n\t}", "public JSONObject save();", "private JSONObject getAssetJson(String filename) {\n return new JSONObject(\n resourceHandler.getResourceFileAsString(ResourceHandler.VALORANT_BASE_PATH + \"Data/\" + filename)\n );\n }", "public File saveDrawing() {\n stopDrawing();\n GeoJsonConverter converter = new GeoJsonConverter();\n String string = converter.convertToGeoJson(currentDrawing.getAllLines());\n\n File file = new File(context.getExternalFilesDir(null), \"drawing.geojson\");\n try {\n FileOutputStream outputStream = new FileOutputStream(file);\n outputStream.write(string.getBytes()); //write the string to the file\n outputStream.close(); //close the stream\n //Log.d(TAG, string);\n } catch (FileNotFoundException e) {\n Log.e(TAG, \"FileNotFoundException\");\n } catch (IOException e) {\n Log.e(TAG, \"IOException\");\n\n }\n\n return file;\n }", "private String loadJSONFromAsset() {\n String json = null;\n try {\n //AssetManager assetManager = getAssets();\n InputStream is = getAssets().open(\"sa.json\");\n //InputStream is = getResources().openRawResource(\"sa.json\");\n int size = is.available();\n\n byte[] buffer = new byte[size];\n\n is.read(buffer);\n\n is.close();\n\n json = new String(buffer, \"UTF-8\");\n Log.i(\"Json\",json);\n\n\n } catch (Exception ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n\n }", "public String loadJSONFromAsset() {\n String json;\n try {\n InputStream is = getAssets().open(\"track_v0649.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "private String loadJSONFromAsset() {\n String json = null;\n try {\n InputStream is = getAssets().open(\"playerData.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "private String loadJSONFromAsset(){\n String json = null;\n AssetManager assetManager = getAssets();\n try{\n InputStream IS = assetManager.open(\"datosFases.json\");\n int size = IS.available();\n byte[] buffer = new byte[size];\n IS.read(buffer);\n IS.close();\n json = new String(buffer,\"UTF-8\");\n\n } catch (IOException ex){\n ex.printStackTrace();\n return null;\n }\n\n return json;\n }", "public String parseJSON(){\r\n String json = null;\r\n try{\r\n InputStream istream = context.getAssets().open(\"restaurantopeninghours.json\");\r\n int size = istream.available();\r\n byte[] buffer = new byte[size];\r\n istream.read(buffer);\r\n istream.close();\r\n json = new String(buffer, \"UTF-8\");\r\n }catch (IOException ex){\r\n ex.printStackTrace();\r\n return null;\r\n }\r\n return json;\r\n }", "public String toJSon() {\n File jsonFile = new File(context.getFilesDir(), \"data.json\");\n String previousJson = null;\n if (jsonFile.exists()) {\n previousJson = readFromFile(jsonFile);\n } else {\n previousJson = \"{}\";\n }\n\n // create new \"complex\" object\n JSONObject mO = null;\n try {\n mO = new JSONObject(previousJson);\n\n JSONArray arr;\n if (!mO.has(getIntent().getStringExtra(\"date\"))) {\n arr = new JSONArray();\n }\n else{\n arr = mO.getJSONArray(getIntent().getStringExtra(\"date\"));\n }\n JSONObject jo = new JSONObject();\n jo.put(\"title\", titleField.getText().toString());\n jo.put(\"minute\", minute);\n jo.put(\"hour\", hour);\n jo.put(\"description\", descriptionField.getText().toString());\n jo.put(\"location\", locationField.getText().toString());\n\n arr.put(jo);\n\n mO.put(getIntent().getStringExtra(\"date\"), arr);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n // generate string from the object\n String jsonString = null;\n try {\n jsonString = mO.toString(4);\n return jsonString;\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n\n }", "private JSONObject readJSONFile(Path path) throws ExtensionManagementException {\n\n if (Files.exists(path) && Files.isRegularFile(path)) {\n try {\n String jsonString = FileUtils.readFileToString(path.toFile(), UTF8);\n return new JSONObject(jsonString);\n } catch (JSONException e) {\n throw new ExtensionManagementException(\"Error while parsing JSON file: \" + path, e);\n } catch (IOException e) {\n throw new ExtensionManagementException(\"Error while reading JSON file: \" + path, e);\n }\n } else {\n throw new ExtensionManagementException(\"JSON file not found: \" + path);\n }\n }", "public String loadJSONFromAsset() {\n String json = null;\n try {\n InputStream is = getAssets().open(\"election-county-2012.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "public void saveData() {\n try {\n JsonWriter jw = new JsonWriter(openFileOutput(DATA_FILE, Context.MODE_PRIVATE));\n jw.write(user);\n jw.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }", "private static JsonObject readJSON(String path) {\n\n\t\tString fileContents = \"\";\n\t\tBufferedReader reader = null;\n\n\t\ttry {\n\t\t\treader = new BufferedReader(new FileReader(path));\n\t\t} catch (FileNotFoundException e) {\n\t\t\tfail(ErrorMessage.inputFileNotFoundError);\n\t\t}\n\n\t\tString line;\n\n\t\ttry {\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tfileContents += line;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tfail(ErrorMessage.readFileError);\n\t\t}\n\n\t\ttry {\n\t\t\treader.close();\n\t\t} catch (IOException e) {\n\t\t\tfail(ErrorMessage.closeFileError);\n\t\t}\n\n\t\tJsonObject jsonLicense = Json.createReader(new StringReader(fileContents)).readObject();\n\n\t\treturn jsonLicense;\n\t}", "private void save(){\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor editor = preferences.edit();\n Gson gson = new Gson();\n String json = gson.toJson(downloadedBooks);\n editor.putString( LISTS_DOWNLOADED, json);\n json = gson.toJson(progress);\n editor.putString( LISTS_PROGRESS, json);\n editor.apply();\n }", "public void retrieveTodo() {\r\n File file = new File(\"C:\\\\Users\\\\Dalia\\\\Desktop\\\\CPSC 210\\\\Project\\\\project_b2h3b\\\\data\");\r\n JFileChooser chooser = new JFileChooser(file);\r\n int userSelection = chooser.showOpenDialog(null);\r\n File f = chooser.getSelectedFile();\r\n if (userSelection == JFileChooser.APPROVE_OPTION) {\r\n fileName = f.getAbsolutePath();\r\n reader = new MyTodoJsonReader(fileName);\r\n try {\r\n myTodo = reader.readMyToDoList();\r\n todoListGui();\r\n } catch (IOException ioException) {\r\n JOptionPane.showMessageDialog(null, \"File doesn't exist!\");\r\n }\r\n }\r\n }", "public static LinkedTreeMap<String, Object> importJsonData( String filePath, boolean assetFile )\n {\n FileReader reader = null;\n LinkedTreeMap<String, Object> fileData = null;\n\n if( assetFile )\n {\n AssetManager mgr = WeatherLionApplication.getAppContext().getAssets();\n String filename;\n\n try\n {\n filename = WeatherLionApplication.OPEN_SOURCE_LICENCE;\n InputStream in = mgr.open( filename, AssetManager.ACCESS_BUFFER );\n Writer writer = new StringWriter();\n char[] buffer = new char[ 1024 ];\n\n try\n {\n Reader assetReader = new BufferedReader( new InputStreamReader( in, StandardCharsets.UTF_8 ) );\n int n;\n\n while ( ( n = assetReader.read( buffer ) ) != -1 )\n {\n writer.write( buffer, 0, n) ;\n }// end of while loop\n }// end of try block\n catch ( IOException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::importJsonData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n\n Gson gson = new Gson();\n\n // convert the file JSON into a list of objects\n fileData = gson.fromJson( writer.toString(),\n new TypeToken<LinkedTreeMap<String, Object>>(){}.getType() );\n\n in.close();\n }// end of try block\n catch ( IOException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::importJsonData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n }// end of if block\n else\n {\n try\n {\n File file = new File( filePath );\n\n // if the is a file present then it will contain a list with at least on object\n if( file.exists() )\n {\n reader = new FileReader( file );\n Gson gson = new Gson();\n\n // convert the file JSON into a list of objects\n fileData = gson.fromJson( reader,\n new TypeToken<LinkedTreeMap<String, Object>>(){}.getType() );\n }// end of if block\n\n }// end of try block\n catch ( FileNotFoundException | JsonSyntaxException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::importJsonData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n finally\n {\n // close the file reader object\n if( reader != null )\n {\n try\n {\n reader.close();\n } // end of try block\n catch (IOException e)\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE,\n e.getMessage(),TAG + \"::importJsonData [line: \"\n + UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n }// end of if block\n }// end of finally block\n }// end of else block\n\n return fileData;\n }", "public String loadJSONFromAsset(Context context) {\n json = null;\n try {\n InputStream is = getApplicationContext().getAssets().open(\"techdrop.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "public JSONObject getJSONFromFile() throws IOException\n\t{\n\t\tInputStream is = context.getResources().openRawResource(R.raw.schedule);\n\t\tWriter writer = new StringWriter();\n\t\tchar[] buffer = new char[1024];\n\t\ttry {\n\t\t Reader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n\t\t int n;\n\t\t while ((n = reader.read(buffer)) != -1) {\n\t\t writer.write(buffer, 0, n);\n\t\t }\n\t\t} finally {\n\t\t is.close();\n\t\t}\n\n\t\tString jsonString = writer.toString();\n\t\tJSONObject jObj=null;\n\t\t\n\t\t// try parse the string to a JSON object\n\t\ttry {\n\t\t\tjObj = new JSONObject(jsonString);\n\t\t} catch (JSONException e) {\n\t\t\tLog.e(\"JSON Parser\", \"Error parsing data \" + e.toString());\n\t\t}\n\t\t\t\n\t\treturn jObj;\n\t\t// return JSON String\n\n\t}", "private ArrayList<JSONObject> readJSONFromMemory(String myList, String saveFile, ArrayList<JSONObject> arr) {\n SharedPreferences prefs = getSharedPreferences(saveFile, Context.MODE_PRIVATE);\n String savedJSON = prefs.getString(myList, null);\n System.out.println(\"reading these items \" + savedJSON + \"myList = \" + myList);\n Gson gson = new Gson();\n Type type = new TypeToken<ArrayList<JSONObject>>() {}.getType();\n arr = gson.fromJson(savedJSON, type);\n\n\n if(arr == null) {\n arr = new ArrayList<JSONObject>();\n System.out.println(\"readJSON arr = \" + arr.toString());\n }\n return arr;\n }", "public static BotData loadData()\n\t{\n\t\tBotData data = null;\n\t\ttry\n\t\t{\n\t\t\tFileInputStream fis = new FileInputStream(SAVE_DATA_FILENAME);\n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\t\t\tObject obj = ois.readObject();\n\t\t\tString json = (String)obj;\n\t\t\tdata = new Gson().fromJson(json, BotData.class);\n\t\t\tois.close();\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\t//error\n\t\t}\n\t\tif ( data == null )\n\t\t\tdata = new BotData();\n\t\treturn data;\n\t}", "private static void saveJsonFile() {\n Log.println(Log.INFO, \"FileAccessing\", \"Writing settings file.\");\n JsonObject toSave = new JsonObject();\n JsonArray mappingControls = new JsonArray();\n for (int i = 0; i < TaskDetail.actionToTask.size(); i++) {\n JsonObject individualMapping = new JsonObject();\n TaskDetail detail = TaskDetail.actionToTask.valueAt(i);\n byte combinedAction = (byte) TaskDetail.actionToTask.keyAt(i);\n assert detail != null;\n int outerControl = detail.getTask();\n individualMapping.addProperty(\"combinedAction\", combinedAction);\n individualMapping.addProperty(\"task\", outerControl);\n mappingControls.add(individualMapping);\n }\n toSave.add(\"mappingControls\", mappingControls);\n\n JsonArray generalSettings = new JsonArray();\n for (SettingDetail setting : SettingDetail.settingDetails) {\n JsonObject individualSetting = new JsonObject();\n int status = setting.getCurrentIdx();\n individualSetting.addProperty(\"status\", status);\n generalSettings.add(individualSetting);\n }\n toSave.add(\"generalSettings\", generalSettings);\n\n JsonArray deviceList = new JsonArray();\n for (DeviceDetail device : DeviceDetail.deviceDetails) {\n JsonObject individualDevice = new JsonObject();\n individualDevice.addProperty(\"name\", device.deviceName);\n individualDevice.addProperty(\"mac\", device.macAddress);\n deviceList.add(individualDevice);\n }\n toSave.add(\"devices\", deviceList);\n\n JsonArray sensitivityList = new JsonArray();\n for (SensitivitySetting sensitivity : SensitivitySetting.sensitivitySettings) {\n JsonObject individualSensitivity = new JsonObject();\n individualSensitivity.addProperty(\"factor\", sensitivity.multiplicativeFactor);\n individualSensitivity.addProperty(\"sensitivity\", sensitivity.sensitivity);\n sensitivityList.add(individualSensitivity);\n }\n toSave.add(\"sensitivities\", sensitivityList);\n\n toSave.addProperty(\"currentlySelected\", DeviceDetail.getIndexSelected());\n\n try {\n FileOutputStream outputStreamWriter = context.openFileOutput(\"settingDetails.json\", Context.MODE_PRIVATE);\n outputStreamWriter.write(toSave.toString().getBytes());\n outputStreamWriter.close();\n } catch (IOException e) {\n Log.println(Log.ERROR, \"FileAccessing\", \"Settings file writing error.\");\n }\n }", "void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new FileWriter(target));\n\t\t\twriter.setIndent(\" \");\n\t\t\twriter.beginArray();\n\t\t\tfor (Scoreboard scoreboard : scoreboards.values()) {\n\t\t\t\twriteScoreboard(writer, scoreboard);\n\t\t\t}\n\t\t\twriter.endArray();\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void retrieveData(){\n\t\tloaderImage.loadingStart();\n\t\tJsonClient js = new JsonClient();\n\t\tjs.retrieveData(JSON_URL, this);\n\t}", "public static JSONArray parsedFile() {\n JSONParser parser = new JSONParser();\n try {\n String filePath = new File(\"\").getAbsolutePath();\n if (!filePath.substring(filePath.length()-3, filePath.length()).equals(\"src\")) {\n filePath = filePath.concat(\"/src\");\n }\n filePath = filePath.concat(\"/cardData/data.json\");\n FileReader file = new FileReader(filePath);\n Object parsedFile = parser.parse(file);\n return (JSONArray) parsedFile;\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(0);\n } catch (ParseException p) {\n System.out.println(\"Caught a Parsing Exception\" + p.getMessage());\n p.printStackTrace();\n System.exit(0);\n }\n return null;\n }", "public void escribirFichero(String textoenjson){\n {\n OutputStreamWriter escritor=null;\n try\n {\n escritor=new OutputStreamWriter(openFileOutput(\"datos.json\", Context.MODE_PRIVATE));\n escritor.write(textoenjson);\n }\n catch (Exception ex)\n {\n Log.e(\"ivan\", \"Error al escribir fichero a memoria interna\");\n }\n finally\n {\n try {\n if(escritor!=null)\n escritor.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n\n }", "public void exportAsJsonFile(String path) throws IOException {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String json = gson.toJson(this);\n\n FileWriter writer = new FileWriter(path);\n writer.write(json);\n writer.close();\n }", "private void loadJSON() throws FileNotFoundException\n\t{\n\n\t\tGsonBuilder builder= new GsonBuilder();\n\t\tGson gson = builder.create();\n\t\t\t\t\n\t\t//get a list of folders in the data directory\n\t\t\n\t\tFile[] directories = new File(\"data\").listFiles();\n\n\t\t//Loop through folders in data directory\n\t\tfor(File folder : directories)\n\t\t\t{\n\t\t\t\t//get a list of files inside the folder\n\t\t\t\tFile[] jsonItems = new File(folder.toString()).listFiles();\n\t\t\t\t\n\t\t\t\t//Loop through files inside the folder \n\t\t\t\tfor(File file : jsonItems)\n\t\t\t\t{\n\t\t\t\t\t//Store in directory map... substring to remove the \"data/\" portion... placed by filename to foldername\n\t\t\t\t\tString dir = file.toString().substring(5);\n\t\t\t\t\t\n\t\t\t\t\t//Generate player data from gson\n\t\t\t\t\tJsonReader reader = new JsonReader(new FileReader(file));\n\t\t\t\t\tPlayer player = gson.fromJson(reader, Player.class);\n\t\t\t\t\t\n\t\t\t\t\t//Store it in the map tied to it's directory\n\t\t\t\t\tplayerData.put(dir, player);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Test\n\tpublic void readJSONFromFile() {\n\t\t\n\t\tJsonPath jsonFile = new JsonPath(new File (\"C:\\\\Users\\\\cmlzd\\\\Desktop\\\\employees.json\"));\n\t\t\n\t\tSystem.out.println(jsonFile.getString(\"items.email\"));\n\t\t\n\t\t\n\t}", "private void saveInFile() {\n try {\n FileOutputStream fOut = openFileOutput(FILENAME,\n Context.MODE_PRIVATE);\n\n OutputStreamWriter writer = new OutputStreamWriter(fOut);\n Gson gson = new Gson();\n gson.toJson(counters, writer);\n writer.flush();\n\n fOut.close();\n\n } catch (FileNotFoundException e) {\n throw new RuntimeException();\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }", "public static String getFileType() {return \"json\";}", "public void restore() {\n\t\ttry {\n\t\t\tFile latest = null;\n\t\t\t// restore the last file back into memory\n\t\t\tList<File> files = FindFile.find(getName(), \"shouts.*.js\", false, false);\n\n\t\t\tfor (int i = 0; i < files.size(); ++i) {\n\t\t\t\tFile f = files.get(i);\n\t\t\t\tif (latest == null) {\n\t\t\t\t\tlatest = f;\n\t\t\t\t}\n\t\t\t\tif (f.lastModified() > latest.lastModified()) {\n\t\t\t\t\tlatest = f;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (latest == null) {\n\t\t\t\tlog.info(\"no files found to restore\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tinfo(\"loading latest file %s\", latest);\n\n\t\t\tString json = String.format(\"[%s]\", FileIO.fileToString(latest.getAbsoluteFile()));\n\n\t\t\tShout[] saved = Encoder.fromJson(json, Shout[].class);\n\n\t\t\tfor (int i = 0; i < saved.length; ++i) {\n\t\t\t\tshouts.add(saved[i]);\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tLogging.logError(e);\n\t\t}\n\t}", "public static Books readJSON(){\n Gson gson = new GsonBuilder().create();\n Books books = new Books();\n try {\n books = gson.fromJson(new JsonReader(new FileReader(\"books.json\")), Books.class);\n } catch (IOException e){\n e.printStackTrace();\n }\n return books;\n }", "File getSaveFile();", "public String generateJsonFileFromParsedTextFileInApp() {\n\t\treturn generateJsonFileFromParsedTextFile(TEXTSAMPLEFILE);\n\t}", "void loadFromFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile source = new File(directory, FILE_NAME);\n\t\t\tMap<String, Scoreboard> scoreboards = new HashMap<String, Scoreboard>();\n\t\t\tif (source.exists()) {\n\t\t\t\tJsonReader reader = new JsonReader(new FileReader(source));\n\t\t\t\treader.beginArray();\n\t\t\t\twhile (reader.hasNext()) {\n\t\t\t\t\tScoreboard scoreboard = readScoreboard(reader);\n\t\t\t\t\tscoreboards.put(scoreboard.getName(), scoreboard);\n\t\t\t\t}\n\t\t\t\treader.endArray();\n\t\t\t\treader.close();\n\t\t\t} else {\n\t\t\t\tsource.createNewFile();\n\t\t\t}\n\t\t\tthis.scoreboards = scoreboards;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "String getJson();", "String getJson();", "String getJson();", "String savedFile();", "public void saveGame(String fileName){\n Gson gson = new Gson();\n String userJson = gson.toJson(player);\n\n try(Writer w = new BufferedWriter(new OutputStreamWriter( new FileOutputStream(fileName), \"UTF-8\"))) {\n w.write(userJson);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public Object loadFromJson(Context context) {\n Gson gson = new Gson();\n String json = FileManager.getInstance().loadFromFile(getFileName(), context);\n if(json.equals(\"\")) {\n return null;\n }\n\n return gson.fromJson(json, MatchStorage.class);\n\n }", "public File getDataSaveFile() {\n return dataSaveFile;\n }", "String getJSON();", "private void save() {\n if (mCacheFile.exists()) {\n mCacheFile.delete();\n }\n\n try (JsonWriter writer = new JsonWriter(new BufferedWriter(new FileWriter(mCacheFile)))) {\n writer.beginObject();\n writer.name(PRINTER_LIST_NAMES.get(0));\n writer.beginArray();\n for (DiscoveredPrinter printer : mSavedPrinters) {\n printer.write(writer);\n }\n writer.endArray();\n writer.endObject();\n } catch (NullPointerException | IOException e) {\n Log.w(TAG, \"Error while storing to \" + mCacheFile, e);\n }\n }", "private File downloadJSON(String urlString) throws IOException {\r\n\t\tString filename = \"\";\r\n\t\t\r\n\t\t//We choose to name the files as word_opensearch and word_wikipage, referring to the two File objects representing the JSONs we downloaded.\r\n\t\tif(urlString.contains(\"search\")) {\r\n\t\t\tfilename = \"JSON/\" + this.word + \"_opensearch.json\";\r\n\t\t} else {\r\n\t\t\tfilename = \"JSON/\" + this.word + \"_wikipage.json\";\r\n\t\t}\r\n\t\t\r\n\t\t//Constructing the File toReturn with the appropriate filename as checked above.\r\n\t\tFile toReturn = new File(filename);\r\n\t\t\r\n\t\t//This line deals with errors you recieve when dealing with how to fill whitespace when represented as a URL\r\n\t\tString messageText = URLEncoder.encode(this.word, \"UTF-8\");\r\n\t\t\r\n\t\t//Constructing the URL object from our long URL and converted text in message data\r\n\t\tURL website = new URL(urlString + messageText);\r\n\t\t\r\n\t\t//Write the bytes recieved from wikipedia's response to us opening a datastream\r\n\t\tReadableByteChannel rbc = Channels.newChannel(website.openStream());\r\n\t\tFileOutputStream fos;\r\n\t\ttry {\r\n\t\t\tfos = new FileOutputStream(toReturn);\r\n\t\t\tfos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);\r\n\t\t\tfos.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}\r\n\t\t\r\n\t\treturn toReturn;\r\n\t}", "@Override\n public String toString() {return \"Json-File Reader\";}", "private void saveWorld() {\n try {\n jsonWriter.open();\n jsonWriter.write(world);\n jsonWriter.close();\n System.out.println(\"Saved world to \" + JSON_STORE);\n } catch (FileNotFoundException e) {\n System.out.println(\"Unable to write to file: \" + JSON_STORE);\n }\n }", "public static String readJsonObject(String filename) {\r\n\t\tBufferedReader br = null;\r\n\t\tFileReader fr = null;\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tString sCurrentLine;\r\n\t\ttry {\r\n\r\n\t\t\tfr = new FileReader(filename);\r\n\t\t\tbr = new BufferedReader(fr);\r\n\t\t\t\r\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\r\n\t\t\t\tsb.append(sCurrentLine);\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (br != null)\r\n\t\t\t\t\tbr.close();\r\n\t\t\t\tif (fr != null)\r\n\t\t\t\t\tfr.close();\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "public static Resource loadFromFile() {\n File file = new File(saveFilePath);\n // create a new file if it doesn't exist\n if (!file.exists()) {\n // save an empty resource object\n Resource resource = new Resource();\n resource.saveToFile();\n }\n\n Resource resource = null;\n try {\n resource = (Resource) loadObjFromFile(saveFilePath);\n } catch (InvalidClassException e) {\n // if resource file is outdated or corrupted reset file\n resource = new Resource();\n resource.saveToFile();\n staticLog(\"resource file was corrupted, cleared with new one\");\n// e.printStackTrace();\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n resource.activeUsers = new HashMap<>();\n resource.activeProjects = new HashMap<>();\n return resource;\n }", "public generalPersistence(File parent, String fileName) {\n f = new File(parent, fileName);\n if(!f.exists()) initPersistance();\n else{\n String s = null;\n try {\n s = getStringFromFile();\n JSONTokener jsonTokener = new JSONTokener(s);\n myJSON = new JSONObject(jsonTokener);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public void saveArchive() throws FileNotFoundException {\n jsonWriter.open();\n Archive archive = new Archive(cameraCollection, filmCollection);\n jsonWriter.write(archive);\n jsonWriter.close();\n }", "public void loadJson(){\n new DownloadJsonTask().execute(URL3);\n// new DownloadJsonTask().execute(URL2);\n }", "private static String getSourceFile() {\n\t\tFileChooser fileChooser = new FileChooser(System.getProperty(\"user.home\"),\n\t\t\t\t\"Chose json file containing satellite data!\", \"json\");\n\t\tFile file = fileChooser.getFile();\n\t\tif (file == null) {\n\t\t\tSystem.exit(-42);\n\t\t}\n\t\treturn file.getAbsolutePath();\n\t}", "public static String getFilenameExtension() {return \"json\";}", "private void readFromJSON(String filename) {\n JSONParser parser = new JSONParser();\n\n try\n {\n Object obj = parser.parse(new FileReader(filename));\n JSONObject jsonObject = (JSONObject) obj;\n Menu drinks = getMenu(jsonObject, \"Drink\");\n Menu types = getMenu(jsonObject, \"Type\");\n Menu toppings = getMenu(jsonObject, \"Toppings\");\n Menu sizes = getMenu(jsonObject, \"Size\");\n menuMap.put(\"Drink\", drinks);\n menuMap.put(\"Size\", sizes);\n menuMap.put(\"Toppings\", toppings);\n menuMap.put(\"Type\", types);\n\n } catch (FileNotFoundException e) {\n System.out.println(\"Not found menu.json, exit now.\");\n System.exit(1);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n }", "public static String loadJSONFromAsset(Context context,String filePath) {\n String json = null;\n try {\n InputStream is = context.getAssets().open(filePath);\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, ENCODING);\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "public String leerArchivoJSON() {\n String contenido = \"\";\n FileReader entradaBytes;\n try {\n entradaBytes = new FileReader(new File(ruta));\n BufferedReader lector = new BufferedReader(entradaBytes);\n String linea;\n try {\n while ((linea = lector.readLine()) != null) {\n contenido += linea;\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (entradaBytes != null) {\n entradaBytes.close();\n }\n if (lector != null) {\n lector.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(GenerarIsla.class.getName()).log(Level.SEVERE, null, ex);\n }\n return contenido;\n }", "private String readJsonFile(InputStream inputStream) {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\n byte bufferByte[] = new byte[1024];\n int length;\n try {\n while ((length = inputStream.read(bufferByte)) != -1) {\n outputStream.write(bufferByte, 0, length);\n }\n outputStream.close();\n inputStream.close();\n } catch (IOException e) {\n\n }\n return outputStream.toString();\n }", "private void saveInFile() {\n\t\tthis.deleteFile();\n\t\tfor (CounterModel obj : counterListModel.getCounterList()) {\n\t\t\ttry {\n\t\t\t\tGson gson = new Gson();\n\t\t\t\tif (obj.getCounterName().equals(counterModel.getCounterName())) {\n\t\t\t\t\tobj = counterModel;\n\t\t\t\t}\n\t\t\t\tString json = gson.toJson(obj) +'\\n';\n\t\t\t\tFileOutputStream fos = openFileOutput(FILENAME,\n\t\t\t\t\t\tContext.MODE_APPEND);\n\t\t\t\tfos.write(json.getBytes());\n\t\t\t\tfos.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\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}", "public static JsonObject fileToJson(File jsonFile) {\n Gson gson = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create();\n JsonObject jsonObject = null;\n\n try {\n Reader reader = new FileReader(jsonFile);\n jsonObject = gson.fromJson(reader, JsonObject.class);\n } catch (FileNotFoundException e) {\n //log.error(\"FileNotFound Exception occurred when converting JSON file to JSON Object\", e); //todo: FileNotFound exception occured. error message?\n e.printStackTrace();\n }\n\n return jsonObject;\n }", "public JSONArray readFromJSON(){\n\n JSONArray jsonArray=null;\n\n try {\n InputStream inputStream =context.getResources().getAssets().open(FILE_NAME);\n int size = inputStream.available();\n byte[] data = new byte[size];\n inputStream.read(data);\n inputStream.close();\n String json = new String(data, \"UTF-8\");\n jsonArray = new JSONArray(json);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return jsonArray;\n }", "public Integer loadJSONFile()\n {\n JSONParser parser = new JSONParser();\n try{\n\n Object obj = parser.parse(new FileReader(\"/Users/rnuka/Desktop/sample.json\"));\n JSONObject jsonObj = (JSONObject)obj;\n\n Long age = (Long)jsonObj.get(\"age\");\n System.out.println(\"age:\"+age);\n\n String name = (String)jsonObj.get(\"name\");\n System.out.println(\"name:\" + name);\n\n JSONArray address = (JSONArray)jsonObj.get(\"address\");\n\n for(Object str : address){\n System.out.println(str);\n }\n\n\n\n }catch(Exception e){\n e.printStackTrace();\n }\n return 1;\n }", "private static String getFilesContent() {\n String content = \"\";\n try {\n //cameras.json\n AssetManager am = MarketApplication.getMarketApplication().getAssets();\n InputStream stream = am.open(CAMERAS_FILE_NAME);\n int size = stream.available();\n byte[] buffer = new byte[size];\n stream.read(buffer);\n mJsonCameras = new String(buffer);\n\n //videogames.json\n stream = am.open(VIDEO_GAMES_FILE_NAME);\n size = stream.available();\n buffer = new byte[size];\n stream.read(buffer);\n mJsonVideogames = new String(buffer);\n\n //clothes.json\n stream = am.open(CLOTHES_FILE_NAME);\n size = stream.available();\n buffer = new byte[size];\n stream.read(buffer);\n stream.close();\n mJsonClothesProducts = new String(buffer);\n\n\n } catch (IOException e) {\n Log.e(TAG, \"Couldn't read the file\");\n }\n return content;\n }", "private void saveJSON(String myList, String saveFile, ArrayList<JSONObject> arr) {\n SharedPreferences sharedPreferences = getSharedPreferences(saveFile, MODE_PRIVATE);\n SharedPreferences.Editor prefEditor = sharedPreferences.edit();\n Gson gson = new Gson();\n String typeList = gson.toJson(arr);\n prefEditor.putString( myList, typeList );\n System.out.println(\"saveJSON myList = \" + myList);\n prefEditor.apply();\n }", "public JSONObject LoadJson(String filename) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tnew FileInputStream(filename), \"UTF-8\"));\n\t\t\tStringBuffer buffer = new StringBuffer(1024);\n\t\t\tString line;\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tbuffer.append(line);\n\t\t\t}\n\t\t\treader.close();\n\n\t\t\treturn new JSONObject(buffer.toString());\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.format(\"[Error]Failed to open file %s!\", filename);\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (JSONException e) {\n\t\t\tSystem.err.format(\"[Error]Failed to parse json file %s!\", filename);\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public void saveTodo() {\r\n File file = new File(\"C:\\\\Users\\\\Dalia\\\\Desktop\\\\CPSC 210\\\\Project\\\\project_b2h3b\\\\data\");\r\n JFileChooser chooser = new JFileChooser();\r\n chooser.setDialogTitle(\"Specify a file to save\");\r\n chooser.setCurrentDirectory(file);\r\n int userSelection = chooser.showSaveDialog(null);\r\n if (userSelection == JFileChooser.APPROVE_OPTION) {\r\n File f = chooser.getSelectedFile();\r\n System.out.println(\"Save as file: \" + f.getAbsolutePath());\r\n String tempFileName = f.getAbsolutePath();\r\n writer = new MyTodoJsonWriter(tempFileName);\r\n try {\r\n writer.open();\r\n writer.write(myTodo);\r\n fileName = tempFileName;\r\n playSound(\"c1.wav\");\r\n } catch (IOException ioException) {\r\n JOptionPane.showMessageDialog(null, \"Cannot save todolist!\");\r\n } finally {\r\n writer.close();\r\n JOptionPane.showMessageDialog(null, \"Save successful!\");\r\n }\r\n todoListGui();\r\n }\r\n }", "private JSONObject importFlowJSON (Path pathToFolder) {\n // Create a JSONParser to parse the content of the file\n JSONParser parser = new JSONParser();\n\n // The JSONObject instance that will be returned\n JSONObject flow;\n\n try{\n // Read and parse the json file\n flow = (JSONObject) parser.parse(new FileReader(pathToFolder.toString() + \"/\" + FLOW_FILE_NAME));\n // If the file has been found and parsed we return it as a JSONObject\n return flow;\n } catch (ParseException | IOException e) {\n // If the file hasn't been found we return null\n e.printStackTrace();\n return null;\n }\n }", "public static void readFile(String filename) {\n JSONParser jsonParser = new JSONParser();\n try (Reader reader = new FileReader(filename)) {\n JSONObject jo = (JSONObject) jsonParser.parse(reader);\n\n SHORT_PERIOD = (int) (long) jo.get(\"shortPeriod\");\n LONG_PERIOD = (int) (long) jo.get(\"longPeriod\");\n AVG_AMOUNT_PERIOD = (int) (long) jo.get(\"avgAmountPeriod\");\n SESSION_INTERVAL = (int) (long) jo.get(\"sessionInterval\");\n\n\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n }", "public String getJSONString(String fileName){\n\n String line = \"\";\n String jsonString = \"\";\n\n try {\n FileReader fileReader = new FileReader(fileName);\n\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n while ((line = bufferedReader.readLine()) != null) {\n jsonString+=line+'\\n';\n }\n bufferedReader.close();\n }\n catch (FileNotFoundException ex){\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n }\n catch (IOException ex) {\n System.out.println( \"Error reading file '\" + fileName +\"'\");\n }\n\n return jsonString;\n }", "@SuppressWarnings(\"unused\")\n public void SaveJsonCollectionsToFiles(){\n try {\n String formattedDate = FileNameUtils.DATE_FORMAT.format(new Date());\n ObjectWriter writer = mapper.writer(new DefaultPrettyPrinter());\n writer.writeValue(new File(FileNameUtils.GetValuesFileName(formattedDate)), jsonObjects);\n }\n catch(IOException exp){\n System.err.println(\"Error while creating JSON file. Reason: \" + exp.getMessage());\n }\n }", "public String readJsonFile(String fileName)\n {\n FileInputStream fileInputStream = null;\n String text;\n StringBuilder stringBuilder = new StringBuilder();\n\n try\n {\n fileInputStream = mainContext.openFileInput(fileName);\n InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n\n while((text = bufferedReader.readLine()) != null)\n {\n stringBuilder.append(text).append(\"\\n\");\n }\n }\n catch (IOException e)\n {\n System.out.println(e.getMessage());\n }\n\n return stringBuilder.toString();\n }", "public TiDeployData()\n\t{\n\t\tTiApplication app = TiApplication.getInstance();\n\t\tFile extStorage = Environment.getExternalStorageDirectory();\n\t\tFile deployJson = new File(new File(extStorage, app.getPackageName()), \"deploy.json\");\n\t\tif (deployJson.exists()) {\n\t\t\treadDeployData(deployJson);\n\t\t}\n\t}", "public void commit() {\n\t\tif (commit) {\n\t\t\t// Récupérer le path du JSON\n\t\t\tSystem.out.println(ClassLoader.getSystemResource(jsonFile));\n\t\t\tURL url = ClassLoader.getSystemResource(jsonFile);\n\t\t\t// On ouvre un flux d'écriture vers le fichier JSON\n\t\t\ttry (OutputStream ops = new FileOutputStream(Paths.get(url.toURI()).toFile())) {\n\t\t\t\t// Ecriture du fichier JSON avec formatage\n\t\t\t\t// (WithDefaultPrettyPrinter)\n\t\t\t\tobjectMapper.writerWithDefaultPrettyPrinter().writeValue(ops, database);\n\t\t\t\tlogger.info(\"OK - fichier JSON mis à jour \" + jsonFile);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tlogger.info(\"KO - FILE_NOT_FOUND\" + jsonFile);\n\t\t\t\tthrow new DataRepositoryException(\"KO - FILE_NOT_FOUND\", e);\n\t\t\t} catch (IOException e) {\n\t\t\t\tlogger.info(\"KO - I/O ERROR\" + jsonFile);\n\t\t\t\tthrow new DataRepositoryException(\"KO - I/O ERROR\", e);\n\t\t\t} catch (URISyntaxException 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}", "@Override\n public void onClick(View v){\n course newCourse = new course(etName.getText().toString(), Integer.parseInt(etBlock.getText().toString()),\n etTeacher.getText().toString(), etRoom.getText().toString());\n try {\n\n JSONIO JSONIO = new JSONIO(openFileInput(\"courseData.txt\"));\n JSONIO.addCourse(newCourse);\n deleteFile(\"courseData.txt\");\n JSONIO.writeJSON(new OutputStreamWriter(openFileOutput(\"courseData.txt\", MODE_APPEND)));\n\n } catch(FileNotFoundException e){\n Log.i(\"courseData.txt\", \"not found\");\n try{\n JSONIO JSONIO = new JSONIO(null);\n JSONIO.addCourse(newCourse);\n deleteFile(\"courseData.txt\");\n JSONIO.writeJSON(new OutputStreamWriter(openFileOutput(\"courseData.txt\", MODE_APPEND)));\n } catch(FileNotFoundException f){}\n } catch(Exception e){\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n\n onBackPressed();\n }", "public static boolean saveSharedPreferencesToJsonFile(File dst, Context context) {\n\t\t\n\t\tSharedPreferences pref = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tSharedPreferences adminPreferences = context.getSharedPreferences(\n\t\t\t\tAdminPreferencesActivity.ADMIN_PREFERENCES, 0);\n\n\t\tGson gson = new Gson();\n\t\tString jsonPrefs = \"{\\n\\\"general_preferences\\\": \" + gson.toJson(pref.getAll()) + \",\\n\" \n\t\t\t\t\t\t+ \"\\\"admin_preferences\\\": \" + gson.toJson(adminPreferences.getAll())\n\t\t\t\t\t\t+ \"}\";\n\t\tLog.d(\"AdminPreferencesActivity\", jsonPrefs);\n\t\t\n\t\treturn FileUtils.writeStringToFile(dst, jsonPrefs);\n\t}", "private void readSettingsFromJson(String jsonFilePath) throws FileNotFoundException {\n File jsonFile = new File(jsonFilePath);\n GsonBuilder builder = new GsonBuilder().setPrettyPrinting();\n Gson gson = builder.create();\n if (jsonFile.exists()) {\n // try to read the settings from provided file\n FileReader fileReader = new FileReader(jsonFile);\n serverConfig = gson.fromJson(fileReader, ServerConfig.class);\n log.info(\"reading config from file {}\", jsonFile.getAbsoluteFile());\n } else {\n // file was not found, fall back to default config\n log.warn(\"settings file {} not found, falling back to default config\", jsonFile.getAbsoluteFile());\n serverConfig = ServerConfig.getDefaultConfig();\n String jsonStr = gson.toJson(serverConfig);\n\n try (PrintWriter out = new PrintWriter(jsonFile)) {\n out.print(jsonStr);\n }\n }\n\n // additionally create a map for easy access to repositories based on identifier\n for (ServerRepository serverRepository : serverConfig.getRepositories()) {\n this.serverRepositories.put(serverRepository.getIdentifier(), serverRepository);\n }\n }", "public void saveToDoList() {\n try {\n jsonWriter.open();\n jsonWriter.write(toDoList);\n jsonWriter.close();\n\n System.out.println(\"Saved \" + toDoList.getName() + \" to \" + JSON_STORE);\n } catch (FileNotFoundException e) {\n System.out.println(\"Unable to write to file: \" + JSON_STORE);\n }\n }", "public void loadCache() {\n if (!directory.exists()) {\n directory.mkdirs();\n }\n File[] files = this.directory.listFiles();\n if (files == null) {\n return;\n }\n for (File file : files) {\n if (file.getName().endsWith(\".json\")) {\n cache.put(file.getName().split(\".json\")[0], new JsonDocument(file));\n }\n }\n }", "private String getArchivoMemoriaInterna(String fileName) throws FileSaverException{\n int size;\n byte[] buffer;\n FileInputStream mInput;\n String jsonString=null,msg;\n JSONObject objeto;\n try{\n mInput = contexto.openFileInput(fileName);\n size = mInput.available();\n buffer = new byte[size];\n mInput.read(buffer);\n mInput.close();\n msg = contexto.getResources().getString(R.string.fileSaverLecturaExitosa);\n Log.v(TAG,msg);\n jsonString = new String(buffer,\"UTF-8\");\n }\n catch(FileNotFoundException e){\n msg = contexto.getResources().getString(R.string.fileSaverErrorLecturaFileNotFound);\n Log.v(TAG,msg);\n //e.printStackTrace();\n throw new FileSaverException(msg);\n }\n catch(IOException e){\n msg = contexto.getResources().getString(R.string.fileSaverErrorLecturaLocal);\n Log.v(TAG,msg);\n throw new FileSaverException(msg,\"ArchivoInexistente\");\n }\n return jsonString;\n }", "public void exportJSON()\n {\n Gson JSONConverter = new Gson();\n FileWriter writer;\n\n try\n {\n // wipe the file\n PrintWriter write = new PrintWriter(new File(fp));\n write.print(\"\");\n write.close();\n\n // Initialize FileWriter to write Strings into JSON file.\n writer = new FileWriter(fp + \"/queue.json\");\n\n Iterator<ComparableCalendar> iter = this.queue.iterator();\n // Loop through the PQ.\n while(iter.hasNext())\n {\n ComparableCalendar nextObject = iter.next();\n // Convert an issue object into a JSON-formatted representation of it, as a String.\n String representationJSON = JSONConverter.toJson(nextObject);\n\n // Write that String to the file.\n writer.write(representationJSON + \"\\n\");\n }\n // Close the FileWriter to conserve system resources.\n writer.close();\n\n }\n catch (Exception e)\n {\n // Print any error messages that results to the console.\n e.printStackTrace();\n }\n\n }" ]
[ "0.63788867", "0.63785064", "0.6332725", "0.63288766", "0.63201225", "0.63055235", "0.62892306", "0.62493306", "0.62434137", "0.62407494", "0.619948", "0.61920756", "0.6190414", "0.61767596", "0.6175056", "0.61669457", "0.6144824", "0.6142312", "0.613334", "0.61082447", "0.6084998", "0.6068978", "0.60594857", "0.60548085", "0.60524935", "0.60460055", "0.6043591", "0.6040645", "0.6027621", "0.59900314", "0.5980606", "0.5942752", "0.59379005", "0.5917357", "0.5907914", "0.5901358", "0.58926463", "0.58894014", "0.5872781", "0.58608824", "0.58606523", "0.58547115", "0.58514476", "0.5826541", "0.5806943", "0.57992804", "0.5788767", "0.5775761", "0.576818", "0.5754368", "0.5753695", "0.575268", "0.5749425", "0.5748518", "0.5744513", "0.57343775", "0.5731942", "0.5731942", "0.5731942", "0.5728698", "0.57218075", "0.57202065", "0.57131845", "0.56902635", "0.567953", "0.56664133", "0.5656587", "0.5652577", "0.56331015", "0.5630211", "0.5620042", "0.5617885", "0.5605394", "0.559965", "0.5594786", "0.5586958", "0.5583824", "0.55759156", "0.5574384", "0.5569912", "0.5557749", "0.55524", "0.55422926", "0.55405617", "0.553938", "0.55296856", "0.55195904", "0.5518938", "0.55158556", "0.5501155", "0.5499784", "0.54817826", "0.54735863", "0.54692435", "0.5449354", "0.5448294", "0.5432697", "0.54225504", "0.54209447", "0.54129744", "0.5399708" ]
0.0
-1
scanner class object creation
public static void main(String[] args) { Scanner sc = new Scanner(System.in); // input from user System.out.print("Enter Starting Number : "); int start = sc.nextInt(); System.out.print("Enter Ending Number : "); int end = sc.nextInt(); System.out.println("Prime numbers between " + start + " and " + end + " are : "); int count; // loop for finding and printing all prime numbers between given range for (int i = start; i <= end; i++) { // logic for checking number is prime or not count = 0; for (int j = 1; j <= i; j++) { if (i % j == 0) count = count + 1; } if (count == 2) System.out.println(i); } // closing scanner class(not mandatory but good practice) sc.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CoolParser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public ClassCreator(){\n\n\n\t\tScanner fin = null;\n\n\t\ttry {\n\t\t\tString[] nameHandler = fileName.split(\"\\\\.\");\n\n\t\t\tString className = nameHandler[0].replaceAll(\" |_|\\\\s$|0|1|2|3|4|5|6|7|8|9\", \"\");\n\n\n\t\t\t//Setting Up Scanners/PrintWriter\n\t\t\tfin = new Scanner(new File(fileName));\n\n\n\t\t\tPrintWriter pw = new PrintWriter(className + \".java\");\n\n\n\t\t\tString[] prop = fin.nextLine().split(\"\\t\");\n\t\t\tString[] data = fin.nextLine().split(\"\\t\");\n\n\t\t\tfor(int i = 0; i<prop.length; i++) {\n\t\t\t\tpropertyList.add(new Properties(prop[i].replaceAll(\"\\\\s\", \"\"), getDataType(data[i])));\n\t\t\t}\n\n\t\t\t//Imports\n\t\t\tpw.println(\"import java.util.Scanner;\\n\\n\");\n\t\t\t\n\t\t\t//Class Line\n\t\t\tpw.println(\"\\npublic class \" + className + \" {\");\n\n\t\t\t//Properties\n\t\t\tpw.println(\"\\n\\t//======================================================= Properties\\n\");\n\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateProperty());\n\t\t\t}\n\n\t\t\t//Constructors\n\t\t\tpw.println(\"\\n\\t//======================================================= Constructors\\n\");\n\n\t\t\t//================= Workhorse Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getDataType() + \" \" + propertyList.get(i).getFieldName() + \", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getDataType() + \" \" \n\t\t\t\t\t+ propertyList.get(propertyList.size()-1).getFieldName() + \"){\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetCall(p));\n\t\t\t}\n\t\t\tpw.println(\"\\t}\\n\");\n\n\t\t\t//================= Scanner Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(Scanner fin) throws Exception {\\n\");\n\t\t\tpw.println(\"\\t\\tString[] parts = fin.nextLine().split(\\\"\\\\t\\\");\");\n\t\t\tint arrayCount = 0;\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tif(p.getDataType().equals(\"int\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Integer.parseInt(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"double\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Double.parseDouble(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"long\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Long.parseLong(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"boolean\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Boolean.parseBoolean(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpw.println(p.generateSetCall(\"parts[\" + arrayCount + \"]\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tpw.println(\"\\n\\t}\");\n\n\t\t\t//Methods\n\t\t\tpw.println(\"\\n\\t//======================================================= Methods\\n\");\n\n\t\t\t\t//Equals\n\t\t\tpw.println(\"\\tpublic boolean equals(Object obj) {\");\n\t\t\tpw.println(\"\\t\\tif(!(obj instanceof \" + className + \")) return false;\");\n\t\t\tpw.println(\"\\t\\t\" + className + \" \" + className.substring(0,1).toLowerCase() + \" = (\" + className + \")obj;\");\n\t\t\tpw.println(\"\\t\\treturn getEqualsString().equals(\" + className.substring(0,1).toLowerCase() + \".getEqualsString());\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//EqualsHelper\n\t\t\tpw.println(\"\\n\\tprivate String getEqualsString() {\");\n\t\t\tpw.print(\"\\t\\treturn \");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getFieldName() + \" + \\\"~\\\" + \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//toString\n\t\t\tpw.println(\"\\n\\tpublic String toString() {\");\n\t\t\tpw.print(\"\\t\\treturn \\\"\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).generateUpperCase() + \": \\\" + \" + propertyList.get(i).getFieldName() + \" + \\\", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).generateUpperCase() + \": \\\" + \" + propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\n\t\t\t//Getters/Setters\n\t\t\tpw.println(\"\\n\\t//======================================================= Getters/Setters\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateGetter());\n\t\t\t}\n\t\t\tpw.println();\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetter());\n\t\t\t}\n\n\t\t\t//End of the file code\n\t\t\tpw.print(\"\\n\\n}\");\n\t\t\tfin.close();\n\t\t\tpw.close();\n\n\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t} finally { //Checked Last after try\n\t\t\ttry {fin.close();} catch (Exception e) {} //Just Double Checking\n\n\t\t}\n\n\n\n\n\t}", "private ConsoleScanner() {}", "public parserCapas(java_cup.runtime.Scanner s) {super(s);}", "public A4Parser(java_cup.runtime.Scanner s) {super(s);}", "public A4Parser(java_cup.runtime.Scanner s) {super(s);}", "public CompParser(java_cup.runtime.Scanner s) {super(s);}", "public parser(Scanner s) {super(s);}", "public Parser(Scanner scanner) {\n this.scanner = scanner;\n scan();\n }", "public FractalParser(java_cup.runtime.Scanner s) {super(s);}", "public MJParser(java_cup.runtime.Scanner s) {super(s);}", "public PCLParser(java_cup.runtime.Scanner s) {super(s);}", "public Sintactico(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "private Parser () { }", "public Scanner(String program) {\n\t\tthis.program=program;\n\t\tpos=0;\n\t\ttoken=null;\n\t\tinitWhitespace(whitespace);\n\t\tinitDigits(digits);\n\t\tinitLetters(letters);\n\t\tinitLegits(legits);\n\t\tinitKeywords(keywords);\n\t\tinitOperators(operators);\n }", "public CoolParser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Scan(byte[] buffer) throws IOException, ClassNotFoundException\n\t{\n\t\t_type = TYPE;\n\t\tdeserialize(buffer);\n\t}", "private void prepareScanner() {\r\n\t\tbcLocator = new BCLocator();\r\n\t\tbcGenerator = new BCGenerator();\r\n\t}", "public JavaParser(Reader r) {\n reader = r;\n classLines = new ArrayList();\n methodLines = new ArrayList();\n }", "public Scanner(String source) {\n // The source code read in from stdin is stored here as a char array\n // TODO: if source is empty in Sc.java do something??\n this.source = source.toCharArray();\n this.position = 0;\n this.size = source.length();\n this.comments = false;\n this.depth = 0;\n this.called = false;\n }", "public Scanner(java.io.Reader in) {\r\n this.zzReader = in;\r\n }", "public LuaGrammarCup(java_cup.runtime.Scanner s) {super(s);}", "public interface ClassParserFactory {\n\n ClassParser createParser(Class<?> clazz);\n}", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "protected StreamParser()\n {\n }", "public WrongInputDataInScanner() {\n\tsuper();\n\t\n}", "public MyInput() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t}", "public ClassScanner(final Log log,\n final IssueLog iLog,\n final Project project,\n final AnnotationProcessor aProcessor) {\n // create map for all descriptions and dummy entry for Object\n this.allDescriptions = new HashMap<String, ClassDescription>();\n allDescriptions.put(Object.class.getName(), new ClassDescription(Object.class, GENERATED));\n this.log = log;\n this.iLog = iLog;\n this.project = project;\n this.aProcessor = aProcessor;\n }", "public parser(Scanner s, SymbolFactory sf) {super(s,sf);}", "public Asintactico(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public AnalizadorSintactico(java_cup.runtime.Scanner s) {super(s);}", "public TestObject createObject() {\n String word;\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter a word to send to the server: \");\n word = scanner.nextLine();\n\n TestObject testObject = new TestObject(word);\n scanner.close();\n return testObject;\n }", "public Person(Scanner sc) {\n\t\tsuper(sc);\n\t\tif (sc.hasNext()) this.skill = sc.next();\n\t\tworking = false;\n\t}", "public SintacticoH(java_cup.runtime.Scanner s) {\r\n super(s);\r\n }", "public Parser() {}", "public MetadataScanner()\n {\n this(\"\");\n }", "protected Scanner getTagScanner() {\n \tif(scanner == null)\n \t scanner = new Scanner();\n \treturn scanner;\n }", "public XPathParser(java_cup.runtime.Scanner s) {super(s);}", "private Parser makeParser(String input) throws LexicalException {\r\n\t\tshow(input); //Display the input \r\n\t\tScanner scanner = new Scanner(input).scan(); //Create a Scanner and initialize it\r\n\t\tshow(scanner); //Display the Scanner\r\n\t\tParser parser = new Parser(scanner);\r\n\t\treturn parser;\r\n\t}", "public SintaxAnalysis(java_cup.runtime.Scanner s) {super(s);}", "public Scanner(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "public PasitoScanner(java.io.Reader in) {\n this.yy_reader = in;\n }", "public parserCapas(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public static void init()throws IOException{if(fileIO){f=new FastScanner(\"\");}else{f=new FastScanner(System.in);}}", "private CoverageParser() {\n }", "public Instruction getInstruction(String label) {\n int s1; // Possible operands of the instruction\n int s2;\n String s3;\n int r;\n int x;\n\n if (line.equals(\"\"))\n return null;\n\n //Get the first word as a string\n String ins = scan();\n\n // Generate the instruction classname that corresponds with the label\n String instructionName = ins.substring(0, 1).toUpperCase() + ins.substring(1).toLowerCase() + \"Instruction\" ;\n\n //System.out.println(\"The scanned label is: \" + ins);\n //System.out.println(\"Use instruction class: \" + instructionName);\n\n // Make a list of the remaining words\n List<String> wordList = new ArrayList<>();\n List<Class> paramTypes = new ArrayList<>();\n\n //The first constructor param is always the label string\n wordList.add(label);\n paramTypes.add(String.class);\n\n String nextWord;\n\n /*\n if (!nextWord.equals(\"\")){\n wordList.add(nextWord);\n paramTypes.add(nextWord.getClass());\n }\n */\n\n while (!(nextWord = scan()).equals(\"\")){\n wordList.add(nextWord);\n }\n\n //System.out.println(\"The next word is: \" + instructionName);\n\n Object wordArray [] = wordList.toArray();\n Class<?> paramArray [] = new Class<?> [wordArray.length];\n\n try {\n for (int i = 0; i < wordArray.length; i++){\n String str = wordArray[i].toString();\n\n if (Pattern.matches((\"-?[0-9]+\"), str)){\n paramArray [i] = Integer.TYPE;\n wordArray [i] = Integer.parseInt((String) wordArray[i]);\n } else {\n paramArray [i] = String.class;\n\n }\n }\n\n //System.out.println(\"My word array contains: \" + Arrays.asList(wordArray));\n //System.out.println(\"My parameter array contains: \" + Arrays.asList(paramArray));\n //System.out.println(\"Instruction name is: \" + instructionName);\n\n //Reflect class\n Class reflectionClass = Class.forName(\"sml.\" + instructionName);\n\n //System.out.println(\"My reflection is: \" + reflectionClass);\n\n Constructor con = reflectionClass.getConstructor(paramArray);\n\n // Cast return back to an Instruction\n return ((Instruction)con.newInstance(wordArray));\n\n } catch (ClassNotFoundException e) {\n //e.printStackTrace();\n System.err.println(\"Error\");\n } catch (NoSuchMethodException e) {\n //e.printStackTrace();\n System.err.println(\"Error\");\n } catch (InvocationTargetException e) {\n //e.printStackTrace();\n System.err.println(\"Error\");\n } catch (InstantiationException e) {\n //e.printStackTrace();\n System.err.println(\"Error\");\n } catch (IllegalAccessException e) {\n //e.printStackTrace();\n System.err.println(\"Error\");\n }\n\n/*\n // Commented out switch statement\n\n switch (ins) {\n case \"add\":\n r = scanInt();\n s1 = scanInt();\n s2 = scanInt();\n return new AddInstruction(label, r, s1, s2);\n case \"lin\":\n r = scanInt();\n s1 = scanInt();\n return new LinInstruction(label, r, s1);\n case \"out\":\n r = scanInt();\n return new OutInstruction(label, r);\n case \"sub\":\n r = scanInt();\n s1 = scanInt();\n s2 = scanInt();\n return new SubInstruction(label, r, s1, s2);\n case \"mul\":\n r = scanInt();\n s1 = scanInt();\n s2 = scanInt();\n return new MulInstruction(label, r, s1, s2);\n case \"div\":\n r = scanInt();\n s1 = scanInt();\n s2 = scanInt();\n return new DivInstruction(label, r, s1, s2);\n case \"bnz\":\n r = scanInt();\n s3 = scan();\n return new BnzInstruction(label, r, s3);\n }\n\n // You will have to write code here for the other instructions.\n*/\n\n return null;\n }", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public LexicalScanner() throws IOException {\n this.codesMap = new CodesMap();\n this.keyWords = loadKeywords();\n this.specialCharacters = loadSpecialCharacters();\n this.identifierAutomata = new FA(IDENTIFIER_AUTOMATA_FILE);\n this.constantAutomata = new FA(CONSTANT_AUTOMATA_FILE);\n }", "public JavaClass parse() throws IOException, ClassFormatException {\n try {\n if (fileOwned) {\n dataInputStream = new DataInputStream(new BufferedInputStream(new FileInputStream(\n file_name), BUF_SIZE));\n }\n /****************** Read headers ********************************/\n // Check magic tag of class file\n readID();\n // Get compiler version\n readVersion();\n /****************** Read constant pool and related **************/\n // Read constant pool entries\n readConstantPool();\n // Get class information\n readClassInfo();\n // Get interface information, i.e., implemented interfaces\n readInterfaces();\n /****************** Read class fields and methods ***************/\n // Read class fields, i.e., the variables of the class\n readFields();\n // Read class methods, i.e., the functions in the class\n readMethods();\n // Read class attributes\n readAttributes();\n }\n finally {\n if (fileOwned) {\n IOUtils.closeQuitely(dataInputStream);\n }\n }\n\n // Return the information we have gathered in a new object\n return new JavaClass(class_name_index, superclass_name_index, file_name, major, minor,\n access_flags, constant_pool, interfaces, fields, methods, attributes, JavaClass.FILE);\n }", "Reproducible newInstance();", "public Scanner(String inString)\n {\n in = new BufferedReader(new StringReader(inString));\n eof = false;\n getNextChar();\n }", "public CompParser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "private Parser() {\n objetos = new ListaEnlazada();\n }", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "public PasitoScanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner createScanner(File file) {\n Scanner scanner;\n try {\n scanner = new Scanner(file);\n\n } catch (FileNotFoundException e) {\n scanner = null;\n }\n return scanner;\n }", "public OnionooParser() {\n\n\t}", "public Scan(ObjectInputStream ois) throws IOException, ClassNotFoundException\n\t{\n\t\t_type = TYPE;\n\t\tdeserialize(ois);\n\t}", "public ContentScanner(\n Contents contents\n )\n {\n this.parentLevel = null;\n this.objects = this.contents = contents;\n\n moveStart();\n }", "public HumanPlayer(Scanner scanner) {\n this.scanner = scanner;\n }", "public BStarTokenMaker(java.io.Reader in) {\n this.zzReader = in;\n }", "private Instantiation(){}", "private void parse() {\n try {\n SimpleNode rootNode = jmm.parseClass(sourcefile);\n assert rootNode.is(JJTPROGRAM);\n\n SimpleNode classNode = rootNode.jjtGetChild(0);\n assert classNode.is(JJTCLASSDECLARATION);\n\n data.classNode = classNode;\n } catch (FileNotFoundException e) {\n throw new CompilationException(e);\n } catch (ParseException e) {\n throw new CompilationException(\"Parsing Error: \" + e.getMessage(), e);\n }\n }", "public Parser()\n {\n //nothing to do\n }", "public interface PackageScanner {\n String FILE_SUFFIX = \".class\";\n\n /**\n * Find target element blow package except two class name.\n *\n * @param packageName\n * @param except\n * @param except2\n * @return\n * @throws IOException\n */\n Set<String> classNames(String packageName, String except, String except2) throws Exception;\n\n /**\n * Find target element blow package except single class name.\n *\n * @param packageName\n * @param except\n * @return\n * @throws IOException\n */\n Set<String> classNames(String packageName, String except) throws Exception;\n\n /**\n * Scanning target class blow package except @param except and @param except2 class.\n *\n * @param packageName\n * @param except\n * @param except2\n * @return\n */\n Set<?> scan(String packageName, Class<?> except, Class<?> except2) throws Exception;\n\n /**\n * Scanning target class blow package except @param except class.\n *\n * @param packageName\n * @param except\n * @return\n */\n Set<?> scan(String packageName, Class<?> except) throws Exception;\n\n /**\n * Instantiation a class set.\n *\n * @param classNames\n * @return\n */\n Set<?> instantiation(Set<String> classNames, Class<?> tClass) throws IOException;\n}", "public Parser()\n{\n //nothing to do\n}", "public static void init() {\n\t\tscanner = new Scanner(System.in);\n\t\treturn;\n\t}", "public Scanner(Configuration config) {\r\n\t\tthis.conf = config;\r\n\t\tfileCacheList = new LinkedList<FileObj>();\r\n\r\n\t}" ]
[ "0.6853074", "0.6829428", "0.6829428", "0.6829428", "0.6829428", "0.6829428", "0.6829428", "0.6829428", "0.6829428", "0.6815232", "0.6815232", "0.6815232", "0.6815232", "0.6815232", "0.6815232", "0.6786842", "0.6741533", "0.6686122", "0.66069704", "0.66069704", "0.6507213", "0.64875704", "0.6458081", "0.64469033", "0.63964987", "0.6343586", "0.61811215", "0.6117681", "0.6117681", "0.6117681", "0.6117681", "0.6117681", "0.6117681", "0.6117681", "0.6096138", "0.6094831", "0.6076792", "0.60743755", "0.60743755", "0.60743755", "0.60743755", "0.60743755", "0.60743755", "0.60743755", "0.60743755", "0.60743755", "0.60601795", "0.6055609", "0.60398304", "0.59761", "0.59698045", "0.59524304", "0.59507066", "0.593794", "0.593794", "0.59307235", "0.5924259", "0.5922973", "0.589467", "0.5880842", "0.5868727", "0.58681256", "0.58636105", "0.58594567", "0.5847781", "0.58458257", "0.5843926", "0.58407754", "0.58401835", "0.58309484", "0.57710826", "0.5770959", "0.57630545", "0.5715262", "0.5705929", "0.5704685", "0.56950563", "0.56811076", "0.56811076", "0.56730884", "0.5663178", "0.5659486", "0.565816", "0.5658025", "0.56523424", "0.5651786", "0.5651786", "0.563081", "0.56245613", "0.56228304", "0.56168187", "0.5610429", "0.5596708", "0.5593252", "0.5581374", "0.5571157", "0.55641156", "0.55622965", "0.55548906", "0.5548755", "0.5547336" ]
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.login, 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 {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, 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 getMenuInflater().inflate(R.menu.menu, 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_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.home_action_bar, 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 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\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 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}", "@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 }", "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\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 public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\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\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 boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\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 boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.my_notes_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.menu, menu);\r\n return true;\r\n }" ]
[ "0.72500116", "0.7204146", "0.71987385", "0.7180757", "0.71107906", "0.7043322", "0.7041613", "0.7015376", "0.7013112", "0.6982869", "0.69475657", "0.6941377", "0.6937569", "0.69213736", "0.69213736", "0.6892679", "0.6887231", "0.6877873", "0.68772626", "0.68644464", "0.68644464", "0.68644464", "0.68644464", "0.6855815", "0.68494046", "0.68220186", "0.68183845", "0.68154365", "0.6815009", "0.6815009", "0.68082577", "0.6802161", "0.68002385", "0.67936224", "0.67918605", "0.679087", "0.67849934", "0.6760954", "0.67599845", "0.67507833", "0.67461413", "0.67461413", "0.67431796", "0.67413616", "0.6728648", "0.672732", "0.67251813", "0.67251813", "0.67232496", "0.67152804", "0.67092025", "0.67071015", "0.6702423", "0.6701286", "0.66991764", "0.66969806", "0.66888016", "0.66863585", "0.6686101", "0.6686101", "0.66828436", "0.6681769", "0.6679519", "0.6671908", "0.66700244", "0.6665301", "0.66587126", "0.66587126", "0.66587126", "0.6658098", "0.66570866", "0.66570866", "0.66570866", "0.665458", "0.66533303", "0.66528934", "0.66513336", "0.66495234", "0.66490155", "0.6648172", "0.6648159", "0.6647816", "0.6647625", "0.6645882", "0.66453695", "0.66441536", "0.66413796", "0.66374624", "0.66360414", "0.6635178", "0.66346484", "0.66346484", "0.66346484", "0.6632149", "0.66308904", "0.66287386", "0.66283447", "0.6627003", "0.6624185", "0.6621111", "0.662078" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.7904231", "0.78061396", "0.7767007", "0.77273244", "0.76318634", "0.7621818", "0.7585249", "0.7531511", "0.7488678", "0.74574006", "0.74574006", "0.7439257", "0.7421747", "0.7403457", "0.73920685", "0.7387285", "0.7379893", "0.73710734", "0.7363068", "0.73565257", "0.7346117", "0.73421544", "0.73308754", "0.7328614", "0.7326444", "0.73191214", "0.7316894", "0.73141056", "0.7304816", "0.7304816", "0.73023325", "0.7298775", "0.7294159", "0.72872293", "0.7283658", "0.72814363", "0.72793216", "0.72604835", "0.72604835", "0.72604835", "0.72604495", "0.7260065", "0.72506464", "0.7223512", "0.7220288", "0.721808", "0.7204778", "0.72007537", "0.7199708", "0.7193875", "0.7185878", "0.7178243", "0.7169468", "0.7168278", "0.71544755", "0.7154114", "0.71363086", "0.7135266", "0.7135266", "0.7129425", "0.71291506", "0.712514", "0.71239674", "0.7123848", "0.71223545", "0.7118021", "0.7117761", "0.7117381", "0.7117381", "0.7117381", "0.7117381", "0.7117378", "0.71157014", "0.7112743", "0.71105623", "0.710936", "0.7106081", "0.7100549", "0.7099009", "0.70957214", "0.7094029", "0.7094029", "0.7086948", "0.70828027", "0.70810676", "0.7080609", "0.707419", "0.70687926", "0.7062512", "0.70614976", "0.70604354", "0.7051683", "0.7037832", "0.7037832", "0.7036669", "0.70357877", "0.70357877", "0.7033191", "0.7030764", "0.70303047", "0.70192975" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { WebDriver driver=new ChromeDriver(); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); driver.manage().window().maximize(); driver.get("file:///E:/Qspiders/Notes/Selenium%20notes/Upload.html"); String rpath = "./TestData/URL.txt"; System.out.println("relative path: "+rpath); File f=new File(rpath); String apath = f.getAbsolutePath(); System.out.println("absolute path: "+apath); driver.findElement(By.id("1")).sendKeys(apath); }
{ "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
Created by Julian on 12/23/2015.
public interface ResourcePaths { String imageFolderPath(); String imageResourcePath(); String videoFolderPath(); String videoResourcePath(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "protected boolean func_70814_o() { return true; }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "private void m50366E() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void method_4270() {}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public int describeContents() { return 0; }", "public void gored() {\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 mo38117a() {\n }", "private void poetries() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void nadar() {\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}", "public void mo21877s() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void m23075a() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void mo21779D() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override public int describeContents() { return 0; }", "public final void mo91715d() {\n }", "public void mo12628c() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void strin() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public abstract void mo56925d();", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void mo21785J() {\n }", "private void m50367F() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo21878t() {\n }", "public void mo12930a() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "private void init() {\n\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void mo115190b() {\n }", "public void mo21825b() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo21793R() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "protected boolean func_70041_e_() { return false; }", "public void mo21787L() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n public void init() {\n }", "public void mo21782G() {\n }", "@Override\n public void init() {}", "public void mo3376r() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void jugar() {}", "@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\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 nghe() {\n\n\t}", "public abstract void mo27386d();", "public void mo21794S() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo21792Q() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "public abstract Object mo26777y();", "public void mo6081a() {\n }" ]
[ "0.5749408", "0.5733485", "0.5691969", "0.56711197", "0.56481755", "0.56338817", "0.56287795", "0.5628299", "0.5613484", "0.5582988", "0.55688846", "0.55435395", "0.5530329", "0.55256176", "0.55256176", "0.5520307", "0.5514745", "0.55108774", "0.550145", "0.5468344", "0.5437187", "0.5433532", "0.5423419", "0.5406908", "0.5399024", "0.53771853", "0.53771853", "0.53771853", "0.53771853", "0.53771853", "0.5376481", "0.5359148", "0.534858", "0.53457534", "0.5341779", "0.53408813", "0.5334795", "0.5324638", "0.5322062", "0.53211564", "0.5315006", "0.5312531", "0.53085715", "0.5303162", "0.5303162", "0.5294799", "0.5294156", "0.52845126", "0.527952", "0.5276638", "0.5273422", "0.5272095", "0.52675575", "0.52630675", "0.52630675", "0.52630675", "0.52630675", "0.52630675", "0.52630675", "0.52630675", "0.52610797", "0.5241463", "0.52412987", "0.5239185", "0.5238539", "0.5226332", "0.52231836", "0.52198994", "0.52136374", "0.5209954", "0.52072555", "0.51972777", "0.5189417", "0.5187862", "0.5184422", "0.5179552", "0.51791954", "0.51791954", "0.51791954", "0.51781464", "0.5178055", "0.5169535", "0.516854", "0.5168152", "0.5166812", "0.5166225", "0.5164818", "0.5164818", "0.5164818", "0.51642954", "0.51642954", "0.51642954", "0.5162488", "0.51601243", "0.51590294", "0.51589674", "0.515729", "0.51569766", "0.51525384", "0.5151951", "0.5151027" ]
0.0
-1
/~ constructors Dear JPA ...
protected LocationPK() { super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected CompanyJPA() {\n\t}", "public RepoSQL() { // constructor implicit\r\n\t\t super();\r\n\t }", "protected JpaModule() {\n }", "public DerivedPartOfPerspectivesFKDAOJDBC() {\n \t\n }", "protected void entityInit() {}", "public NamedEntity() {}", "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 AbstractEntity() {\r\n\t}", "@Override\n\tpublic void initEntity() {\n\n\t}", "public SourceDataFileJpa() {\n // n/a\n }", "public TreePositionListJpa() {\n // do nothing\n }", "abstract void initPersistance();", "private DbQuery() {}", "public ExpertiseEntity() {\n }", "public interface TeamStudentPKDao extends GenericDAO<TeamStudentPK, Serializable> {\r\n\t// constructor only\r\n}", "public EntityID() {\n }", "public BOEmpresa() {\r\n\t\tdaoEmpresa = new DAOEmpresaJPA();\r\n\t}", "protected abstract ENTITY createEntity();", "public DatasetParameterPK() {\n }", "private EntityManagerProvider(){}", "Entity createEntity();", "public interface PersistenceFactory {\n /* Fields */\n\n /**\n * The property name for all classes stored at the column:row level to introspect the entity that contains the\n * properties persisted in a row's columns\n */\n String CLASS_PROPERTY = \"___class\";\n\n /* Misc */\n\n /**\n * Deletes columns by name from column family\n *\n * @param columnFamily the column family\n * @param key the key\n * @param columns the columns to be deleted by name\n */\n void deleteColumns(String columnFamily, String key, String... columns);\n\n /**\n * Executes a query\n *\n * @param expectedResult the result expected from the query execution\n * @param query the query\n * @param <T> the result type\n * @return the result\n */\n <T> T executeQuery(Class<T> expectedResult, Query query);\n\n /**\n * @param entityClass the class\n * @param key the id\n * @param <T> the entity type\n * @return an entity from the data store looked up by its id\n */\n <T> T get(Class<T> entityClass, String key);\n\n /**\n * Fetch a map of columns and their values\n *\n * @param columnFamily the column family\n * @param key the column family key\n * @param reversed if the order should be reversed\n * @param columns the column names\n * @return a map of columns and their values\n */\n Map<String, ByteBuffer> getColumns(String columnFamily, String key, boolean reversed, String... columns);\n\n /**\n * Fetch a map of columns and their values\n *\n * @param columnFamily the column family\n * @param key the column family key\n * @param limit of columns\n * @param reversed if the order should be reversed\n * @param fromColumn from column\n * @param toColumn to column\n * @return a map of columns and their values\n */\n Map<String, ByteBuffer> getColumns(String columnFamily, String key, int limit, boolean reversed, String fromColumn, String toColumn);\n\n /**\n * @return the default consistency level\n */\n ConsistencyLevel getDefaultConsistencyLevel();\n\n /**\n * @return the default keyspace\n */\n String getDefaultKeySpace();\n\n /**\n * @param entityClass the class type for this instance\n * @param <T> the type of class to be returned\n * @return an instance of this type after transformation of its accessors to notify the persistence context that there are ongoing changes\n */\n <T> T getInstance(Class<T> entityClass);\n\n /**\n * Obtains an entity key\n *\n * @param entity the entity\n * @return the key\n */\n String getKey(Object entity);\n\n /**\n * The list of managed class by this factory\n *\n * @return The list of managed class by this factory\n */\n List<Class<?>> getManagedClasses();\n\n /**\n * Get a list of entities given a query\n *\n * @param type the type of objects to expect back\n * @param query the query\n * @param <T> the result type\n * @return the list of entities\n */\n <T> List<T> getResultList(Class<T> type, Query query);\n\n /**\n * Get a single result from a CQL query\n *\n * @param type the type of objects to expect back\n * @param query the query\n * @param <T> the entity type\n * @return the resulting entity\n */\n <T> T getSingleResult(Class<T> type, Query query);\n\n /**\n * Inserts columns based on a map representing keys with properties and their corresponding values\n *\n * @param columnFamily the column family\n * @param key the column family key\n * @param keyValuePairs the map with keys and values\n */\n void insertColumns(String columnFamily, String key, Map<String, Object> keyValuePairs);\n\n /**\n * Entry point method to persist and arbitrary list of objects into the datastore\n *\n * @param entities the entities to be persisted\n */\n <T> void persist(T... entities);\n\n /**\n * @param entities the entities to be removed from the data store\n */\n <T> void remove(T... entities);\n \n /**\n * return cluster\n */\n Cluster getCluster(); \n}", "protected CompanyJPA(Integer id, String name) {\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t}", "public ExcursionEntity() {\n\t}", "private AttendantDatabase() {}", "T buidEntity(ResultSet rs) throws SQLException;", "DAOClienteJPA(EntityManager entity) {\r\n this.entity = entity;\r\n }", "public abstract P toEntity();", "@Inject\n\tpublic AbsenceDaoImpl() throws SQLException {\n\t\tsuper(Absence.class);\n\t}", "public AbstractDomain(ResultSet rs) {\n\t\ttry {\n\t\t\tthis.id=Integer.valueOf(rs.getInt(rs.findColumn(COL_ID)));\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tLOG.log(Level.ALL, e.getMessage());\n\t\t\tthis.id=null;\n\t\t}\n\t}", "public void toEntity(){\n\n }", "public DomainPK()\n {\n }", "public AccountTypeEntity() { }", "public MapEntity() {\n\t}", "public JpaUser() {\n }", "public DatabaseTable() { }", "public Persistence() {}", "public Entity(String name)\n {\n super(name);\n isAs = Lists.newArrayList();\n }", "private DAOJPAFactory() {\r\n }", "private EntityFactory() {}", "private DBParameter() {\n }", "public QuestEntity() {\r\n\r\n }", "public UserEntity() {\n\t\tsuper();\n\t}", "public LocalResidenciaColaborador() {\n //ORM\n }", "public interface LoggerJPA extends\n JpaRepository<LoggerEntity,Long>,\n JpaSpecificationExecutor<LoggerEntity>,\n Serializable {\n}", "public void initializeOnCreation() \n\t\t\t\tthrows PersistenceException{\n\n\t}", "public interface EntityManager {\r\n public <T> T findById(Class<T> entityClass, Long id);\r\n public <T> Long getNextIdVal(String tableName, String columnIdName);\r\n public <T> Object insert(T entity);\r\n public <T> List<T> findAll(Class<T> entityClass);\r\n public <T> T update(T entity);\r\n public void delete(Object entity);\r\n public <T> List<T> findByParamsClass(Class<T> entityClass, Map<String, Object> params);\r\n}", "public DatabaseOperations(){\n\n }", "public static void main(String[] args) {\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"JPA1\");\n EntityManager em = emf.createEntityManager();\n em.getTransaction().begin();\n Book b = new Book();\n Book c = new Book(\"ongo\");\n b.setTitle(\"hej\");\n em.persist(b);\n em.persist(c);\n Customer cu = new Customer(\"Allan\", \"Madsen\", CustomerType.RUSTY);\n em.persist(cu);\n Query a = em.createQuery(\"SELECT * FROM Customer WHERE ID = 1\");\n System.out.println(a.getParameter(\"FIRSTNAME\"));\n // Bør man ikke hente en kunde ud og tilføje en enum til den specefikke bruger.\n em.getTransaction().commit();\n\n }", "public BemPessoaDAOImpl() {\n\t\tsuper(\"PESQUISAR_BEM_PESSOA\");\n\t}", "protected abstract EntityBase createEntity() throws Exception;", "public ClientDetailsEntity() {\n\t\t\n\t}", "public DataSourceEntityExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public ProfesorDAOImpl() {\n super();\n }", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "public interface AnutaEntityManager {\n\n /**\n * Saves entity in database\n * @param entity the entity to be saved\n * @param <T> the type if target entity\n * @return saved entity\n */\n public <T> T save(T entity);\n\n /**\n * Loads the entity from data source using entity's id\n * @param entityClass the target entity class\n * @param id the id of entity lo load\n * @param <T> the type if target entity\n * @return Java object, representing the entity if object was found and null otherwise\n */\n public <T> T find(Class<T> entityClass, String id);\n\n\n /**\n * Loads entity without loading all inner collections\n * @param id the id of the entity\n * @return loaded entity, if exists and null otherwise\n */\n public <T> T getPlainEntity(Class<T> entityClass, String id);\n\n /**\n * Updates entity in database\n * @param <T> the type if target entity\n * @return updated entity\n */\n public <T> T update(T entity);\n\n /**\n * Deletes entity from database\n * @param entity the entity to be deleted\n * @param <T> the type if target entity\n * @return true if was removed and false otherwise\n */\n public <T> boolean delete(T entity);\n\n /**\n * Deletes entity from database\n * @param entityClass the class of entity to be deleted\n * @param id the id of entity to be removed\n * @param <T> the type if target entity\n * @return true if was removed and false otherwise\n */\n public <T> boolean delete(Class<T> entityClass, String id);\n\n /**\n * Finds all entities of the given type\n * @param <T> the type if target entity\n * @return list of found entities or empty list if nothing was found\n */\n public <T> List<T> findAll(Class<T> entityClass);\n\n /**\n * Finds all entities of the given type\n * @param <T> the type if target entity\n * @return list of found entities or empty list if nothing was found\n */\n public <T> List<T> findByQuery(AnutaQuery<T> query);\n\n /**\n * Saves all entities into database\n * @param <T> the type if target entity\n * @return collection of saved entities\n */\n public <T> Collection<T> saveAll(Collection<T> entities);\n\n /**\n * Updates all entities in database\n * @param <T> the type if target entity\n * @return collection of updated entities\n */\n public <T> Collection<T> updateAll(Collection<T> entities);\n\n /**\n * Deletes all entities in database\n * @param <T> the type if target entity\n * @return collection of updated entities\n */\n public <T> boolean deleteAll(Collection<T> entities);\n\n /**\n * Deletes all entities in database\n * @param ids collection of ids for entities to be deleted\n * @param <T> the type if target entity\n * @return collection of updated entities\n */\n public <T> boolean deleteAll(Class<T> entityClass, Collection<String> ids);\n\n /**\n * @return the instance of {@link AnutaQueryBuilder} which can be used to build query\n */\n public <T> AnutaQueryBuilder<T> getQueryBuilder(Class<T> cls);\n\n /**\n * Queries data from DB and coverts data from cursor to Java entity.\n * @param query the query to select objects\n * @param <T> type of target entity\n * @return an instance of {@link AnutaEntityCursor} which can be used to iterate objects from database\n */\n public <T> AnutaEntityCursor<T> getEntityCursor(AnutaQuery<T> query);\n\n /**\n * Executes query and returns true if query was executed successfully and false otherwise\n * @param query the query to be executed\n * @return {@code true} if query was executed successfully and {@code false} otherwise\n */\n public <T> boolean executeQuery(AnutaQuery<T> query);\n\n /**\n * Initializes all related collections and entities\n * @param entity the entity to be initialized\n * @return initialized entity. WARNING! The reference of returned object will differ from passed at params\n */\n public <T> T initialize(T entity);\n\n /**\n * Initializes all related collections and entities up to the given level\n * @param entity the entity to be initialized\n * @param level the level of initialization (greater then 0 or one of the following)\n * <ul>\n * <li>{@link DatabaseAccessSession#LEVEL_ENTITY_ONLY} - to load plain entity</li>\n * <li>{@link DatabaseAccessSession#LEVEL_ALL} - to load entity and all dependent collections</li>\n * <li>{@link DatabaseAccessSession#LEVEL_ANNOTATION_BASED} - to load entity and collections will be loaded accorging to annotation config</li>\n * </ul>\n * @return initialized entity. WARNING! The reference of returned object will differ from passed at params\n */\n public <T> T initialize(T entity, int level);\n\n /**\n * Initializes all related collections and entities for the given collection of entities\n * @param entities the collection of entities to be initialized\n * @return initialized entity. WARNING! The reference of returned object will differ from passed at params\n */\n public <T> Collection<T> initialize(Collection<T> entities);\n\n /**\n * Initializes all related collections and entities up to the given level\n * @param entities the collection of entities to be initialized\n * @param level the level of initialization (greater then 0 or one of the following)\n * <ul>\n * <li>{@link DatabaseAccessSession#LEVEL_ENTITY_ONLY} - to load plain entity</li>\n * <li>{@link DatabaseAccessSession#LEVEL_ALL} - to load entity and all dependent collections</li>\n * <li>{@link DatabaseAccessSession#LEVEL_ANNOTATION_BASED} - to load entity and collections will be loaded accorging to annotation config</li>\n * </ul>\n * @return initialized entity. WARNING! The reference of returned object will differ from passed at params\n */\n public <T> Collection<T> initialize(Collection<T> entities, int level);\n}", "private DatabaseContract() {}", "private Criteria createFindByEntity(int type, int id) {\n return null;\t\n }", "public OnibusDAO() {}", "public void initializeOnInstantiation() \n\t\t\t\tthrows PersistenceException{\n\n\t}", "private DBContract() {}", "private DBContract() {}", "public interface Compromiso_peticionLocal extends javax.ejb.EJBLocalObject {\n\t/**\n\t * Get accessor for persistent attribute: tiag_id\n\t */\n\tpublic java.lang.Long getTiag_id();\n\t/**\n\t * Set accessor for persistent attribute: tiag_id\n\t */\n\tpublic void setTiag_id(java.lang.Long newTiag_id);\n\t/**\n\t * Get accessor for persistent attribute: id_rango\n\t */\n\tpublic java.lang.Integer getId_rango();\n\t/**\n\t * Set accessor for persistent attribute: id_rango\n\t */\n\tpublic void setId_rango(java.lang.Integer newId_rango);\n\t/**\n\t * Get accessor for persistent attribute: peti_numero\n\t */\n\tpublic java.lang.Long getPeti_numero();\n\t/**\n\t * Set accessor for persistent attribute: peti_numero\n\t */\n\tpublic void setPeti_numero(java.lang.Long newPeti_numero);\n\t/**\n\t * Get accessor for persistent attribute: codigo_pcom\n\t */\n\tpublic java.lang.String getCodigo_pcom();\n\t/**\n\t * Set accessor for persistent attribute: codigo_pcom\n\t */\n\tpublic void setCodigo_pcom(java.lang.String newCodigo_pcom);\n\t/**\n\t * Get accessor for persistent attribute: dia_especifico\n\t */\n\tpublic java.sql.Timestamp getDia_especifico();\n\t/**\n\t * Set accessor for persistent attribute: dia_especifico\n\t */\n\tpublic void setDia_especifico(java.sql.Timestamp newDia_especifico);\n\t/**\n\t * Get accessor for persistent attribute: id_tecnico\n\t */\n\tpublic java.lang.Long getId_tecnico();\n\t/**\n\t * Set accessor for persistent attribute: id_tecnico\n\t */\n\tpublic void setId_tecnico(java.lang.Long newId_tecnico);\n\t/**\n\t * Get accessor for persistent attribute: user_mac\n\t */\n\tpublic java.lang.String getUser_mac();\n\t/**\n\t * Set accessor for persistent attribute: user_mac\n\t */\n\tpublic void setUser_mac(java.lang.String newUser_mac);\n\t/**\n\t * Get accessor for persistent attribute: hora_desde\n\t */\n\tpublic java.lang.String getHora_desde();\n\t/**\n\t * Set accessor for persistent attribute: hora_desde\n\t */\n\tpublic void setHora_desde(java.lang.String newHora_desde);\n\t/**\n\t * Get accessor for persistent attribute: hora_hasta\n\t */\n\tpublic java.lang.String getHora_hasta();\n\t/**\n\t * Set accessor for persistent attribute: hora_hasta\n\t */\n\tpublic void setHora_hasta(java.lang.String newHora_hasta);\n\t/**\n\t * Get accessor for persistent attribute: codigo_agencia\n\t */\n\tpublic java.lang.String getCodigo_agencia();\n\t/**\n\t * Set accessor for persistent attribute: codigo_agencia\n\t */\n\tpublic void setCodigo_agencia(java.lang.String newCodigo_agencia);\n\t/**\n\t * Get accessor for persistent attribute: estado\n\t */\n\tpublic java.lang.Short getEstado();\n\t/**\n\t * Set accessor for persistent attribute: estado\n\t */\n\tpublic void setEstado(java.lang.Short newEstado);\n\t/**\n\t * Get accessor for persistent attribute: grse_id\n\t */\n\tpublic java.lang.Integer getGrse_id();\n\t/**\n\t * Set accessor for persistent attribute: grse_id\n\t */\n\tpublic void setGrse_id(java.lang.Integer newGrse_id);\n\t/**\n\t * Get accessor for persistent attribute: fecha\n\t */\n\tpublic java.sql.Timestamp getFecha();\n\t/**\n\t * Set accessor for persistent attribute: fecha\n\t */\n\tpublic void setFecha(java.sql.Timestamp newFecha);\n\t/**\n\t * Get accessor for persistent attribute: care_id\n\t */\n\tpublic java.lang.Integer getCare_id();\n\t/**\n\t * Set accessor for persistent attribute: care_id\n\t */\n\tpublic void setCare_id(java.lang.Integer newCare_id);\n\t/**\n\t * Get accessor for persistent attribute: usua_id\n\t */\n\tpublic java.lang.Long getUsua_id();\n\t/**\n\t * Set accessor for persistent attribute: usua_id\n\t */\n\tpublic void setUsua_id(java.lang.Long newUsua_id);\n\t/**\n\t * Get accessor for persistent attribute: id_cita_previa\n\t */\n\tpublic java.lang.Long getId_cita_previa();\n\t/**\n\t * Set accessor for persistent attribute: id_cita_previa\n\t */\n\tpublic void setId_cita_previa(java.lang.Long newId_cita_previa);\n}", "public EntityPropertyBean() {}", "public EntityFactoryImpl() {\n\t\tsuper();\n\t}", "private void createClassSQLContract(){\n //---------------------------------------------------------------------------\n buffer=new StringBuffer();\n createGetColumnPropertiesHash();\n createGetPrimaryKeyVector();\n createGetTableName();\n createSetFKParent();\n\t}", "public QueryBO() {\r\n }", "public CustomerJPAImpl(EntityManagerFactory emfPassed) {\n\t\temf = emfPassed;\n\t}", "public NamedEntity(String name) { this(name, \"\"); }", "T createEntity();", "public CommonDaoImpl(JpaEntityInformation<T, ID> entityInformation, EntityManager em) {\r\n\t\tsuper(entityInformation, em);\r\n\t\tthis.entityManager = em;\r\n//\t\tthis.entityInformation = entityInformation;\r\n\t}", "private List<Produto> retornaProduto (Long cod){\n \n Query q = entityManager.createNamedQuery(\"Produto.findByCodigo\");\n q.setParameter(\"codigo\", cod);\n List <Produto> p = q.getResultList();\n return p; \n}", "public PacienteDAO(){ \n }", "protected BaseQuery(EntityDescriptor descriptor) {\n this.descriptor = descriptor;\n }", "public JdbcObjectStudentDAO() {\n\t\tsuper();\n\t}", "public interface CSUserLocal extends javax.ejb.EJBLocalObject {\n\t/**\n\t * getEntityContext\n\t */\n\tpublic javax.ejb.EntityContext getEntityContext();\n\t/**\n\t * Returns the idPassword.\n\t * @return String\n\t */\n\tpublic String getIdPassword();\n\t/**\n\t * Returns the idProfile.\n\t * @return String\n\t */\n\tpublic String getIdProfile();\n\t/**\n\t * Returns the idProfileDesc.\n\t * @return String\n\t */\n\tpublic String getIdProfileDesc();\n\t/**\n\t * Returns the idWrkr.\n\t * @return String\n\t */\n\tpublic String getIdWrkr();\n\t/**\n\t * Returns the idWrkrCreate.\n\t * @return String\n\t */\n\tpublic String getIdWrkrCreate();\n\t/**\n\t * Returns the idWrkrUpdate.\n\t * @return String\n\t */\n\tpublic String getIdWrkrUpdate();\n\t/**\n\t * Returns the myEntityCtx.\n\t * @return javax.ejb.EntityContext\n\t */\n\tpublic javax.ejb.EntityContext getMyEntityCtx();\n\t/**\n\t * Returns the tsCreate.\n\t * @return java.sql.Timestamp\n\t */\n\tpublic java.sql.Timestamp getTsCreate();\n\t/**\n\t * Returns the tsUpdate.\n\t * @return java.sql.Timestamp\n\t */\n\tpublic java.sql.Timestamp getTsUpdate();\n\t/**\n\t * Sets the idPassword.\n\t * @param idPassword The idPassword to set\n\t */\n\tpublic void setIdPassword(String idPassword);\n\t/**\n\t * Sets the idProfile.\n\t * @param idProfile The idProfile to set\n\t */\n\tpublic void setIdProfile(String idProfile);\n\t/**\n\t * Sets the idProfileDesc.\n\t * @param idProfileDesc The idProfileDesc to set\n\t */\n\tpublic void setIdProfileDesc(String idProfileDesc);\n\t/**\n\t * Sets the idWrkrUpdate.\n\t * @param idWrkrUpdate The idWrkrUpdate to set\n\t */\n\tpublic void setIdWrkrUpdate(String idWrkrUpdate);\n\t/**\n\t * Sets the tsUpdate.\n\t * @param tsUpdate The tsUpdate to set\n\t */\n\tpublic void setTsUpdate(java.sql.Timestamp tsUpdate);\n\t/**\n\t * Returns the nmWrkr.\n\t * @return String\n\t */\n\tpublic String getNmWrkr();\n\t/**\n\t * Sets the nmWrkr.\n\t * @param nmWrkr The nmWrkr to set\n\t */\n\tpublic void setNmWrkr(String nmWrkr);\n\t/**\n\t * Returns the cdPasswordStatus.\n\t * @return String\n\t */\n\tpublic String getCdPasswordStatus();\n\t/**\n\t * Sets the cdPasswordStatus.\n\t * @param cdPasswordStatus The cdPasswordStatus to set\n\t */\n\tpublic void setCdPasswordStatus(String cdPasswordStatus);\n\t/**\n\t * Returns the cdAccptWrkld.\n\t * @return String\n\t */\n\tpublic String getCdAccptWrkld();\n\t/**\n\t * Returns the nbApproval.\n\t * @return int\n\t */\n\tpublic int getNbApproval();\n\t/**\n\t * Returns the nbCompleted.\n\t * @return int\n\t */\n\tpublic int getNbCompleted();\n\t/**\n\t * Returns the nbOutstanding.\n\t * @return int\n\t */\n\tpublic int getNbOutstanding();\n\t/**\n\t * Sets the cdAccptWrkld.\n\t * @param cdAccptWrkld The cdAccptWrkld to set\n\t */\n\tpublic void setCdAccptWrkld(String cdAccptWrkld);\n\t/**\n\t * Sets the nbApproval.\n\t * @param nbApproval The nbApproval to set\n\t */\n\tpublic void setNbApproval(int nbApproval);\n\t/**\n\t * Sets the nbCompleted.\n\t * @param nbCompleted The nbCompleted to set\n\t */\n\tpublic void setNbCompleted(int nbCompleted);\n\t/**\n\t * Sets the nbOutstanding.\n\t * @param nbOutstanding The nbOutstanding to set\n\t */\n\tpublic void setNbOutstanding(int nbOutstanding);\n\t/**\n\t * Returns the byAgent.\n\t * @return boolean\n\t */\n\tpublic boolean isByAgent();\n\t/**\n\t * Returns the byControlNbr.\n\t * @return boolean\n\t */\n\tpublic boolean isByControlNbr();\n\t/**\n\t * Returns the byCounty.\n\t * @return boolean\n\t */\n\tpublic boolean isByCounty();\n\t/**\n\t * Returns the byCP.\n\t * @return boolean\n\t */\n\tpublic boolean isByCP();\n\t/**\n\t * Returns the byCustomer.\n\t * @return boolean\n\t */\n\tpublic boolean isByCustomer();\n\t/**\n\t * Returns the byDtCompleted.\n\t * @return boolean\n\t */\n\tpublic boolean isByDtCompleted();\n\t/**\n\t * Returns the byDtDue.\n\t * @return boolean\n\t */\n\tpublic boolean isByDtDue();\n\t/**\n\t * Returns the byDtReceived.\n\t * @return boolean\n\t */\n\tpublic boolean isByDtReceived();\n\t/**\n\t * Returns the byEmail.\n\t * @return boolean\n\t */\n\tpublic boolean isByEmail();\n\t/**\n\t * Returns the byIdPart.\n\t * @return boolean\n\t */\n\tpublic boolean isByIdPart();\n\t/**\n\t * Returns the byNbCase.\n\t * @return boolean\n\t */\n\tpublic boolean isByNbCase();\n\t/**\n\t * Returns the byNbDkt.\n\t * @return boolean\n\t */\n\tpublic boolean isByNbDkt();\n\t/**\n\t * Returns the byNbSSN.\n\t * @return boolean\n\t */\n\tpublic boolean isByNbSSN();\n\t/**\n\t * Returns the byNCP.\n\t * @return boolean\n\t */\n\tpublic boolean isByNCP();\n\t/**\n\t * Returns the byReferralType.\n\t * @return boolean\n\t */\n\tpublic boolean isByReferralType();\n\t/**\n\t * Returns the bySrc1.\n\t * @return boolean\n\t */\n\tpublic boolean isBySrc1();\n\t/**\n\t * Returns the bySrc2.\n\t * @return boolean\n\t */\n\tpublic boolean isBySrc2();\n\t/**\n\t * Returns the bySrc3.\n\t * @return boolean\n\t */\n\tpublic boolean isBySrc3();\n\t/**\n\t * Returns the bySrc4.\n\t * @return boolean\n\t */\n\tpublic boolean isBySrc4();\n\t/**\n\t * Returns the dirty.\n\t * @return boolean\n\t */\n\tpublic boolean isDirty();\n\t/**\n\t * Sets the byAgent.\n\t * @param byAgent The byAgent to set\n\t */\n\tpublic void setByAgent(boolean byAgent);\n\t/**\n\t * Sets the byControlNbr.\n\t * @param byControlNbr The byControlNbr to set\n\t */\n\tpublic void setByControlNbr(boolean byControlNbr);\n\t/**\n\t * Sets the byCounty.\n\t * @param byCounty The byCounty to set\n\t */\n\tpublic void setByCounty(boolean byCounty);\n\t/**\n\t * Sets the byCP.\n\t * @param byCP The byCP to set\n\t */\n\tpublic void setByCP(boolean byCP);\n\t/**\n\t * Sets the byCustomer.\n\t * @param byCustomer The byCustomer to set\n\t */\n\tpublic void setByCustomer(boolean byCustomer);\n\t/**\n\t * Sets the byDtCompleted.\n\t * @param byDtCompleted The byDtCompleted to set\n\t */\n\tpublic void setByDtCompleted(boolean byDtCompleted);\n\t/**\n\t * Sets the byDtDue.\n\t * @param byDtDue The byDtDue to set\n\t */\n\tpublic void setByDtDue(boolean byDtDue);\n\t/**\n\t * Sets the byDtReceived.\n\t * @param byDtReceived The byDtReceived to set\n\t */\n\tpublic void setByDtReceived(boolean byDtReceived);\n\t/**\n\t * Sets the byEmail.\n\t * @param byEmail The byEmail to set\n\t */\n\tpublic void setByEmail(boolean byEmail);\n\t/**\n\t * Sets the byIdPart.\n\t * @param byIdPart The byIdPart to set\n\t */\n\tpublic void setByIdPart(boolean byIdPart);\n\t/**\n\t * Sets the byNbCase.\n\t * @param byNbCase The byNbCase to set\n\t */\n\tpublic void setByNbCase(boolean byNbCase);\n\t/**\n\t * Sets the byNbDkt.\n\t * @param byNbDkt The byNbDkt to set\n\t */\n\tpublic void setByNbDkt(boolean byNbDkt);\n\t/**\n\t * Sets the byNbSSN.\n\t * @param byNbSSN The byNbSSN to set\n\t */\n\tpublic void setByNbSSN(boolean byNbSSN);\n\t/**\n\t * Sets the byNCP.\n\t * @param byNCP The byNCP to set\n\t */\n\tpublic void setByNCP(boolean byNCP);\n\t/**\n\t * Sets the byReferralType.\n\t * @param byReferralType The byReferralType to set\n\t */\n\tpublic void setByReferralType(boolean byReferralType);\n\t/**\n\t * Sets the bySrc1.\n\t * @param bySrc1 The bySrc1 to set\n\t */\n\tpublic void setBySrc1(boolean bySrc1);\n\t/**\n\t * Sets the bySrc2.\n\t * @param bySrc2 The bySrc2 to set\n\t */\n\tpublic void setBySrc2(boolean bySrc2);\n\t/**\n\t * Sets the bySrc3.\n\t * @param bySrc3 The bySrc3 to set\n\t */\n\tpublic void setBySrc3(boolean bySrc3);\n\t/**\n\t * Sets the bySrc4.\n\t * @param bySrc4 The bySrc4 to set\n\t */\n\tpublic void setBySrc4(boolean bySrc4);\n\t/**\n\t * Returns the cdApprovalRequired.\n\t * @return String\n\t */\n\tpublic String getCdApprovalRequired();\n\t/**\n\t * Sets the cdApprovalRequired.\n\t * @param cdApprovalRequired The cdApprovalRequired to set\n\t */\n\tpublic void setCdApprovalRequired(String cdApprovalRequired);\n\t/**\n\t * Returns the userEntityBean.\n\t * @return UserEntityBean\n\t */\n\tpublic UserEntityBean getUserEntityBean();\n\t/**\n\t * Sets the userEntityBean.\n\t * @param userEntityBean The userEntityBean to set\n\t */\n\tpublic void setUserEntityBean(UserEntityBean userEntityBean);\n}", "public interface CProjectPurposeDAO extends JpaDao<CProjectPurpose> {\n\n\t/**\n\t * JPQL Query - findCProjectPurposeByName\n\t *\n\t */\n\tpublic Set<CProjectPurpose> findCProjectPurposeByName(String name) throws DataAccessException;\n\n\t/**\n\t * JPQL Query - findCProjectPurposeByName\n\t *\n\t */\n\tpublic Set<CProjectPurpose> findCProjectPurposeByName(String name, int startResult, int maxRows) throws DataAccessException;\n\n\t/**\n\t * JPQL Query - findCProjectPurposeByPrimaryKey\n\t *\n\t */\n\tpublic CProjectPurpose findCProjectPurposeByPrimaryKey(Integer id) throws DataAccessException;\n\n\t/**\n\t * JPQL Query - findCProjectPurposeByPrimaryKey\n\t *\n\t */\n\tpublic CProjectPurpose findCProjectPurposeByPrimaryKey(Integer id, int startResult, int maxRows) throws DataAccessException;\n\n\t/**\n\t * JPQL Query - findCProjectPurposeById\n\t *\n\t */\n\tpublic CProjectPurpose findCProjectPurposeById(Integer id_1) throws DataAccessException;\n\n\t/**\n\t * JPQL Query - findCProjectPurposeById\n\t *\n\t */\n\tpublic CProjectPurpose findCProjectPurposeById(Integer id_1, int startResult, int maxRows) throws DataAccessException;\n\n\t/**\n\t * JPQL Query - findAllCProjectPurposes\n\t *\n\t */\n\tpublic Set<CProjectPurpose> findAllCProjectPurposes() throws DataAccessException;\n\n\t/**\n\t * JPQL Query - findAllCProjectPurposes\n\t *\n\t */\n\tpublic Set<CProjectPurpose> findAllCProjectPurposes(int startResult, int maxRows) throws DataAccessException;\n\n\t/**\n\t * JPQL Query - findCProjectPurposeByNameContaining\n\t *\n\t */\n\tpublic Set<CProjectPurpose> findCProjectPurposeByNameContaining(String name_1) throws DataAccessException;\n\n\t/**\n\t * JPQL Query - findCProjectPurposeByNameContaining\n\t *\n\t */\n\tpublic Set<CProjectPurpose> findCProjectPurposeByNameContaining(String name_1, int startResult, int maxRows) throws DataAccessException;\n\n}", "public Pojo1110110(){\r\n\t}", "public ScOrgSeqDAOImpl() {\n super();\n }", "private HibernateUtil() {\r\n }", "private HibernateUtil() {\n\t}", "public interface EepHeadLoadDAO extends DAO<EepHeadLoad> {\r\n\t/**\r\n\t * Sletter alle linjer tilhørende gitt hode\r\n\t * \r\n\t * @param head\r\n\t */\r\n\tvoid deleteImportFile(EepHeadLoad head);\r\n\r\n\t/**\r\n\t * Finner alle for gitt sekvensnummer\r\n\t * \r\n\t * @param nr\r\n\t * @return alle for gitt sekvensnummer\r\n\t */\r\n\tEepHeadLoad findBySequenceNumber(Integer nr);\r\n}", "public NamedEntity() { this(\"\", \"\"); }", "public AlarmEntity(){}", "public ProductosPuntoVentaDaoImpl() {\r\n }", "public Model() {\n this(Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME), new TextRepository());\n }", "public StoredProcedure() {\n }", "protected abstract E parseEntity(ResultSet rs) throws DAOException;", "@Test\n public void createQuejaEntityTest() {\n PodamFactory factory = new PodamFactoryImpl();\n QuejaEntity newEntity = factory.manufacturePojo(QuejaEntity.class);\n QuejaEntity result = quejaPersistence.create(newEntity);\n\n Assert.assertNotNull(result);\n QuejaEntity entity = em.find(QuejaEntity.class, result.getId());\n Assert.assertNotNull(entity);\n Assert.assertEquals(newEntity.getName(), entity.getName());\n}", "protected DaoRWImpl() {\r\n super();\r\n }", "@SuppressWarnings(\"all\")\r\npublic interface Person {\r\n\r\n /**\r\n * Constant value for lastname.\r\n */\r\n String LASTNAME = \"lastname\";\r\n\r\n /**\r\n * Gets the lastname.\r\n *\r\n * @hibernate.property\r\n * @hibernate.column\r\n * name = \"LASTNAME\"\r\n * length = \"64\"\r\n * @return the lastname.\r\n */\r\n java.lang.String getLastname();\r\n\r\n /**\r\n * Sets the lastname.\r\n *\r\n * @param lastname\r\n * the lastname to set.\r\n */\r\n void setLastname(java.lang.String lastname);\r\n\r\n\r\n\r\n /**\r\n * Constant value for firstname.\r\n */\r\n String FIRSTNAME = \"firstname\";\r\n\r\n /**\r\n * Gets the firstname.\r\n *\r\n * @hibernate.property\r\n * @hibernate.column\r\n * name = \"FIRSTNAME\"\r\n * length = \"64\"\r\n * @return the firstname.\r\n */\r\n java.lang.String getFirstname();\r\n\r\n /**\r\n * Sets the firstname.\r\n *\r\n * @param firstname\r\n * the firstname to set.\r\n */\r\n void setFirstname(java.lang.String firstname);\r\n\r\n\r\n\r\n /**\r\n * Constant value for createTimestamp.\r\n */\r\n String CREATE_TIMESTAMP = \"createTimestamp\";\r\n\r\n /**\r\n * Gets the createTimestamp.\r\n *\r\n * @hibernate.property\r\n * type = \"timestamp\"\r\n * @hibernate.column\r\n * name = \"CREATE_TIMESTAMP\"\r\n * @return the createTimestamp.\r\n */\r\n java.util.Date getCreateTimestamp();\r\n\r\n /**\r\n * Sets the createTimestamp.\r\n *\r\n * @param createTimestamp\r\n * the createTimestamp to set.\r\n */\r\n void setCreateTimestamp(java.util.Date createTimestamp);\r\n\r\n\r\n\r\n /**\r\n * Constant value for lastUpdateTimestamp.\r\n */\r\n String LAST_UPDATE_TIMESTAMP = \"lastUpdateTimestamp\";\r\n\r\n /**\r\n * Gets the lastUpdateTimestamp.\r\n *\r\n * @hibernate.property\r\n * type = \"timestamp\"\r\n * @hibernate.column\r\n * name = \"LAST_UPDATE_TIMESTAMP\"\r\n * @return the lastUpdateTimestamp.\r\n */\r\n java.util.Date getLastUpdateTimestamp();\r\n\r\n /**\r\n * Sets the lastUpdateTimestamp.\r\n *\r\n * @param lastUpdateTimestamp\r\n * the lastUpdateTimestamp to set.\r\n */\r\n void setLastUpdateTimestamp(java.util.Date lastUpdateTimestamp);\r\n\r\n\r\n\r\n\r\n}", "private ORMServiceFactory() { }", "public ParametroPorParametroPK() {\r\n\t}", "protected abstract T createEntityFromResult (final ResultSet result) throws SQLException;", "private static void init(){\n entityManager = HibernateUtil.getEntityManager();\n transaction = entityManager.getTransaction();\n }", "public T_2698Dao() {\n\t\tsuper(org.jooq.test.jdbc.generatedclasses.tables.T_2698.T_2698, org.jooq.test.jdbc.generatedclasses.tables.pojos.T_2698.class);\n\t}", "public Identity()\n {\n super( Fields.ARGS );\n }", "public interface DanhMucGiayToPersistence extends BasePersistence<DanhMucGiayTo> {\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. Always use {@link DanhMucGiayToUtil} to access the danh muc giay to persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.\n\t */\n\n\t/**\n\t* Caches the danh muc giay to in the entity cache if it is enabled.\n\t*\n\t* @param danhMucGiayTo the danh muc giay to\n\t*/\n\tpublic void cacheResult(\n\t\torg.oep.cmon.dao.tlct.model.DanhMucGiayTo danhMucGiayTo);\n\n\t/**\n\t* Caches the danh muc giay tos in the entity cache if it is enabled.\n\t*\n\t* @param danhMucGiayTos the danh muc giay tos\n\t*/\n\tpublic void cacheResult(\n\t\tjava.util.List<org.oep.cmon.dao.tlct.model.DanhMucGiayTo> danhMucGiayTos);\n\n\t/**\n\t* Creates a new danh muc giay to with the primary key. Does not add the danh muc giay to to the database.\n\t*\n\t* @param id the primary key for the new danh muc giay to\n\t* @return the new danh muc giay to\n\t*/\n\tpublic org.oep.cmon.dao.tlct.model.DanhMucGiayTo create(long id);\n\n\t/**\n\t* Removes the danh muc giay to with the primary key from the database. Also notifies the appropriate model listeners.\n\t*\n\t* @param id the primary key of the danh muc giay to\n\t* @return the danh muc giay to that was removed\n\t* @throws org.oep.cmon.dao.tlct.NoSuchDanhMucGiayToException if a danh muc giay to with the primary key could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic org.oep.cmon.dao.tlct.model.DanhMucGiayTo remove(long id)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\torg.oep.cmon.dao.tlct.NoSuchDanhMucGiayToException;\n\n\tpublic org.oep.cmon.dao.tlct.model.DanhMucGiayTo updateImpl(\n\t\torg.oep.cmon.dao.tlct.model.DanhMucGiayTo danhMucGiayTo, boolean merge)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the danh muc giay to with the primary key or throws a {@link org.oep.cmon.dao.tlct.NoSuchDanhMucGiayToException} if it could not be found.\n\t*\n\t* @param id the primary key of the danh muc giay to\n\t* @return the danh muc giay to\n\t* @throws org.oep.cmon.dao.tlct.NoSuchDanhMucGiayToException if a danh muc giay to with the primary key could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic org.oep.cmon.dao.tlct.model.DanhMucGiayTo findByPrimaryKey(long id)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\torg.oep.cmon.dao.tlct.NoSuchDanhMucGiayToException;\n\n\t/**\n\t* Returns the danh muc giay to with the primary key or returns <code>null</code> if it could not be found.\n\t*\n\t* @param id the primary key of the danh muc giay to\n\t* @return the danh muc giay to, or <code>null</code> if a danh muc giay to with the primary key could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic org.oep.cmon.dao.tlct.model.DanhMucGiayTo fetchByPrimaryKey(long id)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the danh muc giay to where ma = &#63; or throws a {@link org.oep.cmon.dao.tlct.NoSuchDanhMucGiayToException} if it could not be found.\n\t*\n\t* @param ma the ma\n\t* @return the matching danh muc giay to\n\t* @throws org.oep.cmon.dao.tlct.NoSuchDanhMucGiayToException if a matching danh muc giay to could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic org.oep.cmon.dao.tlct.model.DanhMucGiayTo findByMa(\n\t\tjava.lang.String ma)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\torg.oep.cmon.dao.tlct.NoSuchDanhMucGiayToException;\n\n\t/**\n\t* Returns the danh muc giay to where ma = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.\n\t*\n\t* @param ma the ma\n\t* @return the matching danh muc giay to, or <code>null</code> if a matching danh muc giay to could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic org.oep.cmon.dao.tlct.model.DanhMucGiayTo fetchByMa(\n\t\tjava.lang.String ma)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the danh muc giay to where ma = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.\n\t*\n\t* @param ma the ma\n\t* @param retrieveFromCache whether to use the finder cache\n\t* @return the matching danh muc giay to, or <code>null</code> if a matching danh muc giay to could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic org.oep.cmon.dao.tlct.model.DanhMucGiayTo fetchByMa(\n\t\tjava.lang.String ma, boolean retrieveFromCache)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the danh muc giay to where ma = &#63; or throws a {@link org.oep.cmon.dao.tlct.NoSuchDanhMucGiayToException} if it could not be found.\n\t*\n\t* @param ma the ma\n\t* @return the matching danh muc giay to\n\t* @throws org.oep.cmon.dao.tlct.NoSuchDanhMucGiayToException if a matching danh muc giay to could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic org.oep.cmon.dao.tlct.model.DanhMucGiayTo findByByMa(\n\t\tjava.lang.String ma)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\torg.oep.cmon.dao.tlct.NoSuchDanhMucGiayToException;\n\n\t/**\n\t* Returns the danh muc giay to where ma = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.\n\t*\n\t* @param ma the ma\n\t* @return the matching danh muc giay to, or <code>null</code> if a matching danh muc giay to could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic org.oep.cmon.dao.tlct.model.DanhMucGiayTo fetchByByMa(\n\t\tjava.lang.String ma)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the danh muc giay to where ma = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.\n\t*\n\t* @param ma the ma\n\t* @param retrieveFromCache whether to use the finder cache\n\t* @return the matching danh muc giay to, or <code>null</code> if a matching danh muc giay to could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic org.oep.cmon.dao.tlct.model.DanhMucGiayTo fetchByByMa(\n\t\tjava.lang.String ma, boolean retrieveFromCache)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns all the danh muc giay tos where daXoa = &#63;.\n\t*\n\t* @param daXoa the da xoa\n\t* @return the matching danh muc giay tos\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic java.util.List<org.oep.cmon.dao.tlct.model.DanhMucGiayTo> findByTrangThai(\n\t\tint daXoa) throws com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns a range of all the danh muc giay tos where daXoa = &#63;.\n\t*\n\t* <p>\n\t* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.\n\t* </p>\n\t*\n\t* @param daXoa the da xoa\n\t* @param start the lower bound of the range of danh muc giay tos\n\t* @param end the upper bound of the range of danh muc giay tos (not inclusive)\n\t* @return the range of matching danh muc giay tos\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic java.util.List<org.oep.cmon.dao.tlct.model.DanhMucGiayTo> findByTrangThai(\n\t\tint daXoa, int start, int end)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns an ordered range of all the danh muc giay tos where daXoa = &#63;.\n\t*\n\t* <p>\n\t* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.\n\t* </p>\n\t*\n\t* @param daXoa the da xoa\n\t* @param start the lower bound of the range of danh muc giay tos\n\t* @param end the upper bound of the range of danh muc giay tos (not inclusive)\n\t* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)\n\t* @return the ordered range of matching danh muc giay tos\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic java.util.List<org.oep.cmon.dao.tlct.model.DanhMucGiayTo> findByTrangThai(\n\t\tint daXoa, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the first danh muc giay to in the ordered set where daXoa = &#63;.\n\t*\n\t* <p>\n\t* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.\n\t* </p>\n\t*\n\t* @param daXoa the da xoa\n\t* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)\n\t* @return the first matching danh muc giay to\n\t* @throws org.oep.cmon.dao.tlct.NoSuchDanhMucGiayToException if a matching danh muc giay to could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic org.oep.cmon.dao.tlct.model.DanhMucGiayTo findByTrangThai_First(\n\t\tint daXoa,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\torg.oep.cmon.dao.tlct.NoSuchDanhMucGiayToException;\n\n\t/**\n\t* Returns the last danh muc giay to in the ordered set where daXoa = &#63;.\n\t*\n\t* <p>\n\t* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.\n\t* </p>\n\t*\n\t* @param daXoa the da xoa\n\t* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)\n\t* @return the last matching danh muc giay to\n\t* @throws org.oep.cmon.dao.tlct.NoSuchDanhMucGiayToException if a matching danh muc giay to could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic org.oep.cmon.dao.tlct.model.DanhMucGiayTo findByTrangThai_Last(\n\t\tint daXoa,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\torg.oep.cmon.dao.tlct.NoSuchDanhMucGiayToException;\n\n\t/**\n\t* Returns the danh muc giay tos before and after the current danh muc giay to in the ordered set where daXoa = &#63;.\n\t*\n\t* <p>\n\t* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.\n\t* </p>\n\t*\n\t* @param id the primary key of the current danh muc giay to\n\t* @param daXoa the da xoa\n\t* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)\n\t* @return the previous, current, and next danh muc giay to\n\t* @throws org.oep.cmon.dao.tlct.NoSuchDanhMucGiayToException if a danh muc giay to with the primary key could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic org.oep.cmon.dao.tlct.model.DanhMucGiayTo[] findByTrangThai_PrevAndNext(\n\t\tlong id, int daXoa,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\torg.oep.cmon.dao.tlct.NoSuchDanhMucGiayToException;\n\n\t/**\n\t* Returns all the danh muc giay tos.\n\t*\n\t* @return the danh muc giay tos\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic java.util.List<org.oep.cmon.dao.tlct.model.DanhMucGiayTo> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns a range of all the danh muc giay tos.\n\t*\n\t* <p>\n\t* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.\n\t* </p>\n\t*\n\t* @param start the lower bound of the range of danh muc giay tos\n\t* @param end the upper bound of the range of danh muc giay tos (not inclusive)\n\t* @return the range of danh muc giay tos\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic java.util.List<org.oep.cmon.dao.tlct.model.DanhMucGiayTo> findAll(\n\t\tint start, int end)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns an ordered range of all the danh muc giay tos.\n\t*\n\t* <p>\n\t* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.\n\t* </p>\n\t*\n\t* @param start the lower bound of the range of danh muc giay tos\n\t* @param end the upper bound of the range of danh muc giay tos (not inclusive)\n\t* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)\n\t* @return the ordered range of danh muc giay tos\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic java.util.List<org.oep.cmon.dao.tlct.model.DanhMucGiayTo> findAll(\n\t\tint start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Removes the danh muc giay to where ma = &#63; from the database.\n\t*\n\t* @param ma the ma\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic void removeByMa(java.lang.String ma)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\torg.oep.cmon.dao.tlct.NoSuchDanhMucGiayToException;\n\n\t/**\n\t* Removes the danh muc giay to where ma = &#63; from the database.\n\t*\n\t* @param ma the ma\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic void removeByByMa(java.lang.String ma)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\torg.oep.cmon.dao.tlct.NoSuchDanhMucGiayToException;\n\n\t/**\n\t* Removes all the danh muc giay tos where daXoa = &#63; from the database.\n\t*\n\t* @param daXoa the da xoa\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic void removeByTrangThai(int daXoa)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Removes all the danh muc giay tos from the database.\n\t*\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the number of danh muc giay tos where ma = &#63;.\n\t*\n\t* @param ma the ma\n\t* @return the number of matching danh muc giay tos\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic int countByMa(java.lang.String ma)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the number of danh muc giay tos where ma = &#63;.\n\t*\n\t* @param ma the ma\n\t* @return the number of matching danh muc giay tos\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic int countByByMa(java.lang.String ma)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the number of danh muc giay tos where daXoa = &#63;.\n\t*\n\t* @param daXoa the da xoa\n\t* @return the number of matching danh muc giay tos\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic int countByTrangThai(int daXoa)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the number of danh muc giay tos.\n\t*\n\t* @return the number of danh muc giay tos\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic int countAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n}", "public interface Entity {\n}", "public RoleEntity(){}", "private EmployeeRepository(){\n\t\t\n\t}" ]
[ "0.709997", "0.6590552", "0.6524255", "0.6348252", "0.62945795", "0.62742096", "0.6267447", "0.6264553", "0.62268215", "0.6192787", "0.6187149", "0.6163689", "0.6137692", "0.61270005", "0.6119572", "0.6067697", "0.6063403", "0.60300106", "0.60267395", "0.6016325", "0.6006536", "0.59966147", "0.5991307", "0.5966856", "0.59640944", "0.5959182", "0.5958362", "0.59563524", "0.59507793", "0.5913268", "0.5909294", "0.5890611", "0.58871794", "0.58847517", "0.5872835", "0.58574843", "0.58342403", "0.58291066", "0.58104694", "0.58040404", "0.58005625", "0.5777914", "0.5772794", "0.5766988", "0.5755512", "0.57478404", "0.57437986", "0.573492", "0.57335997", "0.5730867", "0.57281023", "0.5722388", "0.5717325", "0.5716654", "0.57113457", "0.57111114", "0.5710903", "0.570565", "0.57021075", "0.5683929", "0.56830305", "0.56830305", "0.5668351", "0.5664344", "0.56598073", "0.5654747", "0.5647428", "0.56263095", "0.56214625", "0.56153655", "0.56119555", "0.5597574", "0.559493", "0.55932885", "0.5589224", "0.5578393", "0.55751437", "0.5573703", "0.5573502", "0.55715615", "0.55679846", "0.55644673", "0.556405", "0.55625594", "0.555928", "0.5558275", "0.5558132", "0.5557924", "0.5554709", "0.5552679", "0.5549967", "0.55492663", "0.5539441", "0.5531666", "0.55224776", "0.5522406", "0.5519409", "0.5516764", "0.5513829", "0.5511943", "0.5511888" ]
0.0
-1
Create a new builder instance to create LocationPK from.
public static Builder newBuilder() { return new Builder(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LocationBuilder() {\n super(\"locations\");\n }", "private Location(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "protected LocationPK() {\n super();\n }", "private LocationProtocol(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public phaseI.Hdfs.DataNodeLocation.Builder getLocationBuilder() {\n bitField0_ |= 0x00000002;\n onChanged();\n return getLocationFieldBuilder().getBuilder();\n }", "private UDeliveryLocation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private BlockLocations(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private BlockLocationRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "Location createLocation();", "Location createLocation();", "Location createLocation();", "@Nonnull\n public static UBL23WriterBuilder <TradeItemLocationProfileType> tradeItemLocationProfile ()\n {\n return UBL23WriterBuilder.create (TradeItemLocationProfileType.class);\n }", "public Builder setLocationBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n location_ = value;\n onChanged();\n return this;\n }", "public Location() {\n\t}", "private MobileLocationData(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Builder() {}", "public Builder() {}", "public Builder() {}", "private BlockLocationResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Builder() { }", "public ProductLocation() {\n }", "public Location() {\n }", "private StoreChunkLocation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public static Builder fromLocationString(final String location) {\n if (StringUtils.isBlank(location)) {\n throw new IllegalArgumentException(\"Location is null or blank\");\n }\n\n final String[] locationParts = location.split(SEPARATOR);\n if (locationParts.length != 4) {\n throw new IllegalArgumentException(\"Invalid location: \" + location);\n }\n\n return new Builder()\n .group(locationParts[0])\n .artifact(locationParts[1])\n .version(locationParts[2])\n .bundleIdentifier(locationParts[3].replace(\".nar\", \"\"));\n }", "private DataNodeLocation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public CreateStatementBuilder setLocation(Location location) {\n this.location = location.toURI().toString();\n return this;\n }", "protected void createLocationRequest() {\n\t\tmLocationRequest = new LocationRequest();\n\t\tmLocationRequest.setInterval(UPDATE_INTERVAL);\n\t\tmLocationRequest.setFastestInterval(FATEST_INTERVAL);\n\t\tmLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n\t\tmLocationRequest.setSmallestDisplacement(DISPLACEMENT);\n\t}", "public Builder() {\n\t\t}", "public org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.Pinger.Builder getPingerLocBuilder() {\n bitField0_ |= 0x00000200;\n onChanged();\n return getPingerLocFieldBuilder().getBuilder();\n }", "private Builder() {}", "private void createLocationRequest() {\n mLocationRequest = new LocationRequest();\n mLocationRequest = LocationRequest.create();\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n }", "public Builder() {\n }", "public void createLocationRequest(){\n locationRequest = new LocationRequest();\n locationRequest.setInterval(1000);\n locationRequest.setFastestInterval(500);\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n }", "private LocationContract() {}", "Builder addLocationCreated(Place.Builder value);", "public Builder() {\n }", "public Builder() {\n }", "public CreateStatementBuilder setLocation(String location) {\n this.location = location;\n return this;\n }", "public Builder clearLocation() {\n \n location_ = getDefaultInstance().getLocation();\n onChanged();\n return this;\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n phaseI.Hdfs.DataNodeLocation, phaseI.Hdfs.DataNodeLocation.Builder, phaseI.Hdfs.DataNodeLocationOrBuilder> \n getLocationFieldBuilder() {\n if (locationBuilder_ == null) {\n locationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n phaseI.Hdfs.DataNodeLocation, phaseI.Hdfs.DataNodeLocation.Builder, phaseI.Hdfs.DataNodeLocationOrBuilder>(\n getLocation(),\n getParentForChildren(),\n isClean());\n location_ = null;\n }\n return locationBuilder_;\n }", "private Builder() {\n\t\t}", "public LocationPoint(){\n this.mLocationID = UUID.randomUUID();\n }", "private Builder() {\n }", "private Builder() {\n }", "interface WithLocation {\n /**\n * Specifies the region for the resource.\n *\n * @param location Specifies the supported Azure location where the job should be created.\n * @return the next definition stage.\n */\n WithCreate withRegion(Region location);\n\n /**\n * Specifies the region for the resource.\n *\n * @param location Specifies the supported Azure location where the job should be created.\n * @return the next definition stage.\n */\n WithCreate withRegion(String location);\n }", "interface WithLocation {\n /**\n * Specifies the region for the resource.\n *\n * @param location The geo-location where the resource lives.\n * @return the next definition stage.\n */\n WithCreate withRegion(Region location);\n\n /**\n * Specifies the region for the resource.\n *\n * @param location The geo-location where the resource lives.\n * @return the next definition stage.\n */\n WithCreate withRegion(String location);\n }", "public com.google.devtools.clouderrorreporting.v1beta1.SourceLocation.Builder\n getReportLocationBuilder() {\n bitField0_ |= 0x00000004;\n onChanged();\n return getReportLocationFieldBuilder().getBuilder();\n }", "public Builder setLocation(\n phaseI.Hdfs.DataNodeLocation.Builder builderForValue) {\n if (locationBuilder_ == null) {\n location_ = builderForValue.build();\n onChanged();\n } else {\n locationBuilder_.setMessage(builderForValue.build());\n }\n bitField0_ |= 0x00000002;\n return this;\n }", "protected void createLocationRequest() {\n mLocationRequest = new LocationRequest();\n int UPDATE_INTERVAL = 1000 * 60 * 5;\n mLocationRequest.setInterval(UPDATE_INTERVAL);\n int FASTEST_INTERVAL = 5000;\n mLocationRequest.setFastestInterval(FASTEST_INTERVAL);\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n int DISPLACEMENT = 20;\n mLocationRequest.setSmallestDisplacement(DISPLACEMENT); // 20 meters\n }", "public void buildLocation() {\n try (PreparedStatement prep = Database.getConnection()\n .prepareStatement(\"CREATE TABLE IF NOT EXISTS location (location_name\"\n + \" TEXT, lat REAL, lon REAL PRIMARY KEY (location_name));\")) {\n prep.executeUpdate();\n } catch (final SQLException e) {\n e.printStackTrace();\n }\n }", "private FileLocation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "static Builder builder() {\n return new Builder();\n }", "public Location() {\r\n \r\n }", "protected void createLocationRequest() {\n mLocationRequest = new LocationRequest();\n //Sets the preferred interval for GPS location updates\n mLocationRequest.setInterval(UPDATE_INTERVAL_IN_MS);\n //Sets the fastest interval for GPS location updates\n mLocationRequest.setFastestInterval(FASTEST_UPDATE_INTERVAL_IN_MS);\n //Sets priority of the GPS location to accuracy\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n }", "private Builder()\n {\n }", "private LocationRequest createLocationRequest() {\r\n LocationRequest mLocationRequest = new LocationRequest();\r\n mLocationRequest.setInterval(2000);\r\n mLocationRequest.setFastestInterval(1000);\r\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\r\n return mLocationRequest;\r\n }", "@Override\n\tpublic Location newInstance() {\n\t\treturn new Location(this.X,this.Y,0);\n\t}", "private ParkingAddress(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public static ApiRequest.ApiRequestBuilder builder() {\n final ApiRequest.ApiRequestBuilder builder = new ApiRequestBuilderCustom();\n return builder\n .requestStartTime(Instant.now().toEpochMilli())\n .requestId(UUID.randomUUID().toString());\n }", "public Builder setLocation(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n location_ = value;\n onChanged();\n return this;\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder(){ return new Builder(); }", "public Builder(){\n }", "protected void createLocationRequest() {\n mLocationRequest = new LocationRequest();\n\n // Sets the desired interval for active location updates. This interval is\n // inexact.\n mLocationRequest.setInterval(UPDATE_INTERVAL_IN_MILLISECONDS);\n\n // Sets the fastest rate for active location updates. This interval is exact, and your\n // application will never receive updates faster than this value.\n mLocationRequest.setFastestInterval(FASTEST_UPDATE_INTERVAL_IN_MILLISECONDS);\n\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n Log.d(Constants.LOCATION_REQUEST, Constants.LOCATION_REQUEST);\n }", "public Location (java.lang.Long uniqueId) {\n \t\tsuper(uniqueId);\n \t}", "public LocationData()\n {\n }", "public static Builder builder ()\n {\n\n return new Builder ();\n\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public google.maps.fleetengine.v1.VehicleLocation.Builder getLastLocationBuilder() {\n \n onChanged();\n return getLastLocationFieldBuilder().getBuilder();\n }", "protected void createLocationRequest() {\n System.out.println(\"In CREATE LOCATION REQUEST\");\n mLocationRequest = new LocationRequest();\n mLocationRequest.setInterval(60 * 1000);\n mLocationRequest.setFastestInterval(5 * 1000);\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n //mLocationRequest.setSmallestDisplacement(Utils.DISPLACEMENT);\n }", "private SupplierInfoBuilder() {\n }", "private LookupResult(Builder builder) {\n super(builder);\n }", "private Builder() {\n super(br.unb.cic.bionimbus.avro.gen.JobInfo.SCHEMA$);\n }", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "static Builder builder() {\n return new SourceContextImpl.Builder();\n }", "public static ProductBuilder builder() {\n return ProductBuilder.of();\n }", "public Marker createLocationMarker(Hospital location) {\n\n ArrayList<Double> latLong = new ArrayList<>();\n latLong.add(location.getLatitude());\n latLong.add(location.getLongitude());\n LatLong hospitalLocation = new LatLong(latLong.get(0), latLong.get(1));\n\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(hospitalLocation);\n markerOptions.title(location.getName());\n markerOptions.label(String.valueOf(location.getId()));\n\n if (location.getId() < 0) {\n markerOptions.label(\"X\");\n } else {\n markerOptions.label(location.getId().toString());\n }\n\n return new Marker(markerOptions);\n }", "public Builder setLocationtype(Report.LocationOuterClass.Location.LocationType value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n locationtype_ = value.getNumber();\n onChanged();\n return this;\n }", "public EnvioPersonaPK() {\r\n }", "private AptitudeLevel(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public edu.usfca.cs.dfs.StorageMessages.FileLocation.Builder getFileLocationBuilder() {\n return getFileLocationFieldBuilder().getBuilder();\n }", "public ASLocation()\n\t{\n\t\tsuper() ;\n\t\tprepare() ;\n\t}", "public LocationDetailsType() {\n super();\n }", "public Builder setPingerLoc(\n org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.Pinger.Builder builderForValue) {\n if (pingerLocBuilder_ == null) {\n pingerLoc_ = builderForValue.build();\n onChanged();\n } else {\n pingerLocBuilder_.setMessage(builderForValue.build());\n }\n bitField0_ |= 0x00000200;\n return this;\n }" ]
[ "0.70768183", "0.6647645", "0.65161836", "0.63645816", "0.6124453", "0.6083423", "0.5981626", "0.58737534", "0.57379574", "0.57379574", "0.57379574", "0.56913275", "0.568286", "0.56506985", "0.56062806", "0.56006193", "0.56006193", "0.56006193", "0.558154", "0.55652875", "0.5564351", "0.5550083", "0.55405205", "0.55289155", "0.55286765", "0.55220467", "0.55074865", "0.5500685", "0.54888576", "0.5467794", "0.5449857", "0.54304504", "0.54277796", "0.5427633", "0.54148006", "0.5412425", "0.5412425", "0.54073036", "0.539238", "0.5376537", "0.5376132", "0.5361286", "0.5352437", "0.5352437", "0.5344955", "0.53415704", "0.53396124", "0.53170145", "0.53089124", "0.52999324", "0.52902794", "0.52789026", "0.52717227", "0.5261641", "0.52616185", "0.52561706", "0.52462965", "0.5240061", "0.5226734", "0.51998264", "0.51600987", "0.51600987", "0.51600987", "0.5159124", "0.515877", "0.51548845", "0.5153928", "0.51462346", "0.5132598", "0.51291555", "0.51291555", "0.51291555", "0.51291555", "0.5125477", "0.5125477", "0.5125477", "0.5125477", "0.5125477", "0.5125477", "0.5125477", "0.5125477", "0.5125477", "0.5125477", "0.5125477", "0.51246756", "0.5124316", "0.5123648", "0.51047045", "0.50987315", "0.50968885", "0.50968885", "0.5096579", "0.50909245", "0.50766444", "0.5070049", "0.50637674", "0.50600266", "0.5052758", "0.5049152", "0.5035081", "0.50349593" ]
0.0
-1
/~ methods Get the area region.
public String getArea() { return this.area; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IRegion getRegion();", "public abstract int getArea();", "public Rectangle getArea() {\n return area;\n }", "public CoordinateRadius getRegion();", "public int getArea() {\n\t\treturn area;\n\t}", "public int getArea()\n {\n return area;\n }", "public TypeOfRegion getRegion();", "public abstract String getArea();", "public double getArea();", "public double getArea();", "public double getArea();", "double getArea();", "double getArea();", "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public String getArea() {\n\t\treturn area;\n\t}", "Region region();", "Region region();", "Region region();", "Region region();", "public abstract double getArea();", "public abstract double getArea();", "public abstract double getArea();", "public Polygon getArea() {\n\t\treturn area;\n\t}", "public double getArea()\n {\n return area;\n }", "public int area() {\n \tarea = width()*height();\n }", "public abstract float getArea();", "public double getArea() {\n\t\treturn this.area;\n\t}", "public Region getRegion() {\n return region;\n }", "public Rectangle2D.Float getRegion() {\n\t\t\treturn new Rectangle2D.Float(origin.x, origin.y, width, height);\n\t\t}", "@NotNull\n @Generated\n @Selector(\"region\")\n public native UIRegion region();", "public int getArea() {\n\t\treturn this.height * this.width;\n\t}", "AREA createAREA();", "int getRegionValue();", "public double area(){\n return (base*height) / 2;\n }", "public double getArea() {\n\t\treturn 4.0 * Math.PI * this.radius * this.radius;\n\t}", "@Override\r\n\tpublic double getArea() {\n\t\treturn (this.base * this.height)/2;\r\n\t}", "public double get_Area() {\n return this.Area;\n }", "public String getLocationArea() {\n return locationArea;\n }", "public float getArea() {\n return area;\n }", "double getArea() {\n return width * height;\n }", "public double getArea(){\n return 3.14 * radius * radius;\n }", "public double getArea() {\n\t\treturn this.radius * this.radius * Math.PI;\n\t}", "@Override\n\tpublic double getArea() {\n\t\treturn (0.5*this.base*this.height);\n\t}", "public Integer getArea() {\n\t\treturn this.getX() * this.getY();\n\t}", "public double area() {\n\t\treturn width * height;\n\t}", "public final int getArea()\n\t{\n\t\treturn address >>> 12;\n\t}", "@Override\n\tpublic double getArea() {\n\t\treturn height * width;\n\t}", "public float getArea(){\n return area;\n\t}", "abstract void findArea();", "abstract void findArea();", "public int getArea(){\n return imageArea;\n }", "public double getArea() {\n\t\treturn super.getArea()*height;\r\n\t}", "public double getArea() {\n /*\n * area = base (1o lado ou 3o lado) x altura (2o lado ou 4o lado)\n */\n\n return this.getLado(1) * this.getLado(2);\n }", "@Override\n public double obtenerArea(){\n return c.obtenerArea() * 4;\n }", "@Override\r\n\tpublic void getarea(int a) {\n\t\t\r\n\t}", "public EnumRegion getRegion()\n {\n return region;\n }", "public int getCodigoArea() { return this.codigoArea; }", "public int getCodigoArea() { return this.codigoArea; }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "public int area() {\r\n\t\tint area = (getLength()) * (getBreath());\r\n\t\treturn (area);\r\n\t}", "@Override\n public double getArea() {\n return (int) this.radiusX * (int) this.radiusY * Math.PI;\n }", "@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}", "@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}", "public double getArea() {\n return ((this.xR - this.xL) * (this.yT - this.yD));\n }", "@Override\n\tpublic double area() {\n\t\treturn getBase()*getAltura();\n\t}", "public double area(){\r\n\t\treturn this.base()*this.altezza();\r\n\t}", "double area() {\n System.out.println(\"Inside Area for Rectangle.\");\n return dim1 * dim2;\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "double getArea(){\n return height*width;\n }", "public double area() {\n return (width * height);\n }", "Double getAreaValue();", "public int getAreaNo() {\n return areaNo_;\n }", "public double areaRectangulo() {\n double area = altura * ancho;\n return area;\n }", "public String areaCode() {\n return areaCode;\n }", "public int getAreaNo() {\n return areaNo_;\n }", "public double getArea() {\n\t\treturn height * length;\n\t}", "@Override\n\tpublic double getArea() {\n\t\treturn Math.pow(getSide(), 2) * this.N / 4 * (Math.tan(Math.toRadians(180 / this.N)));\n\t}", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public double getArea() {\n return Math.PI * Math.pow(radius, 2.0);\n }", "public Shape getAreaColision();", "public int getArea() {\n return (getXLength() * getYWidth());\n }", "@Override\r\n\tpublic double getArea() {\n\t\tdouble Area1 = ((super.getLength() * height));\r\n\t\tdouble Area2 = ((super.getWidth() * height));\r\n\t\treturn (Area1 * 2 + Area2 * 2 + super.getArea() * 2);\r\n\t\t\r\n\t}", "public AreaGeometry getGeometry() {\n return this.geometry;\n }", "public double area();", "public double area()\r\n {\r\n double area;\r\n \r\n area = mRadius * mRadius * 3.14159;\r\n \r\n return area;\r\n }", "public int getRegionValue() {\n return region_;\n }", "protected double getArea(File regionFile) {\n\t\treturn 0;\n\t}", "public String getRegion() {\n return region;\n }", "@Override\n public double getArea() {\n return this.length*this.width; //To change body of generated methods, choose Tools | Templates.\n }" ]
[ "0.7903885", "0.7709677", "0.766932", "0.7522972", "0.7504434", "0.7475805", "0.7456614", "0.74527776", "0.7445367", "0.7445367", "0.7445367", "0.7422934", "0.7422934", "0.7385808", "0.7385808", "0.7385808", "0.7368982", "0.7355744", "0.73375696", "0.73375696", "0.73375696", "0.73375696", "0.73034376", "0.73034376", "0.73034376", "0.72786695", "0.7277112", "0.7258338", "0.7206606", "0.72064394", "0.72063595", "0.71603674", "0.71532553", "0.7087963", "0.7057258", "0.70531374", "0.7050332", "0.7046623", "0.70313275", "0.7020973", "0.700528", "0.69978374", "0.6979058", "0.69547135", "0.69187766", "0.6917043", "0.6912497", "0.69105566", "0.6910322", "0.6895498", "0.6894125", "0.6889113", "0.6889113", "0.68836546", "0.6878188", "0.6872323", "0.6865075", "0.6864898", "0.68433434", "0.68402237", "0.68402237", "0.68307626", "0.68307626", "0.68307626", "0.6829056", "0.6828556", "0.6820656", "0.6820656", "0.6817455", "0.6814073", "0.6803232", "0.6800258", "0.678459", "0.678459", "0.678459", "0.67736304", "0.6768516", "0.67624235", "0.6734772", "0.6724118", "0.6717022", "0.6713149", "0.6713066", "0.67130065", "0.6700701", "0.6700701", "0.6700701", "0.6700701", "0.6700701", "0.6696811", "0.6694081", "0.66887516", "0.66882527", "0.66870433", "0.668559", "0.6681811", "0.6678627", "0.6674045", "0.6673322", "0.6670568" ]
0.7431284
11
Get the aisle region.
public String getAisle() { return this.aisle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IRegion getRegion();", "public CoordinateRadius getRegion();", "public EnumRegion getRegion()\n {\n return region;\n }", "public TypeOfRegion getRegion();", "public Region getRegion() {\n return region;\n }", "Region region();", "Region region();", "Region region();", "Region region();", "int getRegionValue();", "public int getItuRegion() {\n return localItuRegion;\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public kr.pik.message.Profile.HowMe.Region getRegion() {\n kr.pik.message.Profile.HowMe.Region result = kr.pik.message.Profile.HowMe.Region.valueOf(region_);\n return result == null ? kr.pik.message.Profile.HowMe.Region.UNRECOGNIZED : result;\n }", "public LocalRegion getRegion() {\n\t\treturn this.region;\n\t}", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public kr.pik.message.Profile.HowMe.Region getRegion() {\n kr.pik.message.Profile.HowMe.Region result = kr.pik.message.Profile.HowMe.Region.valueOf(region_);\n return result == null ? kr.pik.message.Profile.HowMe.Region.UNRECOGNIZED : result;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public java.lang.String getREGION()\n {\n \n return __REGION;\n }", "public int getRegionValue() {\n return region_;\n }", "private Location getRegion() {\n Set<? extends Location> locations = blobStore.listAssignableLocations();\n if (!(swiftRegion == null || \"\".equals(swiftRegion))) {\n for (Location location : locations) {\n if (location.getId().equals(swiftRegion)) {\n return location;\n }\n }\n }\n if (locations.size() != 0) {\n return get(locations, 0);\n } else {\n return null;\n }\n }", "public Rectangle2D.Float getRegion() {\n\t\t\treturn new Rectangle2D.Float(origin.x, origin.y, width, height);\n\t\t}", "public String getRegion() {\n return this.region;\n }", "public Region getCurrentRegion() {\n\n return currentRegion;\n }", "public java.util.Enumeration getRegion() throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n return ejbRef().getRegion();\n }", "kr.pik.message.Profile.HowMe.Region getRegion();", "public int getRegionValue() {\n return region_;\n }", "java.lang.String getRegionCode();", "@AutoEscape\n public String getRegion();", "String regionName();", "String regionName();", "String regionName();", "String regionName();", "@NotNull\n @Generated\n @Selector(\"region\")\n public native UIRegion region();", "@Nullable public abstract URI region();", "public final SphRegion get_cur_region () {\n\t\tif (!( modstate >= MODSTATE_CATALOG )) {\n\t\t\tthrow new IllegalStateException (\"Access to RJGUIModel.cur_region while in state \" + cur_modstate_string());\n\t\t}\n\t\treturn fetch_fcparams.aftershock_search_region;\n\t}", "public ShowRegionElements getShowRegionAccess() {\n\t\treturn pShowRegion;\n\t}", "public RegionState getRegionForState(String state);", "public NegotiableQuoteAddressRegion getRegion() {\n return (NegotiableQuoteAddressRegion) get(\"region\");\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<String> getRegion() {\n\t\treturn getSqlMapClientTemplate().queryForList(\"R_ALARM_LOG.getRegion\");\r\n\t}", "@Override\n public STRegion getBoundingBox() {\n\n SQLiteDatabase db = this.getReadableDatabase();\n\n String query = \"SELECT minX FROM \" + this.table_identifier + \" ORDER BY minX ASC LIMIT 1;\";\n float minX = getRowValueHelper(db, query, 0);\n query = \"SELECT minY FROM \" + this.table_identifier + \" ORDER BY minY ASC Limit 1;\";\n float minY = getRowValueHelper(db, query, 0);\n query = \"SELECT minT FROM \" + this.table_identifier + \" ORDER BY minT ASC Limit 1;\";\n float minT = getRowValueHelper(db, query, 0);\n query = \"SELECT maxX FROM \" + this.table_identifier + \" ORDER BY maxX DESC Limit 1;\";\n float maxX = getRowValueHelper(db, query, 0);\n query = \"SELECT maxY FROM \" + this.table_identifier + \" ORDER BY maxY DESC Limit 1;\";\n float maxY = getRowValueHelper(db, query, 0);\n query = \"SELECT maxT FROM \" + this.table_identifier + \" ORDER BY maxT DESC Limit 1;\";\n float maxT = getRowValueHelper(db, query, 0);\n\n return new STRegion(new STPoint(minX, minY, minT), new STPoint(maxX, maxY, maxT));\n }", "public static Region RegionStatenIslandCarteNY() {\n\t\t\treturn new Region(\"Staten Island\",Territoire.listeTerritoireRegionStatenIsland());\n\t\t}", "Integer getRegionId();", "public String getRegionName() {\n return regionName;\n }", "public int getRegionid() {\n return regionid;\n }", "public String getRegionName() {\r\n return regionName;\r\n }", "public WorldRegions getWorldRegions()\n {\n return regions;\n }", "public List<String> regions() {\n return this.regions;\n }", "public String getRegionFullName() {\n return regionFullName;\n }", "public long getRegionId() {\r\n return regionId;\r\n }", "public String getRegionNo() {\n return regionNo;\n }", "public String getRegionno() {\n return regionno;\n }", "public Regions getRegions () {\n return this.regions;\n }", "public java.lang.String getRegionname() {\n\treturn regionname;\n}", "public static java.lang.String getRegion(java.lang.String id) { throw new RuntimeException(\"Stub!\"); }", "@Override\n public Intersection getIntersectionEast(){\n if(!mapLoaded){\n return null;\n }\n return extremIntersection[2];\n }", "public String getRegionid() {\n return regionid;\n }", "com.google.protobuf.ByteString getRegionCodeBytes();", "public String getRegionId() {\n return regionId;\n }", "public String getRegionId() {\n return regionId;\n }", "public String getRegionId() {\n return regionId;\n }", "java.lang.String getRegionId();", "public String getOperateRegion() {\r\n return operateRegion;\r\n }", "public String getRegionId() {\r\n return regionId;\r\n }", "public Long getRegionId() {\n return this.regionId;\n }", "int getStamina();", "public double regionValue(){\n return counter.regionValue();\n }", "public int getRegionid() {\n\treturn regionid;\n}", "public Object[] getRegionalGISList() {\n return this.getList(AbstractGIS.INQUIRY_REGIONAL_GIS);\n }", "private int getRegion(Point p) {\n // divide top segment equally\n Segment topSegment = Segment.fromStartAndWidth(this.topLeft.getX(), getWidth());\n EqualSegmentDivision partsOfPaddle = new EqualSegmentDivision(topSegment, REGIONS);\n\n // get index on the line division\n int index = partsOfPaddle.getIndexForPosition(p.getX());\n\n // do validity checks\n if (index < 0) {\n return 0;\n } else if (index >= REGIONS) {\n return REGIONS - 1;\n } else {\n return index;\n }\n }", "public int getC_Region_ID();", "public String[][] getBonusRegion(String endPath) {\r\n\t\tString[][] bonusRegion = null;\r\n\r\n\t\ttry {// provo a leggere il file xml\r\n\t\t\tbonusRegion = cittaXml.getBonusRegion(endPath);\r\n\t\t} catch (XmlException e) {\r\n\t\t\tlogger.error(err + endPath, e);\r\n\t\t\tbonusRegion = null;\r\n\t\t}\r\n\r\n\t\treturn bonusRegion;// ritorna un array con i bonus della regione\r\n\t}", "public String getRegion_id() {\n return region_id;\n }", "@Override\n \tpublic SipApplicationRoutingRegion getRegion() {\n \t\treturn null;\n \t}", "public TextureRegion getStandRight(){\n return standRight;\n }", "public String getStaticRegionId() {\n return staticRegionId;\n }", "public TextureRegion getStandLeft(){\n return standLeft;\n }", "public byte [] getRegionName() {\n return regionName;\n }", "public List<Region> gets() {\r\n return rdao.getAllRegion();\r\n }", "public int getLand();", "public String getLocationArea() {\n return locationArea;\n }", "public int getRegionalGISId() {\n return gisID_;\n }", "public String getValidRegionDesc();", "protected HRegionInfo getRegionInfo(final byte [] regionName) {\n String encodedName = HRegionInfo.encodeRegionName(regionName);\n RegionState regionState = regionStates.get(encodedName);\n if (regionState != null) {\n return regionState.getRegion();\n }\n\n try {\n Pair<HRegionInfo, ServerName> p =\n MetaReader.getRegion(server.getCatalogTracker(), regionName);\n HRegionInfo hri = p == null ? null : p.getFirst();\n if (hri != null) {\n createRegionState(hri);\n }\n return hri;\n } catch (IOException e) {\n server.abort(\"Aborting because error occoured while reading \" +\n Bytes.toStringBinary(regionName) + \" from .META.\", e);\n return null;\n }\n }", "@Override\n public Intersection getIntersectionWest(){\n if(!mapLoaded){\n return null;\n }\n return extremIntersection[3];\n }", "int getIndividualStamina();", "public TextureRegion getStandBack(){\n return standBack;\n }", "public BigDecimal getBENEF_REGION() {\r\n return BENEF_REGION;\r\n }", "public final int getLocalRegionY() {\n\t\treturn y;\n\t}", "public double get_Easting() {\n return this.Easting;\n }", "private List<Region> stataRegions() {\n\t\tList<Region> rs = new ArrayList<Region>();\n\t\tRegion r;\n\n\t\t// Region 1\n\t\tr = new Region(\"Stata-1\");\n\t\tr.addVertex(42.36218276352746, -71.08994364738464);\n\t\tr.addVertex(42.36207970542849, -71.08879566192627);\n\t\tr.addVertex(42.36181809564884, -71.08882784843445);\n\t\tr.addVertex(42.36184980598321, -71.08983635902405);\n\t\trs.add(r);\n\n\t\t// Region 2\n\t\tr = new Region(\"Stata-2\");\n\t\tr.addVertex(42.36184980598321, -71.08983635902405);\n\t\tr.addVertex(42.36181809564884, -71.08882784843445);\n\t\tr.addVertex(42.361556484779946, -71.08887076377869);\n\t\tr.addVertex(42.36158819524629, -71.08986854553223);\n\t\trs.add(r);\n\n\t\t// Region 3\n\t\tr = new Region(\"Stata-3\");\n\t\tr.addVertex(42.36158819524629, -71.08986854553223);\n\t\tr.addVertex(42.361556484779946, -71.08887076377869);\n\t\tr.addVertex(42.36131865577206, -71.08895659446716);\n\t\tr.addVertex(42.361366221645646, -71.08989000320435);\n\t\trs.add(r);\n\n\t\tlog(\"Testing regions and getRegion logic...\");\n\t\tLocation l;\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36196871959442);\n\t\tl.setLongitude(-71.0893964767456);\n\t\tlog(String.format(\"Test point 1 is in region %s\", getRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.361659543737126);\n\t\tl.setLongitude(-71.0893964767456);\n\t\tlog(String.format(\"Test point 2 is in region %s\", getRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36140585984613);\n\t\tl.setLongitude(-71.0893964767456);\n\t\tlog(String.format(\"Test point 3 is in region %s\", getRegion(rs, l)));\n\n\t\treturn rs;\n\t}", "public ILocation east()\n {\n Location east = new Location(x + 1, y);\n return east;\n }", "public TextureRegion getStandFront(){\n return standFront;\n }", "public int getPolyA() { \n\t\treturn( getEndOfBEDentry( getBEDentry().getBlockAtRelativePosition(-1)));\n\t}" ]
[ "0.7917981", "0.71359986", "0.7089115", "0.70592713", "0.6994784", "0.69043607", "0.69043607", "0.69043607", "0.69043607", "0.69025606", "0.6840478", "0.67617303", "0.67617303", "0.67617303", "0.67517805", "0.6748365", "0.6743939", "0.6743939", "0.6743939", "0.6743939", "0.6743939", "0.673273", "0.6698072", "0.66964984", "0.66964984", "0.66899496", "0.6581462", "0.6580773", "0.6572247", "0.65690094", "0.651223", "0.64847153", "0.648378", "0.6483329", "0.6471615", "0.6452157", "0.6367594", "0.6367594", "0.6367594", "0.6367594", "0.63486826", "0.6304423", "0.62124497", "0.6209183", "0.6152597", "0.6108501", "0.61036354", "0.6067537", "0.6051577", "0.6030604", "0.6008996", "0.6006041", "0.5980909", "0.59654075", "0.59593314", "0.59568", "0.593915", "0.593019", "0.5928804", "0.59188354", "0.59103304", "0.58747315", "0.58660775", "0.5863309", "0.5850364", "0.5810444", "0.5810444", "0.5810444", "0.5795905", "0.5793403", "0.5793285", "0.5783474", "0.5775824", "0.57719254", "0.5771383", "0.57439685", "0.5714204", "0.5709941", "0.5696731", "0.56940776", "0.5675257", "0.56642675", "0.5661264", "0.56601715", "0.56566757", "0.5618188", "0.5589529", "0.5584552", "0.55837446", "0.55807894", "0.55604917", "0.55444044", "0.5536778", "0.55323046", "0.553046", "0.5522267", "0.5515919", "0.55153906", "0.5502345", "0.549257", "0.5475633" ]
0.0
-1
Return a String like AREA/AISLE/X/Y/Z.
@Override public String toString() { return this.area + "/" + this.aisle + "/" + this.x + "/" + this.y + "/" + this.z; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String land() {\r\n\t\tint[] temp=tile.getLand();\r\n\t\tString out=\"Tile Land: \\n\\n\";\r\n\t\tint square=(int)Math.sqrt(temp.length);\r\n\t\tif(square*square<temp.length) {\r\n\t\t\tsquare++;\r\n\t\t}\r\n\t\tfor(int i=0; i<temp.length;) {\r\n\t\t\tfor(int j=0; j<square; j++) {\r\n\t\t\t\tif(i<temp.length) {\r\n\t\t\t\t\tout=out.concat(String.format(\"%4s\", temp[i]));\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tj=square;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tout=out.concat(\"\\n\");\r\n\t\t}\r\n\t\treturn out;\r\n\t}", "public abstract String getArea();", "public String toString() {\n //arena info\n String locations = \"The arena is \" + xSize + \" x \" + ySize;\n //pieces info\n for (Pieces d : drones) {\n locations += \"\\n\";\n locations += d.toString();\n }\n\n return locations;\n }", "public String toString ()\n\t{\n\t\treturn new String (\"[\" + ancho+ \", \" + alto + \"], Area = \" + area);\n\t}", "public String getLocationString(){\n return \"(\" + x + \", \" + y + \")\";\n }", "private String printName() {\n \t\treturn GPSFilterTextUtils.printName( this.getResources(), this.area.getName() );\n \t}", "@Override\n public String toString()\n {\n String temp = \"[\";\n String areaVal = String.format(\"%5.2f\", area);\n\n\n for(int i = 0; i < sides; i++)\n {\n temp += poly[i].toString();\n }\n\n temp += \"]: \"+ areaVal;\n this.print = temp;\n return temp;\n }", "public static String string() {\n\t\t\tString s = \"\";\n\t\t\ts += \"Locaux :\\n\";\n\t\t\tfor(String key : locaux.keySet()) {\n\t\t\t\tIdent i = locaux.get(key);\n\t\t\t\ts += key+\", \"+i.toString()+\"\\n\";\n\t\t\t}\n\t\t\ts += \"Globaux :\\n\";\n\t\t\tfor(String key : globaux.keySet()) {\n\t\t\t\tIdent i = globaux.get(key);\n\t\t\t\ts += key+\", \"+i.toString()+\"\\n\";\n\t\t\t}\n\n\t\t\treturn s;\n\t\t}", "public String toString()\n\t{\n\t\treturn String.format(\"Square at x=%d, y=%d with sides %d\", anchor.x, anchor.y, oneside);\n\t}", "@Override\r\n\tpublic String toString() {\r\n\r\n\t\treturn \"My rectangle's Areas is \"+area();\r\n\t}", "String location();", "String location();", "String location();", "String location();", "String location();", "String location();", "String location();", "String location();", "public String toString(){\n String string = new String();\n for(int i = 0; i < axis.length; i++){\n string += axis[i];\n if(i != (axis.length - 1)){\n string += \" / \";\n }\n }\n return string;\n }", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "protected String myString(){\n \treturn( \"gate \" + name ); \n }", "public String toString() {\n\t\tif (justnow.equals(\"east\")){\n\t\t\treturn \">\";\n\t\t}\n\t\tif (justnow.equals(\"south\")){\n\t\t\treturn \"v\";\n\t\t}\n\t\tif (justnow.equals(\"west\")){\n\t\t\treturn \"<\";\n\t\t}\n\t\tif (justnow.equals(\"north\")){\n\t\t\treturn \"^\";\n\t\t}\n\t\telse{\n\t\t\treturn \">\";\n\t\t}\n\t}", "public String getAreaCode() \n\t{\n\t\treturn getNumber().substring(1,4);\n\t}", "public String toString() {\n return \"/\" + toIdent(0);\n }", "String getLocation();", "String getLocation();", "String getLocation();", "public String toString() {\n // DecimalFormat class is used to format the output\n DecimalFormat df = new DecimalFormat(\".0\");\n return \"\\nCoordinates of Parallelogram are:\\n\"\n + super.toString()\n + \"\\nWidth is :\"\n + df.format(width)\n + \"\\nHeight is :\"\n + df.format(height)\n + \"\\nArea is :\"\n + df.format(area());\n }", "public String toString()\n\t{\n\t\treturn getArea() + \".\" + getLine() + \".\" + getDevice();\n\t}", "@Override\n public String toString() {\n if (isValid()) {\n return String.format(\n Locale.US,\n \"%+02f%+02f%s/\",\n coordinates.get(1), coordinates.get(0), coordinateSystem.toString());\n }\n return \"\";\n }", "String getElevationWithFlooringAsString();", "@Override\n\tpublic String toString() {\n\t\treturn String.format(this.width+\"\"+this.height+\"\"+getPerimeter()+\"\"+getArea());\n\t}", "public String makeString()\n {\n return \"ArcanaDungeonSource\";\n }", "public String getAnalysisString() {\n //TODO - change this when we get some measure of monster # and deadly score\n int totalMonsters = 0;\n //If this room should have monsters in it...\n if (roomShouldHaveMonsters()) {\n //If there are none yet, generate them!\n if (numMonstersByType == null) {\n genRandomMonsters();\n } else {\n //if they've already been generated, add them up!\n for (Integer num : numMonstersByType.values()) {\n totalMonsters += num;\n }\n }\n }\n\n int miniBoss = contents.contains(roomContents.MINI_BOSS) ? 1 : 0;\n\n return coords[0] + \",\" + coords[1] + \",\" + totalMonsters + \",\" + miniBoss;\n }", "String describe() {\n switch (this) {\n case NORTH_4M:\n return \"north\";\n case NORTH_16M:\n return \"north_16m\";\n case SOUTH_4M:\n return \"south\";\n case SOUTH_16M:\n return \"south_16m\";\n case WILTSHIRE_4M:\n return \"wiltshire\";\n case WILTSHIRE_16M:\n return \"wiltshire_16m\";\n }\n return \"?\";\n }", "java.lang.String getLocation();", "public String toString() {\n\t\treturn String.format(\"%-28s%-16f%-17f\", city,location.getLat(),location.getLng());\n\t}", "@Override public String toString() {\n return String.format(\"(%03d) %03d-%04d\",\n areaCode, prefix, lineNumber);\n }", "String getArcrole();", "public String getMountains() {\n return \" YYYY Y YY Y YY YYYY \\n\" +\n \" YYYYYY YYYY YYYY YY YYYYY YYYYYY \\n\" +\n \" YYYYYYYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY \\n\" +\n \" YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY \\n\" +\n \" YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY \\n\" +\n \" YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY \\n\" +\n \"YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY \\n\" +\n \"YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY\\n\" +\n \"YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY\\n\" +\n \"YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY\\n\" +\n \"YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY\\n\" +\n \"YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY\\n\" +\n \"YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY\\n\" +\n \"YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY\\n\" +\n \"YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY\\n\" +\n \"YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY\\n\" +\n \"YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY\\n\";\n\n }", "public String toString(){\n\t\treturn (\"this triangle has side 1 of length\"+side1+\"side 2 of length\"+side2+\"and side 3 of length\"+side3);\n\t}", "public String toString()\n {\n // If the direction is one of the compass points for which we have\n // a name, provide it; otherwise report in degrees. \n int regionWidth = FULL_CIRCLE / dirNames.length;\n if (dirInDegrees % regionWidth == 0)\n return dirNames[dirInDegrees / regionWidth];\n else\n return dirInDegrees + \" degrees\";\n }", "public String toString()\n\t{\n\t\tString output = \"\";\n\t\tfor(String[] at:atMat){\n\t\t\tfor(String a:at){\n\t\t\t\toutput += a+ \" \";\n\t\t\t}\n\t\t\toutput += \"\\n\";\n\t\t}\n\t\treturn output;\n\t}", "public String getLocationString() {\n return getCenter().toString();\n }", "public String getEnemyAircraft() {\n return \" \\n\" +\n \" \\n\" +\n \" R \\n\" +\n \" RR \\n\" +\n \" R RRRR \\n\" +\n \" RRRRRRRRRRRRR \\n\" +\n \" RRRRRRRRRRRRRRRRRR \\n\" +\n \" RRRRRRRRRRRRR \\n\" +\n \" R RRRR \\n\" +\n \" RR \\n\" +\n \" R \\n\" +\n \" \\n\";\n\n }", "String getStationBand();", "public String toString() {\n return\n getLatitude(\"\") + \"|\" +\n getLongitude(\"\") + \"|\" +\n getDepth(\"\") + \"|\" +\n getTemperatureMin(\"\") + \"|\" +\n getTemperatureMax(\"\") + \"|\" +\n getSalinityMin(\"\") + \"|\" +\n getSalinityMax(\"\") + \"|\" +\n getOxygenMin(\"\") + \"|\" +\n getOxygenMax(\"\") + \"|\" +\n getNitrateMin(\"\") + \"|\" +\n getNitrateMax(\"\") + \"|\" +\n getPhosphateMin(\"\") + \"|\" +\n getPhosphateMax(\"\") + \"|\" +\n getSilicateMin(\"\") + \"|\" +\n getSilicateMax(\"\") + \"|\" +\n getChlorophyllMin(\"\") + \"|\" +\n getChlorophyllMax(\"\") + \"|\";\n }", "public String toString()\n {\n return id() + location().toString() + direction().toString();\n }", "@Override\n\tpublic java.lang.String getAreaName() {\n\t\treturn _locMstLocation.getAreaName();\n\t}", "public String toString(){\n return \"+-----------------------+\\n\" +\n \"| Boleto para el metro |\\n\" +\n \"|derjere0ranfeore |\\n\" +\n \"+-----------------------+\\n\" ;\n }", "public String getLocationString() {\r\n\t\treturn \"Location = (\" + Math.round(getLocationX() * 10) / 10.0 + \", \" + Math.round(getLocationY() * 10) / 10.0 + \")\";\r\n\t}", "public String toString() {\n\t\tString returnString=\"\";\n\t\t\n\t\tfor (int i=0; i<squares.length; i++) {\n\t\t\tfor (int j=0; j<squares.length; j++) {\n\t\t\t\treturnString+=Character.toString(squares[i][j].getValue());\n\t\t\t}\n\t\t\treturnString+=\"// \";\n\t\t}\n\t\t\n\t\treturn returnString;\n\t}", "public String toString() {\n\t\tString circuit = \"(\" + left + \"/\\\\\" + right + \")\";\n\t\treturn circuit;\n\t}", "public String toString()\n {\n String str = \"\";\n switch (align)\n {\n case LEFT :\n str = \",align=left\";\n break;\n case CENTER :\n str = \",align=center\";\n break;\n case RIGHT :\n str = \",align=right\";\n break;\n }\n return getClass().getName() + \"[hgap=\" + hgap + \",vgap=\" + vgap + str + \"]\";\n }", "@Override\n public String getToID()\n {\n \tStringBuilder sb = new StringBuilder();\n\n\t\tint prefix = getPrefix();\n \tint ident = getIdent1();\n\n \tswitch( IdentType.fromIdent( ident ) )\n \t{\n \t\tcase IPFIXI:\n \t\t\tsb.append( \"INTER-PREFIX\" );\n \t\t\tbreak;\n \t\tcase ALLI:\n \t\t\tsb.append( \"ALL RADIOS\" );\n \t\t\tbreak;\n \t\tcase PABXI:\n \t\t\tsb.append( \"PABX EXT\" );\n \t\t\tbreak;\n \t\tcase PSTNSI1:\n \t\tcase PSTNSI2:\n \t\tcase PSTNSI3:\n \t\tcase PSTNSI4:\n \t\tcase PSTNSI5:\n \t\tcase PSTNSI6:\n \t\tcase PSTNSI7:\n \t\tcase PSTNSI8:\n \t\tcase PSTNSI9:\n \t\tcase PSTNSI10:\n \t\tcase PSTNSI11:\n \t\tcase PSTNSI12:\n \t\tcase PSTNSI13:\n \t\tcase PSTNSI14:\n \t\tcase PSTNSI15:\n \t\t\tsb.append( \"PRE-DEFINED PSTN\" );\n \t\t\tbreak;\n \t\tcase PSTNGI:\n \t\t\tsb.append( \"PSTN GATEWAY\" );\n \t\t\tbreak;\n \t\tcase TSCI:\n \t\t\tsb.append( \"SYSTEM CONTROLLER\" );\n \t\t\tbreak;\n \t\tcase DIVERTI:\n \t\t\tsb.append( \"CALL DIVERT\" );\n \t\t\tbreak;\n \t\tcase USER:\n\t\t\tdefault:\n\t\t\t\tif( prefix != 0 || ident != 0 )\n\t\t\t\t{\n\t \tsb.append( format( prefix, 3 ) );\n\t \tsb.append( \"-\" );\n\t \tsb.append( format( ident, 4) );\n\t\t\t\t}\n \tbreak;\n \t}\n\n \treturn sb.toString();\n }", "public String toString()\n {\n return \"(\"+getType()+\")\"+getLocation(); \n }", "public String generateString() {\n List<Trip<String, String, String>> sequence = super.generateSequence(startTrip, endTrip);\n sequence = sequence.subList(1, sequence.size()-1);\n String generated = \"\";\n for (int i = 0; i<sequence.size()-2; i++) generated += sequence.get(i).getThird() + \" \";\n return generated.substring(0, generated.length()-1);\n }", "public String getAllele1(int index);", "public void generateRouteNameString(){\n switch(routeName){\n case \"1A\": this.routeNameString = \"College Edinburgh\"; break;\n case \"1B\": this.routeNameString = \"College Edinburgh\"; break;\n case \"2A\": this.routeNameString = \"West Loop\"; break;\n case \"2B\": this.routeNameString = \"West Loop\"; break;\n case \"3A\": this.routeNameString = \"East Loop\"; break;\n case \"3B\": this.routeNameString = \"East Loop\"; break;\n case \"4\": this.routeNameString = \"York\"; break;\n case \"5\": this.routeNameString = \"Gordon\"; break;\n case \"6\": this.routeNameString = \"Harvard Ironwood\"; break;\n case \"7\": this.routeNameString = \"Kortright Downey\"; break;\n case \"8\": this.routeNameString = \"Stone Road Mall\"; break;\n case \"9\": this.routeNameString = \"Waterloo\"; break;\n case \"10\": this.routeNameString = \"Imperial\"; break;\n case \"11\": this.routeNameString = \"Willow West\"; break;\n case \"12\": this.routeNameString = \"General Hospital\"; break;\n case \"13\": this.routeNameString = \"Victoria Rd Rec Centre\"; break;\n case \"14\": this.routeNameString = \"Grange\"; break;\n case \"15\": this.routeNameString = \"University College\"; break;\n case \"16\": this.routeNameString = \"Southgate\"; break;\n case \"20\": this.routeNameString = \"NorthWest Industrial\"; break;\n case \"50\": this.routeNameString = \"Stone Road Express\"; break;\n case \"56\": this.routeNameString = \"Victoria Express\"; break;\n case \"57\": this.routeNameString = \"Harvard Express\"; break;\n case \"58\": this.routeNameString = \"Edinburgh Express\"; break;\n default: this.routeNameString = \"Unknown Route\"; break;\n }\n }", "public static String LocationToString(Location location){\n StringBuilder sb = new StringBuilder();\n sb.append(\"( \").append(location.getBlockX()).append(\", \").append(location.getBlockY()).append(\", \").append(location.getBlockZ()).append(\" )\");\n return sb.toString();\n }", "public String toString() {\n\t\tString pathString = \"\";\n\t\tfor(Point point : path) {\n\t\t\tpathString = pathString + \"[ \" + point.getX() + \", \" + point.getY() + \" ]\";\n\t\t}\n\t\treturn pathString;\n\t}", "public String getCustomersInElevatorString();", "public String getFullTreePathString()\n throws OculusException;", "public String getAllele2(int index);", "@Override\r\n\tpublic String Land() {\n\t\treturn \"El Helicoptero esta Aterrizando\";\r\n\t}", "String getImaginary_lit();", "@Override\r\n\tpublic String getFormatedCoordinates() {\n\t\treturn \"Drone position: (\"+x+\",\"+y+\",\"+z+\")\";\r\n\t}", "public String toString() {\n String s = \" 1 2 3 4 5 6 7 8\";\n\n\n s += \"\\n --------------------\\n1 |\";\n\n for(int i=0; i < this.TAILLEX; i++){\n for(int k=0; k < this.TAILLEY; k++){\n s += this.plateau[i][k] + \"|\";\n }\n if(i<7) s += \"\\n --------------------\\n\" + (i+2) + \" |\";\n else s += \"\\n --------------------\\n\";\n }\n\n return s;\n }", "private String getCords() {\n return current.getLocString();\n\n }", "public String toString()\n {\n return \"I am the nice \" + NAME + \", I am now standing on square \" + x + \" , \" + y + \".\";\n }", "public String look() {\r\n currentRoom = player.getCurrentRoom();\r\n String res;\r\n res = currentRoom.getTitle() + System.getProperty(\"line.separator\");\r\n res += currentRoom.getDescription() + System.getProperty(\"line.separator\");\r\n res += currentRoom.getAvailableDirections() + System.getProperty(\"line.separator\");\r\n res += currentRoom.getMonstersToString();\r\n\r\n return res;\r\n }", "public String getImg(){\n switch(image){\n case 0: // Case 0: Ant looks up/north\n return \"imgs/ant_n.png\";\n case 1: // Case 1: Ant looks right/east\n return \"imgs/ant_e.png\";\n case 2: // Case 2: Ant looks down/south\n return \"imgs/ant_s.png\";\n case 3: // Case 3: Ant looks left/west\n return \"imgs/ant_w.png\";\n default: // Default: This shouldn't happen on a normal run. It returns an empty string and prints an error.\n System.err.println(\"Something went wrong while the ant was trying change direction\");\n return \"\";\n }\n }", "public static String createGeoUri(Context context, Location location, boolean includeAltitude) {\n if (location == null) {\n return null;\n }\n String geoUri = context.getString(R.string.geo_uri_prefix);\n geoUri += location.getLatitude() + \",\";\n geoUri += location.getLongitude();\n if (location.hasAltitude() && includeAltitude) {\n geoUri += \",\" + location.getAltitude();\n }\n return geoUri;\n }", "String getLocationLabel();", "public String toString() {\n String mazeVisual = \"\";\n Maze routeMaze = this.getMaze();\n for (int row = 0; row < routeMaze.getTiles().size(); row++) {\n for (int col = 0; col < routeMaze.getTiles().get(0).size(); col++) {\n if (route.contains(routeMaze.getTiles().get(row).get(col))) {\n mazeVisual = (mazeVisual + \"*\");\n } else if (popped.contains(routeMaze.getTiles().get(row).get(col))) {\n mazeVisual = (mazeVisual + \"-\");\n } else {\n mazeVisual = (mazeVisual + routeMaze.getTiles().get(row).get(col).toString());\n }\n if ((col + 1) == routeMaze.getTiles().get(0).size()) {\n mazeVisual = mazeVisual + \"\\n\";\n }\n }\n }\n return mazeVisual;\n }", "public String toString() {\n String output = \"\";\n for (int i = 0; i < numRegions; i++) {\n if (regionList[i] instanceof Arctic) \n output += (i+1) + \". \" + ((Arctic)regionList[i]).toString();\n else if (regionList[i] instanceof Aquarium) \n output += (i+1) + \". \" + ((Aquarium)regionList[i]).toString();\n else if (regionList[i] instanceof AmazonRainforest) \n output += (i+1) + \". \" + ((AmazonRainforest)regionList[i]).toString();\n }\n return output;\n }", "@Override\r\n public String toString() {\r\n return String.format(\"%s:\\n%s\", \"Coordinates of Quadrilateral are\", getCoordinatesAsString());\r\n }", "public String toString(){\n return String.format(\n \"Width: %.2f\\nLength: %.2f\\nArea: %.2f\\nPerimeter: %.2f\\n\",\n getLength(), getWidth(), getArea(), getPerimeter());\n }", "@Override\n\tpublic String getSaveString() {\n\t\tString save = \"Absorber \"+this.name+\" \"+this.x/GameBoard.PixelsPerL+\" \"+this.y/GameBoard.PixelsPerL+\" \"+this.width+\" \"+this.height;\n\t\treturn save;\n\t}", "public String toString() {\n\t\tStringBuilder buff = new StringBuilder();\n\t\tfor (int y = height-1; y>=0; y--) {\n\t\t\tbuff.append('|');\n\t\t\tfor (int x=0; x<width; x++) {\n\t\t\t\tif (getGrid(x,y)) buff.append('+');\n\t\t\t\telse buff.append(' ');\n\t\t\t}\n\t\t\tbuff.append(\"|\\n\");\n\t\t}\n\t\tfor (int x=0; x<width+2; x++) buff.append('-');\n\t\treturn(buff.toString());\n\t}", "public String toString() {\n\t\tStringBuilder buff = new StringBuilder();\n\t\tfor (int y = height-1; y>=0; y--) {\n\t\t\tbuff.append('|');\n\t\t\tfor (int x=0; x<width; x++) {\n\t\t\t\tif (getGrid(x,y)) buff.append('+');\n\t\t\t\telse buff.append(' ');\n\t\t\t}\n\t\t\tbuff.append(\"|\\n\");\n\t\t}\n\t\tfor (int x=0; x<width+2; x++) buff.append('-');\n\t\treturn(buff.toString());\n\t}", "public String toString() {\n\t\tString blawk = \"X: \" + getLocation().getX() + \", Y: \" + getLocation().getY() + \", Id: \" + getId();\n\t\treturn blawk;\n\t}", "public String toString() {\n\t\tString s = \"\";\n\t\tfor (Coord x : array)\n\t\t\ts += x;\n\t\treturn s;\n\t}", "java.lang.String getUa();", "private String printRoute() {\n String r = String.valueOf(this.route.get(0));\n int index = 1;\n while (index < this.route.size()) {\n r = r + \" - \" + this.route.get(index);\n index++;\n }\n return r;\n }", "String getCidr();", "@Override\r\n\tpublic String toString() {\n\t\treturn \"\" + get3 + 'A';\r\n\t}", "public String getAreaName() {\n\t\tif (areaName == null) {\n\t\t\tProtectedRegion p = getPlot();\n\t\t\tPlotInfo info = plugin.getPlotInfo(worldName, p.getId());\n\t\t\tif (info != null) {\n\t\t\t\tareaName = info.areaName;\n\t\t\t}\n\t\t}\n\t\treturn areaName;\n\t}", "java.lang.String getArrivalAirport();", "private String displayText() {\n // Location is unknown, tell the user as such.\n if (!storage.explored[numX][numY])\n return \" Unknown Location\";\n // Uses the specific cell to generate the name.\n if (numX == 8 && numY == 4)\n return \" Great Hollow Entrance\";\n if ((numY == 3 || numY == 2 || numY == 1) && (numX == 7 || numX == 8 || numX == 9))\n return \" Faron Woods\";\n if (numY == 0 && (numX == 7 || numX == 8))\n return \" Faron Woods\";\n if (numY == 4 && (numX == 7 || numX == 9))\n return \" Faron Woods\";\n if (numY == 5 && (numX == 7 || numX == 9))\n return \" Faron Woods Entrance\";\n if (numY == 5 && numX == 8)\n return \" Carthell Village Outskirts\";\n if ((numY == 7 || numY == 8) && numX == 7)\n return \" Carthell Village Outskirts\";\n if (numY == 6 && numX == 8)\n return \" Aragoth's Fountain\";\n if (numY == 6 && numX == 7)\n return \" Unoccupied House\";\n if (numY == 9 && numX == 11)\n return \" Carthell Library\";\n if (numY == 8 && numX == 10)\n return \" Carthell Marketplace\";\n if (numY == 7 && numX == 11)\n return \" Four Statue Square\";\n if (numY == 6 && (numX == 9 || numX == 10 || numX == 11 || numX == 12))\n return \" Carthell Village\";\n if (numY == 7 && (numX == 8 || numX == 9 || numX == 10 || numX == 12))\n return \" Carthell Village\";\n if (numY == 8 && (numX == 8 || numX == 9 || numX == 11 || numX == 12))\n return \" Carthell Village\";\n if (numY == 9 && (numX == 8 || numX == 9 || numX == 10 || numX == 12))\n return \" Carthell Village\";\n if (numX == 10 && numY == 3)\n return \" Fairy Queen's Fountain\";\n return \"\";\n }", "java.lang.String getTransitAirport();", "@Override\n public String toString() \n\t{\n\t\t// This is just for the output format\n\t\tString sg = \"\";\n\t\tsg = sg + \"(\";\n\t\tsg = sg + x;\n\t\tsg = sg + \", \";\n\t\tsg = sg + y;\n\t\tsg = sg + \") \";\n\t\t\n\t\treturn sg;\n\n\t}", "private String toStringHelper(int index, String soFar) {\n if (getElement(index) == null) {\n return \"\";\n } else {\n String toReturn = \"\";\n int rightChild = getRightOf(index);\n toReturn += toStringHelper(rightChild, \" \" + soFar);\n if (getElement(rightChild) != null) {\n toReturn += soFar + \" /\";\n }\n toReturn += \"\\n\" + soFar + getElement(index) + \"\\n\";\n int leftChild = getLeftOf(index);\n if (getElement(leftChild) != null) {\n toReturn += soFar + \" \\\\\";\n }\n toReturn += toStringHelper(leftChild, \" \" + soFar);\n return toReturn;\n }\n }", "@Override\n public String toString() {\n return ArrayHelper.join(this.toArray(new Part[0]), \"/\");\n }", "String regionName();", "String regionName();", "String regionName();", "String regionName();", "public String toString(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tif(isFlag()==true){\n\t\t\t\tif(isDownBlock()==true){\n\t\t\t\t\tsb.append(\"g\"); //use G represent the goal\n\t\t\t\t\t\t\t\t\t\t// if down block is a block use small letter\n\t\t\t\t}\n\t\t\t\telse if(isRobot()==true){\n\t\t\t\t\tsb.append(\"V\"); //flag and robot on same position VICTORY!\n\t\t\t\t}\n\t\t\t\telse sb.append(\"G\"); \t\t\n\t\t\t}\n\t\telse if(isRobot()==true){\n\t\t\tif(isDownBlock()==true){\n\t\t\t\tsb.append(\"r\");//use R represent the Robot\n\t\t\t\t\t// if down move is a block use small letter\n\t\t\t}\n\t\t\telse sb.append(\"R\");\n\t\t}\n\t\telse{\n\t\t\tif(isDownBlock()==true){\n\t\t\t\tsb.append(\"_\"); \n\t\t\t\t//if down move is blocked then use underline\n\t\t\t}\n\t\t\telse sb.append(\"O\"); // use o represent the grid\n\t\t}\n\t\t\t\n\t\tif(isRightBlock()==true){\n\t\t\tsb.append(\"|\"); //best way to represent right block\n\t\t}\n\t\telse{\n\t\t\tsb.append(\" \"); // if no block just a space\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String toString() {\n\t\t// Converts column\n\t\tString columnStr = \"\";\n\t\tfor (int tempColumn = cell.getAddress().getColumn();\n\t\t\t\ttempColumn >= 0; tempColumn = tempColumn\n\t\t\t\t\t/ (Address.HIGHEST_CHAR - Address.LOWEST_CHAR + 1) - 1)\n\t\t\tcolumnStr = ((char)((char)(tempColumn % (Address.HIGHEST_CHAR\n\t\t\t\t- Address.LOWEST_CHAR + 1)) + Address.LOWEST_CHAR)) + columnStr;\n\t\tif (columnAbsolute)\n\t\t\tcolumnStr = ABSOLUTE_OPERATOR + columnStr;\n\n\t\t// Converts row\n\t\tString rowStr = (rowAbsolute ? ABSOLUTE_OPERATOR : \"\")\n\t\t\t+ (cell.getAddress().getRow() + 1);\n\t\treturn columnStr + rowStr;\n\t}" ]
[ "0.60642606", "0.60327536", "0.5913798", "0.58958215", "0.58670825", "0.58548224", "0.5766822", "0.5704158", "0.5683854", "0.5645434", "0.5545053", "0.5545053", "0.5545053", "0.5545053", "0.5545053", "0.5545053", "0.5545053", "0.5545053", "0.55249155", "0.5516606", "0.5475556", "0.54616374", "0.5461599", "0.54604924", "0.54580516", "0.54580516", "0.54580516", "0.5430847", "0.5428064", "0.54252946", "0.54181355", "0.538421", "0.5377263", "0.53763086", "0.53572863", "0.53564066", "0.5339365", "0.53322893", "0.53273493", "0.5312059", "0.53044254", "0.5294316", "0.5293506", "0.5291081", "0.52838695", "0.5283602", "0.5277251", "0.52768224", "0.5268142", "0.5248663", "0.52442807", "0.52438533", "0.5242278", "0.5241862", "0.5234788", "0.52347726", "0.52318394", "0.5223011", "0.52223736", "0.52001715", "0.5199985", "0.51985514", "0.5198171", "0.51957744", "0.5192873", "0.5183618", "0.51786053", "0.517571", "0.5168025", "0.5160915", "0.51594836", "0.5157252", "0.5154678", "0.51526284", "0.5145591", "0.5139141", "0.5137946", "0.5137857", "0.51375824", "0.51335543", "0.51335543", "0.51273835", "0.51256293", "0.5120835", "0.51198924", "0.5116665", "0.51142585", "0.51125556", "0.5110485", "0.51091045", "0.51087254", "0.510111", "0.50935566", "0.50928605", "0.5089569", "0.5089569", "0.5089569", "0.5089569", "0.50855684", "0.5082985" ]
0.6376056
0
Converts AccountEntity object into AccountDto object and returns it. AccountDto object contains current account balance information. Method accepts AccountNumberDto as parameter.
@Override public AccountDto getBalance(AccountNumberDto accountNumber) { AccountEntity accountEntity = new AccountDaoImpl(new StatementsRunnerImpl()).readBalance(accountNumber); return new AccountDto(accountEntity.getId(), accountNumber.getAccountNumber(), accountEntity.getCurrency()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AccountDto getBalanceFor(UUID accountId) {\n Account account = repository.getAccount(accountId);\n return getAccountDtoFor(account);\n }", "AccountDTO toDTO(Account account);", "Account toDomain(AccountDTO accountDto);", "Account coverEmpDTOToAccount(AccountDTO accountDTO);", "AccountDTO coverAccountToEmpDTO(Account account);", "public AccountDto getAccountFor(int cardNumber, int cardPIN) {\n Account account = repository.getAccount(cardNumber, cardPIN);\n return getAccountDtoFor(account.getAccountId());\n }", "public BigDecimal getBalance(String accountNumber) throws TransferServiceException {\n\n\t\tAccount acc = repository.findByAccountNumber(accountNumber);\n\t\tisAccountValid(acc);\n\t\treturn acc.getBalance();\n\t}", "@Override\r\n\t\t\tpublic Account payAmount(String MobileNo, String accountBalance) throws RechargeException {\r\n\t\t\t\t// TODO \r\n\t\t\t\tAccount dto=dao.payAmount(MobileNo, accountBalance);\r\n\t\t\t\tif(dto==null)\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new RechargeException(\"cannot rechrge as given mobile no does not exist\");\r\n\t\t\t\t}\r\n\t\t\t\treturn dto;\r\n\t\t\t}", "public ResponseEntity<DepositAccountBalanceResponse> getDepositAccountBalanceResponseEntity(String customerId, String accountId,\n String accessToken) {\n DepositAccountBalanceResponse response = new DepositAccountBalanceResponse();\n try {\n HttpResponse<String> apiResponse = Unirest.get(propertyUtil\n .getAPIUrl(com.activeai.integration.banking.api.constants.PropertyConstants.DEPOSIT_ACCOUNT_BALANCE_API_END_POINT, customerId,\n accountId)).header(APIConstants.CACHE_CONTROL, APIConstants.NO_CACHE).asString();\n ApplicationLogger.logInfo(\n MessageConstants.API_RESPONSE_STATUS + apiResponse.getStatus() + MessageConstants.AND_RESPONSE_STATUS_TEXT + apiResponse.getStatusText(),\n this.getClass());\n if (StringUtils.isNotEmpty(apiResponse.getBody())) {\n ApplicationLogger.logInfo(\"Deposit Account Balance Response Body Before Transformation :\" + apiResponse.getBody(), this.getClass());\n response = accountsResponseMapper.getManipulatedDepositAccountsBalanceResponse(apiResponse.getBody());\n ApplicationLogger.logInfo(\"Deposit Account Balance Response Body After Transformation :\" + response, this.getClass());\n }\n return ResponseEntity.ok(response);\n } catch (UnirestException e) {\n ApplicationLogger.logError(MessageFormat\n .format(ERROR_MESSAGE_FORMAT, com.activeai.integration.banking.api.constants.MessageConstants.API_FAILURE_MESSAGE,\n this.getClass().getName(), ExceptionUtils.getStackTrace(e)));\n } catch (Exception e) {\n ApplicationLogger.logError(MessageFormat\n .format(ERROR_MESSAGE_FORMAT, com.activeai.integration.banking.api.constants.MessageConstants.EXCEPTION_MESSAGE,\n this.getClass().getName(), ExceptionUtils.getStackTrace(e)));\n }\n response.setResult(propertyUtil\n .frameErrorResponse(com.activeai.integration.banking.api.constants.MessageConstants.INTERNAL_SERVER_ERROR,\n APIConstants.INTERNAL_SERVER_ERROR, 500));\n return ResponseEntity.ok(response);\n }", "BankAccountDTO getCustomerBankAccountDetails(Long slNo);", "public BankAccount getBankAccount(int accountNumber) {\n\t\tString sql = \"SELECT id, name, balance, balance_saving FROM accounts WHERE id = ?\";\n\n\t\ttry (PreparedStatement pstmt = dbConnection.prepareStatement(sql)) {\n\t\t\tpstmt.setInt(1, accountNumber);\n\t\t\tResultSet rs = pstmt.executeQuery();\n\n\t\t\t// loop through the result set\n\t\t\tif (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString name = rs.getString(\"name\");\n\t\t\t\tint checking_balance = rs.getInt(\"balance\");\n\t\t\t\tint saving_balance = rs.getInt(\"balance_saving\");\n\t\t\t\treturn new BankAccount(id, name, checking_balance, saving_balance);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\treturn null;\n\t}", "@Override\n public ResponseEntity<ResponseAccountBalance> getAccountBalanceById(String accountId) {\n\n final String url = \"https://sandbox.platfr.io/api/gbs/banking/v2/accounts/\"+accountId+\"/balance\";\n //=======================================================================\n //============================= HEADER ==================================\n //=======================================================================\n HttpHeaders requestHeaders = new HttpHeaders();\n requestHeaders.setContentType(MediaType.APPLICATION_JSON);\n requestHeaders.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));\n requestHeaders.set(\"Auth-Schema\",\"S2S\");\n\n HttpEntity<AccountBalance> entity = new HttpEntity<>(requestHeaders);\n // Send request with GET method, and Headers.\n return restTemplate.exchange(url,HttpMethod.GET, entity, ResponseAccountBalance.class);\n\n }", "public BankTransactionTO bankCardToCheckingAccountTransfer(BankCardTO bankCardTO, long toAccountId, long money) throws Exception {\r\n MoneyTransferTransaction moneyTransferTransaction = new MoneyTransferTransaction();\r\n return moneyTransferTransaction.bankCardToCheckingAccount(bankCardTO, toAccountId, money);\r\n }", "private Account creditAmount(String accountNumber, BigDecimal amt) throws TransferServiceException\n\t{\n\t\tAccount account = repository.findByAccountNumber(accountNumber);\n\t\tisAccountValid(account);\n\t\taccount.setBalance(getBalance(accountNumber).add(amt));\n\t\treturn account;\n\t}", "AccountDetail getAccount(String number) throws Exception;", "public BalanceDto getBalance(String customerId) {\n\t\tlogger.info(\"balance service implementation class\");\n\t\t\n\t\tBalanceDto balanceDto = new BalanceDto();\n\t\t\n\t\tAccount accountDetails = accountRepository.findBycustomerId(customerId);\n\t\t\n\t\tMortagage mortagagae = mortagageRepository.findBycustomerId(customerId);\n\t\t\n\t\tif(accountDetails.getAccountNumber() != null && mortagagae.getCustomerId() != null)\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"balance service implementation class with customerId\");\n\t\t\tbalanceDto.setTransactionAccountNumber(accountDetails.getAccountNumber());\n\t\t\tbalanceDto.setTransactionBalance(accountDetails.getBalance());\n\t\t\tbalanceDto.setMortagageBalance(mortagagae.getMortagageBalance());\n\t\t\tbalanceDto.setMortagageAccNumber(mortagagae.getMortagageId());\n\t\t\tbalanceDto.setMessage(\"Balance Data\");\n\t\t\tbalanceDto.setStatus(\"SUCCESS\");\n\t\t\tbalanceDto.setStatusCode(200);\n\t\t\treturn balanceDto;\n\t\t}else\n\t\t{\n\t\t\tlogger.info(\"balance service implementation class with customerId does not exists\");\n\t\t\tthrow new MortagageManagementException(\"Customer Id does not exists or transactions not done\");\n\t\t}\n\t}", "public ResponseEntity<AccountBalanceResponse> getCasaAccountBalanceResponseEntity(String customerId, String accountId,\n String accessToken) {\n AccountBalanceResponse accountBalanceResponse = new AccountBalanceResponse();\n try {\n HttpResponse<String> apiResponse = Unirest.get(propertyUtil\n .getAPIUrl(com.activeai.integration.banking.api.constants.PropertyConstants.CASA_ACCOUNT_BALANCE_API_END_POINT, customerId,\n accountId)).header(APIConstants.CACHE_CONTROL, APIConstants.NO_CACHE).asString();\n ApplicationLogger.logInfo(\n MessageConstants.API_RESPONSE_STATUS + apiResponse.getStatus() + MessageConstants.AND_RESPONSE_STATUS_TEXT + apiResponse.getStatusText(),\n this.getClass());\n if (StringUtils.isNotEmpty(apiResponse.getBody())) {\n ApplicationLogger.logInfo(\"Casa Account Balance Response Body Before Transformation :\" + apiResponse.getBody(), this.getClass());\n accountBalanceResponse = accountsResponseMapper.getManipulatedCasaAccountsBalanceResponse(apiResponse.getBody());\n ApplicationLogger.logInfo(\"Casa Account Balance Response Body After Transformation :\" + accountBalanceResponse, this.getClass());\n }\n return ResponseEntity.ok(accountBalanceResponse);\n } catch (UnirestException e) {\n ApplicationLogger.logError(MessageFormat\n .format(ERROR_MESSAGE_FORMAT, com.activeai.integration.banking.api.constants.MessageConstants.API_FAILURE_MESSAGE,\n this.getClass().getName(), ExceptionUtils.getStackTrace(e)));\n } catch (Exception e) {\n ApplicationLogger.logError(MessageFormat\n .format(ERROR_MESSAGE_FORMAT, com.activeai.integration.banking.api.constants.MessageConstants.EXCEPTION_MESSAGE,\n this.getClass().getName(), ExceptionUtils.getStackTrace(e)));\n }\n accountBalanceResponse.setResult(propertyUtil\n .frameErrorResponse(com.activeai.integration.banking.api.constants.MessageConstants.INTERNAL_SERVER_ERROR,\n APIConstants.INTERNAL_SERVER_ERROR, 500));\n return ResponseEntity.ok(accountBalanceResponse);\n }", "public BUserDto convertEntityToDto(BUser entity){\n\t\tBUserDto dto = new BUserDto();\n\t\tif(entity!=null){\n\t\t\tdto.setId(entity.getId());\n\t\t\tdto.setUsername(entity.getUsername());\n\t\t}\n\t\treturn dto;\n\t}", "Account getAccount(Integer accountNumber);", "public BankAccount getAccountBalanceRepo(String accountNr){\n String sql = \"SELECT * FROM bankaccount WHERE accountnr = :accountnr\";\n Map paramMap = new HashMap();\n paramMap.put(\"accountnr\", accountNr);\n BankAccount result = jdbcTemplate.queryForObject(sql, paramMap, new AccountRowMapper());\n return result;\n }", "public BankAccount(int balance) {\n\n this.balance = balance;\n\n }", "public BankAccount(int accountNum, String customerName, double balance){\n this.accountNum = accountNum;\n this. customerName = customerName;\n this.balance = balance;\n }", "public Account(double balance) {\n\t\tthis.balance = balance;\n\t}", "@Override\r\n\tpublic TransferAmountResponseDto transfer(TransferAmountRequestDto transferAmountRequestDto) {\r\n\t\tlog.info(\"inside transaction service\");\r\n\r\n\t\tTransferAmountResponseDto transferAmountResponseDto = new TransferAmountResponseDto();\r\n\r\n\t\tTransaction debitTransaction = new Transaction();\r\n\t\tTransaction creditTransaction = new Transaction();\r\n\r\n\t\tAccount fromAccount = accountRepository.findByCustomerId(transferAmountRequestDto.getCustomerId());\r\n\t\tAccount toAccount = accountRepository.findByAccountNumber(transferAmountRequestDto.getCreditTo());\r\n\r\n\t\tif (fromAccount == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.ACCOUNT_NOT_FOUND);\r\n\t\t}\r\n\r\n\t\tif (toAccount == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.ACCOUNT_NOT_FOUND);\r\n\t\t}\r\n\r\n\t\tif (fromAccount.getAccountNumber().equalsIgnoreCase(toAccount.getAccountNumber())) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.INVALID_ACCOUNT);\r\n\t\t}\r\n\r\n\t\tBeneficiary existBeneficiary = beneficiaryRepository.findByCustomerAccountNumberAndBeneficiaryAccountNumber(\r\n\t\t\t\tfromAccount.getAccountNumber(), toAccount.getAccountNumber());\r\n\r\n\t\tif (existBeneficiary == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.NOT_BENEFICIARY);\r\n\t\t}\r\n\r\n\t\tif (fromAccount.getBalance() < transferAmountRequestDto.getTransferAmount()) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.INVALID_AMOUNT);\r\n\t\t}\r\n\r\n\t\tif (transferAmountRequestDto.getTransferAmount() <= 0) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.MINIMUM_AMOUNT);\r\n\t\t}\r\n\r\n\t\tdebitTransaction.setAccountNumber(fromAccount.getAccountNumber());\r\n\t\tdebitTransaction.setTransactionType(\"debit\");\r\n\t\tdebitTransaction.setTransferAmount(transferAmountRequestDto.getTransferAmount());\r\n\t\tdebitTransaction.setTransactionDate(LocalDateTime.now());\r\n\t\tdebitTransaction.setAccount(fromAccount);\r\n\r\n\t\tcreditTransaction.setAccountNumber(toAccount.getAccountNumber());\r\n\t\tcreditTransaction.setTransactionType(\"credit\");\r\n\t\tcreditTransaction.setTransferAmount(transferAmountRequestDto.getTransferAmount());\r\n\t\tcreditTransaction.setTransactionDate(LocalDateTime.now());\r\n\t\tcreditTransaction.setAccount(toAccount);\r\n\r\n\t\tdouble remainingBalance = fromAccount.getBalance() - transferAmountRequestDto.getTransferAmount();\r\n\t\tdouble updatedBalance = toAccount.getBalance() + transferAmountRequestDto.getTransferAmount();\r\n\r\n\t\tfromAccount.setBalance(remainingBalance);\r\n\t\ttoAccount.setBalance(updatedBalance);\r\n\r\n\t\taccountRepository.save(fromAccount);\r\n\r\n\t\tTransaction transaction = transactionRepository.save(debitTransaction);\r\n\t\tif (transaction.getTransactionId() == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.TRANSACTION_FAILED);\r\n\t\t}\r\n\t\taccountRepository.save(toAccount);\r\n\r\n\t\ttransactionRepository.save(creditTransaction);\r\n\r\n\t\ttransferAmountResponseDto.setMessage(\"Amount Transferred successfully..\");\r\n\t\ttransferAmountResponseDto.setTransactionId(transaction.getTransactionId());\r\n\t\ttransferAmountResponseDto.setStatusCode(201);\r\n\t\treturn transferAmountResponseDto;\r\n\t}", "Account(int account_number,double balance) //pramiterized constrector\n {\n this.account_number=account_number;\n this.balance=balance;\n }", "public BankAccount(String accountName, int balance) {\n this.accountName = accountName;\n this.balance = balance;\n this.valueDeposits = balance;\n this.valueWithdrawals = 0;\n this.maximumBalance = balance;\n this.minimumBalance = balance;\n }", "@GetMapping(\"/accountBalance/{accountId}\")\n public ResponseEntity<String> getAccountBalanceAndTransactions(@PathVariable int accountId) {\n try {\n return new ResponseEntity<>(bankingService.getAccountBalanceAndTransactions(accountId), HttpStatus.OK);\n } catch (AccountNonExistentException e) {\n return new ResponseEntity<>(e.getLocalizedMessage(), HttpStatus.BAD_REQUEST);\n } catch (Exception e) {\n return new ResponseEntity<>(\"Error! \" + e.getLocalizedMessage(), HttpStatus.INTERNAL_SERVER_ERROR);\n }\n\n }", "public RemoteCall<BigInteger> balanceOf(String account) {\n final Function function = new Function(FUNC_BALANCEOF,\n Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(account)),\n Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {}));\n return executeRemoteCallSingleValueReturn(function, BigInteger.class);\n }", "public AccountTransactionDTO(String accountNumber, Date transactionTs, TransactionType type, BigDecimal amount) {\n\t\tthis.accountNumber = accountNumber;\n\t\tthis.transactionTs = transactionTs;\n\t\tthis.type = type;\n\t\tthis.amount = amount;\n\t}", "public Account findByAccountName(Account accountDto) throws Exception {\n\t\tCriteria criteria = new Criteria(\"accountName\").regex(accountDto\n\t\t\t\t.getAccountName());\n\t\treturn mongoTemplate.findOne(Query.query(criteria), Account.class);\n\t}", "Page<AccountDTO> coverListAccountToListEmpDTO(Page<Account> accounts);", "V toDto(E entity);", "private Account debitAmount(String accountNumber, BigDecimal amt) throws TransferServiceException\n\t{\n\t\tAccount account = repository.findByAccountNumber(accountNumber);\n\t\tisAccountValid(account);\n\t\taccount.setBalance(getBalance(accountNumber).subtract(amt));\n\t\treturn account;\n\t}", "Page<AccountDTO> findAllAccount(Pageable pageable);", "public ResponseEntity<LoanAccountBalanceResponse> getLoanAccountBalanceResponseEntity(String customerId, String accountId,\n String accessToken) {\n LoanAccountBalanceResponse response = new LoanAccountBalanceResponse();\n try {\n HttpResponse<String> apiResponse =\n Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.LOAN_ACCOUNT_BALANCE_API_END_POINT, customerId, accountId))\n .header(APIConstants.CACHE_CONTROL, APIConstants.NO_CACHE).asString();\n ApplicationLogger.logInfo(\n MessageConstants.API_RESPONSE_STATUS + apiResponse.getStatus() + MessageConstants.AND_RESPONSE_STATUS_TEXT + apiResponse.getStatusText(),\n this.getClass());\n if (StringUtils.isNotEmpty(apiResponse.getBody())) {\n ApplicationLogger.logInfo(\"Loan Account Balance Response Body Before Transformation :\" + apiResponse.getBody(), this.getClass());\n response = accountsResponseMapper.getManipulatedLoanAccountsBalanceResponse(apiResponse.getBody());\n ApplicationLogger.logInfo(\"Loan Account Balance Response Body After Transformation :\" + response, this.getClass());\n }\n return ResponseEntity.ok(response);\n } catch (UnirestException e) {\n ApplicationLogger.logError(MessageFormat\n .format(ERROR_MESSAGE_FORMAT, com.activeai.integration.banking.api.constants.MessageConstants.API_FAILURE_MESSAGE,\n this.getClass().getName(), ExceptionUtils.getStackTrace(e)));\n } catch (Exception e) {\n ApplicationLogger.logError(MessageFormat\n .format(ERROR_MESSAGE_FORMAT, com.activeai.integration.banking.api.constants.MessageConstants.EXCEPTION_MESSAGE,\n this.getClass().getName(), ExceptionUtils.getStackTrace(e)));\n }\n response.setResult(propertyUtil.frameErrorResponse(MessageConstants.INTERNAL_SERVER_ERROR, APIConstants.INTERNAL_SERVER_ERROR, 500));\n return ResponseEntity.ok(response);\n }", "public static BigDecimal getBillingAccountNetBalance(Delegator delegator, String billingAccountId) throws GenericEntityException {\n BigDecimal balance = ZERO;\n\n // search through all PaymentApplications and add the amount that was applied to invoice and subtract the amount applied from payments\n List<GenericValue> paymentAppls = EntityQuery.use(delegator).from(\"PaymentApplication\").where(\"billingAccountId\",\n billingAccountId).queryList();\n for (GenericValue paymentAppl : paymentAppls) {\n BigDecimal amountApplied = paymentAppl.getBigDecimal(\"amountApplied\");\n GenericValue invoice = paymentAppl.getRelatedOne(\"Invoice\", false);\n if (invoice != null) {\n // make sure the invoice has not been canceled and it is not a \"Customer return invoice\"\n if (!\"CUST_RTN_INVOICE\".equals(invoice.getString(\"invoiceTypeId\")) && !\"INVOICE_CANCELLED\".equals(invoice.getString(\"statusId\"))) {\n balance = balance.add(amountApplied);\n }\n } else {\n balance = balance.subtract(amountApplied);\n }\n }\n\n balance = balance.setScale(DECIMALS, ROUNDING);\n return balance;\n }", "public double getBankAccountBalance() {\r\n\t\t\r\n\t\tdouble balance = 0.0;\r\n\t\t\r\n\t\t\t\tif( customerBankAccountList.contains(this.getCustomer() ) ) \r\n\t\t\t\t{\t\r\n\t\t\t\t\tbalance = this.getCustomer().getBalance();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\treturn balance;\r\n\t\t}", "Account(int balance) {\n if(balance <0) this.balance=0;\n this.balance = balance;\n }", "private static Account getAccount(Node node) {\n if (node.getNodeType() == Node.ELEMENT_NODE) {\n Element element = (Element) node;\n int accNum = Integer.parseInt(getTagValue(\"accountNumber\", element));\n String password = getTagValue(\"password\", element);\n double balance = Double.parseDouble(getTagValue(\"accountBalance\", element));\n String cusName = getTagValue(\"customerName\", element);\n String cusAddress = getTagValue(\"customerAddress\", element);\n String cusPhone = getTagValue(\"customerPhoneNum\", element);\n return new Account(accNum, password, balance, cusName, cusAddress, cusPhone);\n }\n return new Account();\n }", "public abstract D convertToDto(T entity);", "public interface AccountService {\n\n Account createAccount(Account account);\n\n AccountDto.ResponseAccount getAccountById(Long accountId);\n\n}", "@GetMapping(value = \"/payments/{accountNumber}\")\n\tpublic List<PaymentDTO> getAccountTransactions(@PathVariable(\"accountNumber\") final String accountNumber) {\n\t\treturn this.paymentsService.getAccountTransactions(accountNumber);\n\t}", "@GET\n @Path(\"bank/account/{account_id}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getBankAccountDetails(@PathParam(\"account_id\") \n String accountId) {\n \n int id = Integer.parseInt(accountId);\n Account a1 = new Account(1234, 12345678, 123.47, \"Current\", id, 1);\n return Response.status(200).entity(gson.toJson(a1)).build();\n \n }", "public Account getAccountByAccountNo(int accNo) {\n Account account = accountRepository.findByAccountNo(accNo);\n return account;\n }", "public interface Account {\n\n\tpublic String getId();\n\n\tpublic String getEmail();\n\n\tpublic AccountState getState();\n\tpublic void setState(AccountState state);\n\t\n\tpublic void setEmail(String email);\n\n\tpublic String getCompanyName();\n\n\tpublic void setCompanyName(String companyName);\n\n\tpublic Name getFullName();\n\n\tpublic void setFullName(Name fullName);\n\n\tpublic Address getAddress();\n\n\tpublic void setAddress(Address address);\n\t\n\tpublic Map<String, String> getExternalAccounts();\n\t\n\tpublic void setExternalAccounts(Map<String, String> externalAccounts);\n\t\n}", "public void transferMoney(int customerAccountId, int accountId) throws SQLException {\n // check if the customer has this account\n boolean customerOwnsAccount = false;\n for (int i = 0; i < this.currentCustomer.getAccounts().size(); i++) {\n if (customerAccountId == this.currentCustomer.getAccounts().get(i).getId()) {\n customerOwnsAccount = true;\n break;\n }\n }\n // it is safe to proceed since the customer accounts have been authenticated\n if (customerOwnsAccount) {\n Account customerAccount = DatabaseSelectHelper.getAccountDetails(customerAccountId);\n // try and catch for valid input (int) expected\n try {\n System.out.println(\"Enter amount you wish to transfer:\");\n // take user input as a big decimal\n BigDecimal bigAmount = new BigDecimal(br.readLine());\n if (bigAmount.compareTo(customerAccount.getBalance()) <= 0) {\n // try to update accounts\n try {\n // update the account which received money in database\n DatabaseUpdateHelper.updateAccountBalance(\n bigAmount.add(DatabaseSelectHelper.getBalance(accountId)), accountId);\n // update account which transfered money in database\n DatabaseUpdateHelper.updateAccountBalance(\n customerAccount.getBalance().subtract(bigAmount), customerAccountId);\n // update the customer object for printing reasons for other options\n this.currentCustomer.updateAccounts();\n // Explicitly tell user money is transfered\n System.out.println(\"you have successfully transfered money to account \" + accountId);\n \n } catch (Exception e) {\n System.out.println(\"The account ID you wish to transfer money to does not exist\");\n }\n // error printing\n } else {\n System.out.println(\"This account does not have enough money to send this amount\");\n }\n \n } catch (Exception e) {\n System.out.println(\"Invalid amount\");\n }\n // error printing\n } else {\n System.out.println(\"You do not have access to this account\");\n }\n \n }", "public BankAccount() {\t\n\t\tthis.accountNumber = UUID.randomUUID().toString().substring(0, 6);\n\t\tthis.balance = 0;\n\t\tthis.accountType = \"Bank account\";\n\t}", "@Secured({\"ROLE_ADMIN\"})\r\n\t@RequestMapping(value=\"/transfer\", method=RequestMethod.POST)\r\n\tList<AccountMovement> transferMoneyBetweenAccountsWithObjects(@Valid @RequestBody(required=true) MoneyTransferDTOInput moneyTransferDTOIn) throws Exception{\r\n\t\t\r\n\t\t//Validate accounts\r\n\t\tAccount sourceAccount = accountRepository.findOne(moneyTransferDTOIn.getSourceAccountNo());\r\n\t\tif(sourceAccount == null)\r\n\t\t\tthrow new Exception(\"Source account not found\");\r\n\t\t\r\n\t\tAccount destinationAccount = accountRepository.findOne(moneyTransferDTOIn.getDestinationAccountNo());\r\n\t\tif(destinationAccount == null)\r\n\t\t\tthrow new Exception(\"Destination account not found\");\r\n\t\t\r\n\t\tif(sourceAccount.equals(destinationAccount))\r\n\t\t\tthrow new Exception(\"Source and destination accounts must be different\");\r\n\t\t\r\n\t\tList<AccountMovement> accountMovements = new ArrayList<AccountMovement>();\r\n\t\tAccountMovement sourceMovement = new AccountMovement(sourceAccount, destinationAccount, moneyTransferDTOIn.getAmount().negate());\r\n\t\trepository.save(sourceMovement);\r\n\t\t\r\n\t\tAccountMovement destinationMovement = new AccountMovement(destinationAccount, sourceAccount, moneyTransferDTOIn.getAmount());\r\n\t\trepository.save(destinationMovement);\r\n\t\t\r\n\t\taccountMovements.add(sourceMovement);\r\n\t\taccountMovements.add(destinationMovement);\r\n\t\t\r\n\t\treturn accountMovements;\r\n\t}", "public Integer getAccountBalance(int account_id){\n Account a = cache.get(account_id);\n if(a != null) return a.getBalance();\n\n try (\n Statement s = rawDataSource.getConnection().createStatement();\n ResultSet res = s.executeQuery(\n \"SELECT BALANCE FROM ACCOUNTS WHERE ACCOUNT_ID = \" + account_id)) {\n\n if (res.next())\n return res.getInt(\"BALANCE\");\n } catch (SQLException ex) {\n return null;\n }\n\n return null;\n }", "public BankAccount getBalance (IDRecord idRecord) {\n\n BankAccount currentBankAccount;\n // extract the bank account number\n int theAcctNum = idRecord.getNumericalID();\n\n // find BankAccount from account -> BankAccount HashMap\n currentBankAccount = hashMapOfAllAccts.get(theAcctNum);\n\n if ( currentBankAccount == null) {\n // if no account was found, generate a generic empty account\n currentBankAccount = new BankAccount();\n\n }\n\n return currentBankAccount;\n }", "public long balanceForAccount(int acctnum) {\n if (acctnum != -1) {\n return mAccounts.get(acctnum).balance();\n } else {\n long sum = 0;\n for (HDAccount hda : mAccounts)\n sum += hda.balance();\n return sum;\n }\n }", "public CustomerDto buildDtoFromEntity(Customer customer) {\n return CustomerDto.builder().serviceType(customer.getServiceType()).existingCustomer(customer.isExistingCustomer())\n .accountNumber(customer.getAccountNumber()).build();\n }", "public BankAccount(int accountNo, String name, double balance) {\n this.accountNo = accountNo;\n this.name = name;\n if(balance > 0.0)\n this.balance = balance;\n }", "public MemberDto copyEntityToDto(Member entity, MemberDto dto) {\r\n reflectMemberIdToDto(entity, dto);\r\n reflectMemberNameToDto(entity, dto);\r\n reflectFormalizedDatetimeToDto(entity, dto);\r\n reflectUpdateDatetimeToDto(entity, dto);\r\n\r\n return dto;\r\n }", "public void getBalance( Integer account_id ){\r\n\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"account_id\", String.valueOf(account_id));\r\n String url = API_DOMAIN + ACCOUNT_EXT + GET_BALANCE;\r\n this.makeVolleyRequest( url, params );\r\n }", "public static UserDTO mapEntityIntoDTO(UserEntity entity) {\n \tif (entity == null) {\n \t\treturn null;\n \t}\n \n \tUserDTO dto = new UserDTO();\n \t\n \tdto.setLogin(entity.getLogin());\n\n \tdto.setPassword(entity.getPassword());\n \t// mapValue(entity, dto, \"password\");\n\n \t//dto.setQuota(entity.getQuota());\n \tModelDTOMapper.readEntityFieldToDto(dto, \"quota\", entity, \"quota\", new ConvertIntToLong());\n \t\n \t// dto.setEnabled(entity.getEnabled());\n \tModelDTOMapper.readEntityFieldToDto(dto, entity, \"enabled\");\n return dto;\n }", "public Account getAccountForEditBalance() {\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(\"Account: \" + account.getAccountNumber() + \" Balance: \" + account.getBalance());\n\n\t\tdouble balance = Inputs.getUserDoubleInput(\"Enter new balance:\");\n\t\taccount.setBalance(balance);\n\t\treturn account;\n\t}", "@Override\n public void changeBalance (ChangeBalanceDto changeBalanceDto) {\n new AccountDaoImpl(new StatementsRunnerImpl()).changeBalance(changeBalanceDto);\n }", "public static BigDecimal getBalance(int accountId) throws SQLException {\n boolean cdt1 = Checker.checkValidUserAccountAccountId(accountId);\n // if it is a valid account id, establish a connection\n if (cdt1) {\n Connection connection = DatabaseDriverHelper.connectOrCreateDataBase();\n BigDecimal balance = DatabaseSelector.getBalance(accountId, connection);\n connection.close();\n return balance;\n }\n return null;\n }", "public interface Account {\n\t\n//\t\n//\t\tMoney money;\n//\t\tInterestRate interestRate;\n//\t\tPeriod interestPeriod;\n\t\t\n\t\tpublic int deposit(int depositAmmount);\n//\t\t{\n//\t\t\treturn money.getMoney()+depositAmmount;\n//\t\t}\n\t\t\n\t\tpublic int withdrawl(int withdrawAmmount);\n//\t\t{\n//\t\t\treturn money.getMoney()-withdrawAmmount;\n//\t\t}\n\t\t\n\t\tpublic int getBalance();\n//\t\t{\n//\t\t\treturn money.getMoney()*interestRate.getInterestRate()*interestPeriod.getPeriod()/100;\n//\t\t}\n\t}", "public Account(String number, double balance, String customerName, String customerEmail, String customerPhone) {\n // set the instance's field variables directly, and do NOT use the setters inside constructor.\n this.number = number;\n this.balance = balance;\n this.customerName = customerName;\n this.customerEmail = customerEmail;\n this.customerPhone = customerPhone;\n }", "public Account(int id, double balance) {\n this();\n this.name = \"Account\";\n this.id = id;\n this.balance = balance;\n }", "AccountModel findById(String accountNumber) throws AccountException;", "Account getAccount();", "public BaseJson<BigDecimal> wallet_balance() throws Exception {\n String s = main(\"wallet_balance\",\"[]\");\n return JsonHelper.jsonStr2Obj(s, BaseJson.class);\n }", "public Account(){\n this.id = 0;\n this.balance = 0;\n this.annualInterestRate = 0;\n this.dateCreated = new Date();\n }", "public static <Entity,Dto> Dto entityToDTO(Entity entity,Class<Dto> classDTO)\n\t{\n\t\tModelMapper mapper = new ModelMapper();\n\t\treturn mapper.map(entity, classDTO);\n\t}", "public Account(Holder holder, int balance) {\n this.holder = holder;\n this.balance = balance;\n }", "public interface AccountService {\n\n Double getBalanceByDate(Long id, Date date);\n\n List<Account> getAllByUser(String mobileNumber);\n}", "public Money getTotalBalance();", "Page<BalanceDTO> findAll(Pageable pageable);", "List<Account> coverListEmpDTOToListAccount(List<AccountDTO> accountDTOList);", "@Service\npublic interface AccountService {\n void addAccount(Account account);\n\n void removeAccount(Account account);\n\n void addAccount(AccountJsonImportDto accountDto);\n\n void addAccount(AccountImportXmlDto accountDto);\n\n AccountsImportXmlDto findAll();\n}", "Optional<BalanceDTO> findOne(Long id);", "public double getPreBalanceForToAccount(Customer toAccount,RewardCurrency toRewardCurrency) {\n\n // Get the CustomerRewardBalance object\n CustomerRewardBalance customerRewardBalance = customerRewardBalanceService.findByCrbLoyaltyIdAndCrbMerchantNoAndCrbRewardCurrency(toAccount.getCusLoyaltyId(),toAccount.getCusMerchantNo(),toRewardCurrency.getRwdCurrencyId());\n\n\n // If the reward balance object is null, return 0\n if ( customerRewardBalance == null ) {\n\n return 0.0;\n\n }\n\n\n // Return balance\n return customerRewardBalance.getCrbRewardBalance();\n\n }", "public Account(int id, double balance) {\n this();\n this.id = id;\n this.balance = balance;\n }", "public AccountInfo getAccountInfo() {\n return accountInfo;\n }", "public String getAccountInfo(){\n NumberFormat currencyFormat = NumberFormat.getCurrencyInstance();\n return \"Account No : \" + accountNo +\n \"\\nName : \" + name +\n \"\\nBalance : \" + currencyFormat.format(balance);\n }", "@PostMapping(value = \"/transfer\")\n public ResponseEntity<ResponseWrapper> transfer(@RequestBody AccountWrapper accountWrapper) {\n ResponseWrapper wrapper =new ResponseWrapper();\n UserAccount userAccount = userAccountRepository.findByAccountNumber(accountWrapper.getAccountNumber());\n if(Objects.isNull(userAccount)){\n wrapper.setMessage(\"Account With that account number does not exist\");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n\n if (userAccount.getAmount() < accountWrapper.getAmount()) {\n wrapper.setMessage(\"Amount in your account is less than the amount you want to transfer \");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n\n //crediting the other user account\n UserAccount userAccount2 = userAccountRepository.findByAccountNumber(accountWrapper.getTransfer_accountNumber());\n if(Objects.isNull(userAccount2)){\n wrapper.setMessage(\"Account To Transfer With that account number does not exist\");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n Float amount = userAccount2.getAmount() + accountWrapper.getAmount();\n userAccount2.setAmount(amount);\n userAccountRepository.save(userAccount2);\n\n //debit the user transferring money\n float amount1 = userAccount.getAmount() - accountWrapper.getAmount();\n userAccount.setAmount(amount1);\n userAccountRepository.save(userAccount);\n\n accountTransactionService.saveTransaction(new AccountTransaction(TRANSFER,accountWrapper.getAccountNumber(),\"Transferring Money\",\n accountWrapper.getAmount(),accountWrapper.getTransfer_accountNumber(),userAccount.getUserID()));\n wrapper.setData(\"Amount transfered successfully\");\n\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }", "public Account(int accountNo, String accountHolderName, double balance) {\r\n this.accountNo = accountNo;\r\n this.accountHolderName = accountHolderName;\r\n this.balance = balance;\r\n\r\n Account.accountCount++;\r\n }", "public BankAccount(String holderName, String number, float balance){\r\n\t\tthis.holderName = holderName;\r\n\t\tthis.number = number;\r\n\t\tthis.balance = balance;\r\n\t}", "@PostMapping(value = \"/deposit\")\n public ResponseEntity<ResponseWrapper> deposit(@RequestBody AccountWrapper accountWrapper) {\n ResponseWrapper wrapper =new ResponseWrapper();\n UserAccount userAccount = userAccountRepository.findByAccountNumber(accountWrapper.getAccountNumber());\n if(Objects.isNull(userAccount)){\n wrapper.setMessage(\"Account With that account number does not exist\");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n Float amount = userAccount.getAmount() + accountWrapper.getAmount();\n userAccount.setAmount(amount);\n\n accountTransactionService.saveTransaction(new AccountTransaction(DEPOSIT,accountWrapper.getAccountNumber(),\"Depositing Money\",accountWrapper.getAmount(),userAccount.getUserID()));\n wrapper.setData(userAccountRepository.save(userAccount));\n wrapper.setMessage(\"Money Deposited Successfully\");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }", "@Override\n public Transfer makeTransfer(String counterAccount, Money amount)\n throws BusinessException {\n if (amount.greaterThan(this.transferLimit)) {\n throw new BusinessException(\"Limit exceeded!\");\n }\n // 2. Assuming result is 9-digit bank account number, validate 11-test:\n int sum = AccountChekSum(counterAccount);\n\n if (sum % 11 == 0) {\n // 3. Look up counter account and make transfer object:\n Transfer result = doTransfer(counterAccount,amount);\n return result;\n } else {\n throw new BusinessException(\"Invalid account number!\");\n }\n }", "CommentDto entityToDto(Comment comment);", "Optional<Account> findByNumber(long number);", "@Override\n public BigDecimal getCurrentBalance(Account account) {\n return null;\n }", "@SequenceGenerator(name = \"generator\", sequenceName=\"SEQ_CUSTOMER_ACCOUNT_MANAGENT\", allocationSize = 1)\n\t@Id\n\t@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = \"generator\")\n\t@Column(name = \"ACCOUNT_ID\", unique = true, nullable = false, precision = 20, scale = 0)\n\tpublic BigDecimal getAccountId() {\n\t\treturn this.accountId;\n\t}", "public BankAccount(int accountNum, String customerName){\n this.accountNum = accountNum;\n this.customerName = customerName;\n balance = 0;\n }", "public Account(int accNmr, String firstName, String lastName, double balance) {\n this.accNmr = accNmr;\n this.firstName = firstName;\n this.lastName = lastName;\n this.balance = balance;\n }", "@Override\n public Account findByAccountNumber(String accountNumber) {\n Query findByAccNum = new Query();\n findByAccNum.addCriteria(Criteria.where(\"accountNumber\").is(accountNumber));\n Account found = operations.findOne(findByAccNum, Account.class);\n return found;\n }", "public static Account getAccountDetails(int accountId) throws SQLException {\n boolean cdt1 = Checker.checkValidUserAccountAccountId(accountId);\n // if it is a account id, establish a connection\n if (cdt1) {\n EnumMapRolesAndAccounts map = new EnumMapRolesAndAccounts();\n map.createEnumMap();\n Connection connection = DatabaseDriverHelper.connectOrCreateDataBase();\n ResultSet results = DatabaseSelector.getAccountDetails(accountId, connection);\n while (results.next()) {\n // get the account details\n String name = results.getString(\"NAME\");\n BigDecimal balance = new BigDecimal(results.getString(\"BALANCE\"));\n // make an account class (either chequing, savings, or tfsa) based on the type\n if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.CHEQUING)) {\n ChequingAccount chequing = new ChequingAccountImpl(accountId, name, balance);\n connection.close();\n return chequing;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.SAVINGS)) {\n SavingsAccount savings = new SavingsAccountImpl(accountId, name, balance);\n connection.close();\n return savings;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.TFSA)) {\n TFSA tfsa = new TFSAImpl(accountId, name, balance);\n connection.close();\n return tfsa;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.RESTRICTEDSAVING)) {\n RestrictedSavingsAccount rsa = new RestrictedSavingsAccountImpl(accountId, name, balance);\n connection.close();\n return rsa;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.BALANCEOWING)) {\n BalanceOwingAccount boa = new BalanceOwingAccountImpl(accountId, name, balance);\n connection.close();\n return boa;\n }\n }\n }\n return null;\n }", "@Override\n\t@Transactional(readOnly = true)\n\tpublic Optional<AccountsDTO> findOne(Long accountID) {\n\t\tlog.debug(\"Request to get Accounts : {}\", accountID);\n\t\treturn accountsRepository.findById(accountID)\n\t\t\t.map(accountsMapper::toDto);\n\t}", "public net.nyhm.protonet.example.proto.AccountProto.Account getAccount() {\n if (accountBuilder_ == null) {\n return account_ == null ? net.nyhm.protonet.example.proto.AccountProto.Account.getDefaultInstance() : account_;\n } else {\n return accountBuilder_.getMessage();\n }\n }", "public net.nyhm.protonet.example.proto.AccountProto.Account getAccount() {\n if (accountBuilder_ == null) {\n return account_ == null ? net.nyhm.protonet.example.proto.AccountProto.Account.getDefaultInstance() : account_;\n } else {\n return accountBuilder_.getMessage();\n }\n }", "public BankTransactionTO bankCardToBankCardTransfer(BankCardTO fromBankCardTO, Long toBankCardId, long money) throws Exception {\r\n MoneyTransferTransaction moneyTransferTransaction = new MoneyTransferTransaction();\r\n return moneyTransferTransaction.bankCardToBankCard(fromBankCardTO, toBankCardId, money);\r\n }", "@Query(\"select acc.availableBalance from Account acc where acc.customer.customerId = :custId and acc.accountStatus = :accountStatus and acc.accountType = :accountType\")\n\tOptional<Double> findByAccountBalance(@Param(\"custId\") Long custId, @Param(\"accountStatus\") String accountStatus,\n\t\t\t@Param(\"accountType\") String accountType);", "@Override\n public void apply(Map<Integer, Account> accounts) {\n Account account = accounts.get(accountNumber);\n if (account == null) {\n throw new ViolatedConstraintException(\n \"Tried to withdraw from non-existent account \" + accountNumber\n );\n }\n\n // Make sure the account is enabled.\n if (!account.isEnabled()) {\n throw new ViolatedConstraintException(\n \"Tried to withdraw from disabled account \" + accountNumber\n );\n }\n\n // Check that the account belongs to accountHolder.\n if (!account.getAccountHolder().equals(accountHolder)) {\n throw new ViolatedConstraintException(\n \"User \\\"\" + accountHolder + \"\\\" tried to perform transaction \" +\n \"on account \" + accountNumber +\n \" which belongs to user \\\"\" + account.getAccountHolder() + \"\\\"\"\n );\n }\n\n // Compute fee based on whether it was admin initiated or not\n // and whether they are a student or not.\n int fee = (adminInitiated) ? 0 : (\n (account.isStudent()) ? Constants.STUDENT_FEE : Constants.NORMAL_FEE\n );\n\n // Check that the final balance of the account after removing the funds\n // and fee is greater than zero.\n int finalBalance = account.getBalance() - amount - fee;\n if (finalBalance < 0) {\n throw new ViolatedConstraintException(\n \"Final balance should be >= 0, got \" + finalBalance\n );\n }\n\n // If the transaction isn't admin initiated, check that the final\n // withdrawal total is less than the withdrawal limit.\n int finalWithdrawalTotal = 0;\n\n if (!adminInitiated) {\n finalWithdrawalTotal = account.getWithdrawalTotal() + amount;\n\n if (finalWithdrawalTotal > Constants.WITHDRAWAL_LIMIT) {\n throw new ViolatedConstraintException(\n \"Final withdrawal total should be <= \" + Constants.WITHDRAWAL_LIMIT +\n \", got \" + finalWithdrawalTotal\n );\n }\n }\n\n // Remove the funds and fee from the account.\n account.setBalance(finalBalance);\n\n // If the transaction isn't admin initiated update withdrawal total\n // and increment the transaction count.\n if (!adminInitiated) {\n account.setWithdrawalTotal(finalWithdrawalTotal);\n account.incrementTransactionCount();\n }\n }", "@Override\npublic Account findById(int accountid) {\n\treturn accountdao.findById(accountid);\n}", "private HistoryDTO convertEntityToDTO(History history) {\n\t\tHistoryDTO historyDto = modelMapper.map(history, HistoryDTO.class);\n\t\treturn historyDto;\n\t}", "private Account getAccount(int accountNumber) {\r\n // loop through accounts searching for matching account number\r\n for (Account currentAccount : accounts) {\r\n // return current account if match found\r\n if (currentAccount.getAccountNumber() == accountNumber) {\r\n return currentAccount;\r\n }\r\n }\r\n\r\n return null; // if no matching account was found, return null\r\n }" ]
[ "0.75170684", "0.719183", "0.669086", "0.65872043", "0.6369819", "0.624895", "0.6181215", "0.608207", "0.5953702", "0.5769916", "0.5674819", "0.56470186", "0.56389683", "0.5581933", "0.557917", "0.5570979", "0.55658776", "0.55540174", "0.5548535", "0.55280596", "0.5517304", "0.5475076", "0.54675865", "0.54612505", "0.5459046", "0.5446014", "0.54288375", "0.54244536", "0.5398625", "0.53953856", "0.5394122", "0.53842807", "0.5381006", "0.53567123", "0.53500867", "0.5348061", "0.5333386", "0.5331227", "0.53224915", "0.5320501", "0.5311592", "0.5283191", "0.5268753", "0.52684265", "0.5264576", "0.5248391", "0.5237023", "0.5235351", "0.52275354", "0.5214878", "0.5212995", "0.5200632", "0.5185097", "0.51654875", "0.5157593", "0.5156445", "0.5151558", "0.5149138", "0.5143801", "0.5131302", "0.5131035", "0.51246774", "0.5123576", "0.5122563", "0.51205873", "0.51134455", "0.51103497", "0.5109367", "0.51018757", "0.50995785", "0.5079282", "0.50711185", "0.5066658", "0.50633764", "0.5053919", "0.50484776", "0.50452375", "0.50439525", "0.50439376", "0.50430876", "0.5041418", "0.50384283", "0.5038266", "0.5035604", "0.5032387", "0.5027194", "0.5026252", "0.50081766", "0.49932578", "0.49817914", "0.49791223", "0.49756736", "0.49730232", "0.49730232", "0.49672145", "0.49617988", "0.49608588", "0.49489126", "0.49368966", "0.49351776" ]
0.7383558
1
Method accepts ChangeBalanceDto object and returns nothing. Calls changeBalance method from DAO layer.
@Override public void changeBalance (ChangeBalanceDto changeBalanceDto) { new AccountDaoImpl(new StatementsRunnerImpl()).changeBalance(changeBalanceDto); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int updateBalance(CardVO cv) throws RemoteException;", "public void changeBalance (int amount){\n balance += amount;\n }", "public void setBalance(){\n balance.setBalance();\n }", "public void editBalance() {\n\t\tAccount account = getAccountForEditBalance();\n\n\t\tif (adminDao.editBalance(account))\n\t\t\tSystem.out.println(\"Balance edited!\");\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "@Override\r\n\tpublic TransferAmountResponseDto transfer(TransferAmountRequestDto transferAmountRequestDto) {\r\n\t\tlog.info(\"inside transaction service\");\r\n\r\n\t\tTransferAmountResponseDto transferAmountResponseDto = new TransferAmountResponseDto();\r\n\r\n\t\tTransaction debitTransaction = new Transaction();\r\n\t\tTransaction creditTransaction = new Transaction();\r\n\r\n\t\tAccount fromAccount = accountRepository.findByCustomerId(transferAmountRequestDto.getCustomerId());\r\n\t\tAccount toAccount = accountRepository.findByAccountNumber(transferAmountRequestDto.getCreditTo());\r\n\r\n\t\tif (fromAccount == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.ACCOUNT_NOT_FOUND);\r\n\t\t}\r\n\r\n\t\tif (toAccount == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.ACCOUNT_NOT_FOUND);\r\n\t\t}\r\n\r\n\t\tif (fromAccount.getAccountNumber().equalsIgnoreCase(toAccount.getAccountNumber())) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.INVALID_ACCOUNT);\r\n\t\t}\r\n\r\n\t\tBeneficiary existBeneficiary = beneficiaryRepository.findByCustomerAccountNumberAndBeneficiaryAccountNumber(\r\n\t\t\t\tfromAccount.getAccountNumber(), toAccount.getAccountNumber());\r\n\r\n\t\tif (existBeneficiary == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.NOT_BENEFICIARY);\r\n\t\t}\r\n\r\n\t\tif (fromAccount.getBalance() < transferAmountRequestDto.getTransferAmount()) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.INVALID_AMOUNT);\r\n\t\t}\r\n\r\n\t\tif (transferAmountRequestDto.getTransferAmount() <= 0) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.MINIMUM_AMOUNT);\r\n\t\t}\r\n\r\n\t\tdebitTransaction.setAccountNumber(fromAccount.getAccountNumber());\r\n\t\tdebitTransaction.setTransactionType(\"debit\");\r\n\t\tdebitTransaction.setTransferAmount(transferAmountRequestDto.getTransferAmount());\r\n\t\tdebitTransaction.setTransactionDate(LocalDateTime.now());\r\n\t\tdebitTransaction.setAccount(fromAccount);\r\n\r\n\t\tcreditTransaction.setAccountNumber(toAccount.getAccountNumber());\r\n\t\tcreditTransaction.setTransactionType(\"credit\");\r\n\t\tcreditTransaction.setTransferAmount(transferAmountRequestDto.getTransferAmount());\r\n\t\tcreditTransaction.setTransactionDate(LocalDateTime.now());\r\n\t\tcreditTransaction.setAccount(toAccount);\r\n\r\n\t\tdouble remainingBalance = fromAccount.getBalance() - transferAmountRequestDto.getTransferAmount();\r\n\t\tdouble updatedBalance = toAccount.getBalance() + transferAmountRequestDto.getTransferAmount();\r\n\r\n\t\tfromAccount.setBalance(remainingBalance);\r\n\t\ttoAccount.setBalance(updatedBalance);\r\n\r\n\t\taccountRepository.save(fromAccount);\r\n\r\n\t\tTransaction transaction = transactionRepository.save(debitTransaction);\r\n\t\tif (transaction.getTransactionId() == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.TRANSACTION_FAILED);\r\n\t\t}\r\n\t\taccountRepository.save(toAccount);\r\n\r\n\t\ttransactionRepository.save(creditTransaction);\r\n\r\n\t\ttransferAmountResponseDto.setMessage(\"Amount Transferred successfully..\");\r\n\t\ttransferAmountResponseDto.setTransactionId(transaction.getTransactionId());\r\n\t\ttransferAmountResponseDto.setStatusCode(201);\r\n\t\treturn transferAmountResponseDto;\r\n\t}", "public int baldown(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "void updateBalance(int amount){ \n\t\tbalance = amount;\n\t}", "public abstract void updateBalance(Balance balance, LedgerEntry.Subtype subtype, long amount) throws TransactionException;", "@Override\r\npublic void checkBalance() {\n\t\r\n}", "public abstract void rebalance();", "@Override\n\tpublic void calculateAndUpdateBalance() {\n\n\t\tbalance -= fee;\n\n\t}", "public void balance() {\n tree.balance();\n }", "public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }", "public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }", "@Override\r\n\tpublic void updateBalance( Integer userid, double amount) {\n\t\tif ( getBalance( userid) < amount) {\r\n\t\t\tthrow new RuntimeException( \"用户余额不足!\");\r\n\t\t}\r\n\t\tString sql = \"UPDATE buyers SET balance = balance - ? WHERE id = ?;\";\r\n\t\tjdbcTemplate.update( sql, amount, userid);\r\n\t}", "@Transactional(isolation = Isolation.SERIALIZABLE)\n public void updateAccountBalance(Long accountId, Double newBalance) {\n Account account =accountRepository.findById(accountId)\n .orElseThrow(() -> new AccountNotFoundException(\"Account not found\"));\n account.setBalance(newBalance);\n accountRepository.save(account);\n }", "private void updateMoney() {\n balance = mysql.getMoney(customerNumber);\n balanceConverted = (float) balance / 100.00;\n }", "@Post(uri = \"/{accountId}/deposits\", consumes = MediaType.APPLICATION_JSON)\n @Operation(summary = \"Creates deposit\")\n void create(@Parameter(description = \"Account ID\") BigInteger accountId,\n @Parameter(description = \"Deposit model\") BalanceChangeRequest balanceChangeRequest);", "private void setBalance(double balance) {\n this.balance = balance;\n }", "public void updateBalance(UUID accountId, double amount) {\n Account account = repository.getAccount(accountId);\n account.updateBalance(amount);\n repository.save(account);\n }", "public void showAccountBalance(){\n balance();\n\n }", "public void setBalance(Integer balance) {\n this.balance = balance;\n }", "public void setBalance(Integer balance) {\n this.balance = balance;\n }", "@Override\r\n\t\t\tpublic Account payAmount(String MobileNo, String accountBalance) throws RechargeException {\r\n\t\t\t\t// TODO \r\n\t\t\t\tAccount dto=dao.payAmount(MobileNo, accountBalance);\r\n\t\t\t\tif(dto==null)\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new RechargeException(\"cannot rechrge as given mobile no does not exist\");\r\n\t\t\t\t}\r\n\t\t\t\treturn dto;\r\n\t\t\t}", "void setManageTransactionBalance(String balance);", "public Money getTotalBalance();", "public void setBalance(java.math.BigDecimal balance) {\n this.balance = balance;\n }", "public int balup(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "public void setBalance(float balance) {\n this.balance = balance;\n }", "double getBalance();", "double getBalance();", "public void setBalance(Double balance) {\r\n this.balance = balance;\r\n }", "public AccountDto getBalanceFor(UUID accountId) {\n Account account = repository.getAccount(accountId);\n return getAccountDtoFor(account);\n }", "void setBalance(double value);", "abstract int checkBalance(String accountno) throws RemoteException;", "public void setBalance(double balance){\n\t\tthis.balance = balance;\n\t}", "public BalanceDto getBalance(String customerId) {\n\t\tlogger.info(\"balance service implementation class\");\n\t\t\n\t\tBalanceDto balanceDto = new BalanceDto();\n\t\t\n\t\tAccount accountDetails = accountRepository.findBycustomerId(customerId);\n\t\t\n\t\tMortagage mortagagae = mortagageRepository.findBycustomerId(customerId);\n\t\t\n\t\tif(accountDetails.getAccountNumber() != null && mortagagae.getCustomerId() != null)\n\t\t{\n\t\t\t\n\t\t\tlogger.info(\"balance service implementation class with customerId\");\n\t\t\tbalanceDto.setTransactionAccountNumber(accountDetails.getAccountNumber());\n\t\t\tbalanceDto.setTransactionBalance(accountDetails.getBalance());\n\t\t\tbalanceDto.setMortagageBalance(mortagagae.getMortagageBalance());\n\t\t\tbalanceDto.setMortagageAccNumber(mortagagae.getMortagageId());\n\t\t\tbalanceDto.setMessage(\"Balance Data\");\n\t\t\tbalanceDto.setStatus(\"SUCCESS\");\n\t\t\tbalanceDto.setStatusCode(200);\n\t\t\treturn balanceDto;\n\t\t}else\n\t\t{\n\t\t\tlogger.info(\"balance service implementation class with customerId does not exists\");\n\t\t\tthrow new MortagageManagementException(\"Customer Id does not exists or transactions not done\");\n\t\t}\n\t}", "private void updateDatabaseAccountBalance() {\n\t\tString sql = \"UPDATE account SET balance = \" + this.balance + \" \";\n\t\tsql += \"WHERE accountID = '\" + this.accountID + \"';\";\n\n\t\tDbUtilities db = new MySqlUtilities();\n\t\tdb.executeQuery(sql);\n\t}", "public void setBalance( long balance ) {\r\n this.balance = balance;\r\n }", "public void Deposit(Integer accountNo,float depositMoney){\n\tSessionFactory sessionFactory = new Configuration().configure(\"hibernate.cfg.xml\").buildSessionFactory();\n\tSession session = sessionFactory.openSession();\n\tTransaction trans = null;\n\ttry{\n\t\ttrans = session.beginTransaction();\n\t\tQuery query=session.createQuery(\"UPDATE Account set balance+=:balance where accountNo=:accountNo\"); \n\t\tquery.setParameter(\"balance\",depositMoney); \n\t\tquery.setParameter(\"accountNo\",accountNo); \n\t}catch(HibernateException hibernateException){\n\t\tif(trans != null){\n\t\t\ttrans.rollback();\n\t\t}\n\t\thibernateException.printStackTrace();\n\t}\n\t}", "public void deposit(double amount) {\n balance += amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo='\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n }", "public void withdraw(double amount) throws InsufficientFundsException {\n if (amount <= balance) {\n balance -= amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo= '\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n } //end if\n else {\n throw new InsufficientFundsException(amount);\n } //end else\n }", "public void InitializeBalance(BigDecimal valor){\n \r\n ChekingAccount chekAc=pRepository.GetChekingAccount();\r\n chekAc.setSaldoInicial(valor);\r\n pRepository.SaveChekingAccount(chekAc);\r\n \r\n }", "public void setBalance(final int balance)\n {\n this.balance = balance;\n }", "public void reduceBalance(int amount){\n this.money.subtractMoney(amount);\n }", "public void setBalance(double bal){\n balance = bal;\r\n }", "public void setBalance(int balance) {\r\n\t\tif(0<=balance&&balance<=1000000) {\r\n\t\tthis.balance = balance;\r\n\t}else{\r\n\t\t System.out.println(\"잘못 입력하셨습니다. 현재 잔고는 \"+this.balance+\"입니다\");\r\n\t}\r\n \r\n}", "public double getBalance()\n \n {\n \n return balance;\n \n }", "public void walletBalance(lnrpc.Rpc.WalletBalanceRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.WalletBalanceResponse> responseObserver) {\n asyncUnimplementedUnaryCall(getWalletBalanceMethod(), responseObserver);\n }", "@Override\n\tpublic double queryBalance(int accNo) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int accountUpdate(String id, String balance) {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tint executeUpdate = 0;\n\t\tString sqlString=\"update user set balance = '\"+balance+\"' where id ='\"+id+\"'\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString);\n\t\t\texecuteUpdate = query.executeUpdate();\n\t\t\tSystem.out.println(\"executeUpdate:\"+executeUpdate);\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttr.commit();\n\t\t session.close();\n\t\t}\n\t\treturn executeUpdate;\t\n\t}", "public void setBalance(double balance) {\n\t\tthis.balance = balance;\n\t}", "@Override\n\tpublic void checkBalance() {\n\t\tSystem.out.println(\"balance is checked\");\n\t}", "Account(int balance) {\n if(balance <0) this.balance=0;\n this.balance = balance;\n }", "public void updateBalance(String mobileNo,int balance)\n\t{\n\t\tContext ctx;\n\t\ttry {\n\t\t\tctx = new InitialContext();\n\t\t\n\t\t\n\t\t DataSource ds=(DataSource)ctx.lookup(\"java:OracleDS\");\n\t\t\tConnection con=ds.getConnection();\n\t\t\tStatement stmt=con.createStatement();\n\t\t\t\n\t\t\tstmt.executeUpdate(\"update mobile set balance=\"+balance+\" where mobileno=\"+mobileNo);\n\t\t\tcon.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error in connection with Database :\"+e.getMessage());\n\t\t\t\n\t\t}\n\t\t\n\t}", "public double getBalance(){\n return balance;\r\n }", "private void updateBalance(int balance) throws SQLException {\n\t\tupdateBalanceStatement.clearParameters();\n\t\tupdateBalanceStatement.setInt(1, balance);\n\t\tupdateBalanceStatement.setString(2, this.username);\n\t\tupdateBalanceStatement.executeUpdate();\n\t}", "public BankAccount(int balance) {\n\n this.balance = balance;\n\n }", "@Override\n\tpublic Boolean loadBalance(BalanceDto balance) throws Exception {\n\t\tBoolean result = BalanceLoader.loadBalance();\n\t\t\n\t\tif(result) {\n\t\t\t\n\t\t\tbalance.setType(AccountTransactionType.ADD);\n\t\t\t\n\t\t\treturn addSubtractBalance(balance);\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "@Override\r\n\tpublic double withdrawlDao(double money) throws EwalletException {\n\t\tif(money<temp.getCustBal()) {\r\n\t\t\ttemp.setCustBal(temp.getCustBal()-money);\r\n\t\t\ttry {\r\n\t\t\t\ttemp.settDetails(\"Date :\"+tDate+\" Amount Withdrawn :\"+money+\" Total Balance :\"+temp.getCustBal());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tdao.updatedetails(temp.getAccNum(),temp);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\" Low Balance :( \");\r\n\t\t\treturn temp.getCustBal();\r\n\t}", "private double getBalance() { return balance; }", "@Override\r\n\tpublic void operateAmount(String AccountID, BigDecimal amount) {\n\r\n\t}", "public double getBalance(){\n return balance;\n }", "public void wire(String accountNumber,int bankNumber, String toAccountNumber, int amount) {\n\t\t\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp, ll, lp, ls, mm, nn;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\tint lastBalance;\n\t\tint tolastBalance;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry{\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql = \"select balance,userId from \"+this.name+\" where accountNumber=?\";\n\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\tps.setString(1, accountNumber.toString());\n\t\tResultSet rs = ps.executeQuery();\n\t\tint nowBalance = 0;\n\t\tString id = \"\";\n\t\twhile(rs.next()) { \n\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\tid = rs.getString(\"userId\");\n\t\t}\n\t\tif (nowBalance<amount) {\n\t\t\tSystem.out.println(\"No Balance\");\n\t\t\treturn;\n\t\t}\n\t\tlastBalance = nowBalance - amount;\n\t\t//System.out.println(lastBalance);\n\t\tString sql1 = \"UPDATE \"+this.name+\" SET balance=? where accountNumber=?\";\n\t\tls = (PreparedStatement) conn.prepareStatement(sql1);\n\t\tls.setInt(1, lastBalance);\n\t\tls.setString(2, accountNumber.toString());\n\t\tls.executeUpdate();\n\t\t\n\t\t\n\t\t\n\t\t//to account\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql3 = \"select bankName from bank where bankNumber=?\";\n\t\tll= (PreparedStatement) conn.prepareStatement(sql3);\n\t\tll.setString(1, String.valueOf(bankNumber).toString());\n\t\tResultSet rs3 = ll.executeQuery();\n\t\tString toname = \"\";\n\t\twhile(rs3.next()) { \n\t\t\ttoname=rs3.getString(\"bankName\");\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tString sql4 = \"select balance,userId from \"+toname+\" where accountNumber=?\";\n\t\tpp= (PreparedStatement) conn.prepareStatement(sql4);\n\t\tpp.setString(1, accountNumber.toString());\n\t\tResultSet rs4 = pp.executeQuery();\n\t\tint tonowBalance = 0;\n\t\tString toid = \"\";\n\t\twhile(rs4.next()) { \n\t\t\ttonowBalance=rs4.getInt(\"balance\");\n\t\t\ttoid = rs4.getString(\"userId\");\n\t\t}\n\t\t\n\t\ttolastBalance = tonowBalance + amount;\n\t\t//System.out.println(lastBalance);\n\t\tString sql5 = \"UPDATE \"+toname+\" SET balance=? where accountNumber=?\";\n\t\tlp = (PreparedStatement) conn.prepareStatement(sql5);\n\t\tlp.setInt(1, tolastBalance);\n\t\tlp.setString(2, toAccountNumber.toString());\n\t\tlp.executeUpdate();\n\t\t\n\t\t\n\t\t//log\n\t\tString logs = \"wired : \"+ amount+\" to \"+toAccountNumber+\"/ balance: \"+String.valueOf(lastBalance);\n\t\tString sql11 = \"insert into \"+id+\" (log) values (?)\";\n\t\tmm = (PreparedStatement) conn.prepareStatement(sql11);\n\t\tmm.setString(1, logs);\n\t\tmm.executeUpdate();\n\t\tSystem.out.println(\"You wired $\"+String.valueOf(amount));\n\t\t\n\t\tString logs1 = \"get : \"+ amount+\" from \" +accountNumber+ \"/ balance: \"+String.valueOf(tolastBalance);\n\t\tString sql12 = \"insert into \"+toid+\" (log) values (?)\";\n\t\tnn = (PreparedStatement) conn.prepareStatement(sql12);\n\t\tnn.setString(1, logs1);\n\t\tnn.executeUpdate();\n\t\tSystem.out.println(\"You got $\"+String.valueOf(amount));\n\t\t\n\t\t\n\t\t}catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t}", "@Override\r\n\tpublic double depositDao(double money) throws EwalletException {\n\t\ttemp.setCustBal(temp.getCustBal()+money);\r\n\t\ttry {\r\n\t\t\ttemp.settDetails(\"Date :\"+tDate+\" Depsoited Amount :\"+money+\" Total Balance :\"+temp.getCustBal());\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tdao.updatedetails(temp.getAccNum(),temp);\r\n\t\treturn temp.getCustBal();\r\n\t\t\r\n\t}", "@Override\n public AccountDto getBalance(AccountNumberDto accountNumber) {\n AccountEntity accountEntity = new AccountDaoImpl(new StatementsRunnerImpl()).readBalance(accountNumber);\n return new AccountDto(accountEntity.getId(), accountNumber.getAccountNumber(), accountEntity.getCurrency());\n }", "BigDecimal getOpeningDebitBalance();", "BigDecimal getOpeningDebitBalance();", "BigDecimal getClosingDebitBalance();", "public synchronized void setBalance(double balance) {\n this.balance = balance;\n }", "Transfer updateChargeBack(Transfer transfer, Transfer chargeback);", "public int getBalance()\n {\n return balance;\n }", "public double getBalance(){\n return balance;\n }", "@Override\n\tpublic void transferBalnace() {\n\t\tSystem.out.println(\"balance is transferd\");\n\t}", "public void balance(){\n\t\tnamesTree.balance();\n\t\taccountNumbersTree.balance();\n\t}", "public void transferMoney(int customerAccountId, int accountId) throws SQLException {\n // check if the customer has this account\n boolean customerOwnsAccount = false;\n for (int i = 0; i < this.currentCustomer.getAccounts().size(); i++) {\n if (customerAccountId == this.currentCustomer.getAccounts().get(i).getId()) {\n customerOwnsAccount = true;\n break;\n }\n }\n // it is safe to proceed since the customer accounts have been authenticated\n if (customerOwnsAccount) {\n Account customerAccount = DatabaseSelectHelper.getAccountDetails(customerAccountId);\n // try and catch for valid input (int) expected\n try {\n System.out.println(\"Enter amount you wish to transfer:\");\n // take user input as a big decimal\n BigDecimal bigAmount = new BigDecimal(br.readLine());\n if (bigAmount.compareTo(customerAccount.getBalance()) <= 0) {\n // try to update accounts\n try {\n // update the account which received money in database\n DatabaseUpdateHelper.updateAccountBalance(\n bigAmount.add(DatabaseSelectHelper.getBalance(accountId)), accountId);\n // update account which transfered money in database\n DatabaseUpdateHelper.updateAccountBalance(\n customerAccount.getBalance().subtract(bigAmount), customerAccountId);\n // update the customer object for printing reasons for other options\n this.currentCustomer.updateAccounts();\n // Explicitly tell user money is transfered\n System.out.println(\"you have successfully transfered money to account \" + accountId);\n \n } catch (Exception e) {\n System.out.println(\"The account ID you wish to transfer money to does not exist\");\n }\n // error printing\n } else {\n System.out.println(\"This account does not have enough money to send this amount\");\n }\n \n } catch (Exception e) {\n System.out.println(\"Invalid amount\");\n }\n // error printing\n } else {\n System.out.println(\"You do not have access to this account\");\n }\n \n }", "@Override\n\tpublic Integer update(Map<String, Object> params) throws Exception {\n\t\treturn bankService.update(params);\n\t}", "public void getBalance( Integer account_id ){\r\n\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"account_id\", String.valueOf(account_id));\r\n String url = API_DOMAIN + ACCOUNT_EXT + GET_BALANCE;\r\n this.makeVolleyRequest( url, params );\r\n }", "public double getBalance(){\n return balance;\n }", "public lnrpc.Rpc.WalletBalanceResponse walletBalance(lnrpc.Rpc.WalletBalanceRequest request) {\n return blockingUnaryCall(\n getChannel(), getWalletBalanceMethod(), getCallOptions(), request);\n }", "@Override\n\tpublic void businessMoney() {\n\n\t}", "@Override\r\n\tpublic void queryBalance(queryBalanceRequest request, StreamObserver<queryBalanceResponse> responseObserver) {\n\t\tsuper.queryBalance(request, responseObserver);\r\n\t}", "public void deposit(double value){\r\n balance += value;\r\n}", "public static String oamAdjustBalance(DataBaseUtil dataBaseUtil, String oneAccountId, int adjustAmount, RESTActions actions) {\n\t\tString uid = UUID.randomUUID().toString();\n\t\tString unregisteredEmail = \"\";\n\t\tString deviceId = NISGlobals.NIS_DEVICE_ID;\n\t\tString clientRefId = deviceId + \":\" + BackOfficeUtils.generateRandomString(BackOfficeGlobals.BACKOFFICE_CLIENT_REF_ID_LENGTH - deviceId.length() - 1);\n\t\tList<WSAdjustProductLineItem> productLineItems = null;\n\t\tWSAdjustProductLineItem productLineItem = null;\n\t\tWSAdjustProduct product = null;\n\t\tString notes = BackOfficeGlobals.BACKOFFICE_OAM_ADJUST_NOTES_TEXT;\n\t\tString purseId = \"\";\n\t\tint financiallyResponsibleOperatorId = BackOfficeGlobals.BACKOFFICE_DEFAULT_OAM_OPERATOR_ID;\n\t\tOAMAccount accountObj = null;\n\t\tCSOrderAdjustmentResp respObj = null;\n\t\t\n\t\tLOG.info(\"##### Adjusting Balance to: \" + adjustAmount + \", for OneAccount ID: \" + oneAccountId + \"\\n\");\n\t\t\n\t\t// Get all values needed for the request\n\t\tpurseId = OAMUtils.oamGetPurseId(dataBaseUtil, oneAccountId);\n\t\taccountObj = OAMUtils.oamGetAccount(dataBaseUtil, oneAccountId);\n\t\tproduct = new WSAdjustOneAccountValue(adjustAmount, BackOfficeGlobals.BACKOFFICE_ADJUST_PRODUCT_TYPE_OAM_VALUE, oneAccountId, purseId);\n\t\t\n\t\tproductLineItem = new WSAdjustProductLineItem(product);\n\t\tproductLineItems = Arrays.asList(productLineItem);\n\t\t\n\t\trespObj = CSOrderAdjustmentPOST.sendReq(accountObj.getCustomerId(), unregisteredEmail, clientRefId, productLineItems, uid, notes, financiallyResponsibleOperatorId, actions);\n\t\tLOG.info(\"Returning Response Code: \" + respObj.getResponseCode() + \"\\n\");\n\t\t\n\t\treturn respObj.getResponseCode();\n\t}", "public void setBalance(final double newBalance) {\n this.balance = newBalance;\n }", "public com.google.common.util.concurrent.ListenableFuture<lnrpc.Rpc.WalletBalanceResponse> walletBalance(\n lnrpc.Rpc.WalletBalanceRequest request) {\n return futureUnaryCall(\n getChannel().newCall(getWalletBalanceMethod(), getCallOptions()), request);\n }", "public void update() {\n\t\n\tif(getBalance() > 0) {\n\t\tcanWithdraw = true;\n\t}else {canWithdraw = false;}//end else statement\n}", "@Override\r\n\tpublic double showbalanceDao() {\n\t\t\r\n\t\treturn temp.getCustBal();\r\n\t}", "public BigDecimal getBalance() {\n return balance;\n }", "public BigDecimal getBalance() {\n return balance;\n }", "@Override\n public BigDecimal getBalance(String customerId, EMCUserData userData) {\n BigDecimal outstandingDebit = null;\n\n //Get total outstanding credits for customer, which existed at atDate\n EMCQuery query = new EMCQuery(enumQueryTypes.SELECT, DebtorsOpenTransactions.class);\n query.addFieldAggregateFunction(\"debit\", \"SUM\");\n query.addFieldAggregateFunction(\"debitAmountSettled\", \"SUM\");\n query.addFieldAggregateFunction(\"credit\", \"SUM\");\n query.addFieldAggregateFunction(\"creditAmountSettled\", \"SUM\");\n\n //Customer is optional.\n if (customerId != null) {\n query.addAnd(\"customerId\", customerId);\n }\n\n query.addAnd(\"transactionDate\", Functions.nowDate(), EMCQueryConditions.LESS_THAN_EQ);\n\n Object[] debitTotals = (Object[]) util.executeSingleResultQuery(query, userData);\n\n if (debitTotals != null) {\n BigDecimal totalDebit = debitTotals[0] == null ? BigDecimal.ZERO : (BigDecimal) debitTotals[0];\n BigDecimal totalDebitSettled = debitTotals[1] == null ? BigDecimal.ZERO : (BigDecimal) debitTotals[1];\n BigDecimal totalCredit = debitTotals[2] == null ? BigDecimal.ZERO : (BigDecimal) debitTotals[2];\n BigDecimal totalCreditSettled = debitTotals[3] == null ? BigDecimal.ZERO : (BigDecimal) debitTotals[3];\n outstandingDebit = totalDebit.subtract(totalDebitSettled);\n totalCredit = totalCredit.subtract(totalCreditSettled);\n outstandingDebit = outstandingDebit.subtract(totalCredit);\n }\n return outstandingDebit;\n }", "public void channelBalance(lnrpc.Rpc.ChannelBalanceRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.ChannelBalanceResponse> responseObserver) {\n asyncUnimplementedUnaryCall(getChannelBalanceMethod(), responseObserver);\n }", "public double getBalance(){\n return this.balance;\r\n }", "void deposit(int value)//To deposit money from the account\n {\n balance += value;\n }", "public void setBalance(double balance)\n {\n startingBalance = balance;\n }", "@Override\n public void updateBalanceInfo(Long accountId, BigDecimal amountToAdd) {\n repositoryService.updateBalanceInfo(accountId, amountToAdd);\n AccountInfo accountInfo = repositoryService.fetchAccountInfo(accountId).orElseThrow();\n update(\"accounts\", Long.class, AccountInfo.class, accountId, accountInfo);\n }", "@Override\r\n\tpublic Double getBalance( Integer id) {\n\t\tString sql = \"SELECT balance FROM buyers WHERE id = ?;\";\r\n\t\treturn jdbcTemplate.queryForObject( sql, Double.class, id);\r\n\t}", "public void walletBalance(lnrpc.Rpc.WalletBalanceRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.WalletBalanceResponse> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(getWalletBalanceMethod(), getCallOptions()), request, responseObserver);\n }", "@Override\n\tpublic void updateAccountBalance(double newBalance, int id) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString updateQuery = \"update accounts set balance=? where id=?\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(updateQuery);\n\t\t\tprepStmt.setDouble(1, newBalance);\n\t\t\tprepStmt.setInt(2, id);\n\t\t\tprepStmt.executeUpdate();\n\t}", "@Test\n\tpublic void testRecalculateAccountBalance() {\n\t\tSmsAccount smsAccount = new SmsAccount();\n\t\tsmsAccount.setSakaiUserId(\"1\");\n\t\tsmsAccount.setSakaiSiteId(\"1\");\n\t\tsmsAccount.setMessageTypeCode(\"1\");\n\t\tsmsAccount.setOverdraftLimit(1000L);\n\t\tsmsAccount.setCredits(10L);\n\t\tsmsAccount.setAccountName(\"accountname\");\n\t\tsmsAccount.setAccountEnabled(true);\n\t\thibernateLogicLocator.getSmsAccountLogic()\n\t\t\t\t.persistSmsAccount(smsAccount);\n\t\tinsertTestTransactionsForAccount(smsAccount);\n\n\t\tAssert.assertTrue(smsAccount.exists());\n\n\t\tList<SmsTransaction> transactions = hibernateLogicLocator\n\t\t\t\t.getSmsTransactionLogic().getSmsTransactionsForAccountId(\n\t\t\t\t\t\tsmsAccount.getId());\n\n\t\tAssert.assertNotNull(transactions);\n\t\tAssert.assertTrue(transactions.size() > 0);\n\n\t\tsmsBillingImpl.recalculateAccountBalance(smsAccount.getId());\n\n\t\tSmsAccount recalculatedAccount = hibernateLogicLocator\n\t\t\t\t.getSmsAccountLogic().getSmsAccount(smsAccount.getId());\n\t\tAssert.assertNotNull(recalculatedAccount);\n\t\tAssert.assertTrue(recalculatedAccount.getCredits() == 6660);\n\t}" ]
[ "0.60450137", "0.6013407", "0.5940314", "0.5894107", "0.5883125", "0.58376694", "0.5831541", "0.58002967", "0.57803637", "0.57658315", "0.5764399", "0.5700969", "0.56888425", "0.56888425", "0.5678654", "0.56724006", "0.5656092", "0.5646212", "0.5597202", "0.5596356", "0.55913293", "0.5587253", "0.5587253", "0.5582448", "0.5570033", "0.55685985", "0.5560827", "0.55319893", "0.5529289", "0.552278", "0.552278", "0.5519676", "0.5515228", "0.55138475", "0.54956114", "0.5474386", "0.54738665", "0.54728055", "0.5460611", "0.5455431", "0.5427603", "0.5424658", "0.5418055", "0.5415297", "0.54125136", "0.5397894", "0.5393387", "0.5344946", "0.5340142", "0.53309166", "0.53196895", "0.5317215", "0.5316219", "0.53152484", "0.53067136", "0.5300485", "0.52906877", "0.5289277", "0.5283573", "0.5281127", "0.52809244", "0.52805984", "0.5271939", "0.5267502", "0.5262424", "0.524605", "0.52450764", "0.52450764", "0.52376485", "0.52321446", "0.52317625", "0.522934", "0.5222096", "0.5211281", "0.52111065", "0.52028316", "0.51888", "0.5187777", "0.51844645", "0.5183882", "0.5180601", "0.5180296", "0.5179061", "0.5173585", "0.5172343", "0.516809", "0.51674277", "0.51669985", "0.5164293", "0.5164293", "0.5161796", "0.515508", "0.5154495", "0.5149614", "0.5149507", "0.5146169", "0.5143083", "0.5141713", "0.513864", "0.51234376" ]
0.7948502
0
Get LP Scale array.
public byte[] parseLPScale(){ byte[] scale = new byte[2]; scale[0] = data[OFS_ARP_SCALE]; scale[1] = data[OFS_ARP_SCALE]; return scale; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public byte[] getScale()\n {\n if (true)\n throw new UnsupportedOperationException(\"FIXME\");\n return (byte[]) getProperty(PropertyIDMap.PID_SCALE);\n }", "int getScale();", "private int[] createScale(int octave, int rootNote, ArrayList<Integer> targetMode) {\n int[] scale = new int[targetMode.size()];\n for (int i = 0; i < targetMode.size(); i++) {\n scale[i] = (rootNote + 12 * octave) + targetMode.get(i);\n }\n return scale;\n }", "LP getLp();", "public TempScale getInputScale() {return inputScale;}", "float getScaler();", "int getScaleCount();", "public float getScale();", "public MyRectangle[] getScaledFeature() {\n return scaledRectangles;\n }", "public TempScale getInputScale() {\n\t\treturn inputPanel.getScale();\n\t}", "public Integer getScale() {\n return _scale;\n }", "public Integer getScale() {\n return _scale;\n }", "public Solmu[] getLapset(){\r\n Solmu[] s = new Solmu[Lapset.getKoko()];\r\n for( int i = 0; i< s.length; i++){\r\n s[i] = (Solmu) Lapset.get(i+1);\r\n }\r\n return s;\r\n }", "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/* */ }", "ScaleType getScale();", "public Scale getScale() {\n return this.scale;\n }", "public TempScale getOutputScale() {\n\t\treturn outputPanel.getScale();\n\t}", "public double[] getRuls() {\n FlowPane root = (FlowPane) scene.getRoot().lookup(\"#assetsThumbPane\");\n double[] ruls = new double[root.getChildren().size()];\n int i = 0;\n\n do {\n Pane pane = (Pane) root.getChildren().get(i); //each pane\n HBox hBox = (HBox) pane.getChildren().get(3);\n\n Text text = (Text) hBox.getChildren().get(0); //rul\n ruls[i] = Double.parseDouble(text.getText()); //add to array\n } while (++i < ruls.length);\n\n return ruls;\n }", "int getWrongScale();", "public int getScale() {\n return scale_;\n }", "public double getScale() {\n return this.scale;\n }", "public TempScale getOutputScale() {return outputScale;}", "public final float getScale() {\n\treturn svd(null);\n }", "public int[] getLabTaille(){\n\tint [] tab = new int[2];\n\ttab[0] = lab.getHeight();\n\ttab[1] = lab.getWidth();\n\treturn tab;\n }", "public double getScale() {\n return scale;\n }", "public double[] GetPointArray() {\n return PointArray;\n }", "public AxisScale getVScale() {\n return (_bvp!=null)?_bvp.getScale():AxisScale.LINEAR;\n }", "public double getScale() {\r\n return scale;\r\n }", "public List<Scaler> getScalerList() {\n return Collections.unmodifiableList(scalerList);\n }", "public int getScale() {\r\n return scale;\r\n }", "public double getScale() {\n return scale;\n }", "public double getScale(){\n\t\treturn scale;\n\t}", "public static int[] readScalingList(BitReader src, int sizeOfScalingList) {\r\n\r\n int[] scalingList = new int[sizeOfScalingList];\r\n int lastScale = 8;\r\n int nextScale = 8;\r\n for (int j = 0; j < sizeOfScalingList; j++) {\r\n if (nextScale != 0) {\r\n int deltaScale = readSE(src, \"deltaScale\");\r\n nextScale = (lastScale + deltaScale + 256) % 256;\r\n if (j == 0 && nextScale == 0)\r\n return null;\r\n }\r\n scalingList[j] = nextScale == 0 ? lastScale : nextScale;\r\n lastScale = scalingList[j];\r\n }\r\n return scalingList;\r\n }", "public int getScale(){\n return scale;\n }", "public NM getPsl37_ExternalScalingFactorPP() { \r\n\t\tNM retVal = this.getTypedField(37, 0);\r\n\t\treturn retVal;\r\n }", "@Override\n\tpublic int[] getLinearity()\n\t{\n\t\tint[] retval = new int[3];\n\t\tretval[0] = this.linearityX;\n\t\tretval[1] = this.linearityY;\n\t\tretval[2] = this.linearityZ;\n\t\t\n\t\treturn retval;\n\t}", "public double[] normalize( double[] data, double scale )\n {\n double min = Double.MAX_VALUE;\n double max = Double.MIN_VALUE;\n double[] result = new double[ data.length ];\n\n // First, need to find the min value in the array\n for( int i=0; i<data.length; i++ )\n {\n double value = data[ i ];\n if( value < min )\n {\n min = value;\n }\n }\n\n // Next, translate by the min amount\n for( int i=0; i<data.length; i++ )\n {\n double value = data[ i ];\n double temp = (value - min);\n result[ i ] = temp;\n if( temp > max )\n {\n max = temp;\n }\n }\n\n // Finally, scale by max\n for( int i=0; i<result.length; i++ )\n {\n result[ i ] = ( scale * ( result[ i ] / max ) );\n }\n\n return result;\n }", "public double getScale(\n )\n {return scale;}", "int getMaxScale();", "public float getScale() {\n return this.scale;\n }", "public int getScaleValue() {\r\n return ScaleValue;\r\n }", "public double getScale() {\n\t\treturn disp.getScale();\n\t}", "public double getScale() {\r\n\t\treturn scale;\r\n\t}", "public NM getExternalScalingFactorPP() { \r\n\t\tNM retVal = this.getTypedField(37, 0);\r\n\t\treturn retVal;\r\n }", "public Integer getHoldscale() {\r\n return holdscale;\r\n }", "public double getMinScale() {\n return minScale;\n }", "public long[][] getAsRationals() {\n return (long[][])data;\n }", "long[] getAxesLengthsPlanar();", "public double getScaleX() { return _rss==null? 1 : _rss.scaleX; }", "public Polynomial[] getAsArray() {\n Polynomial[] list = new Polynomial[collection.size()];\n\n for (int i = 0; i < collection.size(); i++) {\n list[i] = collection.get(i);\n }\n return list;\n }", "public double[] getRange();", "public String getCurrentScale() {\n return currentScale;\n }", "public float getScale() {\n \t\treturn scale;\n \t}", "public float getGlobalScale() {\n // per convenzione se la scala deve essere su tutti e tre gli assi\n // allora si considera scale.x() per tutti gli assi\n return (float) scale.x();\n }", "public float getScale()\n\t{\n\t\treturn scale;\n\t}", "@Override\n public double[] getMinMax() {\n if ( minMax == null ) {\n calculateMinMaxPositions();\n }\n return minMax;\n }", "public ScalePolicy getScalePolicy() {\n\t\treturn null;\n\t}", "public double[][] getSubbandLL(){\r\n return subbandLL;\r\n }", "public float rmsPS(float[][] x) {\n int nt = 700-228+1;\n return (float)sqrt(dotPS(x,x)/x.length/nt);\n }", "@Override\n public float getScale() {\n return scale;\n }", "public double[] asArray() {\n final double[] result = new double[COMPONENTS];\n asArray(result);\n return result;\n }", "public abstract double[] getLowerBound();", "VectorArray getResHar();", "public float getScale() {\n\t\treturn getLifeStageHelper().getScale();\n\t}", "public float getScale() {\n\t\treturn scale;\n\t}", "void initScale(){\n samplingScale = getScaleAdaptive(x);\n }", "@Override\r\n\tpublic float[] getRanges() {\r\n\t\tsp.fetchSample(sample, 0);\r\n\r\n\t\treturn sample;\r\n\t}", "@Nullable Uint64 getScaleInThreshold();", "public double getHealthScale ( ) {\n\t\treturn extract ( handle -> handle.getHealthScale ( ) );\n\t}", "public double getScaleX() {\n return 1.0;\n }", "public NM getPsl36_InternalScalingFactorPP() { \r\n\t\tNM retVal = this.getTypedField(36, 0);\r\n\t\treturn retVal;\r\n }", "public NM getInternalScalingFactorPP() { \r\n\t\tNM retVal = this.getTypedField(36, 0);\r\n\t\treturn retVal;\r\n }", "public byte parseRPScale(){\n\t\treturn data[OFS_ARP_SCALE];\n\t}", "public abstract Score[] getScore();", "@java.lang.Override\n public float getScaler() {\n return scaler_;\n }", "public double[] toArray() {\n\t\treturn new double[] {x, y, z};\n\t}", "public double getScale() {\n\t\treturn 0;\n\t}", "long[] getAxesLengthsNonPlanar();", "@java.lang.Override\n public float getScaler() {\n return scaler_;\n }", "public ImageScale getScale() {\n return this.scale;\n }", "public Integer[] createArray() {\n Integer[] value = new Integer[defaultLaenge];\n\n for (int i = 0; i < value.length; i++) {\n value[i] = (int)(value.length*Math.random());\n }\n\n return value;\n }", "public double getScaleY() { return _rss==null? 1 : _rss.scaleY; }", "public double getScaleStart() {\n\t\treturn m_dScaleStart;\n\t}", "int getScale(Object elementID) throws Exception;", "public final double getScaler()\n { \n return Math.pow(10, m_Scaler);\n }", "public double[] getDoubleArray (String variable){\r\n if (matlabEng==null) return null;\r\n double[][] returnValue = matlabEng.engGetArray(id,variable);\r\n return returnValue[0];\r\n}", "public double[] getRange(){\n\treturn RANGE;\n }", "public Integer getScaleTo()\n {\n return (Integer) getStateHelper().eval(PropertyKeys.scaleTo, null);\n }", "private double[] normalize(double[] p) {\n double sum = 0;\n double[] output = new double[p.length];\n for (double i : p) {\n sum += i;\n }\n for (int i = 0; i < output.length; i++) {\n output[i] = p[i]/sum;\n }\n return output;\n }", "public abstract double[] toDoubleArray();", "public double[] value(){\n\t\treturn intensity;\n\t}", "@Override\n public INDArray scal(float alpha, INDArray x) {\n NativeBlas.sscal(x.length(), alpha, x.data(), x.offset(), 1);\n return x;\n }", "public ArrayList<Double> normalize( ArrayList<Double> data, double scale )\n {\n double min = Double.MAX_VALUE;\n double max = Double.MIN_VALUE;\n ArrayList<Double> result = new ArrayList<Double>();\n\n // First, need to find the min value in the array\n for( double value : data )\n {\n if( value < min )\n {\n min = value;\n }\n }\n\n // Next, translate by the min amount\n for( double value : data )\n {\n double temp = (value - min);\n result.add( temp );\n if( temp > max )\n {\n max = temp;\n }\n }\n\n // Finally, scale by max\n for( int i=0; i<result.size(); i++ )\n {\n result.set( i, (scale * ( result.get( i ) / max )) );\n }\n\n return result;\n }", "public int[] getSV(){\r\n\t\treturn SV;\r\n\t}", "VectorArray getPhsBHar();", "public int[] getPreamp() {\n return localPreamp;\n }", "float getCostScale();", "public String getParamScale() {\n return paramScale;\n }", "void patchArray(long array[][], long scale)\n {\n // patch all numbers up by 100 to keep the order but to rid the negative\n // numbers\n for (int i = 0; i < array.length; i++)\n {\n array[i][0] += scale;\n array[i][1] += scale;\n }\n }", "public BufferedImage[] powerSprite(){\n\t\tBufferedImage arr[] = new BufferedImage[4];\n\t\tarr[0] = img.getSubimage(724, 283, 71, 67);\n\t\tarr[1] = img.getSubimage(650, 286, 72, 64);\n\t\tarr[2] = img.getSubimage(484, 292, 83, 58);\n\t\tarr[3] = img.getSubimage(257, 281, 71, 69);\n\t\treturn arr;\n\t\t\t\n\t}" ]
[ "0.6558298", "0.58568", "0.5837136", "0.5815511", "0.57637316", "0.5712733", "0.5711864", "0.571005", "0.5701254", "0.5693912", "0.5691564", "0.5691564", "0.5686932", "0.56671035", "0.56594104", "0.56464994", "0.5643816", "0.5637163", "0.56163573", "0.5604739", "0.5600512", "0.55964655", "0.55923", "0.5582684", "0.5567154", "0.55561876", "0.55466646", "0.5534398", "0.5500629", "0.54951763", "0.548627", "0.54823136", "0.5472014", "0.54708225", "0.5462678", "0.5456127", "0.5454135", "0.54515404", "0.5433625", "0.5412237", "0.54095864", "0.53874564", "0.5371124", "0.5368132", "0.53615963", "0.5359332", "0.5340549", "0.5324567", "0.53211236", "0.5288859", "0.5287365", "0.52836114", "0.52809036", "0.52675086", "0.522143", "0.52177775", "0.5216205", "0.5208311", "0.52080894", "0.5207613", "0.520682", "0.5200829", "0.51959634", "0.51904845", "0.5169719", "0.5158922", "0.5149732", "0.51328665", "0.51241374", "0.51095897", "0.5109386", "0.5106362", "0.5101866", "0.51017314", "0.5095983", "0.50823164", "0.50803566", "0.50753915", "0.5072565", "0.5065933", "0.5060093", "0.5039363", "0.50378174", "0.50326717", "0.5032519", "0.5025473", "0.50196016", "0.50169706", "0.50129753", "0.5005601", "0.49989313", "0.4993614", "0.4988194", "0.49866173", "0.49862474", "0.4984005", "0.49788997", "0.49741232", "0.49729863", "0.49699622" ]
0.7356033
0
Get Active Power+ Scale.
public byte parseAPScale(){ return data[OFS_ARP_SCALE]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "EDataType getActivePower();", "public String getCurrentScale() {\n return currentScale;\n }", "public byte[] getScale()\n {\n if (true)\n throw new UnsupportedOperationException(\"FIXME\");\n return (byte[]) getProperty(PropertyIDMap.PID_SCALE);\n }", "public Scale getScale() {\n return this.scale;\n }", "public TempScale getInputScale() {return inputScale;}", "int getScale();", "public Integer getHoldscale() {\r\n return holdscale;\r\n }", "public Integer getScale() {\n return _scale;\n }", "public Integer getScale() {\n return _scale;\n }", "public double getScale() {\n return this.scale;\n }", "EDataType getReactivePower();", "public TempScale getInputScale() {\n\t\treturn inputPanel.getScale();\n\t}", "public double getScale() {\n\t\treturn disp.getScale();\n\t}", "float getPower();", "public float getScale();", "public int getScale() {\r\n return scale;\r\n }", "public float getScale() {\n\t\treturn getLifeStageHelper().getScale();\n\t}", "public double getScale() {\r\n return scale;\r\n }", "public float getScale() {\n return this.scale;\n }", "public double getScale() {\n return scale;\n }", "public double getScale(\n )\n {return scale;}", "public int getScale() {\n return scale_;\n }", "public TempScale getOutputScale() {return outputScale;}", "public int getScaleValue() {\r\n return ScaleValue;\r\n }", "ScaleType getScale();", "public TempScale getOutputScale() {\n\t\treturn outputPanel.getScale();\n\t}", "public double getHealthScale ( ) {\n\t\treturn extract ( handle -> handle.getHealthScale ( ) );\n\t}", "public int getScale(){\n return scale;\n }", "public double getScale(){\n\t\treturn scale;\n\t}", "public ABLPower Power() {\r\n\t\treturn new ABLPower(BrickFinder.getDefault().getPower());\r\n\t}", "public int getPower();", "public Integer getScaleTo()\n {\n return (Integer) getStateHelper().eval(PropertyKeys.scaleTo, null);\n }", "public double getScale() {\r\n\t\treturn scale;\r\n\t}", "public double getScale() {\n return scale;\n }", "public int getPower() {\n return PA_POW_reg.getPower();\n }", "EDataType getApparentPower();", "float getBackgroundPower();", "public float getScale() {\n \t\treturn scale;\n \t}", "public float getScale()\n\t{\n\t\treturn scale;\n\t}", "public final double getScaler()\n { \n return Math.pow(10, m_Scaler);\n }", "public float getGlobalScale() {\n // per convenzione se la scala deve essere su tutti e tre gli assi\n // allora si considera scale.x() per tutti gli assi\n return (float) scale.x();\n }", "public float getScale() {\n\t\treturn scale;\n\t}", "public int getHealthScaling()\r\n {\r\n return mHealthScaling;\r\n }", "public NM getExternalScalingFactorPP() { \r\n\t\tNM retVal = this.getTypedField(37, 0);\r\n\t\treturn retVal;\r\n }", "public int getCurrentSpecialPower() {\n return currentSpecialPower;\n }", "public int getPower() {\n\t\treturn aerodynamics.getPower()+engine.getPower()+suspension.getPower()+breaks.getPower()+tires.getPower();\n\t}", "float getScaler();", "public double getPower()\n {\n return this.power;\n }", "public final float getScale() {\n\treturn svd(null);\n }", "public ImageScale getScale() {\n return this.scale;\n }", "public int getPower() {\n return this.power;\n }", "public float getPower() {\n return power_;\n }", "@Override\n\tpublic int getPower() {\n\t\treturn power;\n\t}", "public double getMinScale() {\n return minScale;\n }", "public double getEnginePower(){\n return enginePower;\n }", "public int getPower() {\n \t\treturn power;\n \t}", "public int getPower(){\n\t\treturn this.power;\n\t}", "public NM getInternalScalingFactorPP() { \r\n\t\tNM retVal = this.getTypedField(36, 0);\r\n\t\treturn retVal;\r\n }", "public double getPower() {\r\n return power;\r\n }", "public float getPower() {\n return power_;\n }", "public double getScaleStart() {\n\t\treturn m_dScaleStart;\n\t}", "protected double getEnginePower(){\n return enginePower;\n }", "@Override\n public float getScale() {\n return scale;\n }", "float getCostScale();", "public double getConsumedPower() {\n return mPowerComponents.getConsumedPower(UNSPECIFIED_DIMENSIONS);\n }", "public double getScale() {\n\t\treturn 0;\n\t}", "public double getPower() {\n return power;\n }", "public void updatePowerScale(double powerScale) {\n m_powerScale = powerScale;\n }", "@Override\n public double getPower()\n {\n final String funcName = \"getPower\";\n double power = motor.get();\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", power);\n }\n\n return power;\n }", "public int getPower() {\n\t\treturn 0;\r\n\t}", "int getMaxScale();", "int getScale(Object elementID) throws Exception;", "public Float getPower() {\n return power;\n }", "public Vector2 getDrawScale() {\n \tscaleCache.set(drawScale);\n \treturn scaleCache; \n }", "public float getPower() {\n \t\treturn 1/rarity;\n \t}", "DoubleProperty getPowerUsage();", "public int get_power() {\r\n\t\treturn this._power;\r\n\t}", "public Configuration getScale() {\n return scale;\n }", "public java.math.BigDecimal getPwrval() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.math.BigDecimal) __getCache(\"pwrval\")));\n }", "public float getVolumeMultiplier();", "double scale_motor_power(double p_power) //Scales joystick value to output appropriate motor power\n {Scales joystick value to output appropriate motor power\n { //Use like \"scale_motor_power(gamepad1.left_stick_x)\"\n //\n // Assume no scaling.\n //\n double l_scale = 0.0;\n\n //\n // Ensure the values are legal.\n //\n double l_power = Range.clip(p_power, -1, 1);\n\n double[] l_array =\n {0.00, 0.05, 0.09, 0.10, 0.12\n , 0.15, 0.18, 0.24, 0.30, 0.36\n , 0.43, 0.50, 0.60, 0.72, 0.85\n , 1.00, 1.00\n };\n\n //\n // Get the corresponding index for the specified argument/parameter.\n //\n int l_index = (int) (l_power * 16.0);\n if (l_index < 0) {\n l_index = -l_index;\n } else if (l_index > 16) {\n l_index = 16;\n }\n\n if (l_power < 0) {\n l_scale = -l_array[l_index];\n } else {\n l_scale = l_array[l_index];\n }\n\n return l_scale;\n\n }", "public ScalePolicy getScalePolicy() {\n\t\treturn null;\n\t}", "public int getOldLoyaltyScale() {\n return oldLoyaltyScale;\n }", "public Matrix4f getScaleMat() {\n\t\treturn m_xforms[NvCameraXformType.MAIN].m_scaleMat;\n\t}", "public double getScaleEnd() {\n\t\treturn m_dScaleEnd;\n\t}", "public NM getPsl37_ExternalScalingFactorPP() { \r\n\t\tNM retVal = this.getTypedField(37, 0);\r\n\t\treturn retVal;\r\n }", "public int getNewLoyaltyScale() {\n return newLoyaltyScale;\n }", "public double getScaleX() {\n return 1.0;\n }", "public float getPowerMultiplier() { return 0.5F; }", "public Float getNextInstructionDistanceScale(){\n\t\treturn getFloat(KEY_NEXT_INSTRUCTION_DISTANCE_SCALE);\n\t}", "public double getPhysicalProtectScaling()\r\n {\r\n return mPhysicalProtectScaling;\r\n }", "public double getMultiplier() {\n\t\t\tint currentWidth = Display.getWidth();\n\t\t\treturn currentWidth / (double) width;\n\t\t}", "public jkt.hms.masters.business.MasStoreMeScale getMeScale () {\n\t\treturn meScale;\n\t}", "public NM getExternalScalingFactorTechnicalPart() { \r\n\t\tNM retVal = this.getTypedField(42, 0);\r\n\t\treturn retVal;\r\n }", "public float getMicGainDb();", "java.lang.String getTxpower();", "int getWrongScale();", "Double getMultiplier();", "@Override\n public Switch lowPressureSwitch() {\n return pcm::getPressureSwitchValue;\n }", "public int getByproductScaled(int scale)\n {\n return this.byproduct.getFluidAmount() * scale / TOTAL_BYPRODUCT_SPACE;\n }" ]
[ "0.7172796", "0.6904203", "0.6753756", "0.6675848", "0.66752213", "0.6637146", "0.65991956", "0.64964926", "0.64964926", "0.64617264", "0.64473855", "0.6403717", "0.64027154", "0.6396282", "0.63418007", "0.6338014", "0.6337997", "0.6332791", "0.6314179", "0.6307078", "0.63047296", "0.6300868", "0.62987924", "0.62947696", "0.6276335", "0.6266943", "0.6264358", "0.6261403", "0.6257771", "0.62542605", "0.62526345", "0.6249294", "0.62489104", "0.62256676", "0.62247074", "0.6202341", "0.6199304", "0.6192942", "0.6141615", "0.6134287", "0.6133316", "0.61219364", "0.6120565", "0.6115914", "0.6090407", "0.60753465", "0.60309386", "0.60098", "0.6003646", "0.5989939", "0.5978825", "0.5976606", "0.5975599", "0.5972336", "0.5958492", "0.5956308", "0.5949296", "0.59384745", "0.59367573", "0.5908637", "0.5906687", "0.5904205", "0.5884861", "0.5869852", "0.5868113", "0.5866118", "0.5863131", "0.58496225", "0.58476424", "0.5828024", "0.5824418", "0.58198816", "0.5816857", "0.58021104", "0.57890576", "0.57842755", "0.5769711", "0.57642627", "0.5758353", "0.5741709", "0.5731152", "0.5727127", "0.57039577", "0.5682285", "0.56731033", "0.5649377", "0.5649072", "0.56445456", "0.5635999", "0.5584757", "0.55713135", "0.55690193", "0.5555059", "0.5553638", "0.5550473", "0.5545352", "0.55439913", "0.55417514", "0.55408514", "0.5520571" ]
0.5721868
82
Get Reactive Power+ Scale.
public byte parseRPScale(){ return data[OFS_ARP_SCALE]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "EDataType getReactivePower();", "public Scale getScale() {\n return this.scale;\n }", "public TempScale getInputScale() {return inputScale;}", "float getPower();", "public byte[] getScale()\n {\n if (true)\n throw new UnsupportedOperationException(\"FIXME\");\n return (byte[]) getProperty(PropertyIDMap.PID_SCALE);\n }", "public int getPower();", "public double getScale() {\n return this.scale;\n }", "public double getScale() {\n return scale;\n }", "public double getScale() {\r\n return scale;\r\n }", "public Integer getScale() {\n return _scale;\n }", "public Integer getScale() {\n return _scale;\n }", "public double getPower()\n {\n return this.power;\n }", "public int getScale() {\n return scale_;\n }", "EDataType getVoltagePerReactivePower();", "@Override\n public double getPower()\n {\n final String funcName = \"getPower\";\n double power = motor.get();\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", power);\n }\n\n return power;\n }", "public double getScale() {\n return scale;\n }", "public float getPower() {\n return power_;\n }", "public double getPower() {\r\n return power;\r\n }", "public double getScale(){\n\t\treturn scale;\n\t}", "public int getScale() {\r\n return scale;\r\n }", "public double getScale() {\r\n\t\treturn scale;\r\n\t}", "public TempScale getInputScale() {\n\t\treturn inputPanel.getScale();\n\t}", "public double getPower() {\n return power;\n }", "public float getPower() {\n return power_;\n }", "DoubleProperty getPowerUsage();", "public int getScale(){\n return scale;\n }", "public Float getPower() {\n return power;\n }", "public int getPower() {\n return this.power;\n }", "public double getScale(\n )\n {return scale;}", "int getScale();", "public float getScale() {\n return this.scale;\n }", "@Override\n\tpublic int getPower() {\n\t\treturn power;\n\t}", "public Integer getHoldscale() {\r\n return holdscale;\r\n }", "public ABLPower Power() {\r\n\t\treturn new ABLPower(BrickFinder.getDefault().getPower());\r\n\t}", "public int getPower(){\n\t\treturn this.power;\n\t}", "public final double getScaler()\n { \n return Math.pow(10, m_Scaler);\n }", "public double getScale() {\n\t\treturn disp.getScale();\n\t}", "public String getCurrentScale() {\n return currentScale;\n }", "public float getScale() {\n\t\treturn scale;\n\t}", "public int getPower() {\n \t\treturn power;\n \t}", "public float getScale()\n\t{\n\t\treturn scale;\n\t}", "public float getScale() {\n \t\treturn scale;\n \t}", "public int getPower() {\n return PA_POW_reg.getPower();\n }", "public float getScale();", "public double getEnginePower(){\n return enginePower;\n }", "public int get_power() {\r\n\t\treturn this._power;\r\n\t}", "public int getScaleValue() {\r\n return ScaleValue;\r\n }", "public float getVolumeMultiplier();", "public Integer getScaleTo()\n {\n return (Integer) getStateHelper().eval(PropertyKeys.scaleTo, null);\n }", "public TempScale getOutputScale() {return outputScale;}", "public float getScale() {\n\t\treturn getLifeStageHelper().getScale();\n\t}", "protected double getEnginePower(){\n return enginePower;\n }", "public int getPower() {\n\t\treturn aerodynamics.getPower()+engine.getPower()+suspension.getPower()+breaks.getPower()+tires.getPower();\n\t}", "public double getHealthScale ( ) {\n\t\treturn extract ( handle -> handle.getHealthScale ( ) );\n\t}", "@Override\n public float getScale() {\n return scale;\n }", "public void updatePowerScale(double powerScale) {\n m_powerScale = powerScale;\n }", "public TempScale getOutputScale() {\n\t\treturn outputPanel.getScale();\n\t}", "public Configuration getScale() {\n return scale;\n }", "ScaleType getScale();", "EDataType getActivePower();", "double getPWMRate();", "float getScaler();", "Double getMultiplier();", "public double getMultiplier() {\n return genericModifier.getMultiplier();\n }", "public float getPowerMultiplier() { return 0.5F; }", "public int getPower() {\n\t\treturn 0;\r\n\t}", "public float getPower() {\n \t\treturn 1/rarity;\n \t}", "double scale_motor_power(double p_power) //Scales joystick value to output appropriate motor power\n {Scales joystick value to output appropriate motor power\n { //Use like \"scale_motor_power(gamepad1.left_stick_x)\"\n //\n // Assume no scaling.\n //\n double l_scale = 0.0;\n\n //\n // Ensure the values are legal.\n //\n double l_power = Range.clip(p_power, -1, 1);\n\n double[] l_array =\n {0.00, 0.05, 0.09, 0.10, 0.12\n , 0.15, 0.18, 0.24, 0.30, 0.36\n , 0.43, 0.50, 0.60, 0.72, 0.85\n , 1.00, 1.00\n };\n\n //\n // Get the corresponding index for the specified argument/parameter.\n //\n int l_index = (int) (l_power * 16.0);\n if (l_index < 0) {\n l_index = -l_index;\n } else if (l_index > 16) {\n l_index = 16;\n }\n\n if (l_power < 0) {\n l_scale = -l_array[l_index];\n } else {\n l_scale = l_array[l_index];\n }\n\n return l_scale;\n\n }", "public java.math.BigDecimal getPwrval() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.math.BigDecimal) __getCache(\"pwrval\")));\n }", "public double getMultiplier() {\r\n return multiplier;\r\n }", "@java.lang.Override\n public float getScaler() {\n return scaler_;\n }", "public final float getScale() {\n\treturn svd(null);\n }", "public ImageScale getScale() {\n return this.scale;\n }", "@java.lang.Override\n public float getScaler() {\n return scaler_;\n }", "public double getMinScale() {\n return minScale;\n }", "public double getScaleStart() {\n\t\treturn m_dScaleStart;\n\t}", "public double getInputPower() {\n return this.inputPower;\n }", "public int getHealthScaling()\r\n {\r\n return mHealthScaling;\r\n }", "public int getCurrentSpecialPower() {\n return currentSpecialPower;\n }", "int getSmpRate();", "public Vector2 getDrawScale() {\n \tscaleCache.set(drawScale);\n \treturn scaleCache; \n }", "public double getScaleEnd() {\n\t\treturn m_dScaleEnd;\n\t}", "public float getMicGainDb();", "public String getPowerType() {\n return this.powerType;\n }", "public int getMultiplier() {\n return multiplier;\n }", "public float getGlobalScale() {\n // per convenzione se la scala deve essere su tutti e tre gli assi\n // allora si considera scale.x() per tutti gli assi\n return (float) scale.x();\n }", "BigInteger getPower_consumption();", "public double getConsumedPower() {\n return mPowerComponents.getConsumedPower(UNSPECIFIED_DIMENSIONS);\n }", "public double getScale() {\n\t\treturn 0;\n\t}", "public DoubleProperty getOutputPower() {\n return this.outputPower;\n }", "public double getMeterPower() {\n final double current = this.getMeterCurrent().isPresent() ? this.getMeterCurrent().get() : 0;\n final double voltage = this.getMeterVoltage().isPresent() ? this.getMeterVoltage().get() : 0;\n return current * voltage;\n }", "public float getRate() {\n\treturn durationStretch * nominalRate;\n }", "public java.math.BigDecimal getInput_power()\n\t\tthrows java.rmi.RemoteException;", "public IntegerProperty getReactorAmplitude() {\n return this.reactorLine.getCurrentAmplitude();\n }", "public long getMeasRcvdPowerdBm() {\r\n return measRcvdPowerdBm;\r\n }", "float getBackgroundPower();", "public boolean getPower(){\n return power;\n }", "float getPreGain();", "public float getScaleMotionDeceleration() {\r\n\t\treturn scaleMotionDeceleration;\r\n\t}", "@Override\n public Switch lowPressureSwitch() {\n return pcm::getPressureSwitchValue;\n }", "public double getMultiplier() {\n\t\t\tint currentWidth = Display.getWidth();\n\t\t\treturn currentWidth / (double) width;\n\t\t}" ]
[ "0.76364636", "0.68352973", "0.68317777", "0.6827721", "0.67701256", "0.672546", "0.6718631", "0.6692529", "0.66924167", "0.6683051", "0.6683051", "0.66534925", "0.6651021", "0.66433764", "0.664122", "0.6636017", "0.6609446", "0.6604239", "0.6582359", "0.65811247", "0.6557087", "0.65492433", "0.6542166", "0.6538029", "0.6532763", "0.65318686", "0.65214074", "0.6498008", "0.64903915", "0.64876217", "0.6487419", "0.6462834", "0.64467114", "0.6434405", "0.6432921", "0.64294815", "0.64284605", "0.64277554", "0.64167994", "0.64153755", "0.6415336", "0.64060277", "0.6381012", "0.636852", "0.63263094", "0.6314596", "0.6304103", "0.6301203", "0.6294738", "0.6282795", "0.6279812", "0.6250169", "0.6249077", "0.62490064", "0.6243159", "0.6187591", "0.6179522", "0.6164907", "0.61504734", "0.6148864", "0.61471325", "0.6146718", "0.6144701", "0.6142316", "0.6132649", "0.61211693", "0.61177313", "0.610726", "0.609446", "0.60438645", "0.6034163", "0.60286814", "0.60284317", "0.6008825", "0.5996084", "0.5961507", "0.59351563", "0.5908388", "0.5904294", "0.5895129", "0.5892283", "0.58852756", "0.586544", "0.58484745", "0.5846259", "0.5841868", "0.58373725", "0.5831721", "0.57916087", "0.57696855", "0.576963", "0.5767503", "0.57386893", "0.57197464", "0.5718247", "0.5717582", "0.5702755", "0.5684817", "0.5680325", "0.567415", "0.5659741" ]
0.0
-1
Created by Calcious on 12/2/16.
public interface validator { //what are the minimum requirements //what we need for our methods //write down the methods/processes that are in common //define the methods public boolean isValid(); public String errorMessage(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@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}", "protected boolean func_70814_o() { return true; }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private void m50366E() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "public void mo38117a() {\n }", "private static void cajas() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private stendhal() {\n\t}", "public void skystonePos4() {\n }", "private void kk12() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo12628c() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void skystonePos6() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "private void m50367F() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\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}", "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\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void method_4270() {}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void m23075a() {\n }", "public void mo21779D() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public final void mo91715d() {\n }", "private void strin() {\n\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "public void mo6081a() {\n }", "public void skystonePos5() {\n }", "public void skystonePos3() {\n }", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo21877s() {\n }", "public void mo12930a() {\n }", "protected void mo6255a() {\n }", "public abstract void mo70713b();", "@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\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void Exterior() {\n\t\t\r\n\t}", "public void skystonePos2() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public int width()\n {\n return widthCent; //Charlie Gao helped me debug the issue here\n }", "public abstract void mo56925d();", "private void init() {\n\n\t}", "@Override\n protected void init() {\n }", "public void mo21878t() {\n }", "protected boolean func_70041_e_() { return false; }", "public void mo9848a() {\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}", "public void Tyre() {\n\t\t\r\n\t}", "public void mo21825b() {\n }", "public void mo115190b() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void mo55254a() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override public int describeContents() { return 0; }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic int getPos() {\n\t\treturn 0;\n\t}" ]
[ "0.58188623", "0.57748294", "0.573876", "0.56648135", "0.56648135", "0.566126", "0.5650107", "0.5606125", "0.56050503", "0.5571725", "0.5563394", "0.55474335", "0.55448365", "0.5544657", "0.55357045", "0.5517727", "0.55038357", "0.5501267", "0.54907244", "0.5486836", "0.54853004", "0.54453313", "0.54434174", "0.5430951", "0.54301816", "0.5400682", "0.53849775", "0.5378247", "0.5359832", "0.53496337", "0.53445417", "0.5320616", "0.5316795", "0.5309234", "0.53071105", "0.5306814", "0.5306814", "0.5306814", "0.5306814", "0.5306814", "0.5306352", "0.5306352", "0.5306352", "0.5306352", "0.5306352", "0.5306352", "0.5306352", "0.5304967", "0.53028595", "0.52975565", "0.52858365", "0.5284174", "0.5261056", "0.5259145", "0.5257862", "0.5256337", "0.5249824", "0.52434415", "0.5242798", "0.5242468", "0.52405065", "0.5239169", "0.52377266", "0.52318484", "0.5230944", "0.5228943", "0.5223484", "0.5221345", "0.5207997", "0.52066463", "0.51973397", "0.51922727", "0.51922727", "0.5187947", "0.518421", "0.51809925", "0.5180015", "0.5165997", "0.5164644", "0.5160384", "0.5148348", "0.5144226", "0.5142086", "0.5135775", "0.5135629", "0.51333886", "0.51333886", "0.51333886", "0.51298463", "0.5128602", "0.51283956", "0.5117541", "0.5114888", "0.51140916", "0.51128256", "0.51125944", "0.51120067", "0.51120067", "0.51120067", "0.51058286", "0.5100626" ]
0.0
-1
what are the minimum requirements what we need for our methods write down the methods/processes that are in common define the methods
public boolean isValid();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void additionalProcessing() {\n\t}", "public void process() {\n\t}", "public void backEndProcesses() {\n\n }", "public abstract boolean process();", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public static void main(String [] args){\n \n \tpart1();\n \n \tpart2();\n \n\t}", "public void process() {\n\n }", "public interface COPSPdpOSDataProcess extends COPSDataProcess {\r\n\r\n /**\r\n * Gets the policies to be uninstalled\r\n * @param man The associated request state manager\r\n * @return A <tt>Vector</tt> holding the policies to be uninstalled\r\n */\r\n public List<COPSDecision> getRemovePolicy(COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Gets the policies to be installed\r\n * @param man The associated request state manager\r\n * @return A <tt>Vector</tt> holding the policies to be uninstalled\r\n */\r\n public List<COPSDecision> getInstallPolicy(COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Makes a decision from the supplied request data\r\n * @param man The associated request state manager\r\n * @param reqSIs Client specific data suppplied in the COPS request\r\n */\r\n public void setClientData(COPSPdpOSReqStateMan man, List<COPSClientSI> reqSIs);\r\n\r\n /**\r\n * Builds a failure report\r\n * @param man The associated request state manager\r\n * @param reportSIs Report data\r\n */\r\n public void failReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);\r\n\r\n /**\r\n * Builds a success report\r\n * @param man The associated request state manager\r\n * @param reportSIs Report data\r\n */\r\n public void successReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);\r\n\r\n /**\r\n * Builds an accounting report\r\n * @param man The associated request state manager\r\n * @param reportSIs Report data\r\n */\r\n public void acctReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);\r\n\r\n /**\r\n * Notifies that no accounting report has been received\r\n * @param man The associated request state manager\r\n */\r\n public void notifyNoAcctReport (COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Notifies a keep-alive timeout\r\n * @param man The associated request state manager\r\n */\r\n public void notifyNoKAliveReceived (COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Notifies that the connection has been closed\r\n * @param man The associated request state manager\r\n * @param error Reason\r\n */\r\n public void notifyClosedConnection (COPSPdpOSReqStateMan man, COPSError error);\r\n\r\n /**\r\n * Notifies that a request state has been deleted\r\n * @param man The associated request state manager\r\n */\r\n public void notifyDeleteRequestState (COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Notifies that a request state has been closed\r\n * @param man The associated request state manager\r\n */\r\n public void closeRequestState(COPSPdpOSReqStateMan man);\r\n\r\n}", "public interface Processor {\n\n /**\n * Common key on the params map that uses/returns the process method\n */\n enum ParameterKeys {\n ID, BODY, LEFT, RIGHT, STOP_FLAG, RESULT\n }\n\n /**\n * It's the entry point to call the business logic execution on each Processor\n * @param params Map of params that is been use inside the Processor\n * @return the new state of the params after the business logic execution\n * @throws NullPointerException if the params is null, or an expected key inside the map\n * @throws IllegalArgumentException id the value of the param is not valid\n */\n Map<ParameterKeys, Object> process(final Map<ParameterKeys, Object> params) throws NullPointerException, IllegalArgumentException;\n}", "public void process();", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "void process();", "void process();", "abstract void exec();", "public interface MS {\n\n /*start*/\n void a(Context context);\n\n /*b*/\n void b();\n\n /*forceStopPackage*/\n boolean c(String packageName);\n\n// boolean monitorAppProcess(final MonitorCallback callback);\n\n /*getProcesses*/\n List<String> d();\n\n /*setWriteApps*/\n void e(List<String> writeApps);\n\n /*getRunningTasks*/\n String f();\n\n /*enableAccessibilityService*/\n void g(String s);\n\n /*clearDir*/\n void h(String dirPath,ArrayList<String> keyList);\n\n /*isFileExist*/\n boolean i(String path);\n\n /*deleteFile*/\n void j(String path);\n\n /*writeFile*/\n void k(String path,String content);\n\n /*getAudioFocus*/\n String l();\n\n void m(boolean bool);\n\n long n();\n\n void o(boolean bool);\n\n boolean p();\n\n /*update white&black list&gray list*/\n void q(String white,String black,String gray);\n\n /*getWhiteList*/\n String r();\n\n /*getBlackList*/\n String s();\n\n /*getGrayList*/\n String t();\n}", "public abstract void runProcess();", "void preProcess();", "public interface CoreServiceInvoker {\n\n\n GWRequest processRequest(Object requestData, InterfaceMapper mapper);\n\n /**\n * 处理请求信息\n */\n GWRequest processRequest(Object requestData, InterfaceMapper mapper, boolean needPackage);\n\n /**\n * 调用核心方法\n */\n GWResponse invoke(GWRequest request, boolean needPackage);\n\n /**\n * 处理返回信息\n */\n Object analysisResponse(GWRequest request, GWResponse response);\n Object analysisResp(GWRequest request, GWResponse response);\n}", "public void smell() {\n\t\t\n\t}", "public interface ResourceInterface {\n\n /**\n * A process can arrive at a resource or finish using it.\n * These are the two methods to handle these occurances.\n */\n /**arrivingProcess handles the event of a process arriving to a resource for service\n * This method is handled differently depending on whether the resource is exclusive or not\n * @param theProcess process the process that has arrived at the resource for service\n * @param time int The global time at which the process has arrived to the resource\n */\n void arrivingProcess(process theProcess, int time);\n\n /**finishService handles the event of a process finishing using the resource.\n * This method is called in the scheduler to insert the returned process back into the ready queue.\n * This method is different for exclusive and inclusive resources.\n *\n * @return Process The process that has finishing using the resource\n */\n process finishService ();\n\n /**\n * additional methods for updating resource object\n */\n\n /**updateNextUnblockTime mutates NextUnblockTime to be equal to the given time\n *\n * @param t int the given time\n */\n void updateNextUnblockTime(int t);\n\n /**updateIdleTime increments the IdleTime by the given int\n *\n * @param T int the amount of time the resource was idle\n */\n void updateIdleTime(int T);\n\n /**updateActiveTime increment the ActiveTime by the given time\n *\n * @param T The amount of time the resource was active\n */\n void updateActiveTime(int T);\n\n /**\n * toString formats important information about resource into a string for debugging purposes\n */\n String toString();\n\n /**\n * getters for resource\n */\n String getType();\n int getNextUnblockTime();\n int getStartIdleTime();\n int getActiveTime();\n int getIdleTime();\n process getServingProcess();\n int getCount();\n int getMaxCount();\n int getNumOfBlocks();\n int getTotalBlockTime();\n int getStartWaitTime();\n int getWaitTime();\n}", "public void logic(){\r\n\r\n\t}", "@Override\n\tpublic void process() {\n\t\tInterface2.super.process();\n\t}", "protected abstract void work();", "@Override\r\n\tprotected void processExecute() {\n\r\n\t}", "abstract void doJob();", "public void processing();", "@Override\n protected void prot() {\n }", "public interface BusinessProcess {\n /**\n * 判断用户是否进行过切换账号的操作,\n * 如果切换账号.则返回true\n * 否则返回false\n *\n * @return\n */\n boolean needRefreshDisplayData();\n\n /**\n * 添加用户\n *\n * @param user\n */\n void insertOrUpdateUserInfo(User user);\n\n /**\n * 如果没有用户则添加一个默认用户\n * 如果有用户 则忽略操作\n */\n void insertDefaultUser();\n\n /**\n * 获得默认账户信息\n *\n * @return\n */\n User getDefaultUser();\n\n /**\n * 检测登录的账户是否是默认账号\n *\n * @return\n */\n boolean checkOnlineIsDefaultAccount();\n\n /**\n * 获取默认登录的用户\n *\n * @return\n */\n User getOnlineUser();\n\n /**\n * 更新登录用户,将此次登录的用户设置为'登录用户'\n * 将上次登录用户设置为'未登录'\n *\n * @param user\n */\n void updateUserLoginState(User user);\n\n /**\n * 默认账号下面有内容,是否要关联到在线用户账户下\n * 用于用户登录时提醒.\n *\n * @return\n */\n boolean checkHaveDataLinkToOnlineAccount();\n\n /**\n * 移动默认账户下面的所有数据到在线账户上去\n */\n boolean moveDataToOnlineAccount();\n\n /**\n * 根据用户查找所有的事项\n *\n * @param user\n * @return\n */\n ArrayList<ToDoThing> listAllThingsByUser(User user);\n\n\n /**\n * 根据用户ID查找所有的事项\n *\n * @param userId 用户id\n * @return\n */\n ArrayList<ToDoThing> listAllThingsByUserId(Long userId);\n\n\n /**\n * 查找数据库中所有的事项\n *\n * @return\n */\n ArrayList<ToDoThing> listAllThings();\n\n /**\n * 根据ToDoThing的id 删除事项\n *\n * @param id ToDoThing的id\n */\n void removeToDoTingById(Long id);\n\n\n /**\n * 根据ToDoThing的id 查找事项\n *\n * @param id ToDoThing的id\n * @return\n */\n ToDoThing getThingById(Long id);\n\n /**\n * 添加事项 已废弃\n *\n * @param toDoThing\n */\n void saveThing(ToDoThing toDoThing);\n\n\n /**\n * 添加事项, 和提醒时间(notificationList 可为空)\n *\n * @param toDoThing\n * @param notificationList\n */\n void saveThing(ToDoThing toDoThing, List<Notification> notificationList);\n\n /**\n * 查找已经完成的事情\n *\n * @return\n */\n ArrayList<ToDoThing> listOnlineUserFinshThingsOrderByFinshTimeDesc();\n\n\n /**\n * 查找还未做的事情\n *\n * @return\n */\n ArrayList<ToDoThing> listOnlineUserNotDoneThingsOrderByCreateTimeDesc();\n\n /**\n * 查找还未做的事情,附带展示需要的各种信息\n *\n * @return\n */\n ArrayList<ShowThingsDTO> listOnlineUserNotDoneThingsOrderByCreateTimeDescWithReminderTime();\n\n /**\n * 查找已经完成的事情 附带展示需要的各种信息\n *\n * @return\n */\n ArrayList<ShowThingsDTO> listOnlineUserFinshThingsOrderByFinshTimeDescWithReminderTime();\n\n\n /**\n * 改变ToDoThing的状态 如果更改为完成状态,则同时设上一次提醒时间为当前时间\n *\n * @param id things id\n * @param state 状态信息\n */\n void updateThingState(Long id, int state);\n\n /**\n * 如果是重复提醒的notification 则\n * 计算下一次提醒的时间\n * 否则.不做操作\n *\n * @param ids\n */\n void updateCalculationNextReminderDate(List<Long> ids);\n\n /**\n * 查找距离此时最近的一次提醒\n *\n * @return\n */\n AlarmDTO listOnlineUserRecentNeedNotifyThings();\n\n\n /**\n * 获取到已经过期但是还未提醒的事项 Expired\n *\n * @return\n */\n AlarmDTO listOnlineUserExpiredThings();\n\n /**\n * 更新Notification 中 上一次提醒的时间\n *\n * @param id Notifaction id\n * @param date\n */\n void updatePreNotifyDate(Long id, Date date);\n\n //获取最近七日内增加的事件数量 date-counts\n ArrayList<ChartDataDTO> countOnlineUserRecentWeekNewThings();\n\n /**\n * 获取最近七日完成的事件 date-counts\n */\n ArrayList<ChartDataDTO> countOnlineUserRecentWeekFinshThings();\n\n /**\n * 获得今天添加的事项 和 已完成的事情\n *\n * @return\n */\n ArrayList<ChartDataDTO> countOnlineUserTodayThings();\n\n\n ArrayList<ResultFormat<PullDataDTO>> listOnlineNeedSyncData();\n\n}", "public abstract void process() throws IOException;", "public static void twoClientSetupProcesses() {\n\n\tList<String> aClientTags=TagsFactory.getAssignmentTags().getTwoClientClientTags();\n\tList<String> aServerTags=TagsFactory.getAssignmentTags().getTwoClientServerTags();\n\n\ttwoClientSetupProcesses(aClientTags, aServerTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcessTeams(Arrays.asList(\"RegistryBasedDistributedProgram\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setTerminatingProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Client_0\", \"Client_1\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Registry\", \"Server\", \"Client_0\", \"Client_1\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Registry\", Arrays.asList(\"Registry\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Server\", aServerTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_0\", aClientTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_1\", aClientTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Registry\", FlexibleStaticArgumentsTestCase.TEST_REGISTRY_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Server\", FlexibleStaticArgumentsTestCase.TEST_SERVER_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_0\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_0_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_1\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_1_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Registry\", 500);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Server\", 2000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Client_0\", 5000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Client_1\", 5000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().getProcessTeams().forEach(team -> System.out.println(\"### \" + team));\n}", "public static void main(String[] args) {\n Sourceable sourceable1 = new SourceSub1();\n Sourceable sourceable2 = new SourceSub2();\n\n sourceable1.method1();\n sourceable1.method2();\n sourceable2.method1();\n sourceable2.method2();\n }", "abstract int pregnancy();", "public interface MigratableProcesses extends Runnable, Serializable{\n\n // file operation\n public abstract void run();\n\n // suspending this function\n public abstract void suspend();\n\n // check if this process finished\n public boolean finished();\n\n public abstract void resume();\n\n public abstract void finish();\n // public void set_migrate();\n\n}", "protected abstract void preRun();", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void onProcess();", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected void process() {\n long start = System.nanoTime();\n loadDriver(translator);\n configureConnectionPool();\n\n if (this.checkCompatibility) {\n checkCompatibility();\n }\n\n if (addKeyForTenant != null) {\n addTenantKey();\n } else if (this.dropSchema) {\n // only proceed with the drop if the user has provided additional confirmation\n if (this.confirmDrop) {\n dropSchema();\n } else {\n throw new IllegalArgumentException(\"[ERROR] Drop not confirmed with --confirm-drop\");\n }\n } else if (this.dropAdmin) {\n // only try to drop the admin schema\n if (this.confirmDrop) {\n dropSchema();\n } else {\n throw new IllegalArgumentException(\"[ERROR] Drop not confirmed with --confirm-drop\");\n }\n } else if (updateFhirSchema || updateOauthSchema || updateJavaBatchSchema) {\n updateSchema();\n } else if (createFhirSchema || createOauthSchema || createJavaBatchSchema) {\n createSchemas();\n } else if (updateProc) {\n updateProcedures();\n } else if (this.listTenants) {\n listTenants();\n } else if (this.allocateTenant) {\n allocateTenant();\n } else if (this.testTenant) {\n testTenant();\n } else if (this.freezeTenant) {\n freezeTenant();\n } else if (this.dropDetached) {\n dropDetachedPartitionTables();\n } else if (this.deleteTenantMeta) {\n deleteTenantMeta();\n } else if (this.dropTenant) {\n dropTenant();\n }\n\n if (this.grantTo != null) {\n grantPrivileges();\n }\n\n long elapsed = System.nanoTime() - start;\n logger.info(String.format(\"Processing took: %7.3f s\", elapsed / NANOS));\n }", "@Override\n\tpublic void implementionEight(String[] args) throws Exception {\n\n\t}", "public interface ProcessCall\n{\n\t/**\n\t * Start the process.\n\t * Called when pressing the ... button in ...\n\t * It should only return false, if the function could not be performed\n\t * as this causes the process to abort.\n\t *\n\t * @param ctx Context\n\t * @param pi\t\t\t\tProcess Info\n\t * @return true if the next process should be performed\n\t */\n\tpublic boolean startProcess (Properties ctx, ProcessInfo pi, Trx trx);\n\n}", "public interface AdditionalOrderInforCaller {\n\t/*\n\t * Command define from Order Confirmation API Guide\n\t * JSON and XML format\n\t */\n\t@Headers({\"Accept: application/json\",\"Content-Type: application/json\"})\n\t@RequestLine(\"POST /ordermgmt/order/addorderinfo?sellerid={sellerid}\")\n\tGetAdditionalOrderInformationResponse sendAdditionalOrderInforRequestJSON(@Param(\"sellerid\") String sellerID, GetAdditionalOrderInformationRequest body);\n\t\n\t@Headers({\"Accept: application/xml\",\"Content-Type: application/xml\"})\n\t@RequestLine(\"POST /ordermgmt/order/addorderinfo?sellerid={sellerid}\")\n\tGetAdditionalOrderInformationResponse sendAdditionalOrderInforRequestXML(@Param(\"sellerid\") String sellerID, GetAdditionalOrderInformationRequest body);\n\n\t// Implement default method of interface class that according to Variables.MediaType to run at JSON or XML request.\n\tdefault GetAdditionalOrderInformationResponse sendAdditionalOrderInforRequest(GetAdditionalOrderInformationRequest body) {\n\t\tswitch(Variables.MediaType) {\n\t\tcase JSON:\t\t\t\n\t\t\treturn sendAdditionalOrderInforRequestJSON(Content.SellerID, body);\n\t\t\t\n\t\tcase XML:\t\t\t\n\t\t\treturn sendAdditionalOrderInforRequestXML(Content.SellerID, body);\t\n\t\t\t\n\t\tdefault:\n\t\t\tthrow new RuntimeException(\"Never Happened!\");\n\t\t}\n\t\t\t\t\n\t}\n\t\n\tstatic AdditionalOrderInforCaller buildJSON() {\n\t\tVariables.MediaType = MEDIA_TYPE.JSON;\n\t\t\n\t\treturn new CallerFactory<AdditionalOrderInforCaller>()\n\t\t\t.jsonBuild(AdditionalOrderInforCaller.class, Variables.LogLevel, Variables.Retryer, OrderClient.genClient());\t\t\n\t}\n\n\tstatic AdditionalOrderInforCaller buildXML() {\n\t\tVariables.MediaType = MEDIA_TYPE.XML;\n\t\t\n\t\treturn new CallerFactory<AdditionalOrderInforCaller>()\n\t\t\t.xmlBuild(AdditionalOrderInforCaller.class, Variables.LogLevel, Variables.Retryer, OrderClient.genClient());\t\t\n\t}\n\t\n}", "public abstract void mo70713b();", "public void doGeneralThings() {\n logger.debug(\"Overrided or implememted method - doGeneralThings!\");\n }", "public interface IMasterDataService {\n\t\n\t\n\t\n\t/**\n\t * Call web service asynchronously and get Language Response. \n\t * @param context\n\t * @return List<CollectionItem>\n\t * @throws InvalidJsonError\n\t * @throws JSONException\n\t * @throws TimeOutError\n\t * @throws ParseException\n\t * @throws RequestFail\n\t * @throws IOException\n\t */\n\t\n\tpublic List<CollectionItem> executeLanguageCollection(Context context, String languageBeforSetting) \n\t\t\tthrows InvalidJsonError, JSONException, TimeOutError, ParseException, RequestFail, IOException, ConnectionError, BookingTimeOutError;\n\n\t\n\t/**\n\t * Call web service asynchronously and get Station Response.\n\t * @param context\n\t * @return List<Station>\n\t * @throws InvalidJsonError\n\t * @throws JSONException\n\t * @throws TimeOutError\n\t * @throws ParseException\n\t * @throws RequestFail\n\t * @throws IOException\n\t */\n\tpublic List<Station> executeStationCollection(Context context, String languageBeforSetting, List<OriginDestinationRule> originDestinationRules) \n\tthrows InvalidJsonError, JSONException, TimeOutError, ParseException, RequestFail, IOException, ConnectionError, BookingTimeOutError;\n\t\n\tpublic List<OriginDestinationRule> executeOriginDestinationRules(Context context, String languageBeforSetting) \n\tthrows InvalidJsonError, JSONException, TimeOutError, ParseException, RequestFail, IOException, ConnectionError, BookingTimeOutError;\n\n\tpublic GeneralSetting executeGeneralSetting(Context context, String languageBeforSetting)throws Exception;\n\n\tpublic void executeClickToCallScenario(\n\t\t\tContext context, String languageBeforSetting)\n\t\t\tthrows InvalidJsonError, JSONException, TimeOutError,\n\t\t\tParseException, RequestFail, IOException, ConnectionError, BookingTimeOutError;\n\tpublic WizardResponse executeWizard(\n\t\t\tContext context, String languageBeforSetting, String whichContext)\n\t\t\tthrows InvalidJsonError, JSONException, TimeOutError,\n\t\t\tParseException, RequestFail, IOException, ConnectionError, BookingTimeOutError;\n\t\n\tpublic HomeBannerResponse executeHomeBanner(\n\t\t\tContext context, String languageBeforSetting)\n\t\t\tthrows InvalidJsonError, JSONException, TimeOutError,\n\t\t\tParseException, RequestFail, IOException, ConnectionError, BookingTimeOutError;\n\t\n\tpublic TrainIconResponse executeTrainIcons(\n\t\t\tContext context, String languageBeforSetting)\n\t\t\tthrows InvalidJsonError, JSONException, TimeOutError,\n\t\t\tParseException, RequestFail, IOException, ConnectionError, BookingTimeOutError;\n\n\tpublic void encryptDatabase(Context context);\n\tpublic void storeDefaultData(Context context, boolean isChangeLanguage);\n\tpublic void storeGeneralSettings( Context context, String language) throws IOException, Exception;\n\tpublic MasterDataResponse executeMasterData(Context context, String languageBeforSetting)\n\t\t\tthrows InvalidJsonError, JSONException, TimeOutError,\n\t\t\tParseException, RequestFail, IOException, ConnectionError, BookingTimeOutError;\n\t\n\tpublic void insertStationMatrix(Context context, List<OriginDestinationRule> originDestinationRules);\n\tpublic void insertStations(Context context, List<Station> stations);\n\n\tpublic void cleanLastModifiedHomeBanner(Context context);\n\tpublic TrainIconResponse storeTrainIcon(Context context) throws InvalidJsonError, JSONException;\n\tpublic GeneralSettingResponse getGeneralSettingFromPackage(Context context, String language)throws Exception;\n\n\n}", "public abstract void runProcess(String[] args) throws Exception;", "abstract protected Set<Method> createMethods();", "public static void main(String[] args)\n {\n methodA();\n methodB();\n\n }", "@Override\n public Map flowControl() throws Exception {\n ELKAopLogger.logStr(\"this is phone user\");\n\n // 拼装产品节点\n preProductInfo();\n\n // 拼装ext节点-tradeRelation\n preExt();\n\n // 拼装base\n preBase();\n\n // 拼装其他产品节点\n preTradeOther();\n\n // 调预提交\n callPreSub();\n\n return null;\n }", "@Override\n\tpublic void dosomething2() {\n\t\t\n\t}", "public interface validator {\n //what are the minimum requirements\n //what we need for our methods\n\n //write down the methods/processes that are in common\n //define the methods\n\n public boolean isValid();\n public String errorMessage();\n\n\n}", "@Override\n\tpublic Result doProcessing() {\n\t\treturn doProcessing1();\n\t}", "private CommonMethods() {\n }", "public interface IJSCmdBase {\r\n\r\n public abstract void run();\r\n\r\n /** \\brief unMarshall\r\n * \r\n * \\details\r\n *\r\n * \\return Object\r\n *\r\n * @param pobjFile\r\n * @return */\r\n public abstract Object unMarshal(File pobjFile); // private Object\r\n // unMarshall\r\n\r\n /** \\brief marshal\r\n * \r\n * \\details\r\n *\r\n * \\return Object\r\n *\r\n * @param objO\r\n * @param objF */\r\n public abstract Object marshal(Object objO, File objF); // private\r\n // SchedulerObjectFactoryOptions\r\n // marshal\r\n\r\n public abstract String toXMLString(Object objO); // private\r\n // SchedulerObjectFactoryOptions\r\n // marshal\r\n\r\n public abstract String toXMLString(); // private\r\n // SchedulerObjectFactoryOptions\r\n // marshal\r\n\r\n}", "public Object doProcess() {\n List<Result> retv = new ArrayList<Result>();\n try {\n current_time = NTPDate.currentTimeMillis();\n current_time_nano = Utils.nanoNow();\n\n try {\n currentProcs = ProcFSUtil.getCurrentProcsHash();\n } catch (Throwable t) {\n if (logger.isLoggable(Level.FINER)) {\n logger.log(Level.FINER, \" [ myMon ] ProcFSUtil.getCurrentProcsHash exc\", t);\n }\n }\n final Result result = getResult();\n if(result != null) {\n result.addSet(\"Max Memory\", Runtime.getRuntime().maxMemory() / MEGABYTE_FACTOR);\n result.addSet(\"Memory\", Runtime.getRuntime().totalMemory() / MEGABYTE_FACTOR);\n result.addSet(\"Free Memory\", Runtime.getRuntime().freeMemory() / MEGABYTE_FACTOR);\n retv.add(result);\n }\n\n Result r = fillMLCPUTimeStats();\n if (r != null)\n retv.add(r);\n\n r = fillParamStats();\n if (r != null)\n retv.add(r);\n\n r = fillProcsStats();\n if (r != null)\n retv.add(r);\n\n if (currentProcs != null && currentProcs.size() > 0) {\n prevProcs = currentProcs;\n }\n\n r = fillPMSStats();\n if (r != null)\n retv.add(r);\n\n r = fillMLLUSHelperStats();\n if (r != null)\n retv.add(r);\n\n r = fillPWStats();\n if (r != null)\n retv.add(r);\n\n r = fillTCWStats();\n if (r != null)\n retv.add(r);\n\n if (IS_MAC) {\n r = fillFromMAC();\n if (r != null)\n retv.add(r);\n }\n } catch (Throwable t) {\n if (logger.isLoggable(Level.FINER)) {\n logger.log(Level.FINER, \"[ myMon ] [ HANDLED ] got ex main loop ... \", t);\n }\n return null;\n } finally {\n last_time_nano = current_time_nano;\n }\n\n currentProcs = null;\n if (logger.isLoggable(Level.FINEST)) {\n logger.log(Level.FINEST, \" [ myMon ] Returning ... \\n\" + retv);\n }\n return retv;\n }", "public void method_192() {}", "public interface Commander {\r\n\t\r\n\t/**\r\n\t * This will issue a command. It returns a receipt for the issuance, not for the other all interaction.\r\n\t * @param commandToIssue The command to issue.\r\n\t * @throws things.thinger.SystemException\r\n\t */\r\n\tpublic Receipt issueCommand(Command\t\tcommandToIssue) throws SystemException;\r\n\t\r\n\t/**\r\n\t * Query the reponse progress a command. It is up to the implementation as to when responses are handled. If they\r\n\t * are not handled in a separate thread, it is possible this call with take time to handle responses. The implementation will\r\n\t * make a best-effort to keep InterruptedExceptions from fouling the process. If it successful, the interruption will propagate\r\n\t * as a simple WARNING level SystemException. If not, you could see anything up to a PANIC.\r\n\t * @param commandReceipt The issuance receipt. \r\n\t * @return A response object.\r\n\t * @throws things.thinger.SystemException\r\n\t */\r\n\tpublic CommandResponse queryResponse(Receipt\tcommandReceipt) throws SystemException;\r\n\t\r\n\t\r\n\t/**\r\n\t * Allow the disposal procecure to run. It is safe to call this any time. It will sweep any DISPOSED responses\r\n\t * from the system, which may build up over time. The CommandResponse implementations may or may not call it.\r\n\t * @throws things.thinger.SystemException\r\n\t */\r\n\tpublic void disposal() throws SystemException;\r\n\t\r\n}", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "protected abstract void analyzeSystem(PipelineData data) throws Exception;", "private ProcessorUtils() { }", "void parkingMethod(){\n nearingTheCrater();\n parkingTheArm();\n }", "public interface ProductProcessorMP0 extends ProductProcessor {\n\n\n\n\n void processFile(MultipartFile file, ContractImage contractImage, Contract contract) throws IOException, IllegalDataException;\n}", "void rustAndMahem() {\n //TODO: See rules\n }", "public interface ProcessTest {\n void process();\n}", "public interface Methods {\n\n /**\n * List all static methods for a given content model.\n *\n * @param cmpid Pid of the content model.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return List of methods defined.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If content model doesn't exist.\n */\n public List<Method> getStaticMethods(String cmpid,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n\n /**\n * List all dynamic methods for a given object.\n *\n * @param objpid Pid of the object.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return List of methods defined.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If object doesn't exist.\n */\n public List<Method> getDynamicMethods(String objpid,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n\n /**\n * Invoke a given method with the given parameters.\n *\n * @param pid The pid of the content model or object defining the method.\n * @param methodName The name of the method.\n * @param parameters Parameters for the method, as a map from name list of values.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return Result of calling method.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If object, content model or method doesn't exist.\n */\n public String invokeMethod(String pid,\n String methodName,\n Map<String, List<String>> parameters,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n}", "@Override\n\tpublic void process() throws Exception {\n\n\t}", "boolean generateAutomata()\n{\n empty_calls = new HashSet<JflowMethod>();\n event_calls = new HashSet<JflowMethod>();\n complete_calls = new LinkedHashMap<JflowMethod,ModelMethod>();\n methods_todo = new LinkedHashSet<JflowMethod>();\n return_set = new HashMap<JflowMethod,Boolean>();\n\n start_set = new HashSet<JflowMethod>();\n for (JflowMethod cm : model_master.getStartMethods()) {\n methods_todo.add(cm);\n start_set.add(cm);\n }\n\n while (!methods_todo.isEmpty()) {\n Iterator<JflowMethod> it = methods_todo.iterator();\n if (!it.hasNext()) break;\n JflowMethod cm = it.next();\n it.remove();\n if (!empty_calls.contains(cm) && !complete_calls.containsKey(cm)) {\n\t if (!model_master.checkUseMethod(cm) || !model_master.isMethodAccessible(cm.getMethod()) ||\n\t\tcm.getMethod().isAbstract()) {\n\t if (model_master.doDebug()) {\n\t System.err.println(\"Ignore method: \" + cm.getMethodName() + \" \" +\n\t\t\t\t cm.getMethodSignature() + \" \" +\n\t\t\t\t model_master.checkUseMethod(cm) + \" \" +\n\t\t\t\t model_master.isMethodAccessible(cm.getMethod()));\n\t }\n\t empty_calls.add(cm);\n\t }\n\t else {\n\t ModelBuilder bld = new ModelBuilder(model_master,this,cm);\n\t complete_calls.put(cm,null);\n\t ModelMethod cs = bld.createAutomata();\n\t if (cs == null) empty_calls.add(cm);\n\t else complete_calls.put(cm,cs);\n\t }\n }\n }\n\n Set<JflowMethod> workq = new LinkedHashSet<JflowMethod>();\n for (Map.Entry<JflowMethod,ModelMethod> ent : complete_calls.entrySet()) {\n JflowMethod bm = ent.getKey();\n ModelMethod cs = ent.getValue();\n if (cs == null) continue;\n Set<JflowModel.Node> states = simplify(cs.getStartState());\n int ctr = 0;\n boolean hasrtn = false;\n for (JflowModel.Node st1 : states) {\n\t if (st1.getEvent() != null) event_calls.add(bm);\n\t else if (st1.getFieldSet() != null) event_calls.add(bm);\n\t if (!hasrtn && st1.getReturnValue() != null) hasrtn = true;\n\t JflowMethod cm = st1.getCall();\n\t if (cm != null) {\n\t if (event_calls.contains(cm)) event_calls.add(bm);\n\t else {\n\t ++ctr;\n\t ModelMethod ncs = complete_calls.get(cm);\n\t if (ncs != null) ncs.addUser(bm);\n\t else System.err.println(\"Call to \" + cm.getMethodName() + \" not found\");\n\t }\n\t }\n }\n return_set.put(bm,Boolean.valueOf(hasrtn));\n\n if (model_master.doDebug()) {\n\t System.err.println(\"First pass method \" + bm.getMethodName() + \" \" +\n\t\t\t bm.getMethodSignature() + \" \" + ctr + \" \" +\n\t\t\t states.size() + \" \" + event_calls.contains(bm));\n }\n if (ctr == 0) {\n\t if (!event_calls.contains(bm)) empty_calls.add(bm);\n }\n else {\n\t workq.add(bm);\n }\n }\n if (model_master.doDebug()) System.err.println(\"Work queue size = \" + workq.size());\n if (event_calls.size() == 0) return false;\n\n Set<JflowMethod> returnused = null;\n boolean chng = true;\n while (chng) {\n chng = false;\n returnused = new HashSet<JflowMethod>();\n while (!workq.isEmpty()) {\n\t Iterator<JflowMethod> it = workq.iterator();\n\t if (!it.hasNext()) break;\n\t JflowMethod bm = it.next();\n\t it.remove();\n\t ModelMethod cs = complete_calls.get(bm);\n\t boolean chkit = !event_calls.contains(bm);\n\n\t if (cs == null || empty_calls.contains(bm)) continue;\n\n\t int ctr = 0;\n\t Set<JflowModel.Node> states = simplify(cs.getStartState());\n\t boolean mchng = false;\n\t boolean hasrtn = false;\n\t for (JflowModel.Node st1 : states) {\n\t if (!hasrtn && st1.getReturnValue() != null) hasrtn = true;\n\t JflowMethod cm = st1.getCall();\n\t if (cm != null) {\n\t if (st1.getUseReturn()) returnused.add(cm);\n\t if (!event_calls.contains(cm)) {\n\t\t ++ctr;\n\t\t}\n\t else if (chkit) {\n\t\t if (model_master.doDebug()) {\n\t\t System.err.println(\"Method required: \" + bm.getMethodName() + \" \" +\n\t\t\t\t\t bm.getMethodSignature() + \" :: \" + cm.getMethodName() +\n\t\t\t\t\t \" \" + cm.getMethodSignature());\n\t\t }\n\t\t event_calls.add(bm);\n\t\t chkit = false;\n\t\t mchng = true;\n\t\t}\n\t }\n\t }\n\n\t if (return_set.get(bm) != Boolean.FALSE) {\n\t return_set.put(bm,Boolean.valueOf(hasrtn));\n\t if (!hasrtn) mchng = true;\n\t }\n\n\t if (ctr == 0 && !event_calls.contains(bm)) {\n\t empty_calls.add(bm);\n\t mchng = true;\n\t }\n\n\t if (model_master.doDebug()) System.err.println(\"Consider method \" + bm.getMethodName() + \" \" + bm.getMethodSignature() + \" \" + ctr + \" \" + states.size() + \" \" + mchng);\n\n\t if (mchng) {\n\t for (Iterator<?> it1 = cs.getUsers(); it1.hasNext(); ) {\n\t JflowMethod cm = (JflowMethod) it1.next();\n\t if (model_master.doDebug()) System.err.println(\"\\tQueue \" + cm.getMethodName() + \" \" + cm.getMethodSignature());\n\t workq.add(cm);\n\t }\n\t }\n }\n\n for (Map.Entry<JflowMethod,ModelMethod> ent : complete_calls.entrySet()) {\n\t JflowMethod bm = ent.getKey();\n\t ModelMethod cs = ent.getValue();\n\t if (cs != null && !empty_calls.contains(bm) && !event_calls.contains(bm)) {\n\t empty_calls.add(bm);\n\t chng = true;\n\t for (Iterator<JflowMethod> it1 = cs.getUsers(); it1.hasNext(); ) {\n\t JflowMethod cm = it1.next();\n\t if (model_master.doDebug()) System.err.println(\"\\tQueue \" + cm.getMethodName() + \" \" + cm.getMethodSignature());\n\t workq.add(cm);\n\t }\n\t }\n }\n }\n\n for (JflowMethod cm : empty_calls) {\n complete_calls.remove(cm);\n }\n\n chng = true;\n boolean needsync = true;\n while (chng) {\n chng = false;\n boolean nextsync = false;\n for (ModelMethod em : complete_calls.values()) {\n\t Set<JflowModel.Node> sts = simplify(em.getStartState());\n\t if (!needsync) {\n\t for (JflowModel.Node nms : sts) {\n\t ModelState ms = (ModelState) nms;\n\t if (ms.getWaitType() != ModelWaitType.NONE) {\n\t\t ms.clearCall();\n\t\t chng = true;\n\t\t}\n\t }\n\t }\n\t else if (!nextsync) {\n\t for (JflowModel.Node ms : sts) {\n\t if (ms.getCall() != null && ms.isAsync()) nextsync = true;\n\t }\n\t }\n\t if (return_set.get(em.getMethod()) != Boolean.FALSE && returnused != null && \n\t\t!returnused.contains(em.getMethod())) {\n\t for (JflowModel.Node nms : sts) {\n\t ModelState ms = (ModelState) nms;\n\t if (ms.getReturnValue() != null) {\n\t\t ms.clearCall();\n\t\t chng = true;\n\t\t}\n\t }\n\t return_set.put(em.getMethod(),Boolean.FALSE);\n\t }\n }\n if (nextsync != needsync) chng = true;\n needsync = nextsync;\n }\n\n for (ModelMethod em : complete_calls.values()) {\n ModelMinimizer.minimize(model_master,em.getStartState());\n }\n\n ModelSynch msynch = new ModelSynch(complete_calls.values());\n msynch.establishPartitions();\n\n if (model_master.doDebug()) {\n IvyXmlWriter nxw = new IvyXmlWriter(new OutputStreamWriter(System.err));\n nxw.begin(\"DEBUG\");\n outputEvents(nxw);\n outputProgram(nxw);\n nxw.end();\n nxw.flush();\n }\n\n boolean retfg = true;\n\n Collection<JflowEvent> c = model_master.getRequiredEvents();\n if (c != null && !c.isEmpty()) {\n Set<JflowEvent> evts = new HashSet<JflowEvent>();\n for (ModelMethod cs : complete_calls.values()) {\n\t Set<JflowModel.Node> states = simplify(cs.getStartState());\n\t for (JflowModel.Node ms : states) {\n\t JflowEvent ev = ms.getEvent();\n\t if (ev != null) evts.add(ev);\n\t }\n }\n for (JflowEvent ev : c) {\n\t if (!evts.contains(ev)) {\n\t System.err.println(\"JFLOW: Required event \" + ev + \" not found\");\n\t retfg = false;\n\t break;\n\t }\n }\n }\n\n empty_calls = null;\n event_calls = null;\n methods_todo = null;\n return_set = null;\n\n return retfg;\n}", "abstract protected boolean checkMethod();", "public interface Iprocessor {\n public void process(RoundEnvironment roundEnvironment, Element typeElement, Filer mfFiler, Elements elements, Messager messager);\n}", "@Override\n\tpublic void implementionTen(String[] args) throws Exception {\n\n\t}", "public static void main(String[] args) {\n\t\r\n\t\t\r\n multipleInherit obj=new multipleInherit();\r\n obj.walking();\r\n obj.sleeping();\r\n obj.read();\r\n\t}", "public interface JbpmService {\n\n /**\n * Delegate a task owned by sourceUserId to targetUserId\n * \n * @param taskId\n * @param sourceUserId\n * @param targetUserId\n */\n void delegateTask(Long taskId, String sourceUserId, String targetUserId);\n\n List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId, String locale);\n\n /**\n * Gets all tasks assigned to a particular userid filtered by processId(which is same as Task.PROCESSID column or bpmn file process identifier)\n * \n * @param userId\n * @param processId\n * @return\n */\n List<TaskSummary> getTasksAssignedAsPotentialOwnerByProcessId(String userId, String processId);\n\n /**\n * @param userId\n * @param processId\n * @param deploymentId\n * @return\n */\n List<TaskSummary> getTasksAssignedAsPotentialOwnerByProcessId(String userId, String processId, String deploymentId) throws RuntimeException;\n\n /**\n * Claim a taskList by user\n * \n * @param userId\n * @param taskList\n * @return\n */\n void claimTask(String userId, List<TaskSummary> taskList);\n\n /**\n * This Claims a task with taskId by userId\n * \n * @param userId\n * @param taskId\n */\n void claimTask(String userId, Long taskId);\n\n /**\n * This moves to state of task to Complete state.(Reserved->InProgress->Completed)\n * \n * @param userId\n * @param taskId\n * @param results\n */\n void completeTask(String userId, Long taskId, Map<String, Object> results);\n\n /**\n * This api releases the claim by userId on taskid\n * \n * @param userId\n * @param taskId\n */\n void releaseTask(String userId, Long taskId);\n\n /**\n * This api releases the claim by userId on taskList\n * \n * @param userId\n * @param taskList\n * @param results\n */\n void releaseTask(String userId, List<TaskSummary> taskList, Map<String, Object> results);\n\n /**\n * This moves to state of taskList to Complete state.(Reserved->InProgress->Completed)\n * \n * @param userId\n * @param taskList\n * @param results\n * @throws Exception\n */\n void completeTask(String userId, List<TaskSummary> taskList, Map<String, Object> results);\n\n /**\n * Gets all tasks assigned to a particular userid\n * \n * @param processInstanceId\n * @param locale\n * , eg: en-UK or en-US based on task configured in workflow\n * @return\n */\n List<TaskSummary> getTasksByProcessInstanceId(Long processInstanceId, String locale);\n\n /**\n * Start a new process instance. The process (definition) that should be used is referenced by the given process id. Parameters can be passed to the process instance (as name-value pairs), and\n * these will be set as variables of the process instance.\n * \n * @param processId\n * the id of the process that should be started\n * @param parameters\n * the process variables that should be set when starting the process instance\n * @return the ProcessInstance that represents the instance of the process that was started\n * @throws Exception\n */\n ProcessInstance startProcess(String processId, Map<String, Object> params);\n\n /**\n * Nominate a task with taskId to userlist , this is operator only when task is in created state\n * \n * @param userId\n * @param userList\n * @param taskId\n */\n void nominateTask(String userId, List<String> userList, Long taskId);\n\n \n\n /**\n * Gets all tasks assigned to a particular processInstanceId ,statusList and formNameList\n * \n * @param processInstanceId\n * @param locale\n * , eg: en-UK or en-US based on task configured in workflow\n * @return\n */\n List<TaskImpl> getTasksByProcessInstanceIdStatusFormName(Long processInstanceId, List<Status> statusList, List<String> formName);\n\n /**\n * Check if workflow is active or completed.\n * \n * @param processInstanceId\n * @return\n */\n boolean isWorkflowActive(Long processInstanceId);\n\n /**\n * @param processInstanceId\n * @param formName\n * @param action\n * @param approver\n * @param state\n * @throws Exception\n */\n Long completeTask(Long processInstanceId, String formName, String action, String approver, String state);\n\n /**\n * Abort a running process instance.\n * \n * @param processInstanceId\n * the id of the process that already in run.\n * @throws Exception\n */\n void abortProcess(Long processInstanceId);\n\n List<TaskImpl> getTaskPendingByActor(Map<String, Object> params);\n\n Task getTaskById(Long taskId);\n\n /***\n * Gets all tasks assigned to a userId deploymentId\n * \n * @param userId\n * @param deploymentId\n * @return\n * @throws Exception\n */\n List<TaskSummary> getTasksAssignedAsPotentialOwnerByDeploymentId(String userId, String deploymentId);\n\n TaskService getTaskService();\n\n AuditService getAuditService();\n\n RuntimeEngine getEngine();\n\n KieSession getKsession();\n\n AuditLogService getLogService();\n\n RuntimeManager getManager();\n\n}", "@Override\r\n\t\t\tpublic void autStartParallelProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autStartParallelProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autStartParallelProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autStartParallelProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autStartParallelProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autStartParallelProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autStartParallelProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n protected void processRun() {\n try {\n if (helpOnly) helpOnly();\n else {\n if (hasPipedInput()) pipeVersion();\n else stdinVersion();\n }\n } catch (IOException e) {\n return; // Killed process\n }\n }", "public void work() {\n\t}", "public void work() {\n\t}", "public void processCode() throws InstantiationException, IllegalAccessException, ClassNotFoundException {\n\t\tsuper.processCode();\t\n\t\t\n\t\tfor (String processor : getProcessors()) {\n\t\t\tString[] refactorName = processor.split(\"\\\\.\");\n\t\t\tString refactor = refactorName[refactorName.length - 1];\n\t\t\t\n\t\t\tswitch (refactor) {\n\t\t\t\tcase \"CollapseHierarchy\" : refactoringsApplied.put(refactor, CollapseHierarchy.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t CollapseHierarchy.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"EncapsulateCollection\" : refactoringsApplied.put(refactor, EncapsulateCollection.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t EncapsulateCollection.resetTimesApplied();\n\t\t\t\t \t\t\t\t\t\t\t break;\n\t\t\t\tcase \"EncapsulateField\" \t : refactoringsApplied.put(refactor, EncapsulateField.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t EncapsulateField.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t \t break;\n\t\t\t\tcase \"ExtractSuperClass\" : refactoringsApplied.put(refactor, ExtractSuperClass.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t ExtractSuperClass.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"HideMethod\" : refactoringsApplied.put(refactor, HideMethod.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t HideMethod.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"PullUpField\"\t\t\t : refactoringsApplied.put(refactor, PullUpField.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t PullUpField.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"PullUpMethod\" : refactoringsApplied.put(refactor, PullUpMethod.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t PullUpMethod.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"PushDownField\"\t\t : refactoringsApplied.put(refactor, PushDownField.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t PushDownField.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"PushDownMethod\"\t : refactoringsApplied.put(refactor, PushDownMethod.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t PushDownMethod.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t}\t\n\t\t}\n\t\t\n\t\toutputProcessedCode();\n\t}", "void work();", "ResilientExecutionUtil() {\n // do nothing\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public abstract void engineWork() throws Exception;", "public abstract void processJob() throws Exception;", "public static void main(String[] args) {\nPar1 obj1 = new Par1();\nSon1 obj2 = new Son1();\nPar1 obj3 = new Son1(); //업캐스팅\nobj3.method1(); //하위클래스에서 재정의된 Method1()사용\n\n//추상클래스\n//par2 obj4 = new par2 ();//추상 클래스로는 객체 생성이 불가능\nSon2 obj5 = new Son2(); // 추상매서드를 재정의한 자식클래스는 객체생성가능\nPar2 obj6 = new Son2(); //업캐스팅\nobj3.method1();\n\t\n\t}", "protected AsymmetricProcessor() {\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void processing() {\n\n\t}", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "@Override\n\tpublic void startProcessing() {\n\n\t}", "public interface IAisMsgCommondService {\n\n /**\n * 常规预报AIS消息控制\n * */\n public int generalForecastCommond(GeneralForecastBo generalForecastBo);\n\n /**\n * 数值预报AIS消息控制\n * */\n public int numericalForecastCommond(List<NumericalForecastBo> numericalForecastBoList);\n\n /**\n * 短消息控制\n * */\n public int messageCommond(MessageBo msgBo);\n}", "public void method_191() {}", "public void method_201() {}", "default void process(Input input, Output response) { }", "private static void executeTask02() {\n }", "public interface RMASubmitCaller {\n\t/*\n\t * Command define from Order Confirmation API Guide JSON and XML format\n\t */\n\t@Headers({ \"Accept: application/json\", \"Content-Type: application/json\" })\n\t@RequestLine(\"POST /servicemgmt/rma/newrma?sellerid={sellerid}&version={version}\")\n\tSubmitRMAResponse sendRMASubmitRequestJSON(@Param(\"sellerid\") String sellerID, @Param(\"version\") String version,\n\t\t\tSubmitRMARequest body);\n\n\t@Headers({ \"Accept: application/xml\", \"Content-Type: application/xml\" })\n\t@RequestLine(\"POST /servicemgmt/rma/newrma?sellerid={sellerid}&version={version}\")\n\tSubmitRMAResponse sendRMASubmitRequestXML(@Param(\"sellerid\") String sellerID, @Param(\"version\") String version,\n\t\t\tSubmitRMARequest body);\n\n\t// Implement default method of interface class that according to\n\t// Variables.MediaType to run at JSON or XML request.\n\tdefault SubmitRMAResponse sendRMASubmitRequest(SubmitRMARequest body, String version) {\n\t\tswitch (Variables.MediaType) {\n\t\tcase JSON:\n\t\t\tif (Variables.SimulationEnabled)\n\t\t\t\treturn sendRMASubmitRequestJSON(Content.SellerID, \"307\", body);\n\t\t\telse\n\t\t\t\treturn sendRMASubmitRequestJSON(Content.SellerID, version, body);\n\n\t\tcase XML:\n\t\t\tif (Variables.SimulationEnabled)\n\t\t\t\treturn sendRMASubmitRequestXML(Content.SellerID, \"307\", body);\n\t\t\telse\n\t\t\t\treturn sendRMASubmitRequestXML(Content.SellerID, version, body);\n\n\t\tdefault:\n\t\t\tthrow new RuntimeException(\"Never Happened!\");\n\t\t}\n\n\t}\n\n\tstatic RMASubmitCaller buildJSON() {\n\t\tVariables.MediaType = MEDIA_TYPE.JSON;\n\n\t\treturn new CallerFactory<RMASubmitCaller>().jsonBuild(RMASubmitCaller.class, Variables.LogLevel,\n\t\t\t\tVariables.Retryer, RMAClient.genClient());\n\t}\n\n\tstatic RMASubmitCaller buildXML() {\n\t\tVariables.MediaType = MEDIA_TYPE.XML;\n\n\t\treturn new CallerFactory<RMASubmitCaller>().xmlBuild(RMASubmitCaller.class, Variables.LogLevel,\n\t\t\t\tVariables.Retryer, RMAClient.genClient());\n\t}\n\n}" ]
[ "0.63546807", "0.5892632", "0.5882792", "0.5824134", "0.5802987", "0.57665217", "0.5755918", "0.57446015", "0.57306665", "0.5630638", "0.55391115", "0.55391115", "0.5523474", "0.5523474", "0.5520888", "0.5516604", "0.54960674", "0.54926735", "0.5474654", "0.54703224", "0.5432136", "0.5432087", "0.54286635", "0.5424019", "0.5412711", "0.5406471", "0.53968924", "0.5387564", "0.5365821", "0.53603244", "0.5359469", "0.53495646", "0.534242", "0.5329846", "0.53161985", "0.5315108", "0.5313137", "0.53021157", "0.528655", "0.5280627", "0.52532905", "0.5249003", "0.52455604", "0.5243685", "0.52414984", "0.5240804", "0.523978", "0.52373207", "0.5229208", "0.522688", "0.5216508", "0.5206521", "0.5200697", "0.519003", "0.5179602", "0.5164158", "0.5159146", "0.51557297", "0.51556146", "0.5154892", "0.5154589", "0.5152665", "0.5151991", "0.5150242", "0.5149504", "0.5148922", "0.5147663", "0.5144495", "0.5143292", "0.5140858", "0.5140247", "0.5138431", "0.5133904", "0.5133904", "0.5133904", "0.5133904", "0.5133904", "0.5133904", "0.5133904", "0.51255697", "0.5121788", "0.51158696", "0.51158696", "0.5112629", "0.5110587", "0.5110367", "0.51095724", "0.51079375", "0.51077735", "0.5105889", "0.5104114", "0.51040655", "0.5103114", "0.5101283", "0.5096175", "0.50882393", "0.5087615", "0.50837904", "0.5082962", "0.5076801", "0.5071432" ]
0.0
-1
Constructor voor de class table
public Tabel(Object[][] data, String[] header) { super(data, header); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "MultTable() //do not use the name of the constructor for the name of another method\n {}", "public TableObject()\r\n {\r\n\tsuper(ObjectType.Table);\r\n\tglobal = false;\r\n }", "public DatabaseTable() { }", "public SwitchColTable() {\r\r\r\r\n }", "public CursosTable() {\n \n \n }", "private TableAccessET() {\n\n }", "private ByaTableModel() {\n\t}", "public DebugTableModel() {\r\n }", "public TdRuspHijo() { }", "public Table() {\n this.tableName = \"\";\n this.rows = new HashSet<>();\n this.columnsDefinedOrder = new ArrayList<>();\n }", "public TableDeclaration() {\n }", "public TableDefinition(Class<T> model){\n this.singleton = this;\n this.model = model;\n try {\n OBJECT = Class.forName(model.getName());\n createTableDefinition();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public DetalleTablaComplementario() {\r\n }", "public HighScoreTable(){\r\n\r\n\t}", "public Tabono() {\n }", "public TableImpl() { columns = new Column[0]; }", "public table() {\n initComponents();\n }", "public CategoryTableTest() {\n super(CategoryTable.class);\n }", "public void initTable();", "public TableCreation(Table table) {\n this.table = table;\n }", "TableInstance createTableInstance();", "public Time_table() {\n initComponents();\n }", "public TableComboBox() {}", "void initTable();", "@SuppressWarnings(\"unused\")\n private AddTable() {\n }", "public TablesGenerator()\n {\n }", "public HtmlTableCell(){\n\n }", "public ClassSQLContract(SQLTagsGeneratorTable sqlTagsGeneratorTable){\n //---------------------------------------------------------------------------\n this.sqlTagsGeneratorTable=sqlTagsGeneratorTable;\n this.tableName=sqlTagsGeneratorTable.getTableName();\n createClassSQLContract();\n }", "public SegmentInformationTable()\n\t{\n\n\t}", "public Row(BaseTable table) {\n this.table = table;\n }", "public Mytable() {\n this(DSL.name(\"mytable\"), null);\n }", "public TabelaDoces() {\n initComponents();\n }", "public DayWiseClassTimeTable() {\n initComponents();\n jXTable1.setHorizontalScrollEnabled(true);\n jXTable1.setHighlighters(HighlighterFactory.createAlternateStriping());\n model = new TimeTableModel(3).createDefaultModel();\n jXTable1.setModel(model);\n \n loadClassAndSection();\n }", "protected abstract void initialiseTable();", "public ClassVariables(SQLTagsGeneratorTable sqlTagsGeneratorTable){\n //---------------------------------------------------------------------------\n this.sqlTagsGeneratorTable=sqlTagsGeneratorTable;\n this.tableName=sqlTagsGeneratorTable.getTableName();\n createClassVariables();\n }", "public HashTable()\n\t{\n\t\tthis(START_TABELLENGROESSE);\n\t}", "private EstabelecimentoTable() {\n\t\t\t}", "private GroupParticipationTable() {\n }", "public SymbolTableEntry(){\n\t}", "public AttlistTableModel () {\n super();\n }", "public LayoutClassTable(TableModel tableModel, String[] columnNames)\n {\n super(tableModel);\n\n this.columnNames = columnNames;\n }", "public TempTable() {\r\n\t\t\tsuper();\r\n\t\t\tthis.clauses = new ArrayList<TempTableHeaderCell>();\r\n\t\t}", "public MonthlyValuesTable(Database database) \n {\n //Constructor calls DbTable's constructor\n super(database);\n setTableName(\"monthlyvalues\");\n }", "public PeerTable() {\n super();\n }", "public GamRowsVORowImpl() {\n }", "public AgentTable() {\n this(\"agent\", null);\n }", "TableImpl(int id) {\n this.id = id;\n }", "public EstadosSql() {\r\n }", "protected AbstractTableNameConverter() {\r\n\t\tclassMappings = new HashMap<Class<? extends RawEntity<?>>, String>();\r\n\t\t\r\n\t\tpatterns = new LinkedList<String>();\r\n\t\tpatternMappings = new HashMap<String, String>();\r\n\t}", "public DisplayTable() {\n initComponents();\n }", "public MyHashTable( )\r\n\t{\r\n\t\tthis(DEFAULTTABLESIZE);\r\n\t\t\r\n\t\t\t\r\n\t}", "public BVHashtable()\n {\n super();\n }", "public TableForm() {\n initComponents();\n \n setMyTable();\n }", "public PromocionTableModel() {\n \n //Establecemos la sentencia SQL que vamos a ejecutar\n super(\"SELECT ID_PROMOCION , NOMBRE, DESCUENTO FROM PROMOCION\");\n \n }", "public OrderPickListTbl () {\n\t\tsuper();\n\t}", "private EventHistoryTable() {}", "public Classe() {\r\n }", "public ColumnStateTableColumnModel() {\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n TableColumn classId = new TableColumn(\"Class ID\");\n TableColumn classname = new TableColumn(\"Ten lop\");\n TableColumn numofPeople = new TableColumn(\"So nguoi\");\n TableColumn MaximumPeople = new TableColumn(\"So nguoi quy dinh\");\n TableColumn courseID = new TableColumn(\"Course ID\");\n TableColumn basic_grade = new TableColumn(\"Diem dau vao\");\n \n classId.setCellValueFactory(new PropertyValueFactory<Class,String>(\"classId\"));\n classname.setCellValueFactory(new PropertyValueFactory<>(\"className\"));\n numofPeople.setCellValueFactory(new PropertyValueFactory<>(\"numberOfPeople\"));\n MaximumPeople.setCellValueFactory(new PropertyValueFactory<>(\"maxNumberOfPeople\"));\n courseID.setCellValueFactory(new PropertyValueFactory<>(\"courseId\"));\n basic_grade.setCellValueFactory(new PropertyValueFactory<>(\"BasicGrade\"));\n \n maintable.getColumns().addAll(classId,classname,numofPeople,MaximumPeople,courseID,basic_grade);\n\n\n data = class_dal.GetData();\n maintable.setItems(data);\n }", "public BstTable() {\n\t\tbst = new Empty<Key, Value>();\n\t}", "public EditingTable() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public TdOficioAfectacionPK() {\n }", "Constructor() {\r\n\t\t \r\n\t }", "public Table() {\n // <editor-fold desc=\"Initialize Cells\" defaultstate=\"collapsed\">\n for (int row = 0; row < 3; row++) {\n for (int column = 0; column < 3; column++) {\n if (cells[row][column] == null) {\n cells[row][column] = new Cell(row, column);\n }\n }\n }\n // </editor-fold>\n }", "StreamTable()\n {\n }", "public AllFieldsTableHandler(){}", "public TableViewFactory() {\n }", "private AlarmDeviceTable() {}", "public Table() {\n startingCash = 10000;\n renderWinState = false;\n players = new Player[4];\n river = new River();\n deck = new Deck();\n dealer = new Dealer();\n initRiver();\n initPlayers();\n }", "public TdNmResumenPK() {\n }", "public ARCTable() {\n initComponents();\n table = new MyJTable();\n tableScrollPane.setViewportView(table);\n }", "public DefaultFeatureTable() {\n }", "public Trabajador() {\n\t\tsuper();\n\t}", "private Row() {\n }", "public AbstractSQLTableModel()\n\t{\n\t\ttry\n\t\t{\n\t\t\tthis.prefix = TableHelper.getPrefixForTable(this.getDBTableName());\n\t\t} catch( SQLException e ) {\n\t\t\tApplicationLogger.logError(\"cannot aquire prefix for \" + this.getDBTableName() );\n\t\t\tApplicationLogger.logError(e);\n\t\t}\n\t\tsetupDBColumns();\n\t}", "public DebugTableModel(DebugTable debugTable) {\r\n _debugTable = debugTable ;\r\n }", "public BasicTable(String name) {\n setId(name);\n }", "public ATExpression base_tableExpression();", "public TableImpl(Column[] c) { columns = c; }", "public ColumnRow ()\r\n {\r\n super();\r\n }", "public TableEx() {\r\n setStyleName(\"gwtEx-Table\");\r\n rf = getRowFormatter();\r\n this.addClickHandler(tableClickTable);\r\n }", "private bildeBaseColumns() {\n\n }", "public DataTable(JTable t) {\r\n initComponents();\r\n setupComponents(t);\r\n }", "public addConstructor() {\n\n\n \n initComponents();\n\n DefaultTableModel dt = (DefaultTableModel) tble.getModel();\n dt.setRowCount(0);\n\n try{\n Statement state = DB.getCon().createStatement();\n ResultSet rset = state.executeQuery(\"SELECT * FROM contractor \");\n\n while(rset.next()){\n Vector v = new Vector();\n v.add(rset.getString(\"ContractorID\"));\n v.add(rset.getString(\"CompanyName\"));\n v.add(rset.getString(\"CompanyAddress\"));\n\n dt.addRow(v);\n }\n } catch(Exception e) {\n System.out.println(e);\n }\n\n\n }", "public TableSorter() {\n indexes = new int[0];\n }", "public DataMahasiswa() {\n initComponents();\n load_table();\n }", "public ColumnInfo() {\n\n\t}", "public ClassModelDao() {\n super(ClassModel.CLASS_MODEL, com.platform.chorus.db.tables.pojos.ClassModel.class);\n }", "public SymTab(){\n \tclasses = new HashMap<String, ClassNode>();\n \tmethods = new HashMap<String, MethodNode>();\n }", "public MyHashTable( )\n {\n this( DEFAULT_TABLE_SIZE );\n }", "public AllTablesListTag() { }", "public WishlistItemTbl () {\n\t\tsuper();\n\t}", "public Cell(){}", "public DataTable() {\n\n\t\t// In this application, we use HashMap data structure defined in\n\t\t// java.util.HashMap\n\t\tdc = new HashMap<String, DataColumn>();\n\t}", "@Test\n public void testConstructor(){\n new RowGen(ROW_INDEX, spaces);\n }", "public Table(int size) {\n\t\tsuper(size);\n\t}", "public Practice_JTable() {\n initComponents();\n }", "public Tabuada() {\n initComponents();\n }", "public RepoSQL() { // constructor implicit\r\n\t\t super();\r\n\t }", "public GenericTableModel(String[] columns) {\r\n\t\tsuper();\r\n\t\t\r\n\t\tlogger.trace(\"Enter GenericTableModel\");\r\n\t\t\r\n\t\tthis.columns = columns;\r\n\t\t\r\n\t\tlogger.trace(\"Exit GenericTableModel\");\r\n\t}", "public TrackerTableChangeLog() {\r\n\t\t// Default constructor\r\n\t}" ]
[ "0.7645842", "0.73702276", "0.7334134", "0.7208463", "0.71410793", "0.7105291", "0.7102943", "0.70980597", "0.70932144", "0.70684105", "0.69868577", "0.6969184", "0.68924177", "0.6866195", "0.68568885", "0.68094236", "0.68062335", "0.67980444", "0.6796995", "0.6761718", "0.6758595", "0.672932", "0.6720278", "0.67022747", "0.6698733", "0.6660216", "0.6650568", "0.6644623", "0.6635361", "0.663248", "0.66113263", "0.65941674", "0.659098", "0.6585403", "0.6583146", "0.658217", "0.657806", "0.65726477", "0.6570759", "0.65650207", "0.65630084", "0.65468323", "0.6545258", "0.654205", "0.65400404", "0.65341294", "0.65267414", "0.649282", "0.64853686", "0.64837503", "0.64822197", "0.64768016", "0.6466587", "0.6459712", "0.64492506", "0.6441916", "0.6438667", "0.6427217", "0.64233965", "0.6409108", "0.6403081", "0.63893586", "0.6372081", "0.63554054", "0.6349634", "0.63437504", "0.6337206", "0.6327035", "0.6315425", "0.6308584", "0.6303028", "0.62988895", "0.62973714", "0.62952054", "0.62931854", "0.6292356", "0.6285348", "0.62804675", "0.6273516", "0.62671626", "0.6260914", "0.6257147", "0.62477803", "0.62378716", "0.6229225", "0.6223424", "0.62190485", "0.62131983", "0.6208222", "0.62031823", "0.6202407", "0.61971027", "0.61873186", "0.61832803", "0.6181519", "0.6180586", "0.61792403", "0.61788493", "0.6178501", "0.61766374", "0.61718136" ]
0.0
-1
De constructor voor de class Tabel
public Tabel(SearchModel model) { super(model.getData(), model.getHeader()); dataModel = model; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TTau() {}", "public DetalleTablaComplementario() {\r\n }", "public Tabono() {\n }", "public Tabuada() {\n initComponents();\n }", "public TelaContaUnica() {\n initComponents();\n }", "public Tra() {\n super();\n initComponents();\n loadData();\n }", "public TabelaDoces() {\n initComponents();\n }", "public AntrianPasien() {\r\n\r\n }", "public Tela() {\n initComponents();\n }", "public TelaInicial() {\n initComponents();\n }", "public TelaInicial() {\n initComponents();\n }", "public TelaPesquisa() {\n initComponents();\n }", "public TdRuspHijo() { }", "public misTutores() {\n initComponents();\n }", "Kerucut(){\r\n Tabung tab = new Tabung();\r\n tinggi=tab.getTinggi();\r\n }", "public VistaTrabaja() {\n initComponents();\n }", "public Tarifa() {\n initComponents();\n }", "public TelaSobre() {\n initComponents();\n }", "public TelaCidadaoDescarte() {\n initComponents();\n }", "public Pasien() {\r\n }", "public Trabajador() {\n\t\tsuper();\n\t}", "public Tarea() {\n\t}", "public TmKabupaten() {\n\t}", "public Datenauswahl() {\n initComponents();\n }", "public TebakNusantara()\n {\n }", "public Tabel(Object[][] data, String[] header) {\n\t\tsuper(data, header);\n\t}", "public Troco() {\n }", "public Kullanici() {}", "public TCubico(){}", "public BitacoraHotelera() {\n initComponents();\n tabla();\n this.setTitle(\"BITACORA DEL ÁREA DE HOTELERIA\");\n }", "public Saida() {\n initComponents();\n defaults();\n preencherTabela();\n \n }", "Constructor() {\r\n\t\t \r\n\t }", "public DataMahasiswa() {\n initComponents();\n load_table();\n }", "public Time_table() {\n initComponents();\n }", "public Tela1() {\n initComponents();\n }", "public table() {\n initComponents();\n }", "public Aktie() {\n }", "public TabellaModel() {\r\n lista = new Lista();\r\n elenco = new Vector<Persona>();\r\n elenco =lista.getElenco();\r\n values = new String[elenco.size()][3];\r\n Iterator<Persona> iterator = elenco.iterator();\r\n while (iterator.hasNext()) {\r\n\t\t\tfor (int i = 0; i < elenco.size(); i++) {\r\n\t\t\t\tpersona = new Persona();\r\n\t\t\t\tpersona = (Persona) iterator.next();\r\n\t\t\t\tvalues[i][0] = persona.getNome();\r\n\t\t\t\tvalues[i][1] = persona.getCognome();\r\n\t\t\t\tvalues[i][2] = persona.getTelefono();\t\r\n\t\t\t}\r\n\t\t}\r\n setDataVector(values, columnNames);\t\r\n }", "public TelaValores() {\n initComponents();\n }", "public TelaEscolhaAssento() {\n initComponents();\n }", "public TipoPrestamo() {\n\t\tsuper();\n\t}", "public Trening() {\n }", "public DadosVertice() {\n initComponents();\n }", "public Tarifa() {\n ;\n }", "public MorteSubita() {\n }", "public KamarFrom() {\n \n initComponents();\n tabel();\n \n }", "public ttussntpt() {\n initComponents();\n }", "public TelaSorteio() {\n initComponents();\n }", "public Stabel(){\n elementer = 0;\n hode = new Node(null);\n hale = hode;\n hode.neste = hale;\n hale.forrige = hode;\n }", "public Tigre() {\r\n }", "public TelaAgendamento() {\n initComponents();\n }", "public Boleta(){\r\n\t\tsuper();\r\n\t}", "public TelaCadastroPlano() {\n initComponents();\n campoNome.setDocument(new CaixaAlta());\n setLocationRelativeTo(null);\n preencheTabela();\n campoCodigo.setText(Integer.toString(fachada.proximoCodigo()));\n setModalidades();\n }", "public Nivel1Palabras() {\n initComponents();\n }", "public CampoModelo(String valor, String etiqueta, Integer longitud)\n/* 10: */ {\n/* 11:17 */ this.valor = valor;\n/* 12:18 */ this.etiqueta = etiqueta;\n/* 13:19 */ this.longitud = longitud;\n/* 14: */ }", "public BilanComptable() {\n initComponents();\n \n \n \n }", "public Celula() {\n this(null);\n }", "public telaCadastro() {\n initComponents();\n populaTabela();\n }", "public Historique()\n\t{\n\t\t\n\t}", "public TablaInmueble() {\n initComponents();\n this.setLocationRelativeTo(null);\n inmd = new InmuebleData();\n this.cargarTabla();\n \n }", "public Caixa() {\n initComponents();\n }", "public Lentejas() {\n initComponents();\n }", "public Lista() {\r\n }", "public Vista() {\n initComponents();\n modelo = new DefaultTableModel();\n listamascota = new ArrayList<>();\n\n }", "public DisplayTable() {\n initComponents();\n }", "private ControleurAcceuil(){ }", "public Kelola_Data_Dokter() {\n initComponents();\n }", "public Travellers() {\n initComponents();\n table1 = (DefaultTableModel) jTable1.getModel();\n }", "public Altas() {\n initComponents();\n }", "public TelaCadastro1() {\n \n initComponents();\n }", "public TrolleyDetail() {\n\t\tsuper();\n\t}", "public Tabla(int tip) {\n\t\tthis.sirinaTable = 20;\n\t\tthis.visinaTable = 20;\n\t\tthis.tip = tip;\n\t\tthis.tabla = new char[20][20];\n\t\tfor (int i = 0; i < this.visinaTable;i++) {\n\t\t\tfor (int j = 0; j < this.sirinaTable;j++) {\n\t\t\t\ttabla[i][j] = '.';\n\t\t\t}\n\t\t}\n\t\trezultat = 0;\n\t\tzmija = new ArrayList<Cvor>();\n\t\t\n\t\tif (tip == 2) {\n\t\t\tthis.dodajZidove();\n\t\t}\n\t\telse if(tip == 3) {\n\t\t\tthis.dodajPrepreke1();\n\t\t}\n\t\telse if(tip == 4) {\n\t\t\tthis.dodajPrepreke2();\n\t\t}\n\t\tthis.dodajZmijuPocetak();\n\t\tthis.dodajHranu();\n\t\tthis.smjer = 'd';\n\t}", "public Informacion() {\n initComponents();\n }", "public Alojamiento() {\r\n\t}", "public Lienzo() {\n initComponents();\n }", "public TELA_DE_CARREGAMENTO() {\n initComponents();\n }", "public Transaksi() {\n initComponents();\n }", "public Transportista() {\n }", "public Venda() {\n }", "public TelaCadasroProjeto() {\n initComponents();\n }", "public Vehiculo() {\r\n }", "public Empfänger() {\t\t\t\t\t// std. Konstruktor\r\n\t\t}", "public AttlistTableModel () {\n super();\n }", "public AjoutChauffeurJPanell() {\n initComponents();\n }", "public Chauffeur() {\r\n\t}", "public TelaConversao() {\n initComponents();\n }", "public Tura() {\n\t\tLicznikTur = 0;\n\t}", "public Rol() {}", "public Tbdcongvan36() {\n super();\n }", "MultTable() //do not use the name of the constructor for the name of another method\n {}", "public RekapKamar() {\n Koneksi DB = new Koneksi();\n DB.koneksi();\n con = DB.conn;\n stat = DB.stmn;\n initComponents();\n loadTabel();\n }", "public Achterbahn() {\n }", "public Stokarabull() {\n initComponents();\n }", "public Valvula(){}", "public Aritmetica(){ }", "public CentrosTrabajo() {\n initComponents();\n }", "public TableComboBox() {}", "public ABMTiposDesvios() {\n super(new TiposDesviosT());\n initComponents();\n btnBorrar.setEnabled(false);\n HashMap parametros = new HashMap();\n List<TiposDesviosT> nuevo = DesktopApp.getApplication().getTiposDesviosT(parametros);\n setListDto((ArrayList<TiposDesviosT>) nuevo);\n\n tableModel = new TiposDesviosTableModel(columnNames, this.getListDto());\n tableModel.addTableModelListener(new CustomTableModelListener());\n tiposDesviosTable.setModel(tableModel);\n\n sorter = new TableRowSorter<TableModel>(tableModel) {\n\n @Override\n public void toggleSortOrder(int column) {\n RowFilter<? super TableModel, ? super Integer> f = getRowFilter();\n setRowFilter(null);\n super.toggleSortOrder(column);\n setRowFilter(f);\n }\n };\n tiposDesviosTable.setRowSorter(sorter);\n\n setModificado(false);\n setNuevo(false);\n txtMotivo.setEnabled(false);\n\n if (getPadre() == null) {\n btnSeleccionar.setEnabled(false);\n }\n\n parametros = new HashMap();\n\n tiposDesviosTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n }", "public prueba()\r\n {\r\n }", "public ContaBancaria() {\n }" ]
[ "0.72951734", "0.72368085", "0.71713656", "0.7135787", "0.7133217", "0.7115089", "0.70941705", "0.7026592", "0.7015128", "0.6992988", "0.6992988", "0.6991808", "0.6991554", "0.69902414", "0.6980354", "0.69663495", "0.69608414", "0.6947428", "0.69432616", "0.6929799", "0.69006205", "0.68905133", "0.68880594", "0.6883825", "0.6859704", "0.6856806", "0.6833274", "0.6827521", "0.68121195", "0.6810587", "0.68041253", "0.6799308", "0.6755638", "0.67401516", "0.67338425", "0.6720528", "0.67140317", "0.67105925", "0.6709813", "0.6690335", "0.66892153", "0.6687223", "0.6671621", "0.66454417", "0.663116", "0.6630482", "0.661285", "0.66117215", "0.66113645", "0.66090673", "0.6596948", "0.6576921", "0.6572149", "0.65684026", "0.6564304", "0.6563796", "0.6562087", "0.6553809", "0.65521616", "0.65454143", "0.65449494", "0.6543268", "0.6542572", "0.65403533", "0.6531091", "0.6526189", "0.65241855", "0.65233326", "0.65193945", "0.65119255", "0.65104306", "0.65080345", "0.65078187", "0.6501565", "0.64948815", "0.6480546", "0.64774776", "0.64727503", "0.6471034", "0.6470333", "0.64682347", "0.6463917", "0.6460881", "0.64571387", "0.6448528", "0.644361", "0.6443333", "0.6435259", "0.64337945", "0.6428959", "0.64283437", "0.64274764", "0.6425993", "0.6425278", "0.64187175", "0.64175665", "0.6415882", "0.6411675", "0.64109397", "0.64038175" ]
0.703254
7
Met deze methode wordt de data in de tabel aangepast door het TableModel te wijzigen.
public void changeData() { DefaultTableModel dtm = new DefaultTableModel(dataModel.getData(), dataModel.getHeader()); setModel(dtm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void srediTabelu() {\n ModelTabeleStavka mts = new ModelTabeleStavka();\n mts.setLista(n.getLista());\n tblStavka.setModel(mts);\n }", "private void srediTabelu() {\n\n mtu = (ModelTabeleUlica) jtblUlica.getModel();\n ArrayList<Ulica> ulice = kontrolor.Kontroler.getInstanca().vratiUlice();\n mtu.setLista(ulice);\n\n }", "private void loadTable() {\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n try {\n String sql = \"select * from tb_mahasiswa\";\n Statement n = a.createStatement();\n ResultSet rs = n.executeQuery(sql);\n while (rs.next()) {\n Object[] o = new Object[6];\n o[0] = rs.getString(\"id_mahasiswa\");\n o[1] = rs.getString(\"nama\");\n o[2] = rs.getString(\"tempat\");\n o[3] = rs.getString(\"waktu\");\n o[4] = rs.getString(\"status\");\n model.addRow(o);\n }\n } catch (Exception e) {\n }\n }", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "public void getData( ){\n model2.getDataVector( ).removeAllElements( );\n model2.fireTableDataChanged( );\n\n try{\n //membuat statemen pemanggilan data pada table tblGaji dari database\n Statement s = koneksi.createStatement();\n String sql = \"Select * from tb_customer\";\n ResultSet r = s.executeQuery(sql);\n\n //penelusuran baris pada tabel tblGaji dari database\n while(r.next ()){\n Object[ ] o = new Object[4];\n o[0] = r.getString(\"id\");\n o[1] = r.getString(\"nama\");\n o[2] = r.getString(\"alamat\");\n o[3] = r.getString(\"telepon\");\n\n model2.addRow(o);\n }\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage() );\n }\n }", "public TestFrame() {\n\n final String[] columnNames = {\"Nombre\",\n \"Apellido\",\n \"webeo\",\n \"Años de Practica\",\n \"Soltero(a)\"};\n final Object[][] data = {\n\n {\"Lhucas\", \"Huml\",\n \"Patinar\", new Integer(3), new Boolean(true)},\n {\"Kathya\", \"Walrath\",\n \"Escalar\", new Integer(2), new Boolean(false)},\n {\"Marcus\", \"Andrews\",\n \"Correr\", new Integer(7), new Boolean(true)},\n {\"Angela\", \"Lalth\",\n \"Nadar\", new Integer(4), new Boolean(false)}\n };\n\n Vector dataV1 = new Vector();\n dataV1.add(\"XXXX\");\n dataV1.add(\"YYYY\");\n dataV1.add(\"JJJJ\");\n\n Vector dataV2 = new Vector();\n dataV2.add(\"XX2XX\");\n dataV2.add(\"Y2YYY\");\n dataV2.add(\"J2JJJ\");\n\n List dataF = new ArrayList();\n dataF.add(dataV1);\n dataF.add(dataV2);\n\n /*Vector dataC = new Vector();\n dataC.add(\"1\");\n dataC.add(\"2\");\n dataC.add(\"J23JJJ\");\n\n //model = new ModeloDatosTabla(data, true);\n model = new TableModel_1_1(dataC, dataF);\n model2 = new TableModel(columnNames, data, false);\n*/\n\n\n\n initComponents();\n\n\n }", "private void fillTable(){\n tblModel.setRowCount(0);// xoa cac hang trong bang\n \n for(Student st: list){\n tblModel.addRow(new String[]{st.getStudentId(), st.getName(), st.getMajor(),\"\"\n + st.getMark(), st.getCapacity(), \"\" + st.isBonnus()});\n // them (\"\" + )de chuyen doi kieu float va boolean sang string\n \n }\n tblModel.fireTableDataChanged();\n }", "public void refreshData() {\r\n\t\tfireTableDataChanged();\r\n\t\tgetTable().tableChanged(new TableModelEvent(this));\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic void funkcie() {\n\t\tTableColumn<Znamka, String> datumColumn = new TableColumn<>(\"Datum pisomky\");\n\t\tdatumColumn.setMinWidth(velkostPolickaX - 1);\n\t\tdatumColumn.setCellValueFactory(new PropertyValueFactory<>(\"datumS\"));\n\n\t\tTableColumn<Znamka, Double> hodnotaColumn = new TableColumn<Znamka, Double>(\"Hodnota\");\n\t\thodnotaColumn.setMinWidth(velkostPolickaX - 1);\n\t\thodnotaColumn.setCellValueFactory(new PropertyValueFactory<>(\"hodnotaS\"));\n\n\t\tTableColumn<Znamka, Double> maxHodnotaColumn = new TableColumn<Znamka, Double>(\"Max. Hodnota\");\n\t\tmaxHodnotaColumn.setMinWidth(velkostPolickaX - 1);\n\t\tmaxHodnotaColumn.setCellValueFactory(new PropertyValueFactory<>(\"maxHodnotaS\"));\n\n\t\ttabulkaZiak.getColumns().addAll(hodnotaColumn, maxHodnotaColumn, datumColumn);\n\n\t\tvyberPredmetov.setItems(((Ziak) aktualnyPouzivatel).vratMenoPredmetov());\n\t\tvyberPredmetov.getSelectionModel().selectedIndexProperty()\n\t\t\t\t.addListener((ChangeListener<Number>) (ov, value, new_value) -> {\n\t\t\t\t\ttabulkaZiak.setItems(((Ziak) aktualnyPouzivatel).vratZnamkyPredmetu((int) new_value));\n\t\t\t\t});\n\t\tvyberPredmetov.getSelectionModel().selectFirst();\n\t}", "public void getData( ){\n model.getDataVector( ).removeAllElements( );\n model.fireTableDataChanged( );\n\n try{\n //membuat statemen pemanggilan data pada table tblGaji dari database\n Statement stat = (Statement)koneksi_db.config( ).createStatement( );\n String sql = \"Select * from daftar_log\";\n ResultSet res = stat.executeQuery(sql);\n\n //penelusuran baris pada tabel tblGaji dari database\n while(res.next ()){\n Object[ ] obj = new Object[6];\n obj[0] = res.getString(\"id_log\"); \n obj[1] = res.getString(\"nama_kejadian\");\n model.addRow(obj);\n }\n }\n catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage() );\n }\n }", "private void updateTabela() {\n\n if (txBuscar.getText().isEmpty()) {\n ListaEmprestimosBEANs = new ControlerEmprestimos().listaEmprestimoss();\n } else {\n try {\n Integer buscar = Integer.parseInt(txBuscar.getText());\n ListaEmprestimosBEANs = new ArrayList<>();\n ListaEmprestimosBEANs.add(new ControlerEmprestimos().findEmprestimos(buscar));\n } catch (Exception e) {\n\n }\n }\n DefaultTableModel model = new DefaultTableModel(null, new String[]{\"ID\", \"Data de Saida\", \"Data Estimada do Retorno\", \"Data do Retorno\"});\n try {\n jTable1.setModel(model);\n String[] dados = new String[9];\n for (EmprestimosBEAN a : ListaEmprestimosBEANs) {\n dados[0] = String.valueOf(a.getId_emprestimo());\n dados[1] = a.getDtSaida().toString();\n dados[2] = a.getDtVolta().toString();\n dados[3] = a.getDtRetorno() == null ? \"\" : a.getDtRetorno().toString();\n model.addRow(dados);\n }\n } catch (Exception ex) {\n\n }\n\n }", "public void doUpdateTable() {\r\n\t\tlogger.info(\"Actualizando tabla books\");\r\n\t\tlazyModel = new LazyBookDataModel();\r\n\t}", "public void updateTable() {\n tabelModel.setRowCount(0);\n Link current = result.first;\n for (int i = 0; current != null; i++) {\n Object[] row = {current.getMasjid(), current.getAlamat()};\n tabelModel.addRow(row);\n current = current.next;\n }\n }", "public TabellaModel() {\r\n lista = new Lista();\r\n elenco = new Vector<Persona>();\r\n elenco =lista.getElenco();\r\n values = new String[elenco.size()][3];\r\n Iterator<Persona> iterator = elenco.iterator();\r\n while (iterator.hasNext()) {\r\n\t\t\tfor (int i = 0; i < elenco.size(); i++) {\r\n\t\t\t\tpersona = new Persona();\r\n\t\t\t\tpersona = (Persona) iterator.next();\r\n\t\t\t\tvalues[i][0] = persona.getNome();\r\n\t\t\t\tvalues[i][1] = persona.getCognome();\r\n\t\t\t\tvalues[i][2] = persona.getTelefono();\t\r\n\t\t\t}\r\n\t\t}\r\n setDataVector(values, columnNames);\t\r\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 LlenarPagos(){\n datos=new DefaultTableModel();\n LlenarModelo();\n this.TablaPagos.setModel(datos);\n }", "public void update() {\n tableChanged(new TableModelEvent(this));\n }", "private void setDataModel() {\r\n tableData = new Object[resultSet.size()][classFields.length];\r\n // for every object from collection of objects\r\n for (int i = 0; i < resultSet.size(); i++) {\r\n // for every fields from class of object\r\n for (int j = 0; j < classFields.length; j++) {\r\n // for every method from class of object\r\n for (int x = 0; x < classMethods.length; x++) {\r\n // if class name start with 'get' and class method name\r\n // lenght is equal to field name + 3 (becouse of get word)\r\n if ((classMethods[x].getName().startsWith(\"get\"))\r\n && (classMethods[x].getName().length() == (classFields[j].getName().length() + 3))) {\r\n // if class name to lowercase ends with field name to\r\n // lower case\r\n if (classMethods[x].getName().toLowerCase().endsWith(classFields[j].getName().toLowerCase())) {\r\n // then try to invoke that getter\r\n try {\r\n tableData[i][j] = classMethods[x].invoke(resultSet.get(i));\r\n } catch (IllegalAccessException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n } catch (IllegalArgumentException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n } catch (InvocationTargetException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n }\r\n // This is alternative method for obtaining getter for field but\r\n // it will need public fields\r\n // try {\r\n // fieldValue = pola[j].get(resultSet.get(i));\r\n // data[i][j]=fieldValue;\r\n // } catch (IllegalArgumentException e) {\r\n // // TODO Auto-generated catch block\r\n // e.printStackTrace();\r\n // } catch (IllegalAccessException e) {\r\n // // TODO Auto-generated catch block\r\n // e.printStackTrace();\r\n // }\r\n }\r\n }\r\n }", "public void llenadoDeTablas() {\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Articulo\");\n modelo.addColumn(\"Fecha Ingreso\");\n modelo.addColumn(\"Nombre Articulo\");\n modelo.addColumn(\"Talla XS\");\n modelo.addColumn(\"Talla S\");\n modelo.addColumn(\"Talla M\");\n modelo.addColumn(\"Talla L\");\n modelo.addColumn(\"Talla XL\");\n modelo.addColumn(\"Color Articulo\");\n modelo.addColumn(\"Nombre Proveedor\");\n modelo.addColumn(\"Existencias\");\n\n RegistroArticuloDAO registroarcticuloDAO = new RegistroArticuloDAO();\n\n List<RegistroArticulo> registroarticulos = registroarcticuloDAO.select();\n TablaArticulo.setModel(modelo);\n String[] dato = new String[11];\n for (int i = 0; i < registroarticulos.size(); i++) {\n dato[0] = Integer.toString(registroarticulos.get(i).getPK_id_articulo());\n dato[1] = registroarticulos.get(i).getFecha_ingreso();\n dato[2] = registroarticulos.get(i).getNombre_articulo();\n dato[3] = registroarticulos.get(i).getTalla_articuloXS();\n dato[4] = registroarticulos.get(i).getTalla_articuloS();\n dato[5] = registroarticulos.get(i).getTalla_articuloM();\n dato[6] = registroarticulos.get(i).getTalla_articuloL();\n dato[7] = registroarticulos.get(i).getTalla_articuloXL();\n dato[8] = registroarticulos.get(i).getColor_articulo();\n dato[9] = registroarticulos.get(i).getNombre_proveedor();\n dato[10] = registroarticulos.get(i).getExistencia_articulo();\n\n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }\n }", "private void updateTable() {\n updateTableData();\n TableModelEvent e = new TableModelEvent(articleTableModel);\n\n articleTable.tableChanged(e);\n }", "public void updateTable() {\n\t\ttable.getSelectionModel().removeListSelectionListener(lsl);\n\t\tdtm = new DefaultTableModel();\n\t\td = new Diet();\n\t\tdtm.addColumn(\"Id\");\n\t\tdtm.addColumn(\"Meal Id\");\n\t\tdtm.addColumn(\"Meal Type\");\n\t\tdtm.addColumn(\"Food Name\");\n\t\tdtm.addColumn(\"Food Type\");\n\t\tdtm.addColumn(\"Food Category\");\n\t\tdtm.addColumn(\"Ready Time\");\n\t\tdtm.addColumn(\"Calories (g)\");\t\t\n\t\tdtm.addColumn(\"Protein (g)\");\n\t\tdtm.addColumn(\"Fat (g)\");\n\t\tdtm.addColumn(\"Carbohydrates\");\n\t\tdtm.addColumn(\"VitaminA\");\n\t\tdtm.addColumn(\"VitaminC\");\n\t\tdtm.addColumn(\"Calcium\");\n\t\tdtm.addColumn(\"Iron\");\n\t\tdtm.addColumn(\"Author\");\n\t\tArrayList<Diet> dietList = dI.getDietList();\n\t\tif(isOrder && orderby!=\"\")\n\t\t{\t\t\t\n\t\t\tSystem.out.println(\"entering ----------------\"+orderby);\n\t\t\tdietList=dI.getDietOrderedList(type,orderby);\n\t\t\tfor (Diet d : dietList) {\t\n\t\t\t\tSystem.out.println(d.getId()+\" ------ \"+d.getCalories());\n\t\t\t}\n\t\t}\n\t\tif(isFiltered)\n\t\t{\n\t\t\tif(mealtypeSel!=\"\")\n\t\t\tdietList=dI.getFilteredMealTypeList(mealtypeSel);\n\t\t\tif(foodtypeSel!=\"\")\n\t\t\t\tdietList=dI.getFilteredFoodTypeList(foodtypeSel);\n\t\t\tif(authorSel!=\"\")\n\t\t\t\tdietList=dI.getFilteredauthorList(authorSel);\n\t\t\tif(foodCategorySel!=\"\")\n\t\t\t\tdietList=dI.getFilterFoodCategoryList(foodCategorySel);\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (Diet d : dietList) {\t\n\t\t\tdtm.addRow(d.getVector());\n\t\t}\n\t\ttable.setModel(dtm);\n\n\t\ttable.getSelectionModel().addListSelectionListener(lsl);\n\n\t}", "private void riempimentoTableQuote() {\n\t\tString[] nameColumns = { \"Id\", \"Data inizio\", \"Valore\", \"Tipologia\" };\n\t\tquote = new ArrayList<Quota>(model.getQuote());\n\n\t\t/* Istanza del TableModel con l'override di isCellEditable per rendere\n\t\tla tabella non modificabile */\n\t\t@SuppressWarnings(\"serial\")\n\t\tDefaultTableModel dati = new DefaultTableModel(nameColumns, 0) {\n\t\t\t@Override\n\t\t\tpublic boolean isCellEditable(int row, int column) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\t\tfor (int j = 0; j < quote.size(); j++) {\n\t\t\tdati.addRow(new Vector<>());\n\t\t\tdati.setValueAt(quote.get(j).getId(), j, 0);\n\t\t\tdati.setValueAt(quote.get(j).getDataI(), j, 1);\n\t\t\tdati.setValueAt(quote.get(j).getValore(), j, 2);\n\t\t\tdati.setValueAt(quote.get(j).getTipologia(), j, 3);\n\t\t}\n\t\tviewGestione.getTable().setModel(dati);\n\t}", "private void Table()\n{\n Object [] Kolom = {\"Nama\", \"No. Telp\", \"Kota Asal\"};\n Table = new DefaultTableModel(null, Kolom);\n Tabel.setModel(Table);\n}", "@Override\n\tpublic void tableChanged(TableModelEvent arg0) {\n\t\t\n\t}", "public void PreencherTabela2() throws SQLException {\n\n String[] colunas = new String[]{\"ID do Pedido\", \"Numero Grafica\", \"Data Emissao\",\"Boleto\"};\n ArrayList dados = new ArrayList();\n Connection connection = ConnectionFactory.getConnection();\n PedidoDAO pedidoDAO = new PedidoDAO(connection);\n ModeloPedido modeloPedido = new ModeloPedido();\n modeloPedido = pedidoDAO.buscaPorId(idPedidoClasse);\n SimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n\n dados.add(new Object[]{modeloPedido.getId(), modeloPedido.getNumeroGrafica(), format.format(modeloPedido.getDataEmissao()), modeloPedido.isBoleto()});\n\n ModeloTabela modelo = new ModeloTabela(dados, colunas);\n\n jTablePedido.setModel(modelo);\n jTablePedido.setRowSorter(new TableRowSorter(modelo));\n jTablePedido.getColumnModel().getColumn(0).setPreferredWidth(2);\n jTablePedido.getColumnModel().getColumn(0).setResizable(false);\n jTablePedido.getColumnModel().getColumn(1).setPreferredWidth(20);\n jTablePedido.getColumnModel().getColumn(1).setResizable(false);\n\n jTablePedido.getTableHeader().setReorderingAllowed(false);\n connection.close();\n }", "private void setTableModelData() {\r\n\t\t//Spin through the list and add the individual country fields.\r\n\t\tVector<String> fields;\r\n\t\tfor (Country c : countryList) {\r\n\t\t\tfields = new Vector<String>();\r\n\t\t\tfields.add(c.getName());\r\n\t\t\tfields.add(c.getCapital());\r\n\t\t\tfields.add(c.getFoundation().toString());\r\n\t\t\tfields.add(c.getContinent());\r\n\t\t\tfields.add(String.valueOf(c.getPopulation()));\r\n\t\t\tcountryData.add(fields);\r\n\t\t}\r\n\t}", "public void popularTabela() {\n\n try {\n\n RelatorioRN relatorioRN = new RelatorioRN();\n\n ArrayList<PedidoVO> pedidos = relatorioRN.buscarPedidos();\n\n javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) tRelatorio.getModel();\n dtm.fireTableDataChanged();\n dtm.setRowCount(0);\n\n for (PedidoVO pedidoVO : pedidos) {\n\n String[] linha = {\"\" + pedidoVO.getIdpedido(), \"\" + pedidoVO.getData(), \"\" + pedidoVO.getCliente(), \"\" + pedidoVO.getValor()};\n dtm.addRow(linha);\n }\n\n } catch (SQLException sqle) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + sqle.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n \n } catch (Exception e) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + e.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void preencherTabela(){\n imagemEnunciado.setImage(imageDefault);\n pergunta.setImagemEnunciado(caminho);\n imagemResposta.setImage(imageDefault);\n pergunta.setImagemResposta(caminho);\n ///////////////////////////////\n perguntas = dao.read();\n if(perguntas != null){\n perguntasFormatadas = FXCollections.observableList(perguntas);\n\n tablePerguntas.setItems(perguntasFormatadas);\n }\n \n }", "public void reloadTable() {\n\n this.removeAllData();// borramos toda la data \n for (int i = 0; i < (list.size()); i++) { // este for va de la primera casilla hast ael largo del arreglo \n Balanza object = list.get(i);\n this.AddtoTable(object);\n }\n\n }", "private void TampilData() {\n DefaultTableModel model = new DefaultTableModel();\n model.addColumn(\"NO\");\n model.addColumn(\"ID\");\n model.addColumn(\"NAME\");\n model.addColumn(\"USERNAME\");\n tabelakses.setModel(model);\n\n //menampilkan data database kedalam tabel\n try {\n int i=1;\n java.sql.Connection conn = new DBConnection().connect();\n java.sql.Statement stat = conn.createStatement();\n ResultSet data = stat.executeQuery(\"SELECT * FROM p_login order by Id asc\");\n while (data.next()) {\n model.addRow(new Object[]{\n (\"\" + i++),\n data.getString(\"Id\"),\n data.getString(\"Name\"),\n data.getString(\"Username\")\n });\n tabelakses.setModel(model);\n }\n } catch (Exception e) {\n System.err.println(\"ERROR:\" + e);\n }\n }", "private void popuniTabelu() {\n try {\n List<PutnikEntity> putnici=Controller.vratiSvePutnike();\n TableModel tm=new PutnikTableModel(putnici);\n jtblPutnici.setModel(tm);\n } catch (Exception ex) {\n Logger.getLogger(FIzaberiLet.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void updateTable()\r\n {\r\n ((JarModel) table.getModel()).fireTableDataChanged();\r\n }", "@Override\n\tpublic void tableChanged(TableModelEvent e) {\n\t\tSystem.out.println(e.toString());\n\t\t//tableDaysModel.addAufgabe(aufgabe);\n\t}", "private void loadData() {\n\n // connect the table column with the attributes of the patient from the Queries class\n id_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"pstiantID\"));\n name_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n date_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveDate\"));\n time_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveTime\"));\n\n try {\n\n // database related code \"MySql\"\n ps = con.prepareStatement(\"select * from visitInfo \");\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n\n // load data to the observable list\n editOL.add(new Queries(new SimpleStringProperty(rs.getString(\"id\")),\n new SimpleStringProperty(rs.getString(\"patiantID\")),\n new SimpleStringProperty(rs.getString(\"patiant_name\")),\n new SimpleStringProperty(rs.getString(\"visit_type\")),\n new SimpleStringProperty(rs.getString(\"payment_value\")),\n new SimpleStringProperty(rs.getString(\"reserve_date\")),\n new SimpleStringProperty(rs.getString(\"reserve_time\")),\n new SimpleStringProperty(rs.getString(\"attend_date\")),\n new SimpleStringProperty(rs.getString(\"attend_time\")),\n new SimpleStringProperty(rs.getString(\"payment_date\")),\n new SimpleStringProperty(rs.getString(\"attend\")),\n new SimpleStringProperty(rs.getString(\"attend_type\"))\n\n ));\n }\n\n // assigning the observable list to the table\n table_view_in_edit.setItems(editOL);\n\n ps.close();\n rs.close();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "@Override\r\n public void tableChanged(TableModelEvent e) {\n\r\n }", "private void Actualizar_Tabla() {\n String[] columNames = {\"iditem\", \"codigo\", \"descripcion\", \"p_vent\", \"p_comp\", \"cant\", \"fecha\"};\n dtPersona = db.Select_Item();\n // se colocan los datos en la tabla\n DefaultTableModel datos = new DefaultTableModel(dtPersona, columNames);\n jTable1.setModel(datos);\n }", "public void llenadoDeTablas() {\n \n DefaultTableModel modelo1 = new DefaultTableModel();\n modelo1 = new DefaultTableModel();\n modelo1.addColumn(\"ID Usuario\");\n modelo1.addColumn(\"NOMBRE\");\n UsuarioDAO asignaciondao = new UsuarioDAO();\n List<Usuario> asignaciones = asignaciondao.select();\n TablaPerfiles.setModel(modelo1);\n String[] dato = new String[2];\n for (int i = 0; i < asignaciones.size(); i++) {\n dato[0] = (Integer.toString(asignaciones.get(i).getId_usuario()));\n dato[1] = asignaciones.get(i).getNombre_usuario();\n\n modelo1.addRow(dato);\n }\n }", "public void llenadoDeTablas() {\n /**\n *\n * creaccion de la tabla de de titulos \n */\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Bitacora\");\n modelo.addColumn(\"Usuario\");\n modelo.addColumn(\"Fecha\");\n modelo.addColumn(\"Hora\");\n modelo.addColumn(\"Ip\");\n modelo.addColumn(\"host\");\n \n modelo.addColumn(\"Accion\");\n modelo.addColumn(\"Codigo Aplicacion\");\n modelo.addColumn(\"Modulo\");\n /**\n *\n * instaciamiento de las las clases Bitacora y BiracoraDAO\n * intaciamiento de la clases con el llenado de tablas\n */\n BitacoraDao BicDAO = new BitacoraDao();\n List<Bitacora> usuario = BicDAO.select();\n JtProductos1.setModel(modelo);\n String[] dato = new String[9];\n for (int i = 0; i < usuario.size(); i++) {\n dato[0] = usuario.get(i).getId_Bitacora();\n dato[1] = usuario.get(i).getId_Usuario();\n dato[2] = usuario.get(i).getFecha();\n dato[3] = usuario.get(i).getHora();\n dato[4] = usuario.get(i).getHost();\n dato[5] = usuario.get(i).getIp();\n dato[6] = usuario.get(i).getAccion();\n dato[7] = usuario.get(i).getCodigoAplicacion();\n dato[8] = usuario.get(i).getModulo();\n \n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }}", "private void load_table() {\n DefaultTableModel model = new DefaultTableModel();\n model.addColumn(\"ID\");\n model.addColumn(\"NIM\");\n model.addColumn(\"Nama\");\n model.addColumn(\"Kelamin\");\n model.addColumn(\"Phone\");\n model.addColumn(\"Agama\");\n model.addColumn(\"Status\");\n\n //menampilkan data database kedalam tabel\n try {\n String sql = \"SELECT * FROM mhs\";\n java.sql.Connection koneksi = (Connection) Koneksi.KoneksiDB();\n java.sql.Statement stm = koneksi.createStatement();\n java.sql.ResultSet res = stm.executeQuery(sql);\n\n while (res.next()) {\n model.addRow(new Object[]{res.getString(1), res.getString(2),\n res.getString(3), res.getString(4), res.getString(5),\n res.getString(6), res.getString(7)});\n }\n tabelMahasiswa.setModel(model);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }", "@Override\n public void tableChanged(TableModelEvent e) {\n fireTableChanged(e);\n }", "public void tabelaktivitas() {\n DefaultTableModel tbl= new DefaultTableModel();\n tbl.addColumn(\"Group\");\n tbl.addColumn(\"Compart\");\n tbl.addColumn(\"Activity\");\n tbl.addColumn(\"HA\");\n tbl.addColumn(\"Harga\");\n tbl.addColumn(\"Total\");\n tblaktivitas.setModel(tbl);\n try{\n java.sql.Statement statement=(java.sql.Statement)conek.GetConnection().createStatement();\n ResultSet res=statement.executeQuery(\"select * from tblaktivitas\");\n while(res.next())\n {\n tbl.addRow(new Object[]{\n res.getString(\"nama_grup\"),\n res.getString(\"compart\"),\n res.getString(\"pekerjaan\"),\n res.getInt(\"ha\"),\n res.getInt(\"harga\"),\n res.getInt(\"total\")\n });\n tblaktivitas.setModel(tbl); \n }\n }catch (Exception e){\n JOptionPane.showMessageDialog(rootPane,\"Salah\");\n }\n }", "Tablero consultarTablero();", "public void tableChanged(TableModelEvent e) {\n int row = e.getFirstRow();\n TableModel model = (TableModel)e.getSource();\n// Als er een wijziging is aangebracht de 'opslaan' knop activeren\n btnOpslaan.setEnabled(true);\n lblSysteemMelding.setText(\" \");\n// Juiste gegevens voor in de db bepalen aan de hand van de status van een gebruiker.\n int rolID;\n if (model.getValueAt(row,5).equals(\"Gedeactiveerd\")){\n rolID = 2;\n } else if (model.getValueAt(row,5).equals(\"Administrator\")) {\n rolID = 3;\n } else {\n rolID = 4;\n }\n// Wijziging klaarzetten voor opslag repo / db.\n beheerGebruikersController.buildUpdate(new Administrator(\n (String)model.getValueAt(row,3),\n (String)model.getValueAt(row,1),\n (String)model.getValueAt(row,2),\n rolID,\n (String)model.getValueAt(row,4),\n (String)model.getValueAt(row,0),\n 0));\n\n }", "public pasien() {\n initComponents();\n model = new DefaultTableModel();\n tabelpasien.setModel(model);\n model.addColumn(\"ID_PASIEN\");\n model.addColumn(\"NAMA_PASIEN\");\n model.addColumn(\"ALAMAT\");\n \n loadData();\n \n }", "private void preencherTabelaVeiculoCarga() {\n\n ArrayList dados = new ArrayList();\n cargaDao = new CargaDao();\n Carga carga;\n String[] colunas = new String[]{\"ID\", \"DESCRICAO\", \"STATUS\"};\n\n try {\n final List<Object> listaCarga = cargaDao.listarCargasDoVeiculo(idVeiculoSelecionado);\n\n if (listaCarga != null && listaCarga.size() > 0) {\n for (Object cargaAtual : listaCarga) {\n carga = (Carga) cargaAtual;\n dados.add(new Object[]{carga.getIdCarga(), carga.getDescricao(), carga.getStatus()});\n }\n }\n\n ModeloTabela modTabela = new ModeloTabela(dados, colunas);\n jTB_VeiculoCarga.setModel(modTabela);\n jTB_VeiculoCarga.getColumnModel().getColumn(0).setPreferredWidth(100);\n jTB_VeiculoCarga.getColumnModel().getColumn(0).setResizable(false);\n jTB_VeiculoCarga.getColumnModel().getColumn(1).setPreferredWidth(300);\n jTB_VeiculoCarga.getColumnModel().getColumn(1).setResizable(false);\n jTB_VeiculoCarga.getColumnModel().getColumn(2).setPreferredWidth(150);\n jTB_VeiculoCarga.getColumnModel().getColumn(2).setResizable(false);\n\n jTB_VeiculoCarga.getTableHeader().setReorderingAllowed(false);\n jTB_VeiculoCarga.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);\n jTB_VeiculoCarga.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\n jTB_VeiculoCarga.addMouseListener(new MouseAdapter() {\n\n @Override\n public void mouseClicked(MouseEvent e) {\n try {\n List<Object> lista = cargaDao.listarCargasDoVeiculo(idVeiculoSelecionado);\n cargaSelecionada = (Carga) lista.\n get(jTB_VeiculoCarga.convertRowIndexToModel(jTB_VeiculoCarga.getSelectedRow()));\n\n // if (veiculoDao.listarVeiculosAtivos().size() > 0 && veiculoDao.listarVeiculosAtivos() != null) {}\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(FormVeiculoCargas.this, \"Erro genérico1: \" + ex.getMessage());\n ex.printStackTrace(System.err);\n }\n }\n\n });\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Erro genérico2: \" + e.getMessage());\n }\n }", "public void updatedTable() {\r\n\t\tfireTableDataChanged();\r\n\t}", "public void dataSelect(){\n //deklarasi variabel\n int i = tblKembali.getSelectedRow();\n \n //uji adakah data di tabel?\n if(i == -1){\n //tidak ada yang terpilih atau dipilih.\n return;\n }\n txtNama.setText(\"\"+model.getValueAt(i,0));\n txtAlamat.setText(\"\"+model.getValueAt(i,1));\n txtNo.setText(\"\"+model.getValueAt(i,2));\n txtKamera.setText(\"\"+model.getValueAt(i,3));\n txtKode.setText(\"\"+model.getValueAt(i,4));\n txtdisewa.setText(\"\"+model.getValueAt(i,5));\n txtLama.setText(\"\"+model.getValueAt(i,6));\n txtLambat.setText(\"\"+model.getValueAt(i,7));\n \n }", "private void initTableView() {\n // nastaveni sloupcu pro zobrazeni spravne hodnoty a korektniho datoveho typu\n this.colId.setCellValueFactory(cellData -> cellData.getValue().getPersonalIdProperty());\n this.colName.setCellValueFactory(cellData -> cellData.getValue().getDisplayNameProperty());\n this.colAge.setCellValueFactory(cellData -> cellData.getValue().getAgeProperty().asObject());\n this.colGender.setCellValueFactory(cellData -> cellData.getValue().getGenderProperty());\n this.colPrice.setCellValueFactory(cellData -> cellData.getValue().getPriceProperty().asObject());\n\n // nastaveni listu prvku tabulce\n this.offerTable.setItems(this.marketplace.getOfferList());\n\n // listener pro zjisteni, ktery prvek tabulky uzivatel oznacil a naplneni aktualni reference na vybrane dite\n this.offerTable.getSelectionModel().getSelectedCells().addListener(new ListChangeListener<TablePosition>() {\n\n @Override\n public void onChanged(Change<? extends TablePosition> change) {\n ObservableList selectedCells = offerTable.getSelectionModel().getSelectedCells();\n TablePosition tablePosition = (TablePosition) selectedCells.get(0);\n currentChild = marketplace.getOfferList().get(tablePosition.getRow());\n System.out.println(currentChild);\n updateUi();\n }\n });\n }", "public void updateTable() {\n ((AbstractTableModel) table.getModel()).fireTableDataChanged();\n }", "public void llenarTabla(){\n pedidoMatDao.llenarTabla();\n }", "public static void viewtable() {\r\n\t\tt.dibuixa(table);\r\n\t}", "private void loadData()\n\t{\n\t\tVector<String> columnNames = new Vector<String>();\n\t\tcolumnNames.add(\"Item Name\");\n\t\tcolumnNames.add(\"Item ID\");\n\t\tcolumnNames.add(\"Current Stock\");\n\t\tcolumnNames.add(\"Unit Price\");\n\t\tcolumnNames.add(\"Section\");\n\t\t\n\t\tVector<Vector<Object>> data= new Vector<Vector<Object>>();\n\t\t\n\t\tResultSet rs = null;\n\t\ttry \n\t\t{\n\t\t\tConnection con = Connector.DBcon();\n\t\t\tString query=\"select * from items natural join sections order by sections.s_name\";\n\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\trs = pst.executeQuery();\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tVector<Object> vector = new Vector<Object>();\n\t\t for (int columnIndex = 1; columnIndex <= 9; columnIndex++)\n\t\t {\n\t\t \t\n\t\t \tvector.add(rs.getObject(1));\n\t\t \tvector.add(rs.getObject(2));\n\t\t vector.add(rs.getObject(3));\n\t\t vector.add(rs.getObject(4));\n\t\t vector.add(rs.getObject(6));\n\t\t \n\t\t }\n\t\t data.add(vector);\n\t\t\t}\n\t\t\t\n\t\t\t tableModel.setDataVector(data, columnNames);\n\t\t\t \n\t\t\t rs.close();\n\t\t\t pst.close();\n\t\t\t con.close();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t}\n\t\t\n\t\t\n\t}", "public void setData()\n {\n lbl_f_Name.setText(\"Name: \" + obj_Faculty.getName());\n lbl_f_ID.setText(\"ID: \" + obj_Faculty.getId());\n\n //CODE for fetching data from DB from tbl_Up_Events and show on table\n //Things for DB\n //Connection_to_DB it connects to Access DB\n Connect_to_DB obj_conDB = new Connect_to_DB();\n Connection obj_con = obj_conDB.make_Connection();\n\n //Statement is used for updating, inserting and deleting\n Statement stmt = null;\n ResultSet res = null;\n\n try\n {\n stmt = obj_con.createStatement();\n\n String str_Data = \"select * from tbl_Up_Events\";\n\n res = stmt.executeQuery(str_Data);\n\n while (res.next())\n {\n String Name = res.getString(\"evntName\");\n String Day = res.getString(\"evntDay\");\n String Date = res.getString(\"evntDate\");\n String Venue = res.getString(\"evntVenue\");\n String Budget = res.getString(\"evntBudget\");\n String Descript = res.getString(\"evntDescript\");\n String Club = res.getString(\"evntClub\");\n String Ticket = res.getString(\"evntTicket\");\n\n String table[] =\n {\n Name, Day, Date, Venue, Budget, Descript, Club, Ticket\n };\n\n DefaultTableModel tblModel = (DefaultTableModel) tbl_Event.getModel();\n tblModel.addRow(table);\n }\n\n obj_con.close();\n\n }\n catch (Exception ex)\n {\n JOptionPane.showMessageDialog(null, ex);\n }\n //CODE for tables ENDS\n }", "public void updateTable()\n {\n tableModelPain = new DefaultTableModel(new String [] {\"Date\", \"Pain Average\", \"Accepted by\"},0);\n tableModelVisit = new DefaultTableModel(new String [] {\"Date\", \"Hospital Name\", \"Doctor\"},0);\n ArrayList<PainEntry> painList = patient.getPainHistory();\n ArrayList<Visit> visitList = patient.getVisitHistory();\n painData = new String[3];\n visitData = new String[3];\n for (PainEntry p : painList) {\n painData[0] = new SimpleDateFormat(\"MM/dd/yyyy\").format(p.getDate());\n painData[1] = p.getAvePain()+\"\";\n if(!\"\".equals(p.getDocName())) painData[2] = p.getDocName();\n else painData[2] = \"not treated yet\";\n \n tableModelPain.addRow(painData);\n }\n for (Visit v : visitList) {\n visitData[0] = new SimpleDateFormat(\"MM/dd/yyyy\").format(v.getDate());\n visitData[1] = v.getHospital();\n visitData[2] = v.getDocName();\n tableModelVisit.addRow(visitData);\n }\n jTablePain.setModel(tableModelPain);\n jTableVisit.setModel(tableModelVisit);\n }", "public void writeTable(){\n\n PersistenceUtil pu= PersistenceUtil.getInstance();\n EntityManagerFactory emf =pu.getEmf();\n EntityManager em = emf.createEntityManager();\n\n\n\n final Integer[] i = {0};\n\n tabela.getColumns().forEach((Consumer<TableColumn<Map, String>>) col -> {\n col.setCellValueFactory(new MapValueFactory<>(\"column\" + (i[0]).toString()));\n\n\n if(alegereBD!=\"0\")\n switch(alegereTabela){\n case \"Artists\":\n\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Country\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n textField1.disableProperty().setValue(false);\n textField2.disableProperty().setValue(false);\n\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n\n\n\n break;\n case \"Albums\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Genre\");\n if(i[0]==3)\n col.setText(\"Artist\");\n if(i[0]==4)\n col.setText(\"Realease\");\n\n textField3.disableProperty().setValue(false);\n textField4.disableProperty().setValue(false);\n textField5.disableProperty().setValue(false);\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n\n\n break;\n case \"Genres\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n case \"Charts\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Album\");\n if(i[0]==2)\n col.setText(\"Artist\");\n if(i[0]==3)\n col.setText(\"Position\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n }\n\n\n System.out.println(i[0]);\n i[0]++;\n });\n\n\n\n tabela.setItems(generateDataInMap());\n }", "public void tabla_campos() {\n int rec = AgendarA.tblAgricultor.getSelectedRow();// devuelve un entero con la posicion de la seleccion en la tabla\n ccAgricultor = AgendarA.tblAgricultor.getValueAt(rec, 1).toString();\n crearModeloAgenda();\n }", "public void PreencherTabela() throws SQLException {\n try (Connection connection = ConnectionFactory.getConnection()) {\n String[] colunas = new String[]{\"ID\", \"Nome\", \"Nomenclatura\", \"Quantidade\"};\n ArrayList dados = new ArrayList();\n for (ViewProdutoPedido v : viewProdutoPedidos) {\n dados.add(new Object[]{v.getId(), v.getNome(), v.getNomenclatura(), v.getQuantidade()});\n }\n ModeloTabela modelo = new ModeloTabela(dados, colunas);\n jTableItensPedido.setModel(modelo);\n jTableItensPedido.setRowSorter(new TableRowSorter(modelo));\n jTableItensPedido.getColumnModel().getColumn(0).setPreferredWidth(2);\n jTableItensPedido.getColumnModel().getColumn(0).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(1).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(1).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(2).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(2).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(3).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(3).setResizable(false);\n\n }\n }", "private void preencherTabela() {\n\t\tList<Cidade> listCidade;\n\t\tCidadeDAO cidadeDAO;\n\t\tObservableList<Cidade> oListCidade;\n\n\t\t// Determina os atributos que irão preencher as colunas\n\t\tcolCidade.setCellValueFactory(new PropertyValueFactory<>(\"nomeCidades\"));\n\t\tcolEstado.setCellValueFactory(new PropertyValueFactory<>(\"nomeEstado\"));\n\t\tcolSigla.setCellValueFactory(new PropertyValueFactory<>(\"siglaEstado\"));\n\t\tcolCodigoCidade.setCellValueFactory(new PropertyValueFactory<>(\"idCidade\"));\n\t\tcolIdEstado.setCellValueFactory(new PropertyValueFactory<>(\"idEstado\"));\n\n\t\t// Instancia a lista de cidades e a DAO\n\t\tlistCidade = new ArrayList<Cidade>();\n\t\tcidadeDAO = new CidadeDAO();\n\n\t\t// Chama o metodo para selecionar todas as cidades e atribuir a lista\n\t\tlistCidade = cidadeDAO.selecionar();\n\n\t\t// Converte a lista de cidades em observablearray\n\t\toListCidade = FXCollections.observableArrayList(listCidade);\n\n\t\t// Adiciona a lista na tabela\n\t\ttblCidades.setItems(oListCidade);\n\t}", "public void readTable() {\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setRowCount(0);\n\n }", "@Override\n\t\t\t\tpublic TableModel getModel() {\n\t\t\t\t\treturn model;\n\t\t\t\t}", "private void pintarTabla() {\r\n ArrayList<Corredor> listCorredors = gestion.getCorredores();\r\n TableModelCorredores modelo = new TableModelCorredores(listCorredors);\r\n jTableCorredores.setModel(modelo);\r\n TableRowSorter<TableModel> elQueOrdena = new TableRowSorter<>(modelo);\r\n jTableCorredores.setRowSorter(elQueOrdena);\r\n\r\n }", "public DefaultTableModel buscarlotes() {\n \n String encabezados[]= {\"Nombre\",\"Codigo\",\"Lote\",\"Vencimiento\",\"Dias Restantes\"};\n Control.ControlLote c = new Control.ControlLote();\n List<Modelo.Lotes> lotes = null;\n \n try {\n lotes = c.buscarlote();\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(AgregarStock.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n Long resta;//para saber cuanto queda de vencimiento\n java.util.Date fechaActual = new Date(); \n \n String [][] data = new String[lotes.size()][5];\n for (int i = 0; i < lotes.size(); i++) {\n \n resta=lotes.get(i).getVencimiento().getTime()-fechaActual.getTime();\n long dias = (resta / (1000 * 60 * 60 * 24))+1;\n \n \n data[i][0] = lotes.get(i).getNombre();\n data[i][1] = Long.toString(lotes.get(i).getCodigo());\n data[i][2] = lotes.get(i).getLote();\n data[i][3] = lotes.get(i).getVencimiento().toString();\n if(dias<1)\n data[i][4] = (\"Vencido\");\n else{\n data[i][4] = Long.toString(dias);\n }\n\n }\n\n jTable1.setDefaultRenderer (Object.class, new MiRender());\n \n return new DefaultTableModel(data,encabezados);\n }", "public DataMahasiswa() {\n initComponents();\n load_table();\n }", "private void carregarTabela() {\n try {\n\n Vector<String> cabecalho = new Vector();\n cabecalho.add(\"Id\");\n cabecalho.add(\"Nome\");\n cabecalho.add(\"CPF\");\n cabecalho.add(\"Telefone\");\n cabecalho.add(\"Endereço\");\n cabecalho.add(\"E-mail\");\n cabecalho.add(\"Data de Nascimento\");\n\n Vector detalhe = new Vector();\n\n for (Cliente cliente : new NCliente().listar()) {\n Vector<String> linha = new Vector();\n\n linha.add(cliente.getId() + \"\");\n linha.add(cliente.getNome());\n linha.add(cliente.getCpf());\n linha.add(cliente.getTelefone());\n linha.add(cliente.getEndereco());\n linha.add(cliente.getEmail());\n linha.add(cliente.getData_nascimento().toString());\n detalhe.add(linha);\n\n }\n\n tblClientes.setModel(new DefaultTableModel(detalhe, cabecalho));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }", "protected void dataTableleibie(int i) {\n\t\r\n}", "private void apresentarListaNaTabela() {\n DefaultTableModel modelo = (DefaultTableModel) tblAlunos.getModel();\n modelo.setNumRows(0);\n for (Aluno item : bus.getLista()) {\n modelo.addRow(new Object[]{\n item.getIdAluno(),\n item.getNome(),\n item.getEmail(),\n item.getTelefone()\n });\n }\n }", "private void processTableData(DefaultTableModel model) {\n \tVector vector;\r\n\t\ttry {\r\n\t\t\tvector = (Vector) referenceData.getStartUPData(\"TradeAttribute\");\r\n\t\t\tIterator it = vector.iterator();\r\n\t \tint i =0;\r\n\t \twhile(it.hasNext()) {\r\n\t \t\t\r\n\t \t\tStartUPData tradeAttributes = (StartUPData) it.next();\r\n\t \t\tif(tradeAttributes.getName().equalsIgnoreCase(\"Trade Date\")) {\r\n\t \t \tmodel.insertRow(i, new Object[]{tradeAttributes.getName(),commonUTIL.dateToString(commonUTIL.getCurrentDate())});\r\n\t \t } else {\r\n\t \t\t model.insertRow(i, new Object[]{tradeAttributes.getName(),\"0\"});\r\n\t \t }\r\n\t \t\t\r\n\t \t\ti++;\r\n\t \t\t}\r\n\t \t\t\r\n\t\t} catch (RemoteException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "public void tampilTabel() {\n Object[] baris = {\"Nis\", \"Nama Siswa\", \"Kelamin\", \"Email\", \"Alamat\", \"Telepon\", \"Kelas\"};\n tabmode = new DefaultTableModel(null, baris);\n tblSiswaKelas10.setModel(tabmode);\n if (ckBoxFilter.isSelected()) {\n txtFilterKelas.setText((String) cmbFilterTingkat.getSelectedItem() + \" \" + (String) cmbFilterJurusan.getSelectedItem() + \" \" + (String) cmbFilterAB.getSelectedItem());\n if (cmbFilterTingkat.getSelectedItem() == \"X\") {\n try {\n sql = \"select * from tblsiswa where kelas = '\" + txtFilterKelas.getText() + \"'\";\n Connection con = new koneksi().getConnection();\n stat = con.createStatement();\n result = stat.executeQuery(sql);\n while (result.next()) {\n Object[] o = new Object[7];\n o[0] = result.getString(\"nis\");\n o[1] = result.getString(\"nama_siswa\");\n o[2] = result.getString(\"kelamin\");\n o[3] = result.getString(\"email\");\n o[4] = result.getString(\"alamat\");\n o[5] = result.getString(\"kelas\");\n o[6] = result.getString(\"telepon\");\n tabmode.addRow(o);\n }\n } catch (SQLException e) {\n JOptionPane.showMessageDialog(null, \"Menampilkan data GAGAL\\n\" + e, \"Informasi\", JOptionPane.INFORMATION_MESSAGE);\n }\n } else if (cmbFilterTingkat.getSelectedItem() == \"XI\") {\n try {\n sql = \"select * from tblsiswa where kelas = '\" + txtFilterKelas.getText() + \"'\";\n Connection con = new koneksi().getConnection();\n stat = con.createStatement();\n result = stat.executeQuery(sql);\n while (result.next()) {\n Object[] o = new Object[7];\n o[0] = result.getString(\"nis\");\n o[1] = result.getString(\"nama_siswa\");\n o[2] = result.getString(\"kelamin\");\n o[3] = result.getString(\"email\");\n o[4] = result.getString(\"alamat\");\n o[5] = result.getString(\"kelas\");\n o[6] = result.getString(\"telepon\");\n tabmode.addRow(o);\n }\n } catch (SQLException e) {\n JOptionPane.showMessageDialog(null, \"Menampilkan data GAGAL\\n\" + e, \"Informasi\", JOptionPane.INFORMATION_MESSAGE);\n }\n } else if (cmbFilterTingkat.getSelectedItem() == \"XII\") {\n try {\n sql = \"select * from tblsiswa where kelas = '\" + txtFilterKelas.getText() + \"'\";\n Connection con = new koneksi().getConnection();\n stat = con.createStatement();\n result = stat.executeQuery(sql);\n while (result.next()) {\n Object[] o = new Object[7];\n o[0] = result.getString(\"nis\");\n o[1] = result.getString(\"nama_siswa\");\n o[2] = result.getString(\"kelamin\");\n o[3] = result.getString(\"email\");\n o[4] = result.getString(\"alamat\");\n o[5] = result.getString(\"kelas\");\n o[6] = result.getString(\"telepon\");\n tabmode.addRow(o);\n }\n } catch (SQLException e) {\n JOptionPane.showMessageDialog(null, \"Menampilkan data GAGAL\\n\" + e, \"Informasi\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n } else {\n try {\n sql = \"select * from tblsiswa \";\n Connection con = new koneksi().getConnection();\n stat = con.createStatement();\n result = stat.executeQuery(sql);\n while (result.next()) {\n Object[] o = new Object[7];\n o[0] = result.getString(\"nis\");\n o[1] = result.getString(\"nama_siswa\");\n o[2] = result.getString(\"kelamin\");\n o[3] = result.getString(\"email\");\n o[4] = result.getString(\"alamat\");\n o[5] = result.getString(\"kelas\");\n o[6] = result.getString(\"telepon\");\n tabmode.addRow(o);\n }\n } catch (SQLException e) {\n JOptionPane.showMessageDialog(null, \"Menampilkan data GAGAL\\n\" + e, \"Informasi\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n }", "public Produk() {\n initComponents();\n kosong();\n model = new DefaultTableModel();\n this.tbProduk.setModel(model);\n model.addColumn(\"ID\");\n model.addColumn(\"Kategori\");\n model.addColumn(\"Merk\");\n model.addColumn(\"Warna\");\n model.addColumn(\"Ukuran\");\n model.addColumn(\"Harga\");\n ambil_data_tabel();\n \n model2 = new DefaultTableModel ();\n tb_customer.setModel(model2);\n model2.addColumn(\"ID\");\n model2.addColumn(\"Nama\");\n model2.addColumn(\"Alamat\");\n model2.addColumn(\"Telepon\");\n getData();\n }", "private void carregarTabela() {\n try {\n\n Vector<String> cabecalho = new Vector();\n cabecalho.add(\"Id\");\n cabecalho.add(\"Nome\");\n cabecalho.add(\"Telefone\");\n cabecalho.add(\"Titular\");\n cabecalho.add(\"Data de Nascimento\");\n\n Vector detalhe = new Vector();\n\n for (Dependente dependente : new NDependente().listar()) {\n Vector<String> linha = new Vector();\n\n linha.add(dependente.getId() + \"\");\n linha.add(dependente.getNome());\n linha.add(dependente.getTelefone());\n linha.add(new NCliente().consultar(dependente.getCliente_id()).getNome());\n linha.add(dependente.getDataNascimento().toString());\n detalhe.add(linha);\n\n }\n\n tblDependentes.setModel(new DefaultTableModel(detalhe, cabecalho));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }", "public void reloadTableEmpleado() {\n\n this.removeAllData();// borramos toda la data \n for (int i = 0; i < (listae.size()); i++) { // este for va de la primera casilla hast ael largo del arreglo \n Empleado object = listae.get(i);\n this.AddtoTableEmpleado(object);\n }\n\n }", "public void atualizarTabelaRespostas(){\n resposta = new Resposta(); \n\n try{\n if(txtIdPergunta.getText().isEmpty()){\n listaRespostas = respostaDao.ListaResposta(0);\n \n }else{\n listaRespostas = respostaDao.ListaResposta(Integer.parseInt(txtIdPergunta.getText()));\n \n }\n }catch (SQLException ex){\n Logger.getLogger(PerguntaView.class.getName()).log(Level.SEVERE, null, ex);\n } \nString dados [][] = new String[listaRespostas.size()][0];\nint i = 0;\nfor(Resposta resposta : listaRespostas){\n dados[i][0] = String.valueOf(resposta.getId());\n dados[i][1] = resposta.getDescricao();\n \n i++;\n}\nString tituloColuna[] ={\"ID Resposta\", \"Resposta\"};\nDefaultTableModel tabelaresposta = new DefaultTableModel();\ntabelaresposta.setDataVector(dados, tituloColuna);\n \n\n tabela_respostas.setModel(new DefaultTableModel(dados, tituloColuna){\n boolean[] canEdit = new boolean[]{\n false, false};\n \n public boolean isCellEditable(int rowIndex, int columnIndex){\n return canEdit[columnIndex];\n }\n \n\n });\ntabela_respostas.getColumnModel().getColumn(0).setPreferredWidth(100);\ntabela_respostas.getColumnModel().getColumn(1).setPreferredWidth(400);\n\nDefaultTableCellRenderer alinhamentoCentro = new DefaultTableCellRenderer();\nalinhamentoCentro.setHorizontalAlignment(SwingConstants.CENTER);\n\n\ntabela_respostas.getColumnModel().getColumn(0).setCellRenderer(alinhamentoCentro);\n\n\ntabela_respostas.setRowHeight(25);\ntabela_respostas.updateUI();\n }", "public void tabelpembayaran(){\n DefaultTableModel tbl = new DefaultTableModel();\n //tbl.addColumn(\"Kode\");\n tbl.addColumn(\"TGL Audit\");\n tbl.addColumn(\"TGL Pembayaran\");\n tbl.addColumn(\"Status\");\n tbl.addColumn(\"Grup\");\n tbl.addColumn(\"Aktivitas\");\n tbl.addColumn(\"JML Anggota\");\n tbl.addColumn(\"HA\");\n tbl.addColumn(\"Gaji PerHA\");\n tbl.addColumn(\"Gaji Anggota\");\n tbl.addColumn(\"Total\");\n tblpembayaran.setModel(tbl);\n try{\n java.sql.Statement statement=(java.sql.Statement)conek.GetConnection().createStatement();\n ResultSet res=statement.executeQuery(\"select * from tblpembayaran\");\n while(res.next())\n {\n tbl.addRow(new Object[]{\n res.getString(\"tanggal_audit\"),\n res.getString(\"tanggal_pembayaran\"), \n res.getString(\"status_pembayaran\"),\n res.getString(\"nama_grup\"),\n res.getString(\"nama_aktivitas\"),\n res.getInt(\"jumlah_anggota\"),\n res.getInt(\"ha\"),\n res.getInt(\"harga\"),\n res.getInt(\"gaji_peranggota\"),\n res.getInt(\"total\")\n });\n tblpembayaran.setModel(tbl); \n }\n }catch (Exception e){\n JOptionPane.showMessageDialog(rootPane,\"Salah\");\n }\n \n }", "private void refreshTable() {\n data = getTableData();\n updateTable();\n }", "public void llenarTabla() {\n DefaultTableModel modelos = (DefaultTableModel) tableProducto.getModel();\n while (modelos.getRowCount() > 0) {\n modelos.removeRow(0);\n }\n MarcaDAO marcaDao = new MarcaDAO();\n CategoriaProductoDAO catProDao = new CategoriaProductoDAO();\n ProductoDAO proDao = new ProductoDAO();\n Marca marca = new Marca();\n CategoriaProducto catPro = new CategoriaProducto();\n\n for (Producto producto : proDao.findAll()) {\n DefaultTableModel modelo = (DefaultTableModel) tableProducto.getModel();\n modelo.addRow(new Object[10]);\n int nuevaFila = modelo.getRowCount() - 1;\n tableProducto.setValueAt(producto.getIdProducto(), nuevaFila, 0);\n tableProducto.setValueAt(producto.getNombreProducto(), nuevaFila, 1);\n tableProducto.setValueAt(producto.getCantidadProducto(), nuevaFila, 2);\n tableProducto.setValueAt(producto.getPrecioCompra(), nuevaFila, 3);\n tableProducto.setValueAt(producto.getPrecioVenta(), nuevaFila, 4);\n tableProducto.setValueAt(producto.getFechaCaducidadProducto(), nuevaFila, 5);\n tableProducto.setValueAt(producto.getFechaCaducidadProducto(), nuevaFila, 6);\n tableProducto.setValueAt(producto.getDescripcionProducto(), nuevaFila, 7);\n marca.setIdMarca(producto.getFK_idMarca());\n tableProducto.setValueAt(marcaDao.findBy(marca, \"idMarca\").get(0).getNombreMarca(), nuevaFila, 8);//PARA FK ID MARCA\n catPro.setIdCategoriaProducto(producto.getFK_idCategoriaProducto());\n tableProducto.setValueAt(catProDao.findBy(catPro, \"idCategoriaProducto\").get(0).getNombreCategoriaProducto(), nuevaFila, 9);\n //PARA FK ID CATEGORIA PRODUCTO\n\n }\n }", "public void disTable () {\n\t\t\t\tJScrollPane scrollPane = new JScrollPane(table);\n\t\t\t\tvalues = new Vector();\n\t\t\t\tvalues.add(\"20\"); values.add(\"20\"); values.add(\"20\"); values.add(\"20\"); values.add(\"20\");values.add(\"20\");values.add(new Boolean(false));\n\t\t\t\tmyModel.addRow(values ); // more practicle, vector can take only objects.\n\t\t myModel.addRow(data);\n\n\n\t\t\t\tgetContentPane().add(scrollPane, BorderLayout.CENTER);\n\n\t\t\t\t addWindowListener(new WindowAdapter() {\n\t\t\t\t\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t\t}\n\t\t\t\t });\n\t}", "@SuppressWarnings(\"unchecked\")\n private void showDuLieu(){\n try {\n tableMain.removeAll();\n String[] arr= {\"Mã Bạn Đọc \",\"Mã Tài Khoản\",\"Tên Bạn Đọc\" ,\"Địa Chỉ\",\"Số Điện Thoại\",\"Ngày Sinh\"};\n \n DefaultTableModel model = new DefaultTableModel(arr, 0);\n Connection connection = DBConnection.getConnection();\n String query = \"SELECT * FROM dbo.BanDoc20173329\";\n PreparedStatement ps = connection.prepareStatement(query);\n ResultSet rs = ps.executeQuery();\n while(rs.next()){\n Vector vector = new Vector();\n vector.add(rs.getString(\"MABANDOc20173329\"));\n vector.add(rs.getString(\"mataikhoan20173329\"));\n vector.add(rs.getString(\"tenbandoc20173329\"));\n vector.add(rs.getString(\"diachi20173329\"));\n vector.add(rs.getString(\"sodienthoai20173329\"));\n vector.add(rs.getString(\"ngaysinh20173329\"));\n model.addRow(vector);\n }\n DBConnection.closeConnection(connection);\n tableMain.setModel(model);\n tableMain.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n\n @Override\n public void valueChanged(ListSelectionEvent e) {\n if (tableMain.getSelectedRow()>=0) {\n tfMaBanDoc.setText(tableMain.getValueAt(tableMain.getSelectedRow(),0)+\"\");\n tfmataikhoan.setText(tableMain.getValueAt(tableMain.getSelectedRow(),1)+\"\");\n tftenbandoc.setText(tableMain.getValueAt(tableMain.getSelectedRow(),2)+\"\");\n tfdiachi.setText(tableMain.getValueAt(tableMain.getSelectedRow(),3)+\"\");\n tfsodienthoai.setText(tableMain.getValueAt(tableMain.getSelectedRow(),4)+\"\");\n tfngaysinh.setText(tableMain.getValueAt(tableMain.getSelectedRow(),5)+\"\");\n }\n }\n });\n \n } catch (SQLException ex) {\n Logger.getLogger(QuanLyBangSach.class.getName()).log(Level.SEVERE, null, ex);\n }}", "private void llenarTabla() {\n\t\t// TODO Auto-generated method stub\n\t\tif (gestionando.equals(\"Empleado\")) {\n\t\t\ttry {\n\t\t\t\tObservableList<PersonaObservable> empleados = administradorDelegado.listarEmpleadosObservables();\n\t\t\t\ttable.setItems(empleados);\n\t\t\t\tcolumnCedula.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"cedula\"));\n\t\t\t\tcolumnNombre.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"nombre\"));\n\t\t\t\tcolumnApellidos.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"apellido\"));\n\t\t\t\tcolumnTelefono.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"telefono\"));\n\t\t\t\ttable.getColumns().setAll(columnCedula, columnNombre, columnApellidos, columnTelefono);\n\t\t\t\ttable.setPrefWidth(450);\n\t\t\t\ttable.setPrefHeight(300);\n\t\t\t\ttable.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);\n\n\t\t\t\ttable.getSelectionModel().selectedIndexProperty().addListener(new RowSelectChangeListener());\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else if (gestionando.equals(\"Recolector\")) {\n\t\t\ttry {\n\t\t\t\tObservableList<PersonaObservable> recolectores = administradorDelegado.listarRecolectoresObservables();\n\t\t\t\ttable.setItems(recolectores);\n\t\t\t\tcolumnCedula.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"cedula\"));\n\t\t\t\tcolumnNombre.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"nombre\"));\n\t\t\t\tcolumnApellidos.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"apellido\"));\n\t\t\t\tcolumnTelefono.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"telefono\"));\n\t\t\t\ttable.getColumns().setAll(columnCedula, columnNombre, columnApellidos, columnTelefono);\n\t\t\t\ttable.setPrefWidth(450);\n\t\t\t\ttable.setPrefHeight(300);\n\t\t\t\ttable.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);\n\n\t\t\t\ttable.getSelectionModel().selectedIndexProperty().addListener(new RowSelectChangeListener());\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "public DataTableModel() {\n super();\n LanguageObservable.getInstance().attach(this);\n setLocalizedResourceBundle(\"ch.ethz.origo.jerpa.jerpalang.perspective.ededb.EDEDB\");\n initColumns();\n data = new LinkedList<DataRowModel>();\n }", "private void selectData() {\n String kolom[] = {\"NIS\", \"NamaSiswa\", \"TempatLahir\", \"TanggalLahir\", \"JenisKelamin\", \"Kelas\", \"Email\", \"Alamat\"};\n DefaultTableModel dtm = new DefaultTableModel(null, kolom);\n String SQL = \"SELECT * FROM t_siswa\";\n ResultSet rs = KoneksiDB.executeQuery(SQL);\n try {\n while (rs.next()) {\n String NIS = rs.getString(1);\n String NamaSiswa = rs.getString(2);\n String TempatLahir = rs.getString(3);\n String TanggalLahir = rs.getString(4);\n String JenisKelamin = \"\";\n if (\"L\".equals(rs.getString(5))) {\n JenisKelamin = \"Laki-Laki\";\n } else {\n JenisKelamin = \"Perempuan\";\n }\n String Kelas = rs.getString(6);\n String Email = rs.getString(7);\n String Alamat = rs.getString(8);\n String data[] = {NIS, NamaSiswa, TempatLahir, TanggalLahir, JenisKelamin, Kelas, Email, Alamat};\n dtm.addRow(data);\n }\n } catch (SQLException ex) {\n Logger.getLogger(frmMain.class).log(Level.SEVERE, null, ex);\n }\n tblData.setModel(dtm); //To change body of generated methods, choose Tools | Templates.\n }", "public void initTable_Pesanan(){\n //Set cell TableView\n id_pesan.setCellValueFactory(new PropertyValueFactory<Order, String>(\"Id\"));\n jumlah_pesan.setCellValueFactory(new PropertyValueFactory<Order, String>(\"Jumlah\"));\n harga_pesan.setCellValueFactory(new PropertyValueFactory<Order, Integer>(\"Harga\"));\n catatan_pesan.setCellValueFactory(new PropertyValueFactory<Order, String>(\"Catatan\"));\n hapus_pesan.setCellValueFactory(new PropertyValueFactory<Order, Button>(\"Hapus\"));\n\n //Editable\n catatan_pesan.setCellFactory(TextFieldTableCell.forTableColumn());\n catatan_pesan.setOnEditCommit(event ->\n {\n event.getTableView().getItems().get(event.getTablePosition().getRow()).setCatatan(event.getNewValue());\n });\n tablePesanan.setEditable(true);\n //Set TableView\n tablePesanan.setItems(list_order);\n }", "private void selectData() {\n String kolom[] = {\"ID\",\"Kasir\",\"Makanan\",\"Harga Makanan\",\"Minuman\",\"Harga Minuman\",\"Bayar\",\"Kembali\",\"Total\"};\n DefaultTableModel dtm = new DefaultTableModel(null, kolom);\n String SQL = \"SELECT * FROM tb_harga\";\n ResultSet rs = KoneksiDB.executeQuery(SQL);\n \n try\n {\n rs = KoneksiDB.executeQuery(SQL);\n while(rs.next())\n {\n String id = rs.getString(1);\n String kasir = rs.getString(2);\n String makanan = rs.getString(3);\n String hrg_makan = rs.getString(4);\n String minum = rs.getString(5);\n String hrg_minum = rs.getString(6);\n String bayar = rs.getString(7);\n String kembali = rs.getString(8);\n String total = rs.getString(9);\n \n String data[] = {id,kasir,makanan,hrg_makan,minum,hrg_minum,bayar,kembali,total};\n dtm.addRow(data);\n }\n }\n catch(SQLException ex)\n {\n Logger.getLogger(Home.class.getName()).log(Level.SEVERE, null, ex);\n }\n tData.setModel(dtm); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\n public void tableRows_()\n {\n }", "private ArrayList<FornecedorModelo> iniciaTabela() {\n int i;\n DefaultTableModel model=(DefaultTableModel)tblFornecedor.getModel();\n // atribui 0 linhas à coluna\n model.setNumRows(0);\n // atribui um tamanho fixo a coluna codigo\n tblFornecedor.getColumnModel().getColumn(0).setPreferredWidth(2);\n ArrayList<FornecedorModelo> listaFornecedores = new ArrayList<FornecedorModelo>();\n listaFornecedores = new FornecedorControle().listarFornecedor();\n //adiciona alunos as tabelas\n for (i=0;i<=listaFornecedores.size()-1;i++){\n model.addRow(\n new Object[]{\n listaFornecedores.get(i).getCodFornecedor(),\n listaFornecedores.get(i).getNomeFantasia(),\n listaFornecedores.get(i).getRazaoSocial(),\n listaFornecedores.get(i).getEndereco(),\n listaFornecedores.get(i).getEmail(),\n listaFornecedores.get(i).getTelefone(),\n listaFornecedores.get(i).getCnpj(),\n Boolean.FALSE\n }\n );\n }\n return listaFornecedores;\n }", "public void SetModel() {\n try {\n con = dc.connect();\n tb_User.setModel(user_model);\n stmt2 = con.createStatement();\n vtdata_user = new Vector();\n vtcolumn_user = new Vector();\n\n //Add Header for User Table Model\n vtcolumn_user.add(\"UserName\");\n vtcolumn_user.add(\"Full Name\");\n vtcolumn_user.add(\"Email\");\n vtcolumn_user.add(\"Birthday\");\n vtcolumn_user.add(\"Gender\");\n vtcolumn_user.add(\"Phone\");\n String sqlUser = \"select UserName,u_name,Email,BirthDate,Gender,Phone from tblUsers\";\n ResultSet rsUser = stmt2.executeQuery(sqlUser);\n\n\n\n while (rsUser.next()) {\n\n Vector temp = new Vector();\n\n temp.add(rsUser.getString(1));\n temp.add(rsUser.getString(2));\n temp.add(rsUser.getString(3));\n // temp.add(rsUser.getDate(\"BirthDate\"));\n\n temp.add(formatDate.format(rsUser.getDate(4)));\n boolean gender = rsUser.getBoolean(5);\n\n\n if (gender == true) {\n temp.add(\"Male\");\n }\n\n if (gender == false) {\n temp.add(\"Female\");\n }\n temp.add(rsUser.getString(6));\n vtdata_user.add(temp);\n }\n\n\n user_model = new DefaultTableModel(vtdata_user, vtcolumn_user) {\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return false;\n }\n };\n tb_User.setModel(user_model);\n\n dc.disconnect(rsUser);\n dc.disconnect(stmt2);\n dc.disconnect(con);\n } catch (SQLException ex) {\n Logger.getLogger(UserManagement.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void setTable() {\n try {\n DefaultTableModel dtm = (DefaultTableModel) table.getModel();\n dtm.setRowCount(0);\n ArrayList<Item> itemList = ItemController.getAllItem();\n if (itemList != null) {\n for (Item item : itemList) {\n String qoh = BatchController.getQOH(item.getCode());\n if (qoh != null) {\n if (item.getRol() >= Integer.valueOf(qoh)) {\n Object row[] = {item.getCode(), item.getDesciption(), item.getRol(), qoh};\n dtm.addRow(row);\n }\n }\n\n }\n }\n if (dtm.getRowCount() == 0) {\n JOptionPane.showMessageDialog(this, \"Stock level is above ROL\");\n }\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(ROL.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(ROL.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void fillData() {\n table.setRowList(data);\n }", "public jpQLHoKhau() {\n initComponents();\n tableModel = (DefaultTableModel) tblDG.getModel();\n tableModel2 = (DefaultTableModel) tblTP.getModel();\n fillTblDG();\n fillTblTP();\n }", "public void bindingTable() {\n String[] header = {\"Cuti ID\", \"Tanggal Awal\", \"Tanggal Akhir\", \"Keterangan\", \"Cuti Khusus ID\"};\n DefaultTableModel defaultTableModel = new DefaultTableModel(header, 0);\n for (Cuti cuti : cutiController.binding()) {\n Object[] cuti1 = {\n cuti.getCutiId(), cuti.getCkId(), cuti.getTanggalAwal(), cuti.getTanggalAkhir(), cuti.getKeterangan()\n };\n this.cmbCutiKhususID.addItem(cuti1[2].toString());\n defaultTableModel.addRow(cuti1);\n }\n tblCuti.setModel(defaultTableModel);\n }", "public void updateModeloPagoLaboratorio() throws Exception{\n ArrayList<Pago> pgAbono = PagoDB.listarPagosDePlanTratamientoLab(tratamientotoSelected.getIdPlanTratamiento());\n \n \n int m = this.columnasNombrePagoLab.length;\n ArrayList<Object []> objetos = new ArrayList<Object []>();\n String aux = this.costoAbono.getText();\n int total = Integer.parseInt(aux.substring(1, aux.length()));\n for(Pago pagAbn : pgAbono){\n\n String tipoPago = pagAbn.getTipoPago();\n String detalle = pagAbn.getDetalle();\n String fecha = girarFecha(pagAbn.getFecha());\n String valor = pagAbn.getAbono()+\"\";\n int numBoleta = pagAbn.getNumBoleta();\n total = total + pagAbn.getAbono();\n Object [] fila = new Object [] {new Item (tipoPago,pagAbn.getIdPago()), detalle, fecha, \"$\"+valor, numBoleta+\"\"};\n objetos.add(fila);\n \n }\n costoAbono.setText(\"$\"+total);\n int id = tratamientotoSelected.getIdPlanTratamiento();\n PlanTratamiento planTrat = PlanTratamientoDB.getPlanTratamiento(id);\n planTrat.setTotalAbonos(total);\n //calculando el porcentaje de abance\n int cosTotal=tratamientotoSelected.getCostoTotal();\n int avance= total*100/cosTotal;\n planTrat.setAvance(avance);\n \n PlanTratamientoDB.editarPlanTratamiento(planTrat);\n //System.out.println(\"total 1:\"+total+\"id:\"+id);\n \n this.filasPagoLab = new Object [objetos.size()][m];\n int i = 0;\n for(Object [] o : objetos){\n this.filasPagoLab[i] = o;\n i++;\n }\n \n this.modeloPagoLab = new DefaultTableModel(this.filasPagoLab, this.columnasNombrePagoLab) {\n Class[] types = new Class [] {\n String.class, Item.class, String.class, String.class, String.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n };\n \n this.tablaPagoLaboratorio.setModel(modeloPagoLab);\n \n this.iniciarTablaPlanesTratamientos();\n //habilitarBoton();\n }", "public EditingTable() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public void listarutilizador() {\n \n \n List<Utilizador> cs =new UtilizadorJpaController().findUtilizadorEntities();\n \n DefaultTableModel tbm=(DefaultTableModel) listadeutilizador.getModel();\n \n for (int i = tbm.getRowCount()-1; i >= 0; i--) {\n tbm.removeRow(i);\n }\n int i=0;\n for (Utilizador c : cs) {\n tbm.addRow(new String[1]);\n listadeutilizador.setValueAt(c.getIdutilizador(), i, 0);\n listadeutilizador.setValueAt(c.getNome(), i, 1);\n listadeutilizador.setValueAt(c.getUtilizador(), i, 2);\n listadeutilizador.setValueAt(c.getIdprevilegio().getPrevilegio(), i, 3);\n// listaderelatorio.setValueAt(f.getTotal(), i, 4);\n// Distrito di = new DistritoJpaController().getDistritoByLoc(f.getIdlocalidade());\n// Localidade lo = new LocalidadeJpaController().findLocalidade(f.getIdlocalidade());\n// listaderelatorio.setValueAt(di.getDistrito(), i, 0);//lo.getIdposto().getIddistrito().getDistrito(), i, 0);\n// listaderelatorio.setValueAt(lo.getLocalidade(), i, 1);\n \n//// listadeformando.setValueAt(f.getSexo(), i, 2);\n// listaderelatorio.setValueAt(f.getQhomem(), i, 2);\n// listaderelatorio.setValueAt(f.getQmulher(), i, 3);\n// listaderelatorio.setValueAt(f.getTotal(), i, 4);\n// \n// \n i++;\n }\n \n \n \n }", "private static void setTableWithData()\n {\n /* Se establecen el tamaño de la tabla */\n table.setSize(1280, 630);\n table.setMaximumSize(new Dimension(1280, 630));\n table.setMinimumSize(new Dimension(1280, 630));\n\n /* Se garantiza que cada fila (album) tiene un alto proporcional de acuerdo con el numero de cancioens */\n Iterator iteratorPerRow = listSizePerRow.iterator();\n int sizePerRow, i;\n i = 0;\n while (iteratorPerRow.hasNext())\n {\n sizePerRow = (Integer) iteratorPerRow.next(); \n table.setRowHeight(i, sizePerRow);\n i++;\n }\n\n /* Se setea el ancho de cada columna */\n setSize(table, JSoundsMainWindowViewController.ALBUM_COVER_COLUMN, 200);\n setSize(table, JSoundsMainWindowViewController.ALBUM_INFO_COLUMN, 230);\n setSize(table, JSoundsMainWindowViewController.NUMBER_SONG_COLUMN, 50);\n setSize(table, JSoundsMainWindowViewController.LIST_SONG_COLUMN, 400);\n setSize(table, JSoundsMainWindowViewController.GENDER_SONG_COLUMN, 230);\n\n /* Renderizado del la imagen del album */\n JLabelTableRenderer jltcr = new JLabelTableRenderer();\n jltcr.setVerticalAlignment(SwingConstants.TOP);\n jltcr.setHorizontalAlignment(SwingConstants.CENTER);\n\n table.getColumnModel().getColumn(0).setCellRenderer(jltcr);\n\n\n /* Renderizados de cada columna */\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.ALBUM_INFO_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.ALBUM_INFO_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.NUMBER_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.NUMBER_SONG_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LIST_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LIST_SONG_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.GENDER_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.GENDER_SONG_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LAST_PLAYED_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LAST_PLAYED_SONG_COLUMN).setCellEditor(new JListTableEditor()); \n }", "private EstabelecimentoTable() {\n\t\t\t}", "public void carga_bd_empleados(){\n try {\n Connection conectar = Conexion.conectar();\n PreparedStatement pst = conectar.prepareStatement(\n \"select nombre, edad, cargo, direccion, telefono from empleados\");\n\n ResultSet rs = pst.executeQuery();\n\n table = new JTable(model);\n jScrollPane1.setViewportView(table);\n table.setBackground(Color.yellow);\n\n model.addColumn(\"Nombre\");\n model.addColumn(\"Edad\");\n model.addColumn(\"Cargo\");\n model.addColumn(\"Direccion\");\n model.addColumn(\"Telefono\");\n\n while (rs.next()) {\n Object[] fila = new Object[8];\n //material mimaterial = new material();\n\n for (int i = 0; i < 5; i++) {\n fila[i] = rs.getObject(i + 1);\n }\n\n// model.addRow(fila);\n Empleado mimaterial = this.ChangetoEmpleado(fila);\n this.AddToArrayTableEmpleado(mimaterial);\n\n }\n\n conectar.close();\n \n } catch (SQLException e) {\n System.err.println(\"Error al llenar tabla\" + e);\n JOptionPane.showMessageDialog(null, \"Error al mostrar informacion\");\n\n }\n }", "private void vulTabel() {\n\t\ttblSessies.setItems(sc.getSessieObservableLijst());\n\t\tclnTitel.setCellValueFactory(cel -> cel.getValue().getTitelProperty());\n\t\tclnVerantwoordelijke.setCellValueFactory(cel -> cel.getValue().getVerantwoordelijkeNaamProperty());\n\t\tclnStartdatum.setCellValueFactory(cel -> cel.getValue().getStartDatumProperty());\n\t\tclnDuur.setCellValueFactory(cel -> cel.getValue().getDuurProperty());\n\t\ttblSessies.getSelectionModel().selectedItemProperty().addListener((obs, oldV, newV) -> {\n\t\t\tsc.setSessie(newV);\n\t\t});\n\t\tthis.setVgrow(tblSessies, Priority.SOMETIMES);\n\t}", "public void setCalendarForModel(Calendar calend) {\n this.cal = calend;\n //fireTableDataChanged();\n refresh();\n}", "private void enlazarListadoTabla() {\n tblCursos.setItems(listaCursos);\n\n //Enlazar columnas con atributos\n clmNombre.setCellValueFactory(new PropertyValueFactory<Curso, String>(\"nombre\"));\n clmAmbito.setCellValueFactory(new PropertyValueFactory<Curso, String>(\"familiaProfesional\"));\n clmDuracion.setCellValueFactory(new PropertyValueFactory<Curso, Integer>(\"duracion\"));\n }", "public void atualizarTabelaFunc() throws SQLException {\n DefaultTableModel model = (DefaultTableModel) tabelaFunc.getModel();\n model.setNumRows(0);\n dadosDAO dados = new dadosDAO();\n String pesquisa = funcField.getText().toUpperCase();\n for (funcionario func : dados.readFuncionarios()){\n if (!funcField.getText().equals(\"\")){\n if (nomeBtnFunc.isSelected()){\n if (func.getNome().contains(pesquisa)){\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n } else if (cpfBtnFunc.isSelected()){\n if (funcField.getText().equals(func.getCpf())) {\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n } else {\n if (funcField.getText().equals(String.valueOf(func.getId_func()))){\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n }\n } else {\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n }\n }", "private void refreshTable(){\n DefaultTableModel dm = (DefaultTableModel)table.getModel();\r\n dm.getDataVector().removeAllElements();\r\n System.out.println(\"Refresh Table\");\r\n\r\n //calling method addRows\r\n addRows();\r\n }" ]
[ "0.72926325", "0.7017664", "0.6992412", "0.69623023", "0.6904483", "0.6897858", "0.68733174", "0.68350196", "0.67995", "0.6782475", "0.67808384", "0.6768116", "0.6713612", "0.6686993", "0.6684211", "0.6673062", "0.6647151", "0.6637408", "0.66334474", "0.66313624", "0.66285884", "0.6613403", "0.6605887", "0.66058815", "0.659205", "0.65865755", "0.6582911", "0.65691644", "0.6558835", "0.65503913", "0.6549117", "0.6542054", "0.6536034", "0.6510791", "0.6496082", "0.6491173", "0.6478966", "0.64733773", "0.64638144", "0.64599687", "0.6458122", "0.6433458", "0.64318913", "0.64115745", "0.6408487", "0.6406566", "0.639491", "0.6389769", "0.6389549", "0.6389347", "0.63627774", "0.6341166", "0.6335196", "0.6334674", "0.63341373", "0.6313938", "0.6312336", "0.6310055", "0.63056004", "0.6302167", "0.6292842", "0.62919956", "0.62909335", "0.628731", "0.6283012", "0.6282482", "0.6275109", "0.6275013", "0.6271592", "0.6253519", "0.625275", "0.62505054", "0.6248797", "0.6245823", "0.62425303", "0.6240589", "0.6235365", "0.6232607", "0.62316203", "0.62306887", "0.6205934", "0.620319", "0.6200344", "0.6199561", "0.6193975", "0.6192635", "0.6191475", "0.618968", "0.61871636", "0.61765444", "0.61755115", "0.61718047", "0.6170119", "0.6169622", "0.61694443", "0.6164512", "0.6154017", "0.61452967", "0.61439544", "0.6137802" ]
0.65755284
27
Met deze methode wordt de data in de tabel aangepast door het TableModel te wijzigen.
public void changeData(Object[][] data, String[] header) { DefaultTableModel dtm = new DefaultTableModel(data, header); setModel(dtm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void srediTabelu() {\n ModelTabeleStavka mts = new ModelTabeleStavka();\n mts.setLista(n.getLista());\n tblStavka.setModel(mts);\n }", "private void srediTabelu() {\n\n mtu = (ModelTabeleUlica) jtblUlica.getModel();\n ArrayList<Ulica> ulice = kontrolor.Kontroler.getInstanca().vratiUlice();\n mtu.setLista(ulice);\n\n }", "private void loadTable() {\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n try {\n String sql = \"select * from tb_mahasiswa\";\n Statement n = a.createStatement();\n ResultSet rs = n.executeQuery(sql);\n while (rs.next()) {\n Object[] o = new Object[6];\n o[0] = rs.getString(\"id_mahasiswa\");\n o[1] = rs.getString(\"nama\");\n o[2] = rs.getString(\"tempat\");\n o[3] = rs.getString(\"waktu\");\n o[4] = rs.getString(\"status\");\n model.addRow(o);\n }\n } catch (Exception e) {\n }\n }", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "public void getData( ){\n model2.getDataVector( ).removeAllElements( );\n model2.fireTableDataChanged( );\n\n try{\n //membuat statemen pemanggilan data pada table tblGaji dari database\n Statement s = koneksi.createStatement();\n String sql = \"Select * from tb_customer\";\n ResultSet r = s.executeQuery(sql);\n\n //penelusuran baris pada tabel tblGaji dari database\n while(r.next ()){\n Object[ ] o = new Object[4];\n o[0] = r.getString(\"id\");\n o[1] = r.getString(\"nama\");\n o[2] = r.getString(\"alamat\");\n o[3] = r.getString(\"telepon\");\n\n model2.addRow(o);\n }\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage() );\n }\n }", "public TestFrame() {\n\n final String[] columnNames = {\"Nombre\",\n \"Apellido\",\n \"webeo\",\n \"Años de Practica\",\n \"Soltero(a)\"};\n final Object[][] data = {\n\n {\"Lhucas\", \"Huml\",\n \"Patinar\", new Integer(3), new Boolean(true)},\n {\"Kathya\", \"Walrath\",\n \"Escalar\", new Integer(2), new Boolean(false)},\n {\"Marcus\", \"Andrews\",\n \"Correr\", new Integer(7), new Boolean(true)},\n {\"Angela\", \"Lalth\",\n \"Nadar\", new Integer(4), new Boolean(false)}\n };\n\n Vector dataV1 = new Vector();\n dataV1.add(\"XXXX\");\n dataV1.add(\"YYYY\");\n dataV1.add(\"JJJJ\");\n\n Vector dataV2 = new Vector();\n dataV2.add(\"XX2XX\");\n dataV2.add(\"Y2YYY\");\n dataV2.add(\"J2JJJ\");\n\n List dataF = new ArrayList();\n dataF.add(dataV1);\n dataF.add(dataV2);\n\n /*Vector dataC = new Vector();\n dataC.add(\"1\");\n dataC.add(\"2\");\n dataC.add(\"J23JJJ\");\n\n //model = new ModeloDatosTabla(data, true);\n model = new TableModel_1_1(dataC, dataF);\n model2 = new TableModel(columnNames, data, false);\n*/\n\n\n\n initComponents();\n\n\n }", "private void fillTable(){\n tblModel.setRowCount(0);// xoa cac hang trong bang\n \n for(Student st: list){\n tblModel.addRow(new String[]{st.getStudentId(), st.getName(), st.getMajor(),\"\"\n + st.getMark(), st.getCapacity(), \"\" + st.isBonnus()});\n // them (\"\" + )de chuyen doi kieu float va boolean sang string\n \n }\n tblModel.fireTableDataChanged();\n }", "public void refreshData() {\r\n\t\tfireTableDataChanged();\r\n\t\tgetTable().tableChanged(new TableModelEvent(this));\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic void funkcie() {\n\t\tTableColumn<Znamka, String> datumColumn = new TableColumn<>(\"Datum pisomky\");\n\t\tdatumColumn.setMinWidth(velkostPolickaX - 1);\n\t\tdatumColumn.setCellValueFactory(new PropertyValueFactory<>(\"datumS\"));\n\n\t\tTableColumn<Znamka, Double> hodnotaColumn = new TableColumn<Znamka, Double>(\"Hodnota\");\n\t\thodnotaColumn.setMinWidth(velkostPolickaX - 1);\n\t\thodnotaColumn.setCellValueFactory(new PropertyValueFactory<>(\"hodnotaS\"));\n\n\t\tTableColumn<Znamka, Double> maxHodnotaColumn = new TableColumn<Znamka, Double>(\"Max. Hodnota\");\n\t\tmaxHodnotaColumn.setMinWidth(velkostPolickaX - 1);\n\t\tmaxHodnotaColumn.setCellValueFactory(new PropertyValueFactory<>(\"maxHodnotaS\"));\n\n\t\ttabulkaZiak.getColumns().addAll(hodnotaColumn, maxHodnotaColumn, datumColumn);\n\n\t\tvyberPredmetov.setItems(((Ziak) aktualnyPouzivatel).vratMenoPredmetov());\n\t\tvyberPredmetov.getSelectionModel().selectedIndexProperty()\n\t\t\t\t.addListener((ChangeListener<Number>) (ov, value, new_value) -> {\n\t\t\t\t\ttabulkaZiak.setItems(((Ziak) aktualnyPouzivatel).vratZnamkyPredmetu((int) new_value));\n\t\t\t\t});\n\t\tvyberPredmetov.getSelectionModel().selectFirst();\n\t}", "public void getData( ){\n model.getDataVector( ).removeAllElements( );\n model.fireTableDataChanged( );\n\n try{\n //membuat statemen pemanggilan data pada table tblGaji dari database\n Statement stat = (Statement)koneksi_db.config( ).createStatement( );\n String sql = \"Select * from daftar_log\";\n ResultSet res = stat.executeQuery(sql);\n\n //penelusuran baris pada tabel tblGaji dari database\n while(res.next ()){\n Object[ ] obj = new Object[6];\n obj[0] = res.getString(\"id_log\"); \n obj[1] = res.getString(\"nama_kejadian\");\n model.addRow(obj);\n }\n }\n catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage() );\n }\n }", "private void updateTabela() {\n\n if (txBuscar.getText().isEmpty()) {\n ListaEmprestimosBEANs = new ControlerEmprestimos().listaEmprestimoss();\n } else {\n try {\n Integer buscar = Integer.parseInt(txBuscar.getText());\n ListaEmprestimosBEANs = new ArrayList<>();\n ListaEmprestimosBEANs.add(new ControlerEmprestimos().findEmprestimos(buscar));\n } catch (Exception e) {\n\n }\n }\n DefaultTableModel model = new DefaultTableModel(null, new String[]{\"ID\", \"Data de Saida\", \"Data Estimada do Retorno\", \"Data do Retorno\"});\n try {\n jTable1.setModel(model);\n String[] dados = new String[9];\n for (EmprestimosBEAN a : ListaEmprestimosBEANs) {\n dados[0] = String.valueOf(a.getId_emprestimo());\n dados[1] = a.getDtSaida().toString();\n dados[2] = a.getDtVolta().toString();\n dados[3] = a.getDtRetorno() == null ? \"\" : a.getDtRetorno().toString();\n model.addRow(dados);\n }\n } catch (Exception ex) {\n\n }\n\n }", "public void doUpdateTable() {\r\n\t\tlogger.info(\"Actualizando tabla books\");\r\n\t\tlazyModel = new LazyBookDataModel();\r\n\t}", "public void updateTable() {\n tabelModel.setRowCount(0);\n Link current = result.first;\n for (int i = 0; current != null; i++) {\n Object[] row = {current.getMasjid(), current.getAlamat()};\n tabelModel.addRow(row);\n current = current.next;\n }\n }", "public TabellaModel() {\r\n lista = new Lista();\r\n elenco = new Vector<Persona>();\r\n elenco =lista.getElenco();\r\n values = new String[elenco.size()][3];\r\n Iterator<Persona> iterator = elenco.iterator();\r\n while (iterator.hasNext()) {\r\n\t\t\tfor (int i = 0; i < elenco.size(); i++) {\r\n\t\t\t\tpersona = new Persona();\r\n\t\t\t\tpersona = (Persona) iterator.next();\r\n\t\t\t\tvalues[i][0] = persona.getNome();\r\n\t\t\t\tvalues[i][1] = persona.getCognome();\r\n\t\t\t\tvalues[i][2] = persona.getTelefono();\t\r\n\t\t\t}\r\n\t\t}\r\n setDataVector(values, columnNames);\t\r\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 LlenarPagos(){\n datos=new DefaultTableModel();\n LlenarModelo();\n this.TablaPagos.setModel(datos);\n }", "public void update() {\n tableChanged(new TableModelEvent(this));\n }", "private void setDataModel() {\r\n tableData = new Object[resultSet.size()][classFields.length];\r\n // for every object from collection of objects\r\n for (int i = 0; i < resultSet.size(); i++) {\r\n // for every fields from class of object\r\n for (int j = 0; j < classFields.length; j++) {\r\n // for every method from class of object\r\n for (int x = 0; x < classMethods.length; x++) {\r\n // if class name start with 'get' and class method name\r\n // lenght is equal to field name + 3 (becouse of get word)\r\n if ((classMethods[x].getName().startsWith(\"get\"))\r\n && (classMethods[x].getName().length() == (classFields[j].getName().length() + 3))) {\r\n // if class name to lowercase ends with field name to\r\n // lower case\r\n if (classMethods[x].getName().toLowerCase().endsWith(classFields[j].getName().toLowerCase())) {\r\n // then try to invoke that getter\r\n try {\r\n tableData[i][j] = classMethods[x].invoke(resultSet.get(i));\r\n } catch (IllegalAccessException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n } catch (IllegalArgumentException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n } catch (InvocationTargetException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n }\r\n // This is alternative method for obtaining getter for field but\r\n // it will need public fields\r\n // try {\r\n // fieldValue = pola[j].get(resultSet.get(i));\r\n // data[i][j]=fieldValue;\r\n // } catch (IllegalArgumentException e) {\r\n // // TODO Auto-generated catch block\r\n // e.printStackTrace();\r\n // } catch (IllegalAccessException e) {\r\n // // TODO Auto-generated catch block\r\n // e.printStackTrace();\r\n // }\r\n }\r\n }\r\n }", "public void llenadoDeTablas() {\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Articulo\");\n modelo.addColumn(\"Fecha Ingreso\");\n modelo.addColumn(\"Nombre Articulo\");\n modelo.addColumn(\"Talla XS\");\n modelo.addColumn(\"Talla S\");\n modelo.addColumn(\"Talla M\");\n modelo.addColumn(\"Talla L\");\n modelo.addColumn(\"Talla XL\");\n modelo.addColumn(\"Color Articulo\");\n modelo.addColumn(\"Nombre Proveedor\");\n modelo.addColumn(\"Existencias\");\n\n RegistroArticuloDAO registroarcticuloDAO = new RegistroArticuloDAO();\n\n List<RegistroArticulo> registroarticulos = registroarcticuloDAO.select();\n TablaArticulo.setModel(modelo);\n String[] dato = new String[11];\n for (int i = 0; i < registroarticulos.size(); i++) {\n dato[0] = Integer.toString(registroarticulos.get(i).getPK_id_articulo());\n dato[1] = registroarticulos.get(i).getFecha_ingreso();\n dato[2] = registroarticulos.get(i).getNombre_articulo();\n dato[3] = registroarticulos.get(i).getTalla_articuloXS();\n dato[4] = registroarticulos.get(i).getTalla_articuloS();\n dato[5] = registroarticulos.get(i).getTalla_articuloM();\n dato[6] = registroarticulos.get(i).getTalla_articuloL();\n dato[7] = registroarticulos.get(i).getTalla_articuloXL();\n dato[8] = registroarticulos.get(i).getColor_articulo();\n dato[9] = registroarticulos.get(i).getNombre_proveedor();\n dato[10] = registroarticulos.get(i).getExistencia_articulo();\n\n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }\n }", "private void updateTable() {\n updateTableData();\n TableModelEvent e = new TableModelEvent(articleTableModel);\n\n articleTable.tableChanged(e);\n }", "public void updateTable() {\n\t\ttable.getSelectionModel().removeListSelectionListener(lsl);\n\t\tdtm = new DefaultTableModel();\n\t\td = new Diet();\n\t\tdtm.addColumn(\"Id\");\n\t\tdtm.addColumn(\"Meal Id\");\n\t\tdtm.addColumn(\"Meal Type\");\n\t\tdtm.addColumn(\"Food Name\");\n\t\tdtm.addColumn(\"Food Type\");\n\t\tdtm.addColumn(\"Food Category\");\n\t\tdtm.addColumn(\"Ready Time\");\n\t\tdtm.addColumn(\"Calories (g)\");\t\t\n\t\tdtm.addColumn(\"Protein (g)\");\n\t\tdtm.addColumn(\"Fat (g)\");\n\t\tdtm.addColumn(\"Carbohydrates\");\n\t\tdtm.addColumn(\"VitaminA\");\n\t\tdtm.addColumn(\"VitaminC\");\n\t\tdtm.addColumn(\"Calcium\");\n\t\tdtm.addColumn(\"Iron\");\n\t\tdtm.addColumn(\"Author\");\n\t\tArrayList<Diet> dietList = dI.getDietList();\n\t\tif(isOrder && orderby!=\"\")\n\t\t{\t\t\t\n\t\t\tSystem.out.println(\"entering ----------------\"+orderby);\n\t\t\tdietList=dI.getDietOrderedList(type,orderby);\n\t\t\tfor (Diet d : dietList) {\t\n\t\t\t\tSystem.out.println(d.getId()+\" ------ \"+d.getCalories());\n\t\t\t}\n\t\t}\n\t\tif(isFiltered)\n\t\t{\n\t\t\tif(mealtypeSel!=\"\")\n\t\t\tdietList=dI.getFilteredMealTypeList(mealtypeSel);\n\t\t\tif(foodtypeSel!=\"\")\n\t\t\t\tdietList=dI.getFilteredFoodTypeList(foodtypeSel);\n\t\t\tif(authorSel!=\"\")\n\t\t\t\tdietList=dI.getFilteredauthorList(authorSel);\n\t\t\tif(foodCategorySel!=\"\")\n\t\t\t\tdietList=dI.getFilterFoodCategoryList(foodCategorySel);\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (Diet d : dietList) {\t\n\t\t\tdtm.addRow(d.getVector());\n\t\t}\n\t\ttable.setModel(dtm);\n\n\t\ttable.getSelectionModel().addListSelectionListener(lsl);\n\n\t}", "private void riempimentoTableQuote() {\n\t\tString[] nameColumns = { \"Id\", \"Data inizio\", \"Valore\", \"Tipologia\" };\n\t\tquote = new ArrayList<Quota>(model.getQuote());\n\n\t\t/* Istanza del TableModel con l'override di isCellEditable per rendere\n\t\tla tabella non modificabile */\n\t\t@SuppressWarnings(\"serial\")\n\t\tDefaultTableModel dati = new DefaultTableModel(nameColumns, 0) {\n\t\t\t@Override\n\t\t\tpublic boolean isCellEditable(int row, int column) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\t\tfor (int j = 0; j < quote.size(); j++) {\n\t\t\tdati.addRow(new Vector<>());\n\t\t\tdati.setValueAt(quote.get(j).getId(), j, 0);\n\t\t\tdati.setValueAt(quote.get(j).getDataI(), j, 1);\n\t\t\tdati.setValueAt(quote.get(j).getValore(), j, 2);\n\t\t\tdati.setValueAt(quote.get(j).getTipologia(), j, 3);\n\t\t}\n\t\tviewGestione.getTable().setModel(dati);\n\t}", "@Override\n\tpublic void tableChanged(TableModelEvent arg0) {\n\t\t\n\t}", "private void Table()\n{\n Object [] Kolom = {\"Nama\", \"No. Telp\", \"Kota Asal\"};\n Table = new DefaultTableModel(null, Kolom);\n Tabel.setModel(Table);\n}", "public void PreencherTabela2() throws SQLException {\n\n String[] colunas = new String[]{\"ID do Pedido\", \"Numero Grafica\", \"Data Emissao\",\"Boleto\"};\n ArrayList dados = new ArrayList();\n Connection connection = ConnectionFactory.getConnection();\n PedidoDAO pedidoDAO = new PedidoDAO(connection);\n ModeloPedido modeloPedido = new ModeloPedido();\n modeloPedido = pedidoDAO.buscaPorId(idPedidoClasse);\n SimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n\n dados.add(new Object[]{modeloPedido.getId(), modeloPedido.getNumeroGrafica(), format.format(modeloPedido.getDataEmissao()), modeloPedido.isBoleto()});\n\n ModeloTabela modelo = new ModeloTabela(dados, colunas);\n\n jTablePedido.setModel(modelo);\n jTablePedido.setRowSorter(new TableRowSorter(modelo));\n jTablePedido.getColumnModel().getColumn(0).setPreferredWidth(2);\n jTablePedido.getColumnModel().getColumn(0).setResizable(false);\n jTablePedido.getColumnModel().getColumn(1).setPreferredWidth(20);\n jTablePedido.getColumnModel().getColumn(1).setResizable(false);\n\n jTablePedido.getTableHeader().setReorderingAllowed(false);\n connection.close();\n }", "private void setTableModelData() {\r\n\t\t//Spin through the list and add the individual country fields.\r\n\t\tVector<String> fields;\r\n\t\tfor (Country c : countryList) {\r\n\t\t\tfields = new Vector<String>();\r\n\t\t\tfields.add(c.getName());\r\n\t\t\tfields.add(c.getCapital());\r\n\t\t\tfields.add(c.getFoundation().toString());\r\n\t\t\tfields.add(c.getContinent());\r\n\t\t\tfields.add(String.valueOf(c.getPopulation()));\r\n\t\t\tcountryData.add(fields);\r\n\t\t}\r\n\t}", "public void popularTabela() {\n\n try {\n\n RelatorioRN relatorioRN = new RelatorioRN();\n\n ArrayList<PedidoVO> pedidos = relatorioRN.buscarPedidos();\n\n javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) tRelatorio.getModel();\n dtm.fireTableDataChanged();\n dtm.setRowCount(0);\n\n for (PedidoVO pedidoVO : pedidos) {\n\n String[] linha = {\"\" + pedidoVO.getIdpedido(), \"\" + pedidoVO.getData(), \"\" + pedidoVO.getCliente(), \"\" + pedidoVO.getValor()};\n dtm.addRow(linha);\n }\n\n } catch (SQLException sqle) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + sqle.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n \n } catch (Exception e) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + e.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void changeData() {\n\t\tDefaultTableModel dtm = new DefaultTableModel(dataModel.getData(),\n\t\t\t\tdataModel.getHeader());\n\t\tsetModel(dtm);\n\t}", "public void preencherTabela(){\n imagemEnunciado.setImage(imageDefault);\n pergunta.setImagemEnunciado(caminho);\n imagemResposta.setImage(imageDefault);\n pergunta.setImagemResposta(caminho);\n ///////////////////////////////\n perguntas = dao.read();\n if(perguntas != null){\n perguntasFormatadas = FXCollections.observableList(perguntas);\n\n tablePerguntas.setItems(perguntasFormatadas);\n }\n \n }", "public void reloadTable() {\n\n this.removeAllData();// borramos toda la data \n for (int i = 0; i < (list.size()); i++) { // este for va de la primera casilla hast ael largo del arreglo \n Balanza object = list.get(i);\n this.AddtoTable(object);\n }\n\n }", "private void TampilData() {\n DefaultTableModel model = new DefaultTableModel();\n model.addColumn(\"NO\");\n model.addColumn(\"ID\");\n model.addColumn(\"NAME\");\n model.addColumn(\"USERNAME\");\n tabelakses.setModel(model);\n\n //menampilkan data database kedalam tabel\n try {\n int i=1;\n java.sql.Connection conn = new DBConnection().connect();\n java.sql.Statement stat = conn.createStatement();\n ResultSet data = stat.executeQuery(\"SELECT * FROM p_login order by Id asc\");\n while (data.next()) {\n model.addRow(new Object[]{\n (\"\" + i++),\n data.getString(\"Id\"),\n data.getString(\"Name\"),\n data.getString(\"Username\")\n });\n tabelakses.setModel(model);\n }\n } catch (Exception e) {\n System.err.println(\"ERROR:\" + e);\n }\n }", "private void popuniTabelu() {\n try {\n List<PutnikEntity> putnici=Controller.vratiSvePutnike();\n TableModel tm=new PutnikTableModel(putnici);\n jtblPutnici.setModel(tm);\n } catch (Exception ex) {\n Logger.getLogger(FIzaberiLet.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void updateTable()\r\n {\r\n ((JarModel) table.getModel()).fireTableDataChanged();\r\n }", "@Override\n\tpublic void tableChanged(TableModelEvent e) {\n\t\tSystem.out.println(e.toString());\n\t\t//tableDaysModel.addAufgabe(aufgabe);\n\t}", "private void loadData() {\n\n // connect the table column with the attributes of the patient from the Queries class\n id_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"pstiantID\"));\n name_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n date_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveDate\"));\n time_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveTime\"));\n\n try {\n\n // database related code \"MySql\"\n ps = con.prepareStatement(\"select * from visitInfo \");\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n\n // load data to the observable list\n editOL.add(new Queries(new SimpleStringProperty(rs.getString(\"id\")),\n new SimpleStringProperty(rs.getString(\"patiantID\")),\n new SimpleStringProperty(rs.getString(\"patiant_name\")),\n new SimpleStringProperty(rs.getString(\"visit_type\")),\n new SimpleStringProperty(rs.getString(\"payment_value\")),\n new SimpleStringProperty(rs.getString(\"reserve_date\")),\n new SimpleStringProperty(rs.getString(\"reserve_time\")),\n new SimpleStringProperty(rs.getString(\"attend_date\")),\n new SimpleStringProperty(rs.getString(\"attend_time\")),\n new SimpleStringProperty(rs.getString(\"payment_date\")),\n new SimpleStringProperty(rs.getString(\"attend\")),\n new SimpleStringProperty(rs.getString(\"attend_type\"))\n\n ));\n }\n\n // assigning the observable list to the table\n table_view_in_edit.setItems(editOL);\n\n ps.close();\n rs.close();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "@Override\r\n public void tableChanged(TableModelEvent e) {\n\r\n }", "private void Actualizar_Tabla() {\n String[] columNames = {\"iditem\", \"codigo\", \"descripcion\", \"p_vent\", \"p_comp\", \"cant\", \"fecha\"};\n dtPersona = db.Select_Item();\n // se colocan los datos en la tabla\n DefaultTableModel datos = new DefaultTableModel(dtPersona, columNames);\n jTable1.setModel(datos);\n }", "public void llenadoDeTablas() {\n \n DefaultTableModel modelo1 = new DefaultTableModel();\n modelo1 = new DefaultTableModel();\n modelo1.addColumn(\"ID Usuario\");\n modelo1.addColumn(\"NOMBRE\");\n UsuarioDAO asignaciondao = new UsuarioDAO();\n List<Usuario> asignaciones = asignaciondao.select();\n TablaPerfiles.setModel(modelo1);\n String[] dato = new String[2];\n for (int i = 0; i < asignaciones.size(); i++) {\n dato[0] = (Integer.toString(asignaciones.get(i).getId_usuario()));\n dato[1] = asignaciones.get(i).getNombre_usuario();\n\n modelo1.addRow(dato);\n }\n }", "public void llenadoDeTablas() {\n /**\n *\n * creaccion de la tabla de de titulos \n */\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Bitacora\");\n modelo.addColumn(\"Usuario\");\n modelo.addColumn(\"Fecha\");\n modelo.addColumn(\"Hora\");\n modelo.addColumn(\"Ip\");\n modelo.addColumn(\"host\");\n \n modelo.addColumn(\"Accion\");\n modelo.addColumn(\"Codigo Aplicacion\");\n modelo.addColumn(\"Modulo\");\n /**\n *\n * instaciamiento de las las clases Bitacora y BiracoraDAO\n * intaciamiento de la clases con el llenado de tablas\n */\n BitacoraDao BicDAO = new BitacoraDao();\n List<Bitacora> usuario = BicDAO.select();\n JtProductos1.setModel(modelo);\n String[] dato = new String[9];\n for (int i = 0; i < usuario.size(); i++) {\n dato[0] = usuario.get(i).getId_Bitacora();\n dato[1] = usuario.get(i).getId_Usuario();\n dato[2] = usuario.get(i).getFecha();\n dato[3] = usuario.get(i).getHora();\n dato[4] = usuario.get(i).getHost();\n dato[5] = usuario.get(i).getIp();\n dato[6] = usuario.get(i).getAccion();\n dato[7] = usuario.get(i).getCodigoAplicacion();\n dato[8] = usuario.get(i).getModulo();\n \n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }}", "private void load_table() {\n DefaultTableModel model = new DefaultTableModel();\n model.addColumn(\"ID\");\n model.addColumn(\"NIM\");\n model.addColumn(\"Nama\");\n model.addColumn(\"Kelamin\");\n model.addColumn(\"Phone\");\n model.addColumn(\"Agama\");\n model.addColumn(\"Status\");\n\n //menampilkan data database kedalam tabel\n try {\n String sql = \"SELECT * FROM mhs\";\n java.sql.Connection koneksi = (Connection) Koneksi.KoneksiDB();\n java.sql.Statement stm = koneksi.createStatement();\n java.sql.ResultSet res = stm.executeQuery(sql);\n\n while (res.next()) {\n model.addRow(new Object[]{res.getString(1), res.getString(2),\n res.getString(3), res.getString(4), res.getString(5),\n res.getString(6), res.getString(7)});\n }\n tabelMahasiswa.setModel(model);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }", "@Override\n public void tableChanged(TableModelEvent e) {\n fireTableChanged(e);\n }", "public void tabelaktivitas() {\n DefaultTableModel tbl= new DefaultTableModel();\n tbl.addColumn(\"Group\");\n tbl.addColumn(\"Compart\");\n tbl.addColumn(\"Activity\");\n tbl.addColumn(\"HA\");\n tbl.addColumn(\"Harga\");\n tbl.addColumn(\"Total\");\n tblaktivitas.setModel(tbl);\n try{\n java.sql.Statement statement=(java.sql.Statement)conek.GetConnection().createStatement();\n ResultSet res=statement.executeQuery(\"select * from tblaktivitas\");\n while(res.next())\n {\n tbl.addRow(new Object[]{\n res.getString(\"nama_grup\"),\n res.getString(\"compart\"),\n res.getString(\"pekerjaan\"),\n res.getInt(\"ha\"),\n res.getInt(\"harga\"),\n res.getInt(\"total\")\n });\n tblaktivitas.setModel(tbl); \n }\n }catch (Exception e){\n JOptionPane.showMessageDialog(rootPane,\"Salah\");\n }\n }", "Tablero consultarTablero();", "public void tableChanged(TableModelEvent e) {\n int row = e.getFirstRow();\n TableModel model = (TableModel)e.getSource();\n// Als er een wijziging is aangebracht de 'opslaan' knop activeren\n btnOpslaan.setEnabled(true);\n lblSysteemMelding.setText(\" \");\n// Juiste gegevens voor in de db bepalen aan de hand van de status van een gebruiker.\n int rolID;\n if (model.getValueAt(row,5).equals(\"Gedeactiveerd\")){\n rolID = 2;\n } else if (model.getValueAt(row,5).equals(\"Administrator\")) {\n rolID = 3;\n } else {\n rolID = 4;\n }\n// Wijziging klaarzetten voor opslag repo / db.\n beheerGebruikersController.buildUpdate(new Administrator(\n (String)model.getValueAt(row,3),\n (String)model.getValueAt(row,1),\n (String)model.getValueAt(row,2),\n rolID,\n (String)model.getValueAt(row,4),\n (String)model.getValueAt(row,0),\n 0));\n\n }", "public pasien() {\n initComponents();\n model = new DefaultTableModel();\n tabelpasien.setModel(model);\n model.addColumn(\"ID_PASIEN\");\n model.addColumn(\"NAMA_PASIEN\");\n model.addColumn(\"ALAMAT\");\n \n loadData();\n \n }", "private void preencherTabelaVeiculoCarga() {\n\n ArrayList dados = new ArrayList();\n cargaDao = new CargaDao();\n Carga carga;\n String[] colunas = new String[]{\"ID\", \"DESCRICAO\", \"STATUS\"};\n\n try {\n final List<Object> listaCarga = cargaDao.listarCargasDoVeiculo(idVeiculoSelecionado);\n\n if (listaCarga != null && listaCarga.size() > 0) {\n for (Object cargaAtual : listaCarga) {\n carga = (Carga) cargaAtual;\n dados.add(new Object[]{carga.getIdCarga(), carga.getDescricao(), carga.getStatus()});\n }\n }\n\n ModeloTabela modTabela = new ModeloTabela(dados, colunas);\n jTB_VeiculoCarga.setModel(modTabela);\n jTB_VeiculoCarga.getColumnModel().getColumn(0).setPreferredWidth(100);\n jTB_VeiculoCarga.getColumnModel().getColumn(0).setResizable(false);\n jTB_VeiculoCarga.getColumnModel().getColumn(1).setPreferredWidth(300);\n jTB_VeiculoCarga.getColumnModel().getColumn(1).setResizable(false);\n jTB_VeiculoCarga.getColumnModel().getColumn(2).setPreferredWidth(150);\n jTB_VeiculoCarga.getColumnModel().getColumn(2).setResizable(false);\n\n jTB_VeiculoCarga.getTableHeader().setReorderingAllowed(false);\n jTB_VeiculoCarga.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);\n jTB_VeiculoCarga.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\n jTB_VeiculoCarga.addMouseListener(new MouseAdapter() {\n\n @Override\n public void mouseClicked(MouseEvent e) {\n try {\n List<Object> lista = cargaDao.listarCargasDoVeiculo(idVeiculoSelecionado);\n cargaSelecionada = (Carga) lista.\n get(jTB_VeiculoCarga.convertRowIndexToModel(jTB_VeiculoCarga.getSelectedRow()));\n\n // if (veiculoDao.listarVeiculosAtivos().size() > 0 && veiculoDao.listarVeiculosAtivos() != null) {}\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(FormVeiculoCargas.this, \"Erro genérico1: \" + ex.getMessage());\n ex.printStackTrace(System.err);\n }\n }\n\n });\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Erro genérico2: \" + e.getMessage());\n }\n }", "public void updatedTable() {\r\n\t\tfireTableDataChanged();\r\n\t}", "public void dataSelect(){\n //deklarasi variabel\n int i = tblKembali.getSelectedRow();\n \n //uji adakah data di tabel?\n if(i == -1){\n //tidak ada yang terpilih atau dipilih.\n return;\n }\n txtNama.setText(\"\"+model.getValueAt(i,0));\n txtAlamat.setText(\"\"+model.getValueAt(i,1));\n txtNo.setText(\"\"+model.getValueAt(i,2));\n txtKamera.setText(\"\"+model.getValueAt(i,3));\n txtKode.setText(\"\"+model.getValueAt(i,4));\n txtdisewa.setText(\"\"+model.getValueAt(i,5));\n txtLama.setText(\"\"+model.getValueAt(i,6));\n txtLambat.setText(\"\"+model.getValueAt(i,7));\n \n }", "public void llenarTabla(){\n pedidoMatDao.llenarTabla();\n }", "public void updateTable() {\n ((AbstractTableModel) table.getModel()).fireTableDataChanged();\n }", "private void initTableView() {\n // nastaveni sloupcu pro zobrazeni spravne hodnoty a korektniho datoveho typu\n this.colId.setCellValueFactory(cellData -> cellData.getValue().getPersonalIdProperty());\n this.colName.setCellValueFactory(cellData -> cellData.getValue().getDisplayNameProperty());\n this.colAge.setCellValueFactory(cellData -> cellData.getValue().getAgeProperty().asObject());\n this.colGender.setCellValueFactory(cellData -> cellData.getValue().getGenderProperty());\n this.colPrice.setCellValueFactory(cellData -> cellData.getValue().getPriceProperty().asObject());\n\n // nastaveni listu prvku tabulce\n this.offerTable.setItems(this.marketplace.getOfferList());\n\n // listener pro zjisteni, ktery prvek tabulky uzivatel oznacil a naplneni aktualni reference na vybrane dite\n this.offerTable.getSelectionModel().getSelectedCells().addListener(new ListChangeListener<TablePosition>() {\n\n @Override\n public void onChanged(Change<? extends TablePosition> change) {\n ObservableList selectedCells = offerTable.getSelectionModel().getSelectedCells();\n TablePosition tablePosition = (TablePosition) selectedCells.get(0);\n currentChild = marketplace.getOfferList().get(tablePosition.getRow());\n System.out.println(currentChild);\n updateUi();\n }\n });\n }", "public static void viewtable() {\r\n\t\tt.dibuixa(table);\r\n\t}", "private void loadData()\n\t{\n\t\tVector<String> columnNames = new Vector<String>();\n\t\tcolumnNames.add(\"Item Name\");\n\t\tcolumnNames.add(\"Item ID\");\n\t\tcolumnNames.add(\"Current Stock\");\n\t\tcolumnNames.add(\"Unit Price\");\n\t\tcolumnNames.add(\"Section\");\n\t\t\n\t\tVector<Vector<Object>> data= new Vector<Vector<Object>>();\n\t\t\n\t\tResultSet rs = null;\n\t\ttry \n\t\t{\n\t\t\tConnection con = Connector.DBcon();\n\t\t\tString query=\"select * from items natural join sections order by sections.s_name\";\n\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\trs = pst.executeQuery();\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tVector<Object> vector = new Vector<Object>();\n\t\t for (int columnIndex = 1; columnIndex <= 9; columnIndex++)\n\t\t {\n\t\t \t\n\t\t \tvector.add(rs.getObject(1));\n\t\t \tvector.add(rs.getObject(2));\n\t\t vector.add(rs.getObject(3));\n\t\t vector.add(rs.getObject(4));\n\t\t vector.add(rs.getObject(6));\n\t\t \n\t\t }\n\t\t data.add(vector);\n\t\t\t}\n\t\t\t\n\t\t\t tableModel.setDataVector(data, columnNames);\n\t\t\t \n\t\t\t rs.close();\n\t\t\t pst.close();\n\t\t\t con.close();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t}\n\t\t\n\t\t\n\t}", "public void updateTable()\n {\n tableModelPain = new DefaultTableModel(new String [] {\"Date\", \"Pain Average\", \"Accepted by\"},0);\n tableModelVisit = new DefaultTableModel(new String [] {\"Date\", \"Hospital Name\", \"Doctor\"},0);\n ArrayList<PainEntry> painList = patient.getPainHistory();\n ArrayList<Visit> visitList = patient.getVisitHistory();\n painData = new String[3];\n visitData = new String[3];\n for (PainEntry p : painList) {\n painData[0] = new SimpleDateFormat(\"MM/dd/yyyy\").format(p.getDate());\n painData[1] = p.getAvePain()+\"\";\n if(!\"\".equals(p.getDocName())) painData[2] = p.getDocName();\n else painData[2] = \"not treated yet\";\n \n tableModelPain.addRow(painData);\n }\n for (Visit v : visitList) {\n visitData[0] = new SimpleDateFormat(\"MM/dd/yyyy\").format(v.getDate());\n visitData[1] = v.getHospital();\n visitData[2] = v.getDocName();\n tableModelVisit.addRow(visitData);\n }\n jTablePain.setModel(tableModelPain);\n jTableVisit.setModel(tableModelVisit);\n }", "public void setData()\n {\n lbl_f_Name.setText(\"Name: \" + obj_Faculty.getName());\n lbl_f_ID.setText(\"ID: \" + obj_Faculty.getId());\n\n //CODE for fetching data from DB from tbl_Up_Events and show on table\n //Things for DB\n //Connection_to_DB it connects to Access DB\n Connect_to_DB obj_conDB = new Connect_to_DB();\n Connection obj_con = obj_conDB.make_Connection();\n\n //Statement is used for updating, inserting and deleting\n Statement stmt = null;\n ResultSet res = null;\n\n try\n {\n stmt = obj_con.createStatement();\n\n String str_Data = \"select * from tbl_Up_Events\";\n\n res = stmt.executeQuery(str_Data);\n\n while (res.next())\n {\n String Name = res.getString(\"evntName\");\n String Day = res.getString(\"evntDay\");\n String Date = res.getString(\"evntDate\");\n String Venue = res.getString(\"evntVenue\");\n String Budget = res.getString(\"evntBudget\");\n String Descript = res.getString(\"evntDescript\");\n String Club = res.getString(\"evntClub\");\n String Ticket = res.getString(\"evntTicket\");\n\n String table[] =\n {\n Name, Day, Date, Venue, Budget, Descript, Club, Ticket\n };\n\n DefaultTableModel tblModel = (DefaultTableModel) tbl_Event.getModel();\n tblModel.addRow(table);\n }\n\n obj_con.close();\n\n }\n catch (Exception ex)\n {\n JOptionPane.showMessageDialog(null, ex);\n }\n //CODE for tables ENDS\n }", "public void writeTable(){\n\n PersistenceUtil pu= PersistenceUtil.getInstance();\n EntityManagerFactory emf =pu.getEmf();\n EntityManager em = emf.createEntityManager();\n\n\n\n final Integer[] i = {0};\n\n tabela.getColumns().forEach((Consumer<TableColumn<Map, String>>) col -> {\n col.setCellValueFactory(new MapValueFactory<>(\"column\" + (i[0]).toString()));\n\n\n if(alegereBD!=\"0\")\n switch(alegereTabela){\n case \"Artists\":\n\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Country\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n textField1.disableProperty().setValue(false);\n textField2.disableProperty().setValue(false);\n\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n\n\n\n break;\n case \"Albums\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Genre\");\n if(i[0]==3)\n col.setText(\"Artist\");\n if(i[0]==4)\n col.setText(\"Realease\");\n\n textField3.disableProperty().setValue(false);\n textField4.disableProperty().setValue(false);\n textField5.disableProperty().setValue(false);\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n\n\n break;\n case \"Genres\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n case \"Charts\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Album\");\n if(i[0]==2)\n col.setText(\"Artist\");\n if(i[0]==3)\n col.setText(\"Position\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n }\n\n\n System.out.println(i[0]);\n i[0]++;\n });\n\n\n\n tabela.setItems(generateDataInMap());\n }", "public void tabla_campos() {\n int rec = AgendarA.tblAgricultor.getSelectedRow();// devuelve un entero con la posicion de la seleccion en la tabla\n ccAgricultor = AgendarA.tblAgricultor.getValueAt(rec, 1).toString();\n crearModeloAgenda();\n }", "public void PreencherTabela() throws SQLException {\n try (Connection connection = ConnectionFactory.getConnection()) {\n String[] colunas = new String[]{\"ID\", \"Nome\", \"Nomenclatura\", \"Quantidade\"};\n ArrayList dados = new ArrayList();\n for (ViewProdutoPedido v : viewProdutoPedidos) {\n dados.add(new Object[]{v.getId(), v.getNome(), v.getNomenclatura(), v.getQuantidade()});\n }\n ModeloTabela modelo = new ModeloTabela(dados, colunas);\n jTableItensPedido.setModel(modelo);\n jTableItensPedido.setRowSorter(new TableRowSorter(modelo));\n jTableItensPedido.getColumnModel().getColumn(0).setPreferredWidth(2);\n jTableItensPedido.getColumnModel().getColumn(0).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(1).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(1).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(2).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(2).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(3).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(3).setResizable(false);\n\n }\n }", "private void preencherTabela() {\n\t\tList<Cidade> listCidade;\n\t\tCidadeDAO cidadeDAO;\n\t\tObservableList<Cidade> oListCidade;\n\n\t\t// Determina os atributos que irão preencher as colunas\n\t\tcolCidade.setCellValueFactory(new PropertyValueFactory<>(\"nomeCidades\"));\n\t\tcolEstado.setCellValueFactory(new PropertyValueFactory<>(\"nomeEstado\"));\n\t\tcolSigla.setCellValueFactory(new PropertyValueFactory<>(\"siglaEstado\"));\n\t\tcolCodigoCidade.setCellValueFactory(new PropertyValueFactory<>(\"idCidade\"));\n\t\tcolIdEstado.setCellValueFactory(new PropertyValueFactory<>(\"idEstado\"));\n\n\t\t// Instancia a lista de cidades e a DAO\n\t\tlistCidade = new ArrayList<Cidade>();\n\t\tcidadeDAO = new CidadeDAO();\n\n\t\t// Chama o metodo para selecionar todas as cidades e atribuir a lista\n\t\tlistCidade = cidadeDAO.selecionar();\n\n\t\t// Converte a lista de cidades em observablearray\n\t\toListCidade = FXCollections.observableArrayList(listCidade);\n\n\t\t// Adiciona a lista na tabela\n\t\ttblCidades.setItems(oListCidade);\n\t}", "public void readTable() {\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setRowCount(0);\n\n }", "@Override\n\t\t\t\tpublic TableModel getModel() {\n\t\t\t\t\treturn model;\n\t\t\t\t}", "private void pintarTabla() {\r\n ArrayList<Corredor> listCorredors = gestion.getCorredores();\r\n TableModelCorredores modelo = new TableModelCorredores(listCorredors);\r\n jTableCorredores.setModel(modelo);\r\n TableRowSorter<TableModel> elQueOrdena = new TableRowSorter<>(modelo);\r\n jTableCorredores.setRowSorter(elQueOrdena);\r\n\r\n }", "public DefaultTableModel buscarlotes() {\n \n String encabezados[]= {\"Nombre\",\"Codigo\",\"Lote\",\"Vencimiento\",\"Dias Restantes\"};\n Control.ControlLote c = new Control.ControlLote();\n List<Modelo.Lotes> lotes = null;\n \n try {\n lotes = c.buscarlote();\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(AgregarStock.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n Long resta;//para saber cuanto queda de vencimiento\n java.util.Date fechaActual = new Date(); \n \n String [][] data = new String[lotes.size()][5];\n for (int i = 0; i < lotes.size(); i++) {\n \n resta=lotes.get(i).getVencimiento().getTime()-fechaActual.getTime();\n long dias = (resta / (1000 * 60 * 60 * 24))+1;\n \n \n data[i][0] = lotes.get(i).getNombre();\n data[i][1] = Long.toString(lotes.get(i).getCodigo());\n data[i][2] = lotes.get(i).getLote();\n data[i][3] = lotes.get(i).getVencimiento().toString();\n if(dias<1)\n data[i][4] = (\"Vencido\");\n else{\n data[i][4] = Long.toString(dias);\n }\n\n }\n\n jTable1.setDefaultRenderer (Object.class, new MiRender());\n \n return new DefaultTableModel(data,encabezados);\n }", "public DataMahasiswa() {\n initComponents();\n load_table();\n }", "private void carregarTabela() {\n try {\n\n Vector<String> cabecalho = new Vector();\n cabecalho.add(\"Id\");\n cabecalho.add(\"Nome\");\n cabecalho.add(\"CPF\");\n cabecalho.add(\"Telefone\");\n cabecalho.add(\"Endereço\");\n cabecalho.add(\"E-mail\");\n cabecalho.add(\"Data de Nascimento\");\n\n Vector detalhe = new Vector();\n\n for (Cliente cliente : new NCliente().listar()) {\n Vector<String> linha = new Vector();\n\n linha.add(cliente.getId() + \"\");\n linha.add(cliente.getNome());\n linha.add(cliente.getCpf());\n linha.add(cliente.getTelefone());\n linha.add(cliente.getEndereco());\n linha.add(cliente.getEmail());\n linha.add(cliente.getData_nascimento().toString());\n detalhe.add(linha);\n\n }\n\n tblClientes.setModel(new DefaultTableModel(detalhe, cabecalho));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }", "protected void dataTableleibie(int i) {\n\t\r\n}", "private void apresentarListaNaTabela() {\n DefaultTableModel modelo = (DefaultTableModel) tblAlunos.getModel();\n modelo.setNumRows(0);\n for (Aluno item : bus.getLista()) {\n modelo.addRow(new Object[]{\n item.getIdAluno(),\n item.getNome(),\n item.getEmail(),\n item.getTelefone()\n });\n }\n }", "private void processTableData(DefaultTableModel model) {\n \tVector vector;\r\n\t\ttry {\r\n\t\t\tvector = (Vector) referenceData.getStartUPData(\"TradeAttribute\");\r\n\t\t\tIterator it = vector.iterator();\r\n\t \tint i =0;\r\n\t \twhile(it.hasNext()) {\r\n\t \t\t\r\n\t \t\tStartUPData tradeAttributes = (StartUPData) it.next();\r\n\t \t\tif(tradeAttributes.getName().equalsIgnoreCase(\"Trade Date\")) {\r\n\t \t \tmodel.insertRow(i, new Object[]{tradeAttributes.getName(),commonUTIL.dateToString(commonUTIL.getCurrentDate())});\r\n\t \t } else {\r\n\t \t\t model.insertRow(i, new Object[]{tradeAttributes.getName(),\"0\"});\r\n\t \t }\r\n\t \t\t\r\n\t \t\ti++;\r\n\t \t\t}\r\n\t \t\t\r\n\t\t} catch (RemoteException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "public void tampilTabel() {\n Object[] baris = {\"Nis\", \"Nama Siswa\", \"Kelamin\", \"Email\", \"Alamat\", \"Telepon\", \"Kelas\"};\n tabmode = new DefaultTableModel(null, baris);\n tblSiswaKelas10.setModel(tabmode);\n if (ckBoxFilter.isSelected()) {\n txtFilterKelas.setText((String) cmbFilterTingkat.getSelectedItem() + \" \" + (String) cmbFilterJurusan.getSelectedItem() + \" \" + (String) cmbFilterAB.getSelectedItem());\n if (cmbFilterTingkat.getSelectedItem() == \"X\") {\n try {\n sql = \"select * from tblsiswa where kelas = '\" + txtFilterKelas.getText() + \"'\";\n Connection con = new koneksi().getConnection();\n stat = con.createStatement();\n result = stat.executeQuery(sql);\n while (result.next()) {\n Object[] o = new Object[7];\n o[0] = result.getString(\"nis\");\n o[1] = result.getString(\"nama_siswa\");\n o[2] = result.getString(\"kelamin\");\n o[3] = result.getString(\"email\");\n o[4] = result.getString(\"alamat\");\n o[5] = result.getString(\"kelas\");\n o[6] = result.getString(\"telepon\");\n tabmode.addRow(o);\n }\n } catch (SQLException e) {\n JOptionPane.showMessageDialog(null, \"Menampilkan data GAGAL\\n\" + e, \"Informasi\", JOptionPane.INFORMATION_MESSAGE);\n }\n } else if (cmbFilterTingkat.getSelectedItem() == \"XI\") {\n try {\n sql = \"select * from tblsiswa where kelas = '\" + txtFilterKelas.getText() + \"'\";\n Connection con = new koneksi().getConnection();\n stat = con.createStatement();\n result = stat.executeQuery(sql);\n while (result.next()) {\n Object[] o = new Object[7];\n o[0] = result.getString(\"nis\");\n o[1] = result.getString(\"nama_siswa\");\n o[2] = result.getString(\"kelamin\");\n o[3] = result.getString(\"email\");\n o[4] = result.getString(\"alamat\");\n o[5] = result.getString(\"kelas\");\n o[6] = result.getString(\"telepon\");\n tabmode.addRow(o);\n }\n } catch (SQLException e) {\n JOptionPane.showMessageDialog(null, \"Menampilkan data GAGAL\\n\" + e, \"Informasi\", JOptionPane.INFORMATION_MESSAGE);\n }\n } else if (cmbFilterTingkat.getSelectedItem() == \"XII\") {\n try {\n sql = \"select * from tblsiswa where kelas = '\" + txtFilterKelas.getText() + \"'\";\n Connection con = new koneksi().getConnection();\n stat = con.createStatement();\n result = stat.executeQuery(sql);\n while (result.next()) {\n Object[] o = new Object[7];\n o[0] = result.getString(\"nis\");\n o[1] = result.getString(\"nama_siswa\");\n o[2] = result.getString(\"kelamin\");\n o[3] = result.getString(\"email\");\n o[4] = result.getString(\"alamat\");\n o[5] = result.getString(\"kelas\");\n o[6] = result.getString(\"telepon\");\n tabmode.addRow(o);\n }\n } catch (SQLException e) {\n JOptionPane.showMessageDialog(null, \"Menampilkan data GAGAL\\n\" + e, \"Informasi\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n } else {\n try {\n sql = \"select * from tblsiswa \";\n Connection con = new koneksi().getConnection();\n stat = con.createStatement();\n result = stat.executeQuery(sql);\n while (result.next()) {\n Object[] o = new Object[7];\n o[0] = result.getString(\"nis\");\n o[1] = result.getString(\"nama_siswa\");\n o[2] = result.getString(\"kelamin\");\n o[3] = result.getString(\"email\");\n o[4] = result.getString(\"alamat\");\n o[5] = result.getString(\"kelas\");\n o[6] = result.getString(\"telepon\");\n tabmode.addRow(o);\n }\n } catch (SQLException e) {\n JOptionPane.showMessageDialog(null, \"Menampilkan data GAGAL\\n\" + e, \"Informasi\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n }", "public Produk() {\n initComponents();\n kosong();\n model = new DefaultTableModel();\n this.tbProduk.setModel(model);\n model.addColumn(\"ID\");\n model.addColumn(\"Kategori\");\n model.addColumn(\"Merk\");\n model.addColumn(\"Warna\");\n model.addColumn(\"Ukuran\");\n model.addColumn(\"Harga\");\n ambil_data_tabel();\n \n model2 = new DefaultTableModel ();\n tb_customer.setModel(model2);\n model2.addColumn(\"ID\");\n model2.addColumn(\"Nama\");\n model2.addColumn(\"Alamat\");\n model2.addColumn(\"Telepon\");\n getData();\n }", "private void carregarTabela() {\n try {\n\n Vector<String> cabecalho = new Vector();\n cabecalho.add(\"Id\");\n cabecalho.add(\"Nome\");\n cabecalho.add(\"Telefone\");\n cabecalho.add(\"Titular\");\n cabecalho.add(\"Data de Nascimento\");\n\n Vector detalhe = new Vector();\n\n for (Dependente dependente : new NDependente().listar()) {\n Vector<String> linha = new Vector();\n\n linha.add(dependente.getId() + \"\");\n linha.add(dependente.getNome());\n linha.add(dependente.getTelefone());\n linha.add(new NCliente().consultar(dependente.getCliente_id()).getNome());\n linha.add(dependente.getDataNascimento().toString());\n detalhe.add(linha);\n\n }\n\n tblDependentes.setModel(new DefaultTableModel(detalhe, cabecalho));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }", "public void reloadTableEmpleado() {\n\n this.removeAllData();// borramos toda la data \n for (int i = 0; i < (listae.size()); i++) { // este for va de la primera casilla hast ael largo del arreglo \n Empleado object = listae.get(i);\n this.AddtoTableEmpleado(object);\n }\n\n }", "public void atualizarTabelaRespostas(){\n resposta = new Resposta(); \n\n try{\n if(txtIdPergunta.getText().isEmpty()){\n listaRespostas = respostaDao.ListaResposta(0);\n \n }else{\n listaRespostas = respostaDao.ListaResposta(Integer.parseInt(txtIdPergunta.getText()));\n \n }\n }catch (SQLException ex){\n Logger.getLogger(PerguntaView.class.getName()).log(Level.SEVERE, null, ex);\n } \nString dados [][] = new String[listaRespostas.size()][0];\nint i = 0;\nfor(Resposta resposta : listaRespostas){\n dados[i][0] = String.valueOf(resposta.getId());\n dados[i][1] = resposta.getDescricao();\n \n i++;\n}\nString tituloColuna[] ={\"ID Resposta\", \"Resposta\"};\nDefaultTableModel tabelaresposta = new DefaultTableModel();\ntabelaresposta.setDataVector(dados, tituloColuna);\n \n\n tabela_respostas.setModel(new DefaultTableModel(dados, tituloColuna){\n boolean[] canEdit = new boolean[]{\n false, false};\n \n public boolean isCellEditable(int rowIndex, int columnIndex){\n return canEdit[columnIndex];\n }\n \n\n });\ntabela_respostas.getColumnModel().getColumn(0).setPreferredWidth(100);\ntabela_respostas.getColumnModel().getColumn(1).setPreferredWidth(400);\n\nDefaultTableCellRenderer alinhamentoCentro = new DefaultTableCellRenderer();\nalinhamentoCentro.setHorizontalAlignment(SwingConstants.CENTER);\n\n\ntabela_respostas.getColumnModel().getColumn(0).setCellRenderer(alinhamentoCentro);\n\n\ntabela_respostas.setRowHeight(25);\ntabela_respostas.updateUI();\n }", "public void tabelpembayaran(){\n DefaultTableModel tbl = new DefaultTableModel();\n //tbl.addColumn(\"Kode\");\n tbl.addColumn(\"TGL Audit\");\n tbl.addColumn(\"TGL Pembayaran\");\n tbl.addColumn(\"Status\");\n tbl.addColumn(\"Grup\");\n tbl.addColumn(\"Aktivitas\");\n tbl.addColumn(\"JML Anggota\");\n tbl.addColumn(\"HA\");\n tbl.addColumn(\"Gaji PerHA\");\n tbl.addColumn(\"Gaji Anggota\");\n tbl.addColumn(\"Total\");\n tblpembayaran.setModel(tbl);\n try{\n java.sql.Statement statement=(java.sql.Statement)conek.GetConnection().createStatement();\n ResultSet res=statement.executeQuery(\"select * from tblpembayaran\");\n while(res.next())\n {\n tbl.addRow(new Object[]{\n res.getString(\"tanggal_audit\"),\n res.getString(\"tanggal_pembayaran\"), \n res.getString(\"status_pembayaran\"),\n res.getString(\"nama_grup\"),\n res.getString(\"nama_aktivitas\"),\n res.getInt(\"jumlah_anggota\"),\n res.getInt(\"ha\"),\n res.getInt(\"harga\"),\n res.getInt(\"gaji_peranggota\"),\n res.getInt(\"total\")\n });\n tblpembayaran.setModel(tbl); \n }\n }catch (Exception e){\n JOptionPane.showMessageDialog(rootPane,\"Salah\");\n }\n \n }", "private void refreshTable() {\n data = getTableData();\n updateTable();\n }", "public void llenarTabla() {\n DefaultTableModel modelos = (DefaultTableModel) tableProducto.getModel();\n while (modelos.getRowCount() > 0) {\n modelos.removeRow(0);\n }\n MarcaDAO marcaDao = new MarcaDAO();\n CategoriaProductoDAO catProDao = new CategoriaProductoDAO();\n ProductoDAO proDao = new ProductoDAO();\n Marca marca = new Marca();\n CategoriaProducto catPro = new CategoriaProducto();\n\n for (Producto producto : proDao.findAll()) {\n DefaultTableModel modelo = (DefaultTableModel) tableProducto.getModel();\n modelo.addRow(new Object[10]);\n int nuevaFila = modelo.getRowCount() - 1;\n tableProducto.setValueAt(producto.getIdProducto(), nuevaFila, 0);\n tableProducto.setValueAt(producto.getNombreProducto(), nuevaFila, 1);\n tableProducto.setValueAt(producto.getCantidadProducto(), nuevaFila, 2);\n tableProducto.setValueAt(producto.getPrecioCompra(), nuevaFila, 3);\n tableProducto.setValueAt(producto.getPrecioVenta(), nuevaFila, 4);\n tableProducto.setValueAt(producto.getFechaCaducidadProducto(), nuevaFila, 5);\n tableProducto.setValueAt(producto.getFechaCaducidadProducto(), nuevaFila, 6);\n tableProducto.setValueAt(producto.getDescripcionProducto(), nuevaFila, 7);\n marca.setIdMarca(producto.getFK_idMarca());\n tableProducto.setValueAt(marcaDao.findBy(marca, \"idMarca\").get(0).getNombreMarca(), nuevaFila, 8);//PARA FK ID MARCA\n catPro.setIdCategoriaProducto(producto.getFK_idCategoriaProducto());\n tableProducto.setValueAt(catProDao.findBy(catPro, \"idCategoriaProducto\").get(0).getNombreCategoriaProducto(), nuevaFila, 9);\n //PARA FK ID CATEGORIA PRODUCTO\n\n }\n }", "public void disTable () {\n\t\t\t\tJScrollPane scrollPane = new JScrollPane(table);\n\t\t\t\tvalues = new Vector();\n\t\t\t\tvalues.add(\"20\"); values.add(\"20\"); values.add(\"20\"); values.add(\"20\"); values.add(\"20\");values.add(\"20\");values.add(new Boolean(false));\n\t\t\t\tmyModel.addRow(values ); // more practicle, vector can take only objects.\n\t\t myModel.addRow(data);\n\n\n\t\t\t\tgetContentPane().add(scrollPane, BorderLayout.CENTER);\n\n\t\t\t\t addWindowListener(new WindowAdapter() {\n\t\t\t\t\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t\t}\n\t\t\t\t });\n\t}", "@SuppressWarnings(\"unchecked\")\n private void showDuLieu(){\n try {\n tableMain.removeAll();\n String[] arr= {\"Mã Bạn Đọc \",\"Mã Tài Khoản\",\"Tên Bạn Đọc\" ,\"Địa Chỉ\",\"Số Điện Thoại\",\"Ngày Sinh\"};\n \n DefaultTableModel model = new DefaultTableModel(arr, 0);\n Connection connection = DBConnection.getConnection();\n String query = \"SELECT * FROM dbo.BanDoc20173329\";\n PreparedStatement ps = connection.prepareStatement(query);\n ResultSet rs = ps.executeQuery();\n while(rs.next()){\n Vector vector = new Vector();\n vector.add(rs.getString(\"MABANDOc20173329\"));\n vector.add(rs.getString(\"mataikhoan20173329\"));\n vector.add(rs.getString(\"tenbandoc20173329\"));\n vector.add(rs.getString(\"diachi20173329\"));\n vector.add(rs.getString(\"sodienthoai20173329\"));\n vector.add(rs.getString(\"ngaysinh20173329\"));\n model.addRow(vector);\n }\n DBConnection.closeConnection(connection);\n tableMain.setModel(model);\n tableMain.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n\n @Override\n public void valueChanged(ListSelectionEvent e) {\n if (tableMain.getSelectedRow()>=0) {\n tfMaBanDoc.setText(tableMain.getValueAt(tableMain.getSelectedRow(),0)+\"\");\n tfmataikhoan.setText(tableMain.getValueAt(tableMain.getSelectedRow(),1)+\"\");\n tftenbandoc.setText(tableMain.getValueAt(tableMain.getSelectedRow(),2)+\"\");\n tfdiachi.setText(tableMain.getValueAt(tableMain.getSelectedRow(),3)+\"\");\n tfsodienthoai.setText(tableMain.getValueAt(tableMain.getSelectedRow(),4)+\"\");\n tfngaysinh.setText(tableMain.getValueAt(tableMain.getSelectedRow(),5)+\"\");\n }\n }\n });\n \n } catch (SQLException ex) {\n Logger.getLogger(QuanLyBangSach.class.getName()).log(Level.SEVERE, null, ex);\n }}", "private void llenarTabla() {\n\t\t// TODO Auto-generated method stub\n\t\tif (gestionando.equals(\"Empleado\")) {\n\t\t\ttry {\n\t\t\t\tObservableList<PersonaObservable> empleados = administradorDelegado.listarEmpleadosObservables();\n\t\t\t\ttable.setItems(empleados);\n\t\t\t\tcolumnCedula.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"cedula\"));\n\t\t\t\tcolumnNombre.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"nombre\"));\n\t\t\t\tcolumnApellidos.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"apellido\"));\n\t\t\t\tcolumnTelefono.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"telefono\"));\n\t\t\t\ttable.getColumns().setAll(columnCedula, columnNombre, columnApellidos, columnTelefono);\n\t\t\t\ttable.setPrefWidth(450);\n\t\t\t\ttable.setPrefHeight(300);\n\t\t\t\ttable.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);\n\n\t\t\t\ttable.getSelectionModel().selectedIndexProperty().addListener(new RowSelectChangeListener());\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else if (gestionando.equals(\"Recolector\")) {\n\t\t\ttry {\n\t\t\t\tObservableList<PersonaObservable> recolectores = administradorDelegado.listarRecolectoresObservables();\n\t\t\t\ttable.setItems(recolectores);\n\t\t\t\tcolumnCedula.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"cedula\"));\n\t\t\t\tcolumnNombre.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"nombre\"));\n\t\t\t\tcolumnApellidos.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"apellido\"));\n\t\t\t\tcolumnTelefono.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"telefono\"));\n\t\t\t\ttable.getColumns().setAll(columnCedula, columnNombre, columnApellidos, columnTelefono);\n\t\t\t\ttable.setPrefWidth(450);\n\t\t\t\ttable.setPrefHeight(300);\n\t\t\t\ttable.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);\n\n\t\t\t\ttable.getSelectionModel().selectedIndexProperty().addListener(new RowSelectChangeListener());\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "public DataTableModel() {\n super();\n LanguageObservable.getInstance().attach(this);\n setLocalizedResourceBundle(\"ch.ethz.origo.jerpa.jerpalang.perspective.ededb.EDEDB\");\n initColumns();\n data = new LinkedList<DataRowModel>();\n }", "private void selectData() {\n String kolom[] = {\"NIS\", \"NamaSiswa\", \"TempatLahir\", \"TanggalLahir\", \"JenisKelamin\", \"Kelas\", \"Email\", \"Alamat\"};\n DefaultTableModel dtm = new DefaultTableModel(null, kolom);\n String SQL = \"SELECT * FROM t_siswa\";\n ResultSet rs = KoneksiDB.executeQuery(SQL);\n try {\n while (rs.next()) {\n String NIS = rs.getString(1);\n String NamaSiswa = rs.getString(2);\n String TempatLahir = rs.getString(3);\n String TanggalLahir = rs.getString(4);\n String JenisKelamin = \"\";\n if (\"L\".equals(rs.getString(5))) {\n JenisKelamin = \"Laki-Laki\";\n } else {\n JenisKelamin = \"Perempuan\";\n }\n String Kelas = rs.getString(6);\n String Email = rs.getString(7);\n String Alamat = rs.getString(8);\n String data[] = {NIS, NamaSiswa, TempatLahir, TanggalLahir, JenisKelamin, Kelas, Email, Alamat};\n dtm.addRow(data);\n }\n } catch (SQLException ex) {\n Logger.getLogger(frmMain.class).log(Level.SEVERE, null, ex);\n }\n tblData.setModel(dtm); //To change body of generated methods, choose Tools | Templates.\n }", "public void initTable_Pesanan(){\n //Set cell TableView\n id_pesan.setCellValueFactory(new PropertyValueFactory<Order, String>(\"Id\"));\n jumlah_pesan.setCellValueFactory(new PropertyValueFactory<Order, String>(\"Jumlah\"));\n harga_pesan.setCellValueFactory(new PropertyValueFactory<Order, Integer>(\"Harga\"));\n catatan_pesan.setCellValueFactory(new PropertyValueFactory<Order, String>(\"Catatan\"));\n hapus_pesan.setCellValueFactory(new PropertyValueFactory<Order, Button>(\"Hapus\"));\n\n //Editable\n catatan_pesan.setCellFactory(TextFieldTableCell.forTableColumn());\n catatan_pesan.setOnEditCommit(event ->\n {\n event.getTableView().getItems().get(event.getTablePosition().getRow()).setCatatan(event.getNewValue());\n });\n tablePesanan.setEditable(true);\n //Set TableView\n tablePesanan.setItems(list_order);\n }", "private void selectData() {\n String kolom[] = {\"ID\",\"Kasir\",\"Makanan\",\"Harga Makanan\",\"Minuman\",\"Harga Minuman\",\"Bayar\",\"Kembali\",\"Total\"};\n DefaultTableModel dtm = new DefaultTableModel(null, kolom);\n String SQL = \"SELECT * FROM tb_harga\";\n ResultSet rs = KoneksiDB.executeQuery(SQL);\n \n try\n {\n rs = KoneksiDB.executeQuery(SQL);\n while(rs.next())\n {\n String id = rs.getString(1);\n String kasir = rs.getString(2);\n String makanan = rs.getString(3);\n String hrg_makan = rs.getString(4);\n String minum = rs.getString(5);\n String hrg_minum = rs.getString(6);\n String bayar = rs.getString(7);\n String kembali = rs.getString(8);\n String total = rs.getString(9);\n \n String data[] = {id,kasir,makanan,hrg_makan,minum,hrg_minum,bayar,kembali,total};\n dtm.addRow(data);\n }\n }\n catch(SQLException ex)\n {\n Logger.getLogger(Home.class.getName()).log(Level.SEVERE, null, ex);\n }\n tData.setModel(dtm); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\n public void tableRows_()\n {\n }", "private ArrayList<FornecedorModelo> iniciaTabela() {\n int i;\n DefaultTableModel model=(DefaultTableModel)tblFornecedor.getModel();\n // atribui 0 linhas à coluna\n model.setNumRows(0);\n // atribui um tamanho fixo a coluna codigo\n tblFornecedor.getColumnModel().getColumn(0).setPreferredWidth(2);\n ArrayList<FornecedorModelo> listaFornecedores = new ArrayList<FornecedorModelo>();\n listaFornecedores = new FornecedorControle().listarFornecedor();\n //adiciona alunos as tabelas\n for (i=0;i<=listaFornecedores.size()-1;i++){\n model.addRow(\n new Object[]{\n listaFornecedores.get(i).getCodFornecedor(),\n listaFornecedores.get(i).getNomeFantasia(),\n listaFornecedores.get(i).getRazaoSocial(),\n listaFornecedores.get(i).getEndereco(),\n listaFornecedores.get(i).getEmail(),\n listaFornecedores.get(i).getTelefone(),\n listaFornecedores.get(i).getCnpj(),\n Boolean.FALSE\n }\n );\n }\n return listaFornecedores;\n }", "public void SetModel() {\n try {\n con = dc.connect();\n tb_User.setModel(user_model);\n stmt2 = con.createStatement();\n vtdata_user = new Vector();\n vtcolumn_user = new Vector();\n\n //Add Header for User Table Model\n vtcolumn_user.add(\"UserName\");\n vtcolumn_user.add(\"Full Name\");\n vtcolumn_user.add(\"Email\");\n vtcolumn_user.add(\"Birthday\");\n vtcolumn_user.add(\"Gender\");\n vtcolumn_user.add(\"Phone\");\n String sqlUser = \"select UserName,u_name,Email,BirthDate,Gender,Phone from tblUsers\";\n ResultSet rsUser = stmt2.executeQuery(sqlUser);\n\n\n\n while (rsUser.next()) {\n\n Vector temp = new Vector();\n\n temp.add(rsUser.getString(1));\n temp.add(rsUser.getString(2));\n temp.add(rsUser.getString(3));\n // temp.add(rsUser.getDate(\"BirthDate\"));\n\n temp.add(formatDate.format(rsUser.getDate(4)));\n boolean gender = rsUser.getBoolean(5);\n\n\n if (gender == true) {\n temp.add(\"Male\");\n }\n\n if (gender == false) {\n temp.add(\"Female\");\n }\n temp.add(rsUser.getString(6));\n vtdata_user.add(temp);\n }\n\n\n user_model = new DefaultTableModel(vtdata_user, vtcolumn_user) {\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return false;\n }\n };\n tb_User.setModel(user_model);\n\n dc.disconnect(rsUser);\n dc.disconnect(stmt2);\n dc.disconnect(con);\n } catch (SQLException ex) {\n Logger.getLogger(UserManagement.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void setTable() {\n try {\n DefaultTableModel dtm = (DefaultTableModel) table.getModel();\n dtm.setRowCount(0);\n ArrayList<Item> itemList = ItemController.getAllItem();\n if (itemList != null) {\n for (Item item : itemList) {\n String qoh = BatchController.getQOH(item.getCode());\n if (qoh != null) {\n if (item.getRol() >= Integer.valueOf(qoh)) {\n Object row[] = {item.getCode(), item.getDesciption(), item.getRol(), qoh};\n dtm.addRow(row);\n }\n }\n\n }\n }\n if (dtm.getRowCount() == 0) {\n JOptionPane.showMessageDialog(this, \"Stock level is above ROL\");\n }\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(ROL.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(ROL.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public jpQLHoKhau() {\n initComponents();\n tableModel = (DefaultTableModel) tblDG.getModel();\n tableModel2 = (DefaultTableModel) tblTP.getModel();\n fillTblDG();\n fillTblTP();\n }", "private void fillData() {\n table.setRowList(data);\n }", "public void bindingTable() {\n String[] header = {\"Cuti ID\", \"Tanggal Awal\", \"Tanggal Akhir\", \"Keterangan\", \"Cuti Khusus ID\"};\n DefaultTableModel defaultTableModel = new DefaultTableModel(header, 0);\n for (Cuti cuti : cutiController.binding()) {\n Object[] cuti1 = {\n cuti.getCutiId(), cuti.getCkId(), cuti.getTanggalAwal(), cuti.getTanggalAkhir(), cuti.getKeterangan()\n };\n this.cmbCutiKhususID.addItem(cuti1[2].toString());\n defaultTableModel.addRow(cuti1);\n }\n tblCuti.setModel(defaultTableModel);\n }", "public EditingTable() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public void updateModeloPagoLaboratorio() throws Exception{\n ArrayList<Pago> pgAbono = PagoDB.listarPagosDePlanTratamientoLab(tratamientotoSelected.getIdPlanTratamiento());\n \n \n int m = this.columnasNombrePagoLab.length;\n ArrayList<Object []> objetos = new ArrayList<Object []>();\n String aux = this.costoAbono.getText();\n int total = Integer.parseInt(aux.substring(1, aux.length()));\n for(Pago pagAbn : pgAbono){\n\n String tipoPago = pagAbn.getTipoPago();\n String detalle = pagAbn.getDetalle();\n String fecha = girarFecha(pagAbn.getFecha());\n String valor = pagAbn.getAbono()+\"\";\n int numBoleta = pagAbn.getNumBoleta();\n total = total + pagAbn.getAbono();\n Object [] fila = new Object [] {new Item (tipoPago,pagAbn.getIdPago()), detalle, fecha, \"$\"+valor, numBoleta+\"\"};\n objetos.add(fila);\n \n }\n costoAbono.setText(\"$\"+total);\n int id = tratamientotoSelected.getIdPlanTratamiento();\n PlanTratamiento planTrat = PlanTratamientoDB.getPlanTratamiento(id);\n planTrat.setTotalAbonos(total);\n //calculando el porcentaje de abance\n int cosTotal=tratamientotoSelected.getCostoTotal();\n int avance= total*100/cosTotal;\n planTrat.setAvance(avance);\n \n PlanTratamientoDB.editarPlanTratamiento(planTrat);\n //System.out.println(\"total 1:\"+total+\"id:\"+id);\n \n this.filasPagoLab = new Object [objetos.size()][m];\n int i = 0;\n for(Object [] o : objetos){\n this.filasPagoLab[i] = o;\n i++;\n }\n \n this.modeloPagoLab = new DefaultTableModel(this.filasPagoLab, this.columnasNombrePagoLab) {\n Class[] types = new Class [] {\n String.class, Item.class, String.class, String.class, String.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n };\n \n this.tablaPagoLaboratorio.setModel(modeloPagoLab);\n \n this.iniciarTablaPlanesTratamientos();\n //habilitarBoton();\n }", "public void listarutilizador() {\n \n \n List<Utilizador> cs =new UtilizadorJpaController().findUtilizadorEntities();\n \n DefaultTableModel tbm=(DefaultTableModel) listadeutilizador.getModel();\n \n for (int i = tbm.getRowCount()-1; i >= 0; i--) {\n tbm.removeRow(i);\n }\n int i=0;\n for (Utilizador c : cs) {\n tbm.addRow(new String[1]);\n listadeutilizador.setValueAt(c.getIdutilizador(), i, 0);\n listadeutilizador.setValueAt(c.getNome(), i, 1);\n listadeutilizador.setValueAt(c.getUtilizador(), i, 2);\n listadeutilizador.setValueAt(c.getIdprevilegio().getPrevilegio(), i, 3);\n// listaderelatorio.setValueAt(f.getTotal(), i, 4);\n// Distrito di = new DistritoJpaController().getDistritoByLoc(f.getIdlocalidade());\n// Localidade lo = new LocalidadeJpaController().findLocalidade(f.getIdlocalidade());\n// listaderelatorio.setValueAt(di.getDistrito(), i, 0);//lo.getIdposto().getIddistrito().getDistrito(), i, 0);\n// listaderelatorio.setValueAt(lo.getLocalidade(), i, 1);\n \n//// listadeformando.setValueAt(f.getSexo(), i, 2);\n// listaderelatorio.setValueAt(f.getQhomem(), i, 2);\n// listaderelatorio.setValueAt(f.getQmulher(), i, 3);\n// listaderelatorio.setValueAt(f.getTotal(), i, 4);\n// \n// \n i++;\n }\n \n \n \n }", "private EstabelecimentoTable() {\n\t\t\t}", "private static void setTableWithData()\n {\n /* Se establecen el tamaño de la tabla */\n table.setSize(1280, 630);\n table.setMaximumSize(new Dimension(1280, 630));\n table.setMinimumSize(new Dimension(1280, 630));\n\n /* Se garantiza que cada fila (album) tiene un alto proporcional de acuerdo con el numero de cancioens */\n Iterator iteratorPerRow = listSizePerRow.iterator();\n int sizePerRow, i;\n i = 0;\n while (iteratorPerRow.hasNext())\n {\n sizePerRow = (Integer) iteratorPerRow.next(); \n table.setRowHeight(i, sizePerRow);\n i++;\n }\n\n /* Se setea el ancho de cada columna */\n setSize(table, JSoundsMainWindowViewController.ALBUM_COVER_COLUMN, 200);\n setSize(table, JSoundsMainWindowViewController.ALBUM_INFO_COLUMN, 230);\n setSize(table, JSoundsMainWindowViewController.NUMBER_SONG_COLUMN, 50);\n setSize(table, JSoundsMainWindowViewController.LIST_SONG_COLUMN, 400);\n setSize(table, JSoundsMainWindowViewController.GENDER_SONG_COLUMN, 230);\n\n /* Renderizado del la imagen del album */\n JLabelTableRenderer jltcr = new JLabelTableRenderer();\n jltcr.setVerticalAlignment(SwingConstants.TOP);\n jltcr.setHorizontalAlignment(SwingConstants.CENTER);\n\n table.getColumnModel().getColumn(0).setCellRenderer(jltcr);\n\n\n /* Renderizados de cada columna */\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.ALBUM_INFO_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.ALBUM_INFO_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.NUMBER_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.NUMBER_SONG_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LIST_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LIST_SONG_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.GENDER_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.GENDER_SONG_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LAST_PLAYED_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LAST_PLAYED_SONG_COLUMN).setCellEditor(new JListTableEditor()); \n }", "public void carga_bd_empleados(){\n try {\n Connection conectar = Conexion.conectar();\n PreparedStatement pst = conectar.prepareStatement(\n \"select nombre, edad, cargo, direccion, telefono from empleados\");\n\n ResultSet rs = pst.executeQuery();\n\n table = new JTable(model);\n jScrollPane1.setViewportView(table);\n table.setBackground(Color.yellow);\n\n model.addColumn(\"Nombre\");\n model.addColumn(\"Edad\");\n model.addColumn(\"Cargo\");\n model.addColumn(\"Direccion\");\n model.addColumn(\"Telefono\");\n\n while (rs.next()) {\n Object[] fila = new Object[8];\n //material mimaterial = new material();\n\n for (int i = 0; i < 5; i++) {\n fila[i] = rs.getObject(i + 1);\n }\n\n// model.addRow(fila);\n Empleado mimaterial = this.ChangetoEmpleado(fila);\n this.AddToArrayTableEmpleado(mimaterial);\n\n }\n\n conectar.close();\n \n } catch (SQLException e) {\n System.err.println(\"Error al llenar tabla\" + e);\n JOptionPane.showMessageDialog(null, \"Error al mostrar informacion\");\n\n }\n }", "private void vulTabel() {\n\t\ttblSessies.setItems(sc.getSessieObservableLijst());\n\t\tclnTitel.setCellValueFactory(cel -> cel.getValue().getTitelProperty());\n\t\tclnVerantwoordelijke.setCellValueFactory(cel -> cel.getValue().getVerantwoordelijkeNaamProperty());\n\t\tclnStartdatum.setCellValueFactory(cel -> cel.getValue().getStartDatumProperty());\n\t\tclnDuur.setCellValueFactory(cel -> cel.getValue().getDuurProperty());\n\t\ttblSessies.getSelectionModel().selectedItemProperty().addListener((obs, oldV, newV) -> {\n\t\t\tsc.setSessie(newV);\n\t\t});\n\t\tthis.setVgrow(tblSessies, Priority.SOMETIMES);\n\t}", "public void setCalendarForModel(Calendar calend) {\n this.cal = calend;\n //fireTableDataChanged();\n refresh();\n}", "public void atualizarTabelaFunc() throws SQLException {\n DefaultTableModel model = (DefaultTableModel) tabelaFunc.getModel();\n model.setNumRows(0);\n dadosDAO dados = new dadosDAO();\n String pesquisa = funcField.getText().toUpperCase();\n for (funcionario func : dados.readFuncionarios()){\n if (!funcField.getText().equals(\"\")){\n if (nomeBtnFunc.isSelected()){\n if (func.getNome().contains(pesquisa)){\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n } else if (cpfBtnFunc.isSelected()){\n if (funcField.getText().equals(func.getCpf())) {\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n } else {\n if (funcField.getText().equals(String.valueOf(func.getId_func()))){\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n }\n } else {\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n }\n }", "private void enlazarListadoTabla() {\n tblCursos.setItems(listaCursos);\n\n //Enlazar columnas con atributos\n clmNombre.setCellValueFactory(new PropertyValueFactory<Curso, String>(\"nombre\"));\n clmAmbito.setCellValueFactory(new PropertyValueFactory<Curso, String>(\"familiaProfesional\"));\n clmDuracion.setCellValueFactory(new PropertyValueFactory<Curso, Integer>(\"duracion\"));\n }", "private void refreshTable(){\n DefaultTableModel dm = (DefaultTableModel)table.getModel();\r\n dm.getDataVector().removeAllElements();\r\n System.out.println(\"Refresh Table\");\r\n\r\n //calling method addRows\r\n addRows();\r\n }" ]
[ "0.72920996", "0.70169073", "0.69914114", "0.696322", "0.69038564", "0.68977416", "0.687209", "0.68341696", "0.67995375", "0.67816603", "0.6780183", "0.6767789", "0.67128634", "0.66866696", "0.66822296", "0.6672459", "0.6647186", "0.6636696", "0.66323", "0.66313785", "0.6628313", "0.6612422", "0.6607016", "0.660606", "0.65915596", "0.6583829", "0.6582032", "0.6573741", "0.6568451", "0.6557267", "0.65493834", "0.6548829", "0.654278", "0.65365076", "0.65095377", "0.6497429", "0.64901066", "0.6478477", "0.64728916", "0.64631414", "0.64606655", "0.6457895", "0.6433977", "0.6432718", "0.64108384", "0.6408194", "0.6407139", "0.639434", "0.6390189", "0.63896006", "0.6388263", "0.6362674", "0.6339774", "0.6334587", "0.63336533", "0.6332787", "0.6313308", "0.63111556", "0.6308343", "0.6304239", "0.63035166", "0.62925017", "0.6290815", "0.6290583", "0.62867105", "0.62844825", "0.6281293", "0.62747234", "0.6274475", "0.62713295", "0.6252891", "0.62517613", "0.6249788", "0.62484574", "0.62452185", "0.6240957", "0.6239734", "0.6234583", "0.6232116", "0.6230506", "0.6229265", "0.62054545", "0.620181", "0.6201539", "0.61991274", "0.61935776", "0.6191516", "0.6189333", "0.61890805", "0.6186232", "0.6176441", "0.61756855", "0.6171457", "0.6171058", "0.61687297", "0.61680377", "0.61635995", "0.6154476", "0.61432135", "0.6143113", "0.61374915" ]
0.0
-1
De methode voor de rendersetup.
public void setupRenderer(int column) { tcm = this.getColumnModel(); tcm.getColumn(column).setCellRenderer(new NumberRenderer()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setupRender() {\n\t\tif (!init()) {\n\t\t\tisAccess = false;\n\t\t\treturn;\n\t\t}\n\t}", "@Override\n public void beforeRender()\n {\n\n }", "void setupRender() {\n\t\t_highlightFacilityId = _facilityId;\n\t}", "public void render(){\n//\t\tsetCards();\n//\t\tsetMurderInfo();\n\t}", "protected void render(){}", "public void render() {\r\n\r\n }", "@Override\n public void simpleRender(RenderManager rm) {\n }", "@Override\n public void simpleRender(RenderManager rm) {\n }", "@Override\n public void simpleRender(RenderManager rm) {\n }", "@Override\n public void simpleRender(RenderManager rm) {\n }", "@Override\n public void simpleRender(RenderManager rm) {\n }", "@Override\n public void simpleRender(RenderManager rm) {\n }", "public void render()\r\n\t{\n\t}", "@Override\r\n\tpublic void render() {\n\t\t\r\n\t}", "@Override\n\tpublic void render() {\n\t\t\n\t}", "public void render() {\n }", "public void registerRenderInformation() {\n\t}", "@Override\r\n\tpublic void simpleRender(RenderManager rm) {\n\t}", "@Override\r\n\tpublic void render() {\n\r\n\t}", "@Override\n protected void initViewSetup() {\n }", "@Override\n\tpublic void render () {\n\n\t}", "@Override\n public void render() { super.render(); }", "protected void preRender()\n {\n // subclass\n }", "@Override\n\tpublic void render () {\n super.render();\n\t}", "@Override\n public void render() {\n super.render();\n }", "@Override\n public void render() {\n super.render();\n }", "@Override\n \tprotected void controlRender(RenderManager rm, ViewPort vp) {\n \n \t}", "public void render();", "public void render() {\n\t\t// do nothing... as we should\n\t}", "protected void viewSetup() {\n\t\t// TODO Auto-generated method stub\n\n\t}", "@Override\n\tpublic void forceRender() {\n\n\t}", "public void registerRenderInformation()\n\t{\n\t //unused server side. -- see ClientProxy for implementation\n\t}", "@Before\n public void setUp()\n {\n _renderable = new Renderable();\n }", "void onRender(RenderArguments arguments);", "@Override\n\tprotected void controlRender(RenderManager rm, ViewPort vp) {\n\t\t\n\t}", "@Before\n \tpublic static void setup() {\n \t\trenderArgs.put(\"base\", request.getBase());\n\t\tString location = request.getBase() + \"/services/RawService.wsdl\";\n \t\trenderArgs.put(\"wsdl\", location);\n \t}", "@Override\n public void setRenderer(Object arg0)\n {\n \n }", "@Override\n\tpublic void renderSource() {\n\t\t\n\t}", "@Override\r\n protected void controlRender(RenderManager rm, ViewPort vp) {\n }", "@Override\n protected void controlRender(RenderManager rm, ViewPort vp) {\n }", "void render(Object rendererTool);", "void setupRender() {\n List<Predmet> predmets = adminService.findAllPredmetsForPredavac(predavac);\n // create a SelectModel from my izlistaj of colors\n predmetSelectModel = selectModelFactory.create(predmets, \"name\");\n years = adminService.getYears();\n// List<Aktivnost> activities = adminService.getActivities(1, 2015);\n }", "public abstract void render(Renderer renderer);", "@Override\n public void prerender() {\n }", "@Override\n public void setToBeRendered(boolean arg0)\n {\n \n }", "public void beforeDraw()\n {\n INDirector.setProjection(ProjectionFormat.DirectorProjection2D);\n this.grabber.beforeRender();\n }", "void dynamicRendering();", "public native void initRendering();", "public native void initRendering();", "@Before\n\tpublic static void setup() {\n\t\trenderArgs.put(\"base\", request.getBase());\n\t\tString location = request.getBase() + \"/services/MonitoringService\";\n\t\trenderArgs.put(\"location\", location);\n\t}", "private void renderHook(){\n\t\thook.setPosition(world.hook.position.x, world.hook.position.y);\n\t\thook.setRotation(world.hook.rotation);\n\t\thook.draw(batch);\n\t}", "void onRenderGui(RenderArguments arguments);", "void setupRender() {\n List<Predmet> predmets = adminService.findAllPredmetsForPredavac(predavac);\n\n // create a SelectModel from my izlistaj of colors\n predmetSelectModel = selectModelFactory.create(predmets, \"name\");\n }", "public void registerRenderer() {}", "public void registerRenderer() {}", "@Override\n public boolean isToBeRendered()\n {\n return true;\n }", "public void render() {\n renderHud();\n }", "@Override\n\tpublic void render() {\n\t\tScreen.render();\n\t}", "public void prerender() {\n }", "public void prerender() {\n }", "public void startRendering() {\n if (!justRendered) {\n justRendered = true;\n \n if (Flags.wireFrame) p.render_wireFrame();\n else p.render();\n }\n }", "void updateRenderEngine() {\n if (renderEngine == null)\n renderEngine = this.game.p;\n }", "public void setup() {\n\t\t//This throws an exception and causes us to reenter once \"frame\" exists\n\t\tsize(VIEW_WIDTH,VIEW_HEIGHT,P2D);\n\t\ttxt = createFont(\"Vera.ttf\",90,true);\n\t\tframeRate(60);\n\t\tif (!frame.isResizable()){\n\t\t\tframe.setResizable(true);\n\t\t}\n\t}", "private void render() {\n\n StateManager.getState().render();\n }", "public void setRender(boolean render)\r\n/* 294: */ {\r\n/* 295:315 */ this.render = render;\r\n/* 296: */ }", "@Override\n public int getRenderType()\n {\n return 22;\n }", "protected void render() {\n\t\tString accion = Thread.currentThread().getStackTrace()[2].getMethodName();\n\t\trender(accion);\n\t}", "public void setupLayout() {\n // left empty for subclass to override\n }", "@Override\n protected boolean isRenderScriptEnable() {\n return true;\n }", "protected void setupUI() {\n\n }", "protected void setUpRenderKit() throws Exception\n {\n RenderKitFactory renderKitFactory = (RenderKitFactory) FactoryFinder\n .getFactory(FactoryFinder.RENDER_KIT_FACTORY);\n renderKit = new MockRenderKit();\n renderKitFactory.addRenderKit(RenderKitFactory.HTML_BASIC_RENDER_KIT,\n renderKit);\n }", "@Override\r\n\tprotected final void setup() {\r\n \tsuper.setup();\r\n\r\n \tdoSetup();\r\n }", "protected void onComponentRendered()\n\t{\n\t}", "@Override\n\tpublic void render(float delta) {\n\n\t}", "public void registerRenders() {\n }", "public void render () \n\t{ \n\t\trenderWorld(batch);\n\t\trenderGui(batch);\n\t}", "@Override\n\tpublic void render(float delta) {\n\t}", "@Override\n\tpublic void setUpScreenElements() {\n\t\t\n\t}", "protected void render() {\n\t\tentities.render();\n\t\t// Render GUI\n\t\tentities.renderGUI();\n\n\t\t// Flips the page between the two buffers\n\t\ts.drawToGraphics((Graphics2D) Window.strategy.getDrawGraphics());\n\t\tWindow.strategy.show();\n\t}", "@Override\r\n\tpublic void setup(){\r\n\t\tif (!settingsLoadedFromFile){ //because initialize() method isnt called in the swing integration/example\r\n\t\t\tgetSettingsFromFile();\r\n\t\t}\r\n\t\t\r\n\t\t// Applet size - size() must be the first command in setup() method\r\n\t\tif (MT4jSettings.getInstance().getRendererMode() == MT4jSettings.OPENGL_MODE)\r\n\t\t\tthis.size(MT4jSettings.getInstance().getWindowWidth(), MT4jSettings.getInstance().getWindowHeight(), CUSTOM_OPENGL_GRAPHICS);\r\n\t\telse if (MT4jSettings.getInstance().getRendererMode() == MT4jSettings.P3D_MODE)\r\n\t\t\tthis.size(MT4jSettings.getInstance().getWindowWidth(), MT4jSettings.getInstance().getWindowHeight(), PApplet.P3D);\r\n\t\t\r\n\t\t//TOGGLES ALWAYS ON TOP MODE\r\n\t\t//this.frame.setAlwaysOnTop(true);\r\n\t\t\r\n\t\t//Add default font factories /////////////\r\n\t\t//Register default font factories\r\n\t\tFontManager.getInstance().registerFontFactory(\".ttf\", new TTFontFactory());\r\n\t\tFontManager.getInstance().registerFontFactory(\".svg\", new SvgFontFactory());\r\n\t \r\n\t\tBitmapFontFactory bitmapFontFactory = new BitmapFontFactory();\r\n//\t\tthis.registerFontFactory(\".ttf\", bitmapFontFactory); // TEST\r\n\t\tFontManager.getInstance().registerFontFactory(\"\", bitmapFontFactory);\r\n\t\tFontManager.getInstance().registerFontFactory(\".vlw\", bitmapFontFactory);\r\n\t\tFontManager.getInstance().registerFontFactory(\".otf\", bitmapFontFactory);\r\n\t \r\n\t\tFontManager.getInstance().registerFontFactory(\".bold\", bitmapFontFactory);\r\n\t\tFontManager.getInstance().registerFontFactory(\".bolditalic\", bitmapFontFactory);\r\n\t\tFontManager.getInstance().registerFontFactory(\".italic\", bitmapFontFactory);\r\n\t\tFontManager.getInstance().registerFontFactory(\".plain\", bitmapFontFactory);\r\n\t\t//////////////////////\r\n\t\t\r\n\t\t/////////////////////// //FIXME TEST\r\n\t\tPlatformUtil.setGraphicsUtilProvider(new DesktopPlatformUtil(this));\r\n\t\t///////////////////////\r\n\t\t\r\n\t\t/////////////////////\r\n\t\t//Add default 3D model factories for .3ds and for .obj files\r\n\t\tModelImporterFactory.registerModelImporterFactory(\".3ds\", Model3dsFileFactory.class);\r\n\t\tModelImporterFactory.registerModelImporterFactory(\".obj\", ModelObjFileFactory.class);\r\n\t\t////////////////////\r\n\t\t\r\n\t\t\r\n\t\t//Check if OS 32/64 Bit\r\n\t\tString bit = System.getProperty(\"sun.arch.data.model\");\r\n\t\tlogger.info(\"Platform: \\\"\" + System.getProperty(\"os.name\") + \"\\\" -> Version: \\\"\" + System.getProperty(\"os.version\") + \"\\\" -> JVM Bit: \\\"\" + bit + \"\\\"\"); \r\n\t\tMT4jSettings.getInstance().architecture = bit.contains(\"64\")? MT4jSettings.ARCHITECTURE_64_BIT : MT4jSettings.ARCHITECTURE_32_BIT;\r\n\t\t\r\n\t\t//Switch to different resolution in fullscreen exclusive mode if neccessary\r\n\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\tif (MT4jSettings.getInstance().isFullscreen() && MT4jSettings.getInstance().isFullscreenExclusive() && MT4jSettings.getInstance().getWindowWidth() != screenSize.width && MT4jSettings.getInstance().getWindowHeight() != screenSize.height){\r\n\t\t\tswitchResolution();\r\n\t\t}\r\n\t\t\r\n\t /*\r\n\t //Processing Bug? seems to always use 2 samples \r\n\t if (MT4jSettings.getInstance().getNumSamples() <= 0){\r\n\t \thint(DISABLE_OPENGL_2X_SMOOTH);\r\n\t }else if (MT4jSettings.getInstance().getNumSamples() == 2){\r\n\t \t//Nothing to set, Processing default anyway\r\n\t }else if (MT4jSettings.getInstance().getNumSamples() == 4){\r\n\t \thint(DISABLE_OPENGL_2X_SMOOTH);\r\n\t \thint(ENABLE_OPENGL_4X_SMOOTH);\r\n\t }\r\n\t */\r\n\t \r\n\t\t//hint(ENABLE_DEPTH_SORT); // Enable primitive z-sorting of triangles and lines in P3D and OPENGL. This can slow performance considerably, and the algorithm is not yet perfect.\r\n\t\t//hint(DISABLE_ERROR_REPORT); // Speeds up the OPENGL renderer setting by not checking for errors while running.\r\n\t\t//hint(ENABLE_ACCURATE_TEXTURES); //Enables better texture accuracy for the P3D renderer. This option will do a better job of dealing with textures in perspective. \r\n\t\t\r\n\t\t// Save this applets rendering thread for reference\r\n\t\tthis.renderThread = Thread.currentThread();\r\n\t\t//System.out.println(\"Current Thread: \"+ Thread.currentThread());\r\n\t\t\r\n\t\t// Set frame icon image\r\n\t\ttry {\r\n\t\t\t//Set the window frame's title\r\n\t\t\tframe.setTitle(MT4jSettings.getInstance().getFrameTitle()); \r\n\t\t\tthis.mt4jIcon = new ImageIcon(Thread.currentThread().getContextClassLoader().getResource(MT4jSettings.getInstance().getDefaultImagesPath() + \r\n\t\t\t\"MT4j.gif\"));\r\n\t\t\tthis.frame.setIconImage(mt4jIcon.getImage()); \r\n\t\t}catch (Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"MT4j window dimensions: \\\"\" + MT4jSettings.getInstance().getWindowWidth() + \" X \" + MT4jSettings.getInstance().getWindowHeight() + \"\\\"\");\r\n\t\t\r\n//\t\t//Set background color\r\n//\t pContext.background(MT4jSettings.getInstance().getBackgroundClearColor());\r\n\t\tbackground(150);\r\n\t\t\r\n\t\t//Set the framerate\r\n\t frameRate(MT4jSettings.getInstance().getMaxFrameRate());\r\n\t logger.info(\"Maximum framerate: \\\"\" + MT4jSettings.getInstance().getMaxFrameRate() + \"\\\"\");\r\n\t \r\n\t //FIXME TODO add in settings.txt?\r\n\t hint(AbstractMTApplication.DISABLE_OPENGL_ERROR_REPORT);\r\n\t\t\r\n\t\tMT4jSettings.getInstance().programStartTime = System.currentTimeMillis();\r\n\t\t\r\n\t\t//Apply some opengl settings like V-Syncing or multi-Sampling\r\n\t\tthis.applyOpenGLStartSettings();\r\n\t\t\r\n\t\t//Create a new inputsourcePool\r\n\t\tif (getInputManager() == null){ //only set the default inputManager if none is set yet\r\n\t\t\tthis.setInputManager(new DesktopInputManager(this, true));\r\n\t\t}\r\n\t\t\r\n\t\tAniAnimation.init(this); //Initialize Ani animation library\r\n\t\t\r\n\t\t/*\r\n\t\t* Resizable Window test\r\n\t\t* Problems:\r\n\t\t* - all textures, shaders etc get destroyed because a new gl context is created\r\n\t\t* - cursor coordiantes are calculated wrong? we prolly have to update Papplet width/height \r\n\t\tframe.setResizable(true);\r\n\t\tframe.addComponentListener(new ComponentAdapter() {\r\n\t\t\tpublic void componentResized(ComponentEvent e) {\r\n\t\t\t\tif(e.getSource() == frame) { \r\n\t\t\t\t\tframe.setSize(frame.getWidth(), minHeight); \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//Call startup at the end of setup(). Should be overridden in extending classes\r\n\t\tthis.startUp();\r\n\t}", "protected void initRenderer(final IScope scope) {\n\r\n\t}", "public int getRenderType()\n {\n return 2;\n }", "private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}", "private void initRendering() {\n ring = new Ring(0.3f, 0.7f);\n line = new Line(ImageTargets.screenWidth / 2, ImageTargets.screenHeight / 2);\n state_txt = createObject(68f, state_txt_cx, state_txt_cy, R.drawable.state);\n state_img = createObject(120f, state_img_cx, state_img_cy, R.drawable.open);\n record_txt = createObject(68f, record_txt_cx, record_txt_cy, R.drawable.record_txt);\n record_img = createObject(95f, record_img_cx, record_img_cy, R.drawable.record_img);\n recog_txt = createObject(68f, recog_txt_cx, recog_txt_cy, R.drawable.recog_txt);\n recog_img = createObject(155, recog_img_cx, recog_img_cy, R.drawable.person);\n record_num = createObject(85, record_num_cx, record_num_cy, R.drawable.num);\n\n histogram = createHistogram(85, 275.0f, 1150, 2.0f);\n histogram1 = createHistogram(85, 405, 1150, 2.2f);\n histogram2 = createHistogram(85, 540, 1150, 2.58f);\n histogram3 = createHistogram(85, 675, 1150, 0.9f);\n mRenderer = Renderer.getInstance();\n\n GLES20.glClearColor(0.0f, 0.0f, 0.0f, Vuforia.requiresAlpha() ? 0.0f\n : 1.0f);\n setBgTransparent();\n //初始化纹理\n initTexture(res);\n mActivity.loadingDialogHandler\n .sendEmptyMessage(LoadingDialogHandler.HIDE_LOADING_DIALOG);\n\n }", "@Override\n public void render() {\n\n renderer.prepWindowRender(globalGameData.getGameWindow());\n renderer.setRenderSpace(0,0,500,500);\n\n\n renderEnvironment(getMainCamera(),testPlayer.getPlayerEntity().getEntityView().getViewableRegions(), instancedGridMesh);\n renderer.enableTransparency();\n walkieTalkie.render(renderer,renderer.getRenderWidth());\n renderer.disableTransparency();\n\n\n\n renderer.setRenderSpace(500,0,500,500);\n if (currentPlayers.containsKey(UUID.fromString(\"087954ba-2b12-4215-9a90-f7b810797562\"))) {\n renderEnvironment(getMainCamera(),currentPlayers.get(UUID.fromString(\"087954ba-2b12-4215-9a90-f7b810797562\")).getEntityView().getViewableRegions(), instancedGridMesh);\n }\n\n renderer.setRenderSpace(1000,0,500,500);\n renderer.enableTransparency();\n renderer.render2DTextItems(debugItems, \"Default2D\");\n renderer.disableTransparency();\n\n /*\n if (currentPlayers.containsKey(UUID.fromString(\"087954ba-2b12-4215-9a90-f7b810797562\"))) {\n renderer.setRenderSpace(500, 0, 500, 500);\n for (Region region : currentPlayers.get(UUID.fromString(\"087954ba-2b12-4215-9a90-f7b810797562\")).getEntityView().getViewableRegions()) {\n for (Block block : region.getBlocksArray()) {\n if (block instanceof CustomRenderBlock) {\n ((CustomRenderBlock) block).renderCustomBlock(renderer, camera);\n }\n }\n for (Entity entity : region.getEntities()) {\n entity.render(renderer, camera);\n }\n }\n }\n */\n\n\n //renderer.setRenderSpace(500,0,280,500);\n //SpriteItem spriteItem = new SpriteItem(AssetLoader.getTextureAsset(\"Noise\"),280,500,true);\n //spriteItem.setPosition(0,0,0);\n //renderer.render2DSpriteItem(spriteItem,\"Default2D\");\n //spriteItem.cleanup();\n\n\n\n /*\n renderer.getShader(\"DebugShader2D\").bind();\n glActiveTexture(GL_TEXTURE1);\n glBindTexture(GL_TEXTURE_2D, shaderTestBitmap.getId());\n glActiveTexture(GL_TEXTURE2);\n glBindTexture(GL_TEXTURE_2D, shaderTestEffect1.getId());\n glActiveTexture(GL_TEXTURE3);\n glBindTexture(GL_TEXTURE_2D, shaderTestEffect2.getId());\n glActiveTexture(GL_TEXTURE4);\n glBindTexture(GL_TEXTURE_2D, shaderTestEffect3.getId());\n renderer.getShader(\"DebugShader2D\").setUniform(\"bitmap\", 1);\n renderer.getShader(\"DebugShader2D\").setUniform(\"effect1\", 2);\n renderer.getShader(\"DebugShader2D\").setUniform(\"effect2\", 3);\n renderer.getShader(\"DebugShader2D\").setUniform(\"effect3\", 4);\n i++;\n i %= 600;\n float framePercent = i / 600.0f;\n renderer.getShader(\"DebugShader2D\").setUniform(\"frame\", framePercent);\n System.out.println(i);\n shaderTest.setPosition((float)gameInput.getMouseX(),(float)gameInput.getMouseY(),0);\n renderer.render2DSprite(shaderTest, \"DebugShader2D\");\n */\n\n\n\n\n\n }", "@Override\n\tpublic void render(SpriteBatch batch) {\n\t}", "@Override\r\n\tpublic void beforeRender(float dt) {\n\r\n\t}", "@Override\n\tpublic void render(float deltaTime) {\n\t\t\n\t}", "public void registerRenderers() {\n\n\t}", "public void render() {\n uiBatch.begin();\n for (int x = 0; x < uiManager.getUIComponents().size();x++) {\n uiManager.getUIComponent(x).render(uiBatch, Assets.patch);\n }\n if (uiManager.dialogue != null) {\n uiManager.dialogue.render(uiBatch, Assets.patch);\n }\n if (!uiManager.notifications.isEmpty()) {\n uiManager.notifications.get(0).render(uiBatch, Assets.patch);\n }\n uiManager.partyMenu.render(uiBatch, Assets.patch);\n uiBatch.end();\n }", "@Override\n public void setupPanel()\n {\n\n }", "@Override\n public void enrichRenderQueue(RenderQueue renderQueue) {\n }", "protected void initRender() {\n glActiveTexture(GL_TEXTURE0);\n // Bind the texture\n glBindTexture(GL_TEXTURE_2D, texture.getId());\n\n // Draw the mesh\n glBindVertexArray(vaoId);\n glEnableVertexAttribArray(0);\n glEnableVertexAttribArray(1);\n }", "@Override\n public int getRenderType()\n {\n return 31;\n }", "void render(GraphicsContext gc, double xOffSet, double yOffSet);", "@Override\n public void runInit() {\n }", "@Override\r\n\tprotected void processInit() {\n\r\n\t}", "@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}", "private void doBeforeRenderResponse(final PhaseEvent arg0) {\n\t}", "public void draw(final FrameRenderParameters frameRenderParameters) {\n\t\t\n\t\t// prepare\n\t\tif (renderUnits == null) {\n\t\t\tList<RenderUnit> renderUnitList = new ArrayList<>();\n\t\t\tfor (final RenderableSection renderableSection : renderableSections.values()) {\n\t\t\t\trenderableSection.prepare(engineParameters.getSectionRenderer());\n\t\t\t\tfor (RenderUnit renderUnit : renderableSection.getRenderUnits()) {\n\t\t\t\t\trenderUnitList.add(renderUnit);\n\t\t\t\t}\n\t\t\t}\n\t\t\trenderUnits = renderUnitList.toArray(new RenderUnit[renderUnitList.size()]);\n\t\t\tArrays.sort(renderUnits, new Comparator<RenderUnit>() {\n\t\t\t\t@Override\n\t\t\t\tpublic int compare(RenderUnit unit1, RenderUnit unit2) {\n\t\t\t\t\tif (unit1.getTextureIndex() != unit2.getTextureIndex()) {\n\t\t\t\t\t\treturn unit1.getTextureIndex() - unit2.getTextureIndex();\n\t\t\t\t\t}\n\t\t\t\t\tif (unit1.getTextureCoordinateGenerationDirection() != unit2.getTextureCoordinateGenerationDirection()) {\n\t\t\t\t\t\treturn unit1.getTextureCoordinateGenerationDirection().ordinal() - unit2.getTextureCoordinateGenerationDirection().ordinal();\n\t\t\t\t\t}\n\t\t\t\t\tif (unit1.getBackfaceCullingDirection() == unit2.getBackfaceCullingDirection()) {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (unit1.getBackfaceCullingDirection() == null) {\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}\n\t\t\t\t\tif (unit2.getBackfaceCullingDirection() == null) {\n\t\t\t\t\t\treturn +1;\n\t\t\t\t\t}\n\t\t\t\t\treturn unit1.getBackfaceCullingDirection().ordinal() - unit2.getBackfaceCullingDirection().ordinal();\n\t\t\t\t}\n\t\t\t});\n\t\t\tlogger.info(\"working set now has \" + renderUnits.length + \" render units\");\n\t\t}\n\t\t\n\t\t// render\n\t\tengineParameters.getSectionRenderer().onBeforeRenderWorkingSet(this, frameRenderParameters);\n\t\tfor (RenderUnit renderUnit : renderUnits) {\n\t\t\trenderUnit.draw(engineParameters, frameRenderParameters, engineParameters.getSectionRenderer().getGlWorkerLoop());\n\t\t}\n\t\tengineParameters.getSectionRenderer().onAfterRenderWorkingSet(this, frameRenderParameters);\n\t\t\n\t}", "public void setup() {\n\tsize(800, 600);\n\t// other stuff.\n }" ]
[ "0.76984274", "0.7262248", "0.71952367", "0.71206677", "0.7119788", "0.7043017", "0.7042241", "0.7042241", "0.7042241", "0.7042241", "0.7042241", "0.7042241", "0.7025864", "0.7003666", "0.6986758", "0.6985571", "0.6974754", "0.6973534", "0.6967676", "0.69333684", "0.6931241", "0.6847476", "0.6813505", "0.6793828", "0.6790109", "0.6790109", "0.6695787", "0.66390437", "0.66233176", "0.6615584", "0.65944844", "0.6579806", "0.65730935", "0.6542889", "0.6527012", "0.65160584", "0.6494342", "0.64763415", "0.64753824", "0.6463726", "0.64417267", "0.6438734", "0.64363486", "0.63885695", "0.6373754", "0.6361749", "0.635199", "0.63428193", "0.63428193", "0.6339852", "0.63229346", "0.63224596", "0.63205826", "0.63138026", "0.63138026", "0.63136977", "0.6282576", "0.6263774", "0.6247416", "0.6247416", "0.6231455", "0.62242407", "0.61958575", "0.6171919", "0.6168957", "0.6167923", "0.6167182", "0.6157431", "0.6149432", "0.6137391", "0.61247015", "0.61006343", "0.60977584", "0.60802305", "0.6074601", "0.6073175", "0.60676163", "0.60415095", "0.60406744", "0.6034214", "0.6019249", "0.6016344", "0.6011694", "0.6006069", "0.600408", "0.6001011", "0.59975606", "0.5995669", "0.59804255", "0.5979538", "0.59758824", "0.59677994", "0.59476155", "0.5942203", "0.5933336", "0.593153", "0.5928988", "0.59187824", "0.591785", "0.59175676", "0.5908438" ]
0.0
-1
SETTERS MENU ACTIONS Configure RecyclerView, Adapter, LayoutManager & glue it together
private void configureRecyclerView(){ // - Reset list this.users = new ArrayList<>(); // - Create adapter passing the list of Restaurants this.mCoworkerAdapter = new CoWorkerAdapter(this.users, Glide.with(this), true); // - Attach the adapter to the recyclerview to populate items this.recyclerView.setAdapter(this.mCoworkerAdapter); // - Set layout manager to position the items this.recyclerView.setLayoutManager(new LinearLayoutManager(RestaurantDetailActivity.this)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id=item.getItemId();\n\t\tswitch (id) {\n\t\tcase R.id.action_listview:\n\t\t\tLinearLayoutManager linearLayoutManager= new LinearLayoutManager(this);\n\t\t\tmRecyclerView.setLayoutManager(linearLayoutManager);\n\t\t\tbreak;\n\t\tcase R.id.action_gridview:\n\t\t\tGridLayoutManager gridLayoutManager= new GridLayoutManager(this, 3);\n\t\t\tmRecyclerView.setLayoutManager(gridLayoutManager);\n\t\t\tbreak;\t\n\t\tcase R.id.action_add:\n\t\t\t//在第二个位置添加数据\n\t\t\tmAdapter.addData(1, \"Inserted\");\n\t\t\tbreak;\t\n\t\tcase R.id.action_delete:\n\t\t\t//在第三个位置删除数据\n\t\t\tmAdapter.deleteData(2);\n\t\t\tbreak;\t\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_main_menu_fragment, container, false);\n menuRecyclerView =(RecyclerView) v.findViewById(R.id.recycler_main_menu);\n //menuRecyclerView.addItemDecoration(new );\n\n menuAdapter = new MainMenuAdapter(menuItems,(MainMenuAdapter.OnMenuItemClickListener) getActivity());\n\n menuRecyclerView.setAdapter(menuAdapter);\n menuRecyclerView.addItemDecoration(new SpacingDecorator(30,SpacingDecorator.SPACE_DECORATOR_ORIENTATION_HORIZONTAL));\n\n LinearLayoutManager man = new LinearLayoutManager(getContext());\n man.setOrientation(LinearLayoutManager.HORIZONTAL);\n menuRecyclerView.setLayoutManager(man);\n\n\n\n\n holderLeft = (CardView)v.findViewById(R.id.holder_left);\n holderLeft.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n listener.onSmallIconClicked(left);\n }\n });\n holderRight = (CardView)v.findViewById(R.id.holder_right);\n holderRight.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n listener.onSmallIconClicked(right);\n }\n });\n\n leftHolderTitle = (TextView) holderLeft.findViewById(R.id.menu_item_title);\n leftHolderTitle.setText(left.getTitle());\n rightHolderTitle = (TextView) holderRight.findViewById(R.id.menu_item_title);\n rightHolderTitle.setText(right.getTitle());\n\n ImageView leftHolderImage = (ImageView)holderLeft.findViewById(R.id.menu_item_image);\n leftHolderImage.setImageResource(left.getDrawableImage());\n ImageView rightHolderImage = (ImageView)holderRight.findViewById(R.id.menu_item_image);\n rightHolderImage.setImageResource(right.getDrawableImage());\n\n\n\n\n\n return v;\n }", "private void setUpMenu() {\n\t\tresideMenu = new ResideMenu(this);\n\t\tresideMenu.setBackground(R.drawable.menu_background);\n\t\tresideMenu.attachToActivity(this);\n\t\tresideMenu.setMenuListener(menuListener);\n\t\t// valid scale factor is between 0.0f and 1.0f. leftmenu'width is\n\t\t// 150dip.\n\t\tresideMenu.setScaleValue(0.6f);\n\n\t\t// create menu items;\n\t\titemGame = new ResideMenuItem(this, R.drawable.icon_game,\n\t\t\t\tgetResources().getString(R.string.strGame));\n\t\titemBook = new ResideMenuItem(this, R.drawable.icon_book,\n\t\t\t\tgetResources().getString(R.string.strBook));\n\t\titemNews = new ResideMenuItem(this, R.drawable.icon_news,\n\t\t\t\tgetResources().getString(R.string.strNews));\n\t\t// itemSettings = new ResideMenuItem(this, R.drawable.icon_setting,\n\t\t// getResources().getString(R.string.strSetting));\n\t\titemLogin = new ResideMenuItem(this, R.drawable.icon_share,\n\t\t\t\tgetResources().getString(R.string.strShare));\n\t\titemBookPDF = new ResideMenuItem(this, R.drawable.icon_bookpdf,\n\t\t\t\tgetResources().getString(R.string.strBookPDF));\n\t\titemMore = new ResideMenuItem(this, R.drawable.icon_more,\n\t\t\t\tgetResources().getString(R.string.strMore));\n\n\t\titemGame.setOnClickListener(this);\n\t\titemBook.setOnClickListener(this);\n\t\titemNews.setOnClickListener(this);\n\t\t// itemSettings.setOnClickListener(this);\n\t\titemBookPDF.setOnClickListener(this);\n\t\titemMore.setOnClickListener(this);\n\t\titemLogin.setOnClickListener(this);\n\n\t\tresideMenu.addMenuItem(itemBookPDF, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemBook, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemNews, ResideMenu.DIRECTION_LEFT);\n\t\t// resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n\n\t\tresideMenu.addMenuItem(itemGame, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemLogin, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemMore, ResideMenu.DIRECTION_RIGHT);\n\n\t\t// You can disable a direction by setting ->\n\t\t// resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n\t\tfindViewById(R.id.title_bar_left_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tfindViewById(R.id.title_bar_right_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "public void createmenu(){\n\n\n Context context = getApplicationContext();\n menuadpater = new MenuAdapter(context);\n\n MENULIST.setAdapter(menuadpater);\n\n\n }", "private void setUpMenu() {\n resideMenu = new ResideMenu(this);\n\n resideMenu.setBackground(R.drawable.menu_background);\n resideMenu.attachToActivity(this);\n resideMenu.setMenuListener(menuListener);\n resideMenu.setScaleValue(0.6f);\n\n // create menu items;\n itemHome = new ResideMenuItem(this, R.drawable.icon_profile, \"Home\");\n itemSerre = new ResideMenuItem(this, R.drawable.serre, \"GreenHouse\");\n itemControl = new ResideMenuItem(this, R.drawable.ctrl, \"Control\");\n itemTable = new ResideMenuItem(this, R.drawable.database, \"Parametre\");\n\n // itemProfile = new ResideMenuItem(this, R.drawable.user, \"Profile\");\n // itemSettings = new ResideMenuItem(this, R.drawable.stat_n, \"Statistique\");\n itemPicture = new ResideMenuItem(this, R.drawable.cam, \"Picture\");\n itemLog = new ResideMenuItem(this, R.drawable.log, \"Log file \");\n\n itemLogout = new ResideMenuItem(this, R.drawable.logout, \"Logout\");\n\n\n\n itemHome.setOnClickListener(this);\n itemSerre.setOnClickListener(this);\n itemControl.setOnClickListener(this);\n itemTable.setOnClickListener(this);\n\n// itemProfile.setOnClickListener(this);\n // itemSettings.setOnClickListener(this);\n itemLogout.setOnClickListener(this);\n itemPicture.setOnClickListener(this);\n itemLog.setOnClickListener(this);\n\n\n resideMenu.addMenuItem(itemHome, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemSerre, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemControl, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemTable, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemLog, ResideMenu.DIRECTION_LEFT);\n\n\n // resideMenu.addMenuItem(itemProfile, ResideMenu.DIRECTION_RIGHT);\n // resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n resideMenu.addMenuItem(itemPicture, ResideMenu.DIRECTION_RIGHT);\n\n resideMenu.addMenuItem(itemLogout, ResideMenu.DIRECTION_RIGHT);\n\n // You can disable a direction by setting ->\n // resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n findViewById(R.id.title_bar_left_menu).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n resideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n }\n });\n findViewById(R.id.title_bar_right_menu).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n resideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n }\n });\n }", "private void setUpMenu() {\n resideMenu = new ResideMenu(this);\n resideMenu.setBackground(R.drawable.menu_background);\n resideMenu.attachToActivity(this);\n\n //resideMenu.setMenuListener(menuListener);\n //scaling activity slide ke menu\n resideMenu.setScaleValue(0.7f);\n\n itemHome = new ResideMenuItem(this, R.drawable.ic_home, \"Home\");\n itemProfile = new ResideMenuItem(this, R.drawable.ic_profile, \"Profile\");\n //itemCalendar = new ResideMenuItem(this, R.drawable.ic_calendar, \"Calendar\");\n itemSchedule = new ResideMenuItem(this, R.drawable.ic_schedule, \"Schedule\");\n //itemExams = new ResideMenuItem(this, R.drawable.ic_exams, \"Exams\");\n //itemSettings = new ResideMenuItem(this, R.drawable.ic_setting, \"Settings\");\n //itemChat = new ResideMenuItem(this, R.drawable.ic_chat, \"Chat\");\n //itemTask = new ResideMenuItem(this, R.drawable.ic_task, \"Task\");\n\n\n resideMenu.addMenuItem(itemHome, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemProfile, ResideMenu.DIRECTION_LEFT);\n // resideMenu.addMenuItem(itemCalendar, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemSchedule, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemExams, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemTask, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemChat, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_LEFT);\n\n // matikan slide ke kanan\n resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n itemHome.setOnClickListener(this);\n itemSchedule.setOnClickListener(this);\n itemProfile.setOnClickListener(this);\n //itemSettings.setOnClickListener(this);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_main_menu, container, false);\n recyclerView = view.findViewById(R.id.recycler);\n\n menuList = new ArrayList<>();\n\n MenuItem menu = new MenuItem();\n menu.setTitle(\"Spaghetti\");\n menu.setDescription(\"Juicy seasoned beef and pork meatballs in an easy homemade tomato sauce.\");\n menu.setPrice(\"P 80\");\n menuList.add(menu);\n\n MenuItem menu2 = new MenuItem();\n menu2.setTitle(\"Lechon Kawali\");\n menu2.setDescription(\"Juicy seasoned beef and pork meatballs in an easy homemade tomato sauce.\");\n menu2.setPrice(\"P 100\");\n menuList.add(menu2);\n\n MenuItem menu3 = new MenuItem();\n menu3.setTitle(\"Ginataan\");\n menu3.setDescription(\"Juicy seasoned beef and pork meatballs in an easy homemade tomato sauce.\");\n menu3.setPrice(\"P 30\");\n menuList.add(menu3);\n\n MenuItem menu4 = new MenuItem();\n menu4.setTitle(\"Toron Langka\");\n menu4.setDescription(\"Juicy seasoned beef and pork meatballs in an easy homemade tomato sauce.\");\n menu4.setPrice(\"P 20\");\n menuList.add(menu4);\n\n// DividerItemDecoration itemDecorator = new DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL);\n// itemDecorator.setDrawable(Objects.requireNonNull(ContextCompat.getDrawable(requireContext(), R.drawable.line_separator)));\n\n adapter = new MenuAdapter(menuList, this, -1);\n recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n// recyclerView.addItemDecoration(itemDecorator);\n recyclerView.setAdapter(adapter);\n adapter.setMenu(menuList);\n return view;\n }", "private void init() {\n initActionButton();\n mRecyclerView.setLayoutManager(new GridLayoutManager(this, 2));\n mAdapter = new MainAdapter(getApplicationContext(),getImages());\n mRecyclerView.setAdapter(mAdapter);\n mAdapter.setListener(new MainAdapter.OnClickListener() {\n @Override\n public void onClickItem(ImageItem selected, int position) {\n goToDetailScreen(position);\n }\n });\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_grid) {\n recyclerView.setLayoutManager(new GridLayoutManager(this,2));\n return true;\n }\n\n if (id == R.id.action_linear) {\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "public void configs() {\n adaptadorRecyclerView = new AdaptadorRecyclerView(new ArrayList<>(), this);//configuramos el adaptador; necesitamos implementar interfaz OnItemClickListener y sobreescribir sus metodos\n recyclerView.setLayoutManager(new LinearLayoutManager(this));//configuramos la recyclerView\n recyclerView.setAdapter(adaptadorRecyclerView);\n }", "public ViewHolder(@NonNull final View itemView) {\n super(itemView);\n //SerialNo = itemView.findViewById(R.id.SerialNoOfMenuItemTextView);\n ItemName = itemView.findViewById(R.id.ItemNameDisplayTextview);\n ItemId = itemView.findViewById(R.id.itemIdTextview);\n price = itemView.findViewById(R.id.ItemPriceEditText);\n Counter = itemView.findViewById(R.id.ItemCounterEdiText);\n //ItemCategory = itemView.findViewById(R.id.CategoryNameTextView);\n CategoryName = itemView.findViewById(R.id.CategorySpinnerRecyclerView);\n Categories = new ArrayList<>();\n populateCategorySpinner(); // populate the spinner using this\n CategoriesSpinnerAdapter = new ArrayAdapter<>(context, android.R.layout.simple_spinner_item, Categories);\n CategoriesSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n CategoryName.setAdapter(CategoriesSpinnerAdapter);\n CategoryName.setOnItemSelectedListener(this);\n\n CategoryName.setEnabled(false); // disable the spinner by default\n UpdateData = itemView.findViewById(R.id.UpdateButtonMenuList);\n //UpdateData.setEnabled(false);\n DeleteData = itemView.findViewById(R.id.DeleteButtonMenuList);\n linearLayout = itemView.findViewById(R.id.MenuItemsDisplayLinearLayout);\n ExpandableLayout = itemView.findViewById(R.id.ExpandableLayout);\n\n linearLayout.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n // setExpanded(!isExpanded());\n ModelClassForItemDetails modelClassForItemDetails = itemDetails.get(getAdapterPosition());\n modelClassForItemDetails.setExpanded(!modelClassForItemDetails.isExpanded());\n notifyItemChanged(getAdapterPosition());\n /*ItemName.setEnabled(true);\n ItemId.setEnabled(true);\n price.setEnabled(true);\n Counter.setEnabled(true);\n CategoryName.setEnabled(true);*/\n\n }\n });\n //linearLayout.setOnCreateContextMenuListener(this);\n\n\n DeleteData.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setTitle(\"Are you sure ??\").setMessage(\" All the corresponding data related to \" + itemDetails.get(getAdapterPosition()).getItemName() + \" will be deleted\").setPositiveButton(\"yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //sqLiteHelper.DeleteItemDetails(String.valueOf(Ids.get(getAdapterPosition())));\n /*Ids.remove(getAdapterPosition());\n Names.remove(getAdapterPosition());\n Prices.remove(getAdapterPosition());\n counters.remove(getAdapterPosition());\n categories.remove(getAdapterPosition());*/\n sqLiteHelper.DeleteItemDetails(String.valueOf(itemDetails.get(getAdapterPosition()).getID()));\n itemDetails.remove(getAdapterPosition());\n if (itemDetails.isEmpty()) {\n DisplayMenuItemsFragment displayMenuItemsFragment = new DisplayMenuItemsFragment();\n //do something to change the text of DefineMenuItem textview\n }\n notifyDataSetChanged();\n\n\n\n }\n }).setNegativeButton(\"Cancel\", null).setCancelable(false).create().show();\n }\n });\n\n UpdateData.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setTitle(\"Are you sure you want to update Data ?\").setPositiveButton(\"Confirm\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n\n boolean DataUpdated = sqLiteHelper.UpdateItemDetails(String.valueOf(itemDetails.get(getAdapterPosition()).getID()),\n itemDetails.get(getAdapterPosition()).getItemName(), Float.parseFloat(price.getText().toString()), Integer.parseInt(Counter.getText().toString()),\n CategorySelected);\n\n\n //https://stackoverflow.com/questions/33789345/whats-better-notifydatasetchanged-or-notifyitemchanged-in-loop\n if (DataUpdated == true) {\n Toast.makeText(context, \"Details of \" + itemDetails.get(getAdapterPosition()).getItemName() + \" updated successfully\", Toast.LENGTH_SHORT).show();\n\n\n\n itemDetails.get(getAdapterPosition()).setExpanded(false);\n //ExpandableLayout.setVisibility(View.GONE);\n //price.setEnabled(false);\n // CategoryName.setEnabled(false);\n //Counter.setEnabled(false);\n // Counter.setText(Counter.getText().toString());\n // price.setText(price.getText().toString());\n //CategoryName.setSelection(CategoriesSpinnerAdapter.getPosition(CategorySelected));\n itemDetails.get(getAdapterPosition()).setPrice(Float.parseFloat(price.getText().toString()));\n itemDetails.get(getAdapterPosition()).setCounter(Integer.parseInt(Counter.getText().toString()));\n itemDetails.get(getAdapterPosition()).setCategory(CategorySelected);\n notifyItemChanged(getAdapterPosition());\n\n\n }\n else {\n Toast.makeText(context, \"Unable to update ...try again\", Toast.LENGTH_SHORT).show();\n }\n\n }\n }).setNegativeButton(\"No\", null).setCancelable(false).create().show();\n\n\n }\n });\n\n\n\n\n price.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {\n\n }\n\n @Override\n public void afterTextChanged(Editable editable) {\n //int id = itemDetails.get(getAdapterPosition()).getID();\n //float Price = itemDetails.get(getAdapterPosition()).getPrice();\n // int Counter = itemDetails.get(getAdapterPosition()).getCounter();\n //String Category =itemDetails.get(getAdapterPosition()).getCategory();\n\n //String sqlQuery = \"select price , counter , categoryName from itemTally where id='\" + id + \"';\";\n // String sqlQuery1 = \"select categoryName from itemTally where id ='\"+id+\"';\";\n //String sqlQuery2 = \"select price from itemTally where id ='\"+id+\"';\";\n getCurrentSavedDatabaseValues();\n try {\n int currentCounterValue = Integer.parseInt(Counter.getText().toString().trim());\n float currentPriceValue = Float.parseFloat(editable.toString().trim());\n /* float PriceValue = 0;\n int CounterValue = 0;\n String CategoryName = \"\";\n\n Cursor cursor = sqLiteDatabase.rawQuery(sqlQuery, null);\n while (cursor.moveToNext()) {\n PriceValue = cursor.getFloat(cursor.getColumnIndex(sqLiteHelper.KEY_Price));\n CounterValue = cursor.getInt(cursor.getColumnIndex(sqLiteHelper.KEY_Counter));\n CategoryName = cursor.getString(cursor.getColumnIndex(sqLiteHelper.Category_Name));\n }*/\n /*try\n {*/\n if (currentPriceValue != CurrentSavedPriceValue || currentCounterValue != CurrentSavedCounterValue\n || !CategorySelected.equals(CurrentSavedCategoryName)) {\n\n UpdateData.setEnabled(true);\n\n } else {\n UpdateData.setEnabled(false);\n }\n }\n catch (NumberFormatException e)\n {\n e.printStackTrace();\n }\n catch (NullPointerException e)\n {\n e.printStackTrace();\n }\n }\n });\n\n\n Counter.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {\n\n }\n\n @Override\n public void afterTextChanged(Editable editable) {\n\n //int id = itemDetails.get(getAdapterPosition()).getID();\n //float Price = itemDetails.get(getAdapterPosition()).getPrice();\n // int Counter = itemDetails.get(getAdapterPosition()).getCounter();\n //String Category =itemDetails.get(getAdapterPosition()).getCategory();\n\n //String sqlQuery = \"select price , counter , categoryName from itemTally where id='\" + id + \"';\";\n // String sqlQuery1 = \"select categoryName from itemTally where id ='\"+id+\"';\";\n //String sqlQuery2 = \"select price from itemTally where id ='\"+id+\"';\";\n getCurrentSavedDatabaseValues();\n try {\n int currentCounterValue = Integer.parseInt(editable.toString().trim());\n float currentPriceValue = Float.parseFloat(price.getText().toString().trim());\n //float PriceValue = 0;\n /*int CounterValue = 0;\n String CategoryName = \"\";\n\n Cursor cursor = sqLiteDatabase.rawQuery(sqlQuery, null);\n while (cursor.moveToNext()) {\n PriceValue = cursor.getFloat(cursor.getColumnIndex(sqLiteHelper.KEY_Price));\n CounterValue = cursor.getInt(cursor.getColumnIndex(sqLiteHelper.KEY_Counter));\n CategoryName = cursor.getString(cursor.getColumnIndex(sqLiteHelper.Category_Name));\n }*/\n\n if (currentPriceValue != CurrentSavedPriceValue || currentCounterValue != CurrentSavedCounterValue\n || !CategorySelected.equals(CurrentSavedCategoryName)) {\n\n UpdateData.setEnabled(true);\n\n } else {\n UpdateData.setEnabled(false);\n }\n } catch (NumberFormatException e) {\n e.printStackTrace();\n }\n\n catch (NullPointerException e)\n {\n e.printStackTrace();\n }\n\n }\n });\n\n }", "private void setupDrawerContent() {\n previousMenuItem = navigationView.getMenu().findItem(R.id.nav_category);\n previousMenuItem.setChecked(true);\n previousMenuItem.setCheckable(true);\n\n navigationView.setNavigationItemSelectedListener(\n new NavigationView.OnNavigationItemSelectedListener() {\n @Override\n public boolean onNavigationItemSelected(MenuItem menuItem) {\n\n drawerLayout.closeDrawer(Gravity.LEFT);\n\n if (previousMenuItem.getItemId() == menuItem.getItemId())\n return true;\n\n menuItem.setCheckable(true);\n menuItem.setChecked(true);\n previousMenuItem.setChecked(false);\n previousMenuItem = menuItem;\n\n switch (menuItem.getItemId()) {\n case R.id.nav_category:\n displayView(CATEGORIES_FRAG, null);\n break;\n case R.id.nav_favorites:\n displayView(FAVORITE_FRAG, null);\n break;\n case R.id.nav_reminder:\n displayView(REMINDER_FRAG, null);\n break;\n case R.id.nav_about:\n displayView(ABOUT_FRAG, null);\n break;\n case R.id.nav_feedback:\n IntentHelper.sendEmail(BaseDrawerActivity.this);\n break;\n case R.id.nav_rate_us:\n IntentHelper.voteForAppInBazaar(BaseDrawerActivity.this);\n break;\n case R.id.nav_settings:\n displayView(SETTINGS_FRAG, null);\n break;\n\n }\n\n\n return true;\n }\n }\n\n );\n }", "private void CreateMenu() {\n\t\topcionesMenu = getResources().getStringArray(\r\n\t\t\t\tR.array.devoluciones_lista_options);\r\n\r\n\t\tdrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);\r\n\t\t// Buscamos nuestro menu lateral\r\n\t\tdrawerList = (ListView) findViewById(R.id.left_drawer);\r\n\r\n\t\tdrawerList.setAdapter(new ArrayAdapter<String>(getSupportActionBar()\r\n\t\t\t\t.getThemedContext(), android.R.layout.simple_list_item_1,\r\n\t\t\t\topcionesMenu));\r\n\r\n\t\t// Añadimos Funciones al menú laterak\r\n\t\tdrawerList.setOnItemClickListener(new OnItemClickListener() {\r\n\r\n\t\t\t@SuppressLint(\"NewApi\")\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\r\n\r\n\t\t\t\tdrawerList.setItemChecked(position, true);\r\n\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\ttituloSeccion = opcionesMenu[position];\r\n\t\t\t\tgetSupportActionBar().setTitle(tituloSeccion);\r\n\r\n\t\t\t\t// SELECCIONAR LA POSICION DEL RECIBO SELECCIONADO ACTUALMENTE\r\n\t\t\t\tpositioncache = customArrayAdapter.getSelectedPosition();\r\n\t\t\t\t// int pos = customArrayAdapter.getSelectedPosition();\r\n\t\t\t\t// OBTENER EL RECIBO DE LA LISTA DE RECIBOS DEL ADAPTADOR\r\n\t\t\t\titem_selected = (vmDevolucion) customArrayAdapter\r\n\t\t\t\t\t\t.getItem(positioncache);\r\n\t\t\t\tif(fragmentActive== FragmentActive.LIST){\r\n\t\t\t\t\r\n\t\t\t\t\tswitch (position) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcase NUEVO_DEVOLUCION:\r\n\t\t\t\t\t\t\tintent = new Intent(ViewDevoluciones.this,\r\n\t\t\t\t\t\t\t\t\tViewDevolucionEdit.class);\r\n\t\t\t\t\t\t\tintent.putExtra(\"requestcode\", NUEVO_DEVOLUCION);\r\n\t\t\t\t\t\t\tstartActivityForResult(intent, NUEVO_DEVOLUCION);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase ABRIR_DEVOLUCION:\r\n\t\t\t\t\t\t\tabrirDevolucion();\r\n\t\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase BORRAR_DEVOLUCION:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\tif (!item_selected.getEstado().equals(\"REGISTRADA\")) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"El registro no se puede borrar en estado \"+ item_selected.getItemEstado()+\" .\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tMessage msg = new Message();\r\n\t\t\t\t\t\t\tBundle b = new Bundle();\r\n\t\t\t\t\t\t\tb.putInt(\"id\", (int) item_selected.getId());\r\n\t\t\t\t\t\t\tmsg.setData(b);\r\n\t\t\t\t\t\t\tmsg.what = ControllerProtocol.DELETE_DATA_FROM_LOCALHOST;\r\n\t\t\t\t\t\t\tNMApp.getController().getInboxHandler().sendMessage(msg);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase ENVIAR_DEVOLUCION:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\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\tenviarDevolucion(ControllerProtocol.GETOBSERVACIONDEV);\r\n\t\t\t\t\t\t\t//BDevolucionM.beforeSend(item_selected.getId());\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase IMPRIMIR_COMPROBANTE:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tdevolucion = ModelDevolucion.getDevolucionbyID(item_selected.getId());\r\n\t\t\t\t\t\t\tif (devolucion.getNumeroCentral() == 0)\r\n\t\t\t\t\t\t\t\tenviarDevolucion(ControllerProtocol.GETOBSERVACIONDEV);\r\n\t\t\t\t\t\t\telse {\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tenviarImprimirDevolucion(\r\n\t\t\t\t\t\t\t\t\t\t\"Se mandara a imprimir el comprobante de la Devolución\",\r\n\t\t\t\t\t\t\t\t\t\tdevolucion);\r\n\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\t * BDevolucionM.ImprimirDevolucion(item_selected.getId(),\r\n\t\t\t\t\t\t\t * false);\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase BORRAR_ENVIADAS:\r\n\t\t\t\t\t\t\tif (item_selected == null) \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\t\t\tMessage msg2 = new Message();\r\n\t\t\t\t\t\t\tBundle b2 = new Bundle();\r\n\t\t\t\t\t\t\tb2.putInt(\"id\", -1);\r\n\t\t\t\t\t\t\tmsg2.setData(b2);\r\n\t\t\t\t\t\t\tmsg2.what = ControllerProtocol.DELETE_DATA_FROM_LOCALHOST;\r\n\t\t\t\t\t\t\tNMApp.getController().getInboxHandler().sendMessage(msg2);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase FICHA_DEL_CLIENTE:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\t\t\tif (NMNetWork.isPhoneConnected(NMApp.getContext())\r\n\t\t\t\t\t\t\t\t\t&& NMNetWork.CheckConnection(NMApp.getController())) {\r\n\t\t\t\t\t\t\t\tfragmentActive = FragmentActive.FICHACLIENTE;\r\n\t\t\t\t\t\t\t\tShowCustomerDetails();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase CUENTAS_POR_COBRAR:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (NMNetWork.isPhoneConnected(NMApp.getContext())\r\n\t\t\t\t\t\t\t\t\t&& NMNetWork.CheckConnection(NMApp.getController())) {\r\n\t\t\t\t\t\t\t\tfragmentActive = FragmentActive.CONSULTAR_CUENTA_COBRAR;\r\n\t\t\t\t\t\t\t\tLOAD_CUENTASXPAGAR();\r\n\t\t\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase CERRAR:\r\n\t\t\t\t\t\t\tfinish();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(fragmentActive == FragmentActive.CONSULTAR_CUENTA_COBRAR){\r\n\t\t\t\t\t\r\n\t\t\t\t\tswitch (position) {\r\n\t\t\t\t\tcase MOSTRAR_FACTURAS:\r\n\t\t\t\t\t\tcuentasPorCobrar.cargarFacturasCliente();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_NOTAS_DEBITO: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarNotasDebito(); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_NOTAS_CREDITO: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarNotasCredito(); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_PEDIDOS: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarPedidos();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_RECIBOS: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarRecibosColector(); \r\n\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\t\t});\r\n\r\n\t\ttituloSeccion = getTitle();\r\n\t\ttituloApp = getTitle();\r\n\r\n\t\tdrawerToggle = new ActionBarDrawerToggle(this, drawerLayout,\r\n\t\t\t\tR.drawable.ic_navigation_drawer, R.string.drawer_open,\r\n\t\t\t\tR.string.drawer_close) {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onDrawerClosed(View view) {\r\n\t\t\t\tgetSupportActionBar().setTitle(tituloSeccion);\r\n\t\t\t\tActivityCompat.invalidateOptionsMenu(ViewDevoluciones.this);\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onDrawerOpened(View drawerView) {\r\n\t\t\t\tgetSupportActionBar().setTitle(tituloApp);\r\n\t\t\t\tActivityCompat.invalidateOptionsMenu(ViewDevoluciones.this);\r\n\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// establecemos el listener para el dragable ....\r\n\t\tdrawerLayout.setDrawerListener(drawerToggle);\r\n\r\n\t\tgetSupportActionBar().setDisplayHomeAsUpEnabled(true);\r\n\t\tgetSupportActionBar().setHomeButtonEnabled(true);\r\n\r\n\t}", "public void setRecycler(){\n GridLayoutManager manager=new GridLayoutManager(context,2,LinearLayoutManager.HORIZONTAL,\n false);\n\n recyclerView.setLayoutManager(manager);\n recyclerView.setHasFixedSize(true);\n MainMenuAdapter mainMenuAdapter=new MainMenuAdapter(menuRows,context,true);\n recyclerView.setAdapter(mainMenuAdapter);\n }", "@Override\n protected void initData() {\n this.classes = new ArrayList<>();\n this.classes.add(SmartRouterSampleActivity.class);\n this.classes.add(CustomRouterActivity.class);\n this.classes.add(RouterCenterActivity.class);\n this.adapter = new MenuRecyclerViewAdapter();\n this.adapter.setList(classes);\n this.recyclerView.setAdapter(adapter);\n }", "@Override\n protected void setLinstener() {\n \tsuper.setLinstener();\n \t //模块选择\n \t MyRecyclerAdapter.setmOnItemClickListener(new MyRecyclerAdapter.OnItemClickListener() {\t\t\n \t\t\t@Override\n \t\t\tpublic void onItemClick(View v, int position) {\n \t\t\t switch(v.getId()){\n \t\t\t //开始购买\n \t\t\t case R.id.Search_food:\n \t\t \n \t\t\t\t break;\n \t\t //我的订单\n \t\t\t case R.id.Search_outing:\n \t\t\t\t if(isLogin()){\n \t\t\t\t \tIntent intent=new Intent(getActivity(),OrderlistActivity.class);\n \t\t\t\t \tstartActivity(intent);\n \t\t\t\t }else{\n \t\t\t\t\t Intent intent1=new Intent(getActivity(),LoginActivity.class);\n \t\t\t\t\t startActivity(intent1);\n \t\t\t\t }\n \t\t\t\t break;\n \t\t //精菜检测\n \t\t\t case R.id.Search_hotel:\n \t\t\t\t break;\n \t\t //账户充值\n \t\t\t case R.id.Search_hotell:\n \t\t\t\t break;\t \n \t\t\t//菜品详情\n \t\t\t case R.id.ly_recycler:\n \t\t\t\t Intent intent4=new Intent(getActivity(),GoodsInfoActvity.class);\n \t\t\t\t startActivity(intent4);\n \t\t\t default:\n \t\t break;\n \t\t\t }\n \t\t\t}\n \t\t});\n \t \n \t //搜索\n \t edit.setOnClickListener(new OnClickListener() {\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent=new Intent(context,SearchActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n \t\n }", "private void setupRecyclerView(@NonNull RecyclerView recyclerView) {\r\n myAdapter = new SimpleItemRecyclerViewAdapter(model.getShelters());\r\n recyclerView.setAdapter(myAdapter);\r\n }", "private void setView() {\n // Category Views\n categoryRecycler.setLayoutManager(new LinearLayoutManager(getContext()));\n cartRecyclerView.addItemDecoration(new GridItemDecoration(8, 8));\n\n categoryRecycler.addItemDecoration(new GridItemDecoration(16, 16));\n categoryAdapter.setOnCategorySelectedListener(this);\n categoryRecycler.setAdapter(categoryAdapter);\n\n // Product Views\n productRecycler.setLayoutManager(new GridLayoutManager(getContext(), 3));\n productRecycler.addItemDecoration(new GridItemDecoration(8, 8));\n productRecycler.setAdapter(productAdapter);\n productAdapter.setOnProductClickListener(new ProductItemListener());\n\n // Cart Views\n cartRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n cartRecyclerView.setAdapter(cartAdapter);\n cartAdapter.setOnItemUpdateListener(this);\n\n //discount\n discountList = new ArrayList<>();\n DiscountAdapter discountAdapter = new DiscountAdapter(getContext(), discountList);\n discountRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n discountRecyclerView.setAdapter(discountAdapter);\n OrderAPI.getInstance(getContext()).getDiscount(discountList, discountAdapter, this, db);\n discountAdapter.setOnDiscountClickListener(this);\n\n SchoolAPI.getInstance(getActivity()).getStudents(studentList, db);\n\n //back button\n backButton.setOnClickListener(view -> onBackPressClicked());\n\n // Payment Button\n paymentButton.setOnClickListener((v) -> onPaymentButtonClicked());\n\n discountButton.setOnClickListener((v) -> {\n /*showDiscountDialog()*/\n discountRecyclerView.setVisibility(View.VISIBLE);\n cartRecyclerView.setVisibility(View.GONE);\n emptyCartView.setVisibility(View.GONE);\n\n updateDiscountNotification(discountList.size());\n checkDiscountAvailability();\n });\n\n cartButton.setOnClickListener(view -> {\n discountRecyclerView.setVisibility(View.GONE);\n noDiscountText.setVisibility(View.GONE);\n\n if (cartList.size() > 0) {\n cartRecyclerView.setVisibility(View.VISIBLE);\n emptyCartView.setVisibility(View.GONE);\n } else {\n cartRecyclerView.setVisibility(View.GONE);\n emptyCartView.setVisibility(View.VISIBLE);\n }\n });\n\n studentIdText.setOnEditorActionListener(((textView, actionId, keyEvent) -> {\n if (actionId == EditorInfo.IME_ACTION_DONE) {\n onSubmitClick();\n return true;\n }\n\n return false;\n }));\n\n //fetch student details\n submitButton.setOnClickListener(view -> onSubmitClick());\n\n //return items\n returnButton.setOnClickListener(view -> showReturnItemDialog());\n\n //add details button\n addDetailsButton.setOnClickListener(view -> showAddDetailsDialog());\n\n //gender_type button\n maleView.setOnClickListener(view -> {\n\n if (!isMaleSelected || notSelectedYet) {\n categoryText.setText(null);\n\n isMaleSelected = true;\n notSelectedYet = false;\n\n categoryAdapter.clearBackground();\n //change button views\n maleView.setBackgroundColor(getResources().getColor(R.color.denim1));\n maleView.setTextColor(getResources().getColor(R.color.white1));\n\n femaleView.setBackgroundColor(getResources().getColor(android.R.color.transparent));\n femaleView.setTextColor(getResources().getColor(R.color.black1));\n\n //apply changes to products\n if (productList != null && productList.size() > 0) {\n productList.clear();\n }\n maleList.clear();\n\n for (ProductHeader currentProduct : allProducts) {\n if (currentProduct.getGender().equals(APIStatic.Constants.MALE)) {\n productList.add(currentProduct);\n maleList.add(currentProduct);\n }\n }\n\n checkAvailability();\n productAdapter.notifyDataSetChanged();\n }\n });\n\n femaleView.setOnClickListener(view -> {\n\n if (isMaleSelected || notSelectedYet) {\n categoryText.setText(null);\n\n isMaleSelected = false;\n notSelectedYet = false;\n categoryAdapter.clearBackground();\n femaleView.setBackgroundColor(getResources().getColor(R.color.denim1));\n femaleView.setTextColor(getResources().getColor(R.color.white1));\n\n maleView.setBackgroundColor(getResources().getColor(android.R.color.transparent));\n maleView.setTextColor(getResources().getColor(R.color.black1));\n\n //apply changes to products\n if (productList != null && productList.size() > 0) {\n productList.clear();\n }\n femaleList.clear();\n\n for (ProductHeader currentProduct : allProducts) {\n if (currentProduct.getGender().equals(APIStatic.Constants.FEMALE)) {\n productList.add(currentProduct);\n femaleList.add(currentProduct);\n }\n }\n\n checkAvailability();\n productAdapter.notifyDataSetChanged();\n }\n });\n\n // Fetch Data\n ProductAPI.fetchCategories(getContext(), categoryList, categoryAdapter, db);\n ProductAPI.fetchProducts(getContext(), allProducts, productList, productAdapter, null, db, null, null);\n }", "private void setUpRecyclerView() {\n ItemTouchHelper itemTouchHelper = new ItemTouchHelper(new SwipeToDeleteCallback(this));\n itemTouchHelper.attachToRecyclerView(recyclerView);\n }", "private void initSildeMenu(){\n metrics = new DisplayMetrics();\n getWindowManager().getDefaultDisplay().getMetrics(metrics);\n leftMenuWidth = (int) ((metrics.widthPixels) * 0.70);\n\n // init main view\n ll_mainLayout = (LinearLayout) findViewById(R.id.ll_mainlayout);\n\n // init left menu\n ll_menuLayout = (LinearLayout) findViewById(R.id.ll_menuLayout);\n leftMenuLayoutPrams = (FrameLayout.LayoutParams) ll_menuLayout\n .getLayoutParams();\n leftMenuLayoutPrams.width = leftMenuWidth;\n ll_menuLayout.setLayoutParams(leftMenuLayoutPrams);\n\n // init ui\n menu1 = (ImageView) findViewById(R.id.menu);\n\n menu1.setOnClickListener(this); // 메뉴 눌렀을때 밑에 switch문 보셈\n\n }", "private void initRecyclerView(android.view.View view){\n mRecyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);\n mRecyclerView.setHasFixedSize(true);\n mLayoutManager = new LinearLayoutManager(MainActivity.sContext);\n mRecyclerView.setLayoutManager(mLayoutManager);\n mAdapter = new TopicRecyclerViewAdapter( mPresenter.getDataSet() );\n mRecyclerView.setAdapter(mAdapter);\n\n // Code to Add an item with default animation\n //((TopicRecyclerViewAdapter) mAdapter).addItem(obj, index);\n\n // Code to remove an item with default animation\n //((TopicRecyclerViewAdapter) mAdapter).deleteItem(index);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View layout=inflater.inflate(R.layout.fragment_drawer, container, false);\n recyclerView= (RecyclerView) layout.findViewById(R.id.drawerList);\n adapter = new AtomAdapter(getActivity(),getData());\n recyclerView.setAdapter(adapter);\n recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n recyclerView.addOnItemTouchListener(new RecyclerTouchListener(getActivity(), recyclerView, new ClickListener() {\n @Override\n public void onClick(View view, int position) {\n /* add action here */\n\n\n Intent intent;\n switch (position) {\n\n case 0:\n intent = new Intent(getActivity(), AboutPage.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n getActivity().startActivity(intent);\n break;\n case 1:\n intent = new Intent(getActivity(), Help.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n getActivity().startActivity(intent);\n break;\n\n }\n\n\n\n\n\n }\n\n @Override\n public void onLongClick(View view, int position) {\n\n\n\n\n\n }\n }));\n return layout;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View view = inflater.inflate(R.layout.fragment_menu, container, false);\n\n loadingProgress = view.findViewById(R.id.loading_progress);\n\n recycler_menu = view.findViewById(R.id.recycler_menu);\n recycler_menu.setHasFixedSize(true);\n layoutManager = new GridLayoutManager(getContext(),2);\n recycler_menu.setLayoutManager(layoutManager);\n\n recycler_recommendation = view.findViewById(R.id.recycler_recommendation);\n recycler_recommendation.setHasFixedSize(true);\n recomLayoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false);\n recycler_recommendation.setLayoutManager(recomLayoutManager);\n\n menuRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n getAllMenus(dataSnapshot);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n adsBanner.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n getBannerSlider(view, dataSnapshot);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n recomRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n getAllRecommendation(dataSnapshot);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n return view;\n }", "@Override\n protected void setListener() {\n left.setOnClickListener(this);\n layout.setOnStartListener(new OnStartListener() {\n @Override\n public void onStartRefresh(XtomRefreshLoadmoreLayout v) {\n currentPage = 0;\n getList(currentPage.toString(), tag);\n }\n\n @Override\n public void onStartLoadmore(XtomRefreshLoadmoreLayout v) {\n currentPage++;\n getList(currentPage.toString(), tag);\n }\n });\n mListView.setOnMenuItemClickListener(new SwipeMenuListView.OnMenuItemClickListener() {\n @Override\n public void onMenuItemClick(int position, SwipeMenu menu, int index) {\n switch (index) {\n case 0:\n getNetWorker().noticeSaveoperate(user.getToken(),\n notices.get(position).getId(), notices.get(position).getKeytype(), notices.get(position).getId(), \"3\");\n break;\n }\n }\n });\n mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n if (\"2\".equals(notices.get(position).getLooktype())) {\n if (\"7\".equals(notices.get(position).getKeytype()) || \"8\".equals(notices.get(position).getKeytype())) {\n Intent intent = new Intent(MyXiaoXi.this, NewsToPay.class);\n intent.putExtra(\"keyid\",notices.get(position).getKeyid());\n intent.putExtra(\"keytype\",notices.get(position).getKeytype());\n startActivity(intent);\n }\n } else {\n getNetWorker().noticeSaveoperate(user.getToken(),\n notices.get(position).getId(), notices.get(position).getKeytype(), notices.get(position).getId(), \"1\");\n }\n }\n });\n // set SwipeListener\n mListView.setOnSwipeListener(new SwipeMenuListView.OnSwipeListener() {\n\n @Override\n public void onSwipeStart(int position) {\n // swipe start\n }\n\n @Override\n public void onSwipeEnd(int position) {\n // swipe end\n }\n });\n }", "@Override\n public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {\n mContext = getView().getContext();\n //获取toolbar\n mToolbar = getView().findViewById(R.id.main_toolBar);\n //主标题,必须在setSupportActionBar之前设置,否则无效,如果放在其他位置,则直接setTitle即可\n mToolbar.setTitle(\"我的主页\");\n //用toolbar替换actionbar\n mToolbar.inflateMenu(R.menu.add_menu);\n settingList.add(new Main(\"字体大小\", \"com.czdxwx.ToFontSize\"));\n settingList.add(new Main(\"专业设置\", \"com.czdxwx.ToMajorSet\"));\n settingList.add(new Main(\"我的音乐\", \"com.czdxwx.ToMyMusic\"));\n settingList.add(new Main(\"我的视频\", \"com.czdxwx.ToMyVideo\"));\n settingList.add(new Main(\"我的支付\", \"com.czdxwx.ToPay\"));\n mainAdapter = new MainAdapter(settingList);\n mainAdapter.setItemClickListener(new MainAdapter.OnItemClickListener() {\n @Override\n public void onItemClick(int position) {\n Intent intent = new Intent();\n intent.setAction(settingList.get(position).getIntentInfo());\n startActivity(intent);\n }\n });\n mRecyclerView = getView().findViewById(R.id.main_settingList);\n mLayoutManager = new LinearLayoutManager(mContext);\n mRecyclerView.setLayoutManager(mLayoutManager);\n mRecyclerView.setAdapter(mainAdapter);\n //添加Android自带的分割线\n mRecyclerView.addItemDecoration(new DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL));\n mRecyclerView.setItemAnimator(new DefaultItemAnimator());\n mRecyclerView.setBackgroundColor(Color.TRANSPARENT);//设置背景色\n imageView = getView().findViewById(R.id.imageView2);\n main_name = getView().findViewById(R.id.main_name);\n main_number = getView().findViewById(R.id.main_number);\n main_name.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setAction(\"com.czdxwx.getInformation\");\n FinalDb db=FinalDb.create(mContext,\"test\");\n DbModel p = db.findDbModelBySQL(String.format(\"select * from person where name='%s';\",main_name.getText().toString()));\n Bundle bundle = new Bundle();\n bundle.putString(\"name\", p.getString(\"name\"));\n bundle.putString(\"number\", p.getString(\"number\"));\n bundle.putString(\"gender\", p.getString(\"gender\"));\n bundle.putString(\"hobby\", p.getString(\"hobby\"));\n bundle.putString(\"nativePlace\", p.getString(\"nativePlace\"));\n Toast.makeText(mContext,p.getInt(\"majorid\")+\"\",Toast.LENGTH_SHORT);\n bundle.putString(\"major\", db.findDbModelBySQL(String.format(\"select * from Major_info where majorid='%s';\",p.getInt(\"majorid\"))).getString(\"major\"));\n intent.putExtras(bundle);\n startActivity(intent);\n }\n });\n }", "private void setRecyclerViewData() {\n }", "private void initRecyclerView() {\n mAdapter = new FriendAdapter(new ClickHandler<Author>() {\n @Override\n public void onClick(Author clickedItem) {\n\n // Start the UserActivity for the clicked user to allow the user to confirm this\n // is the person they are trying to connect with\n Intent intent = new Intent(SearchUserActivity.this, UserActivity.class);\n intent.putExtra(AUTHOR_KEY, clickedItem.firebaseId);\n\n startActivity(intent);\n }\n });\n mAdapter.showAddSocialButton(true);\n\n mBinding.searchUserLayout.searchUserRv.setLayoutManager(new LinearLayoutManager(this));\n mBinding.searchUserLayout.searchUserRv.setAdapter(mAdapter);\n }", "public void configureData(){\n listExpandable = (ExpandableListView) findViewById(R.id.expandableList);\n mlaListData = new MLAListData(user.userType);\n listHashMap = mlaListData.getlist();\n listPrimary = new ArrayList<>(listHashMap.keySet());\n\n // Configure the data in Adapter.\n adapter = new MLAMenuAdapter(this, listHashMap, listPrimary);\n listExpandable.setAdapter(adapter);\n\n drawerLayout = (DrawerLayout) findViewById(R.id.dawerLayout);\n actionBarDrawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.mla_drawer_open, R.string.mla_drawer_close);\n drawerLayout.setDrawerListener(actionBarDrawerToggle);\n\n navDrawerList = (LinearLayout) findViewById(R.id.drawer1);\n actionBar = getSupportActionBar();\n actionBar.setDisplayShowHomeEnabled(true);\n actionBar.setDisplayHomeAsUpEnabled(true);\n }", "@Override\n public void onBindViewHolder(MenuRecyclerView.ViewHolder viewHolder, int position) {\n Menu list = mModelList.get(position);\n\n // Set item views based on your views and data model\n viewHolder.mTitle.setText(list.getName());\n viewHolder.mDesc.setText(list.getDescription());\n viewHolder.mImg.setImageResource(list.getImage());\n viewHolder.mCategory.setText(list.getmenuQty());\n final String title=list.getName();\n viewHolder.mMenuitem.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent=new Intent(mContext, Menuitem.class);\n intent.putExtra(\"category\",title);\n mContext.startActivity(intent);\n }\n });\n }", "private void setup() {\n if (getSupportActionBar() != null) {\n getSupportActionBar().setDisplayShowHomeEnabled(true);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n }\n\n subjectId = getIntent().getLongExtra(SUBJECT_EXTRA, 0);\n\n final RecyclerView recyclerView = findViewById(R.id.rv_students);\n students = new ArrayList<>();\n\n adapter = new StudentRecyclerAdapter(students);\n recyclerView.setAdapter(adapter);\n\n LinearLayoutManager layoutManager = new LinearLayoutManager(this);\n recyclerView.setLayoutManager(layoutManager);\n DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(recyclerView.getContext(), layoutManager.getOrientation());\n recyclerView.addItemDecoration(dividerItemDecoration);\n\n swipeRefreshStudents = findViewById(R.id.sr_students);\n swipeRefreshStudents.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n // Refresh items\n refreshItems();\n }\n });\n\n swipeRefreshStudents.setRefreshing(true);\n refreshItems();\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.base, menu);\n this.mCustomMenu = menu;\n if (mTypeLayout) {\n AppSingleton.isChangelayout = true;\n menu.findItem(R.id.change_view_actionbar).setIcon(R.mipmap.ic_grid_on_white);\n } else {\n AppSingleton.isChangelayout = true;\n menu.findItem(R.id.change_view_actionbar).setIcon(R.mipmap.ic_list_white);\n }\n return true;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragment_menu, container, false);\n\n //UI Declare\n search_box = v.findViewById(R.id.menu_search_et_box);\n\n //progress Dialog\n progressDialog=new Stables().showLoading(getContext());\n\n //MenuItem Recycle View\n menuslist = new ArrayList<>();\n categorieslist = new ArrayList<>();\n \n recyclerViewMenu=v.findViewById(R.id.menu_recycle);\n recyclerViewCategory=v.findViewById(R.id.menu_category_recycle);\n\n filter=\"0\";\n searchPrefix=\"\";\n\n LoadMenuItems();\n LoadCategoryItems();\n\n addSearchListener();\n\n\n\n return v;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView v = inflater.inflate(R.layout.activity_menuutama_wp, null);\r\n\r\n\t\tsh = getActivity().getSharedPreferences(Parameter_Collections.SH_NAME, Context.MODE_PRIVATE);\r\n\r\n\t\trv = (RecyclerView)v.findViewById(R.id.recycler_view);\r\n\t\tlayoutManager = new GridLayoutManager(getActivity(), 1);\r\n\t\trv.setLayoutManager(layoutManager);\t\t\r\n\t\tadapter = new Olx_RecyclerAdapter_MenuUtama(getActivity(), getActivity());\r\n\t\trv.setAdapter(adapter);\r\n\t\t\r\n\t\treturn v;\r\n\t}", "private void initializeLayout(){\n String title = mStrInfo;\n String subtitle = mClientItem.clientName;\n mHomeToolbar.setGymRatToolbarTitle(title, subtitle);\n\n //initialize maids\n initializeMaid();\n\n //initialize bottom navigation\n initializeBottomNavigation();\n }", "private void initializeScreenComponents() {\n fabmenu = findViewById(R.id.fabmenu);\n fab = findViewById(R.id.fab);\n noInternetImg = findViewById(R.id.noInternetImg);\n pullToRefresh = findViewById(R.id.pullToRefresh);\n String indicator = getIntent().getStringExtra(Constants.INDICATOR);\n avi = (AVLoadingIndicatorView) findViewById(R.id.avi);\n avi.setIndicator(indicator);\n recyclerView = (RecyclerView) findViewById(R.id.recyclerview);\n recyclerView.setLayoutManager(new LinearLayoutManagerWithSmoothScroller(this.getApplicationContext()));\n shopList = new ArrayList<>();\n gridLayout = new GridLayoutManager(this, 1);\n recyclerView.setLayoutManager(gridLayout);\n adapter = new ShopsInAreaAdapter(this, shopList);\n recyclerView.setAdapter(adapter);\n }", "private void setupViews() {\n this.rvArticles = (RecyclerView) findViewById(R.id.rvArticles);\n this.articles = new ArrayList<>();\n this.articleArrayAdapter = new ArticleArrayAdapter(this, this.articles);\n this.rvArticles.setAdapter(this.articleArrayAdapter);\n StaggeredGridLayoutManager gridLayoutManager =\n new StaggeredGridLayoutManager(GRID_NUM_COLUMNS,\n StaggeredGridLayoutManager.VERTICAL);\n this.rvArticles.setLayoutManager(gridLayoutManager);\n ItemClickSupport.addTo(this.rvArticles).setOnItemClickListener(\n (recyclerView, position, v) -> launchArticleView(position)\n );\n SpacesItemDecoration decoration = new SpacesItemDecoration(GRID_SPACE_SIZE);\n this.rvArticles.addItemDecoration(decoration);\n this.rvArticles.addOnScrollListener(\n new EndlessRecyclerViewScrollListener(gridLayoutManager) {\n @Override\n public void onLoadMore(int page, int totalItemsCount) {\n articleSearch(searchView.getQuery().toString(), page);\n }\n });\n }", "private void setupRecyclerView() {\n recyclerView.setRecycledViewPool(recycledViewPool);\n\n // We are using a multi span grid to allow two columns of buttons. To set this up we need\n // to set our span count on the controller and then get the span size lookup object from\n // the controller. This look up object will delegate span size lookups to each model.\n controller.setSpanCount(SPAN_COUNT);\n// GridLayoutManager gridLayoutManager = new GridLayoutManager(this.getContext(),SPAN_COUNT);\n StaggeredGridLayoutManager gridLayoutManager = new StaggeredGridLayoutManager(SPAN_COUNT, StaggeredGridLayoutManager.VERTICAL);\n// gridLayoutManager.setSpanSizeLookup(controller.getSpanSizeLookup());\n recyclerView.setLayoutManager(gridLayoutManager);\n\n recyclerView.setHasFixedSize(true);\n// recyclerView.addItemDecoration(new VerticalGridCardSpacingDecoration());\n recyclerView.setItemAnimator(new SampleItemAnimator());\n recyclerView.setAdapter(controller.getAdapter());\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.activity_cate, container, false);\n ButterKnife.bind(this, view);\n\n initializeData();\n\n LinearLayoutManager llm = new LinearLayoutManager(this.getContext());\n\n viento.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(getContext(), Activity_Vientos.class);\n getContext().startActivity(intent);\n\n\n\n }\n\n });\n teclados.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(getContext(), Teclados_Activity.class);\n getContext().startActivity(intent);\n\n\n\n }\n\n });\n\n cuerdas.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(getContext(), ActivityCuerdas.class);\n getContext().startActivity(intent);\n\n\n\n }\n\n });\n\n\n percusion.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(getContext(), Percusion_Activity.class);\n getContext().startActivity(intent);\n\n\n\n }\n\n });\n\n\n return view;\n }", "private void setupRecycler() {\n final LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());\n RecyclerView attractionsRecycler = (RecyclerView) getActivity().findViewById(R.id.contentMain_attractionsRecycler);\n attractionsRecycler.setLayoutManager(linearLayoutManager);\n\n attractionsAdapter = new AttractionRowAdapter(getActivity(), FavouritesListFragment.this, DataManager.currentFavouritesList);\n attractionsRecycler.setAdapter(attractionsAdapter);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.menu_list);\n initRecyclerView();\n\n makeSearchCall();\n\n\n\n\n\n\n\n }", "private void initViews() {\n\n myOnClickListener = new MyOnClickListener(getContext());\n recyclerView = (RecyclerView)view.findViewById(R.id.recyclerView_ID);\n recyclerView.setHasFixedSize(true);\n layoutManager = new GridLayoutManager(getActivity(), 2);\n recyclerView.setLayoutManager(layoutManager);\n// adapter = new HomeAdapter(al,al2);\n// recyclerView.setAdapter(adapter);\n\n Log.e(\"adapter value : \",\"\"+this.al +this.al2);\n }", "protected abstract void addMenuOptions();", "private void bindViews() {\n mMenu1 = (com.zhy.autolayout.AutoLinearLayout) rootView.findViewById(R.id.menu1);\n mMenu2 = (com.zhy.autolayout.AutoLinearLayout) rootView.findViewById(R.id.menu2);\n mMenu3 = (com.zhy.autolayout.AutoLinearLayout) rootView.findViewById(R.id.menu3);\n mMenu4 = (com.zhy.autolayout.AutoLinearLayout) rootView.findViewById(R.id.menu4);\n mMenu5 = (com.zhy.autolayout.AutoLinearLayout) rootView.findViewById(R.id.menu5);\n\n mMenu1.setOnClickListener(this);\n mMenu2.setOnClickListener(this);\n mMenu3.setOnClickListener(this);\n mMenu4.setOnClickListener(this);\n mMenu5.setOnClickListener(this);\n }", "private void setUpRecycler() {\n recyclerView = (RecyclerView) findViewById(R.id.recycler_view);\n mAdapter = new ConverterAdapter(this, currencyList);\n RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());\n recyclerView.setLayoutManager(mLayoutManager);\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n ItemTouchHelper.Callback callback =\n new ItemMoveCallback(mAdapter);\n ItemTouchHelper touchHelper = new ItemTouchHelper(callback);\n touchHelper.attachToRecyclerView(recyclerView);\n recyclerView.setAdapter(mAdapter);\n }", "private void setRecycleView(){\n\n RecyclerView recyclerView = findViewById(R.id.recycler_view);\n RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());\n recyclerView.setLayoutManager(mLayoutManager);\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n recyclerView.setAdapter(multiViewAdapter);\n }", "@NonNull\n @Override\n public Holder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {\n return new Holder(((Activity)context).getLayoutInflater().inflate(R.layout.menu_adapter,parent,false));\n }", "private void setupMenuFetched(MenuData menuData) {\n mMenuTabsPagerAdapter =\n new MenuTabsPagerAdapter(getUpdatedMenuCategoriesList(menuData.getMenuCategoriesList()), getSupportFragmentManager(), OrderOnlineActivity.this);\n mMenuViewPager = (ViewPager) findViewById(R.id.menuPager);\n mMenuViewPager.setAdapter(mMenuTabsPagerAdapter);\n // Give the TabLayout the ViewPager\n TabLayout tabLayout = (TabLayout) findViewById(R.id.sliding_tabs);\n tabLayout.setupWithViewPager(mMenuViewPager);\n\n mSearchViewToShow = true;\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n supportInvalidateOptionsMenu();\n// showSearhView();\n }", "@Override\n public void onPrepareOptionsMenu(Menu menu) {\n if (mShowOptionsMenu && ViewConfiguration.get(getActivity()).hasPermanentMenuKey() &&\n isLayoutReady() && mDialpadChooser != null) {\n setupMenuItems(menu);\n }\n }", "private void setUpItemTouchHelper() {\n ItemTouchHelper.SimpleCallback itemTouchHelperCallback =\n new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT) {\n\n @Override\n public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder,\n RecyclerView.ViewHolder target) {\n return true;\n }\n\n @Override\n public void onSelectedChanged(RecyclerView.ViewHolder viewHolder, int actionState) {\n if (viewHolder != null) {\n final View foreground =\n ((CompanyListAdapter.ViewHolder) viewHolder).getForeground();\n\n getDefaultUIUtil().onSelected(foreground);\n }\n }\n\n @Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {\n // Row is swiped from recycler view remove it from adapter\n // comparisonCompaniesAdapter.removeItem(viewHolder.getAdapterPosition());\n Company toBeRestoredCompany = comparisonCompaniesAdapter\n .getItem(viewHolder.getAdapterPosition());\n Company a = null;\n for (Company c : selectedCompanies) {\n if (toBeRestoredCompany.getIdentifiers().getTicker().equalsIgnoreCase(c.getIdentifiers().getTicker())) {\n horizontalCompanyListAdapter.addItem(toBeRestoredCompany);\n a = c;\n }\n }\n if (a != null) {\n selectedCompanies.remove(a);\n }\n comparisonCompaniesAdapter.removeItem(viewHolder.getAdapterPosition());\n }\n\n @Override\n public void clearView(RecyclerView recyclerView,\n RecyclerView.ViewHolder viewHolder) {\n final View foreground = ((ViewHolder) viewHolder).getForeground();\n getDefaultUIUtil().clearView(foreground);\n }\n\n @Override\n public void onChildDraw(Canvas c, RecyclerView recyclerView,\n RecyclerView.ViewHolder viewHolder, float dX, float dY,\n int actionState, boolean isCurrentlyActive) {\n\n final View foreground = ((ViewHolder) viewHolder).getForeground();\n getDefaultUIUtil().onDraw(\n c, recyclerView, foreground, dX, dY, actionState, isCurrentlyActive);\n }\n\n @Override\n public int convertToAbsoluteDirection(int flags, int layoutDirection) {\n return super.convertToAbsoluteDirection(flags, layoutDirection);\n }\n };\n\n // attaching the touch helper to recycler view\n ItemTouchHelper mItemTouchHelper = new ItemTouchHelper(itemTouchHelperCallback);\n mItemTouchHelper.attachToRecyclerView(comparisonCompaniesRecyclerView);\n }", "private void setupRecyclerView() {\r\n\r\n LinearLayoutManager layoutManager = new LinearLayoutManager\r\n (getContext(), LinearLayoutManager.VERTICAL, false);\r\n if (adapter == null) {\r\n adapter = new SchoolAdapter(getContext(), schoolList);\r\n recyclerView.setLayoutManager(layoutManager);\r\n recyclerView.setAdapter(adapter);\r\n recyclerView.setItemAnimator(new DefaultItemAnimator());\r\n recyclerView.setNestedScrollingEnabled(true);\r\n } else {\r\n adapter.notifyDataSetChanged();\r\n }\r\n }", "private void setUpRecyclerview(){\r\n mRecyclerview = (RecyclerView) findViewById(R.id.roomRecView);\r\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);\r\n mRecyclerview.setLayoutManager(linearLayoutManager);\r\n mRecyclerview.setHasFixedSize(true);\r\n mRoomRecyclerview = new RoomRecyclerview(this,mQuery,mAdapterItems,mAdapterKeys);\r\n mRecyclerview.setAdapter(mRoomRecyclerview);\r\n RecyclerView.ItemAnimator itemAnimator = new DefaultItemAnimator();\r\n itemAnimator.setAddDuration(1000);\r\n itemAnimator.setRemoveDuration(1000);\r\n itemAnimator.setChangeDuration(1000);\r\n itemAnimator.setMoveDuration(1000);\r\n mRecyclerview.setItemAnimator(itemAnimator);\r\n\r\n }", "public void initializeMenuItems() {\n menuItems = new LinkedHashMap<TestingOption, MenuDrawerItem>();\n menuItems.put(TestingOption.TESTING_OPTION, create(TestingOption.TESTING_OPTION, getResources().getString(R.string.testing_section).toUpperCase(), MenuDrawerItem.SECTION_TYPE));\n menuItems.put(TestingOption.ANNOTATION_OPTION, create(TestingOption.ANNOTATION_OPTION, getResources().getString(R.string.option_annotation_POI), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_VIEW_SETTINGS_OPTION, create(TestingOption.MAP_VIEW_SETTINGS_OPTION, getResources().getString(R.string.option_map_view_settings), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_CACHE_OPTION, create(TestingOption.MAP_CACHE_OPTION, getResources().getString(R.string.option_map_cache), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.LAST_RENDERED_FRAME_OPTION, create(TestingOption.LAST_RENDERED_FRAME_OPTION, getResources().getString(R.string.option_last_rendered_frame), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ANIMATION_CUSTOM_VIEW_OPTION, create(TestingOption.ANIMATION_CUSTOM_VIEW_OPTION, getResources().getString(R.string.option_ccp_animation_custom_view), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.BOUNDING_BOX_OPTION, create(TestingOption.BOUNDING_BOX_OPTION, getResources().getString(R.string.option_bounding_box), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.INTERNALIZATION_OPTION, create(TestingOption.INTERNALIZATION_OPTION, getResources().getString(R.string.option_internalization), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ANIMATE_OPTION, create(TestingOption.ANIMATE_OPTION, getResources().getString(R.string.option_animate), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_STYLE_OPTION, create(TestingOption.MAP_STYLE_OPTION, getResources().getString(R.string.option_map_style), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.SCALE_VIEW_OPTION, create(TestingOption.SCALE_VIEW_OPTION, getResources().getString(R.string.option_scale_view), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.CALLOUT_VIEW_OPTION, create(TestingOption.CALLOUT_VIEW_OPTION, getResources().getString(R.string.option_callout_view), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ROUTING_OPTION, create(TestingOption.ROUTING_OPTION, getResources().getString(R.string.option_routing), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ROUTE_WITH_POINTS, create(TestingOption.ROUTE_WITH_POINTS, getResources().getString(R.string.option_routing_with_points),MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_VERSION_OPTION, create(TestingOption.MAP_VERSION_OPTION, getResources().getString(R.string.option_map_version_information), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.OVERLAYS_OPTION, create(TestingOption.OVERLAYS_OPTION, getResources().getString(R.string.option_overlays), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.POI_TRACKER, create(TestingOption.POI_TRACKER, getResources().getString(R.string.option_poi_tracker), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.POSITION_LOGGING_OPTION, create(TestingOption.POSITION_LOGGING_OPTION, getResources().getString(R.string.option_position_logging), MenuDrawerItem.ITEM_TYPE));\n\n list = new ArrayList<MenuDrawerItem>(menuItems.values());\n drawerList.setAdapter(new MenuDrawerAdapter(DebugMapActivity.this, R.layout.element_menu_drawer_item, list));\n drawerList.setOnItemClickListener(new DrawerItemClickListener());\n\n }", "@Override\n\tpublic boolean onPrepareOptionsMenu(Menu menu) {\n\t\t// If the nav drawer is open, hide action items related to the content\n\t\t// view\n\t\tboolean drawerOpen = mDrawerLayout.isDrawerOpen(mLinearLayout);\n\t\tmenu.findItem(R.id.action_search).setVisible(drawerOpen);\n\t\tmenu.findItem(R.id.action_settings).setVisible(drawerOpen);\n//\t\tactionBar.setDisplayShowTitleEnabled(drawerOpen);\n\t\t\n\t\tif (mItemPosition == 0 || mItemPosition == 2 || mItemPosition == 4) {\n\t\t\tmenu.findItem(R.id.action_add).setVisible(false);\n\t\t\t\n\t\t\tif (drawerOpen) {\n\n\t\t\t\tif (OverviewFragment.item != null) {\n\t\t\t\t\tOverviewFragment.item.setVisible(false);\n\t\t\t\t}\n\n\t\t\t\tif (OverViewFragmentMonth.item != null) {\n\t\t\t\t\tOverViewFragmentMonth.item.setVisible(false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (CategorysReportFragment.item != null) {\n\t\t\t\t\tCategorysReportFragment.item.setVisible(false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (CashReportFragment.item != null) {\n\t\t\t\t\tCashReportFragment.item.setVisible(false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\tmenu.findItem(R.id.action_add).setVisible(!drawerOpen);\n\t\t}\n\n\t\tif (mItemPosition == 1 && drawerOpen == false) {\n\n\t\t\tif (AccountsFragment.item0 != null\n\t\t\t\t\t&& AccountsFragment.sortCheck == 1) {\n\t\t\t\tAccountsFragment.item1.setVisible(false);\n\t\t\t\tAccountsFragment.item0.setVisible(true);\n\t\t\t}\n\t\t}\n\n\t\treturn super.onPrepareOptionsMenu(menu);\n\t}", "@Override\n \tpublic boolean onPrepareOptionsMenu(Menu menu) {\n \t\tmenu.clear();\n \t\tswitch (mViewFlipper.getDisplayedChild()) {\n \t\tcase 0:\n \t\t\tmenu.add(Menu.NONE, Menu.FIRST + 4, 4, getString(R.string.omenuitem_reglogin)).setIcon(R.drawable.ic_menu_login);\n \t\t\tmenu.add(Menu.NONE, Menu.FIRST + 5, 5, getString(R.string.omenuitem_quit)).setIcon(android.R.drawable.ic_menu_close_clear_cancel);\n \t\t\tbreak;\n \t\tcase 1:\n \t\t\tif (mBrowPage.isDooming()) {\n \t\t\t\tmenu.add(Menu.NONE, Menu.FIRST + 1, 1, R.string.label_browse).setIcon(android.R.drawable.ic_menu_zoom);\n \t\t\t} else {\n \t\t\t\tmenu.add(Menu.NONE, Menu.FIRST + 1, 1, R.string.label_zoom).setIcon(android.R.drawable.ic_menu_zoom);\n \t\t\t}\n \t\t\tmenu.add(Menu.NONE, Menu.FIRST + 2, 1, R.string.label_reset).setIcon(android.R.drawable.ic_menu_revert);\n \t\t\tmenu.add(Menu.NONE, Menu.FIRST + 3, 1, R.string.label_refresh).setIcon(R.drawable.ic_menu_refresh);\n \t\t\tbreak;\n \t\tcase 2:\n \t\t\tbreak;\n \t\t}\n \t\tmenu.add(Menu.NONE, Menu.FIRST + 6, 6, getString(R.string.omenuitem_about)).setIcon(android.R.drawable.ic_menu_help);\n \n \t\treturn super.onPrepareOptionsMenu(menu);\n \t}", "@Override\n public void setUpAdapterAndView(List<ListItem> listOfData) {\n this.listOfData = listOfData;\n LinearLayoutManager layoutManager = new LinearLayoutManager(this);\n\n recyclerView.setLayoutManager(layoutManager);\n\n adapter = new CustomAdapter();\n recyclerView.setAdapter(adapter);\n\n DividerItemDecoration itemDecoration = new DividerItemDecoration(\n recyclerView.getContext(),\n layoutManager.getOrientation()\n );\n\n itemDecoration.setDrawable(\n ContextCompat.getDrawable(\n ListActivity.this,\n R.drawable.divider_white\n )\n );\n\n recyclerView.addItemDecoration(\n itemDecoration\n );\n\n ItemTouchHelper itemTouchHelper = new ItemTouchHelper(createHelperCallback());\n itemTouchHelper.attachToRecyclerView(recyclerView);\n\n\n }", "private void setupRecyclerView(@NonNull RecyclerView recyclerView) {\n if(mForumList != null) {\n recyclerView.setAdapter(new SimpleItemRecyclerViewAdapter((HomeActivity) getActivity(), mForumList, mTwoPane));\n }\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_main, container, false);\n\n // Declarar y referenciar el RecyclerView que definimos en el XML\n RecyclerView recyclerView = view.findViewById(R.id.recyclerView);\n\n /*\n * Setear el LayoutManager al RecyclerView (recordar que podemos definir distintos tipos de\n * LayoutManager según la forma en la cual queremos mostrar nuestra lista.)\n */\n\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext(),LinearLayoutManager.VERTICAL, false);\n\n /*\n * Setear el LayoutManager que hayamos elegido al RecyclerView referenciado en el paso 1:\n * recyclerView.setLayoutManager(layoutManager);\n */\n recyclerView.setLayoutManager(linearLayoutManager);\n\n\n // Creo la lista que tiene los items.\n List<ItemLista> itemsDeLista = new ArrayList<>();\n\n\n // cargo la lista con los items\n itemsDeLista.add(new ItemLista(\"Batman\",\"Accion\",R.drawable.batman));\n itemsDeLista.add(new ItemLista(\"Damages\", \"Drama\", R.drawable.damages));\n itemsDeLista.add(new ItemLista(\"Destroyer\", \"Drama\", R.drawable.destroyer));\n itemsDeLista.add(new ItemLista(\"El Juicio\", \"Drama\", R.drawable.eljuicio));\n itemsDeLista.add(new ItemLista(\"Inocente\", \"Drama\", R.drawable.inocente));\n itemsDeLista.add(new ItemLista(\"Intern\", \"Drama\", R.drawable.intern));\n itemsDeLista.add(new ItemLista(\"Jhon Wick 2\", \"Accion\", R.drawable.johnwick2));\n itemsDeLista.add(new ItemLista(\"King Kong\", \"Accion\", R.drawable.kong));\n itemsDeLista.add(new ItemLista(\"La Boda de mi Amigo\", \"Comedia\", R.drawable.labodademi));\n itemsDeLista.add(new ItemLista(\"Prometo\", \"Drama\", R.drawable.prometo));\n itemsDeLista.add(new ItemLista(\"Second\", \"Drama\", R.drawable.second));\n itemsDeLista.add(new ItemLista(\"The Good Doctor\", \"Drama\", R.drawable.thegoogdoctor));\n\n /*\n * Crear un Adapter, utilizando la clase definida anteriormente.\n * ItemListaAdapter itemListaAdapter = new ItemAdapter(itemsDeLista);\n *\n */\n ItemListaAdapter itemListaAdapter = new ItemListaAdapter(itemsDeLista);\n\n // Setear al RecyclerView el adapter creado.\n recyclerView.setAdapter(itemListaAdapter);\n\n return view;\n }", "@Override\n public boolean onPrepareActionMode(ActionMode mode, Menu menu) {\n// if (mSelectedItem==1) {\n// MenuInflater inflater = mode.getMenuInflater();\n// inflater.inflate(R.menu.geo, menu);\n// }\n return true; // Return false if nothing is done\n }", "private void configureRecyclerView(){\n this.postAdapter = new PostAdapter(generateOptionsForAdapter(PostHelper.getAllMyPosts(BaseActivity.getUid())),\n Glide.with(this), this,false, false);\n\n\n recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n recyclerView.setAdapter(this.postAdapter);\n }", "private void initRecyclerview() {\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(this);\n recyclerView.setLayoutManager(layoutManager);\n\n mAdapter = new MovieAdapter(this);\n recyclerView.setAdapter(mAdapter);\n }", "private void initView() {\n // set layout for recycle view\n //hasFixedSize true if adapter changes cannot affect the size of the RecyclerView\n recyclerView.setHasFixedSize(true);\n // this layout can be vertical or horizontal by change the second param\n // of LinearLayoutManager, and display up to down by set the third param false\n LinearLayoutManager layoutManager = new LinearLayoutManager(this,\n LinearLayoutManager.VERTICAL, false);\n\n recyclerView.setLayoutManager(layoutManager);\n importData();\n // set adapter for recycle view\n recyclerView.setAdapter(alarmAdapter);\n }", "private void initializeMenu() {\n menu = new Menu(parent.getShell());\n MenuItem item1 = new MenuItem(menu, SWT.NONE);\n item1.setText(Resources.getMessage(\"LatticeView.9\")); //$NON-NLS-1$\n item1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n model.getClipboard().addToClipboard(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.CLIPBOARD, selectedNode));\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n \n MenuItem item2 = new MenuItem(menu, SWT.NONE);\n item2.setText(Resources.getMessage(\"LatticeView.10\")); //$NON-NLS-1$\n item2.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n controller.actionApplySelectedTransformation();\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_calculadora) {\r\n Calculadora calculadora = new Calculadora();\r\n setContentView(R.layout.calculadora);\r\n\r\n\r\n //*calculadora.onCreate(Bundle );*//\r\n\r\n Toast.makeText(getApplicationContext(),\r\n \"Calculadora está sendo implementado\",\r\n Toast.LENGTH_SHORT).show();\r\n\r\n\r\n return true;\r\n }\r\n if (id == R.id.action_cad_livro) {\r\n Cadastro_Livro cadastro_livro = new Cadastro_Livro();\r\n\r\n setContentView(R.layout.cadastro_livros);\r\n Toast.makeText(getApplicationContext(),\r\n \"Cadastro de Livro está sendo implementado\",\r\n Toast.LENGTH_SHORT).show();\r\n\r\n\r\n return true;\r\n }\r\n if (id == R.id.action_cad_autor) {\r\n Cadastro_Autor cadastro_autor = new Cadastro_Autor();\r\n setContentView(R.layout.calculadora);\r\n //*mostra uma mensagem na tela*//\r\n Toast.makeText(getApplicationContext(),\r\n \"Cadastro de Autores está sendo implementado\",\r\n Toast.LENGTH_SHORT).show();\r\n\r\n\r\n return true;\r\n }\r\n if (id == R.id.action_cad_editora) {\r\n Cadastro_Editora cadastro_editora = new Cadastro_Editora();\r\n setContentView(R.layout.calculadora);\r\n Toast.makeText(getApplicationContext(),\r\n \"Cadastro de Editoras está sendo implementado\",\r\n Toast.LENGTH_SHORT).show();\r\n\r\n return true;\r\n }\r\n if (id == R.id.action_cad_usuario) {\r\n Cadastro_Usuario cadastro_usuario = new Cadastro_Usuario();\r\n setContentView(R.layout.calculadora);\r\n Toast.makeText(getApplicationContext(),\r\n \"Cadastro de Usuário está sendo implementado\",\r\n Toast.LENGTH_SHORT).show();\r\n\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "public void setRecyclerView() {\n mRecyclerView = view.findViewById(R.id.fragment_notifications_today_rv); //instantiating the recyclerview\n mRecyclerView.setHasFixedSize(true); //\n\n // Setting the layout manager for the recycler view\n mLayoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false); //instantiates how the layout should look like for recyclerview\n mRecyclerView.setLayoutManager(mLayoutManager); //sets the layout manager to one chosen\n\n // Setting the custom adapter for the recycler view\n mAdapter = new NotificationsTodayAdapter(this,\n (NotificationsTodayContract.Presenter.AdapterAPI) mPresenter); //instantiates the adapter\n mRecyclerView.setAdapter(mAdapter); //sets the adapter\n //notificationsScreenController.listenTodayRecyclerView(mRecyclerView, notificationResponse);\n// mPresenter.listenTodayRecyclerView(mRecyclerView, notificationResponse);\n }", "@Override\n public void onBindViewHolder(@NonNull Holder holder, final int position) {\n final MenuModel item = list.get(position);\n holder.text.setText(item.Text);\n holder.icon.setImageDrawable(ContextCompat.getDrawable(context,item.Icon));\n holder.layout.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n listener.onItemClick(item,position);\n }\n });\n\n }", "private void initCategoryListAdapter() {\n\n LinearLayoutManager horizontalLayoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.HORIZONTAL, false);\n topicRecyclerView.setLayoutManager(horizontalLayoutManager);\n // topicRecyclerView.setAdapter(adapter);\n }", "public void initialization() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);\n getWindow().setStatusBarColor(ContextCompat.getColor(this, R.color.color_yellow));\n }\n\n// RelativeLayout Id\n addPlaceLayout = (RelativeLayout) findViewById(R.id.addPlaceLayout);\n\n// ImageView Id\n iv_back_button = (ImageView) findViewById(R.id.iv_back_button);\n\n// TextView Id\n tv_title_toolbar = (TextView) findViewById(R.id.tv_title_toolbar);\n tv_title_toolbar.setText(getIntent().getStringExtra(\"name\"));\n\n// Click Listener\n addPlaceLayout.setOnClickListener(this);\n iv_back_button.setOnClickListener(this);\n\n// RecyclerView Setup\n rvTagViewDetails = (RecyclerView) findViewById(R.id.rvTagViewDetails);\n rvTagViewDetails.setHasFixedSize(true);\n mLayoutManager = new LinearLayoutManager(TagViewDetailsActivity.this);\n rvTagViewDetails.setLayoutManager(mLayoutManager);\n savedListModels = new ArrayList<>();\n setValues();\n }", "private void setUpFoodItemsRView(String category, View view){\n //Log.d(TAG, \"setUpFoodItemsRView: Category: \"+category+\" View :\"+view);\n // TextView mFoodCategoryHeadingText = view.findViewById(R.id.menuItemHeading);\n // mFoodCategoryHeadingText.setText(category+\"'s\");\n // shimmerFrameLayout.startShimmer();\n RecyclerView mFoodItemsRecycler = view.findViewById(R.id.foodItemsRecyclerView);\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity(),LinearLayoutManager.HORIZONTAL,false);\n mFoodItemsRecycler.setHasFixedSize(true);\n mFoodItemsRecycler.setLayoutManager(linearLayoutManager);\n\n // adapter = new FoodItemAdapter(mFoodItems,mContext,this);\n foodAdapter = new FoodItemAdapter(mSelectedCategoryFoodItem,getActivity(),this);\n mFoodItemsRecycler.setAdapter(foodAdapter);\n\n //Getting the data from firebase\n loadRecyclerViewData(category);\n\n\n }", "public void updateMenus() {\n\t\tSystem.out.println(\"BarGraphDisplayer.updateMenus\");\n\t\tCommandRegistrar.gRegistrar.checkAction(\"barGraph\");\n\t\tCommandRegistrar.gRegistrar.enableAction(\"viewOptions\");\n\t}", "@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}", "private void setupRecyclerView() {\r\n recyclerView = rootView.findViewById(R.id.recycler_view);\r\n animeAdapter = new AnimeAdapter(this, this);\r\n recyclerView.setAdapter(animeAdapter);\r\n recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\r\n }", "private void populate() {\n\n adapter = new DashboardRecyclerAdapter(getActivity(), getData());\n dashboardRecyclerView.setAdapter(adapter);\n dashboardRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n\n\n /*GridAdapter adapter = new GridAdapter(getActivity(), options);\n gridView.setAdapter(adapter);*/\n\n //setting up on click listener in gridview\n /*gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n switch (options[position]) {\n case \"Appliances\":\n startActivity(new Intent(getActivity(), AppliancesActivity.class));\n break;\n *//*case \"Electrical\":\n startActivity(new Intent(getActivity(), ElectricalActivity.class));\n break;*//*\n case \"Wiring\":\n startActivity(new Intent(getActivity(), WiringActivity.class));\n break;\n case \"Plumbing\":\n startActivity(new Intent(getActivity(), PlumbingActivity.class));\n break;\n }\n }\n\n });*/\n }", "private void initializeMenuForListView() {\n\t\tMenuItem sItem = new MenuItem(labels.get(Labels.PROP_INFO_ADD_S_MENU));\n\t\tsItem.setOnAction(event ->\n\t\t\taddSAction()\n\t\t);\n\t\t\n\t\tMenuItem scItem = new MenuItem(labels.get(Labels.PROP_INFO_ADD_SC_MENU));\n\t\tscItem.setOnAction(event ->\n\t\t\t\taddScAction()\n\t\t);\n\t\t\n\t\tContextMenu menu = new ContextMenu(sItem, scItem);\n\t\tfirstListView.setContextMenu(menu);\n\t\tsecondListView.setContextMenu(menu);\n\t}", "private void initActionBerMenu() {\n\n action_search = (ImageView) findViewById(R.id.action_search);\n action_search.setVisibility(View.GONE);\n catagory_imageview = (Button) findViewById(R.id.catagory_imageview);\n places_imageview = (Button) findViewById(R.id.places_imageview);\n btn_search = (Button) findViewById(R.id.btn_search);\n\n action_search.setOnClickListener(this);\n catagory_imageview.setOnClickListener(this);\n places_imageview.setOnClickListener(this);\n btn_search.setOnClickListener(this);\n\n\n }", "private void initComponent(){\n recyclerView = findViewById(R.id.noti_recycler_view);\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\n\n notifAdapter = new NotificationAdapter(this, notifications, currentUser);\n recyclerView.setAdapter(notifAdapter);\n\n ItemTouchHelper.Callback callback = new SwipeItemTouchHelper(notifAdapter);\n itemTouchHelper = new ItemTouchHelper(callback);\n itemTouchHelper.attachToRecyclerView(recyclerView);\n }", "public void menuSetup(){\r\n menu.add(menuItemSave);\r\n menu.add(menuItemLoad);\r\n menu.add(menuItemRestart);\r\n menuBar.add(menu); \r\n topPanel.add(menuBar);\r\n bottomPanel.add(message);\r\n \r\n this.setLayout(new BorderLayout());\r\n this.add(topPanel, BorderLayout.NORTH);\r\n this.add(middlePanel, BorderLayout.CENTER);\r\n this.add(bottomPanel, BorderLayout.SOUTH);\r\n \r\n }", "private void setupUi() {\n actionBar = getSupportActionBar();\n assert actionBar != null;\n //setting the icon\n actionBar.setHomeAsUpIndicator(R.drawable.menu_icon);\n drawerLayout = findViewById(R.id.DrawerLayout);\n navigationView = findViewById(R.id.navigation_view);\n //tell application to do to and fro in navigation menu when button is clicked to change states and create animations\n toggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);\n drawerLayout.addDrawerListener(toggle);\n setupNavigationView();\n toggle.setDrawerIndicatorEnabled(true);\n toggle.syncState();\n /*------------------Navigation Drawer menu-----------------*/\n //Change the view's z order in the tree, so it's on top of other sibling views.\n // used when their is an error is selecting items\n // navigationView.bringToFront();\n\n }", "public void setupMenuItems(){\n\n MenuItem[] items = {\n new MenuItem(R.string.menu_item_one, R.drawable.paye_icon),\n new MenuItem(R.string.menu_item_two, R.drawable.mortgage_icon),\n new MenuItem(R.string.menu_item_three, R.drawable.mortgage_icon),\n new MenuItem(R.string.menu_item_four, R.drawable.mortgage_icon),\n new MenuItem(R.string.menu_item_five, R.drawable.mortgage_icon),\n new MenuItem(R.string.menu_item_six, R.drawable.mortgage_icon)\n };\n\n GridView menuGrid = (GridView) findViewById(R.id.menu_grid);\n MainPageAdapter mainPageAdapter = new MainPageAdapter(this, items);\n menuGrid.setAdapter(mainPageAdapter);\n\n menuGrid.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {\n\n switch(position) {\n case 0:\n getSupportFragmentManager().beginTransaction().add(R.id.fragment_container, new PayeFragment()).addToBackStack(null).commit();\n break;\n }\n\n }\n });\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 recyclerView = (RecyclerView) view.findViewById(R.id.categoryWise);\n adapter = new MayankAdapter(getActivity(), getData());\n\n recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n recyclerView.addOnItemTouchListener(new RecyclerTouchListener(getActivity(), recyclerView, new ClickListener() {\n @Override\n public void onClick(View view, int position) {\n Toast.makeText(getActivity(), \"You Clicked\" + getData().get(position).title, Toast.LENGTH_LONG).show();\n\n switch (position) {\n case 0:\n startActivity(new Intent(getActivity(), ComputerScience.class));\n break;\n case 1:\n startActivity(new Intent(getActivity(), Electrical.class));\n break;\n case 2:\n startActivity(new Intent(getActivity(), Fiction.class));\n break;\n case 3:\n startActivity(new Intent(getActivity(), Mathematics.class));\n break;\n case 4:\n startActivity(new Intent(getActivity(), Mechanical.class));\n break;\n case 5:\n startActivity(new Intent(getActivity(), Chemical.class));\n break;\n case 6:\n startActivity(new Intent(getActivity(), Civil.class));\n break;\n case 7:\n startActivity(new Intent(getActivity(), Others.class));\n break;\n }\n }\n\n @Override\n public void onLongClick(View view, int position) {\n\n }\n }));\n\n recyclerView.setAdapter(adapter);\n return view;\n }", "@Override\n public boolean onPrepareActionMode(final ActionMode mode, Menu menu) {\n isEnable = true;\n //create method\n clickItem(holder);\n //set observer on to get text method\n mainViewModel.getSelectedLiveData().observe((LifecycleOwner) activity,\n new Observer<String>() {\n @Override\n public void onChanged(String s) {\n //when text change\n //set text on action mode title\n mode.setTitle(String.format(\"%s %s %s\",context.getResources()\n .getString(R.string.selected),s ,\n context.getResources().getString(R.string.item) ));\n }\n });\n return true;\n }", "private void init() {\n\t\tname = getIntent().getStringExtra(\"name\");\n\t\tnameID = getIntent().getStringExtra(\"id\");\n\n\t\tsetSupportActionBar(mToolbar);\n\t\tsetSupportActionBar(mToolbar);\n\t\tgetSupportActionBar().setDisplayHomeAsUpEnabled(true);\n\t\tgetSupportActionBar().setDisplayShowHomeEnabled(true);\n\t\tmToolbar.setTitle(name);\n\t\tmToolbar.setNavigationOnClickListener(new View.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\n\t\tmBtnSendText.setEnabled(false);\n\t\tchatViewModel = ViewModelProviders.of(this).get(ChatViewModel.class);\n\t\tchatAdapter = new ChatAdapter(this, this);\n\n\t\tLinearLayoutManager linearLayoutManager = new LinearLayoutManager(getApplicationContext(), RecyclerView.VERTICAL, false);\n\t\tlinearLayoutManager.setStackFromEnd(true);\n\t\tmChatList.setLayoutManager(linearLayoutManager);\n\t\tmChatList.setAdapter(chatAdapter);\n\n\t\t// Send Button click listener.\n\t\tmBtnSendText.setOnClickListener(new View.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tcheckConnection();\n\t\t\t}\n\t\t});\n\n\t\t// Chat Box text change listener.\n\t\tmChatBox.addTextChangedListener(new TextWatcher() {\n\t\t\t@Override\n\t\t\tpublic void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {\n\t\t\t\tif (charSequence.length() == 0)\n\t\t\t\t\tmBtnSendText.setEnabled(false);\n\t\t\t\telse\n\t\t\t\t\tmBtnSendText.setEnabled(true);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void afterTextChanged(Editable editable) {\n\n\t\t\t}\n\t\t});\n\t}", "@Override\n protected void setMenuItemsAsync() {\n try {\n if (plot.getStatus().equals(Status.unreviewed)) {\n getMenu().getSlot(10)\n .setItem(new ItemBuilder(Material.FIREBALL, 1)\n .setName(\"§c§lUndo Submit\").setLore(new LoreBuilder()\n .addLine(\"Click to undo your submission.\").build())\n .build());\n } else {\n getMenu().getSlot(10)\n .setItem(new ItemBuilder(Material.NAME_TAG, 1)\n .setName(\"§a§lSubmit\").setLore(new LoreBuilder()\n .addLines(\"Click to complete this plot and submit it to be reviewed.\",\n \"\",\n Utils.getNoteFormat(\"You won't be able to continue building on this plot!\"))\n .build())\n .build());\n }\n } catch (SQLException ex) {\n Bukkit.getLogger().log(Level.SEVERE, \"A SQL error occurred!\", ex);\n getMenu().getSlot(10).setItem(MenuItems.errorItem());\n }\n\n // Set teleport to plot item\n getMenu().getSlot(hasFeedback ? 12 : 13)\n .setItem(new ItemBuilder(Material.COMPASS, 1)\n .setName(\"§6§lTeleport\").setLore(new LoreBuilder()\n .addLine(\"Click to teleport to the plot.\").build())\n .build());\n\n // Set plot abandon item\n getMenu().getSlot(hasFeedback ? 14 : 16)\n .setItem(new ItemBuilder(Material.BARRIER, 1)\n .setName(\"§c§lAbandon\").setLore(new LoreBuilder()\n .addLines(\"Click to reset your plot and to give it to someone else.\",\n \"\",\n Utils.getNoteFormat(\"You won't be able to continue building on your plot!\"))\n .build())\n .build());\n\n // Set plot feedback item\n if (hasFeedback) {\n getMenu().getSlot(16)\n .setItem(new ItemBuilder(Material.BOOK_AND_QUILL)\n .setName(\"§b§lFeedback\").setLore(new LoreBuilder()\n .addLine(\"Click to view your plot review feedback.\").build())\n .build());\n }\n\n // Set plot members item\n try {\n if (!plot.isReviewed()) {\n if (getMenuPlayer() == plot.getPlotOwner().getPlayer() || getMenuPlayer().hasPermission(\"plotsystem.admin\")) {\n getMenu().getSlot(22)\n .setItem(new ItemBuilder(Utils.getItemHead(Utils.CustomHead.ADD_BUTTON))\n .setName(\"§b§lManage Members\").setLore(new LoreBuilder()\n .addLines(\"Click to open your Plot Member menu, where you can add\",\n \"and remove other players on your plot.\",\n \"\",\n Utils.getNoteFormat(\"Score will be split between all members when reviewed!\"))\n .build())\n .build());\n } else if (plot.getPlotMembers().stream().anyMatch(m -> m.getUUID().equals(getMenuPlayer().getUniqueId()))) {\n getMenu().getSlot(22)\n .setItem(new ItemBuilder(Utils.getItemHead(Utils.CustomHead.REMOVE_BUTTON))\n .setName(\"§b§lLeave Plot\").setLore(new LoreBuilder()\n .addLines(\"Click to leave this plot.\",\n \"\",\n Utils.getNoteFormat(\"You will no longer be able to continue build or get any score on it!\"))\n .build())\n .build());\n }\n }\n } catch (SQLException ex) {\n Bukkit.getLogger().log(Level.SEVERE, \"A SQL error occurred!\", ex);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n int id = item.getItemId();\n if (id == R.id.change_view_actionbar) {\n mTypeLayout = !mTypeLayout;\n SharedPreferences preferences = getSharedPreferences(\"type_layout\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putBoolean(\"typelayout\", mTypeLayout);\n editor.apply();\n if (mTypeLayout) {\n item.setIcon(R.mipmap.ic_grid_on_white);\n } else {\n item.setIcon(R.mipmap.ic_list_white);\n }\n\n } else if (id == R.id.movies_actionbar) {\n mViewPager.setCurrentItem(0);\n } else if (id == R.id.favourite_actionbar) {\n mViewPager.setCurrentItem(1);\n } else if (id == R.id.setting_actionbar) {\n mViewPager.setCurrentItem(2);\n } else if (id == R.id.about_actionbar) {\n mViewPager.setCurrentItem(3);\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void InitData() {\n this.mItemTitleIds = new int[]{R.string.can_car_type_select, R.string.can_car_lock_set, R.string.can_ac_set, R.string.can_light_set, R.string.can_sshbl, R.string.can_cds, R.string.can_car_info, R.string.can_oil_mile_info, R.string.can_tmps, R.string.can_other_set, R.string.can_lang_set};\n this.mItemTypes = new CanScrollCarInfoView.Item[]{CanScrollCarInfoView.Item.ICON, CanScrollCarInfoView.Item.ICON, CanScrollCarInfoView.Item.ICON, CanScrollCarInfoView.Item.ICON, CanScrollCarInfoView.Item.ICON, CanScrollCarInfoView.Item.ICON, CanScrollCarInfoView.Item.ICON, CanScrollCarInfoView.Item.ICON, CanScrollCarInfoView.Item.ICON, CanScrollCarInfoView.Item.ICON, CanScrollCarInfoView.Item.ICON};\n this.mItemIcons = new int[]{R.drawable.can_icon_esc, R.drawable.can_icon_lock, R.drawable.can_icon_ac, R.drawable.can_icon_light, R.drawable.can_icon_service, R.drawable.can_icon_cds, R.drawable.can_icon_sudu, R.drawable.can_icon_consumption, R.drawable.can_icon_tpms, R.drawable.can_icon_setup, R.drawable.can_icon_tyres};\n this.mItemVisibles[0] = 0;\n this.mItemVisibles[1] = 0;\n this.mItemVisibles[3] = 0;\n this.mItemVisibles[4] = 0;\n this.mItemVisibles[5] = 0;\n this.mItemVisibles[6] = 0;\n this.mItemVisibles[7] = 0;\n this.mItemVisibles[8] = 0;\n this.mItemVisibles[9] = 0;\n }", "@Override\n\tprotected void setMenu() {\n\t\t\n\t\tfinal ButtonGroup actionButtonGroup = new ButtonGroup();\n\t\tfor (String s : ((TreeSite) object).actions) {\n\t\t\tJRadioButton button = new JRadioButton(s);\n\t\t\tbutton.setActionCommand(s);\n\t\t\tactionButtonGroup.add(button);\n\t\t\tmenu.add(button);\n\t\t}\n\t\t\n\t\tJPanel headingPanel = new JPanel();\n\t\theadingPanel.setLayout(new BoxLayout(headingPanel, BoxLayout.LINE_AXIS));\n\t\theadingPanel.add(new JLabel(\"Heading: \"));\n\t\tfinal JTextField headingField = new JTextField();\n\t\theadingField.setText(Float.toString(INITIAL_FLOAT_VALUE));\n\t\theadingField.setColumns(10);\n\t\theadingPanel.add(headingField);\n\t\tmenu.add(headingPanel);\n\t\t\n\t\tJPanel lengthPanel = new JPanel();\n\t\tlengthPanel.setLayout(new BoxLayout(lengthPanel, BoxLayout.LINE_AXIS));\n\t\tlengthPanel.add(new JLabel(\"Length: \"));\n\t\tfinal JTextField lengthField = new JTextField();\n\t\tlengthField.setText(Integer.toString(INITIAL_INTEGER_VALUE));\n\t\tlengthField.setColumns(10);\n\t\tlengthPanel.add(lengthField);\n\t\tmenu.add(lengthPanel);\n\t\t\n\t\tJPanel counterPanel = new JPanel();\n\t\tcounterPanel.setLayout(new BoxLayout(counterPanel, BoxLayout.LINE_AXIS));\n\t\tcounterPanel.add(new JLabel(\"Counter: \"));\n\t\tfinal JTextField counterField = new JTextField();\n\t\tcounterField.setText(Integer.toString(INITIAL_INTEGER_VALUE));\n\t\tcounterField.setColumns(10);\n\t\tcounterPanel.add(counterField);\n\t\tmenu.add(counterPanel);\n\t\t\n\t\tJPanel targetPanel = new JPanel();\n\t\ttargetPanel.setLayout(new BoxLayout(targetPanel, BoxLayout.LINE_AXIS));\n\t\ttargetPanel.add(new JLabel(\"Target position: \"));\n\t\ttargetFieldX = new JTextField();\n\t\ttargetFieldX.setEditable(false);\n\t\ttargetFieldX.setText(\"\");\n\t\ttargetFieldX.setColumns(4);\n\t\ttargetFieldY = new JTextField();\n\t\ttargetFieldY.setEditable(false);\n\t\ttargetFieldY.setText(\"\");\n\t\ttargetFieldY.setColumns(4);\n\t\ttargetPanel.add(targetFieldX);\n\t\ttargetPanel.add(new JLabel(\", \"));\n\t\ttargetPanel.add(targetFieldY);\n\t\tmenu.add(targetPanel);\n\t\tmenu.add(new SetTargetPositionButton(editor).button);\n\t\t\n\t\tJButton removeTargetButton = new JButton(\"Remove Target\");\n\t\tremoveTargetButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttargetFieldX.setText(\"\");\n\t\t\t\ttargetFieldY.setText(\"\");\n\t\t\t\teditor.targetIcon.setVisible(false);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tmenu.add(removeTargetButton);\n\t\t\n\t\tfinal CyclicButtonGroup cyclicButtons = new CyclicButtonGroup();\n\t\t\n\t\tJRadioButton nonCyclicButton = new JRadioButton(\"Set to non-cyclic\");\n\t\tnonCyclicButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tcyclicButtons.beginningOfCycle.data.cycleStart = false;\n\t\t\t\t\tcyclicButtons.beginningOfCycle = null;\n\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tcyclicButtons.add(nonCyclicButton);\n\t\t\n\t\tfinal JButton addActionButton = new JButton(\"Add Action\");\n\t\t\n\t\tmenu.add(addActionButton);\n\t\tmenu.add(nonCyclicButton);\n\t\t\n\t\taddActionButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif (actionButtonGroup.getSelection() == null) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please select an action type\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tFloat headingValue = null;\n\t\t\t\tInteger lengthValue = null;\n\t\t\t\tInteger counterValue = null;\n\t\t\t\tInteger targetValueX = null;\n\t\t\t\tInteger targetValueY = null;\n\t\t\t\tboolean noTarget = false;\n\t\t\t\ttry {\n\t\t\t\t\ttargetValueX = Integer.parseInt(targetFieldX.getText());\n\t\t\t\t\ttargetValueY = Integer.parseInt(targetFieldY.getText());\n\t\t\t\t} catch (NumberFormatException nfe) {\n\t\t\t\t\tnoTarget = true;\n\t\t\t\t}\n\t\t\t\tif (headingField.getText() == null || !isValidHeading(headingField.getText())) {\n\t\t\t\t\tif (noTarget) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter a heading value greater than or equal to 0 and less than 360\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\theadingValue = Float.parseFloat(headingField.getText());\n\t\t\t\t}\n\t\t\t\tif (lengthField.getText() == null || !isValidLength(lengthField.getText())) {\n\t\t\t\t\tif (noTarget) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter an integer length value greater than 0\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlengthValue = Integer.parseInt(lengthField.getText());\n\t\t\t\t}\n\t\t\t\tif (counterField.getText() == null || !isValidCounter(counterField.getText(), Integer.parseInt(lengthField.getText()))) {\n\t\t\t\t\tif (noTarget) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter an integer counter value greater than 0 and less than the length value\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tcounterValue = Integer.parseInt(counterField.getText());\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tActionMetadata data = new ActionMetadata(actionButtonGroup.getSelection().getActionCommand(),\n\t\t\t\t\t\theadingValue, lengthValue, counterValue, false, targetValueX, targetValueY);\n\t\t\t\t((TreeSite) object).actionQueue.add(data);\n\t\t\t\tcreateActionPanel(cyclicButtons, data);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tfor (ActionMetadata metadata : ((TreeSite) object).actionQueue) {\n\t\t\tcreateActionPanel(cyclicButtons, metadata);\n\t\t}\n\t\t\n\t}", "public void initRecyclerView() {\n rvTodos = (RecyclerView) findViewById(R.id.rvTodos);\n\n // Create adapter passing in the sample user data\n TodoAdapter adapter = new TodoAdapter(todos, this);\n // Attach the adapter to the recyclerview to populate items\n rvTodos.setAdapter(adapter);\n // Set layout manager to position the items\n LinearLayoutManager mLayoutManager = new LinearLayoutManager(this);\n mLayoutManager.setReverseLayout(true);\n mLayoutManager.setStackFromEnd(true);\n rvTodos.setLayoutManager(mLayoutManager);\n // That's all!\n }", "private void updateMenuItems()\r\n\t {\r\n\t\t setListAdapter(new ArrayAdapter<String>(this,\r\n\t\t android.R.layout.simple_list_item_1, home_menu));\r\n\t\t \t \r\n\t }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_rsd, container, false);\n\n ((AppCompatActivity)getActivity()).getSupportActionBar().setTitle(\"RSD\");\n\n setFloatingActionButton(view);\n\n mRecyclerView = (RecyclerView) view.findViewById(R.id.rv_list_rsd);\n mRecyclerView.setHasFixedSize(true);\n mRecyclerView.setOnScrollListener(new RecyclerView.OnScrollListener() {\n @Override\n public void onScrollStateChanged(RecyclerView recyclerView, int newState) {\n super.onScrollStateChanged(recyclerView, newState);\n }\n\n @Override\n public void onScrolled(RecyclerView recyclerView, int dx, int dy) {\n super.onScrolled(recyclerView, dx, dy);\n\n if (dy > 0) {\n fab.hideMenuButton(true);\n } else {\n fab.showMenuButton(true);\n }\n\n LinearLayoutManager llm = (LinearLayoutManager) mRecyclerView.getLayoutManager();\n\n HomeAdapter adapter = (HomeAdapter) mRecyclerView.getAdapter();\n\n if (mList.size() == llm.findLastCompletelyVisibleItemPosition() + 1) {\n List<RML> listAux = ((TelaHome) getActivity()).getSetRMLList(10);\n\n for (int i = 0; i < listAux.size(); i++) {\n adapter.addListItem(listAux.get(i), mList.size());\n }\n }\n }\n });\n\n LinearLayoutManager llm = new LinearLayoutManager(getActivity());\n llm.setOrientation(LinearLayoutManager.VERTICAL);\n mRecyclerView.setLayoutManager(llm);\n\n //criar adapter para o RMLFragment\n mList = ((TelaHome) getActivity()).getSetRMLList(10);\n HomeAdapter adapter = new HomeAdapter(getActivity(), mList);\n adapter.setRecyclerViewOnClickListenerHack(this);\n mRecyclerView.setAdapter(adapter);\n\n return view;\n }", "private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }", "private void init() {\n if (getSupportActionBar() != null &&\n (presenter.getRepositoryName() != null && !presenter.getRepositoryName().isEmpty())) {\n getSupportActionBar().setTitle(presenter.getRepositoryName());\n }\n\n rcvItems.setLayoutManager(new LinearLayoutManager(this));\n\n if (presenter.getPullRequests() != null && presenter.getPullRequests().size() != 0) {\n setupList();\n }\n pgbLoading.setVisibility(View.GONE);\n tvwNoData.setVisibility(presenter.getPullRequests() != null && presenter.getPullRequests().size() != 0 ? View.GONE : View.VISIBLE);\n }", "@Override\n public void onClick(View view) {\n clearItemData();\n set_view_for(1);\n getSellMenuId();\n\n\n }", "@Override\n protected void onResume() {\n super.onResume();\n recyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));\n MyAdapter myAdapter = new MyAdapter(this, initData());\n myAdapter.setParentClickableViewAnimationDefaultDuration();\n myAdapter.setParentAndIconExpandOnClick(true);\n recyclerView.setAdapter(myAdapter);\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n }", "private void configureView() {\n if (rotateLoadingView != null)\n rotateLoadingView.start();\n categoryRecyclerView.setHasFixedSize(true);\n categoryRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n mCategoryAdapter = new CategoryAdapter(this);\n categoryRecyclerView.setVisibility(View.GONE);\n\n }", "public void buildRecyclerView(){\n setOnClickListener();\n RecyclerView reminderRecycler = findViewById(R.id.reminderRecycler);\n reminderRecycler.setHasFixedSize(false);\n RecyclerView.LayoutManager reminderLayoutManager = new LinearLayoutManager(this);\n recyclerAdapter = new RecyclerAdapter(reminderItems, listener);\n reminderRecycler.setLayoutManager(reminderLayoutManager);\n reminderRecycler.setAdapter(recyclerAdapter);\n reminderRecycler.addItemDecoration(new MemberItemDecoration(300));\n }", "public void initRecyclerView() {\n\r\n\r\n recyclerView.setHasFixedSize(true);\r\n recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\r\n\r\n\r\n adapter = new LokerAdapter(getContext(), itemList);\r\n recyclerView.setAdapter(adapter);\r\n\r\n }", "private void InitializeUI(){\n\t\t//Set up the menu items, which are differentiated by their IDs\n\t\tArrayList<MenuItem> values = new ArrayList<MenuItem>();\n\t\tMenuItem value = new MenuItem();\n\t\tvalue.setiD(0); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(1); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(2); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(3); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(4); values.add(value);\n\n MenuAdapter adapter = new MenuAdapter(this, R.layout.expandable_list_item3, values);\n \n // Assign adapter to List\n setListAdapter(adapter);\n \n //Set copyright information\n Calendar c = Calendar.getInstance();\n\t\tString year = String.valueOf(c.get(Calendar.YEAR));\n\t\t\n\t\t//Set up the copyright message which links to the author's linkedin page\n TextView lblCopyright = (TextView)findViewById(R.id.lblCopyright);\n lblCopyright.setText(getString(R.string.copyright) + year + \" \");\n \n TextView lblName = (TextView)findViewById(R.id.lblName);\n lblName.setText(Html.fromHtml(\"<a href=\\\"http://uk.linkedin.com/in/lekanbaruwa/\\\">\" + getString(R.string.name) + \"</a>\"));\n lblName.setMovementMethod(LinkMovementMethod.getInstance());\n\t}", "@Override\n public boolean onCreateActionMode(ActionMode mode, Menu menu)\n {\n MenuInflater inflater = mode.getMenuInflater();\n inflater.inflate(R.menu.menu_multi_select, menu);\n multi_select_menu = menu;\n adapter.is_action_mode = true;\n adapter.notifyDataSetChanged();\n fab.hide();\n //context_menu = menu;\n return true;\n }", "@Override\n public void create(SwipeMenu menu) {\n SwipeMenuItem item1 = new SwipeMenuItem(\n getApplicationContext());\n item1.setBackground(new ColorDrawable(Color.DKGRAY));\n // set width of an option (px)\n item1.setWidth(200);\n item1.setTitle(\"Action 1\");\n item1.setTitleSize(18);\n item1.setTitleColor(Color.WHITE);\n menu.addMenuItem(item1);\n\n SwipeMenuItem item2 = new SwipeMenuItem(\n getApplicationContext());\n // set item background\n item2.setBackground(new ColorDrawable(Color.RED));\n item2.setWidth(200);\n item2.setTitle(\"Action 2\");\n item2.setTitleSize(18);\n item2.setTitleColor(Color.WHITE);\n menu.addMenuItem(item2);\n }", "private void setItemMenu() {\n choices = new ArrayList<>();\n \n choices.add(Command.INFO);\n if (item.isUsable()) {\n choices.add(Command.USE);\n }\n if (item.isEquipped()) {\n choices.add(Command.UNEQUIP);\n } else {\n if (item.isEquipable()) {\n choices.add(Command.EQUIP);\n }\n }\n \n if (item.isActive()) {\n choices.add(Command.UNACTIVE);\n } else {\n if (item.isActivable()) {\n choices.add(Command.ACTIVE);\n }\n }\n if (item.isDropable()) {\n choices.add(Command.DROP);\n }\n if (item.isPlaceable()) {\n choices.add(Command.PLACE);\n }\n choices.add(Command.DESTROY);\n choices.add(Command.CLOSE);\n \n this.height = choices.size() * hItemBox + hGap * 2;\n }", "private void setUpRecycler() {\n Log.d(\"MainActivity\", \"setUpRecycler : start\");\n // Connecting the recyclerview to the view in the layout\n prayerRecyclerView = findViewById(R.id.recycler_main_movie);\n\n // Creating our custom adapter\n prayerRecyclerAdapter = new PrayerRecyclerAdapter(this, prayerList);\n Log.d(\"MainActivity\", \"setUpRecycler : prayerList = \" + prayerList.size());\n // Setting the adapter to our recyclerview\n prayerRecyclerView.setAdapter(prayerRecyclerAdapter);\n\n // Creating and setting a layout manager.\n // Note that the manager is VERTICAL, thus a vertical list\n LinearLayoutManager layout = new LinearLayoutManager(\n this, LinearLayoutManager.VERTICAL, false);\n prayerRecyclerView.setLayoutManager(layout);\n Log.d(\"MainActivity\", \"setUpRecycler : stop\");\n }" ]
[ "0.6873889", "0.6513224", "0.6327247", "0.6310091", "0.6280005", "0.62415504", "0.6238787", "0.6207353", "0.61603194", "0.6140465", "0.61153185", "0.6114198", "0.6096654", "0.6065348", "0.6030387", "0.60130346", "0.59974927", "0.5993885", "0.59823924", "0.5966547", "0.59476125", "0.5929575", "0.59212923", "0.5910173", "0.5894132", "0.5882161", "0.5872021", "0.58692455", "0.5868575", "0.5860576", "0.58502173", "0.5837806", "0.58323413", "0.58218026", "0.582061", "0.5815158", "0.580512", "0.5795209", "0.5777901", "0.57763624", "0.57757384", "0.57680947", "0.5767275", "0.57658744", "0.5762541", "0.5735078", "0.57317775", "0.5729906", "0.57133615", "0.57099164", "0.57075036", "0.5706518", "0.570296", "0.5695413", "0.5695337", "0.56765187", "0.56742877", "0.56666833", "0.5664914", "0.56622434", "0.5653533", "0.565341", "0.5645698", "0.5636872", "0.5629541", "0.5626962", "0.5619989", "0.56167316", "0.56155753", "0.5612949", "0.5611147", "0.5608878", "0.5602087", "0.56000316", "0.55981785", "0.55961007", "0.5594617", "0.5594301", "0.5592935", "0.5585092", "0.55847955", "0.5583707", "0.55794215", "0.5576751", "0.5575086", "0.5566533", "0.55631775", "0.55622345", "0.55606407", "0.5559523", "0.55521446", "0.55510783", "0.55491716", "0.55491716", "0.55482525", "0.554685", "0.5536158", "0.5534623", "0.5528561", "0.55259496" ]
0.5706812
51
Set the user that will eat to this restaurant
public void updateUser() { users.clear(); RestaurantHelper.getCollectionFromARestaurant(currentRest.getPlaceId(), "luncherId").addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() { @Override public void onComplete(@NonNull Task<QuerySnapshot> task) { for (DocumentSnapshot docSnap : task.getResult()) { UserHelper.getUser(docSnap.getId()).addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() { @Override public void onComplete(@NonNull Task<DocumentSnapshot> task) { if(!task.getResult().getId().equals(currentUser.getUid())){ users.add(task.getResult().toObject(User.class)); mCoworkerAdapter.notifyDataSetChanged(); } } }); } } }).addOnFailureListener(this.onFailureListener()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void setRestaurant(RestaurantChung restaurant) {\n\t\t\n\t}", "public void setRestaurant(Restaurant restaurant) {\n this.restaurant = restaurant;\n }", "public void setUser(String user)\n {\n _user = user;\n }", "public void addRestaurant(UserRestaurant restaurant) {\n\tif (restaurants == null) {\n\t restaurants = new HashSet<UserRestaurant>();\n\t}\n\tif (restaurant != null) {\n\t restaurant.setUser(this);\n\t}\n\trestaurants.add(restaurant);\n }", "public void setUser(User user) { this.user = user; }", "public void setUser(String user) {\r\n this.user = user;\r\n }", "private void setUser(People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n user_ = value;\n \n }", "public void setUser(String user) \r\n\t{\n\t\tthis.user = user;\r\n\t}", "@FXML private void setToNewUser(){\n\t\tshowPassword();\n\t\tclearFields();\n\t\thideLackMessages();\n\t\tchangeCancelButton.setText(\"Anuluj\");\n\t\tnewUser = true;\n\t}", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setRestaurant(online.food.ordering.Restaurant _restaurant)\n {\n restaurant = _restaurant;\n }", "public void setUser(User user) {\r\n this.user = user;\r\n }", "Restaurant setRestaurantAddress(Address address);", "public void setUser(final String user)\n {\n checkImmutable();\n this.user = user;\n }", "public void setUser(User user) {\n\tthis.user = user;\n }", "public void setUser(String user) {\n\t\t\tthis.user = user;\n\t\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 }", "public void setUser(User user) {\n this.savedBy = user;\n }", "public void setUser(Motile user) {\n\n this.user = user;\n }", "private void setUser(\n int index, People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureUserIsMutable();\n user_.set(index, value);\n }", "public void setUser(UserDTO user)\r\n {\r\n if (!edit)\r\n {\r\n this.user = user;\r\n\r\n if (user != null)\r\n {\r\n textUser.setText(user.getUsername());\r\n\r\n }\r\n }\r\n else\r\n {\r\n JOptionPane.showMessageDialog(this, \"Cannot select another person while you are adding or edditing the tree.\");\r\n }\r\n }", "public void setRequested(User requested) {\n this.requested = requested;\n }", "public void set(User user) {\n\n if(user.getIsRestr() == 0 ) { // user comment\n HungryClient.userImage(mContext, this.image, user.getImgPath());\n this.textName.setText(user.getName());\n } else if (user.getIsRestr() == 1 ) { // restr comment\n Restr restr = user.getRestr();\n HungryClient.userImage(mContext, this.image, restr.getImg());\n this.textName.setText(restr.getName());\n }\n\n }", "public void setUser(User theUser) {\n\t\tmyUser = theUser;\n\t}", "public void setUser(User user) {\r\n\t\tthis.user = user;\r\n\t}", "public void setUser(User user) {\r\n\t\tthis.user = user;\r\n\t}", "public void setSpouse() {\n\n if (user.getGender().equals('m')) {\n maleSpouse.add(user.getPersonID());\n } else {\n femaleSpouse.add(user.getPersonID());\n }\n\n if(user.getSpouseID() != null) {\n\n Person spouse = people.get(user.getSpouseID());\n\n if(spouse.getGender().equals(\"m\")) {\n maleSpouse.add(spouse.getPersonID());\n } else {\n femaleSpouse.add(spouse.getPersonID());\n }\n }\n }", "public void setWishOfUser(boolean wish) {\n this.wishOfUSer = wish;\n }", "public void setExaminer (User examiner) {\n\t\tthis.examiner = examiner;\n\t}", "void setPassedUser(User passedUser);", "public void setUser(final String user)\n {\n checkImmutable();\n if (this.logger.isTraceEnabled()) {\n this.logger.trace(\"setting user: \" + user);\n }\n this.user = user;\n }", "public void setUser(final String user)\n {\n checkImmutable();\n if (this.logger.isTraceEnabled()) {\n this.logger.trace(\"setting user: \" + user);\n }\n this.user = user;\n }", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setRequester(User requester) {\n this.requester = requester;\n }", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "public static void setUser(String user) {\n Account.user = user;\n }", "public void setUser(java.lang.String user) {\n this.user = user;\n }", "void setUser(User user, int id) {\n this.user = user;\n this.id = id;\n }", "public void setCallingUser(entity.User value);", "public void setUser(final User user) {\n this.user = user;\n }", "public void setUser(Long user) {\n this.user = user;\n }", "public void makeCurrentUser() {\n // Remove the Add Friend ImageView\n mFriendIv.setVisibility(View.GONE);\n\n // Show the \"You\" TextView\n mYouTv.setVisibility(View.VISIBLE);\n }", "public void setEditUser(User editUser)\r\n/* */ {\r\n/* 179 */ this.editUser = editUser;\r\n/* */ }", "@Override\n\tpublic void setUserId(long userId) {\n\t\t_esfTournament.setUserId(userId);\n\t}", "public void setIdUser(int value) {\n this.idUser = value;\n }", "public void setUser(UserData data) {\n user = data;\n }", "private void setUser(\n People.Builder builderForValue) {\n user_ = builderForValue.build();\n \n }", "public void setEnteredBy(int tmp) {\n this.enteredBy = tmp;\n }", "public void setfUser(FirebaseUser f){\n fUser = f;\n }", "public void setSelectedRestaurant(int selectedRestaurant) {\n this.selectedRestaurant = selectedRestaurant;\n }", "public void assignAuthorisedUser(final boolean val) {\n authorisedUser = val;\n }", "private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }", "public void flagUser() {\n\t\tsuper.flagUser();\n\t}", "public void setUser (User user) {\n userId = user.id != null ? user.id : User.getUserId(user.username);\n }", "private void setObjUser(People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n objUser_ = value;\n \n }", "public void setOrganisator(MyUser organisator) {\n if (createdEvents != null) {\n for (int i = 0; i < createdEvents.size(); i++) {\n createdEvents.get(i).setOrganisator(organisator);\n }\n adapderEventCard.notifyDataSetChanged();\n }\n }", "public void setUser(UserModel user) {\n this.sender = user;\n }", "public void setName(String restaurantName) { // Sets the restaurant's name\n\t\tname = restaurantName;\n\t}", "public void setCurrentUser(int userNum) {\n\t\tuserTurn = userNum;\n\t}", "public void setupUser() {\n }", "Restaurant setRestaurant(Restaurant modifiedRest);", "private void changeUser(int position) {\n nameView.setText(selected_user.getFname());\n ptsView.setText(Integer.toString(selected_user.getAccumulatedPts()));\n\n //TODO fix this in master\n String resourceName = selected_user.getProfilePicResourceName();\n Resources resources = context.getResources();\n int resourceId = resources.getIdentifier(resourceName, \"drawable\", \"familytaskmanager.microso.com.familytaskmanager\");\n pic.setImageResource(resourceId);\n\n //Set the selected user as the current user in the database and family\n ((MainActivity) activity).requestSetCurrentUser(position);\n }", "public void setUser(UserEntity user) {\n this.user = user;\n }", "public void setUser(int U)\t\n\t{\t//start of setUser mehtod\n\t\tuserNum = U;\n\t}", "public void changeUser() {\n refreshState();\n SystemUserDTO user = null;\n SystemUserDTO systemUser = null;\n systemUser = ctrl.getSystemUser(this.inputTextUser);\n if (systemUser == null) {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.addSystemUser(user);\n } else {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.updateSystemUser(user);\n }\n refreshState();\n this.currentUser = user;\n }", "public void setUser(ScrumzuUser user) {\n\t\tthis.user = user;\n\t}", "private void startYourLunchActivy() {\n UserHelper.getUser(this.getCurrentUser().getUid()).addOnSuccessListener(documentSnapshot -> {\n User user = documentSnapshot.toObject(User.class);\n String restaurantId = Objects.requireNonNull(user).getRestaurantId();\n\n if (!restaurantId.equals(\"\")) {\n Intent intent = new Intent(this, RestaurantActivity.class);\n intent.putExtra(RESTAURANT_TAG, restaurantId);\n startActivity(intent);\n } else {\n showSnackBar(getResources().getString(R.string.no_restaurant_picked));\n }\n });\n }", "void setCurrentUser(@Nullable User newCurrentUser) {\n currentUser = newCurrentUser;\n }", "public void setIduser(int aIduser) {\n iduser = aIduser;\n }", "private void setUser(HttpServletRequest req, Request sensorReq) {\n\t\tObject userObject = req.getAttribute(\"__user\");\n\t\tif ( null == userObject) \n\t\t{\n\t\t\tsensorReq.setUser(UserProfile.getAnonymous());\n\t\t} \n\t\telse \n\t\t{\n\t\t\tsensorReq.setUser((UserProfile) userObject);\n\t\t}\n\t}", "public void setIdUser(Integer idUser) {\r\n\t\tthis.idUser = idUser;\r\n\t}", "@Override\n public void setUserId(long userId) {\n _usersCatastropheOrgs.setUserId(userId);\n }", "public void favouriteUser() {\r\n\t\tif(favourited) {\r\n\t\t\tcurrentUser.unfavouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Favourite\");\r\n\t\t\tfavourited = false;\r\n\t\t} else if(currentUser.getUserID() != userToView.getUserID()){\r\n\t\t\tcurrentUser.favouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Unfavourite\");\r\n\t\t\tfavourited = true;\r\n\t\t} else {\r\n\t\t\tCONSTANTS.makeAlertWindow(\"warning\",\"You can not favorite yourself!\");\r\n\t\t}\r\n\t}", "public void setlogUserIn() {\n\t\tmenu1.setOnAction(event -> {\n\t\t\topenUserSettings();\n\t\t});\n\t\tmenu2.setOnAction(event -> {\n\t\t\tsetlogUserOut();\n\t\t});\n\t\tuserMenuButton.setText(controller.loggedIn());\n\t\tuserMenuButton.setStyle(\"-fx-font-size: 10pt; -fx-text-fill:black;\"); // MUOTOILU CSSSSSÄÄÄÄN\n\t\tuserMenuButton.getItems().addAll(menu1, menu2);\n\t\tloggedinuser.setVisible(true);\n\t\tloggedinuser.setText(bundle.getString(\"mVloggedin\"));\n\t\tloggedinuser.setGraphic(userMenuButton);\n\t\tloggedinuser.setContentDisplay(ContentDisplay.RIGHT);\n\t\tuserSettings.setVisible(true);\n\t\tloginoption.setVisible(false);\n\t}", "public void setIdUser(String idUser) {\n\t\tthis.idUser = idUser;\n\t}", "public void setOwner(User owner) {\n this.owner = owner;\n }", "public void setLoggedUser(CustomEmployee user) {\n loggedUser = user;\n }", "public void setUserId(){\n AdGyde.setClientUserId(\"ADG1045984\");\n Toast.makeText(this, \"UserId = ADG1045984\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void setRole(User u) {\n loginTrue(u.getName());\n uRole = u.getUserRole();\n switch (uRole) {\n case 1:\n nhanvien.setEnabled(true);\n break;\n case 2:\n quanly.setEnabled(false);\n break;\n case 3:\n break;\n case 4:\n dathang.setEnabled(false);\n break;\n case 5:\n baocao.setEnabled(false);\n break;\n }\n }", "public void setCurrentUser(String username) {\n currentUser = username;\n }", "public void setCreator(User creator) {\n this.creator = creator;\n }", "public void setSelectedUser(String selected) {\n selectedUser = selected;\n\n //this.removeAllEvents();\n //loadEvents();\n }", "@Override\n\tpublic void setUser(IUser user) {\n\t\tgetInnerObject().setUser(user);\n\t}", "public void setId_user(int id_user) {\n this.id_user = id_user;\n }", "private void setUserId(int value) {\n \n userId_ = value;\n }", "public void setId_user(int id_user) {\r\n this.id_user = id_user;\r\n }", "@Override\n public void setUserId(long userId) {\n _partido.setUserId(userId);\n }", "void setUser(final ApplicationUser user);" ]
[ "0.6773287", "0.6707321", "0.64366275", "0.6426011", "0.63916594", "0.63760376", "0.6369457", "0.6353541", "0.63224256", "0.62994874", "0.62994874", "0.62994874", "0.62994874", "0.62374854", "0.6232334", "0.6229307", "0.62104875", "0.61546004", "0.6115846", "0.61080927", "0.61080927", "0.61080927", "0.6097936", "0.6095094", "0.6078489", "0.6074752", "0.6071489", "0.6069685", "0.6061137", "0.6058519", "0.6058519", "0.6045968", "0.60334617", "0.5988026", "0.59642947", "0.5948757", "0.5948757", "0.59429926", "0.59429926", "0.59429926", "0.59429926", "0.59429926", "0.59429926", "0.5937516", "0.59327084", "0.59327084", "0.59327084", "0.5922211", "0.591772", "0.59167516", "0.5915176", "0.5899658", "0.5892936", "0.5882954", "0.5858404", "0.58546597", "0.5846815", "0.5836023", "0.5820248", "0.58179414", "0.58166695", "0.58156425", "0.5812532", "0.58063173", "0.5805561", "0.579226", "0.57785296", "0.5777962", "0.5775451", "0.5767691", "0.57581764", "0.573521", "0.57346225", "0.57323253", "0.5728488", "0.5724221", "0.57228047", "0.57200193", "0.57153", "0.57152003", "0.56872433", "0.5680728", "0.56746095", "0.5670915", "0.56666803", "0.56552684", "0.5653317", "0.5652187", "0.5647774", "0.5644043", "0.5640825", "0.56401145", "0.5639539", "0.5620688", "0.56167245", "0.5600528", "0.55957174", "0.55899626", "0.5589048", "0.55830735" ]
0.5704301
80
Style for floating button
@OnClick(R.id.floating_button_go) public void floatingButtonClick(){ if(imIn){ floatingButton.setImageDrawable(getResources().getDrawable(R.drawable.baseline_check_circle_grey_48)); UserHelper.updateLunchId(getCurrentUser().getUid(), "").addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull Task<Void> task) { UserHelper.updateLunchName(getCurrentUser().getUid(), ""); RestaurantHelper.deleteLuncherId(currentRest.getPlaceId(), getCurrentUser().getUid()); } }).addOnFailureListener(this.onFailureListener()); imIn = false; // - Update the lunching restaurant of current user and update his pending intent for notification with a valid Restaurant object mNotificationAlarm.updateLunchingRestaurant(null); } else { floatingButton.setImageDrawable(getResources().getDrawable(R.drawable.baseline_check_circle_green_48)); UserHelper.updateLunchId(getCurrentUser().getUid(), currentRest.getPlaceId()).addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull Task<Void> task) { UserHelper.updateLunchName(getCurrentUser().getUid(), currentRest.getName()); RestaurantHelper.getRestaurantsCollection().get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() { @Override public void onComplete(@NonNull Task<QuerySnapshot> task) { for(DocumentSnapshot docSnap : task.getResult()){ RestaurantHelper.deleteLuncherId(docSnap.getId(), getCurrentUser().getUid()); } RestaurantHelper.addLuncherId(currentRest.getPlaceId() , getCurrentUser().getUid()); } }); } }).addOnFailureListener(this.onFailureListener()); imIn = true; // - Update the lunching restaurant of current user and update his pending intent for notification with a valid Restaurant object mNotificationAlarm.updateLunchingRestaurant(currentRest); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void floatingMenu(){\n btn_main = findViewById(R.id.fab_main);\n btn_lang = findViewById(R.id.fab_language);\n btn_profil = findViewById(R.id.fab_profil);\n\n btn_lang.setTranslationY(translationY);\n btn_profil.setTranslationY(translationY);\n\n btn_lang.setAlpha(0f);\n btn_profil.setAlpha(0f);\n\n btn_main.setOnClickListener(this);\n btn_profil.setOnClickListener(this);\n btn_lang.setOnClickListener(this);\n }", "public static void showFloatingButton() {\n floatingActionButton.show();\n }", "public void initFloatButton(){\n\n if(mFloatButton == null){\n mFloatButton = (FloatingActionButton)findViewById\n (mHouseKeeper.getFloatingActionButtonId());\n mFloatButton.setOnClickListener(mHouseKeeper.getFABOnClickListener());\n }\n }", "private void animarFloatingButton() {\r\n\r\n compartir.setScaleX(0);\r\n compartir.setScaleY(0);\r\n\r\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\r\n final Interpolator interpolador = AnimationUtils.loadInterpolator(getBaseContext(),\r\n android.R.interpolator.fast_out_slow_in);\r\n\r\n compartir.animate()\r\n .scaleX(1)\r\n .scaleY(1)\r\n .setInterpolator(interpolador)\r\n .setDuration(600)\r\n .setStartDelay(1000)\r\n .setListener(new Animator.AnimatorListener() {\r\n @Override\r\n public void onAnimationStart(Animator animation) {\r\n\r\n }\r\n\r\n @Override\r\n public void onAnimationEnd(Animator animation) {\r\n\r\n }\r\n\r\n @Override\r\n public void onAnimationCancel(Animator animation) {\r\n\r\n }\r\n\r\n @Override\r\n public void onAnimationRepeat(Animator animation) {\r\n\r\n }\r\n });\r\n }\r\n }", "private void setupFloatingActionButtons() {\n final FloatingActionButton fabAddFollow = (FloatingActionButton) myView.findViewById(R.id.fabAddFollow);\n fabAddFollow.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Log.d(\"AAA\", \"SOMETHING\");\n getActivity().getFragmentManager().beginTransaction()\n .setCustomAnimations(R.animator.slide_in_left, R.animator.slide_out_left, R.animator.slide_in_right, R.animator.slide_out_right)\n .replace(R.id.content_frame, new addFollowFragment()).addToBackStack(\"follow_list\").commit();\n }\n });\n }", "boolean hasFloatButtonPermission(Context context);", "public boolean isFloatingBoxActive()\n {\n return false;\n }", "public void setFloatingActionButton(View view) {\n fab = (FloatingActionMenu) view.findViewById(R.id.fab_rsd);\n fab.setOnMenuToggleListener(new FloatingActionMenu.OnMenuToggleListener() {\n @Override\n public void onMenuToggle(boolean b) {\n //Toast.makeText(getActivity(), \"Is menu opened? \" + (b ? \"true\" : \"false\"), Toast.LENGTH_SHORT).show();\n }\n });\n fab.showMenuButton(true);\n fab.setClosedOnTouchOutside(true);\n\n FloatingActionButton fab1 = (FloatingActionButton) view.findViewById(R.id.fab1_rsd);\n FloatingActionButton fab2 = (FloatingActionButton) view.findViewById(R.id.fab2_rsd);\n\n fab1.setOnClickListener(this);\n fab2.setOnClickListener(this);\n }", "@ReactMethod\n public void setFloatingButtonEdge(final String floatingButtonEdge, final int floatingButtonOffset) {\n MainThreadHandler.runOnMainThread(new Runnable() {\n @Override\n public void run() {\n final InstabugFloatingButtonEdge parsedEdge = ArgsRegistry.floatingButtonEdges\n .getOrDefault(floatingButtonEdge, InstabugFloatingButtonEdge.RIGHT);\n BugReporting.setFloatingButtonOffset(floatingButtonOffset);\n BugReporting.setFloatingButtonEdge(parsedEdge);\n }\n });\n }", "private org.gwtbootstrap3.client.ui.AnchorButton get_f_AnchorButton21() {\n return build_f_AnchorButton21();\n }", "private void setPressedStyle() {\n this.setStyle(BUTTON_PRESSED);\n this.setPrefHeight(43);\n this.setLayoutY(getLayoutY() + 4);\n }", "private org.gwtbootstrap3.client.ui.AnchorButton get_f_AnchorButton45() {\n return build_f_AnchorButton45();\n }", "private Button buttonStyling(Button button, boolean top, boolean left) {\r\n\t\tif(top) {\r\n\t\t\tbutton.getAllStyles().setMarginTop(100);\t\r\n\t\t} else if(left) {\r\n\t\t\tbutton.getAllStyles().setMarginLeft(500);\r\n\t\t}\r\n\t\t\r\n\t\tbutton.getAllStyles().setPadding(5, 5, 2, 2);\r\n\t\tbutton.getAllStyles().setBgTransparency(255);\r\n\t\tbutton.getUnselectedStyle().setBgColor(ColorUtil.BLUE);\r\n\t\tbutton.getAllStyles().setFgColor(ColorUtil.WHITE);\r\n\t\tbutton.getAllStyles().setBorder(Border.createLineBorder(4, ColorUtil.BLACK));\r\n\t\t\r\n\t\treturn button;\r\n\t}", "private void expandFAB() {\n FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) fab1.getLayoutParams();\n layoutParams.rightMargin += (int) (fab1.getWidth() * 1.7);\n layoutParams.bottomMargin += (int) (fab1.getHeight() * 0.25);\n fab1.setLayoutParams(layoutParams);\n fab1.startAnimation(show_fab_1);\n fab1.setClickable(true);\n\n //Floating Action Button 2\n FrameLayout.LayoutParams layoutParams2 = (FrameLayout.LayoutParams) fab2.getLayoutParams();\n layoutParams2.rightMargin += (int) (fab2.getWidth() * 1.5);\n layoutParams2.bottomMargin += (int) (fab2.getHeight() * 1.5);\n fab2.setLayoutParams(layoutParams2);\n fab2.startAnimation(show_fab_2);\n fab2.setClickable(true);\n\n FrameLayout.LayoutParams layoutParams3 = (FrameLayout.LayoutParams) fab3.getLayoutParams();\n layoutParams3.rightMargin += (int) (fab3.getWidth() * 0.25);\n layoutParams3.bottomMargin += (int) (fab3.getHeight() * 1.7);\n fab3.setLayoutParams(layoutParams3);\n fab3.startAnimation(show_fab_3);\n fab3.setClickable(true);\n }", "private void setReleasedStyle() {\n this.setStyle(BUTTON_FREE);\n this.setPrefHeight(47);\n this.setLayoutY(getLayoutY() - 4);\n }", "private void setFloatingActionButtonListener() {\n floatingActionButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n View mView = getLayoutInflater().inflate(R.layout.add_trail_dialogbox, null);\n popUpDialogBox(mView, 1);\n }\n });\n }", "private org.gwtbootstrap3.client.ui.AnchorButton get_f_AnchorButton56() {\n return build_f_AnchorButton56();\n }", "private org.gwtbootstrap3.client.ui.AnchorButton get_f_AnchorButton72() {\n return build_f_AnchorButton72();\n }", "public void buttonStyle(JButton button) {\n button.setMargin(new Insets(5, 20, 5, 20));\n button.setBackground(new Color(0, 140, 237));\n button.setOpaque(true);\n button.setBorderPainted(false);\n button.setForeground(Color.WHITE);\n button.setFocusPainted(false);\n }", "private void setFloatingButtonListener() {\n floatingActionButton.setOnClickListener(v -> {\n if (actualFragment instanceof MyPetsFragment) {\n hideShareAppButton();\n addPet();\n } else if (actualFragment instanceof CommunityFragment){\n createGroupDialog();\n } else if (actualFragment instanceof InfoGroupFragment){\n if (InfoGroupFragment.getGroup().isUserSubscriber(user)) {\n createForumDialog();\n } else {\n Toast toast = Toast.makeText(this, getString(R.string.should_be_subscribed), Toast.LENGTH_LONG);\n toast.show();\n }\n }\n\n });\n }", "private void setupButtonUI(Button b, String ff, double f, double w, Pos p, double x, double y) {\n\t\tb.setFont(Font.font(ff, f));\n\t\tb.setMinWidth(w);\n\t\tb.setAlignment(p);\n\t\tb.setLayoutX(x);\n\t\tb.setLayoutY(y);\n\t}", "private void hideFAB() {\n FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) fab1.getLayoutParams();\n layoutParams.rightMargin -= (int) (fab1.getWidth() * 1.7);\n layoutParams.bottomMargin -= (int) (fab1.getHeight() * 0.25);\n fab1.setLayoutParams(layoutParams);\n fab1.startAnimation(hide_fab_1);\n fab1.setClickable(false);\n\n //Floating Action Button 2\n FrameLayout.LayoutParams layoutParams2 = (FrameLayout.LayoutParams) fab2.getLayoutParams();\n layoutParams2.rightMargin -= (int) (fab2.getWidth() * 1.5);\n layoutParams2.bottomMargin -= (int) (fab2.getHeight() * 1.5);\n fab2.setLayoutParams(layoutParams2);\n fab2.startAnimation(hide_fab_2);\n fab2.setClickable(false);\n\n //Floating Action Button 3\n FrameLayout.LayoutParams layoutParams3 = (FrameLayout.LayoutParams) fab3.getLayoutParams();\n layoutParams3.rightMargin -= (int) (fab3.getWidth() * 0.25);\n layoutParams3.bottomMargin -= (int) (fab3.getHeight() * 1.7);\n fab3.setLayoutParams(layoutParams3);\n fab3.startAnimation(hide_fab_3);\n fab3.setClickable(false);\n }", "private org.gwtbootstrap3.client.ui.AnchorButton get_f_AnchorButton10() {\n return build_f_AnchorButton10();\n }", "private void floaterMouseClicked(java.awt.event.MouseEvent evt) {\n if (count == 0) {\n count = 1;\n last = System.currentTimeMillis();\n } else if (count == 1) {\n long news = System.currentTimeMillis();\n if (last - news < 1000) {\n lastbg = floater.getBackground();\n floater.setBackground(Color.lightGray);\n }\n }\n deskPane.setBackground(null);\n }", "private org.gwtbootstrap3.client.ui.AnchorButton get_f_AnchorButton67() {\n return build_f_AnchorButton67();\n }", "private void setFabIcons() {\n\n if (isAddedToFavorites()) {\n mFabButton.setTag(FAV_TAG);\n mFabButton.setImageDrawable(getResources().getDrawable(R.drawable.ic_favorite));\n } else {\n mFabButton.setTag(NOT_FAV_TAG);\n mFabButton.setImageDrawable(getResources().getDrawable(R.drawable.ic_favorite_border));\n }\n }", "public static void hideFloatingButton() {\n floatingActionButton.hide();\n }", "private void formatButton(JButton button, boolean setVisibility) {\n\t\tbutton.setBackground(Color.BLACK);\n\t\tbutton.setForeground(Color.WHITE);\n\t\tbutton.setBorderPainted(false);\n\t\tbutton.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tbutton.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tbutton.setVisible(setVisibility);\n\t}", "@Override\n\tpublic Mediator decorate() {\n\t\n\t\tMediator tf = this.wrappee.decorate();\n\t\ttf.broadcast(new ActionsPaneColorChanged(colorMode));\n//\t\ttf.getActions().setBackground(backgroundColor);\n//\t\ttf.getActions().getDone().setBackground(buttonColor);\n//\t\ttf.getActions().getDone().setForeground(textColor);\n//\t\ttf.getActions().getRemove().setBackground(buttonColor);\n//\t\ttf.getActions().getRemove().setForeground(textColor);\n\t\t\n\t\treturn tf;\n\t}", "protected JButton createRightOneTouchButton() {\n/* 139 */ SynthArrowButton synthArrowButton = new SynthArrowButton(1);\n/* 140 */ int i = lookupOneTouchSize();\n/* */ \n/* 142 */ synthArrowButton.setName(\"SplitPaneDivider.rightOneTouchButton\");\n/* 143 */ synthArrowButton.setMinimumSize(new Dimension(i, i));\n/* 144 */ synthArrowButton.setCursor(Cursor.getPredefinedCursor(0));\n/* 145 */ synthArrowButton.setFocusPainted(false);\n/* 146 */ synthArrowButton.setBorderPainted(false);\n/* 147 */ synthArrowButton.setRequestFocusEnabled(false);\n/* 148 */ synthArrowButton.setDirection(mapDirection(false));\n/* 149 */ return synthArrowButton;\n/* */ }", "protected JButton createLeftOneTouchButton() {\n/* 116 */ SynthArrowButton synthArrowButton = new SynthArrowButton(1);\n/* 117 */ int i = lookupOneTouchSize();\n/* */ \n/* 119 */ synthArrowButton.setName(\"SplitPaneDivider.leftOneTouchButton\");\n/* 120 */ synthArrowButton.setMinimumSize(new Dimension(i, i));\n/* 121 */ synthArrowButton.setCursor(Cursor.getPredefinedCursor(0));\n/* 122 */ synthArrowButton.setFocusPainted(false);\n/* 123 */ synthArrowButton.setBorderPainted(false);\n/* 124 */ synthArrowButton.setRequestFocusEnabled(false);\n/* 125 */ synthArrowButton.setDirection(mapDirection(true));\n/* 126 */ return synthArrowButton;\n/* */ }", "private org.gwtbootstrap3.client.ui.AnchorButton get_f_AnchorButton54() {\n return build_f_AnchorButton54();\n }", "private void createFAB() {\r\n fab = findViewById(R.id.fabEditTask);\r\n fab.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View view) {\r\n goIntoEditMode();\r\n }\r\n });\r\n }", "public void resetButtonStyles() {\n\t\tint drawable_id = R.drawable.stockbutton;\n\t\tDrawable stockbutton = getResources().getDrawable(drawable_id);\n\t\t\n\t\t// For now I'm just going to set the bg colors\n\t\tButton outsideButton = (Button) findViewById(R.id.outside);\n\t\toutsideButton.setBackground(stockbutton);\n\t\tButton fridgeButton = (Button) findViewById(R.id.fridge);\n\t\tfridgeButton.setBackground(stockbutton);\n\t\tButton freezerButton = (Button) findViewById(R.id.freezer);\n\t\tfreezerButton.setBackground(stockbutton);\n\t}", "private void beautifyButtons() {\n ImageIcon todayIcon = new ImageIcon(getClass().getResource(\"/images/today.png\"));\n today.setIcon(todayIcon);\n today.setFont(new Font(Font.DIALOG, Font.PLAIN, 12));\n today.setMaximumSize(mediumButton);\n today.setIconTextGap(ICON_GAP);\n today.setAlignmentX(CENTER_ALIGNMENT);\n\n //adding icon and attempting to beautify the \"<\" button\n ImageIcon leftIcon = new ImageIcon(getClass().getResource(\"/images/left.png\"));\n left.setIcon(leftIcon);\n left.setFont(new Font(Font.DIALOG, Font.PLAIN, 14));\n left.setMaximumSize(smallButton);\n\n //adding icon and attempting to beautify the \">\" button\n ImageIcon rightIcon = new ImageIcon(getClass().getResource(\"/images/right.png\"));\n right.setIcon(rightIcon);\n right.setFont(new Font(Font.DIALOG, Font.PLAIN, 14));\n right.setMaximumSize(smallButton);\n\n //adding icon and attempting to beautify the new event button\n ImageIcon newIcon = new ImageIcon(getClass().getResource(\"/images/new.jpg\"));\n newEvent.setIcon(newIcon);\n newEvent.setFont(new Font(Font.DIALOG, Font.PLAIN, 12));\n newEvent.setMaximumSize(mediumButton);\n newEvent.setIconTextGap(ICON_GAP);\n newEvent.setAlignmentX(CENTER_ALIGNMENT);\n }", "@OnClick(R.id.fab)\n protected void fabClicked() {\n showPostTweetDialog(null);\n }", "public PanelFrescos() {\n\t\timafrescos = new ImageIcon(getClass().getResource(\"/Imagenes/frescos.png\"));\n\t\tfrescos = new JButton();\n\t\tfrescos.setForeground(Color.white);\n\t\tfrescos.setIcon(imafrescos);\n\t\tfrescos.setActionCommand(\"frescos\");\n\t\tadd(frescos).setBackground(Color.white);\n\t}", "private void rHintButton(Button button){\r\n button.getStyleClass().remove(\"closedButton\");\r\n button.getStyleClass().add(\"chooseButtons\");\r\n button.setMouseTransparent(false);\r\n }", "public void newBtnStyle(Button btn) {\n btn.setStyle(\"-fx-background-color: #3c7fb1, linear-gradient(#fafdfe, #e8f5fc), linear-gradient(#eaf6fd 0%, #d9f0fc 49%, #bee6fd 50%, #a7d9f5 100%)\");\n btn.setPrefHeight(90);\n btn.setPrefWidth(260);\n btn.setFont(new Font(39));\n btn.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n changeActive(btn);\n }\n });\n }", "public void buttonPressed(){\r\n\t\tsetBorder(new BevelBorder(10));\r\n\t}", "public void switchMode() {\n final FloatingActionButton guidedButton = (FloatingActionButton)findViewById(R.id.btn_guided);\n final FloatingActionButton settingsButton = (FloatingActionButton)findViewById(R.id.btn_settings);\n final FloatingActionButton modeSwitch = (FloatingActionButton)findViewById(R.id.btn_mode_select);\n\n\n // switch background color\n String themeId = getThemeId();\n if (mCurrentMode) {\n mNavigationService.to(new SearchFragment(), null);\n // set button colors\n if (themeId.equals(\"light\")) {\n DrawableCompat.setTintList(DrawableCompat.wrap(settingsButton.getDrawable()), ColorStateList.valueOf(getResources().getColor(R.color.darkColorB)));\n DrawableCompat.setTintList(DrawableCompat.wrap(settingsButton.getBackground()), ColorStateList.valueOf(getResources().getColor(R.color.lightColorB)));\n\n DrawableCompat.setTintList(DrawableCompat.wrap(modeSwitch.getDrawable()), ColorStateList.valueOf(getResources().getColor(R.color.darkColorB)));\n DrawableCompat.setTintList(DrawableCompat.wrap(modeSwitch.getBackground()), ColorStateList.valueOf(getResources().getColor(R.color.lightColorB)));\n\n DrawableCompat.setTintList(DrawableCompat.wrap(guidedButton.getDrawable()), ColorStateList.valueOf(getResources().getColor(R.color.darkColorB)));\n DrawableCompat.setTintList(DrawableCompat.wrap(guidedButton.getBackground()), ColorStateList.valueOf(getResources().getColor(R.color.lightColorB)));\n }\n else /*if (themeId.equals(\"dark\"))*/ {\n DrawableCompat.setTintList(DrawableCompat.wrap(settingsButton.getDrawable()), ColorStateList.valueOf(getResources().getColor(R.color.lightColorB)));\n DrawableCompat.setTintList(DrawableCompat.wrap(settingsButton.getBackground()), ColorStateList.valueOf(getResources().getColor(R.color.darkColorB)));\n\n DrawableCompat.setTintList(DrawableCompat.wrap(modeSwitch.getDrawable()), ColorStateList.valueOf(getResources().getColor(R.color.lightColorB)));\n DrawableCompat.setTintList(DrawableCompat.wrap(modeSwitch.getBackground()), ColorStateList.valueOf(getResources().getColor(R.color.darkColorB)));\n\n DrawableCompat.setTintList(DrawableCompat.wrap(guidedButton.getDrawable()), ColorStateList.valueOf(getResources().getColor(R.color.lightColorB)));\n DrawableCompat.setTintList(DrawableCompat.wrap(guidedButton.getBackground()), ColorStateList.valueOf(getResources().getColor(R.color.darkColorB)));\n }\n } else {\n mNavigationService.to(new ReadFragment(), null);\n // set button colors\n if (themeId.equals(\"light\")) {\n DrawableCompat.setTintList(DrawableCompat.wrap(settingsButton.getDrawable()), ColorStateList.valueOf(getResources().getColor(R.color.darkColorA)));\n DrawableCompat.setTintList(DrawableCompat.wrap(settingsButton.getBackground()), ColorStateList.valueOf(getResources().getColor(R.color.lightColorA)));\n\n DrawableCompat.setTintList(DrawableCompat.wrap(modeSwitch.getDrawable()), ColorStateList.valueOf(getResources().getColor(R.color.darkColorA)));\n DrawableCompat.setTintList(DrawableCompat.wrap(modeSwitch.getBackground()), ColorStateList.valueOf(getResources().getColor(R.color.lightColorA)));\n\n DrawableCompat.setTintList(DrawableCompat.wrap(guidedButton.getDrawable()), ColorStateList.valueOf(getResources().getColor(R.color.darkColorA)));\n DrawableCompat.setTintList(DrawableCompat.wrap(guidedButton.getBackground()), ColorStateList.valueOf(getResources().getColor(R.color.lightColorA)));\n }\n else /*if (themeId.equals(\"dark\"))*/ {\n DrawableCompat.setTintList(DrawableCompat.wrap(settingsButton.getDrawable()), ColorStateList.valueOf(getResources().getColor(R.color.lightColorA)));\n DrawableCompat.setTintList(DrawableCompat.wrap(settingsButton.getBackground()), ColorStateList.valueOf(getResources().getColor(R.color.darkColorA)));\n\n DrawableCompat.setTintList(DrawableCompat.wrap(modeSwitch.getDrawable()), ColorStateList.valueOf(getResources().getColor(R.color.lightColorA)));\n DrawableCompat.setTintList(DrawableCompat.wrap(modeSwitch.getBackground()), ColorStateList.valueOf(getResources().getColor(R.color.darkColorA)));\n\n DrawableCompat.setTintList(DrawableCompat.wrap(guidedButton.getDrawable()), ColorStateList.valueOf(getResources().getColor(R.color.lightColorA)));\n DrawableCompat.setTintList(DrawableCompat.wrap(guidedButton.getBackground()), ColorStateList.valueOf(getResources().getColor(R.color.darkColorA)));\n }\n }\n modeSwitch.setSelected(mCurrentMode);\n mCurrentMode = !mCurrentMode;\n speakModeHint();\n vibrate(10);\n }", "@Override\n public void onDrawerOpened() {\n slideButton.setBackground(getDrawable(R.drawable.ic_keyboard_arrow_down_black_24dp));\n\n }", "@Override\n protected int getDefaultLayoutId() {\n return R.layout.flw_widget_floating_label_item_chooser;\n }", "public String getButtonFontStyle() {\r\n\t\tif (_saveButton == null)\r\n\t\t\treturn null;\r\n\t\telse\r\n\t\t\treturn _saveButton.getButtonFontStyle();\r\n\t}", "public void applyButtonStyles(JButton button, String type){\n button.setBackground(coloursObject.getTitlePanelColour());//set background colour\n button.setForeground(coloursObject.getButtonTextColour());//set foreground colour\n button.setFont(new java.awt.Font(\"Microsoft Tai Le\", 0, 16));//set font and size\n button.setBorder(null);//remove the border//remove any border\n button.setFocusPainted(false);//make not focusable (custom hover effect overides this)\n button.setPreferredSize(new Dimension(50,25));//set preferred dimensions for the close application button\n \n button.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {//when hovering over mouse\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n if(type == \"close\"){//if the close button is being edited\n button.setBackground(new Color(237,64,64));//colour chosen for the \n }\n if(type == \"scale\"){//if the fullscreen button is being edited\n button.setBackground(coloursObject.getMenuPanelColour());\n }\n }\n\n public void mouseExited(java.awt.event.MouseEvent evt) {//when cursor stops hovering over the mouse\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n button.setBackground(coloursObject.getTitlePanelColour());\n }\n });\n }", "private ActionListener getFtpButtonMouseListener(Renderer renderer) {\n return e -> {\n FtpServerOptionPane optionPane = new FtpServerOptionPane();\n FtpServerOptionPane.FtpServerOption option =\n optionPane.showConfirmDialog(connectToFtpButton, \"Enter the data for connecting to the ftp server\");\n SwingUtilities.invokeLater(() -> {\n renderer.setSpinnerVisible(true);\n new SwingWorker<Void, Void>() {\n @Override\n protected Void doInBackground() {\n tryToConnectToFtp(option, renderer);\n return null;\n }\n\n @Override\n protected void done() {\n SwingUtilities.invokeLater(() -> renderer.setSpinnerVisible(false));\n }\n }.execute();\n });\n };\n }", "private void deleteBtnMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_deleteBtnMousePressed\n deleteBtn.setBackground(Color.decode(\"#1e5837\"));\n }", "public PushButton getDeleteButton() {\r\n\t\tif (btnDelete == null) {\r\n\t\t\tbtnDelete = new PushButton(\r\n\t\t\t\t\tnew Image(GuiResources.INSTANCE.algebra_delete()));\r\n\t\t\tbtnDelete.getUpHoveringFace().setImage(new Image(\r\n\t\t\t\t\tGuiResources.INSTANCE.algebra_delete_hover()));\r\n\t\t\tbtnDelete.addStyleName(\"XButton\");\r\n\t\t\tbtnDelete.addStyleName(\"shown\");\r\n\t\t\tbtnDelete.addMouseDownHandler(new MouseDownHandler() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onMouseDown(MouseDownEvent event) {\r\n\t\t\t\t\tif (event\r\n\t\t\t\t\t\t\t.getNativeButton() == NativeEvent.BUTTON_RIGHT) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t\tgetController().removeGeo();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn btnDelete;\r\n\r\n\t}", "@Override\n\tprotected void buildButton() {\n\t\t\n\t}", "@Override\n\tpublic ToolStripButton getFileButton() {\n\t\treturn fileButton;\n\t}", "public PopupButton() {\r\n super(null);\r\n \r\n setAction(new AbstractAction() {\r\n\r\n \tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n showPopup();\r\n }\r\n });\r\n \r\n String javaVersion = System.getProperties().getProperty(\r\n \"java.specification.version\");\r\n if (javaVersion.equals(\"1.3\")) {\r\n setBorderPainted(false);\r\n // This is needed specifically for JDK1.3 on Windows & Motif\r\n setMargin(new Insets(0,0,0,0));\r\n }\r\n }", "@Override\n\tpublic boolean fling(float velocityX, float velocityY, int button) {\n\t\treturn false;\n\t}", "private void manageFAB() {\n final ImageView audioTrack = new ImageView(this);\n audioTrack.setImageResource(R.drawable.audiotrack);\n\n mFloatingActionButton = new HMVFloatingActionButton.Builder(this).setPosition(HMVFloatingActionButton.POSITION_CENTER_CENTER).setContentView(audioTrack).build();\n\n final SubActionButton.Builder itemBuilder = new SubActionButton.Builder(this);\n\n //PAUSE\n final ImageView pause = new ImageView(this);\n pause.setImageResource(R.drawable.pause);\n final SubActionButton pauseButton = itemBuilder.setContentView(pause).build();\n pauseButton.setOnClickListener(buildPauseOnClickListener());\n\n //PLAY\n final ImageView play = new ImageView(this);\n play.setImageResource(R.drawable.play);\n final SubActionButton playButton = itemBuilder.setContentView(play).build();\n playButton.setOnClickListener(buildPlayOnClickListener());\n\n //REPEAT ONE\n final ImageView repeatOne = new ImageView(this);\n repeatOne.setImageResource(R.drawable.repeat_one);\n final SubActionButton repeatOneButton = itemBuilder.setContentView(repeatOne).build();\n repeatOneButton.setOnClickListener(buildRepeatOneOnClickListener());\n\n //HEARING\n final ImageView hearing = new ImageView(this);\n hearing.setImageResource(R.drawable.hearing);\n final SubActionButton hearingButton = itemBuilder.setContentView(hearing).build();\n hearingButton.setOnClickListener(buildHearingOnClickListener());\n\n //SHUFFLE\n final ImageView shuffle = new ImageView(this);\n shuffle.setImageResource(R.drawable.shuffle);\n final SubActionButton shuffleButton = itemBuilder.setContentView(shuffle).build();\n shuffleButton.setOnClickListener(buildShuffleOnClickListener());\n\n //SKIP NEXT\n final ImageView skipNext = new ImageView(this);\n skipNext.setImageResource(R.drawable.skip_next);\n final SubActionButton skipNextButton = itemBuilder.setContentView(skipNext).build();\n skipNextButton.setOnClickListener(buildSkipNextOnClickListener());\n\n //SKIP PREVIOUS\n final ImageView skipPrevious = new ImageView(this);\n skipPrevious.setImageResource(R.drawable.skip_previous);\n final SubActionButton skipPreviousButton = itemBuilder.setContentView(skipPrevious).build();\n skipPreviousButton.setOnClickListener(buildSkipPreviousOnClickListener());\n\n //STOP\n final ImageView stop = new ImageView(this);\n stop.setImageResource(R.drawable.stop);\n final SubActionButton stopButton = itemBuilder.setContentView(stop).build();\n stopButton.setOnClickListener(buildStopOnClickListener());\n\n //POWER\n final ImageView power = new ImageView(this);\n power.setImageResource(R.drawable.power);\n final SubActionButton powerButton = itemBuilder.setContentView(power).build();\n powerButton.setOnClickListener(buildPowerOnClickListener());\n\n //INFORMATION\n final ImageView information = new ImageView(this);\n information.setImageResource(R.drawable.information);\n final SubActionButton informationButton = itemBuilder.setContentView(information).build();\n informationButton.setOnClickListener(buildInformationOnClickListener());\n\n final FloatingActionMenu actionMenu = new FloatingActionMenu.Builder(this)\n .addSubActionView(informationButton)\n .addSubActionView(shuffleButton)\n .addSubActionView(playButton)\n .addSubActionView(stopButton)\n .addSubActionView(hearingButton)\n .addSubActionView(pauseButton)\n .addSubActionView(skipNextButton)\n .addSubActionView(skipPreviousButton)\n .addSubActionView(repeatOneButton)\n .addSubActionView(powerButton)\n .attachTo(mFloatingActionButton).setStartAngle(30).setEndAngle(330).build();\n\n }", "@TargetApi(Build.VERSION_CODES.LOLLIPOP)\n @OnClick(R.id.fab) void openFab() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n newConnections.setVisibility(View.VISIBLE);\n newConnections.setTranslationY(0);\n\n final float fabRadius = fab.getWidth() / 2f;\n ViewAnimationUtils.createCircularReveal(newConnections,\n (int) (fab.getX() + fabRadius),\n (int) (fab.getY() + fabRadius),\n fabRadius,\n newConnections.getHeight() + newConnections.getWidth() / 2)\n .start();\n\n // we *could* put this into the layout so it gets revealed as well...\n UiUtil.animateStatusBarColor(\n getWindow(),\n R.color.primary_dark_material_dark,\n R.color.primary_dark_material_light\n );\n\n } else {\n newConnections.setAlpha(0);\n newConnections.setVisibility(View.VISIBLE);\n newConnections.animate().alpha(1);\n }\n }", "public Color getButtonColor(){\n\t\treturn buttonColor;\n\t}", "public TaskBookBuilder addTypicalFloatingTasks() {\n final TypicalFloatingTasks tft = new TypicalFloatingTasks();\n return addFloatingTasks(tft.getFloatingTasks());\n }", "private void sFCButtonActionPerformed(java.awt.event.ActionEvent evt) {\n\t\tfinal SelectColor sASelectColor=new SelectColor(mAnnotation.getFillColor());\n\t\tsASelectColor.setOKListener( new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tColor clr = sASelectColor.getColor();\n\t\t\t\tpreview.setFillColor(clr);\n\t\t\t\tpreviewPanel.repaint();\n\t\t\t}\n\t\t});\n\t\n\t\tsASelectColor.setSize(435, 420);\n\t\tsASelectColor.setVisible(true);\n\t\t//1 -> FillColor\n\t}", "public void refreshFavoriteBtn() {\r\n if (recipe.isFavorite(context)) {\r\n favoriteBtn.setIcon(\"faw_star\");\r\n } else {\r\n favoriteBtn.setIcon(\"faw_star_o\");\r\n }\r\n }", "private void floatingActionButtonClicked(){\n Log.d(TAG, \"floating button onclick\");\n InsertCourseDialogFragment dialog = new InsertCourseDialogFragment();\n dialog.show(getSupportFragmentManager(), \"Insert Course\");\n }", "@Override\n\tpublic Button getEraseFunctionButton() {\n\t\treturn functionButtonBar.getEraseButton();\n\t}", "private javax.swing.JButton getJButton7() {\n\t\tif(jButton7 == null) {\n\t\t\tjButton7 = new javax.swing.JButton();\n\t\t\tjButton7.setPreferredSize(new java.awt.Dimension(120,40));\n\t\t\tjButton7.setBackground(new java.awt.Color(226,226,222));\n\t\t\tjButton7.setMargin(new Insets(1,2,1,1));\n\t\t\tjButton7.setText(\"F7 Cerrar Lista\");\n\t\t\tjButton7.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.BOLD, 10));\n\t\t\tjButton7.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n\t\t}\n\t\treturn jButton7;\n\t}", "public void styleforOne() {\r\n\t\t\r\n\r\n\t\tsuper.styleforOne();\r\n\t\t\r\n\t}", "public boolean getIsOperator_FuelInfeed_BtnPressed()\n\t{\n\t\treturn super.getIsOperatorLeftBumperBtnPressed();\n\t}", "void onCheckedChanged(FloatingActionButton fabView, boolean isChecked);", "private void decorateCancelButton() {\n cancelButton.setVisible(false);\n ResourceUtils.resButton(cancelButton, Res.getString(\"cancel\"));\n cancelButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196)));\n cancelButton.setForeground(new Color(73, 113, 196));\n cancelButton.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n \n cancelButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n cancelTransfer();\n }\n });\n \n cancelButton.addMouseListener(new MouseAdapter() {\n public void mouseEntered(MouseEvent e) {\n cancelButton.setCursor(new Cursor(Cursor.HAND_CURSOR));\n \n }\n \n public void mouseExited(MouseEvent e) {\n cancelButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }\n });\n \n }", "@Override\n\t\t\tpublic void onFocusChange(View button, boolean isFocus) {\n\t\t\t\tif(isFocus){\n\t\t\t\t\tbutton.setBackgroundColor(getResources().getColor(R.color.blue));\n\t\t\t\t}else \n\t\t\t\t\tbutton.setBackground(getResources().getDrawable(R.drawable.button_style)); \n\t\t\t}", "private StackPane customButton(String name) {\n StackPane pane = new StackPane();\n Rectangle r = new Rectangle(100, 50, Color.TRANSPARENT);\n Text t = new Text(name);\n t.setTextAlignment(TextAlignment.CENTER);\n pane.getChildren().addAll(r, t);\n pane.setStyle(\"-fx-background-color: orange;\");\n return pane;\n }", "public void setClickedStyle(Button button){\n whiteCellButton.getStyleClass().clear();\n blackCellButton.getStyleClass().clear();\n removeCellButton.getStyleClass().clear();\n\n if (button == whiteCellButton) {\n whiteCellButton.getStyleClass().add(\"edit-buttons-selected\");\n blackCellButton.getStyleClass().add(\"edit-buttons\");\n removeCellButton.getStyleClass().add(\"edit-buttons\");\n }\n else if (button == blackCellButton) {\n blackCellButton.getStyleClass().add(\"edit-buttons-selected\");\n whiteCellButton.getStyleClass().add(\"edit-buttons\");\n removeCellButton.getStyleClass().add(\"edit-buttons\");\n }\n else if (button == removeCellButton) {\n removeCellButton.getStyleClass().add(\"edit-buttons-selected\");\n whiteCellButton.getStyleClass().add(\"edit-buttons\");\n blackCellButton.getStyleClass().add(\"edit-buttons\");\n }\n }", "private void deleteBtnMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_deleteBtnMouseReleased\n deleteBtn.setBackground(Color.decode(\"#4fc482\"));\n }", "@Override\n public void addOpenButton(Component button)\n {\n button.addFeature(new OpenLayoutDivFeature(this));\n }", "public FlowPanel(){\r\n setLayout(new FlowLayout());\r\n setBackground(Color.green);\r\n JButton b1 = new JButton(\"Button 1\");\r\n JButton b2 = new JButton(\"Button 2\");\r\n JButton b3 = new JButton(\"Button 3\");\r\n JButton b4 = new JButton(\"Button 4\");\r\n JButton b5 = new JButton(\"Button 5\");\r\n add(b1);\r\n add(b2);\r\n add(b3);\r\n add(b4);\r\n add(b5);\r\n }", "public interface Css extends CssResource {\n String button();\n }", "protected JButton createRefreshButton() {\n JButton butRefresh = new JButton();\n butRefresh.setIcon(new ImageIcon(getClass().getClassLoader().getResource(\"image/refresh3.png\")));\n butRefresh.setToolTipText(\"Refresh All\");\n butRefresh.addActionListener(new refreshListener());\n return butRefresh;\n }", "private void makeFrontButton(JButton button, String icon, String actionCommand, Rectangle bounds){\n button.setIcon(new ImageIcon(MapIcon.iconURLs.get(icon)));\n button.setFocusable(false);\n button.setOpaque(false);\n button.setBackground(DrawAttribute.fadeblack);\n button.setBorderPainted(false);\n button.setRolloverEnabled(false);\n button.setActionCommand(actionCommand);\n button.setBounds(bounds);\n }", "private javax.swing.JButton getJButton8() {\n\t\tif(jButton8 == null) {\n\t\t\tjButton8 = new javax.swing.JButton();\n\t\t\tjButton8.setPreferredSize(new java.awt.Dimension(120,40));\n\t\t\tjButton8.setBackground(new java.awt.Color(226,226,222));\n\t\t\tjButton8.setMargin(new Insets(1,2,1,1));\n\t\t\tjButton8.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.BOLD, 10));\n\t\t\tjButton8.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n\t\t\tjButton8.setText(\"F8 Anular Lista\");\n\t\t}\n\t\treturn jButton8;\n\t}", "public org.drip.state.identifier.OTCFixFloatLabel otcFixFloatLabel()\n\t{\n\t\torg.drip.state.identifier.FloaterLabel floaterLabel = floaterLabel();\n\n\t\treturn null != floaterLabel && floaterLabel instanceof org.drip.state.identifier.OTCFixFloatLabel ?\n\t\t\t(org.drip.state.identifier.OTCFixFloatLabel) floaterLabel : null;\n\t}", "private void setupButtons()\n\t{\n\t\tequals.setText(\"=\");\n\t\tequals.setBackground(Color.RED);\n\t\tequals.setForeground(Color.WHITE);\n\t\tequals.setOpaque(true);\n\t\tequals.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tequals.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tclear.setText(\"C\");\n\t\tclear.setBackground(new Color(0, 170, 100));\n\t\tclear.setForeground(Color.WHITE);\n\t\tclear.setOpaque(true);\n\t\tclear.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tclear.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tbackspace.setText(\"<--\");\n\t\tbackspace.setBackground(new Color(0, 170, 100));\n\t\tbackspace.setForeground(Color.WHITE);\n\t\tbackspace.setOpaque(true);\n\t\tbackspace.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tbackspace.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tnegative.setText(\"+/-\");\n\t\tnegative.setBackground(Color.GRAY);\n\t\tnegative.setForeground(Color.WHITE);\n\t\tnegative.setOpaque(true);\n\t\tnegative.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tnegative.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t}", "public void cambiarFondobtnPagoTarjeta(){\n btnPagoTarjeta.setBackgroundResource(R.drawable.btn_met_pgo_seleccion);\n btnPagoBancolo.setChecked(false);\n btnPagoNequi.setChecked(false);\n btnPagoPSE.setChecked(false);\n }", "public PushButton getDeleteButton() {\n\t\treturn null;\n\t}", "private javax.swing.JButton getJButton6() {\n\t\tif(jButton6 == null) {\n\t\t\tjButton6 = new javax.swing.JButton();\n\t\t\tjButton6.setPreferredSize(new java.awt.Dimension(120,40));\n\t\t\tjButton6.setBackground(new java.awt.Color(226,226,222));\n\t\t\tjButton6.setMargin(new Insets(1,2,1,1));\n\t\t\tjButton6.setText(\"F6 Colocar en Espera\");\n\t\t\tjButton6.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.BOLD, 10));\n\t\t\tjButton6.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n\t\t}\n\t\treturn jButton6;\n\t}", "public JButtonOperator btMoveDown() {\n if (_btMoveDown==null) {\n String moveDown = Bundle.getString(\"org.netbeans.modules.java.freeform.ui.Bundle\", \"LBL_ClasspathPanel_Move_Down\");\n _btMoveDown = new JButtonOperator(this, moveDown);// I18N\n }\n return _btMoveDown;\n }", "@ReactMethod\n public void setVideoRecordingFloatingButtonPosition(final String corner) {\n MainThreadHandler.runOnMainThread(new Runnable() {\n @Override\n public void run() {\n try {\n final InstabugVideoRecordingButtonPosition parsedPosition = ArgsRegistry.recordButtonPositions.get(corner);\n if (parsedPosition == null) return;\n BugReporting.setVideoRecordingFloatingButtonPosition(parsedPosition);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n }", "public void showButtonsSettingsModeSwitch() {\n FloatingActionButton btn_settings = (FloatingActionButton)findViewById(R.id.btn_settings);\n btn_settings.setVisibility(View.VISIBLE);\n\n FloatingActionButton btn_mode_select = (FloatingActionButton)findViewById(R.id.btn_mode_select);\n btn_mode_select.setVisibility(View.VISIBLE);\n\n FloatingActionButton btn_mode_guide = (FloatingActionButton)findViewById(R.id.btn_guided);\n btn_mode_guide.setVisibility(View.VISIBLE);\n }", "private void setFAB(View view) {\n SpeedDialView speedDialView = view.findViewById(R.id.speedDial);\n speedDialView.setVisibility(View.VISIBLE);\n speedDialView.addActionItem(\n new SpeedDialActionItem.Builder(R.id.fab_email, R.drawable.ic_email_black_24dp)\n .setLabel(R.string.speed_dial_email)\n .create()\n );\n speedDialView.addActionItem(\n new SpeedDialActionItem.Builder(R.id.fab_linkedIn, R.drawable.ic_linkedin)\n .setLabel(R.string.speed_dial_linkedin)\n .create()\n );\n speedDialView.addActionItem(\n new SpeedDialActionItem.Builder(R.id.fab_gitHub, R.drawable.ic_github)\n .setLabel(R.string.speed_dial_github)\n .create()\n );\n\n //Set up FAB speed dial links\n speedDialView.setOnActionSelectedListener(new SpeedDialView.OnActionSelectedListener() {\n @Override\n public boolean onActionSelected(SpeedDialActionItem speedDialActionItem) {\n switch (speedDialActionItem.getId()) {\n case R.id.fab_email:\n composeEmail();\n return false; // true to keep the Speed Dial open\n case R.id.fab_linkedIn:\n openWebPage(\"https://www.linkedin.com/in/martinjthorne/\");\n return false;\n case R.id.fab_gitHub:\n openWebPage(\"https://github.com/Martin-Thorne\");\n return false;\n default:\n return false;\n }\n }\n });\n }", "private Button createButton(String name, int fontSize, int cornerSize) {\n Button button = new Button(name);\n button.setFont(Font.font(fontSize));\n button.setMinWidth(BUTTON_WIDTH);\n button.setMaxWidth(Double.MAX_VALUE);\n button.setBackground(new Background(new BackgroundFill(\n Color.SEASHELL, new CornerRadii(cornerSize), null)));\n return button;\n }", "private void setFabAnchor(CoordinatorLayout parent, View child) {\n if (child instanceof FloatingActionButtonView) {\n FloatingActionButtonView fab = (FloatingActionButtonView) child;\n if (fab.getAutoAnchor()) {\n for (int i = 0; i < parent.getChildCount(); i++) {\n View childView = parent.getChildAt(i);\n if (childView instanceof BottomSheetBehaviorView) {\n int bottomSheetId = childView.getId();\n fab.setAnchor(bottomSheetId);\n if (((BottomSheetBehaviorView) childView).behavior.getAnchorEnabled()) {\n fab.setScrollBehavior();\n }\n fab.setAnchor(bottomSheetId);\n }\n }\n }\n // Set fab on the header view\n if (headerView != null) {\n headerView.setFabView(fab);\n }\n }\n }", "public void clickIconViewButton() {\n\t\tfilePicker.stickyButton(locIconBtn);\n\t}", "private void deleteBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_deleteBtnMouseEntered\n deleteBtn.setBackground(Color.decode(\"#339966\"));\n }", "private void showFABMenu(){\n isFABOpen=true;\n\n layoutFabProject.setVisibility(View.VISIBLE);\n layoutFabNote.setVisibility(View.VISIBLE);\n layoutFabTask.setVisibility(View.VISIBLE);\n\n layoutFabProject.animate().translationY(-getResources().getDimension(R.dimen.standard_55));\n layoutFabNote.animate().translationY(-getResources().getDimension(R.dimen.standard_100));\n layoutFabTask.animate().translationY(-getResources().getDimension(R.dimen.standard_145));\n }", "void updateBackground() {\n float f = this.getDimension(R.dimen.fab_stroke_width);\n float f2 = f / 2.0f;\n Resources resources = this.getResources();\n int n = this.mSize == 0 ? R.drawable.fab_bg_normal : R.drawable.fab_bg_mini;\n resources = new LayerDrawable(new Drawable[]{resources.getDrawable(n), this.createFillDrawable(f), this.createOuterStrokeDrawable(f), this.getIconDrawable()});\n n = (int)(this.mCircleSize - this.getDimension(R.dimen.fab_icon_size)) / 2;\n int n2 = (int)this.mShadowRadius;\n int n3 = (int)(this.mShadowRadius - this.mShadowOffset);\n int n4 = (int)(this.mShadowRadius + this.mShadowOffset);\n resources.setLayerInset(1, n2, n3, n2, n4);\n resources.setLayerInset(2, (int)((float)n2 - f2), (int)((float)n3 - f2), (int)((float)n2 - f2), (int)((float)n4 - f2));\n resources.setLayerInset(3, n2 + n, n3 + n, n2 + n, n4 + n);\n this.setBackgroundCompat((Drawable)resources);\n }", "void onFadingViewClick();", "public Button createDeleteButtonWithGraphic() {\n ImageView deleteSign = new ImageView(new Image(\"delete-1-icon.png\"));\n deleteSign.setFitHeight(20);\n deleteSign.setPreserveRatio(true);\n deleteSign.setSmooth(true);\n\n Button delButton = new Button();\n delButton.setGraphic(deleteSign);\n delButton.setTooltip(new Tooltip(\"Delete the Row\"));\n return delButton;\n }", "Dimension getButtonDimension() {\n return new Dimension(dimButton);\n }", "@Override\n public boolean setUiBeforShow() {\n Log.e(\" ##IS_FAV\", isFavourite + \"\");\n\n if(isFavourite) {\n txtAddToFavorite.setTextColor(context.getResources().getColor(R.color.yellow));\n Drawable[] drawables = txtAddToFavorite.getCompoundDrawables();\n Drawable leftDrawable = drawables[0];\n\n leftDrawable.setColorFilter(new PorterDuffColorFilter(context.getResources().getColor(R.color.yellow), PorterDuff.Mode.MULTIPLY));\n txtAddToFavorite.setCompoundDrawables(leftDrawable, null, null, null);\n } else {\n txtAddToFavorite.setTextColor(context.getResources().getColor(R.color.white));\n\n Drawable[] drawables = txtAddToFavorite.getCompoundDrawables();\n Drawable leftDrawable = drawables[0];\n\n leftDrawable.setColorFilter(new PorterDuffColorFilter(context.getResources().getColor(R.color.white), PorterDuff.Mode.MULTIPLY));\n txtAddToFavorite.setCompoundDrawables(leftDrawable, null, null, null);\n }\n\n\n\n imgCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dismiss();\n }\n });\n\n txtRename.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _renameClick.onRenameOptionClick(pos, \"\");\n dismiss();\n }\n });\n\n txtAddToFavorite.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _favoriteClick.onFavoriteOptionClick(pos);\n dismiss();\n }\n });\n\n txtAddToScene.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _addToSceneClick.onAddToSceneOptionClick(pos);\n dismiss();\n }\n });\n\n txtAddToScheduler.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _addSchedulerClick.onAddSchedulerOptionClick(pos);\n dismiss();\n }\n });\n\n return true;\n }", "public void doDragFloatView(boolean z) {\n int firstVisiblePosition = getFirstVisiblePosition() + (getChildCount() / 2);\n View childAt = getChildAt(getChildCount() / 2);\n if (childAt != null) {\n doDragFloatView(firstVisiblePosition, childAt, z);\n }\n }", "@Override\n\tpublic Button getDeleteParameterButton() {\n\t\treturn parameterButtonBar.getDeleteButton();\n\t}", "@Override\n public void onClick(View v) {\n if (SHOW_DEBUG)\n Toast.makeText(v.getContext(), \"Yep, this all action \", Toast.LENGTH_SHORT)\n .show();\n fab.startAnimation(fab_show);\n }", "public void makeFavouriteButton() {\r\n JButton favourite = new JButton(\"Favourite a champion\");\r\n new Button(favourite, main);\r\n// favourite.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// favourite.setPreferredSize(new Dimension(2500, 100));\r\n// favourite.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n favourite.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n favouriteChampion();\r\n }\r\n });\r\n// main.add(favourite);\r\n }", "public Button(){\n id=1+nbrButton++;\n setBounds(((id-1)*getDimX())/(Data.getNbrLevelAviable()+1),((id-1)*getDimY())/(Data.getNbrLevelAviable()+1),getDimX()/(2*Data.getNbrLevelAviable()),getDimY()/(2*Data.getNbrLevelAviable()));\n setText(id+\"\");\n setFont(Data.getFont());\n addMouseListener(this);\n setVisible(true);\n }", "public void showPostButton() {\n mPostButton.post(new Runnable() {\n @Override\n public void run() {\n mPostButton.setTranslationY(0);\n }\n });\n }" ]
[ "0.5871122", "0.58273095", "0.5780257", "0.57630825", "0.55624175", "0.54984474", "0.54766136", "0.54649365", "0.54456407", "0.54356503", "0.5398736", "0.5397469", "0.5354966", "0.530746", "0.52847326", "0.5265557", "0.5252768", "0.51814294", "0.5175363", "0.5158679", "0.5156369", "0.5146552", "0.5135978", "0.50690824", "0.50526583", "0.5032977", "0.5025292", "0.49817407", "0.49803358", "0.4963737", "0.49600768", "0.49455747", "0.49255577", "0.49014306", "0.48954463", "0.48904705", "0.4875014", "0.48736328", "0.48539", "0.48520273", "0.4846788", "0.48463404", "0.4830541", "0.4818482", "0.480683", "0.47993702", "0.47873262", "0.4783346", "0.47693795", "0.4756355", "0.47560218", "0.47522593", "0.4749942", "0.47372353", "0.47355598", "0.47349054", "0.47289422", "0.47229373", "0.47121766", "0.4690405", "0.4690012", "0.46833903", "0.4673931", "0.46691465", "0.46677858", "0.46632996", "0.46574253", "0.46549755", "0.465072", "0.4648459", "0.46483594", "0.46483126", "0.46312848", "0.46298084", "0.46263072", "0.46181038", "0.4617982", "0.46178892", "0.4607594", "0.460214", "0.4601034", "0.4598276", "0.45916367", "0.45871928", "0.4581264", "0.4580286", "0.45738167", "0.45703822", "0.45619893", "0.4561673", "0.45577464", "0.45534715", "0.45502254", "0.45455843", "0.4543959", "0.45386544", "0.4533308", "0.45309612", "0.45300806", "0.45275292" ]
0.49711472
29
run 1. father with CC, diagnosed at 50
@Test public void testGetCondition35() { CancerHistory h1 = new CancerHistory("NHI123", "eref1", (short) Util.FATHER, "", true, (short) 50, false, false, (short) -1, false, (short) -1, ""); CancerHistory[] td1 = { h1 }; manager.setHistories(td1); assertEquals("# condition 3-5 (run 1) ", false, riskCalculator.getCondition35()); // run 2. // father with CC, diagnosed at 49 ==> true CancerHistory h2 = new CancerHistory("NHI123", "eref1", (short) Util.FATHER, "", true, (short) 49, false, false, (short) -1, false, (short) -1, ""); CancerHistory[] td2 = { h2 }; manager.setHistories(td2); assertEquals("# condition 3-5 (run 2) ", true, riskCalculator.getCondition35()); // risk category is 2, because condition 35 has been removed. assertEquals(" run 2", 2 , riskCalculator.calculateRisk()); // run 3. // grandfather with CC, diagnosed at 49 ==> false, because // it is a secondary relative CancerHistory h3 = new CancerHistory("NHI123", "eref1", (short) Util.PAT_GRANDFATHER, "", true, (short) 49, false, false, (short) -1, false, (short) -1, ""); CancerHistory[] td3 = { h3 }; manager.setHistories(td3); assertEquals("# condition 3-5 (run 3) ", false, riskCalculator.getCondition35()); // run 4. // father and grandfather with CC, diagnosed at 49 ==> true CancerHistory h4 = new CancerHistory("NHI123", "eref1", (short) Util.PAT_GRANDFATHER, "", true, (short) 49, false, false, (short) -1, false, (short) -1, ""); CancerHistory h5 = new CancerHistory("NHI123", "eref1", (short) Util.FATHER, "", true, (short) 49, false, false, (short) -1, false, (short) -1, ""); CancerHistory[] td4 = { h4, h5 }; manager.setHistories(td4); assertEquals("# condition 3-5 (run 4) ", true, riskCalculator.getCondition35()); assertEquals(" run 4 ", 3 , riskCalculator.calculateRisk()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ConnectingGraphIII(int x) {\n father = new int[x + 1];\n totalcount = x; //initial state, total number of graph = x nodes.\n //init\n for (int i = 1; i < x + 1; i++) {\n father[i] = i;\n }\n }", "long fcalc(LinkedList<Edge> l[], LinkedList<Integer> path[], int sn, int cn, int n, boolean print){\n\t\tlong start = System.currentTimeMillis();\n\t\tFibonacciHeap fh = new FibonacciHeap();\n\t\tNodefh[] a=new Nodefh[n];\n\t\ta[sn]=new Nodefh();\n\t\ta[sn].index = sn;\n\t\ta[sn].dist = 0;\n\t\ta[sn].degree = 0;\n\t\tdouble[] currentCost = new double[n];\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tcurrentCost[i] = 0;\n\t\t\tif(i!=sn){\n\t\t\t\ta[i]=new Nodefh();\n\t\t\t\ta[i].index = i;\n\t\t\t\ta[i].dist =Double.POSITIVE_INFINITY;\n\t\t\t\ta[i].degree = 0;\n\t\t\t\ta[i].ChildCut = false;\n\t\t\t\tfh.fhInsert(a[i]);\n\t\t\t}\n\t\t}\n\t\tfcalcHelper(l, path, sn, cn, n, fh, a, currentCost);\n\t\tlong stop = System.currentTimeMillis();\n\t\tif(print) {\n\t\t\tfor(int i=0;i<n;i++){\n\t\t\t\tSystem.out.println((int)a[i].dist);\n\t\t\t}\n\t\t}\n\t\treturn (stop - start);\n\t}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint root[]=new int[n+1];\n\t\tfor(int i=2;i<=n;i++)\n\t\t\troot[i]=sc.nextInt();\n\t\tnode tree[]=new node[n+1];\n\t\tfor(int i=0;i<=n;i++)\n\t\t\ttree[i]=new node();\n\t\tfor(int i=2;i<=n;i++)\n\t\t\ttree[root[i]].child.add(i);\n\t\tint q=sc.nextInt();\n\t\twhile(q-->0)\n\t\t{\n\t\t\tint u=sc.nextInt();\n\t\t\tint v=sc.nextInt();\n\t\t\tLinkedList<Integer> list=turnOn(tree, v);\n\t\t\tlong sum=0;\n\t\t\tfor(int i=0,s=list.size();i<s;i++)\n\t\t\t{\n\t\t\t\tint d=distance(root, u, list.get(i));\n\t\t\t\tsum=sum+d*d;\n\t\t\t}\n\t\t\tSystem.out.println(sum);\n\t\t}\n\t\t\n\t}", "public static void matrixDis()\n\t{\n\t\t\n\t\tclade = clad[k];\n\t\t//System.err.println(\"\\n\\n\" + clade.cladeName);\n\n\t\tfor(c=0; c<clade.numSubClades; c++)\n\t\t{\n\t\t\tclade.Dc[c]=0;\n\t\t\tclade.Dn[c]=0;\n\t\t\t//clade.varDc[c]=0;\n\t\t\t//clade.varDn[c]=0;\n\t\t\tsum1 = sum2 = sum3 = 0;\n\t\t\tsumc1 = sumc2 = sumc3 = 0;\n\n\t\t\tfor(i=0; i<clade.numCladeLocations; i++) \t\n\t\t\t{\t\n\t\t\t\t\n\t\t\t\tsum2 += clade.obsMatrix[c][i] * (clade.obsMatrix[c][i]-1) / 2 ;\n\t\t\t\tsumc2 += (clade.obsMatrix[c][i] * (clade.obsMatrix[c][i]-1) / 2) + \n\t\t\t (clade.obsMatrix[c][i] * (clade.columnTotal[i] - clade.obsMatrix[c][i]));\t\n\t\t\t\n\t\t\t\tfor (j=0; j<clade.numCladeLocations; j++)\n\t\t\t\t{\t\n\t\t\t\t\tpopA = clade.cladeLocIndex[i];\n\t\t\t\t\tpopB = clade.cladeLocIndex[j];\n\t\t\t\t\t\n\t\t\t\t\tif (j != i)\n\t\t\t\t\t{\n\t\t\t\t\t\tsum1 += (double) clade.obsMatrix[c][i] * clade.obsMatrix[c][j] * distance[popA-1][popB-1];\n\t\t\t\t\t\tsum3 += clade.obsMatrix[c][i] * clade.obsMatrix[c][j];\t\t\t\n\t\t\t\t\t\tsumc1 += (double) clade.obsMatrix[c][i] * clade.columnTotal[j] * distance[popA-1][popB-1];\t\n\t\t\t\t\t\tsumc3 += clade.obsMatrix[c][i] * clade.columnTotal[j];\n\t\t\t\t\t\t//System.err.println(\"\\npopA = \" + popA + \" popB = \" + popB + \" dist= \" + distance[popA-1][popB-1]);\n\t\t\t\t\t\t//System.err.println(\"sumc1: \" + clade.obsMatrix[c][i] + \" * \" + clade.columnTotal[j] +\" * \" + distance[popA-1][popB-1] + \" = \" + sumc1); \n\t\t\t\t\t\t//System.err.println(\"\\nOBS[\" + c +\"][\" + i+ \"]= \" + clade.obsMatrix[c][i]); \n\t\t\t\t\t\t//System.err.println(\"\\nCT[\" + j +\"]= \" + clade.columnTotal[j]); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\n\t\t\t//System.err.println(\"\\nOBS[\" + c +\"][\" + i+ \"]= \" + clade.obsMatrix[c][i]); \n\t\t\n\t\t\t\n\t\t\tif (sum3 == 0.0)\n\t\t\t\tclade.Dc[c] = 0.0;\n\t\t\telse\n\t\t\t\tclade.Dc[c] = sum1 / (sum2 + sum3);\t\t\t\t\n\t\n\t\n\t\t\tif (sumc3 == 0.0)\n\t\t\t\tclade.Dn[c] = 0.0;\n\t\t\telse\n\t\t\t\tclade.Dn[c] = sumc1 / (sumc2 + sumc3);\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t//System.err.println(\"\\nClade \" + clade.cladeName + \" subclade \" + c + \n\t\t\t// \" Dc= \" + clade.Dc[c] + \" Dn= \" + clade.Dn[c]); \t\t\n\t\t\t//System.err.println(\"sum1= \" + sum1 + \" sum2= \" + sum2 + \" sum3= \" + sum3); \n\t\t\t//System.err.println(\"sumc1= \" + sumc1 + \" sumc2= \" + sumc2 + \" sumc3= \" + sumc3); \t\n\t\t}\t\t\n\n\t}", "@Override\n public void move() {\n System.out.println(\"diagonally\");\n }", "public static void sequntailFloydW() {\r\n \t\r\n \t\r\n \t\r\n \r\n //This makes the main matrix d[][] ready\r\n \r\n \r\n //System.out.println(\"Printing... intial matrix\");\r\n \r\n for (int k = 0; k < dim; k++) {\r\n for (int i = 0; i < dim; i++) {\r\n for (int j = 0; j < dim; j++) {\r\n if (d[i][k] == I || d[k][j] == I) {\r\n continue;\r\n } else if (d[i][j] > d[i][k] + d[k][j]) {\r\n d[i][j] = d[i][k] + d[k][j];\r\n }\r\n }\r\n }\r\n //System.out.println(\"sequntial pass \" + (k + 1) + \"/\" + dim);\r\n \r\n //System.out.println();\r\n }\r\n \r\n adjacencyMatrix = d.clone();// reuse adjacencyMatrix as a matrix for comparison with parallel execution, and clone as d[][] \r\n \t\t\t\t\t\t\t\r\n \r\n \r\n //print(adjacencyMatrix);\r\n }", "public void diagrafiGiatrou() {\n\t\t// Elegxw an yparxoun iatroi sto farmakeio\n\t\tif(numOfDoctors != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA IATRWN\");\n\t\t\t// Emfanizw olous tous giatrous\n\t\t\tfor(int j = 0; j < numOfDoctors; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA IATROU: \");\n\t\t\t\tSystem.out.println();\n\t \t \tdoctor[j].print();\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\ttmp_1 = sir.readPositiveInt(\"DWSTE TON ARITHMO TOU IATROU POU THELETAI NA DIAGRAFEI: \");\n\t\t\tSystem.out.println();\n\t\t\t// Elegxos egkyrotitas tou ari8mou pou edwse o xristis\n\t\t\twhile(tmp_1 < 0 || tmp_1 > numOfDoctors)\n\t\t\t{\n\t\t\t\ttmp_1 = sir.readPositiveInt(\"KSANAEISAGETAI ARITHMO IATROU: \");\n\t\t\t}\n\t\t\t// Metakinw tous epomenous giatrous mia 8esi pio aristera\n\t\t\tfor(int k = tmp_1; k < numOfDoctors - 1; k++)\n\t\t\t{\n\t\t\t\tdoctor[k] = doctor[k+1]; // Metakinw ton giatro sti 8esi k+1 pio aristera\n\t\t\t}\n\t\t\tnumOfDoctors--; // Meiwse ton ari8mo twn giatrwn\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.print(\"\\nDEN YPARXOUN DIATHESIMOI GIATROI PROS DIAGRAFH!\\n\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "private void run() {\n final int[][] graph = new int[][] {\n {0, 16, 13, 0, 0, 0},\n {0, 0, 10, 12, 0, 0},\n {0, 4, 0, 0, 14, 0},\n {0, 0, 9, 0, 0, 20},\n {0, 0, 0, 7, 0, 4},\n {0, 0, 0, 0, 0, 0}\n };\n\n System.out.println(String.format(\"The maximum possible flow is %d\", fordFulkerson(graph, 0, 5)));\n }", "@Test\n\tpublic void testCuatroEnRayaDiag1() {\n\t\t\n\t\tint []posX = new int[4];\n\t\tint []posY = new int[4];\n\t\tfor (int i = 1; i <= 12; ++i) {\n\t\t\tint sx = Math.max(1, i-5);\n\t\t\tint sy = Math.min(i, 6);\n\t\t\twhile ((sy - 4 >= 0) && (sx + 3 <= 7)) {\n\t\t\t\tfor (int l = 0; l < 4; ++l) {\n\t\t\t\t\tposX[l] = sx + l;\n\t\t\t\t\tposY[l] = sy - l;\n\t\t\t\t}\n\t\t\t\tpruebaCuatroEnRaya(posX, posY);\n\t\t\t\tsy--; sx++;\n\t\t\t}\n\t\t}\n\t}", "public void diagrafiAstheni() {\n\t\tif(numOfPatient != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA ASTHENWN\");\n\t\t\t// Emfanizw olous tous astheneis\n\t\t\tfor(int j = 0; j < numOfPatient; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA ASTHENOUS: \");\n\t\t\t\tSystem.out.println();\n\t \t \tpatient[j].print();\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\ttmp_1 = sir.readPositiveInt(\"DWSTE TON ARITHMO TOU ASTHENH POU THELETAI NA DIAGRAFEI: \");\n\t\t\tSystem.out.println();\n\t\t\t// Elegxos egkyrotitas tou ari8mou pou edwse o xristis\n\t\t\twhile(tmp_1 < 0 || tmp_1 > numOfPatient)\n\t\t\t{\n\t\t\t\ttmp_1 = sir.readPositiveInt(\"KSANAEISAGETAI ARITHMO ASTHENOUS: \");\n\t\t\t}\n\t\t\t// Metakinw tous epomenous astheneis mia 8esi pio aristera\n\t\t\tfor(int k = tmp_1; k < numOfPatient - 1; k++)\n\t\t\t{\n\t\t\t\tpatient[k] = patient[k+1]; // Metakinw ton astheni sti 8esi k+1 pio aristera\n\t\t\t}\n\t\t\tnumOfPatient--; // Meiwse ton ari8mo twn asthenwn\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.print(\"\\nDEN YPARXOUN DIATHESIMOI ASTHENEIS PROS DIAGRAFH!\\n\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void startExecuting() {\n\t\t\tRandom random = this.parentEntity.getRNG();\n\t\t\tdouble d0 = this.parentEntity.posX + (double)((random.nextFloat() * 2.0F - 1.0F) * 16.0F);\n\t\t\tdouble d1 = this.parentEntity.posY + (double)((random.nextFloat() * 2.0F - 1.0F) * 16.0F);\n\t\t\tdouble d2 = this.parentEntity.posZ + (double)((random.nextFloat() * 2.0F - 1.0F) * 16.0F);\n\t\t\tthis.parentEntity.getMoveHelper().setMoveTo(d0, d1, d2, 0.3D);\n\t\t}", "private void run(){\r\n\t\tArrayList<Integer> parcours = new ArrayList<Integer>();\r\n\t\tArrayList<Integer> sommets = new ArrayList<Integer>();\r\n\t\t\r\n\t\t//initialisation de la liste des sommets\r\n\t\tfor (int i=1; i<super.g.getDim();i++) {\r\n\t\t\tsommets.add(i);\r\n\t\t}\r\n\r\n\t\t//g�n�ration d'un parcours initial\r\n\t\tAlgo2opt algo = new Algo2opt(super.g);\r\n\t\tsuper.parcoursMin = algo.parcoursMin;\r\n\t\tsuper.dist = algo.dist;\r\n\r\n\t\tcheminMin(parcours,sommets,super.g.getDim(), 0);\r\n\t}", "public void executeStep() {\n\t\tvar parent = queue.poll();\n\t\tfinal var children = parent.getValidChildren(graph, probabilities, minSteps,\n\t\t\t\tinitialEdgeImportance.keySet().toArray(new ConcreteEdge[initialEdgeImportance.size()]));\n\n\t\tfor (final var child : children) {\n\t\t\tfor (var x : parent.getInitialEdgeIncrements().entrySet()) {\n\t\t\t\tinitialEdgeImportance.compute(x.getKey(), (k, v) -> v == null ? x.getValue() : (v + x.getValue()));\n\t\t\t}\n\n\t\t\tgetSuccessMatrixResult(child.getInitialAction()).max(child.getPosition(), child.getSuccessRating());\n\t\t\tgetCutOffMatrixResult(child.getInitialAction()).max(child.getPosition(), child.getCutOffRating());\n\n\t\t\tqueue.add(child);\n\t\t\tcalculatedPathsCount++;\n\t\t}\n\t}", "void print_path(int[]parent,int[]dist,int s)\n {\n System.out.println(); \n \n //path from s to all other vertices\n \n for(int i=0;i<parent.length;i++)\n {\n System.out.println(\"From \"+s+\" to \"+i);\n System.out.print(\"path: \");\n print_node(parent,i);\n System.out.print(\"END\");\n if(dist[i]==INF)\n System.out.println(\" cost=INF\"); \n else\n System.out.println(\" cost=\"+dist[i]);\n\n }\n \n \n System.out.println();\n \n\n \n }", "public void act() \n {\n verificaClique();\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\tnew CC(1000);\r\n\t}", "public void makeSimulationStep() {\n for (ElevatorController controller : elevatorControllers.values()) {\n controller.makeOneStep();\n }\n }", "public void CFC() {\n\t\tthis.DFS(null);\n\t\tGrafo d2 = this.reverse();\n\n\t\tList<Vertice> decreasing_f2 = new ArrayList<Vertice>();\n\t\tfor (Vertice v1 : this.vertices.values()) {\n\t\t\tVertice v2 = d2.vertices.get(v1.id);\n\t\t\tv2.size = v1.f;\n\t\t\tdecreasing_f2.add(v2);\n\t\t}\n\t\tCollections.sort(decreasing_f2);\n\n\t\td2.DFS(decreasing_f2);\n\n\t\tthis.reset();\n\t\tfor (Vertice v21 : d2.vertices.values()) {\n\t\t\tVertice v11 = this.vertices.get(v21.id);\n\t\t\tif (v21.parent != null) {\n\t\t\t\tVertice v12 = this.vertices.get(v21.parent.id);\n\t\t\t\tv11.parent = v12;\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void execute() \r\n\t\t{\n\t\tsourceArcs = parent.getSourceArcsFromID(child.getServerName());\r\n\t\ttargetArcs = parent.getTargetArcsFromID(child.getServerName());\r\n\t\tredo();\r\n\t\t}", "public void execute(){\n drivetrain.tankDrive(0.6 * direction, 0.6 * direction);\n // slower than full speed so that we actually bring down the bridge,\n // not just slam it and push balls the wrong way\n }", "public static void main(String[] args) {\n\t\tSubHonda civic = new SubHonda(\"Civic\",2,125);\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(civic.getMaxMph());\n\t\tSystem.out.println(\"Civic is driving: \" + civic.isDriving);\n\t\tcivic.drive();\n\t\tSystem.out.println(\"Civic is driving: \" + civic.isDriving);\n\t\tcivic.increaseVehicleSpeed();\n\t\tcivic.increaseVehicleSpeed();\n\t\tSystem.out.println(civic.getMaxMph());\n\t\tcivic.increaseVehicleSpeed();\n\t\tcivic.increaseVehicleSpeed();\n\t\tSystem.out.println(civic.getMaxMph());\n\n\t}", "public static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\ttry {\n\t\t\tint N = Integer.parseInt(br.readLine());\n\t\t\tint[][] A = new int[N + 1][N + 1];\n\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\tString str = br.readLine();\n\t\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\t\tA[i][j] = str.charAt(j) - 48;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint connectedCompo = 0;\n\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\t\tif (A[i][j] == 1 && c[i][j] == 0) {\n\t\t\t\t\t\tdfs(i, j, A);\n\t\t\t\t\t\tlist.add(numOfHome);\n\t\t\t\t\t\tnumOfHome = 0;\n\t\t\t\t\t\tconnectedCompo++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(connectedCompo);\n\t\t\tCollections.sort(list); // 정렬을 빼먹어서 틀렸었음!!\n\t\t\tfor (int i = 0; i < list.size(); i++)\n\t\t\t\tSystem.out.println(list.get(i));\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) \n\t{\n\t\ttree x = new tree(0);\n\t\t\n\t\ttreenode r = x.root;\n\t\t\n//\t\ttreenode c = r;\n//\t\tfor(int i =1;i<=4;i++)\n//\t\t{\n//\t\t\tfor(int j=0;j<=8;j=j+4)\n//\t\t\t{\n//\t\t\t\ttreenode n = new treenode(i+j);\n//\t\t\t\tif(j==0)\n//\t\t\t\t{\n//\t\t\t\t\tr.child.add(n);\n//\t\t\t\t\tc = n;\n//\t\t\t\t}\n//\t\t\t\telse\n//\t\t\t\t{\n//\t\t\t\t\tc.child.add(n);\n//\t\t\t\t\tc = n;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\t\ttreenode c1 = r;\n\t\ttreenode c2 = r;\n\t\ttreenode c3 = r;\n\t\ttreenode c4 = r;\n\t\tfor(int i=1;i<13;i++)\n\t\t{\n\t\t\ttreenode n = new treenode(i);\n\t\t\tif(i%4==1)\n\t\t\t{\n\t\t\t\tc1.child.add(n);\n\t\t\t\tc1 = n;\n\t\t\t}\n\t\t\tif(i%4==2)\n\t\t\t{\n\t\t\t\tc2.child.add(n);\n\t\t\t\tc2 = n;\n\t\t\t}\n\t\t\tif(i%4==3)\n\t\t\t{\n\t\t\t\tc3.child.add(n);\n\t\t\t\tc3 = n;\n\t\t\t}\n\t\t\tif(i%4==0)\n\t\t\t{\n\t\t\t\tc4.child.add(n);\n\t\t\t\tc4 = n;\n\t\t\t}\n\t\t}\n\t\tx.traverse(r);\n\t}", "void resDiagonale(){ \r\n for (int i = 0; i<N; i=i+nCarre) \r\n \tresCarre(i, i); \r\n }", "public static void main(String[] args) {\r\n\r\n drawNumDiamondIter(10);\r\n System.out.println(\"********\");\r\n drawNumDiamondRec(10);\r\n\r\n }", "public void forfaitCli() throws IOException, InterruptedException {\n printOut(cliToolsManager.sceneInitializer(80));\n\n for(int i=0;i<15;i++)\n printOut(\"\");\n\n printOut(cliToolsManager.centerThatString(\"TUTTI GLI ALTRI GIOCATORI SI SONO DISCONNESSI\", 80));\n printOut(cliToolsManager.centerThatString(\"HAI VINTO\", 80));\n\n printOut(\"\");\n printOut(\"\");\n\n printOut(cliToolsManager.simpleQuestionsMaker(\"Premi qualsiasi tasto per uscire\", 80, true));\n readIt();\n }", "public static void main(String[] args) {\n\t\tfather1 fb = new father1();\n\t\tfather1 sb = new son1();\n\t\tfb.birthday(1976,3,29);\n\t\tsb.birthday(2006,4,24);\n\t\t\n \n\t\t\n\n\n\n\t}", "@Override\n\tpublic void run() {\n\t\tList<ProfileData> base=this.readBattery(this.batteryBasedFile);\n\t\tList<ProfileData> cpuFull=this.readBattery(this.batteryCPUFile);\n\t\t\n\t\tDefaultNetworkEnergyManager nem = MANAGER_FACTORY.createNetworkEnergyManager(networkEnergyManagerEnable, wifiSignalStrength);\n\t\tDefaultBatteryManager sb=MANAGER_FACTORY.createBatteryManager(2, startCharge, startUptime, batteryCapacityInJoules);\n\t\tfor(ProfileData b:base)\n\t\t\tsb.addProfileData(0, b);\n\t\tfor(ProfileData b:cpuFull)\n\t\t\tsb.addProfileData(1, b);\n\t\t\n\t\tDefaultExecutionManager se=MANAGER_FACTORY.createExecutionManager();\t\t\n\t\tse.setMips(this.flops);\n\t\tDevice d= MANAGER_FACTORY.createDevice(this.nodeId, sb, se, nem);\n\t\t\n\t\tsimLock.lock();\n\t\tNetworkModel.getModel().addNewNode(d);\n\t\tSimulation.addEntity(d);\n\t\tthis.dId=Simulation.getEntityId(this.nodeId);\n\t\tsimLock.unlock();\n\t\t\n\t\tsb.setDevice(d);\n\t\tse.setDevice(d);\n\t\tnem.setDevice(d);\n\t\tse.setBatteryManager(sb);\n\t\tnem.setBatteryManager(sb);\n\t\tsb.setSEASExecutionManager(se);\n\t\t\t\t\t\t\n\t\tthis.readCPUEvents();\n\t\t\n\t\tthis.eventLock.lock();\n\t\tEvent e=Event.createEvent(Event.NO_SOURCE, this.startTime, this.dId, Device.EVENT_TYPE_DEVICE_START, null);\n\t\tthis.eventLock.unlock();\n\t\tthis.simLock.lock();\n\t\tSimulation.addEvent(e);\n\t\tthis.simLock.unlock();\n\t}", "public static void main (String[] args){\n Fork[] fork = new Fork[5];\n Philosopher[] philosophers = new Philosopher[5];\n State state = new State();\n\n //CREATING FORKS FOR EVERY PHILOSOPHER\n for (int i = 0; i < 5; i++){\n fork[i] = new Fork();\n }\n\n //CREATING A PHILOSOPHER AS WELL AS THEIR THREAD AND PRINT THAT THEY START OUT BY THINKING\n for ( int i = 0; i < 5; i++){\n philosophers[i] = new Philosopher(i, fork[i], fork[(i+4) % 5], state);\n Thread philnum = new Thread(philosophers[i]);\n //int phil = i + 1;\n System.out.println(\"Philosopher \" + (i+1) + \" is thinking\");\n philnum.start();\n }\n\n }", "private void branch01(Node parent) {\n final GeneralLP lp0 = parent.lp;\n final int v = intVars[parent.level];\n Maths.CnF cf = new Maths.CnF(lp0.x[v - 1]);\n\n double[][] a2 = Arrays.copyOf(lp0.a, lp0.m);\n double[] bLeft = lp0.b; // left branch\n double[] bRight = Arrays.copyOf(lp0.b, lp0.m); // right branch\n double[] c2 = Arrays.copyOf(lp0.c, lp0.n);\n double c0Right = lp0.c0 + lp0.c[v - 1]; // c0Left unchanged\n branch01Arguments(c2, a2, bRight, lp0, v);\n\n // LP1: left branch (=0)\n LOG.debug(parent, \"left branch x(\", v, \") =\", 0);\n GeneralLP lp1 = new GeneralLP(lp0.objectiveType, lp0.c0, c2, a2, lp0.signs, bLeft, lp0.freeVars);\n Node child1 = new Node(lp1, parent, Node.LEFT).binary(v);\n nodes.addLast(child1);\n\n // LP2: right branch (=1)\n LOG.debug(parent, \"right branch x(\", v, \") =\", 1);\n GeneralLP lp2 = new GeneralLP(lp0.objectiveType, c0Right, c2, a2, lp0.signs, bRight, lp0.freeVars);\n Node child2 = new Node(lp2, parent, Node.RIGHT).binary(v);\n nodes.addLast(child2);\n\n parent.lp = null; // release memory\n }", "public void buildCD(){\n\t\tbuildCards();\n\t\tbuildDeck();\n\t}", "public void run(){\n while(true){\n thinking();\n state.grabFork(philosopherIndex,left,right);\n eating();\n state.putForkDown(philosopherIndex,left,right);\n thinking();\n }\n }", "public void run() throws IloException {\n\t\t\n\t\t//Instancie la classe Cplex avec le programme lineaire et la nature\n\t\tCplex cplex = new Cplex(prog, nature);\n\t\tboolean st = false;\n\t\tString info;\n\t\tint i = 0;\n\t\t\n\t\t/*Tant que l'on a des sous tours dans le modèle*/\n\t\tdo {\n\t\t\t//Lancement du solve du model de cplex\n\t\t\tcplex.solve();\n\t\t\t\n\t\t\t//Récupère un booléen en fonction de la présence de sous tours après le solve\n\t\t\tst = contrainteSousTour(cplex);\n\t\t\tinfo = \"Contrainte de sous-tours ajouté au modèle\";\n\t\t\tInterface.majAffichage(info);\n\t\t\ti++;\n\t\t} while (st && i!= 5);\n\n\t}", "@Test\n\tpublic void testCuatroEnRayaDiag2() {\n\t\t\n\t\tint []posX = new int[4];\n\t\tint []posY = new int[4];\n\t\tfor (int i = 1; i <= 12; ++i) {\n\t\t\tint sx = Math.min(i, 7);\n\t\t\tint sy = Math.min(13 - i, 6);\n\t\t\twhile ((sy - 4 >= 0) && (sx - 4 >= 0)) {\n\t\t\t\tfor (int l = 0; l < 4; ++l) {\n\t\t\t\t\tposX[l] = sx - l;\n\t\t\t\t\tposY[l] = sy - l;\n\t\t\t\t}\n\t\t\t\tpruebaCuatroEnRaya(posX, posY);\n\t\t\t\tsy--; sx--;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n PetriNet inst = new CoffeeMachinePetri();\r\n Scanner scanner = new Scanner(System.in);\r\n int input ;\r\n input = scanner.nextInt();\r\n while(input!=0)\r\n {\r\n System.out.println(\"Introduceti optiunea: \");\r\n input = scanner.nextInt();\r\n inst.exec(input);\r\n \r\n System.out.println(inst.getStareCurenta());\r\n\t\t}\r\n inst.exec(0);\r\n }", "@Override\n protected void compute() {\n\n if(this.workLoad > 16){\n System.out.println(\"Splitting Workload :: \"+this.workLoad);\n List<MyRecursiveAction> subTasks = new ArrayList<>();\n subTasks.addAll(createSubTasks());\n\n subTasks.forEach(tasks -> {\n tasks.fork();\n });\n }else{\n System.out.println(\"Doing Workload myself :: \"+this.workLoad);\n }\n }", "public static void main(String[] args) {\n\t\tContaCorrente cc = new ContaCorrente(1111, 123321);\n\t\tcc.deposita(100);\n\t\tContaPoupanca cp = new ContaPoupanca(1111, 123321);\n\t\tcp.deposita(200);\n\t\t\n\t\tcc.transfere(10, cp);\n\t\tSystem.out.println(\"CP \" + cp.getSaldo());\n\t\tSystem.out.println(\"CC \" + cc.getSaldo());\n\t}", "public static void main(String[] args) {\n\n try {\n Coordinator cord = new Coordinator(cordPort, 3);\n runRunnable(cord);\n\n Participant one=new Participant(1001,cordPort);\n Participant two=new Participant(1002,cordPort);\n Participant three=new Participant(1003,cordPort);\n runRunnable(one);\n runRunnable(two);\n runRunnable(three);\n }catch (Exception ex){\n\n }\n\n }", "public static void main(String args[]) {\n\t\tInheritanceUsingConstrChild child=new InheritanceUsingConstrChild();\n\t\tchild.display();\n\t}", "public static void main(String[] args)\n\t\t\t{\n\t\t\t\tnew ChildSon().func1();\n\t\t\t}", "public void masterProg() {\n\t\tmoveObjsToGoals();\r\n\t}", "public static void main(String[] args) {\n\t\t\tCC c=new CC();\r\n\t\t\tc.callme();\r\n\t\t\tc.callmetoo();\r\n\t\t\t\r\n\t\t\t\r\n}", "protected void generate() {\n\t\tcpGenerator( nx, ny, nz, ClosePackedLattice.HCP);\n\t}", "public static void runGeneration(){\r\n adjust = generationSize*generation;\r\n //Send out the ants to their start points\r\n for (int i = generationSize -1; i>0; i--) {\r\n colony.get(i + adjust).startPositions(sets);\r\n }\r\n //initialises the latch with a counter for each ant in a generation\r\n latch = new CountDownLatch(generationSize);\r\n //move the ants out until they have found a valid solution or seen all nodes\r\n //create a new thread for each ant in the generation\r\n for (int i = 0; i<generationSize;i++) {\r\n Generation temp = new Generation(i);\r\n //starts the new thread\r\n temp.start();\r\n }\r\n try {\r\n //wait until all the ants in a generation have completed their paths\r\n latch.await();\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"error in latch.await\");\r\n }\r\n\r\n //Create the pheremone trail\r\n for (int i = 0; i<generationSize;i++) {\r\n Ant a = colony.get(i + adjust);\r\n for (Integer k: a.Path) {\r\n pheremones.set(k, pheremones.get(k) + 1);\r\n visited.set(k, visited.get(k) + 1);\r\n }\r\n }\r\n\r\n generation++;\r\n //degrade the pheremone trail\r\n if(generation > 1){\r\n for (int i = 0; i < pheremones.size(); i++){\r\n pheremones.set(i, pheremones.get(i) - degrade);\r\n if (pheremones.get(i) < 0) pheremones.set(i, 0);\r\n }\r\n }\r\n\r\n }", "@Override\n\tpublic void ccc() {\n\t\t\n\t}", "public void action() {\n x = x + dx;\n y = y + dy;\n\n // deluppgift 6\n if( this.growing ) {\n this.setDiameter( this.diameter + 5 );\n this.growing = (this.diameter > 25) ? false : true;\n }\n else {\n this.setDiameter( this.diameter - 4 );\n this.growing = (this.diameter < 5 ) ? true : false;\n }\n constrain();\n }", "public static void main(String[] args) {\n\n printTriangle(5);\n System.out.println(\"---\");\n christmasTree(4);\n System.out.println(\"---\");\n christmasTree(10);\n }", "public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n int coins[]=new int[]{1,2,5};\n int amount=5;\n int[][] dp = new int[coins.length][amount + 1];\n for(int i = 0; i < coins.length; i++){\n Arrays.fill(dp[i], -1);\n }\n System.out.println(cc(coins, 0, amount, dp));\n\n }", "private void streamlinedGo(String[] argsList) {\n\t\tstates = alignment.getAminoAcidsAsFitchStates();\n\t\tbaseStates = phylogeny.getFitchStates(states).clone();\n\t\tambiguousAtRoot = 0;\n\t\tancestorAmbiguities = new boolean[baseStates.length];\n\t\t/* Establish how many ancestral states are ambiguous */\n\t\tfor(int i=0;i<baseStates.length;i++){\n\t\t\tHashSet<String> statesSet=baseStates[i];\n\t\t\tif(statesSet.size()>1){\n\t\t\t\tambiguousAtRoot++;\n\t\t\t\tancestorAmbiguities[i] = true;\n\t\t\t}\n\t\t}\n\t\t/* Attempt to resolve the rootnode states */\n\t\tphylogeny.resolveFitchStatesTopnode();\n\t\tphylogeny.resolveFitchStates(phylogeny.states);\n\t\t/* A new PR object used to hold reconstructions */\n\t\tpr = new ParsimonyReconstruction(states, phylogeny);\n\t\t/* Should now be resolved as far as possible.\n\t\t * Compare each taxon to tree root MRCA */\n\t\t//pr.printAncestralComparison();\n\n\t\t/*\n\t\t * Parse the args into lists\n\t\t * Then find the tips and MRCAs of each list. at this point print all branches below\n\t\t * Then walk through the MRCA / lists counting subs\n\t\t */\n\t\tint numberOfClades = argsList.length-2;\t// we'll assume the first two args are alignment and phylogeny respectively, and all the others (we've checked >2) are clades described by tips\n\t\t// Guessed the number of clades, initialise arrays\n\t\tcladeTips = new HashSet[numberOfClades];\n\t\tcladeTipsAsNodes = new HashSet[numberOfClades];\n\t\tMRCAnodes = new TreeNode[numberOfClades];\n\t\tMRCAcladesBranchTotals = new int[numberOfClades];\n\t\tMRCAcladesBranchTotalsTerminal = new int[numberOfClades];\n\t\tMRCAcladesBranchTotalsInternal = new int[numberOfClades];\n\t\tMRCAcladesSubstitutionTotals = new int[numberOfClades];\n\t\tMRCAcladesSubstitutionTotalsTerminal = new int[numberOfClades];\n\t\tMRCAcladesSubstitutionTotalsInternal = new int[numberOfClades];\n\t\tSystem.out.println(\"Assuming \"+numberOfClades+\" separate clades. Parsing clade descriptions...\");\n\t\t// Parse the clade lists\n\t\tfor(int i=2;i<argsList.length;i++){\n\t\t\tString[] taxaTokens = argsList[i].split(\":\");\n\t\t\tcladeTips[i-2] = new HashSet<String>();\n\t\t\tcladeTipsAsNodes[i-2] = new HashSet<TreeNode>();\n\t\t\tfor(String aTaxon:taxaTokens){\n\t\t\t\tcladeTips[i-2].add(aTaxon);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check we've parsed them correctly\n\t\tSystem.out.println(\"Read these taxon lists:\");\n\t\tfor(int i=0;i<cladeTips.length;i++){\n\t\t\tSystem.out.print(\"Clade \"+i);\n\t\t\tfor(String taxon:cladeTips[i]){\n\t\t\t\tSystem.out.print(\" \"+taxon);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\t// Find the MRCA node of each clade, and also print all the branches beneath that MRCA node\n\t\tSystem.out.println(\"Searching the tree for the MRCAs of each clade...\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\t// Find the tip nodes corresponding to extant taxa\n\t\t\tIterator<String> itr = cladeTips[i].iterator();\n\t\t\twhile(itr.hasNext()){\n\t\t\t\tint nodeIDofTip = phylogeny.getTipNumber(itr.next());\n\t\t\t\tTreeNode tipNode = phylogeny.getNodeByNumberingID(nodeIDofTip);\n\t\t\t\tcladeTipsAsNodes[i].add(tipNode);\n\t\t\t}\n\t\t\t\t\n\t\t\t// Find the ID of the MRCA node\n\t\t\tint nodeIDofMRCA = phylogeny.getNodeNumberingIDContainingTaxa(cladeTips[i]);\n\t\t\tTreeNode cladeNodeMRCA = phylogeny.getNodeByNumberingID(nodeIDofMRCA);\n\t\t\tMRCAnodes[i] = cladeNodeMRCA;\n\n\t\t\t// Print all the branches below MRCA\n\t\t\tSystem.out.println(\"Found the MRCA of clade \"+i+\" (\"+nodeIDofMRCA+\"):\\n\"+cladeNodeMRCA.getContent()+\"\\nPrinting all branches below this node:\");\n\t\t\tMRCAcladesBranchTotals[i] = cladeNodeMRCA.howManyTips();\n\t\t\tfor(TreeBranch branch:cladeNodeMRCA.getBranches()){\n\t\t\t\tSystem.out.println(branch);\n\t\t\t\tInteger[] substitutions = StateComparison.printStateComparisonBetweenTwoNodes(branch.getParentNode().states, branch.getDaughterNode().states, branch.getParentNode().getContent(), branch.getDaughterNode().getContent());\n\t\t\t\tMRCAcladesSubstitutionTotals[i] = substitutions.length;\n\t\t\t\tif(branch.isEndsInTerminalTaxon()){\n\t\t\t\t\tMRCAcladesBranchTotalsTerminal[i]++;\n\t\t\t\t\tMRCAcladesSubstitutionTotalsTerminal[i] = substitutions.length;\n\t\t\t\t}else{\n\t\t\t\t\tMRCAcladesBranchTotalsInternal[i]++;\n\t\t\t\t\tMRCAcladesSubstitutionTotalsInternal[i] = substitutions.length;\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// For each MRCA node and clade tips combination, compare and print substitutions\n\t\tSystem.out.println(\"Comparing ancestral clade MRCA node sequences with extant sequences...\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\tSystem.out.println(\"Comparing ancestral MRCA sequence for CLADE \"+i+\" against *ALL* clades' terminal taxa...\");\n\t\t\tTreeNode thisMRCA = MRCAnodes[i];\n\t\t\tfor(int j=0;j<cladeTipsAsNodes.length;j++){\n\t\t\t\tSystem.out.println(\"Clade MRCA: \"+i+\" -vs- clade tips: \"+j);\n\t\t\t\tint MRCAtoTipsSubstitutions = 0;\n\t\t\t\tfor(TreeNode someTip:cladeTipsAsNodes[j]){\n\t\t\t\t\tInteger[] substitutions = StateComparison.printStateComparisonBetweenTwoNodes(thisMRCA.states, someTip.states, \"MRCA_clade_\"+i, someTip.getContent());\n\t\t\t\t\tMRCAtoTipsSubstitutions+= substitutions.length;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Substitutions from Clade MRCA: \"+i+\" -vs- clade tips: \"+j+\": \"+MRCAtoTipsSubstitutions);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// All uncorrected pairwise comparisons\n\t\tSystem.out.println(\"Comparing extant sequences directly...\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\tfor(TreeNode someTip:cladeTipsAsNodes[i]){\n\t\t\t\tfor(int j=0;j<cladeTipsAsNodes.length;j++){\n\t\t\t\t\tSystem.out.println(\"Basis clade: \"+i+\" -vs- clade tips: \"+j);\n\t\t\t\t\tint MRCAtoTipsSubstitutions = 0;\n\t\t\t\t\tfor(TreeNode someOtherTip:cladeTipsAsNodes[j]){\n\t\t\t\t\t\tInteger[] substitutions = StateComparison.printStateComparisonBetweenTwoNodes(someTip.states, someOtherTip.states, someTip.getContent(), someOtherTip.getContent());\n\t\t\t\t\t\tMRCAtoTipsSubstitutions+= substitutions.length;\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"Substitutions from Clade MRCA: \"+i+\" -vs- clade tips: \"+j+\": \"+MRCAtoTipsSubstitutions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t// Print a summary of each clade\n\t\tSystem.out.println(\"Summary of clade counts...\");\n\t\tSystem.out.println(\"Clade\\tbranches\\texternal\\tinternal\\t\\tsubstitutions\\texternal\\tinternal\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\tSystem.out.println(i\n\t\t\t\t\t+\"\\t\"+MRCAcladesBranchTotals[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesBranchTotalsTerminal[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesBranchTotalsInternal[i]+\"\\t\"\n\t\t\t\t\t+\"\\t\"+MRCAcladesSubstitutionTotals[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesSubstitutionTotalsTerminal[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesSubstitutionTotalsInternal[i]);\n\t\t}\n\t\tSystem.out.println(\"Done.\");\n\t}", "protected abstract void childManager(ForkManager child_, double time_);", "void fcalcHelper(LinkedList<Edge> l[], LinkedList<Integer> path[], int sn, int cn, int n, FibonacciHeap fh, Nodefh a[],double currentCost[]){\n\t\ttry{\n\t\t\tif(fh.isEmpty()==true){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tIterator<Edge> it = l[cn].iterator();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tint tempcost=0;\n\t\t\t\tEdge e= (Edge)it.next();\n\t\t\t\tif(a[cn].dist == Double.POSITIVE_INFINITY)\n\t\t\t\t\ttempcost = e.cost;\n\t\t\t\telse\n\t\t\t\t\ttempcost= (int)(e.cost+a[cn].dist);\n\t\t\t\tif(tempcost < a[e.adjIndex].dist){\n\t\t\t\t\tfh.decreasekey(a[e.adjIndex], tempcost);\n\t\t\t\t\tcurrentCost[e.adjIndex] = tempcost;\n\t\t\t\t\tpath[e.adjIndex].clear();\n\t\t\t\t\tfor(int i=0; i < path[cn].size(); i++){\n\t\t\t\t\t\tpath[e.adjIndex].add(path[cn].get(i));\n\t\t\t\t\t}\n\t\t\t\t\tpath[e.adjIndex].add(e.adjIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t\tNodefh temp = fh.removeMin();\n\t\t\tint prevcn = cn;\n\t\t\tcn = temp.index;\n\t\t\tif(cn != -1){\n\t\t\t\tfcalcHelper(l,path, sn,cn,n,fh,a,currentCost);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcn = prevcn;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{System.out.println(e);}\n\t}", "public static void main(String[] args) {\n\t\tGraph g = new Graph(5, false);\r\n\t\tg.addConnection(1, 2, 15);\r\n\t\tg.addConnection(1, 3, 5);\r\n\t\tg.addConnection(1, 4, 1);\r\n\t\t\r\n\t\tg.addConnection(2, 3, 5);\r\n\t\t//g.addConnection(2, 5, 1);\r\n\t\t\r\n\t\t//g.addConnection(4, 5, 1);\r\n\r\n\t\tSystem.out.println(g);\r\n\t\tg.dijkstra(1);\r\n\t\tg.prim(1);\r\n\t\t\r\n\t}", "public void computer()\n\t{\n\t\tif( this.days <= 5 )\n\t\t\tthis.charge = 500 * this.days ; \n\t\telse if( this.days <= 10)\n\t\t\tthis.charge = 400 * (this.days-5) + 2500 ; \n\t\telse\n\t\t\tthis.charge = 200 * (this.days-10) + 2500 + 2000 ;\n\t}", "public static void mmcc() {\n\t}", "public void diagrafiFarmakou() {\n\t\t// Elegxw an yparxoun farmaka sto farmakeio\n\t\tif(numOfMedicine != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA FARMAKWN\");\n\t\t\t// Emfanizw ola ta famraka tou farmakeiou\n\t\t\tfor(int j = 0; j < numOfMedicine; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA FARMAKOU: \");\n\t\t\t\tSystem.out.println();\n\t \t \tmedicine[j].print();\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\ttmp_1 = sir.readPositiveInt(\"DWSTE TON ARITHMO TOU FARMAKOU POU THELETAI NA DIAGRAFEI: \");\n\t\t\tSystem.out.println();\n\t\t\t// Elegxos egkyrotitas tou ari8mou pou edwse o xristis\n\t\t\twhile(tmp_1 < 0 || tmp_1 > numOfMedicine)\n\t\t\t{\n\t\t\t\ttmp_1 = sir.readPositiveInt(\"KSANAEISAGETAI ARITHMO FARMAKOU: \");\n\t\t\t}\n\t\t\t// Metakinw ta epomena farmaka mia 8esi pio aristera\n\t\t\tfor(int k = tmp_1; k < numOfMedicine - 1; k++)\n\t\t\t{\n\t\t\t\tmedicine[k] = medicine[k+1]; // Metakinw to farmako sti 8esi k+1 pio aristera\n\t\t\t}\n\t\t\tnumOfMedicine--; // Meiwse ton ari8mo twn farmakwn\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.print(\"\\nDEN YPARXOUN DIATHESIMA FARMAKA PROS DIAGRAFH!\\n\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void executeChord() {\r\n\t\t try {\r\n\t @SuppressWarnings(\"resource\")\r\n\t\t\tScanner scanner = new Scanner(System.in); \r\n\t String bBitRange, nodesRange, bBitNumber, node; int bBit, n; boolean checkB, checkNode;\r\n\t bBitRange = \"a B-bit number from 5 to 10\";\r\n\t\t\tnodesRange = \"the number of nodes from 5 to 15\";\r\n\t System.out.println(\"Enter \" + bBitRange + \": \");\r\n\t bBitNumber = scanner.nextLine(); \r\n\t System.out.println(\"Enter \" + nodesRange + \": \"); \r\n\t node = scanner.nextLine(); \r\n\t bBit = Integer.valueOf(bBitNumber);\r\n\t n = Integer.valueOf(node);\r\n\t\t\tFingerTables.collect(showTables, n);\r\n\t displayInfo(showTables, bBit, n, null);\r\n\t checkB = bBit < 5 || bBit > 10;\r\n\t checkNode = n < 5 || n > 15;\r\n \tif (checkB || checkNode) {\r\n \tif (checkB)\r\n \t\tSystem.out.println(\"Please enter \" + bBitRange);\r\n \tif (checkNode)\r\n \t\tSystem.out.println(\"Please enter \" + nodesRange);\r\n \tSystem.out.println(); \r\n \texecuteChord();\r\n } else {\r\n \tArrayList<Integer> nodes = createNodes(bBit, n);\r\n \tdisplayInfo(showTables, null, null, nodes);\r\n \tcreateFingerTables(showTables, bBit, nodes);\r\n \tint selectedKey = createSelectedKey(bBit);\r\n \tint startNode = nodes.get(1); \r\n \tSystem.out.println(\"\\nSelected key: K\" + selectedKey + \"\\nNstart: N\" + startNode);\r\n \tvisitingNodes(bBit, startNode, selectedKey, nodes);\t\r\n }\r\n } catch (NumberFormatException e) {\r\n \tSystem.out.println(\"PLEASE ENTER A NUMERICAL VALUE\\n\");\r\n \texecuteChord();\r\n } \r\n\t}", "public static void main(String[] args) {\n\t\tCustomIDAStarProblemNode a = new CustomIDAStarProblemNode(\"a\", 4, false);\n\t\t// generate the graph with the following parameters\n // h_increase - how much the heuristic increases between father to child (we random between 0 to that value)\n // b_low - minimum number of children for each node\n // b_high - maximum number of children for each node\n // current height - it is recursive, so it is the current height (level in the graph)\n // height - the maximum depth of the graph.\n // the goal is every vertex in the last level (we can change it later)\n\n\t\tgenerate_graph(a, 2, 4,6,0,6);\n\n\t\tIDAStar sa = new IDAStar(a);\n\t\tList<IDAStarNode> path = sa.findPathToGoal();\n\t\tfor(IDAStarNode n : path) {\n\t\t\tSystem.out.print(n.getName() + \",\");\n\t\t}\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"fin\");\n\t}", "private int caclSteps(float g, float h, float i) {\n\t\tint steps = 0;\n\t\tfloat currSpeed = i;\n\t\tfloat f = 0;\n\t\twhile(f<g){\n\t\t\tf +=currSpeed;\n\t\t\tcurrSpeed+=h;\n\t\t\tsteps++;\n\t\t\t\n\t\t}\n\t\treturn steps;\n\t}", "void bellman_ford(int s)\n {\n int dist[]=new int[V]; \n \n //to track the path from s to all\n int parent[]=new int[V] ;\n //useful when a vertex has no parent\n for(int i=0;i<V;i++)\n parent[i]=-2;\n \n for(int i=0;i<V;i++) \n dist[i]=INF;\n \n //start from source vertex\n dist[s]=0;\n parent[s]=-1;\n \n //we have to iterate over all the edges for V-1 times\n //each ith iteration finds atleast ith path length dist\n //worst case each ith will find ith path length \n \n for(int i=1;i<V;i++) \n {\n for(int j=0;j<E;j++)\n {\n //conside for all edges (u,v), wt\n int u=edge[j].src;\n int v=edge[j].dest;\n int wt=edge[j].wt; \n //since dist[u]=INF and adding to it=>overflow, therefore check first\n if( dist[u]!=INF && dist[u]+wt < dist[v])\n {\n dist[v]=dist[u]+wt;\n parent[v]=u;\n } \n }\n }\n \n //iterate for V-1 times, one more iteration necessarily gives a path length of atleast V in W.C=>cycle\n for(int j=0;j<E;j++) \n {\n int u=edge[j].src;\n int v=edge[j].dest;\n int wt=edge[j].wt;\n if( dist[u]!=INF && dist[u]+wt < dist[v])\n {\n System.out.println(\"Graph has cycle\");\n return;\n } \n }\n \n //print the distance to all from s\n System.out.println(\"from source \"+s+\" the dist to all other\");\n print_dist(dist); \n print_path(parent,dist,s); \n \n }", "public static void main(String[] args) {\n\t\tBinaryTree<Integer> root=BinaryTreeUse.takeInputLevelWise();\n\t\tint k=5;\n\t\tint level=level(root,0,k);\n\t\tSystem.out.println(parent.data);\n\t\tcousin(root, 0, level, k);\n\t}", "public void act() \n {\n movegas();\n \n atingido2(); \n \n }", "private final void segmentsFrameEffects() {\n\t\tif (alive) {\n\t\t\tint i;\n\t\t\t// Energy obtained through photosynthesis\n\t\t\tdouble photosynthesis = 0;\n\t\t\t_nChildren = 1;\n\t\t\t_indigo =0;\n\t\t\t_lowmaintenance =0;\n\t\t\tint fertility =0;\n\t\t\tint yellowCounter =0;\n\t\t\tint reproduceearly =0;\n\t\t\tdouble goldenage =0;\n\t\t\t_isfrozen =false;\n\t\t\tboolean trigger =false;\n\t\t\tfor (i=_segments-1; i>=0; i--) {\n\t\t\t\t// Manteniment\n\t\t\t\tswitch (getTypeColor(_segColor[i])) {\n\t\t\t\t// \tMovement\n\t\t\t\tcase CYAN:\n\t\t\t\t\tif (Utils.random.nextInt(100)<8 && useEnergy(Utils.CYAN_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\tdx=Utils.between(dx+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\tdy=Utils.between(dy+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase TEAL:\n\t\t\t\t\tif (_geneticCode.getPassive()) {\n\t\t\t\t\t\tif (_hasdodged == false) {\n\t\t\t\t\t\t\t_dodge =true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t_lowmaintenance += 0.9 * _m[i];\n\t\t\t\t\t} else \n\t\t\t\t\t if (Utils.random.nextInt(100)<8 && useEnergy(Utils.CYAN_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t dx=Utils.between(dx+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dy=Utils.between(dy+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Photosynthesis\n\t\t\t\tcase SPRING:\n\t\t\t\t\t if (_geneticCode.getClockwise()) {\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+0.1*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t\t\t\t\t photosynthesis += Utils.SPRING_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\t} else {\n\t\t\t\t\t dtheta=Utils.between(dtheta-0.1*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t\t\t\t photosynthesis += Utils.SPRING_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIME:\n\t\t\t\t\tif (trigger == false) {\n\t\t\t\t\t\ttrigger =true;\n\t\t\t\t\t if (_world.fastCheckHit(this) != null) {\n\t\t\t\t\t \t_crowded =true;\n\t\t\t\t\t } else {\n\t\t\t\t\t \t_crowded =false;\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t\tif (_crowded == true) {\n\t\t\t\t\t photosynthesis += Utils.CROWDEDLIME_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tphotosynthesis += Utils.LIME_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase JADE:\n\t\t\t\t\t_isjade =true;\n\t\t\t\t\tphotosynthesis += Utils.JADE_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase GREEN:\n\t\t\t\t\tphotosynthesis += Utils.GREEN_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase FOREST:\n\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase BARK:\n\t\t\t\t\tphotosynthesis += Utils.BARK_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase GRASS:\n\t\t\t\t\tphotosynthesis += Utils.GRASS_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase C4:\n\t\t\t\t\t_lowmaintenance += _m[i];\n\t\t\t\t\tphotosynthesis += Utils.C4_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\tbreak;\n\t\t\t\t// is a consumer\n\t\t\t\tcase RED:\n\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase FIRE:\n\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase ORANGE:\n\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase MAROON:\n\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\t_lowmaintenance += 0.9 * _m[i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase PINK:\n\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\tif (_isakiller < 2) {\n\t\t\t\t\t\t_lowmaintenance += 0.8 * _m[i];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase CREAM:\n\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// Organisms with yellow segments have more children\n\t\t\t\tcase YELLOW:\n\t\t\t\t\tyellowCounter++;\n\t\t\t\t\tfertility += _m[i];\n\t\t\t\t break;\n\t\t\t\t// Experienced parents have more children\n\t\t\t\tcase SILVER:\n\t\t\t\t\tif (_isaconsumer == false) {\n\t\t\t\t\tfor (int c = 0; c < _segments; c++) {\n\t\t\t\t\t\tswitch (getTypeColor(_segColor[c])) {\n\t\t\t\t\t\tcase DARKGRAY:\n\t\t\t\t\t\tcase GRAY:\n\t\t\t\t\t\tcase LILAC:\n\t\t\t\t\t\tcase SPIKE:\n\t\t\t\t\t\tcase PLAGUE:\n\t\t\t\t\t\tcase CORAL:\n\t\t\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\t}}}\n\t\t\t\t\t if (_nTotalChildren >= 1 && _nTotalChildren < 5) {\n\t\t\t\t\t\t_nChildren = 2; \n\t\t\t\t\t} else if (_nTotalChildren >= 5 && _nTotalChildren < 14) {\n\t\t\t\t\t\t_nChildren = 3; \n\t\t\t\t\t} else if (_nTotalChildren >= 14 && _nTotalChildren < 30) {\n\t\t\t\t\t\t_nChildren = 4; \n\t\t\t\t\t} else if (_nTotalChildren >= 30 && _nTotalChildren < 55) {\n\t\t\t\t\t\t_nChildren = 5;\n\t\t\t\t\t} else if (_nTotalChildren >= 55 && _nTotalChildren < 91) {\n\t\t\t\t\t _nChildren = 6;\n\t\t\t\t\t} else if (_nTotalChildren >= 91 && _nTotalChildren < 140) {\n\t\t\t\t\t\t_nChildren = 7; \n\t\t\t\t\t} else if (_nTotalChildren >= 140) {\n\t\t\t\t\t\t_nChildren = 8;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Auburn always has one real child if infected\n\t\t\t\tcase AUBURN:\n\t\t\t\t\t_isauburn =true;\n\t\t\t\t\t_lowmaintenance += _m[i] - (Utils.AUBURN_ENERGY_CONSUMPTION * _m[i]);\n\t\t\t\t\tif (_infectedGeneticCode != null && _nChildren == 1) {\n\t\t\t\t\t\t_nChildren = 2;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Organisms with blond segments reproduce earlier\n\t\t\t\tcase BLOND:\n\t\t\t\t\treproduceearly += 3 + _m[i];\n\t\t\t\t\tbreak;\n\t\t\t\t// Organisms with indigo segments reduce the energy the new born virus receives\n\t\t\t\tcase INDIGO:\n\t\t\t\t\t_indigo += _m[i];\n\t\t\t\t\t_lowmaintenance += 0.8 * _m[i];\n\t\t\t\t\tbreak;\n\t\t\t\t// Plague forces an organism to reproduce the virus\n\t\t\t\tcase PLAGUE:\n\t\t\t\t\t_isplague =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// Coral transforms particles and viruses\n\t\t\t\tcase CORAL:\n\t\t\t\t\t_iscoral =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// Mint immunity against infections\t\n\t\t\t\tcase MINT:\n\t\t\t\t\t_isantiviral =true;\n\t\t\t\t\tif (_infectedGeneticCode != null && Utils.random.nextInt(Utils.IMMUNE_SYSTEM)<=_m[i] && useEnergy(Utils.MINT_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t_infectedGeneticCode = null;\n\t\t\t\t\t\tsetColor(Utils.ColorMINT);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Healing\n\t\t\t\tcase MAGENTA:\n\t\t\t\t _isregenerative =true;\n\t\t\t\t for (int j = 0; j < _segments; j++) {\n\t\t\t\t if ((_segColor[j] == Utils.ColorLIGHTBROWN) || (_segColor[j] == Utils.ColorGREENBROWN) || (_segColor[j] == Utils.ColorPOISONEDJADE)\n\t\t\t\t\t\t|| (_segColor[j] == Utils.ColorBROKEN) || (_segColor[j] == Utils.ColorLIGHT_BLUE) || (_segColor[j] == Utils.ColorICE)\n\t\t\t\t\t\t|| (_segColor[j] == Utils.ColorDARKJADE) || (_segColor[j] == Utils.ColorDARKFIRE)) {\n\t\t\t\t\tif (Utils.random.nextInt(Utils.HEALING)<=_m[i] && useEnergy(Utils.MAGENTA_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t _segColor[j] = _geneticCode.getGene(j%_geneticCode.getNGenes()).getColor(); \n\t\t\t\t\t}}}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DARKFIRE:\n\t\t\t\t\tif (Utils.random.nextInt(100)<_geneticCode.getSymmetry() && useEnergy(Utils.MAGENTA_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t_segColor[i] = _geneticCode.getGene(i%_geneticCode.getNGenes()).getColor(); \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DARKJADE:\n\t\t\t\t\t_isjade =true;\n\t\t\t\t\tif (Utils.random.nextInt(Utils.DARKJADE_DELAY * _geneticCode.getSymmetry() * _geneticCode.getSymmetry())<8) {\n\t\t\t\t\t\t_segColor[i] = Utils.ColorJADE; \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Normalize spike\n\t\t\t\tcase SPIKEPOINT:\n\t\t\t\t\t_segColor[i] = Utils.ColorSPIKE;\n\t\t\t\t\tbreak;\n\t\t\t\t// is a killer\n\t\t\t\tcase SPIKE:\n\t\t\t\t\tif (_isenhanced) {\n\t\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\t}\n\t\t\t\t\tif (_isakiller == 0) {\n\t\t\t\t\t\t_isakiller = 1;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LILAC:\n\t\t\t\t\tif (_isakiller == 0) {\n\t\t\t\t\t\t_isakiller = 1;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase GRAY:\n\t\t\t\t\tif (_isakiller < 2) {\n\t\t\t\t\t _isakiller = 2;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// is poisonous\n\t\t\t\tcase VIOLET:\n\t\t\t\t\t_ispoisonous =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// is a freezer\n\t\t\t\tcase SKY:\n\t\t\t\t\t_isafreezer =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// is enhanced\n\t\t\t\tcase DARKGRAY:\n\t\t\t\t\t_isenhanced =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// Energy transfer\n\t\t\t\tcase ROSE:\n\t\t\t\t\t_lowmaintenance += 0.99 * _m[i];\n\t\t\t\t\tif (_transfersenergy == false) {\n\t\t\t\t\t\t_transfersenergy =true;\n\t\t\t\t\t _lengthfriend = _geneticCode.getGene(i%_geneticCode.getNGenes()).getLength();\n\t\t\t\t\t _thetafriend = _geneticCode.getGene(i%_geneticCode.getNGenes()).getTheta();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Low maintenance\n\t\t\t\tcase DARK:\n\t\t\t\t\t_lowmaintenance += 0.99 * _m[i];\n\t\t\t\t\tbreak;\n\t\t\t\t// Organisms with gold segments live longer\n\t\t\t\tcase GOLD:\n\t\t\t\t\t_lowmaintenance += 0.9 * _m[i];\n\t\t\t\t\tgoldenage += (_m[i]/Utils.GOLD_DIVISOR);\n\t\t\t\t\t_geneticCode._max_age = Utils.MAX_AGE + ((_geneticCode.getNGenes() * _geneticCode.getSymmetry())/Utils.AGE_DIVISOR) + (int)goldenage;\n\t\t\t\t\tbreak;\n\t\t\t\t// is weakened\n\t\t\t\tcase LIGHTBROWN:\n\t\t\t\tcase GREENBROWN:\n\t\t\t\tcase POISONEDJADE:\n\t\t\t\t\tif (_remember) {\n\t\t\t\t\t\t_isjade =false;\n\t\t\t\t\t\t_isenhanced =false;\n\t\t\t\t\t\t_isantiviral =false;\n\t\t\t\t\t\t_isregenerative =false;\n\t\t\t\t\t\tfor (int c = 0; c < _segments; c++) {\n\t\t\t\t\t\t\tswitch (getTypeColor(_segColor[c])) {\n\t\t\t\t\t\t\tcase JADE:\n\t\t\t\t\t\t\t\t_isjade =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase DARKJADE:\n\t\t\t\t\t\t\t\t_isjade =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase DARKGRAY:\n\t\t\t\t\t\t\t\t_isenhanced =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase MINT:\n\t\t\t\t\t\t\t\t_isantiviral =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase MAGENTA:\n\t\t\t\t\t\t\t\t_isregenerative =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t _geneticCode._max_age = Utils.MAX_AGE + ((_geneticCode.getNGenes() * _geneticCode.getSymmetry())/Utils.AGE_DIVISOR) + (int)goldenage;\n\t\t\t\t\t _remember =false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIGHT_BLUE:\n\t\t\t\t\tif (_isafreezer) {\n\t\t\t\t\t\t_isafreezer =false;\n\t\t\t\t\t\tfor (int c = 0; c < _segments; c++) {\n\t\t\t\t\t\t\tswitch (getTypeColor(_segColor[c])) {\n\t\t\t\t\t\t\tcase SKY:\n\t\t\t\t\t\t\t\t_isafreezer =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase DEEPSKY:\n\t\t\t\t\t\t\t\t_isafreezer =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// is frozen\n\t\t\t\tcase ICE:\n\t\t\t\t\t_isfrozen =true;\n\t\t\t\t\tif (_isjade) {\n\t\t\t\t\t\t_isjade =false;\n\t\t\t\t\t\tfor (int c = 0; c < _segments; c++) {\n\t\t\t\t\t\t\tswitch (getTypeColor(_segColor[c])) {\n\t\t\t\t\t\t\tcase JADE:\n\t\t\t\t\t\t\t\t_isjade =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase DARKJADE:\n\t\t\t\t\t\t\t\t_isjade =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DEADBARK:\n\t\t\t\t\t_isfrozen =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// Restore abilities\n\t\t\t\tcase DARKLILAC:\n\t\t\t\t\tif (_isakiller == 0) {\n\t\t\t\t\t\t_isakiller = 1;\n\t\t\t\t\t}\n\t\t\t\t\tif (Utils.random.nextInt(100)<8) {\n\t\t\t\t\t\t_segColor[i] = Utils.ColorLILAC;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DEEPSKY:\n\t\t\t\t\t_isafreezer =true;\n\t\t\t\t\tif (Utils.random.nextInt(100)<8) {\n\t\t\t\t\t\t_segColor[i] = Utils.ColorSKY;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DARKOLIVE:\n\t\t\t\t\tif (Utils.random.nextInt(100)<8 && useEnergy(Utils.OLIVE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t_segColor[i] = Utils.ColorOLIVE;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Reset dodging\n\t\t\tif (_hasdodged == true) {\n\t\t\t\t_dodge =false;\n\t\t\t\t_hasdodged =false;\n\t\t\t}\n\t\t\t//Get sun's energy\n\t\t\tif (photosynthesis > 0) {\n\t\t\t\t_isaplant =true;\n\t\t\t _energy += _world.photosynthesis(photosynthesis);\t\t\t\n\t\t\t}\n\t\t\t// Calculate number of children\n\t\t\tif (fertility > 0) {\n\t\t\t\tif (_geneticCode.getSymmetry() != 3) {\n\t\t\t\t _nChildren += (yellowCounter / _geneticCode.getSymmetry()) + (fertility / 23);\n\t\t\t } else {\n\t\t\t \t_nChildren += (yellowCounter / _geneticCode.getSymmetry()) + (fertility / 34);\n\t\t\t }\n\t\t\t}\n\t\t\t// Calculate reproduction energy for blond segments\n\t\t\tif ((reproduceearly > 0) && (_infectedGeneticCode == null)) {\n\t\t\t\tif (_energy > _geneticCode.getReproduceEnergy() - reproduceearly + Utils.YELLOW_ENERGY_CONSUMPTION*(_nChildren-1)) {\n\t\t\t\t\tif ((!_isaplant) && (!_isaconsumer)) {\n\t\t\t\t\t\tif ((_energy >= 10) && (_growthRatio<16) && (useEnergy(Utils.BLOND_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\t_nChildren = 1;\n\t\t\t\t\t _geneticCode._reproduceEnergy = Math.max((40 + 3 * _geneticCode.getNGenes() * _geneticCode.getSymmetry()) - reproduceearly, 10);\n\t\t\t\t\t reproduce();\n\t\t\t\t\t _geneticCode._reproduceEnergy = 40 + 3 * _geneticCode.getNGenes() * _geneticCode.getSymmetry();\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((_energy >= 30) && (_growthRatio==1) && (_timeToReproduce==0) && (useEnergy(Utils.BLOND_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t _geneticCode._reproduceEnergy = Math.max((40 + 3 * _geneticCode.getNGenes() * _geneticCode.getSymmetry()) - reproduceearly, 30);\n\t\t\t\t\t\t reproduce();\n\t\t\t\t\t\t _geneticCode._reproduceEnergy = 40 + 3 * _geneticCode.getNGenes() * _geneticCode.getSymmetry();\t\t\t\t\t\t\t\n\t\t\t\t\t\t} \n\t\t\t\t\t}\n\t\t\t }\n\t\t\t}\n\t\t}\n\t}", "public void act() {\n\n\tif (0 == stepCount) {\n\n\t ArrayList<Location> node = new ArrayList<Location>();\n\t node.add(getLocation());\n\t crossLocation.push(node);\n\t}\n\n\tboolean willMove = canMove();\n\tif (isEnd == true) {\n\t //to show step count when reach the goal\t\t\n\t if (hasShown == false) {\n\t\tString msg = stepCount.toString() + \" steps\";\n\t\tJOptionPane.showMessageDialog(null, msg);\n\t\thasShown = true;\n\t }\n\t} else if (willMove) {\n\t\n\t move();\n\t //increase step count when move \n\t stepCount++;\n\t} else {\n\t \n\t back();\n\t stepCount++;\n\t}\n\n }", "public static void main(String[] args) {\n\t\t\n\t\tChild1 ch = new Child1();\n\t\t\n\t\tSystem.out.println(Inheritance.race); // static oldugundan kendi class adiyla cagirdik.\n\t\t\n\t\tSystem.out.println(ch.eyeColor);\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\tch.sing(); // parenttan geldi. inheritance class yani\n\t\tch.code(); // child1 den geldi. \n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"parent:\\n\");\n\t\t\n\t\tInheritance parent = new Inheritance();\n\t\t\t\n\t\tSystem.out.println(parent.hairColor);\t\n\t\t\n\t\tSystem.out.println(parent.eyeColor);\n\t\t\n\t\tSystem.out.println(Inheritance.race); \n\n\t\tSystem.out.println();\n\t\t\n\t\tparent.sing();\n//\t\tparent.code(); // cocugun behaviorlarini method kullanamaz\n\t\t\n}", "public static void main(String[] args) {\n\t\tint graph_len = 10;\n\t\tDiGraph g = new DiGraph(graph_len);\n\t\tint[][] edges = {\n\t\t{1,2},\n\t\t{2,3},{2,5},\n\t\t{3,1},\n\t\t{4,5}\n\t\t};\n\t\tadd_edges(g,edges);\n\t\t\n\t\t//DfsPaths ps = new DfsPaths(g,1);\n\t\tKosarajuSharir kshr = new KosarajuSharir(g);\n\t\tdisplay_id(kshr.id_arr());\n\t\tprint_cc(kshr.id_arr());\n\t}", "@Override\r\n public void runSimulation(){\r\n initialize();\r\n initialRun();\r\n initialize(\"square\");\r\n initialRun();\r\n initialize(\"circle\");\r\n initialRun();\r\n initialize(\"crack\");\r\n initialRun(); \r\n initialize(\"cross\");\r\n initialRun();\r\n }", "public boolean inherit(Organism parent, boolean first) {\n\t\tGeneticCode inheritGeneticCode;\n\t\tboolean ok = true;\n\t\t\n\t\t// Create the inherited genetic code\n\t\tif (parent._infectedGeneticCode != null) {\n\t\t\tinheritGeneticCode = parent._infectedGeneticCode;\n\t\t // Add 1 to the generation number\n\t\t _generation = parent.getInfectedGeneration() + 1;\n\t\t} else {\n\t\t\tinheritGeneticCode = parent._geneticCode;\n\t\t // Add 1 to the generation number\n\t\t\t_generation = parent.getGeneration() + 1;\n\t\t}\n\t\t_geneticCode = new GeneticCode(inheritGeneticCode);\n\t\t// Take a reference to the parent\n\t\t_parentID = parent.getID();\n\t\t_growthRatio = 16;\n\t\t// Initial energy: minimum energy required to reproduce is divided\n\t\t// between all children and the parent.\n\t\tif ((parent._geneticCode.getSelfish()) && (parent._infectedGeneticCode == null)) {\n\t\t _energy = Math.min(((inheritGeneticCode._reproduceEnergy / 2) / (double)parent._nChildren), parent._energy);\n\t\t} else if ((parent._indigo > 0) && (parent._infectedGeneticCode != null)) {\n\t\t\tif (parent._geneticCode.getSymmetry() != 3) {\n\t\t\tif ((parent._isjade) && (!parent._isaconsumer) && (inheritGeneticCode._reproduceEnergy > parent._geneticCode._reproduceEnergy)) {\n\t\t\t_energy = Math.min(((parent._geneticCode._reproduceEnergy / ((parent._indigo/(Utils.INDIGO_DIVISOR)) + 1)) / (double)(parent._nChildren + 1)), parent._energy);\n\t\t\t} else {\n\t\t\t_energy = Math.min(((inheritGeneticCode._reproduceEnergy / ((parent._indigo/(Utils.INDIGO_DIVISOR)) + 1)) / (double)(parent._nChildren + 1)), parent._energy);\n\t\t\t}\n\t\t\t} else {\n\t\t\tif ((parent._isjade) && (!parent._isaconsumer) && (inheritGeneticCode._reproduceEnergy > parent._geneticCode._reproduceEnergy)) {\n\t\t\t_energy = Math.min(((parent._geneticCode._reproduceEnergy / ((parent._indigo/(1.5*Utils.INDIGO_DIVISOR)) + 1)) / (double)(parent._nChildren + 1)), parent._energy);\n\t\t\t} else {\n\t\t\t_energy = Math.min(((inheritGeneticCode._reproduceEnergy / ((parent._indigo/(1.5*Utils.INDIGO_DIVISOR)) + 1)) / (double)(parent._nChildren + 1)), parent._energy);\n\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif ((parent._isjade) && (!parent._isaconsumer) && (inheritGeneticCode._reproduceEnergy > parent._geneticCode._reproduceEnergy)) {\n\t\t\t_energy = Math.min((parent._geneticCode._reproduceEnergy / (double)(parent._nChildren + 1)), parent._energy);\n\t\t\t} else {\n\t\t _energy = Math.min((inheritGeneticCode._reproduceEnergy / (double)(parent._nChildren + 1)), parent._energy);\n\t\t\t}\n\t\t}\n\t\tif (first || parent._energy >= _energy+Utils.YELLOW_ENERGY_CONSUMPTION) {\n\t\t\t// Initialize\n\t\t\tcreate();\n\t\t\tsymmetric();\n\t\t\t// Put it in the world, near its parent\n\t\t\tok = placeNear(parent);\n\t\t\tif (ok && !first)\n\t\t\t\tparent.useEnergy(Utils.YELLOW_ENERGY_CONSUMPTION);\n\t\t} else\n\t\t\tok = false;\n\t\t\n\t\treturn ok;\n\t}", "public void buildDome() {\n if (this.getLevel() == 3) {\n buildInCell();\n } else {\n this.dome = true;\n this.setFreeSpace(false);\n }\n }", "public static void main(String[] args) {\n\t\tint[][] edges = {{0,1},{1,2},{1,3},{4,5}};\n\t\tGraph graph = createAdjacencyList(edges, true);\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) unDirected : \"+getNumberOfConnectedComponents(graph));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) Directed: \"+getNumberOfConnectedComponents(createAdjacencyList(edges, false)));\n\t\t\n\t\t//Shortest Distance & path\n\t\tint[][] edgesW = {{0,1,1},{1,2,4},{2,3,1},{0,3,3},{0,4,1},{4,3,1}};\n\t\tgraph = createAdjacencyList(edgesW, true);\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(graph, 0, 3));\n\t\t\n\t\t//Graph represented in Adjacency Matrix\n\t\tint[][] adjacencyMatrix = {{0,1,0,0,1,0},{1,0,1,1,0,0},{0,1,0,1,0,0},{0,1,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}};\n\t\t\n\t\t// Connected components or Friends circle\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Recursive: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Iterative: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(adjacencyMatrix, 0, 3));\n\t\t\n\t\t// Number of Islands\n\t\tint[][] islandGrid = {{1,1,0,1},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Recursive: \"+ getNumberOfIslands(islandGrid));\n\t\t// re-initialize\n\t\tint[][] islandGridIterative = {{1,1,0,0},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Iterative: \"+ getNumberOfIslandsIterative(islandGridIterative));\n\n\n\t}", "public void moveForward (double distance) {\r\n\t\t\r\n\t\t//if the tail is lowered it leaves a dashed line\r\n\t\tif (tail_mode) {\r\n\t\t\t\r\n\t\t\t//skips (tail up and down) of distances of 10\r\n\t\t\tfor (int i=0; i<distance; i=i+20) {\r\n\t\t\t\tsuper.moveForward(10);\r\n\t\t\t\ttailUp();\r\n\t\t\t\tsuper.moveForward(10);\r\n\t\t\t\ttailDown();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t//if the tail is up he move forward without leaving trails\r\n\t\t} else {\r\n\t\t\tsuper.moveForward(distance);\r\n\t\t}\r\n\t}", "public static void main(String args[]){\n\n Scanner sc= new Scanner(System.in);\n int v=sc.nextInt();\n int e=sc.nextInt();\n int matrix[][] =new int[v][v];\n\n for(int i=0;i<e;i++){\n int v1=sc.nextInt();\n int v2=sc.nextInt();\n\n matrix[v1][v2]=1;\n matrix[v2][v1]=1;\n \n }\n\n dfsComponents(matrix);\n }", "public void Main(){\n\t\t\n\t\tfillSFG();\n\t\tboolean[] visited = new boolean[AdjMatrix.length];\n\t\tLinkedList<Integer> pathdump = new LinkedList<Integer>();\n\t\textractForwardPaths(startNode, endNode, startNode, visited, pathdump);\n\t\textractLoops();\n\t\tgetForwardGains();\n\t\tgetLoopGains();\n\t\tprintForwardPaths();\n\t\tSystem.out.println(\"----------------------------------------------\");\n\t\tprintLoops();\n\t\t\n\t\t\n\t\tcalculateDeltas();\n\t\tcalculateTotalGain();\n\t\tprintDeltasAndTotalGain();\n\t\t\n\t\tfor (int i = 1; i < nonTouching.length; i++) {\n\t\t\tSystem.out.println(\"Level = \"+i);\n\t\t\tfor (int j = 0; j < nonTouching[i].size(); j++) {\n\t\t\t\tLinkedList<Integer> dump = new LinkedList<Integer>();\n\t\t\t\tdump = nonTouching[i].get(j);\n\t\t\t\tfor (int k = 0; k < dump.size(); k++) {\n\t\t\t\t\tSystem.out.print(dump.get(k)+\" \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\tSystem.out.println(\"************************************************\");\n\t\t}\n\t\t\n\t\tProgramWindow.getInstance().showResults(forwardPaths,forwardGains,loops,loopGains,deltas,TotalGain,nonTouching);\n\t}", "ConjuntoTDA claves();", "public static void main(String[] args) {\n Parents child = new Childs(100);\n }", "public void act() \r\n {\r\n move(5);\r\n if(isAtEdge())\r\n turn(4);\r\n if(Greenfoot.getRandomNumber(35) < 34)\r\n turn(10);\r\n if(Greenfoot.getRandomNumber(20)<5)\r\n turn(-15);\r\n }", "protected void execute() {\n \tif (!initialized) {\n \tRobot.claw.resetClawPosition();\n \tRobot.claw.setClawTargetDegrees(0);\n \tclawOffset = -armDegrees;\n \tinitialized = true;\n \t}\n \t\n \t//Adjust the angle of the claw when the dpad is held\n \tif (Robot.oi.getGamepad2().getPOV() == 90) {\n \t\tif (Robot.oi.getGamepad2().getRawButton(8)) {\n \t\t\tRobot.claw.setClawTargetDegrees(Robot.claw.getClawTargetDegrees() + 1);\n \t\t} else {\n \t\t\tRobot.claw.setClawTargetDegrees(Robot.claw.getClawTargetDegrees() + 0.3);\n \t\t}\n \t} else if (Robot.oi.getGamepad2().getPOV() == 270) {\n \t\tif (Robot.oi.getGamepad2().getRawButton(8)) {\n \t\t\tRobot.claw.setClawTargetDegrees(Robot.claw.getClawTargetDegrees() - 1);\n \t\t} else {\n \t\t\tRobot.claw.setClawTargetDegrees(Robot.claw.getClawTargetDegrees() - 0.3);\n \t\t}\n \t}\n \t\n \tarmDegrees = Robot.arm.getArmDegrees();\n \tgoalClawDegrees = armDegrees + Robot.claw.getClawTargetDegrees() + clawOffset;\n \tgoalClawPosition = (goalClawDegrees * Robot.clawTicsPerDegree());\n \tRobot.claw.setClaw(goalClawPosition);\n \t\n \tSystem.out.println(\"goalClawDegrees = \" + goalClawDegrees + \" tics per degree = \" + Robot.clawTicsPerDegree());\n \tSystem.out.println(\"armDegrees = \" + armDegrees + \" Claw target = \" + Robot.claw.getClawTargetDegrees());\n }", "@Override\n public EnvironmentState execute(AgentState ast, EnvironmentState est) {\n EstadoAmbiente environmentState = (EstadoAmbiente) est;\n EstadoDrone agState = ((EstadoDrone) ast);\n\n if(agState.getposicion()[0]==2){\n \tagState.irNivelMedio();\n \tenvironmentState.irNivelMedio();\n \tArrayList<Esquina> listaEsquinas;\n \tArrayList<Subcuadrante> listaSubcuadrantes;\n \tint[][] antena=agState.getintensidadSenial();\n \tint idCuadrante=agState.getposicion()[1];\n \tint idSubcuadrante=agState.getposicion()[2];\n \t\tfor(int i=0;i<4;i++){\n \t\t\tif(i!=(idCuadrante-1)){\n\t\t\t\t\tlistaSubcuadrantes=agState.getlistaCuadrantesEnDrone().get(i).getlistaSubcuadrantes();\n \t\t\t\tfor(int j=0;j<4;j++){\t\n\t\t\t\t\t\tlistaEsquinas= listaSubcuadrantes.get(j).getlistaEsquinas();\n\t \t\t\t\tfor(Esquina esq : listaEsquinas){\n\t \t\t\t\t\tagState.getlistaEsquinasIdentificadas()[esq.getidEsquina()]=1;\n\t \t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\n \t\tint subcuadranteMayorSenial=3;\n \t\tagState.setSubcuadranteMayor(subcuadranteMayorSenial);\n \t//Busco cuál es el subcuadrante que mayor señal tiene\n \t\t\n \t\t\n\t\t\t//Seteo como visitadas las esquinas de todos los subcuadrantes que no sean el que mayor señal tiene\n \t\tfor(int i=0;i<4;i++){\n \t\t\tif(i!=subcuadranteMayorSenial-1){\n \t\t\t\tlistaEsquinas= agState.getlistaCuadrantesEnDrone().get(idCuadrante-1).getlistaSubcuadrantes().get(i).getlistaEsquinas();\n \t\t\t\tfor(Esquina esq : listaEsquinas){\n \t\t\t\t\tagState.getlistaEsquinasIdentificadas()[esq.getidEsquina()]=1;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t//Seteo como NO visitadas las esquinas del subcuadrante que mayor señal tiene\n \t\tlistaEsquinas= agState.getlistaCuadrantesEnDrone().get(idCuadrante-1).getlistaSubcuadrantes().get(subcuadranteMayorSenial-1).getlistaEsquinas();\n\t\t\tfor(Esquina esq : listaEsquinas){\n\t\t\t\tagState.getlistaEsquinasIdentificadas()[esq.getidEsquina()]=0;\n\t\t\t}\n \treturn environmentState;\n }\n if(agState.getposicion()[0]==0){\n \tint idCuadrante=agState.getposicion()[1];\n \tint idSubcuadrante=agState.getposicion()[2];\n \tint[] esqIdentificadas = agState.getlistaEsquinasIdentificadas(); \n \t\n \t\tArrayList<Esquina> esquinas = agState.getlistaCuadrantesEnDrone().get(idCuadrante-1).getlistaSubcuadrantes().get(idSubcuadrante-1).getlistaEsquinas();\n \t\tfor(Esquina esquina : esquinas){\n \t\t\tif(esqIdentificadas[esquina.getidEsquina()]==0) return null;\n \t\t}\n \tagState.irNivelMedio();\n \tenvironmentState.irNivelMedio();\n \treturn environmentState;\n }\n return null;\n }", "public static void main(String[] args) {\n\n // create random DAG with V vertices and E aristas; then add F random aristas\n int V = Integer.parseInt(args[0]);\n int A = Integer.parseInt(args[1]);\n int F = Integer.parseInt(args[2]);\n DigrafoAristaPonderada G = new DigrafoAristaPonderada(V);\n int[] vertices = new int[V];\n for (int i = 0; i < V; i++)\n vertices[i] = i;\n StdRandom.shuffle(vertices);\n for (int i = 0; i < A; i++) {\n int v, w;\n do {\n v = StdRandom.uniform(V);\n w = StdRandom.uniform(V);\n } while (v >= w);\n double peso = StdRandom.uniform();\n G.agregarArista(new AristaDirigida(v, w, peso));\n }\n\n // add F extra aristas\n for (int i = 0; i < F; i++) {\n int v = StdRandom.uniform(V);\n int w = StdRandom.uniform(V);\n double peso = StdRandom.uniform(0.0, 1.0);\n G.agregarArista(new AristaDirigida(v, w, peso));\n }\n\n StdOut.println(G);\n\n // find a directed ciclo\n AristaPonderadaDeCicloDirigido descubridor = \n new AristaPonderadaDeCicloDirigido(G);\n if (descubridor.tieneCiclo()) {\n StdOut.print(\"Ciclo: \");\n for (AristaDirigida a : descubridor.ciclo()) {\n StdOut.print(a + \" \");\n }\n StdOut.println();\n }\n\n // or give topologial sort\n else {\n StdOut.println(\"No existen ciclos dirigidos\");\n }\n }", "public static void main(String[] args){\n\t\tMover mover = new Mover();\n\t\tmover.derecha(500, 600);\n\t\t/** Sensor de distancia */\n\t\tUltrasonicSensor distancia = new UltrasonicSensor(SensorPort.S3);\n\t\t/** Sensor de luz de la izquierda */\n\t\tLightSensor sensor1 = new LightSensor(SensorPort.S1);\t\t\t\n\t\t/** Sensor de luz de la derecha */\n\t\tLightSensor sensor2 = new LightSensor(SensorPort.S2);\t\t\t\t\n\t\t\n\t\twhile (true){\n\t\t\t/** Si se detecta blanco en el sensor de la izquierda, el santo gira */\n\t\t\tif (blanco(sensor1.getLightValue())){\n\t\t\t\tmover.derecha(250,300);\n\t\t\t}\n\t\t\t/** Si se detecta blanco en el sensor de la derecha, el santo gira */\n\t\t\telse if(blanco(sensor2.getLightValue())){\n\t\t\t\tmover.izquierda(250,300);\n\t\t\t}\n\t\t\t/** Si el santo detecta a su enemigo, lo ataca */\n\t\t\telse if (enemigo(distancia.getDistance())){\n\t\t\t\tmover.adelante(1000);\n\t\t\t\t/*\n\t\t\t\tif (!enemigo(distancia.getDistance())){\n\t\t\t\t\tmover.atras();\n\t\t\t\t\tDelay.msDelay(1000);\n\t\t\t\t}\n\t\t\t\tif (blanco(sensor1.getLightValue()) || blanco(sensor2.getLightValue())){\n\t\t\t\t\tmover.atras();\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t}\n\t\t\t/** Si el santo no encuentra ningun enemigo, lo busca */\n\t\t\telse{\n\t\t\t\tmover.derecha(250,90);\n\t\t\t\t//mover.izquierda(250, 90);\n\t\t\t\tif (enemigo(distancia.getDistance())){\n\t\t\t\t\tmover.adelante(1000);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void run() {\n while (Step < 4) {\n switch (Step) {\n case 0:\n paso0();\n break;\n case 1:\n paso1();\n break;\n case 2:\n paso2();\n break;\n case 3:\n paso3();\n break;\n default:\n graph.NodoObjetivo = miObjetivo;\n graph.paintGrafo();\n }\n // retardo de un segundo\n graph.sleep();\n }\n graph.NodoObjetivo = miObjetivo;\n graph.paintGrafo();\n }", "public static void main(String[] args) {\n\t\t\n\t\tPerson parent = new Person (\"Ramzia\", \"Hasanchina\", \"Ж\", 1963, 1);\n\t\tSystem.out.println(parent);\n\t\tSystem.out.println(\"Vvedite god\");\n\t\tScanner sc = new Scanner(System.in);\n\t\tint year = sc.nextInt();\n\t\tif(parent.age_verification(year))\n\t\t{\n\t\t\tSystem.out.println(\"Vvedite familiu\");\n\t\t\tScanner sc1 = new Scanner(System.in);\n\t\t\tString sname=sc1.nextLine();\n\t\t\tparent.change_sname(sname);\n\t\t\tsc.close();\n\t\t\tsc1.close();\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Не достиг совешеннолетия!\");\n\t\tSystem.out.println(parent);\n\t\tPerson child = parent.create_child(\"Zarina\", \"Ж\", 1994);\n\t\tSystem.out.println(child);\n\t\tSystem.out.println(parent);\n\t\tPerson parent1 = new Person (\"Albina\", \"Hamidullina\", \"Ж\", 1965, parent.getNumber_of_children());\n\t\tSystem.out.println(parent1);\n\t\tparent.setNumber_of_children(0);\n\t\tSystem.out.println(parent);\n\t}", "private static void cajas() {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tint nDisks=3;\r\n\t\tString steps=hanoi(nDisks,1,3);\r\n\t\t\r\n\t\tfor(String step:steps.split(\";\")){\r\n\t\t\tSystem.out.println(step);\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n Father father=new Kid();\n father.show();\n }", "private void buildNetDiagnosis(int nofSteps) {\n\t\tint i = nofSteps;\n\n\t\twhile (i > 0 && woflanNet != 0) { // Do something as long as soundness\n\t\t\t// is unknown.\n\t\t\ti--;\n\t\t\tif (isSound != 0 && woflanNet != 0) {\n\t\t\t\tnextButton.setVisible(false);\n\t\t\t\tfinishButton.setVisible(false);\n\t\t\t\twoflan.Close(woflanNet);\n\t\t\t\twoflanNet = 0;\n\t\t\t} else if (isWFNet == 0) { // Unknown whether WF-net.\n\t\t\t\troot.add(netDiagnosis);\n\t\t\t\t// Check whether WF-net.\n\t\t\t\tbuildWFNetDiagnosis();\n\t\t\t} else if (isWFNet == 1 && isSound == 0) {\n\t\t\t\t// No WF-net, hence soundness not defined (for sake of\n\t\t\t\t// simplicity say it is not sound).\n\t\t\t\tisSound = 1;\n\t\t\t\ti++;\n\t\t\t} else if (isWFNet == 2 && isSCoverable == 0) { // WF-net, unknown\n\t\t\t\t// whether\n\t\t\t\t// S-Coverable.\n\t\t\t\t// Check whether S-coverable\n\t\t\t\tbuildSCoverableDiagnosis();\n\t\t\t} else if (isSCoverable == 1 && isPICoverable == 0) { // No S-Cover,\n\t\t\t\t// check\n\t\t\t\t// whether\n\t\t\t\t// PI-cover\n\t\t\t\t// Check whether BPI-coverable\n\t\t\t\tbuildPIDiagnosis();\n\t\t\t} else if (isPICoverable == 1 && isBounded == 0) { // Check\n\t\t\t\t// boundedness\n\t\t\t\t// Check whether bounded\n\t\t\t\tbuildBoundedDiagnosis();\n\t\t\t} else if ((isSCoverable == 2 || isPICoverable == 2)\n\t\t\t\t\t&& isBounded == 0) {\n\t\t\t\tisBounded = 2;\n\t\t\t\ti++;\n\t\t\t} else if (isBounded == 2 && isNonDead == 0) { // Bounded: check\n\t\t\t\t// whether dead\n\t\t\t\t// transitions exist\n\t\t\t\t// Check whether 0-live\n\t\t\t\tbuildNonDeadDiagnosis();\n\t\t\t} else if (isBounded == 2 && isNonDead == 2 && isLive == 0) { // Bounded,\n\t\t\t\t// no\n\t\t\t\t// dead\n\t\t\t\t// transitions:\n\t\t\t\t// check\n\t\t\t\t// liveness\n\t\t\t\t// Check whether live\n\t\t\t\tbuildLiveDiagnosis();\n\t\t\t} else if (isLive == 2 && isSound == 0) {\n\t\t\t\tisSound = 2;\n\t\t\t\ti++;\n\t\t\t} else {\n\t\t\t\tisSound = 1;\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t}", "public static void ITdistances()\n\t{\n\t\t//System.err.println(\"Position\");\n\n\t\tclade = clad[k];\n\n\t\tclade.tipDistance = 0;\n\t\tclade.intDistance = 0;\n\t\tclade.tipDisNested = 0;\n\t\tclade.intDisNested = 0;\n\t\tclade.indTipClades = 0;\n\t\tclade.indIntClades = 0;\n\n\n\t\tif(clade.check != (double) clade.numSubClades && clade.check != 0)\n\t\t{ \n\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t{\n\t\t\t\tif (clade.Position[i] == tip)\n\t\t\t\t\tclade.indTipClades += clade.rowTotal[i];\n\t\t\t\telse\n\t\t\t\t\tclade.indIntClades += clade.rowTotal[i];\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t{\n\t\t\t\t// weigthing within class\n\t\t\t\tclade.tipDistance += clade.Position[i] * clade.Dc[i] * (double) clade.rowTotal[i] / (double) clade.indTipClades;\n\t\t\t\tclade.tipDisNested += clade.Position[i] * clade.Dn[i] * (double) clade.rowTotal[i] / (double) clade.indTipClades;\n\t\t\t\tclade.intDistance += (1 - clade.Position[i]) * clade.Dc[i] * (double) clade.rowTotal[i] / (double) clade.indIntClades;\n\t\t\t\tclade.intDisNested += (1 - clade.Position[i]) * clade.Dn[i] * (double) clade.rowTotal[i] / (double) clade.indIntClades;\t\n\t\t\t\t\n\t\t\t\t// unweighted\n\t\t\t\t//clade.tipDistance += clade.Position[i] * clade.Dc[i] / (double) clade.check;\n\t\t\t\t//clade.tipDisNested += clade.Position[i] * clade.Dn[i] / (double) clade.check;\n\t\t\t\t//clade.intDistance += (1 - clade.Position[i]) * clade.Dc[i] / (double) (clade.numSubClades - clade.check);\n\t\t\t\t//clade.intDisNested += (1 - clade.Position[i]) * clade.Dn[i] / (double) (clade.numSubClades - clade.check);\t\n\t\t\t}\n\n\t\t clade.tipIntDistance = clade.intDistance - clade.tipDistance;\n\t\t clade.tipIntDisNested = clade.intDisNested - clade.tipDisNested;\n\t\t if(verbose){\n\t\t\tlogfile.println(\"\\nIT \" + clade.cladeName + \" indTipClades = \" + clade.indTipClades\n\t\t\t\t+ \" indIntClades + \" + clade.indIntClades);\n\t\t\tlogfile.println(\"\\nITc \" + clade.cladeName + \" meanInt = \" + clade.intDistance\n\t\t\t\t+ \" meanTip = \" + clade.tipDistance);\n\t\t\tlogfile.println(\"ITn \" + clade.cladeName + \" meanInt = \" + clade.intDisNested\n\t\t\t\t+ \" meanTip = \" + clade.tipDisNested);\n\t\t }\n\t\t}\n\n\t\t//System.err.println(\"IT clade \" + clade.cladeName + \" meanInt = \" + clade.intDistance + \" meanTip = \" + clade.tipDistance);\n\n\t}", "public void creation(){\n\t for(int i=0; i<N;i++) {\r\n\t\t for(int j=0; j<N;j++) {\r\n\t\t\t tab[i][j]=0;\r\n\t\t }\r\n\t }\r\n\t resDiagonale(); \r\n \r\n\t //On remplit le reste \r\n\t conclusionRes(0, nCarre); \r\n \t\t\r\n\t \r\n\t isDone=true;\r\n }", "public Program(Circuit c, Node tree) {\n\t\tthis.circuit = c;\n\t\tthis.tree = tree;\n\t}", "@Override\n\t\t\tpublic void execute() {\n\t\t\t\tSystem.out.println(fib1(n));\n\t\t\t}", "ActorRef startHCD() {\n Component.HcdInfo testInfo = JComponent.hcdInfo(\n TromboneHCD.componentName,\n TromboneHCD.trombonePrefix,\n TromboneHCD.componentClassName,\n DoNotRegister, Collections.singleton(AkkaType), FiniteDuration.apply(1, TimeUnit.SECONDS)\n );\n\n return Supervisor.apply(testInfo);\n }", "protected void execute() {\n\t\t// Get output from PID and dvide by 4\n\t\tdouble output = Robot.minipidSubsystem.getOutput(Robot.gyroSubsystem.GyroPosition(), 90) * 0.25;\n\n\t\t// limit output to 25% in either direction\n\t\tif (output > 25)\n\t\t\toutput = 25;\n\t\telse if (output < -25)\n\t\t\toutput = -25;\n\n\t\t// convert output to a value the drive subsystem can use (-1 to 1)\n\t\toutput /= 100;\n\n\t\t// drive the robot, only providing the turn speed\n\t\tRobot.driveSubsystem.robotDrive.arcadeDrive(0, output);\n\t\t// Robot.driveSubsystem.tankDrive(-output, output);\n\t}", "protected void randomStep() {\n\t\tint n = curNode.getDegree();\n\t\tint r = 0;\n\n\t\tif (n > 0) {\n\t\t\tr = ctx.random().nextInt(n);\n\n\t\t\tAntCo2Edge curEdge = (AntCo2Edge) curNode.getEdge(r);\n\n\t\t\tassert curEdge != null : \"found no edge\";\n\n\t\t\tcross(curEdge, true);\n\t\t}\n\t}", "public void cars_of_my_father(){\n System.out.println(\"Royal Rayce, Maruti Suzuki, Mazda\");\n }", "public void colocarCompu(){\n int aux1;\n int aux2;\n \n for(int sub=0;sub<5;sub++){\n do{\n aux1=(int)(Math.random()*10);\n aux2=(int)(Math.random()*10);\n }while(proyectofinal.barc[aux1][aux2]!=0);\n \n \n proyectofinal.barc[aux1][aux2]=1;\n proyectofinal.barcosC ++ ;\n }\n }", "public void exec(OxProgram pgm) {\n SubCmd theSub = (SubCmd) _startCmd;\n pgm.setNextCommand(theSub._calledFrom.getLineNumber());\n }", "public static void main(String[] args) {\n\t\tfinal int COUNT =5;\n\t\tForkBuffer forkBuffer = new ForkBuffer(COUNT);\n\t\tPhilosopher philospher[]=new Philosopher[COUNT];\n\t\t\n\t\tfor(int i =0; i < COUNT; ++i){\n\t\t\tphilospher[i]= new Philosopher(i, forkBuffer, COUNT);\n\t\t\tphilospher[i].start();\n\t\t}\n\t}", "public void execute(){\n \n double default_weight = 0; //This is the weight we change each time we process a new Node\n GraphNode default_node = Source; //we begin with source\n MinDistance.set(findNode(Source), 0.0); //sets the weight of the source node to 0\n MinDistanceStatus.set(findNode(Source), true); //sets the weight as final\n References.set(findNode(Source), new ArcGraph(0.0, Source, Source)); //sets the source of the as himself so no null pointer exception occurs\n \n for (int i = 0; i < Nodes.size(); i++){ //We execute the cicle the number of nodes we have\n \n setWeights(default_node, default_weight); //updates the weight of the weight list\n int min_weight_pos = getMinDistanceArray(); //returns the pos of the min weight\n double min_weight = MinDistance.get(min_weight_pos); //returns the min weight\n GraphNode min_node = Nodes.get(min_weight_pos); //Returns the node with the min weight\n int pos_node = findNode(min_node); //returns the pos of the destiny node \n MinDistanceStatus.set(min_weight_pos, true); //sets the weight as final REVISAR\n \n default_weight = min_weight; //Change of values to continue the cicle\n default_node = min_node; //Change of values to continue the \n \n }\n \n }", "@Override\r\n public void act() {\r\n boolean willMove = canMove();\r\n if (isEnd) {\r\n // to show step count when reach the goal\r\n if (!hasShown) {\r\n String msg = stepCount.toString() + \" steps\";\r\n JOptionPane.showMessageDialog(null, msg);\r\n hasShown = true;\r\n }\r\n } else if (willMove) {\r\n move();\r\n // increase step count when move\r\n stepCount++;\r\n // 把当前走过的位置加入栈顶的arrayList\r\n crossLocation.peek().add(getLocation());\r\n // 当前方向的概率+1\r\n probablyDir[getDirection() / 90]++;\r\n } else if (!willMove) {\r\n // 这时候必须一步一步返回栈顶arrayList的开头\r\n ArrayList<Location> curCrossed = crossLocation.peek();\r\n curCrossed.remove(curCrossed.size() - 1);\r\n next = curCrossed.get(curCrossed.size() - 1);\r\n move();\r\n stepCount++;\r\n // 当前方向反向的概率-1\r\n probablyDir[((getDirection() + Location.HALF_CIRCLE)\r\n % Location.FULL_CIRCLE) / Location.RIGHT]--;\r\n if (curCrossed.size() == 1) {\r\n // 返回之后pop\r\n crossLocation.pop();\r\n }\r\n }\r\n }", "public static void main(String args[])\n {\n\t\t\tMouseController mC = new MouseController(Canvas.getInstance(),new starter());\n\t\t\t\n\t\t\t// please leave following line alone, necessary for keyboard input\n\t\t\tKeyController kC = new KeyController(Canvas.getInstance(),new starter());\n\t\t\t\n\t\t\t joe = new happyFace(520,321);\n\t\t\tjoe.fill();\n\t\t\tCar j = new Car(220,281,\"pop\");\n\t\t\tj.setStep(2);\n\t\t\tj.fill();\n\t\t\twhile(true)\n\t\t\t{\n\t\t\t\tj.translate(j.getStep(),0);\n\t\t\t\tj.drive();\n\t\t\t\tCanvas.pause(10);\n\t\t\t\tif (joe.crash(j))\n\t\t\t\t{\n\t\t\t\t\tj.setStep(0);\n\t\t\t\t\tSystem.out.println(\" CRASH!! \");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\" GG \");\n\t\t\t}\n\t\t\t\n\t\t}", "@Override\n public void execute() {\n // finds goal and gets speed to turn\n double speed = vision.getPIDOfGoal();\n if (speed == -1000)\n return;\n\n // System.out.println(speed);\n drivetrain.tankDrive(speed, -speed);\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"denver broncos \");\n\n\t}" ]
[ "0.51957536", "0.514724", "0.5122616", "0.5119349", "0.50524735", "0.49539223", "0.49504936", "0.49088737", "0.48907283", "0.48596737", "0.4847309", "0.48439905", "0.4822296", "0.48209926", "0.48203376", "0.481249", "0.4809957", "0.48055968", "0.48008934", "0.47931594", "0.4788886", "0.4785396", "0.47819954", "0.47755378", "0.47702044", "0.47645056", "0.47634727", "0.47590476", "0.47544745", "0.4741332", "0.47317585", "0.4729322", "0.47212026", "0.47186017", "0.46983063", "0.4697074", "0.46944284", "0.4689246", "0.46860752", "0.4679082", "0.46770692", "0.46708784", "0.46650663", "0.46610427", "0.46544898", "0.46517116", "0.46506092", "0.46435842", "0.46380895", "0.46340927", "0.4632671", "0.46307933", "0.46277386", "0.46245804", "0.4619115", "0.46146205", "0.4607424", "0.46031705", "0.45941007", "0.45934722", "0.45928636", "0.45890778", "0.45864844", "0.45855516", "0.45826256", "0.45800883", "0.45754382", "0.45745516", "0.45738807", "0.45691672", "0.45691186", "0.4564027", "0.4558955", "0.45585695", "0.4558118", "0.45547685", "0.45530373", "0.45510805", "0.45509872", "0.4550883", "0.45489964", "0.45363632", "0.4535567", "0.45312336", "0.45306095", "0.4530195", "0.45287704", "0.45281586", "0.4528054", "0.45276028", "0.45248917", "0.4523646", "0.45131564", "0.45114192", "0.45089117", "0.45084623", "0.4503754", "0.4503598", "0.4502657", "0.44983307", "0.44935203" ]
0.0
-1
Close the connection when an exception is raised.
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { cause.printStackTrace(); ChannelFuture close = ctx.close(); close.addListener((ChannelFutureListener) future -> System.out.println("server channel closed!!!")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void close() throws Exception {\r\n if (connection != null){\r\n connection.close();\r\n }\r\n }", "@Override\r\n\tpublic void close()\r\n {\r\n\t\ttry\r\n {\r\n\t connection.close();\r\n }\r\n\t\tcatch (final SQLException e)\r\n {\r\n\t\t\t// Ignore, shutting down anyway\r\n }\r\n }", "public void connectionClose() {\n try {\n conn.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void closeConnection(){\n try {\n connection.close();\n } catch (SQLException ex) {\n System.out.println(\"SQLException in closeConnection()\");\n }\n }", "private synchronized void closeConnection() {\n/* 212 */ if (this.conn != null) {\n/* 213 */ this.log.debug(\"Closing connection\");\n/* */ try {\n/* 215 */ this.conn.close();\n/* 216 */ } catch (IOException iox) {\n/* 217 */ if (this.log.isDebugEnabled()) {\n/* 218 */ this.log.debug(\"I/O exception closing connection\", iox);\n/* */ }\n/* */ } \n/* 221 */ this.conn = null;\n/* */ } \n/* */ }", "private void closeConnection() {\r\n try {\r\n socket.close();\r\n } catch (IOException ex) {\r\n // Ex on close\r\n }\r\n }", "private void close() {\n\t\ttry {\n\t\t\tif (conn != null) {\n\t\t\t\tconn.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlog(e);\n\t\t} finally {\n\t\t\tisConnected = false;\n\t\t}\n\t}", "public void disconnect()\r\n\t{\r\n\t\ttry {\r\n\t\t\tconnection_.close();\r\n\t\t} catch (IOException e) {} // How can closing a connection fail?\r\n\t\t\r\n\t}", "public void close()\r\n {\r\n try\r\n {\r\n connection.close();\r\n } catch(SQLException exception)\r\n {\r\n LOG.log(Level.SEVERE, \"\", exception);\r\n }\r\n }", "private void closeConnection() {\n\t\t_client.getConnectionManager().shutdown();\n\t}", "void close()\n {\n DisconnectInfo disconnectInfo = connection.getDisconnectInfo();\n if (disconnectInfo == null)\n {\n disconnectInfo = connection.setDisconnectInfo(\n new DisconnectInfo(connection, DisconnectType.UNKNOWN, null, null));\n }\n\n // Determine if this connection was closed by a finalizer.\n final boolean closedByFinalizer =\n ((disconnectInfo.getType() == DisconnectType.CLOSED_BY_FINALIZER) &&\n socket.isConnected());\n\n\n // Make sure that the connection reader is no longer running.\n try\n {\n connectionReader.close(false);\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n\n try\n {\n outputStream.close();\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n\n try\n {\n socket.close();\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n\n if (saslClient != null)\n {\n try\n {\n saslClient.dispose();\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n finally\n {\n saslClient = null;\n }\n }\n\n debugDisconnect(host, port, connection, disconnectInfo.getType(),\n disconnectInfo.getMessage(), disconnectInfo.getCause());\n if (closedByFinalizer && debugEnabled(DebugType.LDAP))\n {\n debug(Level.WARNING, DebugType.LDAP,\n \"Connection closed by LDAP SDK finalizer: \" + toString());\n }\n disconnectInfo.notifyDisconnectHandler();\n }", "public void close () throws IOException , GateException {\n try{\n conn.close();\n }\n catch (SQLException e){\n log.error(\"Problem closing database connection\", e);\n System.exit(5);\n }\n\n }", "public static void closeConnection() {\n\t\ttry {\n\t\t\tcon.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error al cerrar la conexion.\");\n\t\t}\n\t}", "public void closeConnection() {\n //It's important to close the connection when you are done with it\n try {\n connection.close();\n DriverManager.getConnection(JDBC_URL + \";shutdown=true\"); // shut Derby down, See: https://db.apache.org/derby/papers/DerbyTut/embedded_intro.html#shutdown\n } catch (SQLException ignore) {\n LOGGER.log(Level.SEVERE, \"Unable to close DB connection due to error {0}\", ignore.getMessage());\n\n // Alternative: Cascade the original exception (or rewrap it as a more specific exception)\n // Here, we just log it \n }\n }", "private void closeConnection(){\n report(\"Close connection\");\n try{\n if(socket != null && !socket.isClosed()) {\n report(\"Client: Close socket\");\n socket.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n report(\"End\");\n }", "public void closeConnection() {\n if (conn != null) {\n try {\n conn.close();\n } catch (SQLException sqlEx) {\n dbg(\"closeConnection-->SQLException raised while closing conn =\" + sqlEx.getMessage());\n }\n }\n }", "public void closeConnection(){\r\n if (connection != null)\r\n try{\r\n log.info(\"close connection\");\r\n connection.close();\r\n }\r\n catch (SQLException e){\r\n log.error(e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }", "private void closeConnection(Throwable cause) {\n log.debug(\"Closing connection\", cause);\n\n setState(SessionState.DISCONNECTING, cause);\n this.client.disconnect().onComplete(this::disconnectCompleted);\n }", "public static void closeConnection() {\n if(connection != null) {\n try {\n connection.close();\n connection = null;\n }\n catch (Exception e) \n { \n e.printStackTrace(); \n }\n }\n }", "public void closeConnection() throws Exception {\n\t\ttry {\n\t\t\tclient.close();\n\t\t\tis.close();\n\t\t\tisr.close();\n\t\t\tbr.close();\n\t\t\tSystem.out.println(\"Connection is closed\");\n\t\t\tgetConnection();\n\t\t} catch (IOException ex) {\n\t\t\tLogger.getLogger(ServerTCP.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\n\t}", "private void closeConnection () {\n\t\ttry {\n\t\t\tconnection.close();\n\t\t\tconnection = null;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void close() {\n if (conn != null) {\n try {\n conn.close();\n } catch (SQLException e) {\n logger.error(\"Failed to close the connection.\");\n }\n }\n }", "public void closeConnection() {\n\t\ttry {\n\t\t\tsocket.close();\n\t\t} catch (IOException e) {\n\t\t\tlogger.warning(\"problem closing socket connection with JSON-RPC server at \" + serverIP + \":\" + serverPort);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void close() {\n try {\n connect.close();\n } catch (SQLException ex) {\n System.err.println(\"Error while closing db connection\" + ex.toString());\n }\n }", "public void closeConnection() {\n try {\n if (connection != null) {\n connection.close();\n connection = null;\n }\n } catch (Exception e) {\n System.out.print(e.getMessage());\n }\n }", "protected void close() {\n\t\tthis.connection.close();\n\t\tthis.connection = null;\n\t}", "public void close() {\n if (connection == null) {\n LOGGER.error(\"DB : Uninitialized DB Connection.\");\n return;\n }\n\n try {\n if (connection.isClosed()) {\n LOGGER.warn(\"Connection is already closed.\");\n return;\n }\n connection.close();\n } catch (SQLException e) {\n LOGGER.error(\"Error closing the connection.\", e);\n }\n\n }", "public void closeConnection() {\n System.out.println(\"Closing connection\");\n\n try {\n reader.close();\n \n if (connectionSocket != null) {\n connectionSocket.close();\n connectionSocket = null;\n }\n System.out.println(\"Connection closed\");\n } catch (IOException e) {\n System.out.println(\"IOException at closeConnection()\");\n } catch (NullPointerException e) {\n System.out.println(\"NullPointerException at closeConnection()\");\n } catch (Exception e) {\n System.out.println(\"Exception at closeConnection()\");\n System.out.println(e.toString());\n }\n }", "public void closeConnection() {\n try {\n socket.close();\n oStream.close();\n } catch (Exception e) { }\n }", "private void closeConnection(final String reason) {\n closeConnection(new VertxException(reason).fillInStackTrace());\n }", "abstract public void closeConnection();", "public void closeConnection() {\n try {\n if ( clientSocket != null ) {\n clientSocket.close();\n }\n } catch ( IOException e ) {\n logger.error( \"Error closing sokcet to client \" + getId(), e );\n }\n }", "private void closeConnection () {\n setConnection (null);\n }", "private void releaseConnection() {\n try {\n con.close();\n } catch (SQLException ex) {\n throw new EJBException(\"releaseConnection: \" + ex.getMessage());\n }\n }", "@Override\r\n\tpublic void close() {\n\t \t if (conn != null) {\r\n\t \t\t try {\r\n\t \t\t\t conn.close();\r\n\t \t\t } catch (Exception e) {\r\n\t \t\t\t e.printStackTrace();\r\n\t \t\t }\r\n\t \t }\r\n\t}", "public void closeConnection() {\n try {\n con.close();\n } catch (SQLException e) {\n System.err.println(e.getMessage());\n e.printStackTrace();\n }\n }", "public void closeConnection();", "private void closeConnection() {\n\t\t\tSystem.out.println(\"\\nTerminating connection \" + myConID + \"\\n\");\n\t\t\ttry {\n\t\t\t\toutput.close(); // close output stream\n\t\t\t\tinput.close(); // close input stream\n\t\t\t\tconnection.close(); // close socket\n\t\t\t} catch (IOException ioException) {\n\t\t\t\tSystem.out.println(\"Exception occured in closing connection\"\n\t\t\t\t\t\t+ ioException);\n\t\t\t}\n\t\t}", "protected void connectionClosed() {}", "private void endConnection(){\n\t\tif(this.connection != null){\n\t\t\ttry {\n\t\t\t\tthis.connection.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static void close() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t} catch(Exception e) {\n\t\t\tPvPTeleport.instance.getLogger().info(e.getMessage());\n\t\t}\n\n\t}", "private void closeConnection()\n\t{\n\t\tif(result != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tresult.close();\n\t\t\t\tresult = null;\n\t\t\t}\n\t\t\tcatch(Exception ignore){}\n\t\t}\n\t\tif(con != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tcon.close();\n\t\t\t\tcon = null;\n\t\t\t}\n\t\t\tcatch(Exception ignore){}\n\t\t}\n\t}", "public void closeConnection() {\n client.close();\n System.out.println(\"Connection to db closed.\");\n }", "public void close() {\n\n\t\tdebug();\n\n\t\tif (isDebug == true) {\n\t\t\tlog.debug(\"=== CLOSE === \");\n\t\t}\n\n\t\ttry {\n\n\t\t\tif (connection != null) {\n\n\t\t\t\tlog.debug(\"Antes Connection Close\");\n\t\t\t\tconnection.close();\n\t\t\t\tlog.debug(\"Pos Connection Close\");\n\t\t\t}\n\n\t\t\tif (m_dbConn != null) {\n\t\t\t\tm_dbConn.close();\n\t\t\t}\n\n\t\t\tif (isDebug == true) {\n\t\t\t\tlog.debug(\"Connection Close\");\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tlog.debug(\"ERRO Connection Close\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tconnection = null;\n\t\tm_dbConn = null;\n\n\t}", "public void closeConnection() {\n try {\n dis.close();\n dos.close();\n socket.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void closeConnection()\n\t{\n\t\ttry\n\t\t{\n\t\t\tconnect.close();\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void closeConnection() {\n if (this.connection != null && this.connected) {\n try {\n this.connection.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n }", "public void closeConnection() {\r\n\t\ttry {\r\n\t\t\tthis.store.close();\r\n\t\t} catch (MessagingException e) {\r\n\t\t\tLog.error(e.getStackTrace().toString());\r\n\t\t}\r\n\t}", "public void closeConnection() {\r\n if (getConnection() != null && StringUtil.isNotBlank(config.getDataSource())\r\n /*&& this.conn.getConnection() instanceof PooledConnection */) {\r\n LOG.ok(\"Close the pooled connection\");\r\n dispose();\r\n }\r\n }", "public void closeConnection() {\n\t\tif (conn != null) {\n\t\t\ttry {\n\t\t\t\tconn.close();\n\t\t\t} catch(SQLException se){\n\t\t\t\tse.printStackTrace();\n\t\t\t}\n\t\t} \n\t}", "private void connectionClosed() {\n if (this.state != SessionState.DISCONNECTING) {\n // this came unexpected\n connectionClosed(new VertxException(\"Connection closed\"));\n }\n }", "public void close() throws IOException {\n try {\n _connection.close();\n } catch (SQLException e) {\n String msg = \"Failed to close database connection.\";\n _logger.warn(msg, e);\n }\n super.close(); //close the /dev/null that ncml gave us\n }", "public void closeConnection()\n {\n try{\n if(statement!=null)\n connection.close();\n }catch(SQLException se){\n System.out.println(\"Close statement ex:\"+ se.getMessage());\n }// do nothing\n try{\n if(connection!=null)\n connection.close();\n }catch(SQLException se){\n System.out.println(\"Close connection ex:\"+ se.getMessage());\n }//end finally try\n }", "public void closeConnection() throws SQLException;", "protected static void closeConnection(Connection connection) throws ConnectionFailedException {\r\n try {\r\n if (!connection.isClosed()) { // If connection is not closed\r\n connection.close();\r\n }\r\n } catch (SQLException e) {\r\n // Something went wrong with the connection\r\n throw new ConnectionFailedException();\r\n }\r\n }", "void close() throws Exception;", "void close() throws Exception;", "public void closeConnection() {\n\t\ttry{\n\t\t\tif(this.connection!=null)\n\t\t\t\tthis.connection.close();\n\t\t}catch(SQLException se){\n\t\t\tse.printStackTrace();\n\t\t}\n\t}", "private void closeConnection(Connection connection, String signature) throws LateDeliverablesProcessingException {\r\n try {\r\n connection.close();\r\n } catch (SQLException e) {\r\n throw Helper.logException(log, signature, new LateDeliverablesProcessingException(\r\n \"Fails to close connection.\", e));\r\n }\r\n }", "private void closeConnection() {\n try {\n fromClient.close();\n toClient.close();\n client.close();\n } catch (IOException e) {\n System.err.println(\"Unable to close connection:\" + e.getMessage());\n }\n }", "public void closeConnection() {\n try {\n stdIn.close();\n socketIn.close();\n socketOut.close();\n }\n catch(IOException e) {\n e.printStackTrace();\n }\n }", "public synchronized void close() throws SQLException {\n/* 204 */ if (this.physicalConn != null) {\n/* 205 */ this.physicalConn.close();\n/* */ \n/* 207 */ this.physicalConn = null;\n/* */ } \n/* */ \n/* 210 */ if (this.connectionEventListeners != null) {\n/* 211 */ this.connectionEventListeners.clear();\n/* */ \n/* 213 */ this.connectionEventListeners = null;\n/* */ } \n/* */ }", "private void closeConnection() throws IOException {\n\t\tclientSocket.close();\n\t}", "public void closeConnection() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"ERROR: cannot close connection to local database\");\n\t\t}\n\t}", "public void closeConnection() {\n try {\n String token = conn.toString();\n conn.close();\n log.info(\"Database Connection Closed. ID: {} \", token);\n } catch (Exception e) {\n log.error(\"Error closing the database connection. \\n Trace: {}\", ExceptionUtilities.stacktraceToString(e));\n }\n }", "public void closeConnection(Connection conn) throws SQLException;", "public void close() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void close() {\n if (mLeakedException != null) {\n getConnectionManager().shutdown();\n mLeakedException = null;\n }\n }", "public void closeConnection() {\n this.session.close();\n }", "public void closeCon(){\r\n\t\ttry\r\n\t\t{\r\n\t\t\tmyConnection.close();\r\n\r\n\t\t}\r\n\r\n\t\tcatch (SQLException e )\r\n\t\t{\r\n\t\t\tSystem.out.println(\"something went wrong with closing DB connection\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n\tpublic final void close() throws SailException {\n\t\tconnectionLock.writeLock().lock();\n\n\t\ttry {\n\t\t\tif (isOpen) {\n\t\t\t\ttry {\n\t\t\t\t\tforceCloseActiveOperations();\n\n\t\t\t\t\tif (txnActive) {\n\t\t\t\t\t\tlogger.warn(\"Rolling back transaction due to connection close\",\n\t\t\t\t\t\t\t\tdebugEnabled ? new Throwable() : null);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Use internal method to avoid deadlock: the public\n\t\t\t\t\t\t\t// rollback method will try to obtain a connection lock\n\t\t\t\t\t\t\trollbackInternal();\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\ttxnActive = false;\n\t\t\t\t\t\t\ttxnPrepared = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcloseInternal();\n\t\t\t\t} finally {\n\t\t\t\t\tisOpen = false;\n\t\t\t\t\tsailBase.connectionClosed(this);\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\t// Release the exclusive lock. Any threads waiting to obtain a\n\t\t\t// non-exclusive read lock will get one and then fail with an\n\t\t\t// IllegalStateException, because the connection is no longer open.\n\t\t\tconnectionLock.writeLock().unlock();\n\t\t}\n\t}", "public void close() {\n connection.close();\n running = false;\n }", "public void closeConnection() {\n\t\ttry {\n\t\t\tif (conn != null) {\n\t\t\t\tconn.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t}\n\t\tconn = null;\n\t}", "void close_Connection(){\n\t\ttry{\n\t\t\toutfile.close();\n\t\t\tcon.close();\n\t\t\tSystem.out.println(\"MYSQL is disconnected\");\n\t\t//Catch SQL exception\t\t\n\t\t}catch(SQLException sqle){ \n\t\t\tsqle.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t//Catch I/O exception\t\n\t\tcatch(IOException ioe){ \n\t\t\tioe.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\t\t\n\t}", "protected void closeConnection(RepositoryConnection connection)\n throws RepositoryException {\n }", "public static void closeConnection(){\r\n\t\tif(connection != null)\r\n\t\t\ttry {\r\n\t\t\t\tconnection.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t}", "final public void closeConnection() throws IOException {\n\n readyToStop = true;\n closeAll();\n }", "public void close() {\n if (closed) {\n return;\n }\n try {\n disconnect();\n } catch (Exception e) {\n throw new IOError(e);\n }\n closed = true;\n }", "@Override\r\n\tpublic void closeConnection() {\n\t\t\r\n\t}", "public void close() {\n try {\n closeConnection(socket);\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "@Override\n public void close() throws Exception {\n }", "public void disconnect() {\n\t\tif (_connection != null) {\n\t\t\ttry {\n\t\t\t\twhile (!_connection.isClosed()) {\n\t\t\t\t\t_connection.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) { /* ignore close errors */\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void closeConnection()\n\t{\n\t\ttry\n\t\t{\n\t\t\tdatabaseConnection.close();\n\t\t}\n\t\tcatch (SQLException currentSQLError)\n\t\t{\n\t\t\tdisplaySQLErrors(currentSQLError);\n\t\t}\n\t}", "public void ExitConection(){\n try {\n resultSet.close();\n preparedStatement.close();\n conection.close();\n } catch (Exception e) {\n// MessageEmergent(\"Fail ExitConection(): \"+e.getMessage());\n }\n }", "public void cleanup(){\n try{\n if (this._connection != null){\n this._connection.close ();\n }//end if\n }catch (SQLException e){\n // ignored.\n }//end try\n }", "public void disconnect() throws Exception\n {\n if(!connected)\n return;\n connectionSocket.close();\n reader.close();\n writer.close();\n listenerTimer.cancel();\n connected = false;\n\n }", "void close() throws Exception;", "public void closeConnection() throws SQLException {\n conn.close();\r\n }", "public void shutdown() throws DatabaseAccessException {\n\t\ttry {\n\t\t\tthis.connection.close();\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DatabaseAccessException(Failure.CONNECTION);\n\t\t}\n\t}", "@Override\n public void closeConnection() {\n\n System.out.println(\"[CLIENT] Closing socket connection...\");\n try {\n socket.close();\n in.close();\n out.close();\n System.out.println(\"[CLIENT] Closed socket connection.\");\n } catch (IOException e) {\n System.out.println(\"[CLIENT] Error occurred when closing socket\");\n }\n System.exit(0);\n\n }", "private void closeConnection() {\n try {\n bufferedWriter.close();\n } catch (IOException e) {\n System.err.println(\"Cannot close connection to MS SQL DB\");\n e.printStackTrace();\n }\n System.out.println(\"Close connection to MS SQL DB\");\n }", "@Override\n public final void close() throws IOException {\n close(new MongoDbException(\"Connection closed.\"));\n }", "public void close(Connection connection) throws SQLException {\n\n try { connection.close(); }\n catch (SQLException e) { throw e; }\n }", "@Override\n public synchronized void close() throws IOException {\n disconnect(false);\n }", "public void releaseConnection() {\r\n\t\tif (conn != null) {\r\n\t\t\ttry {\r\n\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException ex) {\r\n\t\t\t\tSystem.out.println(\"Exception closing connection: \" + ex);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void connectionClosed(final Throwable cause) {\n if (log.isDebugEnabled()) {\n log.debug(\"Connection closed\", cause);\n } else {\n log.info(\"Connection closed: \" + (cause != null ? cause.getMessage() : \"<unknown>\"));\n }\n\n if (this.client != null) {\n this.client.exceptionHandler(null);\n this.client.publishHandler(null);\n this.client.closeHandler(null);\n this.client.subscribeCompletionHandler(null);\n this.client.publishCompletionHandler(null);\n this.client.publishCompletionExpirationHandler(null);\n this.client.publishCompletionUnknownPacketIdHandler(null);\n this.client = null;\n }\n setState(SessionState.DISCONNECTED, cause);\n }", "public void closeSession() throws ConnectionException {\n\t\tif (!(stateMachine.getCurrent().getClass() == SessionValid.class)) {\n\t\t\tthrow new ConnectionException(\"Illegal connection state: \"\n\t\t\t\t\t+ stateMachine.getCurrent().getClass().getSimpleName());\n\t\t}\n\n\t\tstateMachine.doTransition(new CloseSession(managedSystemSessionId,\n\t\t\t\tmessageQueue.getSequenceNumber()));\n\t}", "@Override\n public void closeConnection() throws SQLException{\n getConnection().close();\n }", "@Override\n\tpublic void closeConnection() {\n\t\t\n\t}", "public void pgClose() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t\tSystem.out.println(\"Connection closed\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.err.println(\"Connection could not be closed ĘC SQLexception\");\n\t\t}\n\t\t\n\t}", "public static void closeConnection() throws SQLException, IOException, JSchException {\n PropertiesLoader loader = new PropertiesLoader();\n int localPort = Integer.parseInt(loader.loadProperty().getProperty(\"localPort\"));\n if (connection != null) {\n connection.close();\n }\n if (session != null) {\n session.delPortForwardingL(localPort);\n session.disconnect();\n }\n }" ]
[ "0.7704145", "0.7646479", "0.73898673", "0.735185", "0.73500484", "0.72937244", "0.7225274", "0.71796983", "0.71198434", "0.7105107", "0.70827043", "0.7079053", "0.70499283", "0.7044209", "0.70103747", "0.700723", "0.70043784", "0.69742817", "0.6962846", "0.6953861", "0.6952084", "0.6933155", "0.69322467", "0.69317746", "0.6923762", "0.6914568", "0.68875694", "0.68791634", "0.68642163", "0.68483776", "0.68332267", "0.6819758", "0.68179125", "0.68138486", "0.6791715", "0.6791489", "0.6787631", "0.6770359", "0.6770339", "0.67544115", "0.6752419", "0.67502385", "0.67444974", "0.6743435", "0.67320174", "0.6727485", "0.67144275", "0.67079365", "0.6704759", "0.6696866", "0.668402", "0.6673346", "0.66713965", "0.66698515", "0.6669676", "0.6668948", "0.6668948", "0.6662574", "0.66590136", "0.66476613", "0.66382545", "0.66371834", "0.6617812", "0.66070366", "0.66068584", "0.65667856", "0.6558247", "0.65508395", "0.6549127", "0.6546913", "0.65434045", "0.65422004", "0.6535351", "0.6528389", "0.65243804", "0.65238816", "0.6513922", "0.6513208", "0.65049976", "0.64868736", "0.6486082", "0.64815515", "0.6480321", "0.64712846", "0.6469836", "0.64643097", "0.6463336", "0.64555705", "0.6450824", "0.64424646", "0.6441446", "0.64412636", "0.6437877", "0.6435865", "0.6435036", "0.6427347", "0.64224154", "0.64202106", "0.64199835", "0.6416822", "0.6412338" ]
0.0
-1
Creates new graph statistics
protected BinningTemporalGraphStatistics(List<TemporalElementStats> vertexStats, List<TemporalElementStats> edgeStats, Set<String> relevantProperties) { this.vertexStats = new HashMap<>(); this.edgeStats = new HashMap<>(); this.vertexCount = 0L; this.edgeCount = 0L; for (TemporalElementStats edgeStat : edgeStats) { this.edgeStats.put(edgeStat.getLabel(), edgeStat); this.edgeCount += edgeStat.getElementCount(); } for (TemporalElementStats vertexStat : vertexStats) { this.vertexStats.put(vertexStat.getLabel(), vertexStat); this.vertexCount += vertexStat.getElementCount(); } this.relevantProperties = relevantProperties; initDistinctVertices(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void createGraphForMassiveLoad();", "void createGraphForSingleLoad();", "private void createGraphs() {\n initialGraphCreation.accept(caller, listener);\n graphCustomization.accept(caller, listener);\n caller.generateAndAdd(params.getNumCallerEvents(), callerAddToGraphTest);\n listener.generateAndAdd(params.getNumListenerEvents(), listenerAddToGraphTest);\n generationDefinitions.accept(caller, listener);\n }", "public GraphInfo(){}", "void createGraphForDistributedSingleLoad();", "public Graphs() {\n graph = new HashMap<>();\n }", "private void createGraph() {\r\n graph = new Graph(SHELL, SWT.NONE);\r\n\r\n final GridData gridData = new GridData();\r\n gridData.horizontalAlignment = GridData.FILL;\r\n gridData.verticalAlignment = GridData.FILL;\r\n gridData.grabExcessHorizontalSpace = true;\r\n gridData.grabExcessVerticalSpace = true;\r\n gridData.heightHint = DEFAULT_GRAPH_SIZE;\r\n gridData.widthHint = DEFAULT_GRAPH_SIZE;\r\n graph.setLayoutData(gridData);\r\n }", "public void createGraph() {\n System.out.println(\"The overlay graph will be created from scratch\");\n graph = new MatrixOverlayGraph();\n parse(dumpPath);\n saveGraph();\n graph.createSupporters(kdTreeSupporterActived);\n saveSupporters();\n }", "public void buildGraph(){\n\t}", "public Statistics() {}", "public void outputCurrentGraphStatistics(ONDEXGraph graph) {\n fireEventOccurred(new GeneralOutputEvent(\"\\nGraph Statistics for \" + graph.getName(), getCurrentMethodName()));\n ONDEXIterator<ONDEXConcept> cit = graph.getConcepts();\n fireEventOccurred(new GeneralOutputEvent(\"\\nConcepts: \" + cit.size(), getCurrentMethodName()));\n cit.close();\n cit = null;\n ONDEXIterator<ONDEXRelation> rit = graph.getRelations();\n if (rit == null) {\n fireEventOccurred(new GeneralOutputEvent(\"\\nRelations: 0\", getCurrentMethodName()));\n } else {\n fireEventOccurred(new GeneralOutputEvent(\"\\nRelations: \" + rit.size(), getCurrentMethodName()));\n rit.close();\n }\n rit = null;\n ONDEXIterator<CV> cvit = graph.getMetaData().getCVs();\n fireEventOccurred(new GeneralOutputEvent(\"\\nCVs: \" + cvit.size(), getCurrentMethodName()));\n cvit.close();\n cvit = null;\n ONDEXIterator<ConceptClass> ccit = graph.getMetaData().getConceptClasses();\n fireEventOccurred(new GeneralOutputEvent(\"\\nCCs: \" + ccit.size(), getCurrentMethodName()));\n ccit.close();\n ccit = null;\n ONDEXIterator<RelationType> rtit = graph.getMetaData().getRelationTypes();\n fireEventOccurred(new GeneralOutputEvent(\"\\nRTs: \" + rtit.size(), getCurrentMethodName()));\n rtit.close();\n rtit = null;\n ONDEXIterator<RelationType> rtsetit = graph.getMetaData().getRelationTypes();\n fireEventOccurred(new GeneralOutputEvent(\"\\nRTsets: \" + rtsetit.size(), getCurrentMethodName()));\n rtsetit.close();\n rtsetit = null;\n }", "protected IWeightedGraph<GraphNode, WeightedEdge> createGraph() {\r\n\t\treturn createGraph(goapUnit.getGoalState());\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic AnalysisGraph createNewInstance() {\n\t\tAnalysisGraph graph = new AnalysisGraph();\n\t\tgraph.currentIndex = currentIndex;\n\t\t\n\t\tgraph.nodes = (HashMap<String, Node>) nodes.clone();\n\t\tgraph.nodeList = (ArrayList<Node>)((ArrayList<Node>) nodeList).clone();\n\t\tgraph.links = (ArrayList<Link>)((ArrayList<Link>) links).clone();\n\t\treturn graph;\n\t}", "public void computeStats() {\n\t\tstats = new Stats();\t\t\n\t}", "void makeSampleGraph() {\n\t\tg.addVertex(\"a\");\n\t\tg.addVertex(\"b\");\n\t\tg.addVertex(\"c\");\n\t\tg.addVertex(\"d\");\n\t\tg.addVertex(\"e\");\n\t\tg.addVertex(\"f\");\n\t\tg.addVertex(\"g\");\n\t\tg.addEdge(\"a\", \"b\");\n\t\tg.addEdge(\"b\", \"c\");\n\t\tg.addEdge(\"b\", \"f\");\n\t\tg.addEdge(\"c\", \"d\");\n\t\tg.addEdge(\"d\", \"e\");\n\t\tg.addEdge(\"e\", \"f\");\n\t\tg.addEdge(\"e\", \"g\");\n\t}", "public Graph(){\n\t\tthis.sizeE = 0;\n\t\tthis.sizeV = 0;\n\t}", "public static Graph makeMeAGraph(Set<Operation> operations, State init){\n Graph graph = new implementGraph(operations , init) ;\n return graph;\n\n\t //\t throw new NotImplementedException();\n }", "void statistics();", "public PlainGraph createGraph() {\n PlainGraph graph = new PlainGraph(getUniqueGraphName(), GraphRole.RULE);\n graphNodeMap.put(graph, new HashMap<>());\n return graph;\n }", "public void script() {\n ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);\n pc.newProject();\n Workspace workspace = pc.getCurrentWorkspace();\n\n //Generate a new random graph into a container\n Container container = Lookup.getDefault().lookup(Container.Factory.class).newContainer();\n RandomGraph randomGraph = new RandomGraph();\n randomGraph.setNumberOfNodes(500);\n randomGraph.setWiringProbability(0.005);\n randomGraph.generate(container.getLoader());\n\n //Append container to graph structure\n ImportController importController = Lookup.getDefault().lookup(ImportController.class);\n importController.process(container, new DefaultProcessor(), workspace);\n\n //Add a fake 'Date' column to nodes\n GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel(workspace);\n\n //Add a random date to all nodes - between 1990 and 2010\n Graph graph = graphModel.getGraph();\n Random random = new Random();\n for (Node n : graph.getNodes()) {\n Integer randomDataValue = random.nextInt(21) + 1990;\n n.addInterval(new Interval(randomDataValue, Double.POSITIVE_INFINITY));\n }\n\n //Execute metric\n StatisticsController statisticsController = Lookup.getDefault().lookup(StatisticsController.class);\n DynamicDegree degree = new DynamicDegree();\n degree.setWindow(1.0);\n degree.setTick(1.0);\n degree.setBounds(graphModel.getTimeBounds());\n statisticsController.execute(degree);\n\n //Get averages\n System.out.println(\"Average degree:\");\n TimestampDoubleMap averages = (TimestampDoubleMap) graph.getAttribute(DynamicDegree.DYNAMIC_AVGDEGREE);\n for (double t : averages.getTimestamps()) {\n System.out.println(t + \" -> \" + averages.getDouble(t));\n }\n }", "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 Graph()\n\t{\n\t\tthis.total_verts = null;\n\t\tthis.total_edges = null;\n\t\tnodes = new HashMap<String, Node>();\n\t}", "public Graph(int numberOfVertices){\r\n this.numberOfVertices = numberOfVertices;\r\n this.adjacencyList = new TreeMap<>();\r\n }", "@Override\n public Graph newInstance(int vertexesCount) {\n return new SimpleGraph();\n }", "private static void writeStatistics(String name) throws IOException {\n fileWriter = new BufferedWriter(new FileWriter(PATH + \"/uid/\" + name));\n fileWriter.write(\"Number of Nodes total: \" + globalVertexCount);\n fileWriter.newLine();\n fileWriter.write(\"Number of Edges total: \" + globalEdgeCount);\n fileWriter.newLine();\n fileWriter.write(\"######################################\");\n fileWriter.newLine();\n fileWriter.write(\"Nodes counted:\");\n fileWriter.newLine();\n for (Map.Entry<String, Long> entry : counterMapNodes.entrySet()) {\n fileWriter\n .write(entry.getKey().replace(\"_0.csv\", \"\") + \": \" + entry.getValue());\n fileWriter.newLine();\n }\n fileWriter.write(\"######################################\");\n fileWriter.newLine();\n fileWriter.write(\"Edges counted:\");\n fileWriter.newLine();\n for (Map.Entry<String, Long> entry : counterMapEdges.entrySet()) {\n fileWriter\n .write(entry.getKey().replace(\"_0.csv\", \"\") + \": \" + entry.getValue());\n fileWriter.newLine();\n }\n fileWriter.close();\n }", "public Graph() {\r\n\t\tinit();\r\n\t}", "public Graph()\r\n\t{\r\n\t\tthis.adjacencyMap = new HashMap<String, HashMap<String,Integer>>();\r\n\t\tthis.dataMap = new HashMap<String,E>();\r\n\t}", "public ExportGraph()\n {\n }", "public Statistics() {\n }", "private void informUserOfGraphStats(CyNetwork newNetwork) {\n\t\tNumberFormat formatter = new DecimalFormat(\"#,###,###\");\n\t\tStringBuffer sb = new StringBuffer();\n\n\t\t// Give the user some confirmation\n\t\tsb.append(\"Succesfully loaded network from: \" + file.getName());\n\t\tsb.append(\"\\n\\nNetwork contains \"\n\t\t\t\t+ formatter.format(newNetwork.getNodeCount()));\n\t\tsb.append(\" nodes and \" + formatter.format(newNetwork.getEdgeCount()));\n\t\tsb.append(\" edges.\\n\\n\");\n\n\t\tif (newNetwork.getNodeCount() < Integer.parseInt(CytoscapeInit.getProperties().getProperty( \"viewThreshold\" ))) {\n\t\t\tsb.append(\"Network is under \" + CytoscapeInit.getProperties().getProperty( \"viewThreshold\" )\n\t\t\t\t\t+ \" nodes. A view will be automatically created.\");\n\t\t} else {\n\t\t\tsb.append(\"Network is over \" + CytoscapeInit.getProperties().getProperty( \"viewThreshold\" )\n\t\t\t\t\t+ \" nodes. A view has not been created.\"\n\t\t\t\t\t+ \" If you wish to view this network, use \"\n\t\t\t\t\t+ \"\\\"Create View\\\" from the \\\"Edit\\\" menu.\");\n\t\t}\n\t\ttaskMonitor.setStatus(sb.toString());\n\t}", "Graph(){\n\t\tadjlist = new HashMap<String, Vertex>();\n\t\tvertices = 0;\n\t\tedges = 0;\n\t\tkeys = new ArrayList<String>();\n\t}", "private void makeSchema(JanusGraph g) {\n JanusGraphManagement mgmt = graph.openManagement();\n if (mgmt.getVertexLabel(\"genre\") == null) {\n // Property keys\n PropertyKey genreIdKey = mgmt.makePropertyKey(\"genreId\").dataType(String.class).make();\n PropertyKey personIdKey = mgmt.makePropertyKey(\"personId\").dataType(String.class).make();\n PropertyKey userIdKey = mgmt.makePropertyKey(\"userId\").dataType(String.class).make();\n PropertyKey movieIdKey = mgmt.makePropertyKey(\"movieId\").dataType(String.class).make();\n PropertyKey nameKey = mgmt.makePropertyKey(\"name\").dataType(String.class).make();\n PropertyKey ageKey = mgmt.makePropertyKey(\"age\").dataType(Integer.class).make();\n mgmt.makePropertyKey(\"gender\").dataType(String.class).make();\n PropertyKey titleKey = mgmt.makePropertyKey(\"title\").dataType(String.class).make();\n PropertyKey yearKey = mgmt.makePropertyKey(\"year\").dataType(Integer.class).make();\n mgmt.makePropertyKey(\"duration\").dataType(Integer.class).make();\n PropertyKey countryKey = mgmt.makePropertyKey(\"country\").dataType(String.class).make();\n mgmt.makePropertyKey(\"production\").dataType(String.class).cardinality(Cardinality.LIST).make();\n PropertyKey ratingKey = mgmt.makePropertyKey(\"rating\").dataType(Integer.class).make();\n\n// Vertex labels\n VertexLabel genre = mgmt.makeVertexLabel(VL_GENRE).make(); // .properties(\"genreId\",\"name\").make();\n VertexLabel person = mgmt.makeVertexLabel(VL_PERSON).make(); // .properties(\"personId\",\"name\").make();\n VertexLabel user = mgmt.makeVertexLabel(VL_USER).make(); // .properties(\"userId\",\"age\",\"gender\").make();\n VertexLabel movie = mgmt.makeVertexLabel(VL_MOVIE).make(); // .properties(\"movieId\",\"title\",\"year\",\"duration\",\"country\",\"production\").make();\n\n// Edge labels\n mgmt.makeEdgeLabel(\"knows\").multiplicity(Multiplicity.MULTI).make(); // .connection(\"user\",\"user\").make();\n EdgeLabel ratedEdge = mgmt.makeEdgeLabel(\"rated\").multiplicity(Multiplicity.MULTI).make(); // single().properties(\"rating\").connection(\"user\",\"movie\").make();\n mgmt.makeEdgeLabel(\"belongsTo\").multiplicity(Multiplicity.MULTI).make(); // .single().connection(\"movie\",\"genre\").make();\n mgmt.makeEdgeLabel(\"actor\").multiplicity(Multiplicity.MULTI).make(); // .connection(\"movie\",\"person\").make();\n mgmt.makeEdgeLabel(\"director\").multiplicity(Multiplicity.MULTI).make(); // .single().connection(\"movie\",\"person\").make();\n\n// Vertex indexes\n mgmt.buildIndex(\"genreByIdIdx\", Vertex.class).addKey(genreIdKey).indexOnly(genre).buildCompositeIndex();\n mgmt.buildIndex(\"genreByNameIdx\", Vertex.class).addKey(nameKey).indexOnly(genre).buildCompositeIndex();\n mgmt.buildIndex(\"personByIdIdx\", Vertex.class).addKey(personIdKey).indexOnly(person).buildCompositeIndex();\n mgmt.buildIndex(\"personByNameIdx\", Vertex.class).addKey(nameKey).indexOnly(person).buildCompositeIndex();\n mgmt.buildIndex(\"userByIdIdx\", Vertex.class).addKey(userIdKey).indexOnly(user).buildCompositeIndex();\n mgmt.buildIndex(\"userByAgeIdx\", Vertex.class).addKey(ageKey).indexOnly(user).buildCompositeIndex();\n\n mgmt.buildIndex(\"moviesByIdIdx\", Vertex.class).addKey(movieIdKey).indexOnly(movie).buildCompositeIndex();\n mgmt.buildIndex(\"moviesByTitleIdx\", Vertex.class).addKey(titleKey).indexOnly(movie).buildCompositeIndex();\n// Edge indexes\n mgmt.buildIndex(\"userRatingIdx\", Edge.class).addKey(ratingKey).indexOnly(ratedEdge).buildCompositeIndex();\n mgmt.commit();\n }\n else\n mgmt.rollback();\n }", "GraphLayout createGraphLayout();", "public WGraph_DS()\n {\n modeCount=0;\n edges=0;\n HashMap<Integer,node_info>nodesHash=new HashMap<>();\n HashMap<Integer,Neighbors>edgesHash=new HashMap<>();\n }", "private void buildGraph()\n\t{\n\t\taddVerticesToGraph();\n\t\taddLinkesToGraph();\n\t}", "private void createStats(ParseUser parseUser) {\n Stats stats = new Stats();\n\n stats.setUser(parseUser);\n\n //default values\n stats.setPStat1(1);\n stats.setPStat2(1);\n stats.setPStat3(1);\n stats.setPStat4(1);\n\n stats.setSStat1(1);\n stats.setSStat2(1);\n stats.setSStat3(1);\n stats.setSStat4(1);\n\n //default category preference\n stats.setPreference(\"Rules\");\n\n stats.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if (e != null) {\n Log.e(TAG, \"Error while saving\");\n e.printStackTrace();\n return;\n }\n\n Log.d(TAG, \"Created and saved stats\");\n }\n });\n }", "public static void createStatistics() {\n\t\t\n\t\tBookingVisitor visitor = new BookingVisitor();\n\t\tPaymentType paymentType = PaymentType.MONEYWALLET;\n\t\t\n\t\tBooking booking = new Booking();\n\t\t\n\t\tvisitor.visit(booking, paymentType);\n\t\t\n\t\tint countPayPal = visitor.getCountPayPal();\n\t\tint countGoogleWallet = visitor.getCountGoogleWallet();\n\t\tint countMoneyWallet = visitor.getCountMoneyWallet();\n\t\t\n\t\tSystem.out.println(\"Payment GermanBooking by PayPal: \" + countPayPal );\n\t\tSystem.out.println(\"Payment GermanBooking by GoogleWallet: \" + countGoogleWallet);\n\t\tSystem.out.println(\"Payment GermanBooking by MoneyWallet: \" + countMoneyWallet);\n\t}", "public WeightedGraph() {\n super();\n }", "public Graph() {\n\t\ttowns = new HashSet<Town>();\n\t\troads = new HashSet<Road>();\n\t\tprevVertex = new HashMap<String, Town>();\n\t}", "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 }", "MetricModel createMetricModel();", "public void createGraphFromFile() {\n\t\t//如果图未初始化\n\t\tif(graph==null)\n\t\t{\n\t\t\tFileGetter fileGetter= new FileGetter();\n\t\t\ttry(BufferedReader bufferedReader=new BufferedReader(new FileReader(fileGetter.readFileFromClasspath())))\n\t\t\t{\n\t\t\t\tString line = null;\n\t\t\t\twhile((line=bufferedReader.readLine())!=null)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t}\n\t\t\t\t//create the graph from file\n\t\t\t\tgraph = new Graph();\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public Population(Graph graph)\r\n/* 13: */ {\r\n/* 14:36 */ g = graph.cloneGraph();\r\n/* 15: */ }", "public static void main (String[] args){\n\n Graph test = new Graph(30,\"/main/graphs/test30\");\n Graph test2 = new Graph(5,\"/main/graphs/graph5\");\n Graph g1 = new Graph(30,\"/main/graphs/graph30\");\n Graph g2 = new Graph(50,\"/main/graphs/graph50\");\n Graph g3 = new Graph(55,\"/main/graphs/graph55\");\n Graph g4 = new Graph(60,\"/main/graphs/graph60\");\n Graph g5 = new Graph(65,\"/main/graphs/graph65\");\n Graph g6 = new Graph(70,\"/main/graphs/graph70\");\n Graph g7 = new Graph(75,\"/main/graphs/graph75\");\n Graph g8 = new Graph(80,\"/main/graphs/graph80\");\n Graph g9 = new Graph(85,\"/main/graphs/graph85\");\n Graph g10 = new Graph(90,\"/main/graphs/graph90\");\n Graph g11= new Graph(100,\"/main/graphs/graph100\");\n Graph g12= new Graph(200,\"/main/graphs/graph200\");\n Graph g13= new Graph(200,\"/main/graphs/graph200_2\");\n\n Algo algo = new Algo(test);\n System.out.println(\"Graphe test : \" + algo.runNtimes((int) (10*Math.pow(2,30/2))));\n\n algo = new Algo(g1);\n System.out.println(\"Graphe a 30 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,30/2))));\n\n algo = new Algo(g2);\n System.out.println(\"Graphe a 50 sommets : \" +algo.runNtimes((int) (10*Math.pow(2,50/2))));\n\n algo = new Algo(g3);\n System.out.println(\"Graphe a 55 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,55/2))));\n\n algo = new Algo(g4);\n System.out.println(\"Graphe a 60 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,60/2))));\n\n algo = new Algo(g5);\n System.out.println(\"Graphe a 65 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,65/2))));\n\n algo = new Algo(g6);\n System.out.println(\"Graphe a 70 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,70/2))));\n\n algo = new Algo(g7);\n System.out.println(\"Graphe a 75 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,75/2))));\n\n algo = new Algo(g8);\n System.out.println(\"Graphe a 80 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,80/2))));\n\n algo = new Algo(g9);\n System.out.println(\"Graphe a 85 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,85/2))));\n\n algo = new Algo(g10);\n System.out.println(\"Graphe a 90 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,90/2))));\n\n algo = new Algo(g11);\n System.out.println(\"Graphe a 100 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,100/2))));\n\n algo = new Algo(g12);\n System.out.println(\"Graphe a 200 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,200/2))));\n\n algo = new Algo(g13);\n System.out.println(\"Graphe a 200 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,200/2))));\n\n }", "public DynamicGraph(int pintVCount, int pintEdgeCount) {\n this.hmpGraphsAtTimeframes = new HashMap<>();\n mapAllVertices = new DynamicArray<>(pintVCount);\n mapAllEdges = new DynamicArray<>(pintEdgeCount);\n darrGlobalAdjList = new DynamicArray<>(pintVCount);\n \n icommunityColors = new CommunityColors();\n }", "public Graph() {\n\t\tdictionary=new HashMap<>();\n\t}", "Graph testGraph();", "public Graph() {\n }", "public void constructJSONGraph(String name){\n \t IndexHits<Node> foundNodes = findTaxNodeByName(name);\n Node firstNode = null;\n if (foundNodes.size() < 1){\n System.out.println(\"name '\" + name + \"' not found. quitting.\");\n return;\n } else if (foundNodes.size() > 1) {\n System.out.println(\"more than one node found for name '\" + name + \"'not sure how to deal with this. quitting\");\n } else {\n for (Node n : foundNodes)\n firstNode = n;\n }\n \t\tSystem.out.println(firstNode.getProperty(\"name\"));\n \t\tTraversalDescription CHILDOF_TRAVERSAL = Traversal.description()\n \t\t .relationships( RelTypes.TAXCHILDOF,Direction.INCOMING );\n \t\tHashMap<Node,Integer> nodenumbers = new HashMap<Node,Integer>();\n \t\tHashMap<Integer,Node> numbernodes = new HashMap<Integer,Node>();\n \t\tint count = 0;\n \t\tfor(Node friendnode: CHILDOF_TRAVERSAL.traverse(firstNode).nodes()){\n \t\t\tif (friendnode.hasRelationship(Direction.INCOMING)){\n \t\t\t\tnodenumbers.put(friendnode, count);\n \t\t\t\tnumbernodes.put(count,friendnode);\n \t\t\t\tcount += 1;\n \t\t\t}\n \t\t}\n \t\tPrintWriter outFile;\n \t\ttry {\n \t\t\toutFile = new PrintWriter(new FileWriter(\"graph_data.js\"));\n \t\t\toutFile.write(\"{\\\"nodes\\\":[\");\n \t\t\tfor(int i=0; i<count;i++){\n \t\t\t\tNode tnode = numbernodes.get(i);\n \t\t\t\toutFile.write(\"{\\\"name\\\":\\\"\"+tnode.getProperty(\"name\")+\"\");\n \t\t\t\toutFile.write(\"\\\",\\\"group\\\":\"+nodenumbers.get(tnode)+\"\");\n \t\t\t\toutFile.write(\"},\");\n \t\t\t}\n \t\t\toutFile.write(\"],\\\"links\\\":[\");\n \t\t\tfor(Node tnode: nodenumbers.keySet()){\n \t\t\t\tfor(Relationship trel : tnode.getRelationships(Direction.OUTGOING)){\n \t\t\t\t\toutFile.write(\"{\\\"source\\\":\"+nodenumbers.get(trel.getStartNode())+\"\");\n \t\t\t\t\toutFile.write(\",\\\"target\\\":\"+nodenumbers.get(trel.getEndNode())+\"\");\n \t\t\t\t\toutFile.write(\",\\\"value\\\":\"+1+\"\");\n \t\t\t\t\toutFile.write(\"},\");\n \t\t\t\t}\n \t\t\t}\n \t\t\toutFile.write(\"]\");\n \t\t\toutFile.write(\"}\\n\");\n \t\t\toutFile.close();\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}", "public void newGraph(int type) {\r\n graph.getNodes().removeAllElements();\r\n graph.getEdges().removeAllElements();\r\n\r\n graphX.getNodes().removeAllElements();\r\n graphX.getEdges().removeAllElements();\r\n\r\n switch (type) {\r\n case GRAPH_UNORIENTED:\r\n graph = new GraphUnoriented();\r\n break;\r\n case GRAPH_ORIENTED:\r\n graph = new GraphOriented();\r\n break;\r\n }\r\n\r\n repaintGraph();\r\n }", "protected IWeightedGraph<GraphNode, WeightedEdge> createGraph(List<GoapState> goalState) {\r\n\t\tIWeightedGraph<GraphNode, WeightedEdge> generatedGraph = this.generateGraphObject();\r\n\r\n\t\taddVertices(generatedGraph, goalState);\r\n\t\taddEdges(generatedGraph);\r\n\r\n\t\treturn generatedGraph;\r\n\t}", "public WeightedAdjacencyGraph() {\n this.vertices = new HashMap<>();\n }", "public void createCostGraph()\n\t{\n\t\tASPManager mgr = getASPManager();\n\n\t\tint woGraphPoints;\n\t\tString costTyptemp;\n\t\tString costGraph_Ext;\n\t\tdouble woCostTemp; \n\t\tdouble strCostTemp;\n\t\tString sGraphTitle;\n\t\tString sLeftTitle;\n\n\t\tint noOfRows = itemset0.countRows(); \n\t\tGraphInNewWind = false;\n\t\tint wono = sWorkOrderNoTree;\n\n\t\tString[] woCostType = new String[noOfRows]; \n\t\tdouble[] woCost = new double[noOfRows];\n\t\tdouble[] structureCost = new double[noOfRows];\n\n\t\titemset0.first();\n\n\t\tfor (int i = 0 ; i < noOfRows ; i++)\n\t\t{\n\t\t\twoCost[i] = itemset0.getRow().getNumberValue(\"NACCUMULATEDCOSTSINGLE\");\n\t\t\twoCostType[i] = itemset0.getRow().getValue(\"SWOCOSTTYPE\");\n\t\t\tstructureCost[i] = itemset0.getRow().getNumberValue(\"NACCUMULATEDCOST\");\n\n\t\t\titemset0.forward(1);\n\t\t}\n\n\t\twoGraphPoints = 6;\n\n\t\tfor (int i = 0 ; i < noOfRows ; i++)\n\t\t{\n\t\t\tif (woCost[i]>0 || structureCost[i]>0)\n\t\t\t\tgraphflagWo = 1;\n\t\t}\n\n\t\tsGraphTitle = mgr.translate(\"PCMWWORKORDERCOSTTABLESMWOCOSTTITLE: Work Order Cost\");\n\t\tsLeftTitle = mgr.translate(\"PCMWWORKORDERCOSTTABLESMAMOUNTTR: Amount\");\n\n\t\tGraphInNewWind = true;\n\n\t\tdrawGraphPic(wono,sGraphTitle,sLeftTitle,noOfRows,woCostType,woCost,structureCost);\n\t}", "Graph getRecentGraph();", "private void initGraph() {\n nodeMap = Maps.newIdentityHashMap();\n stream.forEach(t -> {\n Object sourceKey = sourceId.extractValue(t.get(sourceId.getTableId()));\n Object targetKey = targetId.extractValue(t.get(targetId.getTableId()));\n ClosureNode sourceNode = nodeMap.get(sourceKey);\n ClosureNode targetNode = nodeMap.get(targetKey);\n if (sourceNode == null) {\n sourceNode = new ClosureNode(sourceKey);\n nodeMap.put(sourceKey, sourceNode);\n }\n if (targetNode == null) {\n targetNode = new ClosureNode(targetKey);\n nodeMap.put(targetKey, targetNode);\n }\n sourceNode.next.add(targetNode);\n });\n\n }", "public void loadOrCreateGraph() {\n if(new File(graphPath + OVERLAY_GRAPH).exists())\n loadGraph();\n else {\n System.out.println(\"No file with the graph exists\");\n createGraph();\n }\n //graph.print();\n }", "public GraphMetrics getMetrics()\r\n {\r\n if(metrics == null)\r\n metrics = new GraphMetrics(this);\r\n return metrics;\r\n }", "private static ManagementGraph constructTestManagementGraph() {\n\n\t\t/**\n\t\t * This is the structure of the constructed test graph. The graph\n\t\t * contains two stages and all three channel types.\n\t\t * 4\n\t\t * | In-memory\n\t\t * 3\n\t\t * --/ \\-- Network (was FILE)\n\t\t * 2 2\n\t\t * \\ / Network\n\t\t * 1\n\t\t */\n\n\t\t// Graph\n\t\tfinal ManagementGraph graph = new ManagementGraph(new JobID());\n\n\t\t// Stages\n\t\tfinal ManagementStage lowerStage = new ManagementStage(graph, 0);\n\t\tfinal ManagementStage upperStage = new ManagementStage(graph, 1);\n\n\t\t// Group vertices\n\t\tfinal ManagementGroupVertex groupVertex1 = new ManagementGroupVertex(lowerStage, \"Group Vertex 1\");\n\t\tfinal ManagementGroupVertex groupVertex2 = new ManagementGroupVertex(lowerStage, \"Group Vertex 2\");\n\t\tfinal ManagementGroupVertex groupVertex3 = new ManagementGroupVertex(upperStage, \"Group Vertex 3\");\n\t\tfinal ManagementGroupVertex groupVertex4 = new ManagementGroupVertex(upperStage, \"Group Vertex 4\");\n\n\t\t// Vertices\n\t\tfinal ManagementVertex vertex1_1 = new ManagementVertex(groupVertex1, new ManagementVertexID(), \"Host 1\",\n\t\t\t\"small\", 0);\n\t\tfinal ManagementVertex vertex2_1 = new ManagementVertex(groupVertex2, new ManagementVertexID(), \"Host 2\",\n\t\t\t\"medium\", 0);\n\t\tfinal ManagementVertex vertex2_2 = new ManagementVertex(groupVertex2, new ManagementVertexID(), \"Host 2\",\n\t\t\t\"medium\", 1);\n\t\tfinal ManagementVertex vertex3_1 = new ManagementVertex(groupVertex3, new ManagementVertexID(), \"Host 2\",\n\t\t\t\"medium\", 0);\n\t\tfinal ManagementVertex vertex4_1 = new ManagementVertex(groupVertex4, new ManagementVertexID(), \"Host 2\",\n\t\t\t\"medium\", 0);\n\n\t\t// Input/output gates\n\t\tfinal ManagementGate outputGate1_1 = new ManagementGate(vertex1_1, new ManagementGateID(), 0, false);\n\n\t\tfinal ManagementGate inputGate2_1 = new ManagementGate(vertex2_1, new ManagementGateID(), 0, true);\n\t\tfinal ManagementGate outputGate2_1 = new ManagementGate(vertex2_1, new ManagementGateID(), 0, false);\n\n\t\tfinal ManagementGate inputGate2_2 = new ManagementGate(vertex2_2, new ManagementGateID(), 0, true);\n\t\tfinal ManagementGate outputGate2_2 = new ManagementGate(vertex2_2, new ManagementGateID(), 0, false);\n\n\t\tfinal ManagementGate inputGate3_1 = new ManagementGate(vertex3_1, new ManagementGateID(), 0, true);\n\t\tfinal ManagementGate outputGate3_1 = new ManagementGate(vertex3_1, new ManagementGateID(), 0, false);\n\n\t\tfinal ManagementGate inputGate4_1 = new ManagementGate(vertex4_1, new ManagementGateID(), 0, true);\n\n\t\t// Group Edges\n\t\tnew ManagementGroupEdge(groupVertex1, 0, groupVertex2, 0, ChannelType.NETWORK);\n\t\tnew ManagementGroupEdge(groupVertex2, 0, groupVertex3, 0, ChannelType.NETWORK);\n\t\tnew ManagementGroupEdge(groupVertex3, 0, groupVertex4, 0, ChannelType.IN_MEMORY);\n\n\t\t// Edges\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate1_1, 0, inputGate2_1, 0,\n\t\t\tChannelType.NETWORK);\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate1_1, 1, inputGate2_2, 0,\n\t\t\tChannelType.NETWORK);\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate2_1, 0, inputGate3_1, 0,\n\t\t\tChannelType.NETWORK);\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate2_2, 0, inputGate3_1, 1,\n\t\t\tChannelType.NETWORK);\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate3_1, 0, inputGate4_1, 0,\n\t\t\tChannelType.IN_MEMORY);\n\n\t\treturn graph;\n\t}", "Graph(int size) {\n n = size;\n V = new Vertex[size + 1];\n // create an array of Vertex objects\n for (int i = 1; i <= size; i++)\n V[i] = new Vertex(i);\n }", "public void createGraph(String filename, long time, int stress) throws FileNotFoundException{\n try {\n OutputStream outputstreamdata_reader = openFileOutput(filename, MODE_APPEND);\n OutputStreamWriter outputstreamdata_writer = new OutputStreamWriter(outputstreamdata_reader);\n outputstreamdata_writer.write(time + \",\" + stress + \"\\r\\n\");\n outputstreamdata_writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public HashGraph()\n {\n graph = new HashMap <>();\n }", "public void constructGraph() {\n graph = new double[array.length][array.length];\n for (int i = 0; i < graph.length; i++) {\n Crime c1 = array[i];\n for (int j = 0; j < graph.length; j++) {\n Crime c2 = array[j];\n graph[i][j] = ((c1.getX() - c2.getX()) * (c1.getX() - c2.getX()) +\n (c1.getY() - c2.getY()) * (c1.getY() - c2.getY()));\n }\n }\n }", "IGraphEngine graphEngineFactory();", "public Graph() {\r\n\t\tthis.matrix = new Matrix();\r\n\t\tthis.listVertex = new ArrayList<Vertex>();\r\n\t}", "public CachedSubsumptionGraph() {\n }", "public static GraphNode createGraphNodeForUseCase() {\n GraphNode graphNode = new GraphNode();\n GraphNode graphNodeName = new GraphNode();\n\n for (int i = 0; i < 3; i++) {\n GraphNode childNode = new GraphNode();\n\n childNode.setPosition(AccuracyTestHelper.createPoint(60, 20 + 20 * i));\n childNode.setSize(AccuracyTestHelper.createDimension(100, 22));\n\n graphNodeName.addContained(childNode);\n }\n\n graphNode.addContained(graphNodeName);\n\n graphNode.setPosition(AccuracyTestHelper.createPoint(20, 20));\n graphNode.setSize(AccuracyTestHelper.createDimension(100, 100));\n\n // create a use case\n UseCase usecase = new UseCaseImpl();\n\n // set stereotype\n Stereotype stereotype = new StereotypeImpl();\n usecase.addStereotype(stereotype);\n\n // set namespace\n Namespace namespace = new MockAccuracyNamespaceImpl();\n usecase.setNamespace(namespace);\n\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(usecase);\n\n graphNode.setSemanticModel(semanticModel);\n\n return graphNode;\n }", "public static void generateGraph(IDistanceMeasure measure, List<BitSet> cluster, long size, String outputPath, String title)\n\t{\n\t\tfinal long start_seconds= 1258884000; //start time of evanbd's dataset\n\t\tAbstractLeastSquaresOptimizer optimizer = new LevenbergMarquardtOptimizer();\n\t\toptimizer.setMaxIterations(Integer.MAX_VALUE);\n\t\t\n\t\tPolynomialFitter fitter = new PolynomialFitter(2, optimizer);\n\t\t\n\t\t//calculate the total number of nodes at each time index\n\t\tString data = \"\";\n\t\tfor(int i=0; i < size; i++)\n\t\t{\n\t\t\tint count = 0;\n\t\t\tfor(BitSet node : cluster)\n\t\t\t{\n\t\t\t\tif (node.get((int)i)) count++;\n\t\t\t}\n\n\t\t\tif (count >= 0)\n\t\t\t{\n\t\t\t\tif (i > (size-10)) fitter.addObservedPoint(1.0, i, count);\n\t\t\t\tdata += (start_seconds + i*5*60*60) + \"\\t \" + count + \"\\n\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t//calculate mean samples\n\t\tList<Integer> samples = new LinkedList<Integer>();\n\t\tlong nodes_mean_sample = 0; //In how many samples are the nodes by average?\n\t\tfor(BitSet node : cluster)\n\t\t{\n\t\t\tnodes_mean_sample += node.cardinality();\n\t\t\tsamples.add(node.cardinality());\n\t\t}\n\t\tnodes_mean_sample = nodes_mean_sample / cluster.size();\n\t\t\n\t\tCollections.sort(samples);\n\t\tint minimum = samples.get(0);\n\t\tint maximum = samples.get(samples.size()-1);\n\t\tint median = samples.get(Math.round(samples.size() / 2));\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tPolynomialFunction function = null;\n\t\t\n\t\ttry {\n\t\t\tfunction = fitter.fit();\n\t\t} catch (MathException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tfor(long i=size; i < size+extrapolate_time; i++)\n\t\t{\n\t\t\t//System.out.println(i);\n\t\t\tdouble value = i;\n\t\t\t\tdata += i + \"\\t \" + function.value(value) + \"\\n\";\n\t\t}\n\t\t\n\t\t\n\t\tString name = Integer.toString(Math.abs(cluster.hashCode()));\n\t\t\n\t\t//write data to file\n\t\tFile outputFileData = new File(outputPath + measure.getName() + \"_\" + name + \".data\");\n\t\twriteString(outputFileData, data);\n\t\n\t\tString gnuplot = \"set autoscale\\n\" + \n\t\t\"set terminal png medium\\n\" +\n\t\t\"set output \\\"\" + measure.getName() + \"_\" + name+\".png\\\"\\n\" +\n\t\t\"unset log\\n\" +\n\t\t\"unset label\\n\" +\n\t\t\"set title \\\"\"+title+\" containing \"+ cluster.size() +\" nodes.\\\\nMean number of samples that nodes appear in: \"+nodes_mean_sample + \"\\\\n\" +\n\t\t\t\"minimum: \"+minimum+\", maximum: \"+maximum+\", median: \"+median+\"\\\"\\n\" +\n\t\t\"set xtic auto rotate \\n\" +\n\t\t\"set ytic auto\\n\" +\n\t\t\"set key right bottom\\n\" +\n\t\t\"set ylabel \\\"Nodes in probe request sample\\\"\\n\" +\n\t\t\"set xlabel \\\"Time\\\"\\n\" +\n\t\t\"set xdata time\\n\" +\n\t \"set timefmt \\\"%s\\\"\\n\" +\n\t\t\"plot \\\"\"+ measure.getName() + \"_\" + Math.abs(cluster.hashCode())+\".data\\\" using 1:2 with lines\\n\";\n\t\t\n\t\tFile outputFileDataGnuPLot = new File(outputPath + measure.getName() + \"_\" + Math.abs(cluster.hashCode()) + \".p\");\n\t\twriteString(outputFileDataGnuPLot, gnuplot);\n\t}", "public BaseStatistics() {\n\t\tsuper();\n\t}", "public PollutedVarsPointsToAnalysis(DirectedGraph<Unit> graph) {\n super(graph);\n emptyMap = new HashMap<>();\n initialMap = new HashMap<>();\n\n }", "public Graph createGraph() {\n String fileName;\n// fileName =\"./428333.edges\";\n String line;\n Graph g = new Graph();\n// List<String> vertexNames = new ArrayList<>();\n// try\n// {\n// BufferedReader in=new BufferedReader(new FileReader(fileName));\n// line=in.readLine();\n// while (line!=null) {\n////\t\t\t\tSystem.out.println(line);\n// String src = line.split(\" \")[0];\n// String dst = line.split(\" \")[1];\n//// vertexNames.add(src);\n//// vertexNames.add(dst);\n//// System.out.println(src+\" \"+dst);\n// g.addEdge(src, dst, 1);\n// line=in.readLine();\n// }\n// in.close();\n// } catch (Exception e) {\n//\t\t\te.printStackTrace();\n// }\n\n fileName=\"./788813.edges\";\n// List<String> vertexNames = new ArrayList<>();\n try\n {\n BufferedReader in=new BufferedReader(new FileReader(fileName));\n line=in.readLine();\n while (line!=null) {\n//\t\t\t\tSystem.out.println(line);\n String src = line.split(\" \")[0];\n String dst = line.split(\" \")[1];\n g.addEdge(src, dst, 1);\n line=in.readLine();\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n// Graph g = new Graph(new String[]{\"v0\", \"v1\", \"v2\", \"v3\", \"v4\", \"v5\", \"v6\", \"v7\", \"v8\"});\n// // Add the required edges.\n// g.addEdge(\"v0\", \"v1\", 4); g.addEdge(\"v0\", \"v7\", 8);\n// g.addEdge(\"v1\", \"v2\", 8); g.addEdge(\"v1\", \"v7\", 11); g.addEdge(\"v2\", \"v1\", 8);\n// g.addEdge(\"v2\", \"v8\", 2); g.addEdge(\"v2\", \"v5\", 4); g.addEdge(\"v2\", \"v3\", 7);\n// g.addEdge(\"v3\", \"v2\", 7); g.addEdge(\"v3\", \"v5\", 14); g.addEdge(\"v3\", \"v4\", 9);\n// g.addEdge(\"v4\", \"v3\", 9); g.addEdge(\"v4\", \"v5\", 10);\n// g.addEdge(\"v5\", \"v4\", 10); g.addEdge(\"v5\", \"v3\", 9); g.addEdge(\"v5\", \"v2\", 4);\n// g.addEdge(\"v5\", \"v6\", 2);\n// g.addEdge(\"v6\", \"v7\", 1); g.addEdge(\"v6\", \"v8\", 6); g.addEdge(\"v6\", \"v5\", 2);\n// g.addEdge(\"v7\", \"v0\", 8); g.addEdge(\"v7\", \"v8\", 7); g.addEdge(\"v7\", \"v1\", 11);\n// g.addEdge(\"v7\", \"v6\", 1);\n// g.addEdge(\"v8\", \"v2\", 2); g.addEdge(\"v8\", \"v7\", 7); g.addEdge(\"v8\", \"v6\", 6);\n\n//\n return g;\n }", "public weighted_graph copy();", "public void createGraphPanel(List<String> states){\n\t\tgraph = new GraphPanel(states);\n\t\tgraph.update(updatePopulations(), 0);\n\t}", "@SuppressWarnings(\"rawtypes\")\r\n\tpublic Graph() {\r\n \tthis.vertex = new HashMap<T, Vertex>();\r\n \tthis.edge = new HashMap<Integer, Edge>();\r\n }", "public DescriptiveStatistics generateStatistics() {\n\t\tdouble[] sentimentValues = new double[this.sentimentValues.size()];\n\t\t\n\t\t//Casts each value in the sentimentValues array list to a double for processing with StatUtils package.\n\t\tfor (int i = 0; i < sentimentValues.length; i++) {\n\t\t\tsentimentValues[i] = (double) this.sentimentValues.get(i);\n\t\t}\n\t\t\n\t\tthis.statistics = new DescriptiveStatistics(sentimentValues);\n\t\treturn this.statistics;\n\t}", "public:\n Graph(int V); // Constructor\n void addEdge(int v, int w);", "public static Graph<Vertex,Edge> createGraphObject()\n\t{\n\t\tGraph<Vertex,Edge> g = new DirectedSparseMultigraph<Vertex, Edge>();\n\t\treturn g;\n\t}", "public static weighted_graph graphCreator(int node_size, int edge_size) {\n weighted_graph ga = new WGraph_DS();\n for (int i = 0; i < node_size; i++) {\n ga.addNode(i);\n }\n for (int i = 0; i < edge_size; i++) {\n double weight = Math.random();\n int vertex1 = (int) (Math.random() * node_size);\n int vertex2 = (int) (Math.random() * node_size);\n ga.connect(vertex1,vertex2,weight);\n }\n return ga;\n }", "private void stats ( ) {\n\n nodes = 0;\n depth = 0;\n\n parse(((GPIndividual)program).trees[0].child);\n\n }", "private static interface NewMetric<T> {\n T newMetric(Class<?> clazz, String name, String scope);\n }", "public Graph getGraph();", "public SmallStatistic() {\n\n }", "@Override\n public void visitStats(CharacterStats stats) {\n Element statElm = doc.createElement(\"Stats\");\n\n Attr agilityStats = doc.createAttribute(\"agility\");\n agilityStats.setValue(Integer.toString(stats.getAgility()));\n statElm.setAttributeNode(agilityStats);\n\n Attr experience = doc.createAttribute(\"experience\");\n experience.setValue(Integer.toString(stats.getExperience()));\n statElm.setAttributeNode(experience);\n\n Attr hardiness = doc.createAttribute(\"hardiness\");\n hardiness.setValue(Integer.toString(stats.getHardiness()));\n statElm.setAttributeNode(hardiness);\n\n Attr intellect = doc.createAttribute(\"intellect\");\n intellect.setValue(Integer.toString(stats.getIntellect()));\n statElm.setAttributeNode(intellect);\n\n Attr lives = doc.createAttribute(\"lives\");\n lives.setValue(Integer.toString(stats.getLives()));\n statElm.setAttributeNode(lives);\n\n Attr strength = doc.createAttribute(\"strength\");\n strength.setValue(Integer.toString(stats.getStrength()));\n statElm.setAttributeNode(strength);\n\n Attr health = doc.createAttribute(\"health\");\n health.setValue(Integer.toString(stats.getHealth()));\n statElm.setAttributeNode(health);\n\n Attr mana = doc.createAttribute(\"mana\");\n mana.setValue(Integer.toString(stats.getMana()));\n statElm.setAttributeNode(mana);\n\n //Base stuff\n Attr baseAgilityStats = doc.createAttribute(\"base-agility\");\n baseAgilityStats.setValue(Integer.toString(stats.getBaseAgility()));\n statElm.setAttributeNode(baseAgilityStats);\n\n Attr baseHardiness = doc.createAttribute(\"base-hardiness\");\n baseHardiness.setValue(Integer.toString(stats.getBaseHardiness()));\n statElm.setAttributeNode(baseHardiness);\n\n Attr baseIntellect = doc.createAttribute(\"base-intellect\");\n baseIntellect.setValue(Integer.toString(stats.getBaseIntellect()));\n statElm.setAttributeNode(baseIntellect);\n\n Attr baseLive = doc.createAttribute(\"base-lives\");\n baseLive.setValue(Integer.toString(stats.getBaseLives()));\n statElm.setAttributeNode(baseLive);\n\n Attr baseStrength = doc.createAttribute(\"base-strength\");\n baseStrength.setValue(Integer.toString(stats.getBaseStrength()));\n statElm.setAttributeNode(baseStrength);\n\n Attr baseHealth = doc.createAttribute(\"base-health\");\n baseHealth.setValue(Integer.toString(stats.getBaseHealth()));\n statElm.setAttributeNode(baseHealth);\n\n Attr baseMana = doc.createAttribute(\"base-mana\");\n baseMana.setValue(Integer.toString(stats.getBaseMana()));\n statElm.setAttributeNode(baseMana);\n\n characterList.add(statElm);\n\n\n }", "private void initDistinctVertices() {\n this.distinctSourceCount = new HashMap<>();\n this.distinctTargetCount = new HashMap<>();\n\n // for every type of edge...\n for (Map.Entry<String, TemporalElementStats> entries : edgeStats.entrySet()) {\n TemporalElementStats stats = edgeStats.get(entries.getKey());\n List<TemporalElement> sample = stats.getSample();\n int sampleSize = sample.size();\n // ...extract source and target vertex IDs of the edges...\n HashSet<GradoopId> sourceIds = new HashSet<>();\n HashSet<GradoopId> targetIds = new HashSet<>();\n for (TemporalElement edge : sample) {\n sourceIds.add(((TemporalEdge) edge).getSourceId());\n targetIds.add(((TemporalEdge) edge).getTargetId());\n }\n // ... and estimate distinct source and target vertices naively\n long sourceEstimation = sourceIds.size() *\n (stats.getElementCount() / sampleSize);\n long targetEstimation = targetIds.size() *\n (stats.getElementCount() / sampleSize);\n distinctSourceCount.put(entries.getKey(), sourceEstimation);\n distinctTargetCount.put(entries.getKey(), targetEstimation);\n }\n }", "public Stats() {\n this(DSL.name(\"stats\"), null);\n }", "public Graph(){\r\n this.listEdges = new ArrayList<>();\r\n this.listNodes = new ArrayList<>();\r\n this.shown = true;\r\n }", "public void printStats() {\n\t\t\n\t\tif(grafo==null) {\n\t\t\t\n\t\t\tthis.createGraph();\n\t\t}\n\t\t\n\t\tConnectivityInspector <Airport, DefaultWeightedEdge> c = new ConnectivityInspector<>(grafo);\n\t\t\n\t\tSystem.out.println(c.connectedSets().size());\n\n\t}", "public AuditJanusGraph (JanusGraph g) {\n\t\tthis.graph = g;\n\t\tbuildSchema();\n\t}", "@Test(timeout = 5000)\n public void graphTest_runtime() {\n int v=1000*50, e=v*6;\n graph g = graph_creator(v,e,1);\n // while(true) {;}\n }", "public List<Graph> createGraphs(Graph g) {\n List<Graph> gg = new ArrayList<>();\n Graph tmpG = g, tmp;\n\n boolean hasDisconnG = true;\n while (hasDisconnG) {\n // get one vertex as source vertex\n List<Vertex> vertexes = new ArrayList<>(tmpG.getVertices().values());\n calcSP(tmpG, vertexes.get(0));\n gg.add(tmpG);\n hasDisconnG = false;\n List<Vertex> vv = new ArrayList<>();\n for (Vertex v : tmpG.getVertices().values()) {\n if (v.minDistance == Double.POSITIVE_INFINITY) {\n // System.out.println(\"Vertex: \" + v.name + \", dist: \" + v.minDistance);\n vv.add(v);\n hasDisconnG = true;\n }\n }\n\n if (hasDisconnG) {\n tmp = new Graph();\n for (Vertex v: vv) {\n tmpG.removeVertex(v.name);\n for (Edge e: v.neighbours) {\n tmp.addEdge(v.name, e.target.name, 1);\n }\n }\n tmpG = tmp;\n }\n }\n return gg;\n }", "public MapGraph()\n {\n this.nodes = new HashMap<Integer, MapNode>();\n this.edges = new HashMap<Integer, Set<MapEdge>>();\n this.nodesByName = new HashMap<String, Set<Integer>>();\n }", "public static Graph createGraphFromDataSet(DataSet dataset){\n Logger logger = LoggerFactory.getLogger(GSHelper.class);\n Graph g = new DefaultGraph(\"temp\");\n g.setStrict(false);\n g.setAutoCreate(true); //automatically create nodes based on edges\n for (CoriaEdge edge : dataset.getEdges()) {\n try {\n logger.trace(\"Edge: \" + edge);\n Edge e = g.addEdge(edge.getSourceNode() + \"->\" + edge.getDestinationNode(), edge.getSourceNode(), edge.getDestinationNode());\n for(Map.Entry<String, String> att : edge.getAttributes().entrySet()){\n e.addAttribute(att.getKey(), att.getValue());\n }\n } catch (Exception ex) {\n logger.error(\"failed creating edge for CoriaEdge {}\", edge);\n logger.error(ex.getMessage());\n return null;\n }\n }\n return g;\n }", "public Graph() {\r\n\t\tnodePos = new HashMap<Integer, Vec2D>();\r\n\t\tconnectionLists = new HashMap<Integer, List<Connection>>();\r\n\t\t//screenWidth = Config.SCREEN_WIDTH;\r\n\t}", "public void updateGraph(){\n int cont=contador;\n eliminar(0);\n construir(cont);\n }", "private void initializeGraph() {\r\n map = new HashMap<>();\r\n graph = new List[n];\r\n for (int i = 0; i < n; i++) graph[i] = new ArrayList<>();\r\n\r\n\r\n }", "private void graphInfo() {\n \n this.distances = new double[this.cities.size()][this.cities.size()];\n \n City c1, c2;\n \n // take the city\n for (int i = 0; i < this.cities.size(); i++) {\n // go through all the other cities\n c1 = this.cities.get(i);\n for (int j = 0; j < this.cities.size(); j++) {\n c2 = this.cities.get(j);\n this.distances[i][j] = c1.to(c2);\n }\n }\n \n }", "public void constructGraph(){\r\n\t\tmyGraph = new Graph();\r\n\r\n\t\tfor(int i =0;i<=35;i++) {\r\n\t\t\tmyGraph.addVertex(allSpots[i]);\r\n\t\t}\r\n\r\n\t\tfor(int i =0;i<=35;i++) {\r\n\t\t\tint th = i;\r\n\t\t\twhile(th%6!=0) {\r\n\t\t\t\tth--;\r\n\t\t\t}\r\n\t\t\tfor(int h=th;h<=th+5;h++) {\r\n\t\t\t\tif(h!=i) {\r\n\t\t\t\t\tif(allSpots[i].equals(allSpots[h])) {\t\t\r\n\t\t\t\t\t\tmyGraph.addEdge(allSpots[i], allSpots[h]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tint tv=i;\r\n\t\t\twhile(tv-6>0) {\r\n\t\t\t\ttv=tv-6;\r\n\t\t\t}\r\n\t\t\tfor(int v=tv;v<36; v=v+6) {\r\n\t\t\t\tif(v!=i) {\r\n\t\t\t\t\tif(allSpots[i].equals(allSpots[v])) {\t\t\r\n\t\t\t\t\t\tmyGraph.addEdge(allSpots[i], allSpots[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\r\n\t\t//Add verticies that store the Spot objects\r\n\t\t//Add edges to connect spots that share a property along an orthogonal direction\r\n\r\n\t\t//This is the ONLY time it is ok to iterate the array.\r\n\t\t\r\n\t\t//myGraph.addVert(...);\r\n\t\t//myGraph.addEdge(...);\r\n\t}", "public void initGraph(GraphData graphData) {\r\n \t\r\n \tGraph g = graphData.getGraph();\r\n \r\n // add visual data groups\r\n \tsetGraph(g, \"social graph\");\r\n \t\r\n \t/*\r\n \tint numEdges = g.getEdges().getTupleCount();\r\n\t\tint numEdgesToRemove = 0;\r\n\t\tif (numEdges < 6)\r\n\t\t\tnumEdgesToRemove = 0;\r\n\t\telse \r\n\t\t\tnumEdgesToRemove = 6;\r\n\t\t*/\r\n \tint numEdgesToRemove = 0;\r\n \t\r\n \t\tthis.clusterSize = clusterGraph(numEdgesToRemove, false);\r\n \t\r\n // set up the renderers \r\n // draw the nodes as basic shapes\r\n //Renderer nodeR = new ShapeRenderer(20); \r\n LabelRenderer nodeR = new LabelRenderer(\"label\", \"image\"); \r\n nodeR.setRoundedCorner(10, 10); \r\n nodeR.setImagePosition(Constants.TOP); \r\n \r\n // draw aggregates as polygons with curved edges\r\n Renderer polyR = new PolygonRenderer(Constants.POLY_TYPE_CURVE);\r\n ((PolygonRenderer)polyR).setCurveSlack(0.15f);\r\n \r\n DefaultRendererFactory drf = new DefaultRendererFactory();\r\n drf.setDefaultRenderer(nodeR);\r\n drf.add(\"ingroup('aggregates')\", polyR);\r\n m_vis.setRendererFactory(drf); \r\n \r\n // fix selected focus nodes\r\n TupleSet focusGroup = m_vis.getGroup(Visualization.FOCUS_ITEMS); \r\n focusGroup.addTupleSetListener(new TupleSetListener() {\r\n public void tupleSetChanged(TupleSet ts, Tuple[] add, Tuple[] rem) {\r\n for ( int i=0; i<rem.length; ++i )\r\n ((VisualItem)rem[i]).setFixed(false);\r\n for ( int i=0; i<add.length; ++i ) {\r\n ((VisualItem)add[i]).setFixed(false);\r\n ((VisualItem)add[i]).setFixed(true);\r\n }\r\n if ( ts.getTupleCount() == 0 ) {\r\n ts.addTuple(rem[0]);\r\n ((VisualItem)rem[0]).setFixed(false);\r\n }\r\n m_vis.run(\"draw\");\r\n }\r\n });\r\n \r\n // set up the visual operators\r\n // first set up all the color actions \r\n ColorAction nNodeStroke = new ColorAction(NODES, VisualItem.STROKECOLOR, 0); \r\n \r\n ColorAction nNodeFill = new ColorAction(NODES, VisualItem.FILLCOLOR, ColorLib.rgb(200,200,255));\r\n nNodeFill.add(VisualItem.FIXED, ColorLib.rgb(255,100,100));\r\n nNodeFill.add(VisualItem.HIGHLIGHT, ColorLib.rgb(255,200,125));\r\n \r\n ColorAction nNodeText = new ColorAction(NODES, VisualItem.TEXTCOLOR, ColorLib.rgb(0,0,0));\r\n \r\n ColorAction nEdgeFill = new ColorAction(EDGES, VisualItem.FILLCOLOR, ColorLib.gray(200)); \r\n \r\n ColorAction nEdgeStroke = new ColorAction(EDGES, VisualItem.STROKECOLOR, ColorLib.gray(200));\r\n \r\n ColorAction aStroke = new ColorAction(AGGR, VisualItem.STROKECOLOR);\r\n aStroke.setDefaultColor(ColorLib.gray(200));\r\n aStroke.add(\"_hover\", ColorLib.rgb(255,100,100));\r\n \r\n int[] palette = new int[] {\r\n ColorLib.rgba(255,200,200,150),\r\n ColorLib.rgba(200,255,200,150),\r\n ColorLib.rgba(200,200,255,150),\r\n ColorLib.rgba(216,134,134,150),\r\n ColorLib.rgba(135,137,211,150),\r\n ColorLib.rgba(134,206,189,150),\r\n ColorLib.rgba(206,176,134,150),\r\n ColorLib.rgba(194,204,134,150),\r\n ColorLib.rgba(145,214,134,150),\r\n ColorLib.rgba(133,178,209,150),\r\n ColorLib.rgba(103,148,255,150),\r\n ColorLib.rgba(60,220,220,150),\r\n ColorLib.rgba(30,250,100,150)\r\n };\r\n \r\n ColorAction aFill = new DataColorAction(AGGR, \"id\",\r\n Constants.NOMINAL, VisualItem.FILLCOLOR, palette);\r\n \r\n // bundle the color actions\r\n ActionList draw = new ActionList();\r\n draw.add(nNodeStroke);\r\n draw.add(nNodeFill);\r\n draw.add(nNodeText);\r\n draw.add(nEdgeFill);\r\n draw.add(nEdgeStroke);\r\n draw.add(aStroke);\r\n draw.add(aFill); \r\n \r\n ForceSimulator forceSimulator = new ForceSimulator();\r\n\t\tforceSimulator.addForce(new NBodyForce(-1.0f, -1.0f, 0.899f));\r\n\t\tforceSimulator.addForce(new DragForce(0.009f));\r\n\t\tforceSimulator.addForce(new SpringForce(9.99E-6f, 200.0f));\r\n \r\n // now create the main layout routine\r\n ActionList animate = new ActionList(Activity.INFINITY);\r\n ForceDirectedLayout layout = new ForceDirectedLayout(GRAPH, forceSimulator, true); \r\n animate.add(layout);\r\n animate.add(draw); \r\n animate.add(new AggregateLayout(AGGR));\r\n animate.add(new RepaintAction());\r\n \r\n // finally, we register our ActionList with the Visualization.\r\n // we can later execute our Actions by invoking a method on our\r\n // Visualization, using the name we've chosen below.\r\n m_vis.putAction(\"draw\", draw); \r\n m_vis.putAction(\"layout\", animate);\r\n m_vis.runAfter(\"draw\", \"layout\"); \r\n \r\n // set up the display\r\n setSize(700, 700);\r\n pan(350, 350);\r\n setHighQuality(true);\r\n setForeground(Color.GRAY);\r\n setBackground(Color.WHITE);\r\n addControlListener(new AggregateDragControl());\r\n addControlListener(new ZoomControl());\r\n addControlListener(new PanControl()); \r\n addControlListener(new FocusControl(1));\r\n addControlListener(new DragControl());\r\n addControlListener(new WheelZoomControl());\r\n addControlListener(new ZoomToFitControl());\r\n addControlListener(new NeighborHighlightControl());\r\n \r\n\t\taddControlListener(new ControlAdapter() {\r\n\r\n\t\t\tpublic void itemEntered(VisualItem item, MouseEvent e) {\r\n\t\t\t\t//System.out.println(\"itemEntered....................\");\r\n\t\t\t\tif (item.isInGroup(NODES)) {\r\n\t\t\t\t\titem.setFillColor(ColorLib.rgb(255,200,125));\r\n\t\t\t\t\titem.setStrokeColor(ColorLib.rgb(255,200,125));\r\n\t\t\t\t\titem.getVisualization().repaint();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpublic void itemExited(VisualItem item, MouseEvent e) {\r\n\t\t\t\t//System.out.println(\"itemExited....................\");\r\n\t\t\t\tif (item.isInGroup(NODES)) {\r\n\t\t\t\t\tif (item.isInGroup(Visualization.FOCUS_ITEMS)) {\r\n\t\t\t\t\t\titem.setFillColor(ColorLib.rgb(255,200,125));\r\n\t\t\t\t\t\titem.setStrokeColor(ColorLib.rgb(255,200,125));\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\titem.getVisualization().repaint();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpublic void itemPressed(VisualItem item, MouseEvent e) {\r\n\t\t\t\t//System.out.println(\"itemPressed....................\");\r\n\t\t\t\t\r\n\t\t\t\tif (e.getClickCount() == 2) {\r\n\t\t\t\t\tSystem.out.println(\"itemDoubleClicked....................\");\r\n\t\t\t\t\tString id = item.getString(\"id\");\r\n\t\t\t\t\tif (id != null) {\r\n\t\t\t\t\t\tSystem.out.println(\"ID[\" + id + \"] is selected.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (item.isInGroup(NODES)) {\r\n\t\t\t\t\t//System.out.println(\"Node Selected....\");\r\n\t\t\t\t\titem.setFillColor(ColorLib.rgb(255,200,125));\r\n\t\t\t\t\titem.setStrokeColor(ColorLib.rgb(255,200,125));\r\n\t\t\t\t\titem.getVisualization().repaint();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (e.isPopupTrigger()) {\r\n\t\t\t\t\tSystem.out.println(\"---------isPopupTrigger....................\");\r\n\t\t\t\t\tString id = item.getString(\"id\");\r\n\t\t\t\t\tif (id != null) {\r\n\t\t\t\t\t\tSystem.out.println(\"ID[\" + id + \"] popup menu selected.\");\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 \r\n // set things running\r\n m_vis.run(\"layout\"); \t\r\n }", "@Override\n\tpublic void analyze(Graph graph, Map<String, DescriptiveStatistics> statsMap) {\n\t\tDescriptiveStatistics distr = module.distribution(graph);\n\t\tdouble numComponents = distr.getN();\n\t\tsingleValueStats(NUM_COMPONENTS, numComponents, statsMap);\n\n\t\tlogger.info(String.format(\"%1$s disconnected components.\", numComponents));\n\t\t\n\t\tif(outputDirectoryNotNull()) {\n\t\t\tTDoubleDoubleHashMap hist = Histogram.createHistogram(distr, new LinearDiscretizer(1.0), false);\n\t\t\ttry {\n\t\t\t\tTXTWriter.writeMap(hist, \"size\", \"n\", String.format(\"%1$s/components.txt\", getOutputDirectory()));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "void updateGraph(TimeSlot[] dataList) {\n \tXYChart.Series<String, Number> series = new XYChart.Series<String, Number>();\n \tfor(int i=0; i<dataList.length; i++) {\n \t\tTimeSlot t = dataList[i];\n \t\tseries.getData().add(new XYChart.Data<String, Number>(TimeSlot.getTime(i), t.getDifference()));\n \t}\n \tgraph.getData().add(series);\n }", "public weighted_graph getGraph();" ]
[ "0.65636504", "0.63402504", "0.6223766", "0.6108251", "0.60059303", "0.58987206", "0.5898187", "0.5851093", "0.58379734", "0.58134127", "0.57909596", "0.572367", "0.57214653", "0.56426316", "0.56249124", "0.56071615", "0.5571095", "0.5537738", "0.5536168", "0.5502458", "0.548364", "0.5458682", "0.5458301", "0.5445442", "0.54334384", "0.5428286", "0.5409777", "0.54023635", "0.540075", "0.53695476", "0.5366354", "0.535418", "0.53380764", "0.53264076", "0.532201", "0.5310864", "0.5301557", "0.5296073", "0.5295368", "0.52832425", "0.52791506", "0.52704895", "0.5270216", "0.5268036", "0.5263768", "0.52545124", "0.5250385", "0.52483755", "0.5245003", "0.52416414", "0.5240776", "0.5229163", "0.5228552", "0.5226952", "0.52176696", "0.52129275", "0.51966494", "0.5194471", "0.5188986", "0.51888937", "0.518851", "0.51883185", "0.51828843", "0.51825315", "0.518107", "0.51640147", "0.51582843", "0.5148473", "0.51324", "0.51150495", "0.51078355", "0.5107796", "0.5098631", "0.50982875", "0.5088468", "0.50873905", "0.50616646", "0.50611717", "0.50594246", "0.5058366", "0.5038808", "0.5024433", "0.50222266", "0.50175005", "0.50167024", "0.5015799", "0.50140667", "0.50041986", "0.50027823", "0.5001007", "0.50004137", "0.49998507", "0.49941775", "0.49933448", "0.4990259", "0.49892932", "0.49889436", "0.49880156", "0.49804583", "0.4979045" ]
0.57216674
12
Initializes the statistics for distinct vertices
private void initDistinctVertices() { this.distinctSourceCount = new HashMap<>(); this.distinctTargetCount = new HashMap<>(); // for every type of edge... for (Map.Entry<String, TemporalElementStats> entries : edgeStats.entrySet()) { TemporalElementStats stats = edgeStats.get(entries.getKey()); List<TemporalElement> sample = stats.getSample(); int sampleSize = sample.size(); // ...extract source and target vertex IDs of the edges... HashSet<GradoopId> sourceIds = new HashSet<>(); HashSet<GradoopId> targetIds = new HashSet<>(); for (TemporalElement edge : sample) { sourceIds.add(((TemporalEdge) edge).getSourceId()); targetIds.add(((TemporalEdge) edge).getTargetId()); } // ... and estimate distinct source and target vertices naively long sourceEstimation = sourceIds.size() * (stats.getElementCount() / sampleSize); long targetEstimation = targetIds.size() * (stats.getElementCount() / sampleSize); distinctSourceCount.put(entries.getKey(), sourceEstimation); distinctTargetCount.put(entries.getKey(), targetEstimation); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected BinningTemporalGraphStatistics(List<TemporalElementStats> vertexStats,\n List<TemporalElementStats> edgeStats,\n Set<String> relevantProperties) {\n this.vertexStats = new HashMap<>();\n this.edgeStats = new HashMap<>();\n this.vertexCount = 0L;\n this.edgeCount = 0L;\n for (TemporalElementStats edgeStat : edgeStats) {\n this.edgeStats.put(edgeStat.getLabel(), edgeStat);\n this.edgeCount += edgeStat.getElementCount();\n }\n for (TemporalElementStats vertexStat : vertexStats) {\n this.vertexStats.put(vertexStat.getLabel(), vertexStat);\n this.vertexCount += vertexStat.getElementCount();\n }\n this.relevantProperties = relevantProperties;\n initDistinctVertices();\n }", "AdjacencyGraph(){\r\n vertices = new HashMap<>();\r\n }", "public UnivariateStatsData() {\n super();\n }", "@PostConstruct\n public void init() {\n for (final Stat stat: Stat.ALL_STATS) {\n effortValues.put(stat, new SimpleIntegerProperty(0));\n minIndividualValues.put(stat, new SimpleIntegerProperty(0));\n maxIndividualValues.put(stat, new SimpleIntegerProperty(31));\n if (!stat.equals(Stat.HP)) {\n minMinusIndividualValues.put(stat, new SimpleIntegerProperty(0));\n maxMinusIndividualValues.put(stat, new SimpleIntegerProperty(31));\n minNeutralIndividualValues.put(stat, new SimpleIntegerProperty(0));\n maxNeutralIndividualValues.put(stat, new SimpleIntegerProperty(31));\n minPlusIndividualValues.put(stat, new SimpleIntegerProperty(0));\n maxPlusIndividualValues.put(stat, new SimpleIntegerProperty(31));\n }\n\n }\n reset();\n }", "public Graph(int numberOfVertices){\r\n this.numberOfVertices = numberOfVertices;\r\n this.adjacencyList = new TreeMap<>();\r\n }", "private void initializeStats() {\n for (Stat stat:Stat.values()) {\n stats.put(stat, initialValue);\n }\n }", "private void initVariables(){\n int counter = 1;\n for (int vCount = 0; vCount < vertexCount; vCount++){\n for (int pCount = 0; pCount < positionCount; pCount++){\n variables[vCount][pCount] = counter++;\n }\n }\n }", "private void initializeGraph() {\r\n map = new HashMap<>();\r\n graph = new List[n];\r\n for (int i = 0; i < n; i++) graph[i] = new ArrayList<>();\r\n\r\n\r\n }", "protected void initialize() {\n this.locals = Common.calculateSegmentSize(Common.NUM_CORES);\n this.drvrs = Common.calculateSegmentSize(Common.NUM_CORES);\n reports = new ArrayList<>();\n }", "Graph(){\n\t\tadjlist = new HashMap<String, Vertex>();\n\t\tvertices = 0;\n\t\tedges = 0;\n\t\tkeys = new ArrayList<String>();\n\t}", "public void init(Collection<TopologyVertex> vertices) {\n for (TopologyVertex v : vertices) {\n createSimulationLogPanel(v.getName());\n }\n }", "Graph(int vertices) {\r\n this.numVertices = vertices;\r\n adjacencylist = new LinkedList[vertices];\r\n //initialize adjacency lists for all the vertices\r\n for (int i = 0; i <vertices ; i++) {\r\n adjacencylist[i] = new LinkedList<>();\r\n }\r\n }", "public Statistics() {}", "VertexNetwork() {\r\n /* This constructor creates an empty list of vertex locations. \r\n read The transmission range is set to 0.0. */\r\n transmissionRange = 0.0;\r\n location = new ArrayList<Vertex>(0);\r\n }", "public static ArrayList<Vertex> initializeGraph() {\n\t\tVertex uVertex = new Vertex('u');\n\t\tVertex vVertex = new Vertex('v');\n\t\tVertex wVertex = new Vertex('w');\n\t\tVertex xVertex = new Vertex('x');\n\t\tVertex yVertex = new Vertex('y');\n\t\tVertex zVertex = new Vertex('z');\n\t\t\n\t\tVertex[] uAdjacencyList = {xVertex, vVertex};\n\t\tuVertex.setAdjacencyList(createArrayList( uAdjacencyList ));\n\t\t\n\t\tVertex[] vAdjacencyList = {yVertex};\n\t\tvVertex.setAdjacencyList(createArrayList( vAdjacencyList ));\n\t\t\n\t\tVertex[] wAdjacencyList = {zVertex, yVertex};\n\t\twVertex.setAdjacencyList(createArrayList( wAdjacencyList ));\n\t\t\n\t\tVertex[] xAdjacencyList = {vVertex};\n\t\txVertex.setAdjacencyList(createArrayList( xAdjacencyList ));\n\t\t\n\t\tVertex[] yAdjacencyList = {xVertex};\n\t\tyVertex.setAdjacencyList(createArrayList( yAdjacencyList ));\n\t\t\n\t\tVertex[] zAdjacencyList = {zVertex};\n\t\tzVertex.setAdjacencyList(createArrayList( zAdjacencyList ));\n\n\t\tVertex[] graph = { uVertex, vVertex, wVertex, xVertex, yVertex, zVertex};\n\t\treturn createArrayList( graph );\n\n\t}", "public void initializeSingleSource(Vertex start) {\n\t\tfor (Vertex v : adjlist.values()){\n\t\t\tv.dist = Integer.MAX_VALUE;\n\t\t\tv.setParent(null);\n\t\t}\n\t\t//sets distance of the starter vertex to 0\n\t\tstart.dist = 0;\n\t}", "Graph() {\r\n\t\tvertices = new LinkedList<Vertex>();\r\n\t\tedges = 0;\r\n\r\n\t\tfor (int i = 0; i < 26; i++) {\r\n\t\t\t// ASCII value of 'A' is 65\r\n\t\t\tVertex vertex = new Vertex((char) (i + 65));\r\n\t\t\tvertices.add(vertex);\r\n\t\t}\r\n\t\tcurrentVertex = vertices.get(0);\r\n\t\tseen = new boolean[26];\r\n\t}", "public StreetSearcher() {\n vertices = new HashMap<>();\n graph = new SparseGraph<>();\n //double smDistance = 0;\n //previous = new HashMap<>();\n }", "public UGraph()\r\n {\r\n uNodes = new HashMap<Integer , UNode>();\r\n uEdges = new HashMap<Integer, UEdge>();\r\n }", "ArrayList<ArrayList<Vertex>> generateInitVertices() {\n ArrayList<ArrayList<Vertex>> vertices = new ArrayList<ArrayList<Vertex>>();\n for (int x = 0; x < width; x++) {\n ArrayList<Vertex> temp = new ArrayList<Vertex>();\n for (int y = 0; y < height; y++) {\n temp.add(new Vertex(x, y));\n }\n vertices.add(temp);\n }\n Random r = new Random();\n for (ArrayList<Vertex> vList : vertices) {\n for (Vertex v : vList) {\n if (v.x != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x - 1).get(v.y), r.nextInt(1000)));\n }\n if (v.x != width - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x + 1).get(v.y), r.nextInt(1000)));\n }\n if (v.y != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y - 1), r.nextInt(1000)));\n }\n if (v.y != height - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y + 1), r.nextInt(1000)));\n }\n }\n }\n return vertices;\n }", "public ParentVertex(){\n Random rand = new Random();\n key = rand.nextInt(Integer.MAX_VALUE);\n xPos = rand.nextDouble();\n yPos = rand.nextDouble();\n connectedKeys = new ArrayList<>();\n degree = 0;\n fitness = 0;\n }", "public WeightedAdjacencyGraph() {\n this.vertices = new HashMap<>();\n }", "public Graph() // constructor\n{\n vertexList = new Vertex[MAX_VERTS];\n // adjacency matrix\n adjMat = new int[MAX_VERTS][MAX_VERTS];\n nVerts = 0;\n for (int j = 0; j < MAX_VERTS; j++) // set adjacency\n for (int k = 0; k < MAX_VERTS; k++) // matrix to 0\n adjMat[j][k] = INFINITY;\n}", "public Graph()\n\t{\n\t\tthis.total_verts = null;\n\t\tthis.total_edges = null;\n\t\tnodes = new HashMap<String, Node>();\n\t}", "public void testVerticesSet() {\n System.out.println(\"verticesSet\");\n\n Assert.assertTrue(generateGraph().verticesSet().size() == 25);\n }", "public SmallStatistic() {\n\n }", "void getVertices() {\r\n\t\tSystem.out.println(\"Enter your vertices:\");\r\n\t\tarrIndexToVertexMap = new HashMap<>();\r\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < numberOfVertices; i++) {\r\n\t\t\t\tarrIndexToVertexMap.put(i, sc.next());\r\n\t\t\t}\r\n\t\t\tsc.close();\r\n\t\t} catch (RuntimeException re) {\r\n\t\t\tSystem.out.println(\"Error at method:: getVertices || Description:\" + re);\r\n\t\t}\r\n\t}", "Vertex(){}", "@Override public Set<L> vertices() {\r\n return new HashSet<L>(vertices);//防御式拷贝\r\n }", "public Statistics() {\n }", "public WGraph_DS()\n {\n modeCount=0;\n edges=0;\n HashMap<Integer,node_info>nodesHash=new HashMap<>();\n HashMap<Integer,Neighbors>edgesHash=new HashMap<>();\n }", "private void initializeInfo()\n {\n Iterator<node_info> it=this.ga.getV().iterator();\n while (it.hasNext())\n {\n it.next().setInfo(null);\n }\n }", "protected void initialize() {\n\t\t//System.out.println(\"Cube collector is spitting\");\n\t}", "Vertex(int n) {\n name = n;\n duration = 0;\n LC = 0;\n EC = 0;\n slack = 0;\n color = null;\n top = 0;\n discoverytime = 0;\n order = 0;\n Adj = new LinkedList<>();\n }", "public BaseStatistics() {\n\t\tsuper();\n\t}", "private void initializeSingleSource(Graph<V> G, Integer s) {\n for (int v = 0; v < G.getVertexCount(); v++) {\n G.getVertex(v).setEstimate(1.0f / 0.0f); // Infinity\n G.getVertex(v).setPredecessor(null);\n }\n G.getVertex(s).setEstimate(0);\n }", "public PollutedVarsPointsToAnalysis(DirectedGraph<Unit> graph) {\n super(graph);\n emptyMap = new HashMap<>();\n initialMap = new HashMap<>();\n\n }", "public void initialise() \n\t{\n\t\tthis.docids = scoresMap.keys();\n\t\tthis.scores = scoresMap.getValues();\n\t\tthis.occurrences = occurrencesMap.getValues();\t\t\n\t\tresultSize = this.docids.length;\n\t\texactResultSize = this.docids.length;\n\n\t\tscoresMap.clear();\n\t\toccurrencesMap.clear();\n\t\tthis.arraysInitialised = true;\n\t}", "public int getMinimumVertexCount()\r\n {\r\n return theMinimumVertexCount;\r\n }", "public long getVertexCount(){\n return vertexCount;\n }", "public Graph(){\n\t\tthis.sizeE = 0;\n\t\tthis.sizeV = 0;\n\t}", "private static void initStatistics(Player p){\n }", "private void createNVertices() {\n\t\tfor (int i = 0; i < this.numNVertices; i++) {\n\t\t\tvertices.add(new Vertex('n', this.countNID++));\n\t\t}\n\t}", "public MyVertex( ) {\n // Set ID and increment so next Vertex count++\n id = count;\n count++;\n\n // Set color to NULL initially\n color = null;\n\n // Create new Lists\n incidentEdges = new ArrayList< Edge >( );\n adjacentVertices = new ArrayList< Vertex >( );\n }", "public DistinctValues()\n {\n super();\n }", "public CommonStatistics() {\n totalSubmissions = 0;\n lateSubmissions = 0;\n normalSubmissions = 0;\n approvedItems = 0;\n rejectedItems = 0;\n totalPendingItems = 0;\n arrearsPendingItems = 0;\n thisMonthPendingItems = 0;\n deletedItems = 0;\n confirmationPrintedItems = 0;\n confirmationApprovalPendingItems = 0;\n confirmationApprovedItems = 0;\n }", "public abstract int getVertexCount();", "public Graph() {\n\t\ttowns = new HashSet<Town>();\n\t\troads = new HashSet<Road>();\n\t\tprevVertex = new HashMap<String, Town>();\n\t}", "private void init() {\n for (Node n : reader.getNodes().values()) {\n da_collegare.add(n);\n valori.put(n, Double.MAX_VALUE);\n precedenti.put(n, null);\n }\n valori.put(start_node, 0.0);\n da_collegare.remove(start_node);\n }", "public int getVertexCount();", "void reinitialize(Graph.Vertex newSource) {\n\t\tsrc = newSource;\n\t\tfor (Graph.Vertex u : g) {\n\t\t\tDFSVertex bu = getVertex(u);\n\t\t\tbu.seen = false;\n\t\t\tbu.parent = null;\n\t\t\tbu.distance = INFINITY;\n\t\t\tbu.childrenCount = 0;\n\t\t}\n\t\tgetVertex(src).distance = 0;\n\t}", "private void initialize() {\n this.traitMap = new HashMap<T, ITrait<T>>();\n this.traitList = new ArrayList<ITrait<T>>();\n this.observers = Collections.synchronizedList(new ArrayList<IStatisticsObserver>());\n this.dimensionName = \"UNNAMED\";\n\n }", "private void initialize() {\n\t\tfor(String key: count_e_f.keySet()){\n\t\t\tcount_e_f.put(key, 0.0);\n\t\t}\n\t\t\n\t\tfor(Integer key: total_f.keySet()){\n\t\t\ttotal_f.put(key, 0.0);\n\t\t}\n\t\t\n\t\t//This code is not efficient.\n//\t\tfor(Entry<String, Integer> german : mainIBM.gerWordsIdx.entrySet()){\n//\t\t\tfor(Entry<String, Integer> english : mainIBM.engWordsIdx.entrySet()){\n//\t\t\t\tcount_e_f.put(english.getValue() + \"-\" + german.getValue(), 0.0);\n//\t\t\t}\n//\t\t\ttotal_f.put(german.getValue(), 0.0);\n//\t\t}\t\n\n\t}", "public int numVertices() { return numV; }", "public VertexData(int n) {\n\t\tthis.n = n;\n\t\tvertexElements = new LinkedList<VertexElement>();\n\t}", "public void cleanStatistics() {\n\t\thasChildStopNominator = HashBasedTable.create();\n\t\thasChildStopDenominator = HashBasedTable.create();\n\t\tnoChildStopNominator = HashBasedTable.create();\n\t\tnoChildStopDenominator = HashBasedTable.create();\n\t\tleftAttachNominator = HashBasedTable.create();\n\t\tleftAttachDenominator = HashBasedTable.create();\n\t\trightAttachNominator = HashBasedTable.create();\n\t\trightAttachDenominator = HashBasedTable.create();\n\t}", "@Override\n public void clearVertices()\n {\n // Shouldn't clear vertices\n }", "Graph(int size) {\n n = size;\n V = new Vertex[size + 1];\n // create an array of Vertex objects\n for (int i = 1; i <= size; i++)\n V[i] = new Vertex(i);\n }", "private void initializeStatisticVariables(){\r\n\t\taverageFront9Score = 0;\r\n\t\taverageFront9PlusMinus = 0;\r\n\t\taverageBack9Score = 0;\r\n\t\taverageBack9PlusMinus = 0;\r\n fairways = 0;\r\n girs = 0;\r\n putts = 0;\r\n chips = 0;\r\n penalties = 0;\r\n\t\tnumberOfHoles = 0;\r\n\t\tnumberOfPar3Holes = 0;\r\n\t\tnumberOfPar4Holes = 0;\r\n\t\tnumberOfPar5Holes = 0;\r\n\t\talbatrossCount = 0;\r\n\t\teagleCount = 0;\r\n\t\tbirdieCount = 0;\r\n\t\tparCount = 0;\r\n\t\tbogeyCount = 0;\r\n\t\tdoubleBogeyCount = 0;\r\n\t\ttripleBogeyCount = 0;\r\n\t\tquadBogeyPlusCount = 0;\r\n par3Fairways = 0;\r\n par3Girs = 0;\r\n par3Putts = 0;\r\n par3Chips = 0;\r\n par3Penalties = 0;\r\n\t\tpar3EagleCount = 0;\r\n\t\tpar3BirdieCount = 0;\r\n\t\tpar3ParCount = 0;\r\n\t\tpar3BogeyCount = 0;\r\n\t\tpar3DoubleBogeyCount = 0;\r\n\t\tpar3TripleBogeyCount = 0;\r\n\t\tpar3QuadBogeyPlusCount = 0;\r\n par4Fairways = 0;\r\n par4Girs = 0;\r\n par4Putts = 0;\r\n par4Chips = 0;\r\n par4Penalties = 0;\r\n\t\tpar4AlbatrossCount = 0;\r\n\t\tpar4EagleCount = 0;\r\n\t\tpar4BirdieCount = 0;\r\n\t\tpar4ParCount = 0;\r\n\t\tpar4BogeyCount = 0;\r\n\t\tpar4DoubleBogeyCount = 0;\r\n\t\tpar4TripleBogeyCount = 0;\r\n\t\tpar4QuadBogeyPlusCount = 0;\r\n par5Fairways = 0;\r\n par5Girs = 0;\r\n par5Putts = 0;\r\n par5Chips = 0;\r\n par5Penalties = 0;\r\n\t\tpar5AlbatrossCount = 0;\r\n\t\tpar5EagleCount = 0;\r\n\t\tpar5BirdieCount = 0;\r\n\t\tpar5ParCount = 0;\r\n\t\tpar5BogeyCount = 0;\r\n\t\tpar5DoubleBogeyCount = 0;\r\n\t\tpar5TripleBogeyCount = 0;\r\n\t\tpar5QuadBogeyPlusCount = 0;\r\n clubs.clear();\r\n\t}", "private VertexIterator(Vertex[] v, int n) {\n nodeIndex = 0;\n iterV = v;\n iterN = n;\n }", "public RandomizedSet() {\n data=new ArrayList<>();\n valueIndex=new HashMap<>();\n random=new Random();\n }", "public RandomizedSet() {\n\n\n sub =new ArrayList<Integer>();\n hm=new HashMap<Integer,Integer>();\n rand =new Random();\n\n }", "@Test\r\n public void testNumVertices() {\r\n System.out.println(\"numVertices\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n int expResult = 0;\r\n int result = instance.numVertices();\r\n assertEquals(expResult, result);\r\n\r\n Object v1Element = 1;\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n\r\n expResult = 1;\r\n result = instance.numVertices();\r\n assertEquals(expResult, result);\r\n }", "public void setVertices(){\n\t\tvertices = new ArrayList<V>();\n\t\tfor (E e : edges){\n\t\t\tV v1 = e.getOrigin();\n\t\t\tV v2 = e.getDestination();\n\t\t\tif (!vertices.contains(v1))\n\t\t\t\tvertices.add(v1);\n\t\t\tif (!vertices.contains(v2))\n\t\t\t\tvertices.add(v2);\n\t\t}\n\t}", "public void initialize() {\n final Double optimismRate = new Double(0.0);\n _counts.clear();\n _values.clear();\n\n for (Integer index : Range.closed(0, _armsNo - 1).asSet(DiscreteDomains.integers())) {\n _counts.add(index, optimismRate.intValue());\n _values.add(index, optimismRate);\n }\n }", "private static void criaListaDeVertices(Graph graph) {\r\n\t\tfor (int i = 0; i < graph.getArestas().size(); i++) {\r\n\t\t\tif (!graph.getArestas().get(i).getV1().statusVertice()) {\r\n\t\t\t\tgraph.getVerticesGraph().add( graph.getArestas().get(i).getV1() );\r\n\t\t\t\tgraph.getArestas().get(i).getV1().alteraStatusVertice(true);\r\n\t\t\t}\r\n\r\n\t\t\tif (!graph.getArestas().get(i).getV2().statusVertice()) {\r\n\t\t\t\tgraph.getVerticesGraph().add( graph.getArestas().get(i).getV2() );\r\n\t\t\t\tgraph.getArestas().get(i).getV2().alteraStatusVertice(true);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public HashGraph()\n {\n graph = new HashMap <>();\n }", "@Override\n\tpublic void init() {\n\t\tGraph<Number,Number> ig = Graphs.<Number,Number>synchronizedDirectedGraph(new DirectedSparseMultigraph<Number,Number>());\n\t\tObservableGraph<Number,Number> og = new ObservableGraph<Number,Number>(ig);\n\t\tog.addGraphEventListener(new GraphEventListener<Number,Number>() {\n\n\t\t\tpublic void handleGraphEvent(GraphEvent<Number, Number> evt) {\n\t\t\t\tSystem.err.println(\"got \"+evt);\n\n\t\t\t}});\n\t\tthis.g = og;\n\n\t\tthis.timer = new Timer();\n\t\tthis.layout = new FRLayout2<Number,Number>(g);\n\t\t// ((FRLayout)layout).setMaxIterations(200);\n\t\t// create a simple pickable layout\n\t\tthis.vv = new VisualizationViewer<Number,Number>(layout, new Dimension(600,600));\n\n\n\n\t}", "private static void initGraphCheck(int V) {\r\n\t\tdfs_num = new int[V];\r\n\t\tArrays.fill(dfs_num, DFS_WHITE);// reinicio a no visitado\r\n\t\tnumComp = 0;\r\n\t\tdfs_parent = new int[V];\r\n\t\tArrays.fill(dfs_parent, -1);\r\n\r\n\t\tprintThis(\"Graph Edges Property Check\");\r\n\t\tfor (int i = 0; i < V; i++) {\r\n\t\t\tif (dfs_num[i] == DFS_WHITE) {\r\n\t\t\t\tSystem.out.printf(\"Component %d:\\n\", ++numComp);\r\n\t\t\t\tgraphCheck(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void init () {\n\t\tshaderProgram.addUniform(TEXTURE_UNIFORM_KEY);\n\t\tshaderProgram.addUniform(SCALING_UNIFORM_KEY);\n\t\tshaderProgram.addUniform(TRANSLATION_UNIFORM_KEY);\n\t\tshaderProgram.addUniform(POSITION_UNIFORM_KEY);\n\t}", "public Map<String, TemporalElementStats> getVertexStats() {\n return vertexStats;\n }", "private static Collection<Point> initializeCenters(int count) {\n\t\tif(count > CLUSTER_COLORS.length){\n\t\t\tthrow new IllegalStateException(\"not enough colors...\");\n\t\t}\n\t\t\n\t\tCollection<Point> result = new HashSet<Point>();\n\t\tRandom r = new Random();\n\t\t\n\t\tfor(int i = 0; i < count; i++){\n\t\t\tPoint p = new Point(r.nextInt(400), r.nextInt(400));\n\t\t\tp.setColor(CLUSTER_COLORS[i]);\n\t\t\tresult.add(p);\n\t\t}\n\t\treturn result;\n\t}", "public Vertex(int u, int minDistance) {\n this.u = u;\n this.minDistance = minDistance;\n }", "public void makeRandom(int vertices, float density)\n {\n this.connections = new Hashtable<>();\n this.vertices = new ArrayList<>();\n this.edges = new ArrayList<>();\n this.dice = new Random();\n\n Vertex prev = new Vertex(\"0\");\n this.addVertex(prev);\n for(int i = 1; i < vertices; i++)\n {\n Vertex next = new Vertex(i + \"\");\n this.addVertex(next);\n this.connect(prev, next, this.randomWeight());\n\n prev = next;\n }\n\n for(Vertex a: this.getVertices())\n {\n for(Vertex b: this.getVertices())\n {\n if(a == b) continue;\n\n if(dice.nextFloat() <= density)\n this.connect(a, b, this.randomWeight());\n }\n }\n }", "public Graph() {\r\n\t\tthis.matrix = new Matrix();\r\n\t\tthis.listVertex = new ArrayList<Vertex>();\r\n\t}", "private void init() {\n UNIGRAM = new HashMap<>();\n }", "public RandomizedSet() {\n data = new ArrayList<>();\n val2Index = new HashMap<>();\n }", "public static void resetStatistics()\r\n {\r\n \t//System.out.println ( \"Resetting statistics\");\r\n count_ = 0; \r\n }", "public Graphs() {\n graph = new HashMap<>();\n }", "private void createXVertices() {\n\n\t\tfor (int i = 0; i < this.numXVertices; i++) {\n\t\t\t// determine external degree -- random number between d_0 and d_1\n\t\t\tint upperBoundAdjusted = this.d1 - this.d0; // Shift to 0 so that the randomGen can be used\n\t\t\tint externalDegree = this.randomGen(upperBoundAdjusted) + this.d0; // Shift back for a degree within the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// range\n\t\t\tvertices.add(new XVertex('x', this.countXID++, externalDegree));\n\t\t}\n\t}", "int countDistinctTriangles(ArrayList<Sides> arr) {\n // Write your code here\n // Validate input data\n if(arr == null || arr.isEmpty()){\n return 0;\n }\n \n // Find distinct triangles\n Set<Triangle> trs = new HashSet<Triangle>();\n for(Sides s : arr){\n trs.add(new Triangle(s));\n }\n \n return trs.size();\n }", "Iterable<Long> vertices() {\n //YOUR CODE HERE, this currently returns only an empty list.\n ArrayList<Long> verticesIter = new ArrayList<>();\n verticesIter.addAll(adj.keySet());\n return verticesIter;\n }", "public DSAGraph()\n\t{\n\t\tvertices = new DSALinkedList();\n\t\tedgeCount = 0;\n\t}", "public AllOOneDataStructure() {\n map = new HashMap<>();\n vals = new HashMap<>();\n maxKey = minKey = \"\";\n max = min = 0;\n }", "public VoronoiVisualization()\n\t \t{\n\t\t super();\n\t \t}", "public static void initialize() {\r\n\t\tgraph = null;\r\n\t\tmseeObjectNames = new HashMap<String, String>();\r\n\t\tmseeEventTypes = new HashMap<String, String>();\r\n\t\tmodifiedIdentifiers = new HashMap<String, String>();\r\n\t}", "public Vertex(){\n\n }", "public void computeStats() {\n\t\tstats = new Stats();\t\t\n\t}", "public StatisticsFragment() {\n // Required empty public constructor\n }", "public void setMinimumVertexCount(int aCount)\r\n {\r\n\t theMinimumVertexCount = aCount;\r\n if (theMinimumVertexCountField != null)\r\n {\r\n \t theMinimumVertexCountField.setValue(theMinimumVertexCount);\r\n theMinimumVertexCountField.updateUI(); \r\n }\r\n }", "@Test\n public void getVertexes() {\n\n for (int i = 0; i < 6; i++) {\n\n Vertex temp = new Vertex(i + \"\", \"Location number \" + i);\n assertTrue(temp.equals(testGraph.getVertices ().get(i)));\n\n }\n }", "public DistinctTokensAnalyzer() {\n\n distinctTokens = new TreeSet<String>();\n\n }", "void topologicalSort() {\n\n\t\tfor (SimpleVertex vertice : allvertices) {\n\n\t\t\tif (vertice.isVisited == false) {\n\t\t\t\tlistset.add(vertice.Vertexname);\n\t\t\t\ttopologicalSortUtil(vertice);\n\n\t\t\t}\n\t\t}\n\n\t}", "private void initIvAndEvStats() {\n int ivHp = Global.randomInt(0, 31);\n int ivAtk = Global.randomInt(0, 31);\n int ivDef = Global.randomInt(0, 31);\n int ivSpAtk = Global.randomInt(0, 31);\n int ivSpDef = Global.randomInt(0, 31);\n int ivSpd = Global.randomInt(0, 31);\n //ivStats = new Stats(ivHp, ivAtk, ivDef, ivSpAtk, ivSpDef, ivSpd);\n ivStats = new Stats(31, 31, 31, 31, 31, 31);\n\n //No effort values obtained\n evStats = new Stats(0, 0, 0, 0, 0, 0);\n }", "private void processExtractData_N() {\n\n this.normalCollection = new VertexCollection();\n\n Map<Integer, float[]> definedNormals = new HashMap<>();\n\n int n = 0;int count = 1;\n while(n < extract.getNormals().size()){\n\n float thisNormValues[] = {extract.getNormals().get(n),\n extract.getNormals().get(n+1),\n extract.getNormals().get(n+2)};\n\n definedNormals.put(count, thisNormValues);\n\n n = n+3;\n count++;\n }\n\n for(Integer nId : extract.getDrawNormalOrder()){\n float[] pushThese = definedNormals.get(nId);\n this.normalCollection.push(pushThese[0], pushThese[1], pushThese[2]);\n }\n }", "public AdjacencyLists(int num)\n {\n numVertices = num;\n clearGraph();\n }", "public void testEdgesSet_ofVertices() {\n System.out.println(\"edgesSet\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n Set<Edge<Integer>> set = graph.edgesSet(new Integer(i), new Integer(j));\n\n if ((i + j) % 2 == 0) {\n Assert.assertEquals(set.size(), 1);\n } else {\n Assert.assertEquals(set.size(), 0);\n }\n }\n }\n }", "public int getNumVertices(){\n return numVertices;\n }", "private void initWithSize(int size) {\r\n this.size = size;\r\n if (size == 0) {\r\n size = 1; //Prevents memory allocation problem on GPU\r\n }\r\n\r\n normalX = new double[size];\r\n normalY = new double[size];\r\n normalZ = new double[size];\r\n\r\n vertexAX = new double[size];\r\n vertexAY = new double[size];\r\n vertexAZ = new double[size];\r\n\r\n edgeBAX = new double[size];\r\n edgeBAY = new double[size];\r\n edgeBAZ = new double[size];\r\n\r\n edgeCAX = new double[size];\r\n edgeCAY = new double[size];\r\n edgeCAZ = new double[size];\r\n\r\n centerX = new double[size];\r\n centerY = new double[size];\r\n centerZ = new double[size];\r\n\r\n area = new double[size];\r\n }", "public static void initialize()\n {\n localPeerIDCount = 0;\n\n }" ]
[ "0.57007056", "0.56959814", "0.5646419", "0.5640674", "0.5602938", "0.55348337", "0.5492142", "0.54863554", "0.5483797", "0.5472887", "0.5461016", "0.54359055", "0.5417159", "0.5397831", "0.5395393", "0.53945667", "0.5376853", "0.53632385", "0.5359021", "0.5357973", "0.534846", "0.5345333", "0.5324892", "0.5319008", "0.5314321", "0.5299115", "0.5285911", "0.527571", "0.5242905", "0.5236759", "0.52357924", "0.5232716", "0.5229465", "0.5228989", "0.5218856", "0.5201047", "0.5186994", "0.51791334", "0.5176241", "0.51729304", "0.5161126", "0.5158647", "0.5153736", "0.51364267", "0.51332456", "0.51277953", "0.5117254", "0.51103514", "0.51072127", "0.50912964", "0.50742537", "0.5074056", "0.5069773", "0.5045399", "0.5042066", "0.50385475", "0.50384957", "0.5036844", "0.50353366", "0.5021037", "0.5018528", "0.5014963", "0.5012315", "0.5005487", "0.49962768", "0.49962112", "0.49947527", "0.4993017", "0.49907845", "0.49901488", "0.49895316", "0.4988735", "0.4985481", "0.49847573", "0.49797028", "0.49747753", "0.49650463", "0.496262", "0.49616987", "0.49530604", "0.49490637", "0.49423125", "0.49419183", "0.493415", "0.49275538", "0.4925587", "0.49233922", "0.492086", "0.4914537", "0.49132025", "0.49089503", "0.49059877", "0.48959774", "0.48956013", "0.48865896", "0.48865756", "0.4884519", "0.4883052", "0.4881527", "0.48814702" ]
0.8178903
0
Returns the vertex statistics list
public Map<String, TemporalElementStats> getVertexStats() { return vertexStats; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.util.List<org.tensorflow.proto.profiler.XStat> \n getStatsList();", "List<V> getVertexList();", "public List<wVertex> getVertices(){\r\n return vertices;\r\n }", "public List<Number> getStatistics() {\n return statistics;\n }", "public Collection< VDataT > vertexData();", "public java.util.List<V> getVertices();", "public int getVertexCount();", "public long getVertexCount(){\n return vertexCount;\n }", "public HashMap<Integer, Vertex> getVertices() {\n\t\treturn vertices;\n\t}", "int getVertices();", "@Override\r\n public List<Vertex> getVertices() {\r\n List<Vertex> verticesList = new LinkedList<>(adjacencyList.keySet()); //getting the key set of adjacencyList i.e, a list of all vertices\r\n Collections.sort(verticesList, Comparator.comparing(Vertex::getLabel));\r\n return verticesList;\r\n }", "java.util.List<? extends org.tensorflow.proto.profiler.XStatOrBuilder> \n getStatsOrBuilderList();", "public Collection<V> getVertices();", "public String getVerticesCount() {\n long res = 0;\n Iterator<Vertex> itty = g.vertices();\n Vertex v;\n while (itty.hasNext()) {\n v = itty.next();\n res++;\n }\n return Long.toString(res);\n }", "public int getVertexCount() {\n return vertexCount;\n }", "Set<Vertex> getVertices();", "Map<String, Object> getStats();", "@Override\r\n\tpublic ArrayList<E> getVertices() {\r\n\t\tArrayList<E> verts = new ArrayList<>();\r\n\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\tverts.add(t);\r\n\t\t});\r\n\t\treturn verts;\r\n\t}", "public List<Vertex> getVertices() {\n\t\treturn AdjacencyMatrixGraph.cloneList(vertexList);\n\t}", "org.tensorflow.proto.profiler.XStat getStats(int index);", "public abstract int getVertexCount();", "public int getVertices() {\n return verticesNumber;\n }", "public List<Vertex> vertices() {\n return Collections.unmodifiableList(this.vertices);\n }", "Iterable<Long> vertices() {\n //YOUR CODE HERE, this currently returns only an empty list.\n return world.keySet();\n }", "public Set<String> getVertices()\r\n\t{\r\n\t\treturn this.dataMap.keySet();\r\n\t}", "public List<StatsObject> getData() {\n\t\tList<StatsObject> stats = new ArrayList<StatsObject>(data.values());\n\t\treturn stats;\n\n\t}", "public String vertexName();", "protected LinkedList<Vertex> getVertexList() {\n\t\tLinkedList<Vertex> returnList = new LinkedList<Vertex>();\n\n\t\t// Add family\n\t\tif (this.getFamily() != null) {\n\t\t\treturnList = this.getFamily().getFamilyVertexList();\n\t\t}\n\t\treturnList.add(this);\n\t\treturn returnList;\n\t}", "public Set<V> getVertices();", "public Set<V> getVertices();", "@Override\r\n public synchronized IStats getStatistics()\r\n {\r\n final IStats stats = new Stats();\r\n stats.setTypeName(\"Indexed Disk Cache\");\r\n\r\n final ArrayList<IStatElement<?>> elems = new ArrayList<>();\r\n\r\n elems.add(new StatElement<>(\"Is Alive\", Boolean.valueOf(isAlive())));\r\n elems.add(new StatElement<>(\"Key Map Size\", Integer.valueOf(this.keyHash != null ? this.keyHash.size() : -1)));\r\n try\r\n {\r\n elems.add(\r\n new StatElement<>(\"Data File Length\", Long.valueOf(this.dataFile != null ? this.dataFile.length() : -1L)));\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(e);\r\n }\r\n elems.add(new StatElement<>(\"Max Key Size\", this.maxKeySize));\r\n elems.add(new StatElement<>(\"Hit Count\", this.hitCount));\r\n elems.add(new StatElement<>(\"Bytes Free\", this.bytesFree));\r\n elems.add(new StatElement<>(\"Optimize Operation Count\", Integer.valueOf(this.removeCount)));\r\n elems.add(new StatElement<>(\"Times Optimized\", Integer.valueOf(this.timesOptimized)));\r\n elems.add(new StatElement<>(\"Recycle Count\", Integer.valueOf(this.recycleCnt)));\r\n elems.add(new StatElement<>(\"Recycle Bin Size\", Integer.valueOf(this.recycle.size())));\r\n elems.add(new StatElement<>(\"Startup Size\", Integer.valueOf(this.startupSize)));\r\n\r\n // get the stats from the super too\r\n final IStats sStats = super.getStatistics();\r\n elems.addAll(sStats.getStatElements());\r\n\r\n stats.setStatElements(elems);\r\n\r\n return stats;\r\n }", "public int getVertexCount() {\n\t\treturn vertexCount;\n\t}", "void statistics();", "public Iterable<Vertex> getVertices() {\n return mVertices.values();\n }", "public int getVertexCount() {\n return map.keySet().size();\n }", "public Vertex[] getVertices() {\n return arrayOfVertices;\n }", "@Override\r\n public Iterable<V> vertices() {\r\n LinkedList<V> list = new LinkedList<>();\r\n for(V v : map.keySet())\r\n list.add(v);\r\n return list;\r\n }", "public ArrayList<String> getStatsNames() {\n\t\tArrayList<String> arr = new ArrayList<String>();\n\t\tNodeList nl = getStats();\n\t\tint len = nl.getLength();\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tString name = ParserHelper.requiredAttributeGetter((Element) nl.item(i), \"name\");\n\t\t\tif (name != null) {\n\t\t\t\tarr.add(name);\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}", "int getNumberOfVertexes();", "java.util.List<net.iGap.proto.ProtoChannelGetMessagesStats.ChannelGetMessagesStatsResponse.Stats> \n getStatsList();", "@Override\r\n\tpublic List<String> getHITS()\r\n\t{\r\n\r\n\t\tlogger.info(\"Getting HITS...\");\r\n\t\tHITS<Entity, EntityGraphEdge> ranker = new HITS<Entity, EntityGraphEdge>(\r\n\t\t\t\tdirectedGraph);\r\n\t\tlogger.info(\"Ranker was created.\");\r\n\t\tlogger.info(\"Evaluating...\");\r\n\t\tranker.evaluate();\r\n\r\n\t\tlogger.info(\"Got HITS.\");\r\n\t\tCollection<Entity> vertices = directedGraph.getVertices();\r\n\t\tList<String> rankingList = new ArrayList<String>();\r\n\t\tFormat formatter = new DecimalFormat(\"%7.6f\");\r\n\r\n\t\tfor (Entity vertex : vertices) {\r\n\t\t\trankingList.add(\"hub=\"\r\n\t\t\t\t\t+ formatter.format(ranker.getVertexScore(vertex).hub)\r\n\t\t\t\t\t+ \" authority=\"\r\n\t\t\t\t\t+ formatter.format(ranker.getVertexScore(vertex).authority)\r\n\t\t\t\t\t+ \" \" + vertex);\r\n\t\t\t// logger.info(\"HITS ranking for \" + vertex.getVertexEntity() +\r\n\t\t\t// \" : \" + ranker.getRankScore(vertex));\r\n\t\t}\r\n\r\n\t\tCollections.sort(rankingList);\r\n\t\tCollections.reverse(rankingList);\r\n\t\t// logger.info(\"Sorted PageRankings: \" + rankingList);\r\n\t\t// ranker.printRankings(false, true);\r\n\r\n\t\treturn rankingList;\r\n\t}", "public String getStatistics() {\r\n \tString statistics;\r\n \tstatistics=\"Anzahl aller User: \"+ numberOfUsers() + \"\\n\"\r\n \t\t\t+ \"Anzahl aller Hotels: \" + numberOfHotels() + \"\\n\"\r\n \t\t\t+ \"Hotel mit der besten durchschnittlichen Bewertung: \" + bestHotel().getName() + \"\\n\";\r\n \treturn statistics;\r\n }", "protected abstract String getStatistics();", "private NodeList getStats() {\n\t\treturn mDom.getElementsByTagName(\"stats\");\n\t}", "public int getVertexCount() {\n\t\treturn this._vertices.size();\n\t}", "public VirtualMachinesStatistics getStatistics() {\n return statistics;\n }", "public String toString()\n\t{\n\t \n\t\tString str = vertexName + \": \" ;\n\t\tfor(int i = 0 ; i < adjacencyList.size(); i++)\n\t\t\tstr = str + adjacencyList.get(i).vertexName + \" \";\n\t\treturn str ;\n\t\t\n\t}", "public List<Vertex> findAllVertices() throws SQLException {\n\t\treturn rDb.findAllVertices();\n\t}", "public int numVertices() { return numV; }", "@Override\r\n public int size() {\r\n return vertices.size();\r\n }", "org.tensorflow.proto.profiler.XStatOrBuilder getStatsOrBuilder(\n int index);", "public float[] getVertices() {\r\n\t\treturn vertices;\r\n\t}", "Iterable<Long> vertices() {\n //YOUR CODE HERE, this currently returns only an empty list.\n ArrayList<Long> verticesIter = new ArrayList<>();\n verticesIter.addAll(adj.keySet());\n return verticesIter;\n }", "Iterable<Long> vertices() {\n return nodes.keySet();\n }", "java.util.List<com.google.api.MetricDescriptor> getMetricDescriptorsList();", "public List<Map<String, Object>> ListStatistics(Timestamp start, Timestamp end) {\n\t\treturn statisticsMapper.ListStatistics(start,end);\n\t}", "@Override\n public VertexCollection getVertexCollection() {\n return this.vertices.copy();\n }", "public ArrayList<VertexDistancePair> getDistances(){\n return distances;\n }", "public Vertex[] getVertices() {\n\t\treturn this._vertices.toArray(new Vertex[0]);\n\t}", "public String getStatistics() {\n return \"Bounds = (\" + x1 + \", \" + y1 + \"), (\" + x2 + \", \" + y2 + \")\\n\" +\n \"Number of Nodes = \" + numNodes + \"\\n\";\n }", "public Set<Integer> getVertexKeys() {\n\t\treturn vertices.keySet();\n\t}", "public String toString(){\n\t\treturn vertex.toString();\n\t}", "public int getNumberOfVertices();", "Iterator<Vertex<V, E, M>> getVertices() {\n return this.vertices.values().iterator();\n }", "public int getNumVertices();", "public Collection<Vertex> vertices() { \n //return myGraph.keySet(); OLD\n //create a copy of all the vertices in the map to restrict any reference\n //to the interals of this class\n Collection<Vertex> copyOfVertices = new ArrayList<Vertex>();\n copyOfVertices.addAll(myGraph.keySet());\n return copyOfVertices;\n }", "public Collection getAgentsVertexCollection(int vertexId) {\n \treturn vertexAgentsNumber.get(graph.vertex(new Integer(vertexId)));\n }", "public int getNumVertices(){\n return numVertices;\n }", "@Override\n\tpublic List<Location> getVertices() {\n\t\treturn locations;\n\t}", "@Override public Set<L> vertices() {\r\n return new HashSet<L>(vertices);//防御式拷贝\r\n }", "public void displayAsList()\n\t{\n\t\tSystem.out.println(\"Printing all vertices\");\n\t\tvertices.show();\n\t}", "public Stats getStats() {\n if (this.stats == null) {\n this.stats = (Stats) JavaScriptObject.createObject();\n }\n return this.stats;\n }", "public static Collection<Access.AccessStatsEntry> getStatistics() {\n accessorQueueLen.count = accessorQueue.size();\n\n return stats;\n }", "public int getvertex() {\n\t\treturn this.v;\n\t}", "public static ArrayList<String> getStatistics() {\n ArrayList<String> answer = new ArrayList<>();\n for (Map.Entry<String, HashMap<String, Integer>> entry1 : winStatistic.entrySet()) {\n for (Map.Entry<String, Integer> entry2 : entry1.getValue().entrySet()) {\n answer.add(entry1.getKey() + \" won \" + entry2.getKey() + \" \" + entry2.getValue() + \" times.\");\n }\n }\n for (Map.Entry<String, HashMap<String, Integer>> entry1 : drawStatistic.entrySet()) {\n for (Map.Entry<String, Integer> entry2 : entry1.getValue().entrySet()) {\n answer.add(entry1.getKey() + \" play in a draw with \" + entry2.getKey() + \" \" + entry2.getValue() + \" times.\");\n }\n }\n return answer;\n }", "public Set<String> getVertices() {\n\t\treturn vertices;\n\t}", "public int getNumVertices() {\n return num_vertices;\n }", "public Enumeration vertices();", "public int getMinimumVertexCount()\r\n {\r\n return theMinimumVertexCount;\r\n }", "@Override\n public Iterable<E> getAllVertices() {\n return dictionary.keySet();\n }", "private List<Integer> vertices(int num) {\n List<Integer> list = new LinkedList<>();\n for (int i = 0; i < num; i++) {\n list.add(i);\n }\n return list;\n }", "void getVertices() {\r\n\t\tSystem.out.println(\"Enter your vertices:\");\r\n\t\tarrIndexToVertexMap = new HashMap<>();\r\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < numberOfVertices; i++) {\r\n\t\t\t\tarrIndexToVertexMap.put(i, sc.next());\r\n\t\t\t}\r\n\t\t\tsc.close();\r\n\t\t} catch (RuntimeException re) {\r\n\t\t\tSystem.out.println(\"Error at method:: getVertices || Description:\" + re);\r\n\t\t}\r\n\t}", "public HashSet<Town> getVertices() {\r\n\t\treturn (HashSet<Town>) vertices;\r\n\t}", "public int size() {\n\t\treturn vertices.size();\n\t}", "public Vector[] getVerts() {\n\t\treturn this.verts;\n\t}", "public ArrayList<Triangle> getOccluderVertexData();", "public Stats2D statistics() {\n Stats2D stats = new Stats2D(data.values);\n stats.run();\n return stats;\n }", "java.util.List<com.google.speech.logs.MicrophoneChannelStatistics> \n getChannelStatisticsList();", "public int numVertices();", "public int numVertices();", "@Override\n public Set<Vertex> getVertices() {\n Set<Vertex> vertices = new HashSet<Vertex>();\n vertices.add(sourceVertex);\n vertices.add(targetVertex);\n return vertices;\n }", "public Iterator<Integer> getVertexIterator() {\n\t\treturn vertices.keySet().iterator();\n\t}", "public Vertex [] getSortedVertexArray() {\n\t\tVertex [] array = new Vertex[_vertices.size()];\n\t\tint index = 0;\n\t\tfor (Vertex v : _vertices) {\n\t\t\tarray[index++] = v;\n\t\t}\n\t\t// sort\n\t\tArrays.sort(array);\n\t\treturn array;\n\t}", "public String getVertex() {\n\t\treturn vertices.get(0);\n\t}", "@Override\r\n public Collection<node_data> getV() {\r\n return this.graph.values();\r\n }", "public ArrayList<String> getStatsIds() {\n\t\tArrayList<String> arr = new ArrayList<String>();\n\t\tNodeList nl = getStats();\n\t\tint len = nl.getLength();\n\t\tString str = \"\";\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tString id = ParserHelper.requiredAttributeGetter((Element) nl.item(i), \"id\");\n\t\t\tif (id != null) {\n\t\t\t\tarr.add(id);\n\t\t\t\tstr += (id + \"\\n\");\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}", "public String toString(){\r\n String result = \"[ \";\r\n result = result + vertex + \" ]\";\r\n return result;\r\n }", "public int getVertexCount()\n\t{\n\t\tint count = 0;\n\t\tIterator<DSAGraphVertex> itr = vertices.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tcount++;\n\t\t\titr.next();\n\t\t}\n\t\treturn count;\n\t}", "int getStatsCount();", "int getStatsCount();" ]
[ "0.6863938", "0.67950344", "0.64394933", "0.6422412", "0.6368056", "0.6345937", "0.6275204", "0.61813027", "0.6105624", "0.6039544", "0.60254794", "0.6001269", "0.59851557", "0.59427", "0.5916614", "0.59057283", "0.58573973", "0.5856164", "0.58471656", "0.58468354", "0.5833652", "0.58278525", "0.5822167", "0.5819899", "0.5800956", "0.5774295", "0.57631046", "0.5759519", "0.5754362", "0.5754362", "0.57521343", "0.5719383", "0.5717511", "0.57121253", "0.57108885", "0.5686125", "0.56830126", "0.5652639", "0.5646027", "0.5636167", "0.5633918", "0.5633038", "0.56306076", "0.5619371", "0.5618535", "0.56130344", "0.56024164", "0.55951", "0.55855465", "0.55772716", "0.55749255", "0.55742604", "0.5568445", "0.55668366", "0.5557056", "0.5554182", "0.554784", "0.55434304", "0.55329615", "0.5519426", "0.55132776", "0.5511254", "0.55082405", "0.550537", "0.54949886", "0.54893523", "0.5467241", "0.54609495", "0.5447283", "0.54386365", "0.5435884", "0.54332936", "0.5432793", "0.54315615", "0.54287505", "0.5428602", "0.54283327", "0.5418889", "0.54035854", "0.5392347", "0.5383584", "0.53824073", "0.53796387", "0.5376322", "0.53746873", "0.53711396", "0.536921", "0.53646594", "0.5362061", "0.5362061", "0.5354267", "0.5350632", "0.53502476", "0.53476644", "0.5344685", "0.53444856", "0.5341463", "0.53367376", "0.5334883", "0.5334883" ]
0.7453895
0
Returns the edge statistics list
public Map<String, TemporalElementStats> getEdgeStats() { return edgeStats; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HashMap<String, Edge> getEdgeList () {return edgeList;}", "public ArrayList<Edge> getListEdges(){\r\n return listEdges;\r\n }", "public static ArrayList<Edge> getAllEdges(){\n\t\treturn edgeList;\n\t}", "public Collection< EDataT > edgeData();", "java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> \n getEdgeList();", "public Vector<Edge> getEdges(){\n\t\treturn this.listOfEdges;\n\t}", "public List<IEdge> getAllEdges();", "String getEdges();", "List<IEdge> getAllEdges();", "public int edgeCount() {\n\treturn edgeList.size();\n }", "public ArrayList<Edge> getEdgeList() {\n return edgeList;\n }", "public List<EdgeType> getEdges()\n {\n return edges;\n }", "List<Edge<V>> getEdgeList();", "public java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> getEdgeList() {\n if (edgeBuilder_ == null) {\n return java.util.Collections.unmodifiableList(edge_);\n } else {\n return edgeBuilder_.getMessageList();\n }\n }", "public int getEdgeCount() {\n return edge_.size();\n }", "public long getEdgeCount() { return edgeCount; }", "public DEdge[] getEdges(){\n return listOfEdges;\n }", "public List<LayoutEdge> getEdgeList() {\n\treturn edgeList;\n }", "@Override\n\tpublic List<ET> getEdgeList()\n\t{\n\t\treturn new ArrayList<ET>(edgeList);\n\t}", "int getEdgeCount();", "public ArrayList<DrawableGraphEdge> getEdges() {\r\n\t\treturn new ArrayList<DrawableGraphEdge>(edges);\r\n\t}", "ArrayList<Edge> getAdjacencies();", "public String getEdges(){\n double Lx = super.getCentre().x - (this.length / 2);\r\n double Rx = super.getCentre().x + (this.length / 2);\r\n double Dy = super.getCentre().y - (this.width / 2);\r\n double Uy = super.getCentre().y + (this.width / 2);\r\n Point UL = new Point(Lx, Uy);\r\n Point UR = new Point(Rx, Uy);\r\n Point DL = new Point(Lx, Dy);\r\n Point DR = new Point(Rx, Dy);\r\n Point[] Edges = {DL, UL, UR, DR};\r\n this.edge = Edges;\r\n return Arrays.toString(Edges);\r\n }", "@Override\n\tpublic List<Edge> getAllEdges() {\n\n\t\tList<Edge> res = new ArrayList<Edge>();\n\t\tResultSet resultSet = null;\n\n\t\ttry {\n\t\t\tString getAllEdges = \"SELECT node_from, node_to, distance FROM routefinder.relations\";\n\t\t\tresultSet = null;\n\t\t\tpstmt = conn.prepareStatement(getAllEdges);\n\t\t\tresultSet = pstmt.executeQuery();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tEdge edge = new Edge();\n\t\t\t\tedge.setNode1(Database.getNodeFromId(resultSet.getInt(\"node_from\")));\n\t\t\t\tedge.setNode2(Database.getNodeFromId(resultSet.getInt(\"node_to\")));\n\t\t\t\tedge.setDist(resultSet.getDouble(\"distance\"));\n\t\t\t\tres.add(edge);\n\t\t\t}\n\n\t\t\treturn res;\n\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\tJdbcConnect.resultClose(resultSet, pstmt);\n\t\t}\n\n\t\treturn null;\n\t}", "public DSALinkedList<DSAGraphEdge<E>> getAdjacentEdges()\n {\n return edgeList;\n }", "List<CyEdge> getInternalEdgeList();", "public Edge[] getEdges() {\n\t\treturn edges;\n\t}", "public Map<String, Edge> edges() {\n return this.edges;\n }", "public abstract ArrayList<Pair<Vector2, Vector2>> getEdges();", "public ArrayList< Edge > incidentEdges( ) {\n return incidentEdges;\n }", "private ArrayList<Edge>getFullyConnectedGraph(){\n\t\tArrayList<Edge> edges = new ArrayList<>();\n\t\tfor(int i=0;i<nodes.size();i++){\n\t\t\tfor(int j=i+1;j<nodes.size();j++){\n\t\t\t\tEdge edge = new Edge(nodes.get(i), nodes.get(j),Utils.distance(nodes.get(i), nodes.get(j)));\n\t\t\t\tedges.add(edge);\n\t\t\t}\n\t\t}\n\t\treturn edges;\n\t}", "@Override\n\tpublic List<Edge> getAllMapEdges() {\n\n\t\tList<Edge> res = new ArrayList<Edge>();\n\t\tResultSet resultSet = null;\n\n\t\ttry {\n\t\t\tString getAllEdges = \"SELECT node_from, node_to, distance FROM routefinder.maprelations\";\n\t\t\tresultSet = null;\n\t\t\tpstmt = conn.prepareStatement(getAllEdges);\n\t\t\tresultSet = pstmt.executeQuery();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tEdge edge = new Edge();\n\t\t\t\tedge.setNode1(Database.getNodeFromId(resultSet.getInt(\"node_from\")));\n\t\t\t\tedge.setNode2(Database.getNodeFromId(resultSet.getInt(\"node_to\")));\n\t\t\t\tedge.setDist(resultSet.getDouble(\"distance\"));\n\t\t\t\tres.add(edge);\n\t\t\t}\n\t\t\treturn res;\n\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\tJdbcConnect.resultClose(resultSet, pstmt);\n\t\t}\n\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<String> getHITS()\r\n\t{\r\n\r\n\t\tlogger.info(\"Getting HITS...\");\r\n\t\tHITS<Entity, EntityGraphEdge> ranker = new HITS<Entity, EntityGraphEdge>(\r\n\t\t\t\tdirectedGraph);\r\n\t\tlogger.info(\"Ranker was created.\");\r\n\t\tlogger.info(\"Evaluating...\");\r\n\t\tranker.evaluate();\r\n\r\n\t\tlogger.info(\"Got HITS.\");\r\n\t\tCollection<Entity> vertices = directedGraph.getVertices();\r\n\t\tList<String> rankingList = new ArrayList<String>();\r\n\t\tFormat formatter = new DecimalFormat(\"%7.6f\");\r\n\r\n\t\tfor (Entity vertex : vertices) {\r\n\t\t\trankingList.add(\"hub=\"\r\n\t\t\t\t\t+ formatter.format(ranker.getVertexScore(vertex).hub)\r\n\t\t\t\t\t+ \" authority=\"\r\n\t\t\t\t\t+ formatter.format(ranker.getVertexScore(vertex).authority)\r\n\t\t\t\t\t+ \" \" + vertex);\r\n\t\t\t// logger.info(\"HITS ranking for \" + vertex.getVertexEntity() +\r\n\t\t\t// \" : \" + ranker.getRankScore(vertex));\r\n\t\t}\r\n\r\n\t\tCollections.sort(rankingList);\r\n\t\tCollections.reverse(rankingList);\r\n\t\t// logger.info(\"Sorted PageRankings: \" + rankingList);\r\n\t\t// ranker.printRankings(false, true);\r\n\r\n\t\treturn rankingList;\r\n\t}", "public Set<E> getEdges();", "public java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> getEdgeList() {\n return edge_;\n }", "java.util.List<? extends uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdgeOrBuilder> \n getEdgeOrBuilderList();", "@Override\r\n\tpublic String toString() {\r\n\t\tStringBuilder out = new StringBuilder();\r\n\t\tMap<Integer,Integer> tmp;\r\n\t\tout.append(\"{\");\r\n\t\tfor(int i = 0; i < edges.length; i++) {\r\n\t\t\ttmp = edges[i];\r\n\t\t\tif (tmp == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tfor(Map.Entry entry : tmp.entrySet()) {\r\n\t\t\t\t\tif ((int)entry.getValue() == -1) {\r\n\t\t\t\t\tout.append(\"(\" + i + \",\" + entry.getKey() + \")\" + \",\");\r\n\t\t\t\t} else{\r\n\t\t\t\t\tout.append(\"(\" + i + \",\" + entry.getKey() + \",\" + entry.getValue() + \")\" + \",\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (out.length() > 2) {\r\n\t\tout.setLength(out.length() - 2);\r\n\t\tout.append(\")\");\r\n\t\t}\r\n\r\n\t\tout.append(\"}\");\r\n\t\treturn out.toString();\r\n\t}", "public List<Edge> findAllEdge() throws SQLException {\n\t\treturn rDb.findAllEdges();\n\t}", "public HashSet<Edge> getEdges() {\n\t\treturn edges;\n\t}", "public List<Number> getStatistics() {\n return statistics;\n }", "public java.util.List<? extends uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdgeOrBuilder> \n getEdgeOrBuilderList() {\n if (edgeBuilder_ != null) {\n return edgeBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(edge_);\n }\n }", "public int getEdgeCount() {\n if (edgeBuilder_ == null) {\n return edge_.size();\n } else {\n return edgeBuilder_.getCount();\n }\n }", "private Collection<Edge> getEdges()\r\n\t{\r\n\t return eSet;\r\n\t}", "public Iterable<Edge> edges() {\r\n\t\treturn mst;\r\n\t}", "public int getEdgeCount()\n\t{\n\t\treturn edgeCount;\n\t}", "public double getEdge()\n {\n return this.edge;\n }", "public ArrayList<Edge> getAdjacencies(){\r\n return adjacencies;\r\n }", "private String edgeString()\n {\n Iterator<DSAGraphEdge<E>> iter = edgeList.iterator();\n String outputString = \"\";\n DSAGraphEdge<E> edge = null;\n while (iter.hasNext())\n {\n edge = iter.next();\n outputString = (outputString + edge.getLabel() + \", \");\n }\n return outputString;\n }", "java.util.List<com.google.api.MetricDescriptor> getMetricDescriptorsList();", "public abstract List<? extends GraphEdge<N, E>> getEdges();", "public Edge[] getEdges()\r\n {\r\n if(edges == null)\r\n\t{\r\n\t edges = new Edge[numEdges()];\r\n\t int i = 0;\r\n\t for (final EdgeTypeHolder eth : ethMap.values())\r\n\t\tfor (final Edge e : eth.getEdges())\r\n\t\t edges[i++] = e;\r\n\t}\r\n return edges.clone();\r\n }", "public ArrayList<Double> getNeighboursData() {\n\t\tArrayList<Double> result = new ArrayList<Double>();\n\n\t\tfor (Border curBorder: allBorder) {\n\t\t\tresult.add(curBorder.length);\n\t\t}\n\n\t\treturn result;\n\t}", "private List<Integer> getCells(Edge e) {\r\n\t\treturn getCells(e.getMBR());\r\n\t}", "public int edgeNum() {\r\n return edges.size();\r\n }", "public Iterable<Edge> edges() {\r\n Bag<Edge> list = new Bag<Edge>();\r\n for (int v = 0; v < V; v++) {\r\n for (Edge e : adj(v)) {\r\n list.add(e);\r\n }\r\n }\r\n return list;\r\n }", "java.util.List<org.tensorflow.proto.profiler.XStat> \n getStatsList();", "double getEdgeWeight();", "public HashMap<Integer, edge_data> getNeighborEdges() {\n return this.neighborEdges;\n }", "private int numEdges()\r\n\t{\r\n\t return eSet.size();\r\n\t}", "public Enumeration edges();", "public int getEdges() {\n return edgesNumber;\n }", "public Set<List<List<String>>> getEdges()\n\t\t{\n\t\t\treturn m_hyperedges;\n\t\t}", "public Iterator<LayoutEdge> edgeIterator() {\n\treturn edgeList.iterator();\n }", "@Override\n public Collection<edge_data> getE(int node_id) {\n return ((NodeData) this.nodes.get(node_id)).getNeighborEdges().values();\n }", "@Override\n public double getEdgeWeight() {\n return edgeWeight;\n }", "public Map<String, String> getEdge() {\n\t\tif (edge == null) {\n\t\t\tsetEdge(new HashMap<String, String>());\n\t\t}\n\t\treturn edge;\n\t}", "@Override\r\n public Collection<edge_data> getE(int node_id) {\r\n return this.neighbors.get(node_id).values(); //o(k)\r\n }", "@Override\n public Collection<? extends IEdge> getEdges() {\n\n return new LinkedList<>(Collections.unmodifiableCollection(this.edgeMap\n .values()));\n }", "@NotNull\n List<ExpLineageEdge> getEdges(ExpLineageEdge.FilterOptions options);", "public Iterable<DirectedEdge> edges() {\n ArrayList<DirectedEdge> list = new ArrayList<DirectedEdge>();\n for (int v = 0; v < V; v++) {\n for (DirectedEdge e : adj(v)) {\n list.add(e);\n }\n }\n return list;\n }", "Map<Node, Edge> getInEdges() {\n return inEdges;\n }", "public List<Map<String, Object>> ListFaultStatistics(Timestamp start, Timestamp end) {\n\t\treturn statisticsMapper.ListFaultStatistics(start,end);\n\t}", "@Override\n\tpublic Collection<edge_data> getE(int node_id) {\n\t\t// TODO Auto-generated method stub\n\t\treturn Edges.get(node_id).values();\n\t}", "Collection<E> edges();", "List<IEdge> getMST();", "Set<CyEdge> getExternalEdgeList();", "public String getStatistics() {\n return \"Bounds = (\" + x1 + \", \" + y1 + \"), (\" + x2 + \", \" + y2 + \")\\n\" +\n \"Number of Nodes = \" + numNodes + \"\\n\";\n }", "public static int[][] getEdgeMatrix() {\n\t\treturn edge;\n\t}", "public List<Edge> segments() {\n return segments;\n }", "public Collection<Edge> edges() {\n Collection<Collection<Edge>> copyOfEdges = new ArrayList<Collection<Edge>>();\n //values = myGraph.values(); OLD\n //create a copy of all the edges in the map to restrict any reference\n //to interals of this class\n copyOfEdges.addAll(myGraph.values());\n Collection<Edge> allValues = new ArrayList<Edge>();\n Iterator<Collection<Edge>> eachColl = copyOfEdges.iterator();\n while(eachColl.hasNext()){\n allValues.addAll(eachColl.next());\n }\n\n return allValues;\n }", "public ArrayList<GraphEdge> getEdges() {\n return selectedEdges;\n }", "public Edge[] getEdges(EdgeType et)\r\n {\r\n\treturn getEdges(et.getName());\r\n }", "public HashMap<Integer, edge_data> getEdgesConnectedToThisNode() {\n return this.edgesConnectedToThisNode;\n }", "public Set<Eventable> getAllEdges() {\n\t\treturn sfg.edgeSet();\n\t}", "private NodeList getStats() {\n\t\treturn mDom.getElementsByTagName(\"stats\");\n\t}", "public List<Map<String, Object>> ListStatistics(Timestamp start, Timestamp end) {\n\t\treturn statisticsMapper.ListStatistics(start,end);\n\t}", "public String[] getEdgeTypeNames()\r\n {\r\n\treturn ethMap.keySet().toArray(new String[ethMap.size()]);\r\n }", "Map<Node, Edge> getOutEdges() {\n return outEdges;\n }", "@Override\n\tpublic String[] getEdgePropertyNames() {\n\t\treturn edgePropertyNames;\n\t}", "public java.util.List<? extends uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdgeOrBuilder> \n getEdgeOrBuilderList() {\n return edge_;\n }", "List<Edge<V>> getIncidentEdgeList(V v);", "public int getEdgeCount() \n {\n return 3;\n }", "Edge getEdge();", "public Iterator<Edge> getEdgeIter() {\n\t\treturn edges.iterator();\n\t}", "public Map<V,List<E>> adjacencyMap(){\n\t\tMap<V,List<E>> ret = new HashMap<V,List<E>>();\n\t\tfor (E e : edges){\n\t\t\tif (virtualEdges.contains(e))\n\t\t\t\tcontinue;\n\t\t\tList<E> list;\n\t\t\tif (!ret.containsKey(e.getOrigin())){\n\t\t\t\tlist = new ArrayList<E>();\n\t\t\t\tret.put(e.getOrigin(), list);\n\t\t\t}\n\t\t\telse\n\t\t\t\tlist = ret.get(e.getOrigin());\n\t\t\tlist.add(e);\n\t\t\t\n\t\t\tif (!ret.containsKey(e.getDestination())){\n\t\t\t\tlist = new ArrayList<E>();\n\t\t\t\tret.put(e.getDestination(), list);\n\t\t\t}\n\t\t\telse\n\t\t\t\tlist = ret.get(e.getDestination());\n\t\t\tlist.add(e);\n\t\t}\n\t\treturn ret;\n\t}", "public static Collection<Access.AccessStatsEntry> getStatistics() {\n accessorQueueLen.count = accessorQueue.size();\n\n return stats;\n }", "Map<String, Object> getStats();", "public void printStats() {\n\t\t\n\t\tif(grafo==null) {\n\t\t\t\n\t\t\tthis.createGraph();\n\t\t}\n\t\t\n\t\tConnectivityInspector <Airport, DefaultWeightedEdge> c = new ConnectivityInspector<>(grafo);\n\t\t\n\t\tSystem.out.println(c.connectedSets().size());\n\n\t}", "@Override\n public Collection<? extends IHyperEdge> getHyperEdges() {\n\n return new LinkedList<>(\n Collections.unmodifiableCollection(this.hyperEdgeMap.values()));\n }", "protected abstract String getStatistics();" ]
[ "0.67151016", "0.667431", "0.65438306", "0.6527472", "0.6516466", "0.6500565", "0.63902473", "0.6376357", "0.63592345", "0.635322", "0.63418925", "0.63275594", "0.62750524", "0.6273071", "0.6267057", "0.62475264", "0.6242619", "0.61987346", "0.6171426", "0.61535364", "0.61071867", "0.609974", "0.60864305", "0.6075158", "0.6041513", "0.6031067", "0.6026381", "0.60121167", "0.5985418", "0.5982731", "0.5938038", "0.59278643", "0.5926911", "0.59198767", "0.5902352", "0.58910924", "0.58829415", "0.5875794", "0.58695275", "0.5857572", "0.5851005", "0.5847969", "0.58479226", "0.5847512", "0.58309937", "0.58231366", "0.5817877", "0.5794595", "0.5789373", "0.5774415", "0.5774375", "0.57651556", "0.5761924", "0.5759448", "0.5753225", "0.57475287", "0.5734863", "0.5718851", "0.5715167", "0.56819546", "0.56752586", "0.5667462", "0.5655948", "0.56555414", "0.564457", "0.56408995", "0.563422", "0.5622968", "0.562294", "0.56228036", "0.5621526", "0.5609897", "0.5592075", "0.55815846", "0.5581438", "0.557976", "0.5544525", "0.5543319", "0.55377394", "0.5534005", "0.5529206", "0.55114275", "0.55096483", "0.5503858", "0.54968846", "0.5480182", "0.54800206", "0.5476011", "0.5473242", "0.54698503", "0.54641056", "0.5462318", "0.5443956", "0.543429", "0.5430573", "0.5421505", "0.54210085", "0.54083884", "0.54025596", "0.5399836" ]
0.74887
0
no further estimations for = and !=
@Override public double estimateTemporalProb(ElementType type1, Optional<String> label1, TimeSelector.TimeField field1, Comparator comp, Long value) { if (comp == EQ) { return VERY_LOW_PROB; } else if (comp == Comparator.NEQ) { return VERY_HIGH_PROB; } // <, <=, >=, > if (!(label1.isPresent())) { return estimateTemporalProb(type1, field1, comp, value); } else { TemporalElementStats elementStats = (type1 == ElementType.VERTEX) ? vertexStats.getOrDefault(label1.get(), null) : edgeStats.getOrDefault(label1.get(), null); // label not in keys if (elementStats == null) { return VERY_LOW_PROB; } Binning bins = getBins(elementStats, field1); return estimateFromBins(bins, comp, value); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void equal() {\n if (operatorAssigned != Operator.NON || operatorType != Operator.NON) {\n double subResult;\n if (numberStored[1] != 0) {\n subResult = basicCalculation(numberStored[1], Double.parseDouble(mainLabel.getText()), operatorType);\n numberStored[0] = basicCalculation(numberStored[0], subResult, operatorAssigned);\n numberStored[1] = 0;\n mainLabel.setText(Double.toString(numberStored[0]));\n } else {\n numberStored[0] = basicCalculation(numberStored[0], Double.parseDouble(mainLabel.getText()), operatorType);\n mainLabel.setText(Double.toString(numberStored[0]));\n }\n }\n operatorAssigned = Operator.NON;\n operatorType = Operator.NON;\n }", "default boolean ne(int lhs, int rhs) {\r\n return !eq(lhs,rhs);\r\n }", "@Override\n\tpublic boolean equal() {\n\t\treturn false;\n\t}", "@Override\n\tprotected void resetFalseClause() {\n\t\t\n\t}", "@Test\n\tpublic void testEqualityCheck() {\n\t\tadd(\"f(x)=x^3\");\n\t\tadd(\"g(x)=-x^3\");\n\t\tt(\"f==g\", \"false\");\n\t\tt(\"f!=g\", \"true\");\n\t\tt(\"f==-g\", \"true\");\n\t\tt(\"f!=-g\", \"false\");\n\t}", "public void encircleFalseTest()\n\t{\n\t\tData d = new Data();\n\t\td.set(15, 29);\n\t\td.set(17, 19);\n\t\tassertFalse(d.isEncircled(29));\n\t}", "protected boolean isEqual( Object lhs, Object rhs ){\r\n\t\tboolean x = lhs==null;\r\n\t\tboolean y = rhs == null;\r\n\t\t//XOR OPERATOR, only one is null\r\n\t\tif ((x || y) && !(x && y))\r\n\t\t\treturn false;\r\n\t\tif (lhs.equals(rhs))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "private boolean equals() {\r\n return MARK(EQUALS) && CHAR('=') && gap();\r\n }", "@Override\n protected boolean runInEQ() {\n return true;\n }", "@Override\n\tpublic void visit(EqualityNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * evaluam fiul stang si fiul drept\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tString s2 = null;\n\t\tString s1 = null;\n\t\t/**\n\t\t * preluam rezultatele evaluarii celor doi fii\n\t\t */\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\ts1 = Evaluator.variables.get(node.getChild(0).getName());\n\t\t} else {\n\t\t\ts1 = node.getChild(0).getName();\n\t\t}\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ts2 = Evaluator.variables.get(node.getChild(1).getName());\n\t\t} else {\n\t\t\ts2 = node.getChild(1).getName();\n\t\t}\n\n\t\t/**\n\t\t * verificam daca cei doi fii s- au evaluat la aceeasi expresie\n\t\t */\n\t\tif (s1.contentEquals(s2)) {\n\t\t\tnode.setName(\"true\");\n\t\t} else {\n\t\t\tnode.setName(\"false\");\n\t\t}\n\n\t}", "private static boolean checkEqualsToOperations(String expression, Lexemes lexemes, SymbolTable table) {\n\t\tif (expression.contains(\"==\")) {\n\n\t\t\tString[] arr = expression.split(\"==\");\n\t\t\tint finalIndex = arr.length - 1;\n\n\t\t\tfor (int i = 0; i <= finalIndex; i++) {\n\t\t\t\tString s = arr[i];\n\n\t\t\t\t// check if the current word is a variable\n\t\t\t\tif (table.contains(s)) {\n\t\t\t\t\tint id = table.getIdOfVariable(s);\n\t\t\t\t\tlexemes.insertLexeme(\"ID\", ((Integer) id).toString());\n\t\t\t\t} else {\n\n\t\t\t\t\tif (s.equals(\"true\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"CONST_BOOL\", \"true\");\n\t\t\t\t\t} else if (s.equals(\"false\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"CONST_BOOL\", \"false\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!checkRelationalOperations(s.trim(), lexemes, table)) return false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (i < finalIndex) {\n\t\t\t\t\tlexemes.insertLexeme(\"RELOP\", \"==\");\n\t\t\t\t} else if (expression.endsWith(\"==\")) {\n\t\t\t\t\tlexemes.insertLexeme(\"RELOP\", \"==\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (!checkRelationalOperations(expression.trim(), lexemes, table)) return false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Override\n public Void visit(AssignmentExpression nd, SuccessorInfo i) {\n if (\"&&=\".equals(nd.getOperator()) || \"||=\".equals(nd.getOperator()) || \"??=\".equals(nd.getOperator())) {\n if (\"&&=\".equals(nd.getOperator())) {\n // from lhs to rhs on truthy. from lhs to false-branch on falsy.\n visitWithSuccessors(nd.getLeft(), First.of(nd.getRight()), i.getSuccessors(false));\n } else if (\"||=\".equals(nd.getOperator())) {\n // from lhs to true-branch on truthy. from lhs to rhs on falsy.\n visitWithSuccessors(nd.getLeft(), i.getSuccessors(true), First.of(nd.getRight()));\n } else { // \"??=\"\n // the union of the above - truthyness is unknown.\n visitWithSuccessors(nd.getLeft(), union(First.of(nd.getRight()), i.getAllSuccessors()));\n }\n \n visitWithSuccessors(nd.getRight(), nd); // from right to assignment.\n\n writeSuccessors(nd, i.getGuardedSuccessors(nd));\n } else {\n visitAssign(nd, nd.getLeft(), nd.getRight());\n writeSuccessors(nd, i.getGuardedSuccessors(nd));\n }\n return null;\n }", "@Override\n public boolean visit(JsBinaryOperation x, JsContext<JsExpression> ctx) {\n return !x.getOperator().isAssignment()\n || !(x.getArg1() instanceof JsStringLiteral);\n }", "public abstract String representInequality();", "@Test\n public void test_SetOxideCorr() {\n System.out.println(\"Testing MeasuredRatioModel's setOxideCorr(boolean value)\");\n MeasuredRatioModel instance = new MeasuredRatioModel();\n boolean expResult = true;\n instance.setOxideCorr(true);\n boolean result = instance.isOxideCorr();\n assertEquals(expResult, result);\n instance.setOxideCorr(false);\n result = instance.isOxideCorr();\n expResult=false;\n assertEquals(expResult, result);\n }", "public T caseOperation_Not_Equals(Operation_Not_Equals object)\r\n {\r\n return null;\r\n }", "private boolean notEquals(Object a, Object b)\n {\n if (a != null && b == null)\n return true;\n if (a == null && b != null)\n return true;\n if (a != null && !a.equals(b))\n return true;\n return false;\n }", "@Override\n public Operator visitAssign(Assign operator)\n {\n throw new AssertionError();\n }", "private void ensureConditionContinuity( )\n {\n /* If the operators are not valid, then do not move the conditions */\n if ( checkOperators() )\n {\n /*\n * When Left Hand Side, Operator and Right Hand Side for a Condition\n * are empty then infer the default value, i.e., set Operator to\n * CVL_WF_OPRSImpl.EQUAL. Left Hand Side and Right Hand Side will continue\n * to remain empty.\n */\n defaultForEmptyConditions();\n\n int liCount = 0;\n int liNumber = 0 ;\n int liCurrentRow = 0;\n Data loNewData = null ;\n Data loOldData = null ;\n\n /* Cycle through the conditions. Make sure the conditions in front */\n /* of current condition are not blank, if so, move current condition up */\n\n for (liCount = 2; liCount < 6; liCount++ )\n {\n liNumber = liCount ;\n while (liNumber > 1)\n {\n liCurrentRow = liCount - ( liNumber - 1 );\n if (getAND_COND_LHS(liCurrentRow) == null)\n {\n /*\n * copy old condition to new condition, or condition 2 to 1 ...\n * first get data from new left hand side, and get data from\n * old left hand side, and copy new to old. Repeat for right\n * hand side , operator and Condition Type.\n */\n\n loNewData = getData(\"AND_COND_LHS_\" + liCount ) ;\n loOldData = getData(\"AND_COND_LHS_\" + liCurrentRow ) ;\n loOldData.setString(loNewData.getString() );\n loNewData = getData(\"AND_COND_RHS_\" + liCount ) ;\n loOldData = getData(\"AND_COND_RHS_\" + liCurrentRow ) ;\n loOldData.setString(loNewData.getString() );\n loNewData = getData(\"AND_COND_RHS_FLD_\" + liCount ) ;\n loOldData = getData(\"AND_COND_RHS_FLD_\" + liCurrentRow ) ;\n loOldData.setString(loNewData.getString() );\n loNewData = getData(\"AND_COND_OPR_\" + liCount ) ;\n loOldData = getData(\"AND_COND_OPR_\" + liCurrentRow ) ;\n loOldData.setbyte(loNewData.getbyte() );\n loNewData = getData(\"AND_COND_TYP_\" + liCount ) ;\n loOldData = getData(\"AND_COND_TYP_\" + liCurrentRow ) ;\n loOldData.setint(loNewData.getint() );\n /*\n * reset the old condition back to null ,operator to default 3\n * and Condition type to 1 (i.e. Actual Value)\n */\n loNewData = getData(\"AND_COND_LHS_\" + liCount ) ;\n loNewData.setString(null);\n loNewData = getData(\"AND_COND_RHS_\" + liCount ) ;\n loNewData.setString(null);\n loNewData = getData(\"AND_COND_RHS_FLD_\" + liCount ) ;\n loNewData.setString(null);\n loNewData = getData(\"AND_COND_OPR_\" + liCount ) ;\n loNewData.setbyte((byte)3);\n loNewData = getData(\"AND_COND_TYP_\" + liCount ) ;\n loNewData.setint(CVL_WF_COND_TYPImpl.ACTUAL_VAL);\n\n } /* end if (getAND_COND_LHS(liCurrentRow) == null) */\n\n liNumber-- ;\n\n } /* end while (liNumber > 1) */\n } /* end for (liCount = 2; liCount < 6; liCount++ ) */\n } /* end if ( checkOperators() ) */\n }", "public Grid2DBit notEq(WeatherGridSlice gs) {\n Grid2DBit bits = eq(gs);\n bits.negate();\n return bits;\n }", "@Test \n\tpublic void checkEquality() {\n\t\tassertTrue(testCell.equals(testCell));\n\t\tassertFalse(testCell.equals(new Cell(false)));\n\n\t}", "private void defaultForEmptyConditions()\n {\n /*\n * When any of the Conditions has all Left Hand Side, Operator and\n * Right Hand Side as empty then set Operator to default value of\n * CVL_WF_OPRSImpl.EQUAL(mimic default situation).\n * Note if this is not done then the condition will store null value\n * for Left Hand Side, Operator and Right Hand Side, and the whole condition\n * record will not be displayed on \"Manage Approval Conditions\" page\n * because the page selection query uses an equal join with R_WF_APRV_COND\n * and CVL_WF_OPRS tables.\n */\n for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ )\n {\n if( isNull(\"AND_COND_LHS_\" + liCtr) && isNull(\"AND_COND_OPR_\" + liCtr)\n && isNull(\"AND_COND_RHS_\" + liCtr) )\n {\n getData(\"AND_COND_OPR_\" + liCtr).setbyte((byte)3);\n }\n }//end for\n }", "public boolean associates(Operator op){\n\t return false;\n }", "private boolean NOT(boolean b) {\r\n in = saves[--save];\r\n return !b;\r\n }", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "private void doEpsilon(){\n\t\tcurrentState = \"q0\";\n\t}", "synchronized boolean resetWasUsed() {\n\n boolean result = lastValue != currValue;\n\n lastValue = currValue;\n\n return result;\n }", "@Test\n public void defaultOperatorsEvaluateFalseTest() throws Exception {\n\n assertThat(getNode(\"1 == 2\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 != 1\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 <> 1\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 < 0\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"2 > 4\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 >= 3\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"2 >= 4\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 <= 0\", \"expr\").render(null), is((Object)false));\n }", "public boolean offForEvaluation();", "public IsEmptyOperationEvaluator(boolean negate) {\r\n this.negate = negate;\r\n }", "@Override\r\n\tpublic boolean isEqual(Node node) {\n\t\treturn false;\r\n\t}", "public void testX1andX2orNotX1() {\n \tCircuit circuit = new Circuit();\n \t\n \tBoolean b1 = Boolean.TRUE;\n \tBoolean b2 = Boolean.FALSE;\n \tAnd and = (And) circuit.getFactory().getGate(Gate.AND);\n\t\tNot not = (Not) circuit.getFactory().getGate(Gate.NOT);\n\t\tOr or = (Or) circuit.getFactory().getGate(Gate.OR);\n\t\tand.setLeftInput(b1);\n\t\tand.setRightInput(b2);\n\t\tand.eval();\n\t\tnot.setInput(b1);\n\t\tnot.eval();\n\t\tor.setLeftInput(and.getOutput());\n\t\tor.setRightInput(not.getOutput());\n\t\tassertEquals(Boolean.FALSE, or.eval());\n\t\tassertEquals(Boolean.FALSE, circuit.eval());\n//\t\t==========================================\n\t\tb1 = Boolean.FALSE;\n \tb2 = Boolean.TRUE;\n// \tand.eval();\n// \tnot.eval();\n \tassertEquals(Boolean.FALSE, circuit.eval());\n// \t============================================\n \tDouble d1 = 0.0;\n \tDouble d2 = 1.0;\n \tand.setLeftInput(d1);\n\t\tand.setRightInput(d2);\n\t\tnot.setInput(d1);\n\t\tor.setLeftInput(and.getOutput());\n\t\tor.setRightInput(not.getOutput());\n \tassertEquals( new Double(1.0), or.eval());\n// \t============================================\n \td1 = 0.5;\n \td2 = 0.5;\n \tand.setLeftInput(d1);\n\t\tand.setRightInput(d2);\n \tand.eval();\n \tnot.setInput(d1);\n \tnot.eval();\n\t\tor.setLeftInput(and.getOutput());\n\t\tor.setRightInput(not.getOutput());\n \tassertEquals( new Double(0.625), or.eval());\n// \t============================================\n \ttry {\n \td1 = 0.5;\n \td2 = 2.0;\n \tand.setLeftInput(d1);\n \t\tand.setRightInput(d2);\n \tand.eval();\n \tnot.setInput(d1);\n \tnot.eval();\n \t\tor.setLeftInput(and.getOutput());\n \t\tor.setRightInput(not.getOutput());\n \tassertEquals( new Double(0.625), or.eval());\n \t} catch (IllegalArgumentException e) {\n \t\tSystem.err.println(\"IllegalArgumentException: \" + e.getMessage());\n \t}\n\n }", "Object findOperatorNeedCheck();", "public boolean isPureAssignment() {\n return (commandElement() == null) && hasAssignments();\n }", "@Test\n \tpublic void testNotEqual() {\n \t\tAssert.assertFalse(f1.equals(f2));\n \t}", "public static void main(String[] args) {\nboolean a, b, c;\na =true;\nb = false;\nc =a && b;\n\nSystem.out.println(\"c = a&&B:\" + c);\nc = a||b;\nSystem.out.println(\"c = a||b:\" + c);\nc = a==b;\nSystem.out.println(\"c = a==b:\" + c);\nc = a!=b;\nSystem.out.println(\"c = a!=b:\" + c);\n\n\n\n\t}", "@RepeatedTest(20)\n void negTest(){\n assertEquals(bot.neg(),bof);\n assertEquals(bof.neg(),bot);\n assertNotEquals(bot.neg(),bot);\n assertNotEquals(bof.neg(),bof);\n Binary b1 = new Binary(\"10101\");\n Binary notb1 = new Binary(\"01010\");\n Binary b2 = new Binary(\"0100110\");\n Binary notb2 = new Binary(\"1011001\");\n assertEquals(b1.neg(),notb1);\n assertEquals(notb1.neg(),b1);\n assertEquals(b2.neg(),notb2);\n assertEquals(notb2.neg(),b2);\n Binary b3 = new Binary(\"00000000000\");\n Binary notb3 = new Binary(\"1\");\n Binary b4 = new Binary(\"00000000001\");\n Binary notb4 = new Binary(\"10\");\n assertEquals(b3.neg(),notb3);\n assertEquals(notb3.neg(),b3);\n assertEquals(b4.neg(),notb4);\n assertEquals(notb4.neg(),b4);\n Binary b5 = new Binary(\"11111111\");\n Binary notb5 = new Binary(\"0\");\n Binary b6 = new Binary(\"11111110\");\n Binary notb6 = new Binary(\"01\");\n assertEquals(b5.neg(),notb5);\n assertEquals(notb5.neg(),b5);\n assertEquals(b6.neg(),notb6);\n assertEquals(notb6.neg(),b6);\n\n //Nulls\n assertEquals(f.neg(), Null);\n assertEquals(i.neg(), Null);\n assertEquals(st.neg(), Null);\n assertEquals(Null.neg(), Null);\n\n }", "public TruthExpression() {\r\n\t\tsuper(new Expression[]{});\r\n\t\tthis.truthValue = TruthValue.FALSE;\r\n\t}", "private boolean factor() {\r\n return MARK(ATOM) && atom() && postops();\r\n }", "public Value restrictToNotAbsent() {\n checkNotUnknown();\n if (isNotAbsent())\n return this;\n Value r = new Value(this);\n r.flags &= ~ABSENT;\n if (r.var != null && (r.flags & (PRESENT_DATA | PRESENT_ACCESSOR)) == 0)\n r.var = null;\n return canonicalize(r);\n }", "private BDDState handleAssignment(CAssignment assignment, CFANode successor, CFAEdge edge)\n throws UnsupportedCodeException {\n CExpression lhs = assignment.getLeftHandSide();\n\n final String varName;\n if (lhs instanceof CIdExpression) {\n varName = ((CIdExpression) lhs).getDeclaration().getQualifiedName();\n } else {\n varName = functionName + \"::\" + lhs;\n }\n\n final CType targetType = lhs.getExpressionType();\n\n // next line is a shortcut, not necessary\n if (!precision.isTracking(MemoryLocation.fromQualifiedName(varName), targetType, successor)) {\n return state;\n }\n\n BDDState newState = state;\n CRightHandSide rhs = assignment.getRightHandSide();\n if (rhs instanceof CExpression exp) {\n final Partition partition = varClass.getPartitionForEdge(edge);\n\n if (isUsedInExpression(varName, exp)) {\n // make tmp for assignment,\n // this is done to handle assignments like \"a = !a;\" as \"tmp = !a; a = tmp;\"\n String tmpVarName = predmgr.getTmpVariableForPartition(partition);\n final Region[] tmp =\n predmgr.createPredicateWithoutPrecisionCheck(\n tmpVarName, bvComputer.getBitsize(partition, targetType));\n final CFANode location = successor;\n\n // make region for RIGHT SIDE and build equality of var and region\n final Region[] regRHS =\n bvComputer.evaluateVectorExpression(partition, exp, targetType, location, precision);\n newState = newState.addAssignment(tmp, regRHS);\n\n // delete var, make tmp equal to (new) var, then delete tmp\n final Region[] var =\n predmgr.createPredicate(\n scopeVar(lhs),\n targetType,\n successor,\n bvComputer.getBitsize(partition, targetType),\n precision);\n newState = newState.forget(var);\n newState = newState.addAssignment(var, tmp);\n newState = newState.forget(tmp);\n\n } else {\n final Region[] var =\n predmgr.createPredicate(\n scopeVar(lhs),\n targetType,\n successor,\n bvComputer.getBitsize(partition, targetType),\n precision);\n newState = newState.forget(var);\n final CFANode location = successor;\n\n // make region for RIGHT SIDE and build equality of var and region\n final Region[] regRHS =\n bvComputer.evaluateVectorExpression(\n partition, (CExpression) rhs, targetType, location, precision);\n newState = newState.addAssignment(var, regRHS);\n }\n return newState;\n\n } else if (rhs instanceof CFunctionCallExpression) {\n // handle params of functionCall, maybe there is a sideeffect\n newState =\n handleExternalFunctionCall(\n newState, successor, ((CFunctionCallExpression) rhs).getParameterExpressions());\n\n // call of external function: we know nothing, so we delete the value of the var\n // TODO can we assume, that malloc returns something !=0?\n // are there some \"save functions\"?\n\n final Region[] var =\n predmgr.createPredicate(\n scopeVar(lhs),\n targetType,\n successor,\n bitsize,\n precision); // is default bitsize enough?\n newState = newState.forget(var);\n\n return newState;\n\n } else {\n throw new AssertionError(\"unhandled assignment: \" + edge.getRawStatement());\n }\n }", "public void unAssign(){\n\t\tthis.value = 0;\n\t}", "@Test\n public void testNotEquals2() throws Exception {\n String sql = \"SELECT a from db.g where a != 'value'\";\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 verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, \"a\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, \"db.g\");\n\n Node criteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, CompareCriteria.ID);\n verifyProperty(criteriaNode, AbstractCompareCriteria.OPERATOR_PROP_NAME, CriteriaOperator.Operator.NE.name());\n verifyElementSymbol(criteriaNode, AbstractCompareCriteria.LEFT_EXPRESSION_REF_NAME, \"a\");\n verifyConstant(criteriaNode, CompareCriteria.RIGHT_EXPRESSION_REF_NAME, \"value\");\n \n verifySql(\"SELECT a FROM db.g WHERE a <> 'value'\", fileNode);\n }", "public static void main(String[] args) {\n\t\n\tSystem.out.println(10>9);\n\tboolean resultA = 10> 9; \n\t\n\tSystem.out.println(resultA);\n\tSystem.out.println(10>=9); // greater or equal\n\t\n\tboolean resultB= 10>=9; \n\tSystem.out.println(resultB);\n\t\n\tboolean resultC = 10<=9; \n\tSystem.out.println(resultC);\n\t\n\tboolean resultD= 1100 <1200;\n\tSystem.out.println(resultD);\n\t\n\tboolean resultE = 1000 < 1000; \n\tSystem.out.println(resultE);\n\t\t\t\n\tboolean resultF = 1000 <= 1000; \n\tSystem.out.println(resultF);\n\t\n\t\n\t\n\t\n\tboolean A = ! false ; \n\tSystem.out.println(A);\n\t\n\tboolean B = ! true; \n\tSystem.out.println(B);\n\t\n\tboolean C = ! false !=false; \n\tSystem.out.println(C);\n\t\n\t\n\t\n\t// practice ! (not) : \n\t\n\tboolean g = false; \n\tSystem.out.println(g);\n\t\n\tSystem.out.println(! g);\n\t\n\tSystem.out.println(!true == false);\n\t\n\t\n\t\n\tboolean h = \"Batch 12\" == \"Batch13\"; \n\tSystem.out.println(h);\n\n\tSystem.out.println( \" batch12\" != \"Batch12\");\n\tSystem.out.println(\"Kuzzat\" == \"bad guy\");\n\t\n\t\n\tint Num = 198; \n\tSystem.out.println(Num %= 2);\n\t\n\tbyte byteNum = 30; \n\t// int INum = INum + byteNum ; // we must give value to local variables . \n\t\n\t\n\tString str; \n\t// System.out.println(str);\n\t\n\t\n\t\n}", "@Override\n public Literal not() {\n if (negation == null) {\n negation = new NotBoolVar(this);\n }\n return negation;\n }", "public static BinaryExpression exclusiveOrAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "@Override\n\tpublic int getEQMode()\n\t{\n\t\treturn 0;\n\t}", "@Test\n\tpublic void ifYouEncounterEqualsThenThatsNotAPattern() {\n\t\tfinal Tokenizable line = line(\"=\");\n\t\tcontext.checking(new Expectations() {{\n\t\t}});\n\t\tTDAPatternParser parser = new TDAPatternParser(errors, vnamer, builder, topLevel);\n\t\tTDAParsing nested = parser.tryParsing(line);\n\t\tassertNull(nested);\n\t\tassertEquals(0, line.at());\n\t}", "private void assignment() {\n\n\t\t\t}", "@RepeatedTest(20)\n void logicalOperatorsTest() {\n assertEquals(bi.or(bot), new Binary(\"1\"));\n assertEquals(bi.or(bof), bi);\n assertEquals(bi.and(bot), bi);\n assertEquals(bi.and(bof), new Binary(\"0\"));\n assertEquals(bot.or(bi), new Binary(\"1\"));\n assertEquals(bof.or(bi), bi);\n assertEquals(bot.and(bi), bi);\n assertEquals(bof.and(bi), new Binary(\"0\"));\n assertEquals(bot.and(bot), bot);\n assertEquals(bot.and(bof),bof);\n assertEquals(bof.and(bot),bof);\n assertEquals(bof.and(bof),bof);\n assertEquals(bot.or(bot), bot);\n assertEquals(bot.or(bof),bot);\n assertEquals(bof.or(bot),bot);\n assertEquals(bof.or(bof),bof);\n Binary b1 = new Binary(\"10001\");\n Binary b2 = new Binary(\"1001011\");\n assertEquals(b1.or(b2), new Binary(\"1111011\"));\n assertEquals(b1.and(b2), new Binary(\"1000001\"));\n assertEquals(b1.or(b2), b2.or(b1));\n assertEquals(b1.and(b2),b2.and(b1));\n assertEquals(bi.or(bi), bi);\n assertEquals(bi.and(bi),bi);\n Binary notbi = bi.neg();\n assertEquals(bi.or(notbi), new Binary(\"1\"));\n assertEquals(bi.and(notbi), new Binary(\"0\"));\n\n //nulls\n //Bool or ITypes \\ {Logicals}\n assertEquals(bot.or(st),Null);\n assertEquals(bof.or(st),Null);\n assertEquals(bot.or(f), Null);\n assertEquals(bof.or(i), Null);\n //Float or ITypes\n assertEquals(f.or(st), Null);\n assertEquals(f.or(bot), Null);\n assertEquals(f.or(bof), Null);\n assertEquals(f.or(i), Null);\n assertEquals(f.or(g), Null);\n assertEquals(f.or(bi), Null);\n //Int or ITypes\n assertEquals(i.or(st), Null);\n assertEquals(i.or(bot),Null);\n assertEquals(i.or(bof), Null);\n assertEquals(i.or(j), Null);\n assertEquals(i.or(f), Null);\n assertEquals(i.or(bi), Null);\n //Binary or ITypes \\ {Logicals}\n assertEquals(bi.or(st), Null);\n assertEquals(bi.or(f), Null);\n assertEquals(bi.or(i), Null);\n //NullType or ITypes\n assertEquals(Null.or(st), Null);\n assertEquals(Null.or(bof), Null);\n assertEquals(Null.or(f), Null);\n assertEquals(Null.or(i), Null);\n assertEquals(Null.or(bi), Null);\n assertEquals(Null.or(Null), Null);\n assertEquals(st.or(Null), Null);\n assertEquals(bot.or(Null), Null);\n assertEquals(f.or(Null), Null);\n assertEquals(i.or(Null), Null);\n assertEquals(bi.or(Null), Null);\n\n //Bool and ITypes \\ {Logicals}\n assertEquals(bot.and(st),Null);\n assertEquals(bof.and(st),Null);\n assertEquals(bot.and(f), Null);\n assertEquals(bof.and(i), Null);\n //Float and ITypes\n assertEquals(f.and(st), Null);\n assertEquals(f.and(bot), Null);\n assertEquals(f.and(bof), Null);\n assertEquals(f.and(i), Null);\n assertEquals(f.and(g), Null);\n assertEquals(f.and(bi), Null);\n //Int and ITypes\n assertEquals(i.and(st), Null);\n assertEquals(i.and(bot),Null);\n assertEquals(i.and(bof), Null);\n assertEquals(i.and(j), Null);\n assertEquals(i.and(f), Null);\n assertEquals(i.and(bi), Null);\n //Binary and ITypes \\ {Logicals}\n assertEquals(bi.and(st), Null);\n assertEquals(bi.and(f), Null);\n assertEquals(bi.and(i), Null);\n //NullType and ITypes\n assertEquals(Null.and(st), Null);\n assertEquals(Null.and(bof), Null);\n assertEquals(Null.and(f), Null);\n assertEquals(Null.and(i), Null);\n assertEquals(Null.and(bi), Null);\n assertEquals(Null.and(Null), Null);\n assertEquals(st.and(Null), Null);\n assertEquals(bot.and(Null), Null);\n assertEquals(f.and(Null), Null);\n assertEquals(i.and(Null), Null);\n assertEquals(bi.and(Null), Null);\n\n }", "default boolean isRepeatState() {\n return isRepeatState(FULL_EQUAL);\n }", "private Boolean evaluateBooleanExpression(Expression expr, InMemoryExpressionEvaluator eval)\n {\n try\n {\n Object result = expr.evaluate(eval);\n return (result instanceof InMemoryFailure) ? Boolean.FALSE : (Boolean)result;\n }\n catch (VariableNotSetException vnse)\n {\n if (NucleusLogger.QUERY.isDebugEnabled())\n {\n NucleusLogger.QUERY.debug(Localiser.msg(\"021024\", vnse.getVariableExpression().getId(), StringUtils.objectArrayToString(vnse.getValues())));\n }\n\n // TODO The iteration through possible variable values needs improving. We currently just drop out\n // to here with the possible values of a variable when first encountered (and not yet set), which\n // then starts the iteration process. This likely would fail if 2 or more variables (unchecked)\n if (vnse.getValues() == null || vnse.getValues().length == 0)\n {\n // No values available for this variable, so just put null and see the result\n eval.setVariableValue(vnse.getVariableExpression().getId(), null);\n if (NucleusLogger.QUERY.isDebugEnabled())\n {\n NucleusLogger.QUERY.debug(Localiser.msg(\"021025\", vnse.getVariableExpression().getId(), \"(null)\"));\n }\n if (Boolean.TRUE.equals(evaluateBooleanExpression(expr, eval)))\n {\n return Boolean.TRUE;\n }\n }\n else\n {\n // Set this variable and start iteration over the possible variable values\n for (int i=0;i<vnse.getValues().length;i++)\n {\n eval.setVariableValue(vnse.getVariableExpression().getId(), vnse.getValues()[i]);\n if (NucleusLogger.QUERY.isDebugEnabled())\n {\n NucleusLogger.QUERY.debug(Localiser.msg(\"021025\", vnse.getVariableExpression().getId(), vnse.getValues()[i]));\n }\n if (Boolean.TRUE.equals(evaluateBooleanExpression(expr, eval)))\n {\n return Boolean.TRUE;\n }\n }\n }\n\n // No variable value was successful so return FALSE\n if (NucleusLogger.QUERY.isDebugEnabled())\n {\n NucleusLogger.QUERY.debug(Localiser.msg(\"021026\", vnse.getVariableExpression().getId()));\n }\n eval.removeVariableValue(vnse.getVariableExpression().getId());\n return Boolean.FALSE;\n }\n }", "public boolean setNoDialog(boolean negated) {\n if (negated)\n value = variable.F;\n else\n value = variable.T;\n //store the name of the variable in the selectedVars list (used in model checker)\n selectedVars.add(name);\n // for each clause in clist that contains not this-term\n\n Iterator i = cnfClause.clist.iterator();\n while ( i.hasNext() ) {\n cnfClause c = ( cnfClause ) i.next();\n if ( c.hasNegTerm( !negated, ( variable )this ) ) {\n if ( c.isUnitOpen() != null )\n cnfClause.stack.push( c );\n else\n if ( c.isViolated() ) {\n cnfClause.ctStr += ((node)c.formula).toString().replace(\"_\",\"\") + \"\\n\";\n return false;\n /*grammar.dumpUserSelections();\n JOptionPane.showMessageDialog( null,\n \"model inconsistency detected -- see stderr for more information\",\n \"Error!\", JOptionPane.ERROR_MESSAGE );\n System.exit(1);*/\n }\n\n }\n }\n return true;\n }", "@Test\n public void trueAndFalseCombined() {\n assertFalse(getPredicateInstance(false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(false, null, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n }", "public boolean inPlace() {\n\t\treturn false;\n\t}", "protected boolean skipNullValues() {\n return true;\n }", "private void negate()\n\t{\n\t\tif(Fun == null)\n\t\t{\n\t\t\tsetLeftValue();\n\t\t\tresult = calc.negate();\n\t\t\tupdateText();\n\t\t\tsetLeftValue();\n\t\t}\n\t}", "@Test\n void testEqualsFalse() {\n assertFalse(loginRequest1.equals(loginRequest2));\n }", "boolean hasOperator();", "@Test\n\tpublic void testEqualsObject_False() {\n\t\tassertNotEquals(book1, book2);;\n\t}", "public void executeNot() {\n\t\tBitString destBS = mIR.substring(4, 3);\n\t\tBitString sourceBS = mIR.substring(7, 3);\n\t\tmRegisters[destBS.getValue()] = mRegisters[sourceBS.getValue()].copy();\n\t\tmRegisters[destBS.getValue()].invert();\n\n\t\tBitString notVal = mRegisters[destBS.getValue()];\n\t\tsetConditionalCode(notVal);\n\t}", "@Test\n\tpublic void testEqualsFalso() {\n\t\t\n\t\tassertFalse(contato1.equals(contato2));\n\t}", "public boolean isOprUner() /*const*/{\n\t\treturn Tkn==TipeToken.Not;\n\t}", "public boolean containsNotOperator() {\r\n\t\tfor (int n = 0; n < elements.size(); ++n) {\r\n\t\t\tObject ob = elements.get(n);\r\n\t\t\tif (ob instanceof Operator) {\r\n\t\t\t\tif (((Operator) ob).isNot()) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "protected boolean ifnot(boolean b) {\r\n\t\tif(not) {\r\n\t\t\treturn !b;\r\n\t\t}\r\n\t\treturn b;\r\n\t}", "public final BooleanDataValue notEquals(DataValueDescriptor left,\n\t\t\t\t\t\t\t DataValueDescriptor right)\n\t\t\t\t\t\t\t\tthrows StandardException\n\t{\n\t\tboolean isNotEqual;\n\n\t\tif (left.isNull() || right.isNull())\n\t\t{\n\t\t\tisNotEqual = false;\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\tisNotEqual = SQLBinary.compare(left.getBytes(), right.getBytes()) != 0;\n\t\t}\n\n\t\treturn SQLBoolean.truthValue(left,\n\t\t\t\t\t\t\t\t\t right,\n\t\t\t\t\t\t\t\t\t isNotEqual);\n\t}", "@Override\n\tpublic Object visit(ASTEquality node, Object data)\n\t{\n\t\treturn visitOperatorNode(node, data);\n\t}", "public static boolean outsideFactor()\n/* */ {\n/* 63 */ return !markovFactor;\n/* */ }", "@Test\n @DisplayName(\"Test should detect inequality between unequal states.\")\n public void testShouldResultInInequality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Goodbye\");\n\n Assertions.assertThat(os1).isNotEqualTo(os2);\n }", "@Test\n public void equalsOtherTest4() {\n assertFalse(device.equals(\"\"));\n }", "public Boolean exclusive();", "@Test\r\n public void testAssignWeight() {\r\n System.out.println(\"assignWeight\");\r\n double notExpResult = 0.0;\r\n double result = weightAssignment.assignWeight();\r\n assertNotEquals(result, notExpResult, 0.0);\r\n }", "protected boolean skipBlankValues() {\n return true;\n }", "public void setNEval (int value) {\r\n n_eval = value; }", "@Test\n public void testEquals() throws ValueDoesNotMatchTypeException {\n TestEvaluationContext context = new TestEvaluationContext();\n \n DecisionVariableDeclaration decl = new DecisionVariableDeclaration(\"x\", IntegerType.TYPE, null);\n \n ConstantValue c0 = new ConstantValue(ValueFactory.createValue(IntegerType.TYPE, 0));\n ConstraintSyntaxTree cst1 = new OCLFeatureCall(\n new Variable(decl), IntegerType.LESS_EQUALS_INTEGER_INTEGER.getName(), c0);\n ConstraintSyntaxTree cst2 = new OCLFeatureCall(\n new Variable(decl), IntegerType.GREATER_EQUALS_INTEGER_INTEGER.getName(), c0);\n\n EvaluationAccessor val1 = Utils.createValue(ConstraintType.TYPE, context, cst1);\n EvaluationAccessor val2 = Utils.createValue(ConstraintType.TYPE, context, cst2);\n EvaluationAccessor nullV = Utils.createNullValue(context);\n \n // equals is useless and will be tested in the EvaluationVisitorTest\n \n Utils.testEquals(true, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val1, val1);\n Utils.testEquals(true, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val2, val2);\n Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val1, val2);\n Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val2, val1);\n Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val1, nullV);\n Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val2, nullV);\n\n val1.release();\n val2.release();\n nullV.release();\n }", "@Test\n\tpublic void testNotEqualsPersonalData() {\n\t\tSystem.out.println(\"starting testNotEqualsPersonalData()\");\n\t\tPersonalData personalData1 = new PersonalData(\"Kelvin\", \"Huynh\", \"4081234567\", \"[email protected]\");\n\t\tPersonalData personalData2 = new PersonalData(\"Kevin\", \"Huynh\", \"4081234567\", \"[email protected]\");\n\t\tassertFalse (\"personalData1 NOT equals personalData2\", personalData1.equals(personalData2));\n\t System.out.println(\"testNotEqualsPersonalData PASSED\");\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tint num = 20;\n\t\t\n\t\tnum = 25; \n\t\t\n\t\t//\" == \" sign or comparison boolean kullanilir \n\t\t\n\t\tboolean isTrue = 5 + 2 == 7;\n\t\t\n\t\tboolean isFalse = 5 + 2 == 8;\n\t\t\n\t\tSystem.out.println(isTrue == isFalse); // this says True equals False. it doesnt so it gives False result \n\t\t\n\n\t\t\n\t\t//!= Not Equal Sing\n\t\t\n\t\t\n\t\tboolean isTrue1 = 5+2 != 8;\n\t\t\n\t\tboolean noteq = 5+2 != 23;\n\t\t\n\t\tSystem.out.println(isTrue1);\n\t\tSystem.out.println(noteq);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// \">\" , \">=\" , \"<\" , \"<=\" ==> All returns boolean\n\t\t\n\t\t// && and operator .... If you have at least one false result \n\t\t// || Or operation ... If you have just one true the result will be true \n\t\t\n\t\tSystem.out.println(5>8); //False\n\t\t\n\t\tSystem.out.println(8>11-5); // True \n\t\t\n\t\t\n\t\tboolean b1 = 5>2;\t // true \n\t\tboolean b2 = 5==2+3;\t// true \n\t\tboolean b3 = 5==2;\t // false\n\t\tboolean b4 = 5<2; \t\t//false\n\t\t\n\t\t\n\t\t\n\t\t// to get true && all variables must ben true \n\t\t\n\t\tSystem.out.println(b1 && b2); // both true so result rue \n\t\t\n\t\tSystem.out.println(b1 && b3); //false \n\t\t\n\t\tSystem.out.println(b3 && b4); // false \n\t\t\n\t\t\n\t\t// || Or \n\t\tSystem.out.println(b2 || b1); // true bec at least one of the variables is true \n\t\t\n\t\tSystem.out.println(b3 || b4); // false bec all everything is false \n\t\t\n\t\tSystem.out.println(b1 || b2 || b3 || b4); // True bec at least one variable is true \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n\n System.out.println(7>5);\n System.out.println(7<-10);\n\n //== is used to check for equality\n // and very different from single =\n System.out.println(5==5);\n\n // != is used to check for inequality\n // != means \"not equal to\"\n System.out.println(6!=5);\n\n\n\n\n }", "public final EObject ruleNotEqualsOperator() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n Token otherlv_2=null;\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4571:28: ( ( () (otherlv_1= '!=' | otherlv_2= '<>' ) ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4572:1: ( () (otherlv_1= '!=' | otherlv_2= '<>' ) )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4572:1: ( () (otherlv_1= '!=' | otherlv_2= '<>' ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4572:2: () (otherlv_1= '!=' | otherlv_2= '<>' )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4572:2: ()\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4573:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getNotEqualsOperatorAccess().getNotEqualsOperatorAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4578:2: (otherlv_1= '!=' | otherlv_2= '<>' )\r\n int alt55=2;\r\n int LA55_0 = input.LA(1);\r\n\r\n if ( (LA55_0==56) ) {\r\n alt55=1;\r\n }\r\n else if ( (LA55_0==57) ) {\r\n alt55=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return current;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 55, 0, input);\r\n\r\n throw nvae;\r\n }\r\n switch (alt55) {\r\n case 1 :\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4578:4: otherlv_1= '!='\r\n {\r\n otherlv_1=(Token)match(input,56,FOLLOW_56_in_ruleNotEqualsOperator10066); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getNotEqualsOperatorAccess().getExclamationMarkEqualsSignKeyword_1_0());\r\n \r\n }\r\n\r\n }\r\n break;\r\n case 2 :\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4583:7: otherlv_2= '<>'\r\n {\r\n otherlv_2=(Token)match(input,57,FOLLOW_57_in_ruleNotEqualsOperator10084); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_2, grammarAccess.getNotEqualsOperatorAccess().getLessThanSignGreaterThanSignKeyword_1_1());\r\n \r\n }\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public final void rule__OpEquality__Alternatives() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:2550:1: ( ( '==' ) | ( '!=' ) | ( '===' ) | ( '!==' ) )\r\n int alt8=4;\r\n switch ( input.LA(1) ) {\r\n case 21:\r\n {\r\n alt8=1;\r\n }\r\n break;\r\n case 22:\r\n {\r\n alt8=2;\r\n }\r\n break;\r\n case 23:\r\n {\r\n alt8=3;\r\n }\r\n break;\r\n case 24:\r\n {\r\n alt8=4;\r\n }\r\n break;\r\n default:\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 8, 0, input);\r\n\r\n throw nvae;\r\n }\r\n\r\n switch (alt8) {\r\n case 1 :\r\n // InternalDroneScript.g:2551:2: ( '==' )\r\n {\r\n // InternalDroneScript.g:2551:2: ( '==' )\r\n // InternalDroneScript.g:2552:3: '=='\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpEqualityAccess().getEqualsSignEqualsSignKeyword_0()); \r\n }\r\n match(input,21,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpEqualityAccess().getEqualsSignEqualsSignKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // InternalDroneScript.g:2557:2: ( '!=' )\r\n {\r\n // InternalDroneScript.g:2557:2: ( '!=' )\r\n // InternalDroneScript.g:2558:3: '!='\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpEqualityAccess().getExclamationMarkEqualsSignKeyword_1()); \r\n }\r\n match(input,22,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpEqualityAccess().getExclamationMarkEqualsSignKeyword_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 3 :\r\n // InternalDroneScript.g:2563:2: ( '===' )\r\n {\r\n // InternalDroneScript.g:2563:2: ( '===' )\r\n // InternalDroneScript.g:2564:3: '==='\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpEqualityAccess().getEqualsSignEqualsSignEqualsSignKeyword_2()); \r\n }\r\n match(input,23,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpEqualityAccess().getEqualsSignEqualsSignEqualsSignKeyword_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 4 :\r\n // InternalDroneScript.g:2569:2: ( '!==' )\r\n {\r\n // InternalDroneScript.g:2569:2: ( '!==' )\r\n // InternalDroneScript.g:2570:3: '!=='\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpEqualityAccess().getExclamationMarkEqualsSignEqualsSignKeyword_3()); \r\n }\r\n match(input,24,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpEqualityAccess().getExclamationMarkEqualsSignEqualsSignKeyword_3()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\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 static DecisionOperator<IntVar> assign() {\n return DecisionOperator.int_eq;\n }", "public boolean isUnassigned() {\n return !assigned;\n }", "public static BinaryExpression exclusiveOrAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "boolean getNegated();", "@Test\n public void testEquals_2() {\n LOGGER.info(\"testEquals_2\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = new AtomString(\"Hej\");\n final boolean actual = atomString.equals(atom);\n assertFalse(actual);\n }", "@Test\n public void equalsOtherTest3() {\n assertFalse(device.equals(null));\n }", "public abstract ArithValue negate();", "@Test\n public void testEqualsFalse() {\n Rectangle r5 = new Rectangle(7, 5, new Color(255, 0, 0), new Position2D(50, 75));\n Rectangle r6 = new Rectangle(0, 4, new Color(255, 255, 254),\n new Position2D(-50, 75));\n Rectangle r7 = new Rectangle(0, 4, new Color(255, 155, 255),\n new Position2D(-50, 75));\n Rectangle r8 = new Rectangle(0, 4, new Color(0, 255, 255),\n new Position2D(-50, 75));\n Rectangle r9 = new Rectangle(7, 0, new Color(255, 255, 0), new Position2D(50, 75));\n Rectangle r10 = new Rectangle(7, 0, new Color(255, 255, 0), new Position2D(51, -75));\n Rectangle r11 = new Rectangle(1, 0, new Color(200, 150, 133),\n new Position2D(-50, -75));\n Rectangle r12 = new Rectangle(1, 100, new Color(199, 155, 13),\n new Position2D(50, 0));\n\n assertNotEquals(r1, r5);\n assertNotEquals(r2, r6);\n assertNotEquals(r2, r7);\n assertNotEquals(r2, r8);\n assertNotEquals(r3, r9);\n assertNotEquals(r3, r10);\n assertNotEquals(r4, r11);\n assertNotEquals(r4, r12);\n }", "public IncrementableAssignment() {\n super(false);\n }", "@Test\r\n public void deriveFromBinaryXorAssignmentExpressionWithSIUnits() throws IOException {\n check(\"varI_M^=9\", \"(int,m)\");\r\n //example with long m &= int\r\n check(\"varL_KMe2perH^=9\", \"(long,km^2/h)\");\r\n }", "Expression eqExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = relExpression();\r\n\t\twhile(isKind(OP_EQ, OP_NEQ)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = relExpression();\r\n\t\t\te0 = new ExpressionBinary(first, e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "@Override\n public boolean distributesDown() {\n return betterOrEqual(P);\n }", "public abstract boolean setValue(Value value, boolean asAssignment);", "public boolean isOperator(){\n return true;\n }", "@Test\n public void test_IsOxideCorr() {\n System.out.println(\"Testing MeasuredRatioModel's isOxideCorr()\");\n MeasuredRatioModel instance = new MeasuredRatioModel();\n boolean expResult = false;\n boolean result = instance.isOxideCorr();\n assertEquals(expResult, result);\n instance = new MeasuredRatioModel(\"Specific\",new BigDecimal(\"213\"),\"ABS\",new BigDecimal(\"0.4324\"),true,true);\n result = instance.isOxideCorr();\n expResult=true;\n assertEquals(expResult, result);\n }", "public boolean isDirectAssignment() {\r\n return GrouperUtil.booleanValue(this.directAssignmentString, false);\r\n }", "@Test\n public void equals_DifferentDiningHallBitfield_Test() {\n Assert.assertFalse(bq1.equals(bq6));\n Assert.assertFalse(bq1.equals(bq7));\n }", "private static void assertNotEquals(String message, double a, double b, double epsilon)\n {\n assertTrue(message, Math.abs(a - b) > epsilon);\n }", "@Test\n public void testEquals_differentParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI + 1,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are different\n assertThat(cellIdentityNr).isNotEqualTo(anotherCellIdentityNr);\n }", "Boolean getCompletelyCorrect();", "public final void negate() {\n \n \tthis.m00 = -this.m00;\n \tthis.m01 = -this.m01;\n \tthis.m02 = -this.m02;\n this.m10 = -this.m10;\n this.m11 = -this.m11;\n this.m12 = -this.m12;\n this.m20 = -this.m20;\n this.m21 = -this.m21;\n this.m22 = -this.m22;\n }" ]
[ "0.6503968", "0.6258709", "0.60975295", "0.5961683", "0.5918876", "0.57779557", "0.5758474", "0.57476956", "0.57098097", "0.56317246", "0.56194675", "0.56119734", "0.5610941", "0.5597895", "0.5579187", "0.5562886", "0.55582607", "0.5554576", "0.55515903", "0.5537743", "0.553242", "0.55244255", "0.5519387", "0.5519339", "0.55185384", "0.55175453", "0.55052036", "0.5501288", "0.54883796", "0.5468382", "0.5458572", "0.54451084", "0.54422444", "0.54118866", "0.538748", "0.5384152", "0.53814197", "0.5381359", "0.5370753", "0.5358984", "0.53575075", "0.53561676", "0.53558636", "0.5353195", "0.5349713", "0.53477025", "0.53345793", "0.5334226", "0.53319395", "0.5317218", "0.5313643", "0.5305752", "0.5305145", "0.53027225", "0.53025436", "0.5296416", "0.5294934", "0.5289044", "0.5283758", "0.5277886", "0.5271545", "0.52585346", "0.52580047", "0.52363", "0.5233321", "0.52216345", "0.5214719", "0.52130616", "0.52118975", "0.5207932", "0.5207924", "0.52074826", "0.5205734", "0.51990813", "0.5196328", "0.5193122", "0.51876813", "0.51702815", "0.51685995", "0.51663345", "0.51604486", "0.5149393", "0.51432407", "0.5137333", "0.51365966", "0.5133367", "0.5132124", "0.51313657", "0.5127762", "0.5125865", "0.51256186", "0.51242334", "0.5122756", "0.51167357", "0.51149786", "0.5112536", "0.5104093", "0.51000106", "0.5099887", "0.5090471", "0.5085828" ]
0.0
-1
no further estimations for = and !=
@Override public double estimateTemporalProb(ElementType type1, Optional<String> label1, TimeSelector.TimeField field1, Comparator comp, ElementType type2, Optional<String> label2, TimeSelector.TimeField field2) { if (comp == EQ) { return VERY_LOW_PROB; } else if (comp == Comparator.NEQ) { return VERY_HIGH_PROB; } // stats for lhs (can be more than one, if no label is specified) List<TemporalElementStats> statsLhs; // same for rhs List<TemporalElementStats> statsRhs; // determine relevant statistics for rhs and lhs if (!(label1.isPresent())) { statsLhs = type1 == ElementType.VERTEX ? new ArrayList<>(vertexStats.values()) : new ArrayList<>(edgeStats.values()); } else { statsLhs = type1 == ElementType.VERTEX ? new ArrayList<>( Collections.singletonList(vertexStats.getOrDefault(label1.get(), null))) : new ArrayList<>( Collections.singletonList(edgeStats.getOrDefault(label1.get(), null))); // label not in the DB if (statsLhs.get(0) == null) { return 0.; } } // same for rhs if (!(label2.isPresent())) { statsRhs = type2 == ElementType.VERTEX ? new ArrayList<>(vertexStats.values()) : new ArrayList<>(edgeStats.values()); } else { statsRhs = type2 == ElementType.VERTEX ? new ArrayList<>( Collections.singletonList(vertexStats.getOrDefault(label2.get(), null))) : new ArrayList<>( Collections.singletonList(edgeStats.getOrDefault(label2.get(), null))); // label not in the DB if (statsRhs.get(0) == null) { return 0.; } } return estimateTimeSelectorComparison(statsLhs, field1, comp, statsRhs, field2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void equal() {\n if (operatorAssigned != Operator.NON || operatorType != Operator.NON) {\n double subResult;\n if (numberStored[1] != 0) {\n subResult = basicCalculation(numberStored[1], Double.parseDouble(mainLabel.getText()), operatorType);\n numberStored[0] = basicCalculation(numberStored[0], subResult, operatorAssigned);\n numberStored[1] = 0;\n mainLabel.setText(Double.toString(numberStored[0]));\n } else {\n numberStored[0] = basicCalculation(numberStored[0], Double.parseDouble(mainLabel.getText()), operatorType);\n mainLabel.setText(Double.toString(numberStored[0]));\n }\n }\n operatorAssigned = Operator.NON;\n operatorType = Operator.NON;\n }", "default boolean ne(int lhs, int rhs) {\r\n return !eq(lhs,rhs);\r\n }", "@Override\n\tpublic boolean equal() {\n\t\treturn false;\n\t}", "@Override\n\tprotected void resetFalseClause() {\n\t\t\n\t}", "@Test\n\tpublic void testEqualityCheck() {\n\t\tadd(\"f(x)=x^3\");\n\t\tadd(\"g(x)=-x^3\");\n\t\tt(\"f==g\", \"false\");\n\t\tt(\"f!=g\", \"true\");\n\t\tt(\"f==-g\", \"true\");\n\t\tt(\"f!=-g\", \"false\");\n\t}", "public void encircleFalseTest()\n\t{\n\t\tData d = new Data();\n\t\td.set(15, 29);\n\t\td.set(17, 19);\n\t\tassertFalse(d.isEncircled(29));\n\t}", "protected boolean isEqual( Object lhs, Object rhs ){\r\n\t\tboolean x = lhs==null;\r\n\t\tboolean y = rhs == null;\r\n\t\t//XOR OPERATOR, only one is null\r\n\t\tif ((x || y) && !(x && y))\r\n\t\t\treturn false;\r\n\t\tif (lhs.equals(rhs))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "private boolean equals() {\r\n return MARK(EQUALS) && CHAR('=') && gap();\r\n }", "@Override\n protected boolean runInEQ() {\n return true;\n }", "@Override\n\tpublic void visit(EqualityNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * evaluam fiul stang si fiul drept\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tString s2 = null;\n\t\tString s1 = null;\n\t\t/**\n\t\t * preluam rezultatele evaluarii celor doi fii\n\t\t */\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\ts1 = Evaluator.variables.get(node.getChild(0).getName());\n\t\t} else {\n\t\t\ts1 = node.getChild(0).getName();\n\t\t}\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ts2 = Evaluator.variables.get(node.getChild(1).getName());\n\t\t} else {\n\t\t\ts2 = node.getChild(1).getName();\n\t\t}\n\n\t\t/**\n\t\t * verificam daca cei doi fii s- au evaluat la aceeasi expresie\n\t\t */\n\t\tif (s1.contentEquals(s2)) {\n\t\t\tnode.setName(\"true\");\n\t\t} else {\n\t\t\tnode.setName(\"false\");\n\t\t}\n\n\t}", "private static boolean checkEqualsToOperations(String expression, Lexemes lexemes, SymbolTable table) {\n\t\tif (expression.contains(\"==\")) {\n\n\t\t\tString[] arr = expression.split(\"==\");\n\t\t\tint finalIndex = arr.length - 1;\n\n\t\t\tfor (int i = 0; i <= finalIndex; i++) {\n\t\t\t\tString s = arr[i];\n\n\t\t\t\t// check if the current word is a variable\n\t\t\t\tif (table.contains(s)) {\n\t\t\t\t\tint id = table.getIdOfVariable(s);\n\t\t\t\t\tlexemes.insertLexeme(\"ID\", ((Integer) id).toString());\n\t\t\t\t} else {\n\n\t\t\t\t\tif (s.equals(\"true\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"CONST_BOOL\", \"true\");\n\t\t\t\t\t} else if (s.equals(\"false\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"CONST_BOOL\", \"false\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!checkRelationalOperations(s.trim(), lexemes, table)) return false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (i < finalIndex) {\n\t\t\t\t\tlexemes.insertLexeme(\"RELOP\", \"==\");\n\t\t\t\t} else if (expression.endsWith(\"==\")) {\n\t\t\t\t\tlexemes.insertLexeme(\"RELOP\", \"==\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (!checkRelationalOperations(expression.trim(), lexemes, table)) return false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Override\n public Void visit(AssignmentExpression nd, SuccessorInfo i) {\n if (\"&&=\".equals(nd.getOperator()) || \"||=\".equals(nd.getOperator()) || \"??=\".equals(nd.getOperator())) {\n if (\"&&=\".equals(nd.getOperator())) {\n // from lhs to rhs on truthy. from lhs to false-branch on falsy.\n visitWithSuccessors(nd.getLeft(), First.of(nd.getRight()), i.getSuccessors(false));\n } else if (\"||=\".equals(nd.getOperator())) {\n // from lhs to true-branch on truthy. from lhs to rhs on falsy.\n visitWithSuccessors(nd.getLeft(), i.getSuccessors(true), First.of(nd.getRight()));\n } else { // \"??=\"\n // the union of the above - truthyness is unknown.\n visitWithSuccessors(nd.getLeft(), union(First.of(nd.getRight()), i.getAllSuccessors()));\n }\n \n visitWithSuccessors(nd.getRight(), nd); // from right to assignment.\n\n writeSuccessors(nd, i.getGuardedSuccessors(nd));\n } else {\n visitAssign(nd, nd.getLeft(), nd.getRight());\n writeSuccessors(nd, i.getGuardedSuccessors(nd));\n }\n return null;\n }", "@Override\n public boolean visit(JsBinaryOperation x, JsContext<JsExpression> ctx) {\n return !x.getOperator().isAssignment()\n || !(x.getArg1() instanceof JsStringLiteral);\n }", "public abstract String representInequality();", "@Test\n public void test_SetOxideCorr() {\n System.out.println(\"Testing MeasuredRatioModel's setOxideCorr(boolean value)\");\n MeasuredRatioModel instance = new MeasuredRatioModel();\n boolean expResult = true;\n instance.setOxideCorr(true);\n boolean result = instance.isOxideCorr();\n assertEquals(expResult, result);\n instance.setOxideCorr(false);\n result = instance.isOxideCorr();\n expResult=false;\n assertEquals(expResult, result);\n }", "public T caseOperation_Not_Equals(Operation_Not_Equals object)\r\n {\r\n return null;\r\n }", "private boolean notEquals(Object a, Object b)\n {\n if (a != null && b == null)\n return true;\n if (a == null && b != null)\n return true;\n if (a != null && !a.equals(b))\n return true;\n return false;\n }", "@Override\n public Operator visitAssign(Assign operator)\n {\n throw new AssertionError();\n }", "private void ensureConditionContinuity( )\n {\n /* If the operators are not valid, then do not move the conditions */\n if ( checkOperators() )\n {\n /*\n * When Left Hand Side, Operator and Right Hand Side for a Condition\n * are empty then infer the default value, i.e., set Operator to\n * CVL_WF_OPRSImpl.EQUAL. Left Hand Side and Right Hand Side will continue\n * to remain empty.\n */\n defaultForEmptyConditions();\n\n int liCount = 0;\n int liNumber = 0 ;\n int liCurrentRow = 0;\n Data loNewData = null ;\n Data loOldData = null ;\n\n /* Cycle through the conditions. Make sure the conditions in front */\n /* of current condition are not blank, if so, move current condition up */\n\n for (liCount = 2; liCount < 6; liCount++ )\n {\n liNumber = liCount ;\n while (liNumber > 1)\n {\n liCurrentRow = liCount - ( liNumber - 1 );\n if (getAND_COND_LHS(liCurrentRow) == null)\n {\n /*\n * copy old condition to new condition, or condition 2 to 1 ...\n * first get data from new left hand side, and get data from\n * old left hand side, and copy new to old. Repeat for right\n * hand side , operator and Condition Type.\n */\n\n loNewData = getData(\"AND_COND_LHS_\" + liCount ) ;\n loOldData = getData(\"AND_COND_LHS_\" + liCurrentRow ) ;\n loOldData.setString(loNewData.getString() );\n loNewData = getData(\"AND_COND_RHS_\" + liCount ) ;\n loOldData = getData(\"AND_COND_RHS_\" + liCurrentRow ) ;\n loOldData.setString(loNewData.getString() );\n loNewData = getData(\"AND_COND_RHS_FLD_\" + liCount ) ;\n loOldData = getData(\"AND_COND_RHS_FLD_\" + liCurrentRow ) ;\n loOldData.setString(loNewData.getString() );\n loNewData = getData(\"AND_COND_OPR_\" + liCount ) ;\n loOldData = getData(\"AND_COND_OPR_\" + liCurrentRow ) ;\n loOldData.setbyte(loNewData.getbyte() );\n loNewData = getData(\"AND_COND_TYP_\" + liCount ) ;\n loOldData = getData(\"AND_COND_TYP_\" + liCurrentRow ) ;\n loOldData.setint(loNewData.getint() );\n /*\n * reset the old condition back to null ,operator to default 3\n * and Condition type to 1 (i.e. Actual Value)\n */\n loNewData = getData(\"AND_COND_LHS_\" + liCount ) ;\n loNewData.setString(null);\n loNewData = getData(\"AND_COND_RHS_\" + liCount ) ;\n loNewData.setString(null);\n loNewData = getData(\"AND_COND_RHS_FLD_\" + liCount ) ;\n loNewData.setString(null);\n loNewData = getData(\"AND_COND_OPR_\" + liCount ) ;\n loNewData.setbyte((byte)3);\n loNewData = getData(\"AND_COND_TYP_\" + liCount ) ;\n loNewData.setint(CVL_WF_COND_TYPImpl.ACTUAL_VAL);\n\n } /* end if (getAND_COND_LHS(liCurrentRow) == null) */\n\n liNumber-- ;\n\n } /* end while (liNumber > 1) */\n } /* end for (liCount = 2; liCount < 6; liCount++ ) */\n } /* end if ( checkOperators() ) */\n }", "public Grid2DBit notEq(WeatherGridSlice gs) {\n Grid2DBit bits = eq(gs);\n bits.negate();\n return bits;\n }", "@Test \n\tpublic void checkEquality() {\n\t\tassertTrue(testCell.equals(testCell));\n\t\tassertFalse(testCell.equals(new Cell(false)));\n\n\t}", "private void defaultForEmptyConditions()\n {\n /*\n * When any of the Conditions has all Left Hand Side, Operator and\n * Right Hand Side as empty then set Operator to default value of\n * CVL_WF_OPRSImpl.EQUAL(mimic default situation).\n * Note if this is not done then the condition will store null value\n * for Left Hand Side, Operator and Right Hand Side, and the whole condition\n * record will not be displayed on \"Manage Approval Conditions\" page\n * because the page selection query uses an equal join with R_WF_APRV_COND\n * and CVL_WF_OPRS tables.\n */\n for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ )\n {\n if( isNull(\"AND_COND_LHS_\" + liCtr) && isNull(\"AND_COND_OPR_\" + liCtr)\n && isNull(\"AND_COND_RHS_\" + liCtr) )\n {\n getData(\"AND_COND_OPR_\" + liCtr).setbyte((byte)3);\n }\n }//end for\n }", "public boolean associates(Operator op){\n\t return false;\n }", "private boolean NOT(boolean b) {\r\n in = saves[--save];\r\n return !b;\r\n }", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "private void doEpsilon(){\n\t\tcurrentState = \"q0\";\n\t}", "synchronized boolean resetWasUsed() {\n\n boolean result = lastValue != currValue;\n\n lastValue = currValue;\n\n return result;\n }", "@Test\n public void defaultOperatorsEvaluateFalseTest() throws Exception {\n\n assertThat(getNode(\"1 == 2\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 != 1\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 <> 1\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 < 0\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"2 > 4\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 >= 3\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"2 >= 4\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 <= 0\", \"expr\").render(null), is((Object)false));\n }", "public boolean offForEvaluation();", "public IsEmptyOperationEvaluator(boolean negate) {\r\n this.negate = negate;\r\n }", "@Override\r\n\tpublic boolean isEqual(Node node) {\n\t\treturn false;\r\n\t}", "public void testX1andX2orNotX1() {\n \tCircuit circuit = new Circuit();\n \t\n \tBoolean b1 = Boolean.TRUE;\n \tBoolean b2 = Boolean.FALSE;\n \tAnd and = (And) circuit.getFactory().getGate(Gate.AND);\n\t\tNot not = (Not) circuit.getFactory().getGate(Gate.NOT);\n\t\tOr or = (Or) circuit.getFactory().getGate(Gate.OR);\n\t\tand.setLeftInput(b1);\n\t\tand.setRightInput(b2);\n\t\tand.eval();\n\t\tnot.setInput(b1);\n\t\tnot.eval();\n\t\tor.setLeftInput(and.getOutput());\n\t\tor.setRightInput(not.getOutput());\n\t\tassertEquals(Boolean.FALSE, or.eval());\n\t\tassertEquals(Boolean.FALSE, circuit.eval());\n//\t\t==========================================\n\t\tb1 = Boolean.FALSE;\n \tb2 = Boolean.TRUE;\n// \tand.eval();\n// \tnot.eval();\n \tassertEquals(Boolean.FALSE, circuit.eval());\n// \t============================================\n \tDouble d1 = 0.0;\n \tDouble d2 = 1.0;\n \tand.setLeftInput(d1);\n\t\tand.setRightInput(d2);\n\t\tnot.setInput(d1);\n\t\tor.setLeftInput(and.getOutput());\n\t\tor.setRightInput(not.getOutput());\n \tassertEquals( new Double(1.0), or.eval());\n// \t============================================\n \td1 = 0.5;\n \td2 = 0.5;\n \tand.setLeftInput(d1);\n\t\tand.setRightInput(d2);\n \tand.eval();\n \tnot.setInput(d1);\n \tnot.eval();\n\t\tor.setLeftInput(and.getOutput());\n\t\tor.setRightInput(not.getOutput());\n \tassertEquals( new Double(0.625), or.eval());\n// \t============================================\n \ttry {\n \td1 = 0.5;\n \td2 = 2.0;\n \tand.setLeftInput(d1);\n \t\tand.setRightInput(d2);\n \tand.eval();\n \tnot.setInput(d1);\n \tnot.eval();\n \t\tor.setLeftInput(and.getOutput());\n \t\tor.setRightInput(not.getOutput());\n \tassertEquals( new Double(0.625), or.eval());\n \t} catch (IllegalArgumentException e) {\n \t\tSystem.err.println(\"IllegalArgumentException: \" + e.getMessage());\n \t}\n\n }", "Object findOperatorNeedCheck();", "public boolean isPureAssignment() {\n return (commandElement() == null) && hasAssignments();\n }", "@Test\n \tpublic void testNotEqual() {\n \t\tAssert.assertFalse(f1.equals(f2));\n \t}", "public static void main(String[] args) {\nboolean a, b, c;\na =true;\nb = false;\nc =a && b;\n\nSystem.out.println(\"c = a&&B:\" + c);\nc = a||b;\nSystem.out.println(\"c = a||b:\" + c);\nc = a==b;\nSystem.out.println(\"c = a==b:\" + c);\nc = a!=b;\nSystem.out.println(\"c = a!=b:\" + c);\n\n\n\n\t}", "@RepeatedTest(20)\n void negTest(){\n assertEquals(bot.neg(),bof);\n assertEquals(bof.neg(),bot);\n assertNotEquals(bot.neg(),bot);\n assertNotEquals(bof.neg(),bof);\n Binary b1 = new Binary(\"10101\");\n Binary notb1 = new Binary(\"01010\");\n Binary b2 = new Binary(\"0100110\");\n Binary notb2 = new Binary(\"1011001\");\n assertEquals(b1.neg(),notb1);\n assertEquals(notb1.neg(),b1);\n assertEquals(b2.neg(),notb2);\n assertEquals(notb2.neg(),b2);\n Binary b3 = new Binary(\"00000000000\");\n Binary notb3 = new Binary(\"1\");\n Binary b4 = new Binary(\"00000000001\");\n Binary notb4 = new Binary(\"10\");\n assertEquals(b3.neg(),notb3);\n assertEquals(notb3.neg(),b3);\n assertEquals(b4.neg(),notb4);\n assertEquals(notb4.neg(),b4);\n Binary b5 = new Binary(\"11111111\");\n Binary notb5 = new Binary(\"0\");\n Binary b6 = new Binary(\"11111110\");\n Binary notb6 = new Binary(\"01\");\n assertEquals(b5.neg(),notb5);\n assertEquals(notb5.neg(),b5);\n assertEquals(b6.neg(),notb6);\n assertEquals(notb6.neg(),b6);\n\n //Nulls\n assertEquals(f.neg(), Null);\n assertEquals(i.neg(), Null);\n assertEquals(st.neg(), Null);\n assertEquals(Null.neg(), Null);\n\n }", "public TruthExpression() {\r\n\t\tsuper(new Expression[]{});\r\n\t\tthis.truthValue = TruthValue.FALSE;\r\n\t}", "private boolean factor() {\r\n return MARK(ATOM) && atom() && postops();\r\n }", "public Value restrictToNotAbsent() {\n checkNotUnknown();\n if (isNotAbsent())\n return this;\n Value r = new Value(this);\n r.flags &= ~ABSENT;\n if (r.var != null && (r.flags & (PRESENT_DATA | PRESENT_ACCESSOR)) == 0)\n r.var = null;\n return canonicalize(r);\n }", "private BDDState handleAssignment(CAssignment assignment, CFANode successor, CFAEdge edge)\n throws UnsupportedCodeException {\n CExpression lhs = assignment.getLeftHandSide();\n\n final String varName;\n if (lhs instanceof CIdExpression) {\n varName = ((CIdExpression) lhs).getDeclaration().getQualifiedName();\n } else {\n varName = functionName + \"::\" + lhs;\n }\n\n final CType targetType = lhs.getExpressionType();\n\n // next line is a shortcut, not necessary\n if (!precision.isTracking(MemoryLocation.fromQualifiedName(varName), targetType, successor)) {\n return state;\n }\n\n BDDState newState = state;\n CRightHandSide rhs = assignment.getRightHandSide();\n if (rhs instanceof CExpression exp) {\n final Partition partition = varClass.getPartitionForEdge(edge);\n\n if (isUsedInExpression(varName, exp)) {\n // make tmp for assignment,\n // this is done to handle assignments like \"a = !a;\" as \"tmp = !a; a = tmp;\"\n String tmpVarName = predmgr.getTmpVariableForPartition(partition);\n final Region[] tmp =\n predmgr.createPredicateWithoutPrecisionCheck(\n tmpVarName, bvComputer.getBitsize(partition, targetType));\n final CFANode location = successor;\n\n // make region for RIGHT SIDE and build equality of var and region\n final Region[] regRHS =\n bvComputer.evaluateVectorExpression(partition, exp, targetType, location, precision);\n newState = newState.addAssignment(tmp, regRHS);\n\n // delete var, make tmp equal to (new) var, then delete tmp\n final Region[] var =\n predmgr.createPredicate(\n scopeVar(lhs),\n targetType,\n successor,\n bvComputer.getBitsize(partition, targetType),\n precision);\n newState = newState.forget(var);\n newState = newState.addAssignment(var, tmp);\n newState = newState.forget(tmp);\n\n } else {\n final Region[] var =\n predmgr.createPredicate(\n scopeVar(lhs),\n targetType,\n successor,\n bvComputer.getBitsize(partition, targetType),\n precision);\n newState = newState.forget(var);\n final CFANode location = successor;\n\n // make region for RIGHT SIDE and build equality of var and region\n final Region[] regRHS =\n bvComputer.evaluateVectorExpression(\n partition, (CExpression) rhs, targetType, location, precision);\n newState = newState.addAssignment(var, regRHS);\n }\n return newState;\n\n } else if (rhs instanceof CFunctionCallExpression) {\n // handle params of functionCall, maybe there is a sideeffect\n newState =\n handleExternalFunctionCall(\n newState, successor, ((CFunctionCallExpression) rhs).getParameterExpressions());\n\n // call of external function: we know nothing, so we delete the value of the var\n // TODO can we assume, that malloc returns something !=0?\n // are there some \"save functions\"?\n\n final Region[] var =\n predmgr.createPredicate(\n scopeVar(lhs),\n targetType,\n successor,\n bitsize,\n precision); // is default bitsize enough?\n newState = newState.forget(var);\n\n return newState;\n\n } else {\n throw new AssertionError(\"unhandled assignment: \" + edge.getRawStatement());\n }\n }", "public void unAssign(){\n\t\tthis.value = 0;\n\t}", "@Test\n public void testNotEquals2() throws Exception {\n String sql = \"SELECT a from db.g where a != 'value'\";\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 verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, \"a\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, \"db.g\");\n\n Node criteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, CompareCriteria.ID);\n verifyProperty(criteriaNode, AbstractCompareCriteria.OPERATOR_PROP_NAME, CriteriaOperator.Operator.NE.name());\n verifyElementSymbol(criteriaNode, AbstractCompareCriteria.LEFT_EXPRESSION_REF_NAME, \"a\");\n verifyConstant(criteriaNode, CompareCriteria.RIGHT_EXPRESSION_REF_NAME, \"value\");\n \n verifySql(\"SELECT a FROM db.g WHERE a <> 'value'\", fileNode);\n }", "public static void main(String[] args) {\n\t\n\tSystem.out.println(10>9);\n\tboolean resultA = 10> 9; \n\t\n\tSystem.out.println(resultA);\n\tSystem.out.println(10>=9); // greater or equal\n\t\n\tboolean resultB= 10>=9; \n\tSystem.out.println(resultB);\n\t\n\tboolean resultC = 10<=9; \n\tSystem.out.println(resultC);\n\t\n\tboolean resultD= 1100 <1200;\n\tSystem.out.println(resultD);\n\t\n\tboolean resultE = 1000 < 1000; \n\tSystem.out.println(resultE);\n\t\t\t\n\tboolean resultF = 1000 <= 1000; \n\tSystem.out.println(resultF);\n\t\n\t\n\t\n\t\n\tboolean A = ! false ; \n\tSystem.out.println(A);\n\t\n\tboolean B = ! true; \n\tSystem.out.println(B);\n\t\n\tboolean C = ! false !=false; \n\tSystem.out.println(C);\n\t\n\t\n\t\n\t// practice ! (not) : \n\t\n\tboolean g = false; \n\tSystem.out.println(g);\n\t\n\tSystem.out.println(! g);\n\t\n\tSystem.out.println(!true == false);\n\t\n\t\n\t\n\tboolean h = \"Batch 12\" == \"Batch13\"; \n\tSystem.out.println(h);\n\n\tSystem.out.println( \" batch12\" != \"Batch12\");\n\tSystem.out.println(\"Kuzzat\" == \"bad guy\");\n\t\n\t\n\tint Num = 198; \n\tSystem.out.println(Num %= 2);\n\t\n\tbyte byteNum = 30; \n\t// int INum = INum + byteNum ; // we must give value to local variables . \n\t\n\t\n\tString str; \n\t// System.out.println(str);\n\t\n\t\n\t\n}", "@Override\n public Literal not() {\n if (negation == null) {\n negation = new NotBoolVar(this);\n }\n return negation;\n }", "public static BinaryExpression exclusiveOrAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "@Override\n\tpublic int getEQMode()\n\t{\n\t\treturn 0;\n\t}", "@Test\n\tpublic void ifYouEncounterEqualsThenThatsNotAPattern() {\n\t\tfinal Tokenizable line = line(\"=\");\n\t\tcontext.checking(new Expectations() {{\n\t\t}});\n\t\tTDAPatternParser parser = new TDAPatternParser(errors, vnamer, builder, topLevel);\n\t\tTDAParsing nested = parser.tryParsing(line);\n\t\tassertNull(nested);\n\t\tassertEquals(0, line.at());\n\t}", "private void assignment() {\n\n\t\t\t}", "@RepeatedTest(20)\n void logicalOperatorsTest() {\n assertEquals(bi.or(bot), new Binary(\"1\"));\n assertEquals(bi.or(bof), bi);\n assertEquals(bi.and(bot), bi);\n assertEquals(bi.and(bof), new Binary(\"0\"));\n assertEquals(bot.or(bi), new Binary(\"1\"));\n assertEquals(bof.or(bi), bi);\n assertEquals(bot.and(bi), bi);\n assertEquals(bof.and(bi), new Binary(\"0\"));\n assertEquals(bot.and(bot), bot);\n assertEquals(bot.and(bof),bof);\n assertEquals(bof.and(bot),bof);\n assertEquals(bof.and(bof),bof);\n assertEquals(bot.or(bot), bot);\n assertEquals(bot.or(bof),bot);\n assertEquals(bof.or(bot),bot);\n assertEquals(bof.or(bof),bof);\n Binary b1 = new Binary(\"10001\");\n Binary b2 = new Binary(\"1001011\");\n assertEquals(b1.or(b2), new Binary(\"1111011\"));\n assertEquals(b1.and(b2), new Binary(\"1000001\"));\n assertEquals(b1.or(b2), b2.or(b1));\n assertEquals(b1.and(b2),b2.and(b1));\n assertEquals(bi.or(bi), bi);\n assertEquals(bi.and(bi),bi);\n Binary notbi = bi.neg();\n assertEquals(bi.or(notbi), new Binary(\"1\"));\n assertEquals(bi.and(notbi), new Binary(\"0\"));\n\n //nulls\n //Bool or ITypes \\ {Logicals}\n assertEquals(bot.or(st),Null);\n assertEquals(bof.or(st),Null);\n assertEquals(bot.or(f), Null);\n assertEquals(bof.or(i), Null);\n //Float or ITypes\n assertEquals(f.or(st), Null);\n assertEquals(f.or(bot), Null);\n assertEquals(f.or(bof), Null);\n assertEquals(f.or(i), Null);\n assertEquals(f.or(g), Null);\n assertEquals(f.or(bi), Null);\n //Int or ITypes\n assertEquals(i.or(st), Null);\n assertEquals(i.or(bot),Null);\n assertEquals(i.or(bof), Null);\n assertEquals(i.or(j), Null);\n assertEquals(i.or(f), Null);\n assertEquals(i.or(bi), Null);\n //Binary or ITypes \\ {Logicals}\n assertEquals(bi.or(st), Null);\n assertEquals(bi.or(f), Null);\n assertEquals(bi.or(i), Null);\n //NullType or ITypes\n assertEquals(Null.or(st), Null);\n assertEquals(Null.or(bof), Null);\n assertEquals(Null.or(f), Null);\n assertEquals(Null.or(i), Null);\n assertEquals(Null.or(bi), Null);\n assertEquals(Null.or(Null), Null);\n assertEquals(st.or(Null), Null);\n assertEquals(bot.or(Null), Null);\n assertEquals(f.or(Null), Null);\n assertEquals(i.or(Null), Null);\n assertEquals(bi.or(Null), Null);\n\n //Bool and ITypes \\ {Logicals}\n assertEquals(bot.and(st),Null);\n assertEquals(bof.and(st),Null);\n assertEquals(bot.and(f), Null);\n assertEquals(bof.and(i), Null);\n //Float and ITypes\n assertEquals(f.and(st), Null);\n assertEquals(f.and(bot), Null);\n assertEquals(f.and(bof), Null);\n assertEquals(f.and(i), Null);\n assertEquals(f.and(g), Null);\n assertEquals(f.and(bi), Null);\n //Int and ITypes\n assertEquals(i.and(st), Null);\n assertEquals(i.and(bot),Null);\n assertEquals(i.and(bof), Null);\n assertEquals(i.and(j), Null);\n assertEquals(i.and(f), Null);\n assertEquals(i.and(bi), Null);\n //Binary and ITypes \\ {Logicals}\n assertEquals(bi.and(st), Null);\n assertEquals(bi.and(f), Null);\n assertEquals(bi.and(i), Null);\n //NullType and ITypes\n assertEquals(Null.and(st), Null);\n assertEquals(Null.and(bof), Null);\n assertEquals(Null.and(f), Null);\n assertEquals(Null.and(i), Null);\n assertEquals(Null.and(bi), Null);\n assertEquals(Null.and(Null), Null);\n assertEquals(st.and(Null), Null);\n assertEquals(bot.and(Null), Null);\n assertEquals(f.and(Null), Null);\n assertEquals(i.and(Null), Null);\n assertEquals(bi.and(Null), Null);\n\n }", "default boolean isRepeatState() {\n return isRepeatState(FULL_EQUAL);\n }", "private Boolean evaluateBooleanExpression(Expression expr, InMemoryExpressionEvaluator eval)\n {\n try\n {\n Object result = expr.evaluate(eval);\n return (result instanceof InMemoryFailure) ? Boolean.FALSE : (Boolean)result;\n }\n catch (VariableNotSetException vnse)\n {\n if (NucleusLogger.QUERY.isDebugEnabled())\n {\n NucleusLogger.QUERY.debug(Localiser.msg(\"021024\", vnse.getVariableExpression().getId(), StringUtils.objectArrayToString(vnse.getValues())));\n }\n\n // TODO The iteration through possible variable values needs improving. We currently just drop out\n // to here with the possible values of a variable when first encountered (and not yet set), which\n // then starts the iteration process. This likely would fail if 2 or more variables (unchecked)\n if (vnse.getValues() == null || vnse.getValues().length == 0)\n {\n // No values available for this variable, so just put null and see the result\n eval.setVariableValue(vnse.getVariableExpression().getId(), null);\n if (NucleusLogger.QUERY.isDebugEnabled())\n {\n NucleusLogger.QUERY.debug(Localiser.msg(\"021025\", vnse.getVariableExpression().getId(), \"(null)\"));\n }\n if (Boolean.TRUE.equals(evaluateBooleanExpression(expr, eval)))\n {\n return Boolean.TRUE;\n }\n }\n else\n {\n // Set this variable and start iteration over the possible variable values\n for (int i=0;i<vnse.getValues().length;i++)\n {\n eval.setVariableValue(vnse.getVariableExpression().getId(), vnse.getValues()[i]);\n if (NucleusLogger.QUERY.isDebugEnabled())\n {\n NucleusLogger.QUERY.debug(Localiser.msg(\"021025\", vnse.getVariableExpression().getId(), vnse.getValues()[i]));\n }\n if (Boolean.TRUE.equals(evaluateBooleanExpression(expr, eval)))\n {\n return Boolean.TRUE;\n }\n }\n }\n\n // No variable value was successful so return FALSE\n if (NucleusLogger.QUERY.isDebugEnabled())\n {\n NucleusLogger.QUERY.debug(Localiser.msg(\"021026\", vnse.getVariableExpression().getId()));\n }\n eval.removeVariableValue(vnse.getVariableExpression().getId());\n return Boolean.FALSE;\n }\n }", "public boolean setNoDialog(boolean negated) {\n if (negated)\n value = variable.F;\n else\n value = variable.T;\n //store the name of the variable in the selectedVars list (used in model checker)\n selectedVars.add(name);\n // for each clause in clist that contains not this-term\n\n Iterator i = cnfClause.clist.iterator();\n while ( i.hasNext() ) {\n cnfClause c = ( cnfClause ) i.next();\n if ( c.hasNegTerm( !negated, ( variable )this ) ) {\n if ( c.isUnitOpen() != null )\n cnfClause.stack.push( c );\n else\n if ( c.isViolated() ) {\n cnfClause.ctStr += ((node)c.formula).toString().replace(\"_\",\"\") + \"\\n\";\n return false;\n /*grammar.dumpUserSelections();\n JOptionPane.showMessageDialog( null,\n \"model inconsistency detected -- see stderr for more information\",\n \"Error!\", JOptionPane.ERROR_MESSAGE );\n System.exit(1);*/\n }\n\n }\n }\n return true;\n }", "@Test\n public void trueAndFalseCombined() {\n assertFalse(getPredicateInstance(false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(false, null, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n }", "public boolean inPlace() {\n\t\treturn false;\n\t}", "protected boolean skipNullValues() {\n return true;\n }", "private void negate()\n\t{\n\t\tif(Fun == null)\n\t\t{\n\t\t\tsetLeftValue();\n\t\t\tresult = calc.negate();\n\t\t\tupdateText();\n\t\t\tsetLeftValue();\n\t\t}\n\t}", "@Test\n void testEqualsFalse() {\n assertFalse(loginRequest1.equals(loginRequest2));\n }", "boolean hasOperator();", "@Test\n\tpublic void testEqualsObject_False() {\n\t\tassertNotEquals(book1, book2);;\n\t}", "public void executeNot() {\n\t\tBitString destBS = mIR.substring(4, 3);\n\t\tBitString sourceBS = mIR.substring(7, 3);\n\t\tmRegisters[destBS.getValue()] = mRegisters[sourceBS.getValue()].copy();\n\t\tmRegisters[destBS.getValue()].invert();\n\n\t\tBitString notVal = mRegisters[destBS.getValue()];\n\t\tsetConditionalCode(notVal);\n\t}", "@Test\n\tpublic void testEqualsFalso() {\n\t\t\n\t\tassertFalse(contato1.equals(contato2));\n\t}", "public boolean isOprUner() /*const*/{\n\t\treturn Tkn==TipeToken.Not;\n\t}", "public boolean containsNotOperator() {\r\n\t\tfor (int n = 0; n < elements.size(); ++n) {\r\n\t\t\tObject ob = elements.get(n);\r\n\t\t\tif (ob instanceof Operator) {\r\n\t\t\t\tif (((Operator) ob).isNot()) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "protected boolean ifnot(boolean b) {\r\n\t\tif(not) {\r\n\t\t\treturn !b;\r\n\t\t}\r\n\t\treturn b;\r\n\t}", "public final BooleanDataValue notEquals(DataValueDescriptor left,\n\t\t\t\t\t\t\t DataValueDescriptor right)\n\t\t\t\t\t\t\t\tthrows StandardException\n\t{\n\t\tboolean isNotEqual;\n\n\t\tif (left.isNull() || right.isNull())\n\t\t{\n\t\t\tisNotEqual = false;\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\tisNotEqual = SQLBinary.compare(left.getBytes(), right.getBytes()) != 0;\n\t\t}\n\n\t\treturn SQLBoolean.truthValue(left,\n\t\t\t\t\t\t\t\t\t right,\n\t\t\t\t\t\t\t\t\t isNotEqual);\n\t}", "@Override\n\tpublic Object visit(ASTEquality node, Object data)\n\t{\n\t\treturn visitOperatorNode(node, data);\n\t}", "public static boolean outsideFactor()\n/* */ {\n/* 63 */ return !markovFactor;\n/* */ }", "@Test\n @DisplayName(\"Test should detect inequality between unequal states.\")\n public void testShouldResultInInequality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Goodbye\");\n\n Assertions.assertThat(os1).isNotEqualTo(os2);\n }", "@Test\n public void equalsOtherTest4() {\n assertFalse(device.equals(\"\"));\n }", "public Boolean exclusive();", "@Test\r\n public void testAssignWeight() {\r\n System.out.println(\"assignWeight\");\r\n double notExpResult = 0.0;\r\n double result = weightAssignment.assignWeight();\r\n assertNotEquals(result, notExpResult, 0.0);\r\n }", "protected boolean skipBlankValues() {\n return true;\n }", "public void setNEval (int value) {\r\n n_eval = value; }", "@Test\n public void testEquals() throws ValueDoesNotMatchTypeException {\n TestEvaluationContext context = new TestEvaluationContext();\n \n DecisionVariableDeclaration decl = new DecisionVariableDeclaration(\"x\", IntegerType.TYPE, null);\n \n ConstantValue c0 = new ConstantValue(ValueFactory.createValue(IntegerType.TYPE, 0));\n ConstraintSyntaxTree cst1 = new OCLFeatureCall(\n new Variable(decl), IntegerType.LESS_EQUALS_INTEGER_INTEGER.getName(), c0);\n ConstraintSyntaxTree cst2 = new OCLFeatureCall(\n new Variable(decl), IntegerType.GREATER_EQUALS_INTEGER_INTEGER.getName(), c0);\n\n EvaluationAccessor val1 = Utils.createValue(ConstraintType.TYPE, context, cst1);\n EvaluationAccessor val2 = Utils.createValue(ConstraintType.TYPE, context, cst2);\n EvaluationAccessor nullV = Utils.createNullValue(context);\n \n // equals is useless and will be tested in the EvaluationVisitorTest\n \n Utils.testEquals(true, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val1, val1);\n Utils.testEquals(true, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val2, val2);\n Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val1, val2);\n Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val2, val1);\n Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val1, nullV);\n Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val2, nullV);\n\n val1.release();\n val2.release();\n nullV.release();\n }", "@Test\n\tpublic void testNotEqualsPersonalData() {\n\t\tSystem.out.println(\"starting testNotEqualsPersonalData()\");\n\t\tPersonalData personalData1 = new PersonalData(\"Kelvin\", \"Huynh\", \"4081234567\", \"[email protected]\");\n\t\tPersonalData personalData2 = new PersonalData(\"Kevin\", \"Huynh\", \"4081234567\", \"[email protected]\");\n\t\tassertFalse (\"personalData1 NOT equals personalData2\", personalData1.equals(personalData2));\n\t System.out.println(\"testNotEqualsPersonalData PASSED\");\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tint num = 20;\n\t\t\n\t\tnum = 25; \n\t\t\n\t\t//\" == \" sign or comparison boolean kullanilir \n\t\t\n\t\tboolean isTrue = 5 + 2 == 7;\n\t\t\n\t\tboolean isFalse = 5 + 2 == 8;\n\t\t\n\t\tSystem.out.println(isTrue == isFalse); // this says True equals False. it doesnt so it gives False result \n\t\t\n\n\t\t\n\t\t//!= Not Equal Sing\n\t\t\n\t\t\n\t\tboolean isTrue1 = 5+2 != 8;\n\t\t\n\t\tboolean noteq = 5+2 != 23;\n\t\t\n\t\tSystem.out.println(isTrue1);\n\t\tSystem.out.println(noteq);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// \">\" , \">=\" , \"<\" , \"<=\" ==> All returns boolean\n\t\t\n\t\t// && and operator .... If you have at least one false result \n\t\t// || Or operation ... If you have just one true the result will be true \n\t\t\n\t\tSystem.out.println(5>8); //False\n\t\t\n\t\tSystem.out.println(8>11-5); // True \n\t\t\n\t\t\n\t\tboolean b1 = 5>2;\t // true \n\t\tboolean b2 = 5==2+3;\t// true \n\t\tboolean b3 = 5==2;\t // false\n\t\tboolean b4 = 5<2; \t\t//false\n\t\t\n\t\t\n\t\t\n\t\t// to get true && all variables must ben true \n\t\t\n\t\tSystem.out.println(b1 && b2); // both true so result rue \n\t\t\n\t\tSystem.out.println(b1 && b3); //false \n\t\t\n\t\tSystem.out.println(b3 && b4); // false \n\t\t\n\t\t\n\t\t// || Or \n\t\tSystem.out.println(b2 || b1); // true bec at least one of the variables is true \n\t\t\n\t\tSystem.out.println(b3 || b4); // false bec all everything is false \n\t\t\n\t\tSystem.out.println(b1 || b2 || b3 || b4); // True bec at least one variable is true \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n\n System.out.println(7>5);\n System.out.println(7<-10);\n\n //== is used to check for equality\n // and very different from single =\n System.out.println(5==5);\n\n // != is used to check for inequality\n // != means \"not equal to\"\n System.out.println(6!=5);\n\n\n\n\n }", "public final EObject ruleNotEqualsOperator() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n Token otherlv_2=null;\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4571:28: ( ( () (otherlv_1= '!=' | otherlv_2= '<>' ) ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4572:1: ( () (otherlv_1= '!=' | otherlv_2= '<>' ) )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4572:1: ( () (otherlv_1= '!=' | otherlv_2= '<>' ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4572:2: () (otherlv_1= '!=' | otherlv_2= '<>' )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4572:2: ()\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4573:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getNotEqualsOperatorAccess().getNotEqualsOperatorAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4578:2: (otherlv_1= '!=' | otherlv_2= '<>' )\r\n int alt55=2;\r\n int LA55_0 = input.LA(1);\r\n\r\n if ( (LA55_0==56) ) {\r\n alt55=1;\r\n }\r\n else if ( (LA55_0==57) ) {\r\n alt55=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return current;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 55, 0, input);\r\n\r\n throw nvae;\r\n }\r\n switch (alt55) {\r\n case 1 :\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4578:4: otherlv_1= '!='\r\n {\r\n otherlv_1=(Token)match(input,56,FOLLOW_56_in_ruleNotEqualsOperator10066); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getNotEqualsOperatorAccess().getExclamationMarkEqualsSignKeyword_1_0());\r\n \r\n }\r\n\r\n }\r\n break;\r\n case 2 :\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4583:7: otherlv_2= '<>'\r\n {\r\n otherlv_2=(Token)match(input,57,FOLLOW_57_in_ruleNotEqualsOperator10084); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_2, grammarAccess.getNotEqualsOperatorAccess().getLessThanSignGreaterThanSignKeyword_1_1());\r\n \r\n }\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public final void rule__OpEquality__Alternatives() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:2550:1: ( ( '==' ) | ( '!=' ) | ( '===' ) | ( '!==' ) )\r\n int alt8=4;\r\n switch ( input.LA(1) ) {\r\n case 21:\r\n {\r\n alt8=1;\r\n }\r\n break;\r\n case 22:\r\n {\r\n alt8=2;\r\n }\r\n break;\r\n case 23:\r\n {\r\n alt8=3;\r\n }\r\n break;\r\n case 24:\r\n {\r\n alt8=4;\r\n }\r\n break;\r\n default:\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 8, 0, input);\r\n\r\n throw nvae;\r\n }\r\n\r\n switch (alt8) {\r\n case 1 :\r\n // InternalDroneScript.g:2551:2: ( '==' )\r\n {\r\n // InternalDroneScript.g:2551:2: ( '==' )\r\n // InternalDroneScript.g:2552:3: '=='\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpEqualityAccess().getEqualsSignEqualsSignKeyword_0()); \r\n }\r\n match(input,21,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpEqualityAccess().getEqualsSignEqualsSignKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // InternalDroneScript.g:2557:2: ( '!=' )\r\n {\r\n // InternalDroneScript.g:2557:2: ( '!=' )\r\n // InternalDroneScript.g:2558:3: '!='\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpEqualityAccess().getExclamationMarkEqualsSignKeyword_1()); \r\n }\r\n match(input,22,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpEqualityAccess().getExclamationMarkEqualsSignKeyword_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 3 :\r\n // InternalDroneScript.g:2563:2: ( '===' )\r\n {\r\n // InternalDroneScript.g:2563:2: ( '===' )\r\n // InternalDroneScript.g:2564:3: '==='\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpEqualityAccess().getEqualsSignEqualsSignEqualsSignKeyword_2()); \r\n }\r\n match(input,23,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpEqualityAccess().getEqualsSignEqualsSignEqualsSignKeyword_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 4 :\r\n // InternalDroneScript.g:2569:2: ( '!==' )\r\n {\r\n // InternalDroneScript.g:2569:2: ( '!==' )\r\n // InternalDroneScript.g:2570:3: '!=='\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpEqualityAccess().getExclamationMarkEqualsSignEqualsSignKeyword_3()); \r\n }\r\n match(input,24,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpEqualityAccess().getExclamationMarkEqualsSignEqualsSignKeyword_3()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\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 static DecisionOperator<IntVar> assign() {\n return DecisionOperator.int_eq;\n }", "public boolean isUnassigned() {\n return !assigned;\n }", "public static BinaryExpression exclusiveOrAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "boolean getNegated();", "@Test\n public void testEquals_2() {\n LOGGER.info(\"testEquals_2\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = new AtomString(\"Hej\");\n final boolean actual = atomString.equals(atom);\n assertFalse(actual);\n }", "@Test\n public void equalsOtherTest3() {\n assertFalse(device.equals(null));\n }", "public abstract ArithValue negate();", "@Test\n public void testEqualsFalse() {\n Rectangle r5 = new Rectangle(7, 5, new Color(255, 0, 0), new Position2D(50, 75));\n Rectangle r6 = new Rectangle(0, 4, new Color(255, 255, 254),\n new Position2D(-50, 75));\n Rectangle r7 = new Rectangle(0, 4, new Color(255, 155, 255),\n new Position2D(-50, 75));\n Rectangle r8 = new Rectangle(0, 4, new Color(0, 255, 255),\n new Position2D(-50, 75));\n Rectangle r9 = new Rectangle(7, 0, new Color(255, 255, 0), new Position2D(50, 75));\n Rectangle r10 = new Rectangle(7, 0, new Color(255, 255, 0), new Position2D(51, -75));\n Rectangle r11 = new Rectangle(1, 0, new Color(200, 150, 133),\n new Position2D(-50, -75));\n Rectangle r12 = new Rectangle(1, 100, new Color(199, 155, 13),\n new Position2D(50, 0));\n\n assertNotEquals(r1, r5);\n assertNotEquals(r2, r6);\n assertNotEquals(r2, r7);\n assertNotEquals(r2, r8);\n assertNotEquals(r3, r9);\n assertNotEquals(r3, r10);\n assertNotEquals(r4, r11);\n assertNotEquals(r4, r12);\n }", "public IncrementableAssignment() {\n super(false);\n }", "@Test\r\n public void deriveFromBinaryXorAssignmentExpressionWithSIUnits() throws IOException {\n check(\"varI_M^=9\", \"(int,m)\");\r\n //example with long m &= int\r\n check(\"varL_KMe2perH^=9\", \"(long,km^2/h)\");\r\n }", "Expression eqExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = relExpression();\r\n\t\twhile(isKind(OP_EQ, OP_NEQ)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = relExpression();\r\n\t\t\te0 = new ExpressionBinary(first, e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "@Override\n public boolean distributesDown() {\n return betterOrEqual(P);\n }", "public abstract boolean setValue(Value value, boolean asAssignment);", "public boolean isOperator(){\n return true;\n }", "@Test\n public void test_IsOxideCorr() {\n System.out.println(\"Testing MeasuredRatioModel's isOxideCorr()\");\n MeasuredRatioModel instance = new MeasuredRatioModel();\n boolean expResult = false;\n boolean result = instance.isOxideCorr();\n assertEquals(expResult, result);\n instance = new MeasuredRatioModel(\"Specific\",new BigDecimal(\"213\"),\"ABS\",new BigDecimal(\"0.4324\"),true,true);\n result = instance.isOxideCorr();\n expResult=true;\n assertEquals(expResult, result);\n }", "public boolean isDirectAssignment() {\r\n return GrouperUtil.booleanValue(this.directAssignmentString, false);\r\n }", "@Test\n public void equals_DifferentDiningHallBitfield_Test() {\n Assert.assertFalse(bq1.equals(bq6));\n Assert.assertFalse(bq1.equals(bq7));\n }", "private static void assertNotEquals(String message, double a, double b, double epsilon)\n {\n assertTrue(message, Math.abs(a - b) > epsilon);\n }", "@Test\n public void testEquals_differentParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI + 1,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are different\n assertThat(cellIdentityNr).isNotEqualTo(anotherCellIdentityNr);\n }", "Boolean getCompletelyCorrect();", "public final void negate() {\n \n \tthis.m00 = -this.m00;\n \tthis.m01 = -this.m01;\n \tthis.m02 = -this.m02;\n this.m10 = -this.m10;\n this.m11 = -this.m11;\n this.m12 = -this.m12;\n this.m20 = -this.m20;\n this.m21 = -this.m21;\n this.m22 = -this.m22;\n }" ]
[ "0.6503968", "0.6258709", "0.60975295", "0.5961683", "0.5918876", "0.57779557", "0.5758474", "0.57476956", "0.57098097", "0.56317246", "0.56194675", "0.56119734", "0.5610941", "0.5597895", "0.5579187", "0.5562886", "0.55582607", "0.5554576", "0.55515903", "0.5537743", "0.553242", "0.55244255", "0.5519387", "0.5519339", "0.55185384", "0.55175453", "0.55052036", "0.5501288", "0.54883796", "0.5468382", "0.5458572", "0.54451084", "0.54422444", "0.54118866", "0.538748", "0.5384152", "0.53814197", "0.5381359", "0.5370753", "0.5358984", "0.53575075", "0.53561676", "0.53558636", "0.5353195", "0.5349713", "0.53477025", "0.53345793", "0.5334226", "0.53319395", "0.5317218", "0.5313643", "0.5305752", "0.5305145", "0.53027225", "0.53025436", "0.5296416", "0.5294934", "0.5289044", "0.5283758", "0.5277886", "0.5271545", "0.52585346", "0.52580047", "0.52363", "0.5233321", "0.52216345", "0.5214719", "0.52130616", "0.52118975", "0.5207932", "0.5207924", "0.52074826", "0.5205734", "0.51990813", "0.5196328", "0.5193122", "0.51876813", "0.51702815", "0.51685995", "0.51663345", "0.51604486", "0.5149393", "0.51432407", "0.5137333", "0.51365966", "0.5133367", "0.5132124", "0.51313657", "0.5127762", "0.5125865", "0.51256186", "0.51242334", "0.5122756", "0.51167357", "0.51149786", "0.5112536", "0.5104093", "0.51000106", "0.5099887", "0.5090471", "0.5085828" ]
0.0
-1
Estimates the probability that a comparison between two time selectors holds Both selectors are described by the statistics that are relevant for them (one statistic if label was specified, more than one if not).
private double estimateTimeSelectorComparison(List<TemporalElementStats> statsLhs, TimeSelector.TimeField fieldLhs, Comparator comparator, List<TemporalElementStats> statsRhs, TimeSelector.TimeField fieldRhs) { // count overall number of elements for both sides long lhsOverallCount = statsLhs.stream() .map(TemporalElementStats::getElementCount) .reduce(Long::sum) .orElse(0L); long rhsOverallCount = statsRhs.stream() .map(TemporalElementStats::getElementCount) .reduce(Long::sum) .orElse(0L); double sum = 0.; for (TemporalElementStats lhs : statsLhs) { double lhsWeight = (double) lhs.getElementCount() / lhsOverallCount; for (TemporalElementStats rhs : statsRhs) { double rhsWeight = (double) rhs.getElementCount() / rhsOverallCount; sum += lhsWeight * rhsWeight * estimateTimeSelectorComparison(lhs, fieldLhs, comparator, rhs, fieldRhs); } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public double estimateTemporalProb(ElementType type1, Optional<String> label1,\n TimeSelector.TimeField field1, Comparator comp, ElementType type2,\n Optional<String> label2, TimeSelector.TimeField field2) {\n if (comp == EQ) {\n return VERY_LOW_PROB;\n } else if (comp == Comparator.NEQ) {\n return VERY_HIGH_PROB;\n }\n // stats for lhs (can be more than one, if no label is specified)\n List<TemporalElementStats> statsLhs;\n // same for rhs\n List<TemporalElementStats> statsRhs;\n\n // determine relevant statistics for rhs and lhs\n if (!(label1.isPresent())) {\n statsLhs = type1 == ElementType.VERTEX ?\n new ArrayList<>(vertexStats.values()) :\n new ArrayList<>(edgeStats.values());\n } else {\n statsLhs = type1 == ElementType.VERTEX ?\n new ArrayList<>(\n Collections.singletonList(vertexStats.getOrDefault(label1.get(), null))) :\n new ArrayList<>(\n Collections.singletonList(edgeStats.getOrDefault(label1.get(), null)));\n // label not in the DB\n if (statsLhs.get(0) == null) {\n return 0.;\n }\n }\n // same for rhs\n if (!(label2.isPresent())) {\n statsRhs = type2 == ElementType.VERTEX ?\n new ArrayList<>(vertexStats.values()) :\n new ArrayList<>(edgeStats.values());\n } else {\n statsRhs = type2 == ElementType.VERTEX ?\n new ArrayList<>(\n Collections.singletonList(vertexStats.getOrDefault(label2.get(), null))) :\n new ArrayList<>(\n Collections.singletonList(edgeStats.getOrDefault(label2.get(), null)));\n // label not in the DB\n if (statsRhs.get(0) == null) {\n return 0.;\n }\n }\n return estimateTimeSelectorComparison(statsLhs, field1, comp, statsRhs, field2);\n }", "private double estimateTimeSelectorComparison(TemporalElementStats statsLhs,\n TimeSelector.TimeField fieldLhs,\n Comparator comparator, TemporalElementStats statsRhs,\n TimeSelector.TimeField fieldRhs) {\n\n double sum = 0.;\n\n // first, compare without considering Long.MIN values, TemporalElement.DEFAULT_TIME_TO values\n\n double[] lhs = statsLhs.getTemporalPropertyStats(fieldLhs);\n double[] rhs = statsRhs.getTemporalPropertyStats(fieldRhs);\n double lhsMean = lhs[0];\n double lhsVariance = lhs[1];\n double lhsExtreme = lhs[2];\n double rhsMean = rhs[0];\n double rhsVariance = rhs[1];\n double rhsExtreme = rhs[2];\n // probability that both lhs and rhs not TemporalElement.DEFAULT_TIME_FROM or\n // TemporalElement.DEFAULT_TIME_TO\n double probBothNotExtreme = (1 - lhsExtreme) * (1 - rhsExtreme);\n // distribution for difference between lhs and rhs values\n NormalDistribution diffDist = new NormalDistribution(lhsMean - rhsMean,\n Math.max(lhsVariance + rhsVariance, VERY_LOW_PROB));\n\n // P(lhs < rhs)\n double probNotExtremeLTE = diffDist.cumulativeProbability(0.);\n // P(lhs = rhs)\n double probNotExtremeEQ = diffDist.probability(0.);\n // P(lhs comp rhs)\n double probCompNotExtreme = 0.;\n\n if (comparator == LTE) {\n probCompNotExtreme = probNotExtremeLTE;\n } else if (comparator == LT) {\n probCompNotExtreme = probNotExtremeLTE - probNotExtremeEQ;\n } else if (comparator == EQ) {\n probCompNotExtreme = probNotExtremeEQ;\n } else if (comparator == NEQ) {\n probCompNotExtreme = 1. - probNotExtremeEQ;\n } else if (comparator == GTE) {\n probCompNotExtreme = 1. - (probNotExtremeLTE - probNotExtremeEQ);\n } else if (comparator == GT) {\n probCompNotExtreme = 1. - probNotExtremeLTE;\n }\n\n sum += probBothNotExtreme * probCompNotExtreme;\n\n // also consider cases in which one or both sides have extreme values\n double probCompExtreme = 0.;\n // lhs from\n if (fieldLhs == TX_FROM || fieldLhs == VAL_FROM) {\n // rhs from\n if (fieldRhs == TX_FROM || fieldRhs == VAL_FROM) {\n if (comparator == EQ) {\n probCompExtreme = lhsExtreme * rhsExtreme;\n } else if (comparator == NEQ) {\n probCompExtreme = (1 - lhsExtreme) * rhsExtreme + lhsExtreme * (1 - rhsExtreme);\n } else if (comparator == LTE) {\n probCompExtreme = lhsExtreme;\n } else if (comparator == LT) {\n probCompExtreme = lhsExtreme * (1 - rhsExtreme);\n } else if (comparator == GTE) {\n probCompExtreme = rhsExtreme;\n } else if (comparator == GT) {\n probCompExtreme = (1 - lhsExtreme) * rhsExtreme;\n }\n } else {\n // rhs to\n if (comparator == NEQ || comparator == LT || comparator == LTE) {\n probCompExtreme = lhsExtreme * rhsExtreme + (1 - lhsExtreme) * rhsExtreme +\n lhsExtreme * (1 - rhsExtreme);\n } //for all other comparators 0, if lhs and/or rhs extreme\n }\n } else { // lhs to\n // rhs from\n if (fieldRhs == TX_FROM || fieldRhs == VAL_FROM) {\n if (comparator == NEQ || comparator == GT || comparator == GTE) {\n probCompExtreme = lhsExtreme * rhsExtreme + (1 - lhsExtreme) * rhsExtreme +\n lhsExtreme * (1 - rhsExtreme);\n } // for all other comparators 0, if lhs and/or rhs extreme\n } else {\n // rhs to\n if (comparator == EQ) {\n probCompExtreme = lhsExtreme * rhsExtreme;\n } else if (comparator == NEQ) {\n probCompExtreme = (1 - lhsExtreme) * rhsExtreme + lhsExtreme * (1 - rhsExtreme);\n } else if (comparator == LTE) {\n probCompExtreme = rhsExtreme;\n } else if (comparator == LT) {\n probCompExtreme = (1 - lhsExtreme) * rhsExtreme;\n } else if (comparator == GTE) {\n probCompExtreme = lhsExtreme;\n } else if (comparator == GT) {\n probCompExtreme = lhsExtreme * (1 - rhsExtreme);\n }\n }\n }\n\n sum += probCompExtreme;\n\n return sum;\n }", "private double estimateCategoricalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Map<PropertyValue, Double>> map1 =\n stats1.getCategoricalSelectivityEstimation();\n Map<String, Map<PropertyValue, Double>> map2 =\n stats2.getCategoricalSelectivityEstimation();\n Map<PropertyValue, Double> propStats1 = map1.getOrDefault(property1, null);\n Map<PropertyValue, Double> propStats2 = map2.getOrDefault(property2, null);\n // property not sampled or not considered\n if (propStats1 == null || propStats2 == null) {\n // property not considered => return 0.5\n if (!isPropertyRelevant(property1) && !isPropertyRelevant(property2)) {\n return 0.5;\n } else {\n // property not sampled => very rare => return very small value\n return 0.0001;\n }\n }\n if (comp == EQ || comp == NEQ) {\n double sum = 0.;\n for (Map.Entry<PropertyValue, Double> entry1 : propStats1.entrySet()) {\n double val1Selectivity = entry1.getValue();\n for (Map.Entry<PropertyValue, Double> entry2 : propStats2.entrySet()) {\n if (entry1.getKey().equals(entry2.getKey())) {\n double val2Selectivity = entry2.getValue();\n sum += val1Selectivity * val2Selectivity;\n }\n }\n }\n return comp == EQ ? sum : 1. - sum;\n } else {\n // shouldn't happen, categorical variables can only be compared with EQ or NEQ\n return 0.;\n }\n }", "@Override\n public double estimateTemporalProb(ElementType type1, Optional<String> label1,\n TimeSelector.TimeField field1, Comparator comp, Long value) {\n if (comp == EQ) {\n return VERY_LOW_PROB;\n } else if (comp == Comparator.NEQ) {\n return VERY_HIGH_PROB;\n }\n // <, <=, >=, >\n if (!(label1.isPresent())) {\n return estimateTemporalProb(type1, field1, comp, value);\n } else {\n TemporalElementStats elementStats = (type1 == ElementType.VERTEX) ?\n vertexStats.getOrDefault(label1.get(), null) :\n edgeStats.getOrDefault(label1.get(), null);\n // label not in keys\n if (elementStats == null) {\n return VERY_LOW_PROB;\n }\n Binning bins = getBins(elementStats, field1);\n return estimateFromBins(bins, comp, value);\n }\n }", "private double estimateNumericalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Double[]> map1 = stats1.getNumericalPropertyStatsEstimation();\n Map<String, Double[]> map2 = stats2.getNumericalPropertyStatsEstimation();\n Double[] propStats1 = map1.getOrDefault(property1, null);\n Double[] propStats2 = map2.getOrDefault(property2, null);\n if (propStats1 == null || propStats2 == null) {\n return 0.0001;\n }\n double occurrence = stats1.getNumericalOccurrenceEstimation()\n .getOrDefault(property1, 0.) *\n stats2.getNumericalOccurrenceEstimation().getOrDefault(property2, 0.);\n // assuming both properties are normally distributed,\n // their difference is also normally distributed\n NormalDistribution differenceDist = new NormalDistribution(\n propStats1[0] - propStats2[0],\n Math.max(Math.sqrt(propStats1[1] + propStats2[1]), VERY_LOW_PROB));\n\n if (comp == EQ) {\n return occurrence * differenceDist.density(0.);\n } else if (comp == NEQ) {\n return occurrence * (1. - differenceDist.density(0.));\n } else if (comp == LTE) {\n return occurrence * (differenceDist.cumulativeProbability(0.));\n } else if (comp == LT) {\n return occurrence * (differenceDist.cumulativeProbability(0.) -\n differenceDist.density(0.));\n } else if (comp == GTE) {\n return occurrence * (1. - differenceDist.cumulativeProbability(0.) +\n differenceDist.density(0.));\n } else {\n //GT\n return occurrence * (1. - differenceDist.cumulativeProbability(0.));\n }\n }", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp,\n List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateCategoricalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "public int computeTP(Label classLabel){\n\t\treturn getFrequency(classLabel,classLabel);\n\t}", "public double matchData() {\n\t\tArrayList<OWLDataProperty> labels1 = getDataProperties(ontology1);\n\t\tArrayList<OWLDataProperty> labels2 = getDataProperties(ontology2);\n\t\tfor (OWLDataProperty lit1 : labels1) {\n\t\t\tfor (OWLDataProperty lit2 : labels2) {\n\t\t\t\tif (LevenshteinDistance.computeLevenshteinDistance(TestAlign.mofidyURI(lit1.toString())\n\t\t\t\t\t\t, TestAlign.mofidyURI(lit2.toString()))>0.8){\n\t\t\t\t\treturn 1.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0.;\n\n\n\t}", "public float specificity(final L label)\n {\n\n final Multiset<L> predictionsForLabel = confusionMatrix.computeIfAbsent(label, l ->HashMultiset.create());\n\n final int hasLabel = predictionsForLabel.size();\n final int hasLabelRight = predictionsForLabel.count(label); // true positives\n\n\n final int notLabelWrong = getTotalPredicted(label) - hasLabelRight; // false negatives\n final int notLabel = numExamples - hasLabel;\n final int notLabelRight = notLabel - notLabelWrong; // true negatives\n\n if (notLabel == 0)\n {\n return 1.0f;\n }\n\n return (float) notLabelRight / (float) notLabel;\n }", "private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp, List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateNumericalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "public void compareFeatures() {\n computeDistances();\n evaluationLogic();\n // compute recall and precision\n recall = truePositiveCount / (truePositiveCount + falseNegativeCount);\n // avoid division by zero\n float denominator = truePositiveCount + falsePositiveCount;\n precision = denominator == 0 ? 0 : truePositiveCount / denominator;\n }", "private int scoreIdMatch(int tag1, int tag2)\n {\n // If they're exactly equal, great.\n if (tag1 == tag2)\n return 100;\n \n // Fail for now.\n return 0;\n }", "private double p_l(Label label) {\n\t\t// TODO : Implement\n\t\t// Calculate the probability for the label. No smoothing here.\n\t\t// Just the number of label counts divided by the number of documents.\n\t\tint total = docCount.get(Label.POSITIVE)+docCount.get(Label.NEGATIVE);\n\t\t\n\t\t\n\t\tif(label.equals(Label.POSITIVE))\n\t\t\treturn ((double)(docCount.get(Label.POSITIVE)))/((double)(total));\n\t\telse\n\t\t\treturn ((double)(docCount.get(Label.NEGATIVE)))/((double)(total));\n\t}", "public static double similarity(TopicLabel l1,TopicLabel l2)\n\t{\n\t\tdouble sim = 0;\n\t\tint i = 0;\n\t\tfor(String w: l2.listWords)\n\t\t{\n\t\t\tif(l1.listWords.contains(w))\n\t\t\t{\n\t\t\t\tint j = l1.listWords.indexOf(w);\n\t\t\t\tsim += l2.Pw_given_l.get(i) * Math.log( l2.Pw_given_l.get(i)/ l1.Pw_given_l.get(j));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsim += l2.Pw_given_l.get(i) * Math.log( l2.Pw_given_l.get(i)/Config.EPSELON);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn sim;\n\t}", "@Override\r\n\tpublic float getSimilarityTimingEstimated(final String string1, final String string2) {\r\n //timed millisecond times with string lengths from 1 + 50 each increment\r\n //0\t5.97\t11.94\t27.38\t50.75\t73\t109.5\t148\t195.5\t250\t297\t375\t437\t500\t594\t672\t781\t875\t969\t1079\t1218\t1360\t1469\t1609\t1750\t1906\t2063\t2203\t2375\t2563\t2734\t2906\t3110\t3312\t3500\t3688\t3906\t4141\t4375\t4594\t4844\t5094\t5328\t5609\t5860\t6156\t6422\t6688\t6984\t7235\t7547\t7859\t8157\t8500\t8813\t9172\t9484\t9766\t10125\t10516\r\n final float str1Tokens = this.tokeniser.tokenizeToArrayList(string1).size();\r\n final float str2Tokens = this.tokeniser.tokenizeToArrayList(string2).size();\r\n return (((str1Tokens + str2Tokens) * str1Tokens) + ((str1Tokens + str2Tokens) * str2Tokens)) * this.ESTIMATEDTIMINGCONST;\r\n }", "public int compare(Dataset object1, Dataset object2){\n if(object1.getAttributeCount() != candidate.getAttributeCount() ||\n object2.getAttributeCount() != candidate.getAttributeCount()){\n return 0;\n }\n\n double dist1 = 0.0, dist2 = 0.0;\n double tmp1 = 0.0, tmp2 = 0.0;\n\n for(int i = 0; i < candidate.getAttributeCount(); i++){\n if(candidate.getOutputColumnCount() == (i+1)){\n continue;\n }\n\n Attribute ac = candidate.getAttribute(i);\n Attribute a1 = object1.getAttribute(i);\n Attribute a2 = object2.getAttribute(i);\n\n if(ac.getType() == AttributeTypes.TEXT){\n dist1 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a1.getValue());\n dist2 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a2.getValue());\n }else{\n /*\n double acDouble = 0.0;\n double a1Double = 0.0;\n double a2Double = 0.0;\n switch(ac.getType()){\n case INTEGER: acDouble = (double)((Integer)ac.getValue()).intValue(); break;\n case DECIMAL: acDouble = (double)ac.getValue();\n }\n switch(a1.getType()){\n case INTEGER: a1Double = (double)((Integer)a1.getValue()).intValue(); break;\n case DECIMAL: a1Double = (double)a1.getValue();\n }\n switch(a2.getType()){\n case INTEGER: a2Double = (double)((Integer)a2.getValue()).intValue(); break;\n case DECIMAL: a2Double = (double)a2.getValue();\n }*/\n double acDouble = (double)ac.getValue();\n double a1Double = (double)a1.getValue();\n double a2Double = (double)a2.getValue();\n\n tmp1 += Math.pow(a1Double-acDouble, 2);\n tmp2 += Math.pow(a2Double-acDouble, 2);\n }\n }\n\n dist1 += Math.sqrt(tmp1);\n dist2 += Math.sqrt(tmp2);\n\n if (dist1 > dist2) {\n return 1;\n }\n if (dist1 < dist2) {\n return -1;\n }\n return 0;\n }", "@Test\n public void testSegmentSelection() {\n assertMetrics(\"segments:2 absoluteProximity:0.1 proximity:1 segmentStarts:19,41\",\n \"a b c d e\",\"x a b x c x x x x x x x x x x x x x x a b c x x x x x x x x x e x d x c d x x x c d e\");\n // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2\n // 0 1 2 3 4\n // Should choose - - - - -\n\n // Same as above but best matching segment have too low exactness\n assertMetrics(\"segments:2 absoluteProximity:0.0903 proximity:0.9033 segmentStarts:1,41\",\n \"a b c d e\",\"x a b x c x x x x x x x x x x x x x x a:0.2 b:0.3 c:0.4 x x x x x x x x x e x d x c d x x x c d e\");\n // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2\n // 0 1 2 3 4\n // Should choose - - - - -\n\n assertMetrics(\"segments:1 absoluteProximity:0.0778 proximity:0.778\",\"a b c d e f\",\"x x a b b b c f e d a b c d x e x x x x x f d e f a b c a a b b c c d d e e f f\");\n\n // Prefer one segment with ok proximity over two segments with great proximity\n assertMetrics(\"segments:1 segmentStarts:0\",\"a b c d\",\"a b x c d x x x x x x x x x x x a b x x x x x x x x x x x c d\");\n assertMetrics(\"segments:1 segmentStarts:0\",\"a b c d\",\"a b x x x x x x x x c d x x x x x x x x x x x a b x x x x x x x x x x x c d\");\n }", "private double getTverskyScore(Set<String> setOne, Set<String> setTwo) {\n\t\tdouble tverskyScore = 0.0;\n\t\tSet<String> intersectionOfSets = new HashSet<String>(setOne);\n\t\tintersectionOfSets.retainAll(setTwo);\t\t\n\t\t\n\t\tSet<String> differenceOfSets = new HashSet<String>(setOne);\n\t\tdifferenceOfSets.removeAll(setTwo);\n\t\ttverskyScore = (double) intersectionOfSets.size() / (intersectionOfSets.size() + differenceOfSets.size());\n\t\t\n\t\treturn tverskyScore;\n\t}", "private double estimateTemporalProb(ElementType type1, TimeSelector.TimeField field1,\n Comparator comp, Long value) {\n double sum = 0.;\n Map<String, TemporalElementStats> stats = type1 == ElementType.VERTEX ?\n vertexStats : edgeStats;\n\n Long overallCount = type1 == ElementType.VERTEX ? vertexCount : edgeCount;\n for (TemporalElementStats elementStat : stats.values()) {\n Binning bins = getBins(elementStat, field1);\n sum += estimateFromBins(bins, comp, value) *\n (elementStat.getElementCount() / (double) overallCount);\n }\n return sum;\n }", "public static float calcSimilarity(Map<String, Enum> first, Map<String, Enum> second) {\n if (first == null && second == null) return 1f;\n Set<String> allKeys = new HashSet<>();\n\n if (first != null) allKeys.addAll(first.keySet());\n if (second != null) allKeys.addAll(second.keySet());\n\n int normDiv = 0;\n float sum = 0;\n for (String key : allKeys) {\n Enum thisEnum = first != null ? first.get(key) : null;\n Enum otherEnum = second != null ? second.get(key) : null;\n PhAttribType phA = getAllPhAttribTypes().get(key);\n try {\n sum += phA.calcSimilarity(thisEnum, otherEnum) * phA.getWeight();\n normDiv++;\n } catch (AttribTypeNotComparableException ncE) {\n System.err.println(\"NotComparableException: \" + ncE);\n }\n }\n if (sum == 0) return 0;\n return sum / normDiv;\n }", "public Double getProbTagGiven2Tag(String t1, String t2, String t3) {\n\r\n\t\treturn l1 * uModel.freq(t1) + l2 * biModel.freq(t2, t1) + l3\r\n\t\t\t\t* triModel.freq(t2 + \" \" + t3, t1);\r\n\t}", "private double getScore(String source, String target) {\n return sourceTargetCounts.getCount(source, target) / (sourceWordCounts.get(source) * targetWordCounts.get(target));\n }", "public void calculateProbabilities(){\n\t}", "@Test\n public void testMultipleLabelsWithAndOperatorCriteria() throws Exception {\n JobQueryCriteria<TitusTaskState, TitusJobType> query = queryBuilder.withLabels(\n expectedLabels().with(\"labelA\").with(\"labelB\").build()\n ).withLabelsAndOp(true).build();\n\n assertThat(JobQueryCriteriaEvaluator.matches(job, query)).isTrue();\n\n // One of the labels is missing\n JobQueryCriteria<TitusTaskState, TitusJobType> query2 = queryBuilder.withLabels(\n expectedLabels().with(\"labelB\").with(\"missing_label\").build()\n ).withLabelsAndOp(true).build();\n\n assertThat(JobQueryCriteriaEvaluator.matches(job, query2)).isFalse();\n }", "@Test\n public void testOneUserTrecevalStrategyMultipleRelevance() {\n DataModelIF<Long, Long> test = DataModelFactory.getDefaultModel();\n DataModelIF<Long, Long> predictions = DataModelFactory.getDefaultModel();\n test.addPreference(1L, 2L, 0.0);\n test.addPreference(1L, 3L, 1.0);\n test.addPreference(1L, 4L, 2.0);\n predictions.addPreference(1L, 1L, 3.0);\n predictions.addPreference(1L, 2L, 4.0);\n predictions.addPreference(1L, 3L, 5.0);\n predictions.addPreference(1L, 4L, 1.0);\n\n Precision<Long, Long> precision = new Precision<Long, Long>(predictions, test, 1.0, new int[]{1, 2, 3, 4, 5});\n\n precision.compute();\n\n assertEquals(0.5, precision.getValue(), 0.001);\n assertEquals(1.0, precision.getValueAt(1), 0.001);\n assertEquals(0.5, precision.getValueAt(2), 0.001);\n assertEquals(0.3333, precision.getValueAt(3), 0.001);\n assertEquals(0.5, precision.getValueAt(4), 0.001);\n assertEquals(0.4, precision.getValueAt(5), 0.001);\n\n Map<Long, Double> precisionPerUser = precision.getValuePerUser();\n for (Map.Entry<Long, Double> e : precisionPerUser.entrySet()) {\n long user = e.getKey();\n double value = e.getValue();\n assertEquals(0.5, value, 0.001);\n }\n }", "public int compare(Person a, Person b){\n int aWeight = (int)a.getWeight();\n int bWeight = (int)b.getWeight();\n return aWeight - bWeight;\n }", "@Override\n public int compareTo(PartialSolution other) {\n if (this.getCostUnderestimate() == other.getCostUnderestimate()) {\n int numTasksThis = 0;\n int numTasksOther = 0;\n for (ScheduledTask task : this) {\n numTasksThis++;\n }\n for (ScheduledTask task : other) {\n numTasksOther++;\n }\n return numTasksOther - numTasksThis;\n }\n return this.getCostUnderestimate() - other.getCostUnderestimate();\n }", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n if (comp != EQ && comp != NEQ) {\n return 0.;\n }\n long overallCount = 0L;\n boolean found = false;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n if (stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n found = true;\n }\n }\n // property not sampled or not considered\n if (!found) {\n // not relevant/considered => simply return 0.5\n if (!isPropertyRelevant(property)) {\n return 0.5;\n } else {\n // not sampled => very rare or not even there => return very small value\n return 0.0001;\n }\n }\n\n double prob = 0.;\n for (TemporalElementStats stat : relevantStats) {\n if (!stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n // not sampled ? ....\n double factor = 0.0001;\n // ...or just excluded/not relevant?\n if (!isPropertyRelevant(property)) {\n factor = 0.5;\n }\n prob += factor * ((double) stat.getElementCount() / overallCount);\n continue;\n }\n prob += stat.getCategoricalSelectivityEstimation()\n .get(property)\n .getOrDefault(value, 0.0001) *\n ((double) stat.getElementCount() / overallCount);\n }\n if (comp == EQ) {\n return prob;\n } else {\n //NEQ\n return 1 - prob;\n }\n }", "double getScore(IToken tk1, IToken tk2);", "public double estimateSelectivity(Predicate.Op op, int v) {\n int index = calBucketIndex(v);\n double count = 0;\n switch (op) {\n case EQUALS:\n if(v>max || v<min) return 0;\n count = buckets[index];\n break;\n case GREATER_THAN:\n if(v < min) return 1;\n if(v > max) return 0;\n for(int i=index+1;i<buckets.length;++i)\n count += buckets[i];\n break;\n case GREATER_THAN_OR_EQ:\n if(v < min) return 1;\n if(v > max) return 0;\n count = 0;\n for(int i=index;i<buckets.length;++i)\n count += buckets[i];\n break;\n case LESS_THAN:\n if(v < min) return 0;\n if(v > max) return 1;\n for(int i=0;i<index;++i)\n count += buckets[i];\n break;\n case LESS_THAN_OR_EQ:\n if(v < min) return 0;\n if(v > max) return 1;\n for(int i=0;i<index+1;++i)\n count += buckets[i];\n break;\n case NOT_EQUALS:\n if(v>max || v<min) return 1;\n count = totalCount - buckets[index];\n break;\n case LIKE:\n default:\n break;\n }\n \treturn count / totalCount;\n }", "private double distanceEstimate(Node a, Node b){\n return Math.abs(a.getFloor() - b.getFloor()) * FLOOR_COST + distanceBetween(a,b);\n }", "@Override public double stateTransitionWeight(int state1, int state2) {\n return 1 / (1 + benchmark.distance(state1, state2));\n }", "@Override\n public double score(Map<BasedMining, Map<BasedMining, RateEvent>> preferences,\n BasedMining item1,\n BasedMining item2) {\n var sharedInnerItems = new ArrayList<BasedMining>();\n\n preferences.get(item1).forEach((innerItem, rateEvent) -> {\n if (preferences.get(item2).get(innerItem) != null) {\n sharedInnerItems.add(innerItem);\n }\n });\n\n// If they have no rating in common, return 0\n if (sharedInnerItems.size() > 0)\n return 0;\n\n// Add up the square of all the differences\n var sumOfSquares = preferences.get(item1).entrySet()\n .stream()\n .filter(entry -> preferences.get(item2).get(entry.getKey()) != null)\n .mapToDouble(entry -> Math.pow((entry.getValue().getRating() - preferences.get(item2).get(entry.getKey()).getRating()), 2.0))\n .sum();\n\n return 1 / (1 + sumOfSquares);\n }", "@Override\n\tpublic double p_l(Label label) {\n\n\t\t// Calculate the probability for the label. No smoothing here.\n\t\t// Just the number of label counts divided by the number of documents.\n\t\tdouble ret = 0;\n\t\t\n\t\t// set up m_sports_count and m_business_count\n\t\tdocuments_per_label_count(m_trainingData);\n\n\t\tdouble sum = m_sports_count + m_business_count;\n\n\t\tif (label == Label.SPORTS) {\n\t\t\tret = m_sports_count / sum;\n\t\t} else {\n\t\t\tret = m_business_count / sum;\n\t\t}\n\n\t\treturn ret;\n\t}", "private int scoreDateMatch(int tag1, int tag2)\n {\n // If they're exactly equal, great.\n if (tag1 == tag2)\n return 50;\n \n // Parse the years\n String str1 = data.tags.getString(tag1);\n String str2 = data.tags.getString(tag2);\n int year1 = -99;\n int year2 = -99;\n try { year1 = Integer.parseInt(str1); }\n catch (NumberFormatException e) { }\n try { year2 = Integer.parseInt(str2); }\n catch (NumberFormatException e) { }\n \n // If either is missing, no match.\n if (year1 < 0 || year2 < 0)\n return 0;\n \n // If within 2 years, consider that a partial match.\n if (Math.abs(year1 - year2) <= 2)\n return 25;\n \n // All other cases: fail for now at least.\n return 0;\n }", "public static LabelMatch compareLabels(ControlLabel generated,\r\n\t\t\t\t\t ControlLabel accepted) {\r\n if (accepted instanceof TrackLabel) {\r\n if (generated == accepted) {\r\n\treturn equality;\r\n } else {\r\n\treturn disjoint;\r\n }\r\n } else if (generated instanceof TrackLabel) {\r\n return disjoint;\r\n } else if (accepted instanceof UnknownLabel) {\r\n return included;\r\n } else if (accepted instanceof AnchoredBreakLabel) {\r\n if (generated instanceof NamedBreakLabel) {\r\n\tIRNode node = ((AnchoredBreakLabel)accepted).stmtNode;\r\n\tIRNode breakNode = ((NamedBreakLabel)generated).breakNode;\r\n\tString name = LabeledBreakStatement.getId(breakNode);\r\n\tif (name.equals(LabeledStatement.getStatementLabel(node))) {\r\n\t // Assume no duplicate names.\r\n\t return equality;\r\n\t} else {\r\n\t return disjoint;\r\n\t}\r\n } else if (generated instanceof BreakLabel) {\r\n\t// there may be intervening nodes,\r\n\t// but we can't tell\r\n\treturn included;\r\n } else {\r\n\t// no match!\r\n\treturn disjoint;\r\n }\r\n } else if (accepted instanceof NamedBreakLabel) {\r\n // for labeled statements only\r\n if (generated instanceof NamedBreakLabel) {\r\n\tIRNode node = ((NamedBreakLabel)accepted).breakNode;\r\n\tIRNode breakNode = ((NamedBreakLabel)generated).breakNode;\r\n\tString name = LabeledBreakStatement.getId(breakNode);\r\n\tif (name.equals(LabeledStatement.getLabel(node))) {\r\n\t // Assume no duplicate names.\r\n\t return equality;\r\n\t} else {\r\n\t return disjoint;\r\n\t}\r\n } else {\r\n\treturn disjoint;\r\n }\r\n } else if (accepted instanceof AnchoredContinueLabel) {\r\n if (generated instanceof NamedContinueLabel) {\r\n\tIRNode node = ((AnchoredContinueLabel)accepted).stmtNode;\r\n\tIRNode continueNode = ((NamedContinueLabel)generated).continueNode;\r\n\tString name = LabeledContinueStatement.getId(continueNode);\r\n\tif (name.equals(LabeledStatement.getStatementLabel(node))) {\r\n\t // Assume no duplicate names.\r\n\t return equality;\r\n\t} else {\r\n\t return disjoint;\r\n\t}\r\n } else if (generated instanceof ContinueLabel) {\r\n\t// there may be intervening nodes,\r\n\t// but we can't tell\r\n\t// (COULD BE BETTER)\r\n\treturn included;\r\n } else {\r\n\t// no match!\r\n\treturn disjoint;\r\n }\r\n } else if (accepted instanceof ReturnLabel) {\r\n if (generated instanceof ReturnLabel) {\r\n\treturn equality;\r\n } else {\r\n\treturn disjoint;\r\n }\r\n } else if (accepted instanceof CaughtExceptionLabel) {\r\n if (generated instanceof ExceptionLabel) {\r\n\t// be stupid for now:\r\n\treturn overlaps;\r\n } else {\r\n\treturn disjoint;\r\n }\r\n } else {\r\n // unknown:\r\n return overlaps;\r\n }\r\n }", "private void calculateAndGraph(ArrayList<String> first, ArrayList<String> second) {\n\t\tfor(int i = 0; i < numCores; i++) {\n\t\t\t\tString[] firstTokens = first.get(i).split(\" \");\n\t\t\t\tString[] secondTokens = second.get(i).split(\" \");\n\t\t\t\t\n\t\t\t\t// calculate user2 - user1\n\t\t\t\tdouble user = Double.parseDouble(secondTokens[0]);\n\t\t\t\tdouble userPrevious = Double.parseDouble(firstTokens[0]);\n\t\t\t\tdouble userDiff = Math.abs(user-userPrevious);\n\t\t\t\t\n\t\t\t\t// calculate system2 - system1\n\t\t\t\tdouble system = Double.parseDouble(secondTokens[1]);\n\t\t\t\tdouble systemPrevious = Double.parseDouble(firstTokens[1]);\n\t\t\t\tdouble systemDiff = Math.abs(system-systemPrevious);\n\t\t\t\t\n\t\t\t\t// calculate nice2 - nice1\n\t\t\t\tdouble nice = Double.parseDouble(secondTokens[2]);\n\t\t\t\tdouble nicePrevious = Double.parseDouble(firstTokens[2]);\n\t\t\t\tdouble niceDiff = Math.abs(nice-nicePrevious);\n\t\t\t\t\n\t\t\t\t// calculate idle2 - idle1\n\t\t\t\tdouble idle = Double.parseDouble(secondTokens[3]);\n\t\t\t\tdouble idlePrevious = Double.parseDouble(firstTokens[3]);\n\t\t\t\tdouble idleDiff = Math.abs(idle-idlePrevious);\n\t\t\t\t\t\t\t\t\n//\t\t\t\t// calculate CPU usage using method from http://www.pplusdomain.net/cgi-bin/blosxom.cgi/2009/04/02\n//\t\t\t\tdouble total = userDiff + systemDiff + niceDiff + idleDiff;\n//\t\t\t\tdouble idlePercent = idleDiff / total * 100;\n//\t\t\t\tint cpuUtil2 = (int) (100.0 - idlePercent);\n\t\t\t\t\n\t\t\t\t// calculate CPU usage using method from https://piazza.com/class/ic02ole9e534k8?cid=137\n\t\t\t\tdouble numerator = systemDiff + userDiff;\n\t\t\t\tdouble denominator = numerator + idleDiff;\n\t\t\t\tint cpuUtil = (int) ((numerator / denominator) * 100.0);\n\t\t\t\t\n\t\t\t\t// Write cpu usage for this core to the graph\n\t\t\t\tuserInterface.getCPUGraph().addDataPoint(i, cpuUtil);\n\t\t\t\tuserInterface.getCPUGraph().repaint();\n\t\t}\n\t}", "public void testCompare2() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(0.6D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions below the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "private void CodeComparisonScoresHelper(String fileOne, String fileTwo) {\n double maxLength = Math.max(fileOne.length(), fileTwo.length());\n\n int amountOfChangesLD = new LevensthienDistance(fileOne, fileTwo).getEditDistance();\n int amountLCS = new LongestCommonSubsequence(fileOne, fileTwo).getLengthOfLCS();\n\n double LDScore = (maxLength - amountOfChangesLD) / maxLength * 100;\n double LCSScore = amountLCS / maxLength * 100;\n double overallScore = (LCSScore + LDScore) / 2;\n\n if (LDScore > scoreForLD) {\n scoreForLD = LDScore;\n }\n if (LCSScore > scoreForLCS) {\n scoreForLCS = LCSScore;\n }\n if (overallScore > overallTextDiffScore) {\n overallTextDiffScore = overallScore;\n }\n }", "private int scoreTitleMatch(int tag1, int tag2)\n {\n // If they're exactly equal, great.\n if (tag1 == tag2)\n return 100;\n \n // Don't do prefix scanning on short titles.\n String str1 = data.tags.getString(tag1);\n String str2 = data.tags.getString(tag2);\n if (str1.length() < 5 || str2.length() < 5)\n return 0;\n \n // If either is a prefix of the other, we have a match.\n if (str1.startsWith(str2) || str2.startsWith(str1))\n return 100;\n \n // All other cases: fail for now at least.\n return 0;\n }", "public int compare(Object o1, Object o2) {\n int[] p1 = (int[]) o1;\n int[] p2 = (int[]) o2;\n\n // compare sum of axis distances for each priority\n for (int p=MAX_PRIORITY; p>=MIN_PRIORITY; p--) {\n int dist1 = 0, dist2 = 0;\n for (int i=0; i<p1.length; i++) {\n if (priorities[i] == p) {\n dist1 += distance(i, p1[i]);\n dist2 += distance(i, p2[i]);\n }\n }\n int diff = dist1 - dist2;\n if (diff != 0) return diff;\n }\n\n // compare number of diverging axes for each priority\n for (int p=MAX_PRIORITY; p>=MIN_PRIORITY; p--) {\n int div1 = 0, div2 = 0;\n for (int i=0; i<p1.length; i++) {\n if (priorities[i] == p) {\n if (p1[i] != 0) div1++;\n if (p2[i] != 0) div2++;\n }\n }\n int diff = div1 - div2;\n if (diff != 0) return diff;\n }\n\n return 0;\n }", "public static double RELATIVE_PERCENTAGE_SUPPORT(Feature a, Feature b) {\n double num = 0.0, den = 0.0, dinf, dsup, rat = -1.0;\n int i;\n\n if (!a.type.equals(b.type)) Dataset.perror(\"Feature.class :: not the same class for features\");\n\n if (Feature.IS_CONTINUOUS(a.type)) {\n if ((b.dmax == b.dmin) || (a.dmax <= b.dmin) || (a.dmin >= b.dmax)) return 0.0;\n\n if (a.dmin < b.dmin) dinf = b.dmin;\n else dinf = a.dmin;\n\n if (a.dmax > b.dmax) dsup = b.dmax;\n else dsup = a.dmax;\n\n num = dsup - dinf;\n den = b.dmax - b.dmin;\n } else if (Feature.IS_INTEGER(a.type)) {\n if ((a.imax < b.imin) || (a.imin > b.imax)) return 0.0;\n\n if (a.imin <= b.imin) dinf = (double) b.imin;\n else dinf = (double) a.imin;\n\n if (a.imax >= b.imax) dsup = (double) b.imax;\n else dsup = (double) a.imax;\n\n num = dsup - dinf + 1.0;\n den = ((double) (b.imax - b.imin)) + 1.0;\n } else if (Feature.IS_NOMINAL(a.type)) {\n if (b.modalities.size() == 0) return 0.0;\n else den = (double) b.modalities.size();\n\n num = 0.0;\n for (i = 0; i < a.modalities.size(); i++)\n if (b.modalities.contains((String) a.modalities.elementAt(i))) num += 1.0;\n } else Dataset.perror(\"Feature.class :: feature type unknown\");\n\n rat = num / den;\n if ((rat < 0.0) || (rat > 1.0))\n Dataset.perror(\"Feature.class :: ratio \" + rat + \" not a probability\");\n return rat;\n }", "@Test\n public void testGetPercentComplete() {\n TaskSeriesCollection c = createCollection2();\n TaskSeriesCollection c3 = createCollection3();\n assertEquals(new Double(0.111), c3.getPercentComplete(0, 0, 0));\n }", "private double updateEstimates(long sleep) {\r\n \t\t// Prune datasets\r\n \t\twhile (startupTimeHistory.size() > poolConfig.averageCount) {\r\n \t\t\tstartupTimeHistory.remove(0);\r\n \t\t}\r\n \t\twhile (requestTimeHistory.size() > poolConfig.averageCount) {\r\n \t\t\trequestTimeHistory.remove(0);\r\n \t\t}\r\n \r\n \t\t// Do estimates\r\n \t\tlong totalTime = 0;\r\n \t\tfor (long t : startupTimeHistory) {\r\n \t\t\ttotalTime += t;\r\n \t\t}\r\n \t\tstartupTimeEstimate = totalTime / startupTimeHistory.size();\r\n \r\n \t\t// Math.max(..., 1) to avoid divide by zeros.\r\n \t\tdemandEstimate = requestTimeHistory.size()\r\n \t\t\t\t/ Math.max(System.currentTimeMillis() - requestTimeHistory.get(0), 1.0);\r\n \r\n \t\t// Guestimate demand for N\r\n \t\tdouble estimate = demandEstimate * poolConfig.safetyMultiplier * sleep;\r\n \t\treturn Math.min(Math.max(estimate, poolConfig.poolMin), poolConfig.poolMax);\r\n \t}", "private double efficientLpDistance(Instance one, Instance two, int p_value, double threshold) {\n\n double distanceSum = 0;\n double currentThreshold = Math.pow(threshold, p_value);\n\n for (int i = 0; i < one.numAttributes() - 1; i++) {\n distanceSum += Math.pow(Math.abs(one.value(i) - two.value(i)), p_value);\n if (distanceSum > currentThreshold) {\n return Double.MAX_VALUE;\n }\n }\n\n distanceSum = Math.pow(distanceSum, 1.0 / p_value); // Root in base P\n\n return distanceSum;\n }", "private double computeRangeSelectivity(TableMetadata tableMetadata, RexNode orPred, List<SchemaPath> fieldNames) {\n SchemaPath col = getColumn(orPred, fieldNames);\n if (col != null) {\n ColumnStatistics<?> columnStatistics = tableMetadata != null ? tableMetadata.getColumnStatistics(col) : null;\n Histogram histogram = columnStatistics != null ? ColumnStatisticsKind.HISTOGRAM.getFrom(columnStatistics) : null;\n if (histogram != null) {\n Double totalCount = ColumnStatisticsKind.ROWCOUNT.getFrom(columnStatistics);\n Double ndv = ColumnStatisticsKind.NDV.getFrom(columnStatistics);\n Double sel = histogram.estimatedSelectivity(orPred, totalCount.longValue(), ndv.longValue());\n if (sel != null) {\n return sel;\n }\n }\n }\n return guessSelectivity(orPred);\n }", "@Override\n public int compareTo(Score other) {\n return (int) (100 * (this.getAsDouble() - other.getAsDouble()));\n }", "protected void sortStats(Node node1, Node node2) {\n\t\tif (node1.getNodeName().equals(\"team\")) {\n\t\t\tif (node2.getNodeName().equals(\"name\")) {\n\t\t\t\tif ((teamName).contains(node2.getNodeValue())) {\n\t\t\t\t\tshouldLoop = true;\n\t\t\t\t} else {\n\t\t\t\t\tshouldLoop = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (node1.getNodeName().equals(\"player\")\n\t\t\t\t|| node1.getNodeName().equals(\"total\")\n\t\t\t\t|| node1.getNodeName().equals(\"team\")) {\n\t\t\tif (!(node2.getNodeName()).contains(\"pct\")) {\n\t\t\t\tif (shouldLoop) {\n\t\t\t\t\tplayerStatNameList.add(node2.getNodeName());\n\t\t\t\t\tplayerStatValueList.add(node2.getNodeValue());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic Scores compare(File f1, File f2) {\n\t\treturn new Scores(1.0, \"AlwaysTrueComparisonStrategy:1\");\n\t}", "@Test\n public void testSingleLabelCriteria() throws Exception {\n JobQueryCriteria<TitusTaskState, TitusJobType> query = queryBuilder.withLabels(expectedLabels().with(\"labelA\").build()).build();\n assertThat(JobQueryCriteriaEvaluator.matches(job, query)).isTrue();\n\n // No label name match\n JobQueryCriteria<TitusTaskState, TitusJobType> query2 = queryBuilder.withLabels(expectedLabels().with(\"missing_label\").build()).build();\n assertThat(JobQueryCriteriaEvaluator.matches(job, query2)).isFalse();\n\n // Matching label and value\n JobQueryCriteria<TitusTaskState, TitusJobType> query3 = queryBuilder.withLabels(expectedLabels().with(\"labelA\", \"valueA\").build()).build();\n assertThat(JobQueryCriteriaEvaluator.matches(job, query3)).isTrue();\n\n // Not matching value\n JobQueryCriteria<TitusTaskState, TitusJobType> query4 = queryBuilder.withLabels(expectedLabels().with(\"labelA\", \"wrong_value\").build()).build();\n assertThat(JobQueryCriteriaEvaluator.matches(job, query4)).isFalse();\n\n // Cell name\n JobQueryCriteria<TitusTaskState, TitusJobType> query5 = queryBuilder.withLabels(expectedLabels()\n .with(JOB_ATTRIBUTES_CELL).build())\n .build();\n assertThat(JobQueryCriteriaEvaluator.matches(job, query5)).isTrue();\n JobQueryCriteria<TitusTaskState, TitusJobType> query6 = queryBuilder.withLabels(expectedLabels()\n .with(JOB_ATTRIBUTES_CELL, cellName).build())\n .build();\n assertThat(JobQueryCriteriaEvaluator.matches(job, query6)).isTrue();\n }", "public void mergeStatistics(BenchmarkStatistics other) {\n for (String stateName : other.latenciesByStateAndInteraction.keySet()) {\n Map<String, List<Long>> latenciesByInteraction = other.latenciesByStateAndInteraction.get(stateName);\n for (String interactionName : latenciesByInteraction.keySet())\n for (long latency : latenciesByInteraction.get(interactionName))\n this.addLatency(stateName, interactionName, latency);\n }\n this.exceptionalSessions += other.exceptionalSessions;\n this.unexpectedSessions += other.unexpectedSessions;\n }", "@Override\n\t\tpublic double minorSimilarCost(ExecutionEventPair one, ExecutionEventPair two, double totalPossibleCost) {\n\t\t\t\n\t\t\tActivitFromToWithDurations binOne = DurationClassHelper.getDurationBinFor(one.getEventOne(), one.getEventTwo());\n\t\t\tActivitFromToWithDurations binTwo = DurationClassHelper.getDurationBinFor(two.getEventOne(), two.getEventTwo());\n\t\t\t\t\n\t\t\tint amount = DurationClassHelper.getAmountOfBins(one.getEventOne(), one.getEventTwo());\n\t\t\tint difference = DurationClassHelper.getBinsBetween(binOne, binTwo);\n\t\t\t\t\n\t\t\treturn (totalPossibleCost*(1-(difference/(double)amount)));\n\t\t}", "private void comparePoints(double[] firstP, double[] secondP) {\n assertEquals(firstP.length, secondP.length);\n\n for(int j=0; j<firstP.length; j++) {\n assertEquals(\"j = \"+j, firstP[j], secondP[j], TOLERANCE);\n }\n }", "public int compare(ThreadWait a, ThreadWait b)\n {\n if(b.wakeUp > a.wakeUp){\n return -1;\n }\n if (b.wakeUp == a.wakeUp){\n return 0;\n }\n \n return 1;\n \n }", "public void calcMatch() {\n if (leftResult == null || rightResult == null) {\n match_score = 0.0f;\n } else {\n match_score = FaceLockHelper.Similarity(leftResult.getFeature(), rightResult.getFeature(), rightResult.getFeature().length);\n match_score *= 100.0f;\n tvFaceMatchScore1.setText(Float.toString(match_score));\n llFaceMatchScore.setVisibility(View.VISIBLE);\n\n }\n }", "public static void main(String[] args)\n\t{\n\t\tString alg1 = args[0];\n\t\tString alg2 = args[1];\n\t\tint N = Integer.parseInt(args[2]);\n\t\tint T = Integer.parseInt(args[3]);\n\t\tdouble t1 = timeRandomInput(alg1, N, T); // total for alg1\n\t\tdouble t2 = timeRandomInput(alg2, N, T); // total for alg2\n\t\tStdOut.printf(\"For %d random Doubles\\n\t%s is\",N, alg1);\n\t\tStdOut.printf(\" %.1f times faster than %s\\n\",t2/t1, alg2);\n\t}", "public boolean reportBothBestHitsForTD() {\r\n return reportBothBestHitsForTD;\r\n }", "public void addLabelOfSelectionReferencedByStats(String referencedSelectionLabel)\n {\n\tthis.selectionLabelsReferencedByStats.add(referencedSelectionLabel);\n }", "void assertTotalTimePctEquals(T key, double expected);", "static List<Integer> compareTriplets(List<Integer> a, List<Integer> b) {\r\n\t\tList<Integer> val = new ArrayList<>();\r\n\t\tint aScore = 0;\r\n\t\tint bScore = 0;\r\n\t\tfor (int i=0; i<3;i++) {\r\n\t\t\tfor (int j=0;j<3;j++) {\r\n\t\t\t\tif (i==j) {\r\n\t\t\t\t\tint tempA = a.get(i);\r\n\t\t\t\t\tint tempB = b.get(j);\r\n\t\t\t\t\tif (!(1<=tempA && tempA<=100 && 1<=tempB && 1<=tempB)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (tempA<tempB) {\r\n\t\t\t\t\t\tbScore += 1;\r\n\t\t\t\t\t} else if (tempA>tempB) {\r\n\t\t\t\t\t\taScore += 1;\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\tval.add(aScore);\r\n\t\tval.add(bScore);\r\n\t\treturn val;\r\n\t}", "public void testCompareTimes_Collection_ThreadPoolExecutor()\n {\n System.out.println( \"compareTimes\" );\n Collection<Callable<Double>> tasks = createTasks( 10 );\n NamedValue<Double> value = ParallelUtil.compareTimes( tasks, ParallelUtil.createThreadPool( 1 ) );\n System.out.println( \"Value: \" + value + \", \" + value.getValue() );\n }", "@Override\n\t\tpublic int compare(S o1, S o2) {\n\t\t\tif (getProb(o1) > getProb(o2))\n\t\t\t\treturn -1;\n\t\t\tif (getProb(o1) < getProb(o2))\n\t\t\t\treturn 1;\n\t\t\treturn Double.compare(o1.hashCode(), o2.hashCode());\n\t\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 }", "@Test\n public void testOneUserTrecevalStrategySingleRelevance() {\n DataModelIF<Long, Long> test = DataModelFactory.getDefaultModel();\n DataModelIF<Long, Long> predictions = DataModelFactory.getDefaultModel();\n test.addPreference(1L, 2L, 0.0);\n test.addPreference(1L, 3L, 1.0);\n test.addPreference(1L, 4L, 1.0);\n predictions.addPreference(1L, 1L, 3.0);\n predictions.addPreference(1L, 2L, 4.0);\n predictions.addPreference(1L, 3L, 5.0);\n predictions.addPreference(1L, 4L, 1.0);\n\n Precision<Long, Long> precision = new Precision<Long, Long>(predictions, test, 1.0, new int[]{1, 2, 3, 4, 5});\n\n precision.compute();\n\n assertEquals(0.5, precision.getValue(), 0.001);\n assertEquals(1.0, precision.getValueAt(1), 0.001);\n assertEquals(0.5, precision.getValueAt(2), 0.001);\n assertEquals(0.3333, precision.getValueAt(3), 0.001);\n assertEquals(0.5, precision.getValueAt(4), 0.001);\n assertEquals(0.4, precision.getValueAt(5), 0.001);\n\n Map<Long, Double> precisionPerUser = precision.getValuePerUser();\n for (Map.Entry<Long, Double> e : precisionPerUser.entrySet()) {\n long user = e.getKey();\n double value = e.getValue();\n assertEquals(0.5, value, 0.001);\n }\n }", "public void testCompare4() throws Exception {\r\n // timelines shorter than or equal to the target\r\n ComponentCompetitionSituation situation1 = new ComponentCompetitionSituation();\r\n situation1.setPostingDate(new Date());\r\n situation1.setEndDate(new Date(situation1.getPostingDate().getTime() + 1000));\r\n\r\n // timelines longer than the target\r\n ComponentCompetitionSituation situation2 = new ComponentCompetitionSituation();\r\n situation2.setPostingDate(new Date());\r\n situation2.setEndDate(new Date(situation2.getPostingDate().getTime() + 100000));\r\n\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation1, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation2, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // timelines shorter than or equal to the target < timelines longer than the target\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "public void testCompare1() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.5D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions above the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "@Test\n public void testSignificance() {\n assertMetrics(\"significance:1\", \"a\",\"a\");\n assertMetrics(\"significance:0\", \"a\",\"x\");\n assertMetrics(\"significance:0.3333\",\"a a a\",\"a\");\n assertMetrics(\"significance:1\", \"a\",\"a a a\");\n assertMetrics(\"significance:1\", \"a b c\",\"a b c\");\n assertMetrics(\"significance:1\", \"a b c\",\"x x a b x a x c x x a b x c c x\");\n\n assertMetrics(\"significance:0.3333\",\"a b c\",\"a\");\n assertMetrics(\"significance:0.6667\",\"a b c\",\"a b\");\n\n assertMetrics(\"significance:1\", \"a b c%0.2\",\"a b c\"); // Best\n assertMetrics(\"significance:0.75\",\"a b c%0.2\",\"b c\"); // Middle\n assertMetrics(\"significance:0.5\", \"a b c%0.2\",\"a b\"); // Worst\n\n assertMetrics(\"significance:1\",\"a%0.3 b c%0.2\",\"a b c\"); // Best too\n\n assertMetrics(\"significance:1\", \"a b c%0.05\",\"a b c\"); // Best\n assertMetrics(\"significance:0.6\",\"a b c%0.05\",\"b c\"); // Worse\n assertMetrics(\"significance:0.4\",\"a b c%0.05\",\"b\"); // Worse\n assertMetrics(\"significance:0.2\",\"a b c%0.05\",\"c\"); // Worst\n assertMetrics(\"significance:0.8\",\"a b c%0.05\",\"a b\"); // Middle\n\n assertMetrics(\"significance:1\", \"a b c%0\",\"a b c\"); // Best\n assertMetrics(\"significance:0.5\",\"a b c%0\",\"b c\"); // Worst\n assertMetrics(\"significance:1\", \"a b c%0\",\"a b\"); // As good as best\n assertMetrics(\"significance:0\", \"a b c%0\",\"c\"); // No contribution\n\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"a b\");\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"\");\n\n // The query also has other terms having a total significance of 0.3\n // so we add a significance parameter which is the sum of the significances of this query terms + 0.3\n assertMetrics(\"significance:0.25\", \"a\",\"a\",0.4f);\n assertMetrics(\"significance:0\", \"y\",\"a\",0.4f);\n assertMetrics(\"significance:0.1667\",\"a a a\",\"a\",0.6f);\n assertMetrics(\"significance:0.25\", \"a\",\"a a a\",0.4f);\n assertMetrics(\"significance:0.5\", \"a b c\",\"a b c\",0.6f);\n assertMetrics(\"significance:0.5\", \"a b c\",\"x x a b x a x c x x a b x c c x\",0.6f);\n\n assertMetrics(\"significance:0.1667\",\"a b c\",\"a\",0.6f);\n assertMetrics(\"significance:0.3333\",\"a b c\",\"a b\",0.6f);\n\n assertMetrics(\"significance:0.5714\",\"a b c%0.2\",\"a b c\",0.7f); // Best\n assertMetrics(\"significance:0.4286\",\"a b c%0.2\",\"b c\",0.7f); // Middle\n assertMetrics(\"significance:0.2857\",\"a b c%0.2\",\"a b\",0.7f); // Worst\n\n assertMetrics(\"significance:0.6667\",\"a%0.3 b c%0.2\",\"a b c\",0.9f); // Better than best\n\n assertMetrics(\"significance:0.4545\",\"a b c%0.05\",\"a b c\",0.55f); // Best\n assertMetrics(\"significance:0.2727\",\"a b c%0.05\",\"b c\",0.55f); // Worse\n assertMetrics(\"significance:0.1818\",\"a b c%0.05\",\"b\",0.55f); // Worse\n assertMetrics(\"significance:0.0909\",\"a b c%0.05\",\"c\",0.55f); // Worst\n assertMetrics(\"significance:0.3636\",\"a b c%0.05\",\"a b\",0.55f); // Middle\n\n assertMetrics(\"significance:0.4\",\"a b c%0\",\"a b c\",0.5f); // Best\n assertMetrics(\"significance:0.2\",\"a b c%0\",\"b c\",0.5f); // Worst\n assertMetrics(\"significance:0.4\",\"a b c%0\",\"a b\",0.5f); // As good as best\n assertMetrics(\"significance:0\", \"a b c%0\",\"c\",0.5f); // No contribution\n\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"a b\",0.3f);\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"\",0.3f);\n }", "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 }", "@Test\n public void testMultipleLabelsWithOrOperatorCriteria() throws Exception {\n JobQueryCriteria<TitusTaskState, TitusJobType> query = queryBuilder.withLabels(\n expectedLabels().with(\"labelA\").with(\"labelB\").build()\n ).withLabelsAndOp(false).build();\n\n assertThat(JobQueryCriteriaEvaluator.matches(job, query)).isTrue();\n\n // One of the labels is missing\n JobQueryCriteria<TitusTaskState, TitusJobType> query2 = queryBuilder.withLabels(\n expectedLabels().with(\"labelB\").with(\"missing_label\").build()\n ).withLabelsAndOp(false).build();\n\n assertThat(JobQueryCriteriaEvaluator.matches(job, query2)).isTrue();\n }", "private int scoreAuthorMatch(int tag1, int tag2)\n {\n // If they're exactly equal, great.\n if (tag1 == tag2)\n return 100;\n \n // Don't do prefix scanning on short titles.\n String str1 = data.tags.getString(tag1);\n String str2 = data.tags.getString(tag2);\n if (str1.length() < 5 || str2.length() < 5)\n return 0;\n \n // If either is a prefix of the other, we have a match.\n if (str1.startsWith(str2) || str2.startsWith(str1))\n return 100;\n \n // All other cases: fail for now at least.\n return 0;\n }", "private void updateScoreRatios(IGame game, boolean addToTotal) {\n int player1Score = getScore(game, game.getPlayer1());\n int player2Score = getScore(game, game.getPlayer2());\n int difference = Math.abs(player1Score - player2Score);\n\n IPlayer player1 = game.getPlayer1();\n IPlayer player2 = game.getPlayer2();\n\n logger.info(player1 + \" has scored \" + player1Score + \" in total\");\n logger.info(player2 + \" has scored \" + player2Score + \" in total\");\n\n if (player1Score > player2Score) {\n\n if (addToTotal) {\n player1.setScoreRatio(player1.getScoreRatio() + difference);\n player2.setScoreRatio(player2.getScoreRatio() - difference);\n logger.info(player1 + \" +\" + difference + \" = \"\n + player1.getScoreRatio());\n logger.info(player2 + \" -\" + difference + \" = \"\n + player2.getScoreRatio());\n } else {\n logger.info(\"Resetting scores\");\n player2.setScoreRatio(player2.getScoreRatio() + difference);\n player1.setScoreRatio(player1.getScoreRatio() - difference);\n\n logger.info(player2 + \" +\" + difference + \" = \"\n + player2.getScoreRatio());\n logger.info(player1 + \" -\" + difference + \" = \"\n + player1.getScoreRatio());\n }\n\n } else if (player2Score > player1Score) {\n if (addToTotal) {\n player2.setScoreRatio(player2.getScoreRatio() + difference);\n player1.setScoreRatio(player1.getScoreRatio() - difference);\n\n logger.info(player2 + \" +\" + difference + \" = \"\n + player2.getScoreRatio());\n logger.info(player1 + \" -\" + difference + \" = \"\n + player1.getScoreRatio());\n } else {\n logger.info(\"Resetting scores\");\n player1.setScoreRatio(player1.getScoreRatio() + difference);\n player2.setScoreRatio(player2.getScoreRatio() - difference);\n\n logger.info(player1 + \" +\" + difference + \" = \"\n + player1.getScoreRatio());\n logger.info(player2 + \" -\" + difference + \" = \"\n + player2.getScoreRatio());\n }\n }\n }", "public BooleanChoiceCalculation(\n\t\t\tProp<Boolean> choice,\n\t\t\tProp<? extends V> first,\n\t\t\tProp<? extends V> second) {\n\t\t\n\t\tthis.choice = choice;\n\t\tthis.first = first;\n\t\tthis.second = second;\n\t\t\n\t\tIdentityHashSet<Changeable> sourcesM = new IdentityHashSet<Changeable>();\n\t\tsourcesM.add(choice);\n\t\tsourcesM.add(first);\n\t\tsourcesM.add(second);\n\t\tsources = Collections.unmodifiableSet(sourcesM);\n\t}", "@Override\n\t\tpublic int compare(PerformanceInfo o1, PerformanceInfo o2) {\n\t\t\treturn 1;\n\t\t}", "static void sortAndCalculateTime(int[] A, int[] B) {\n\t\t// A random integer in the range 0 to 1\n\t\tint sortNum = (int)(Math.random() * 2);\n\t\t\n\t\t// if sortNum is 0 the Insertion method is used, otherwise the Selection one\n\t\tif(sortNum == 0) {\n\t\t\t// Take the initial time\n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\t// sort the A array with Insertion method\n\t\t\tinsertionSort(A);\n\t\t\t// Calculate how much time has passed\n\t\t\tlong runTime = (System.currentTimeMillis() - startTime);\n\t\t\tSystem.out.println(\"Time in millisecond to sort array with insertionSort(): \" + runTime);\n\t\t} else {\n\t\t\t// Take the initial time\n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\t// sort the A array with Selection method\n\t\t\tselectionSort(A);\n\t\t\t// Calculate how much time has passed\n\t\t\tlong runTime = (System.currentTimeMillis() - startTime);\n\t\t\tSystem.out.println(\"Time in millisecond to sort array with selectionSort(): \" + runTime);\n\t\t}\n\t\t\n\t\t// Take the initial time\n\t\tlong startTime = System.currentTimeMillis();\n\t\t// sort the B array with Arrays.sort() method\n\t\tArrays.sort(B);\n\t\t// Calculate how much time has passed\n\t\tlong runTime = (System.currentTimeMillis() - startTime);\n\t\tSystem.out.println(\"Time in millisecond to sort array with Arrays.sort(): \" + runTime);\n\t}", "public int computeTN(Label classLabel){\n\n\t\t/*\n\t\t * TODO: optimize this loggic\n\t\t */\n\t\t//count the totla number of predictions\n\t\tint total = sumAll();\n\n\n\n\t\tint tp = this.computeTP(classLabel);\n\t\tint fp = this.computeFP(classLabel);\n\t\tint fn = this.computeFN(classLabel);\n\n\t\treturn total - tp - fp - fn;\n\t}", "protected final void calcScore()\n {\n\n m_score = SCORE_OTHER;\n\n if (null == m_targetString)\n calcTargetString();\n }", "public void setReportBothBestHitsForTD(boolean reportBothBestHitsForTD) {\r\n this.reportBothBestHitsForTD = reportBothBestHitsForTD;\r\n }", "@Override\n public int compare(Student s1, Student s2) {\n return (int)(1000*(s2.getGPA()-s1.getGPA()));\n }", "public double tTest(double m1, double m2, double v1, double v2, double n1, double n2) throws MaxCountExceededException, NotStrictlyPositiveException {\r\n return 2.0d * new TDistribution((RandomGenerator) null, mo3926df(v1, v2, n1, n2)).cumulativeProbability(-FastMath.abs(mo3938t(m1, m2, v1, v2, n1, n2)));\r\n }", "public void compare(String name1, String name2) {\n\t\tscore = 0.0f;\n\t\treason = \"\";\n\t\t\n\t\tNameInfo name1Info = new NameInfo(name1);\n\t\tNameInfo name2Info = new NameInfo(name2);\n\t\t\n\t\tString type1 = name1Info.getType();\n\t\tString type2 = name2Info.getType();\n\t\t\n\t\t// If enforced types are different and neither is generic\n\t\tif (!type1.equals(NameInfo.GENERIC_TYPE) && !type2.equals(NameInfo.GENERIC_TYPE) && !type2.equals(type1)) {\n\t\t\tscore = 0.0f;\n\t\t\tscoreShingle = 0.0f;\n\t\t\treason = \"Types \" + type1 + \" and \" + type2 + \" cannot be compared\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfixType(name1Info, name2Info);\n\t\t\n\t\ttype1 = name1Info.getType();\n\t\ttype2 = name2Info.getType();\n\t\t\n\t\tif (!type1.equals(NameInfo.GENERIC_TYPE) && !type2.equals(NameInfo.GENERIC_TYPE) && !type2.equals(type1)) {\n\t\t\tscore = 0.0f;\n\t\t\tscoreShingle = 0.0f;\n\t\t\treason = \"Types \" + type1 + \" and \" + type2 + \" cannot be compared\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint flag = 0;\n\t\t\n\t\tif (type1.equals(\"PER\") && type1.equals(type2))\n\t\t\tflag = 1;\n\t\telse if (type1.equals(\"LOC\") && type1.equals(type2))\n\t\t\tflag = 2;\n\t\telse if (type1.equals(\"ORG\") && type1.equals(type2))\n\t\t\tflag = 3;\n\t\telse if (type1.equals(\"GEN\") && type1.equals(type2))\n\t\t\tflag = 4;\n\t\telse\n\t\t\tflag = 5;\n\t\t\n\t\tscoring(name1Info, name2Info, flag);\n\t}", "public SimilarityScore sim(int eq1, int eq2);", "private double calculateDistance(Example first, Example second) {\n\t\tdouble distance = 0;\n\t\tfor (Attribute attribute : first.getAttributes()) {\n\t\t\tdouble diff = first.getValue(attribute) - second.getValue(attribute);\n\t\t\tdistance += diff * diff;\n\t\t}\n\t\treturn Math.sqrt(distance);\n\t}", "private void evaluationLogic() {\n // setup for logic:\n // if distToClosestEstimate[i][0] is smaller than threshold, we have a Tp\n // if distToClosestEstimate[i][0] is larger than threshold, we have a Fn\n // all estimatedFeatures that are not assigned Tp are therefore Fp\n for (int i = 0; i < groundTruthInstant.size(); ++i) {\n if (distToClosestEstimate[i][0] < truePositiveThreshold) {\n ++truePositiveCount;\n int assignedEstimatedFeature = (int) distToClosestEstimate[i][1];\n assignedEstimatedFeatures[assignedEstimatedFeature] = true;\n } else\n ++falseNegativeCount;\n }\n for (int i = 0; i < estimatedInstant.size(); ++i)\n if (!assignedEstimatedFeatures[i])\n ++falsePositiveCount;\n }", "public int compare(Photograph a, Photograph b) {\n int returnVal = a.getCaption().compareTo(b.getCaption());\n if (returnVal != 0) {\n return returnVal;\n }\n returnVal = b.getRating() - a.getRating();\n return returnVal; \n }", "public Long metricValue() {\n\t\t// Keep a list free from redundant subjects, that is with all its unique\n\t\t// elements\n\t\tList<ComparableSubject> lstUniqueSubjects = new ArrayList<ComparableSubject>();\n\t\tboolean isCurSubjectUnique;\n\t\tlong countCompared = 0;\n\t\tint mapSize = pMapSubjects.size();\n\t\tlogger.debug(\"Starting metric value computation, with \" + mapSize + \"instances...\");\n\n\t\t// int i = 0;\n\t\t// Compare each of the subjects with the ones already recognized as unique...\n\t\tfor (ComparableSubject curSubject : pMapSubjects.values()) {\n\t\t\tisCurSubjectUnique = true;\n\t\t\t// i++;\n\t\t\t// int z = 0;\n\t\t\tfor (ComparableSubject curUniqueSubject : lstUniqueSubjects) {\n\t\t\t\t// and if the subject currently examined is equivalent to one of the existing\n\t\t\t\t// unique subjects, do not regard it as unique, continue with the next one\n\t\t\t\tif (curSubject.isEquivalentTo(curUniqueSubject)) {\n\t\t\t\t\tisCurSubjectUnique = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// z++;\n\t\t\t\t// if ((z % 10000) == 0) System.out.println(\"compared \"+i + \"/\" + z);\n\t\t\t}\n\n\t\t\t// if ((i % 1000 == 0)) System.out.println(\"compared \"+i);\n\n\t\t\t// Finally, if the current subject is not equivalent to any of\n\t\t\t// the existing unique subjects, add it as unique\n\t\t\tif (isCurSubjectUnique) {\n\t\t\t\tlstUniqueSubjects.add(curSubject);\n\t\t\t}\n\n\t\t\tcountCompared++;\n\t\t\tif ((countCompared % 50000) == 0) {\n\t\t\t\tlogger.debug(\"Estimated value with \" + countCompared + \" compared instances: \"\n\t\t\t\t\t\t+ (((double) lstUniqueSubjects.size()) / ((double) mapSize)));\n\t\t\t}\n\t\t}\n\n\t\t// Compute metric value\n\t\t// long metricValue = ((long)lstUniqueSubjects.size()) /\n\t\t// ((long)pMapSubjects.size());\n\t\tlong metricValue = (((long) pMapSubjects.size()) > 0)\n\t\t\t\t? ((long) lstUniqueSubjects.size()) / ((long) pMapSubjects.size())\n\t\t\t\t: 0;\n\t\t// If any subject is equivalent to another, it will not be part of the list of\n\t\t// unique subjects, then\n\t\t// the size of this list is the \"Count of Unique Subjects\" required to calculate\n\t\t// the metric\n\t\treturn metricValue;\n\t}", "private Pair<String, Double> compare(String[] usernames, Bitmap[] sourceBmps, Bitmap targetBmp) {\n // Convert source and target bitmaps into Mat\n Mat target = toGrayMat(targetBmp);\n\n\n FaceRecognizer model = ((GitZucccdApplication) getApplication()).getModel();\n TreeMap<Double, Friend> confidences = new TreeMap<>();\n\n // Loop through the source bitmaps and train the model with them\n for (int i = 0, len = sourceBmps.length; i < len; i++) {\n Bitmap sourceBmp = sourceBmps[i];\n Mat source = toGrayMat(sourceBmp);\n\n List<Mat> src = new ArrayList<>();\n src.add(source);\n\n // Create an array of size (cols) 1 and scalar value i\n Mat labels = new Mat(1, 1, CvType.CV_32SC1, new Scalar(i));\n // Train the model with the source imageid\n\n try {\n model.update(src, labels);\n } catch (Exception e) {\n model.train(src, labels);\n }\n }\n\n // Create variables for model.predict to store into\n int[] predictedLabel = new int[1];\n double[] confidence = new double[1];\n\n model.predict(target, predictedLabel, confidence);\n\n return new Pair<>(usernames[predictedLabel[0]], confidence[0]);\n }", "public int compare(Integer instIndex1, Integer instIndex2) {\n if (probs[instIndex1] > probs[instIndex2]) {\n return 1;\n } else if (probs[instIndex1] < probs[instIndex2]) {\n return -1;\n } else {\n return 0;\n }\n }", "public void testSetPercentToSample()\n {\n double percentToSample = RandomSubVectorThresholdLearner.DEFAULT_PERCENT_TO_SAMPLE;\n RandomSubVectorThresholdLearner<String> instance = new RandomSubVectorThresholdLearner<String>();\n assertEquals(percentToSample, instance.getPercentToSample(), 0.0);\n\n percentToSample = percentToSample / 2.0;\n instance.setPercentToSample(percentToSample);\n assertEquals(percentToSample, instance.getPercentToSample());\n \n percentToSample = 1.0;\n instance.setPercentToSample(percentToSample);\n assertEquals(percentToSample, instance.getPercentToSample());\n\n percentToSample = 0.0;\n instance.setPercentToSample(percentToSample);\n assertEquals(percentToSample, instance.getPercentToSample());\n\n percentToSample = 0.47;\n instance.setPercentToSample(percentToSample);\n assertEquals(percentToSample, instance.getPercentToSample());\n\n boolean exceptionThrown = false;\n try\n {\n instance.setPercentToSample(-0.1);\n }\n catch (IllegalArgumentException e)\n {\n exceptionThrown = true;\n }\n finally\n {\n assertTrue(exceptionThrown);\n }\n assertEquals(percentToSample, instance.getPercentToSample());\n\n exceptionThrown = false;\n try\n {\n instance.setPercentToSample(1.1);\n }\n catch (IllegalArgumentException e)\n {\n exceptionThrown = true;\n }\n finally\n {\n assertTrue(exceptionThrown);\n }\n assertEquals(percentToSample, instance.getPercentToSample());\n }", "public static int score(String first, String second) {\n Set<String> s1 = splitIntoBigrams(first);\n Set<String> s2 = splitIntoBigrams(second);\n\n // Get the number of elements in each set.\n int n1 = s1.size();\n int n2 = s2.size();\n\n // Find the intersection, and get the number of elements in that set.\n s1.retainAll(s2);\n int nt = s1.size();\n\n\n // The coefficient is:\n //\n // 2 ∙ | s1 ⋂ s2 |\n // D = ----------------------\n // | s1 | + | s2 |\n //\n double out = (2.0 * (double)nt) / ((double)(n1 + n2));\n out = (out + scoreReverse(first, second)) / 2;\n return (int)(Math.abs(out - 1) * 10);\n\n }", "@AbstractCustomGlobal.GlobalMethod(menuText=\"Set Threshold Probability\")\n public void setThreshold() {\n if(Tools.getGlobalTime()!=0){\n JOptionPane.showMessageDialog(null, \"You can change this probability only when the simulation start\",\"Alert\", JOptionPane.INFORMATION_MESSAGE);\n return;\n }\n String answer = JOptionPane.showInputDialog(null, \"Set the probability that a node can be selected to run.\");\n // Show an information message\n try{\n double k = Double.parseDouble(answer);\n Iterator<Node> it = Tools.getNodeList().iterator();\n while(it.hasNext()){\n Node n = it.next();\n if(n.getClass() == MSNode.class){\n MSNode n1 = (MSNode)n;\n n1.setThresholdProbability(k);\n }\n if(n.getClass() == MS2Node.class){\n MS2Node n1 = (MS2Node)n;\n n1.setThresholdProbability(k);\n }\n }\n JOptionPane.showMessageDialog(null, \"Well done you have set this value:\"+k,\"Notice\", JOptionPane.INFORMATION_MESSAGE);\n }catch(NumberFormatException e){\n JOptionPane.showMessageDialog(null, \"You must insert a valid double \", \"Alert\", JOptionPane.INFORMATION_MESSAGE);\n }\n }", "private void scoring(NameInfo name1Info, NameInfo name2Info, int flag) {\n\t\tString name1 = name1Info.getName();\n\t\tString name2 = name2Info.getName();\n\t\tString type1 = name1Info.getType();\n\t\tString type2 = name2Info.getType();\n\t\tif (name1.length() == 0 || name2.length() == 0) {\n\t\t\tscore = 0.0f;\n\t\t\tscoreShingle = 0.0f;\n\t\t\treason = \"There is an empty name.\";\n\t\t\treturn;\n\t\t}\n\t\tswitch (flag) {\n\t\t\n\t\tcase 1: // PER\n\t\t\tscoreShingle = (float)LSHUtils.dice(name1, name2);\n\t\t\tfloat scorePER = getPERScore(name1Info, name2Info);\n\t\t\treason = \"Type: \" + name1Info.getType() + \". metric\";\n\t\t\tif (score < scorePER) {\n\t\t\t\tscore = scorePER;\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 2: // LOC\n\t\t\tscoreShingle = (float)LSHUtils.dice(name1, name2);\n\t\t\tscore = shortMan.scoring(name1, name2);\n\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Shortcut.\";\n\t\t\tfloat countryLangScore = countryMan.scoring(name1, name2);\n\t\t\tif (score < countryLangScore) {\n\t\t\t\tscore = countryLangScore;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Country-Language list.\";\n\t\t\t\tif (score < scoreShingle) {\n\t\t\t\t\tscore = scoreShingle;\n\t\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by Shingling\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 3: // ORG\n\t\t\tscoreShingle = (float)LSHUtils.dice(name1, name2);\n\t\t\tscore = acroMan.scoring(name1Info, name2Info);\n\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Acronym.\";\n\t\t\tif (scoreShingle > score) {\n\t\t\t\tscore = scoreShingle;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by Shingling\";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 4: // GEN\n\t\t\tscoreShingle = (float)LSHUtils.dice(name1, name2);\n\t\t\tfloat scorePer = getPERScore(name1Info, name2Info);\n\t\t\tfloat scoreShort = shortMan.scoring(name1, name2);\n\t\t\tfloat scoreCL = countryMan.scoring(name1, name2);\n\t\t\tfloat scoreAcro = acroMan.scoring(name1Info, name2Info);\n\t\t\tif (scoreAcro > score) {\n\t\t\t\tscore = scoreAcro;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Acronym.\";\n\t\t\t}\n\t\t\tif (scoreCL > score) {\n\t\t\t\tscore = scoreCL;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Country-Language list.\";\n\t\t\t}\n\t\t\tif (scoreShort > score) {\n\t\t\t\tscore = scoreShort;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Shortcut.\";\n\t\t\t}\n\t\t\tif (scorePer > score) {\n\t\t\t\tscore = scorePer;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric\";\n\t\t\t}\n\t\t\tif (scoreShingle > score) {\n\t\t\t\tscore = scoreShingle;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by Shingling\";\n\t\t\t}\n\t\t\tif (acroMan.isSpecificCase()) {\n\t\t\t\tscore = scoreAcro;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Acronym.\";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 5: // Two different types\n\t\t\tif (type1.equals(\"PER\") || type2.equals(\"PER\")) {\n\t\t\t\tscore = 0.0f;\n\t\t\t\treason = \"Type: \" + type1 + \". and \" + type2 + \". cannot be compared\";\n\t\t\t} else if (type1.equals(\"LOC\") || type2.equals(\"LOC\")) {\n\t\t\t\tscore = shortMan.scoring(name1, name2);\n\t\t\t\treason = \"Type: LOC. metric; Scored by JaroWinkler metric with Shortcut.\";\n\t\t\t} else if (type1.equals(\"ORG\") || type2.equals(\"ORG\")) {\n\t\t\t\tfloat orgScore = acroMan.scoring(name1Info, name2Info);\n\t\t\t\tif (score < orgScore) {\n\t\t\t\t\tscore = orgScore;\n\t\t\t\t\treason = \"Type: ORG. metric; Scored by JaroWinkler metric with Acronym.\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tscore = 0.0f;\n\t\t\t\treason = \"Type: \" + type1 + \". and \" + type2 + \". cannot be compared\";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tscore = 0.0f;\n\t\t\treason = \"#######SHOULD NOT HAPPEN#######\";\n\t\t}\n\t\tif (name1.equalsIgnoreCase(name2))\n\t\t\tscore = 1.0f;\n\t\tif (!name1Info.getType().equals(\"PER\") && !name2Info.getType().equals(\"PER\"))\n\t\t\thandleLargeRatio(name1, name2);\n\t}", "int getPercentageHeated();", "public void testCompare5() throws Exception {\r\n // smaller prizes\r\n ComponentCompetitionSituation situation1 = new ComponentCompetitionSituation();\r\n situation1.setPostingDate(new Date());\r\n situation1.setEndDate(new Date(situation1.getPostingDate().getTime() + 100000));\r\n situation1.setPrize(100D);\r\n\r\n // longer prizes\r\n ComponentCompetitionSituation situation2 = new ComponentCompetitionSituation();\r\n situation2.setPostingDate(new Date());\r\n situation2.setEndDate(new Date(situation2.getPostingDate().getTime() + 100000));\r\n situation2.setPrize(200D);\r\n\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation1, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation2, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // smaller prizes < longer prizes\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "@Test\n public void DataSmoothTest11() {\n\t LinkedList<Double> runtimes1 = D1.dataSmooth(shows2);\n\t \n\t for(int i = 0; i < runtimes1.size(); i++) {\n\t\t assertEquals(runtimes1.get(i), showResults2.get(i), 0.001);\n\t }\n }", "@Test\n public void scopeOfRatingsIsCoveringTp() {\n LocalDateTime firstTime = LocalDateTime.of(2017, Month.JANUARY, 1, 0, 0);\n\n //start with creating tp (proportional), a little bit ahead\n // |------|\n TimePeriod tp = new TimePeriod(firstTime.plusHours(1), firstTime.plusHours(8));\n\n\n /**match tp with ratings and chunkEnd so we have (proportional scale)\n * ratings |o---------||\n * tp: |-------|\n *\n */\n ScoreTime rStart = new ScoreTime(firstTime, 6);\n LocalDateTime chunkEnd = firstTime.plusHours(10); //=> several hours after tp.end\n\n //this is the method we are testing\n double[] avgscoreAndWeight = RatingTime.calcAvgAndWeight(tp, Arrays.asList(rStart),\n chunkEnd);\n assertEquals(6.0, avgscoreAndWeight[0]);\n\n /* weight should equal durationOfRatingsInScopeOfTp/tp.duration\n ratingsInScopeOfTp = 7 hours\n tp.duration = 7 hours.\n weight should be 7/7 = 1.0\n */\n\n assertEquals(1.0, avgscoreAndWeight[1], 0.01);\n }", "public void evaluateUniformDistribution(String label) {\r\n // subtract one point for each card of same suit next to a card one away in rank\r\n // subtract two points for each run of two\r\n // three points for each run of three, etc.\r\n // add no points for two adjacent cards of same suit but not of sequential rank\r\n // add one point for two adjacent cards of different suit and same rank\r\n // add two points for two adjacent cards of different suit and sequential rank\r\n // add five points for two adjacent cards of different suit and different rank\r\n int score = 0;\r\n Card c = cards.get(0);\r\n Card d = null;\r\n boolean run = false;\r\n int runCount = 0;\r\n int diff = 0;\r\n for (int i = 1; i < cards.size(); i++) {\r\n d = cards.get(i);\r\n diff = c.getRank() - d.getRank();\r\n if (c.getSuit() == d.getSuit()) {\r\n // same suit\r\n if (diff == 1) { // sequential rank\r\n run = true;\r\n score -= (1 + (runCount*2));\r\n runCount++;\r\n }\r\n } else {\r\n // different suit\r\n if (diff == 0) { // same rank\r\n score++;\r\n } else if (diff == 1) { // sequential rank\r\n score += 2;\r\n } else {\r\n score += 5;\r\n }\r\n }\r\n c = d;\r\n }\r\n System.out.println(label + \" score: \" + score);\r\n }", "private int calculateTrendingScore( long[] counts, Context context ) {\n\t\t\tint score = 0;\n\t\t\t\n\t\t\t// Pull the total count of all ngrams for each of the two time periods\n\t\t\tlong totalCountTime0 = Long.parseLong( context.getConfiguration().get(\"total0\") );\n\t\t\tlong totalCountTime1 = Long.parseLong( context.getConfiguration().get(\"total1\") );\n\n\t\t\t// Calculate the percentage of all ngrams our counters represent\n\t\t\tfloat percentTime0 = counts[0] / (float) totalCountTime0;\n\t\t\tfloat percentTime1 = counts[1] / (float) totalCountTime1;\n\t\t\t\n\t\t\t// If the second time period doesn't have a \"sufficient\" count, we won't even\n\t\t\t// bother generating a score to store. this will save space by helping ignore\n\t\t\t// ngrams that have too low counts to be \"trending\"\n\t\t\tif ( percentTime1 > .00002 ) {\n\t\t\t\t// multiply by 100 to shift the decimal before casting\n\t\t\t\tscore = (int)((percentTime1 / percentTime0) * 100f);\n\t\t\t}\n\t\t\t\n\t\t\treturn score;\n\t\t}", "public int compare(Object nodes1, Object nodes2) {\r\n\t\tdouble w1 = 0.0;\r\n\t\tIterator it = ((Set)nodes1).iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tDouble v = ((Node) it.next()).getWeightValueUnsynchronized(\"value\");\r\n\t\t\tw1 += (v==null ? 1.0 : v.doubleValue());\r\n\t\t}\r\n\t\tdouble w2 = 0.0;\r\n\t\tit = ((Set)nodes2).iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tDouble v = ((Node) it.next()).getWeightValueUnsynchronized(\"value\");\r\n\t\t\tw2 += (v==null ? 1.0 : v.doubleValue());\r\n\t\t}\r\n\t\tint res = Double.compare(w2, w1);\r\n\t\tif (res==0) { // oops, must figure out how they differ\r\n\t\t\tSet ns1 = (Set) nodes1;\r\n\t\t\tSet ns2 = (Set) nodes2;\r\n\t\t\tint ns1sz = ns1.size();\r\n\t\t\tint ns2sz = ns2.size();\r\n\t\t\tif (ns1sz>ns2sz) return -1; // more nodes, the better\r\n\t\t\telse if (ns1sz<ns2sz) return 1;\r\n\t\t\t// go through the *very* expensive nodes discrimination\r\n\t\t\tIterator it1 = ns1.iterator();\r\n\t\t\tIntSet nis1 = new IntSet();\r\n\t\t\twhile (it1.hasNext()) {\r\n\t\t\t\tNode n = (Node) it1.next();\r\n\t\t\t\tnis1.add(new Integer(n.getId()));\r\n\t\t\t}\r\n\t\t\tIterator it2 = ns2.iterator();\r\n\t\t\tIntSet nis2 = new IntSet();\r\n\t\t\twhile (it2.hasNext()) {\r\n\t\t\t\tNode n = (Node) it2.next();\r\n\t\t\t\tnis2.add(new Integer(n.getId()));\r\n\t\t\t}\r\n\t\t\treturn nis2.compareTo(nis1);\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "double countMisclassifications(Matrix features, Matrix labels)\r\n {\r\n if(features.rows() != labels.rows())\r\n throw new IllegalArgumentException(\"Illegal Argument Exception Created!!\");\r\n\tdouble mis = 0;\r\n for(int i = 0; i < features.rows(); i++)\r\n\t{\r\n Vec feat = features.row(i);\r\n Vec pred = predict(feat);\r\n Vec lab = labels.row(i);\r\n\r\n for(int j = 0; j < lab.size(); j++){\r\n \r\n if(pred.get(j) != lab.get(j))\r\n mis++;\r\n }\r\n\t}\r\n // System.out.println(\"mis \" + mis);\r\n // System.out.println(\"rowcol \" + (labels.rows()*labels.cols()));\r\n\r\n double misclassifictionRate = 100.0*(mis/(labels.rows()*labels.cols()));\r\n return misclassifictionRate;\r\n }", "@Test \n public void compareFunctionalEquals() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p1, p1);\n \n assertEquals(0, a);\n }" ]
[ "0.67859405", "0.6193166", "0.6034328", "0.58638054", "0.55303705", "0.5498047", "0.53819484", "0.5367287", "0.5258237", "0.52009875", "0.51538837", "0.51496834", "0.51197684", "0.5100851", "0.5085184", "0.5048313", "0.503383", "0.50103027", "0.49998733", "0.4943711", "0.49172953", "0.49002466", "0.4887684", "0.4886979", "0.48763996", "0.48559755", "0.4847295", "0.48456657", "0.4844608", "0.48425734", "0.4839179", "0.4837406", "0.48335332", "0.48320878", "0.48222366", "0.48121998", "0.4800349", "0.4790005", "0.47751525", "0.47750828", "0.4766099", "0.47601706", "0.47593358", "0.47404093", "0.47376218", "0.47288632", "0.47247347", "0.47243518", "0.4720626", "0.47195375", "0.47194713", "0.47140235", "0.47063407", "0.47015733", "0.4692836", "0.46864283", "0.46776554", "0.467094", "0.46689302", "0.46645916", "0.46605942", "0.46540144", "0.46484274", "0.46455505", "0.46246174", "0.46243218", "0.46224293", "0.461677", "0.46144018", "0.45972756", "0.45814496", "0.45677495", "0.45659527", "0.45520458", "0.45455098", "0.45453417", "0.45411548", "0.4539562", "0.4538868", "0.45366448", "0.45337504", "0.45333672", "0.45249498", "0.4523759", "0.4500768", "0.45000595", "0.44957328", "0.44945452", "0.4493397", "0.4490839", "0.4490304", "0.4490222", "0.4487183", "0.44862407", "0.44796753", "0.44793987", "0.44741836", "0.44707975", "0.4468863", "0.44685492" ]
0.61733246
2
Estimates the probability that a comparison between two time selectors holds Both selectors are described by the statistics that are relevant for them (one statistic for both lhs and rhs).
private double estimateTimeSelectorComparison(TemporalElementStats statsLhs, TimeSelector.TimeField fieldLhs, Comparator comparator, TemporalElementStats statsRhs, TimeSelector.TimeField fieldRhs) { double sum = 0.; // first, compare without considering Long.MIN values, TemporalElement.DEFAULT_TIME_TO values double[] lhs = statsLhs.getTemporalPropertyStats(fieldLhs); double[] rhs = statsRhs.getTemporalPropertyStats(fieldRhs); double lhsMean = lhs[0]; double lhsVariance = lhs[1]; double lhsExtreme = lhs[2]; double rhsMean = rhs[0]; double rhsVariance = rhs[1]; double rhsExtreme = rhs[2]; // probability that both lhs and rhs not TemporalElement.DEFAULT_TIME_FROM or // TemporalElement.DEFAULT_TIME_TO double probBothNotExtreme = (1 - lhsExtreme) * (1 - rhsExtreme); // distribution for difference between lhs and rhs values NormalDistribution diffDist = new NormalDistribution(lhsMean - rhsMean, Math.max(lhsVariance + rhsVariance, VERY_LOW_PROB)); // P(lhs < rhs) double probNotExtremeLTE = diffDist.cumulativeProbability(0.); // P(lhs = rhs) double probNotExtremeEQ = diffDist.probability(0.); // P(lhs comp rhs) double probCompNotExtreme = 0.; if (comparator == LTE) { probCompNotExtreme = probNotExtremeLTE; } else if (comparator == LT) { probCompNotExtreme = probNotExtremeLTE - probNotExtremeEQ; } else if (comparator == EQ) { probCompNotExtreme = probNotExtremeEQ; } else if (comparator == NEQ) { probCompNotExtreme = 1. - probNotExtremeEQ; } else if (comparator == GTE) { probCompNotExtreme = 1. - (probNotExtremeLTE - probNotExtremeEQ); } else if (comparator == GT) { probCompNotExtreme = 1. - probNotExtremeLTE; } sum += probBothNotExtreme * probCompNotExtreme; // also consider cases in which one or both sides have extreme values double probCompExtreme = 0.; // lhs from if (fieldLhs == TX_FROM || fieldLhs == VAL_FROM) { // rhs from if (fieldRhs == TX_FROM || fieldRhs == VAL_FROM) { if (comparator == EQ) { probCompExtreme = lhsExtreme * rhsExtreme; } else if (comparator == NEQ) { probCompExtreme = (1 - lhsExtreme) * rhsExtreme + lhsExtreme * (1 - rhsExtreme); } else if (comparator == LTE) { probCompExtreme = lhsExtreme; } else if (comparator == LT) { probCompExtreme = lhsExtreme * (1 - rhsExtreme); } else if (comparator == GTE) { probCompExtreme = rhsExtreme; } else if (comparator == GT) { probCompExtreme = (1 - lhsExtreme) * rhsExtreme; } } else { // rhs to if (comparator == NEQ || comparator == LT || comparator == LTE) { probCompExtreme = lhsExtreme * rhsExtreme + (1 - lhsExtreme) * rhsExtreme + lhsExtreme * (1 - rhsExtreme); } //for all other comparators 0, if lhs and/or rhs extreme } } else { // lhs to // rhs from if (fieldRhs == TX_FROM || fieldRhs == VAL_FROM) { if (comparator == NEQ || comparator == GT || comparator == GTE) { probCompExtreme = lhsExtreme * rhsExtreme + (1 - lhsExtreme) * rhsExtreme + lhsExtreme * (1 - rhsExtreme); } // for all other comparators 0, if lhs and/or rhs extreme } else { // rhs to if (comparator == EQ) { probCompExtreme = lhsExtreme * rhsExtreme; } else if (comparator == NEQ) { probCompExtreme = (1 - lhsExtreme) * rhsExtreme + lhsExtreme * (1 - rhsExtreme); } else if (comparator == LTE) { probCompExtreme = rhsExtreme; } else if (comparator == LT) { probCompExtreme = (1 - lhsExtreme) * rhsExtreme; } else if (comparator == GTE) { probCompExtreme = lhsExtreme; } else if (comparator == GT) { probCompExtreme = lhsExtreme * (1 - rhsExtreme); } } } sum += probCompExtreme; return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double estimateTimeSelectorComparison(List<TemporalElementStats> statsLhs,\n TimeSelector.TimeField fieldLhs,\n Comparator comparator, List<TemporalElementStats> statsRhs,\n TimeSelector.TimeField fieldRhs) {\n // count overall number of elements for both sides\n long lhsOverallCount = statsLhs.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(Long::sum)\n .orElse(0L);\n long rhsOverallCount = statsRhs.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(Long::sum)\n .orElse(0L);\n double sum = 0.;\n\n for (TemporalElementStats lhs : statsLhs) {\n double lhsWeight = (double) lhs.getElementCount() / lhsOverallCount;\n for (TemporalElementStats rhs : statsRhs) {\n double rhsWeight = (double) rhs.getElementCount() / rhsOverallCount;\n sum += lhsWeight * rhsWeight *\n estimateTimeSelectorComparison(lhs, fieldLhs, comparator, rhs, fieldRhs);\n }\n }\n return sum;\n }", "@Override\n public double estimateTemporalProb(ElementType type1, Optional<String> label1,\n TimeSelector.TimeField field1, Comparator comp, ElementType type2,\n Optional<String> label2, TimeSelector.TimeField field2) {\n if (comp == EQ) {\n return VERY_LOW_PROB;\n } else if (comp == Comparator.NEQ) {\n return VERY_HIGH_PROB;\n }\n // stats for lhs (can be more than one, if no label is specified)\n List<TemporalElementStats> statsLhs;\n // same for rhs\n List<TemporalElementStats> statsRhs;\n\n // determine relevant statistics for rhs and lhs\n if (!(label1.isPresent())) {\n statsLhs = type1 == ElementType.VERTEX ?\n new ArrayList<>(vertexStats.values()) :\n new ArrayList<>(edgeStats.values());\n } else {\n statsLhs = type1 == ElementType.VERTEX ?\n new ArrayList<>(\n Collections.singletonList(vertexStats.getOrDefault(label1.get(), null))) :\n new ArrayList<>(\n Collections.singletonList(edgeStats.getOrDefault(label1.get(), null)));\n // label not in the DB\n if (statsLhs.get(0) == null) {\n return 0.;\n }\n }\n // same for rhs\n if (!(label2.isPresent())) {\n statsRhs = type2 == ElementType.VERTEX ?\n new ArrayList<>(vertexStats.values()) :\n new ArrayList<>(edgeStats.values());\n } else {\n statsRhs = type2 == ElementType.VERTEX ?\n new ArrayList<>(\n Collections.singletonList(vertexStats.getOrDefault(label2.get(), null))) :\n new ArrayList<>(\n Collections.singletonList(edgeStats.getOrDefault(label2.get(), null)));\n // label not in the DB\n if (statsRhs.get(0) == null) {\n return 0.;\n }\n }\n return estimateTimeSelectorComparison(statsLhs, field1, comp, statsRhs, field2);\n }", "private double estimateCategoricalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Map<PropertyValue, Double>> map1 =\n stats1.getCategoricalSelectivityEstimation();\n Map<String, Map<PropertyValue, Double>> map2 =\n stats2.getCategoricalSelectivityEstimation();\n Map<PropertyValue, Double> propStats1 = map1.getOrDefault(property1, null);\n Map<PropertyValue, Double> propStats2 = map2.getOrDefault(property2, null);\n // property not sampled or not considered\n if (propStats1 == null || propStats2 == null) {\n // property not considered => return 0.5\n if (!isPropertyRelevant(property1) && !isPropertyRelevant(property2)) {\n return 0.5;\n } else {\n // property not sampled => very rare => return very small value\n return 0.0001;\n }\n }\n if (comp == EQ || comp == NEQ) {\n double sum = 0.;\n for (Map.Entry<PropertyValue, Double> entry1 : propStats1.entrySet()) {\n double val1Selectivity = entry1.getValue();\n for (Map.Entry<PropertyValue, Double> entry2 : propStats2.entrySet()) {\n if (entry1.getKey().equals(entry2.getKey())) {\n double val2Selectivity = entry2.getValue();\n sum += val1Selectivity * val2Selectivity;\n }\n }\n }\n return comp == EQ ? sum : 1. - sum;\n } else {\n // shouldn't happen, categorical variables can only be compared with EQ or NEQ\n return 0.;\n }\n }", "private double estimateNumericalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Double[]> map1 = stats1.getNumericalPropertyStatsEstimation();\n Map<String, Double[]> map2 = stats2.getNumericalPropertyStatsEstimation();\n Double[] propStats1 = map1.getOrDefault(property1, null);\n Double[] propStats2 = map2.getOrDefault(property2, null);\n if (propStats1 == null || propStats2 == null) {\n return 0.0001;\n }\n double occurrence = stats1.getNumericalOccurrenceEstimation()\n .getOrDefault(property1, 0.) *\n stats2.getNumericalOccurrenceEstimation().getOrDefault(property2, 0.);\n // assuming both properties are normally distributed,\n // their difference is also normally distributed\n NormalDistribution differenceDist = new NormalDistribution(\n propStats1[0] - propStats2[0],\n Math.max(Math.sqrt(propStats1[1] + propStats2[1]), VERY_LOW_PROB));\n\n if (comp == EQ) {\n return occurrence * differenceDist.density(0.);\n } else if (comp == NEQ) {\n return occurrence * (1. - differenceDist.density(0.));\n } else if (comp == LTE) {\n return occurrence * (differenceDist.cumulativeProbability(0.));\n } else if (comp == LT) {\n return occurrence * (differenceDist.cumulativeProbability(0.) -\n differenceDist.density(0.));\n } else if (comp == GTE) {\n return occurrence * (1. - differenceDist.cumulativeProbability(0.) +\n differenceDist.density(0.));\n } else {\n //GT\n return occurrence * (1. - differenceDist.cumulativeProbability(0.));\n }\n }", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp,\n List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateCategoricalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp, List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateNumericalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "public double matchData() {\n\t\tArrayList<OWLDataProperty> labels1 = getDataProperties(ontology1);\n\t\tArrayList<OWLDataProperty> labels2 = getDataProperties(ontology2);\n\t\tfor (OWLDataProperty lit1 : labels1) {\n\t\t\tfor (OWLDataProperty lit2 : labels2) {\n\t\t\t\tif (LevenshteinDistance.computeLevenshteinDistance(TestAlign.mofidyURI(lit1.toString())\n\t\t\t\t\t\t, TestAlign.mofidyURI(lit2.toString()))>0.8){\n\t\t\t\t\treturn 1.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0.;\n\n\n\t}", "private double distanceEstimate(Node a, Node b){\n return Math.abs(a.getFloor() - b.getFloor()) * FLOOR_COST + distanceBetween(a,b);\n }", "public int compare(Person a, Person b){\n int aWeight = (int)a.getWeight();\n int bWeight = (int)b.getWeight();\n return aWeight - bWeight;\n }", "public void testCompare2() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(0.6D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions below the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "@Override\n protected double compareScoredCriteria(ScoredCriteriaMap wikiScoredCriteria) {\n double[] preferenceScores = ScoredCriteriaMap.unpackScores(wikiScoredCriteria);\n double[] wikiScores = ScoredCriteriaMap.unpackScores(this.getPreferenceScoredCriteriaMap());\n\n // Calculate the sum\n double sum = 0;\n for (int i = 0; i < Criterion.NUMBER_OF; i++) {\n sum = sum + (preferenceScores[i] - wikiScores[i]) * (preferenceScores[i] - wikiScores[i]);\n }\n return (1 / (1 + Math.sqrt(sum)));\n }", "@Override\n public double estimateTemporalProb(ElementType type1, Optional<String> label1,\n TimeSelector.TimeField field1, Comparator comp, Long value) {\n if (comp == EQ) {\n return VERY_LOW_PROB;\n } else if (comp == Comparator.NEQ) {\n return VERY_HIGH_PROB;\n }\n // <, <=, >=, >\n if (!(label1.isPresent())) {\n return estimateTemporalProb(type1, field1, comp, value);\n } else {\n TemporalElementStats elementStats = (type1 == ElementType.VERTEX) ?\n vertexStats.getOrDefault(label1.get(), null) :\n edgeStats.getOrDefault(label1.get(), null);\n // label not in keys\n if (elementStats == null) {\n return VERY_LOW_PROB;\n }\n Binning bins = getBins(elementStats, field1);\n return estimateFromBins(bins, comp, value);\n }\n }", "private double getTverskyScore(Set<String> setOne, Set<String> setTwo) {\n\t\tdouble tverskyScore = 0.0;\n\t\tSet<String> intersectionOfSets = new HashSet<String>(setOne);\n\t\tintersectionOfSets.retainAll(setTwo);\t\t\n\t\t\n\t\tSet<String> differenceOfSets = new HashSet<String>(setOne);\n\t\tdifferenceOfSets.removeAll(setTwo);\n\t\ttverskyScore = (double) intersectionOfSets.size() / (intersectionOfSets.size() + differenceOfSets.size());\n\t\t\n\t\treturn tverskyScore;\n\t}", "@Override\n public double score(Map<BasedMining, Map<BasedMining, RateEvent>> preferences,\n BasedMining item1,\n BasedMining item2) {\n var sharedInnerItems = new ArrayList<BasedMining>();\n\n preferences.get(item1).forEach((innerItem, rateEvent) -> {\n if (preferences.get(item2).get(innerItem) != null) {\n sharedInnerItems.add(innerItem);\n }\n });\n\n// If they have no rating in common, return 0\n if (sharedInnerItems.size() > 0)\n return 0;\n\n// Add up the square of all the differences\n var sumOfSquares = preferences.get(item1).entrySet()\n .stream()\n .filter(entry -> preferences.get(item2).get(entry.getKey()) != null)\n .mapToDouble(entry -> Math.pow((entry.getValue().getRating() - preferences.get(item2).get(entry.getKey()).getRating()), 2.0))\n .sum();\n\n return 1 / (1 + sumOfSquares);\n }", "@Test \n public void compareFunctionalEquals() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p1, p1);\n \n assertEquals(0, a);\n }", "@Override\n public int compareTo(Score other) {\n return (int) (100 * (this.getAsDouble() - other.getAsDouble()));\n }", "@Override\n\t\tpublic int compare(S o1, S o2) {\n\t\t\tif (getProb(o1) > getProb(o2))\n\t\t\t\treturn -1;\n\t\t\tif (getProb(o1) < getProb(o2))\n\t\t\t\treturn 1;\n\t\t\treturn Double.compare(o1.hashCode(), o2.hashCode());\n\t\t}", "public void compareFeatures() {\n computeDistances();\n evaluationLogic();\n // compute recall and precision\n recall = truePositiveCount / (truePositiveCount + falseNegativeCount);\n // avoid division by zero\n float denominator = truePositiveCount + falsePositiveCount;\n precision = denominator == 0 ? 0 : truePositiveCount / denominator;\n }", "static List<Integer> compareTriplets(List<Integer> a, List<Integer> b) {\r\n\t\tList<Integer> val = new ArrayList<>();\r\n\t\tint aScore = 0;\r\n\t\tint bScore = 0;\r\n\t\tfor (int i=0; i<3;i++) {\r\n\t\t\tfor (int j=0;j<3;j++) {\r\n\t\t\t\tif (i==j) {\r\n\t\t\t\t\tint tempA = a.get(i);\r\n\t\t\t\t\tint tempB = b.get(j);\r\n\t\t\t\t\tif (!(1<=tempA && tempA<=100 && 1<=tempB && 1<=tempB)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (tempA<tempB) {\r\n\t\t\t\t\t\tbScore += 1;\r\n\t\t\t\t\t} else if (tempA>tempB) {\r\n\t\t\t\t\t\taScore += 1;\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\tval.add(aScore);\r\n\t\tval.add(bScore);\r\n\t\treturn val;\r\n\t}", "@Override public double stateTransitionWeight(int state1, int state2) {\n return 1 / (1 + benchmark.distance(state1, state2));\n }", "public void testCompare1() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.5D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions above the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "public int compare(Dataset object1, Dataset object2){\n if(object1.getAttributeCount() != candidate.getAttributeCount() ||\n object2.getAttributeCount() != candidate.getAttributeCount()){\n return 0;\n }\n\n double dist1 = 0.0, dist2 = 0.0;\n double tmp1 = 0.0, tmp2 = 0.0;\n\n for(int i = 0; i < candidate.getAttributeCount(); i++){\n if(candidate.getOutputColumnCount() == (i+1)){\n continue;\n }\n\n Attribute ac = candidate.getAttribute(i);\n Attribute a1 = object1.getAttribute(i);\n Attribute a2 = object2.getAttribute(i);\n\n if(ac.getType() == AttributeTypes.TEXT){\n dist1 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a1.getValue());\n dist2 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a2.getValue());\n }else{\n /*\n double acDouble = 0.0;\n double a1Double = 0.0;\n double a2Double = 0.0;\n switch(ac.getType()){\n case INTEGER: acDouble = (double)((Integer)ac.getValue()).intValue(); break;\n case DECIMAL: acDouble = (double)ac.getValue();\n }\n switch(a1.getType()){\n case INTEGER: a1Double = (double)((Integer)a1.getValue()).intValue(); break;\n case DECIMAL: a1Double = (double)a1.getValue();\n }\n switch(a2.getType()){\n case INTEGER: a2Double = (double)((Integer)a2.getValue()).intValue(); break;\n case DECIMAL: a2Double = (double)a2.getValue();\n }*/\n double acDouble = (double)ac.getValue();\n double a1Double = (double)a1.getValue();\n double a2Double = (double)a2.getValue();\n\n tmp1 += Math.pow(a1Double-acDouble, 2);\n tmp2 += Math.pow(a2Double-acDouble, 2);\n }\n }\n\n dist1 += Math.sqrt(tmp1);\n dist2 += Math.sqrt(tmp2);\n\n if (dist1 > dist2) {\n return 1;\n }\n if (dist1 < dist2) {\n return -1;\n }\n return 0;\n }", "private void comparePoints(double[] firstP, double[] secondP) {\n assertEquals(firstP.length, secondP.length);\n\n for(int j=0; j<firstP.length; j++) {\n assertEquals(\"j = \"+j, firstP[j], secondP[j], TOLERANCE);\n }\n }", "@Test\n public void compareFunctionalSmaller() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p2, p1);\n \n assertEquals(1, a);\n }", "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 int compare(Student s1, Student s2) {\n return (int)(1000*(s2.getGPA()-s1.getGPA()));\n }", "public static double RELATIVE_PERCENTAGE_SUPPORT(Feature a, Feature b) {\n double num = 0.0, den = 0.0, dinf, dsup, rat = -1.0;\n int i;\n\n if (!a.type.equals(b.type)) Dataset.perror(\"Feature.class :: not the same class for features\");\n\n if (Feature.IS_CONTINUOUS(a.type)) {\n if ((b.dmax == b.dmin) || (a.dmax <= b.dmin) || (a.dmin >= b.dmax)) return 0.0;\n\n if (a.dmin < b.dmin) dinf = b.dmin;\n else dinf = a.dmin;\n\n if (a.dmax > b.dmax) dsup = b.dmax;\n else dsup = a.dmax;\n\n num = dsup - dinf;\n den = b.dmax - b.dmin;\n } else if (Feature.IS_INTEGER(a.type)) {\n if ((a.imax < b.imin) || (a.imin > b.imax)) return 0.0;\n\n if (a.imin <= b.imin) dinf = (double) b.imin;\n else dinf = (double) a.imin;\n\n if (a.imax >= b.imax) dsup = (double) b.imax;\n else dsup = (double) a.imax;\n\n num = dsup - dinf + 1.0;\n den = ((double) (b.imax - b.imin)) + 1.0;\n } else if (Feature.IS_NOMINAL(a.type)) {\n if (b.modalities.size() == 0) return 0.0;\n else den = (double) b.modalities.size();\n\n num = 0.0;\n for (i = 0; i < a.modalities.size(); i++)\n if (b.modalities.contains((String) a.modalities.elementAt(i))) num += 1.0;\n } else Dataset.perror(\"Feature.class :: feature type unknown\");\n\n rat = num / den;\n if ((rat < 0.0) || (rat > 1.0))\n Dataset.perror(\"Feature.class :: ratio \" + rat + \" not a probability\");\n return rat;\n }", "public void testCompare4() throws Exception {\r\n // timelines shorter than or equal to the target\r\n ComponentCompetitionSituation situation1 = new ComponentCompetitionSituation();\r\n situation1.setPostingDate(new Date());\r\n situation1.setEndDate(new Date(situation1.getPostingDate().getTime() + 1000));\r\n\r\n // timelines longer than the target\r\n ComponentCompetitionSituation situation2 = new ComponentCompetitionSituation();\r\n situation2.setPostingDate(new Date());\r\n situation2.setEndDate(new Date(situation2.getPostingDate().getTime() + 100000));\r\n\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation1, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation2, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // timelines shorter than or equal to the target < timelines longer than the target\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "private double estimateTemporalProb(ElementType type1, TimeSelector.TimeField field1,\n Comparator comp, Long value) {\n double sum = 0.;\n Map<String, TemporalElementStats> stats = type1 == ElementType.VERTEX ?\n vertexStats : edgeStats;\n\n Long overallCount = type1 == ElementType.VERTEX ? vertexCount : edgeCount;\n for (TemporalElementStats elementStat : stats.values()) {\n Binning bins = getBins(elementStat, field1);\n sum += estimateFromBins(bins, comp, value) *\n (elementStat.getElementCount() / (double) overallCount);\n }\n return sum;\n }", "public Double calculateSimilarity(OWLObject a, OWLObject b);", "public static float calcSimilarity(Map<String, Enum> first, Map<String, Enum> second) {\n if (first == null && second == null) return 1f;\n Set<String> allKeys = new HashSet<>();\n\n if (first != null) allKeys.addAll(first.keySet());\n if (second != null) allKeys.addAll(second.keySet());\n\n int normDiv = 0;\n float sum = 0;\n for (String key : allKeys) {\n Enum thisEnum = first != null ? first.get(key) : null;\n Enum otherEnum = second != null ? second.get(key) : null;\n PhAttribType phA = getAllPhAttribTypes().get(key);\n try {\n sum += phA.calcSimilarity(thisEnum, otherEnum) * phA.getWeight();\n normDiv++;\n } catch (AttribTypeNotComparableException ncE) {\n System.err.println(\"NotComparableException: \" + ncE);\n }\n }\n if (sum == 0) return 0;\n return sum / normDiv;\n }", "public int compare(identified_crystal a, identified_crystal b) \n\t { \n\n\t \treturn a.rating - b.rating; \n\t }", "public double estimateSelectivity(Predicate.Op op, int v) {\n int index = calBucketIndex(v);\n double count = 0;\n switch (op) {\n case EQUALS:\n if(v>max || v<min) return 0;\n count = buckets[index];\n break;\n case GREATER_THAN:\n if(v < min) return 1;\n if(v > max) return 0;\n for(int i=index+1;i<buckets.length;++i)\n count += buckets[i];\n break;\n case GREATER_THAN_OR_EQ:\n if(v < min) return 1;\n if(v > max) return 0;\n count = 0;\n for(int i=index;i<buckets.length;++i)\n count += buckets[i];\n break;\n case LESS_THAN:\n if(v < min) return 0;\n if(v > max) return 1;\n for(int i=0;i<index;++i)\n count += buckets[i];\n break;\n case LESS_THAN_OR_EQ:\n if(v < min) return 0;\n if(v > max) return 1;\n for(int i=0;i<index+1;++i)\n count += buckets[i];\n break;\n case NOT_EQUALS:\n if(v>max || v<min) return 1;\n count = totalCount - buckets[index];\n break;\n case LIKE:\n default:\n break;\n }\n \treturn count / totalCount;\n }", "public int compare(Object nodes1, Object nodes2) {\r\n\t\tdouble w1 = 0.0;\r\n\t\tIterator it = ((Set)nodes1).iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tDouble v = ((Node) it.next()).getWeightValueUnsynchronized(\"value\");\r\n\t\t\tw1 += (v==null ? 1.0 : v.doubleValue());\r\n\t\t}\r\n\t\tdouble w2 = 0.0;\r\n\t\tit = ((Set)nodes2).iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tDouble v = ((Node) it.next()).getWeightValueUnsynchronized(\"value\");\r\n\t\t\tw2 += (v==null ? 1.0 : v.doubleValue());\r\n\t\t}\r\n\t\tint res = Double.compare(w2, w1);\r\n\t\tif (res==0) { // oops, must figure out how they differ\r\n\t\t\tSet ns1 = (Set) nodes1;\r\n\t\t\tSet ns2 = (Set) nodes2;\r\n\t\t\tint ns1sz = ns1.size();\r\n\t\t\tint ns2sz = ns2.size();\r\n\t\t\tif (ns1sz>ns2sz) return -1; // more nodes, the better\r\n\t\t\telse if (ns1sz<ns2sz) return 1;\r\n\t\t\t// go through the *very* expensive nodes discrimination\r\n\t\t\tIterator it1 = ns1.iterator();\r\n\t\t\tIntSet nis1 = new IntSet();\r\n\t\t\twhile (it1.hasNext()) {\r\n\t\t\t\tNode n = (Node) it1.next();\r\n\t\t\t\tnis1.add(new Integer(n.getId()));\r\n\t\t\t}\r\n\t\t\tIterator it2 = ns2.iterator();\r\n\t\t\tIntSet nis2 = new IntSet();\r\n\t\t\twhile (it2.hasNext()) {\r\n\t\t\t\tNode n = (Node) it2.next();\r\n\t\t\t\tnis2.add(new Integer(n.getId()));\r\n\t\t\t}\r\n\t\t\treturn nis2.compareTo(nis1);\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "@Override\n public double evaluate(Map<String, Double> assignment) throws Exception {\n return getExpression1().evaluate(assignment) - getExpression2().evaluate(assignment);\n }", "@Override\r\n\tpublic float getSimilarityTimingEstimated(final String string1, final String string2) {\r\n //timed millisecond times with string lengths from 1 + 50 each increment\r\n //0\t5.97\t11.94\t27.38\t50.75\t73\t109.5\t148\t195.5\t250\t297\t375\t437\t500\t594\t672\t781\t875\t969\t1079\t1218\t1360\t1469\t1609\t1750\t1906\t2063\t2203\t2375\t2563\t2734\t2906\t3110\t3312\t3500\t3688\t3906\t4141\t4375\t4594\t4844\t5094\t5328\t5609\t5860\t6156\t6422\t6688\t6984\t7235\t7547\t7859\t8157\t8500\t8813\t9172\t9484\t9766\t10125\t10516\r\n final float str1Tokens = this.tokeniser.tokenizeToArrayList(string1).size();\r\n final float str2Tokens = this.tokeniser.tokenizeToArrayList(string2).size();\r\n return (((str1Tokens + str2Tokens) * str1Tokens) + ((str1Tokens + str2Tokens) * str2Tokens)) * this.ESTIMATEDTIMINGCONST;\r\n }", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n if (comp != EQ && comp != NEQ) {\n return 0.;\n }\n long overallCount = 0L;\n boolean found = false;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n if (stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n found = true;\n }\n }\n // property not sampled or not considered\n if (!found) {\n // not relevant/considered => simply return 0.5\n if (!isPropertyRelevant(property)) {\n return 0.5;\n } else {\n // not sampled => very rare or not even there => return very small value\n return 0.0001;\n }\n }\n\n double prob = 0.;\n for (TemporalElementStats stat : relevantStats) {\n if (!stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n // not sampled ? ....\n double factor = 0.0001;\n // ...or just excluded/not relevant?\n if (!isPropertyRelevant(property)) {\n factor = 0.5;\n }\n prob += factor * ((double) stat.getElementCount() / overallCount);\n continue;\n }\n prob += stat.getCategoricalSelectivityEstimation()\n .get(property)\n .getOrDefault(value, 0.0001) *\n ((double) stat.getElementCount() / overallCount);\n }\n if (comp == EQ) {\n return prob;\n } else {\n //NEQ\n return 1 - prob;\n }\n }", "public int compare(Object o1, Object o2) {\n int[] p1 = (int[]) o1;\n int[] p2 = (int[]) o2;\n\n // compare sum of axis distances for each priority\n for (int p=MAX_PRIORITY; p>=MIN_PRIORITY; p--) {\n int dist1 = 0, dist2 = 0;\n for (int i=0; i<p1.length; i++) {\n if (priorities[i] == p) {\n dist1 += distance(i, p1[i]);\n dist2 += distance(i, p2[i]);\n }\n }\n int diff = dist1 - dist2;\n if (diff != 0) return diff;\n }\n\n // compare number of diverging axes for each priority\n for (int p=MAX_PRIORITY; p>=MIN_PRIORITY; p--) {\n int div1 = 0, div2 = 0;\n for (int i=0; i<p1.length; i++) {\n if (priorities[i] == p) {\n if (p1[i] != 0) div1++;\n if (p2[i] != 0) div2++;\n }\n }\n int diff = div1 - div2;\n if (diff != 0) return diff;\n }\n\n return 0;\n }", "public void calculateProbabilities(){\n\t}", "private double heuristic(Node a, Node b){\n\n // absolute value of the differences in floors\n return Math.abs(a.getFloor() - b.getFloor());\n }", "public void testCompare6() throws Exception {\r\n ComponentCompetitionSituation situation1 = new ComponentCompetitionSituation();\r\n situation1.setPostingDate(new Date());\r\n situation1.setEndDate(new Date(situation1.getPostingDate().getTime() + 100000));\r\n situation1.setPrize(200D);\r\n\r\n ComponentCompetitionSituation situation2 = new ComponentCompetitionSituation();\r\n situation2.setPostingDate(new Date());\r\n situation2.setEndDate(new Date(situation2.getPostingDate().getTime() + 100000));\r\n situation2.setPrize(200D);\r\n\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation1, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation2, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be == 0\r\n assertTrue(\"result of compare\", result == 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "public SimilarityScore sim(int eq1, int eq2);", "private double computeRangeSelectivity(TableMetadata tableMetadata, RexNode orPred, List<SchemaPath> fieldNames) {\n SchemaPath col = getColumn(orPred, fieldNames);\n if (col != null) {\n ColumnStatistics<?> columnStatistics = tableMetadata != null ? tableMetadata.getColumnStatistics(col) : null;\n Histogram histogram = columnStatistics != null ? ColumnStatisticsKind.HISTOGRAM.getFrom(columnStatistics) : null;\n if (histogram != null) {\n Double totalCount = ColumnStatisticsKind.ROWCOUNT.getFrom(columnStatistics);\n Double ndv = ColumnStatisticsKind.NDV.getFrom(columnStatistics);\n Double sel = histogram.estimatedSelectivity(orPred, totalCount.longValue(), ndv.longValue());\n if (sel != null) {\n return sel;\n }\n }\n }\n return guessSelectivity(orPred);\n }", "public void testCompare5() throws Exception {\r\n // smaller prizes\r\n ComponentCompetitionSituation situation1 = new ComponentCompetitionSituation();\r\n situation1.setPostingDate(new Date());\r\n situation1.setEndDate(new Date(situation1.getPostingDate().getTime() + 100000));\r\n situation1.setPrize(100D);\r\n\r\n // longer prizes\r\n ComponentCompetitionSituation situation2 = new ComponentCompetitionSituation();\r\n situation2.setPostingDate(new Date());\r\n situation2.setEndDate(new Date(situation2.getPostingDate().getTime() + 100000));\r\n situation2.setPrize(200D);\r\n\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation1, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation2, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // smaller prizes < longer prizes\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "@Test\n public void scopeOfRatingsIsCoveringTp() {\n LocalDateTime firstTime = LocalDateTime.of(2017, Month.JANUARY, 1, 0, 0);\n\n //start with creating tp (proportional), a little bit ahead\n // |------|\n TimePeriod tp = new TimePeriod(firstTime.plusHours(1), firstTime.plusHours(8));\n\n\n /**match tp with ratings and chunkEnd so we have (proportional scale)\n * ratings |o---------||\n * tp: |-------|\n *\n */\n ScoreTime rStart = new ScoreTime(firstTime, 6);\n LocalDateTime chunkEnd = firstTime.plusHours(10); //=> several hours after tp.end\n\n //this is the method we are testing\n double[] avgscoreAndWeight = RatingTime.calcAvgAndWeight(tp, Arrays.asList(rStart),\n chunkEnd);\n assertEquals(6.0, avgscoreAndWeight[0]);\n\n /* weight should equal durationOfRatingsInScopeOfTp/tp.duration\n ratingsInScopeOfTp = 7 hours\n tp.duration = 7 hours.\n weight should be 7/7 = 1.0\n */\n\n assertEquals(1.0, avgscoreAndWeight[1], 0.01);\n }", "public void calcMatch() {\n if (leftResult == null || rightResult == null) {\n match_score = 0.0f;\n } else {\n match_score = FaceLockHelper.Similarity(leftResult.getFeature(), rightResult.getFeature(), rightResult.getFeature().length);\n match_score *= 100.0f;\n tvFaceMatchScore1.setText(Float.toString(match_score));\n llFaceMatchScore.setVisibility(View.VISIBLE);\n\n }\n }", "private void CodeComparisonScoresHelper(String fileOne, String fileTwo) {\n double maxLength = Math.max(fileOne.length(), fileTwo.length());\n\n int amountOfChangesLD = new LevensthienDistance(fileOne, fileTwo).getEditDistance();\n int amountLCS = new LongestCommonSubsequence(fileOne, fileTwo).getLengthOfLCS();\n\n double LDScore = (maxLength - amountOfChangesLD) / maxLength * 100;\n double LCSScore = amountLCS / maxLength * 100;\n double overallScore = (LCSScore + LDScore) / 2;\n\n if (LDScore > scoreForLD) {\n scoreForLD = LDScore;\n }\n if (LCSScore > scoreForLCS) {\n scoreForLCS = LCSScore;\n }\n if (overallScore > overallTextDiffScore) {\n overallTextDiffScore = overallScore;\n }\n }", "@Test\n public void DataSmoothTest11() {\n\t LinkedList<Double> runtimes1 = D1.dataSmooth(shows2);\n\t \n\t for(int i = 0; i < runtimes1.size(); i++) {\n\t\t assertEquals(runtimes1.get(i), showResults2.get(i), 0.001);\n\t }\n }", "@Override\n\tpublic Scores compare(File f1, File f2) {\n\t\treturn new Scores(1.0, \"AlwaysTrueComparisonStrategy:1\");\n\t}", "public void testCompareTimes_Collection_ThreadPoolExecutor()\n {\n System.out.println( \"compareTimes\" );\n Collection<Callable<Double>> tasks = createTasks( 10 );\n NamedValue<Double> value = ParallelUtil.compareTimes( tasks, ParallelUtil.createThreadPool( 1 ) );\n System.out.println( \"Value: \" + value + \", \" + value.getValue() );\n }", "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 }", "private int scoreIdMatch(int tag1, int tag2)\n {\n // If they're exactly equal, great.\n if (tag1 == tag2)\n return 100;\n \n // Fail for now.\n return 0;\n }", "@Override\n\tpublic int compare(Assignment a1, Assignment a2) {\n\t\tif (a1.weight > a2.weight && a1.deadline < a2.deadline) return -1;\n\t\tif (a1.weight > a2.weight && a1.deadline > a2.deadline) return 1;\n\t\tif (a1.weight < a2.weight && a1.deadline < a2.deadline) return -1;\n\t\tif (a1.weight < a2.weight && a1.deadline > a2.deadline) return 1;\n\t\tif (a1.weight == a2.weight && a1.deadline < a2.deadline) return -1;\n\t\tif (a1.weight == a2.weight && a1.deadline > a2.deadline) return 1;\n\t\tif (a1.weight < a2.weight) return 1;\n\t\tif (a1.weight > a2.weight) return -1;\n\t\treturn 0;\n\t}", "@Override\n\t\tpublic int compareTo(state arg0) {\n\t\t\treturn (this.weight1 * this.weight2) - (arg0.weight1 * arg0.weight2);\n\t\t}", "private float calculateSimilarityScore(int numOfSuspiciousNodesInA, int numOfSuspiciousNodesInB) {\n\t\t// calculate the similarity score\n\t\treturn (float) (numOfSuspiciousNodesInA + numOfSuspiciousNodesInB) \n\t\t\t\t/ (programANodeList.size() + programBNodeList.size()) * 100;\n\t}", "@Test\n public void compareFunctionalBigger() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p1, p2);\n \n assertEquals(-1, a);\n\n }", "public static double similarity(TopicLabel l1,TopicLabel l2)\n\t{\n\t\tdouble sim = 0;\n\t\tint i = 0;\n\t\tfor(String w: l2.listWords)\n\t\t{\n\t\t\tif(l1.listWords.contains(w))\n\t\t\t{\n\t\t\t\tint j = l1.listWords.indexOf(w);\n\t\t\t\tsim += l2.Pw_given_l.get(i) * Math.log( l2.Pw_given_l.get(i)/ l1.Pw_given_l.get(j));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsim += l2.Pw_given_l.get(i) * Math.log( l2.Pw_given_l.get(i)/Config.EPSELON);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn sim;\n\t}", "public static void main(String[] args)\n\t{\n\t\tString alg1 = args[0];\n\t\tString alg2 = args[1];\n\t\tint N = Integer.parseInt(args[2]);\n\t\tint T = Integer.parseInt(args[3]);\n\t\tdouble t1 = timeRandomInput(alg1, N, T); // total for alg1\n\t\tdouble t2 = timeRandomInput(alg2, N, T); // total for alg2\n\t\tStdOut.printf(\"For %d random Doubles\\n\t%s is\",N, alg1);\n\t\tStdOut.printf(\" %.1f times faster than %s\\n\",t2/t1, alg2);\n\t}", "@Override\n\t\tpublic double minorSimilarCost(ExecutionEventPair one, ExecutionEventPair two, double totalPossibleCost) {\n\t\t\t\n\t\t\tActivitFromToWithDurations binOne = DurationClassHelper.getDurationBinFor(one.getEventOne(), one.getEventTwo());\n\t\t\tActivitFromToWithDurations binTwo = DurationClassHelper.getDurationBinFor(two.getEventOne(), two.getEventTwo());\n\t\t\t\t\n\t\t\tint amount = DurationClassHelper.getAmountOfBins(one.getEventOne(), one.getEventTwo());\n\t\t\tint difference = DurationClassHelper.getBinsBetween(binOne, binTwo);\n\t\t\t\t\n\t\t\treturn (totalPossibleCost*(1-(difference/(double)amount)));\n\t\t}", "@Override\n public int compareTo(PartialSolution other) {\n if (this.getCostUnderestimate() == other.getCostUnderestimate()) {\n int numTasksThis = 0;\n int numTasksOther = 0;\n for (ScheduledTask task : this) {\n numTasksThis++;\n }\n for (ScheduledTask task : other) {\n numTasksOther++;\n }\n return numTasksOther - numTasksThis;\n }\n return this.getCostUnderestimate() - other.getCostUnderestimate();\n }", "@Test\n public void testOneUserTrecevalStrategyMultipleRelevance() {\n DataModelIF<Long, Long> test = DataModelFactory.getDefaultModel();\n DataModelIF<Long, Long> predictions = DataModelFactory.getDefaultModel();\n test.addPreference(1L, 2L, 0.0);\n test.addPreference(1L, 3L, 1.0);\n test.addPreference(1L, 4L, 2.0);\n predictions.addPreference(1L, 1L, 3.0);\n predictions.addPreference(1L, 2L, 4.0);\n predictions.addPreference(1L, 3L, 5.0);\n predictions.addPreference(1L, 4L, 1.0);\n\n Precision<Long, Long> precision = new Precision<Long, Long>(predictions, test, 1.0, new int[]{1, 2, 3, 4, 5});\n\n precision.compute();\n\n assertEquals(0.5, precision.getValue(), 0.001);\n assertEquals(1.0, precision.getValueAt(1), 0.001);\n assertEquals(0.5, precision.getValueAt(2), 0.001);\n assertEquals(0.3333, precision.getValueAt(3), 0.001);\n assertEquals(0.5, precision.getValueAt(4), 0.001);\n assertEquals(0.4, precision.getValueAt(5), 0.001);\n\n Map<Long, Double> precisionPerUser = precision.getValuePerUser();\n for (Map.Entry<Long, Double> e : precisionPerUser.entrySet()) {\n long user = e.getKey();\n double value = e.getValue();\n assertEquals(0.5, value, 0.001);\n }\n }", "public Comparator<Integer> comparator() {\n return new Comparator<Integer>() {\n @Override\n public int compare(Integer o1, Integer o2) {\n Http2PriorityNode n1 = nodesByID.get(o1);\n Http2PriorityNode n2 = nodesByID.get(o2);\n if(n1 == null && n2 == null) {\n return 0;\n }\n if(n1 == null) {\n return -1;\n }\n if(n2 == null) {\n return 1;\n }\n //do the comparison\n //this is kinda crap, but I can't really think of any better way to handle this\n\n double d1 = createWeightingProportion(n1);\n double d2 = createWeightingProportion(n2);\n return Double.compare(d1, d2);\n }\n };\n }", "public void mergeStatistics(BenchmarkStatistics other) {\n for (String stateName : other.latenciesByStateAndInteraction.keySet()) {\n Map<String, List<Long>> latenciesByInteraction = other.latenciesByStateAndInteraction.get(stateName);\n for (String interactionName : latenciesByInteraction.keySet())\n for (long latency : latenciesByInteraction.get(interactionName))\n this.addLatency(stateName, interactionName, latency);\n }\n this.exceptionalSessions += other.exceptionalSessions;\n this.unexpectedSessions += other.unexpectedSessions;\n }", "public int compare(Key<Double, Double> a, Key<Double, Double> b){\n\t\t\tif (a.getFirst() < b.getFirst()){\n\t\t\t\treturn -1;\n\t\t\t} else if (a.getFirst() == b.getFirst()){\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}", "private void updateScoreRatios(IGame game, boolean addToTotal) {\n int player1Score = getScore(game, game.getPlayer1());\n int player2Score = getScore(game, game.getPlayer2());\n int difference = Math.abs(player1Score - player2Score);\n\n IPlayer player1 = game.getPlayer1();\n IPlayer player2 = game.getPlayer2();\n\n logger.info(player1 + \" has scored \" + player1Score + \" in total\");\n logger.info(player2 + \" has scored \" + player2Score + \" in total\");\n\n if (player1Score > player2Score) {\n\n if (addToTotal) {\n player1.setScoreRatio(player1.getScoreRatio() + difference);\n player2.setScoreRatio(player2.getScoreRatio() - difference);\n logger.info(player1 + \" +\" + difference + \" = \"\n + player1.getScoreRatio());\n logger.info(player2 + \" -\" + difference + \" = \"\n + player2.getScoreRatio());\n } else {\n logger.info(\"Resetting scores\");\n player2.setScoreRatio(player2.getScoreRatio() + difference);\n player1.setScoreRatio(player1.getScoreRatio() - difference);\n\n logger.info(player2 + \" +\" + difference + \" = \"\n + player2.getScoreRatio());\n logger.info(player1 + \" -\" + difference + \" = \"\n + player1.getScoreRatio());\n }\n\n } else if (player2Score > player1Score) {\n if (addToTotal) {\n player2.setScoreRatio(player2.getScoreRatio() + difference);\n player1.setScoreRatio(player1.getScoreRatio() - difference);\n\n logger.info(player2 + \" +\" + difference + \" = \"\n + player2.getScoreRatio());\n logger.info(player1 + \" -\" + difference + \" = \"\n + player1.getScoreRatio());\n } else {\n logger.info(\"Resetting scores\");\n player1.setScoreRatio(player1.getScoreRatio() + difference);\n player2.setScoreRatio(player2.getScoreRatio() - difference);\n\n logger.info(player1 + \" +\" + difference + \" = \"\n + player1.getScoreRatio());\n logger.info(player2 + \" -\" + difference + \" = \"\n + player2.getScoreRatio());\n }\n }\n }", "public Map<BooleanVariable, Double> calculateDiff(SimulationResults perturbed,\n\t\t\t\t\t\t\t\t\t\t\t \t\t SimulationResults base,\n\t\t\t\t\t\t\t\t\t\t\t \t\t int maxTimeStep) {\n\t // BooleanNetworks can be compared (e.g. minor modification in a BooleanNetwork).\n\t // Make sure two Results are generated from the same network\n\t if (perturbed.getNetwork() != base.getNetwork() && varPropertyKey == null)\n\t throw new IllegalArgumentException(\"The passed two parameters don't have the same BooleanNetwork! \"\n\t + \"To compare two different BooleanNetworks, set varPropertyKey.\");\n\t\tperturbed.expandTracks(maxTimeStep);\n\t\tbase.expandTracks(maxTimeStep);\n\t\t// Calculate AUC\n\t\tMap<BooleanVariable, Double> pertVarToAuc = perturbed.calculateAUC();\n\t\tMap<BooleanVariable, Double> baseVarToAuc = base.calculateAUC();\n\t\tMap<String, Double> pertPropToAuc = null;\n\t\tif (varPropertyKey != null) {\n\t\t pertPropToAuc = convertVarToAucMap(pertVarToAuc, varPropertyKey);\n\t\t}\n\t\tfinal Map<String, Double> finalPertPropToAuc = pertPropToAuc;\n\t\tMap<BooleanVariable, Double> varToDiff = new HashMap<>();\n\t\t// Get the percent change\n\t\tbaseVarToAuc.forEach((var, baseAuc) -> {\n\t\t Double pertAuc = null;\n\t\t if (varPropertyKey != null) {\n\t\t String property = var.getProperty(varPropertyKey);\n\t\t pertAuc = finalPertPropToAuc.get(property);\n\t\t }\n\t\t else\n\t\t pertAuc = pertVarToAuc.get(var);\n\t\t\tif (pertAuc == null)\n\t\t\t return; \n\t\t\t// Assign the minimum value to avoid NaN\n\t\t\tif (baseAuc < MIN_VALUE)\n\t\t\t baseAuc = MIN_VALUE;\n\t\t\tif (pertAuc < MIN_VALUE)\n\t\t\t pertAuc = MIN_VALUE;\n//\t\t\tdouble change = Math.abs(pertAuc - baseAuc) / baseAuc;\n\t\t\tdouble change = (pertAuc - baseAuc) / (pertAuc + baseAuc); // Use this formula to control small values\n\t\t\tvarToDiff.put(var, change);\n\t\t});\n\t\t\n\t\treturn varToDiff;\n\t}", "void assertTotalTimePctEquals(T key, double expected);", "static void sortAndCalculateTime(int[] A, int[] B) {\n\t\t// A random integer in the range 0 to 1\n\t\tint sortNum = (int)(Math.random() * 2);\n\t\t\n\t\t// if sortNum is 0 the Insertion method is used, otherwise the Selection one\n\t\tif(sortNum == 0) {\n\t\t\t// Take the initial time\n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\t// sort the A array with Insertion method\n\t\t\tinsertionSort(A);\n\t\t\t// Calculate how much time has passed\n\t\t\tlong runTime = (System.currentTimeMillis() - startTime);\n\t\t\tSystem.out.println(\"Time in millisecond to sort array with insertionSort(): \" + runTime);\n\t\t} else {\n\t\t\t// Take the initial time\n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\t// sort the A array with Selection method\n\t\t\tselectionSort(A);\n\t\t\t// Calculate how much time has passed\n\t\t\tlong runTime = (System.currentTimeMillis() - startTime);\n\t\t\tSystem.out.println(\"Time in millisecond to sort array with selectionSort(): \" + runTime);\n\t\t}\n\t\t\n\t\t// Take the initial time\n\t\tlong startTime = System.currentTimeMillis();\n\t\t// sort the B array with Arrays.sort() method\n\t\tArrays.sort(B);\n\t\t// Calculate how much time has passed\n\t\tlong runTime = (System.currentTimeMillis() - startTime);\n\t\tSystem.out.println(\"Time in millisecond to sort array with Arrays.sort(): \" + runTime);\n\t}", "protected void sortStats(Node node1, Node node2) {\n\t\tif (node1.getNodeName().equals(\"team\")) {\n\t\t\tif (node2.getNodeName().equals(\"name\")) {\n\t\t\t\tif ((teamName).contains(node2.getNodeValue())) {\n\t\t\t\t\tshouldLoop = true;\n\t\t\t\t} else {\n\t\t\t\t\tshouldLoop = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (node1.getNodeName().equals(\"player\")\n\t\t\t\t|| node1.getNodeName().equals(\"total\")\n\t\t\t\t|| node1.getNodeName().equals(\"team\")) {\n\t\t\tif (!(node2.getNodeName()).contains(\"pct\")) {\n\t\t\t\tif (shouldLoop) {\n\t\t\t\t\tplayerStatNameList.add(node2.getNodeName());\n\t\t\t\t\tplayerStatValueList.add(node2.getNodeValue());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private double getScore(String source, String target) {\n return sourceTargetCounts.getCount(source, target) / (sourceWordCounts.get(source) * targetWordCounts.get(target));\n }", "public void testComparisons() {\n\tfinal double small = Math.pow(2.0, -42);\n\n\t// Input: a, b\n\tdouble[][] input = new double[][] { new double[] { 1, 1 },\n\t\tnew double[] { 1, 2 }, new double[] { 1, 1 - small / 10 },\n\t\tnew double[] { 1, 1 + small / 10 },\n\n\t\tnew double[] { 0, 1 }, new double[] { 0, 0 },\n\t\tnew double[] { 0, -1 }, new double[] { 0, small / 100 },\n\t\tnew double[] { 2100000001.0001, 2100000001.0003 }, };\n\n\t// Output: less, equals\n\tboolean[][] output = new boolean[][] { new boolean[] { false, true },\n\t\tnew boolean[] { true, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, true },\n\n\t\tnew boolean[] { true, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, true }, };\n\n\tfor (int i = 0; i < input.length; ++i) {\n\t boolean l = StandardFloatingPointComparator.getDouble().less(\n\t\t input[i][0], input[i][1]);\n\t boolean e = StandardFloatingPointComparator.getDouble().equals(\n\t\t input[i][0], input[i][1]);\n\n\t boolean ne = StandardFloatingPointComparator.getDouble().notEquals(\n\t\t input[i][0], input[i][1]);\n\t boolean le = StandardFloatingPointComparator.getDouble()\n\t\t .lessOrEquals(input[i][0], input[i][1]);\n\t boolean g = StandardFloatingPointComparator.getDouble().greater(\n\t\t input[i][0], input[i][1]);\n\t boolean ge = StandardFloatingPointComparator.getDouble()\n\t\t .greaterOrEquals(input[i][0], input[i][1]);\n\n\t boolean less = output[i][0];\n\t boolean equals = output[i][1];\n\n\t boolean notEquals = !equals;\n\t boolean lessOrEquals = less || equals;\n\t boolean greater = !lessOrEquals;\n\t boolean greaterOrEquals = !less;\n\n\t assertFalse(l != less);\n\t assertFalse(g != greater);\n\t assertFalse(e != equals);\n\t assertFalse(ne != notEquals);\n\t assertFalse(le != lessOrEquals);\n\t assertFalse(ge != greaterOrEquals);\n\t}\n }", "@Override\n\tpublic int compare(ExecutionNode o1, ExecutionNode o2) {\n\t\t// compare start times\n\t\tTimePoint s1 = o1.getInterval().getStartTime();\n\t\tTimePoint s2 = o2.getInterval().getStartTime();\n\t\t// compare lower bounds\n\t\treturn s1.getLowerBound() < s2.getLowerBound() ? -1 : s1.getLowerBound() > s2.getLowerBound() ? 1 : 0;\n\t}", "@Test\n public void DataSmoothTest12() {\n\t LinkedList<Double> runtimes1 = D2.dataSmooth(shows2);\n\t \n\t for(int i = 0; i < runtimes1.size(); i++) {\n\t\t assertEquals(runtimes1.get(i), showResults2.get(i), 0.001);\n\t }\n }", "@Override\n\t\tpublic int compare(PerformanceInfo o1, PerformanceInfo o2) {\n\t\t\treturn 1;\n\t\t}", "@Override\n\t\tpublic int compare(ScoreSum lhs, ScoreSum rhs) {\n\t\t\tScoreSum temp1 = lhs;\n\t\t\tScoreSum temp2 = rhs;\n\t\t\tint num = temp1.getScore().compareTo(temp2.getScore());\n\t\t\tif (num == 0)\n\t\t\t\treturn temp1.getAthleteName().compareTo(temp2.getAthleteName());\n\t\t\treturn num;\n\t\t}", "private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n long overallCount = 0L;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n }\n double sum = 0.;\n for (TemporalElementStats stat : relevantStats) {\n sum += estimateNumericalPropertyProb(stat, property, comp, value) *\n (((double) stat.getElementCount() / overallCount));\n }\n return sum;\n }", "private double condProb(RelStruc A,Hashtable atomhasht,OneStrucData inst,long[] timers)\n\t\t\tthrows RBNCompatibilityException\n\t\t\t{\n\t\tdouble result = probform.evalSample(A,atomhasht,inst,timers);\n\t\t//System.out.print(\" cP: \" + result);\n\t\treturn result;\n\t\t\t}", "@Override\n public double similarity(double[] data1, double[] data2) {\n\t\tdouble distance;\n\t\tint i;\n\t\tif(MATHOD ==1){\n\t\t\t i = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.pow(Math.abs(data1[i] - data2[i]), q);\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==2){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += ( Math.abs(data1[i] - data2[i]) )/( Math.abs(data1[i]) + Math.abs(data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==3){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.abs( (data1[i] - data2[i]) / ( 1 + data1[i] + data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn Math.pow(distance, 1 / q);\n }", "public int compare(ThreadWait a, ThreadWait b)\n {\n if(b.wakeUp > a.wakeUp){\n return -1;\n }\n if (b.wakeUp == a.wakeUp){\n return 0;\n }\n \n return 1;\n \n }", "public void testCompare3() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.5D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(0.6D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions above the range < predictions below the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "@Override\n\t\tpublic int compare(PathfindingNode object1, PathfindingNode object2) \n\t\t{\n\t\t\treturn _totalCosts.get(object1) - _totalCosts.get(object2);\n\t\t}", "public double compare(double x, double y) {\n\t\tif (Math.abs(x - y) > _threshold)\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn 1;\n\t}", "@Override\n public int compare(Pair<Channel, Double> lhs, Pair<Channel, Double> rhs) {\n return rhs.second.compareTo(lhs.second);\n }", "@Override\n public int compareTo(AudioTrackScore other) {\n if (this.isWithinRendererCapabilities != other.isWithinRendererCapabilities) {\n return this.isWithinRendererCapabilities ? 1 : -1;\n }\n if (this.preferredLanguageScore != other.preferredLanguageScore) {\n return compareInts(this.preferredLanguageScore, other.preferredLanguageScore);\n }\n if (this.isWithinConstraints != other.isWithinConstraints) {\n return this.isWithinConstraints ? 1 : -1;\n }\n if (parameters.forceLowestBitrate) {\n int bitrateComparison = compareFormatValues(bitrate, other.bitrate);\n if (bitrateComparison != 0) {\n return bitrateComparison > 0 ? -1 : 1;\n }\n }\n if (this.isDefaultSelectionFlag != other.isDefaultSelectionFlag) {\n return this.isDefaultSelectionFlag ? 1 : -1;\n }\n if (this.localeLanguageMatchIndex != other.localeLanguageMatchIndex) {\n return -compareInts(this.localeLanguageMatchIndex, other.localeLanguageMatchIndex);\n }\n if (this.localeLanguageScore != other.localeLanguageScore) {\n return compareInts(this.localeLanguageScore, other.localeLanguageScore);\n }\n // If the formats are within constraints and renderer capabilities then prefer higher values\n // of channel count, sample rate and bit rate in that order. Otherwise, prefer lower values.\n int resultSign = isWithinConstraints && isWithinRendererCapabilities ? 1 : -1;\n if (this.channelCount != other.channelCount) {\n return resultSign * compareInts(this.channelCount, other.channelCount);\n }\n if (this.sampleRate != other.sampleRate) {\n return resultSign * compareInts(this.sampleRate, other.sampleRate);\n }\n if (Util.areEqual(this.language, other.language)) {\n // Only compare bit rates of tracks with the same or unknown language.\n return resultSign * compareInts(this.bitrate, other.bitrate);\n }\n return 0;\n }", "public int compare(Photograph a, Photograph b) {\n int returnVal = a.getCaption().compareTo(b.getCaption());\n if (returnVal != 0) {\n return returnVal;\n }\n returnVal = b.getRating() - a.getRating();\n return returnVal; \n }", "public Long metricValue() {\n\t\t// Keep a list free from redundant subjects, that is with all its unique\n\t\t// elements\n\t\tList<ComparableSubject> lstUniqueSubjects = new ArrayList<ComparableSubject>();\n\t\tboolean isCurSubjectUnique;\n\t\tlong countCompared = 0;\n\t\tint mapSize = pMapSubjects.size();\n\t\tlogger.debug(\"Starting metric value computation, with \" + mapSize + \"instances...\");\n\n\t\t// int i = 0;\n\t\t// Compare each of the subjects with the ones already recognized as unique...\n\t\tfor (ComparableSubject curSubject : pMapSubjects.values()) {\n\t\t\tisCurSubjectUnique = true;\n\t\t\t// i++;\n\t\t\t// int z = 0;\n\t\t\tfor (ComparableSubject curUniqueSubject : lstUniqueSubjects) {\n\t\t\t\t// and if the subject currently examined is equivalent to one of the existing\n\t\t\t\t// unique subjects, do not regard it as unique, continue with the next one\n\t\t\t\tif (curSubject.isEquivalentTo(curUniqueSubject)) {\n\t\t\t\t\tisCurSubjectUnique = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// z++;\n\t\t\t\t// if ((z % 10000) == 0) System.out.println(\"compared \"+i + \"/\" + z);\n\t\t\t}\n\n\t\t\t// if ((i % 1000 == 0)) System.out.println(\"compared \"+i);\n\n\t\t\t// Finally, if the current subject is not equivalent to any of\n\t\t\t// the existing unique subjects, add it as unique\n\t\t\tif (isCurSubjectUnique) {\n\t\t\t\tlstUniqueSubjects.add(curSubject);\n\t\t\t}\n\n\t\t\tcountCompared++;\n\t\t\tif ((countCompared % 50000) == 0) {\n\t\t\t\tlogger.debug(\"Estimated value with \" + countCompared + \" compared instances: \"\n\t\t\t\t\t\t+ (((double) lstUniqueSubjects.size()) / ((double) mapSize)));\n\t\t\t}\n\t\t}\n\n\t\t// Compute metric value\n\t\t// long metricValue = ((long)lstUniqueSubjects.size()) /\n\t\t// ((long)pMapSubjects.size());\n\t\tlong metricValue = (((long) pMapSubjects.size()) > 0)\n\t\t\t\t? ((long) lstUniqueSubjects.size()) / ((long) pMapSubjects.size())\n\t\t\t\t: 0;\n\t\t// If any subject is equivalent to another, it will not be part of the list of\n\t\t// unique subjects, then\n\t\t// the size of this list is the \"Count of Unique Subjects\" required to calculate\n\t\t// the metric\n\t\treturn metricValue;\n\t}", "private Double calculateMatchScore(String query, ConceptMap matchedMapping) {\n return 10000d;\n }", "public Comparison compare(double left, double right) {\n return checkResult(Double.compare(left, right));\n }", "@Override\n public int compare(Prediction lhs, Prediction rhs) {\n return Float.compare(rhs.getConfidence(), lhs.getConfidence());\n }", "public int compare(TimeSpan std1, TimeSpan std2) {\n\t\t\t//ascending order\n\t\t\treturn std1.start - std2.start;\n\t\t}", "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 }", "public abstract void set(T first, T second, Double similarity);", "double getScore(IToken tk1, IToken tk2);", "public int compareTo(Player otherPlayer, boolean isComparingAvgTime)\r\n {\r\n if(isComparingAvgTime)\r\n {\r\n //Compare the average times of this player to the other player\r\n if(this.averageTime > otherPlayer.getAverageTime())\r\n {\r\n return 1; \r\n }\r\n else if (this.averageTime == otherPlayer.getAverageTime())\r\n {\r\n //Compare the number of games this player to the other player\r\n if(this.gamesCompleted > otherPlayer.getGamesCompleted())\r\n {\r\n return 1;\r\n }\r\n else if (this.gamesCompleted == otherPlayer.getGamesCompleted())\r\n {\r\n return 0;\r\n }\r\n else \r\n {\r\n return -1;\r\n }//end if\r\n\r\n }\r\n else \r\n {\r\n return -1;\r\n }//end if\r\n }\r\n else \r\n {\r\n //Compare the fastest times of this player to the other player \r\n if(this.fastestTime > otherPlayer.getFastestTime())\r\n {\r\n return 1; \r\n }\r\n else if(this.fastestTime == otherPlayer.getFastestTime())\r\n {\r\n //Compare the average times of this player to the other player\r\n if(this.averageTime > otherPlayer.getAverageTime())\r\n {\r\n return 1; \r\n }\r\n else if (this.averageTime == otherPlayer.getAverageTime())\r\n {\r\n //Compare the number of games this player to the other player\r\n if(this.gamesCompleted > otherPlayer.getGamesCompleted())\r\n {\r\n return 1;\r\n }\r\n else if (this.gamesCompleted == otherPlayer.getGamesCompleted())\r\n {\r\n return 0;\r\n }\r\n else \r\n {\r\n return -1;\r\n }//end if\r\n\r\n }\r\n else \r\n {\r\n return -1;\r\n }//end if\r\n\r\n }\r\n else \r\n {\r\n return -1; \r\n }//end if\r\n }//end if\r\n }", "private void evaluateProbabilities()\n\t{\n\t}", "void assertSelfTimePctEquals(T key, double expected);", "public static int score(String first, String second) {\n Set<String> s1 = splitIntoBigrams(first);\n Set<String> s2 = splitIntoBigrams(second);\n\n // Get the number of elements in each set.\n int n1 = s1.size();\n int n2 = s2.size();\n\n // Find the intersection, and get the number of elements in that set.\n s1.retainAll(s2);\n int nt = s1.size();\n\n\n // The coefficient is:\n //\n // 2 ∙ | s1 ⋂ s2 |\n // D = ----------------------\n // | s1 | + | s2 |\n //\n double out = (2.0 * (double)nt) / ((double)(n1 + n2));\n out = (out + scoreReverse(first, second)) / 2;\n return (int)(Math.abs(out - 1) * 10);\n\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 }", "public int compare(Prototype one, Prototype two)\r\n {\r\n double one_d = Distance.d(basePrototype, one);\r\n double two_d = Distance.d(basePrototype, two);\r\n if (one_d > two_d)\r\n {\r\n return 1;\r\n } else if (one_d == two_d)\r\n {\r\n return 0;\r\n } else\r\n {\r\n return -1;\r\n }\r\n }", "@Test\n public void firstRatingsIsLate() {\n LocalDateTime firstTime = LocalDateTime.of(2017, Month.JANUARY, 1, 0, 0);\n\n //start with creating tp (proportional)\n // |------|\n TimePeriod tp = new TimePeriod(firstTime.plusHours(0), firstTime.plusHours(7));\n\n\n /**match tp with ratings and chunkEnd so we have (proportional scale)\n * ratings |--o----||\n * tp: |-------|\n *\n */\n ScoreTime rStart = new ScoreTime(firstTime.plusHours(2), 3);\n LocalDateTime chunkEnd = firstTime.plusHours(7); //=> same as tp.end\n\n //this is the method we are testing\n double[] avgscoreAndWeight = RatingTime.calcAvgAndWeight(tp, Arrays.asList(rStart),\n chunkEnd);\n assertEquals(3.0, avgscoreAndWeight[0]);\n\n /* weight should equal durationOfRatingsInScopeOfTp/tp.duration\n timeOfRatingsInScopeOfTp = 5 hours\n tp.duration = 7 hours.\n weight should be 5/7\n */\n\n assertEquals(5. / 7., avgscoreAndWeight[1], 0.01);\n }" ]
[ "0.7259421", "0.6782026", "0.64932996", "0.6169344", "0.61664295", "0.6133705", "0.5635771", "0.553865", "0.5453735", "0.5428815", "0.5395481", "0.5390642", "0.5379364", "0.53663945", "0.53608716", "0.530568", "0.5298934", "0.52622604", "0.52588576", "0.52582383", "0.52398026", "0.52359605", "0.52202624", "0.521506", "0.519699", "0.5190311", "0.51779234", "0.51484895", "0.5140573", "0.5134856", "0.5124413", "0.5124198", "0.5111079", "0.50949156", "0.5084497", "0.5063851", "0.50603974", "0.5055871", "0.5050424", "0.5036371", "0.50333565", "0.50248814", "0.5022066", "0.5020893", "0.5020443", "0.5002484", "0.5001679", "0.50002724", "0.49914792", "0.4984408", "0.49772823", "0.4974889", "0.49736878", "0.49648988", "0.4963525", "0.49580652", "0.495382", "0.49528855", "0.4952113", "0.49497592", "0.4932781", "0.49144837", "0.49088213", "0.49048018", "0.49031654", "0.49008968", "0.4896864", "0.48921442", "0.4891855", "0.4888898", "0.4885099", "0.4881219", "0.48771676", "0.48767564", "0.48565012", "0.48533317", "0.48506957", "0.48415625", "0.4839159", "0.48391446", "0.4833129", "0.48247483", "0.4815233", "0.48044655", "0.48025247", "0.47926918", "0.47868103", "0.4785629", "0.47836322", "0.47779545", "0.4771641", "0.4770144", "0.47660568", "0.4765968", "0.47658738", "0.47632083", "0.47541392", "0.4753711", "0.47434565", "0.47431573" ]
0.7348284
0
Estimates the probability that a comparison on numerical property data holds. RHS and LHS elements are described by a list of element statistics Note that the method assumes lhs and rhs to be independent, i.e. a call does not yield a reasonable value for comparing the same property of the exact same element.
private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats1, String property1, Comparator comp, List<TemporalElementStats> relevantStats2, String property2) { long count1 = relevantStats1.stream() .map(TemporalElementStats::getElementCount) .reduce(0L, Long::sum); long count2 = relevantStats2.stream() .map(TemporalElementStats::getElementCount) .reduce(0L, Long::sum); long totalCount = count1 * count2; double outerSum = 0.; for (TemporalElementStats s1 : relevantStats1) { double innerSum = 0.; for (TemporalElementStats s2 : relevantStats2) { double prob = estimateNumericalPropertyProb(s1, property1, comp, s2, property2); double weight = ((double) s1.getElementCount() * s2.getElementCount()) / totalCount; innerSum += prob * weight; } outerSum += innerSum; } return outerSum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n long overallCount = 0L;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n }\n double sum = 0.;\n for (TemporalElementStats stat : relevantStats) {\n sum += estimateNumericalPropertyProb(stat, property, comp, value) *\n (((double) stat.getElementCount() / overallCount));\n }\n return sum;\n }", "private double estimateNumericalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Double[]> map1 = stats1.getNumericalPropertyStatsEstimation();\n Map<String, Double[]> map2 = stats2.getNumericalPropertyStatsEstimation();\n Double[] propStats1 = map1.getOrDefault(property1, null);\n Double[] propStats2 = map2.getOrDefault(property2, null);\n if (propStats1 == null || propStats2 == null) {\n return 0.0001;\n }\n double occurrence = stats1.getNumericalOccurrenceEstimation()\n .getOrDefault(property1, 0.) *\n stats2.getNumericalOccurrenceEstimation().getOrDefault(property2, 0.);\n // assuming both properties are normally distributed,\n // their difference is also normally distributed\n NormalDistribution differenceDist = new NormalDistribution(\n propStats1[0] - propStats2[0],\n Math.max(Math.sqrt(propStats1[1] + propStats2[1]), VERY_LOW_PROB));\n\n if (comp == EQ) {\n return occurrence * differenceDist.density(0.);\n } else if (comp == NEQ) {\n return occurrence * (1. - differenceDist.density(0.));\n } else if (comp == LTE) {\n return occurrence * (differenceDist.cumulativeProbability(0.));\n } else if (comp == LT) {\n return occurrence * (differenceDist.cumulativeProbability(0.) -\n differenceDist.density(0.));\n } else if (comp == GTE) {\n return occurrence * (1. - differenceDist.cumulativeProbability(0.) +\n differenceDist.density(0.));\n } else {\n //GT\n return occurrence * (1. - differenceDist.cumulativeProbability(0.));\n }\n }", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp,\n List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateCategoricalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "public static boolean compareListElements(ArrayList<Double> a,ArrayList<Double> b){\n\t\t\n\t\tif(a==null && b==null)\n\t\t\treturn true;\n\t\t\n\t\tif(a.size()!=b.size())\n\t\t\treturn false;\n\t\t\n\t\tint i=0,j,k;\n\t\t\n\t\twhile(i<a.size())\n\t\t{\n\t\t\tj=(int) (100*a.get(i));\n\t\t\tk=(int) (100*b.get(i));\n\t\t\t\n\t\t\tif(j!=k)\n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\ti++;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "private double estimateCategoricalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Map<PropertyValue, Double>> map1 =\n stats1.getCategoricalSelectivityEstimation();\n Map<String, Map<PropertyValue, Double>> map2 =\n stats2.getCategoricalSelectivityEstimation();\n Map<PropertyValue, Double> propStats1 = map1.getOrDefault(property1, null);\n Map<PropertyValue, Double> propStats2 = map2.getOrDefault(property2, null);\n // property not sampled or not considered\n if (propStats1 == null || propStats2 == null) {\n // property not considered => return 0.5\n if (!isPropertyRelevant(property1) && !isPropertyRelevant(property2)) {\n return 0.5;\n } else {\n // property not sampled => very rare => return very small value\n return 0.0001;\n }\n }\n if (comp == EQ || comp == NEQ) {\n double sum = 0.;\n for (Map.Entry<PropertyValue, Double> entry1 : propStats1.entrySet()) {\n double val1Selectivity = entry1.getValue();\n for (Map.Entry<PropertyValue, Double> entry2 : propStats2.entrySet()) {\n if (entry1.getKey().equals(entry2.getKey())) {\n double val2Selectivity = entry2.getValue();\n sum += val1Selectivity * val2Selectivity;\n }\n }\n }\n return comp == EQ ? sum : 1. - sum;\n } else {\n // shouldn't happen, categorical variables can only be compared with EQ or NEQ\n return 0.;\n }\n }", "private double estimateTimeSelectorComparison(List<TemporalElementStats> statsLhs,\n TimeSelector.TimeField fieldLhs,\n Comparator comparator, List<TemporalElementStats> statsRhs,\n TimeSelector.TimeField fieldRhs) {\n // count overall number of elements for both sides\n long lhsOverallCount = statsLhs.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(Long::sum)\n .orElse(0L);\n long rhsOverallCount = statsRhs.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(Long::sum)\n .orElse(0L);\n double sum = 0.;\n\n for (TemporalElementStats lhs : statsLhs) {\n double lhsWeight = (double) lhs.getElementCount() / lhsOverallCount;\n for (TemporalElementStats rhs : statsRhs) {\n double rhsWeight = (double) rhs.getElementCount() / rhsOverallCount;\n sum += lhsWeight * rhsWeight *\n estimateTimeSelectorComparison(lhs, fieldLhs, comparator, rhs, fieldRhs);\n }\n }\n return sum;\n }", "private void evaluateProbabilities()\n\t{\n\t}", "private double estimateTimeSelectorComparison(TemporalElementStats statsLhs,\n TimeSelector.TimeField fieldLhs,\n Comparator comparator, TemporalElementStats statsRhs,\n TimeSelector.TimeField fieldRhs) {\n\n double sum = 0.;\n\n // first, compare without considering Long.MIN values, TemporalElement.DEFAULT_TIME_TO values\n\n double[] lhs = statsLhs.getTemporalPropertyStats(fieldLhs);\n double[] rhs = statsRhs.getTemporalPropertyStats(fieldRhs);\n double lhsMean = lhs[0];\n double lhsVariance = lhs[1];\n double lhsExtreme = lhs[2];\n double rhsMean = rhs[0];\n double rhsVariance = rhs[1];\n double rhsExtreme = rhs[2];\n // probability that both lhs and rhs not TemporalElement.DEFAULT_TIME_FROM or\n // TemporalElement.DEFAULT_TIME_TO\n double probBothNotExtreme = (1 - lhsExtreme) * (1 - rhsExtreme);\n // distribution for difference between lhs and rhs values\n NormalDistribution diffDist = new NormalDistribution(lhsMean - rhsMean,\n Math.max(lhsVariance + rhsVariance, VERY_LOW_PROB));\n\n // P(lhs < rhs)\n double probNotExtremeLTE = diffDist.cumulativeProbability(0.);\n // P(lhs = rhs)\n double probNotExtremeEQ = diffDist.probability(0.);\n // P(lhs comp rhs)\n double probCompNotExtreme = 0.;\n\n if (comparator == LTE) {\n probCompNotExtreme = probNotExtremeLTE;\n } else if (comparator == LT) {\n probCompNotExtreme = probNotExtremeLTE - probNotExtremeEQ;\n } else if (comparator == EQ) {\n probCompNotExtreme = probNotExtremeEQ;\n } else if (comparator == NEQ) {\n probCompNotExtreme = 1. - probNotExtremeEQ;\n } else if (comparator == GTE) {\n probCompNotExtreme = 1. - (probNotExtremeLTE - probNotExtremeEQ);\n } else if (comparator == GT) {\n probCompNotExtreme = 1. - probNotExtremeLTE;\n }\n\n sum += probBothNotExtreme * probCompNotExtreme;\n\n // also consider cases in which one or both sides have extreme values\n double probCompExtreme = 0.;\n // lhs from\n if (fieldLhs == TX_FROM || fieldLhs == VAL_FROM) {\n // rhs from\n if (fieldRhs == TX_FROM || fieldRhs == VAL_FROM) {\n if (comparator == EQ) {\n probCompExtreme = lhsExtreme * rhsExtreme;\n } else if (comparator == NEQ) {\n probCompExtreme = (1 - lhsExtreme) * rhsExtreme + lhsExtreme * (1 - rhsExtreme);\n } else if (comparator == LTE) {\n probCompExtreme = lhsExtreme;\n } else if (comparator == LT) {\n probCompExtreme = lhsExtreme * (1 - rhsExtreme);\n } else if (comparator == GTE) {\n probCompExtreme = rhsExtreme;\n } else if (comparator == GT) {\n probCompExtreme = (1 - lhsExtreme) * rhsExtreme;\n }\n } else {\n // rhs to\n if (comparator == NEQ || comparator == LT || comparator == LTE) {\n probCompExtreme = lhsExtreme * rhsExtreme + (1 - lhsExtreme) * rhsExtreme +\n lhsExtreme * (1 - rhsExtreme);\n } //for all other comparators 0, if lhs and/or rhs extreme\n }\n } else { // lhs to\n // rhs from\n if (fieldRhs == TX_FROM || fieldRhs == VAL_FROM) {\n if (comparator == NEQ || comparator == GT || comparator == GTE) {\n probCompExtreme = lhsExtreme * rhsExtreme + (1 - lhsExtreme) * rhsExtreme +\n lhsExtreme * (1 - rhsExtreme);\n } // for all other comparators 0, if lhs and/or rhs extreme\n } else {\n // rhs to\n if (comparator == EQ) {\n probCompExtreme = lhsExtreme * rhsExtreme;\n } else if (comparator == NEQ) {\n probCompExtreme = (1 - lhsExtreme) * rhsExtreme + lhsExtreme * (1 - rhsExtreme);\n } else if (comparator == LTE) {\n probCompExtreme = rhsExtreme;\n } else if (comparator == LT) {\n probCompExtreme = (1 - lhsExtreme) * rhsExtreme;\n } else if (comparator == GTE) {\n probCompExtreme = lhsExtreme;\n } else if (comparator == GT) {\n probCompExtreme = lhsExtreme * (1 - rhsExtreme);\n }\n }\n }\n\n sum += probCompExtreme;\n\n return sum;\n }", "public void calculateProbabilities(){\n\t}", "protected abstract List<Double> calcScores();", "public static void checkUpdateProbabilityOnALLRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 1; j < 255; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = j;\r\n\t\t\t\t/*if(r2 == 1 || r2 == 2 || r2 == 4 || r2 == 8 || r2 == 16 || r2 == 32 || r2 == 64 || r2 == 128)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\telse*/\r\n\t\t\t\tfor(int k = 1; k < 255; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = k;\r\n\t\t\t\t\t/*if(r3 == 1 || r3 == 2 || r3 == 4 || r3 == 8 || r3 == 16 || r3 == 32 || r3 == 64 || r3 == 128)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse*/\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\ttotal++;\r\n\t\t\t\t\t\tint new_r3 = SetOperators.intersection(r3, \r\n\t\t\t\t\t\t\t\tCompositionTable.LookUpTable(r1, r2));\r\n\t\t\t\t\t\tif(new_r3 != r3 && new_r3 != 0)\r\n\t\t\t\t\t\t\tupdate++;\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\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n if (comp != EQ && comp != NEQ) {\n return 0.;\n }\n long overallCount = 0L;\n boolean found = false;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n if (stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n found = true;\n }\n }\n // property not sampled or not considered\n if (!found) {\n // not relevant/considered => simply return 0.5\n if (!isPropertyRelevant(property)) {\n return 0.5;\n } else {\n // not sampled => very rare or not even there => return very small value\n return 0.0001;\n }\n }\n\n double prob = 0.;\n for (TemporalElementStats stat : relevantStats) {\n if (!stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n // not sampled ? ....\n double factor = 0.0001;\n // ...or just excluded/not relevant?\n if (!isPropertyRelevant(property)) {\n factor = 0.5;\n }\n prob += factor * ((double) stat.getElementCount() / overallCount);\n continue;\n }\n prob += stat.getCategoricalSelectivityEstimation()\n .get(property)\n .getOrDefault(value, 0.0001) *\n ((double) stat.getElementCount() / overallCount);\n }\n if (comp == EQ) {\n return prob;\n } else {\n //NEQ\n return 1 - prob;\n }\n }", "public static LinkedList merge_mass_tolerance(LinkedList list, boolean ppm, double ppm_val) {\n\t\tHashMap final_map = new HashMap();\n\t\tLinkedList mass_list = new LinkedList();\n\t\tLinkedList final_list = new LinkedList();\n\t\tIterator itr = list.iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tCOMPOUND compound1 = (COMPOUND)itr.next();\n\t\t\tdouble mass = compound1.MASS.NUM * Math.pow(10, compound1.MASS.E);\n\t\t\tif (final_map.containsKey(mass)) {\n\t\t\t\tCOMPOUND old = (COMPOUND)final_map.get(mass);\n\t\t\t\t//System.out.println(\"Merge1: \" + compound1.TOTALPROB + \"\\t\" + old.TOTALPROB);\n\t\t\t\tcompound1.TOTALPROB = add(compound1.TOTALPROB, old.TOTALPROB);\t\t\t\t\n\t\t\t\tfinal_map.put(mass, compound1);\n\t\t\t} else {\n\t\t\t\tfinal_map.put(mass, compound1);\n\t\t\t\tmass_list.add(mass);\n\t\t\t}\n\t\t}\n\t\tdouble[] double_list = new double[mass_list.size()];\n\t\tint i = 0;\n\t\titr = mass_list.iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tdouble mass = (Double)itr.next();\n\t\t\tdouble_list[i] = mass;\n\t\t\ti++;\n\t\t}\n\t\tArrays.sort(double_list);\n\t\t//System.out.println(double_list.length);\n\t\t//final_map.clear();\n\t\t\n\t\tdouble mass1 = double_list[0];;\n\t\tfor (i = 1 ;i < double_list.length; i++) {\n\t\t\t\n\t\t\tdouble mass2 = double_list[i];\n\t\t\tCOMPOUND compound1 = (COMPOUND)final_map.get(mass1);\n\t\t\tCOMPOUND compound2 = (COMPOUND)final_map.get(mass2);\n\t\t\tboolean update = false;\n\t\t\tif (ppm) {\n\t\t\t\t//System.out.println(mass1 + \"\\t\" + mass2);\n\t\t\t\t//if (check_within_ppm(compound1.MASS, compound2.MASS, new BIGNUM(10))) {\n\t\t\t\tif (check_within_ppm(compound1.MASS, compound2.MASS, new BIGNUM(ppm_val))) {\n\t\t\t\t\tupdate = true;\n\t\t\t\t\t\n\t\t\t\t\tif (isGreater(compound1.TOTALPROB, compound2.TOTALPROB)) {\n\t\t\t\t\t\t//System.out.println(\"Merge2: \" + compound1.TOTALPROB.getString() + \"\\t\" + compound2.TOTALPROB.getString());\n\t\t\t\t\t\tcompound1.TOTALPROB = add(compound1.TOTALPROB, compound2.TOTALPROB);\n\t\t\t\t\t\tfinal_map.remove(mass2);\n\t\t\t\t\t\tfinal_map.put(mass1, compound1);\t\t\n\t\t\t\t\t\tmass1 = mass1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcompound2.TOTALPROB = add(compound1.TOTALPROB, compound2.TOTALPROB);\n\t\t\t\t\t\tfinal_map.remove(mass1);\n\t\t\t\t\t\tfinal_map.put(mass2, compound2);\n\t\t\t\t\t\tmass1 = mass2;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t//System.out.println(mass1 + \"\\t\" + mass2);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//if (within_distance(compound1.MASS, compound2.MASS, new BIGNUM(0.1))) {\n\t\t\t\tif (within_distance(compound1.MASS, compound2.MASS, new BIGNUM(ppm_val))) {\n\t\t\t\t\tupdate = true;\n\t\t\t\t\tif (isGreater(compound1.TOTALPROB, compound2.TOTALPROB)) {\n\t\t\t\t\t\t//System.out.println(\"Merge2: \" + compound1.TOTALPROB.getString() + \"\\t\" + compound2.TOTALPROB.getString());\n\t\t\t\t\t\tcompound1.TOTALPROB = add(compound1.TOTALPROB, compound2.TOTALPROB);\n\t\t\t\t\t\tfinal_map.remove(mass2);\n\t\t\t\t\t\tfinal_map.put(mass1, compound1);\n\t\t\t\t\t\tmass1 = mass1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcompound2.TOTALPROB = add(compound1.TOTALPROB, compound2.TOTALPROB);\n\t\t\t\t\t\tfinal_map.remove(mass1);\n\t\t\t\t\t\tfinal_map.put(mass2, compound2);\n\t\t\t\t\t\tmass1 = mass2;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Merge2: \" + compound1.TOTALPROB.getString() + \"\\t\" + compound2.TOTALPROB.getString());\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t//System.out.println(mass1 + \"\\t\" + mass2);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!update) {\n\t\t\t\tmass1 = mass2;\n\t\t\t}\n\t\t}\n\t\t//System.out.println(final_map.size());\n\t\ti = 0;\n\t\tdouble_list = new double[final_map.size()];\n\t\titr = final_map.keySet().iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tdouble mass = (Double)itr.next();\n\t\t\tdouble_list[i] = mass;\n\t\t\ti++;\n\t\t}\n\t\tArrays.sort(double_list);\n\t\tfor (double mass: double_list) {\n\t\t\tfinal_list.add(final_map.get(mass));\n\t\t}\n\n\t\treturn final_list;\n\t}", "@Override\n\tpublic double evaluateExpression(ArrayList<MembershipFunction> inputs) {\n\t\treturn Math.max(left.evaluateExpression(inputs), right.evaluateExpression(inputs));\n\t}", "public void testCompare1() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.5D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions above the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "public double matchData() {\n\t\tArrayList<OWLDataProperty> labels1 = getDataProperties(ontology1);\n\t\tArrayList<OWLDataProperty> labels2 = getDataProperties(ontology2);\n\t\tfor (OWLDataProperty lit1 : labels1) {\n\t\t\tfor (OWLDataProperty lit2 : labels2) {\n\t\t\t\tif (LevenshteinDistance.computeLevenshteinDistance(TestAlign.mofidyURI(lit1.toString())\n\t\t\t\t\t\t, TestAlign.mofidyURI(lit2.toString()))>0.8){\n\t\t\t\t\treturn 1.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0.;\n\n\n\t}", "@Override\n protected double compareScoredCriteria(ScoredCriteriaMap wikiScoredCriteria) {\n double[] preferenceScores = ScoredCriteriaMap.unpackScores(wikiScoredCriteria);\n double[] wikiScores = ScoredCriteriaMap.unpackScores(this.getPreferenceScoredCriteriaMap());\n\n // Calculate the sum\n double sum = 0;\n for (int i = 0; i < Criterion.NUMBER_OF; i++) {\n sum = sum + (preferenceScores[i] - wikiScores[i]) * (preferenceScores[i] - wikiScores[i]);\n }\n return (1 / (1 + Math.sqrt(sum)));\n }", "@Override\n public double evaluate(Map<String, Double> assignment) throws Exception {\n return getExpression1().evaluate(assignment) - getExpression2().evaluate(assignment);\n }", "@Override\n\t\tpublic int compare(S o1, S o2) {\n\t\t\tif (getProb(o1) > getProb(o2))\n\t\t\t\treturn -1;\n\t\t\tif (getProb(o1) < getProb(o2))\n\t\t\t\treturn 1;\n\t\t\treturn Double.compare(o1.hashCode(), o2.hashCode());\n\t\t}", "public Double calculateSimilarity(OWLObject a, OWLObject b);", "public Double getProm(ArrayList<Evaluations> evaluations, int periods) {\n Double total = 0.0;\n Double sum = 0.0;\n ArrayList<Double> grades = new ArrayList<>();\n Double percentage = 0.0;\n for (int e = 0; e < evaluations.size(); e++) {\n if (Integer.parseInt(evaluations.get(e).getPeriods()) == periods) {\n percentage += Double.parseDouble(evaluations.get(e).getPercentage());\n }\n }\n Log.e(\"Porcentage\", String.valueOf(percentage));\n if (percentage == 100) {\n for (int i = 0; i < evaluations.size(); i++) {\n Double eva1 = 0.0;\n if (Integer.parseInt(evaluations.get(i).getPeriods()) == periods) {\n eva1 = Double.parseDouble(evaluations.get(i).getEvaluations()) * Double.parseDouble(evaluations.get(i).getPercentage()) / 100;\n Log.e(\"Nota\", String.valueOf(eva1));\n grades.add(eva1);\n }\n\n }\n for (Double grade : grades) {\n sum += grade;\n }\n\n total = sum;\n }\n\n return total;\n }", "public static void checkUpdateProbabilityOnAtomicRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 0; j < 8; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = base_relations[j];\r\n\t\t\t\r\n\t\t\t\tfor(int k = 0; k < 8; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = base_relations[k];\r\n\t\t\t\t\ttotal++;\r\n\t\t\t\t\t//int new_r3 = CompositionTable.LookUpTable(r1, r2);\r\n\t\t\t\t\tint new_r3 = SetOperators.intersection(r3, \r\n\t\t\t\t\t\t\t\tCompositionTable.LookUpTable(r1, r2));\r\n\t\t\t\t\t//System.out.println(new_r3);\r\n\t\t\t\t\tif( new_r3 != r3 )\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\tupdate++;\r\n\t\t\t\t\t\t//System.out.println(new_r3);\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\t\r\n\t\tSystem.out.println(\" total \" + total + \" update \" + update);\r\n\t\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "private double estimateNumericalPropertyProb(TemporalElementStats stat, String property,\n Comparator comp, PropertyValue value) {\n // property not sampled or not considered\n if (!stat.getNumericalPropertyStatsEstimation().containsKey(property)) {\n // if property not excluded, return very small value\n // if excluded, it is irrelevant, return 0.5\n return isPropertyRelevant(property) ? 0.0001 : 0.5;\n }\n Double[] propertyStats = stat.getNumericalPropertyStatsEstimation().get(property);\n NormalDistribution dist = new NormalDistribution(propertyStats[0],\n Math.max(Math.sqrt(propertyStats[1]), VERY_LOW_PROB));\n double doubleValue = ((Number) value.getObject()).doubleValue();\n double occurenceProb = stat.getNumericalOccurrenceEstimation().get(property);\n if (comp == EQ) {\n return VERY_LOW_PROB * occurenceProb;\n } else if (comp == NEQ) {\n return (1. - VERY_LOW_PROB) * occurenceProb;\n } else if (comp == LTE) {\n return dist.cumulativeProbability(doubleValue) * occurenceProb;\n } else if (comp == LT) {\n return occurenceProb * (dist.cumulativeProbability(doubleValue) - VERY_LOW_PROB);\n } else if (comp == GTE) {\n return occurenceProb *\n (1. - dist.cumulativeProbability(doubleValue) + VERY_LOW_PROB);\n } else {\n //GT\n return occurenceProb * (1. - dist.cumulativeProbability(doubleValue));\n }\n }", "@Override\n public double score(Map<BasedMining, Map<BasedMining, RateEvent>> preferences,\n BasedMining item1,\n BasedMining item2) {\n var sharedInnerItems = new ArrayList<BasedMining>();\n\n preferences.get(item1).forEach((innerItem, rateEvent) -> {\n if (preferences.get(item2).get(innerItem) != null) {\n sharedInnerItems.add(innerItem);\n }\n });\n\n// If they have no rating in common, return 0\n if (sharedInnerItems.size() > 0)\n return 0;\n\n// Add up the square of all the differences\n var sumOfSquares = preferences.get(item1).entrySet()\n .stream()\n .filter(entry -> preferences.get(item2).get(entry.getKey()) != null)\n .mapToDouble(entry -> Math.pow((entry.getValue().getRating() - preferences.get(item2).get(entry.getKey()).getRating()), 2.0))\n .sum();\n\n return 1 / (1 + sumOfSquares);\n }", "float getSpecialProb();", "public void testCompare2() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(0.6D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions below the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "public ArrayList <Double> outputsProbFromRuleSets (RuleSet ruleset2) {\n \n ArrayList <Double> res = new ArrayList <> (); \n double a;\n \n for (int i = 0; i < this.size(); i++) {\n \n \n for (int j = 0; j < ruleset2.size(); j++) {\n \n a = this.getRule(i).getProb();\n a = a * ruleset2.getRule(j).getProb();\n res.add(a);\n }\n }\n \n return res;\n }", "public static void printStats(List<Double> listOfRecords){\n\t\tdouble sum = 0.0;\n\t\tfor (double i:listOfRecords){\n\t\t\tsum += i;\n\t\t}\n\t\tSystem.out.println(\"Min - \" + Collections.min(listOfRecords) +\n\t\t\t\t\" Max - \" + Collections.max(listOfRecords) +\n\t\t\t\t\" Average - \" + (sum/listOfRecords.size()));\n\t}", "public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}", "public void calculateGrade(ArrayList<Assignment> list){\n int listSize = list.size();\n double currentGrade = 0.00;\n double projectedGrade = 100.00;\n double decimalWeight;\n\n for(int i = 0; i < listSize; i++) {\n if(list.isEmpty()){\n\n }else {\n decimalWeight = list.get(i).getWeight() / 100.00;\n if(list.get(i).getAverage() != 0) {\n projectedGrade = projectedGrade - (list.get(i).getWeight() - (decimalWeight * list.get(i).getAverage()));\n }\n currentGrade = currentGrade + (list.get(i).getAverage() * decimalWeight);\n }\n }\n\n classToView.setGrade(currentGrade);\n classToView.setProjectedGrade(projectedGrade);\n\n\n }", "public scala.collection.immutable.IndexedSeq<java.lang.Object> getQuantiles (scala.collection.Iterable<java.lang.Object> probabilities) { throw new RuntimeException(); }", "abstract double leftProbability();", "public void testCompare3() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.5D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(0.6D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions above the range < predictions below the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "public Comparison compare(double left, double right) {\n return checkResult(Double.compare(left, right));\n }", "public abstract List<Double> updatePopulations();", "public static void checkUpdateProbabilityOnHORNRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 1; j < 255; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = j;\r\n\t\t\t\tif(!MTS.BIMTS_H8.contains((Integer)r2))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t/*if(r2 == 1 || r2 == 2 || r2 == 4 || r2 == 8 || r2 == 16 || r2 == 32 || r2 == 64 || r2 == 128)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\t*/\r\n\t\t\t\telse\r\n\t\t\t\tfor(int k = 1; k < 255; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = k;\r\n\t\t\t\t\t//if(r3 == 1 || r3 == 2 || r3 == 4 || r3 == 8 || r3 == 16 || r3 == 32 || r3 == 64 || r3 == 128)\r\n\t\t\t\t\t\tif(!MTS.BIMTS_H8.contains((Integer)r3))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\ttotal++;\r\n\t\t\t\t\t\tint new_r3 = CompositionTable.LookUpTable(r1, r2);\r\n\t\t\t\t\t\tif(new_r3 < r3)\r\n\t\t\t\t\t\t\tupdate++;\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\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "@Test \n public void compareFunctionalEquals() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p1, p1);\n \n assertEquals(0, a);\n }", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "@Override\r\n\tpublic int compareTo(ListElements arg0) {\n\t\tint compareQuantity = ((ListElements) arg0).getScore(); \r\n\t\t \r\n\t\t//ascending order\r\n\t\treturn this.score - compareQuantity;\r\n\t}", "public Future<List<Object>> evaluateSimilarity(Serializable objectUnderComparison, List<Serializable> referenceObjects);", "static List<Integer> compareTriplets(List<Integer> a, List<Integer> b) {\r\n\t\tList<Integer> val = new ArrayList<>();\r\n\t\tint aScore = 0;\r\n\t\tint bScore = 0;\r\n\t\tfor (int i=0; i<3;i++) {\r\n\t\t\tfor (int j=0;j<3;j++) {\r\n\t\t\t\tif (i==j) {\r\n\t\t\t\t\tint tempA = a.get(i);\r\n\t\t\t\t\tint tempB = b.get(j);\r\n\t\t\t\t\tif (!(1<=tempA && tempA<=100 && 1<=tempB && 1<=tempB)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (tempA<tempB) {\r\n\t\t\t\t\t\tbScore += 1;\r\n\t\t\t\t\t} else if (tempA>tempB) {\r\n\t\t\t\t\t\taScore += 1;\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\tval.add(aScore);\r\n\t\tval.add(bScore);\r\n\t\treturn val;\r\n\t}", "public double evaluate(Map<String, Double> assignment) throws Exception {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return left.evaluate(assignment) * right.evaluate(assignment);\n }", "abstract double rightProbability();", "@Override\r\n public int compare(Pair<Integer, Double> o1, Pair<Integer, Double> o2) {\r\n return o2.getValue().compareTo(o1.getValue());\r\n }", "@Test\n public void testWeightedConsistency() {\n\n // See if this statistic computes weighted statistics\n // If not, skip this test\n UnivariateStatistic statistic = getUnivariateStatistic();\n if (!(statistic instanceof WeightedEvaluation)) {\n return;\n }\n\n // Create arrays of values and corresponding integral weights\n // and longer array with values repeated according to the weights\n final int len = 10; // length of values array\n final double mu = 0; // mean of test data\n final double sigma = 5; // std dev of test data\n double[] values = new double[len];\n double[] weights = new double[len];\n\n // Fill weights array with random int values between 1 and 5\n int[] intWeights = new int[len];\n final DiscreteDistribution.Sampler weightDist =\n UniformDiscreteDistribution.of(1, 5).createSampler(RandomSource.WELL_512_A.create(234878544L));\n for (int i = 0; i < len; i++) {\n intWeights[i] = weightDist.sample();\n weights[i] = intWeights[i];\n }\n\n // Fill values array with random data from N(mu, sigma)\n // and fill valuesList with values from values array with\n // values[i] repeated weights[i] times, each i\n final ContinuousDistribution.Sampler valueDist =\n NormalDistribution.of(mu, sigma).createSampler(RandomSource.WELL_512_A.create(64925784252L));\n List<Double> valuesList = new ArrayList<>();\n for (int i = 0; i < len; i++) {\n double value = valueDist.sample();\n values[i] = value;\n for (int j = 0; j < intWeights[i]; j++) {\n valuesList.add(Double.valueOf(value));\n }\n }\n\n // Dump valuesList into repeatedValues array\n int sumWeights = valuesList.size();\n double[] repeatedValues = new double[sumWeights];\n for (int i = 0; i < sumWeights; i++) {\n repeatedValues[i] = valuesList.get(i);\n }\n\n // Compare result of weighted statistic computation with direct computation\n // on array of repeated values\n WeightedEvaluation weightedStatistic = (WeightedEvaluation) statistic;\n TestUtils.assertRelativelyEquals(statistic.evaluate(repeatedValues),\n weightedStatistic.evaluate(values, weights, 0, values.length),\n 10E-12);\n\n // Check consistency of weighted evaluation methods\n Assert.assertEquals(weightedStatistic.evaluate(values, weights, 0, values.length),\n weightedStatistic.evaluate(values, weights), Double.MIN_VALUE);\n }", "@Override\n public double evaluate(Map<String, Double> assignment) throws Exception {\n\n double res = Math.log(getEx2().evaluate(assignment)) / Math.log(getEx2().evaluate(assignment));\n return res;\n }", "public static <T> void sample(List<T> inList, double prop, List<T> outList1, List<T> outList2) {\n if (prop < 0 || 1 < prop) {\n throw new IllegalStateException(\"Invalid proportion: \" + prop);\n }\n int numDev = (int) Math.ceil(prop * inList.size());\n log.info(\"Num train-as-dev examples: \" + numDev);\n boolean[] isDev = Sample.sampleWithoutReplacementBooleans(numDev, inList.size());\n for (int i = 0; i < inList.size(); i++) {\n if (isDev[i]) {\n outList1.add(inList.get(i));\n } else {\n outList2.add(inList.get(i));\n }\n }\n }", "public Long metricValue() {\n\t\t// Keep a list free from redundant subjects, that is with all its unique\n\t\t// elements\n\t\tList<ComparableSubject> lstUniqueSubjects = new ArrayList<ComparableSubject>();\n\t\tboolean isCurSubjectUnique;\n\t\tlong countCompared = 0;\n\t\tint mapSize = pMapSubjects.size();\n\t\tlogger.debug(\"Starting metric value computation, with \" + mapSize + \"instances...\");\n\n\t\t// int i = 0;\n\t\t// Compare each of the subjects with the ones already recognized as unique...\n\t\tfor (ComparableSubject curSubject : pMapSubjects.values()) {\n\t\t\tisCurSubjectUnique = true;\n\t\t\t// i++;\n\t\t\t// int z = 0;\n\t\t\tfor (ComparableSubject curUniqueSubject : lstUniqueSubjects) {\n\t\t\t\t// and if the subject currently examined is equivalent to one of the existing\n\t\t\t\t// unique subjects, do not regard it as unique, continue with the next one\n\t\t\t\tif (curSubject.isEquivalentTo(curUniqueSubject)) {\n\t\t\t\t\tisCurSubjectUnique = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// z++;\n\t\t\t\t// if ((z % 10000) == 0) System.out.println(\"compared \"+i + \"/\" + z);\n\t\t\t}\n\n\t\t\t// if ((i % 1000 == 0)) System.out.println(\"compared \"+i);\n\n\t\t\t// Finally, if the current subject is not equivalent to any of\n\t\t\t// the existing unique subjects, add it as unique\n\t\t\tif (isCurSubjectUnique) {\n\t\t\t\tlstUniqueSubjects.add(curSubject);\n\t\t\t}\n\n\t\t\tcountCompared++;\n\t\t\tif ((countCompared % 50000) == 0) {\n\t\t\t\tlogger.debug(\"Estimated value with \" + countCompared + \" compared instances: \"\n\t\t\t\t\t\t+ (((double) lstUniqueSubjects.size()) / ((double) mapSize)));\n\t\t\t}\n\t\t}\n\n\t\t// Compute metric value\n\t\t// long metricValue = ((long)lstUniqueSubjects.size()) /\n\t\t// ((long)pMapSubjects.size());\n\t\tlong metricValue = (((long) pMapSubjects.size()) > 0)\n\t\t\t\t? ((long) lstUniqueSubjects.size()) / ((long) pMapSubjects.size())\n\t\t\t\t: 0;\n\t\t// If any subject is equivalent to another, it will not be part of the list of\n\t\t// unique subjects, then\n\t\t// the size of this list is the \"Count of Unique Subjects\" required to calculate\n\t\t// the metric\n\t\treturn metricValue;\n\t}", "public void testCompare5() throws Exception {\r\n // smaller prizes\r\n ComponentCompetitionSituation situation1 = new ComponentCompetitionSituation();\r\n situation1.setPostingDate(new Date());\r\n situation1.setEndDate(new Date(situation1.getPostingDate().getTime() + 100000));\r\n situation1.setPrize(100D);\r\n\r\n // longer prizes\r\n ComponentCompetitionSituation situation2 = new ComponentCompetitionSituation();\r\n situation2.setPostingDate(new Date());\r\n situation2.setEndDate(new Date(situation2.getPostingDate().getTime() + 100000));\r\n situation2.setPrize(200D);\r\n\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation1, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation2, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // smaller prizes < longer prizes\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "private void EvalFitness(){\r\n _FitVal=0;\r\n for(int i=0; i<7;i++)\r\n for(int j=i+1;j<8;j++){\r\n if( _Data[i]==_Data[j]) _FitVal++;\r\n if(j-i==Math.abs(_Data[i]-_Data[j])) _FitVal++;\r\n }\r\n }", "protected double evaluate(IChromosome chromosome) {\n\t double score = 0;\n\t \t \n\t List dups = new ArrayList();\n\t int badSolution = 1;\n\n\t for (int i = 0; i < chromosome.size(); i++) {\n\n\t //IntegerGene agene = (IntegerGene) chromosome.getGene(i);\n\t //System.out.println(agene);\n\t int index = (Integer) chromosome.getGene(i).getAllele();\n\t \n\t if (dups.contains(index)) {\n\t badSolution = 0;\n\t } else {\n\t dups.add(index);\n\t }\n\n\t Equipo equipo = (Equipo) equipos.get(index);\n\t double genreScore = getGenreScore(equipo);\n\t if (genreScore == 0) {\n\t badSolution = 0;\n\t }\n\t score = (score+genreScore);\n\n\t }\n\t \n\t return (score * badSolution);\n\t }", "boolean listDoubleEquals(double[] list1, double[] list2) {\r\n\t\tassert(list1.length == list2.length);\r\n\t\tdouble error = 0;\r\n\t\tfor (int i=0 ; i < list1.length ; i++) {\r\n\t\t\terror += (list1[i] - list2[i]);\r\n\t\t}\r\n\t\t\r\n\t\treturn (error < 0.00001 && error > -0.00001);\r\n\t}", "@Override\n public double estimateTemporalProb(ElementType type1, Optional<String> label1,\n TimeSelector.TimeField field1, Comparator comp, ElementType type2,\n Optional<String> label2, TimeSelector.TimeField field2) {\n if (comp == EQ) {\n return VERY_LOW_PROB;\n } else if (comp == Comparator.NEQ) {\n return VERY_HIGH_PROB;\n }\n // stats for lhs (can be more than one, if no label is specified)\n List<TemporalElementStats> statsLhs;\n // same for rhs\n List<TemporalElementStats> statsRhs;\n\n // determine relevant statistics for rhs and lhs\n if (!(label1.isPresent())) {\n statsLhs = type1 == ElementType.VERTEX ?\n new ArrayList<>(vertexStats.values()) :\n new ArrayList<>(edgeStats.values());\n } else {\n statsLhs = type1 == ElementType.VERTEX ?\n new ArrayList<>(\n Collections.singletonList(vertexStats.getOrDefault(label1.get(), null))) :\n new ArrayList<>(\n Collections.singletonList(edgeStats.getOrDefault(label1.get(), null)));\n // label not in the DB\n if (statsLhs.get(0) == null) {\n return 0.;\n }\n }\n // same for rhs\n if (!(label2.isPresent())) {\n statsRhs = type2 == ElementType.VERTEX ?\n new ArrayList<>(vertexStats.values()) :\n new ArrayList<>(edgeStats.values());\n } else {\n statsRhs = type2 == ElementType.VERTEX ?\n new ArrayList<>(\n Collections.singletonList(vertexStats.getOrDefault(label2.get(), null))) :\n new ArrayList<>(\n Collections.singletonList(edgeStats.getOrDefault(label2.get(), null)));\n // label not in the DB\n if (statsRhs.get(0) == null) {\n return 0.;\n }\n }\n return estimateTimeSelectorComparison(statsLhs, field1, comp, statsRhs, field2);\n }", "@Override\n public int compareTo(UnconstrainedBidElement o) {\n return Double.compare(o.demandWatt, demandWatt);\n }", "private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}", "@Override\n public int compareTo(final DistributionMember o) {\n // This is the most important bit.\n if (!getValue().equals(o.getValue())) return (int) Math.signum(o.getValue() - getValue());\n // The rest is arbitrary and just designed to keep non-identical DistributionMembers from being equal\n final List<Double> fitVals = getFitnessValues();\n final List<Double> otherVals = o.getFitnessValues();\n for (int i = 0; i < fitVals.size(); ++i) {\n if (!fitVals.get(i).equals(otherVals.get(i))) return (int) Math.signum(otherVals.get(i) - fitVals.get(i));\n }\n final Genotype g = getGenotype();\n final Genotype og = o.getGenotype();\n return g.compareTo(og);\n }", "public void testComparisons() {\n\tfinal double small = Math.pow(2.0, -42);\n\n\t// Input: a, b\n\tdouble[][] input = new double[][] { new double[] { 1, 1 },\n\t\tnew double[] { 1, 2 }, new double[] { 1, 1 - small / 10 },\n\t\tnew double[] { 1, 1 + small / 10 },\n\n\t\tnew double[] { 0, 1 }, new double[] { 0, 0 },\n\t\tnew double[] { 0, -1 }, new double[] { 0, small / 100 },\n\t\tnew double[] { 2100000001.0001, 2100000001.0003 }, };\n\n\t// Output: less, equals\n\tboolean[][] output = new boolean[][] { new boolean[] { false, true },\n\t\tnew boolean[] { true, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, true },\n\n\t\tnew boolean[] { true, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, true }, };\n\n\tfor (int i = 0; i < input.length; ++i) {\n\t boolean l = StandardFloatingPointComparator.getDouble().less(\n\t\t input[i][0], input[i][1]);\n\t boolean e = StandardFloatingPointComparator.getDouble().equals(\n\t\t input[i][0], input[i][1]);\n\n\t boolean ne = StandardFloatingPointComparator.getDouble().notEquals(\n\t\t input[i][0], input[i][1]);\n\t boolean le = StandardFloatingPointComparator.getDouble()\n\t\t .lessOrEquals(input[i][0], input[i][1]);\n\t boolean g = StandardFloatingPointComparator.getDouble().greater(\n\t\t input[i][0], input[i][1]);\n\t boolean ge = StandardFloatingPointComparator.getDouble()\n\t\t .greaterOrEquals(input[i][0], input[i][1]);\n\n\t boolean less = output[i][0];\n\t boolean equals = output[i][1];\n\n\t boolean notEquals = !equals;\n\t boolean lessOrEquals = less || equals;\n\t boolean greater = !lessOrEquals;\n\t boolean greaterOrEquals = !less;\n\n\t assertFalse(l != less);\n\t assertFalse(g != greater);\n\t assertFalse(e != equals);\n\t assertFalse(ne != notEquals);\n\t assertFalse(le != lessOrEquals);\n\t assertFalse(ge != greaterOrEquals);\n\t}\n }", "public static double[] getProbDistribution(List<Double> xValues, List<Double> yValues, Tree[] trees){\n double fitnessSum = 0;\n double[] fitnessLst = new double[trees.length];\n for (int i = 0; i < trees.length; i++){\n double fitness = 1.0 / (getFitness(xValues, yValues, trees[i])) ;\n fitnessLst[i] = fitness;\n //System.out.println(fitness);\n fitnessSum += fitness;\n }\n double[] distribution = new double[trees.length];\n for (int i = 0; i < trees.length; i++){\n if (i == 0){\n distribution[i] = fitnessLst[i] / fitnessSum;\n }\n else {\n distribution[i] = distribution[i - 1] + (fitnessLst[i] / fitnessSum);\n }\n }\n return distribution;\n \n \n }", "private static double nonExactTest(double[] dataSub) {\r\n\t\t\r\n\t\t// copied from from R - https://svn.r-project.org/R/trunk/src/library/stats/R/wilcox.test.R\r\n\t\tdataSub = DataUtil.removeZeros(dataSub);\r\n\t\t\r\n\t\tfinal int n = dataSub.length;\r\n\t\tdouble[] dataSubAbs = new double[n];\r\n\t\tfor( int i=0; i<n; ++i )\r\n\t\t\tdataSubAbs[i] = Math.abs(dataSub[i]);\r\n\t\t\r\n\t\t// rank the absolute version of the dataA - dataB array on its own\r\n\t\tRankCalculator rankCalc = new RankCalculator(dataSubAbs);\r\n\t\tdouble [] ranks = rankCalc.getRanks();\r\n\t\tdouble totalR = 0;\r\n\t\t\r\n\t\t// add to dataList all values to establish which are > 0\t\t\r\n\t\t// List<Double> dataList = new ArrayList<Double>();\r\n\t\tMultiset<Double> dataList = HashMultiset.create();\t\t\r\n\t\tfor( int i=0; i<n; ++i )\r\n\t\t\tdataList.add(dataSub[i]);\r\n\t\t\r\n\t\tfor( int i=0; i<n; ++i ) { \r\n\t\t\t//add the ranks to totalR of all positive values\r\n\t\t\tfinal double val = dataSubAbs[i];\r\n\t\t\tif( val != 0 )\r\n\t\t\t\ttotalR += ranks[i];\r\n\t\t\tif( dataList.contains( -val ) ){\r\n\t\t\t\t// Don't add the rank (i.e. subtract the rank that we've just added) \r\n\t\t\t\t// if it is associated with a negative value\r\n\t\t\t\ttotalR -= ranks[i];\r\n\t\t\t\t// dataList.remove(new Double(-val));\r\n\t\t\t\tdataList.remove( -val );\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Add up ties\r\n\t\tList<Integer> ties = rankCalc.getTies();\r\n\t\t// ListIterator<Integer> tiesIter = ties.listIterator();\r\n\t\tdouble tiesTotal = 0;\r\n\t\t// while( tiesIter.hasNext() ){\r\n\t\tfor( Integer val : ties ){\t\t\r\n\t\t\t// double val = tiesIter.next();\r\n\t\t\ttiesTotal += (Math.pow(val, 3) - val);\r\n\t\t}\r\n\t\t\r\n final double sigma = Math.sqrt(n * (n + 1) * (2 * n + 1) / 24 - tiesTotal / 48);\r\n double z = totalR - n * (n + 1)/4.0;\r\n // continuity correction - assuming two sided\r\n if(z > 0)\r\n \tz -= 0.5;\r\n else\r\n \tz += 0.5;\r\n z /= sigma;\r\n \r\n // get the p-value. Code taken from: \r\n // org.apache.commons.math3.stat.inference.WilcoxonSignedRankTest\r\n NormalDistribution standardNormal = new NormalDistribution(0, 1); \r\n return 2*Math.min(standardNormal.cumulativeProbability(z),\r\n \tstandardNormal.cumulativeProbability(-z));\r\n\t}", "@Test\n\tpublic void testCrossover() {\n\t\tint pivot = 5;\n\t\tint size = g10.getUnits().size();\n\t\tArrayList<GenomeDouble> expectedWeights1;\n\t\tArrayList<GenomeDouble> expectedWeights2;\n\t\t\n\t\texpectedWeights1 = new ArrayList<GenomeDouble>(g10.getUnits().size());\n\t\texpectedWeights2 = new ArrayList<GenomeDouble>(g10_2.getUnits().size());\n\t\t\n\t\texpectedWeights1.addAll(g10.getUnits().subList(0, pivot));\n\t\texpectedWeights1.addAll(g10_2.getUnits().subList(pivot, size));\n\t\texpectedWeights2.addAll(g10_2.getUnits().subList(0, pivot));\n\t\texpectedWeights2.addAll(g10.getUnits().subList(pivot, size));\n\t\t\n\t\tList<Genome<GenomeDouble>> results = Genome.crossover(g10, g10_2, 0.7, 10);\n\t\tassertEquals(expectedWeights1, results.get(0).getUnits());\n\t\tassertEquals(expectedWeights2, results.get(1).getUnits());\n\t}", "public double getScore() {\n int as = this.attributes.size(); // # of attributes that were matched\n\n // we use thresholding ranking approach for numInstances to influence the matching score\n int instances = this.train.numInstances();\n int inst_rank = 0;\n if (instances > 100) {\n inst_rank = 1;\n }\n if (instances > 500) {\n inst_rank = 2;\n }\n\n return this.p_sum + as + inst_rank;\n }", "private void comparePoints(double[] firstP, double[] secondP) {\n assertEquals(firstP.length, secondP.length);\n\n for(int j=0; j<firstP.length; j++) {\n assertEquals(\"j = \"+j, firstP[j], secondP[j], TOLERANCE);\n }\n }", "private float calculateSimilarityScore(int numOfSuspiciousNodesInA, int numOfSuspiciousNodesInB) {\n\t\t// calculate the similarity score\n\t\treturn (float) (numOfSuspiciousNodesInA + numOfSuspiciousNodesInB) \n\t\t\t\t/ (programANodeList.size() + programBNodeList.size()) * 100;\n\t}", "@Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }", "@Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }", "@Override\n public int compare(Prediction lhs, Prediction rhs) {\n return Float.compare(rhs.getConfidence(), lhs.getConfidence());\n }", "public static void main(String[] args) {\n List<EntityProfile>[] profiles;\r\n if (args.length > 0) {\r\n BASEPATH = args[0] + \"/\";\r\n profiles = Utilities.getEntities(BASEPATH, DATASET, CLEAN);\r\n } else {\r\n //profiles = Utilities.getEntities(BASEPATH, DATASET, CLEAN);\r\n profiles = Utilities.getEntities(DATASET, CLEAN);\r\n }\r\n\r\n Instant start = Instant.now();\r\n\r\n ProgressiveSnHeap psn = new ProgressiveSnHeap(profiles, WeightingSchemeSn.MINHASH, false, 50);\r\n // weighted psn needs a block collection and a wighing scheme\r\n //psn.buildEntityList(50);\r\n // passing no argument simple psn is performed\r\n //psn.buildEntityList();\r\n\r\n //MinMaxPriorityQueue<Comparison> comparisons = psn.get_heap();\r\n\r\n double num_comparisons = 0;\r\n double comparisons_old = 0;\r\n //AbstractDuplicatePropagation adp = Utilities.getGroundTruth(BASEPATH, DATASET, CLEAN);\r\n AbstractDuplicatePropagation adp = Utilities.getGroundTruth(DATASET, CLEAN);\r\n\r\n double pc = 0.0;\r\n double pc_old = 0.0;\r\n double pq = 0.0;\r\n double detectedDuplicates = 0;\r\n\r\n double w_old = Double.MAX_VALUE;\r\n //while (!comparisons.isEmpty()) {\r\n while (psn.hasNext()) {\r\n //Comparison c = comparisons.pollFirst();\r\n Comparison c = (Comparison) psn.next();\r\n //double w = c.getUtilityMeasure();\r\n //if (w_old < w) {\r\n // System.out.println(\"error weight: \" + w_old + \" \" + w);\r\n //}\r\n //System.out.println(\"weight: \" + w);\r\n //w_old = w;\r\n\r\n\r\n num_comparisons++;\r\n detectedDuplicates = adp.getNoOfDuplicates();\r\n pc = ((double) detectedDuplicates) / adp.getExistingDuplicates();\r\n if ((pc - pc_old) > .1) {\r\n pc_old = pc;\r\n //pq = detectedDuplicates / (double) comparisons;\r\n System.out.println(\"pc: \" + Math.round(pc * 100) / 100.0 + \" - \" + (num_comparisons - comparisons_old));\r\n comparisons_old = num_comparisons;\r\n }\r\n adp.isSuperfluous(c);\r\n\r\n if (pc > 0.8) {\r\n break;\r\n }\r\n }\r\n\r\n detectedDuplicates = adp.getNoOfDuplicates();\r\n pc = ((double) detectedDuplicates) / adp.getExistingDuplicates();\r\n pq = detectedDuplicates / (double) num_comparisons;\r\n\r\n System.out.println(\"partial res1\");\r\n System.out.println(\"pc: \" + pc);\r\n System.out.println(\"pq: \" + pq);\r\n }", "public int compare(Object o1, Object o2) {\n int[] p1 = (int[]) o1;\n int[] p2 = (int[]) o2;\n\n // compare sum of axis distances for each priority\n for (int p=MAX_PRIORITY; p>=MIN_PRIORITY; p--) {\n int dist1 = 0, dist2 = 0;\n for (int i=0; i<p1.length; i++) {\n if (priorities[i] == p) {\n dist1 += distance(i, p1[i]);\n dist2 += distance(i, p2[i]);\n }\n }\n int diff = dist1 - dist2;\n if (diff != 0) return diff;\n }\n\n // compare number of diverging axes for each priority\n for (int p=MAX_PRIORITY; p>=MIN_PRIORITY; p--) {\n int div1 = 0, div2 = 0;\n for (int i=0; i<p1.length; i++) {\n if (priorities[i] == p) {\n if (p1[i] != 0) div1++;\n if (p2[i] != 0) div2++;\n }\n }\n int diff = div1 - div2;\n if (diff != 0) return diff;\n }\n\n return 0;\n }", "public Object eval(Individual ind)\r\n {\r\n BinaryIndividual bi = (BinaryIndividual)ind;\r\n int partialFitness = 0;\r\n int distance = 0;\r\n double fitness = 0.0;\r\n\r\n\t for (int i=0; i<100; i++){\r\n\r\n\t distance = 0;\r\n\r\n\t for (int j=0; j<100; j++){\r\n\t if (!((BinaryIndividual)target[i]).getBooleanAllele(j)^bi.getBooleanAllele(j)) { \r\n\t\t distance++;\r\n\t }\r\n \r\n\t if (distance > partialFitness) {\r\n\t partialFitness = distance;\r\n\t }\r\n\t }\r\n }\r\n\r\n fitness = (double)partialFitness/100.0;\r\n return new Double(fitness);\r\n \r\n\r\n }", "public int compare(Dataset object1, Dataset object2){\n if(object1.getAttributeCount() != candidate.getAttributeCount() ||\n object2.getAttributeCount() != candidate.getAttributeCount()){\n return 0;\n }\n\n double dist1 = 0.0, dist2 = 0.0;\n double tmp1 = 0.0, tmp2 = 0.0;\n\n for(int i = 0; i < candidate.getAttributeCount(); i++){\n if(candidate.getOutputColumnCount() == (i+1)){\n continue;\n }\n\n Attribute ac = candidate.getAttribute(i);\n Attribute a1 = object1.getAttribute(i);\n Attribute a2 = object2.getAttribute(i);\n\n if(ac.getType() == AttributeTypes.TEXT){\n dist1 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a1.getValue());\n dist2 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a2.getValue());\n }else{\n /*\n double acDouble = 0.0;\n double a1Double = 0.0;\n double a2Double = 0.0;\n switch(ac.getType()){\n case INTEGER: acDouble = (double)((Integer)ac.getValue()).intValue(); break;\n case DECIMAL: acDouble = (double)ac.getValue();\n }\n switch(a1.getType()){\n case INTEGER: a1Double = (double)((Integer)a1.getValue()).intValue(); break;\n case DECIMAL: a1Double = (double)a1.getValue();\n }\n switch(a2.getType()){\n case INTEGER: a2Double = (double)((Integer)a2.getValue()).intValue(); break;\n case DECIMAL: a2Double = (double)a2.getValue();\n }*/\n double acDouble = (double)ac.getValue();\n double a1Double = (double)a1.getValue();\n double a2Double = (double)a2.getValue();\n\n tmp1 += Math.pow(a1Double-acDouble, 2);\n tmp2 += Math.pow(a2Double-acDouble, 2);\n }\n }\n\n dist1 += Math.sqrt(tmp1);\n dist2 += Math.sqrt(tmp2);\n\n if (dist1 > dist2) {\n return 1;\n }\n if (dist1 < dist2) {\n return -1;\n }\n return 0;\n }", "double[] calculateProbabilities(LACInstance testInstance) throws Exception\n\t{\n\t\tdouble[] probs;\n\t\tdouble[] scores = calculateScores(testInstance);\n\t\t\n\t\tif(scores != null)\n\t\t{\n\t\t\tprobs = new double[scores.length];\n\t\t\tdouble scoreSum = 0.0;\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tscoreSum += scores[i];\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tprobs[i] = scores[i] / scoreSum;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSet<Integer> allClasses = trainingSet.getAllClasses();\n\t\t\tprobs = new double[allClasses.size()];\n\t\t\tfor (Integer clazz : allClasses) \n\t\t\t{\n\t\t\t\tdouble count = trainingSet.getInstancesOfClass(clazz).size();\n\t\t\t\tprobs[clazz] = (count / ((double) trainingSet.length()));\n\t\t\t}\n\t\t}\n\n\t\treturn probs ;\n\t}", "private double[] evaluateProbability(double[] data) {\n\t\tdouble[] prob = new double[m_NumClasses], v = new double[m_NumClasses];\n\n\t\t// Log-posterior before normalizing\n\t\tfor (int j = 0; j < m_NumClasses - 1; j++) {\n\t\t\tfor (int k = 0; k <= m_NumPredictors; k++) {\n\t\t\t\tv[j] += m_Par[k][j] * data[k];\n\t\t\t}\n\t\t}\n\t\tv[m_NumClasses - 1] = 0;\n\n\t\t// Do so to avoid scaling problems\n\t\tfor (int m = 0; m < m_NumClasses; m++) {\n\t\t\tdouble sum = 0;\n\t\t\tfor (int n = 0; n < m_NumClasses - 1; n++)\n\t\t\t\tsum += Math.exp(v[n] - v[m]);\n\t\t\tprob[m] = 1 / (sum + Math.exp(-v[m]));\n\t\t\tif (prob[m] == 0)\n\t\t\t\tprob[m] = 1.0e-20;\n\t\t}\n\n\t\treturn prob;\n\t}", "public Comparator<Integer> comparator() {\n return new Comparator<Integer>() {\n @Override\n public int compare(Integer o1, Integer o2) {\n Http2PriorityNode n1 = nodesByID.get(o1);\n Http2PriorityNode n2 = nodesByID.get(o2);\n if(n1 == null && n2 == null) {\n return 0;\n }\n if(n1 == null) {\n return -1;\n }\n if(n2 == null) {\n return 1;\n }\n //do the comparison\n //this is kinda crap, but I can't really think of any better way to handle this\n\n double d1 = createWeightingProportion(n1);\n double d2 = createWeightingProportion(n2);\n return Double.compare(d1, d2);\n }\n };\n }", "public ArrayList<Person> hashDoubleDeduplication(){\n\tArrayList<Person> unduplicated1 = new ArrayList<>();\n\tDoubleHashMap<String, Person> map = new DoubleHashMap(SIZE);\n\t//The probe count is adapted to the implementation of the maps\n\t // and use of public instance variable probes() \n\tdouble average=0.0;\n\tint max = 0;\n\tint insertCount =0;\n\tfor(int i=0; i< this.lst.size(); i++){\n\t map.put(lst.get(i).getRef(),lst.get(i));\n\t //count insertions:\n\t insertCount++;\n\t //increment sum of probes:\n\t average += map.probes;\n\t //compute max # of probes:\n\t if ( map.probes >= max) max = map.probes;\n\t}\n\t//The following lines of codes were commented after usage in the first part of the assignment:\n\t//System.out.println (\"Average number of probes: \"+ average/insertCount );\n\t//System.out.println(\"Max number of probes: \"+ max);\n\t//System.out.println(\"Load-factor: \"+ (double)map.size()/SIZE );\n\t//initialize iterator to collect singular suspects from the map:\n\tIterator<Person> coll = map.values().iterator();\n\twhile(coll.hasNext()){\n\t Person suspect = coll.next();\n\t unduplicated1.add(suspect);\n\t}\n\treturn unduplicated1;\n }", "public void testCompare6() throws Exception {\r\n ComponentCompetitionSituation situation1 = new ComponentCompetitionSituation();\r\n situation1.setPostingDate(new Date());\r\n situation1.setEndDate(new Date(situation1.getPostingDate().getTime() + 100000));\r\n situation1.setPrize(200D);\r\n\r\n ComponentCompetitionSituation situation2 = new ComponentCompetitionSituation();\r\n situation2.setPostingDate(new Date());\r\n situation2.setEndDate(new Date(situation2.getPostingDate().getTime() + 100000));\r\n situation2.setPrize(200D);\r\n\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation1, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation2, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be == 0\r\n assertTrue(\"result of compare\", result == 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "public static int generateScore(LinkedList<MatchInterface> subClasses,\r\n\t\t\tLinkedList<ElementMatch> elements) {\r\n\t\tdouble total_weight = 0;\r\n\t\tint score = 0;\r\n\r\n\t\tElementMatch el;\r\n\t\tMatchInterface mat;\r\n\t\tIterator<ElementMatch> iterel;\r\n\t\tIterator<MatchInterface> itermatch;\r\n\r\n\t\titerel = elements.iterator();\r\n\t\twhile (iterel.hasNext()) {\r\n\t\t\tel = iterel.next();\r\n\t\t\ttotal_weight += el.getWeight();\r\n\t\t}\r\n\t\titermatch = subClasses.iterator();\r\n\t\twhile (itermatch.hasNext()) {\r\n\t\t\tmat = itermatch.next();\r\n\t\t\ttotal_weight += mat.getWeight();\r\n\t\t}\r\n\t\tdouble temp;\r\n\t\tdouble elmlocalscore = 0.0;\r\n\r\n\t\titerel = elements.iterator();\r\n\t\twhile (iterel.hasNext()) {\r\n\t\t\tel = iterel.next();\r\n\t\t\ttemp = (el.getWeight() / total_weight) * 2000\r\n\t\t\t\t\t* el.numMatchedEntries()\r\n\t\t\t\t\t/ (el.numEntryFirstUser() + el.numEntrySecondUser());\r\n\r\n\t\t\ttry {\r\n\t\t\t\telmlocalscore = 2000 * el.numMatchedEntries()\r\n\t\t\t\t\t\t/ (el.numEntryFirstUser() + el.numEntrySecondUser());\r\n\t\t\t} catch (ArithmeticException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t// e.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\tif (temp >= 0 && temp <= 1000) {\r\n\t\t\t\tscore += temp;\r\n\t\t\t\tel.setScore(elmlocalscore);\r\n\t\t\t} else {\r\n\t\t\t\tel.setScore(0);\r\n\t\t\t}\r\n\t\t}\r\n\t\titermatch = subClasses.iterator();\r\n\t\twhile (itermatch.hasNext()) {\r\n\t\t\tmat = itermatch.next();\r\n\t\t\tscore += (mat.getWeight() / total_weight) * mat.generateScore();\r\n\t\t}\r\n\t\treturn score;\r\n\t}", "private ArrayList<ParCharProb> calcularProbabilidadLista(ArrayList<ParCharProb> lista) {\n\t\tdouble cantidadElementos = 0;\r\n\t\tParCharProb par;\r\n\t\tIterator<ParCharProb> it = lista.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tpar = it.next();\r\n\t\t\tcantidadElementos += par.getFrecuencia();\r\n\t\t}\r\n\t\t\r\n\t\tit = lista.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tpar = it.next();\r\n\t\t\tpar.setProbabilidad((double) par.getFrecuencia()/(double) cantidadElementos);\r\n\t\t}\r\n\t\treturn lista;\r\n\t}", "private double computeInExpression(InExpression exp, DataRow data) {\n\n ItemsList itemsList = exp.getRightItemsList();\n if (itemsList instanceof ExpressionList) {\n ExpressionList list = (ExpressionList) itemsList;\n\n if (exp.isNot()) {\n\n double max = 0;\n\n for (Expression element : list.getExpressions()) {\n ComparisonOperator op = new NotEqualsTo();\n op.setLeftExpression(exp.getLeftExpression());\n op.setRightExpression(element);\n\n double dist = computeComparisonOperator(op, data);\n if (dist > max) {\n max = dist;\n break; // no need to look at others, as no gradient\n }\n }\n\n return max;\n\n } else {\n\n double min = Double.MAX_VALUE;\n\n for (Expression element : list.getExpressions()) {\n ComparisonOperator op = new EqualsTo();\n op.setLeftExpression(exp.getLeftExpression());\n op.setRightExpression(element);\n\n double dist = computeComparisonOperator(op, data);\n if (dist < min) {\n min = dist;\n }\n }\n\n return min;\n }\n\n } else {\n return cannotHandle(exp);\n }\n }", "public void evaluate() {\n for (Chromosome chromo : chromosomes) {\n double chromoGH = chromo.getTotalGH();\n if (chromo.isValid()) {\n this.validChromosomes++;\n if (chromoGH > this.getBestScore()) {\n this.bestScore = chromoGH;\n this.setBestChromo(chromo);\n }\n }\n //Log.debugMsg(chromo.getTotalGH().toString());\n// this.map.put(chromoGH, chromo);\n }\n }", "public static double getPrinciple(List<? extends Number> numbers)\r\n {\r\n double val = 0.0;\r\n for (Number num : numbers)\r\n val += num.doubleValue();\r\n return val;\r\n\r\n }", "IntervalTupleList evaluate(double low, double high);", "@Test\n void totalPercentageOneProduct() {\n allProducts.add(new Product(null, 1, \"productTest\", 10.0, null, null, null,null));\n allOrderLines.add(new OrderLine(new Product(1), null, 2, 10.0));\n\n ArrayList<ProductIncome> productIncomes = productBusiness.computeProductsIncome(allProducts, allOrderLines);\n productIncomes.get(0).calculPercentage();\n assertEquals(100.0, productIncomes.get(0).getPercentage(), 0);\n }", "public BigDecimal getPercentageProfitPList();", "public static void checkProbs(double[] keyProbs, double[] missProbs) {\n\t\tdouble[] allProbs = new double[keyProbs.length + missProbs.length];\n\t\tint i = 0;\n\t\tfor (double keyProb : keyProbs)\n\t\t\tallProbs[i++] = keyProb;\n\t\tfor (double missProb : missProbs)\n\t\t\tallProbs[i++] = missProb;\n\t\t// When summing doubles, sum from smallest to greatest\n\t\t// to reduce round-off error.\n\t\tArrays.sort(allProbs);\n\t\tdouble totalProb = 0;\n\t\tfor (double prob : allProbs)\n\t\t\ttotalProb += prob;\n\t\t// Don't compare doubles for equality directly. Check that their\n\t\t// difference is less than some epsion.\n\t\tif (Math.abs(1.0 - totalProb) > .0001)\n\t\t\tthrow new BadOptimalBSTInputException(\"Probabilities total to \" + totalProb);\n\t}", "protected Element evalAssurance(Assurance ass){\n\t\tRecord r1 = ass.getLeftRecord();\n\t\tRecord r2 = ass.getRightRecord();\n\t\tOperator op = ass.getOperator();\n\t\tElement an = el(\"bpws:assign\");\n\t\tif (r1.getType() == RecordType.FORMULAR)\n\t\t\tan.appendChild(setExpr(r1.getFormular(), \"nswomoxsd:leftValue\"));\n\t\tif (r2.getType() == RecordType.FORMULAR)\n\t\t\tan.appendChild(setExpr(r2.getFormular(), \"nswomoxsd:rightValue\"));\n\t\tan.appendChild(\n\t\t\tsetExpr(\n\t\t\t\tgetMyVarPath(\"/nswomoxsd:leftValue\") + \n\t\t\t\top.value() +\n\t\t\t\tgetMyVarPath(\"nswomoxsd:rightValue\"),\n\t\t\t\t\"nswomoxsd:value\"\n\t\t\t)\n\t\t);\n\t\treturn an;\n\t}", "@Override\n public int compareTo(Score other) {\n return (int) (100 * (this.getAsDouble() - other.getAsDouble()));\n }", "@Override\n public int compareTo(Individual individual) {\n return individual.getFitness() - this.getFitness() ;\n }", "public LessThan() {\n this.toCompare = new double[2];\n this.index = 0;\n }", "public double[] getProbabilities() { return getProbabilities((int[])null); }", "public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}", "public void sortElements(Comparator<TLProperty> comparator);", "public void computeExpectedChildrenProperties() {\n\t\t\n\t\tSet<Attribute<? extends IValue>> parentAttributes = new HashSet<>(popParents.getPopulationAttributes());\n\t\tparentAttributes.retainAll(pMatching.getDimensions());\n\t\t\n\t\tlogger.info(\"computing for the dimensions: {}\", parentAttributes);\n\t\t\n\t\t/*\n\t\t * \n\t\tMap<Set<Attribute<? extends IValue>>,Integer> parents2matchingCandidates = new HashMap<>();\n\t\tfor (Entry<ACoordinate<Attribute<? extends IValue>, IValue>, AControl<Double>> e: \n\t\t\tpMatching.getMatrix().entrySet()) {\n\t\t\t\n\t\t}\n\t\t\n\t\tGosplContingencyTable c = new GosplContingencyTable(pMatching.getDimensions());\n\t\t// for each coordinate of the probabilities table \n\t\t// 1) compute the \n\t\t * \n\t\t */\n\n\t\t\n\t}", "int getEvaluations();", "public int compareTo(DerivationElement o) {\n\t\treturn (this.logProb>o.logProb)? -1 : (this.logProb==o.logProb)? 0 : 1; \n\t }", "public List<ModelingSubmissionComparisonDTO> compareSubmissions(List<ModelingSubmission> modelingSubmissions, double minimumSimilarity, int minimumModelSize,\n int minimumScore) {\n\n Map<UMLDiagram, ModelingSubmission> models = new HashMap<>();\n ObjectMapper objectMapper = new ObjectMapper();\n\n for (var modelingSubmission : modelingSubmissions) {\n if (!modelingSubmission.isEmpty(objectMapper)) {\n try {\n log.debug(\"Build UML diagram from json\");\n UMLDiagram model = UMLModelParser.buildModelFromJSON(parseString(modelingSubmission.getModel()).getAsJsonObject(), modelingSubmission.getId());\n if (model.getAllModelElements().size() >= minimumModelSize) {\n models.put(model, modelingSubmission);\n }\n }\n catch (IOException e) {\n log.error(\"Parsing the modeling submission \" + modelingSubmission.getId() + \" did throw an exception:\", e);\n }\n }\n }\n\n log.info(\"Found \" + models.size() + \" modeling submissions with at least \" + minimumModelSize + \" elements to compare\");\n\n final List<ModelingSubmissionComparisonDTO> comparisonResults = new ArrayList<>();\n\n var nonEmptyModelsList = new ArrayList<>(models.keySet());\n\n // it is intended to use the classic for loop here, because we only want to check similarity between two different submissions once\n for (int i = 0; i < nonEmptyModelsList.size(); i++) {\n for (int j = i + 1; j < nonEmptyModelsList.size(); j++) {\n var model1 = nonEmptyModelsList.get(i);\n var model2 = nonEmptyModelsList.get(j);\n final double similarity = model1.similarity(model2);\n log.debug(\"Compare result \" + i + \" with \" + j + \": \" + similarity);\n if (similarity < minimumSimilarity) {\n // ignore comparison results with too small similarity\n continue;\n }\n\n var submission1 = models.get(model1);\n var submission2 = models.get(model2);\n if (submission1.getResult() != null && submission1.getResult().getScore() != null && submission1.getResult().getScore() < minimumScore\n && submission2.getResult() != null && submission2.getResult().getScore() != null && submission2.getResult().getScore() < minimumModelSize) {\n // ignore comparison results with too small scores\n continue;\n }\n\n log.info(\"Found similar models \" + i + \" with \" + j + \": \" + similarity);\n\n var comparisonResult = new ModelingSubmissionComparisonDTO();\n var element1 = new ModelingSubmissionComparisonElement().submissionId(submission1.getId()).size(model1.getAllModelElements().size());\n var element2 = new ModelingSubmissionComparisonElement().submissionId(submission2.getId()).size(model2.getAllModelElements().size());\n element1.studentLogin(((StudentParticipation) submission1.getParticipation()).getParticipantIdentifier());\n element2.studentLogin(((StudentParticipation) submission2.getParticipation()).getParticipantIdentifier());\n comparisonResult.setElement1(element1);\n comparisonResult.setElement2(element2);\n comparisonResult.similarity(similarity);\n if (submission1.getResult() != null) {\n comparisonResult.getElement1().score(submission1.getResult().getScore());\n }\n if (submission2.getResult() != null) {\n comparisonResult.getElement2().score(submission2.getResult().getScore());\n }\n\n comparisonResults.add(comparisonResult);\n }\n }\n\n log.info(\"Found \" + comparisonResults.size() + \" similar modeling submission combinations ( > \" + minimumSimilarity + \")\");\n\n return comparisonResults;\n }", "@Test\n public void testGetPercentageForN() throws FileNotFoundException {\n nTupleComparator = new NTupleComparator(\"syns\", \"file1\", \"file2\", 2);\n assertEquals(nTupleComparator.getPercentage(), 100);\n nTupleComparator = new NTupleComparator(\"syns\", \"file1\", \"testfile2\", 2);\n assertEquals(nTupleComparator.getPercentage(), (double) 2 * 100 / 3);\n nTupleComparator = new NTupleComparator(\"syns\", \"file1\", \"file2\", 4);\n assertEquals(nTupleComparator.getPercentage(), 100);\n nTupleComparator = new NTupleComparator(\"syns\", \"file1\", \"testfile2\", 4);\n assertEquals(nTupleComparator.getPercentage(), 0);\n }", "public boolean compareAverages(Average<? extends Number> other){\n\t\tif(this.computeAverage().compareTo(other.computeAverage()) == 0){ //Double.compareTo() returns 0 if two Doubles have the same v\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "@Override\n public double similarity(double[] data1, double[] data2) {\n\t\tdouble distance;\n\t\tint i;\n\t\tif(MATHOD ==1){\n\t\t\t i = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.pow(Math.abs(data1[i] - data2[i]), q);\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==2){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += ( Math.abs(data1[i] - data2[i]) )/( Math.abs(data1[i]) + Math.abs(data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==3){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.abs( (data1[i] - data2[i]) / ( 1 + data1[i] + data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn Math.pow(distance, 1 / q);\n }", "private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}", "@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}" ]
[ "0.6328605", "0.62810785", "0.5980775", "0.5881799", "0.5666061", "0.5396976", "0.53865814", "0.534969", "0.5302866", "0.52968943", "0.52686423", "0.51991236", "0.51865286", "0.5182825", "0.51785314", "0.5172783", "0.5169077", "0.5143732", "0.5117793", "0.5113213", "0.51026756", "0.5101731", "0.5097784", "0.50778115", "0.50731856", "0.5024884", "0.49739426", "0.49730223", "0.49650925", "0.4934784", "0.49315733", "0.49175248", "0.49104166", "0.4906836", "0.49030697", "0.48984626", "0.48870265", "0.48733333", "0.4854911", "0.48429507", "0.4840616", "0.48318347", "0.48299026", "0.4824693", "0.48196253", "0.48163754", "0.4815461", "0.48146328", "0.47804782", "0.4761759", "0.4743728", "0.47416982", "0.47149917", "0.47139868", "0.47125083", "0.47052658", "0.4702966", "0.47029093", "0.4701738", "0.4687222", "0.46758837", "0.46646798", "0.46488667", "0.46415472", "0.46415472", "0.46401596", "0.4637416", "0.46347526", "0.46340632", "0.46163437", "0.461418", "0.46136084", "0.46134976", "0.46102372", "0.46075732", "0.46048307", "0.46016258", "0.45861283", "0.45849884", "0.45767707", "0.45750216", "0.45677996", "0.45642745", "0.4558701", "0.45569497", "0.45562756", "0.45498613", "0.4542578", "0.4541725", "0.45416945", "0.45412162", "0.452993", "0.45229074", "0.4520735", "0.45207086", "0.45104447", "0.45085832", "0.45024765", "0.44976744", "0.44966826" ]
0.6813901
0
Estimates the probability that a comparison between numerical properties holds. LHS and RHS are described by one statistics element. They are assumed to be independent, otherwise the estimation may not be reasonable.
private double estimateNumericalPropertyProb(TemporalElementStats stats1, String property1, Comparator comp, TemporalElementStats stats2, String property2) { Map<String, Double[]> map1 = stats1.getNumericalPropertyStatsEstimation(); Map<String, Double[]> map2 = stats2.getNumericalPropertyStatsEstimation(); Double[] propStats1 = map1.getOrDefault(property1, null); Double[] propStats2 = map2.getOrDefault(property2, null); if (propStats1 == null || propStats2 == null) { return 0.0001; } double occurrence = stats1.getNumericalOccurrenceEstimation() .getOrDefault(property1, 0.) * stats2.getNumericalOccurrenceEstimation().getOrDefault(property2, 0.); // assuming both properties are normally distributed, // their difference is also normally distributed NormalDistribution differenceDist = new NormalDistribution( propStats1[0] - propStats2[0], Math.max(Math.sqrt(propStats1[1] + propStats2[1]), VERY_LOW_PROB)); if (comp == EQ) { return occurrence * differenceDist.density(0.); } else if (comp == NEQ) { return occurrence * (1. - differenceDist.density(0.)); } else if (comp == LTE) { return occurrence * (differenceDist.cumulativeProbability(0.)); } else if (comp == LT) { return occurrence * (differenceDist.cumulativeProbability(0.) - differenceDist.density(0.)); } else if (comp == GTE) { return occurrence * (1. - differenceDist.cumulativeProbability(0.) + differenceDist.density(0.)); } else { //GT return occurrence * (1. - differenceDist.cumulativeProbability(0.)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp, List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateNumericalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n long overallCount = 0L;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n }\n double sum = 0.;\n for (TemporalElementStats stat : relevantStats) {\n sum += estimateNumericalPropertyProb(stat, property, comp, value) *\n (((double) stat.getElementCount() / overallCount));\n }\n return sum;\n }", "private double estimateCategoricalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Map<PropertyValue, Double>> map1 =\n stats1.getCategoricalSelectivityEstimation();\n Map<String, Map<PropertyValue, Double>> map2 =\n stats2.getCategoricalSelectivityEstimation();\n Map<PropertyValue, Double> propStats1 = map1.getOrDefault(property1, null);\n Map<PropertyValue, Double> propStats2 = map2.getOrDefault(property2, null);\n // property not sampled or not considered\n if (propStats1 == null || propStats2 == null) {\n // property not considered => return 0.5\n if (!isPropertyRelevant(property1) && !isPropertyRelevant(property2)) {\n return 0.5;\n } else {\n // property not sampled => very rare => return very small value\n return 0.0001;\n }\n }\n if (comp == EQ || comp == NEQ) {\n double sum = 0.;\n for (Map.Entry<PropertyValue, Double> entry1 : propStats1.entrySet()) {\n double val1Selectivity = entry1.getValue();\n for (Map.Entry<PropertyValue, Double> entry2 : propStats2.entrySet()) {\n if (entry1.getKey().equals(entry2.getKey())) {\n double val2Selectivity = entry2.getValue();\n sum += val1Selectivity * val2Selectivity;\n }\n }\n }\n return comp == EQ ? sum : 1. - sum;\n } else {\n // shouldn't happen, categorical variables can only be compared with EQ or NEQ\n return 0.;\n }\n }", "float getSpecialProb();", "private void evaluateProbabilities()\n\t{\n\t}", "public void calculateProbabilities(){\n\t}", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp,\n List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateCategoricalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "private double estimateNumericalPropertyProb(TemporalElementStats stat, String property,\n Comparator comp, PropertyValue value) {\n // property not sampled or not considered\n if (!stat.getNumericalPropertyStatsEstimation().containsKey(property)) {\n // if property not excluded, return very small value\n // if excluded, it is irrelevant, return 0.5\n return isPropertyRelevant(property) ? 0.0001 : 0.5;\n }\n Double[] propertyStats = stat.getNumericalPropertyStatsEstimation().get(property);\n NormalDistribution dist = new NormalDistribution(propertyStats[0],\n Math.max(Math.sqrt(propertyStats[1]), VERY_LOW_PROB));\n double doubleValue = ((Number) value.getObject()).doubleValue();\n double occurenceProb = stat.getNumericalOccurrenceEstimation().get(property);\n if (comp == EQ) {\n return VERY_LOW_PROB * occurenceProb;\n } else if (comp == NEQ) {\n return (1. - VERY_LOW_PROB) * occurenceProb;\n } else if (comp == LTE) {\n return dist.cumulativeProbability(doubleValue) * occurenceProb;\n } else if (comp == LT) {\n return occurenceProb * (dist.cumulativeProbability(doubleValue) - VERY_LOW_PROB);\n } else if (comp == GTE) {\n return occurenceProb *\n (1. - dist.cumulativeProbability(doubleValue) + VERY_LOW_PROB);\n } else {\n //GT\n return occurenceProb * (1. - dist.cumulativeProbability(doubleValue));\n }\n }", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n if (comp != EQ && comp != NEQ) {\n return 0.;\n }\n long overallCount = 0L;\n boolean found = false;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n if (stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n found = true;\n }\n }\n // property not sampled or not considered\n if (!found) {\n // not relevant/considered => simply return 0.5\n if (!isPropertyRelevant(property)) {\n return 0.5;\n } else {\n // not sampled => very rare or not even there => return very small value\n return 0.0001;\n }\n }\n\n double prob = 0.;\n for (TemporalElementStats stat : relevantStats) {\n if (!stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n // not sampled ? ....\n double factor = 0.0001;\n // ...or just excluded/not relevant?\n if (!isPropertyRelevant(property)) {\n factor = 0.5;\n }\n prob += factor * ((double) stat.getElementCount() / overallCount);\n continue;\n }\n prob += stat.getCategoricalSelectivityEstimation()\n .get(property)\n .getOrDefault(value, 0.0001) *\n ((double) stat.getElementCount() / overallCount);\n }\n if (comp == EQ) {\n return prob;\n } else {\n //NEQ\n return 1 - prob;\n }\n }", "abstract double rightProbability();", "private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}", "@Override\n public double evaluate(Map<String, Double> assignment) throws Exception {\n\n double res = Math.log(getEx2().evaluate(assignment)) / Math.log(getEx2().evaluate(assignment));\n return res;\n }", "@Override\n public double evaluate(Map<String, Double> assignment) throws Exception {\n return getExpression1().evaluate(assignment) - getExpression2().evaluate(assignment);\n }", "abstract double leftProbability();", "public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}", "public static void checkUpdateProbabilityOnHORNRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 1; j < 255; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = j;\r\n\t\t\t\tif(!MTS.BIMTS_H8.contains((Integer)r2))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t/*if(r2 == 1 || r2 == 2 || r2 == 4 || r2 == 8 || r2 == 16 || r2 == 32 || r2 == 64 || r2 == 128)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\t*/\r\n\t\t\t\telse\r\n\t\t\t\tfor(int k = 1; k < 255; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = k;\r\n\t\t\t\t\t//if(r3 == 1 || r3 == 2 || r3 == 4 || r3 == 8 || r3 == 16 || r3 == 32 || r3 == 64 || r3 == 128)\r\n\t\t\t\t\t\tif(!MTS.BIMTS_H8.contains((Integer)r3))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\ttotal++;\r\n\t\t\t\t\t\tint new_r3 = CompositionTable.LookUpTable(r1, r2);\r\n\t\t\t\t\t\tif(new_r3 < r3)\r\n\t\t\t\t\t\t\tupdate++;\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\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "int getLikelihoodValue();", "@Override\n protected double compareScoredCriteria(ScoredCriteriaMap wikiScoredCriteria) {\n double[] preferenceScores = ScoredCriteriaMap.unpackScores(wikiScoredCriteria);\n double[] wikiScores = ScoredCriteriaMap.unpackScores(this.getPreferenceScoredCriteriaMap());\n\n // Calculate the sum\n double sum = 0;\n for (int i = 0; i < Criterion.NUMBER_OF; i++) {\n sum = sum + (preferenceScores[i] - wikiScores[i]) * (preferenceScores[i] - wikiScores[i]);\n }\n return (1 / (1 + Math.sqrt(sum)));\n }", "public double evaluate(Map<String, Double> assignment) throws Exception {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return left.evaluate(assignment) * right.evaluate(assignment);\n }", "public double calculateExpectedDisagreement();", "double getTransProb();", "@Override\n\t\tpublic int compare(S o1, S o2) {\n\t\t\tif (getProb(o1) > getProb(o2))\n\t\t\t\treturn -1;\n\t\t\tif (getProb(o1) < getProb(o2))\n\t\t\t\treturn 1;\n\t\t\treturn Double.compare(o1.hashCode(), o2.hashCode());\n\t\t}", "public static void checkUpdateProbabilityOnALLRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 1; j < 255; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = j;\r\n\t\t\t\t/*if(r2 == 1 || r2 == 2 || r2 == 4 || r2 == 8 || r2 == 16 || r2 == 32 || r2 == 64 || r2 == 128)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\telse*/\r\n\t\t\t\tfor(int k = 1; k < 255; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = k;\r\n\t\t\t\t\t/*if(r3 == 1 || r3 == 2 || r3 == 4 || r3 == 8 || r3 == 16 || r3 == 32 || r3 == 64 || r3 == 128)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse*/\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\ttotal++;\r\n\t\t\t\t\t\tint new_r3 = SetOperators.intersection(r3, \r\n\t\t\t\t\t\t\t\tCompositionTable.LookUpTable(r1, r2));\r\n\t\t\t\t\t\tif(new_r3 != r3 && new_r3 != 0)\r\n\t\t\t\t\t\t\tupdate++;\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\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "public static void checkUpdateProbabilityOnAtomicRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 0; j < 8; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = base_relations[j];\r\n\t\t\t\r\n\t\t\t\tfor(int k = 0; k < 8; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = base_relations[k];\r\n\t\t\t\t\ttotal++;\r\n\t\t\t\t\t//int new_r3 = CompositionTable.LookUpTable(r1, r2);\r\n\t\t\t\t\tint new_r3 = SetOperators.intersection(r3, \r\n\t\t\t\t\t\t\t\tCompositionTable.LookUpTable(r1, r2));\r\n\t\t\t\t\t//System.out.println(new_r3);\r\n\t\t\t\t\tif( new_r3 != r3 )\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\tupdate++;\r\n\t\t\t\t\t\t//System.out.println(new_r3);\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\t\r\n\t\tSystem.out.println(\" total \" + total + \" update \" + update);\r\n\t\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "@Test\n public void testDecisionRule2() throws IOException {\n \n Data data = getDataObject(\"./data/adult.csv\");\n DataHandle handle = data.getHandle();\n \n RiskModelPopulationUniqueness model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getPopulationBasedUniquenessRisk();\n double sampleUniqueness = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getSampleBasedUniquenessRisk().getFractionOfUniqueRecords();\n double populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n \n if (model.getPopulationUniquenessModel() == PopulationUniquenessModel.PITMAN) {\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.27684993883653597) == 0);\n } else if (model.getPopulationUniquenessModel() == PopulationUniquenessModel.ZAYATZ) {\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.3207402393466189) == 0);\n } else {\n fail(\"Unexpected convergence of SNB\");\n }\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.2d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.3577099234829125d) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.01d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.1446083531167384) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 1d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.5142895033485844) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) == 0);\n }", "public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}", "private double condProb(String stateGiven, String stateFind){\n HashMap probs = genAllProb(stateGiven);\n return (double) probs.get(stateFind);\n }", "@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}", "private double condProb(RelStruc A,Hashtable atomhasht,OneStrucData inst,long[] timers)\n\t\t\tthrows RBNCompatibilityException\n\t\t\t{\n\t\tdouble result = probform.evalSample(A,atomhasht,inst,timers);\n\t\t//System.out.print(\" cP: \" + result);\n\t\treturn result;\n\t\t\t}", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "public Double calculateSimilarity(OWLObject a, OWLObject b);", "public double calculateObservedDisagreement();", "@Test\n public void testCalcProbTheta() throws Exception {\n\n double guessProb1 = ItemResponseTheory.calcProbTheta(c, lambda, theta1, alpha1);\n double guessProb2 = ItemResponseTheory.calcProbTheta(c, lambda, theta2, alpha1);\n double guessProb3 = ItemResponseTheory.calcProbTheta(c, lambda, theta3, alpha1);\n double guessProb4 = ItemResponseTheory.calcProbTheta(c, lambda, theta4, alpha1);\n double guessProb5 = ItemResponseTheory.calcProbTheta(c, lambda, theta5, alpha1);\n double guessProb6 = ItemResponseTheory.calcProbTheta(c, lambda, theta6, alpha1);\n double guessProb7 = ItemResponseTheory.calcProbTheta(c, lambda, theta7, alpha1);\n\n double ans1 = 0.2;\n double ans2 = 0.21;\n double ans3 = 0.23;\n double ans4 = 0.3;\n double ans5 = 0.47;\n double ans6 = 0.73;\n double ans7 = 0.9;\n\n double tolerance = 0.005;\n\n assertTrue(\"Prob(theta1)\", Math.abs(guessProb1 - ans1)< tolerance);\n assertTrue(\"Prob(theta2)\", Math.abs(guessProb2 - ans2) < tolerance);\n assertTrue(\"Prob(theta3)\", Math.abs(guessProb3 - ans3) < tolerance);\n assertTrue(\"Prob(theta4)\", Math.abs(guessProb4 - ans4) < tolerance);\n assertTrue(\"Prob(theta5)\", Math.abs(guessProb5 - ans5) < tolerance);\n assertTrue(\"Prob(theta6)\", Math.abs(guessProb6 - ans6) < tolerance);\n assertTrue(\"Prob(theta7)\", Math.abs(guessProb7 - ans7) < tolerance);\n\n }", "@Override\n public int viability() {\n int[] newStats = getNewStats();\n return newStats[0] * newStats[1];\n }", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }", "@Test\n public void testWeightedConsistency() {\n\n // See if this statistic computes weighted statistics\n // If not, skip this test\n UnivariateStatistic statistic = getUnivariateStatistic();\n if (!(statistic instanceof WeightedEvaluation)) {\n return;\n }\n\n // Create arrays of values and corresponding integral weights\n // and longer array with values repeated according to the weights\n final int len = 10; // length of values array\n final double mu = 0; // mean of test data\n final double sigma = 5; // std dev of test data\n double[] values = new double[len];\n double[] weights = new double[len];\n\n // Fill weights array with random int values between 1 and 5\n int[] intWeights = new int[len];\n final DiscreteDistribution.Sampler weightDist =\n UniformDiscreteDistribution.of(1, 5).createSampler(RandomSource.WELL_512_A.create(234878544L));\n for (int i = 0; i < len; i++) {\n intWeights[i] = weightDist.sample();\n weights[i] = intWeights[i];\n }\n\n // Fill values array with random data from N(mu, sigma)\n // and fill valuesList with values from values array with\n // values[i] repeated weights[i] times, each i\n final ContinuousDistribution.Sampler valueDist =\n NormalDistribution.of(mu, sigma).createSampler(RandomSource.WELL_512_A.create(64925784252L));\n List<Double> valuesList = new ArrayList<>();\n for (int i = 0; i < len; i++) {\n double value = valueDist.sample();\n values[i] = value;\n for (int j = 0; j < intWeights[i]; j++) {\n valuesList.add(Double.valueOf(value));\n }\n }\n\n // Dump valuesList into repeatedValues array\n int sumWeights = valuesList.size();\n double[] repeatedValues = new double[sumWeights];\n for (int i = 0; i < sumWeights; i++) {\n repeatedValues[i] = valuesList.get(i);\n }\n\n // Compare result of weighted statistic computation with direct computation\n // on array of repeated values\n WeightedEvaluation weightedStatistic = (WeightedEvaluation) statistic;\n TestUtils.assertRelativelyEquals(statistic.evaluate(repeatedValues),\n weightedStatistic.evaluate(values, weights, 0, values.length),\n 10E-12);\n\n // Check consistency of weighted evaluation methods\n Assert.assertEquals(weightedStatistic.evaluate(values, weights, 0, values.length),\n weightedStatistic.evaluate(values, weights), Double.MIN_VALUE);\n }", "public double getProbability() {\r\n\t\treturn Probability;\r\n\t}", "public abstract double evaluateFitness();", "public void testCompare1() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.5D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions above the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "public double computeHeuristicGrade();", "public static void checkConsistency(){\n double[] aNormalW=new double[numberOfObjectives];\n double randomIndex=0;\n double sum=0;\n for (int row=0;row<numberOfObjectives;row++){\n for (int column=0;column<numberOfObjectives;column++){\n\n sum+=weights[column]*objectives[row][column];\n }\n df.setRoundingMode(RoundingMode.UP);\n aNormalW[row]= Double.valueOf(df.format(sum));\n sum=0;\n }\n double awtDividedByWt=0;\n for (int i=0;i<numberOfObjectives;i++){\n awtDividedByWt+=aNormalW[i]/weights[i];\n decimalFormat.setRoundingMode(RoundingMode.HALF_UP);\n Double.valueOf(decimalFormat.format(awtDividedByWt));\n }\n double reciprocalNumber=(double) 1/numberOfObjectives;\n decimalFormat.setRoundingMode(RoundingMode.UP);\n Double.valueOf(decimalFormat.format(reciprocalNumber));\n double step3=reciprocalNumber*awtDividedByWt;\n decimalFormat.setRoundingMode(RoundingMode.UP);\n double numerator=Double.valueOf(decimalFormat.format(step3))-numberOfObjectives;\n double denominator=numberOfObjectives-1;\n decimalFormat.setRoundingMode(RoundingMode.UP);\n double ci=Double.valueOf(decimalFormat.format(numerator)) /denominator;\n decimalFormat.setRoundingMode(RoundingMode.CEILING);\n System.out.println(\"Consistency Index (CI)= \"+Double.valueOf(decimalFormat.format(ci)));\n System.out.println();\n double ciDividedByRI=ci/table23(numberOfObjectives);\n decimalFormat.setRoundingMode(RoundingMode.UP);\n // Double.valueOf(df.format(ciDividedByRI));\n if (ciDividedByRI<0.10){\n randomIndex=ci/table23(numberOfObjectives);\n decimalFormat.setRoundingMode(RoundingMode.UP);\n System.out.println(\"Random Index (RI)= \"+Double.valueOf(decimalFormat.format(randomIndex)));\n System.out.println(\"degree of consistency is satisfactory !!\");\n }else {\n System.out.println(\"the AHP may not yield meaningful results !!\");\n }\n System.out.println();\n }", "float getEvaluationResult();", "public Object eval(Individual ind)\r\n {\r\n BinaryIndividual bi = (BinaryIndividual)ind;\r\n int partialFitness = 0;\r\n int distance = 0;\r\n double fitness = 0.0;\r\n\r\n\t for (int i=0; i<100; i++){\r\n\r\n\t distance = 0;\r\n\r\n\t for (int j=0; j<100; j++){\r\n\t if (!((BinaryIndividual)target[i]).getBooleanAllele(j)^bi.getBooleanAllele(j)) { \r\n\t\t distance++;\r\n\t }\r\n \r\n\t if (distance > partialFitness) {\r\n\t partialFitness = distance;\r\n\t }\r\n\t }\r\n }\r\n\r\n fitness = (double)partialFitness/100.0;\r\n return new Double(fitness);\r\n \r\n\r\n }", "public float getSpecialProb() {\n return specialProb_;\n }", "public double getProbability() {\n\t\treturn getD_errorProbability();\n\t}", "@Test\n public void test02() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[6];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, '\\u0086');\n assertEquals(Double.POSITIVE_INFINITY, evaluation0.meanPriorAbsoluteError(), 0.01D);\n }", "public double getProbability() {\n return probability;\n }", "public boolean lessEqualP(Stella_Object y) {\n { Ratio x = this;\n\n { Ratio yRatio = ((Ratio)(x.coerceTo(y)));\n\n return ((x.numerator * yRatio.denominator) <= (yRatio.numerator * x.denominator));\n }\n }\n }", "public double[] getProbabilities() { return getProbabilities((int[])null); }", "public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }", "public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }", "private static double exactTest(double[] dataA, double[] dataB) {\n\t\tdouble[][] tblData = new double[dataA.length][2];\r\n\t\tfor(int i =0; i < tblData.length; i++){\r\n\t\t\ttblData[i][0] = dataA[i];\r\n\t\t\ttblData[i][1] = dataB[i];\r\n\t\t}\r\n\t\tDataTable tbl = new DataTable(tblData);\r\n\t\tWilcoxonTest wil = new WilcoxonTest(tbl);\r\n\t\t\r\n\t\t//get p value\r\n\t\twil.doTest();\r\n\t\treturn wil.getExactDoublePValue();\r\n\t}", "public double matchData() {\n\t\tArrayList<OWLDataProperty> labels1 = getDataProperties(ontology1);\n\t\tArrayList<OWLDataProperty> labels2 = getDataProperties(ontology2);\n\t\tfor (OWLDataProperty lit1 : labels1) {\n\t\t\tfor (OWLDataProperty lit2 : labels2) {\n\t\t\t\tif (LevenshteinDistance.computeLevenshteinDistance(TestAlign.mofidyURI(lit1.toString())\n\t\t\t\t\t\t, TestAlign.mofidyURI(lit2.toString()))>0.8){\n\t\t\t\t\treturn 1.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0.;\n\n\n\t}", "public void testCompare2() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(0.6D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions below the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "@Override\n public int compare(Prediction lhs, Prediction rhs) {\n return Float.compare(rhs.getConfidence(), lhs.getConfidence());\n }", "ComparisionProbabilityValue (IExpressionValue arg0, IExpressionValue arg1, boolean isMax) {\r\n\t\t\tthis.arg0 = arg0;\r\n\t\t\tthis.arg1 = arg1;\r\n\t\t\tthis.isMax = isMax;\r\n\t\t\tthis.setFixedValue(arg0.isFixedValue()?arg1.isFixedValue():false);\r\n\t\t}", "public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public float getSpecialProb() {\n return specialProb_;\n }", "public boolean lessP(Stella_Object y) {\n { Ratio x = this;\n\n { Ratio yRatio = ((Ratio)(x.coerceTo(y)));\n\n return ((x.numerator * yRatio.denominator) < (yRatio.numerator * x.denominator));\n }\n }\n }", "double getReliability();", "double[] calculateProbabilities(LACInstance testInstance) throws Exception\n\t{\n\t\tdouble[] probs;\n\t\tdouble[] scores = calculateScores(testInstance);\n\t\t\n\t\tif(scores != null)\n\t\t{\n\t\t\tprobs = new double[scores.length];\n\t\t\tdouble scoreSum = 0.0;\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tscoreSum += scores[i];\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tprobs[i] = scores[i] / scoreSum;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSet<Integer> allClasses = trainingSet.getAllClasses();\n\t\t\tprobs = new double[allClasses.size()];\n\t\t\tfor (Integer clazz : allClasses) \n\t\t\t{\n\t\t\t\tdouble count = trainingSet.getInstancesOfClass(clazz).size();\n\t\t\t\tprobs[clazz] = (count / ((double) trainingSet.length()));\n\t\t\t}\n\t\t}\n\n\t\treturn probs ;\n\t}", "@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }", "public Double getProm(ArrayList<Evaluations> evaluations, int periods) {\n Double total = 0.0;\n Double sum = 0.0;\n ArrayList<Double> grades = new ArrayList<>();\n Double percentage = 0.0;\n for (int e = 0; e < evaluations.size(); e++) {\n if (Integer.parseInt(evaluations.get(e).getPeriods()) == periods) {\n percentage += Double.parseDouble(evaluations.get(e).getPercentage());\n }\n }\n Log.e(\"Porcentage\", String.valueOf(percentage));\n if (percentage == 100) {\n for (int i = 0; i < evaluations.size(); i++) {\n Double eva1 = 0.0;\n if (Integer.parseInt(evaluations.get(i).getPeriods()) == periods) {\n eva1 = Double.parseDouble(evaluations.get(i).getEvaluations()) * Double.parseDouble(evaluations.get(i).getPercentage()) / 100;\n Log.e(\"Nota\", String.valueOf(eva1));\n grades.add(eva1);\n }\n\n }\n for (Double grade : grades) {\n sum += grade;\n }\n\n total = sum;\n }\n\n return total;\n }", "int getEvaluations();", "@Override\n public double estimateTemporalProb(ElementType type1, Optional<String> label1,\n TimeSelector.TimeField field1, Comparator comp, ElementType type2,\n Optional<String> label2, TimeSelector.TimeField field2) {\n if (comp == EQ) {\n return VERY_LOW_PROB;\n } else if (comp == Comparator.NEQ) {\n return VERY_HIGH_PROB;\n }\n // stats for lhs (can be more than one, if no label is specified)\n List<TemporalElementStats> statsLhs;\n // same for rhs\n List<TemporalElementStats> statsRhs;\n\n // determine relevant statistics for rhs and lhs\n if (!(label1.isPresent())) {\n statsLhs = type1 == ElementType.VERTEX ?\n new ArrayList<>(vertexStats.values()) :\n new ArrayList<>(edgeStats.values());\n } else {\n statsLhs = type1 == ElementType.VERTEX ?\n new ArrayList<>(\n Collections.singletonList(vertexStats.getOrDefault(label1.get(), null))) :\n new ArrayList<>(\n Collections.singletonList(edgeStats.getOrDefault(label1.get(), null)));\n // label not in the DB\n if (statsLhs.get(0) == null) {\n return 0.;\n }\n }\n // same for rhs\n if (!(label2.isPresent())) {\n statsRhs = type2 == ElementType.VERTEX ?\n new ArrayList<>(vertexStats.values()) :\n new ArrayList<>(edgeStats.values());\n } else {\n statsRhs = type2 == ElementType.VERTEX ?\n new ArrayList<>(\n Collections.singletonList(vertexStats.getOrDefault(label2.get(), null))) :\n new ArrayList<>(\n Collections.singletonList(edgeStats.getOrDefault(label2.get(), null)));\n // label not in the DB\n if (statsRhs.get(0) == null) {\n return 0.;\n }\n }\n return estimateTimeSelectorComparison(statsLhs, field1, comp, statsRhs, field2);\n }", "private double estimateTimeSelectorComparison(TemporalElementStats statsLhs,\n TimeSelector.TimeField fieldLhs,\n Comparator comparator, TemporalElementStats statsRhs,\n TimeSelector.TimeField fieldRhs) {\n\n double sum = 0.;\n\n // first, compare without considering Long.MIN values, TemporalElement.DEFAULT_TIME_TO values\n\n double[] lhs = statsLhs.getTemporalPropertyStats(fieldLhs);\n double[] rhs = statsRhs.getTemporalPropertyStats(fieldRhs);\n double lhsMean = lhs[0];\n double lhsVariance = lhs[1];\n double lhsExtreme = lhs[2];\n double rhsMean = rhs[0];\n double rhsVariance = rhs[1];\n double rhsExtreme = rhs[2];\n // probability that both lhs and rhs not TemporalElement.DEFAULT_TIME_FROM or\n // TemporalElement.DEFAULT_TIME_TO\n double probBothNotExtreme = (1 - lhsExtreme) * (1 - rhsExtreme);\n // distribution for difference between lhs and rhs values\n NormalDistribution diffDist = new NormalDistribution(lhsMean - rhsMean,\n Math.max(lhsVariance + rhsVariance, VERY_LOW_PROB));\n\n // P(lhs < rhs)\n double probNotExtremeLTE = diffDist.cumulativeProbability(0.);\n // P(lhs = rhs)\n double probNotExtremeEQ = diffDist.probability(0.);\n // P(lhs comp rhs)\n double probCompNotExtreme = 0.;\n\n if (comparator == LTE) {\n probCompNotExtreme = probNotExtremeLTE;\n } else if (comparator == LT) {\n probCompNotExtreme = probNotExtremeLTE - probNotExtremeEQ;\n } else if (comparator == EQ) {\n probCompNotExtreme = probNotExtremeEQ;\n } else if (comparator == NEQ) {\n probCompNotExtreme = 1. - probNotExtremeEQ;\n } else if (comparator == GTE) {\n probCompNotExtreme = 1. - (probNotExtremeLTE - probNotExtremeEQ);\n } else if (comparator == GT) {\n probCompNotExtreme = 1. - probNotExtremeLTE;\n }\n\n sum += probBothNotExtreme * probCompNotExtreme;\n\n // also consider cases in which one or both sides have extreme values\n double probCompExtreme = 0.;\n // lhs from\n if (fieldLhs == TX_FROM || fieldLhs == VAL_FROM) {\n // rhs from\n if (fieldRhs == TX_FROM || fieldRhs == VAL_FROM) {\n if (comparator == EQ) {\n probCompExtreme = lhsExtreme * rhsExtreme;\n } else if (comparator == NEQ) {\n probCompExtreme = (1 - lhsExtreme) * rhsExtreme + lhsExtreme * (1 - rhsExtreme);\n } else if (comparator == LTE) {\n probCompExtreme = lhsExtreme;\n } else if (comparator == LT) {\n probCompExtreme = lhsExtreme * (1 - rhsExtreme);\n } else if (comparator == GTE) {\n probCompExtreme = rhsExtreme;\n } else if (comparator == GT) {\n probCompExtreme = (1 - lhsExtreme) * rhsExtreme;\n }\n } else {\n // rhs to\n if (comparator == NEQ || comparator == LT || comparator == LTE) {\n probCompExtreme = lhsExtreme * rhsExtreme + (1 - lhsExtreme) * rhsExtreme +\n lhsExtreme * (1 - rhsExtreme);\n } //for all other comparators 0, if lhs and/or rhs extreme\n }\n } else { // lhs to\n // rhs from\n if (fieldRhs == TX_FROM || fieldRhs == VAL_FROM) {\n if (comparator == NEQ || comparator == GT || comparator == GTE) {\n probCompExtreme = lhsExtreme * rhsExtreme + (1 - lhsExtreme) * rhsExtreme +\n lhsExtreme * (1 - rhsExtreme);\n } // for all other comparators 0, if lhs and/or rhs extreme\n } else {\n // rhs to\n if (comparator == EQ) {\n probCompExtreme = lhsExtreme * rhsExtreme;\n } else if (comparator == NEQ) {\n probCompExtreme = (1 - lhsExtreme) * rhsExtreme + lhsExtreme * (1 - rhsExtreme);\n } else if (comparator == LTE) {\n probCompExtreme = rhsExtreme;\n } else if (comparator == LT) {\n probCompExtreme = (1 - lhsExtreme) * rhsExtreme;\n } else if (comparator == GTE) {\n probCompExtreme = lhsExtreme;\n } else if (comparator == GT) {\n probCompExtreme = lhsExtreme * (1 - rhsExtreme);\n }\n }\n }\n\n sum += probCompExtreme;\n\n return sum;\n }", "public BigDecimal getPercentageProfitPStd();", "public void evaluateIndividual (Individual memb) {\n\t\tNumericIndividual member = (NumericIndividual) memb;\n\t\tdouble [] genes = (double []) member.getGenes ();\n\t\tdouble x = genes[0];\n\t\tdouble y = genes[1];\n\t\tdouble z = genes[2];\n\t\tmember.setObjective (Math.log ((x*x) + (y*y) + (z*z))/\n\t\t\tMath.log ((255*255) + (255*255) + (255*255)));\n\t}", "@Override\n public double evaluate() throws Exception {\n return Math.log(getEx2().evaluate()) / Math.log(getEx2().evaluate());\n }", "public double getBestSolutionEvaluation();", "@Test\r\n\tpublic void calculMetricSuperiorWithLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculMetricSuperior(new ModelValue(10f, 1f), 12f, 9f), new Float(1));\r\n\t}", "protected double evaluate(IChromosome chromosome) {\n\t double score = 0;\n\t \t \n\t List dups = new ArrayList();\n\t int badSolution = 1;\n\n\t for (int i = 0; i < chromosome.size(); i++) {\n\n\t //IntegerGene agene = (IntegerGene) chromosome.getGene(i);\n\t //System.out.println(agene);\n\t int index = (Integer) chromosome.getGene(i).getAllele();\n\t \n\t if (dups.contains(index)) {\n\t badSolution = 0;\n\t } else {\n\t dups.add(index);\n\t }\n\n\t Equipo equipo = (Equipo) equipos.get(index);\n\t double genreScore = getGenreScore(equipo);\n\t if (genreScore == 0) {\n\t badSolution = 0;\n\t }\n\t score = (score+genreScore);\n\n\t }\n\t \n\t return (score * badSolution);\n\t }", "double Q(DoubleMatrix1D pt1, DoubleMatrix1D pt2, DoubleMatrix1D scale){\n DoubleMatrix1D diff = pt2.copy().assign(pt1,Functions.minus);\n\n //ok now we just need a standard normal probability\n //total probability is product of single-variable probabiliies\n double prob = 1;\n for(int dof=0; dof<numDOFs; dof++){\n double v = diff.get(dof)/scale.get(dof);\n prob *= Math.exp(-v*v/2);//standard normal probability, unnormalized\n }\n \n return prob;\n }", "private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}", "public BigDecimal getPercentageProfitPLimit();", "public float getProbMut () {\r\n return mut_prob;\r\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test \n public void compareFunctionalEquals() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p1, p1);\n \n assertEquals(0, a);\n }", "public double prom () {\n return this.sum()/this.size();\n }", "public double calculateSpecificity() {\n final long divisor = trueNegative + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return trueNegative / (double)divisor;\n }\n }", "public static double RELATIVE_PERCENTAGE_SUPPORT(Feature a, Feature b) {\n double num = 0.0, den = 0.0, dinf, dsup, rat = -1.0;\n int i;\n\n if (!a.type.equals(b.type)) Dataset.perror(\"Feature.class :: not the same class for features\");\n\n if (Feature.IS_CONTINUOUS(a.type)) {\n if ((b.dmax == b.dmin) || (a.dmax <= b.dmin) || (a.dmin >= b.dmax)) return 0.0;\n\n if (a.dmin < b.dmin) dinf = b.dmin;\n else dinf = a.dmin;\n\n if (a.dmax > b.dmax) dsup = b.dmax;\n else dsup = a.dmax;\n\n num = dsup - dinf;\n den = b.dmax - b.dmin;\n } else if (Feature.IS_INTEGER(a.type)) {\n if ((a.imax < b.imin) || (a.imin > b.imax)) return 0.0;\n\n if (a.imin <= b.imin) dinf = (double) b.imin;\n else dinf = (double) a.imin;\n\n if (a.imax >= b.imax) dsup = (double) b.imax;\n else dsup = (double) a.imax;\n\n num = dsup - dinf + 1.0;\n den = ((double) (b.imax - b.imin)) + 1.0;\n } else if (Feature.IS_NOMINAL(a.type)) {\n if (b.modalities.size() == 0) return 0.0;\n else den = (double) b.modalities.size();\n\n num = 0.0;\n for (i = 0; i < a.modalities.size(); i++)\n if (b.modalities.contains((String) a.modalities.elementAt(i))) num += 1.0;\n } else Dataset.perror(\"Feature.class :: feature type unknown\");\n\n rat = num / den;\n if ((rat < 0.0) || (rat > 1.0))\n Dataset.perror(\"Feature.class :: ratio \" + rat + \" not a probability\");\n return rat;\n }", "public double compute(Object o1, Object o2) throws jcolibri.exception.NoApplicableSimilarityFunctionException {\n\t\tif ((o1 == null) || (o2 == null))\n\t\t\treturn 0;\n\t\tif (!(o1 instanceof java.lang.Number))\n\t\t\tthrow new jcolibri.exception.NoApplicableSimilarityFunctionException(this.getClass(), o1.getClass());\n\t\tif (!(o2 instanceof java.lang.Number))\n\t\t\tthrow new jcolibri.exception.NoApplicableSimilarityFunctionException(this.getClass(), o2.getClass());\n\n\n\t\tNumber i1 = (Number) o1;\n\t\tNumber i2 = (Number) o2;\n\t\treturn (double) compare(i1.doubleValue(), i2.doubleValue());\n\t}", "static double reliability(vmnode vm, jobnode[] jobs, int[] assigned, int ind) {\n double pow, bw, mem;\n pow = bw = mem = 0;\n\n for (int i = 0; i < jobs.length; i++) {\n if (assigned[i] == ind) {\n pow = pow + 1.0 * jobs[i].pow;\n bw = bw + 1.0 * jobs[i].bw;\n }\n }\n pow = 0.5 * (vm.powavail * 1.0 / pow);\n bw = 0.3 * (vm.bwavail * 1.0 / bw);\n mem = 0.2 * (vm.memavail + vm.memused) / vm.memused;\n if (vm.memused == 0.0) {\n return 1000000.0;\n }\n return (pow + bw + mem);\n }", "@Test\n\tpublic void test() {\n\t\tRandomVariableDefinition RV_DEF_X = new RandomVariableDefinition(\"DEF_X\", Arrays.asList(\"x0\", \"x1\", \"x2\"));\n\t\tRandomVariableDefinition RV_DEF_Y = new RandomVariableDefinition(\"DEF_Y\", Arrays.asList(\"y0\", \"y1\"));\n\t\tRandomVariableDefinition RV_DEF_Z = new RandomVariableDefinition(\"DEF_Y\", Arrays.asList(\"z0\", \"z1\"));\n\n\t\t///////////////////////////////////\n\t\t// define the local probability models\n\t\tLocalProbabilityModel X = new LocalProbabilityModel(\"X\");\n\t\tLocalProbabilityModel Y = new LocalProbabilityModel(\"Y\");\n\t\tLocalProbabilityModel Z = new LocalProbabilityModel(\"Z\");\n\t\tLocalProbabilityModel X1 = new LocalProbabilityModel(\"X1\");\n\t\tLocalProbabilityModel X2 = new LocalProbabilityModel(\"X2\");\n\t\tLocalProbabilityModel X3 = new LocalProbabilityModel(\"X3\");\n\t\tLocalProbabilityModel X7 = new LocalProbabilityModel(\"X7\");\n\t\t\n\t\t////////////////////////////////\n\t\t// specify target variable type, and dependencies\n\t\t\n\t\t// two a-priori variables - target only, no dependencies\n\t\tX.setTargetAndDependencies(RV_DEF_X, null);\n\t\tY.setTargetAndDependencies(RV_DEF_Y, null);\n\t\t\n\t\t// a LPM conditionally dependent on two variables\n\t\tZ.setTargetAndDependencies(RV_DEF_Z, Arrays.asList(X, Y));\n\n\t\t// a LPM conditionally dependent on several variables of the same type\n\t\tX3.setTargetAndDependencies(RV_DEF_X, Arrays.asList(X1, X2));\n\n\t\t// a LPM conditionally dependent on itself (i.e. a state variable)\n\t\tX7.setTargetAndDependencies(RV_DEF_X, Arrays.asList(X7));\n\n\t\n\t\t// the first has no dependencies just values\n\t\tX.setValue(\"x0\", 0.6);\n\t\tX.setValue(\"x1\", 0.1);\n\t\tX.setValue(\"x2\", 0.1);\n\n\t\t// the second has dependencies\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x0\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x0\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x1\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x1\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x2\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x2\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x0\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x0\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x1\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x1\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x2\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x2\"), Y.event(\"y1\")), 0.3);\n\n\t\t// the third has a recurrent dependency\n\t\tX1.setValue(\"x0\", Arrays.asList(X1.event(\"x0\")), 0.1);\n\t\tX1.setValue(\"x0\", Arrays.asList(X1.event(\"x1\")), 0.1);\n\t\tX1.setValue(\"x1\", Arrays.asList(X1.event(\"x0\")), 0.1);\n\t\tX1.setValue(\"x1\", Arrays.asList(X1.event(\"x1\")), 0.1);\n\t\t\n\t\t\n\t\t\n\t\t/* NOTE - should we enforce that a conditional probability should always be 'set' with requirement that the conditioning variables should all be identified ? */\n\t\t// this would be Z.setValue(\n\t//\tZ.setValue(Arrays.asList(X.event(\"x0\"), Y.event(\"y0\")),\n\t//\t\t\tArrays.asList(\n\t//\t\t\t\t\t\"z0\", 0.5,\n\t//\t\t\t\t\t\"z1\", 0.3,\n\t//\t\t\t\t\t\"z2\", 0.7));\n\n\n\n\t\tString s = Z.toString();\n\t\tSystem.out.println(\"==============\\n\" + s);\n\n\t\tSystem.out.println(\"done\");\n\n\n\t}", "public void recalculateStats(){\n weight = .25f * (shaftMat.getParameter(\"Density\") * length + headMat.getParameter(\"Density\") * .4f);\n sharpness = headMat.getParameter(\"Malleability\") + 1f / headMat.getParameter(\"Durability\"); //Malleable objects can be sharp, as can fragile objects\n// fragility = 1f / (shaftMat.getParameter(\"Durability\") * .5f + headMat.getParameter(\"Durability\") * .5f);\n durability = (shaftMat.getParameter(\"Durability\") * .5f + headMat.getParameter(\"Durability\") * .5f);\n trueness = shaftMat.getParameter(\"Regularity\") + headMat.getParameter(\"Regularity\");\n// length = 2f;\n }", "public float evaluate(PhraseInfo p) {\n int numChords = p.gen.prog.get(p.gen.progIndex).size();\n int tn = Math.min(phraseLen, (int)Math.round(targetNotes * ((numChords + 1) / 3.0))); // not directly proportional.\n // scores: 50, 49, 46, 41, 34, 25 etc.\n int score = Math.max(0, 50 - (int)Math.round(Math.pow(Math.abs(p.noteCount - tn), 2)));\n return (float)Math.min(1.0f, score/50.0f);\n }", "public Map<BooleanVariable, Double> calculateDiff(SimulationResults perturbed,\n\t\t\t\t\t\t\t\t\t\t\t \t\t SimulationResults base,\n\t\t\t\t\t\t\t\t\t\t\t \t\t int maxTimeStep) {\n\t // BooleanNetworks can be compared (e.g. minor modification in a BooleanNetwork).\n\t // Make sure two Results are generated from the same network\n\t if (perturbed.getNetwork() != base.getNetwork() && varPropertyKey == null)\n\t throw new IllegalArgumentException(\"The passed two parameters don't have the same BooleanNetwork! \"\n\t + \"To compare two different BooleanNetworks, set varPropertyKey.\");\n\t\tperturbed.expandTracks(maxTimeStep);\n\t\tbase.expandTracks(maxTimeStep);\n\t\t// Calculate AUC\n\t\tMap<BooleanVariable, Double> pertVarToAuc = perturbed.calculateAUC();\n\t\tMap<BooleanVariable, Double> baseVarToAuc = base.calculateAUC();\n\t\tMap<String, Double> pertPropToAuc = null;\n\t\tif (varPropertyKey != null) {\n\t\t pertPropToAuc = convertVarToAucMap(pertVarToAuc, varPropertyKey);\n\t\t}\n\t\tfinal Map<String, Double> finalPertPropToAuc = pertPropToAuc;\n\t\tMap<BooleanVariable, Double> varToDiff = new HashMap<>();\n\t\t// Get the percent change\n\t\tbaseVarToAuc.forEach((var, baseAuc) -> {\n\t\t Double pertAuc = null;\n\t\t if (varPropertyKey != null) {\n\t\t String property = var.getProperty(varPropertyKey);\n\t\t pertAuc = finalPertPropToAuc.get(property);\n\t\t }\n\t\t else\n\t\t pertAuc = pertVarToAuc.get(var);\n\t\t\tif (pertAuc == null)\n\t\t\t return; \n\t\t\t// Assign the minimum value to avoid NaN\n\t\t\tif (baseAuc < MIN_VALUE)\n\t\t\t baseAuc = MIN_VALUE;\n\t\t\tif (pertAuc < MIN_VALUE)\n\t\t\t pertAuc = MIN_VALUE;\n//\t\t\tdouble change = Math.abs(pertAuc - baseAuc) / baseAuc;\n\t\t\tdouble change = (pertAuc - baseAuc) / (pertAuc + baseAuc); // Use this formula to control small values\n\t\t\tvarToDiff.put(var, change);\n\t\t});\n\t\t\n\t\treturn varToDiff;\n\t}", "public double measurementProb(float[] measurement) {\r\n double prob = 1.0;\r\n for(int i=0;i<landmarks.length;i++) {\r\n float dist = (float) MathX.distance(x, y, landmarks[i].x, landmarks[i].y); \r\n prob *= MathX.Gaussian(dist, senseNoise, measurement[i]); \r\n } \r\n \r\n probability = prob;\r\n \r\n return prob;\r\n }", "public double getBestScore();", "int definePassingScore(Speciality speciality) throws LogicException;", "@Override\n public double evaluate() throws Exception {\n return getExpression1().evaluate() - getExpression2().evaluate();\n }", "public void evaluate() {\r\n Statistics.evaluate(this);\r\n }", "public double evaluate(Map<String, Double> assignment) throws Exception {\r\n // variable is in the assignment\r\n if (assignment.containsKey(this.variable)) {\r\n return assignment.get(this.variable);\r\n }\r\n throw new Exception(\"this variable is not in the assignment\");\r\n }", "public double getIndefiniteDefiniteComparison(Detail a, Detail b) {\n\t\t//TODO use numIndefiniteProperties rather than numTotalProperties ??\n\t\tdouble numProperties = a.getProperties().size();\n\n\t\tif (numProperties == 0.0)\n\t\t\treturn 0.0;\n\t\t\n\t\tdouble s = 0; \n\t\tfor (PropertyValue aP : a.getProperties()) {\n\t\t\tif (aP instanceof IndefiniteValue) {\n\t\t\t\tIndefiniteValue iap = (IndefiniteValue) aP;\n\t\t\t\t\n\t\t\t\tdouble maxSat = 0;\n\t\t\t\t\n\t\t\t\tfor (PropertyValue bP : getProperties(b, aP.getProperty())) {\n\t\t\t\t\tif (bP instanceof DefiniteValue) {\n\t\t\t\t\t\tDefiniteValue dbp = (DefiniteValue)bP;\n\t\t\t\t\t\tdouble sat = satisifies(iap, dbp);\n\t\t\t\t\t\tif (sat > maxSat)\n\t\t\t\t\t\t\tmaxSat = sat;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ts += maxSat;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn s / numProperties;\n\t}", "public ProbNet parametricLearning() \n throws NormalizeNullVectorException{\n int[][] cases = caseDatabase.getCases ();\n TablePotential absoluteFrequencies;\n \n for (ProbNode node : probNet.getProbNodes()) {\n if(!node.getPotentials ().isEmpty ())\n {\n probNet.removePotential (node.getPotentials ().get (0));\n }\n absoluteFrequencies = calculateAbsoluteFrequencies(probNet, cases, node);\n for (int j = 0; j < absoluteFrequencies.getTableSize(); j++)\n absoluteFrequencies.values[j] += alpha;\n probNet.addPotential (DiscretePotentialOperations.normalize(absoluteFrequencies));\n }\n \n return probNet;\n }", "public double empiricalExpectation()\n\t{\n\t\treturn _dblEmpiricalExpectation;\n\t}", "@Override\n\tpublic double evaluate(IChromosome a_subject) {\n\n\t\t// Get Weights\n\t\tGene[] genes = a_subject.getGenes();\n\t\tdouble[] weights = new double[9];\n\t\tfor (int i = 0; i < genes.length; i++) {\n\t\t\tweights[i] = (double) genes[i].getAllele();\n\t\t}\n\n\t\tdouble totalValue = 0.0;\n\n\t\tfor (int i = 0; i < NUM_GAMES; i++) {\n\t\t\t// Initialize Game\n\t\t\tState s = new State();\n\t\t\t// new TFrame(s);\n\t\t\tdouble numPiecesPlayed = 0.0d;\n\t\t\twhile (!s.hasLost() && numPiecesPlayed < MAX_PIECES) {\n\t\t\t\ts.makeMove(findNextMove(s, weights));\n\t\t\t\t// s.draw();\n\t\t\t\t// s.drawNext(0, 0);\n\t\t\t\tnumPiecesPlayed++;\n\t\t\t\t// try {\n\t\t\t\t// Thread.sleep(10);\n\t\t\t\t// } catch (InterruptedException e) {\n\t\t\t\t// e.printStackTrace();\n\t\t\t\t// }\n\t\t\t}\n\t\t\ttotalValue += (double) s.getRowsCleared() + numPiecesPlayed / 100000d;\n\t\t}\n\n\t\treturn totalValue;\n\t}", "@Test\n public void testExactness() {\n assertMetrics(\"exactness:1\", \"a b c\",\"a x b x x c\");\n assertMetrics(\"exactness:0.9\", \"a b c\",\"a x b:0.7 x x c\");\n assertMetrics(\"exactness:0.7\", \"a b c\",\"a x b:0.6 x x c:0.5\");\n assertMetrics(\"exactness:0.775\", \"a!200 b c\",\"a x b:0.6 x x c:0.5\");\n assertMetrics(\"exactness:0.65\", \"a b c!200\",\"a x b:0.6 x x c:0.5\");\n }", "@Test\r\n public void testAssignWeight() {\r\n System.out.println(\"assignWeight\");\r\n double notExpResult = 0.0;\r\n double result = weightAssignment.assignWeight();\r\n assertNotEquals(result, notExpResult, 0.0);\r\n }" ]
[ "0.6965154", "0.65613604", "0.65560055", "0.6399473", "0.6279234", "0.62487954", "0.61338866", "0.60149455", "0.5924172", "0.57947266", "0.57795674", "0.5769615", "0.5714954", "0.56513107", "0.5547097", "0.5497202", "0.5453772", "0.54494816", "0.5449419", "0.5441959", "0.53497446", "0.5341653", "0.5340312", "0.5336603", "0.53130525", "0.5310591", "0.5300207", "0.52900875", "0.5237187", "0.5217808", "0.52033055", "0.5194112", "0.5177113", "0.5174078", "0.51726925", "0.5165721", "0.5163501", "0.51626384", "0.51603884", "0.5157593", "0.5155544", "0.5152742", "0.5151839", "0.51507354", "0.5131486", "0.51258916", "0.51246357", "0.5103841", "0.50957614", "0.50937283", "0.50928587", "0.5090545", "0.5084682", "0.50841093", "0.50754005", "0.5073265", "0.50676966", "0.5067222", "0.5062172", "0.50575835", "0.50458884", "0.5030431", "0.50257796", "0.49989143", "0.4991995", "0.49861807", "0.49813017", "0.49809706", "0.4977211", "0.4968921", "0.4960037", "0.49587482", "0.4956498", "0.4955725", "0.49496838", "0.49494317", "0.4943011", "0.49326274", "0.4931867", "0.49277413", "0.49255112", "0.49244693", "0.49109274", "0.4910717", "0.49092725", "0.48935634", "0.48930308", "0.48908415", "0.48802924", "0.48795962", "0.4877193", "0.48744678", "0.48743734", "0.48697126", "0.4867239", "0.48672047", "0.48588037", "0.48540157", "0.48530236", "0.4846889" ]
0.69470984
1
Estimates the probability that a comparison between categorical property values holds. LHS and RHS are described by lists of stats
private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats1, String property1, Comparator comp, List<TemporalElementStats> relevantStats2, String property2) { long count1 = relevantStats1.stream() .map(TemporalElementStats::getElementCount) .reduce(0L, Long::sum); long count2 = relevantStats2.stream() .map(TemporalElementStats::getElementCount) .reduce(0L, Long::sum); long totalCount = count1 * count2; double outerSum = 0.; for (TemporalElementStats s1 : relevantStats1) { double innerSum = 0.; for (TemporalElementStats s2 : relevantStats2) { double prob = estimateCategoricalPropertyProb(s1, property1, comp, s2, property2); double weight = ((double) s1.getElementCount() * s2.getElementCount()) / totalCount; innerSum += prob * weight; } outerSum += innerSum; } return outerSum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double estimateCategoricalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Map<PropertyValue, Double>> map1 =\n stats1.getCategoricalSelectivityEstimation();\n Map<String, Map<PropertyValue, Double>> map2 =\n stats2.getCategoricalSelectivityEstimation();\n Map<PropertyValue, Double> propStats1 = map1.getOrDefault(property1, null);\n Map<PropertyValue, Double> propStats2 = map2.getOrDefault(property2, null);\n // property not sampled or not considered\n if (propStats1 == null || propStats2 == null) {\n // property not considered => return 0.5\n if (!isPropertyRelevant(property1) && !isPropertyRelevant(property2)) {\n return 0.5;\n } else {\n // property not sampled => very rare => return very small value\n return 0.0001;\n }\n }\n if (comp == EQ || comp == NEQ) {\n double sum = 0.;\n for (Map.Entry<PropertyValue, Double> entry1 : propStats1.entrySet()) {\n double val1Selectivity = entry1.getValue();\n for (Map.Entry<PropertyValue, Double> entry2 : propStats2.entrySet()) {\n if (entry1.getKey().equals(entry2.getKey())) {\n double val2Selectivity = entry2.getValue();\n sum += val1Selectivity * val2Selectivity;\n }\n }\n }\n return comp == EQ ? sum : 1. - sum;\n } else {\n // shouldn't happen, categorical variables can only be compared with EQ or NEQ\n return 0.;\n }\n }", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n if (comp != EQ && comp != NEQ) {\n return 0.;\n }\n long overallCount = 0L;\n boolean found = false;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n if (stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n found = true;\n }\n }\n // property not sampled or not considered\n if (!found) {\n // not relevant/considered => simply return 0.5\n if (!isPropertyRelevant(property)) {\n return 0.5;\n } else {\n // not sampled => very rare or not even there => return very small value\n return 0.0001;\n }\n }\n\n double prob = 0.;\n for (TemporalElementStats stat : relevantStats) {\n if (!stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n // not sampled ? ....\n double factor = 0.0001;\n // ...or just excluded/not relevant?\n if (!isPropertyRelevant(property)) {\n factor = 0.5;\n }\n prob += factor * ((double) stat.getElementCount() / overallCount);\n continue;\n }\n prob += stat.getCategoricalSelectivityEstimation()\n .get(property)\n .getOrDefault(value, 0.0001) *\n ((double) stat.getElementCount() / overallCount);\n }\n if (comp == EQ) {\n return prob;\n } else {\n //NEQ\n return 1 - prob;\n }\n }", "private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp, List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateNumericalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "public void calculateProbabilities(){\n\t}", "private double estimateNumericalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Double[]> map1 = stats1.getNumericalPropertyStatsEstimation();\n Map<String, Double[]> map2 = stats2.getNumericalPropertyStatsEstimation();\n Double[] propStats1 = map1.getOrDefault(property1, null);\n Double[] propStats2 = map2.getOrDefault(property2, null);\n if (propStats1 == null || propStats2 == null) {\n return 0.0001;\n }\n double occurrence = stats1.getNumericalOccurrenceEstimation()\n .getOrDefault(property1, 0.) *\n stats2.getNumericalOccurrenceEstimation().getOrDefault(property2, 0.);\n // assuming both properties are normally distributed,\n // their difference is also normally distributed\n NormalDistribution differenceDist = new NormalDistribution(\n propStats1[0] - propStats2[0],\n Math.max(Math.sqrt(propStats1[1] + propStats2[1]), VERY_LOW_PROB));\n\n if (comp == EQ) {\n return occurrence * differenceDist.density(0.);\n } else if (comp == NEQ) {\n return occurrence * (1. - differenceDist.density(0.));\n } else if (comp == LTE) {\n return occurrence * (differenceDist.cumulativeProbability(0.));\n } else if (comp == LT) {\n return occurrence * (differenceDist.cumulativeProbability(0.) -\n differenceDist.density(0.));\n } else if (comp == GTE) {\n return occurrence * (1. - differenceDist.cumulativeProbability(0.) +\n differenceDist.density(0.));\n } else {\n //GT\n return occurrence * (1. - differenceDist.cumulativeProbability(0.));\n }\n }", "private void evaluateProbabilities()\n\t{\n\t}", "private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n long overallCount = 0L;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n }\n double sum = 0.;\n for (TemporalElementStats stat : relevantStats) {\n sum += estimateNumericalPropertyProb(stat, property, comp, value) *\n (((double) stat.getElementCount() / overallCount));\n }\n return sum;\n }", "@Override\n protected double compareScoredCriteria(ScoredCriteriaMap wikiScoredCriteria) {\n double[] preferenceScores = ScoredCriteriaMap.unpackScores(wikiScoredCriteria);\n double[] wikiScores = ScoredCriteriaMap.unpackScores(this.getPreferenceScoredCriteriaMap());\n\n // Calculate the sum\n double sum = 0;\n for (int i = 0; i < Criterion.NUMBER_OF; i++) {\n sum = sum + (preferenceScores[i] - wikiScores[i]) * (preferenceScores[i] - wikiScores[i]);\n }\n return (1 / (1 + Math.sqrt(sum)));\n }", "private double getProbabilityScore(Cell c,int bitmask)\n {\n\t return Math.pow(\n\t\t\t Math.pow(m_probs1[c.getCol()-1],(1&bitmask) ) * \n\t\t\t Math.pow(m_probs2[c.getRow()-1],(2&bitmask)/2) //geo-mean\n\t\t\t , Math.min(1,3.5-bitmask));\n }", "float getSpecialProb();", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}", "public static void checkUpdateProbabilityOnALLRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 1; j < 255; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = j;\r\n\t\t\t\t/*if(r2 == 1 || r2 == 2 || r2 == 4 || r2 == 8 || r2 == 16 || r2 == 32 || r2 == 64 || r2 == 128)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\telse*/\r\n\t\t\t\tfor(int k = 1; k < 255; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = k;\r\n\t\t\t\t\t/*if(r3 == 1 || r3 == 2 || r3 == 4 || r3 == 8 || r3 == 16 || r3 == 32 || r3 == 64 || r3 == 128)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse*/\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\ttotal++;\r\n\t\t\t\t\t\tint new_r3 = SetOperators.intersection(r3, \r\n\t\t\t\t\t\t\t\tCompositionTable.LookUpTable(r1, r2));\r\n\t\t\t\t\t\tif(new_r3 != r3 && new_r3 != 0)\r\n\t\t\t\t\t\t\tupdate++;\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\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "public void calculateEffectiveness(){\n double[] typeEffective = new double[18];\n \n for(int i = 0; i < 18; i++){\n typeEffective[i] = tc.getEffectiveNumber(i, tc.convertType(type1));\n }\n \n if(type2 != null){\n for(int i = 0; i < 18; i++){\n typeEffective[i] *= tc.getEffectiveNumber(i, tc.convertType(type2));\n }\n }\n \n for(int i = 0; i < 18; i++){\n if(typeEffective[i] != 1){\n if(typeEffective[i] > 1){\n double[] newWeak = {i,typeEffective[i]};\n weak.add(newWeak);\n }else{\n double[] newStrong = {i,typeEffective[i]};\n strong.add(newStrong);\n }\n }\n }\n }", "@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }", "private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}", "public void computeExpectedChildrenProperties() {\n\t\t\n\t\tSet<Attribute<? extends IValue>> parentAttributes = new HashSet<>(popParents.getPopulationAttributes());\n\t\tparentAttributes.retainAll(pMatching.getDimensions());\n\t\t\n\t\tlogger.info(\"computing for the dimensions: {}\", parentAttributes);\n\t\t\n\t\t/*\n\t\t * \n\t\tMap<Set<Attribute<? extends IValue>>,Integer> parents2matchingCandidates = new HashMap<>();\n\t\tfor (Entry<ACoordinate<Attribute<? extends IValue>, IValue>, AControl<Double>> e: \n\t\t\tpMatching.getMatrix().entrySet()) {\n\t\t\t\n\t\t}\n\t\t\n\t\tGosplContingencyTable c = new GosplContingencyTable(pMatching.getDimensions());\n\t\t// for each coordinate of the probabilities table \n\t\t// 1) compute the \n\t\t * \n\t\t */\n\n\t\t\n\t}", "@Test\n public void testDecisionRule2() throws IOException {\n \n Data data = getDataObject(\"./data/adult.csv\");\n DataHandle handle = data.getHandle();\n \n RiskModelPopulationUniqueness model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getPopulationBasedUniquenessRisk();\n double sampleUniqueness = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getSampleBasedUniquenessRisk().getFractionOfUniqueRecords();\n double populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n \n if (model.getPopulationUniquenessModel() == PopulationUniquenessModel.PITMAN) {\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.27684993883653597) == 0);\n } else if (model.getPopulationUniquenessModel() == PopulationUniquenessModel.ZAYATZ) {\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.3207402393466189) == 0);\n } else {\n fail(\"Unexpected convergence of SNB\");\n }\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.2d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.3577099234829125d) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.01d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.1446083531167384) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 1d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.5142895033485844) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) == 0);\n }", "int computeNutritionalScore(Map<String, Object> product);", "public ArrayList <Double> outputsProbFromRuleSets (RuleSet ruleset2) {\n \n ArrayList <Double> res = new ArrayList <> (); \n double a;\n \n for (int i = 0; i < this.size(); i++) {\n \n \n for (int j = 0; j < ruleset2.size(); j++) {\n \n a = this.getRule(i).getProb();\n a = a * ruleset2.getRule(j).getProb();\n res.add(a);\n }\n }\n \n return res;\n }", "abstract double leftProbability();", "@Test\r\n\tpublic void classifyTest(){\r\n\t\tClassification[] expectedClass = {Classification.First,Classification.UpperSecond,Classification.LowerSecond,Classification.Third,Classification.Fail};\r\n\t\tint[] pointGrades = {3,6,10,13,18};\r\n\t\tfor(int i=0;i<pointGrades.length;i++)\r\n\t\t{\r\n\t\t\tassertEquals(expectedClass[i],new PointGrade(pointGrades[i]).classify());\r\n\t\t}\r\n\t}", "abstract double rightProbability();", "double getCritChance();", "public void calculateProbabilities(Ant ant) {\n int i = ant.trail[currentIndex];\n double pheromone = 0.0;\n for (int l = 0; l < numberOfCities; l++) {\n if (!ant.visited(l)) {\n pheromone += (Math.pow(trails[i][l], alpha) + 1) * (Math.pow(graph[i][l], beta) + 1) *\n (Math.pow(emcMatrix[i][l], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][l], ddd) + 1);\n }\n }\n for (int j = 0; j < numberOfCities; j++) {\n if (ant.visited(j)) {\n probabilities[j] = 0.0;\n } else {\n double numerator = (Math.pow(trails[i][j], alpha) + 1) * (Math.pow(graph[i][j], beta) + 1) *\n (Math.pow(emcMatrix[i][j], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][j], ddd) + 1);\n probabilities[j] = numerator / pheromone;\n }\n }\n }", "double[] calculateProbabilities(LACInstance testInstance) throws Exception\n\t{\n\t\tdouble[] probs;\n\t\tdouble[] scores = calculateScores(testInstance);\n\t\t\n\t\tif(scores != null)\n\t\t{\n\t\t\tprobs = new double[scores.length];\n\t\t\tdouble scoreSum = 0.0;\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tscoreSum += scores[i];\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tprobs[i] = scores[i] / scoreSum;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSet<Integer> allClasses = trainingSet.getAllClasses();\n\t\t\tprobs = new double[allClasses.size()];\n\t\t\tfor (Integer clazz : allClasses) \n\t\t\t{\n\t\t\t\tdouble count = trainingSet.getInstancesOfClass(clazz).size();\n\t\t\t\tprobs[clazz] = (count / ((double) trainingSet.length()));\n\t\t\t}\n\t\t}\n\n\t\treturn probs ;\n\t}", "@Override\n public double score(Map<BasedMining, Map<BasedMining, RateEvent>> preferences,\n BasedMining item1,\n BasedMining item2) {\n var sharedInnerItems = new ArrayList<BasedMining>();\n\n preferences.get(item1).forEach((innerItem, rateEvent) -> {\n if (preferences.get(item2).get(innerItem) != null) {\n sharedInnerItems.add(innerItem);\n }\n });\n\n// If they have no rating in common, return 0\n if (sharedInnerItems.size() > 0)\n return 0;\n\n// Add up the square of all the differences\n var sumOfSquares = preferences.get(item1).entrySet()\n .stream()\n .filter(entry -> preferences.get(item2).get(entry.getKey()) != null)\n .mapToDouble(entry -> Math.pow((entry.getValue().getRating() - preferences.get(item2).get(entry.getKey()).getRating()), 2.0))\n .sum();\n\n return 1 / (1 + sumOfSquares);\n }", "private void fillConditionalProb(\tfloat[] conditionalTable,\r\n\t\t\t\t\t\t\t\t\t\tFile trainDir) \r\n\t{\r\n\t\t// Let nCharLanguage be the total number of characters (including \r\n\t\t// multiple occurrences of the same unique character, including spaces) \r\n\t\t// contained in all training documents, \r\n\t\t// For each of the 27 unique characters, ci, compute conditional prob:\r\n\t\t// P(ci | Language) = countLanguage(ci) / nCharLanguage,\r\n\t\t// where countLetter(ci) is the number of times character ci occurs \r\n\t\t// in all documents in the training set. \r\n\t\t\r\n\t\t// GET OVERALL COUNT OF ALL LETTERS IN THIS TRAINING DIRECTORY\r\n\t\tfloat nCharLanguage = (float) getTotalLetters(trainDir);\r\n\t\t\t\t\r\n\t\t// FILL IN THE CONDITIONAL TABLE\r\n\t\tfor(int i = 0; i < 26; i++){\r\n\t\t\tchar currentLetter = (char) ('a' + i);\r\n\t\t\tconditionalTable[i] = \r\n\t\t\t\t\tcountLetter(currentLetter, trainDir) / nCharLanguage;\r\n\t\t}\r\n\t\tconditionalTable[26] = \r\n\t\t\t\tcountLetter(' ', trainDir) / nCharLanguage;\r\n\t}", "private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}", "public static void checkUpdateProbabilityOnAtomicRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 0; j < 8; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = base_relations[j];\r\n\t\t\t\r\n\t\t\t\tfor(int k = 0; k < 8; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = base_relations[k];\r\n\t\t\t\t\ttotal++;\r\n\t\t\t\t\t//int new_r3 = CompositionTable.LookUpTable(r1, r2);\r\n\t\t\t\t\tint new_r3 = SetOperators.intersection(r3, \r\n\t\t\t\t\t\t\t\tCompositionTable.LookUpTable(r1, r2));\r\n\t\t\t\t\t//System.out.println(new_r3);\r\n\t\t\t\t\tif( new_r3 != r3 )\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\tupdate++;\r\n\t\t\t\t\t\t//System.out.println(new_r3);\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\t\r\n\t\tSystem.out.println(\" total \" + total + \" update \" + update);\r\n\t\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "private double condProb(String stateGiven, String stateFind){\n HashMap probs = genAllProb(stateGiven);\n return (double) probs.get(stateFind);\n }", "public Long metricValue() {\n\t\t// Keep a list free from redundant subjects, that is with all its unique\n\t\t// elements\n\t\tList<ComparableSubject> lstUniqueSubjects = new ArrayList<ComparableSubject>();\n\t\tboolean isCurSubjectUnique;\n\t\tlong countCompared = 0;\n\t\tint mapSize = pMapSubjects.size();\n\t\tlogger.debug(\"Starting metric value computation, with \" + mapSize + \"instances...\");\n\n\t\t// int i = 0;\n\t\t// Compare each of the subjects with the ones already recognized as unique...\n\t\tfor (ComparableSubject curSubject : pMapSubjects.values()) {\n\t\t\tisCurSubjectUnique = true;\n\t\t\t// i++;\n\t\t\t// int z = 0;\n\t\t\tfor (ComparableSubject curUniqueSubject : lstUniqueSubjects) {\n\t\t\t\t// and if the subject currently examined is equivalent to one of the existing\n\t\t\t\t// unique subjects, do not regard it as unique, continue with the next one\n\t\t\t\tif (curSubject.isEquivalentTo(curUniqueSubject)) {\n\t\t\t\t\tisCurSubjectUnique = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// z++;\n\t\t\t\t// if ((z % 10000) == 0) System.out.println(\"compared \"+i + \"/\" + z);\n\t\t\t}\n\n\t\t\t// if ((i % 1000 == 0)) System.out.println(\"compared \"+i);\n\n\t\t\t// Finally, if the current subject is not equivalent to any of\n\t\t\t// the existing unique subjects, add it as unique\n\t\t\tif (isCurSubjectUnique) {\n\t\t\t\tlstUniqueSubjects.add(curSubject);\n\t\t\t}\n\n\t\t\tcountCompared++;\n\t\t\tif ((countCompared % 50000) == 0) {\n\t\t\t\tlogger.debug(\"Estimated value with \" + countCompared + \" compared instances: \"\n\t\t\t\t\t\t+ (((double) lstUniqueSubjects.size()) / ((double) mapSize)));\n\t\t\t}\n\t\t}\n\n\t\t// Compute metric value\n\t\t// long metricValue = ((long)lstUniqueSubjects.size()) /\n\t\t// ((long)pMapSubjects.size());\n\t\tlong metricValue = (((long) pMapSubjects.size()) > 0)\n\t\t\t\t? ((long) lstUniqueSubjects.size()) / ((long) pMapSubjects.size())\n\t\t\t\t: 0;\n\t\t// If any subject is equivalent to another, it will not be part of the list of\n\t\t// unique subjects, then\n\t\t// the size of this list is the \"Count of Unique Subjects\" required to calculate\n\t\t// the metric\n\t\treturn metricValue;\n\t}", "protected abstract List<Double> calcScores();", "@Override\n public int compare(Prediction lhs, Prediction rhs) {\n return Float.compare(rhs.getConfidence(), lhs.getConfidence());\n }", "public void testCompare1() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.5D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions above the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "double getBranchProbability();", "public Double getAssignmentCategoryAverageGrade(List<Student> students){\n \tdouble totalStudentPoints = getTotalCategoryStudentPoints(students);\n \tdouble totalMaxPoints = getTotalCategoryWorth(students);\n \treturn (totalStudentPoints / totalMaxPoints * 100);\n }", "public abstract double classify(Instance e);", "public double[] getProbabilities() { return getProbabilities((int[])null); }", "private double condProb(RelStruc A,Hashtable atomhasht,OneStrucData inst,long[] timers)\n\t\t\tthrows RBNCompatibilityException\n\t\t\t{\n\t\tdouble result = probform.evalSample(A,atomhasht,inst,timers);\n\t\t//System.out.print(\" cP: \" + result);\n\t\treturn result;\n\t\t\t}", "public void test2 (List<List<String>> sentences) {\n double totalLogProb = 0;\n double totalNumTokens = 0;\n for (List<String> sentence : sentences) {\n totalNumTokens += sentence.size();\n double sentenceLogProb = sentenceLogProb2(sentence);\n totalLogProb += sentenceLogProb;\n }\n double perplexity = Math.exp(-totalLogProb / totalNumTokens);\n System.out.println(\"Word Perplexity = \" + perplexity );\n }", "public static Attribute chooseAttribute(ArrayList<Case> cases) {\n\t\tAttribute currentBestAttribute = null;\n\t\tdouble currentBestRemainder = 0;\n\n\t\t// k\n\t\tdouble [] kValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\t// Extract the correct fields from each case into a separate array for sorting\n\t\t\tkValues[i] = cases.get(i).k;\n\t\t}\n\t\tArrays.sort(kValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\t// Find the midpoint between two sequential values\n\t\t\tdouble midpoint = (kValues[i] + kValues[i+1]) / 2;\n\t\t\t// A rough way of dealing with non-unique values; two sequential identical values' average will be themselves, so ignore anything coming from such a pairing\n\t\t\tif (midpoint == kValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\t// Count the number of positive and negative cases that exist on either side of the threshold\n\t\t\t\tif (c.k < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Calculate the remainder as given in lecture slides 17-18 slide 31\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\t// We want the attribute that gives the highest information gain, and since information content of the full\n\t\t\t// set is constant, this is equivalent to the smallest remainder\n\t\t\tif (remainder < currentBestRemainder || currentBestAttribute == null) {\n\t\t\t\tcurrentBestAttribute = Attribute.K;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// na\n\t\tdouble [] naValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tnaValues[i] = cases.get(i).na;\n\t\t}\n\t\tArrays.sort(naValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (naValues[i] + naValues[i+1]) / 2;\n\t\t\tif (midpoint == naValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.na < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Na;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// cl\n\t\tdouble [] clValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tclValues[i] = cases.get(i).cl;\n\t\t}\n\t\tArrays.sort(clValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (clValues[i] + clValues[i+1]) / 2;\n\t\t\tif (midpoint == clValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.cl < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.CL;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// hco3\n\t\tdouble [] hco3Values = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\thco3Values[i] = cases.get(i).hco3;\n\t\t}\n\t\tArrays.sort(hco3Values);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (hco3Values[i] + hco3Values[i+1]) / 2;\n\t\t\tif (midpoint == hco3Values[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.hco3 < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.HCO3;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// endotoxin\n\t\tdouble [] endotoxinValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tendotoxinValues[i] = cases.get(i).endotoxin;\n\t\t}\n\t\tArrays.sort(endotoxinValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (endotoxinValues[i] + endotoxinValues[i+1]) / 2;\n\t\t\tif (midpoint == endotoxinValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.endotoxin < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Endotoxin;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// aniongap\n\t\tdouble [] aniongapValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\taniongapValues[i] = cases.get(i).aniongap;\n\t\t}\n\t\tArrays.sort(aniongapValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (aniongapValues[i] + aniongapValues[i+1]) / 2;\n\t\t\tif (midpoint == aniongapValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.aniongap < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Aniongap;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// pla2\n\t\tdouble [] pla2Values = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tpla2Values[i] = cases.get(i).pla2;\n\t\t}\n\t\tArrays.sort(pla2Values);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (pla2Values[i] + pla2Values[i+1]) / 2;\n\t\t\tif (midpoint == pla2Values[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.pla2 < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.PLA2;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// sdh\n\t\tdouble [] sdhValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tsdhValues[i] = cases.get(i).sdh;\n\t\t}\n\t\tArrays.sort(sdhValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (sdhValues[i] + sdhValues[i+1]) / 2;\n\t\t\tif (midpoint == sdhValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.sdh < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.SDH;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// gldh\n\t\tdouble [] gldhValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tgldhValues[i] = cases.get(i).gldh;\n\t\t}\n\t\tArrays.sort(gldhValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (gldhValues[i] + gldhValues[i+1]) / 2;\n\t\t\tif (midpoint == gldhValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.gldh < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.GLDH;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// tpp\n\t\tdouble [] tppValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\ttppValues[i] = cases.get(i).tpp;\n\t\t}\n\t\tArrays.sort(tppValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (tppValues[i] + tppValues[i+1]) / 2;\n\t\t\tif (midpoint == tppValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.tpp < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.TPP;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// breathRate\n\t\tdouble [] breathRateValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tbreathRateValues[i] = cases.get(i).breathRate;\n\t\t}\n\t\tArrays.sort(breathRateValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (breathRateValues[i] + breathRateValues[i+1]) / 2;\n\t\t\tif (midpoint == breathRateValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.breathRate < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.BreathRate;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// pcv\n\t\tdouble [] pcvValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tpcvValues[i] = cases.get(i).pcv;\n\t\t}\n\t\tArrays.sort(pcvValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (pcvValues[i] + pcvValues[i+1]) / 2;\n\t\t\tif (midpoint == pcvValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.pcv < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.PCV;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// pulseRate\n\t\tdouble [] pulseRateValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tpulseRateValues[i] = cases.get(i).pulseRate;\n\t\t}\n\t\tArrays.sort(pulseRateValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (pulseRateValues[i] + pulseRateValues[i+1]) / 2;\n\t\t\tif (midpoint == pulseRateValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.pulseRate < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.PulseRate;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// fibrinogen\n\t\tdouble [] fibrinogenValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tfibrinogenValues[i] = cases.get(i).fibrinogen;\n\t\t}\n\t\tArrays.sort(fibrinogenValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (fibrinogenValues[i] + fibrinogenValues[i+1]) / 2;\n\t\t\tif (midpoint == fibrinogenValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.fibrinogen < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Fibrinogen;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// dimer\n\t\tdouble [] dimerValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tdimerValues[i] = cases.get(i).dimer;\n\t\t}\n\t\tArrays.sort(dimerValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (dimerValues[i] + dimerValues[i+1]) / 2;\n\t\t\tif (midpoint == dimerValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.dimer < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Dimer;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// fibPerDim\n\t\tdouble [] fibPerDimValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tfibPerDimValues[i] = cases.get(i).fibPerDim;\n\t\t}\n\t\tArrays.sort(fibPerDimValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (fibPerDimValues[i] + fibPerDimValues[i+1]) / 2;\n\t\t\tif (midpoint == fibPerDimValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.fibPerDim < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.FibPerDim;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\treturn currentBestAttribute;\n\t}", "public float specificity(final L label)\n {\n\n final Multiset<L> predictionsForLabel = confusionMatrix.computeIfAbsent(label, l ->HashMultiset.create());\n\n final int hasLabel = predictionsForLabel.size();\n final int hasLabelRight = predictionsForLabel.count(label); // true positives\n\n\n final int notLabelWrong = getTotalPredicted(label) - hasLabelRight; // false negatives\n final int notLabel = numExamples - hasLabel;\n final int notLabelRight = notLabel - notLabelWrong; // true negatives\n\n if (notLabel == 0)\n {\n return 1.0f;\n }\n\n return (float) notLabelRight / (float) notLabel;\n }", "int givePropScore(int propSize, int crownNum) throws Exception;", "@Override\n protected void calculateCategoryRates(Node node) {\n\n double propVariable = 1.0;\n int cat = 0;\n\n //if (/*invarParameter != null && */invarParameter.getValue() > 0 ) {\n //System.out.println(\"----------------\");\n double pr;\n if(invPrLogit){\n pr = 1.0/(1.0 + Math.exp(-invarParameter.getValue()));\n //System.out.println(pr);\n }else{\n pr = invarParameter.getValue();\n }\n\n if (hasPropInvariantCategory) {\n categoryRates[0] = 0.0;\n //System.out.println(getCurrModel()+\" \"+INVAR_INDEX);\n categoryProportions[0] = pr*INDICATORS[getCurrModel()][INVAR_INDEX];\n //System.out.println(invarParameter.getValue()+\" \"+INDICATORS[getCurrModel()][INVAR_INDEX]);\n //System.out.println(\"categoryProportions[0]: \"+categoryProportions[0]);\n }\n\n //System.out.println(invarParameter.getID()+\" \" +invarParameter.getValue()+\" \"+pr);\n propVariable = 1.0 - pr*INDICATORS[getCurrModel()][INVAR_INDEX];\n if (hasPropInvariantCategory) {\n cat = 1;\n }\n //}\n\n //System.out.println(\"categoryProportions[0]: \"+categoryProportions[0]);\n\n if (INDICATORS[getCurrModel()][SHAPE_INDEX] == PRESENT) {\n\n final double a = shapeParameter.getValue();\n double mean = 0.0;\n final int gammaCatCount = categoryCount - cat;\n //System.out.println(\"a: \"+a);\n final GammaDistribution g = new GammaDistributionImpl(a, 1.0 / a);\n //System.out.println(\"gammaCatCount:\"+gammaCatCount);\n //if(gammaCatCount == 3){\n //throw new RuntimeException(\"\");\n //}\n for (int i = 0; i < gammaCatCount; i++) {\n try {\n // RRB: alternative implementation that seems equally good in\n // the first 5 significant digits, but uses a standard distribution object\n if(a < 1e-3){\n\n categoryRates[i + cat] = Double.NEGATIVE_INFINITY;\n }else if(a > 1e10){\n categoryRates[i + cat] = 1.0;\n }else if (useBeast1StyleGamma) {\n categoryRates[i + cat] = GammaDistributionQuantile((2.0 * i + 1.0) / (2.0 * gammaCatCount), a, 1.0 / a);\n \t} else {\n \t\tcategoryRates[i + cat] = g.inverseCumulativeProbability((2.0 * i + 1.0) / (2.0 * gammaCatCount));\n \t}\n\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(\"Something went wrong with the gamma distribution calculation\");\n System.exit(-1);\n }\n mean += categoryRates[i + cat];\n\n categoryProportions[i + cat] = propVariable / gammaCatCount;\n }\n\n if(a >= 1e-3 ){\n\n mean = (propVariable * mean) / gammaCatCount;\n\n for (int i = 0; i < gammaCatCount; i++) {\n\n categoryRates[i + cat] /= mean;\n\n }\n }\n } else {\n\n int gammaCatCount = categoryCount - cat;\n //System.out.println(\"Hi!\");\n for(int i = cat; i < categoryRates.length;i++){\n categoryRates[i] = 1.0 / propVariable/gammaCatCount;\n\n categoryProportions[i] = propVariable/gammaCatCount;\n }\n }\n /*System.out.println(\"-------------------------------\");\n System.out.println(\"ID: \"+getID());\n System.out.println(modelChoice);\n System.out.print (invarParameter.getValue()*INDICATORS[getCurrModel()][INVAR_INDEX]+\" \");\n System.out.println(getID());\n System.out.println(\"alpha: \"+shapeParameter.getValue());\n System.out.println(\"invPr: \"+invarParameter.getValue());\n System.out.println(\"siteModel: \"+modelChoice.getValue());\n System.out.println(\"rate: \"+muParameter.getValue());\n for(int i = 0; i < categoryRates.length;i++){\n System.out.print(categoryRates[i]+\" \");\n }\n System.out.println();\n\n System.out.println(invarParameter.getValue());\n for(int i = 0; i < categoryProportions.length;i++){\n\n System.out.print(categoryProportions[i]+\" \");\n }\n System.out.println();\n System.out.println(\"----------------\"); */\n\n\n ratesKnown = true;\n }", "@Test\n public void genNeighStateProbability() {\n double[] metrics = new double[STATES.length * STATES.length];\n double sum = 0;\n Random rand = new Random();\n for (int i = 0; i < metrics.length; i++) {\n int x = i / STATES.length;\n int y = i % STATES.length;\n if (x == y) {\n metrics[i] = 0;\n } else {\n double d = Math.abs(rand.nextGaussian());//Math.exp(-Math.abs(STATES[x] - STATES[y]) / 3) * Math.abs(rand.nextGaussian());\n metrics[i] = d;\n sum += d;\n }\n }\n final double finalSum = sum;\n metrics = DoubleStream.of(metrics).map(d -> d / finalSum).toArray();\n for (int i = 0; i < metrics.length; i++) {\n int x = i / STATES.length;\n int y = i % STATES.length;\n if (metrics[i] > 0.01) {\n System.out.printf(\"%d:%d:%.4f\\n\", STATES[x], STATES[y], metrics[i]);\n }\n }\n }", "public static void checkUpdateProbabilityOnHORNRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 1; j < 255; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = j;\r\n\t\t\t\tif(!MTS.BIMTS_H8.contains((Integer)r2))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t/*if(r2 == 1 || r2 == 2 || r2 == 4 || r2 == 8 || r2 == 16 || r2 == 32 || r2 == 64 || r2 == 128)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\t*/\r\n\t\t\t\telse\r\n\t\t\t\tfor(int k = 1; k < 255; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = k;\r\n\t\t\t\t\t//if(r3 == 1 || r3 == 2 || r3 == 4 || r3 == 8 || r3 == 16 || r3 == 32 || r3 == 64 || r3 == 128)\r\n\t\t\t\t\t\tif(!MTS.BIMTS_H8.contains((Integer)r3))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\ttotal++;\r\n\t\t\t\t\t\tint new_r3 = CompositionTable.LookUpTable(r1, r2);\r\n\t\t\t\t\t\tif(new_r3 < r3)\r\n\t\t\t\t\t\t\tupdate++;\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\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "public abstract float getProbability(String[] tokens);", "public double matchData() {\n\t\tArrayList<OWLDataProperty> labels1 = getDataProperties(ontology1);\n\t\tArrayList<OWLDataProperty> labels2 = getDataProperties(ontology2);\n\t\tfor (OWLDataProperty lit1 : labels1) {\n\t\t\tfor (OWLDataProperty lit2 : labels2) {\n\t\t\t\tif (LevenshteinDistance.computeLevenshteinDistance(TestAlign.mofidyURI(lit1.toString())\n\t\t\t\t\t\t, TestAlign.mofidyURI(lit2.toString()))>0.8){\n\t\t\t\t\treturn 1.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0.;\n\n\n\t}", "public void testCompare2() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(0.6D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions below the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "double calcScoreFromObjCount(double[] c_in, double[] c_out) {\r\n\t\t// / multi-class\r\n\t\tdouble diff, sum = 0, max_val = Double.NEGATIVE_INFINITY, min_val = Double.POSITIVE_INFINITY;\r\n\t\tfor (int i = 0; i < num_class; i++) {\r\n\t\t\tdiff = (c_in[i] - c_out[i]);\r\n\t\t\tif (diff > max_val) {\r\n\t\t\t\tmax_val = diff;\r\n\t\t\t}\r\n\t\t\tif (diff < min_val) {\r\n\t\t\t\tmin_val = diff;\r\n\t\t\t}\r\n\t\t\tsum += Math.abs(diff);\r\n\t\t}\r\n\t\treturn (sum - Math.abs(max_val) - Math.abs(min_val)) + Math.abs(max_val - min_val);\r\n\t}", "@Test\n void adjectivesScoring() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n HashMap<String, Double> as = np.adjectivesScoring(sentences);\n for (String key : as.keySet()) {\n Double value = as.get(key);\n assertTrue(value >= 0 && value <= 4);\n }\n }", "@Override\n\t\tpublic int compare(S o1, S o2) {\n\t\t\tif (getProb(o1) > getProb(o2))\n\t\t\t\treturn -1;\n\t\t\tif (getProb(o1) < getProb(o2))\n\t\t\t\treturn 1;\n\t\t\treturn Double.compare(o1.hashCode(), o2.hashCode());\n\t\t}", "private HashMap<String, int[] > getAttrClassRatio ( ArrayList<String> alCalcAttr, ArrayList<String> alClasAttr ) {\r\n\t\tHashMap< String, int[] > attrClassRatioMap = new HashMap<String, int[] >();\r\n\t\tString classA = alClasAttr.get(0);\r\n\t\tfor ( int i = 0; i < alCalcAttr.size(); i++ ) {\r\n\t\t\tString attr = alCalcAttr.get(i);\r\n\t\t\tString classification = alClasAttr.get(i);\r\n\t\t\tif ( !attrClassRatioMap.containsKey(attr) ) {\r\n\t\t\t\tattrClassRatioMap.put( attr, new int[2] );\r\n\t\t\t}\r\n\t\t\tif ( classA.equals( classification ) ) {\r\n\t\t\t\tint[] classCount = attrClassRatioMap.get( attr );\r\n\t\t\t\t++classCount[0];\r\n\t\t\t\tattrClassRatioMap.put( attr, classCount );\r\n\t\t\t} else {\r\n\t\t\t\tint[] classCount = attrClassRatioMap.get( attr );\r\n\t\t\t\t++classCount[1];\r\n\t\t\t\tattrClassRatioMap.put( attr, classCount );\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn attrClassRatioMap;\r\n\t}", "@Override\n public double evaluate(Map<String, Double> assignment) throws Exception {\n\n double res = Math.log(getEx2().evaluate(assignment)) / Math.log(getEx2().evaluate(assignment));\n return res;\n }", "int definePassingScore(Speciality speciality) throws LogicException;", "public Map<Integer, Boolean> testCategorization(String topic, String[] features) {\n\n\t\tint n = trainingSet.size(); // Count docs.\n\n\t\t// Count docs in class.\n\t\tint nc = 0;\n\t\tfor (Integer id : trainingSet) {\n\t\t\tboolean inClass = this.getDocument(id).getTopics().contains(topic);\n\t\t\tif (inClass)\n\t\t\t\tnc++;\n\t\t}\n\n\t\tdouble prior_c = nc / (double) n;\n\t\tdouble prior_cbar = (n - nc) / (double) n;\n\n\t\tMap<String, Double> condProb_c = new HashMap<String, Double>();\n\t\tMap<String, Double> condProb_cbar = new HashMap<String, Double>();\n\n\t\t// Count docs in class containing term.\n\t\tfor (String term : features) {\n\t\t\tSet<Integer> postings = terms.get(term).getPostings().keySet();\n\t\t\tint nct_c = 0, nct_cbar = 0;\n\t\t\tfor (Integer id : trainingSet) {\n\t\t\t\tboolean inClass = this.getDocument(id).getTopics().contains(topic);\n\t\t\t\tif (postings.contains(id)) { // document contains the term\n\t\t\t\t\tif (inClass)\n\t\t\t\t\t\tnct_c++;\n\t\t\t\t\telse\n\t\t\t\t\t\tnct_cbar++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// And calculate conditional probabilities.\n\t\t\tcondProb_c.put(term, (nct_c + 1) / (double) (nc + 2));\n\t\t\tcondProb_cbar.put(term, (nct_cbar + 1) / (double) ((n - nc) + 2));\n\t\t}\n\n\t\t// ---APPLY BERNOULLI----\n\n\t\tMap<Integer, Boolean> marked = new HashMap<Integer, Boolean>();\n\t\tfor (Integer id : testSet) {\n\t\t\tdouble score_c = Math.log(prior_c);\n\t\t\tdouble score_cbar = Math.log(prior_cbar);\n\t\t\tfor (String term : features) {\n\t\t\t\tSet<Integer> postings = terms.get(term).getPostings().keySet();\n\t\t\t\tif (postings.contains(id)) {\n\t\t\t\t\tscore_c += Math.log(condProb_c.get(term));\n\t\t\t\t\tscore_cbar += Math.log(condProb_cbar.get(term));\n\t\t\t\t} else {\n\t\t\t\t\tscore_c += Math.log(1 - condProb_c.get(term));\n\t\t\t\t\tscore_cbar += Math.log(1 - condProb_cbar.get(term));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (score_c > score_cbar)\n\t\t\t\tmarked.put(id, true);\n\t\t\telse\n\t\t\t\tmarked.put(id, false);\n\t\t}\n\t\treturn marked;\n\t}", "public interface IStoppingCriteria {\n\n /**\n * Determine the degree of clustering agreement\n * @param cluster1 one clustering results\n * @param cluster2 the other clustering results\n * @return the degree of clustering agreement; 1 refers to be the same clustering results; 0 refers to be the totally different clustering results\n */\n public double computeSimilarity(int[] cluster1, int[] cluster2);\n\n}", "@Override\n public double evaluate(GameState state, int id) {\n ArrayList<Double> scores = new ArrayList<>();\n for (int i = 0; i < 2; i++) {\n List<Double> bullets = new BulletDistanceFeature().extract(state, i);\n double angle = new OrientationFeature().extract(state, i);\n double positionScore = new PositionScoreFeature().extract(state, i);\n\n // take log of bullet distance to magnify the importance of ones closer to you\n double bulletScore = bullets.stream().mapToDouble(Math::log).sum();\n\n scores.add((bulletScore * this.bulletDist) + (angle * this.orientation) + positionScore * this.position);\n }\n return this.courage * scores.get(id) - scores.get(1 - id);\n }", "public Double calculateSimilarity(OWLObject a, OWLObject b);", "default double[] predictAssignmentProbs(Vector vector, List<MultiLabel> assignments){\n return Arrays.stream(predictLogAssignmentProbs(vector, assignments)).map(Math::exp).toArray();\n }", "@Override\n\tpublic int evaluate(String modelDirection, EObject featureContext) {\n\t\tint op1=this.getCompOp1().getNumPriorityOp2().evaluate(modelDirection, featureContext);\n\t\tint op2=this.getCompOp2().getNumPriorityOp2().evaluate(modelDirection, featureContext);\n\t\tif (op1!=op2) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public double calcProbs(Entry newEntry) {\r\n\t\ttotal = Collections.frequency(hasCOVID19, \"yes\");\r\n\t\tpIfYes += Collections.frequency(temperatureIfCOVID19,newEntry.getTemperature()) / total;\r\n\t\tpIfYes *= Collections.frequency(achesIfCOVID19,newEntry.getAches()) / total;\r\n\t\tpIfYes *= Collections.frequency(coughIfCOVID19,newEntry.getCough()) / total;\r\n\t\tpIfYes *= Collections.frequency(soreThroatIfCOVID19,newEntry.getSoreThroat()) / total;\r\n\t\tpIfYes *= Collections.frequency(dangerZoneIfCOVID19,newEntry.getDangerZone()) / total;\r\n\t\tpIfYes *= (double) total / dataEntries.size();\r\n\t\t\r\n\t\ttotal = Collections.frequency(hasCOVID19, \"no\");\r\n\t\tpIfNo += (Collections.frequency(temperature,newEntry.getTemperature()) - Collections.frequency(temperatureIfCOVID19,newEntry.getTemperature())) / total;\r\n\t\tpIfNo *= (Collections.frequency(cough,newEntry.getCough()) - Collections.frequency(coughIfCOVID19,newEntry.getCough())) / total;\r\n\t\tpIfNo *= (Collections.frequency(aches,newEntry.getAches()) - Collections.frequency(achesIfCOVID19,newEntry.getAches())) /total;\r\n\t\tpIfNo *= (Collections.frequency(soreThroat,newEntry.getSoreThroat()) - Collections.frequency(soreThroatIfCOVID19,newEntry.getSoreThroat())) /total;\r\n\t\tpIfNo *= (Collections.frequency(dangerZone,newEntry.getDangerZone()) - Collections.frequency(dangerZoneIfCOVID19,newEntry.getDangerZone())) / total;\r\n\t\tpIfNo *= (double) total / dataEntries.size();\r\n\t\t\r\n\t\t//Getting the result as a percentage and returning it.\r\n\t\tprobability = (pIfYes / (pIfYes+pIfNo)) * 100;\r\n\t\treturn probability;\r\n\t}", "public void check_thresholds(long avg, long sum, BigInteger prod)\n {\n if(this.avg > avg)\n System.out.println(\"State detected from average\");\n if(this.sum > sum)\n System.out.println(\"State detected from sum\");\n if(this.prod.compareTo(prod) == 1)\n System.out.println(\"State detected from multiplication\");\n }", "public void trainBernoulli() {\t\t\n\t\tMap<String, Cluster> trainingDataSet = readFile(trainLabelPath, trainDataPath, \"training\");\n\t\tMap<String, Cluster> testingDataSet = readFile(testLabelPath, testDataPath, \"testing\");\n\n\t\t// do testing, if the predicted class and the gold class is not equal, increment one\n\t\tdouble error = 0;\n\n\t\tdouble documentSize = 0;\n\n\t\tSystem.out.println(\"evaluate the performance\");\n\t\tfor (int testKey = 1; testKey <= 20; testKey++) {\n\t\t\tCluster testingCluster = testingDataSet.get(Integer.toString(testKey));\n\t\t\tSystem.out.println(\"Cluster: \"+testingCluster.toString());\n\n\t\t\tfor (Document document : testingCluster.getDocuments()) {\n\t\t\t\tdocumentSize += 1; \n\t\t\t\tList<Double> classprobability = new ArrayList<Double>();\n\t\t\t\tMap<String, Integer> testDocumentWordCounts = document.getWordCount();\n\n\t\t\t\tfor (int classindex = 1; classindex <= 20; classindex++) {\n\t\t\t\t\t// used for calculating the probability\n\t\t\t\t\tCluster trainCluster = trainingDataSet.get(Integer.toString(classindex));\n\t\t\t\t\t// System.out.println(classindex + \" \" + trainCluster.mClassId);\n\t\t\t\t\tMap<String, Double> bernoulliProbability = trainCluster.bernoulliProbabilities;\n\t\t\t\t\tdouble probability = Math.log(trainCluster.getDocumentSize()/trainDocSize);\n\t\t\t\t\tfor(int index = 1; index <= voc.size(); index++ ){\n\n\t\t\t\t\t\t// judge whether this word is stop word \n\t\t\t\t\t\tboolean isStopwords = englishStopPosition.contains(index);\n\t\t\t\t\t\tif (isStopwords) continue;\n\n\t\t\t\t\t\tboolean contain = testDocumentWordCounts.containsKey(Integer.toString(index));\t\t\t\t\t\t\n\t\t\t\t\t\tif (contain) {\n\t\t\t\t\t\t\tprobability += Math.log(bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tprobability += Math.log(1 - bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// put the probability into the map for the specific class\n\t\t\t\t\tclassprobability.add(probability);\n\t\t\t\t}\n\t\t\t\tObject obj = Collections.max(classprobability);\n\t\t\t\t// System.out.println(classprobability);\n\t\t\t\tString predicte_class1 = obj.toString();\n\t\t\t\t// System.out.println(predicte_class1);\n\t\t\t\t// System.out.println(Double.parseDouble(predicte_class1));\n\t\t\t\tint index = classprobability.indexOf(Double.parseDouble(predicte_class1));\n\t\t\t\t// System.out.println(index);\n\t\t\t\tString predicte_class = Integer.toString(index + 1);\n\n\n\t\t\t\tconfusion_matrix[testKey - 1][index] += 1;\n\n\t\t\t\t// System.out.println(document.docId + \": G, \" + testKey + \"; P: \" + predicte_class);\n\t\t\t\tif (!predicte_class.equals(Integer.toString(testKey))) {\n\t\t\t\t\terror += 1;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize);\n\t\t}\n\n\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize + \" precision rate : \" + (1 - error/documentSize));\n\n\t\t// print confusion matrix\n\t\tprintConfusionMatrix(confusion_matrix);\n\t}", "public int compare(Dataset object1, Dataset object2){\n if(object1.getAttributeCount() != candidate.getAttributeCount() ||\n object2.getAttributeCount() != candidate.getAttributeCount()){\n return 0;\n }\n\n double dist1 = 0.0, dist2 = 0.0;\n double tmp1 = 0.0, tmp2 = 0.0;\n\n for(int i = 0; i < candidate.getAttributeCount(); i++){\n if(candidate.getOutputColumnCount() == (i+1)){\n continue;\n }\n\n Attribute ac = candidate.getAttribute(i);\n Attribute a1 = object1.getAttribute(i);\n Attribute a2 = object2.getAttribute(i);\n\n if(ac.getType() == AttributeTypes.TEXT){\n dist1 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a1.getValue());\n dist2 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a2.getValue());\n }else{\n /*\n double acDouble = 0.0;\n double a1Double = 0.0;\n double a2Double = 0.0;\n switch(ac.getType()){\n case INTEGER: acDouble = (double)((Integer)ac.getValue()).intValue(); break;\n case DECIMAL: acDouble = (double)ac.getValue();\n }\n switch(a1.getType()){\n case INTEGER: a1Double = (double)((Integer)a1.getValue()).intValue(); break;\n case DECIMAL: a1Double = (double)a1.getValue();\n }\n switch(a2.getType()){\n case INTEGER: a2Double = (double)((Integer)a2.getValue()).intValue(); break;\n case DECIMAL: a2Double = (double)a2.getValue();\n }*/\n double acDouble = (double)ac.getValue();\n double a1Double = (double)a1.getValue();\n double a2Double = (double)a2.getValue();\n\n tmp1 += Math.pow(a1Double-acDouble, 2);\n tmp2 += Math.pow(a2Double-acDouble, 2);\n }\n }\n\n dist1 += Math.sqrt(tmp1);\n dist2 += Math.sqrt(tmp2);\n\n if (dist1 > dist2) {\n return 1;\n }\n if (dist1 < dist2) {\n return -1;\n }\n return 0;\n }", "private double categoryProbability(Collection<F> features, C category) {\n return Math.log(((double) this.categoryCount(category)\n / (double) this.getCategoriesTotal()))\n + featuresProbabilityLogSum(features, category);\n }", "Integer classify(LogicGraph pce);", "@Test\n public void testWeightedConsistency() {\n\n // See if this statistic computes weighted statistics\n // If not, skip this test\n UnivariateStatistic statistic = getUnivariateStatistic();\n if (!(statistic instanceof WeightedEvaluation)) {\n return;\n }\n\n // Create arrays of values and corresponding integral weights\n // and longer array with values repeated according to the weights\n final int len = 10; // length of values array\n final double mu = 0; // mean of test data\n final double sigma = 5; // std dev of test data\n double[] values = new double[len];\n double[] weights = new double[len];\n\n // Fill weights array with random int values between 1 and 5\n int[] intWeights = new int[len];\n final DiscreteDistribution.Sampler weightDist =\n UniformDiscreteDistribution.of(1, 5).createSampler(RandomSource.WELL_512_A.create(234878544L));\n for (int i = 0; i < len; i++) {\n intWeights[i] = weightDist.sample();\n weights[i] = intWeights[i];\n }\n\n // Fill values array with random data from N(mu, sigma)\n // and fill valuesList with values from values array with\n // values[i] repeated weights[i] times, each i\n final ContinuousDistribution.Sampler valueDist =\n NormalDistribution.of(mu, sigma).createSampler(RandomSource.WELL_512_A.create(64925784252L));\n List<Double> valuesList = new ArrayList<>();\n for (int i = 0; i < len; i++) {\n double value = valueDist.sample();\n values[i] = value;\n for (int j = 0; j < intWeights[i]; j++) {\n valuesList.add(Double.valueOf(value));\n }\n }\n\n // Dump valuesList into repeatedValues array\n int sumWeights = valuesList.size();\n double[] repeatedValues = new double[sumWeights];\n for (int i = 0; i < sumWeights; i++) {\n repeatedValues[i] = valuesList.get(i);\n }\n\n // Compare result of weighted statistic computation with direct computation\n // on array of repeated values\n WeightedEvaluation weightedStatistic = (WeightedEvaluation) statistic;\n TestUtils.assertRelativelyEquals(statistic.evaluate(repeatedValues),\n weightedStatistic.evaluate(values, weights, 0, values.length),\n 10E-12);\n\n // Check consistency of weighted evaluation methods\n Assert.assertEquals(weightedStatistic.evaluate(values, weights, 0, values.length),\n weightedStatistic.evaluate(values, weights), Double.MIN_VALUE);\n }", "private double estimateNumericalPropertyProb(TemporalElementStats stat, String property,\n Comparator comp, PropertyValue value) {\n // property not sampled or not considered\n if (!stat.getNumericalPropertyStatsEstimation().containsKey(property)) {\n // if property not excluded, return very small value\n // if excluded, it is irrelevant, return 0.5\n return isPropertyRelevant(property) ? 0.0001 : 0.5;\n }\n Double[] propertyStats = stat.getNumericalPropertyStatsEstimation().get(property);\n NormalDistribution dist = new NormalDistribution(propertyStats[0],\n Math.max(Math.sqrt(propertyStats[1]), VERY_LOW_PROB));\n double doubleValue = ((Number) value.getObject()).doubleValue();\n double occurenceProb = stat.getNumericalOccurrenceEstimation().get(property);\n if (comp == EQ) {\n return VERY_LOW_PROB * occurenceProb;\n } else if (comp == NEQ) {\n return (1. - VERY_LOW_PROB) * occurenceProb;\n } else if (comp == LTE) {\n return dist.cumulativeProbability(doubleValue) * occurenceProb;\n } else if (comp == LT) {\n return occurenceProb * (dist.cumulativeProbability(doubleValue) - VERY_LOW_PROB);\n } else if (comp == GTE) {\n return occurenceProb *\n (1. - dist.cumulativeProbability(doubleValue) + VERY_LOW_PROB);\n } else {\n //GT\n return occurenceProb * (1. - dist.cumulativeProbability(doubleValue));\n }\n }", "@Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }", "@Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }", "public double purity(Iterable<Instance> set) {\n\t\tint size = 0;\n\t\tSet<Instance> successNodes = new HashSet<Instance>();\n\t\tSet<Instance> failureNodes = new HashSet<Instance>();\n\t\tfor (Instance i : set) {\n\t\t\tif (i.getCategory() == 0) {\n\t\t\t\tsuccessNodes.add(i);\n\t\t\t} else {\n\t\t\t\tfailureNodes.add(i);\n\t\t\t}\n\t\t\tsize++;\n\t\t}\n\t\tif (successNodes.size() == 0 || failureNodes.size() == 0) {\n\t\t\treturn 1;\n\t\t}\n\t\tdouble papb =\n\t\t\t\t((double)successNodes.size() / (double)size)\n\t\t\t\t* ((double)failureNodes.size() / (double)size);\n\t\treturn papb;\n\t}", "private SortedSet<Classification<F, C>> categoryProbabilities(Collection<F> features) {\n\n /*\n * Sort the set according to the possibilities. Because we have to sort\n * by the mapped value and not by the mapped key, we can not use a\n * sorted tree (TreeMap) and we have to use a set-entry approach to\n * achieve the desired functionality. A custom comparator is therefore\n * needed.\n */\n SortedSet<Classification<F, C>> probabilities =\n new TreeSet<Classification<F, C>>(new Comparator<Classification<F, C>>() {\n\n @Override\n public int compare(Classification<F, C> o1, Classification<F, C> o2) {\n int toReturn = Double.compare(o1.getProbability(), o2.getProbability());\n if ((toReturn == 0) && !o1.getCategory().equals(o2.getCategory())) {\n toReturn = -1;\n }\n return toReturn;\n }\n });\n\n for (C category : this.getCategories()) {\n probabilities.add(new Classification<F, C>(\n features, category, this.categoryProbability(features, category)));\n }\n return probabilities;\n }", "@Override\n public double evaluate(Map<String, Double> assignment) throws Exception {\n return getExpression1().evaluate(assignment) - getExpression2().evaluate(assignment);\n }", "public int compare(Object o1, Object o2) {\n int[] p1 = (int[]) o1;\n int[] p2 = (int[]) o2;\n\n // compare sum of axis distances for each priority\n for (int p=MAX_PRIORITY; p>=MIN_PRIORITY; p--) {\n int dist1 = 0, dist2 = 0;\n for (int i=0; i<p1.length; i++) {\n if (priorities[i] == p) {\n dist1 += distance(i, p1[i]);\n dist2 += distance(i, p2[i]);\n }\n }\n int diff = dist1 - dist2;\n if (diff != 0) return diff;\n }\n\n // compare number of diverging axes for each priority\n for (int p=MAX_PRIORITY; p>=MIN_PRIORITY; p--) {\n int div1 = 0, div2 = 0;\n for (int i=0; i<p1.length; i++) {\n if (priorities[i] == p) {\n if (p1[i] != 0) div1++;\n if (p2[i] != 0) div2++;\n }\n }\n int diff = div1 - div2;\n if (diff != 0) return diff;\n }\n\n return 0;\n }", "private static void applyRules(Instances itemsets, Instances predictions) {\n\t\tfor (int i=0; i<predictions.numInstances(); ++i) {\n\t\t\tInstance instance = predictions.instance(i);\n\t\t\tboolean covered = true;\n\t\t\tfor (int j= 0; j<itemsets.numInstances(); ++j) {\n\t\t\t\tInstance rule = itemsets.instance(j);\n\t\t\t\tcovered = true;\n\t\t\t\tfor (int k=0; k< itemsets.numAttributes() -1 ; ++k) {\n\t\t\t\t\tif (rule.value(k)==1) {\n\t\t\t\t\t\tcovered = instance.value(k)==1;\n\t\t\t\t\t\tif(!covered){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif (covered) {\n\t\t\t\t\t\n\t\t\t\t\tinstance.setClassValue(rule.classValue());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public abstract Object getDecisionValue();", "public double getScore() {\n int as = this.attributes.size(); // # of attributes that were matched\n\n // we use thresholding ranking approach for numInstances to influence the matching score\n int instances = this.train.numInstances();\n int inst_rank = 0;\n if (instances > 100) {\n inst_rank = 1;\n }\n if (instances > 500) {\n inst_rank = 2;\n }\n\n return this.p_sum + as + inst_rank;\n }", "@Test\n public void TestCase1() {\n VariableMap variables = Variables\n .putValue(\"Role\", \"Executive\")\n .putValue(\"BusinessProcess\", \"PTO Request\")\n .putValue(\"DelegationDateRange\", \"2019-04-31T00:00:00\");\n\n DmnDecisionTableResult result = dmnEngine.evaluateDecisionTable(decision, variables);\n\n // Need to establish rule ordering\n assertThat(result.collectEntries(\"result\"))\n .hasSize(2)\n .contains(\"John M\")\n .contains(\"Kerry\");\n }", "@Test\n void animalVariablesTest() {\n assertEquals(50, pens[0].getHealth());\n assertEquals(100, pens[1].getHealth());\n assertEquals(80, pens[2].getHealth());\n assertEquals(70, pens[3].getHealth());\n for (int i = 0; i < pens.length; i++) {\n assertEquals(100, pens[i].getHappiness());\n }\n assertEquals(50, pens[0].getValue());\n assertEquals(100, pens[1].getValue());\n assertEquals(80, pens[2].getValue());\n assertEquals(70, pens[3].getValue());\n }", "public void print_metrics(){\n\t\tHashMap<Integer, HashSet<Integer>> pairs=return_pairs();\n\t\tint total=gold.data.getTuples().size();\n\t\ttotal=total*(total-1)/2;\n\t\tSystem.out.println(\"Reduction Ratio is: \"+(1.0-(double) countHashMap(pairs)/total));\n\t\tint count=0;\n\t\tfor(int i:pairs.keySet())\n\t\t\tfor(int j:pairs.get(i))\n\t\t\tif(goldContains(i,j))\n\t\t\t\tcount++;\n\t\tSystem.out.println(\"Pairs Completeness is: \"+(double) count/gold.num_dups);\n\t}", "@Test\n public void testDecisionRule() {\n DataProvider provider = new DataProvider();\n provider.createDataDefinition();\n DataHandle handle = provider.getData().getHandle();\n \n RiskModelPopulationUniqueness model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.2d)).getPopulationBasedUniquenessRisk();\n double populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n double sampleUniqueness = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getSampleBasedUniquenessRisk().getFractionOfUniqueRecords();\n \n // Risk before anonymization\n assertTrue(sampleUniqueness + \" / \" + populationUniqueness, compareUniqueness(populationUniqueness, 1.0d) == 0);\n assertTrue(sampleUniqueness + \" / \" + populationUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n final ARXAnonymizer anonymizer = new ARXAnonymizer();\n final ARXConfiguration config = ARXConfiguration.create();\n config.addPrivacyModel(new KAnonymity(2));\n config.setSuppressionLimit(0d);\n \n ARXResult result = null;\n try {\n result = anonymizer.anonymize(provider.getData(), config);\n } catch (IOException e) {\n e.printStackTrace();\n }\n final DataHandle outHandle = result.getOutput(false);\n \n populationUniqueness = outHandle.getRiskEstimator(ARXPopulationModel.create(provider.getData().getHandle().getNumRows(), 0.1d)).getPopulationBasedUniquenessRisk().getFractionOfUniqueTuplesDankar();\n assertTrue(\"Is: \" + populationUniqueness, compareUniqueness(populationUniqueness, 0) == 0);\n }", "@Override\n\tpublic double evaluateExpression(ArrayList<MembershipFunction> inputs) {\n\t\treturn Math.max(left.evaluateExpression(inputs), right.evaluateExpression(inputs));\n\t}", "public Object eval(Individual ind)\r\n {\r\n BinaryIndividual bi = (BinaryIndividual)ind;\r\n int partialFitness = 0;\r\n int distance = 0;\r\n double fitness = 0.0;\r\n\r\n\t for (int i=0; i<100; i++){\r\n\r\n\t distance = 0;\r\n\r\n\t for (int j=0; j<100; j++){\r\n\t if (!((BinaryIndividual)target[i]).getBooleanAllele(j)^bi.getBooleanAllele(j)) { \r\n\t\t distance++;\r\n\t }\r\n \r\n\t if (distance > partialFitness) {\r\n\t partialFitness = distance;\r\n\t }\r\n\t }\r\n }\r\n\r\n fitness = (double)partialFitness/100.0;\r\n return new Double(fitness);\r\n \r\n\r\n }", "public void testCompare3() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.5D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(0.6D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions above the range < predictions below the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "public double findConfidence(Rule rule) {\n\t\t\tint LHSCount = 0;\n\t\t\tint LHSAndRHSCount = 0;\n\t\t\t\n\t\t\tArrayList<String> LHSAndRHS = new ArrayList<String>();\n\t\t\t\n\t\t\tLHSAndRHS.addAll(rule.LHS);\n\t\t\tLHSAndRHS.addAll(rule.RHS);\n\t\t\t\n\t\t\tLHSCount = findCount(rule.LHS);\n\t\t\tLHSAndRHSCount = findCount(LHSAndRHS);\n\t\t\t\n\t\t\treturn (1.0*LHSAndRHSCount)/LHSCount;\n\t\t}", "@Test\n public void TestCase2() {\n VariableMap variables = Variables\n .putValue(\"Role\", \"Executive\")\n .putValue(\"BusinessProcess\", \"Merit Increase\")\n .putValue(\"DelegationDateRange\", \"2019-04-31T00:00:00\");\n\n DmnDecisionTableResult result = dmnEngine.evaluateDecisionTable(decision, variables);\n\n // Need to establish rule ordering\n assertThat(result.collectEntries(\"result\"))\n .hasSize(1)\n .contains(\"John M\");\n }", "public abstract double getPriority();", "private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}", "float genChance();", "public static float calcSimilarity(Map<String, Enum> first, Map<String, Enum> second) {\n if (first == null && second == null) return 1f;\n Set<String> allKeys = new HashSet<>();\n\n if (first != null) allKeys.addAll(first.keySet());\n if (second != null) allKeys.addAll(second.keySet());\n\n int normDiv = 0;\n float sum = 0;\n for (String key : allKeys) {\n Enum thisEnum = first != null ? first.get(key) : null;\n Enum otherEnum = second != null ? second.get(key) : null;\n PhAttribType phA = getAllPhAttribTypes().get(key);\n try {\n sum += phA.calcSimilarity(thisEnum, otherEnum) * phA.getWeight();\n normDiv++;\n } catch (AttribTypeNotComparableException ncE) {\n System.err.println(\"NotComparableException: \" + ncE);\n }\n }\n if (sum == 0) return 0;\n return sum / normDiv;\n }", "private double [] uniformDiscreteProbs(int numStates) \n {\n double [] uniformProbs = new double[2 * numStates];\n for(int i = 0; i < 2 * numStates; i++)\n uniformProbs[i] = (1.0 / (2 * numStates));\n return uniformProbs;\n }", "private void evaluationLogic() {\n // setup for logic:\n // if distToClosestEstimate[i][0] is smaller than threshold, we have a Tp\n // if distToClosestEstimate[i][0] is larger than threshold, we have a Fn\n // all estimatedFeatures that are not assigned Tp are therefore Fp\n for (int i = 0; i < groundTruthInstant.size(); ++i) {\n if (distToClosestEstimate[i][0] < truePositiveThreshold) {\n ++truePositiveCount;\n int assignedEstimatedFeature = (int) distToClosestEstimate[i][1];\n assignedEstimatedFeatures[assignedEstimatedFeature] = true;\n } else\n ++falseNegativeCount;\n }\n for (int i = 0; i < estimatedInstant.size(); ++i)\n if (!assignedEstimatedFeatures[i])\n ++falsePositiveCount;\n }", "protected static Object[] calcGainRatios(InstanceList ilist, int[] instIndices, int minNumInsts)\n {\n int numInsts = instIndices.length;\n Alphabet dataDict = ilist.getDataAlphabet();\n LabelAlphabet targetDict = (LabelAlphabet) ilist.getTargetAlphabet();\n double[] targetCounts = new double[targetDict.size()];\n\n // Accumulate target label counts and make sure\n // the sum of each instance's target label is 1\n for (int ii = 0; ii < numInsts; ii++) {\n Instance inst = ilist.get(instIndices[ii]);\n Labeling labeling = inst.getLabeling();\n double labelWeightSum = 0;\n for (int ll = 0; ll < labeling.numLocations(); ll++) {\n int li = labeling.indexAtLocation(ll);\n double labelWeight = labeling.valueAtLocation(ll);\n labelWeightSum += labelWeight;\n targetCounts[li] += labelWeight;\n }\n assert(Maths.almostEquals(labelWeightSum, 1));\n }\n\n // Calculate the base entropy Info(D) and the the \n // label distribution of the given instances\n double[] targetDistribution = new double[targetDict.size()];\n double baseEntropy = 0;\n for (int ci = 0; ci < targetDict.size(); ci++) {\n double p = targetCounts[ci] / numInsts;\n targetDistribution[ci] = p;\n if (p > 0)\n baseEntropy -= p * Math.log(p) / log2;\n }\n\n LabelVector baseLabelDistribution = new LabelVector(targetDict, targetDistribution);\n double infoGainSum = 0;\n int totalNumSplitPoints = 0;\n double[] passTestTargetCounts = new double[targetDict.size()];\n // Maps feature index -> Hashtable, and each table \n // maps (split point) -> (info gain, split ratio)\n HashMap[] featureToInfo = new HashMap[dataDict.size()]; \n \n // Go through each feature's split points in ascending order\n for (int fi = 0; fi < dataDict.size(); fi++) {\n \n if ((fi+1) % 1000 == 0)\n logger.info(\"at feature \" + (fi+1) + \" / \" + dataDict.size());\n \n featureToInfo[fi] = new HashMap();\n Arrays.fill(passTestTargetCounts, 0);\n // Sort instances on this feature's values\n instIndices = sortInstances(ilist, instIndices, fi);\n\n // Iterate through the sorted instances\n for (int ii = 0; ii < numInsts-1; ii++) {\n Instance inst = ilist.get(instIndices[ii]);\n Instance instPlusOne = ilist.get(instIndices[ii+1]);\n FeatureVector fv1 = (FeatureVector) inst.getData();\n FeatureVector fv2 = (FeatureVector) instPlusOne.getData();\n double lower = fv1.value(fi);\n double higher = fv2.value(fi);\n\n // Accumulate the label weights for instances passing the test\n Labeling labeling = inst.getLabeling();\n for (int ll = 0; ll < labeling.numLocations(); ll++) {\n int li = labeling.indexAtLocation(ll);\n double labelWeight = labeling.valueAtLocation(ll);\n passTestTargetCounts[li] += labelWeight;\n }\n\n if (Maths.almostEquals(lower, higher) || inst.getLabeling().toString().equals(instPlusOne.getLabeling().toString()))\n continue;\n\n // For this (feature, spilt point) pair, calculate the \n // info gain of using this pair to split insts into those \n // with value of feature <= p versus > p\n totalNumSplitPoints++;\n double splitPoint = (lower + higher) / 2;\n double numPassInsts = ii+1;\n \n // If this split point creates a partition \n // with too few instances, ignore it\n double numFailInsts = numInsts - numPassInsts;\n if (numPassInsts < minNumInsts || numFailInsts < minNumInsts)\n continue;\n \n // If all instances pass or fail this test, it is useless\n double passProportion = numPassInsts / numInsts;\n if (Maths.almostEquals(passProportion, 0) || Maths.almostEquals(passProportion, 1))\n continue; \n \n // Calculate the entropy of instances passing and failing the test\n double passEntropy = 0;\n double failEntropy = 0;\n double p;\n \n for (int ci = 0; ci < targetDict.size(); ci++) {\n if (numPassInsts > 0) {\n p = passTestTargetCounts[ci] / numPassInsts;\n if (p > 0)\n passEntropy -= p * Math.log(p) / log2;\n }\n if (numFailInsts > 0) {\n double failTestTargetCount = targetCounts[ci] - passTestTargetCounts[ci];\n p = failTestTargetCount / numFailInsts;\n if (p > 0)\n failEntropy -= p * Math.log(p) / log2;\n }\n }\n \n // Calculate Gain(D, T), the information gained \n // by testing on this (feature, split-point) pair\n double gainDT = baseEntropy \n - passProportion * passEntropy\n - (1-passProportion) * failEntropy; \n infoGainSum += gainDT;\n // Calculate Split(D, T), the split information\n double splitDT = \n - passProportion * Math.log(passProportion) / log2\n - (1-passProportion) * Math.log(1-passProportion) / log2;\n // Calculate the gain ratio\n double gainRatio = gainDT / splitDT;\n featureToInfo[fi].put(Double.valueOf(splitPoint),\n new Point2D.Double(gainDT, gainRatio));\n } // End loop through sorted instances\n } // End loop through features\n\n // For each feature's split point with at least average gain, \n // get the maximum gain ratio and the associated split point\n // (using the info gain as tie breaker)\n double[] gainRatios = new double[dataDict.size()];\n double[] splitPoints = new double[dataDict.size()];\n int numSplitsForBestFeature = 0;\n\n // If all feature vectors are identical or no splits are worthy, return all 0s\n if (totalNumSplitPoints == 0 || Maths.almostEquals(infoGainSum, 0))\n return new Object[] {gainRatios, splitPoints, Double.valueOf(baseEntropy), \n baseLabelDistribution, Integer.valueOf(numSplitsForBestFeature)};\n\n double avgInfoGain = infoGainSum / totalNumSplitPoints;\n double maxGainRatio = 0;\n double gainForMaxGainRatio = 0; // tie breaker\n \n int xxx = 0;\n \n \n for (int fi = 0; fi < dataDict.size(); fi++) {\n double featureMaxGainRatio = 0;\n double featureGainForMaxGainRatio = 0;\n double bestSplitPoint = Double.NaN;\n\n for (Iterator iter = featureToInfo[fi].keySet().iterator(); iter.hasNext(); ) {\n Object key = iter.next();\n Point2D.Double pt = (Point2D.Double) featureToInfo[fi].get(key);\n double splitPoint = ((Double) key).doubleValue();\n double infoGain = pt.getX();\n double gainRatio = pt.getY();\n\n if (infoGain >= avgInfoGain) {\n if (gainRatio > featureMaxGainRatio || (gainRatio == featureMaxGainRatio && infoGain > featureGainForMaxGainRatio)) {\n featureMaxGainRatio = gainRatio;\n featureGainForMaxGainRatio = infoGain;\n bestSplitPoint = splitPoint;\n }\n }\n else {\n xxx++;\n }\n \n }\n assert(! Double.isNaN(bestSplitPoint));\n gainRatios[fi] = featureMaxGainRatio;\n splitPoints[fi] = bestSplitPoint;\n\n if (featureMaxGainRatio > maxGainRatio || (featureMaxGainRatio == maxGainRatio && featureGainForMaxGainRatio > gainForMaxGainRatio)) {\n maxGainRatio = featureMaxGainRatio;\n gainForMaxGainRatio = featureGainForMaxGainRatio;\n numSplitsForBestFeature = featureToInfo[fi].size();\n }\n }\n \n logger.info(\"label distrib:\\n\" + baseLabelDistribution);\n logger.info(\"base entropy=\" + baseEntropy + \", info gain sum=\" + infoGainSum + \", total num split points=\" + totalNumSplitPoints + \", avg info gain=\" + avgInfoGain + \", num splits with < avg gain=\" + xxx);\n \n return new Object[] {gainRatios, splitPoints, Double.valueOf(baseEntropy), \n baseLabelDistribution, Integer.valueOf(numSplitsForBestFeature)};\n }", "@Test\n\tvoid attributeCardinality() {\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING, BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..*]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING, BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..2]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..2]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..1]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, CLINICAL_FINDING, DISORDER, BLEEDING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..1]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..0]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[0..0]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[0..1]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"{\" +\n\t\t\t\t\t\t\t\t\"[1..1]\" + FINDING_SITE + \" != <<\" + PULMONARY_VALVE_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS + \"\" +\n\t\t\t\t\t\t\t\t\"}\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[0..0]\" + FINDING_SITE + \" != <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t}", "protected double evaluate(IChromosome chromosome) {\n\t double score = 0;\n\t \t \n\t List dups = new ArrayList();\n\t int badSolution = 1;\n\n\t for (int i = 0; i < chromosome.size(); i++) {\n\n\t //IntegerGene agene = (IntegerGene) chromosome.getGene(i);\n\t //System.out.println(agene);\n\t int index = (Integer) chromosome.getGene(i).getAllele();\n\t \n\t if (dups.contains(index)) {\n\t badSolution = 0;\n\t } else {\n\t dups.add(index);\n\t }\n\n\t Equipo equipo = (Equipo) equipos.get(index);\n\t double genreScore = getGenreScore(equipo);\n\t if (genreScore == 0) {\n\t badSolution = 0;\n\t }\n\t score = (score+genreScore);\n\n\t }\n\t \n\t return (score * badSolution);\n\t }", "@Test\n\tpublic void testCrossover() {\n\t\tint pivot = 5;\n\t\tint size = g10.getUnits().size();\n\t\tArrayList<GenomeDouble> expectedWeights1;\n\t\tArrayList<GenomeDouble> expectedWeights2;\n\t\t\n\t\texpectedWeights1 = new ArrayList<GenomeDouble>(g10.getUnits().size());\n\t\texpectedWeights2 = new ArrayList<GenomeDouble>(g10_2.getUnits().size());\n\t\t\n\t\texpectedWeights1.addAll(g10.getUnits().subList(0, pivot));\n\t\texpectedWeights1.addAll(g10_2.getUnits().subList(pivot, size));\n\t\texpectedWeights2.addAll(g10_2.getUnits().subList(0, pivot));\n\t\texpectedWeights2.addAll(g10.getUnits().subList(pivot, size));\n\t\t\n\t\tList<Genome<GenomeDouble>> results = Genome.crossover(g10, g10_2, 0.7, 10);\n\t\tassertEquals(expectedWeights1, results.get(0).getUnits());\n\t\tassertEquals(expectedWeights2, results.get(1).getUnits());\n\t}", "public double evaluate(Map<String, Double> assignment) throws Exception {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return left.evaluate(assignment) * right.evaluate(assignment);\n }", "public void createProbsMap() {\n\t\tif(this.counts == null) {\n\t\t\tcreateCountMap();\n\t\t}\n\t\t\n\t\tMap<String, Double> result = new HashMap<String, Double>();\n\t\t\n\t\t// Make the counts and get the highest probability found \n\t\tdouble highestProb = 0.00;\n\t\tdouble size = (double) this.getData().size();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\tresult.put(entry.getKey(), value / size);\n\t\t\t\n\t\t\tif(value/size > highestProb) {\n\t\t\t\thighestProb = value/size;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fill the highest probilities \n\t\tList<String> highestProbs = new ArrayList<String>();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\t\n\t\t\tif(value/size == highestProb) {\n\t\t\t\thighestProbs.add(entry.getKey());\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.highestProbs = highestProbs;\n\t\tthis.highestProb = highestProb;\n\t\tthis.probs \t\t = result;\n\t}" ]
[ "0.713752", "0.6353627", "0.5948709", "0.5841516", "0.57953703", "0.5770536", "0.55455595", "0.5460104", "0.5254225", "0.5179305", "0.51788646", "0.5159865", "0.5144939", "0.51426405", "0.5111936", "0.5097921", "0.5090738", "0.5056363", "0.50341576", "0.50176775", "0.4975424", "0.49741188", "0.4954842", "0.49410352", "0.493959", "0.49370936", "0.4923405", "0.48904064", "0.48579982", "0.48313442", "0.48220843", "0.48048344", "0.4799974", "0.4798485", "0.479646", "0.4794273", "0.47921282", "0.47895586", "0.47879183", "0.47878772", "0.47855496", "0.47803965", "0.47747162", "0.47693554", "0.47621498", "0.47509727", "0.4749778", "0.47497684", "0.4747605", "0.47383022", "0.47379142", "0.47372553", "0.4730891", "0.47250608", "0.47206664", "0.471625", "0.47083881", "0.46871907", "0.46865046", "0.4685428", "0.46836382", "0.46757734", "0.46671227", "0.46666074", "0.46656224", "0.4661984", "0.46604857", "0.46542212", "0.46533677", "0.46527046", "0.46525225", "0.46525225", "0.46504703", "0.46471673", "0.4639148", "0.4626232", "0.46256974", "0.46215385", "0.46126163", "0.46017534", "0.4598878", "0.45978215", "0.45792574", "0.4574642", "0.45732513", "0.4572031", "0.4568959", "0.45620844", "0.45543742", "0.4543078", "0.45307797", "0.45240042", "0.4511019", "0.4509253", "0.44974422", "0.44972646", "0.44923288", "0.44903216", "0.44902956", "0.44781852" ]
0.70758194
1
Estimates the probability that a comparison between categorical properties holds. LHS and RHS are both described by a statistics element.
private double estimateCategoricalPropertyProb(TemporalElementStats stats1, String property1, Comparator comp, TemporalElementStats stats2, String property2) { Map<String, Map<PropertyValue, Double>> map1 = stats1.getCategoricalSelectivityEstimation(); Map<String, Map<PropertyValue, Double>> map2 = stats2.getCategoricalSelectivityEstimation(); Map<PropertyValue, Double> propStats1 = map1.getOrDefault(property1, null); Map<PropertyValue, Double> propStats2 = map2.getOrDefault(property2, null); // property not sampled or not considered if (propStats1 == null || propStats2 == null) { // property not considered => return 0.5 if (!isPropertyRelevant(property1) && !isPropertyRelevant(property2)) { return 0.5; } else { // property not sampled => very rare => return very small value return 0.0001; } } if (comp == EQ || comp == NEQ) { double sum = 0.; for (Map.Entry<PropertyValue, Double> entry1 : propStats1.entrySet()) { double val1Selectivity = entry1.getValue(); for (Map.Entry<PropertyValue, Double> entry2 : propStats2.entrySet()) { if (entry1.getKey().equals(entry2.getKey())) { double val2Selectivity = entry2.getValue(); sum += val1Selectivity * val2Selectivity; } } } return comp == EQ ? sum : 1. - sum; } else { // shouldn't happen, categorical variables can only be compared with EQ or NEQ return 0.; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp,\n List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateCategoricalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n if (comp != EQ && comp != NEQ) {\n return 0.;\n }\n long overallCount = 0L;\n boolean found = false;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n if (stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n found = true;\n }\n }\n // property not sampled or not considered\n if (!found) {\n // not relevant/considered => simply return 0.5\n if (!isPropertyRelevant(property)) {\n return 0.5;\n } else {\n // not sampled => very rare or not even there => return very small value\n return 0.0001;\n }\n }\n\n double prob = 0.;\n for (TemporalElementStats stat : relevantStats) {\n if (!stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n // not sampled ? ....\n double factor = 0.0001;\n // ...or just excluded/not relevant?\n if (!isPropertyRelevant(property)) {\n factor = 0.5;\n }\n prob += factor * ((double) stat.getElementCount() / overallCount);\n continue;\n }\n prob += stat.getCategoricalSelectivityEstimation()\n .get(property)\n .getOrDefault(value, 0.0001) *\n ((double) stat.getElementCount() / overallCount);\n }\n if (comp == EQ) {\n return prob;\n } else {\n //NEQ\n return 1 - prob;\n }\n }", "public void calculateProbabilities(){\n\t}", "private double estimateNumericalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Double[]> map1 = stats1.getNumericalPropertyStatsEstimation();\n Map<String, Double[]> map2 = stats2.getNumericalPropertyStatsEstimation();\n Double[] propStats1 = map1.getOrDefault(property1, null);\n Double[] propStats2 = map2.getOrDefault(property2, null);\n if (propStats1 == null || propStats2 == null) {\n return 0.0001;\n }\n double occurrence = stats1.getNumericalOccurrenceEstimation()\n .getOrDefault(property1, 0.) *\n stats2.getNumericalOccurrenceEstimation().getOrDefault(property2, 0.);\n // assuming both properties are normally distributed,\n // their difference is also normally distributed\n NormalDistribution differenceDist = new NormalDistribution(\n propStats1[0] - propStats2[0],\n Math.max(Math.sqrt(propStats1[1] + propStats2[1]), VERY_LOW_PROB));\n\n if (comp == EQ) {\n return occurrence * differenceDist.density(0.);\n } else if (comp == NEQ) {\n return occurrence * (1. - differenceDist.density(0.));\n } else if (comp == LTE) {\n return occurrence * (differenceDist.cumulativeProbability(0.));\n } else if (comp == LT) {\n return occurrence * (differenceDist.cumulativeProbability(0.) -\n differenceDist.density(0.));\n } else if (comp == GTE) {\n return occurrence * (1. - differenceDist.cumulativeProbability(0.) +\n differenceDist.density(0.));\n } else {\n //GT\n return occurrence * (1. - differenceDist.cumulativeProbability(0.));\n }\n }", "private void evaluateProbabilities()\n\t{\n\t}", "private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp, List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateNumericalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "@Override\n protected double compareScoredCriteria(ScoredCriteriaMap wikiScoredCriteria) {\n double[] preferenceScores = ScoredCriteriaMap.unpackScores(wikiScoredCriteria);\n double[] wikiScores = ScoredCriteriaMap.unpackScores(this.getPreferenceScoredCriteriaMap());\n\n // Calculate the sum\n double sum = 0;\n for (int i = 0; i < Criterion.NUMBER_OF; i++) {\n sum = sum + (preferenceScores[i] - wikiScores[i]) * (preferenceScores[i] - wikiScores[i]);\n }\n return (1 / (1 + Math.sqrt(sum)));\n }", "public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}", "private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n long overallCount = 0L;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n }\n double sum = 0.;\n for (TemporalElementStats stat : relevantStats) {\n sum += estimateNumericalPropertyProb(stat, property, comp, value) *\n (((double) stat.getElementCount() / overallCount));\n }\n return sum;\n }", "float getSpecialProb();", "private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}", "public abstract double classify(Instance e);", "Integer classify(LogicGraph pce);", "public float specificity(final L label)\n {\n\n final Multiset<L> predictionsForLabel = confusionMatrix.computeIfAbsent(label, l ->HashMultiset.create());\n\n final int hasLabel = predictionsForLabel.size();\n final int hasLabelRight = predictionsForLabel.count(label); // true positives\n\n\n final int notLabelWrong = getTotalPredicted(label) - hasLabelRight; // false negatives\n final int notLabel = numExamples - hasLabel;\n final int notLabelRight = notLabel - notLabelWrong; // true negatives\n\n if (notLabel == 0)\n {\n return 1.0f;\n }\n\n return (float) notLabelRight / (float) notLabel;\n }", "private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}", "abstract double rightProbability();", "abstract double leftProbability();", "private double categoryProbability(Collection<F> features, C category) {\n return Math.log(((double) this.categoryCount(category)\n / (double) this.getCategoriesTotal()))\n + featuresProbabilityLogSum(features, category);\n }", "@Test\n public void testDecisionRule2() throws IOException {\n \n Data data = getDataObject(\"./data/adult.csv\");\n DataHandle handle = data.getHandle();\n \n RiskModelPopulationUniqueness model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getPopulationBasedUniquenessRisk();\n double sampleUniqueness = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getSampleBasedUniquenessRisk().getFractionOfUniqueRecords();\n double populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n \n if (model.getPopulationUniquenessModel() == PopulationUniquenessModel.PITMAN) {\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.27684993883653597) == 0);\n } else if (model.getPopulationUniquenessModel() == PopulationUniquenessModel.ZAYATZ) {\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.3207402393466189) == 0);\n } else {\n fail(\"Unexpected convergence of SNB\");\n }\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.2d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.3577099234829125d) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.01d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.1446083531167384) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 1d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.5142895033485844) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) == 0);\n }", "@Override\n public int compare(Prediction lhs, Prediction rhs) {\n return Float.compare(rhs.getConfidence(), lhs.getConfidence());\n }", "public double findConfidence(Rule rule) {\n\t\t\tint LHSCount = 0;\n\t\t\tint LHSAndRHSCount = 0;\n\t\t\t\n\t\t\tArrayList<String> LHSAndRHS = new ArrayList<String>();\n\t\t\t\n\t\t\tLHSAndRHS.addAll(rule.LHS);\n\t\t\tLHSAndRHS.addAll(rule.RHS);\n\t\t\t\n\t\t\tLHSCount = findCount(rule.LHS);\n\t\t\tLHSAndRHSCount = findCount(LHSAndRHS);\n\t\t\t\n\t\t\treturn (1.0*LHSAndRHSCount)/LHSCount;\n\t\t}", "double getCritChance();", "double getBranchProbability();", "int computeNutritionalScore(Map<String, Object> product);", "private double getProbabilityScore(Cell c,int bitmask)\n {\n\t return Math.pow(\n\t\t\t Math.pow(m_probs1[c.getCol()-1],(1&bitmask) ) * \n\t\t\t Math.pow(m_probs2[c.getRow()-1],(2&bitmask)/2) //geo-mean\n\t\t\t , Math.min(1,3.5-bitmask));\n }", "public Double calculateSimilarity(OWLObject a, OWLObject b);", "private double condProb(String stateGiven, String stateFind){\n HashMap probs = genAllProb(stateGiven);\n return (double) probs.get(stateFind);\n }", "private double estimateNumericalPropertyProb(TemporalElementStats stat, String property,\n Comparator comp, PropertyValue value) {\n // property not sampled or not considered\n if (!stat.getNumericalPropertyStatsEstimation().containsKey(property)) {\n // if property not excluded, return very small value\n // if excluded, it is irrelevant, return 0.5\n return isPropertyRelevant(property) ? 0.0001 : 0.5;\n }\n Double[] propertyStats = stat.getNumericalPropertyStatsEstimation().get(property);\n NormalDistribution dist = new NormalDistribution(propertyStats[0],\n Math.max(Math.sqrt(propertyStats[1]), VERY_LOW_PROB));\n double doubleValue = ((Number) value.getObject()).doubleValue();\n double occurenceProb = stat.getNumericalOccurrenceEstimation().get(property);\n if (comp == EQ) {\n return VERY_LOW_PROB * occurenceProb;\n } else if (comp == NEQ) {\n return (1. - VERY_LOW_PROB) * occurenceProb;\n } else if (comp == LTE) {\n return dist.cumulativeProbability(doubleValue) * occurenceProb;\n } else if (comp == LT) {\n return occurenceProb * (dist.cumulativeProbability(doubleValue) - VERY_LOW_PROB);\n } else if (comp == GTE) {\n return occurenceProb *\n (1. - dist.cumulativeProbability(doubleValue) + VERY_LOW_PROB);\n } else {\n //GT\n return occurenceProb * (1. - dist.cumulativeProbability(doubleValue));\n }\n }", "@Override\n\t\tpublic int compare(S o1, S o2) {\n\t\t\tif (getProb(o1) > getProb(o2))\n\t\t\t\treturn -1;\n\t\t\tif (getProb(o1) < getProb(o2))\n\t\t\t\treturn 1;\n\t\t\treturn Double.compare(o1.hashCode(), o2.hashCode());\n\t\t}", "@Override\n public double evaluate(Map<String, Double> assignment) throws Exception {\n\n double res = Math.log(getEx2().evaluate(assignment)) / Math.log(getEx2().evaluate(assignment));\n return res;\n }", "private double condProb(RelStruc A,Hashtable atomhasht,OneStrucData inst,long[] timers)\n\t\t\tthrows RBNCompatibilityException\n\t\t\t{\n\t\tdouble result = probform.evalSample(A,atomhasht,inst,timers);\n\t\t//System.out.print(\" cP: \" + result);\n\t\treturn result;\n\t\t\t}", "public void testCompare1() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.5D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions above the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "@Override\n\tpublic int evaluate(String modelDirection, EObject featureContext) {\n\t\tint op1=this.getCompOp1().getNumPriorityOp2().evaluate(modelDirection, featureContext);\n\t\tint op2=this.getCompOp2().getNumPriorityOp2().evaluate(modelDirection, featureContext);\n\t\tif (op1!=op2) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public interface IStoppingCriteria {\n\n /**\n * Determine the degree of clustering agreement\n * @param cluster1 one clustering results\n * @param cluster2 the other clustering results\n * @return the degree of clustering agreement; 1 refers to be the same clustering results; 0 refers to be the totally different clustering results\n */\n public double computeSimilarity(int[] cluster1, int[] cluster2);\n\n}", "@Override\n public double evaluate(Map<String, Double> assignment) throws Exception {\n return getExpression1().evaluate(assignment) - getExpression2().evaluate(assignment);\n }", "@Override\n protected void calculateCategoryRates(Node node) {\n\n double propVariable = 1.0;\n int cat = 0;\n\n //if (/*invarParameter != null && */invarParameter.getValue() > 0 ) {\n //System.out.println(\"----------------\");\n double pr;\n if(invPrLogit){\n pr = 1.0/(1.0 + Math.exp(-invarParameter.getValue()));\n //System.out.println(pr);\n }else{\n pr = invarParameter.getValue();\n }\n\n if (hasPropInvariantCategory) {\n categoryRates[0] = 0.0;\n //System.out.println(getCurrModel()+\" \"+INVAR_INDEX);\n categoryProportions[0] = pr*INDICATORS[getCurrModel()][INVAR_INDEX];\n //System.out.println(invarParameter.getValue()+\" \"+INDICATORS[getCurrModel()][INVAR_INDEX]);\n //System.out.println(\"categoryProportions[0]: \"+categoryProportions[0]);\n }\n\n //System.out.println(invarParameter.getID()+\" \" +invarParameter.getValue()+\" \"+pr);\n propVariable = 1.0 - pr*INDICATORS[getCurrModel()][INVAR_INDEX];\n if (hasPropInvariantCategory) {\n cat = 1;\n }\n //}\n\n //System.out.println(\"categoryProportions[0]: \"+categoryProportions[0]);\n\n if (INDICATORS[getCurrModel()][SHAPE_INDEX] == PRESENT) {\n\n final double a = shapeParameter.getValue();\n double mean = 0.0;\n final int gammaCatCount = categoryCount - cat;\n //System.out.println(\"a: \"+a);\n final GammaDistribution g = new GammaDistributionImpl(a, 1.0 / a);\n //System.out.println(\"gammaCatCount:\"+gammaCatCount);\n //if(gammaCatCount == 3){\n //throw new RuntimeException(\"\");\n //}\n for (int i = 0; i < gammaCatCount; i++) {\n try {\n // RRB: alternative implementation that seems equally good in\n // the first 5 significant digits, but uses a standard distribution object\n if(a < 1e-3){\n\n categoryRates[i + cat] = Double.NEGATIVE_INFINITY;\n }else if(a > 1e10){\n categoryRates[i + cat] = 1.0;\n }else if (useBeast1StyleGamma) {\n categoryRates[i + cat] = GammaDistributionQuantile((2.0 * i + 1.0) / (2.0 * gammaCatCount), a, 1.0 / a);\n \t} else {\n \t\tcategoryRates[i + cat] = g.inverseCumulativeProbability((2.0 * i + 1.0) / (2.0 * gammaCatCount));\n \t}\n\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(\"Something went wrong with the gamma distribution calculation\");\n System.exit(-1);\n }\n mean += categoryRates[i + cat];\n\n categoryProportions[i + cat] = propVariable / gammaCatCount;\n }\n\n if(a >= 1e-3 ){\n\n mean = (propVariable * mean) / gammaCatCount;\n\n for (int i = 0; i < gammaCatCount; i++) {\n\n categoryRates[i + cat] /= mean;\n\n }\n }\n } else {\n\n int gammaCatCount = categoryCount - cat;\n //System.out.println(\"Hi!\");\n for(int i = cat; i < categoryRates.length;i++){\n categoryRates[i] = 1.0 / propVariable/gammaCatCount;\n\n categoryProportions[i] = propVariable/gammaCatCount;\n }\n }\n /*System.out.println(\"-------------------------------\");\n System.out.println(\"ID: \"+getID());\n System.out.println(modelChoice);\n System.out.print (invarParameter.getValue()*INDICATORS[getCurrModel()][INVAR_INDEX]+\" \");\n System.out.println(getID());\n System.out.println(\"alpha: \"+shapeParameter.getValue());\n System.out.println(\"invPr: \"+invarParameter.getValue());\n System.out.println(\"siteModel: \"+modelChoice.getValue());\n System.out.println(\"rate: \"+muParameter.getValue());\n for(int i = 0; i < categoryRates.length;i++){\n System.out.print(categoryRates[i]+\" \");\n }\n System.out.println();\n\n System.out.println(invarParameter.getValue());\n for(int i = 0; i < categoryProportions.length;i++){\n\n System.out.print(categoryProportions[i]+\" \");\n }\n System.out.println();\n System.out.println(\"----------------\"); */\n\n\n ratesKnown = true;\n }", "public static Attribute chooseAttribute(ArrayList<Case> cases) {\n\t\tAttribute currentBestAttribute = null;\n\t\tdouble currentBestRemainder = 0;\n\n\t\t// k\n\t\tdouble [] kValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\t// Extract the correct fields from each case into a separate array for sorting\n\t\t\tkValues[i] = cases.get(i).k;\n\t\t}\n\t\tArrays.sort(kValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\t// Find the midpoint between two sequential values\n\t\t\tdouble midpoint = (kValues[i] + kValues[i+1]) / 2;\n\t\t\t// A rough way of dealing with non-unique values; two sequential identical values' average will be themselves, so ignore anything coming from such a pairing\n\t\t\tif (midpoint == kValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\t// Count the number of positive and negative cases that exist on either side of the threshold\n\t\t\t\tif (c.k < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Calculate the remainder as given in lecture slides 17-18 slide 31\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\t// We want the attribute that gives the highest information gain, and since information content of the full\n\t\t\t// set is constant, this is equivalent to the smallest remainder\n\t\t\tif (remainder < currentBestRemainder || currentBestAttribute == null) {\n\t\t\t\tcurrentBestAttribute = Attribute.K;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// na\n\t\tdouble [] naValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tnaValues[i] = cases.get(i).na;\n\t\t}\n\t\tArrays.sort(naValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (naValues[i] + naValues[i+1]) / 2;\n\t\t\tif (midpoint == naValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.na < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Na;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// cl\n\t\tdouble [] clValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tclValues[i] = cases.get(i).cl;\n\t\t}\n\t\tArrays.sort(clValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (clValues[i] + clValues[i+1]) / 2;\n\t\t\tif (midpoint == clValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.cl < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.CL;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// hco3\n\t\tdouble [] hco3Values = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\thco3Values[i] = cases.get(i).hco3;\n\t\t}\n\t\tArrays.sort(hco3Values);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (hco3Values[i] + hco3Values[i+1]) / 2;\n\t\t\tif (midpoint == hco3Values[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.hco3 < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.HCO3;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// endotoxin\n\t\tdouble [] endotoxinValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tendotoxinValues[i] = cases.get(i).endotoxin;\n\t\t}\n\t\tArrays.sort(endotoxinValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (endotoxinValues[i] + endotoxinValues[i+1]) / 2;\n\t\t\tif (midpoint == endotoxinValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.endotoxin < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Endotoxin;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// aniongap\n\t\tdouble [] aniongapValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\taniongapValues[i] = cases.get(i).aniongap;\n\t\t}\n\t\tArrays.sort(aniongapValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (aniongapValues[i] + aniongapValues[i+1]) / 2;\n\t\t\tif (midpoint == aniongapValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.aniongap < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Aniongap;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// pla2\n\t\tdouble [] pla2Values = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tpla2Values[i] = cases.get(i).pla2;\n\t\t}\n\t\tArrays.sort(pla2Values);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (pla2Values[i] + pla2Values[i+1]) / 2;\n\t\t\tif (midpoint == pla2Values[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.pla2 < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.PLA2;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// sdh\n\t\tdouble [] sdhValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tsdhValues[i] = cases.get(i).sdh;\n\t\t}\n\t\tArrays.sort(sdhValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (sdhValues[i] + sdhValues[i+1]) / 2;\n\t\t\tif (midpoint == sdhValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.sdh < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.SDH;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// gldh\n\t\tdouble [] gldhValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tgldhValues[i] = cases.get(i).gldh;\n\t\t}\n\t\tArrays.sort(gldhValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (gldhValues[i] + gldhValues[i+1]) / 2;\n\t\t\tif (midpoint == gldhValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.gldh < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.GLDH;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// tpp\n\t\tdouble [] tppValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\ttppValues[i] = cases.get(i).tpp;\n\t\t}\n\t\tArrays.sort(tppValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (tppValues[i] + tppValues[i+1]) / 2;\n\t\t\tif (midpoint == tppValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.tpp < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.TPP;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// breathRate\n\t\tdouble [] breathRateValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tbreathRateValues[i] = cases.get(i).breathRate;\n\t\t}\n\t\tArrays.sort(breathRateValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (breathRateValues[i] + breathRateValues[i+1]) / 2;\n\t\t\tif (midpoint == breathRateValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.breathRate < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.BreathRate;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// pcv\n\t\tdouble [] pcvValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tpcvValues[i] = cases.get(i).pcv;\n\t\t}\n\t\tArrays.sort(pcvValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (pcvValues[i] + pcvValues[i+1]) / 2;\n\t\t\tif (midpoint == pcvValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.pcv < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.PCV;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// pulseRate\n\t\tdouble [] pulseRateValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tpulseRateValues[i] = cases.get(i).pulseRate;\n\t\t}\n\t\tArrays.sort(pulseRateValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (pulseRateValues[i] + pulseRateValues[i+1]) / 2;\n\t\t\tif (midpoint == pulseRateValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.pulseRate < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.PulseRate;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// fibrinogen\n\t\tdouble [] fibrinogenValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tfibrinogenValues[i] = cases.get(i).fibrinogen;\n\t\t}\n\t\tArrays.sort(fibrinogenValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (fibrinogenValues[i] + fibrinogenValues[i+1]) / 2;\n\t\t\tif (midpoint == fibrinogenValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.fibrinogen < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Fibrinogen;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// dimer\n\t\tdouble [] dimerValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tdimerValues[i] = cases.get(i).dimer;\n\t\t}\n\t\tArrays.sort(dimerValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (dimerValues[i] + dimerValues[i+1]) / 2;\n\t\t\tif (midpoint == dimerValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.dimer < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Dimer;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// fibPerDim\n\t\tdouble [] fibPerDimValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tfibPerDimValues[i] = cases.get(i).fibPerDim;\n\t\t}\n\t\tArrays.sort(fibPerDimValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (fibPerDimValues[i] + fibPerDimValues[i+1]) / 2;\n\t\t\tif (midpoint == fibPerDimValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.fibPerDim < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.FibPerDim;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\treturn currentBestAttribute;\n\t}", "public double calculateSpecificity() {\n final long divisor = trueNegative + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return trueNegative / (double)divisor;\n }\n }", "PolicyDecision getDecision();", "int definePassingScore(Speciality speciality) throws LogicException;", "public void testCompare2() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(0.6D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions below the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "public double evaluate(Map<String, Double> assignment) throws Exception {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return left.evaluate(assignment) * right.evaluate(assignment);\n }", "private SortedSet<Classification<F, C>> categoryProbabilities(Collection<F> features) {\n\n /*\n * Sort the set according to the possibilities. Because we have to sort\n * by the mapped value and not by the mapped key, we can not use a\n * sorted tree (TreeMap) and we have to use a set-entry approach to\n * achieve the desired functionality. A custom comparator is therefore\n * needed.\n */\n SortedSet<Classification<F, C>> probabilities =\n new TreeSet<Classification<F, C>>(new Comparator<Classification<F, C>>() {\n\n @Override\n public int compare(Classification<F, C> o1, Classification<F, C> o2) {\n int toReturn = Double.compare(o1.getProbability(), o2.getProbability());\n if ((toReturn == 0) && !o1.getCategory().equals(o2.getCategory())) {\n toReturn = -1;\n }\n return toReturn;\n }\n });\n\n for (C category : this.getCategories()) {\n probabilities.add(new Classification<F, C>(\n features, category, this.categoryProbability(features, category)));\n }\n return probabilities;\n }", "public double getObjective() {\n return multiClassClassifierObj() + binaryObj();\n// +(1-temperature)*getEntropy();\n }", "@Test\r\n\tpublic void classifyTest(){\r\n\t\tClassification[] expectedClass = {Classification.First,Classification.UpperSecond,Classification.LowerSecond,Classification.Third,Classification.Fail};\r\n\t\tint[] pointGrades = {3,6,10,13,18};\r\n\t\tfor(int i=0;i<pointGrades.length;i++)\r\n\t\t{\r\n\t\t\tassertEquals(expectedClass[i],new PointGrade(pointGrades[i]).classify());\r\n\t\t}\r\n\t}", "@Test\n public void testDecisionRule() {\n DataProvider provider = new DataProvider();\n provider.createDataDefinition();\n DataHandle handle = provider.getData().getHandle();\n \n RiskModelPopulationUniqueness model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.2d)).getPopulationBasedUniquenessRisk();\n double populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n double sampleUniqueness = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getSampleBasedUniquenessRisk().getFractionOfUniqueRecords();\n \n // Risk before anonymization\n assertTrue(sampleUniqueness + \" / \" + populationUniqueness, compareUniqueness(populationUniqueness, 1.0d) == 0);\n assertTrue(sampleUniqueness + \" / \" + populationUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n final ARXAnonymizer anonymizer = new ARXAnonymizer();\n final ARXConfiguration config = ARXConfiguration.create();\n config.addPrivacyModel(new KAnonymity(2));\n config.setSuppressionLimit(0d);\n \n ARXResult result = null;\n try {\n result = anonymizer.anonymize(provider.getData(), config);\n } catch (IOException e) {\n e.printStackTrace();\n }\n final DataHandle outHandle = result.getOutput(false);\n \n populationUniqueness = outHandle.getRiskEstimator(ARXPopulationModel.create(provider.getData().getHandle().getNumRows(), 0.1d)).getPopulationBasedUniquenessRisk().getFractionOfUniqueTuplesDankar();\n assertTrue(\"Is: \" + populationUniqueness, compareUniqueness(populationUniqueness, 0) == 0);\n }", "public double purity(Iterable<Instance> set) {\n\t\tint size = 0;\n\t\tSet<Instance> successNodes = new HashSet<Instance>();\n\t\tSet<Instance> failureNodes = new HashSet<Instance>();\n\t\tfor (Instance i : set) {\n\t\t\tif (i.getCategory() == 0) {\n\t\t\t\tsuccessNodes.add(i);\n\t\t\t} else {\n\t\t\t\tfailureNodes.add(i);\n\t\t\t}\n\t\t\tsize++;\n\t\t}\n\t\tif (successNodes.size() == 0 || failureNodes.size() == 0) {\n\t\t\treturn 1;\n\t\t}\n\t\tdouble papb =\n\t\t\t\t((double)successNodes.size() / (double)size)\n\t\t\t\t* ((double)failureNodes.size() / (double)size);\n\t\treturn papb;\n\t}", "public int compare(Dataset object1, Dataset object2){\n if(object1.getAttributeCount() != candidate.getAttributeCount() ||\n object2.getAttributeCount() != candidate.getAttributeCount()){\n return 0;\n }\n\n double dist1 = 0.0, dist2 = 0.0;\n double tmp1 = 0.0, tmp2 = 0.0;\n\n for(int i = 0; i < candidate.getAttributeCount(); i++){\n if(candidate.getOutputColumnCount() == (i+1)){\n continue;\n }\n\n Attribute ac = candidate.getAttribute(i);\n Attribute a1 = object1.getAttribute(i);\n Attribute a2 = object2.getAttribute(i);\n\n if(ac.getType() == AttributeTypes.TEXT){\n dist1 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a1.getValue());\n dist2 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a2.getValue());\n }else{\n /*\n double acDouble = 0.0;\n double a1Double = 0.0;\n double a2Double = 0.0;\n switch(ac.getType()){\n case INTEGER: acDouble = (double)((Integer)ac.getValue()).intValue(); break;\n case DECIMAL: acDouble = (double)ac.getValue();\n }\n switch(a1.getType()){\n case INTEGER: a1Double = (double)((Integer)a1.getValue()).intValue(); break;\n case DECIMAL: a1Double = (double)a1.getValue();\n }\n switch(a2.getType()){\n case INTEGER: a2Double = (double)((Integer)a2.getValue()).intValue(); break;\n case DECIMAL: a2Double = (double)a2.getValue();\n }*/\n double acDouble = (double)ac.getValue();\n double a1Double = (double)a1.getValue();\n double a2Double = (double)a2.getValue();\n\n tmp1 += Math.pow(a1Double-acDouble, 2);\n tmp2 += Math.pow(a2Double-acDouble, 2);\n }\n }\n\n dist1 += Math.sqrt(tmp1);\n dist2 += Math.sqrt(tmp2);\n\n if (dist1 > dist2) {\n return 1;\n }\n if (dist1 < dist2) {\n return -1;\n }\n return 0;\n }", "public Double getAssignmentCategoryAverageGrade(List<Student> students){\n \tdouble totalStudentPoints = getTotalCategoryStudentPoints(students);\n \tdouble totalMaxPoints = getTotalCategoryWorth(students);\n \treturn (totalStudentPoints / totalMaxPoints * 100);\n }", "public Long metricValue() {\n\t\t// Keep a list free from redundant subjects, that is with all its unique\n\t\t// elements\n\t\tList<ComparableSubject> lstUniqueSubjects = new ArrayList<ComparableSubject>();\n\t\tboolean isCurSubjectUnique;\n\t\tlong countCompared = 0;\n\t\tint mapSize = pMapSubjects.size();\n\t\tlogger.debug(\"Starting metric value computation, with \" + mapSize + \"instances...\");\n\n\t\t// int i = 0;\n\t\t// Compare each of the subjects with the ones already recognized as unique...\n\t\tfor (ComparableSubject curSubject : pMapSubjects.values()) {\n\t\t\tisCurSubjectUnique = true;\n\t\t\t// i++;\n\t\t\t// int z = 0;\n\t\t\tfor (ComparableSubject curUniqueSubject : lstUniqueSubjects) {\n\t\t\t\t// and if the subject currently examined is equivalent to one of the existing\n\t\t\t\t// unique subjects, do not regard it as unique, continue with the next one\n\t\t\t\tif (curSubject.isEquivalentTo(curUniqueSubject)) {\n\t\t\t\t\tisCurSubjectUnique = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// z++;\n\t\t\t\t// if ((z % 10000) == 0) System.out.println(\"compared \"+i + \"/\" + z);\n\t\t\t}\n\n\t\t\t// if ((i % 1000 == 0)) System.out.println(\"compared \"+i);\n\n\t\t\t// Finally, if the current subject is not equivalent to any of\n\t\t\t// the existing unique subjects, add it as unique\n\t\t\tif (isCurSubjectUnique) {\n\t\t\t\tlstUniqueSubjects.add(curSubject);\n\t\t\t}\n\n\t\t\tcountCompared++;\n\t\t\tif ((countCompared % 50000) == 0) {\n\t\t\t\tlogger.debug(\"Estimated value with \" + countCompared + \" compared instances: \"\n\t\t\t\t\t\t+ (((double) lstUniqueSubjects.size()) / ((double) mapSize)));\n\t\t\t}\n\t\t}\n\n\t\t// Compute metric value\n\t\t// long metricValue = ((long)lstUniqueSubjects.size()) /\n\t\t// ((long)pMapSubjects.size());\n\t\tlong metricValue = (((long) pMapSubjects.size()) > 0)\n\t\t\t\t? ((long) lstUniqueSubjects.size()) / ((long) pMapSubjects.size())\n\t\t\t\t: 0;\n\t\t// If any subject is equivalent to another, it will not be part of the list of\n\t\t// unique subjects, then\n\t\t// the size of this list is the \"Count of Unique Subjects\" required to calculate\n\t\t// the metric\n\t\treturn metricValue;\n\t}", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "public void calculateEffectiveness(){\n double[] typeEffective = new double[18];\n \n for(int i = 0; i < 18; i++){\n typeEffective[i] = tc.getEffectiveNumber(i, tc.convertType(type1));\n }\n \n if(type2 != null){\n for(int i = 0; i < 18; i++){\n typeEffective[i] *= tc.getEffectiveNumber(i, tc.convertType(type2));\n }\n }\n \n for(int i = 0; i < 18; i++){\n if(typeEffective[i] != 1){\n if(typeEffective[i] > 1){\n double[] newWeak = {i,typeEffective[i]};\n weak.add(newWeak);\n }else{\n double[] newStrong = {i,typeEffective[i]};\n strong.add(newStrong);\n }\n }\n }\n }", "public abstract Object getDecisionValue();", "float getConfidence();", "@Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }", "@Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }", "@Override\n public int compare(Recognition lhs, Recognition rhs) {\n return Float.compare(rhs.getConfidence(), lhs.getConfidence());\n }", "public abstract double getLinkProbability(int linkId);", "int getLikelihoodValue();", "@Test\n public void TestCase2() {\n VariableMap variables = Variables\n .putValue(\"Role\", \"Executive\")\n .putValue(\"BusinessProcess\", \"Merit Increase\")\n .putValue(\"DelegationDateRange\", \"2019-04-31T00:00:00\");\n\n DmnDecisionTableResult result = dmnEngine.evaluateDecisionTable(decision, variables);\n\n // Need to establish rule ordering\n assertThat(result.collectEntries(\"result\"))\n .hasSize(1)\n .contains(\"John M\");\n }", "public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}", "public void trainBernoulli() {\t\t\n\t\tMap<String, Cluster> trainingDataSet = readFile(trainLabelPath, trainDataPath, \"training\");\n\t\tMap<String, Cluster> testingDataSet = readFile(testLabelPath, testDataPath, \"testing\");\n\n\t\t// do testing, if the predicted class and the gold class is not equal, increment one\n\t\tdouble error = 0;\n\n\t\tdouble documentSize = 0;\n\n\t\tSystem.out.println(\"evaluate the performance\");\n\t\tfor (int testKey = 1; testKey <= 20; testKey++) {\n\t\t\tCluster testingCluster = testingDataSet.get(Integer.toString(testKey));\n\t\t\tSystem.out.println(\"Cluster: \"+testingCluster.toString());\n\n\t\t\tfor (Document document : testingCluster.getDocuments()) {\n\t\t\t\tdocumentSize += 1; \n\t\t\t\tList<Double> classprobability = new ArrayList<Double>();\n\t\t\t\tMap<String, Integer> testDocumentWordCounts = document.getWordCount();\n\n\t\t\t\tfor (int classindex = 1; classindex <= 20; classindex++) {\n\t\t\t\t\t// used for calculating the probability\n\t\t\t\t\tCluster trainCluster = trainingDataSet.get(Integer.toString(classindex));\n\t\t\t\t\t// System.out.println(classindex + \" \" + trainCluster.mClassId);\n\t\t\t\t\tMap<String, Double> bernoulliProbability = trainCluster.bernoulliProbabilities;\n\t\t\t\t\tdouble probability = Math.log(trainCluster.getDocumentSize()/trainDocSize);\n\t\t\t\t\tfor(int index = 1; index <= voc.size(); index++ ){\n\n\t\t\t\t\t\t// judge whether this word is stop word \n\t\t\t\t\t\tboolean isStopwords = englishStopPosition.contains(index);\n\t\t\t\t\t\tif (isStopwords) continue;\n\n\t\t\t\t\t\tboolean contain = testDocumentWordCounts.containsKey(Integer.toString(index));\t\t\t\t\t\t\n\t\t\t\t\t\tif (contain) {\n\t\t\t\t\t\t\tprobability += Math.log(bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tprobability += Math.log(1 - bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// put the probability into the map for the specific class\n\t\t\t\t\tclassprobability.add(probability);\n\t\t\t\t}\n\t\t\t\tObject obj = Collections.max(classprobability);\n\t\t\t\t// System.out.println(classprobability);\n\t\t\t\tString predicte_class1 = obj.toString();\n\t\t\t\t// System.out.println(predicte_class1);\n\t\t\t\t// System.out.println(Double.parseDouble(predicte_class1));\n\t\t\t\tint index = classprobability.indexOf(Double.parseDouble(predicte_class1));\n\t\t\t\t// System.out.println(index);\n\t\t\t\tString predicte_class = Integer.toString(index + 1);\n\n\n\t\t\t\tconfusion_matrix[testKey - 1][index] += 1;\n\n\t\t\t\t// System.out.println(document.docId + \": G, \" + testKey + \"; P: \" + predicte_class);\n\t\t\t\tif (!predicte_class.equals(Integer.toString(testKey))) {\n\t\t\t\t\terror += 1;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize);\n\t\t}\n\n\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize + \" precision rate : \" + (1 - error/documentSize));\n\n\t\t// print confusion matrix\n\t\tprintConfusionMatrix(confusion_matrix);\n\t}", "public void computeExpectedChildrenProperties() {\n\t\t\n\t\tSet<Attribute<? extends IValue>> parentAttributes = new HashSet<>(popParents.getPopulationAttributes());\n\t\tparentAttributes.retainAll(pMatching.getDimensions());\n\t\t\n\t\tlogger.info(\"computing for the dimensions: {}\", parentAttributes);\n\t\t\n\t\t/*\n\t\t * \n\t\tMap<Set<Attribute<? extends IValue>>,Integer> parents2matchingCandidates = new HashMap<>();\n\t\tfor (Entry<ACoordinate<Attribute<? extends IValue>, IValue>, AControl<Double>> e: \n\t\t\tpMatching.getMatrix().entrySet()) {\n\t\t\t\n\t\t}\n\t\t\n\t\tGosplContingencyTable c = new GosplContingencyTable(pMatching.getDimensions());\n\t\t// for each coordinate of the probabilities table \n\t\t// 1) compute the \n\t\t * \n\t\t */\n\n\t\t\n\t}", "@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}", "public void calculateProbabilities(Ant ant) {\n int i = ant.trail[currentIndex];\n double pheromone = 0.0;\n for (int l = 0; l < numberOfCities; l++) {\n if (!ant.visited(l)) {\n pheromone += (Math.pow(trails[i][l], alpha) + 1) * (Math.pow(graph[i][l], beta) + 1) *\n (Math.pow(emcMatrix[i][l], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][l], ddd) + 1);\n }\n }\n for (int j = 0; j < numberOfCities; j++) {\n if (ant.visited(j)) {\n probabilities[j] = 0.0;\n } else {\n double numerator = (Math.pow(trails[i][j], alpha) + 1) * (Math.pow(graph[i][j], beta) + 1) *\n (Math.pow(emcMatrix[i][j], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][j], ddd) + 1);\n probabilities[j] = numerator / pheromone;\n }\n }\n }", "public abstract double getPriority();", "@Override\r\n\tpublic int compareTo(Object o) {\n\t\tConfiguration C= (Configuration) o;\r\n\t\treturn Evaluation()-C.Evaluation();\r\n\t}", "public int compare(identified_crystal a, identified_crystal b) \n\t { \n\n\t \treturn a.rating - b.rating; \n\t }", "public int compare(Object o1, Object o2) {\n int[] p1 = (int[]) o1;\n int[] p2 = (int[]) o2;\n\n // compare sum of axis distances for each priority\n for (int p=MAX_PRIORITY; p>=MIN_PRIORITY; p--) {\n int dist1 = 0, dist2 = 0;\n for (int i=0; i<p1.length; i++) {\n if (priorities[i] == p) {\n dist1 += distance(i, p1[i]);\n dist2 += distance(i, p2[i]);\n }\n }\n int diff = dist1 - dist2;\n if (diff != 0) return diff;\n }\n\n // compare number of diverging axes for each priority\n for (int p=MAX_PRIORITY; p>=MIN_PRIORITY; p--) {\n int div1 = 0, div2 = 0;\n for (int i=0; i<p1.length; i++) {\n if (priorities[i] == p) {\n if (p1[i] != 0) div1++;\n if (p2[i] != 0) div2++;\n }\n }\n int diff = div1 - div2;\n if (diff != 0) return diff;\n }\n\n return 0;\n }", "@Test\n public void TestCase1() {\n VariableMap variables = Variables\n .putValue(\"Role\", \"Executive\")\n .putValue(\"BusinessProcess\", \"PTO Request\")\n .putValue(\"DelegationDateRange\", \"2019-04-31T00:00:00\");\n\n DmnDecisionTableResult result = dmnEngine.evaluateDecisionTable(decision, variables);\n\n // Need to establish rule ordering\n assertThat(result.collectEntries(\"result\"))\n .hasSize(2)\n .contains(\"John M\")\n .contains(\"Kerry\");\n }", "double[] calculateProbabilities(LACInstance testInstance) throws Exception\n\t{\n\t\tdouble[] probs;\n\t\tdouble[] scores = calculateScores(testInstance);\n\t\t\n\t\tif(scores != null)\n\t\t{\n\t\t\tprobs = new double[scores.length];\n\t\t\tdouble scoreSum = 0.0;\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tscoreSum += scores[i];\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tprobs[i] = scores[i] / scoreSum;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSet<Integer> allClasses = trainingSet.getAllClasses();\n\t\t\tprobs = new double[allClasses.size()];\n\t\t\tfor (Integer clazz : allClasses) \n\t\t\t{\n\t\t\t\tdouble count = trainingSet.getInstancesOfClass(clazz).size();\n\t\t\t\tprobs[clazz] = (count / ((double) trainingSet.length()));\n\t\t\t}\n\t\t}\n\n\t\treturn probs ;\n\t}", "public double classifyInstance(Instance inst) {\n\n int result = m_rules.resultRules(inst);\n if (result == -1) {\n return Instance.missingValue();\n } else {\n return (double)result;\n }\n }", "public double getScore() {\n int as = this.attributes.size(); // # of attributes that were matched\n\n // we use thresholding ranking approach for numInstances to influence the matching score\n int instances = this.train.numInstances();\n int inst_rank = 0;\n if (instances > 100) {\n inst_rank = 1;\n }\n if (instances > 500) {\n inst_rank = 2;\n }\n\n return this.p_sum + as + inst_rank;\n }", "private HashMap<String, int[] > getAttrClassRatio ( ArrayList<String> alCalcAttr, ArrayList<String> alClasAttr ) {\r\n\t\tHashMap< String, int[] > attrClassRatioMap = new HashMap<String, int[] >();\r\n\t\tString classA = alClasAttr.get(0);\r\n\t\tfor ( int i = 0; i < alCalcAttr.size(); i++ ) {\r\n\t\t\tString attr = alCalcAttr.get(i);\r\n\t\t\tString classification = alClasAttr.get(i);\r\n\t\t\tif ( !attrClassRatioMap.containsKey(attr) ) {\r\n\t\t\t\tattrClassRatioMap.put( attr, new int[2] );\r\n\t\t\t}\r\n\t\t\tif ( classA.equals( classification ) ) {\r\n\t\t\t\tint[] classCount = attrClassRatioMap.get( attr );\r\n\t\t\t\t++classCount[0];\r\n\t\t\t\tattrClassRatioMap.put( attr, classCount );\r\n\t\t\t} else {\r\n\t\t\t\tint[] classCount = attrClassRatioMap.get( attr );\r\n\t\t\t\t++classCount[1];\r\n\t\t\t\tattrClassRatioMap.put( attr, classCount );\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn attrClassRatioMap;\r\n\t}", "@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }", "@Test \n public void compareFunctionalEquals() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p1, p1);\n \n assertEquals(0, a);\n }", "void setStatCategory (String statistic);", "protected abstract double computeColumnScore(Column column);", "Comparison createComparison();", "Comparison createComparison();", "public static float calcSimilarity(Map<String, Enum> first, Map<String, Enum> second) {\n if (first == null && second == null) return 1f;\n Set<String> allKeys = new HashSet<>();\n\n if (first != null) allKeys.addAll(first.keySet());\n if (second != null) allKeys.addAll(second.keySet());\n\n int normDiv = 0;\n float sum = 0;\n for (String key : allKeys) {\n Enum thisEnum = first != null ? first.get(key) : null;\n Enum otherEnum = second != null ? second.get(key) : null;\n PhAttribType phA = getAllPhAttribTypes().get(key);\n try {\n sum += phA.calcSimilarity(thisEnum, otherEnum) * phA.getWeight();\n normDiv++;\n } catch (AttribTypeNotComparableException ncE) {\n System.err.println(\"NotComparableException: \" + ncE);\n }\n }\n if (sum == 0) return 0;\n return sum / normDiv;\n }", "public double calcProbs(Entry newEntry) {\r\n\t\ttotal = Collections.frequency(hasCOVID19, \"yes\");\r\n\t\tpIfYes += Collections.frequency(temperatureIfCOVID19,newEntry.getTemperature()) / total;\r\n\t\tpIfYes *= Collections.frequency(achesIfCOVID19,newEntry.getAches()) / total;\r\n\t\tpIfYes *= Collections.frequency(coughIfCOVID19,newEntry.getCough()) / total;\r\n\t\tpIfYes *= Collections.frequency(soreThroatIfCOVID19,newEntry.getSoreThroat()) / total;\r\n\t\tpIfYes *= Collections.frequency(dangerZoneIfCOVID19,newEntry.getDangerZone()) / total;\r\n\t\tpIfYes *= (double) total / dataEntries.size();\r\n\t\t\r\n\t\ttotal = Collections.frequency(hasCOVID19, \"no\");\r\n\t\tpIfNo += (Collections.frequency(temperature,newEntry.getTemperature()) - Collections.frequency(temperatureIfCOVID19,newEntry.getTemperature())) / total;\r\n\t\tpIfNo *= (Collections.frequency(cough,newEntry.getCough()) - Collections.frequency(coughIfCOVID19,newEntry.getCough())) / total;\r\n\t\tpIfNo *= (Collections.frequency(aches,newEntry.getAches()) - Collections.frequency(achesIfCOVID19,newEntry.getAches())) /total;\r\n\t\tpIfNo *= (Collections.frequency(soreThroat,newEntry.getSoreThroat()) - Collections.frequency(soreThroatIfCOVID19,newEntry.getSoreThroat())) /total;\r\n\t\tpIfNo *= (Collections.frequency(dangerZone,newEntry.getDangerZone()) - Collections.frequency(dangerZoneIfCOVID19,newEntry.getDangerZone())) / total;\r\n\t\tpIfNo *= (double) total / dataEntries.size();\r\n\t\t\r\n\t\t//Getting the result as a percentage and returning it.\r\n\t\tprobability = (pIfYes / (pIfYes+pIfNo)) * 100;\r\n\t\treturn probability;\r\n\t}", "public int resultRule(Instance inst) {\n\n if (m_test == null || m_test.satisfies(inst)) {\n\treturn m_classification;\n } else {\n\treturn -1;\n }\n }", "public float getConfidence();", "public void print_metrics(){\n\t\tHashMap<Integer, HashSet<Integer>> pairs=return_pairs();\n\t\tint total=gold.data.getTuples().size();\n\t\ttotal=total*(total-1)/2;\n\t\tSystem.out.println(\"Reduction Ratio is: \"+(1.0-(double) countHashMap(pairs)/total));\n\t\tint count=0;\n\t\tfor(int i:pairs.keySet())\n\t\t\tfor(int j:pairs.get(i))\n\t\t\tif(goldContains(i,j))\n\t\t\t\tcount++;\n\t\tSystem.out.println(\"Pairs Completeness is: \"+(double) count/gold.num_dups);\n\t}", "String getConfidence();", "public void testCompare3() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.5D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(0.6D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions above the range < predictions below the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "MetricOuterClass.Metric getMetricTreatment();", "int givePropScore(int propSize, int crownNum) throws Exception;", "public double compute(ClassifierSetPoint point) {\n return point.getThreshold();\n }", "public CategoryWeight(WeightedPairLiteral pair) {\n \n String baseA = pair.getBaseValueA();\n String baseB = pair.getBaseValueB();\n \n List<String> mismatchA = pair.getMismatchTokensA();\n List<String> mismatchB = pair.getMismatchTokensB();\n \n List<String> specialsA = pair.getSpecialTermsA();\n List<String> specialsB = pair.getSpecialTermsB();\n \n Set<CommonSpecialTerm> common = pair.getCommonSpecialTerms();\n \n // giann: added the fullZeroBaseSimilarity check / \n if(baseA.isEmpty() && baseB.isEmpty()){\n fullZeroBaseSimilarity = true;\n }\n \n /*giann: replaced with XOR*/\n if(baseA.isEmpty() ^ baseB.isEmpty()){\n zeroBaseSimilarity = true;\n }\n\n if((mismatchA.isEmpty() && !mismatchB.isEmpty()) || (!mismatchA.isEmpty() && mismatchB.isEmpty())){\n halfEmptyMismatch = true;\n }\n\n if(mismatchA.isEmpty() && mismatchB.isEmpty()){\n fullEmptyMismatch = true;\n }\n \n if(specialsA.isEmpty() && specialsB.isEmpty()){\n emptySpecials = true;\n } \n \n if(common.isEmpty()){\n emptyCommon = true;\n } \n }", "public static double RELATIVE_PERCENTAGE_SUPPORT(Feature a, Feature b) {\n double num = 0.0, den = 0.0, dinf, dsup, rat = -1.0;\n int i;\n\n if (!a.type.equals(b.type)) Dataset.perror(\"Feature.class :: not the same class for features\");\n\n if (Feature.IS_CONTINUOUS(a.type)) {\n if ((b.dmax == b.dmin) || (a.dmax <= b.dmin) || (a.dmin >= b.dmax)) return 0.0;\n\n if (a.dmin < b.dmin) dinf = b.dmin;\n else dinf = a.dmin;\n\n if (a.dmax > b.dmax) dsup = b.dmax;\n else dsup = a.dmax;\n\n num = dsup - dinf;\n den = b.dmax - b.dmin;\n } else if (Feature.IS_INTEGER(a.type)) {\n if ((a.imax < b.imin) || (a.imin > b.imax)) return 0.0;\n\n if (a.imin <= b.imin) dinf = (double) b.imin;\n else dinf = (double) a.imin;\n\n if (a.imax >= b.imax) dsup = (double) b.imax;\n else dsup = (double) a.imax;\n\n num = dsup - dinf + 1.0;\n den = ((double) (b.imax - b.imin)) + 1.0;\n } else if (Feature.IS_NOMINAL(a.type)) {\n if (b.modalities.size() == 0) return 0.0;\n else den = (double) b.modalities.size();\n\n num = 0.0;\n for (i = 0; i < a.modalities.size(); i++)\n if (b.modalities.contains((String) a.modalities.elementAt(i))) num += 1.0;\n } else Dataset.perror(\"Feature.class :: feature type unknown\");\n\n rat = num / den;\n if ((rat < 0.0) || (rat > 1.0))\n Dataset.perror(\"Feature.class :: ratio \" + rat + \" not a probability\");\n return rat;\n }", "private static String bmiClassification (Double bmi) {\n String bmiToString = \"\";\n\n if (bmi < 18.5)\n bmiToString = \"Underweight\";\n else if (bmi < 25.0)\n bmiToString = \"Normal\";\n else if (bmi < 30.0)\n bmiToString = \"Overweight\";\n else if (bmi >= 30.0)\n bmiToString = \"Obese\";\n\n return bmiToString;\n }", "public double computeAccuracy(){\n\n\t\t//count the totla number of predictions\n\t\tdouble total = sumAll();\n\n\t\tdouble truePredictions = 0;\n\t\t//iterate all correct guesses\n\t\tfor(Label l : labels){\n\t\t\ttruePredictions += this.computeTP(l);\n\t\t\t\n\t\t}\n\n\t\treturn truePredictions/(total);\n\n\t}", "Quantity getComparisonValue();", "double calcScoreFromObjCount(double[] c_in, double[] c_out) {\r\n\t\t// / multi-class\r\n\t\tdouble diff, sum = 0, max_val = Double.NEGATIVE_INFINITY, min_val = Double.POSITIVE_INFINITY;\r\n\t\tfor (int i = 0; i < num_class; i++) {\r\n\t\t\tdiff = (c_in[i] - c_out[i]);\r\n\t\t\tif (diff > max_val) {\r\n\t\t\t\tmax_val = diff;\r\n\t\t\t}\r\n\t\t\tif (diff < min_val) {\r\n\t\t\t\tmin_val = diff;\r\n\t\t\t}\r\n\t\t\tsum += Math.abs(diff);\r\n\t\t}\r\n\t\treturn (sum - Math.abs(max_val) - Math.abs(min_val)) + Math.abs(max_val - min_val);\r\n\t}", "public double matchData() {\n\t\tArrayList<OWLDataProperty> labels1 = getDataProperties(ontology1);\n\t\tArrayList<OWLDataProperty> labels2 = getDataProperties(ontology2);\n\t\tfor (OWLDataProperty lit1 : labels1) {\n\t\t\tfor (OWLDataProperty lit2 : labels2) {\n\t\t\t\tif (LevenshteinDistance.computeLevenshteinDistance(TestAlign.mofidyURI(lit1.toString())\n\t\t\t\t\t\t, TestAlign.mofidyURI(lit2.toString()))>0.8){\n\t\t\t\t\treturn 1.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0.;\n\n\n\t}", "public double getProbability() {\r\n\t\treturn Probability;\r\n\t}", "@Override\r\n\t//按权重大小排序\r\n\tpublic int compareTo(Domain o) {\n\t\treturn (o.weight-this.weight);\r\n\t}", "public double getProbability() {\n return probability;\n }" ]
[ "0.7060264", "0.65624344", "0.584823", "0.5833933", "0.5749905", "0.57399297", "0.57054514", "0.5422686", "0.5387758", "0.53338873", "0.531692", "0.53159326", "0.52916616", "0.52835584", "0.5282838", "0.527649", "0.5248659", "0.52462375", "0.52017796", "0.51797265", "0.5157146", "0.5149439", "0.5108943", "0.51055396", "0.507801", "0.50139076", "0.500027", "0.49726862", "0.49685997", "0.49671558", "0.49540448", "0.49486235", "0.4934103", "0.49303603", "0.49250144", "0.49088603", "0.490495", "0.49012193", "0.48993486", "0.48811468", "0.48796105", "0.48732677", "0.48729753", "0.48602495", "0.48600546", "0.48529246", "0.48505238", "0.48486823", "0.4839174", "0.48363155", "0.48290995", "0.48266423", "0.48242092", "0.48224506", "0.48210233", "0.48210233", "0.480353", "0.4796338", "0.4782661", "0.47810382", "0.4775591", "0.47715876", "0.47715306", "0.47665983", "0.47630775", "0.47607026", "0.4758132", "0.47532856", "0.47409168", "0.47386748", "0.4738337", "0.47345215", "0.47266302", "0.47250822", "0.4724128", "0.4715198", "0.47042593", "0.46794644", "0.46753633", "0.46753633", "0.46748888", "0.4666964", "0.4659168", "0.4658559", "0.46455368", "0.4635842", "0.46293858", "0.46229237", "0.46215293", "0.46193168", "0.46175995", "0.46088937", "0.45984867", "0.45976153", "0.459743", "0.4591824", "0.45917097", "0.45897147", "0.45846322", "0.45815286" ]
0.74083185
0
Estimates the probability that a comparison between a categorical property value and a constant holds
private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats, String property, Comparator comp, PropertyValue value) { if (comp != EQ && comp != NEQ) { return 0.; } long overallCount = 0L; boolean found = false; for (TemporalElementStats stat : relevantStats) { overallCount += stat.getElementCount(); if (stat.getCategoricalSelectivityEstimation().containsKey(property)) { found = true; } } // property not sampled or not considered if (!found) { // not relevant/considered => simply return 0.5 if (!isPropertyRelevant(property)) { return 0.5; } else { // not sampled => very rare or not even there => return very small value return 0.0001; } } double prob = 0.; for (TemporalElementStats stat : relevantStats) { if (!stat.getCategoricalSelectivityEstimation().containsKey(property)) { // not sampled ? .... double factor = 0.0001; // ...or just excluded/not relevant? if (!isPropertyRelevant(property)) { factor = 0.5; } prob += factor * ((double) stat.getElementCount() / overallCount); continue; } prob += stat.getCategoricalSelectivityEstimation() .get(property) .getOrDefault(value, 0.0001) * ((double) stat.getElementCount() / overallCount); } if (comp == EQ) { return prob; } else { //NEQ return 1 - prob; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double estimateCategoricalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Map<PropertyValue, Double>> map1 =\n stats1.getCategoricalSelectivityEstimation();\n Map<String, Map<PropertyValue, Double>> map2 =\n stats2.getCategoricalSelectivityEstimation();\n Map<PropertyValue, Double> propStats1 = map1.getOrDefault(property1, null);\n Map<PropertyValue, Double> propStats2 = map2.getOrDefault(property2, null);\n // property not sampled or not considered\n if (propStats1 == null || propStats2 == null) {\n // property not considered => return 0.5\n if (!isPropertyRelevant(property1) && !isPropertyRelevant(property2)) {\n return 0.5;\n } else {\n // property not sampled => very rare => return very small value\n return 0.0001;\n }\n }\n if (comp == EQ || comp == NEQ) {\n double sum = 0.;\n for (Map.Entry<PropertyValue, Double> entry1 : propStats1.entrySet()) {\n double val1Selectivity = entry1.getValue();\n for (Map.Entry<PropertyValue, Double> entry2 : propStats2.entrySet()) {\n if (entry1.getKey().equals(entry2.getKey())) {\n double val2Selectivity = entry2.getValue();\n sum += val1Selectivity * val2Selectivity;\n }\n }\n }\n return comp == EQ ? sum : 1. - sum;\n } else {\n // shouldn't happen, categorical variables can only be compared with EQ or NEQ\n return 0.;\n }\n }", "private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}", "float getSpecialProb();", "double getCritChance();", "public void calculateProbabilities(){\n\t}", "private double condProb(String stateGiven, String stateFind){\n HashMap probs = genAllProb(stateGiven);\n return (double) probs.get(stateFind);\n }", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp,\n List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateCategoricalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "double getBranchProbability();", "public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}", "private double estimateNumericalPropertyProb(TemporalElementStats stat, String property,\n Comparator comp, PropertyValue value) {\n // property not sampled or not considered\n if (!stat.getNumericalPropertyStatsEstimation().containsKey(property)) {\n // if property not excluded, return very small value\n // if excluded, it is irrelevant, return 0.5\n return isPropertyRelevant(property) ? 0.0001 : 0.5;\n }\n Double[] propertyStats = stat.getNumericalPropertyStatsEstimation().get(property);\n NormalDistribution dist = new NormalDistribution(propertyStats[0],\n Math.max(Math.sqrt(propertyStats[1]), VERY_LOW_PROB));\n double doubleValue = ((Number) value.getObject()).doubleValue();\n double occurenceProb = stat.getNumericalOccurrenceEstimation().get(property);\n if (comp == EQ) {\n return VERY_LOW_PROB * occurenceProb;\n } else if (comp == NEQ) {\n return (1. - VERY_LOW_PROB) * occurenceProb;\n } else if (comp == LTE) {\n return dist.cumulativeProbability(doubleValue) * occurenceProb;\n } else if (comp == LT) {\n return occurenceProb * (dist.cumulativeProbability(doubleValue) - VERY_LOW_PROB);\n } else if (comp == GTE) {\n return occurenceProb *\n (1. - dist.cumulativeProbability(doubleValue) + VERY_LOW_PROB);\n } else {\n //GT\n return occurenceProb * (1. - dist.cumulativeProbability(doubleValue));\n }\n }", "float genChance();", "public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}", "private double categoryProbability(Collection<F> features, C category) {\n return Math.log(((double) this.categoryCount(category)\n / (double) this.getCategoriesTotal()))\n + featuresProbabilityLogSum(features, category);\n }", "protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}", "private void evaluateProbabilities()\n\t{\n\t}", "private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}", "private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n long overallCount = 0L;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n }\n double sum = 0.;\n for (TemporalElementStats stat : relevantStats) {\n sum += estimateNumericalPropertyProb(stat, property, comp, value) *\n (((double) stat.getElementCount() / overallCount));\n }\n return sum;\n }", "int getLikelihoodValue();", "public float getChance()\n {\n return 1.0f;\n }", "public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}", "@Override\n protected void calculateCategoryRates(Node node) {\n\n double propVariable = 1.0;\n int cat = 0;\n\n //if (/*invarParameter != null && */invarParameter.getValue() > 0 ) {\n //System.out.println(\"----------------\");\n double pr;\n if(invPrLogit){\n pr = 1.0/(1.0 + Math.exp(-invarParameter.getValue()));\n //System.out.println(pr);\n }else{\n pr = invarParameter.getValue();\n }\n\n if (hasPropInvariantCategory) {\n categoryRates[0] = 0.0;\n //System.out.println(getCurrModel()+\" \"+INVAR_INDEX);\n categoryProportions[0] = pr*INDICATORS[getCurrModel()][INVAR_INDEX];\n //System.out.println(invarParameter.getValue()+\" \"+INDICATORS[getCurrModel()][INVAR_INDEX]);\n //System.out.println(\"categoryProportions[0]: \"+categoryProportions[0]);\n }\n\n //System.out.println(invarParameter.getID()+\" \" +invarParameter.getValue()+\" \"+pr);\n propVariable = 1.0 - pr*INDICATORS[getCurrModel()][INVAR_INDEX];\n if (hasPropInvariantCategory) {\n cat = 1;\n }\n //}\n\n //System.out.println(\"categoryProportions[0]: \"+categoryProportions[0]);\n\n if (INDICATORS[getCurrModel()][SHAPE_INDEX] == PRESENT) {\n\n final double a = shapeParameter.getValue();\n double mean = 0.0;\n final int gammaCatCount = categoryCount - cat;\n //System.out.println(\"a: \"+a);\n final GammaDistribution g = new GammaDistributionImpl(a, 1.0 / a);\n //System.out.println(\"gammaCatCount:\"+gammaCatCount);\n //if(gammaCatCount == 3){\n //throw new RuntimeException(\"\");\n //}\n for (int i = 0; i < gammaCatCount; i++) {\n try {\n // RRB: alternative implementation that seems equally good in\n // the first 5 significant digits, but uses a standard distribution object\n if(a < 1e-3){\n\n categoryRates[i + cat] = Double.NEGATIVE_INFINITY;\n }else if(a > 1e10){\n categoryRates[i + cat] = 1.0;\n }else if (useBeast1StyleGamma) {\n categoryRates[i + cat] = GammaDistributionQuantile((2.0 * i + 1.0) / (2.0 * gammaCatCount), a, 1.0 / a);\n \t} else {\n \t\tcategoryRates[i + cat] = g.inverseCumulativeProbability((2.0 * i + 1.0) / (2.0 * gammaCatCount));\n \t}\n\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(\"Something went wrong with the gamma distribution calculation\");\n System.exit(-1);\n }\n mean += categoryRates[i + cat];\n\n categoryProportions[i + cat] = propVariable / gammaCatCount;\n }\n\n if(a >= 1e-3 ){\n\n mean = (propVariable * mean) / gammaCatCount;\n\n for (int i = 0; i < gammaCatCount; i++) {\n\n categoryRates[i + cat] /= mean;\n\n }\n }\n } else {\n\n int gammaCatCount = categoryCount - cat;\n //System.out.println(\"Hi!\");\n for(int i = cat; i < categoryRates.length;i++){\n categoryRates[i] = 1.0 / propVariable/gammaCatCount;\n\n categoryProportions[i] = propVariable/gammaCatCount;\n }\n }\n /*System.out.println(\"-------------------------------\");\n System.out.println(\"ID: \"+getID());\n System.out.println(modelChoice);\n System.out.print (invarParameter.getValue()*INDICATORS[getCurrModel()][INVAR_INDEX]+\" \");\n System.out.println(getID());\n System.out.println(\"alpha: \"+shapeParameter.getValue());\n System.out.println(\"invPr: \"+invarParameter.getValue());\n System.out.println(\"siteModel: \"+modelChoice.getValue());\n System.out.println(\"rate: \"+muParameter.getValue());\n for(int i = 0; i < categoryRates.length;i++){\n System.out.print(categoryRates[i]+\" \");\n }\n System.out.println();\n\n System.out.println(invarParameter.getValue());\n for(int i = 0; i < categoryProportions.length;i++){\n\n System.out.print(categoryProportions[i]+\" \");\n }\n System.out.println();\n System.out.println(\"----------------\"); */\n\n\n ratesKnown = true;\n }", "abstract double rightProbability();", "public double calculateSpecificity() {\n final long divisor = trueNegative + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return trueNegative / (double)divisor;\n }\n }", "public float specificity(final L label)\n {\n\n final Multiset<L> predictionsForLabel = confusionMatrix.computeIfAbsent(label, l ->HashMultiset.create());\n\n final int hasLabel = predictionsForLabel.size();\n final int hasLabelRight = predictionsForLabel.count(label); // true positives\n\n\n final int notLabelWrong = getTotalPredicted(label) - hasLabelRight; // false negatives\n final int notLabel = numExamples - hasLabel;\n final int notLabelRight = notLabel - notLabelWrong; // true negatives\n\n if (notLabel == 0)\n {\n return 1.0f;\n }\n\n return (float) notLabelRight / (float) notLabel;\n }", "public abstract double classify(Instance e);", "public double getSubjectiveValue(Apartment apart) {\n checkNotNull(apart);\n ImmutableMap<Criterion, Double> subjectiveValue =\n new ImmutableMap.Builder<Criterion, Double>()\n .put(\n Criterion.FLOOR_AREA,\n this.linearValueFunctions\n .get(Criterion.FLOOR_AREA)\n .getSubjectiveValue(apart.getFloorArea()))\n .put(\n Criterion.NB_BEDROOMS,\n this.linearValueFunctions\n .get(Criterion.NB_BEDROOMS)\n .getSubjectiveValue((double) apart.getNbBedrooms()))\n .put(\n Criterion.NB_SLEEPING,\n this.linearValueFunctions\n .get(Criterion.NB_SLEEPING)\n .getSubjectiveValue((double) apart.getNbSleeping()))\n .put(\n Criterion.NB_BATHROOMS,\n this.linearValueFunctions\n .get(Criterion.NB_BATHROOMS)\n .getSubjectiveValue((double) apart.getNbBathrooms()))\n .put(\n Criterion.TERRACE,\n this.booleanValueFunctions\n .get(Criterion.TERRACE)\n .getSubjectiveValue(apart.getTerrace()))\n .put(\n Criterion.FLOOR_AREA_TERRACE,\n this.linearValueFunctions\n .get(Criterion.FLOOR_AREA_TERRACE)\n .getSubjectiveValue(apart.getFloorAreaTerrace()))\n .put(\n Criterion.WIFI,\n this.booleanValueFunctions.get(Criterion.WIFI).getSubjectiveValue(apart.getWifi()))\n .put(\n Criterion.PRICE_PER_NIGHT,\n this.reversedValueFunctions\n .get(Criterion.PRICE_PER_NIGHT)\n .getSubjectiveValue(apart.getPricePerNight()))\n .put(\n Criterion.NB_MIN_NIGHT,\n this.reversedValueFunctions\n .get(Criterion.NB_MIN_NIGHT)\n .getSubjectiveValue((double) apart.getNbMinNight()))\n .put(\n Criterion.TELE,\n this.booleanValueFunctions.get(Criterion.TELE).getSubjectiveValue(apart.getTele()))\n .build();\n\n // Check that the subjective values ​​do have a value between 0 and 1\n subjectiveValue.forEach(\n (criterion, aDouble) -> {\n LOGGER.debug(\"The {} subjective value has been set to {}\", criterion.name(), aDouble);\n checkState(\n aDouble >= 0 && aDouble <= 1,\n \"The subjective value of \" + criterion.name() + \"must be between 0 and 1\");\n });\n\n double sum =\n Arrays.stream(Criterion.values())\n .map(c -> this.weight.get(c) * subjectiveValue.get(c))\n .reduce(0.0d, Double::sum);\n double division = this.weight.values().stream().reduce(0.0d, Double::sum);\n return sum / division;\n }", "public double purity(Iterable<Instance> set) {\n\t\tint size = 0;\n\t\tSet<Instance> successNodes = new HashSet<Instance>();\n\t\tSet<Instance> failureNodes = new HashSet<Instance>();\n\t\tfor (Instance i : set) {\n\t\t\tif (i.getCategory() == 0) {\n\t\t\t\tsuccessNodes.add(i);\n\t\t\t} else {\n\t\t\t\tfailureNodes.add(i);\n\t\t\t}\n\t\t\tsize++;\n\t\t}\n\t\tif (successNodes.size() == 0 || failureNodes.size() == 0) {\n\t\t\treturn 1;\n\t\t}\n\t\tdouble papb =\n\t\t\t\t((double)successNodes.size() / (double)size)\n\t\t\t\t* ((double)failureNodes.size() / (double)size);\n\t\treturn papb;\n\t}", "@Test\n\tpublic void priorsAreReasonable() {\n\t\tdouble tot = 0;\n\t\tboolean zeroPrior = false;\n\t\tfor(NewsGroup g: groups) {\n\t\t\tdouble p = g.getPrior();\n\t\t\ttot+=p;\n\t\t\tif(p == 0.0) {\n\t\t\t\tzeroPrior = true;\n\t\t\t}\n\t\t}\n\t\tassertTrue((tot == 1) && !zeroPrior);\n\t}", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}", "public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }", "@Test\n public void genNeighStateProbability() {\n double[] metrics = new double[STATES.length * STATES.length];\n double sum = 0;\n Random rand = new Random();\n for (int i = 0; i < metrics.length; i++) {\n int x = i / STATES.length;\n int y = i % STATES.length;\n if (x == y) {\n metrics[i] = 0;\n } else {\n double d = Math.abs(rand.nextGaussian());//Math.exp(-Math.abs(STATES[x] - STATES[y]) / 3) * Math.abs(rand.nextGaussian());\n metrics[i] = d;\n sum += d;\n }\n }\n final double finalSum = sum;\n metrics = DoubleStream.of(metrics).map(d -> d / finalSum).toArray();\n for (int i = 0; i < metrics.length; i++) {\n int x = i / STATES.length;\n int y = i % STATES.length;\n if (metrics[i] > 0.01) {\n System.out.printf(\"%d:%d:%.4f\\n\", STATES[x], STATES[y], metrics[i]);\n }\n }\n }", "public abstract double getPriority();", "public static Attribute chooseAttribute(ArrayList<Case> cases) {\n\t\tAttribute currentBestAttribute = null;\n\t\tdouble currentBestRemainder = 0;\n\n\t\t// k\n\t\tdouble [] kValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\t// Extract the correct fields from each case into a separate array for sorting\n\t\t\tkValues[i] = cases.get(i).k;\n\t\t}\n\t\tArrays.sort(kValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\t// Find the midpoint between two sequential values\n\t\t\tdouble midpoint = (kValues[i] + kValues[i+1]) / 2;\n\t\t\t// A rough way of dealing with non-unique values; two sequential identical values' average will be themselves, so ignore anything coming from such a pairing\n\t\t\tif (midpoint == kValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\t// Count the number of positive and negative cases that exist on either side of the threshold\n\t\t\t\tif (c.k < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Calculate the remainder as given in lecture slides 17-18 slide 31\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\t// We want the attribute that gives the highest information gain, and since information content of the full\n\t\t\t// set is constant, this is equivalent to the smallest remainder\n\t\t\tif (remainder < currentBestRemainder || currentBestAttribute == null) {\n\t\t\t\tcurrentBestAttribute = Attribute.K;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// na\n\t\tdouble [] naValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tnaValues[i] = cases.get(i).na;\n\t\t}\n\t\tArrays.sort(naValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (naValues[i] + naValues[i+1]) / 2;\n\t\t\tif (midpoint == naValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.na < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Na;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// cl\n\t\tdouble [] clValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tclValues[i] = cases.get(i).cl;\n\t\t}\n\t\tArrays.sort(clValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (clValues[i] + clValues[i+1]) / 2;\n\t\t\tif (midpoint == clValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.cl < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.CL;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// hco3\n\t\tdouble [] hco3Values = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\thco3Values[i] = cases.get(i).hco3;\n\t\t}\n\t\tArrays.sort(hco3Values);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (hco3Values[i] + hco3Values[i+1]) / 2;\n\t\t\tif (midpoint == hco3Values[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.hco3 < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.HCO3;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// endotoxin\n\t\tdouble [] endotoxinValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tendotoxinValues[i] = cases.get(i).endotoxin;\n\t\t}\n\t\tArrays.sort(endotoxinValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (endotoxinValues[i] + endotoxinValues[i+1]) / 2;\n\t\t\tif (midpoint == endotoxinValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.endotoxin < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Endotoxin;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// aniongap\n\t\tdouble [] aniongapValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\taniongapValues[i] = cases.get(i).aniongap;\n\t\t}\n\t\tArrays.sort(aniongapValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (aniongapValues[i] + aniongapValues[i+1]) / 2;\n\t\t\tif (midpoint == aniongapValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.aniongap < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Aniongap;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// pla2\n\t\tdouble [] pla2Values = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tpla2Values[i] = cases.get(i).pla2;\n\t\t}\n\t\tArrays.sort(pla2Values);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (pla2Values[i] + pla2Values[i+1]) / 2;\n\t\t\tif (midpoint == pla2Values[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.pla2 < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.PLA2;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// sdh\n\t\tdouble [] sdhValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tsdhValues[i] = cases.get(i).sdh;\n\t\t}\n\t\tArrays.sort(sdhValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (sdhValues[i] + sdhValues[i+1]) / 2;\n\t\t\tif (midpoint == sdhValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.sdh < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.SDH;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// gldh\n\t\tdouble [] gldhValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tgldhValues[i] = cases.get(i).gldh;\n\t\t}\n\t\tArrays.sort(gldhValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (gldhValues[i] + gldhValues[i+1]) / 2;\n\t\t\tif (midpoint == gldhValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.gldh < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.GLDH;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// tpp\n\t\tdouble [] tppValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\ttppValues[i] = cases.get(i).tpp;\n\t\t}\n\t\tArrays.sort(tppValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (tppValues[i] + tppValues[i+1]) / 2;\n\t\t\tif (midpoint == tppValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.tpp < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.TPP;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// breathRate\n\t\tdouble [] breathRateValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tbreathRateValues[i] = cases.get(i).breathRate;\n\t\t}\n\t\tArrays.sort(breathRateValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (breathRateValues[i] + breathRateValues[i+1]) / 2;\n\t\t\tif (midpoint == breathRateValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.breathRate < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.BreathRate;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// pcv\n\t\tdouble [] pcvValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tpcvValues[i] = cases.get(i).pcv;\n\t\t}\n\t\tArrays.sort(pcvValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (pcvValues[i] + pcvValues[i+1]) / 2;\n\t\t\tif (midpoint == pcvValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.pcv < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.PCV;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// pulseRate\n\t\tdouble [] pulseRateValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tpulseRateValues[i] = cases.get(i).pulseRate;\n\t\t}\n\t\tArrays.sort(pulseRateValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (pulseRateValues[i] + pulseRateValues[i+1]) / 2;\n\t\t\tif (midpoint == pulseRateValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.pulseRate < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.PulseRate;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// fibrinogen\n\t\tdouble [] fibrinogenValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tfibrinogenValues[i] = cases.get(i).fibrinogen;\n\t\t}\n\t\tArrays.sort(fibrinogenValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (fibrinogenValues[i] + fibrinogenValues[i+1]) / 2;\n\t\t\tif (midpoint == fibrinogenValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.fibrinogen < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Fibrinogen;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// dimer\n\t\tdouble [] dimerValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tdimerValues[i] = cases.get(i).dimer;\n\t\t}\n\t\tArrays.sort(dimerValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (dimerValues[i] + dimerValues[i+1]) / 2;\n\t\t\tif (midpoint == dimerValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.dimer < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Dimer;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// fibPerDim\n\t\tdouble [] fibPerDimValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tfibPerDimValues[i] = cases.get(i).fibPerDim;\n\t\t}\n\t\tArrays.sort(fibPerDimValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (fibPerDimValues[i] + fibPerDimValues[i+1]) / 2;\n\t\t\tif (midpoint == fibPerDimValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.fibPerDim < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.FibPerDim;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\treturn currentBestAttribute;\n\t}", "public double calcProbs(Entry newEntry) {\r\n\t\ttotal = Collections.frequency(hasCOVID19, \"yes\");\r\n\t\tpIfYes += Collections.frequency(temperatureIfCOVID19,newEntry.getTemperature()) / total;\r\n\t\tpIfYes *= Collections.frequency(achesIfCOVID19,newEntry.getAches()) / total;\r\n\t\tpIfYes *= Collections.frequency(coughIfCOVID19,newEntry.getCough()) / total;\r\n\t\tpIfYes *= Collections.frequency(soreThroatIfCOVID19,newEntry.getSoreThroat()) / total;\r\n\t\tpIfYes *= Collections.frequency(dangerZoneIfCOVID19,newEntry.getDangerZone()) / total;\r\n\t\tpIfYes *= (double) total / dataEntries.size();\r\n\t\t\r\n\t\ttotal = Collections.frequency(hasCOVID19, \"no\");\r\n\t\tpIfNo += (Collections.frequency(temperature,newEntry.getTemperature()) - Collections.frequency(temperatureIfCOVID19,newEntry.getTemperature())) / total;\r\n\t\tpIfNo *= (Collections.frequency(cough,newEntry.getCough()) - Collections.frequency(coughIfCOVID19,newEntry.getCough())) / total;\r\n\t\tpIfNo *= (Collections.frequency(aches,newEntry.getAches()) - Collections.frequency(achesIfCOVID19,newEntry.getAches())) /total;\r\n\t\tpIfNo *= (Collections.frequency(soreThroat,newEntry.getSoreThroat()) - Collections.frequency(soreThroatIfCOVID19,newEntry.getSoreThroat())) /total;\r\n\t\tpIfNo *= (Collections.frequency(dangerZone,newEntry.getDangerZone()) - Collections.frequency(dangerZoneIfCOVID19,newEntry.getDangerZone())) / total;\r\n\t\tpIfNo *= (double) total / dataEntries.size();\r\n\t\t\r\n\t\t//Getting the result as a percentage and returning it.\r\n\t\tprobability = (pIfYes / (pIfYes+pIfNo)) * 100;\r\n\t\treturn probability;\r\n\t}", "public double getProbability() {\n return probability;\n }", "abstract double leftProbability();", "private double sentenceLogProbability(String sentence, String category) {\r\n double logProbability = Math.log(categoryPriorProbability(category));\r\n // - for debugging -\r\n //System.out.println(\"category prior probability:\" + logProbability);\r\n // - - - - -\r\n List<String> terms = termSegmentor.segmentSentence(sentence);\r\n for (String term : terms) {\r\n double probability;\r\n if (!termGivenCategoryToCount.get(category).containsKey(term)) {\r\n // new term detected on the fly\r\n // smoothen it with a naive prior probability\r\n probability = 1.0 / (words.size() + 1);\r\n } else {\r\n probability = termGivenCategoryPosteriorProbability(term, category);\r\n }\r\n // - for debugging -\r\n //System.out.println(\"probability:\" + probability);\r\n // - - - - -\r\n logProbability += Math.log(probability);\r\n }\r\n // - for debugging -\r\n //System.out.println(\"logProbability:\" + logProbability);\r\n // - - - - -\r\n return logProbability;\r\n }", "public void calculateCommission(){\r\n commission = (sales) * 0.15;\r\n //A sales Person makes 15% commission on sales\r\n }", "public double getObjective() {\n return multiClassClassifierObj() + binaryObj();\n// +(1-temperature)*getEntropy();\n }", "public abstract Object getDecisionValue();", "double getMissChance();", "@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }", "public double estimateSelectivity(Predicate.Op op, int v) {\n int index = calBucketIndex(v);\n double count = 0;\n switch (op) {\n case EQUALS:\n if(v>max || v<min) return 0;\n count = buckets[index];\n break;\n case GREATER_THAN:\n if(v < min) return 1;\n if(v > max) return 0;\n for(int i=index+1;i<buckets.length;++i)\n count += buckets[i];\n break;\n case GREATER_THAN_OR_EQ:\n if(v < min) return 1;\n if(v > max) return 0;\n count = 0;\n for(int i=index;i<buckets.length;++i)\n count += buckets[i];\n break;\n case LESS_THAN:\n if(v < min) return 0;\n if(v > max) return 1;\n for(int i=0;i<index;++i)\n count += buckets[i];\n break;\n case LESS_THAN_OR_EQ:\n if(v < min) return 0;\n if(v > max) return 1;\n for(int i=0;i<index+1;++i)\n count += buckets[i];\n break;\n case NOT_EQUALS:\n if(v>max || v<min) return 1;\n count = totalCount - buckets[index];\n break;\n case LIKE:\n default:\n break;\n }\n \treturn count / totalCount;\n }", "public int getWorth() { return 1; }", "@Override\n\tpublic int evaluate(Map<ResourceType, Integer> requirements) {\n\t\treturn this.constant;\n\t}", "int givePropScore(int propSize, int crownNum) throws Exception;", "public Action getActionBasedOnProbability(final State state) {\r\n final double decision = Math.random();\r\n double decisionCount = 0;\r\n\r\n for (final Map.Entry<Action, Double> actionProb : getProperties(state).getActionProbabilities().entrySet()) {\r\n decisionCount += actionProb.getValue();\r\n if (decisionCount >= decision) {\r\n return actionProb.getKey();\r\n }\r\n }\r\n\r\n System.err.println(\"Error: cannot choose action!\");\r\n System.err.println(getProperties(state).getActionProbabilities());\r\n return null;\r\n }", "int computeNutritionalScore(Map<String, Object> product);", "public double getProbability() {\r\n\t\treturn Probability;\r\n\t}", "private double [] uniformDiscreteProbs(int numStates) \n {\n double [] uniformProbs = new double[2 * numStates];\n for(int i = 0; i < 2 * numStates; i++)\n uniformProbs[i] = (1.0 / (2 * numStates));\n return uniformProbs;\n }", "@Override\r\n\tpublic void computeConstant() {\n\t\t\r\n\t}", "private int staticEval(Side p, Board b) {\n if (p.equals(Side.RED) && b.numOfSide(p) > C * Math.pow(b.size(), 2)) {\n return C0;\n } else if (p.equals(Side.BLUE)\n && b.numOfSide(p) > C * Math.pow(b.size(), 2)) {\n return C0;\n } else {\n return 0;\n }\n }", "private double getProbabilityScore(Cell c,int bitmask)\n {\n\t return Math.pow(\n\t\t\t Math.pow(m_probs1[c.getCol()-1],(1&bitmask) ) * \n\t\t\t Math.pow(m_probs2[c.getRow()-1],(2&bitmask)/2) //geo-mean\n\t\t\t , Math.min(1,3.5-bitmask));\n }", "private SortedSet<Classification<F, C>> categoryProbabilities(Collection<F> features) {\n\n /*\n * Sort the set according to the possibilities. Because we have to sort\n * by the mapped value and not by the mapped key, we can not use a\n * sorted tree (TreeMap) and we have to use a set-entry approach to\n * achieve the desired functionality. A custom comparator is therefore\n * needed.\n */\n SortedSet<Classification<F, C>> probabilities =\n new TreeSet<Classification<F, C>>(new Comparator<Classification<F, C>>() {\n\n @Override\n public int compare(Classification<F, C> o1, Classification<F, C> o2) {\n int toReturn = Double.compare(o1.getProbability(), o2.getProbability());\n if ((toReturn == 0) && !o1.getCategory().equals(o2.getCategory())) {\n toReturn = -1;\n }\n return toReturn;\n }\n });\n\n for (C category : this.getCategories()) {\n probabilities.add(new Classification<F, C>(\n features, category, this.categoryProbability(features, category)));\n }\n return probabilities;\n }", "private double estimateNumericalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Double[]> map1 = stats1.getNumericalPropertyStatsEstimation();\n Map<String, Double[]> map2 = stats2.getNumericalPropertyStatsEstimation();\n Double[] propStats1 = map1.getOrDefault(property1, null);\n Double[] propStats2 = map2.getOrDefault(property2, null);\n if (propStats1 == null || propStats2 == null) {\n return 0.0001;\n }\n double occurrence = stats1.getNumericalOccurrenceEstimation()\n .getOrDefault(property1, 0.) *\n stats2.getNumericalOccurrenceEstimation().getOrDefault(property2, 0.);\n // assuming both properties are normally distributed,\n // their difference is also normally distributed\n NormalDistribution differenceDist = new NormalDistribution(\n propStats1[0] - propStats2[0],\n Math.max(Math.sqrt(propStats1[1] + propStats2[1]), VERY_LOW_PROB));\n\n if (comp == EQ) {\n return occurrence * differenceDist.density(0.);\n } else if (comp == NEQ) {\n return occurrence * (1. - differenceDist.density(0.));\n } else if (comp == LTE) {\n return occurrence * (differenceDist.cumulativeProbability(0.));\n } else if (comp == LT) {\n return occurrence * (differenceDist.cumulativeProbability(0.) -\n differenceDist.density(0.));\n } else if (comp == GTE) {\n return occurrence * (1. - differenceDist.cumulativeProbability(0.) +\n differenceDist.density(0.));\n } else {\n //GT\n return occurrence * (1. - differenceDist.cumulativeProbability(0.));\n }\n }", "public String CPUDepartProb()\r\n\t{\r\n\t\tdouble prob = Math.random();\r\n\t\t//System.out.println(\"prob: \" + prob);\r\n\t\t\r\n\t\tif(prob<=0.5) //0.5 chance\r\n\t\t{\r\n\t\t\treturn (\"Leave system\");\r\n\t\t}\r\n\t\telse if(prob>0.5 && prob<=(0.5+0.1)) //0.1 chance\r\n\t\t{\r\n\t\t\treturn (\"To Disk\");\r\n\t\t}\r\n\t\telse\t//0.4 chance\r\n\t\t{\r\n\t\t\treturn (\"To network\");\r\n\t\t}\r\n\t}", "private double calcuCMetric() {\n\t\treturn (p-1)/fcost;\n\t}", "SimpleProbabilityValue (float value) {\r\n\t\t\tthis.value = value;\r\n\t\t\tthis.setFixedValue(true);\r\n\t\t}", "float getConfidence();", "public abstract double applyDiscount(double p);", "@Test\n public void testVar() {\n System.out.println(\"var\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(7/0.3, instance.var(), 1E-7);\n }", "protected float computeProbs(int n)\n\t{\n\t\tfloat Cmi = 0;\n\t\t// Compute probabilities\n\t\tfor (int k = 0; k < bins; k++)\n\t\tfor (int l = 0; l < bins; l++)\n\t\t{\n\t\t float Pkl = Puv[k*bins+l];\n\t\t if (Pkl > 0)\n\t\t\t Cmi -= Pkl / n * Math.log(n * Pkl / (Pu[k] * Pv[l]));\n\t\t}\n\t\treturn Cmi;\n\t}", "private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}", "private double p_l(Label label) {\n\t\t// TODO : Implement\n\t\t// Calculate the probability for the label. No smoothing here.\n\t\t// Just the number of label counts divided by the number of documents.\n\t\tint total = docCount.get(Label.POSITIVE)+docCount.get(Label.NEGATIVE);\n\t\t\n\t\t\n\t\tif(label.equals(Label.POSITIVE))\n\t\t\treturn ((double)(docCount.get(Label.POSITIVE)))/((double)(total));\n\t\telse\n\t\t\treturn ((double)(docCount.get(Label.NEGATIVE)))/((double)(total));\n\t}", "private double getAttributeProbability(String attribute, int attributeIndex) {\n\t\tDouble value; // store value of raw data\n\t\tif (attribute.chars().allMatch(Character::isDigit) || attribute.contains(\".\")) {\n\t\t\tvalue = Double.valueOf(attribute);\n\t\t} else {\n\t\t\tvalue = (double) attribute.hashCode();\n\t\t} // end if-else\n\n\n\t\tdouble totalSelectedAttribute = 0;\n\t\tfor (Bin bin : attribBins.get(attributeIndex)) {\n\t\t\tif (bin.binContains(value)) {\n\t\t\t\ttotalSelectedAttribute = bin.getFreq();\n\t\t\t\tbreak;\n\t\t\t} // end if\n\t\t} // end for\n\n\t\tint totalAttributes = 0;\n\t\tfor (int i = 0; i < dc.getDataFold().size(); i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\ttotalAttributes += dc.getDataFold().get(i).size();\n\t\t\t} // end if-else\n\t\t} // end for\n\t\treturn totalSelectedAttribute / totalAttributes;\n\t}", "public abstract float getProbability(String singleToken);", "public void calculateEffectiveness(){\n double[] typeEffective = new double[18];\n \n for(int i = 0; i < 18; i++){\n typeEffective[i] = tc.getEffectiveNumber(i, tc.convertType(type1));\n }\n \n if(type2 != null){\n for(int i = 0; i < 18; i++){\n typeEffective[i] *= tc.getEffectiveNumber(i, tc.convertType(type2));\n }\n }\n \n for(int i = 0; i < 18; i++){\n if(typeEffective[i] != 1){\n if(typeEffective[i] > 1){\n double[] newWeak = {i,typeEffective[i]};\n weak.add(newWeak);\n }else{\n double[] newStrong = {i,typeEffective[i]};\n strong.add(newStrong);\n }\n }\n }\n }", "protected abstract float _getGrowthChance();", "private double condProb(RelStruc A,Hashtable atomhasht,OneStrucData inst,long[] timers)\n\t\t\tthrows RBNCompatibilityException\n\t\t\t{\n\t\tdouble result = probform.evalSample(A,atomhasht,inst,timers);\n\t\t//System.out.print(\" cP: \" + result);\n\t\treturn result;\n\t\t\t}", "Float getFedAnimalsPercentage();", "@Override\n\tpublic void makeDecision() {\n\t\tint powerMax = (int)(initPower) / 100;\n\t\tint powerMin = (int)(initPower * 0.3) / 100;\n\n\t\t// The value is calculated randomly from 0 to 10% of the initial power\n\t\tRandom rand = new Random();\n\t\tint actualPower = rand.nextInt((powerMax - powerMin) + 1) + powerMin;\n\t\tanswer.setConsumption(actualPower);\n\t}", "public static double chooseAttributeThreshold(ArrayList<Case> cases, Attribute attribute) {\n\t\tdouble currentBestThreshold = -1;\n\t\tdouble currentBestRemainder = 0;\n\n\t\tdouble [] values = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\t// Create an array of the appropriate field values from each case for easy sorting\n\t\t\tswitch (attribute) {\n\t\t\tcase K:\n\t\t\t\tvalues[i] = cases.get(i).k;\n\t\t\t\tbreak;\n\t\t\tcase Na:\n\t\t\t\tvalues[i] = cases.get(i).na;\n\t\t\t\tbreak;\n\t\t\tcase CL:\n\t\t\t\tvalues[i] = cases.get(i).cl;\n\t\t\t\tbreak;\n\t\t\tcase HCO3:\n\t\t\t\tvalues[i] = cases.get(i).hco3;\n\t\t\t\tbreak;\n\t\t\tcase Endotoxin:\n\t\t\t\tvalues[i] = cases.get(i).endotoxin;\n\t\t\t\tbreak;\n\t\t\tcase Aniongap:\n\t\t\t\tvalues[i] = cases.get(i).aniongap;\n\t\t\t\tbreak;\n\t\t\tcase PLA2:\n\t\t\t\tvalues[i] = cases.get(i).pla2;\n\t\t\t\tbreak;\n\t\t\tcase SDH:\n\t\t\t\tvalues[i] = cases.get(i).sdh;\n\t\t\t\tbreak;\n\t\t\tcase GLDH:\n\t\t\t\tvalues[i] = cases.get(i).gldh;\n\t\t\t\tbreak;\n\t\t\tcase TPP:\n\t\t\t\tvalues[i] = cases.get(i).tpp;\n\t\t\t\tbreak;\n\t\t\tcase BreathRate:\n\t\t\t\tvalues[i] = cases.get(i).breathRate;\n\t\t\t\tbreak;\n\t\t\tcase PCV:\n\t\t\t\tvalues[i] = cases.get(i).pcv;\n\t\t\t\tbreak;\n\t\t\tcase PulseRate:\n\t\t\t\tvalues[i] = cases.get(i).pulseRate;\n\t\t\t\tbreak;\n\t\t\tcase Fibrinogen:\n\t\t\t\tvalues[i] = cases.get(i).fibrinogen;\n\t\t\t\tbreak;\n\t\t\tcase Dimer:\n\t\t\t\tvalues[i] = cases.get(i).dimer;\n\t\t\t\tbreak;\n\t\t\tcase FibPerDim:\n\t\t\t\tvalues[i] = cases.get(i).fibPerDim;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tArrays.sort(values);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (values[i] + values[i+1]) / 2;\n\t\t\t// A rough way of dealing with non-unique values; two sequential identical values' average will be themselves, so ignore anything coming from such a pairing\n\t\t\tif (midpoint == values[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\t// Count the number of positive and negative cases that exist on either side of the threshold\n\t\t\t\tdouble value = 0;\n\t\t\t\tswitch (attribute) {\n\t\t\t\tcase K:\n\t\t\t\t\tvalue = c.k;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Na:\n\t\t\t\t\tvalue = c.na;\n\t\t\t\t\tbreak;\n\t\t\t\tcase CL:\n\t\t\t\t\tvalue = c.cl;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HCO3:\n\t\t\t\t\tvalue = c.hco3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Endotoxin:\n\t\t\t\t\tvalue = c.endotoxin;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Aniongap:\n\t\t\t\t\tvalue = c.aniongap;\n\t\t\t\t\tbreak;\n\t\t\t\tcase PLA2:\n\t\t\t\t\tvalue = c.pla2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase SDH:\n\t\t\t\t\tvalue = c.sdh;\n\t\t\t\t\tbreak;\n\t\t\t\tcase GLDH:\n\t\t\t\t\tvalue = c.gldh;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TPP:\n\t\t\t\t\tvalue = c.tpp;\n\t\t\t\t\tbreak;\n\t\t\t\tcase BreathRate:\n\t\t\t\t\tvalue = c.breathRate;\n\t\t\t\t\tbreak;\n\t\t\t\tcase PCV:\n\t\t\t\t\tvalue = c.pcv;\n\t\t\t\t\tbreak;\n\t\t\t\tcase PulseRate:\n\t\t\t\t\tvalue = c.pulseRate;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Fibrinogen:\n\t\t\t\t\tvalue = c.fibrinogen;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Dimer:\n\t\t\t\t\tvalue = c.dimer;\n\t\t\t\t\tbreak;\n\t\t\t\tcase FibPerDim:\n\t\t\t\t\tvalue = c.fibPerDim;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (value < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Calculate the remainder as defined in lecture notes 17-18 slide 31\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\t// We want the attribute that gives the highest information gain, and since information content of the full\n\t\t\t// set is constant, this is equivalent to the smallest remainder\n\t\t\tif (remainder < currentBestRemainder || currentBestThreshold == -1) {\n\t\t\t\tcurrentBestThreshold = midpoint;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\treturn currentBestThreshold;\n\t}", "public void calculateProbabilities(Ant ant) {\n int i = ant.trail[currentIndex];\n double pheromone = 0.0;\n for (int l = 0; l < numberOfCities; l++) {\n if (!ant.visited(l)) {\n pheromone += (Math.pow(trails[i][l], alpha) + 1) * (Math.pow(graph[i][l], beta) + 1) *\n (Math.pow(emcMatrix[i][l], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][l], ddd) + 1);\n }\n }\n for (int j = 0; j < numberOfCities; j++) {\n if (ant.visited(j)) {\n probabilities[j] = 0.0;\n } else {\n double numerator = (Math.pow(trails[i][j], alpha) + 1) * (Math.pow(graph[i][j], beta) + 1) *\n (Math.pow(emcMatrix[i][j], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][j], ddd) + 1);\n probabilities[j] = numerator / pheromone;\n }\n }\n }", "public double classificationValue(Object rootState, Map<String, Object> childStates) { return classificationValue(rootState, getCategoricalChildStates(childStates)); }", "void assertTotalCntPctEquals(T key, double expected);", "@Test\n\tpublic void testSingleSetOnlyPositiveInteger()\n\t{\n\t\tcreateSingleValueSet(5);\n\t\tKeyedValues actual = DataUtilities.getCumulativePercentages(m_values);\n\t\t\n\t\tassertEquals(\"Cumulative percentage of a single positive integer should be 100%.\",\n\t\t\t\t1.0, actual.getValue(0).doubleValue(), 0.0000001);\n\t}", "private double evaluateFaultCovFitness(String phenotype) {\n int faults = 38; // Again, should be injected\n boolean[] faultsHit = new boolean[faults];\n for (int i = 0; i < faults; i++)\n faultsHit[i] = false;\n for (int i = 0; i < phenotype.length(); i++) {\n if (phenotype.charAt(i) == '1') {\n// mark the faults found by the test\n for (int j = 0; j < faults; j++) {\n if (faultMatrix[i][j] == 1)\n faultsHit[j] = true;\n }\n }\n }\n// total collection of faults found\n int count = 0;\n for (int i = 0; i < faults; i++) {\n if (faultsHit[i])\n count++;\n }\n return count;\n }", "public static int classify(Model M, int[][] x){\n\t // Double high =jointProbabilityXD(M,x,0)/marginalProbabilityX(M,x);\n\t double high=0.0;\n\t int digit =0;\n\t int i=0;\n\t while(i<10){\n\t\t double tot =conditionalProbabilityDgX( M, i, x);\n\t \t\n\t if(high<tot){\n\t\t high=tot;\n\t \t\tdigit =i; \n\t \t}\n\t\t i++;\n\t \t//System.out.println(0.988809344056389 < 0.011080326918292818);\n\t \n\t\t// System.out.println(tot);\n\t }\n\t return digit;\n }", "public int evaluate() {\n return Condition.INDETERMINATE;\n }", "public double getProb(double value) {\n checkHasParams();\n if (value < 0) {\n return 0;\n } else {\n return (lambda * Math.exp((-lambda) * value));\n }\n }", "public boolean isHappening(int probability){\n return r.nextDouble() <= probability / 100.0;\n }", "public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }", "public abstract float getProbability(String[] tokens);", "boolean hasConstantValue();", "private static String bmiClassification (Double bmi) {\n String bmiToString = \"\";\n\n if (bmi < 18.5)\n bmiToString = \"Underweight\";\n else if (bmi < 25.0)\n bmiToString = \"Normal\";\n else if (bmi < 30.0)\n bmiToString = \"Overweight\";\n else if (bmi >= 30.0)\n bmiToString = \"Obese\";\n\n return bmiToString;\n }", "protected double clusterProbability(List<Node> cluster) {\n float p = LogMath.LOG_ZERO;\n LogMath logMath = LogMath.getInstance();\n\n for (Node node : cluster)\n p = logMath.addAsLinear(p, (float)node.getPosterior());\n\n return p;\n }", "@Override\r\n\tpublic int computeNextVal(boolean prediction) {\n\t\treturn (int) (Math.random()*10)%3;\r\n\t}", "public void trainBernoulli() {\t\t\n\t\tMap<String, Cluster> trainingDataSet = readFile(trainLabelPath, trainDataPath, \"training\");\n\t\tMap<String, Cluster> testingDataSet = readFile(testLabelPath, testDataPath, \"testing\");\n\n\t\t// do testing, if the predicted class and the gold class is not equal, increment one\n\t\tdouble error = 0;\n\n\t\tdouble documentSize = 0;\n\n\t\tSystem.out.println(\"evaluate the performance\");\n\t\tfor (int testKey = 1; testKey <= 20; testKey++) {\n\t\t\tCluster testingCluster = testingDataSet.get(Integer.toString(testKey));\n\t\t\tSystem.out.println(\"Cluster: \"+testingCluster.toString());\n\n\t\t\tfor (Document document : testingCluster.getDocuments()) {\n\t\t\t\tdocumentSize += 1; \n\t\t\t\tList<Double> classprobability = new ArrayList<Double>();\n\t\t\t\tMap<String, Integer> testDocumentWordCounts = document.getWordCount();\n\n\t\t\t\tfor (int classindex = 1; classindex <= 20; classindex++) {\n\t\t\t\t\t// used for calculating the probability\n\t\t\t\t\tCluster trainCluster = trainingDataSet.get(Integer.toString(classindex));\n\t\t\t\t\t// System.out.println(classindex + \" \" + trainCluster.mClassId);\n\t\t\t\t\tMap<String, Double> bernoulliProbability = trainCluster.bernoulliProbabilities;\n\t\t\t\t\tdouble probability = Math.log(trainCluster.getDocumentSize()/trainDocSize);\n\t\t\t\t\tfor(int index = 1; index <= voc.size(); index++ ){\n\n\t\t\t\t\t\t// judge whether this word is stop word \n\t\t\t\t\t\tboolean isStopwords = englishStopPosition.contains(index);\n\t\t\t\t\t\tif (isStopwords) continue;\n\n\t\t\t\t\t\tboolean contain = testDocumentWordCounts.containsKey(Integer.toString(index));\t\t\t\t\t\t\n\t\t\t\t\t\tif (contain) {\n\t\t\t\t\t\t\tprobability += Math.log(bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tprobability += Math.log(1 - bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// put the probability into the map for the specific class\n\t\t\t\t\tclassprobability.add(probability);\n\t\t\t\t}\n\t\t\t\tObject obj = Collections.max(classprobability);\n\t\t\t\t// System.out.println(classprobability);\n\t\t\t\tString predicte_class1 = obj.toString();\n\t\t\t\t// System.out.println(predicte_class1);\n\t\t\t\t// System.out.println(Double.parseDouble(predicte_class1));\n\t\t\t\tint index = classprobability.indexOf(Double.parseDouble(predicte_class1));\n\t\t\t\t// System.out.println(index);\n\t\t\t\tString predicte_class = Integer.toString(index + 1);\n\n\n\t\t\t\tconfusion_matrix[testKey - 1][index] += 1;\n\n\t\t\t\t// System.out.println(document.docId + \": G, \" + testKey + \"; P: \" + predicte_class);\n\t\t\t\tif (!predicte_class.equals(Integer.toString(testKey))) {\n\t\t\t\t\terror += 1;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize);\n\t\t}\n\n\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize + \" precision rate : \" + (1 - error/documentSize));\n\n\t\t// print confusion matrix\n\t\tprintConfusionMatrix(confusion_matrix);\n\t}", "public double getValue(Configuration conf) {\n \n int i, cont;\n Configuration confAux, confAux2;\n Vector vars;\n \n cont = 0;\n for (i=0 ; i< getNumberOfCases() ; i++) {\n confAux = get(i);\n vars = conf.getVariables();\n confAux2 = new Configuration(vars,confAux);\n if (confAux2.equals(conf))\n cont++;\n }\n \n return (double)cont;\n}", "int getPercentageHeated();", "public double compute(ClassifierSetPoint point) {\n return point.getThreshold();\n }", "protected double clusterProbability(Cluster cluster) {\n return clusterProbability(cluster.elements);\n }", "public double getHeuristicValue(Object state) {\n\n LinternaEstado estado = (LinternaEstado) state;\n\n double heuristica = 0.0;\n int[] actual = estado.getCalzada();\n int aux = 0;\n for (int i = 0; i < 5; i++) {\n if (actual[i] == 1)\n aux = aux + estado.getTiempo(i);\n }\n heuristica = (aux / actual[6]) * 100; //lo dejo sin multiplicar¿¿¿\n return heuristica;\n }", "ComparisionProbabilityValue (IExpressionValue arg0, IExpressionValue arg1, boolean isMax) {\r\n\t\t\tthis.arg0 = arg0;\r\n\t\t\tthis.arg1 = arg1;\r\n\t\t\tthis.isMax = isMax;\r\n\t\t\tthis.setFixedValue(arg0.isFixedValue()?arg1.isFixedValue():false);\r\n\t\t}", "@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}", "public double getActionProbability(final State state, final Action action) {\r\n return getProperties(state).getActionProbability(action);\r\n }", "void assertSelfCntPctEquals(T key, double expected);", "@Override\n public double calcTerm( Map<String, Object> param_map )\n {\n double result = 0.0;\n int cat = (Integer) param_map.get( name );\n\n if( value == cat )\n result = coefficient;\n\n LOG.debug( String.format( \"calc: %s, %d, %d, %e\", name, value, cat, result ) );\n\n return result;\n }", "public double getPercentThreshold()\n {\n return percentThreshold;\n }" ]
[ "0.7008502", "0.6304912", "0.62759376", "0.6249664", "0.62105983", "0.6209285", "0.61749446", "0.6027815", "0.60186154", "0.59934926", "0.5959477", "0.59542066", "0.5935759", "0.5926076", "0.5855525", "0.5846497", "0.58087", "0.5791518", "0.5662906", "0.565303", "0.564364", "0.5606754", "0.56011975", "0.55989414", "0.55919373", "0.5539635", "0.55169976", "0.55107415", "0.54896027", "0.5480523", "0.5462488", "0.5444307", "0.54106474", "0.5407977", "0.540569", "0.53997207", "0.53817505", "0.5356827", "0.534998", "0.53370696", "0.53286743", "0.53203315", "0.52973026", "0.5288295", "0.528319", "0.52723145", "0.5266552", "0.52650636", "0.5262958", "0.5258498", "0.52489424", "0.5248743", "0.5248098", "0.52355784", "0.52248293", "0.52234787", "0.51990265", "0.5198542", "0.5189495", "0.51814896", "0.5181211", "0.5178524", "0.51768786", "0.51696646", "0.51684767", "0.51649153", "0.5162831", "0.5161387", "0.51562583", "0.5145837", "0.5130843", "0.5120475", "0.5117244", "0.5109725", "0.5106987", "0.5105506", "0.5103558", "0.51006544", "0.50972277", "0.50946575", "0.50901026", "0.5087939", "0.5084346", "0.5084144", "0.50837433", "0.50834405", "0.5078705", "0.50753254", "0.5060736", "0.5060052", "0.5058085", "0.5053895", "0.5051973", "0.504808", "0.5045975", "0.50419915", "0.5037498", "0.503321", "0.50308734", "0.50286376" ]
0.74845296
0
Estimates the probability that a comparison between a numerical property value and a numerical constant holds
private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats, String property, Comparator comp, PropertyValue value) { long overallCount = 0L; for (TemporalElementStats stat : relevantStats) { overallCount += stat.getElementCount(); } double sum = 0.; for (TemporalElementStats stat : relevantStats) { sum += estimateNumericalPropertyProb(stat, property, comp, value) * (((double) stat.getElementCount() / overallCount)); } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "float getSpecialProb();", "private double estimateNumericalPropertyProb(TemporalElementStats stat, String property,\n Comparator comp, PropertyValue value) {\n // property not sampled or not considered\n if (!stat.getNumericalPropertyStatsEstimation().containsKey(property)) {\n // if property not excluded, return very small value\n // if excluded, it is irrelevant, return 0.5\n return isPropertyRelevant(property) ? 0.0001 : 0.5;\n }\n Double[] propertyStats = stat.getNumericalPropertyStatsEstimation().get(property);\n NormalDistribution dist = new NormalDistribution(propertyStats[0],\n Math.max(Math.sqrt(propertyStats[1]), VERY_LOW_PROB));\n double doubleValue = ((Number) value.getObject()).doubleValue();\n double occurenceProb = stat.getNumericalOccurrenceEstimation().get(property);\n if (comp == EQ) {\n return VERY_LOW_PROB * occurenceProb;\n } else if (comp == NEQ) {\n return (1. - VERY_LOW_PROB) * occurenceProb;\n } else if (comp == LTE) {\n return dist.cumulativeProbability(doubleValue) * occurenceProb;\n } else if (comp == LT) {\n return occurenceProb * (dist.cumulativeProbability(doubleValue) - VERY_LOW_PROB);\n } else if (comp == GTE) {\n return occurenceProb *\n (1. - dist.cumulativeProbability(doubleValue) + VERY_LOW_PROB);\n } else {\n //GT\n return occurenceProb * (1. - dist.cumulativeProbability(doubleValue));\n }\n }", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n if (comp != EQ && comp != NEQ) {\n return 0.;\n }\n long overallCount = 0L;\n boolean found = false;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n if (stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n found = true;\n }\n }\n // property not sampled or not considered\n if (!found) {\n // not relevant/considered => simply return 0.5\n if (!isPropertyRelevant(property)) {\n return 0.5;\n } else {\n // not sampled => very rare or not even there => return very small value\n return 0.0001;\n }\n }\n\n double prob = 0.;\n for (TemporalElementStats stat : relevantStats) {\n if (!stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n // not sampled ? ....\n double factor = 0.0001;\n // ...or just excluded/not relevant?\n if (!isPropertyRelevant(property)) {\n factor = 0.5;\n }\n prob += factor * ((double) stat.getElementCount() / overallCount);\n continue;\n }\n prob += stat.getCategoricalSelectivityEstimation()\n .get(property)\n .getOrDefault(value, 0.0001) *\n ((double) stat.getElementCount() / overallCount);\n }\n if (comp == EQ) {\n return prob;\n } else {\n //NEQ\n return 1 - prob;\n }\n }", "public void calculateProbabilities(){\n\t}", "float genChance();", "private double estimateCategoricalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Map<PropertyValue, Double>> map1 =\n stats1.getCategoricalSelectivityEstimation();\n Map<String, Map<PropertyValue, Double>> map2 =\n stats2.getCategoricalSelectivityEstimation();\n Map<PropertyValue, Double> propStats1 = map1.getOrDefault(property1, null);\n Map<PropertyValue, Double> propStats2 = map2.getOrDefault(property2, null);\n // property not sampled or not considered\n if (propStats1 == null || propStats2 == null) {\n // property not considered => return 0.5\n if (!isPropertyRelevant(property1) && !isPropertyRelevant(property2)) {\n return 0.5;\n } else {\n // property not sampled => very rare => return very small value\n return 0.0001;\n }\n }\n if (comp == EQ || comp == NEQ) {\n double sum = 0.;\n for (Map.Entry<PropertyValue, Double> entry1 : propStats1.entrySet()) {\n double val1Selectivity = entry1.getValue();\n for (Map.Entry<PropertyValue, Double> entry2 : propStats2.entrySet()) {\n if (entry1.getKey().equals(entry2.getKey())) {\n double val2Selectivity = entry2.getValue();\n sum += val1Selectivity * val2Selectivity;\n }\n }\n }\n return comp == EQ ? sum : 1. - sum;\n } else {\n // shouldn't happen, categorical variables can only be compared with EQ or NEQ\n return 0.;\n }\n }", "private double condProb(String stateGiven, String stateFind){\n HashMap probs = genAllProb(stateGiven);\n return (double) probs.get(stateFind);\n }", "int getLikelihoodValue();", "private double estimateNumericalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Double[]> map1 = stats1.getNumericalPropertyStatsEstimation();\n Map<String, Double[]> map2 = stats2.getNumericalPropertyStatsEstimation();\n Double[] propStats1 = map1.getOrDefault(property1, null);\n Double[] propStats2 = map2.getOrDefault(property2, null);\n if (propStats1 == null || propStats2 == null) {\n return 0.0001;\n }\n double occurrence = stats1.getNumericalOccurrenceEstimation()\n .getOrDefault(property1, 0.) *\n stats2.getNumericalOccurrenceEstimation().getOrDefault(property2, 0.);\n // assuming both properties are normally distributed,\n // their difference is also normally distributed\n NormalDistribution differenceDist = new NormalDistribution(\n propStats1[0] - propStats2[0],\n Math.max(Math.sqrt(propStats1[1] + propStats2[1]), VERY_LOW_PROB));\n\n if (comp == EQ) {\n return occurrence * differenceDist.density(0.);\n } else if (comp == NEQ) {\n return occurrence * (1. - differenceDist.density(0.));\n } else if (comp == LTE) {\n return occurrence * (differenceDist.cumulativeProbability(0.));\n } else if (comp == LT) {\n return occurrence * (differenceDist.cumulativeProbability(0.) -\n differenceDist.density(0.));\n } else if (comp == GTE) {\n return occurrence * (1. - differenceDist.cumulativeProbability(0.) +\n differenceDist.density(0.));\n } else {\n //GT\n return occurrence * (1. - differenceDist.cumulativeProbability(0.));\n }\n }", "private void evaluateProbabilities()\n\t{\n\t}", "public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}", "@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}", "public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}", "abstract double rightProbability();", "public double getProbability() {\n return probability;\n }", "double getCritChance();", "public float getChance()\n {\n return 1.0f;\n }", "private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}", "protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}", "double getBasedOnValue();", "private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp, List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateNumericalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "public double getProbability() {\r\n\t\treturn Probability;\r\n\t}", "public int getWorth() { return 1; }", "public double getProb(double value) {\n checkHasParams();\n if (value < 0) {\n return 0;\n } else {\n return (lambda * Math.exp((-lambda) * value));\n }\n }", "public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}", "SimpleProbabilityValue (float value) {\r\n\t\t\tthis.value = value;\r\n\t\t\tthis.setFixedValue(true);\r\n\t\t}", "abstract double leftProbability();", "int getPercentageHeated();", "double getMissChance();", "@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}", "public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }", "@Test\n\tpublic void priorsAreReasonable() {\n\t\tdouble tot = 0;\n\t\tboolean zeroPrior = false;\n\t\tfor(NewsGroup g: groups) {\n\t\t\tdouble p = g.getPrior();\n\t\t\ttot+=p;\n\t\t\tif(p == 0.0) {\n\t\t\t\tzeroPrior = true;\n\t\t\t}\n\t\t}\n\t\tassertTrue((tot == 1) && !zeroPrior);\n\t}", "double getExtremeSpikeProbability();", "void assertSelfCntPctEquals(T key, double expected);", "@Test\n public void testVar() {\n System.out.println(\"var\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(7/0.3, instance.var(), 1E-7);\n }", "double getBranchProbability();", "@Test\n public void testP() {\n System.out.println(\"p\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(0.027, instance.p(0), 1E-7);\n assertEquals(0.0567, instance.p(1), 1E-7);\n assertEquals(0.07938, instance.p(2), 1E-7);\n assertEquals(0.09261, instance.p(3), 1E-7);\n assertEquals(0.05033709, instance.p(10), 1E-7);\n }", "void assertTotalCntPctEquals(T key, double expected);", "int givePropScore(int propSize, int crownNum) throws Exception;", "double getPValue();", "public abstract float getProbability(String singleToken);", "public static void checkConsistency(){\n double[] aNormalW=new double[numberOfObjectives];\n double randomIndex=0;\n double sum=0;\n for (int row=0;row<numberOfObjectives;row++){\n for (int column=0;column<numberOfObjectives;column++){\n\n sum+=weights[column]*objectives[row][column];\n }\n df.setRoundingMode(RoundingMode.UP);\n aNormalW[row]= Double.valueOf(df.format(sum));\n sum=0;\n }\n double awtDividedByWt=0;\n for (int i=0;i<numberOfObjectives;i++){\n awtDividedByWt+=aNormalW[i]/weights[i];\n decimalFormat.setRoundingMode(RoundingMode.HALF_UP);\n Double.valueOf(decimalFormat.format(awtDividedByWt));\n }\n double reciprocalNumber=(double) 1/numberOfObjectives;\n decimalFormat.setRoundingMode(RoundingMode.UP);\n Double.valueOf(decimalFormat.format(reciprocalNumber));\n double step3=reciprocalNumber*awtDividedByWt;\n decimalFormat.setRoundingMode(RoundingMode.UP);\n double numerator=Double.valueOf(decimalFormat.format(step3))-numberOfObjectives;\n double denominator=numberOfObjectives-1;\n decimalFormat.setRoundingMode(RoundingMode.UP);\n double ci=Double.valueOf(decimalFormat.format(numerator)) /denominator;\n decimalFormat.setRoundingMode(RoundingMode.CEILING);\n System.out.println(\"Consistency Index (CI)= \"+Double.valueOf(decimalFormat.format(ci)));\n System.out.println();\n double ciDividedByRI=ci/table23(numberOfObjectives);\n decimalFormat.setRoundingMode(RoundingMode.UP);\n // Double.valueOf(df.format(ciDividedByRI));\n if (ciDividedByRI<0.10){\n randomIndex=ci/table23(numberOfObjectives);\n decimalFormat.setRoundingMode(RoundingMode.UP);\n System.out.println(\"Random Index (RI)= \"+Double.valueOf(decimalFormat.format(randomIndex)));\n System.out.println(\"degree of consistency is satisfactory !!\");\n }else {\n System.out.println(\"the AHP may not yield meaningful results !!\");\n }\n System.out.println();\n }", "public boolean isHappening(int probability){\n return r.nextDouble() <= probability / 100.0;\n }", "@Override\r\n\tpublic int computeNextVal(boolean prediction) {\n\t\treturn (int) (Math.random()*10)%3;\r\n\t}", "private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}", "ComparisionProbabilityValue (IExpressionValue arg0, IExpressionValue arg1, boolean isMax) {\r\n\t\t\tthis.arg0 = arg0;\r\n\t\t\tthis.arg1 = arg1;\r\n\t\t\tthis.isMax = isMax;\r\n\t\t\tthis.setFixedValue(arg0.isFixedValue()?arg1.isFixedValue():false);\r\n\t\t}", "public float evaluate(PhraseInfo p) {\n int numChords = p.gen.prog.get(p.gen.progIndex).size();\n int tn = Math.min(phraseLen, (int)Math.round(targetNotes * ((numChords + 1) / 3.0))); // not directly proportional.\n // scores: 50, 49, 46, 41, 34, 25 etc.\n int score = Math.max(0, 50 - (int)Math.round(Math.pow(Math.abs(p.noteCount - tn), 2)));\n return (float)Math.min(1.0f, score/50.0f);\n }", "public static void checkUpdateProbabilityOnAtomicRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 0; j < 8; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = base_relations[j];\r\n\t\t\t\r\n\t\t\t\tfor(int k = 0; k < 8; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = base_relations[k];\r\n\t\t\t\t\ttotal++;\r\n\t\t\t\t\t//int new_r3 = CompositionTable.LookUpTable(r1, r2);\r\n\t\t\t\t\tint new_r3 = SetOperators.intersection(r3, \r\n\t\t\t\t\t\t\t\tCompositionTable.LookUpTable(r1, r2));\r\n\t\t\t\t\t//System.out.println(new_r3);\r\n\t\t\t\t\tif( new_r3 != r3 )\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\tupdate++;\r\n\t\t\t\t\t\t//System.out.println(new_r3);\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\t\r\n\t\tSystem.out.println(\" total \" + total + \" update \" + update);\r\n\t\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "public Boolean IsNormally() {\n Random r = new Random();\n int k = r.nextInt(100);\n //5%\n if (k <= 5) {\n normally++;\n return true;\n }\n return false;\n }", "public double getSubjectiveValue(Apartment apart) {\n checkNotNull(apart);\n ImmutableMap<Criterion, Double> subjectiveValue =\n new ImmutableMap.Builder<Criterion, Double>()\n .put(\n Criterion.FLOOR_AREA,\n this.linearValueFunctions\n .get(Criterion.FLOOR_AREA)\n .getSubjectiveValue(apart.getFloorArea()))\n .put(\n Criterion.NB_BEDROOMS,\n this.linearValueFunctions\n .get(Criterion.NB_BEDROOMS)\n .getSubjectiveValue((double) apart.getNbBedrooms()))\n .put(\n Criterion.NB_SLEEPING,\n this.linearValueFunctions\n .get(Criterion.NB_SLEEPING)\n .getSubjectiveValue((double) apart.getNbSleeping()))\n .put(\n Criterion.NB_BATHROOMS,\n this.linearValueFunctions\n .get(Criterion.NB_BATHROOMS)\n .getSubjectiveValue((double) apart.getNbBathrooms()))\n .put(\n Criterion.TERRACE,\n this.booleanValueFunctions\n .get(Criterion.TERRACE)\n .getSubjectiveValue(apart.getTerrace()))\n .put(\n Criterion.FLOOR_AREA_TERRACE,\n this.linearValueFunctions\n .get(Criterion.FLOOR_AREA_TERRACE)\n .getSubjectiveValue(apart.getFloorAreaTerrace()))\n .put(\n Criterion.WIFI,\n this.booleanValueFunctions.get(Criterion.WIFI).getSubjectiveValue(apart.getWifi()))\n .put(\n Criterion.PRICE_PER_NIGHT,\n this.reversedValueFunctions\n .get(Criterion.PRICE_PER_NIGHT)\n .getSubjectiveValue(apart.getPricePerNight()))\n .put(\n Criterion.NB_MIN_NIGHT,\n this.reversedValueFunctions\n .get(Criterion.NB_MIN_NIGHT)\n .getSubjectiveValue((double) apart.getNbMinNight()))\n .put(\n Criterion.TELE,\n this.booleanValueFunctions.get(Criterion.TELE).getSubjectiveValue(apart.getTele()))\n .build();\n\n // Check that the subjective values ​​do have a value between 0 and 1\n subjectiveValue.forEach(\n (criterion, aDouble) -> {\n LOGGER.debug(\"The {} subjective value has been set to {}\", criterion.name(), aDouble);\n checkState(\n aDouble >= 0 && aDouble <= 1,\n \"The subjective value of \" + criterion.name() + \"must be between 0 and 1\");\n });\n\n double sum =\n Arrays.stream(Criterion.values())\n .map(c -> this.weight.get(c) * subjectiveValue.get(c))\n .reduce(0.0d, Double::sum);\n double division = this.weight.values().stream().reduce(0.0d, Double::sum);\n return sum / division;\n }", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }", "boolean hasPercentage();", "public static void checkUpdateProbabilityOnHORNRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 1; j < 255; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = j;\r\n\t\t\t\tif(!MTS.BIMTS_H8.contains((Integer)r2))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t/*if(r2 == 1 || r2 == 2 || r2 == 4 || r2 == 8 || r2 == 16 || r2 == 32 || r2 == 64 || r2 == 128)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\t*/\r\n\t\t\t\telse\r\n\t\t\t\tfor(int k = 1; k < 255; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = k;\r\n\t\t\t\t\t//if(r3 == 1 || r3 == 2 || r3 == 4 || r3 == 8 || r3 == 16 || r3 == 32 || r3 == 64 || r3 == 128)\r\n\t\t\t\t\t\tif(!MTS.BIMTS_H8.contains((Integer)r3))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\ttotal++;\r\n\t\t\t\t\t\tint new_r3 = CompositionTable.LookUpTable(r1, r2);\r\n\t\t\t\t\t\tif(new_r3 < r3)\r\n\t\t\t\t\t\t\tupdate++;\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\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "public float getSpecialProb() {\n return specialProb_;\n }", "public double calculateExpectedDisagreement();", "public float getPropertyPenalty() {\n return propertyPenalty;\n }", "protected abstract float _getGrowthChance();", "public BigDecimal getPercentageProfitPLimit();", "@Test\n public void genNeighStateProbability() {\n double[] metrics = new double[STATES.length * STATES.length];\n double sum = 0;\n Random rand = new Random();\n for (int i = 0; i < metrics.length; i++) {\n int x = i / STATES.length;\n int y = i % STATES.length;\n if (x == y) {\n metrics[i] = 0;\n } else {\n double d = Math.abs(rand.nextGaussian());//Math.exp(-Math.abs(STATES[x] - STATES[y]) / 3) * Math.abs(rand.nextGaussian());\n metrics[i] = d;\n sum += d;\n }\n }\n final double finalSum = sum;\n metrics = DoubleStream.of(metrics).map(d -> d / finalSum).toArray();\n for (int i = 0; i < metrics.length; i++) {\n int x = i / STATES.length;\n int y = i % STATES.length;\n if (metrics[i] > 0.01) {\n System.out.printf(\"%d:%d:%.4f\\n\", STATES[x], STATES[y], metrics[i]);\n }\n }\n }", "public void calculateCommission(){\r\n commission = (sales) * 0.15;\r\n //A sales Person makes 15% commission on sales\r\n }", "public double expectedFalsePositiveProbability() {\n\t\treturn Math.pow((1 - Math.exp(-k * (double) expectedElements\n\t\t\t\t/ (double) bitArraySize)), k);\n\t}", "public double getHeuristicValue(Object state) {\n\n LinternaEstado estado = (LinternaEstado) state;\n\n double heuristica = 0.0;\n int[] actual = estado.getCalzada();\n int aux = 0;\n for (int i = 0; i < 5; i++) {\n if (actual[i] == 1)\n aux = aux + estado.getTiempo(i);\n }\n heuristica = (aux / actual[6]) * 100; //lo dejo sin multiplicar¿¿¿\n return heuristica;\n }", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp,\n List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateCategoricalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "private double condProb(RelStruc A,Hashtable atomhasht,OneStrucData inst,long[] timers)\n\t\t\tthrows RBNCompatibilityException\n\t\t\t{\n\t\tdouble result = probform.evalSample(A,atomhasht,inst,timers);\n\t\t//System.out.print(\" cP: \" + result);\n\t\treturn result;\n\t\t\t}", "public void setProbability(double v) {\n probability = v;\n }", "@Test\n\tpublic void testPoisson() throws Exception {\n\t\tPoissonDistribution p = new PoissonDistributionImpl(1);\n\t\tRandom random = new Random();\n\t\tint[] counts = new int[500];\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\tcounts[p.inverseCumulativeProbability(random.nextDouble()) + 1]++;\n\t\t}\n\t\tdouble delta = 0.03;\n\t\tassertEquals(0.367879, counts[0] / 10000d, delta);\n\t\tassertEquals(0.367879, counts[1] / 10000d, delta);\n\t\tassertEquals(0.183940, counts[2] / 10000d, delta);\n\t\tassertEquals(0.061313, counts[3] / 10000d, delta);\n\t\tassertEquals(0.015328, counts[4] / 10000d, delta);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.0) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.1) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.2) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.3) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.4) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.5) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.6) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.7) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.8) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.9) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.95) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.975) + 1, 0);\n\t\tassertEquals(4, p.inverseCumulativeProbability(0.99) + 1, 0);\n\n\t\t// Poisson dist with t = 0.86\n\t\tp = new PoissonDistributionImpl(0.86);\n\t\tcounts = new int[500];\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\tcounts[p.inverseCumulativeProbability(random.nextDouble()) + 1]++;\n\t\t}\n\t\tdelta = 0.03;\n\t\tassertEquals(0.423162, counts[0] / 10000d, delta);\n\t\tassertEquals(0.363919, counts[1] / 10000d, delta);\n\t\tassertEquals(0.156485, counts[2] / 10000d, delta);\n\t\tassertEquals(0.044819, counts[3] / 10000d, delta);\n\t\tassertEquals(0.009645, counts[4] / 10000d, delta);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.0) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.1) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.2) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.3) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.4) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.5) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.6) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.7) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.8) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.9) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.95) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.975) + 1, 0);\n\t\tassertEquals(4, p.inverseCumulativeProbability(0.99) + 1, 0);\n\t}", "private void checkProbability(String mapName, WildEncounterInfo[] wildEncounters) {\n int totalProbability = 0;\n for (WildEncounterInfo wildEncounter : wildEncounters) {\n totalProbability += wildEncounter.getProbability();\n }\n\n Assert.assertEquals(mapName, 100, totalProbability);\n }", "public double getLogProb(double value) {\n checkHasParams();\n if (value < 0) {\n return Double.NEGATIVE_INFINITY;\n } else {\n return logLambda - lambda * value;\n }\n }", "public void cal_FireLoadRating(){\r\n\tFLOAD=1.75*Math.log10(TIMBER)+0.32*Math.log10(BUO)-1.640;\r\n\t//ensure that FLOAD is greater than 0, otherwise set it to 0;\r\n\tif (FLOAD<0){FLOAD=0;\r\n\t\t}else{FLOAD=Math.pow(10, FLOAD);\r\n\t}\r\n}", "Quantity getComparisonValue();", "double greenPercentage();", "double getTransProb();", "public double getProbability() {\n\t\treturn getD_errorProbability();\n\t}", "@Override\n\tpublic double getProbability(Robot robot) {\n\t\treturn 0;\n\t}", "private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}", "double getReliability();", "private int staticEval(Side p, Board b) {\n if (p.equals(Side.RED) && b.numOfSide(p) > C * Math.pow(b.size(), 2)) {\n return C0;\n } else if (p.equals(Side.BLUE)\n && b.numOfSide(p) > C * Math.pow(b.size(), 2)) {\n return C0;\n } else {\n return 0;\n }\n }", "public void setProbMut (float value) {\r\n mut_prob= value;\r\n }", "public float getSpecialProb() {\n return specialProb_;\n }", "private int getPoisson() {\n\t\treturn (int) (-INCOMING_MY * Math.log(Math.random()));\n\t}", "public float getProbMut () {\r\n return mut_prob;\r\n }", "public final double Probability(double val)\r\n\t{\r\n\t\tif (byKernels)\r\n\t\t{\r\n\t\t\treturn dEst.Probability(val);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn normalDist.pNorm(val, mean, sd);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void computeConstant() {\n\t\t\r\n\t}", "public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }", "@Override\r\n\tpublic double getProb(double price, double[] realized) {\r\n\t\treturn getPMF(realized)[ bin(price, precision) ];\r\n\t}", "@Test\n\tpublic void testSingleSetOnlyPositiveInteger()\n\t{\n\t\tcreateSingleValueSet(5);\n\t\tKeyedValues actual = DataUtilities.getCumulativePercentages(m_values);\n\t\t\n\t\tassertEquals(\"Cumulative percentage of a single positive integer should be 100%.\",\n\t\t\t\t1.0, actual.getValue(0).doubleValue(), 0.0000001);\n\t}", "private double getProbabilityScore(Cell c,int bitmask)\n {\n\t return Math.pow(\n\t\t\t Math.pow(m_probs1[c.getCol()-1],(1&bitmask) ) * \n\t\t\t Math.pow(m_probs2[c.getRow()-1],(2&bitmask)/2) //geo-mean\n\t\t\t , Math.min(1,3.5-bitmask));\n }", "public boolean setPropertyBalance(int aValue);", "public int getPropertyBalance();", "private double getMinInitProb(){\r\n\t\treturn probThreshold;\r\n\t}", "public double calcProbs(Entry newEntry) {\r\n\t\ttotal = Collections.frequency(hasCOVID19, \"yes\");\r\n\t\tpIfYes += Collections.frequency(temperatureIfCOVID19,newEntry.getTemperature()) / total;\r\n\t\tpIfYes *= Collections.frequency(achesIfCOVID19,newEntry.getAches()) / total;\r\n\t\tpIfYes *= Collections.frequency(coughIfCOVID19,newEntry.getCough()) / total;\r\n\t\tpIfYes *= Collections.frequency(soreThroatIfCOVID19,newEntry.getSoreThroat()) / total;\r\n\t\tpIfYes *= Collections.frequency(dangerZoneIfCOVID19,newEntry.getDangerZone()) / total;\r\n\t\tpIfYes *= (double) total / dataEntries.size();\r\n\t\t\r\n\t\ttotal = Collections.frequency(hasCOVID19, \"no\");\r\n\t\tpIfNo += (Collections.frequency(temperature,newEntry.getTemperature()) - Collections.frequency(temperatureIfCOVID19,newEntry.getTemperature())) / total;\r\n\t\tpIfNo *= (Collections.frequency(cough,newEntry.getCough()) - Collections.frequency(coughIfCOVID19,newEntry.getCough())) / total;\r\n\t\tpIfNo *= (Collections.frequency(aches,newEntry.getAches()) - Collections.frequency(achesIfCOVID19,newEntry.getAches())) /total;\r\n\t\tpIfNo *= (Collections.frequency(soreThroat,newEntry.getSoreThroat()) - Collections.frequency(soreThroatIfCOVID19,newEntry.getSoreThroat())) /total;\r\n\t\tpIfNo *= (Collections.frequency(dangerZone,newEntry.getDangerZone()) - Collections.frequency(dangerZoneIfCOVID19,newEntry.getDangerZone())) / total;\r\n\t\tpIfNo *= (double) total / dataEntries.size();\r\n\t\t\r\n\t\t//Getting the result as a percentage and returning it.\r\n\t\tprobability = (pIfYes / (pIfYes+pIfNo)) * 100;\r\n\t\treturn probability;\r\n\t}", "public BigDecimal getPercentageProfitPStd();", "public abstract double evaluate(double value);", "public double getProbabilityP() {\n return this.mProbabilityP;\n }", "public float getChance() {\n return chance;\n }", "org.hl7.fhir.Ratio getValueRatio();", "public TempTableProbabilityCell (Entity possibleValue , IExpressionValue probability) {\r\n\t\t\tthis.possibleValue = possibleValue;\r\n\t\t\tthis.probability = probability;\r\n\t\t}", "public abstract double getPriority();", "public double calculateSpecificity() {\n final long divisor = trueNegative + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return trueNegative / (double)divisor;\n }\n }" ]
[ "0.68849975", "0.68608713", "0.6840237", "0.6320506", "0.6299873", "0.62508506", "0.62238115", "0.62102956", "0.613504", "0.6094198", "0.608834", "0.6025691", "0.6017188", "0.6004745", "0.60025173", "0.59728223", "0.5936255", "0.59271145", "0.5926284", "0.585305", "0.582738", "0.58130354", "0.58013296", "0.579578", "0.57919496", "0.57901603", "0.5780513", "0.57517815", "0.5728552", "0.572014", "0.5720079", "0.5687126", "0.56759673", "0.56603247", "0.5653064", "0.5627491", "0.5624906", "0.5616364", "0.5588002", "0.5576018", "0.55670077", "0.55658334", "0.55604327", "0.55589604", "0.55575186", "0.55516034", "0.5544301", "0.5541781", "0.5532954", "0.5516603", "0.54996854", "0.54899913", "0.5489824", "0.5484218", "0.5481869", "0.5474606", "0.5467794", "0.54663813", "0.54644316", "0.5458696", "0.5457575", "0.5457086", "0.5449443", "0.5444606", "0.54420376", "0.54390013", "0.54377323", "0.5434084", "0.54324234", "0.543081", "0.542621", "0.54238445", "0.5417358", "0.5416909", "0.54104453", "0.5409163", "0.54005283", "0.53966856", "0.53873396", "0.53858656", "0.53834015", "0.53808445", "0.5380743", "0.5376412", "0.5367103", "0.53543174", "0.535378", "0.53500646", "0.53492975", "0.5347693", "0.53420603", "0.53413576", "0.5333671", "0.53320277", "0.5322573", "0.5317185", "0.5316496", "0.53047454", "0.5300758", "0.52997154" ]
0.6740829
3
Estimates the probability that a comparison between a numerical property value and a numerical constant holds for one type of element
private double estimateNumericalPropertyProb(TemporalElementStats stat, String property, Comparator comp, PropertyValue value) { // property not sampled or not considered if (!stat.getNumericalPropertyStatsEstimation().containsKey(property)) { // if property not excluded, return very small value // if excluded, it is irrelevant, return 0.5 return isPropertyRelevant(property) ? 0.0001 : 0.5; } Double[] propertyStats = stat.getNumericalPropertyStatsEstimation().get(property); NormalDistribution dist = new NormalDistribution(propertyStats[0], Math.max(Math.sqrt(propertyStats[1]), VERY_LOW_PROB)); double doubleValue = ((Number) value.getObject()).doubleValue(); double occurenceProb = stat.getNumericalOccurrenceEstimation().get(property); if (comp == EQ) { return VERY_LOW_PROB * occurenceProb; } else if (comp == NEQ) { return (1. - VERY_LOW_PROB) * occurenceProb; } else if (comp == LTE) { return dist.cumulativeProbability(doubleValue) * occurenceProb; } else if (comp == LT) { return occurenceProb * (dist.cumulativeProbability(doubleValue) - VERY_LOW_PROB); } else if (comp == GTE) { return occurenceProb * (1. - dist.cumulativeProbability(doubleValue) + VERY_LOW_PROB); } else { //GT return occurenceProb * (1. - dist.cumulativeProbability(doubleValue)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "float getSpecialProb();", "private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n long overallCount = 0L;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n }\n double sum = 0.;\n for (TemporalElementStats stat : relevantStats) {\n sum += estimateNumericalPropertyProb(stat, property, comp, value) *\n (((double) stat.getElementCount() / overallCount));\n }\n return sum;\n }", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n if (comp != EQ && comp != NEQ) {\n return 0.;\n }\n long overallCount = 0L;\n boolean found = false;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n if (stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n found = true;\n }\n }\n // property not sampled or not considered\n if (!found) {\n // not relevant/considered => simply return 0.5\n if (!isPropertyRelevant(property)) {\n return 0.5;\n } else {\n // not sampled => very rare or not even there => return very small value\n return 0.0001;\n }\n }\n\n double prob = 0.;\n for (TemporalElementStats stat : relevantStats) {\n if (!stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n // not sampled ? ....\n double factor = 0.0001;\n // ...or just excluded/not relevant?\n if (!isPropertyRelevant(property)) {\n factor = 0.5;\n }\n prob += factor * ((double) stat.getElementCount() / overallCount);\n continue;\n }\n prob += stat.getCategoricalSelectivityEstimation()\n .get(property)\n .getOrDefault(value, 0.0001) *\n ((double) stat.getElementCount() / overallCount);\n }\n if (comp == EQ) {\n return prob;\n } else {\n //NEQ\n return 1 - prob;\n }\n }", "public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}", "private double estimateCategoricalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Map<PropertyValue, Double>> map1 =\n stats1.getCategoricalSelectivityEstimation();\n Map<String, Map<PropertyValue, Double>> map2 =\n stats2.getCategoricalSelectivityEstimation();\n Map<PropertyValue, Double> propStats1 = map1.getOrDefault(property1, null);\n Map<PropertyValue, Double> propStats2 = map2.getOrDefault(property2, null);\n // property not sampled or not considered\n if (propStats1 == null || propStats2 == null) {\n // property not considered => return 0.5\n if (!isPropertyRelevant(property1) && !isPropertyRelevant(property2)) {\n return 0.5;\n } else {\n // property not sampled => very rare => return very small value\n return 0.0001;\n }\n }\n if (comp == EQ || comp == NEQ) {\n double sum = 0.;\n for (Map.Entry<PropertyValue, Double> entry1 : propStats1.entrySet()) {\n double val1Selectivity = entry1.getValue();\n for (Map.Entry<PropertyValue, Double> entry2 : propStats2.entrySet()) {\n if (entry1.getKey().equals(entry2.getKey())) {\n double val2Selectivity = entry2.getValue();\n sum += val1Selectivity * val2Selectivity;\n }\n }\n }\n return comp == EQ ? sum : 1. - sum;\n } else {\n // shouldn't happen, categorical variables can only be compared with EQ or NEQ\n return 0.;\n }\n }", "private double estimateNumericalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Double[]> map1 = stats1.getNumericalPropertyStatsEstimation();\n Map<String, Double[]> map2 = stats2.getNumericalPropertyStatsEstimation();\n Double[] propStats1 = map1.getOrDefault(property1, null);\n Double[] propStats2 = map2.getOrDefault(property2, null);\n if (propStats1 == null || propStats2 == null) {\n return 0.0001;\n }\n double occurrence = stats1.getNumericalOccurrenceEstimation()\n .getOrDefault(property1, 0.) *\n stats2.getNumericalOccurrenceEstimation().getOrDefault(property2, 0.);\n // assuming both properties are normally distributed,\n // their difference is also normally distributed\n NormalDistribution differenceDist = new NormalDistribution(\n propStats1[0] - propStats2[0],\n Math.max(Math.sqrt(propStats1[1] + propStats2[1]), VERY_LOW_PROB));\n\n if (comp == EQ) {\n return occurrence * differenceDist.density(0.);\n } else if (comp == NEQ) {\n return occurrence * (1. - differenceDist.density(0.));\n } else if (comp == LTE) {\n return occurrence * (differenceDist.cumulativeProbability(0.));\n } else if (comp == LT) {\n return occurrence * (differenceDist.cumulativeProbability(0.) -\n differenceDist.density(0.));\n } else if (comp == GTE) {\n return occurrence * (1. - differenceDist.cumulativeProbability(0.) +\n differenceDist.density(0.));\n } else {\n //GT\n return occurrence * (1. - differenceDist.cumulativeProbability(0.));\n }\n }", "int getLikelihoodValue();", "public void calculateProbabilities(){\n\t}", "float genChance();", "private void evaluateProbabilities()\n\t{\n\t}", "private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp, List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateNumericalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "abstract double rightProbability();", "public double getProbability() {\n return probability;\n }", "double getBasedOnValue();", "@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}", "public abstract float getProbability(String singleToken);", "public int getWorth() { return 1; }", "public double getProbability() {\r\n\t\treturn Probability;\r\n\t}", "void assertSelfCntPctEquals(T key, double expected);", "public float getChance()\n {\n return 1.0f;\n }", "public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}", "Quantity getComparisonValue();", "private double condProb(String stateGiven, String stateFind){\n HashMap probs = genAllProb(stateGiven);\n return (double) probs.get(stateFind);\n }", "public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }", "public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}", "public double getSubjectiveValue(Apartment apart) {\n checkNotNull(apart);\n ImmutableMap<Criterion, Double> subjectiveValue =\n new ImmutableMap.Builder<Criterion, Double>()\n .put(\n Criterion.FLOOR_AREA,\n this.linearValueFunctions\n .get(Criterion.FLOOR_AREA)\n .getSubjectiveValue(apart.getFloorArea()))\n .put(\n Criterion.NB_BEDROOMS,\n this.linearValueFunctions\n .get(Criterion.NB_BEDROOMS)\n .getSubjectiveValue((double) apart.getNbBedrooms()))\n .put(\n Criterion.NB_SLEEPING,\n this.linearValueFunctions\n .get(Criterion.NB_SLEEPING)\n .getSubjectiveValue((double) apart.getNbSleeping()))\n .put(\n Criterion.NB_BATHROOMS,\n this.linearValueFunctions\n .get(Criterion.NB_BATHROOMS)\n .getSubjectiveValue((double) apart.getNbBathrooms()))\n .put(\n Criterion.TERRACE,\n this.booleanValueFunctions\n .get(Criterion.TERRACE)\n .getSubjectiveValue(apart.getTerrace()))\n .put(\n Criterion.FLOOR_AREA_TERRACE,\n this.linearValueFunctions\n .get(Criterion.FLOOR_AREA_TERRACE)\n .getSubjectiveValue(apart.getFloorAreaTerrace()))\n .put(\n Criterion.WIFI,\n this.booleanValueFunctions.get(Criterion.WIFI).getSubjectiveValue(apart.getWifi()))\n .put(\n Criterion.PRICE_PER_NIGHT,\n this.reversedValueFunctions\n .get(Criterion.PRICE_PER_NIGHT)\n .getSubjectiveValue(apart.getPricePerNight()))\n .put(\n Criterion.NB_MIN_NIGHT,\n this.reversedValueFunctions\n .get(Criterion.NB_MIN_NIGHT)\n .getSubjectiveValue((double) apart.getNbMinNight()))\n .put(\n Criterion.TELE,\n this.booleanValueFunctions.get(Criterion.TELE).getSubjectiveValue(apart.getTele()))\n .build();\n\n // Check that the subjective values ​​do have a value between 0 and 1\n subjectiveValue.forEach(\n (criterion, aDouble) -> {\n LOGGER.debug(\"The {} subjective value has been set to {}\", criterion.name(), aDouble);\n checkState(\n aDouble >= 0 && aDouble <= 1,\n \"The subjective value of \" + criterion.name() + \"must be between 0 and 1\");\n });\n\n double sum =\n Arrays.stream(Criterion.values())\n .map(c -> this.weight.get(c) * subjectiveValue.get(c))\n .reduce(0.0d, Double::sum);\n double division = this.weight.values().stream().reduce(0.0d, Double::sum);\n return sum / division;\n }", "abstract double leftProbability();", "public abstract double getPriority();", "@Test\n\tpublic void priorsAreReasonable() {\n\t\tdouble tot = 0;\n\t\tboolean zeroPrior = false;\n\t\tfor(NewsGroup g: groups) {\n\t\t\tdouble p = g.getPrior();\n\t\t\ttot+=p;\n\t\t\tif(p == 0.0) {\n\t\t\t\tzeroPrior = true;\n\t\t\t}\n\t\t}\n\t\tassertTrue((tot == 1) && !zeroPrior);\n\t}", "SimpleProbabilityValue (float value) {\r\n\t\t\tthis.value = value;\r\n\t\t\tthis.setFixedValue(true);\r\n\t\t}", "private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}", "org.hl7.fhir.Ratio getValueRatio();", "public double expectedFalsePositiveProbability() {\n\t\treturn Math.pow((1 - Math.exp(-k * (double) expectedElements\n\t\t\t\t/ (double) bitArraySize)), k);\n\t}", "void assertTotalCntPctEquals(T key, double expected);", "public double calculateSpecificity() {\n final long divisor = trueNegative + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return trueNegative / (double)divisor;\n }\n }", "double getCritChance();", "@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp,\n List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateCategoricalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}", "public static void checkConsistency(){\n double[] aNormalW=new double[numberOfObjectives];\n double randomIndex=0;\n double sum=0;\n for (int row=0;row<numberOfObjectives;row++){\n for (int column=0;column<numberOfObjectives;column++){\n\n sum+=weights[column]*objectives[row][column];\n }\n df.setRoundingMode(RoundingMode.UP);\n aNormalW[row]= Double.valueOf(df.format(sum));\n sum=0;\n }\n double awtDividedByWt=0;\n for (int i=0;i<numberOfObjectives;i++){\n awtDividedByWt+=aNormalW[i]/weights[i];\n decimalFormat.setRoundingMode(RoundingMode.HALF_UP);\n Double.valueOf(decimalFormat.format(awtDividedByWt));\n }\n double reciprocalNumber=(double) 1/numberOfObjectives;\n decimalFormat.setRoundingMode(RoundingMode.UP);\n Double.valueOf(decimalFormat.format(reciprocalNumber));\n double step3=reciprocalNumber*awtDividedByWt;\n decimalFormat.setRoundingMode(RoundingMode.UP);\n double numerator=Double.valueOf(decimalFormat.format(step3))-numberOfObjectives;\n double denominator=numberOfObjectives-1;\n decimalFormat.setRoundingMode(RoundingMode.UP);\n double ci=Double.valueOf(decimalFormat.format(numerator)) /denominator;\n decimalFormat.setRoundingMode(RoundingMode.CEILING);\n System.out.println(\"Consistency Index (CI)= \"+Double.valueOf(decimalFormat.format(ci)));\n System.out.println();\n double ciDividedByRI=ci/table23(numberOfObjectives);\n decimalFormat.setRoundingMode(RoundingMode.UP);\n // Double.valueOf(df.format(ciDividedByRI));\n if (ciDividedByRI<0.10){\n randomIndex=ci/table23(numberOfObjectives);\n decimalFormat.setRoundingMode(RoundingMode.UP);\n System.out.println(\"Random Index (RI)= \"+Double.valueOf(decimalFormat.format(randomIndex)));\n System.out.println(\"degree of consistency is satisfactory !!\");\n }else {\n System.out.println(\"the AHP may not yield meaningful results !!\");\n }\n System.out.println();\n }", "int givePropScore(int propSize, int crownNum) throws Exception;", "@Test\n public void testWeightedConsistency() {\n\n // See if this statistic computes weighted statistics\n // If not, skip this test\n UnivariateStatistic statistic = getUnivariateStatistic();\n if (!(statistic instanceof WeightedEvaluation)) {\n return;\n }\n\n // Create arrays of values and corresponding integral weights\n // and longer array with values repeated according to the weights\n final int len = 10; // length of values array\n final double mu = 0; // mean of test data\n final double sigma = 5; // std dev of test data\n double[] values = new double[len];\n double[] weights = new double[len];\n\n // Fill weights array with random int values between 1 and 5\n int[] intWeights = new int[len];\n final DiscreteDistribution.Sampler weightDist =\n UniformDiscreteDistribution.of(1, 5).createSampler(RandomSource.WELL_512_A.create(234878544L));\n for (int i = 0; i < len; i++) {\n intWeights[i] = weightDist.sample();\n weights[i] = intWeights[i];\n }\n\n // Fill values array with random data from N(mu, sigma)\n // and fill valuesList with values from values array with\n // values[i] repeated weights[i] times, each i\n final ContinuousDistribution.Sampler valueDist =\n NormalDistribution.of(mu, sigma).createSampler(RandomSource.WELL_512_A.create(64925784252L));\n List<Double> valuesList = new ArrayList<>();\n for (int i = 0; i < len; i++) {\n double value = valueDist.sample();\n values[i] = value;\n for (int j = 0; j < intWeights[i]; j++) {\n valuesList.add(Double.valueOf(value));\n }\n }\n\n // Dump valuesList into repeatedValues array\n int sumWeights = valuesList.size();\n double[] repeatedValues = new double[sumWeights];\n for (int i = 0; i < sumWeights; i++) {\n repeatedValues[i] = valuesList.get(i);\n }\n\n // Compare result of weighted statistic computation with direct computation\n // on array of repeated values\n WeightedEvaluation weightedStatistic = (WeightedEvaluation) statistic;\n TestUtils.assertRelativelyEquals(statistic.evaluate(repeatedValues),\n weightedStatistic.evaluate(values, weights, 0, values.length),\n 10E-12);\n\n // Check consistency of weighted evaluation methods\n Assert.assertEquals(weightedStatistic.evaluate(values, weights, 0, values.length),\n weightedStatistic.evaluate(values, weights), Double.MIN_VALUE);\n }", "double getPValue();", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "public static void checkUpdateProbabilityOnAtomicRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 0; j < 8; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = base_relations[j];\r\n\t\t\t\r\n\t\t\t\tfor(int k = 0; k < 8; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = base_relations[k];\r\n\t\t\t\t\ttotal++;\r\n\t\t\t\t\t//int new_r3 = CompositionTable.LookUpTable(r1, r2);\r\n\t\t\t\t\tint new_r3 = SetOperators.intersection(r3, \r\n\t\t\t\t\t\t\t\tCompositionTable.LookUpTable(r1, r2));\r\n\t\t\t\t\t//System.out.println(new_r3);\r\n\t\t\t\t\tif( new_r3 != r3 )\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\tupdate++;\r\n\t\t\t\t\t\t//System.out.println(new_r3);\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\t\r\n\t\tSystem.out.println(\" total \" + total + \" update \" + update);\r\n\t\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "double getMissChance();", "private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}", "private double estimateTemporalProb(ElementType type1, TimeSelector.TimeField field1,\n Comparator comp, Long value) {\n double sum = 0.;\n Map<String, TemporalElementStats> stats = type1 == ElementType.VERTEX ?\n vertexStats : edgeStats;\n\n Long overallCount = type1 == ElementType.VERTEX ? vertexCount : edgeCount;\n for (TemporalElementStats elementStat : stats.values()) {\n Binning bins = getBins(elementStat, field1);\n sum += estimateFromBins(bins, comp, value) *\n (elementStat.getElementCount() / (double) overallCount);\n }\n return sum;\n }", "int getPercentageHeated();", "double getExtremeSpikeProbability();", "public TempTableProbabilityCell (Entity possibleValue , IExpressionValue probability) {\r\n\t\t\tthis.possibleValue = possibleValue;\r\n\t\t\tthis.probability = probability;\r\n\t\t}", "private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}", "public void test_lt_01() {\n OntModel m = ModelFactory.createOntologyModel();\n \n DatatypeProperty p = m.createDatatypeProperty(NS + \"p\");\n OntClass c = m.createClass(NS + \"A\");\n \n Individual i = m.createIndividual(NS + \"i\", c);\n i.addProperty(p, \"testData\");\n \n int count = 0;\n \n for (Iterator j = i.listPropertyValues(p); j.hasNext();) {\n //System.err.println(\"Individual i has p value: \" + j.next());\n j.next();\n count++;\n }\n \n assertEquals(\"i should have one property\", 1, count);\n }", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }", "public float getSpecialProb() {\n return specialProb_;\n }", "protected abstract float _getGrowthChance();", "public static void checkUpdateProbabilityOnHORNRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 1; j < 255; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = j;\r\n\t\t\t\tif(!MTS.BIMTS_H8.contains((Integer)r2))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t/*if(r2 == 1 || r2 == 2 || r2 == 4 || r2 == 8 || r2 == 16 || r2 == 32 || r2 == 64 || r2 == 128)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\t*/\r\n\t\t\t\telse\r\n\t\t\t\tfor(int k = 1; k < 255; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = k;\r\n\t\t\t\t\t//if(r3 == 1 || r3 == 2 || r3 == 4 || r3 == 8 || r3 == 16 || r3 == 32 || r3 == 64 || r3 == 128)\r\n\t\t\t\t\t\tif(!MTS.BIMTS_H8.contains((Integer)r3))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\ttotal++;\r\n\t\t\t\t\t\tint new_r3 = CompositionTable.LookUpTable(r1, r2);\r\n\t\t\t\t\t\tif(new_r3 < r3)\r\n\t\t\t\t\t\t\tupdate++;\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\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "public double getProb(double value) {\n checkHasParams();\n if (value < 0) {\n return 0;\n } else {\n return (lambda * Math.exp((-lambda) * value));\n }\n }", "private int getPercentageValue(String elem){\n String query = \"declare namespace a='http://schemas.openxmlformats.org/drawingml/2006/main' $this//a:\" + elem;\n\n XmlObject[] obj;\n\n // first ask the context color and if not found, ask the actual color bean\n if(_phClr != null){\n obj = _phClr.selectPath(query);\n if(obj.length == 1){\n Node attr = obj[0].getDomNode().getAttributes().getNamedItem(\"val\");\n if(attr != null) {\n return Integer.parseInt(attr.getNodeValue()) / 1000;\n }\n }\n }\n\n obj = _xmlObject.selectPath(query);\n if(obj.length == 1){\n Node attr = obj[0].getDomNode().getAttributes().getNamedItem(\"val\");\n if(attr != null) {\n return Integer.parseInt(attr.getNodeValue()) / 1000;\n }\n }\n\n\n return -1;\n }", "private double getAttributeProbability(String attribute, int attributeIndex) {\n\t\tDouble value; // store value of raw data\n\t\tif (attribute.chars().allMatch(Character::isDigit) || attribute.contains(\".\")) {\n\t\t\tvalue = Double.valueOf(attribute);\n\t\t} else {\n\t\t\tvalue = (double) attribute.hashCode();\n\t\t} // end if-else\n\n\n\t\tdouble totalSelectedAttribute = 0;\n\t\tfor (Bin bin : attribBins.get(attributeIndex)) {\n\t\t\tif (bin.binContains(value)) {\n\t\t\t\ttotalSelectedAttribute = bin.getFreq();\n\t\t\t\tbreak;\n\t\t\t} // end if\n\t\t} // end for\n\n\t\tint totalAttributes = 0;\n\t\tfor (int i = 0; i < dc.getDataFold().size(); i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\ttotalAttributes += dc.getDataFold().get(i).size();\n\t\t\t} // end if-else\n\t\t} // end for\n\t\treturn totalSelectedAttribute / totalAttributes;\n\t}", "@Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }", "@Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }", "double getBranchProbability();", "public int compareTo(DerivationElement o) {\n\t\treturn (this.logProb>o.logProb)? -1 : (this.logProb==o.logProb)? 0 : 1; \n\t }", "@Override\r\n\tpublic void computeConstant() {\n\t\t\r\n\t}", "@Test\n\tpublic void testSingleSetOnlyPositiveInteger()\n\t{\n\t\tcreateSingleValueSet(5);\n\t\tKeyedValues actual = DataUtilities.getCumulativePercentages(m_values);\n\t\t\n\t\tassertEquals(\"Cumulative percentage of a single positive integer should be 100%.\",\n\t\t\t\t1.0, actual.getValue(0).doubleValue(), 0.0000001);\n\t}", "@Override\n public double proposal() {\n Tree tree = treeInput.get();\n\n Node node;\n if (useNodeNumbers) {\n int leafNodeCount = tree.getLeafNodeCount();\n int i = Randomizer.nextInt(leafNodeCount);\n node = tree.getNode(i);\n } else {\n int i = Randomizer.nextInt(taxonIndices.length);\n node = tree.getNode(taxonIndices[i]);\n }\n\n double value = node.getHeight();\n\n if (value == 0.0) {\n return Double.NEGATIVE_INFINITY;\n }\n double newValue = value;\n\n boolean drawFromDistribution = samplingDateTaxonNames.contains(node.getID());\n if (drawFromDistribution) {\n SamplingDate taxonSamplingDate = samplingDatesInput.get().get(samplingDateTaxonNames.indexOf(node.getID()));\n double range = taxonSamplingDate.getUpper() - taxonSamplingDate.getLower();\n newValue = taxonSamplingDate.getLower() + Randomizer.nextDouble() * range;\n } else {\n if (useGaussian) {\n newValue += Randomizer.nextGaussian() * windowSize;\n } else {\n newValue += Randomizer.nextDouble() * 2 * windowSize - windowSize;\n }\n }\n\n\n Node fake = null;\n double lower, upper;\n\n if (((ZeroBranchSANode)node).isDirectAncestor()) {\n fake = node.getParent();\n lower = getOtherChild(fake, node).getHeight();\n if (fake.getParent() != null) {\n upper = fake.getParent().getHeight();\n } else upper = Double.POSITIVE_INFINITY;\n } else {\n //lower = Double.NEGATIVE_INFINITY;\n lower = 0.0;\n upper = node.getParent().getHeight();\n }\n\n if (newValue < lower || newValue > upper) {\n return Double.NEGATIVE_INFINITY;\n }\n\n if (newValue == value) {\n // this saves calculating the posterior\n return Double.NEGATIVE_INFINITY;\n }\n\n if (fake != null) {\n fake.setHeight(newValue);\n }\n node.setHeight(newValue);\n\n if (newValue < 0) {\n for (int i=0; i<tree.getNodeCount(); i++){\n double oldHeight = tree.getNode(i).getHeight();\n tree.getNode(i).setHeight(oldHeight-newValue);\n }\n } else {\n boolean dateShiftDown = true;\n for (int i=0; i< tree.getLeafNodeCount(); i++){\n if (tree.getNode(i).getHeight() == 0){\n dateShiftDown = false;\n break;\n }\n }\n if (dateShiftDown) {\n ArrayList<Double> tipNodeHeights= new ArrayList<Double>();\n for (int i=0; i<tree.getLeafNodeCount(); i++){\n tipNodeHeights.add(tree.getNode(i).getHeight());\n }\n Collections.sort(tipNodeHeights);\n double shiftDown = tipNodeHeights.get(0);\n for (int i=0; i<tree.getNodeCount(); i++){\n double oldHeight = tree.getNode(i).getHeight();\n tree.getNode(i).setHeight(oldHeight-shiftDown);\n }\n }\n }\n\n boolean check = true;\n for (int i=0; i<tree.getNodeCount(); i++){\n if (tree.getNode(i).getHeight() < 0) {\n System.out.println(\"Negative height found\");\n System.exit(0);\n }\n if (tree.getNode(i).getHeight() == 0) {\n check = false;\n }\n }\n if (check) {\n System.out.println(\"There is no 0 height node\");\n System.exit(0);\n }\n\n //tree.setEverythingDirty(true);\n\n return 0.0;\n }", "@Override\r\n\tpublic int computeNextVal(boolean prediction) {\n\t\treturn (int) (Math.random()*10)%3;\r\n\t}", "@Test\n public void testP() {\n System.out.println(\"p\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(0.027, instance.p(0), 1E-7);\n assertEquals(0.0567, instance.p(1), 1E-7);\n assertEquals(0.07938, instance.p(2), 1E-7);\n assertEquals(0.09261, instance.p(3), 1E-7);\n assertEquals(0.05033709, instance.p(10), 1E-7);\n }", "public float getSpecialProb() {\n return specialProb_;\n }", "private double condProb(RelStruc A,Hashtable atomhasht,OneStrucData inst,long[] timers)\n\t\t\tthrows RBNCompatibilityException\n\t\t\t{\n\t\tdouble result = probform.evalSample(A,atomhasht,inst,timers);\n\t\t//System.out.print(\" cP: \" + result);\n\t\treturn result;\n\t\t\t}", "@Test\n public void testVar() {\n System.out.println(\"var\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(7/0.3, instance.var(), 1E-7);\n }", "private boolean isApproximatelyEqual(Node n, Node first) {\r\n\t\tDouble nwD = n.getWeightValueUnsynchronized(\"value\");\r\n\t\tdouble nw = nwD==null ? 1.0 : nwD.doubleValue();\r\n\t\tDouble fwD = first.getWeightValueUnsynchronized(\"value\");\r\n\t\tdouble fw = fwD==null ? 1.0 : fwD.doubleValue();\r\n\t\treturn fw*_alphaFactor <= nw &&\r\n\t\t\t first.getNborsUnsynchronized().size()*_alphaFactor >= \r\n\t\t\t n.getNborsUnsynchronized().size();\r\n\t}", "ComparisionProbabilityValue (IExpressionValue arg0, IExpressionValue arg1, boolean isMax) {\r\n\t\t\tthis.arg0 = arg0;\r\n\t\t\tthis.arg1 = arg1;\r\n\t\t\tthis.isMax = isMax;\r\n\t\t\tthis.setFixedValue(arg0.isFixedValue()?arg1.isFixedValue():false);\r\n\t\t}", "boolean hasPercentage();", "public abstract float getProbability(String[] tokens);", "void assertSelfTimePctEquals(T key, double expected);", "@Override\r\n\tpublic double getProb(double price, double[] realized) {\r\n\t\treturn getPMF(realized)[ bin(price, precision) ];\r\n\t}", "double getReliability();", "@Test\n public void testExactness() {\n assertMetrics(\"exactness:1\", \"a b c\",\"a x b x x c\");\n assertMetrics(\"exactness:0.9\", \"a b c\",\"a x b:0.7 x x c\");\n assertMetrics(\"exactness:0.7\", \"a b c\",\"a x b:0.6 x x c:0.5\");\n assertMetrics(\"exactness:0.775\", \"a!200 b c\",\"a x b:0.6 x x c:0.5\");\n assertMetrics(\"exactness:0.65\", \"a b c!200\",\"a x b:0.6 x x c:0.5\");\n }", "@Test\n public void testSignificance() {\n assertMetrics(\"significance:1\", \"a\",\"a\");\n assertMetrics(\"significance:0\", \"a\",\"x\");\n assertMetrics(\"significance:0.3333\",\"a a a\",\"a\");\n assertMetrics(\"significance:1\", \"a\",\"a a a\");\n assertMetrics(\"significance:1\", \"a b c\",\"a b c\");\n assertMetrics(\"significance:1\", \"a b c\",\"x x a b x a x c x x a b x c c x\");\n\n assertMetrics(\"significance:0.3333\",\"a b c\",\"a\");\n assertMetrics(\"significance:0.6667\",\"a b c\",\"a b\");\n\n assertMetrics(\"significance:1\", \"a b c%0.2\",\"a b c\"); // Best\n assertMetrics(\"significance:0.75\",\"a b c%0.2\",\"b c\"); // Middle\n assertMetrics(\"significance:0.5\", \"a b c%0.2\",\"a b\"); // Worst\n\n assertMetrics(\"significance:1\",\"a%0.3 b c%0.2\",\"a b c\"); // Best too\n\n assertMetrics(\"significance:1\", \"a b c%0.05\",\"a b c\"); // Best\n assertMetrics(\"significance:0.6\",\"a b c%0.05\",\"b c\"); // Worse\n assertMetrics(\"significance:0.4\",\"a b c%0.05\",\"b\"); // Worse\n assertMetrics(\"significance:0.2\",\"a b c%0.05\",\"c\"); // Worst\n assertMetrics(\"significance:0.8\",\"a b c%0.05\",\"a b\"); // Middle\n\n assertMetrics(\"significance:1\", \"a b c%0\",\"a b c\"); // Best\n assertMetrics(\"significance:0.5\",\"a b c%0\",\"b c\"); // Worst\n assertMetrics(\"significance:1\", \"a b c%0\",\"a b\"); // As good as best\n assertMetrics(\"significance:0\", \"a b c%0\",\"c\"); // No contribution\n\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"a b\");\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"\");\n\n // The query also has other terms having a total significance of 0.3\n // so we add a significance parameter which is the sum of the significances of this query terms + 0.3\n assertMetrics(\"significance:0.25\", \"a\",\"a\",0.4f);\n assertMetrics(\"significance:0\", \"y\",\"a\",0.4f);\n assertMetrics(\"significance:0.1667\",\"a a a\",\"a\",0.6f);\n assertMetrics(\"significance:0.25\", \"a\",\"a a a\",0.4f);\n assertMetrics(\"significance:0.5\", \"a b c\",\"a b c\",0.6f);\n assertMetrics(\"significance:0.5\", \"a b c\",\"x x a b x a x c x x a b x c c x\",0.6f);\n\n assertMetrics(\"significance:0.1667\",\"a b c\",\"a\",0.6f);\n assertMetrics(\"significance:0.3333\",\"a b c\",\"a b\",0.6f);\n\n assertMetrics(\"significance:0.5714\",\"a b c%0.2\",\"a b c\",0.7f); // Best\n assertMetrics(\"significance:0.4286\",\"a b c%0.2\",\"b c\",0.7f); // Middle\n assertMetrics(\"significance:0.2857\",\"a b c%0.2\",\"a b\",0.7f); // Worst\n\n assertMetrics(\"significance:0.6667\",\"a%0.3 b c%0.2\",\"a b c\",0.9f); // Better than best\n\n assertMetrics(\"significance:0.4545\",\"a b c%0.05\",\"a b c\",0.55f); // Best\n assertMetrics(\"significance:0.2727\",\"a b c%0.05\",\"b c\",0.55f); // Worse\n assertMetrics(\"significance:0.1818\",\"a b c%0.05\",\"b\",0.55f); // Worse\n assertMetrics(\"significance:0.0909\",\"a b c%0.05\",\"c\",0.55f); // Worst\n assertMetrics(\"significance:0.3636\",\"a b c%0.05\",\"a b\",0.55f); // Middle\n\n assertMetrics(\"significance:0.4\",\"a b c%0\",\"a b c\",0.5f); // Best\n assertMetrics(\"significance:0.2\",\"a b c%0\",\"b c\",0.5f); // Worst\n assertMetrics(\"significance:0.4\",\"a b c%0\",\"a b\",0.5f); // As good as best\n assertMetrics(\"significance:0\", \"a b c%0\",\"c\",0.5f); // No contribution\n\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"a b\",0.3f);\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"\",0.3f);\n }", "@Override\n\tpublic int evaluate(Map<ResourceType, Integer> requirements) {\n\t\treturn this.constant;\n\t}", "public static void checkUpdateProbabilityOnALLRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 1; j < 255; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = j;\r\n\t\t\t\t/*if(r2 == 1 || r2 == 2 || r2 == 4 || r2 == 8 || r2 == 16 || r2 == 32 || r2 == 64 || r2 == 128)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\telse*/\r\n\t\t\t\tfor(int k = 1; k < 255; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = k;\r\n\t\t\t\t\t/*if(r3 == 1 || r3 == 2 || r3 == 4 || r3 == 8 || r3 == 16 || r3 == 32 || r3 == 64 || r3 == 128)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse*/\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\ttotal++;\r\n\t\t\t\t\t\tint new_r3 = SetOperators.intersection(r3, \r\n\t\t\t\t\t\t\t\tCompositionTable.LookUpTable(r1, r2));\r\n\t\t\t\t\t\tif(new_r3 != r3 && new_r3 != 0)\r\n\t\t\t\t\t\t\tupdate++;\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\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "private boolean isApproximatelyEqualWeight(Node n, Node first) {\r\n\t\tDouble nwD = n.getWeightValueUnsynchronized(\"value\");\r\n\t\tdouble nw = nwD==null ? 1.0 : nwD.doubleValue();\r\n\t\tDouble fwD = first.getWeightValueUnsynchronized(\"value\");\r\n\t\tdouble fw = fwD==null ? 1.0 : fwD.doubleValue();\r\n\t\treturn fw*_alphaFactor <= nw;\r\n\t}", "private double evaluateFaultCovFitness(String phenotype) {\n int faults = 38; // Again, should be injected\n boolean[] faultsHit = new boolean[faults];\n for (int i = 0; i < faults; i++)\n faultsHit[i] = false;\n for (int i = 0; i < phenotype.length(); i++) {\n if (phenotype.charAt(i) == '1') {\n// mark the faults found by the test\n for (int j = 0; j < faults; j++) {\n if (faultMatrix[i][j] == 1)\n faultsHit[j] = true;\n }\n }\n }\n// total collection of faults found\n int count = 0;\n for (int i = 0; i < faults; i++) {\n if (faultsHit[i])\n count++;\n }\n return count;\n }", "@Override\n public int compareTo(UnconstrainedBidElement o) {\n return Double.compare(o.demandWatt, demandWatt);\n }", "private void checkProbability(String mapName, WildEncounterInfo[] wildEncounters) {\n int totalProbability = 0;\n for (WildEncounterInfo wildEncounter : wildEncounters) {\n totalProbability += wildEncounter.getProbability();\n }\n\n Assert.assertEquals(mapName, 100, totalProbability);\n }", "double getTransProb();", "public double getProbabilityP() {\n return this.mProbabilityP;\n }", "public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}", "@Override\n\tpublic double getProbability(Robot robot) {\n\t\treturn 0;\n\t}", "double getValue();", "double getValue();", "double getValue();", "public ProbabilityDistribution() {\n\t\trandom_ = new Random();\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}", "Num\t\tgetNumValue();", "private int staticEval(Side p, Board b) {\n if (p.equals(Side.RED) && b.numOfSide(p) > C * Math.pow(b.size(), 2)) {\n return C0;\n } else if (p.equals(Side.BLUE)\n && b.numOfSide(p) > C * Math.pow(b.size(), 2)) {\n return C0;\n } else {\n return 0;\n }\n }", "public float getProbMut () {\r\n return mut_prob;\r\n }", "private double moyenne(Hashtable<Integer, Double> h){\n\t\tEnumeration<Integer> e = h.keys();\n\t\tdouble res = 0 ;\n\t\t// On somme l'ensemble des distances entre cette tables et les tables occuppées, on divise ensuite.\n\t\twhile(e.hasMoreElements()){ res += h.get(e.nextElement()) ; }\n\t\tres /= h.size() ;\n\t\treturn res ;\n\t}", "public double purity(Iterable<Instance> set) {\n\t\tint size = 0;\n\t\tSet<Instance> successNodes = new HashSet<Instance>();\n\t\tSet<Instance> failureNodes = new HashSet<Instance>();\n\t\tfor (Instance i : set) {\n\t\t\tif (i.getCategory() == 0) {\n\t\t\t\tsuccessNodes.add(i);\n\t\t\t} else {\n\t\t\t\tfailureNodes.add(i);\n\t\t\t}\n\t\t\tsize++;\n\t\t}\n\t\tif (successNodes.size() == 0 || failureNodes.size() == 0) {\n\t\t\treturn 1;\n\t\t}\n\t\tdouble papb =\n\t\t\t\t((double)successNodes.size() / (double)size)\n\t\t\t\t* ((double)failureNodes.size() / (double)size);\n\t\treturn papb;\n\t}" ]
[ "0.67362046", "0.66729504", "0.6648027", "0.6189943", "0.61638343", "0.6156395", "0.6113725", "0.609256", "0.5961919", "0.58877575", "0.58455175", "0.5843957", "0.583769", "0.58294207", "0.57533115", "0.57253623", "0.5704991", "0.56814754", "0.56760967", "0.56721354", "0.5645837", "0.5645292", "0.5629598", "0.55929554", "0.5563302", "0.55603653", "0.55475104", "0.5546863", "0.5540979", "0.5525178", "0.55241615", "0.55203503", "0.5497754", "0.5497471", "0.54973567", "0.5493609", "0.5485464", "0.5474894", "0.5465746", "0.54434437", "0.54377943", "0.54296935", "0.54286706", "0.5423669", "0.5414442", "0.5405793", "0.540011", "0.5390799", "0.5383435", "0.53812045", "0.5357135", "0.53351045", "0.5322445", "0.53153795", "0.5304143", "0.5298395", "0.52850395", "0.52839106", "0.527753", "0.5260586", "0.5254239", "0.5254239", "0.5252009", "0.5249564", "0.5237418", "0.52295846", "0.5220565", "0.5220521", "0.52196676", "0.5212961", "0.5211241", "0.5205339", "0.5198437", "0.5193731", "0.5185576", "0.5182062", "0.51806766", "0.518056", "0.51786876", "0.5177983", "0.5175346", "0.5173633", "0.51641303", "0.51557535", "0.51514024", "0.5149797", "0.5149065", "0.5148129", "0.51471895", "0.51467496", "0.5145781", "0.5145198", "0.5145198", "0.5145198", "0.5138426", "0.5132235", "0.51293916", "0.51254314", "0.51224923", "0.5117778" ]
0.66765606
1
Estimates probability of a comparison for elements without label (i.e. probability is determined over all vertices/edges)
private double estimateTemporalProb(ElementType type1, TimeSelector.TimeField field1, Comparator comp, Long value) { double sum = 0.; Map<String, TemporalElementStats> stats = type1 == ElementType.VERTEX ? vertexStats : edgeStats; Long overallCount = type1 == ElementType.VERTEX ? vertexCount : edgeCount; for (TemporalElementStats elementStat : stats.values()) { Binning bins = getBins(elementStat, field1); sum += estimateFromBins(bins, comp, value) * (elementStat.getElementCount() / (double) overallCount); } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "float getSpecialProb();", "public void calculateProbabilities(){\n\t}", "private double p_l(Label label) {\n\t\t// TODO : Implement\n\t\t// Calculate the probability for the label. No smoothing here.\n\t\t// Just the number of label counts divided by the number of documents.\n\t\tint total = docCount.get(Label.POSITIVE)+docCount.get(Label.NEGATIVE);\n\t\t\n\t\t\n\t\tif(label.equals(Label.POSITIVE))\n\t\t\treturn ((double)(docCount.get(Label.POSITIVE)))/((double)(total));\n\t\telse\n\t\t\treturn ((double)(docCount.get(Label.NEGATIVE)))/((double)(total));\n\t}", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n if (comp != EQ && comp != NEQ) {\n return 0.;\n }\n long overallCount = 0L;\n boolean found = false;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n if (stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n found = true;\n }\n }\n // property not sampled or not considered\n if (!found) {\n // not relevant/considered => simply return 0.5\n if (!isPropertyRelevant(property)) {\n return 0.5;\n } else {\n // not sampled => very rare or not even there => return very small value\n return 0.0001;\n }\n }\n\n double prob = 0.;\n for (TemporalElementStats stat : relevantStats) {\n if (!stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n // not sampled ? ....\n double factor = 0.0001;\n // ...or just excluded/not relevant?\n if (!isPropertyRelevant(property)) {\n factor = 0.5;\n }\n prob += factor * ((double) stat.getElementCount() / overallCount);\n continue;\n }\n prob += stat.getCategoricalSelectivityEstimation()\n .get(property)\n .getOrDefault(value, 0.0001) *\n ((double) stat.getElementCount() / overallCount);\n }\n if (comp == EQ) {\n return prob;\n } else {\n //NEQ\n return 1 - prob;\n }\n }", "double getBranchProbability();", "public static void checkUpdateProbabilityOnALLRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 1; j < 255; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = j;\r\n\t\t\t\t/*if(r2 == 1 || r2 == 2 || r2 == 4 || r2 == 8 || r2 == 16 || r2 == 32 || r2 == 64 || r2 == 128)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\telse*/\r\n\t\t\t\tfor(int k = 1; k < 255; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = k;\r\n\t\t\t\t\t/*if(r3 == 1 || r3 == 2 || r3 == 4 || r3 == 8 || r3 == 16 || r3 == 32 || r3 == 64 || r3 == 128)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse*/\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\ttotal++;\r\n\t\t\t\t\t\tint new_r3 = SetOperators.intersection(r3, \r\n\t\t\t\t\t\t\t\tCompositionTable.LookUpTable(r1, r2));\r\n\t\t\t\t\t\tif(new_r3 != r3 && new_r3 != 0)\r\n\t\t\t\t\t\t\tupdate++;\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\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "public int compareTo(DerivationElement o) {\n\t\treturn (this.logProb>o.logProb)? -1 : (this.logProb==o.logProb)? 0 : 1; \n\t }", "public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }", "@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}", "private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n long overallCount = 0L;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n }\n double sum = 0.;\n for (TemporalElementStats stat : relevantStats) {\n sum += estimateNumericalPropertyProb(stat, property, comp, value) *\n (((double) stat.getElementCount() / overallCount));\n }\n return sum;\n }", "private double estimateCategoricalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Map<PropertyValue, Double>> map1 =\n stats1.getCategoricalSelectivityEstimation();\n Map<String, Map<PropertyValue, Double>> map2 =\n stats2.getCategoricalSelectivityEstimation();\n Map<PropertyValue, Double> propStats1 = map1.getOrDefault(property1, null);\n Map<PropertyValue, Double> propStats2 = map2.getOrDefault(property2, null);\n // property not sampled or not considered\n if (propStats1 == null || propStats2 == null) {\n // property not considered => return 0.5\n if (!isPropertyRelevant(property1) && !isPropertyRelevant(property2)) {\n return 0.5;\n } else {\n // property not sampled => very rare => return very small value\n return 0.0001;\n }\n }\n if (comp == EQ || comp == NEQ) {\n double sum = 0.;\n for (Map.Entry<PropertyValue, Double> entry1 : propStats1.entrySet()) {\n double val1Selectivity = entry1.getValue();\n for (Map.Entry<PropertyValue, Double> entry2 : propStats2.entrySet()) {\n if (entry1.getKey().equals(entry2.getKey())) {\n double val2Selectivity = entry2.getValue();\n sum += val1Selectivity * val2Selectivity;\n }\n }\n }\n return comp == EQ ? sum : 1. - sum;\n } else {\n // shouldn't happen, categorical variables can only be compared with EQ or NEQ\n return 0.;\n }\n }", "public void evaluateUniformDistribution(String label) {\r\n // subtract one point for each card of same suit next to a card one away in rank\r\n // subtract two points for each run of two\r\n // three points for each run of three, etc.\r\n // add no points for two adjacent cards of same suit but not of sequential rank\r\n // add one point for two adjacent cards of different suit and same rank\r\n // add two points for two adjacent cards of different suit and sequential rank\r\n // add five points for two adjacent cards of different suit and different rank\r\n int score = 0;\r\n Card c = cards.get(0);\r\n Card d = null;\r\n boolean run = false;\r\n int runCount = 0;\r\n int diff = 0;\r\n for (int i = 1; i < cards.size(); i++) {\r\n d = cards.get(i);\r\n diff = c.getRank() - d.getRank();\r\n if (c.getSuit() == d.getSuit()) {\r\n // same suit\r\n if (diff == 1) { // sequential rank\r\n run = true;\r\n score -= (1 + (runCount*2));\r\n runCount++;\r\n }\r\n } else {\r\n // different suit\r\n if (diff == 0) { // same rank\r\n score++;\r\n } else if (diff == 1) { // sequential rank\r\n score += 2;\r\n } else {\r\n score += 5;\r\n }\r\n }\r\n c = d;\r\n }\r\n System.out.println(label + \" score: \" + score);\r\n }", "private void evaluateProbabilities()\n\t{\n\t}", "abstract double leftProbability();", "public abstract double getLinkProbability(int linkId);", "private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp, List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateNumericalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp,\n List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateCategoricalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "public float specificity(final L label)\n {\n\n final Multiset<L> predictionsForLabel = confusionMatrix.computeIfAbsent(label, l ->HashMultiset.create());\n\n final int hasLabel = predictionsForLabel.size();\n final int hasLabelRight = predictionsForLabel.count(label); // true positives\n\n\n final int notLabelWrong = getTotalPredicted(label) - hasLabelRight; // false negatives\n final int notLabel = numExamples - hasLabel;\n final int notLabelRight = notLabel - notLabelWrong; // true negatives\n\n if (notLabel == 0)\n {\n return 1.0f;\n }\n\n return (float) notLabelRight / (float) notLabel;\n }", "@Test\n public void genNeighStateProbability() {\n double[] metrics = new double[STATES.length * STATES.length];\n double sum = 0;\n Random rand = new Random();\n for (int i = 0; i < metrics.length; i++) {\n int x = i / STATES.length;\n int y = i % STATES.length;\n if (x == y) {\n metrics[i] = 0;\n } else {\n double d = Math.abs(rand.nextGaussian());//Math.exp(-Math.abs(STATES[x] - STATES[y]) / 3) * Math.abs(rand.nextGaussian());\n metrics[i] = d;\n sum += d;\n }\n }\n final double finalSum = sum;\n metrics = DoubleStream.of(metrics).map(d -> d / finalSum).toArray();\n for (int i = 0; i < metrics.length; i++) {\n int x = i / STATES.length;\n int y = i % STATES.length;\n if (metrics[i] > 0.01) {\n System.out.printf(\"%d:%d:%.4f\\n\", STATES[x], STATES[y], metrics[i]);\n }\n }\n }", "protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}", "public double expectedFalsePositiveProbability() {\n\t\treturn Math.pow((1 - Math.exp(-k * (double) expectedElements\n\t\t\t\t/ (double) bitArraySize)), k);\n\t}", "public static void checkUpdateProbabilityOnHORNRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 1; j < 255; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = j;\r\n\t\t\t\tif(!MTS.BIMTS_H8.contains((Integer)r2))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t/*if(r2 == 1 || r2 == 2 || r2 == 4 || r2 == 8 || r2 == 16 || r2 == 32 || r2 == 64 || r2 == 128)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\t*/\r\n\t\t\t\telse\r\n\t\t\t\tfor(int k = 1; k < 255; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = k;\r\n\t\t\t\t\t//if(r3 == 1 || r3 == 2 || r3 == 4 || r3 == 8 || r3 == 16 || r3 == 32 || r3 == 64 || r3 == 128)\r\n\t\t\t\t\t\tif(!MTS.BIMTS_H8.contains((Integer)r3))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\ttotal++;\r\n\t\t\t\t\t\tint new_r3 = CompositionTable.LookUpTable(r1, r2);\r\n\t\t\t\t\t\tif(new_r3 < r3)\r\n\t\t\t\t\t\t\tupdate++;\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\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}", "private double estimateNumericalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Double[]> map1 = stats1.getNumericalPropertyStatsEstimation();\n Map<String, Double[]> map2 = stats2.getNumericalPropertyStatsEstimation();\n Double[] propStats1 = map1.getOrDefault(property1, null);\n Double[] propStats2 = map2.getOrDefault(property2, null);\n if (propStats1 == null || propStats2 == null) {\n return 0.0001;\n }\n double occurrence = stats1.getNumericalOccurrenceEstimation()\n .getOrDefault(property1, 0.) *\n stats2.getNumericalOccurrenceEstimation().getOrDefault(property2, 0.);\n // assuming both properties are normally distributed,\n // their difference is also normally distributed\n NormalDistribution differenceDist = new NormalDistribution(\n propStats1[0] - propStats2[0],\n Math.max(Math.sqrt(propStats1[1] + propStats2[1]), VERY_LOW_PROB));\n\n if (comp == EQ) {\n return occurrence * differenceDist.density(0.);\n } else if (comp == NEQ) {\n return occurrence * (1. - differenceDist.density(0.));\n } else if (comp == LTE) {\n return occurrence * (differenceDist.cumulativeProbability(0.));\n } else if (comp == LT) {\n return occurrence * (differenceDist.cumulativeProbability(0.) -\n differenceDist.density(0.));\n } else if (comp == GTE) {\n return occurrence * (1. - differenceDist.cumulativeProbability(0.) +\n differenceDist.density(0.));\n } else {\n //GT\n return occurrence * (1. - differenceDist.cumulativeProbability(0.));\n }\n }", "@Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }", "@Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }", "@Override\n\tpublic int compareTo(PredictProbPair o) {\n\t\tif (keylen == o.keylen)\n\t\t{\n\t\t\treturn ((Double)(-prob)).compareTo((Double)(-o.prob));\n\t\t}\n\t\treturn ((Integer)(-keylen)).compareTo((Integer)(-o.keylen));\n\t}", "public double getProbability() {\n return probability;\n }", "public void trainBernoulli() {\t\t\n\t\tMap<String, Cluster> trainingDataSet = readFile(trainLabelPath, trainDataPath, \"training\");\n\t\tMap<String, Cluster> testingDataSet = readFile(testLabelPath, testDataPath, \"testing\");\n\n\t\t// do testing, if the predicted class and the gold class is not equal, increment one\n\t\tdouble error = 0;\n\n\t\tdouble documentSize = 0;\n\n\t\tSystem.out.println(\"evaluate the performance\");\n\t\tfor (int testKey = 1; testKey <= 20; testKey++) {\n\t\t\tCluster testingCluster = testingDataSet.get(Integer.toString(testKey));\n\t\t\tSystem.out.println(\"Cluster: \"+testingCluster.toString());\n\n\t\t\tfor (Document document : testingCluster.getDocuments()) {\n\t\t\t\tdocumentSize += 1; \n\t\t\t\tList<Double> classprobability = new ArrayList<Double>();\n\t\t\t\tMap<String, Integer> testDocumentWordCounts = document.getWordCount();\n\n\t\t\t\tfor (int classindex = 1; classindex <= 20; classindex++) {\n\t\t\t\t\t// used for calculating the probability\n\t\t\t\t\tCluster trainCluster = trainingDataSet.get(Integer.toString(classindex));\n\t\t\t\t\t// System.out.println(classindex + \" \" + trainCluster.mClassId);\n\t\t\t\t\tMap<String, Double> bernoulliProbability = trainCluster.bernoulliProbabilities;\n\t\t\t\t\tdouble probability = Math.log(trainCluster.getDocumentSize()/trainDocSize);\n\t\t\t\t\tfor(int index = 1; index <= voc.size(); index++ ){\n\n\t\t\t\t\t\t// judge whether this word is stop word \n\t\t\t\t\t\tboolean isStopwords = englishStopPosition.contains(index);\n\t\t\t\t\t\tif (isStopwords) continue;\n\n\t\t\t\t\t\tboolean contain = testDocumentWordCounts.containsKey(Integer.toString(index));\t\t\t\t\t\t\n\t\t\t\t\t\tif (contain) {\n\t\t\t\t\t\t\tprobability += Math.log(bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tprobability += Math.log(1 - bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// put the probability into the map for the specific class\n\t\t\t\t\tclassprobability.add(probability);\n\t\t\t\t}\n\t\t\t\tObject obj = Collections.max(classprobability);\n\t\t\t\t// System.out.println(classprobability);\n\t\t\t\tString predicte_class1 = obj.toString();\n\t\t\t\t// System.out.println(predicte_class1);\n\t\t\t\t// System.out.println(Double.parseDouble(predicte_class1));\n\t\t\t\tint index = classprobability.indexOf(Double.parseDouble(predicte_class1));\n\t\t\t\t// System.out.println(index);\n\t\t\t\tString predicte_class = Integer.toString(index + 1);\n\n\n\t\t\t\tconfusion_matrix[testKey - 1][index] += 1;\n\n\t\t\t\t// System.out.println(document.docId + \": G, \" + testKey + \"; P: \" + predicte_class);\n\t\t\t\tif (!predicte_class.equals(Integer.toString(testKey))) {\n\t\t\t\t\terror += 1;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize);\n\t\t}\n\n\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize + \" precision rate : \" + (1 - error/documentSize));\n\n\t\t// print confusion matrix\n\t\tprintConfusionMatrix(confusion_matrix);\n\t}", "@Override\n public double computeLikeliness(Node node1, Node node12) {\n return 0;\n }", "public void testCompare1() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.5D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions above the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}", "public Bounds getProbabilityBounds();", "@Test\n\tpublic void priorsAreReasonable() {\n\t\tdouble tot = 0;\n\t\tboolean zeroPrior = false;\n\t\tfor(NewsGroup g: groups) {\n\t\t\tdouble p = g.getPrior();\n\t\t\ttot+=p;\n\t\t\tif(p == 0.0) {\n\t\t\t\tzeroPrior = true;\n\t\t\t}\n\t\t}\n\t\tassertTrue((tot == 1) && !zeroPrior);\n\t}", "abstract double rightProbability();", "public int MajorityVote(double sample[]) {\n\t\t \n\t\tif(leaf_buff == null) {\n\t\t\tleaf_buff = new ArrayList<KDNode>();\n\t\t\tLeafNodes(leaf_buff);\n\t\t}\n\n\t\tint class_count[] = new int[]{0, 0, 0, 0};\n\t\tfor(int i=0; i<leaf_buff.size(); i++) {\n\t\t\tint label = leaf_buff.get(i).classifier.Output(sample);\n\n\t\t\tswitch(label) {\n\t\t\t\tcase -2: class_count[0]++;break;\n\t\t\t\tcase -1: class_count[1]++;break;\n\t\t\t\tcase 1: class_count[2]++;break;\n\t\t\t\tcase 2: class_count[3]++;break;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint max = 0;\n\t\tint label = 0;\n\t\tfor(int i=0; i<4; i++) {\n\t\t\t\n\t\t\tif(class_count[i] > max) {\n\t\t\t\tmax = class_count[i];\n\t\t\t\tlabel = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn label;\n\t}", "@Override\n\t\tpublic int compare(S o1, S o2) {\n\t\t\tif (getProb(o1) > getProb(o2))\n\t\t\t\treturn -1;\n\t\t\tif (getProb(o1) < getProb(o2))\n\t\t\t\treturn 1;\n\t\t\treturn Double.compare(o1.hashCode(), o2.hashCode());\n\t\t}", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "private void buildProbTree() {\n\t\tif (probArray_ == null)\n\t\t\tprobArray_ = new double[elementArray_.length];\n\t\t// Iterate through the items\n\t\tdouble sumProb = 0;\n\t\tfor (int i = 0; i < elementArray_.length; i++) {\n\t\t\tif (sumProb >= 1)\n\t\t\t\tbreak;\n\n\t\t\tsumProb += itemProbs_.get(elementArray_[i]);\n\t\t\tprobArray_[i] = sumProb;\n\t\t}\n\t\trebuildProbs_ = false;\n\t}", "@Override\n public double estimateTemporalProb(ElementType type1, Optional<String> label1,\n TimeSelector.TimeField field1, Comparator comp, Long value) {\n if (comp == EQ) {\n return VERY_LOW_PROB;\n } else if (comp == Comparator.NEQ) {\n return VERY_HIGH_PROB;\n }\n // <, <=, >=, >\n if (!(label1.isPresent())) {\n return estimateTemporalProb(type1, field1, comp, value);\n } else {\n TemporalElementStats elementStats = (type1 == ElementType.VERTEX) ?\n vertexStats.getOrDefault(label1.get(), null) :\n edgeStats.getOrDefault(label1.get(), null);\n // label not in keys\n if (elementStats == null) {\n return VERY_LOW_PROB;\n }\n Binning bins = getBins(elementStats, field1);\n return estimateFromBins(bins, comp, value);\n }\n }", "@Override\n\tpublic double p_l(Label label) {\n\n\t\t// Calculate the probability for the label. No smoothing here.\n\t\t// Just the number of label counts divided by the number of documents.\n\t\tdouble ret = 0;\n\t\t\n\t\t// set up m_sports_count and m_business_count\n\t\tdocuments_per_label_count(m_trainingData);\n\n\t\tdouble sum = m_sports_count + m_business_count;\n\n\t\tif (label == Label.SPORTS) {\n\t\t\tret = m_sports_count / sum;\n\t\t} else {\n\t\t\tret = m_business_count / sum;\n\t\t}\n\n\t\treturn ret;\n\t}", "@Override\n public double estimateTemporalProb(ElementType type1, Optional<String> label1,\n TimeSelector.TimeField field1, Comparator comp, ElementType type2,\n Optional<String> label2, TimeSelector.TimeField field2) {\n if (comp == EQ) {\n return VERY_LOW_PROB;\n } else if (comp == Comparator.NEQ) {\n return VERY_HIGH_PROB;\n }\n // stats for lhs (can be more than one, if no label is specified)\n List<TemporalElementStats> statsLhs;\n // same for rhs\n List<TemporalElementStats> statsRhs;\n\n // determine relevant statistics for rhs and lhs\n if (!(label1.isPresent())) {\n statsLhs = type1 == ElementType.VERTEX ?\n new ArrayList<>(vertexStats.values()) :\n new ArrayList<>(edgeStats.values());\n } else {\n statsLhs = type1 == ElementType.VERTEX ?\n new ArrayList<>(\n Collections.singletonList(vertexStats.getOrDefault(label1.get(), null))) :\n new ArrayList<>(\n Collections.singletonList(edgeStats.getOrDefault(label1.get(), null)));\n // label not in the DB\n if (statsLhs.get(0) == null) {\n return 0.;\n }\n }\n // same for rhs\n if (!(label2.isPresent())) {\n statsRhs = type2 == ElementType.VERTEX ?\n new ArrayList<>(vertexStats.values()) :\n new ArrayList<>(edgeStats.values());\n } else {\n statsRhs = type2 == ElementType.VERTEX ?\n new ArrayList<>(\n Collections.singletonList(vertexStats.getOrDefault(label2.get(), null))) :\n new ArrayList<>(\n Collections.singletonList(edgeStats.getOrDefault(label2.get(), null)));\n // label not in the DB\n if (statsRhs.get(0) == null) {\n return 0.;\n }\n }\n return estimateTimeSelectorComparison(statsLhs, field1, comp, statsRhs, field2);\n }", "public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}", "float genChance();", "public int compareTo(Vertex v) {\n return this.weight - v.weight;\n }", "@Override\n public double[] distributionForInstance(Instance newBag) throws Exception {\n\n double[] distribution = new double[2];\n Instances contents = newBag.relationalValue(1);\n boolean positive = false;\n for (Instance i : contents) {\n if (tree.isPositive(i)) {\n positive = true;\n break;\n }\n }\n\n distribution[1] = positive ? 1 : 0;\n distribution[0] = 1 - distribution[1];\n\n return distribution;\n }", "@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}", "public static void checkUpdateProbabilityOnAtomicRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 0; j < 8; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = base_relations[j];\r\n\t\t\t\r\n\t\t\t\tfor(int k = 0; k < 8; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = base_relations[k];\r\n\t\t\t\t\ttotal++;\r\n\t\t\t\t\t//int new_r3 = CompositionTable.LookUpTable(r1, r2);\r\n\t\t\t\t\tint new_r3 = SetOperators.intersection(r3, \r\n\t\t\t\t\t\t\t\tCompositionTable.LookUpTable(r1, r2));\r\n\t\t\t\t\t//System.out.println(new_r3);\r\n\t\t\t\t\tif( new_r3 != r3 )\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\tupdate++;\r\n\t\t\t\t\t\t//System.out.println(new_r3);\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\t\r\n\t\tSystem.out.println(\" total \" + total + \" update \" + update);\r\n\t\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "@Test\n public void testAdaptivePruningWithBadBubble() {\n final int goodMultiplicity = 1000;\n final int variantMultiplicity = 50;\n final int badMultiplicity = 5;\n\n final SeqVertex source = new SeqVertex(\"source\");\n final SeqVertex sink = new SeqVertex(\"sink\");\n final SeqVertex A = new SeqVertex(\"A\");\n final SeqVertex B = new SeqVertex(\"B\");\n final SeqVertex C = new SeqVertex(\"C\");\n final SeqVertex D = new SeqVertex(\"D\");\n final SeqVertex E = new SeqVertex(\"E\");\n final SeqVertex F = new SeqVertex(\"F\");\n final SeqVertex G = new SeqVertex(\"G\");\n final SeqVertex H = new SeqVertex(\"H\");\n\n\n for (boolean variantPresent : new boolean[] {false, true}) {\n final SeqGraph graph = new SeqGraph(20);\n\n graph.addVertices(source, A, B, C, D, E, F, G, sink);\n graph.addEdges(() -> new BaseEdge(true, goodMultiplicity), source, A, B, C, sink);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), A, D);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), D, F, E);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), D, G, E);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), E, C);\n\n if (variantPresent) {\n graph.addVertices(H);\n graph.addEdges(() -> new BaseEdge(false, variantMultiplicity), A, H, C);\n }\n\n final ChainPruner<SeqVertex, BaseEdge> pruner = new AdaptiveChainPruner<>(0.01, ReadThreadingAssemblerArgumentCollection.DEFAULT_PRUNING_LOG_ODDS_THRESHOLD,\n ReadThreadingAssemblerArgumentCollection.DEFAULT_PRUNING_SEEDING_LOG_ODDS_THRESHOLD, 50);\n pruner.pruneLowWeightChains(graph);\n\n Assert.assertFalse(graph.containsVertex(D));\n if (variantPresent) {\n Assert.assertTrue(graph.containsVertex(H));\n }\n }\n }", "public void testCompare2() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(0.6D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions below the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "public abstract float getProbability(String[] tokens);", "protected double clusterProbability(List<Node> cluster) {\n float p = LogMath.LOG_ZERO;\n LogMath logMath = LogMath.getInstance();\n\n for (Node node : cluster)\n p = logMath.addAsLinear(p, (float)node.getPosterior());\n\n return p;\n }", "private void computeElementstatistics(Elements eles, String nameElement, Map<String,Boolean> option) throws Exception{\t\n\t\tif(eles.size() == 0)\n\t\t\treturn;\n\t\tdouble nbAnchor, nbList, nbTable, nbImg, nbImgAnchor, nbPTag, nbDescendants;\t\t\n\t\tList<Double> nbAnchorEle = new ArrayList<>();\n\t\tList<Double> nbListEle = new ArrayList<>();\n\t\tList<Double> nbTableEle = new ArrayList<>();\n\t\tList<Double> nbImgEle = new ArrayList<>();\n\t\tList<Double> nbImgAnchorEle = new ArrayList<>();\n\t\tList<Double> nbPTagEle = new ArrayList<>();\n\t\tList<Double> nbDescendantsEle = new ArrayList<>();\n\t\tfor(Element div : eles){\n\t\t\tnbAnchor = 0;\n\t\t\tnbList = 0;\n\t\t\tnbTable = 0;\n\t\t\tnbImg = 0;\n\t\t\tnbImgAnchor = 0;\n\t\t\tnbPTag = 0;\n\t\t\tnbDescendants = 0;\n\t\t\tfor(Element tag : div.getAllElements()){\n\t\t\t\tnbDescendants += 1;\n\t\t\t\tif(tag.tagName().equals(\"a\"))\n\t\t\t\t\tnbAnchor += 1;\n\t\t\t\telse if(option.containsKey(\"list\") && option.get(\"list\") && (tag.tagName().equals(\"ul\") || tag.tagName().equals(\"li\")))\n\t\t\t\t\tnbList += 1;\n\t\t\t\telse if(option.containsKey(\"table\") && option.get(\"table\") &&\n\t\t\t\t\t\t(tag.tagName().equals(\"table\") || tag.tagName().equals(\"tr\") || tag.tagName().equals(\"td\")))\n\t\t\t\t\tnbTable += 1;\n\t\t\t\telse if(tag.tagName().equals(\"img\")){\n\t\t\t\t\tif(tag.parent().tagName().equals(\"a\"))\n\t\t\t\t\t\tnbImgAnchor += 1;\n\t\t\t\t\telse\n\t\t\t\t\t\tnbImg += 1;\n\t\t\t\t}\n\t\t\t\telse if(option.containsKey(\"p\") && option.get(\"p\") && (tag.tagName().equals(\"p\")))\n\t\t\t\t\tnbPTag += 1;\n\t\t\t}\n\t\t\tnbAnchorEle.add(nbAnchor);\t\t\t\n\t\t\tnbListEle.add(nbList);\n\t\t\tnbTableEle.add(nbTable);\n\t\t\tnbImgEle.add(nbImg);\n\t\t\tnbImgAnchorEle.add(nbImgAnchor);\n\t\t\tnbPTagEle.add(nbPTag);\n\t\t\tnbDescendantsEle.add(nbDescendants);\n\t\t}\n\t\tHashtable<String, List<Double>> eleStat = new Hashtable<String, List<Double>>();\n\t\teleStat.put(\"anchor_by_\" + nameElement, nbAnchorEle);\n\t\tif(option.containsKey(\"list\") && option.get(\"list\"))\n\t\t\teleStat.put(\"list_by_\" + nameElement, nbListEle);\n\t\tif(option.containsKey(\"table\") && option.get(\"table\"))\n\t\t\teleStat.put(\"table_by_\" + nameElement, nbTableEle);\n\t\teleStat.put(\"img_by_\" + nameElement, nbImgEle);\n\t\teleStat.put(\"img_anchor_by_\" + nameElement, nbImgAnchorEle);\n\t\tif(option.containsKey(\"p\") && option.get(\"p\"))\n\t\t\teleStat.put(\"tag_p_by_\" + nameElement, nbPTagEle);\n\t\teleStat.put(\"descendants_by_\" + nameElement, nbDescendantsEle);\n\t\tList<String> averageName = Arrays.asList(\"__mean\",\"__std\",\"__2nd_skew_coef\");\n\t\tList<String> bigName = Arrays.asList(\"__highest\",\"__2nd_highest\",\"__3rd_highest\");\n\t\tfor(String name : eleStat.keySet()){\n\t\t\tList<Double> average = ClassificationGeneralFunctions.getAverageSkewness(eleStat.get(name));\n\t\t\tList<Double> highestElements = ClassificationGeneralFunctions.getHighestElementStatistics(eleStat.get(name), average.get(0));\t\t\t\n\t\t\tfor(int i = 0; i < averageName.size(); i++){\n\t\t\t\thtmlStatistics.put(name + averageName.get(i), average.get(i));\n\t\t\t}\n\t\t\tfor(int i = 0; i < bigName.size(); i++){\n\t\t\t\thtmlStatistics.put(name + bigName.get(i), highestElements.get(i));\n\t\t\t}\n\t\t}\n\t}", "public Comparator<Integer> comparator() {\n return new Comparator<Integer>() {\n @Override\n public int compare(Integer o1, Integer o2) {\n Http2PriorityNode n1 = nodesByID.get(o1);\n Http2PriorityNode n2 = nodesByID.get(o2);\n if(n1 == null && n2 == null) {\n return 0;\n }\n if(n1 == null) {\n return -1;\n }\n if(n2 == null) {\n return 1;\n }\n //do the comparison\n //this is kinda crap, but I can't really think of any better way to handle this\n\n double d1 = createWeightingProportion(n1);\n double d2 = createWeightingProportion(n2);\n return Double.compare(d1, d2);\n }\n };\n }", "@Test\n public void testP() {\n System.out.println(\"p\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(0.027, instance.p(0), 1E-7);\n assertEquals(0.0567, instance.p(1), 1E-7);\n assertEquals(0.07938, instance.p(2), 1E-7);\n assertEquals(0.09261, instance.p(3), 1E-7);\n assertEquals(0.05033709, instance.p(10), 1E-7);\n }", "@Test\n public void testGetPercentageForN() throws FileNotFoundException {\n nTupleComparator = new NTupleComparator(\"syns\", \"file1\", \"file2\", 2);\n assertEquals(nTupleComparator.getPercentage(), 100);\n nTupleComparator = new NTupleComparator(\"syns\", \"file1\", \"testfile2\", 2);\n assertEquals(nTupleComparator.getPercentage(), (double) 2 * 100 / 3);\n nTupleComparator = new NTupleComparator(\"syns\", \"file1\", \"file2\", 4);\n assertEquals(nTupleComparator.getPercentage(), 100);\n nTupleComparator = new NTupleComparator(\"syns\", \"file1\", \"testfile2\", 4);\n assertEquals(nTupleComparator.getPercentage(), 0);\n }", "double getTransProb();", "@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }", "@Test\n public void badChoicePunisher() {\n Edge[] edgelist = {new Edge(new int[] {1, 7}), new Edge(new int[] {1, 8}),\n new Edge(new int[] {7, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5})};\n timeMethod(edgelist, 8, 2);\n\n\n Edge[] edgelist1 = {new Edge(new int[] {1, 6}), new Edge(new int[] {1, 7}),\n new Edge(new int[] {6, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5})};\n timeMethod(edgelist1, 7, 1);\n\n Edge[] edgelist2 = {new Edge(new int[] {1, 6}), new Edge(new int[] {1, 7}),\n new Edge(new int[] {6, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5}), new Edge(new int[] {2, 8})};\n timeMethod(edgelist2, 8, 2);\n\n Edge[] edgelist3 = {new Edge(new int[] {1, 6}), new Edge(new int[] {1, 7}),\n new Edge(new int[] {6, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5})};\n timeMethod(edgelist3, 7, 1);\n }", "@Override\r\n\tpublic double getProb(double price, double[] realized) {\r\n\t\treturn getPMF(realized)[ bin(price, precision) ];\r\n\t}", "void assertSelfCntPctEquals(T key, double expected);", "protected double clusterProbability(Cluster cluster) {\n return clusterProbability(cluster.elements);\n }", "@Override\n public int compareTo(Individual individual) {\n return individual.getFitness() - this.getFitness() ;\n }", "public static void main(String[] args) {\n\t\tString[][] graph = new String[][] { { \"a\", \"b\", \"1\" }, { \"a\", \"c\", \"6\" }, { \"b\", \"c\", \"2\" }, { \"b\", \"d\", \"5\" },\r\n\t\t\t\t{ \"b\", \"e\", \"4\" }, { \"c\", \"d\", \"2\" }, { \"c\", \"e\", \"3\" }, { \"d\", \"e\", \"1\" }, { \"d\", \"f\", \"4\" },\r\n\t\t\t\t{ \"e\", \"f\", \"7\" } };\r\n\t\tPrimAlgorithm pa = new PrimAlgorithm();\r\n\t\tpa.prim(graph, \"a\");\r\n\t\tSystem.out.println();\r\n\t\tString[][]\tgraph2 = new String[][] { { \"a\", \"b\", \"8\" }, { \"a\", \"c\", \"1\" }, { \"a\", \"d\", \"7\" }, { \"b\", \"c\", \"5\" },\r\n\t\t\t{ \"b\", \"e\", \"3\" }, { \"c\", \"d\", \"6\" }, { \"c\", \"e\", \"4\" }, { \"c\", \"f\", \"3\" }, { \"d\", \"f\", \"2\" },\r\n\t\t\t{ \"e\", \"f\", \"5\" } };\r\n\t\t\tpa.prim(graph2, \"a\");\r\n\t\t\tSystem.out.println();\r\n\t\tString[][]\tgraph3 = new String[][] { { \"a\", \"b\", \"5\" }, { \"a\", \"c\", \"3\" }, { \"a\", \"d\", \"7\" }, \r\n\t\t\t{ \"b\", \"e\", \"2\" }, { \"c\", \"e\", \"1\" }, { \"d\", \"f\", \"4\" },\r\n\t\t\t{ \"e\", \"f\", \"6\" } };\r\n\t\t\tpa.prim(graph3, \"a\");\r\n\t\t\tSystem.out.println();\r\n\r\n\t}", "public void computeExpectedChildrenProperties() {\n\t\t\n\t\tSet<Attribute<? extends IValue>> parentAttributes = new HashSet<>(popParents.getPopulationAttributes());\n\t\tparentAttributes.retainAll(pMatching.getDimensions());\n\t\t\n\t\tlogger.info(\"computing for the dimensions: {}\", parentAttributes);\n\t\t\n\t\t/*\n\t\t * \n\t\tMap<Set<Attribute<? extends IValue>>,Integer> parents2matchingCandidates = new HashMap<>();\n\t\tfor (Entry<ACoordinate<Attribute<? extends IValue>, IValue>, AControl<Double>> e: \n\t\t\tpMatching.getMatrix().entrySet()) {\n\t\t\t\n\t\t}\n\t\t\n\t\tGosplContingencyTable c = new GosplContingencyTable(pMatching.getDimensions());\n\t\t// for each coordinate of the probabilities table \n\t\t// 1) compute the \n\t\t * \n\t\t */\n\n\t\t\n\t}", "public int compareTo(Edge other){\n return this.weight - other.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}", "private double getChildrenTotalAlternativeWeight() {\n double totalWeight = 0.0;\n for (DependencyDescription child : this.getChildren()) {\n totalWeight += child.getAlternativeProbability();\n }\n return totalWeight;\n }", "public int compare(Person a, Person b){\n int aWeight = (int)a.getWeight();\n int bWeight = (int)b.getWeight();\n return aWeight - bWeight;\n }", "private Double computeRatio(final Collection<?> partial, final Collection<?> complete) {\n\r\n\t\tif (partial.isEmpty() || complete.isEmpty())\r\n\t\t\treturn 0.0;\r\n\t\telse\r\n\t\t\treturn (partial.size() * 1.0) / (complete.size() * 1.0);\r\n\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 }", "private double estimateNumericalPropertyProb(TemporalElementStats stat, String property,\n Comparator comp, PropertyValue value) {\n // property not sampled or not considered\n if (!stat.getNumericalPropertyStatsEstimation().containsKey(property)) {\n // if property not excluded, return very small value\n // if excluded, it is irrelevant, return 0.5\n return isPropertyRelevant(property) ? 0.0001 : 0.5;\n }\n Double[] propertyStats = stat.getNumericalPropertyStatsEstimation().get(property);\n NormalDistribution dist = new NormalDistribution(propertyStats[0],\n Math.max(Math.sqrt(propertyStats[1]), VERY_LOW_PROB));\n double doubleValue = ((Number) value.getObject()).doubleValue();\n double occurenceProb = stat.getNumericalOccurrenceEstimation().get(property);\n if (comp == EQ) {\n return VERY_LOW_PROB * occurenceProb;\n } else if (comp == NEQ) {\n return (1. - VERY_LOW_PROB) * occurenceProb;\n } else if (comp == LTE) {\n return dist.cumulativeProbability(doubleValue) * occurenceProb;\n } else if (comp == LT) {\n return occurenceProb * (dist.cumulativeProbability(doubleValue) - VERY_LOW_PROB);\n } else if (comp == GTE) {\n return occurenceProb *\n (1. - dist.cumulativeProbability(doubleValue) + VERY_LOW_PROB);\n } else {\n //GT\n return occurenceProb * (1. - dist.cumulativeProbability(doubleValue));\n }\n }", "public void testDifferentDotProducts() {\n List<ISpectrum> spectra = ClusteringTestUtilities.readISpectraFromResource();\n\n ISpectrum[] spectrums = (ISpectrum[]) spectra.toArray();\n\n int total = 0;\n int different = 0;\n ISimilarityChecker checker = new FrankEtAlDotProduct(0.5F, 15, true);\n ISimilarityChecker currentChecker = new FrankEtAlDotProductJohannes();\n\n Set<String> interestingIds = new HashSet<>();\n\n\n for (int i = 0; i < spectrums.length; i++) {\n ISpectrum psm1 = spectrums[i];\n for (int j = i + 1; j < spectrums.length; j++) {\n ISpectrum psm2 = spectrums[j];\n double dotOrg = checker.assessSimilarity(psm1, psm2);\n double dotNew = currentChecker.assessSimilarity(psm1, psm2);\n\n if (Math.abs(dotOrg - dotNew) > 0.00001) {\n different++;\n\n StringBuilder usedPeaksTester = new StringBuilder();\n\n // these are the really interesting cases\n dotOrg = checker.assessSimilarity(psm1, psm2);\n\n double noClosestPeak = dotNew;\n dotNew = currentChecker.assessSimilarity(psm1, psm2);\n String id2 = psm2.getId();\n String id1 = psm1.getId();\n interestingIds.add(id1);\n interestingIds.add(id2);\n\n // System.out.println(usedPeaksTester.toString());\n // System.out.printf(id2 + \":\" + id1 + \" \" + \"Old: %8.3f Newx: %8.3f New: %8.3f\\tDiff: %8.3f\\n\", dotOrg, noClosestPeak, dotNew, dotOrg - dotNew);\n }\n total++;\n\n }\n\n }\n\n List<String> sorted = new ArrayList<>(interestingIds);\n Collections.sort(sorted);\n // System.out.println(\"Interesting Ids\");\n for (String s : sorted) {\n // System.out.println(s);\n }\n\n\n TestCase.assertEquals(0, different);\n }", "int getPercentageHeated();", "private void checkProbability(String mapName, WildEncounterInfo[] wildEncounters) {\n int totalProbability = 0;\n for (WildEncounterInfo wildEncounter : wildEncounters) {\n totalProbability += wildEncounter.getProbability();\n }\n\n Assert.assertEquals(mapName, 100, totalProbability);\n }", "public scala.collection.immutable.IndexedSeq<java.lang.Object> getQuantiles (scala.collection.Iterable<java.lang.Object> probabilities) { throw new RuntimeException(); }", "@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }", "public static void main(String[] args) {\n List<EntityProfile>[] profiles;\r\n if (args.length > 0) {\r\n BASEPATH = args[0] + \"/\";\r\n profiles = Utilities.getEntities(BASEPATH, DATASET, CLEAN);\r\n } else {\r\n //profiles = Utilities.getEntities(BASEPATH, DATASET, CLEAN);\r\n profiles = Utilities.getEntities(DATASET, CLEAN);\r\n }\r\n\r\n Instant start = Instant.now();\r\n\r\n ProgressiveSnHeap psn = new ProgressiveSnHeap(profiles, WeightingSchemeSn.MINHASH, false, 50);\r\n // weighted psn needs a block collection and a wighing scheme\r\n //psn.buildEntityList(50);\r\n // passing no argument simple psn is performed\r\n //psn.buildEntityList();\r\n\r\n //MinMaxPriorityQueue<Comparison> comparisons = psn.get_heap();\r\n\r\n double num_comparisons = 0;\r\n double comparisons_old = 0;\r\n //AbstractDuplicatePropagation adp = Utilities.getGroundTruth(BASEPATH, DATASET, CLEAN);\r\n AbstractDuplicatePropagation adp = Utilities.getGroundTruth(DATASET, CLEAN);\r\n\r\n double pc = 0.0;\r\n double pc_old = 0.0;\r\n double pq = 0.0;\r\n double detectedDuplicates = 0;\r\n\r\n double w_old = Double.MAX_VALUE;\r\n //while (!comparisons.isEmpty()) {\r\n while (psn.hasNext()) {\r\n //Comparison c = comparisons.pollFirst();\r\n Comparison c = (Comparison) psn.next();\r\n //double w = c.getUtilityMeasure();\r\n //if (w_old < w) {\r\n // System.out.println(\"error weight: \" + w_old + \" \" + w);\r\n //}\r\n //System.out.println(\"weight: \" + w);\r\n //w_old = w;\r\n\r\n\r\n num_comparisons++;\r\n detectedDuplicates = adp.getNoOfDuplicates();\r\n pc = ((double) detectedDuplicates) / adp.getExistingDuplicates();\r\n if ((pc - pc_old) > .1) {\r\n pc_old = pc;\r\n //pq = detectedDuplicates / (double) comparisons;\r\n System.out.println(\"pc: \" + Math.round(pc * 100) / 100.0 + \" - \" + (num_comparisons - comparisons_old));\r\n comparisons_old = num_comparisons;\r\n }\r\n adp.isSuperfluous(c);\r\n\r\n if (pc > 0.8) {\r\n break;\r\n }\r\n }\r\n\r\n detectedDuplicates = adp.getNoOfDuplicates();\r\n pc = ((double) detectedDuplicates) / adp.getExistingDuplicates();\r\n pq = detectedDuplicates / (double) num_comparisons;\r\n\r\n System.out.println(\"partial res1\");\r\n System.out.println(\"pc: \" + pc);\r\n System.out.println(\"pq: \" + pq);\r\n }", "public void testCompare3() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.5D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(0.6D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions above the range < predictions below the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}", "public long numSimilarities();", "public void calculateProbabilities(Ant ant) {\n int i = ant.trail[currentIndex];\n double pheromone = 0.0;\n for (int l = 0; l < numberOfCities; l++) {\n if (!ant.visited(l)) {\n pheromone += (Math.pow(trails[i][l], alpha) + 1) * (Math.pow(graph[i][l], beta) + 1) *\n (Math.pow(emcMatrix[i][l], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][l], ddd) + 1);\n }\n }\n for (int j = 0; j < numberOfCities; j++) {\n if (ant.visited(j)) {\n probabilities[j] = 0.0;\n } else {\n double numerator = (Math.pow(trails[i][j], alpha) + 1) * (Math.pow(graph[i][j], beta) + 1) *\n (Math.pow(emcMatrix[i][j], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][j], ddd) + 1);\n probabilities[j] = numerator / pheromone;\n }\n }\n }", "private void EvalFitness(){\r\n _FitVal=0;\r\n for(int i=0; i<7;i++)\r\n for(int j=i+1;j<8;j++){\r\n if( _Data[i]==_Data[j]) _FitVal++;\r\n if(j-i==Math.abs(_Data[i]-_Data[j])) _FitVal++;\r\n }\r\n }", "@Override\n\t\tpublic int compareTo(state arg0) {\n\t\t\treturn (this.weight1 * this.weight2) - (arg0.weight1 * arg0.weight2);\n\t\t}", "private void genProbes(int numProbes) {\n if (numProbes == 0) {\n return;\n }\n Dimension dim = layoutPanel.getLayoutSize();\n int height = dim.height;\n int width = dim.width;\n int size = height * width;\n float ratio = (float) numProbes / size;\n\n layoutPanel.probedNList = getRegularPointsIndex(ratio);\n }", "public int compare(Object o1, Object o2) {\n int[] p1 = (int[]) o1;\n int[] p2 = (int[]) o2;\n\n // compare sum of axis distances for each priority\n for (int p=MAX_PRIORITY; p>=MIN_PRIORITY; p--) {\n int dist1 = 0, dist2 = 0;\n for (int i=0; i<p1.length; i++) {\n if (priorities[i] == p) {\n dist1 += distance(i, p1[i]);\n dist2 += distance(i, p2[i]);\n }\n }\n int diff = dist1 - dist2;\n if (diff != 0) return diff;\n }\n\n // compare number of diverging axes for each priority\n for (int p=MAX_PRIORITY; p>=MIN_PRIORITY; p--) {\n int div1 = 0, div2 = 0;\n for (int i=0; i<p1.length; i++) {\n if (priorities[i] == p) {\n if (p1[i] != 0) div1++;\n if (p2[i] != 0) div2++;\n }\n }\n int diff = div1 - div2;\n if (diff != 0) return diff;\n }\n\n return 0;\n }", "@Test\n public void testAdaptivePruningWithAdjacentBadEdges() {\n final int goodMultiplicity = 1000;\n final int variantMultiplicity = 50;\n final int badMultiplicity = 5;\n\n final SeqVertex source = new SeqVertex(\"source\");\n final SeqVertex sink = new SeqVertex(\"sink\");\n final SeqVertex A = new SeqVertex(\"A\");\n final SeqVertex B = new SeqVertex(\"B\");\n final SeqVertex C = new SeqVertex(\"C\");\n final SeqVertex D = new SeqVertex(\"D\");\n final SeqVertex E = new SeqVertex(\"E\");\n\n\n for (boolean variantPresent : new boolean[] {false, true}) {\n final SeqGraph graph = new SeqGraph(20);\n\n graph.addVertices(source, A, B, C, D, sink);\n graph.addEdges(() -> new BaseEdge(true, goodMultiplicity), source, A, B, C, sink);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), A, D, C);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), D, B);\n\n if (variantPresent) {\n graph.addVertices(E);\n graph.addEdges(() -> new BaseEdge(false, variantMultiplicity), A, E, C);\n }\n\n final ChainPruner<SeqVertex, BaseEdge> pruner = new AdaptiveChainPruner<>(0.01, 2.0,\n ReadThreadingAssemblerArgumentCollection.DEFAULT_PRUNING_SEEDING_LOG_ODDS_THRESHOLD, 50);\n pruner.pruneLowWeightChains(graph);\n\n Assert.assertFalse(graph.containsVertex(D));\n if (variantPresent) {\n Assert.assertTrue(graph.containsVertex(E));\n }\n }\n }", "Integer classify(LogicGraph pce);", "public Map<String, Double> predictAndEvaluate(NodeVecs nodeVecs) {\n int topK = Integer.parseInt(prop.getProperty(\"prediction.numwanted\", \"1\"));\n\n List<Query> testQueries = queryNodes.buildQueries();\n\n int numQueries = testQueries.size();\n float sim = 0;\n int nQueriesEvaluated = 0;\n \n Map<String, int[]> counter = new HashMap<>();\n List<PredictionTuple> rtuples = new ArrayList<>();\n \n for (int qid=0; qid < numQueries; qid++) {\n Query testQuery = testQueries.get(qid);\n \n System.out.println(\"Test Query: \" + testQuery);\n\n AndQuery testAndQuery = (AndQuery)testQueries.get(qid);\n\n if (Boolean.parseBoolean(prop.getProperty(\"prediction.flattenquery\"))) {\n // first flatten the query\n testAndQuery = AndQuery.flatten(testAndQuery);\n }\n // filter the target of the query\n testAndQuery = testAndQuery.withFilter(avp ->\n avp.getAttribute().getId().equals(predictedOutcomeValueAttributeId) // make sure we target the correct outcome value\n && avp.getNumericValue() != null // we don't care about non-numerical OV\n && avp.getNumericValue() <= 100.0); // remove noisy values outside of 0-100%\n //testAndQuery = new AndQuerySimple(testAndQuery);\n System.out.println(\"Test Query: \" + testAndQuery);\n // run the query\n List<SearchResult> results = getResults(testAndQuery, nodeVecs, topK);\n\n //testQuery = testQuery.filteredWith(result -> result.node.getAttribute().getType() == wantedType()); // set the filter\n \n Map<String, List<SearchResult>> groupedResults = groupByAttribs(results); \n groupedResults = collapseToWtAvg(groupedResults);\n\n for (List<SearchResult> perAttribList: groupedResults.values()) {\n System.out.println(resTuple(perAttribList));\n for (SearchResult sr : perAttribList) {\n String stStr = sr.toString();\n int[] count = counter.get(stStr);\n if (count == null) {\n count = new int[1];\n counter.put(stStr, count);\n }\n count[0]++;\n }\n \n // float this_sim = evaluationLogic.evaluate(qid, perAttribList);\n PredictionTuple rtuple = evaluationLogic.evaluate(qid, perAttribList.get(0));\n if (!rtuple.valid()) {\n LOGGER.warn(\"Reference or prediction is not valid (less than 0): {} -- {}\", rtuple.getRef(), rtuple.getPred());\n continue;\n }\n System.out.println(\"Reference:\\t\" + rtuple.getRef() + \"\\tPrediction\\t\" + rtuple.getPred());\n\n rtuples.add(rtuple);\n //sim += this_sim;\n }\n nQueriesEvaluated++;\n }\n \n /*\n if (nQueriesEvaluated > 0)\n System.out.println(\"Mean-average \" + evaluationLogic.getMetricName() + \": \" + Math.sqrt(sim/(float)nQueriesEvaluated));\n */\n try { \n // Print out the result tuples in a file\n FileWriter fw = new FileWriter(\"res.tsv\");\n BufferedWriter bw = new BufferedWriter(fw);\n \n for (PredictionTuple rt: rtuples) {\n bw.write(rt.getRef() + \"\\t\" + rt.getPred());\n bw.newLine();\n }\n bw.close();\n fw.close();\n }\n catch (IOException ex) {\n ex.printStackTrace();\n }\n \n \n Map<String, Double> res = new HashMap<>();\n for (EvaluationMetric metric : evaluationMetrics) {\n String metricName = metric.toString();\n double evaluationResult = metric.compute(rtuples);\n System.out.println(metricName + \": \" + evaluationResult);\n res.put(metricName, evaluationResult);\n }\n \n /*\n // print distribution of all results\n for (Entry<String, int[]> entry : counter.entrySet()) {\n System.out.println(entry.getKey() + \"\\t\" + entry.getValue()[0]);\n }\n */\n\n return res;\n }", "public abstract float getProbability(String singleToken);", "@Test \n public void compareFunctionalEquals() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p1, p1);\n \n assertEquals(0, a);\n }", "void calculatePR( int iteration){\n\t\t\n\t\ttotal_nodes = inlinks.size();\n\t\tfor(String page : inlinks.keySet()){\n\t\t\tPageRank.put(page, (1/(double)(total_nodes)));\n\t\t\tinit_PageRank.put(page, (1/(double)(total_nodes)));\n\t\t}\n \n double ppx = 0.0;\n boolean cond = true;\n int itr =1;\n // while(iteration >0){ //Used for Graph page rank calculation; c\n while(cond){ \n \tSystem.out.println(\"Iteration\"+itr); \n double sinkPR = 0;\n for(String s: sink){\n \tsinkPR = sinkPR + (PageRank.get(s)); //calculate total sink PR\n }\n \n double entropy = 0.0;\n \n for(String s: PageRank.keySet()){\n \tdouble newPR;\n \tnewPR = (1.0 -d)/total_nodes;\n \tnewPR = newPR + (d*sinkPR)/total_nodes;\n \tSet<String> in = inlinks.get(s); //pages pointing to P\n \tif(in != null){\n \t\tfor(String s1 : in){\n \t\t\tnewPR = newPR + d* (PageRank.get(s1)/outlinks_count.get(s1)); \t\t \n \t\t}\n \t} \n \t\tnew_PageRank.put(s, newPR);\n \t\tentropy = entropy + (newPR*(Math.log(newPR)/Math.log(2))); //entroPy calculation\n \t}\n \n PageRank.putAll(new_PageRank);\n ppx = Math.pow(2,-1*entropy);\n System.out.println(\"perplexity : \"+ ppx);\n ppx_list.add(ppx);\n if(ppx_list.size()>5) \n \tcond= !check(4);\n \n itr++;\n \t\n //\t iteration --; //Used for page Rank Calculation of Graph\n } \n\t}", "@Override\n\tpublic int compare(Person p1, Person p2) {\n\t\tif(p1.getWeight() >p2.getWeight()){\n\t\n\t\treturn 1;\n\t\t}\n\t\telse if(p1.getWeight()==p2.getWeight()){\n\t\t\tif(p1.getHeight() >p2.getHeight()){\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "void assertTotalCntPctEquals(T key, double expected);", "private boolean isApproximatelyEqual(Node n, Node first) {\r\n\t\tDouble nwD = n.getWeightValueUnsynchronized(\"value\");\r\n\t\tdouble nw = nwD==null ? 1.0 : nwD.doubleValue();\r\n\t\tDouble fwD = first.getWeightValueUnsynchronized(\"value\");\r\n\t\tdouble fw = fwD==null ? 1.0 : fwD.doubleValue();\r\n\t\treturn fw*_alphaFactor <= nw &&\r\n\t\t\t first.getNborsUnsynchronized().size()*_alphaFactor >= \r\n\t\t\t n.getNborsUnsynchronized().size();\r\n\t}", "public static double RELATIVE_PERCENTAGE_SUPPORT(Feature a, Feature b) {\n double num = 0.0, den = 0.0, dinf, dsup, rat = -1.0;\n int i;\n\n if (!a.type.equals(b.type)) Dataset.perror(\"Feature.class :: not the same class for features\");\n\n if (Feature.IS_CONTINUOUS(a.type)) {\n if ((b.dmax == b.dmin) || (a.dmax <= b.dmin) || (a.dmin >= b.dmax)) return 0.0;\n\n if (a.dmin < b.dmin) dinf = b.dmin;\n else dinf = a.dmin;\n\n if (a.dmax > b.dmax) dsup = b.dmax;\n else dsup = a.dmax;\n\n num = dsup - dinf;\n den = b.dmax - b.dmin;\n } else if (Feature.IS_INTEGER(a.type)) {\n if ((a.imax < b.imin) || (a.imin > b.imax)) return 0.0;\n\n if (a.imin <= b.imin) dinf = (double) b.imin;\n else dinf = (double) a.imin;\n\n if (a.imax >= b.imax) dsup = (double) b.imax;\n else dsup = (double) a.imax;\n\n num = dsup - dinf + 1.0;\n den = ((double) (b.imax - b.imin)) + 1.0;\n } else if (Feature.IS_NOMINAL(a.type)) {\n if (b.modalities.size() == 0) return 0.0;\n else den = (double) b.modalities.size();\n\n num = 0.0;\n for (i = 0; i < a.modalities.size(); i++)\n if (b.modalities.contains((String) a.modalities.elementAt(i))) num += 1.0;\n } else Dataset.perror(\"Feature.class :: feature type unknown\");\n\n rat = num / den;\n if ((rat < 0.0) || (rat > 1.0))\n Dataset.perror(\"Feature.class :: ratio \" + rat + \" not a probability\");\n return rat;\n }", "@Test\n public void testOneUserTrecevalStrategySingleRelevance() {\n DataModelIF<Long, Long> test = DataModelFactory.getDefaultModel();\n DataModelIF<Long, Long> predictions = DataModelFactory.getDefaultModel();\n test.addPreference(1L, 2L, 0.0);\n test.addPreference(1L, 3L, 1.0);\n test.addPreference(1L, 4L, 1.0);\n predictions.addPreference(1L, 1L, 3.0);\n predictions.addPreference(1L, 2L, 4.0);\n predictions.addPreference(1L, 3L, 5.0);\n predictions.addPreference(1L, 4L, 1.0);\n\n Precision<Long, Long> precision = new Precision<Long, Long>(predictions, test, 1.0, new int[]{1, 2, 3, 4, 5});\n\n precision.compute();\n\n assertEquals(0.5, precision.getValue(), 0.001);\n assertEquals(1.0, precision.getValueAt(1), 0.001);\n assertEquals(0.5, precision.getValueAt(2), 0.001);\n assertEquals(0.3333, precision.getValueAt(3), 0.001);\n assertEquals(0.5, precision.getValueAt(4), 0.001);\n assertEquals(0.4, precision.getValueAt(5), 0.001);\n\n Map<Long, Double> precisionPerUser = precision.getValuePerUser();\n for (Map.Entry<Long, Double> e : precisionPerUser.entrySet()) {\n long user = e.getKey();\n double value = e.getValue();\n assertEquals(0.5, value, 0.001);\n }\n }", "public Object eval(Individual ind)\r\n {\r\n BinaryIndividual bi = (BinaryIndividual)ind;\r\n int partialFitness = 0;\r\n int distance = 0;\r\n double fitness = 0.0;\r\n\r\n\t for (int i=0; i<100; i++){\r\n\r\n\t distance = 0;\r\n\r\n\t for (int j=0; j<100; j++){\r\n\t if (!((BinaryIndividual)target[i]).getBooleanAllele(j)^bi.getBooleanAllele(j)) { \r\n\t\t distance++;\r\n\t }\r\n \r\n\t if (distance > partialFitness) {\r\n\t partialFitness = distance;\r\n\t }\r\n\t }\r\n }\r\n\r\n fitness = (double)partialFitness/100.0;\r\n return new Double(fitness);\r\n \r\n\r\n }", "private double weight(){\n return ((double) (m_PositiveCount + m_NegativeCount)) / ((double) m_PositiveCount);\n }", "public static int fastClassify(Model M, int[][] x){\n //dont call other classes\n\t //look out for terms that you can take out\n//\t int d =0;\n//\t double joint;\n//\t double t= 1.0;\n//\t\tdouble high;\n//\t\t//Double tot1;\n//\t\tdouble higher;\n//\t\tdouble tot =1.0;\n//\t\tdouble tot1= 1.0;\n//\t int digit =0;\n//\t for(int i=0; i<x.length; i++){\n//\t\tfor(int j=0;j<x[i].length; j++){\n//\n//\t\t//probability at 0;\n//\t\t\ttot*=conditionalProbabilityXijgD(M,i,j,x[i][j],0); \n//\t\t \n//\t\t high = M.getPD(0)*tot;\n//\t\t\twhile(d<10){\n//\t\t\t\ttot1*=conditionalProbabilityXijgD(M,i,j,x[i][j],d); \n//\t\t\t\thigher = M.getPD(d)*tot1;\n//\t\t\t\t\n//\t\t\t\tif(high <higher){\n//\t\t\t\t\thigh = higher;\n//\t\t\t\t\tdigit =d;\n//\t\t\t\t}\n//\t\t\t\td++;\n//\t\t\t}\n//\t\t \n//\t }\n//\t \n//\t }\n\t double high=0.0;\n\t int digit =0;\n\t int i=0;\n\t while(i<10){\n\t\t double tot =jointProbabilityXD(M,x,i);\n\t \t\n\t if(high<tot){\n\t\t high=tot;\n\t \t\tdigit =i; \n\t \t}\n\t\t i++;\n\t \t//System.out.println(0.988809344056389 < 0.011080326918292818);\n\t \n\t\t// System.out.println(tot);\n\t }\n\t return digit;\n\t \n \n}", "public void testCompare5() throws Exception {\r\n // smaller prizes\r\n ComponentCompetitionSituation situation1 = new ComponentCompetitionSituation();\r\n situation1.setPostingDate(new Date());\r\n situation1.setEndDate(new Date(situation1.getPostingDate().getTime() + 100000));\r\n situation1.setPrize(100D);\r\n\r\n // longer prizes\r\n ComponentCompetitionSituation situation2 = new ComponentCompetitionSituation();\r\n situation2.setPostingDate(new Date());\r\n situation2.setEndDate(new Date(situation2.getPostingDate().getTime() + 100000));\r\n situation2.setPrize(200D);\r\n\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation1, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation2, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // smaller prizes < longer prizes\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }" ]
[ "0.6106692", "0.6104147", "0.5993298", "0.59074825", "0.58663756", "0.58397627", "0.58323675", "0.58240294", "0.58062124", "0.5692272", "0.5691476", "0.5680095", "0.5627197", "0.5602392", "0.55983883", "0.5596707", "0.559395", "0.55536884", "0.55407995", "0.5477025", "0.5476911", "0.5400049", "0.53862876", "0.53688073", "0.53682107", "0.53682107", "0.5344984", "0.53440696", "0.53322756", "0.53303665", "0.5309091", "0.53024846", "0.52772295", "0.5250464", "0.5248451", "0.52343744", "0.52176356", "0.5216036", "0.52080697", "0.5204279", "0.52031296", "0.51895803", "0.518521", "0.51834637", "0.5181185", "0.517561", "0.5169363", "0.51683366", "0.51659185", "0.515419", "0.5151095", "0.51456296", "0.5134273", "0.51282406", "0.5126605", "0.51219755", "0.51206756", "0.51023054", "0.5100383", "0.50918716", "0.5087217", "0.50852305", "0.5076029", "0.5075299", "0.5074451", "0.5072676", "0.50715125", "0.5069761", "0.506928", "0.5067698", "0.5063116", "0.5057664", "0.505085", "0.50448483", "0.5041304", "0.503666", "0.5030791", "0.5025039", "0.5012289", "0.50116193", "0.50085306", "0.50037116", "0.50012475", "0.49950403", "0.49877962", "0.49841535", "0.49803793", "0.4978138", "0.49696714", "0.4966296", "0.4965077", "0.49420986", "0.49419236", "0.49389878", "0.4933791", "0.49313986", "0.49310273", "0.49285576", "0.49285403", "0.49246433", "0.49216273" ]
0.0
-1
Estimates the probability that a comparison holds using bin statistics
private double estimateFromBins(Binning bins, Comparator comp, Long value) { int[] valueBins = findBins(bins, value); int numBins = bins.getBins().length; if (comp == Comparator.LT) { return ((double) valueBins[0]) / ((double) numBins); } else if (comp == LTE) { return ((double) valueBins[1]) / ((double) numBins); } else if (comp == Comparator.GT) { // 1 - LTE estimation return 1 - ((double) valueBins[1]) / ((double) numBins); } else { // 1- LT estimation for GTE return 1 - ((double) valueBins[0]) / ((double) numBins); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void checkUpdateProbabilityOnHORNRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 1; j < 255; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = j;\r\n\t\t\t\tif(!MTS.BIMTS_H8.contains((Integer)r2))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t/*if(r2 == 1 || r2 == 2 || r2 == 4 || r2 == 8 || r2 == 16 || r2 == 32 || r2 == 64 || r2 == 128)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\t*/\r\n\t\t\t\telse\r\n\t\t\t\tfor(int k = 1; k < 255; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = k;\r\n\t\t\t\t\t//if(r3 == 1 || r3 == 2 || r3 == 4 || r3 == 8 || r3 == 16 || r3 == 32 || r3 == 64 || r3 == 128)\r\n\t\t\t\t\t\tif(!MTS.BIMTS_H8.contains((Integer)r3))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\ttotal++;\r\n\t\t\t\t\t\tint new_r3 = CompositionTable.LookUpTable(r1, r2);\r\n\t\t\t\t\t\tif(new_r3 < r3)\r\n\t\t\t\t\t\t\tupdate++;\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\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "public static long computeBin(final long[] histogram) {\n\t\tint threshold = -1;\n\t\tfinal double ptile = 0.5; // default fraction of foreground pixels\n\t\tfinal double[] avec = new double[histogram.length];\n\n\t\tfor (int i = 0; i < histogram.length; i++)\n\t\t\tavec[i] = 0.0;\n\n\t\tfinal double total = partialSum(histogram, histogram.length - 1);\n\t\tdouble temp = 1.0;\n\t\tfor (int i = 0; i < histogram.length; i++) {\n\t\t\tavec[i] = Math.abs((partialSum(histogram, i) / total) - ptile);\n\t\t\t// IJ.log(\"Ptile[\"+i+\"]:\"+ avec[i]);\n\t\t\tif (avec[i] < temp) {\n\t\t\t\ttemp = avec[i];\n\t\t\t\tthreshold = i;\n\t\t\t}\n\t\t}\n\t\treturn threshold;\n\t}", "public int alphaBinNum(float[] values) {\n\n /* Check if histogram sampling is possible. */\n if (values == null || values.length == 0) {\n\n return currentBinNum;\n }\n\n float minBin = 10;\n float minLbl = 10;\n\n /* Show a depiction of the weights being used. */\n int i, j, n, n2;\n\n /*\n * Histogram case, the most complex, start by gathering the values. If\n * none are toggled on, we will base this on all inputs which exist.\n */\n\n float minVal, maxVal;\n minVal = maxVal = 0;\n n = values.length;\n n2 = 2 * n;\n\n for (i = j = 0; i < n2; i++) {\n j = i % n;\n if (i == j) {\n n2 = n;\n }\n\n float oneval = values[j];\n\n if (oneval == Float.NaN) {\n continue;\n }\n\n if (minVal == maxVal && maxVal == 0) {\n minVal = maxVal = oneval;\n } else if (oneval < minVal) {\n minVal = oneval;\n } else if (oneval > maxVal) {\n maxVal = oneval;\n }\n }\n\n /*\n * Compute the best size to use for the value bins (dv). This responds\n * to density by using smaller increments along the x-axis when density\n * is larger.\n */\n\n if (minVal >= maxVal) {\n\n return currentBinNum;\n }\n float dv = minBin;\n\n dv = (float) .5;\n float delLbl = minLbl * dv / minBin;\n if (dv == 0.5) {\n delLbl = 1;\n } else if (dv == 0 || (maxVal - minVal) > dv * 25) {\n float minDv = (maxVal > -minVal ? maxVal : -minVal) / 5000;\n if (dv < minDv) {\n dv = minDv;\n }\n computeBinDelta(dv, delLbl);\n } else if (dv != minBin) {\n computeBinDelta(dv, delLbl);\n }\n\n int nbMax = 20;\n if ((maxVal - minVal) / dv > nbMax) {\n float dvSeed, dvPrev;\n for (dvSeed = dvPrev = dv, i = 0; i < 100; i++) {\n dvSeed *= 1.4;\n dv = dvSeed;\n computeBinDelta(dv, delLbl);\n if (dv == dvPrev) {\n continue;\n }\n if ((maxVal - minVal) / dv < nbMax) {\n break;\n }\n dvPrev = dvSeed = dv;\n }\n }\n\n /*\n * We want edge of the bins to be at half the bin size, containing at\n * least two even values of del2.\n */\n\n float del2 = delLbl * 2;\n float edge = dv * (((int) (minVal / dv)) - (float) 0.5);\n while (minVal - edge > dv) {\n edge += dv;\n }\n while (edge > minVal) {\n edge -= dv;\n }\n minVal = edge;\n edge = dv * (((int) (maxVal / dv)) + (float) 0.5);\n while (edge - maxVal > dv) {\n edge -= dv;\n }\n while (edge < maxVal) {\n edge += dv;\n }\n maxVal = edge;\n int nbins = (int) (0.5 + (maxVal - minVal) / dv);\n float mean2 = (minVal + maxVal) / 2;\n mean2 = mean2 > 0 ? del2 * (int) (0.5 + mean2 / del2) : -del2\n * (int) (0.5 - mean2 / del2);\n while (minVal > mean2 - del2 && maxVal < mean2 + del2) {\n nbins += 2;\n minVal -= dv;\n maxVal += dv;\n }\n\n return nbins;\n }", "int xBins();", "private void computeHistogramBins() {\r\n int nBins = (int) Math.ceil(hismax / binWidth);\r\n histoBins = new double[nBins];\r\n for (int i = 0; i < nBins; i++) {\r\n histoBins[i] = binWidth * (double) i + binWidth;\r\n }\r\n }", "double getBranchProbability();", "float getSpecialProb();", "public ProbabilityDistribution<T> bindProbs(boolean binary) {\n\t\tProbabilityDistribution<T> clone = clone();\n\n\t\t// Calculate the average\n\t\tdouble average = 0.5;\n\t\tif (!binary) {\n\t\t\taverage = 1.0 / size();\n\t\t}\n\n\t\t// Set those below the average to 0 and (if binary) above to 1\n\t\tfor (T element : itemProbs_.keySet()) {\n\t\t\tif (getProb(element) < average) {\n\t\t\t\tclone.set(element, 0);\n\t\t\t} else if (binary) {\n\t\t\t\tclone.set(element, 1);\n\t\t\t}\n\t\t}\n\n\t\t// Normalise if not binary\n\t\tif (!binary)\n\t\t\tclone.normaliseProbs();\n\t\treturn clone;\n\t}", "public static void main(String[] args){\n int s = 80;\n int n = (int) Math.pow(10, 7);\n Integer[] a = new Integer[n];\n Random rand = new Random();\n for (int i = 0; i < n; i++){\n a[i] = (int) (n*rand.nextDouble());\n }\n double binTime = binSearchT(s, a);\n double linTime = linSearchT(s, a);\n System.out.println(\"binTime: \"+ binTime);\n System.out.println(\"linTime: \"+ linTime);\n\n }", "public void calculateProbabilities(){\n\t}", "public static void checkUpdateProbabilityOnALLRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 1; j < 255; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = j;\r\n\t\t\t\t/*if(r2 == 1 || r2 == 2 || r2 == 4 || r2 == 8 || r2 == 16 || r2 == 32 || r2 == 64 || r2 == 128)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\telse*/\r\n\t\t\t\tfor(int k = 1; k < 255; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = k;\r\n\t\t\t\t\t/*if(r3 == 1 || r3 == 2 || r3 == 4 || r3 == 8 || r3 == 16 || r3 == 32 || r3 == 64 || r3 == 128)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse*/\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\ttotal++;\r\n\t\t\t\t\t\tint new_r3 = SetOperators.intersection(r3, \r\n\t\t\t\t\t\t\t\tCompositionTable.LookUpTable(r1, r2));\r\n\t\t\t\t\t\tif(new_r3 != r3 && new_r3 != 0)\r\n\t\t\t\t\t\t\tupdate++;\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\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "private double infobits(double[] probs) {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0; i < probs.length; i++) {\r\n\t\t\tsum += entropy(probs[i]);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "private double getProbabilityScore(Cell c,int bitmask)\n {\n\t return Math.pow(\n\t\t\t Math.pow(m_probs1[c.getCol()-1],(1&bitmask) ) * \n\t\t\t Math.pow(m_probs2[c.getRow()-1],(2&bitmask)/2) //geo-mean\n\t\t\t , Math.min(1,3.5-bitmask));\n }", "protected float computeProbs(int n)\n\t{\n\t\tfloat Cmi = 0;\n\t\t// Compute probabilities\n\t\tfor (int k = 0; k < bins; k++)\n\t\tfor (int l = 0; l < bins; l++)\n\t\t{\n\t\t float Pkl = Puv[k*bins+l];\n\t\t if (Pkl > 0)\n\t\t\t Cmi -= Pkl / n * Math.log(n * Pkl / (Pu[k] * Pv[l]));\n\t\t}\n\t\treturn Cmi;\n\t}", "int yBins();", "private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}", "private static int computeNumberOfBandsForThreshold(int nHashes, double jaccardThreshold) {\n int bands = nHashes;\n while (bands > 1) {\n if ((nHashes % bands) == 0) {\n double threshold = Math.pow((double) 1.0 / bands, (double) bands / nHashes);\n if (threshold > jaccardThreshold) {\n break;\n }\n }\n bands--;\n }\n return bands;\n }", "public static void checkUpdateProbabilityOnAtomicRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 0; j < 8; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = base_relations[j];\r\n\t\t\t\r\n\t\t\t\tfor(int k = 0; k < 8; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = base_relations[k];\r\n\t\t\t\t\ttotal++;\r\n\t\t\t\t\t//int new_r3 = CompositionTable.LookUpTable(r1, r2);\r\n\t\t\t\t\tint new_r3 = SetOperators.intersection(r3, \r\n\t\t\t\t\t\t\t\tCompositionTable.LookUpTable(r1, r2));\r\n\t\t\t\t\t//System.out.println(new_r3);\r\n\t\t\t\t\tif( new_r3 != r3 )\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\tupdate++;\r\n\t\t\t\t\t\t//System.out.println(new_r3);\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\t\r\n\t\tSystem.out.println(\" total \" + total + \" update \" + update);\r\n\t\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "private int totalInfeasibility(int[] chromosome) {\n\t\tint infeasibility = 0;\n\t\tint[] bins = new int[binCount];\n\t\tfor (int i = 0; i < chromosome.length; i++) {\n\t\t\tif (chromosome[i] >= bins.length) {\n\t\t\t\tinfeasibility += 10;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tbins[chromosome[i]] += packageWeights[i]; //put package into bin\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"noooo\");\n\t\t\t}\n\n\t\t}\n\n\t\tfor (int i = 0; i < bins.length; i++) {\n\t\t\tif (bins[i] > binSize)\n\t\t\t\tinfeasibility += bins[i] - binSize;\n\t\t}\n\t\treturn infeasibility;\n\t}", "public void computeHistogram() {\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint a[]= {2,1,6,4};\r\n\t\tint b[]= {1,5};\r\n\t\tint count=0;\r\n\t\tfor(int i=0;i<a.length;i++)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<b.length;j++)\r\n\t\t\t{\r\n\t\r\n\t\t\t\tif(Math.pow(a[i],b[j])>Math.pow(b[j],a[i]))\r\n\t\t\t\t\t\r\n\t\t\t\t\tcount=count+1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(count);\r\n\t\t\r\n\r\n\t}", "public Bounds getProbabilityBounds();", "protected int getBinIndex(double w){\n\t\tdouble lnw = Math.log(w);\n\t\tdouble i = Math.floor((lnw - m_lnA0)/m_lnR);\n\t\tint result = (int)i;\n\t\tif(result >= m_numBins.getValue() || result < 0){\n\t\t\tresult = -1;\n\t\t}\n\t\treturn result;\n\t}", "static void check(int arr[],int sum)\r\n {\r\n boolean binmap[] = new boolean[max]; /* by default this is array of false as {false,false,false,false,......,false} */\r\n for(int i=0;i<arr.length;i++)\r\n {\r\n int temp=sum-arr[i];\r\n if(temp>0 && binmap[temp]){ /* in condition , we can use binmap[temp] which means binmap[temp]==true */\r\n System.out.println(\"two numbers in given array whose sum is equal to given sum are :\"+temp+ \" and \" +arr[i]);\r\n }\r\n binmap[arr[i]]=true;\r\n }\r\n }", "public static ArrayList < ArrayList < Double >> binPack(double weight[], int n, double bin_cap) { \r\n int binCount = 0;\r\n int k = 0;\r\n double[] bin_space = new double[n];\r\n\r\n ArrayList < Integer > bin = new ArrayList < Integer > ();\r\n ArrayList < Double > val = new ArrayList < Double > ();\r\n ArrayList < ArrayList < Double >> binVal = new ArrayList < ArrayList < Double >> ();\r\n binVal.add(k, new ArrayList < Double > ());\r\n System.out.println(\".......Commencing Calculation...........\\n\");\r\n startTime = System.nanoTime();\r\n for (int i = 0; i < n; i++) {\r\n int j;\r\n for (j = 0; j < binCount; j++) {\r\n \r\n if (bin_space[j] >= weight[i]) {\r\n bin_space[j] = bin_space[j] - weight[i];\r\n //val.add(weight[i]);\r\n (binVal.get(j)).add((weight[i]));\r\n k=j+1;\r\n System.out.println(\"---Bin \" + j + \" took in weight \" + weight[i]);\r\n break;\r\n }\r\n \r\n }\r\n System.out.println(\"*Bad fit for next weight size \"+ weight[i]+ \r\n \"\\n\\n ***NEW BIN CREATED***\\n\");\r\n if (j == binCount) {\r\n \r\n bin_space[binCount] = bin_cap - weight[i];\r\n //val.add(weight[i]);\r\n binCount++;\r\n //k++;\r\n bin.add(j);\r\n binVal.add(j, new ArrayList < Double > ());\r\n (binVal.get(j)).add((weight[i]));\r\n k=j+1;\r\n System.out.println(\"---Bin \" + k + \" took in weight **\" + weight[i]);\r\n }\r\n } \r\n endTime = System.nanoTime();\r\n elapsedTime = (endTime- startTime);\r\n System.out.println(\"\\nBIN PACKING ALGORITHM COMPLETE\\n\");\r\n \r\n return binVal;\r\n }", "public int getWeightedBucket() {\n float val = (float)(new Float((Math.random() * 100)));\n int totalWeight = 0;\n int i = 0;\n for (i = 0; i < weights.length; i++) {\n totalWeight += weights[i];\n if (val <= totalWeight)\n break;\n }\n return(i);\n }", "@Override\r\n\tpublic int[] getSample(Random rng) {\r\n\t\tif (!ready)\r\n\t\t\tthrow new RuntimeException(\"must normalize first\");\r\n\t\t\r\n\t\tint bins[] = new int[no_goods];\r\n\t\t\r\n\t\tfor (int i = 0; i<no_goods; i++) {\r\n\t\t\tdouble[] pmf = prob[i].get(r_tmp[i]);\r\n\t\r\n\t\t\t// choose a random spot on the cdf\r\n\t\t\tdouble random = rng.nextDouble();\r\n\t\t\t\r\n\t\t\t// compute cdf. todo: maybe we should precompute inverse of cdf in normalize() so that\r\n\t\t\t// we can avoid a loop here?\r\n\t\t\tdouble cdf = 0.0;\r\n\t\t\tfor (int j = 0; j<pmf.length; j++) {\r\n\t\t\t\tcdf += pmf[j];\r\n\t\t\t\t\r\n\t\t\t\tif (cdf >= random) {\r\n\t\t\t\t\tbins[i] = j;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// add index to realized so that in next round we get the pmf conditional\r\n\t\t\t\t\t// on our result for this round\r\n\t\t\t\t\tfor (int k = 0; k<=i; k++)\r\n\t\t\t\t\t\tr_tmp[i+1].d[k] = bins[k];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// go onto next good\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// sanity check: make sure we picked something. \r\n\t\t}\r\n\t\t\r\n\t\treturn bins;\r\n\t}", "private double weight(){\n return ((double) (m_PositiveCount + m_NegativeCount)) / ((double) m_PositiveCount);\n }", "public float histogramMethod(Slice slice) \n\t{\n\t\tHistogram hh = new Histogram();\n\t\tint ii = 0;\n\n\t\t//\n\t\t// Compute the thresholded histogram.\n\t\t//\n\t\tfloat lower_threshold = (float)0.01;\n\t\tfloat upper_threshold = (float)0.3 * (float)Statistics.max(slice);\n\t\thh.histogram( slice, lower_threshold, upper_threshold );\n\n\t\t//\n\t\t// Get the counts and bins.\n\t\t//\n\t\tfloat[] bins = hh.getBins();\n\t\tfloat[] counts = hh.getCounts();\n\n\t\t//\n\t\t// Find the maximum count.\n\t\t//\n\t\tfloat max = (float)0.0; int max_index = 0;\n\t\tfor(ii=0; ii<counts.length; ii++) {\n\t\t\tif( counts[ii] > max ) {\n\t\t\t\tmax_index = ii;\n\t\t\t\tmax = counts[ii];\n\t\t\t}\n\t\t}\n\n\t\t//\n\t\t// Find the first minimum after the maximum\n\t\t//\n\t\tii = max_index + 1;\n\t\tdo {\n\t\t\tii++;\n\t\t} while( counts[ii] < counts[ii-1] && ( ii < bins.length ) );\n\n\t\tfloat sigma = (float)0.0;\n\t\tif( ii >= bins.length-1 ) {\n\t\t\tSystem.out.println(\"Gack...could not find the first minimum.\");\n\t\t}\n\t\telse {\n\t\t\tsigma = bins[ii];\n\t\t}\n\n\t\treturn sigma;\n\t}", "private double estimateCategoricalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Map<PropertyValue, Double>> map1 =\n stats1.getCategoricalSelectivityEstimation();\n Map<String, Map<PropertyValue, Double>> map2 =\n stats2.getCategoricalSelectivityEstimation();\n Map<PropertyValue, Double> propStats1 = map1.getOrDefault(property1, null);\n Map<PropertyValue, Double> propStats2 = map2.getOrDefault(property2, null);\n // property not sampled or not considered\n if (propStats1 == null || propStats2 == null) {\n // property not considered => return 0.5\n if (!isPropertyRelevant(property1) && !isPropertyRelevant(property2)) {\n return 0.5;\n } else {\n // property not sampled => very rare => return very small value\n return 0.0001;\n }\n }\n if (comp == EQ || comp == NEQ) {\n double sum = 0.;\n for (Map.Entry<PropertyValue, Double> entry1 : propStats1.entrySet()) {\n double val1Selectivity = entry1.getValue();\n for (Map.Entry<PropertyValue, Double> entry2 : propStats2.entrySet()) {\n if (entry1.getKey().equals(entry2.getKey())) {\n double val2Selectivity = entry2.getValue();\n sum += val1Selectivity * val2Selectivity;\n }\n }\n }\n return comp == EQ ? sum : 1. - sum;\n } else {\n // shouldn't happen, categorical variables can only be compared with EQ or NEQ\n return 0.;\n }\n }", "public int index_bin(Example e) {\n\n int i;\n int index = -1; // -1 = EXAMPLES HAS UNKNOWN FEATURE VALUE\n int number_satisfied = 0;\n if (!Example.FEATURE_IS_UNKNOWN(e, feature_index)) { // written for checks, can be sped up\n for (i = 0; i < histogram_proportions.size(); i++) {\n if (Feature.EXAMPLE_MATCHES_FEATURE(\n e,\n histogram_features.elementAt(i),\n feature_index,\n histogram_features.elementAt(i).type)) {\n if ((index == -1) || (Algorithm.R.nextDouble() < 0.5)) {\n index = i;\n number_satisfied++;\n }\n }\n }\n if (index == -1) {\n System.out.println(e + \" :: \");\n for (i = 0; i < histogram_proportions.size(); i++)\n System.out.println(histogram_features.elementAt(i));\n\n Dataset.perror(\"Histogram.class :: example \" + e + \" has no bin in histogram \");\n }\n }\n return index;\n }", "public static double binSearchT(int s, Integer[] a){\n Random rand = new Random();\n int searchVar;\n Stopwatch timer = new Stopwatch();\n Arrays.sort(a);\n for (int i = 0; i < s; i++){\n searchVar = (int)(rand.nextDouble()*a.length);\n Arrays.binarySearch(a, searchVar);\n }\n return timer.elapsedTime(); // the method returns the elapsed time\n }", "public void binSearch(int current, int first, int last) {\r\n long average2 = 0, timeB = 0, stanDev = 0;\r\n System.out.println(\"\\nBINARY SEARCH\\n\");\r\n for (int i = 0; i < 10; i++) {\r\n long start = System.nanoTime();\r\n while (last >= first) {\r\n int mid = (last + first) / 2;//FINDS THE MID WAY POINT IN ORDER TO KEEP HALF-ING THE SEARCH RESULTS.\r\n if (A[mid] == current) {\r\n long stop = System.nanoTime();\r\n long timelength = (stop - start);\r\n timeB += timelength; // USED FOR GETTING AVERAGE. \r\n bin[k][i] = timelength;//USED FOR STORING THE TIME IT TOOK FOR EACH TEST, IT IS USED LATER ON TO DISPLAY IN THE CHART.\r\n binary[i] = timelength;//USED FOR FINDING STANDARD DEVIATION.\r\n System.out.println(\"The number: \" + current + \" was found in the array index: \" + A[mid]\r\n + \"\\nIt took: \" + timelength + \" nanoseconds.\");\r\n break;\r\n\r\n } else if (A[mid] < current) {\r\n first = mid + 1;\r\n } else {\r\n last = mid - 1;\r\n }\r\n }\r\n }\r\n average2 = (timeB / 10);\r\n linAvAndDev[h][0] = average2;\r\n for (int j = 0; j < 10; j++) {\r\n stanDev += Math.pow((binary[j] - average2), 2.0);\r\n }\r\n stanDev /= 10;\r\n stanDev = (long) Math.sqrt(stanDev);\r\n linAvAndDev[h][1] = stanDev;\r\n System.out.println(\"The Avearge time for the Binary Search was: \" + average2 + \" nanoseconds.\"\r\n + \"\\nThe Standard Deviation time for the Binary Search was: \" + stanDev + \" nanoseconds.\");\r\n h += 1;\r\n k += 1;\r\n }", "private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp, List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateNumericalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n long overallCount = 0L;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n }\n double sum = 0.;\n for (TemporalElementStats stat : relevantStats) {\n sum += estimateNumericalPropertyProb(stat, property, comp, value) *\n (((double) stat.getElementCount() / overallCount));\n }\n return sum;\n }", "private void calculateBPRange() {\n\t\tbroadPhaseLength = 0.0f;\n\t\tfor (Vector2f p : points) {\n\t\t\tbroadPhaseLength = Math.max(broadPhaseLength, Math.abs(p.length()));\n\t\t}\n\t}", "float genChance();", "int getPercentageHeated();", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp,\n List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateCategoricalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "public float histogramMethod(Volume volume) \n\t{\n\t\tHistogram hh = new Histogram();\n\t\tint ii = 0;\n\n\t\t//\n\t\t// Compute the thresholded histogram.\n\t\t//\n\t\tfloat lower_threshold = (float)0.01;\n\t\tfloat upper_threshold = (float)0.3 * (float)Statistics.max(volume);\n\t\thh.histogram( volume, lower_threshold, upper_threshold );\n\n\t\t//\n\t\t// Get the counts and bins.\n\t\t//\n\t\tfloat[] bins = hh.getBins();\n\t\tfloat[] counts = hh.getCounts();\n\n\t\t//\n\t\t// Find the maximum count.\n\t\t//\n\t\tfloat max = (float)0.0; int max_index = 0;\n\t\tfor(ii=0; ii<counts.length; ii++) {\n\t\t\tif( counts[ii] > max ) {\n\t\t\t\tmax_index = ii;\n\t\t\t\tmax = counts[ii];\n\t\t\t}\n\t\t}\n\n\t\t//\n\t\t// Find the first minimum after the maximum\n\t\t//\n\t\tii = max_index + 1;\n\t\tdo {\n\t\t\tii++;\n\t\t} while( counts[ii] < counts[ii-1] && ( ii < bins.length ) );\n\n\t\tfloat sigma = (float)0.0;\n\t\tif( ii >= bins.length-1 ) {\n\t\t\tSystem.out.println(\"Gack...could not find the first minimum.\");\n\t\t}\n\t\telse {\n\t\t\tsigma = bins[ii];\n\t\t}\n\n\t\treturn sigma;\n\t}", "public Histogram(int bins, double minValue, double maxValue) {\n this.bins = new int[bins + 2];//Two additional bins for out-of-bounds values.\n this.minValue = minValue;\n this.maxValue = maxValue;\n binDiff = (maxValue - minValue) / bins;\n }", "private int getPixelBin(int[] pixel) {\r\n\t\treturn (int) ((int) (pixel[0] / redValues) * (binsPerColour)\r\n\t\t\t\t* (binsPerColour) + (int) (pixel[1] / greenValues)\r\n\t\t\t\t* (binsPerColour) + (int) (pixel[2] / blueValues));\r\n\t}", "public Binarization(int threshold) {\n this.threshold = threshold;\n }", "public float histogramMethod(MCVolume volume) \n\t{\n\t\tHistogram hh = new Histogram();\n\t\tint ii = 0;\n\n\t\t//\n\t\t// Compute the thresholded histogram.\n\t\t//\n\t\tfloat lower_threshold = (float)0.01;\n\t\tfloat upper_threshold = (float)0.3 * (float)Statistics.max(volume);\n\t\thh.histogram( volume, lower_threshold, upper_threshold );\n\n\t\t//\n\t\t// Get the counts and bins.\n\t\t//\n\t\tfloat[] bins = hh.getBins();\n\t\tfloat[] counts = hh.getCounts();\n\n\t\t//\n\t\t// Find the maximum count.\n\t\t//\n\t\tfloat max = (float)0.0; int max_index = 0;\n\t\tfor(ii=0; ii<counts.length; ii++) {\n\t\t\tif( counts[ii] > max ) {\n\t\t\t\tmax_index = ii;\n\t\t\t\tmax = counts[ii];\n\t\t\t}\n\t\t}\n\n\t\t//\n\t\t// Find the first minimum after the maximum\n\t\t//\n\t\tii = max_index + 1;\n\t\tdo {\n\t\t\tii++;\n\t\t} while( counts[ii] < counts[ii-1] && ( ii < bins.length ) );\n\n\t\tfloat sigma = (float)0.0;\n\t\tif( ii >= bins.length-1 ) {\n\t\t\tSystem.out.println(\"Gack...could not find the first minimum.\");\n\t\t}\n\t\telse {\n\t\t\tsigma = bins[ii];\n\t\t}\n\n\t\treturn sigma;\n\t}", "public static double RELATIVE_PERCENTAGE_SUPPORT(Feature a, Feature b) {\n double num = 0.0, den = 0.0, dinf, dsup, rat = -1.0;\n int i;\n\n if (!a.type.equals(b.type)) Dataset.perror(\"Feature.class :: not the same class for features\");\n\n if (Feature.IS_CONTINUOUS(a.type)) {\n if ((b.dmax == b.dmin) || (a.dmax <= b.dmin) || (a.dmin >= b.dmax)) return 0.0;\n\n if (a.dmin < b.dmin) dinf = b.dmin;\n else dinf = a.dmin;\n\n if (a.dmax > b.dmax) dsup = b.dmax;\n else dsup = a.dmax;\n\n num = dsup - dinf;\n den = b.dmax - b.dmin;\n } else if (Feature.IS_INTEGER(a.type)) {\n if ((a.imax < b.imin) || (a.imin > b.imax)) return 0.0;\n\n if (a.imin <= b.imin) dinf = (double) b.imin;\n else dinf = (double) a.imin;\n\n if (a.imax >= b.imax) dsup = (double) b.imax;\n else dsup = (double) a.imax;\n\n num = dsup - dinf + 1.0;\n den = ((double) (b.imax - b.imin)) + 1.0;\n } else if (Feature.IS_NOMINAL(a.type)) {\n if (b.modalities.size() == 0) return 0.0;\n else den = (double) b.modalities.size();\n\n num = 0.0;\n for (i = 0; i < a.modalities.size(); i++)\n if (b.modalities.contains((String) a.modalities.elementAt(i))) num += 1.0;\n } else Dataset.perror(\"Feature.class :: feature type unknown\");\n\n rat = num / den;\n if ((rat < 0.0) || (rat > 1.0))\n Dataset.perror(\"Feature.class :: ratio \" + rat + \" not a probability\");\n return rat;\n }", "private List<Bin> discretizeRow(List<String> rawData) {\n\t\tList<Bin> binForThisAttr = new ArrayList<>();\n\t\tList<Double> procData = new ArrayList<>();\n\t\t// are we working with numbers or actual Strings\n\t\t// convert strings into Double, add to data attributes\n\t\tfor (int i = 0; i < rawData.size(); i++) {\n\t\t\tString raw = rawData.get(i);\n\t\t\t// check current attribute value for String type or floating point type\n\t\t\tif ((rawData.get(i).chars().allMatch(Character::isDigit) || rawData.get(i).contains(\".\"))) {\n\t\t\t\t//convert number strings into Doubles, or strings into unique Doubles\n\t\t\t\tprocData.add(Double.valueOf(raw));\n\t\t\t} else {\n\t\t\t\t// convert Strings into unique integers, add to data attributes\n\t\t\t\tprocData.add((double) raw.hashCode());\n\t\t\t} // end if-else\n\t\t}\n\n\t\t// sort data into ascending list of values\n\t\tCollections.sort(procData);\n\n\t\t// generate bins based on Naive Estimator Process\n\t\tfor (int i = 0; i < procData.size(); i++) {\n\t\t\tif (i == 0) {\n\t\t\t\t// append bin with lowest possible value\n\t\t\t\tbinForThisAttr.add(new Bin(Double.MIN_VALUE, procData.get(i), i));\n\t\t\t\t// binForThisAttr.get(binForT i = 0; i hisAttr.size() - 1).incrementFreq();\n\t\t\t} else if (i == procData.size() - 1) {\n\t\t\t\t// append bin with highest possible value\n\t\t\t\tbinForThisAttr.add(new Bin(procData.get(i), Double.MAX_VALUE, i));\n\t\t\t\t// binForThisAttr.get(binForThisAttr.size() - 1).incrementFreq();\n\t\t\t} else {\n\t\t\t\t// estimate the range of bin based on nearby points of data\n\t\t\t\tdouble lowBound = (procData.get(i - 1) + procData.get(i)) / 2;\n\t\t\t\tdouble highBound = (procData.get(i) + procData.get(i + 1)) / 2;\n\t\t\t\tbinForThisAttr.add(new Bin(lowBound, highBound, i));\n\t\t\t\t// binForThisAttr.get(binForThisAttr.size() - 1).incrementFreq();\n\t\t\t} // end if-else statement\n\t\t} // end for\n\t\treturn binForThisAttr;\n\t}", "protected double ABT() {\r\n\t\tDouble output = Double.MAX_VALUE;\r\n\t\tIterator<Double> bws = this.flowBandwidth.values().iterator();\r\n\t\twhile (bws.hasNext()) {\r\n\t\t\tdouble temp = bws.next();\r\n\t\t\tif (temp < output) {\r\n\t\t\t\toutput = temp;\r\n\t\t\t\t// System.out.println(\"[GeneralSimulator.ABT]: \" + output);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// System.out.println(\"[GeneralSimulator.ABT]: succfulCount \"\r\n\t\t// + this.successfulCount);\r\n\t\treturn output * this.successfulCount;\r\n\t}", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n if (comp != EQ && comp != NEQ) {\n return 0.;\n }\n long overallCount = 0L;\n boolean found = false;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n if (stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n found = true;\n }\n }\n // property not sampled or not considered\n if (!found) {\n // not relevant/considered => simply return 0.5\n if (!isPropertyRelevant(property)) {\n return 0.5;\n } else {\n // not sampled => very rare or not even there => return very small value\n return 0.0001;\n }\n }\n\n double prob = 0.;\n for (TemporalElementStats stat : relevantStats) {\n if (!stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n // not sampled ? ....\n double factor = 0.0001;\n // ...or just excluded/not relevant?\n if (!isPropertyRelevant(property)) {\n factor = 0.5;\n }\n prob += factor * ((double) stat.getElementCount() / overallCount);\n continue;\n }\n prob += stat.getCategoricalSelectivityEstimation()\n .get(property)\n .getOrDefault(value, 0.0001) *\n ((double) stat.getElementCount() / overallCount);\n }\n if (comp == EQ) {\n return prob;\n } else {\n //NEQ\n return 1 - prob;\n }\n }", "public int h(int[] solution) {\n\t\tint[] bins = new int[binCount];\n\t\tint nonEmptyBins = 0;\n\t\tint overFilledBins = 0;\n\t\tint overFillWeight = 0;\n\n\t\tfor (int i = 0; i < solution.length; i++) {\n\t\t\tint bin = solution[i];\n\t\t\tint weight = packageWeights[i];\n\t\t\tbins[bin] += weight;\n\t\t}\n\n\t\tfor (int i = 0; i < bins.length; i++) {\n\t\t\tif (bins[i] != 0) {\n\t\t\t\tnonEmptyBins++;\n\t\t\t}\n\t\t\tif (bins[i] > binSize) {\n\t\t\t\toverFilledBins++;\n\t\t\t\toverFillWeight += (bins[i] - binSize);\n\t\t\t}\n\t\t}\n\t\tif (overFilledBins > 0)\n\t\t\treturn (nonEmptyBins + binSize * (overFillWeight));\n\t\telse\n\t\t\treturn nonEmptyBins;\n\t}", "public void put(double value) {\n int k = (int) ((value - minValue) / binDiff + 1);\n if (k < 0) k = 0;\n if (k >= bins.length) k = bins.length - 1;\n bins[k]++;\n }", "public double getPercentThreshold()\n {\n return percentThreshold;\n }", "public void randomiseBinary()\r\n\t{\r\n\t\tfor (int i = 0; i < binary.length; i++)\r\n\t\t\tbinary[i] = Math.random() >= 0.5;\r\n\t}", "private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}", "float getBonusPercentHP();", "float getThreshold();", "public static int driver()\r\n {\r\n ArrayList<ArrayList<Double>> binVal = getUserInput();\r\n int binlength = binVal.size()-1;\r\n String srep = Arrays.toString(binVal.toArray());\r\n //System.out.println(\" Driver\"+Arrays.toString(binVal.toArray()));\r\n report( srep, binlength);\r\n return display(binlength);\r\n }", "public void testTwoWayDistribution() {\n for(int p = 0; p < 20; p++) {\n int[] landings = new int[2];\n for(long in = 0; in < 100000; in++) {\n long longHash = FPGenerator.std64.fp(p+\"a\"+in);\n// long longHash = rand.nextLong();\n// long longHash = ArchiveUtils.doubleMurmur((p+\":\"+in).getBytes());\n landings[conhash.bucketFor(longHash, 2)]++;\n }\n// System.out.println(landings[0]+\",\"+landings[1]);\n assertTrue(\"excessive changes\",Math.abs(landings[0]-landings[1]) < 2000); \n }\n }", "abstract double rightProbability();", "double getUpperThreshold();", "private double estimateNumericalPropertyProb(TemporalElementStats stat, String property,\n Comparator comp, PropertyValue value) {\n // property not sampled or not considered\n if (!stat.getNumericalPropertyStatsEstimation().containsKey(property)) {\n // if property not excluded, return very small value\n // if excluded, it is irrelevant, return 0.5\n return isPropertyRelevant(property) ? 0.0001 : 0.5;\n }\n Double[] propertyStats = stat.getNumericalPropertyStatsEstimation().get(property);\n NormalDistribution dist = new NormalDistribution(propertyStats[0],\n Math.max(Math.sqrt(propertyStats[1]), VERY_LOW_PROB));\n double doubleValue = ((Number) value.getObject()).doubleValue();\n double occurenceProb = stat.getNumericalOccurrenceEstimation().get(property);\n if (comp == EQ) {\n return VERY_LOW_PROB * occurenceProb;\n } else if (comp == NEQ) {\n return (1. - VERY_LOW_PROB) * occurenceProb;\n } else if (comp == LTE) {\n return dist.cumulativeProbability(doubleValue) * occurenceProb;\n } else if (comp == LT) {\n return occurenceProb * (dist.cumulativeProbability(doubleValue) - VERY_LOW_PROB);\n } else if (comp == GTE) {\n return occurenceProb *\n (1. - dist.cumulativeProbability(doubleValue) + VERY_LOW_PROB);\n } else {\n //GT\n return occurenceProb * (1. - dist.cumulativeProbability(doubleValue));\n }\n }", "@Test\n public void genNeighStateProbability() {\n double[] metrics = new double[STATES.length * STATES.length];\n double sum = 0;\n Random rand = new Random();\n for (int i = 0; i < metrics.length; i++) {\n int x = i / STATES.length;\n int y = i % STATES.length;\n if (x == y) {\n metrics[i] = 0;\n } else {\n double d = Math.abs(rand.nextGaussian());//Math.exp(-Math.abs(STATES[x] - STATES[y]) / 3) * Math.abs(rand.nextGaussian());\n metrics[i] = d;\n sum += d;\n }\n }\n final double finalSum = sum;\n metrics = DoubleStream.of(metrics).map(d -> d / finalSum).toArray();\n for (int i = 0; i < metrics.length; i++) {\n int x = i / STATES.length;\n int y = i % STATES.length;\n if (metrics[i] > 0.01) {\n System.out.printf(\"%d:%d:%.4f\\n\", STATES[x], STATES[y], metrics[i]);\n }\n }\n }", "public int Output(double sample[]) {\n\t\treturn MajorityVote(sample);\n\t}", "private double estimateNumericalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Double[]> map1 = stats1.getNumericalPropertyStatsEstimation();\n Map<String, Double[]> map2 = stats2.getNumericalPropertyStatsEstimation();\n Double[] propStats1 = map1.getOrDefault(property1, null);\n Double[] propStats2 = map2.getOrDefault(property2, null);\n if (propStats1 == null || propStats2 == null) {\n return 0.0001;\n }\n double occurrence = stats1.getNumericalOccurrenceEstimation()\n .getOrDefault(property1, 0.) *\n stats2.getNumericalOccurrenceEstimation().getOrDefault(property2, 0.);\n // assuming both properties are normally distributed,\n // their difference is also normally distributed\n NormalDistribution differenceDist = new NormalDistribution(\n propStats1[0] - propStats2[0],\n Math.max(Math.sqrt(propStats1[1] + propStats2[1]), VERY_LOW_PROB));\n\n if (comp == EQ) {\n return occurrence * differenceDist.density(0.);\n } else if (comp == NEQ) {\n return occurrence * (1. - differenceDist.density(0.));\n } else if (comp == LTE) {\n return occurrence * (differenceDist.cumulativeProbability(0.));\n } else if (comp == LT) {\n return occurrence * (differenceDist.cumulativeProbability(0.) -\n differenceDist.density(0.));\n } else if (comp == GTE) {\n return occurrence * (1. - differenceDist.cumulativeProbability(0.) +\n differenceDist.density(0.));\n } else {\n //GT\n return occurrence * (1. - differenceDist.cumulativeProbability(0.));\n }\n }", "int compareToBinary(binary b);", "double greenPercentage();", "@Test\n public static void tinyLBTest() {\n final double[] answers = {0.0, 0.004592032688529923, 0.04725537386564205,\n 0.1396230607626959, 0.2735831034867167, 0.4692424353373485};\n final double kappa = 2.0;\n assertTrue( 0.0 == approximateLowerBoundOnP(0, 0, kappa) );\n final long n = 5;\n for (long k = 0; k <= n; k++) {\n final double lb = approximateLowerBoundOnP(n, k, kappa);\n final double est = estimateUnknownP(n, k);\n assertTrue(lb <= est);\n assertTrue(Math.abs(lb - answers[(int) k]) < 1e-14);\n // System.out.printf (\"LB\\t%d\\t%d\\t%.1f\\t%.16g%n\", n, k, kappa, lb);\n }\n }", "public static void bPercent(int[] a, int[] b, PrintStream output) {\n int percent = (int) Math.round((((double) b[0])/(b[0]+a[0]))*100);\n output.print(\"[\" + percent +\"%\");\n\n // for loop to print the percentage of b answers for dimensions 2-4\n for(int i=1; i< NUM_OF_DIMENSIONS; i++){\n percent = (int) Math.round((((double) b[i])/(b[i]+a[i]))*100);\n output.print(\", \" + percent + \"%\");\n }\n output.print(\"] = \"); \n }", "public void testPointRangeWeightCount() throws IOException {\n Directory dir = newDirectory();\n RandomIndexWriter w = new RandomIndexWriter(random(), dir);\n\n int numPoints = random().nextInt(1, 10);\n int[] points = new int[numPoints];\n\n int numQueries = random().nextInt(1, 10);\n int[] lowerBound = new int[numQueries];\n int[] upperBound = new int[numQueries];\n int[] expectedCount = new int[numQueries];\n\n for (int i = 0; i < numQueries; i++) {\n // generate random queries\n lowerBound[i] = random().nextInt(1, 10);\n // allow malformed ranges where upperBound could be less than lowerBound\n upperBound[i] = random().nextInt(1, 10);\n }\n\n for (int i = 0; i < numPoints; i++) {\n // generate random 1D points\n points[i] = random().nextInt(1, 10);\n if (random().nextBoolean()) {\n // the doc may have at-most 1 point\n Document doc = new Document();\n doc.add(new IntPoint(\"point\", points[i]));\n w.addDocument(doc);\n for (int j = 0; j < numQueries; j++) {\n // calculate the number of points that lie within the query range\n if (lowerBound[j] <= points[i] && points[i] <= upperBound[j]) {\n expectedCount[j]++;\n }\n }\n }\n }\n w.commit();\n w.forceMerge(1);\n\n IndexReader reader = w.getReader();\n IndexSearcher searcher = new IndexSearcher(reader);\n if (searcher.leafContexts.isEmpty() == false) { // we need at least 1 leaf in the segment\n for (int i = 0; i < numQueries; i++) {\n Query query = IntPoint.newRangeQuery(\"point\", lowerBound[i], upperBound[i]);\n Weight weight = searcher.createWeight(query, ScoreMode.COMPLETE_NO_SCORES, 1);\n assertEquals(expectedCount[i], weight.count(searcher.leafContexts.get(0)));\n }\n }\n\n reader.close();\n w.close();\n dir.close();\n }", "public void fillBins() {\n\t\t// grab our current data and then transpose it\n\t\tList<List<String>> currentData = dc.getDataFold().get(currentFold);\n\t\tList<List<String>> tranData = dc.transposeList(currentData);\n\t\tfor (int row = 0; row < tranData.size(); row++) {\n\t\t\t// for each row of attribute values, discretize it\n\t\t\tList<Double> procData = new ArrayList<>();\n\t\t\t// for each String of raw data, convert it into a value to place into a bin\n\t\t\tfor (String rawData : tranData.get(row)) {\n\t\t\t\tif (rawData.chars().allMatch(Character::isDigit) || rawData.contains(\".\")) {\n\t\t\t\t\tprocData.add(Double.parseDouble(rawData));\n\t\t\t\t} else {\n\t\t\t\t\t// not perfect, but useable in the small domain of values we use for data\n\t\t\t\t\tprocData.add((double) rawData.hashCode());\n\t\t\t\t} // end if-else\n\t\t\t} // end for\n\n\t\t\t// for each value we have, place it into a corresponding bin\n\t\t\tfor (double value : procData) {\n\t\t\t\tfor (Bin bin : attribBins.get(row)) {\n\t\t\t\t\tif (bin.binContains(value)) {\n\t\t\t\t\t\tbin.incrementFreq();\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\t}", "abstract int binSearch(int[] array, int num, int left, int right);", "private Binning getBins(TemporalElementStats elementStats, TimeSelector.TimeField field1) {\n if (field1 == TimeSelector.TimeField.TX_FROM) {\n return elementStats.getEstimatedTimeBins()[0];\n } else if (field1 == TX_TO) {\n return elementStats\n .getEstimatedTimeBins()[1];\n } else if (field1 == TimeSelector.TimeField.VAL_FROM) {\n return elementStats.getEstimatedTimeBins()[2];\n } else {\n return elementStats.getEstimatedTimeBins()[3];\n }\n }", "public interface OrderBookBalancingLogic {\n boolean balancingByPercentage();\n}", "long countByExample(XPsDigest95thPercentileByAvgUsExample example);", "public boolean isHappening(int probability){\n return r.nextDouble() <= probability / 100.0;\n }", "boolean hasBonusPercentHP();", "@Override\r\n\tpublic double getProb(double price, double[] realized) {\r\n\t\treturn getPMF(realized)[ bin(price, precision) ];\r\n\t}", "public double compare(double x, double y) {\n\t\tif (Math.abs(x - y) > _threshold)\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn 1;\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] array = new int[n];\n for(int i = 0 ; i < n ; i++)\n array[i] = sc.nextInt();\n int bCharged = sc.nextInt();\n int sum = Arrays.stream(array).sum();\n int bActual = (sum - array[k]) / 2;\n if(bCharged <= bActual)\n System.out.println(\"Bon Appetit\");\n else\n System.out.println(bCharged - bActual);\n }", "private double[] computeHistrogram(ArrayList<Feature> freature, String keyID) {\r\n\r\n int nBins = (int) Math.ceil(hismax / binWidth);\r\n ArrayList<Double> values = FeatureOps.getSpecifiedFeatureNumericalPropertyAsArrayList(freature, keyID);\r\n double[] d1 = List2Prims.doubleFromDouble(values);\r\n\r\n double[] hist = new double[nBins];\r\n\r\n int bin;\r\n for (int i = 0; i < d1.length; i++) {\r\n bin = (int) Math.floor((double) nBins * (d1[i] / hismax));// \r\n bin = Math.min(nBins - 1, bin);\r\n hist[bin]++;\r\n }\r\n return hist;\r\n }", "public double calcProbs(Entry newEntry) {\r\n\t\ttotal = Collections.frequency(hasCOVID19, \"yes\");\r\n\t\tpIfYes += Collections.frequency(temperatureIfCOVID19,newEntry.getTemperature()) / total;\r\n\t\tpIfYes *= Collections.frequency(achesIfCOVID19,newEntry.getAches()) / total;\r\n\t\tpIfYes *= Collections.frequency(coughIfCOVID19,newEntry.getCough()) / total;\r\n\t\tpIfYes *= Collections.frequency(soreThroatIfCOVID19,newEntry.getSoreThroat()) / total;\r\n\t\tpIfYes *= Collections.frequency(dangerZoneIfCOVID19,newEntry.getDangerZone()) / total;\r\n\t\tpIfYes *= (double) total / dataEntries.size();\r\n\t\t\r\n\t\ttotal = Collections.frequency(hasCOVID19, \"no\");\r\n\t\tpIfNo += (Collections.frequency(temperature,newEntry.getTemperature()) - Collections.frequency(temperatureIfCOVID19,newEntry.getTemperature())) / total;\r\n\t\tpIfNo *= (Collections.frequency(cough,newEntry.getCough()) - Collections.frequency(coughIfCOVID19,newEntry.getCough())) / total;\r\n\t\tpIfNo *= (Collections.frequency(aches,newEntry.getAches()) - Collections.frequency(achesIfCOVID19,newEntry.getAches())) /total;\r\n\t\tpIfNo *= (Collections.frequency(soreThroat,newEntry.getSoreThroat()) - Collections.frequency(soreThroatIfCOVID19,newEntry.getSoreThroat())) /total;\r\n\t\tpIfNo *= (Collections.frequency(dangerZone,newEntry.getDangerZone()) - Collections.frequency(dangerZoneIfCOVID19,newEntry.getDangerZone())) / total;\r\n\t\tpIfNo *= (double) total / dataEntries.size();\r\n\t\t\r\n\t\t//Getting the result as a percentage and returning it.\r\n\t\tprobability = (pIfYes / (pIfYes+pIfNo)) * 100;\r\n\t\treturn probability;\r\n\t}", "@Override\n public int compare(Student s1, Student s2) {\n return (int)(1000*(s2.getGPA()-s1.getGPA()));\n }", "double getLowerThreshold();", "public static ChiSqTest test(int[] bins, double[] prob) {\r\n return test(bins, prob, 1);\r\n }", "private double condProb(String stateGiven, String stateFind){\n HashMap probs = genAllProb(stateGiven);\n return (double) probs.get(stateFind);\n }", "private void drawBins (Graphics g) {\n double dTime = (endT - begT) / parent.numBins;\n int j = 0; statesDrawn = 0; highestCt = 0;\n \n Vector v = parent.stateDef.stateVector;\n \n for (int i = 0; i < parent.numBins; i++) {\n //Limits of a bin\n double startTime = begT + (i * dTime); \n double finishTime = begT + ((i + 1) * dTime);\n int ct = 0;\n \n Info currState;\n while (j < v.size () &&\n ((currState = (Info)v.elementAt (j)).lenT < finishTime ||\n (currState.lenT == finishTime && currState.lenT == endT))) {\n if (startTime <= currState.lenT) {\n ct++;\n statesDrawn ++;\n }\n j++;\n }\n if (highestCt < ct) highestCt = ct;\n \n //draw the bin\n if (ct > 0) drawBin (g, i, ct);\n }\n }", "abstract double leftProbability();", "public static HashMap<String, HashMap<Integer, Integer>> binHiggsData(HashMap<String, ArrayList<Double>> energyMap){\r\n\r\n\t\t//hashmap. Keys: detector name. Value: the hashmap above\r\n\t\tHashMap<String, HashMap<Integer, Integer>> bothDetectorsBinnedData = new HashMap<String, HashMap<Integer, Integer>>();\r\n\r\n\t\t//arraylist of the detector in the map so we can loop through all of them \r\n\t\tArrayList<String> detectorList = new ArrayList<String>();\r\n\t\tdetectorList.addAll(energyMap.keySet());\r\n\r\n\t\t//loop through all of the detectors (in this case, just GG and ZZ)\r\n\t\tfor (String detector : detectorList){\r\n\r\n\t\t\t//initialise values - this needs to be done in this for loop to reset for each detector\r\n\t\t\tint currentValueBin;\r\n\t\t\tint currentFreq;\t\r\n\t\t\tint newFreq;\r\n\t\t\tdouble currentValueBinD;\r\n\r\n\t\t\t//hashmap. Keys: each bin minimum. Value: number of readings in that bin\r\n\t\t\tHashMap<Integer, Integer> numberOfReadingsInEachBin = new HashMap<Integer, Integer>();\r\n\r\n\t\t\t//find the current list of data for this detector\r\n\t\t\tArrayList<Double> currentData = energyMap.get(detector);\r\n\r\n\t\t\tArrayList<Integer> flooredValues = new ArrayList<Integer>();\r\n\r\n\t\t\t//loop through all of the data in the set for this detector\r\n\t\t\tfor (double currentE : currentData){\r\n\r\n\t\t\t\t//round the value down, this is what the bin will be\r\n\t\t\t\tcurrentValueBinD = Math.floor(currentE);\r\n\t\t\t\tcurrentValueBin = (int) currentValueBinD;\r\n\r\n\t\t\t\tflooredValues.add(currentValueBin);\r\n\r\n\r\n\t\t\t\t//look for this value in the hashmap of bins and frequency\r\n\t\t\t\tInteger frequency = numberOfReadingsInEachBin.get(currentValueBin);\r\n\r\n\r\n\r\n\t\t\t\t//if this bin hasn't been put into the hashmap yet, put it in\r\n\t\t\t\tif (frequency == null){\r\n\t\t\t\t\tnumberOfReadingsInEachBin.put(currentValueBin, 1);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//if it has, add one to the frequency\r\n\t\t\t\telse{\r\n\t\t\t\t\tcurrentFreq = numberOfReadingsInEachBin.get(currentValueBin);\r\n\t\t\t\t\tnewFreq = currentFreq +1;\r\n\t\t\t\t\tnumberOfReadingsInEachBin.put(currentValueBin, newFreq);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//System.out.println(Collections.min(currentData));\r\n\r\n\t\t\t//if there have been frequencies of zero, they won't have been added, add them now\r\n\t\t\tfor (int i = Collections.min(flooredValues); i < Collections.max(flooredValues); i++){\r\n\t\t\t\tInteger currentReadings = numberOfReadingsInEachBin.get(i);\r\n\r\n\t\t\t\tif (currentReadings == null){\r\n\r\n\t\t\t\t\tnumberOfReadingsInEachBin.put(i, 0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//put the detector and the corresponding frequency data into the hashmap\r\n\t\t\tbothDetectorsBinnedData.put(detector, numberOfReadingsInEachBin);\r\n\r\n\t\t}\r\n\t\treturn bothDetectorsBinnedData;\r\n\t}", "private double getAccuracyBinary(double[] predict, double[] real) {\n\t\tif (predict.length != real.length) return -1;\n\t\tdouble wrong = 0;\n\t\tdouble correct = 0;\n\t\tfor (int i = 0; i < predict.length; i++) {\n\t\t\tif ((predict[i] > 20 && real[i] > 20) ||\n\t\t\t(predict[i] < 20 && real[i] < 20))\n\t\t\tcorrect++;\n\t\t\telse wrong++;\n\t\t}\n\t\tdouble acur = correct / (correct + wrong);\n\t\treturn acur;\n\t}", "public NaiveBayesCountMinSketch(int nbOfHashes, int logNbOfBuckets, double threshold){\n this.nbOfHashes = nbOfHashes;\n this.logNbOfBuckets=logNbOfBuckets;\n this.threshold = threshold;\n\n /* FILL IN HERE */\n\n \n this.seeds = new int[nbOfHashes];\n Random rand = new Random();\n for (int i = 0; i<nbOfHashes; i++) {\n this.seeds[i] = rand.nextInt();\n }\n \n counts = new int[2][nbOfHashes][1 << logNbOfBuckets];\n classCounts =new int[2];\n \n \n for (int i = 0; i<2; i++) {\n for (int h = 0; h<nbOfHashes; h++) {\n \tArrays.fill(counts[i][h], 1);\n \n }\n \tclassCounts[i] = 1;\n } \n \n }", "@Test\n public void randomInt() {\n HashMap<Integer, Integer> hist = new HashMap<Integer, Integer>();\n for(int i = 0; i < 300; i++){\n // we can think of random int as a coin toss\n Integer coin = test.randInt();\n Integer coinTotal = hist.get(coin);\n if (coinTotal == null){\n hist.put(coin, 1);\n } else {\n hist.put(coin, coinTotal+1);\n }\n }\n assertTrue(\"Should be more than 100 of each\",\n hist.get(0) > 100 && hist.get(1) > 100);\n System.out.println(hist);\n }", "public int findBinIndex(Double precursor, Double binSize, Double minMass)\n\t{\n\t\treturn (int)((precursor-minMass)/binSize);\n\t}", "boolean hasPercentage();", "public int compare(Person a, Person b){\n int aWeight = (int)a.getWeight();\n int bWeight = (int)b.getWeight();\n return aWeight - bWeight;\n }", "private Integer getFitness(int[] chromosome) {\n\t\tint[] bins = new int[binCount]; //list of found bins\n\t\tfor (int binIndex = 0; binIndex < bins.length; binIndex++) { //initialize list of bins to unfound\n\t\t\tbins[binIndex] = -1;\n\t\t}\n\t\tint[] newChrom = bestFitModified(chromosome.clone()); //fix if infeasible\n\t\tif (newChrom == null) { //this is an unfixable chromosome, inform caller\n\t\t\treturn binCount * 2 + totalInfeasibility(chromosome);\n\t\t}\n\n\t\tfor (int i = 0; i < newChrom.length; i++) {\n\t\t\tchromosome[i] = newChrom[i]; //copy over to take advantage of side-effects\n\t\t}\n\t\tint uniqueBins = 0;\n\n\t\tfor (int i = 0; i < chromosome.length; i++) {\n\t\t\tif (bins[chromosome[i]] == -1) { //if we haven't seen this bin before track it and increment bin counter\n\t\t\t\tbins[chromosome[i]] = chromosome[i];\n\t\t\t\tuniqueBins++;\n\t\t\t} else\n\t\t\t\tcontinue;\n\t\t}\n\n\t\treturn uniqueBins;\n\t}", "private static void computePercentage(int numberOfA[], int numberOfB[], int percentageOfB[]) {\n\t\tfor ( int i = 0; i < percentageOfB.length; i++ )\n\t\t\tpercentageOfB[i] = (int) Math.round( numberOfB[i] * 100.0 / ( numberOfB[i] + numberOfA[i] ));\n\t}", "private int sturgesFormula(int dataSize) {\n int binNum = currentBinNum;\n\n if (dataSize != 0) {\n binNum = 1 + (int) (.5 + Math.log((double) dataSize)\n / Math.log(2.0));\n }\n return binNum;\n }", "public static int binSearch(int[] a, int x) {\r\n int l = 0;\r\n int r = a.length;\r\n while (l != r) {\r\n // inv: l <= res <= r\r\n int m = (l + r) / 2;\r\n if (a[m] >= x) {\r\n r = m;\r\n }\r\n else {\r\n l = m + 1;\r\n }\r\n }\r\n return r;\r\n }", "private double condProb(RelStruc A,Hashtable atomhasht,OneStrucData inst,long[] timers)\n\t\t\tthrows RBNCompatibilityException\n\t\t\t{\n\t\tdouble result = probform.evalSample(A,atomhasht,inst,timers);\n\t\t//System.out.print(\" cP: \" + result);\n\t\treturn result;\n\t\t\t}", "private void evaluateProbabilities()\n\t{\n\t}", "public static void main(String[] args) {\r\n Scanner sc = new Scanner(System.in);\r\n double a = sc.nextDouble();\r\n double b = sc.nextDouble();\r\n double p = a/(a+b);\r\n int n = 6;\r\n double bd = 0.0;\r\n for(int i = 3 ; i <= n ;i++)\r\n {\r\n bd = bd + bionomial(n,i,p);\r\n }\r\n System.out.println(Math.round(bd*1000.00)/1000.00);\r\n }" ]
[ "0.60727185", "0.6051957", "0.60488087", "0.60360634", "0.5832695", "0.5767766", "0.574631", "0.5743619", "0.57048637", "0.56984425", "0.5673323", "0.56555647", "0.56493473", "0.5622068", "0.55082595", "0.54818165", "0.5453951", "0.54383653", "0.54353017", "0.54037124", "0.5347607", "0.5344795", "0.5342768", "0.5331993", "0.5320095", "0.53104866", "0.53099704", "0.53045577", "0.529897", "0.5289088", "0.5264499", "0.52618253", "0.5251621", "0.5250143", "0.5248288", "0.5243933", "0.52345234", "0.52272767", "0.52124256", "0.51963806", "0.5185375", "0.5181605", "0.5176053", "0.5161878", "0.5156707", "0.5154505", "0.51303315", "0.5125962", "0.51073116", "0.51053035", "0.5099682", "0.5098893", "0.50951004", "0.5086825", "0.50787497", "0.5073287", "0.507174", "0.50690293", "0.50616544", "0.50497836", "0.5033934", "0.5028413", "0.5027331", "0.50238335", "0.5012439", "0.5008856", "0.5008124", "0.5007582", "0.50032854", "0.5000195", "0.4994405", "0.49905223", "0.4982127", "0.49717084", "0.49716204", "0.49661505", "0.49473846", "0.49438855", "0.49438813", "0.49347198", "0.4933587", "0.49277923", "0.49266037", "0.49252832", "0.49237365", "0.49139386", "0.49056593", "0.4895866", "0.4893874", "0.4891163", "0.4887048", "0.48804164", "0.48796472", "0.48784432", "0.48773903", "0.48761597", "0.4876126", "0.4874725", "0.48716664", "0.4866206" ]
0.5708298
8
Checks whether a property key should be considered. This is the case iff no property keys to consider are specified (then all are relevant) or the set of specified relevant key contains the property
private boolean isPropertyRelevant(String property) { return relevantProperties == null || relevantProperties.contains(property); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean containsProperties(\n java.lang.String key);", "public boolean hasProperty( String key );", "boolean hasProperty(String key);", "@Override\n\t\tpublic boolean hasProperty(String key) {\n\t\t\treturn false;\n\t\t}", "protected boolean shouldAddProperty(String key) {\n return !key.equals(\"label\") && !key.equals(\"id\");\n }", "public boolean containsKey(final String key) {\n return key != null && _properties.containsKey(key);\n }", "static void checkKey(String firstProperty, String secondProperty) {\n firstProperty = firstProperty.toUpperCase();\n secondProperty = secondProperty.toUpperCase();\n if (!properties.contains(firstProperty) && !properties.contains(secondProperty)\n && !negativeProperties.contains(firstProperty) && !negativeProperties.contains(secondProperty)) {\n System.out.printf(\"The properties [%s, %s] are wrong.\\n\" +\n \"Available properties: %s%n\\n\", firstProperty, secondProperty, properties);\n Start.start();\n }\n }", "@java.lang.Override\n public boolean containsProperties(\n java.lang.String key) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n return internalGetProperties().getMap().containsKey(key);\n }", "private static void isValid(Map<String, Set<String>> propertiesGroupedBy, String key) {\n stringPredicate = s -> {\n final String property = PropertiesUtil.getInstance().getProperty(s);\n return (property == null || property.isEmpty());\n };\n\n //but you can write more predicates as per your needs\n\n\n final Optional<String> optional = propertiesGroupedBy.get(key).stream().filter(stringPredicate).findFirst();\n\n if (optional.isPresent()) {\n try {\n throw new Exception(optional.get() + \" value is null or empty \");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "@java.lang.Override\n public boolean containsProperties(\n java.lang.String key) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n return internalGetProperties().getMap().containsKey(key);\n }", "private boolean isAdditionalPorperty(String propertyName)\n\t{\n\t\tif (propertyName == null)\n\t\t\treturn false;\n\t\t\n\t\treturn (!(this.definedPropertyKeys.contains(propertyName)));\n\t}", "public boolean containsKey(String key) throws Exception {\n //return properties.containsKey(key);\n if (config != null) {\n Configuration[] props = config.getChildren(\"property\");\n for (int i = 0; i < props.length; i++) {\n if (props[i].getAttribute(\"name\") != null && props[i].getAttribute(\"name\").equals(key)) return true;\n }\n }\n return false;\n }", "public boolean hasProperty(String key) {\n return commandData.containsKey(key);\n }", "public boolean containsKey (String key)\n\t{\n\t\treturn properties.containsKey(key);\n\t}", "public static boolean propertyExists(String aKey) {\n checkArgument(!isNullOrEmpty(aKey), \"aKey cannot be null or empty\");\n \n loadPropertiesFile();\n boolean exists = props.containsKey(aKey);\n return exists;\n }", "boolean canSet(String key);", "public abstract boolean isMatching(Properties p);", "@SuppressWarnings(\"rawtypes\")\n private boolean containsNoValidValueFor(final Dictionary properties,\n final String propertyKey) {\n final Object propertyValue = properties.get(propertyKey);\n return !(propertyValue instanceof String) || StringUtils.isEmpty((String) propertyValue);\n }", "@Override\r\n\tpublic boolean containsKey(Object key) {\r\n\t\tif (key == null) throw new NullPointerException();\r\n\t\treturn get(key) != null;\r\n\t}", "@Override\n public boolean containsKey(K key) {\n if (key == null) {\n throw new IllegalArgumentException(\"argument to containsKey() is null\");\n }\n return get(key) != null;\n }", "boolean containsProperty(String name);", "public boolean contains(String key) {\r\n return attributeMap.containsKey(key)\r\n || (parent.isPresent() && parent.get().contains(key));\r\n }", "public boolean containsKey(Key key) ;", "public boolean definesKey( final String key ) {\n return values.containsKey( key );\n }", "@Override\n\t\t\tpublic boolean containsKey(Object key) {\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n\tpublic boolean containsKey(Object key) {\n\t\treturn false;\n\t}", "boolean containsKey(Object key) throws NullPointerException;", "boolean hasPropertyLike(String name);", "boolean hasProperty(String propertyName);", "public boolean containsKey(Object key) {\n\t\treturn false;\r\n\t}", "public abstract boolean containsKey(K key);", "public boolean hasProperty(Pp property) {\n return properties.contains(property);\n }", "public boolean containsKey(String key);", "public boolean contains(String key) {\r\n\t\treturn getValue(key) != null;\r\n\t}", "boolean containsOptions(\n String key);", "boolean containsOptions(\n String key);", "boolean containsOptions(\n String key);", "boolean hasKey(String key);", "public boolean contains(Key key);", "public boolean contains(Key key) {\n return get(key) != null;\n }", "boolean hasProperty();", "boolean hasProperty();", "boolean hasProperty();", "public boolean contains(String key){\r\n\t\treturn get(key) != null;\r\n\t}", "public boolean contains(String key)\r\n { return get(key) != null; }", "@Override\n\tpublic boolean contains(K key) {\n\t\treturn false;\n\t}", "public abstract boolean shouldObserve(String key);", "Boolean isBlankOrNull(String key)\n {\n return StringUtils.isBlank(properties.getProperty(key));\n }", "@Override\n\t\t\tpublic boolean contains(String key) {\n\t\t\t\treturn false;\n\t\t\t}", "<T> boolean containsValue(Property<T> property);", "public boolean containsSearchKey(String key) {\n if (this.name.toLowerCase().contains(key) || this.name.toLowerCase().contains(Dictionary.parseKey(key))) {\n return true;\n }\n if (this.address.toLowerCase().contains(key) || this.address.toLowerCase().contains(Dictionary.parseKey(key))) {\n return true;\n }\n return this.faculty.toLowerCase().contains((key))\n || this.faculty.toLowerCase().contains(Dictionary.parseKey(key));\n }", "private boolean validate(String key) {\n \t\t\t for (int i = 0; i < ignoreKeys.length; i ++) {\n \t\t\t\t String test = key.trim();\n \t\t\t\t if(test.equalsIgnoreCase(ignoreKeys[i])) return false;\n \t\t\t }\n \t\t\t return true;\n \t\t }", "private boolean findMappedBy(DeployBeanPropertyAssocMany<?> prop) {\n // this is the entity bean type - that owns this property\n Class<?> owningType = prop.getOwningType();\n Set<String> matchSet = new HashSet<>();\n\n // get the bean descriptor that holds the mappedBy property\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(prop);\n List<DeployBeanPropertyAssocOne<?>> ones = targetDesc.propertiesAssocOne();\n for (DeployBeanPropertyAssocOne<?> possibleMappedBy : ones) {\n Class<?> possibleMappedByType = possibleMappedBy.getTargetType();\n if (possibleMappedByType.equals(owningType)) {\n prop.setMappedBy(possibleMappedBy.getName());\n matchSet.add(possibleMappedBy.getName());\n }\n }\n\n if (matchSet.isEmpty()) {\n // this is a unidirectional relationship\n // ... that is no matching property on the 'detail' bean\n return false;\n }\n if (matchSet.size() == 1) {\n // all right with the world\n prop.clearTableJoin();\n return true;\n }\n if (matchSet.size() == 2) {\n // try to find a match implicitly using a common naming convention\n // e.g. List<Bug> loggedBugs; ... search for \"logged\" in matchSet\n String name = prop.getName();\n\n // get the target type short name\n String targetType = prop.getTargetType().getName();\n String shortTypeName = targetType.substring(targetType.lastIndexOf('.') + 1);\n\n // name includes (probably ends with) the target type short name?\n int p = name.indexOf(shortTypeName);\n if (p > 1) {\n // ok, get the 'interesting' part of the property name\n // That is the name without the target type\n String searchName = name.substring(0, p).toLowerCase();\n\n // search for this in the possible matches\n for (String possibleMappedBy : matchSet) {\n String possibleLower = possibleMappedBy.toLowerCase();\n if (possibleLower.contains(searchName)) {\n // we have a match\n prop.setMappedBy(possibleMappedBy);\n return true;\n }\n }\n }\n }\n // multiple options so should specify mappedBy property\n String msg = \"Error on \" + prop + \" missing mappedBy.\";\n msg += \" There are [\" + matchSet.size() + \"] possible properties in \" + targetDesc;\n msg += \" that this association could be mapped to. Please specify one using \";\n msg += \"the mappedBy attribute on @OneToMany.\";\n throw new PersistenceException(msg);\n }", "public boolean contains(Key key) {\n\t\treturn get(key) != null;\n\t}", "@Override\n public boolean contains(String key) {\n if (key == null) {\n throw new IllegalArgumentException(\"argument to contains() is null\");\n }\n return get(root, key, 0) != null;\n }", "boolean hasSetProperty();", "boolean hasProperty0();", "boolean hasKey(String collection, String hkey);", "public boolean hasKey( final String key ) {\n boolean result = values.containsKey( key );\n if( defaultValues != null ) {\n result |= defaultValues.containsKey( key );\n }\n return result;\n }", "boolean containsKey(K key);", "boolean containsKey(K key);", "final boolean hasKey(final E key) {\r\n for (int i=0;i<kcount;i++) {\r\n if (equal(key, (E)k[i])) return true;\r\n }\r\n return false;\r\n }", "boolean hasProperty1();", "public boolean containsKey(K key) {\r\n\t\tif (get(key) == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "boolean has(String key);", "public boolean containsKey(K key) {\n\t\t\n\t\t\n\t\treturn keySet.contains(key);\n }", "private boolean hasEncodedProperties(Properties props) {\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tEnumeration keys = props.keys();\n\t\twhile(keys.hasMoreElements()){\n\t\t\tString key = (String) keys.nextElement();\n\t\t\tString propValue = props.getProperty(key);\n\t\t\tif(propValue.startsWith(ENC_PREFIX)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private static boolean doSetProperty(Properties properties, String key, boolean useDefaults) {\r\n return useDefaults || (!useDefaults && null != properties.get(key));\r\n }", "public RequiredPropertyCondition(String key, PropertyResolver propertyResolver) {\n\t\tsuper();\n\t\tthis.key = key;\n\t\tthis.propertyResolver = propertyResolver;\n\t}", "private static boolean isPropertyEnabled(Dictionary<?, ?> properties,\n String propertyName) {\n boolean enabled = false;\n try {\n String flag = Tools.get(properties, propertyName);\n enabled = isNullOrEmpty(flag) ? enabled : flag.equals(\"true\");\n } catch (ClassCastException e) {\n // No propertyName defined.\n enabled = false;\n }\n return enabled;\n }", "public boolean isMatchFilterKey(String key) {\n boolean match = false;\n\n // Validate the title contains the key\n if (title.contains(key)) {\n System.out.println(String.format(\"Title for Talent %s contains the search key %s \", name, key));\n match = true;\n }else System.out.println(String.format(\"Title for Talent %s dose not contains the search key %s \", name, key));\n\n // Validate the Name contains the key\n if (name.contains(key)) {\n System.out.println(String.format(\"Name for Talent %s contains the search key %s \", name, key));\n match = true;\n }else System.out.println(String.format(\"Name for Talent %s dose not contains the search key %s \", name, key));\n\n // Validate the overview contains the key\n if (overview.contains(key)) {\n System.out.println(String.format(\"Overview for Talent %s contains the search key %s \", name, key));\n match = true;\n }else System.out.println(String.format(\"Overview for Talent %s dose not contains the search key %s \", name, key));\n\n // Validate the skills contains the key\n if (skills.contains(key)) {\n System.out.println(String.format(\"Skills for Talent %s contains the search key %s \", name, key));\n match = true;\n }else System.out.println(String.format(\"Skills for Talent %s dose not contains the search key %s \", name, key));\n\n return match;\n }", "boolean hasKey();", "boolean hasKey();", "boolean hasKey();", "boolean hasKey();", "boolean hasKey();", "@Override\n public boolean containsKey(K key) {\n return containsKeyHelper(root, key);\n }", "@MethodContract(\n post = @Expression(\"_pe != null && elementExceptions[pe.propertyName] != null && \" +\n \"exists(PropertyException pe : elementExceptions[pe.propertyName]) {pe.like(_pe)}\")\n )\n public final boolean contains(PropertyException pe) {\n if (pe == null) {\n return false;\n }\n Set<PropertyException> pes = $elementExceptions.get(pe.getPropertyName());\n if (pes == null) {\n return false;\n }\n for (PropertyException candidate : pes) {\n if (candidate.like(pe)) {\n return true;\n }\n }\n return false;\n }", "private static boolean hasProperty(int settings, int property){\n\t\tint bit = 0; // log2(property)\n\t\twhile ((property >>= 1) > 0) bit ++;\n\t\treturn ItFromBit.getTheBit(settings, bit);\n\t}", "public void setPropKey(String propKey) {\n this.propKey = propKey;\n }", "public boolean containsKey(int key) {\n return getElement(key) != null;\n }", "public boolean hasProperty( Property propertyId ) {\n return nodeProperties != null && nodeProperties.containsKey(propertyId);\n }", "public boolean hasProperty(String name) {\n for(Pp property : properties){\n if(property.getId().equals(name))\n return true;\n }\n return false;\n }", "public boolean contains(String key);", "private String getRequiredProperty(Properties props, String key) {\r\n\t\tString value = props.getProperty(key);\r\n\t\tif ((value == null) || (value.trim().length() == 0)) {\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Property file must provide a value for '\" + key + \"'\");\r\n\t\t}\r\n\t\treturn value;\r\n\t}", "public static String verifyAndFetchMandatoryProperty(String key,\r\n\t\t\tProperties prop) throws PropertyNotConfiguredException {\r\n\t\tString property;\r\n\t\t// Mandatory property should not be null.\r\n\t\tproperty = Objects.requireNonNull(fetchProperty(key, prop),\r\n\t\t\t\t\"ERROR: Must set configuration value for \" + key);\r\n\r\n\t\t// Mandatory property should not be blank.\r\n\r\n\t\tif (property.isEmpty()) {\r\n\t\t\tthrow new PropertyNotConfiguredException(\r\n\t\t\t\t\t\"ERROR: Must set configuration value for \" + key);\r\n\t\t}\r\n\t\treturn property;\r\n\t}", "@Request(id = 6, retryable = true, response = ResponseMessageConst.BOOLEAN)\n Object containsKey(String name, Data key);", "private static boolean verifyProperties(Properties pProperties){\n boolean completeParams = false;\n if (pProperties.getProperty(UtilsConnection.CONSUMER_KEY) != null &&\n pProperties.getProperty(UtilsConnection.CONSUMER_SECRET) != null &&\n pProperties.getProperty(UtilsConnection.ACCESS_TOKEN) != null &&\n pProperties.getProperty(UtilsConnection.ACCESS_TOKEN_SECRET) != null )\n completeParams = true;\n return completeParams;\n }", "public static boolean verifyAndFetchOptionalProperty(String key,\r\n\t\t\tboolean defaultValue, Properties prop) {\r\n\t\tString property;\r\n\t\tproperty = fetchProperty(key, prop);\r\n\r\n\t\t// Property should not be blank.\r\n\t\tif (property == null || (property != null && property.trim().isEmpty())) {\r\n\t\t\treturn defaultValue;\r\n\t\t}\r\n\t\treturn Boolean.parseBoolean(property);\r\n\t}", "boolean containsDetails(\n java.lang.String key);", "boolean containsDetails(\n java.lang.String key);", "boolean hasGetProperty();", "Object getPropertyexists();", "private boolean containsKeyHelper(Node n, K key) {\n // base case\n if (n == null) {\n return false;\n }\n\n int compareResult = key.compareTo(n.key);\n if (compareResult == 0) {\n return true;\n } else if (compareResult < 0) {\n return containsKeyHelper(n.leftChild, key);\n } else {\n return containsKeyHelper(n.rightChild, key);\n }\n }", "public boolean hasKey() {\n return keyBuilder_ != null || key_ != null;\n }", "public synchronized boolean hasKey(K key) {\n return getValue(key) != null;\n }", "@Override\n\tpublic boolean containsKey(Object arg0) {\n\t\treturn false;\n\t}", "boolean hasProperty2();", "public boolean contains(K key);", "@Override\n\tpublic boolean containsKey(Object key) {\n\t\treturn map.containsKey(key);\n\t}" ]
[ "0.7082596", "0.7011994", "0.6987903", "0.68087023", "0.68075746", "0.6417838", "0.636531", "0.6322306", "0.62886155", "0.6283057", "0.6149533", "0.6136181", "0.61277777", "0.6038725", "0.5929781", "0.5879005", "0.58297354", "0.58017635", "0.5787135", "0.5744327", "0.5741552", "0.57068336", "0.5689297", "0.5680117", "0.56152827", "0.5611857", "0.5608252", "0.5599991", "0.5582382", "0.55244344", "0.54951787", "0.54812276", "0.5471131", "0.5449258", "0.544424", "0.544424", "0.544424", "0.5405463", "0.53884363", "0.5388375", "0.5381129", "0.5381129", "0.5381129", "0.5371112", "0.53652686", "0.5363747", "0.5358725", "0.5356813", "0.53324133", "0.5317603", "0.53165877", "0.53085905", "0.53081733", "0.53026354", "0.5300236", "0.5295336", "0.52898055", "0.5285728", "0.52810466", "0.52731645", "0.52731645", "0.52618456", "0.52317256", "0.5230284", "0.5230096", "0.5227714", "0.52276593", "0.5225762", "0.52219146", "0.5201042", "0.52007014", "0.5192733", "0.5192733", "0.5192733", "0.5192733", "0.5192733", "0.51921684", "0.5190103", "0.5189642", "0.5188062", "0.51655096", "0.51638216", "0.51568204", "0.5148102", "0.5145857", "0.51438195", "0.5140186", "0.5138321", "0.51262", "0.51237655", "0.51237655", "0.5121559", "0.511972", "0.5116517", "0.5108669", "0.5104046", "0.50919956", "0.50885504", "0.5078728", "0.5073838" ]
0.71237427
0
Checks whether a suitable bin was found for a value.
private boolean matchesBin(Long[] arr, Long value, int index) { if (arr.length == 1) { return true; } if (index == arr.length - 1) { return value >= arr[index]; } else if (index == 0) { return value < arr[index + 1]; } else { boolean lowerCond = value >= arr[index]; boolean upperCond = value.equals(TemporalElement.DEFAULT_TIME_TO) ? value <= arr[index + 1] : value < arr[index + 1]; return lowerCond && upperCond; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasAabbValue();", "boolean valueCheckMatch(String value) {\r\n\t\tif (value.length() > intLength) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (hasRange) {\r\n\t\t\tLong ulongValue = Long.valueOf(Long.parseLong(value));\r\n\t\t\tif ((ulongValue.compareTo(minimum) < 0)\r\n\t\t\t\t\t|| (ulongValue.compareTo(maximum) > 0)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean checkIfExists(int value) {\n HomogeneusNode HomogeneusNode = root;\n while (HomogeneusNode != null) {\n if (value == HomogeneusNode.getData()) {\n return true;\n } else if (value < HomogeneusNode.getData()) {\n HomogeneusNode = HomogeneusNode.getLeft();\n } else {\n HomogeneusNode = HomogeneusNode.getRight();\n }\n }\n return false;\n\n }", "@Override\n public boolean containsValue(Object value) {\n \t\n \tfor(int i=0;i<buckets.length;i++) {\n\t \tLinkedList<Entry> tempBucket = buckets[i];\n\t \t\n\t \tfor(int j=0;j<tempBucket.size();j++) {\n\t \t\tEntry tempEntry = tempBucket.get(j);\n\t \t\t\n\t \t\tif(tempEntry.getValue() == value) {\n\t \t\t\treturn true;\n\t \t\t}\n\t \t}\n \t}\n \t\n return false;\n }", "private boolean checkValue(){\n\t\tfor (int i = 0; i <binary.length();i++){\n\t\t\tif(Character.getNumericValue(binary.charAt(i))>'1' || binary.length()>32 || binary.length()\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t%4 != 0){\n\t\t\t\tSystem.out.println(\"Invalid Input\");\n\t\t\t\tpw.println(\"Invalid Input\");\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\t\t\n\t}", "public boolean find(int value) {\n return twoSums.contains(value);\n }", "public static boolean enumContainsValue(String value) {\n for (Booster booster : Booster.values()) {\n if (booster.name().equals(value)) return true;\n }\n return false;\n }", "public boolean HasPossibleValuesInTheCells(int value)\n {\n return _valuesToPut.contains(value);\n }", "public boolean containsValue(V value) {\n\tfor(int i=0;i<this.capacity;i++) {\n\t for(MyEntry k:table[i]) {\n\t\tif(k.value.equals(value)) {\n\t\t return true;\n\t\t}\n\t }\n\t}\n\treturn false;\n }", "private boolean isInsideValidRange (int value)\r\n\t{\r\n\t\treturn (value > m_lowerBounds && value <= m_upperBounds);\r\n\t}", "private boolean contains(int[] valueSet, int value) {\n\t\tfor (int i = 0; i < valueSet.length; i++) {\r\n\t\t\tif (valueSet[i] == value) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean check(int value);", "boolean contains(int value);", "boolean contains(int value);", "public abstract boolean containsValue(V value);", "private boolean inBitRange(int k) {\n try {\n if (k < 0 || k >= this.numberOfBits())\n throw new Exception(\"Data: bit index is out of range (0<=\" + k + \"<\" + this.numberOfBits() + \")\");\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n return true;\n }", "public boolean contains(int value) {\n\t \treturn indexOf(value) >= 0;\n\t }", "private boolean holds(int attrIndex, double value) {\n\t\n if (numAttributes() == 0)\n\treturn false;\n\t\n if(attribute(attrIndex).isNumeric())\n\treturn(m_MinBorder[attrIndex] <= value && value <= m_MaxBorder[attrIndex]);\n else\n\treturn m_Range[attrIndex][(int) value];\n }", "public static boolean exists(int value) {\n for (Attributes g : Attributes.values()) {\n if (g.getValue() == value) {\n return true;\n }\n }\n return false;\n }", "public boolean containsValue(Object value) {\n\t\treturn false;\r\n\t}", "boolean contains(int val);", "public boolean isSetBinary_vals() {\n return this.binary_vals != null;\n }", "@Override\n public boolean containsValue(Object value) {\n for (LinkedList<Entry<K,V>> list : table) {\n for (Entry<K,V> entry : list) {\n if (entry.getValue().equals(value)) {\n return true;\n }\n }\n }\n return false;\n }", "public boolean containsValue(int valor){\n boolean found = false;\n if(!valores.isEmpty()){\n if(valores.contains(valor)){\n found = true;\n }\n }\n return found;\n }", "public static boolean isValidParamValue(int index, int value)\n {\n return (value >= akParams_[index].lowerBound && value <= akParams_[index].upperBound);\n }", "private boolean isValuePlacementValid(int row, int column, int value) {\n\t\tfor(int i=0;i<9;i++) {\n\t\t\tif(value == sudokuMatrix[row][i])\n\t\t\t\treturn false;\n\t\t}\n\t\tfor(int i=0;i<9;i++) {\n\t\t\tif(value == sudokuMatrix[i][column])\n\t\t\t\treturn false;\n\t\t}\n\t\tint cornerX = 0;\n\t\tint cornerY = 0;\n\t\tif(row > 2)\n\t\t\tif(row > 5)\n\t\t\t\tcornerX = 6;\n\t\t\telse\n\t\t\t\tcornerX = 3;\n\t\tif(column > 2)\n\t\t\tif(column > 5)\n\t\t\t\tcornerY = 6;\n\t\t\telse\n\t\t\t\tcornerY = 3;\n\t\tfor(int i=cornerX;i<10 && i<cornerX+3;i++) //check if the value is not present in the same grid already\n\t\t\tfor(int j=cornerY;j<10 && j<cornerY+3;j++)\n\t\t\t\tif(value == sudokuMatrix[i][j])\n\t\t\t\t\treturn false;\n\t\treturn true;\n\t}", "@Override\n public boolean contains(int x) {\n return binarySearch(x) != -1;\n }", "public boolean contains(T value) {\n boolean aboveLower = (includesLower) ? lower.compareTo(value) <= 0 : lower.compareTo(value) < 0;\n boolean belowUpper = (includesUpper) ? value.compareTo(upper) <= 0 : value.compareTo(upper) < 0;\n\n return aboveLower && belowUpper;\n }", "@Override\n\tpublic int has(Comparable value) {\n\t\t\n\t\tint lowerBound = 0;\n\t\tint upperBound = currentIndex - 1;\n\t\tint current;\n\t\t\n\t\twhile (true) {\n\t\t\t\n\t\t\tcurrent = (lowerBound + upperBound) / 2;\n\t\t\t\n\t\t\tif (array[current].equalsWith(value)) {\n\t\t\t\t//element is successfully found\n\t\t\t\treturn current;\n\t\t\t} else if (lowerBound > upperBound) {\n\t\t\t\t// not found\n\t\t\t\treturn -1;\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tif (array[current].lessThan(value)) {\n\t\t\t\t\tlowerBound = current + 1; //in higher half\n\t\t\t\t} else {\n\t\t\t\t\tupperBound = current - 1; //in lower half\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public boolean find(int value) {\n for (Map.Entry<Integer, Integer> entry : hash.entrySet()) {\n int num1 = entry.getKey();\n int num2 = value - num1;\n if ((num1 == num2 && entry.getValue() > 1) || (num1 != num2 && hash.containsKey(num2))) {\n return true;\n }\n }\n return false;\n }", "boolean hasBasisValue();", "boolean containsValue(Object value);", "boolean hasB24();", "public boolean containsValue(V value)\r\n\t{\r\n\t\tList<V> values = values();\r\n\t\t\r\n\t\tfor(V element : values)\r\n\t\t{\r\n\t\t\tif(element.equals(value))\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public boolean contains(U value) {\n\t\t\treturn indexOf(value) != -1;\n\t\t}", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof BinaryType)) return false;\n BinaryType binario = (BinaryType) o;\n return Objects.equals(this.getValue(), binario.getValue());\n }", "public boolean validateBSB() {\n\t\tif (!this.setBSB(this.bsb))\n\t\t\treturn false;\n\t\treturn this.getBSB().length() == 6;\n\t}", "boolean containsValue(Object value) throws NullPointerException;", "boolean hasVal();", "boolean hasVal();", "public boolean containsValue(Object value) {\n for (int i = 0; i < size; i++) {\n Entry entry = order[i];\n\n if (eq(value, entry.getValue())) {\n return true;\n }\n }\n\n return false;\n }", "public boolean containsValue(Object v) {\n/* 119 */ return false;\n/* */ }", "private boolean contains(TreeNode node, Object value)\r\n {\r\n if (node == null)\r\n return false;\r\n else\r\n {\r\n int diff = ((Comparable<Object>)value).compareTo(node.getValue());\r\n if (diff == 0)\r\n return true;\r\n else if (diff < 0)\r\n return contains(node.getLeft(), value);\r\n else // if (diff > 0)\r\n return contains(node.getRight(), value);\r\n }\r\n }", "public boolean containsValue(Object value) {\r\n\t\tTableEntry<K, V> currentElement = null;\r\n\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\tif (table[i] == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcurrentElement = table[i];\r\n\r\n\t\t\tdo {\r\n\t\t\t\tif (currentElement.value.equals(value)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcurrentElement = currentElement.next;\r\n\t\t\t} while (currentElement != null);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public boolean contains(int value){\n if (this.value == value)\n return true;\n if (value < this.value){\n if (this.left != null)\n return left.contains(value);\n return false;\n }\n else {\n if (this.right != null)\n return right.contains(value);\n return false;\n }\n }", "private static <T extends HmBo> boolean checkBONameExists(Class<T> boClass, String name, Object value) {\r\n List<?> boIds = QueryUtil.executeQuery(boClass, null,\r\n new FilterParams(name, value),\r\n AhRestoreNewMapTools.getonlyDomain().getId());\r\n\t return !boIds.isEmpty();\r\n\t}", "public boolean checkValid(int[] board, int value, int row, int col) {\n\t\t\n\t\t// check if valid for row\n\t\tfor (int j = 0; j < 9; j++) {\n\t\t\tif ((board[j + row*9]) == value) return false;\n\t\t}\n\n\t\t// check if valid for col\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tif ((board[col + i*9]) == value) return false;\n\t\t}\n\t\t\n\t\t// check if valid for block\n\t\tint startRow = (row/3) * 3;\n\t\tint startCol = (col/3) * 3;\n\n\t\tfor (int i = startRow; i < startRow + 3; i++) {\n\t\t\tfor (int j = startCol; j < startCol + 3; j++) {\n\t\t\t\tif ((board[j + i*9]) == value) return false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// all valid so return true\n\t\treturn true;\n\t}", "private boolean isCoin(double value) {\n\t\tdouble[] possibleCoin = {1, 2, 5, 10};\n\t\tfor (double coinValue : possibleCoin) {\n\t\t\tif (value == coinValue) return true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean isInsideBounderies(double value, Double min, Double max) {\r\n \tif (min == null && max == null) {\r\n \t\treturn true;\r\n \t}\r\n \telse if (min != null && max == null) {\r\n \t\treturn min <= value;\r\n \t}\r\n \telse if (min == null && max != null) {\r\n \t\treturn value <= max;\r\n \t}\r\n \treturn min <= value && value <= max;\r\n }", "public boolean contains(int key) {\n int index = getIndex(key);\n int index2 = getIndex2(key);\n if(buckets[index] != null){\n return buckets[index][index2] == true; \n }\n return false;\n }", "boolean hasB22();", "@Override\n\tpublic boolean containsValue(Object value) {\n\t\treturn false;\n\t}", "public boolean isValid(int value){\n\t\tif(value<1 || value>size*size)\n\t\t\treturn false;\n\t\tint x = (value-1)/size;\n\t\tint y = (value-1)%size;\n\t\tif(board[x][y] == '\\u0000')\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean containsValue(V value) {\r\n for (Node datum : data) {\r\n if (datum != null) {\r\n Node targetNode = datum;\r\n while (targetNode != null) {\r\n if (targetNode.value == value || targetNode.value.equals(value)) {\r\n return true;\r\n }\r\n targetNode = targetNode.next;\r\n }\r\n\r\n }\r\n }\r\n return false;\r\n }", "private boolean contains(int key) {\n boolean contains = true;\n for (HashFunction hashFunction : this.hashFunctions) {\n int index = hashFunction.hash(key);\n\n // if the bit is not set for one of the hash functions,\n // then the key is not in the bloom filter\n if (!this.bitArray.get(index)) {\n contains = false;\n break;\n }\n }\n\n return contains;\n }", "public boolean containsValue(V value) {\r\n\t\tfor (LinkedList<KVPair> i : hashMapArray) {\r\n\t\t\tif (i!= null) {\r\n\t\t\t\tfor (int k = 0; k<i.size(); k++) {\r\n\t\t\t\t\tif (i.get(k).getValue() == value) {\r\n\t\t\t\t\t\treturn true;\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 false;\r\n\t}", "@Override\n\tpublic boolean containsValue(Object value) {\n\t\treturn map.containsValue(value);\n\t}", "public boolean valueExists(String tableName, String key, Object value) throws SQLException, NullPointerException {\n ResultSet rs = mysql.query(\"SELECT * FROM `\"+ tableName +\"` WHERE `\" + key + \"` LIKE '\" + value.toString() + \"'\");\n\n // Gets the next line from the table\n if(rs.next()){\n // return true if the String is available\n return rs.getString(key) != null;\n }\n\n // Value and Key are not identified\n return false;\n }", "boolean hasB25();", "public static final boolean m2215contains68kG9v0(UIntRange $this$contains, byte value) {\n Intrinsics.checkParameterIsNotNull($this$contains, \"$this$contains\");\n return $this$contains.m2198containsWZ4Q5Ns(UInt.m1374constructorimpl(value & 255));\n }", "public boolean containsValue(Object value) {\n return map.containsValue(value);\n }", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "private boolean isSafe(int row, int column, int value) throws Exception {\n for (int rowClash = 0; rowClash < DIMENSION; rowClash++) {\n if (this.board.get(row, rowClash) == value) {\n return false;\n }\n }\n\n for (int columnClash = 0; columnClash < DIMENSION; columnClash++) {\n if (this.board.get(columnClash, column) == value) {\n return false;\n }\n }\n\n int boxClash = (int)Math.sqrt(DIMENSION);\n int boxRowStart = row - row % boxClash;\n int boxColumnStart = column - column % boxClash;\n\n for (int rowBox = boxRowStart; rowBox < boxRowStart + boxClash; rowBox++) {\n for (int columnBox = boxColumnStart; columnBox < boxColumnStart + boxClash; columnBox++) {\n if (this.board.get(rowBox, columnBox) == value) {\n return false;\n }\n }\n }\n\n return true;\n }", "private boolean checkUpper(Die[] dice, int value) {\n for (Die mFaceValue : dice) {\n if (mFaceValue.getFaceValue() == value) {\n return true;\n\n }\n }\n return false;\n }", "public boolean containsLong(long value) {\n/* 300 */ return (value >= this.min && value <= this.max);\n/* */ }", "@Override\n\t\t\tpublic boolean containsValue(Object value) {\n\t\t\t\treturn false;\n\t\t\t}", "private boolean checkBinary(Node current) {\n boolean binary = true;\n int size = current.children.size();\n if (size > 2 && size != 0) {\n binary = false;\n } else if (size == 1) {\n binary = checkBinary(current.children.get(0));\n } else if (size == 2) {\n binary = checkBinary(current.children.get(0));\n if (binary) {\n binary = checkBinary(current.children.get(1));\n }\n }\n return binary;\n }", "public boolean isPossible(int x, int y, int value)\n {\n return _cells[x][y].isValuePossible(value);\n }", "protected boolean checkIfBTIsBST(Node node) {\n int min = -9999, max = 9999;\n boolean result = checkIfBTIsBSTHelper(node, min, max);\n return result;\n }", "public void binarySearchForValue(int value) {\n int lowIndex = 0;\n int highIndex = arraySize - 1;\n\n while (lowIndex <= highIndex) {\n int middleIndex = (highIndex + lowIndex) / 2;\n\n if (theArray[middleIndex] < value) {\n lowIndex = middleIndex + 1;\n } else if (theArray[middleIndex] > value) {\n highIndex = middleIndex - 1;\n } else {\n System.out.println(\"\\nFound a match for \" + value + \" at index \" + middleIndex);\n lowIndex = highIndex + 1;\n }\n\n printHorizontalArray(middleIndex, -1);\n }\n }", "public boolean find(int value) {\n // Write your code here\n for(Integer num : map.keySet()) {\n int num2 = value - num;\n if(num != num2 && map.containsKey(num2) || num == num2 && map.get(num) > 1) {\n return true;\n }\n }\n return false;\n }", "public static boolean binarySearch(int[] arr, int value) {\n int l =0;\n int r = arr.length-1;\n \n // while there's still a section to examine\n while(l <= r) { \n // calculate the middle index (note that it's floored bc integer division)\n int m = (l+r)/2;\n \n if(value > arr[m]) {\n l = m+1; \n // move l up past m, because value > arr[m]\n } else if (value < arr[m]) {\n r = m-1;\n } else {\n return true;\n }\n }\n \n return false;\n }", "public static boolean validMagicNumbers( final BufferedInputStream bin ) throws IOException\n {\n final List<String> validMagicBytesCollection = JiveGlobals.getListProperty( \"plugins.upload.magic-number.values.expected-value\", Arrays.asList( \"504B0304\", \"504B0506\", \"504B0708\" ) );\n for ( final String entry : validMagicBytesCollection )\n {\n final byte[] validMagicBytes = StringUtils.decodeHex( entry );\n bin.mark( validMagicBytes.length );\n try\n {\n final byte[] magicBytes = new byte[validMagicBytes.length];\n int remaining = validMagicBytes.length;\n while (remaining > 0) {\n final int location = validMagicBytes.length - remaining;\n final int count = bin.read(magicBytes, location, remaining);\n if (count == -1) {\n break;\n }\n remaining -= count;\n }\n if ( remaining <= 0 && Arrays.equals( validMagicBytes, magicBytes ) )\n {\n return true;\n }\n }\n finally\n {\n bin.reset();\n }\n }\n\n return false;\n }", "public boolean isValid(final int value) {\n\t\tif ((value <= this.maxInteger) && (value >= this.minInteger))\n\t\t\treturn true;\n\n\t\treturn false;\n\t}", "private static final boolean m2220containsbiwQdVI(UIntRange $this$contains, UInt element) {\n Intrinsics.checkParameterIsNotNull($this$contains, \"$this$contains\");\n return element != null && $this$contains.m2198containsWZ4Q5Ns(element.m1417unboximpl());\n }", "public static boolean checkValueMapping(HashMap<Integer, String> students, String value) {\n\t\treturn students.containsValue(value);\n\t}", "public boolean find(int value) {\n\t for(Map.Entry<Integer,Integer> entry:map.entrySet){\n\t\t int key = entry.getKey();\n\t\t int num = entry.getValue();\n\t\t int offset = value-key;\n\t\t if((offset==key&&num>1)||(offset!=key&&!map.containsKey(offset))){\n\t\t\t return true;\n\t\t }\n\t }\n\t return false;\n\t}", "@Override\n\tpublic boolean containsValue(Object arg0) {\n\t\treturn false;\n\t}", "boolean hasB20();", "private boolean isJunctionValueNodeForChance(Node chanceOrDecNode, Node valueNode) {\n NodeList childrenUtils;\n\n childrenUtils = chanceOrDecNode.getChildrenNodes();\n return diag.areAscendantsOf(valueNode, childrenUtils);\n }", "public boolean containsValue(Object value) {\r\n for (Map.Entry<K, V> pair : entrySet()) {\r\n // Optimize in case the Entry is one of our own.\r\n if (pair.getValue().equals(value) && ((CacheData<K, V>) pair).validateKey() != null) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public static final boolean m2217containsGab390E(ULongRange $this$contains, int value) {\n Intrinsics.checkParameterIsNotNull($this$contains, \"$this$contains\");\n return $this$contains.m2200containsVKZWuLQ(ULong.m1443constructorimpl(((long) value) & 4294967295L));\n }", "public boolean checkColorValue(String valueCombo) {\r\n\t\tString Storedvalue = valueCombo.substring(0,1);\r\n\t\tint storeValueInt = Integer.parseInt(Storedvalue);\r\n\t\tint[] colorValues = getScreenColor(lifeGlobe.getPosition().get(9 - storeValueInt).get(1), \r\n\t\t\t\tlifeGlobe.getPosition().get(9 - storeValueInt).get(0));\r\n\t\tdouble dist = calcDist(colorValues);\r\n\r\n\t\t\r\n\t\t// I might wanna rework this because it dont work 100% of the times\r\n\t\tif(dist < 40){\r\n\t\t\tfc.playSound();\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\treturn false;\r\n\t\r\n\t\t/*\r\n\t\tif(colorValues[0] != 186.0 && colorValues[0] != 91.0){\r\n\t\t\tif(colorValues[1] != 149.0 && colorValues[1] != 70.0){\r\n\t\t\t\tif(colorValues[1] != 107.0 && colorValues[1] != 45.0){\r\n\t\t\t\t\treturn true;\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}", "boolean hasB21();", "boolean hasB23();", "abstract int binSearch(int[] array, int num, int left, int right);", "private boolean isJunctionValueNodeForDecision(Node chanceOrDecNode, Node valueNode) {\n NodeList influentialUtils;\n NodeList negativeUtilities;\n\n influentialUtils = chanceOrDecNode.getChildrenNodes();\n negativeUtilities = obtainNegativeUtilityNodes();\n influentialUtils.merge(negativeUtilities);\n return diag.areAscendantsOf(valueNode, influentialUtils);\n }" ]
[ "0.5748814", "0.5683275", "0.5672402", "0.56611127", "0.5601631", "0.55888563", "0.55825573", "0.5539914", "0.552132", "0.550828", "0.54437935", "0.5436934", "0.5359214", "0.5359214", "0.53437096", "0.5318964", "0.531487", "0.53113854", "0.52973604", "0.5278034", "0.52607495", "0.5241411", "0.5235074", "0.52207255", "0.52075547", "0.5205855", "0.52027285", "0.52017903", "0.5188653", "0.5182483", "0.51769984", "0.51753664", "0.51715916", "0.51684934", "0.5152916", "0.51458704", "0.5134957", "0.51270586", "0.5100565", "0.5100565", "0.5094664", "0.5085188", "0.5080348", "0.5080161", "0.5079918", "0.50784814", "0.5073159", "0.506953", "0.50644743", "0.5052238", "0.50396496", "0.503786", "0.5025975", "0.5023567", "0.5020876", "0.5011563", "0.50098497", "0.50097114", "0.5008794", "0.50064033", "0.50059116", "0.5005594", "0.5005594", "0.5005594", "0.5005594", "0.5005594", "0.5005594", "0.5005594", "0.5005594", "0.5005594", "0.5005594", "0.5005594", "0.5005594", "0.5005594", "0.5005594", "0.5004379", "0.49932802", "0.49908623", "0.4988084", "0.4976492", "0.49721652", "0.49719906", "0.49685103", "0.49646342", "0.49641055", "0.49532482", "0.4952586", "0.4952029", "0.49480987", "0.49476326", "0.49406296", "0.4939279", "0.49342984", "0.49318045", "0.49312648", "0.49190512", "0.49123034", "0.4911743", "0.49076962", "0.4907641" ]
0.614349
0
Auxiliary method to get the bin for a certain time field (tx_from, tx_to, valid_from, valid_to)
private Binning getBins(TemporalElementStats elementStats, TimeSelector.TimeField field1) { if (field1 == TimeSelector.TimeField.TX_FROM) { return elementStats.getEstimatedTimeBins()[0]; } else if (field1 == TX_TO) { return elementStats .getEstimatedTimeBins()[1]; } else if (field1 == TimeSelector.TimeField.VAL_FROM) { return elementStats.getEstimatedTimeBins()[2]; } else { return elementStats.getEstimatedTimeBins()[3]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean matchesBin(Long[] arr, Long value, int index) {\n if (arr.length == 1) {\n return true;\n }\n if (index == arr.length - 1) {\n return value >= arr[index];\n } else if (index == 0) {\n return value < arr[index + 1];\n } else {\n boolean lowerCond = value >= arr[index];\n boolean upperCond = value.equals(TemporalElement.DEFAULT_TIME_TO) ? value <= arr[index + 1] :\n value < arr[index + 1];\n return lowerCond && upperCond;\n }\n }", "public BranchAndBound() {\n this.timeFi = Long.parseLong(\"2000000000000\");;\n this.numSoluciones = 0;\n }", "boolean hasTimeBoltBBoltC();", "boolean hasTimeBoltABoltB();", "long getTimeBoltABoltB();", "boolean hasTimeBoltCBoltD();", "private Spatial getBin(Location loc)\r\n {\r\n return loc.getX()<mid.getX() \r\n ? (loc.getY()<mid.getY() ? bins[BL] : bins[TL])\r\n : (loc.getY()<mid.getY() ? bins[BR] : bins[TR]);\r\n }", "protected static BinaryTemporalOperator timeInfoToFilter(TimeExtent time)\n {\n Date begin = new Date((long)time.getStartTime()*1000);\n Date end = new Date((long)time.getStopTime()*1000);\n BinaryTemporalOperator temporalFilter;\n TemporalPrimitive timePrimitive;\n \n if (time.isTimeInstant())\n {\n timePrimitive = new DefaultInstant(new DefaultPosition(begin));\n temporalFilter = filterFactory.tequals(filterFactory.property(\"phenomenonTime\"),\n filterFactory.literal(timePrimitive));\n }\n else if (time.isEndNow() || time.getStopTime() == Double.POSITIVE_INFINITY)\n {\n timePrimitive = new DefaultInstant(new DefaultPosition(end));\n temporalFilter = filterFactory.after(filterFactory.property(\"phenomenonTime\"),\n filterFactory.literal(timePrimitive));\n }\n else if (time.getStartTime() == Double.NEGATIVE_INFINITY)\n {\n timePrimitive = new DefaultInstant(new DefaultPosition(end));\n temporalFilter = filterFactory.before(filterFactory.property(\"phenomenonTime\"),\n filterFactory.literal(timePrimitive));\n }\n else\n {\n timePrimitive = new DefaultPeriod(new DefaultInstant(new DefaultPosition(begin)),\n new DefaultInstant(new DefaultPosition(end)));\n temporalFilter = filterFactory.during(filterFactory.property(\"phenomenonTime\"),\n filterFactory.literal(timePrimitive));\n }\n \n return temporalFilter;\n }", "public boolean hasTimeBoltABoltB() {\n return ((bitField0_ & 0x00400000) == 0x00400000);\n }", "public boolean hasTimeBoltABoltB() {\n return ((bitField0_ & 0x00400000) == 0x00400000);\n }", "public void binSearch(int current, int first, int last) {\r\n long average2 = 0, timeB = 0, stanDev = 0;\r\n System.out.println(\"\\nBINARY SEARCH\\n\");\r\n for (int i = 0; i < 10; i++) {\r\n long start = System.nanoTime();\r\n while (last >= first) {\r\n int mid = (last + first) / 2;//FINDS THE MID WAY POINT IN ORDER TO KEEP HALF-ING THE SEARCH RESULTS.\r\n if (A[mid] == current) {\r\n long stop = System.nanoTime();\r\n long timelength = (stop - start);\r\n timeB += timelength; // USED FOR GETTING AVERAGE. \r\n bin[k][i] = timelength;//USED FOR STORING THE TIME IT TOOK FOR EACH TEST, IT IS USED LATER ON TO DISPLAY IN THE CHART.\r\n binary[i] = timelength;//USED FOR FINDING STANDARD DEVIATION.\r\n System.out.println(\"The number: \" + current + \" was found in the array index: \" + A[mid]\r\n + \"\\nIt took: \" + timelength + \" nanoseconds.\");\r\n break;\r\n\r\n } else if (A[mid] < current) {\r\n first = mid + 1;\r\n } else {\r\n last = mid - 1;\r\n }\r\n }\r\n }\r\n average2 = (timeB / 10);\r\n linAvAndDev[h][0] = average2;\r\n for (int j = 0; j < 10; j++) {\r\n stanDev += Math.pow((binary[j] - average2), 2.0);\r\n }\r\n stanDev /= 10;\r\n stanDev = (long) Math.sqrt(stanDev);\r\n linAvAndDev[h][1] = stanDev;\r\n System.out.println(\"The Avearge time for the Binary Search was: \" + average2 + \" nanoseconds.\"\r\n + \"\\nThe Standard Deviation time for the Binary Search was: \" + stanDev + \" nanoseconds.\");\r\n h += 1;\r\n k += 1;\r\n }", "public static void main(String[] args){\n int s = 80;\n int n = (int) Math.pow(10, 7);\n Integer[] a = new Integer[n];\n Random rand = new Random();\n for (int i = 0; i < n; i++){\n a[i] = (int) (n*rand.nextDouble());\n }\n double binTime = binSearchT(s, a);\n double linTime = linSearchT(s, a);\n System.out.println(\"binTime: \"+ binTime);\n System.out.println(\"linTime: \"+ linTime);\n\n }", "long getTimeBoltBBoltC();", "@Override\n public long getTimeBucket(long time)\n {\n if (time < start) {\n return -1;\n }\n long diffFromStart = time - fixedStart;\n long key = diffFromStart / bucketSpanMillis;\n if (time >= end) {\n long diffInBuckets = (time - end) / bucketSpanMillis;\n long move = (diffInBuckets + 1) * bucketSpanMillis;\n start += move;\n end += move;\n // trigger purge when lower bound changes\n triggerPurge = (move > 0);\n if (triggerPurge) {\n lowestPurgeableTimeBucket = ((start - fixedStart) / bucketSpanMillis) - 2;\n }\n }\n return key;\n\n }", "public Timestamp getValidFrom();", "public java.math.BigInteger getGBInterval_from(){\n return localGBInterval_from;\n }", "protected int getBinIndex(double w){\n\t\tdouble lnw = Math.log(w);\n\t\tdouble i = Math.floor((lnw - m_lnA0)/m_lnR);\n\t\tint result = (int)i;\n\t\tif(result >= m_numBins.getValue() || result < 0){\n\t\t\tresult = -1;\n\t\t}\n\t\treturn result;\n\t}", "public Timestamp getValidTo();", "Long getResultMaskBoundary();", "public Builder setTimeBoltABoltB(long value) {\n bitField0_ |= 0x00400000;\n timeBoltABoltB_ = value;\n \n return this;\n }", "long getTimeBoltCBoltD();", "boolean hasTimeBoltHBoltE();", "protected static Bbox filterToBbox(BinarySpatialOperator spatialFilter)\n {\n Bbox bbox = new Bbox();\n \n if (spatialFilter instanceof BBOX)\n {\n BBOX ogcBbox = (BBOX)spatialFilter;\n bbox.setCrs(ogcBbox.getSRS());\n bbox.setMinX(ogcBbox.getMinX());\n bbox.setMinY(ogcBbox.getMinY());\n bbox.setMaxX(ogcBbox.getMaxX());\n bbox.setMaxY(ogcBbox.getMaxY());\n }\n \n return bbox;\n }", "private void generateIndicatorStrategySignal(float price) {\n\t\tLocalTime currentTime = LocalTime.now();\n\n\t\t// Define the start and end times for the range\n\t\tLocalTime startTime = LocalTime.of(9, 15, 0);\n\t\tLocalTime endTime = LocalTime.of(15, 30, 0);\n\n\t\tif (currentTime.isAfter(startTime) && currentTime.isBefore(endTime)) {\n\t\t\tthis.indicatorBasedStrategy.createOrUpdateBar(price);\n\t\t\tString time = currentTime.getHour() + \":\" + currentTime.getMinute();\n\t\t\tif (currentTime.getMinute() % 5 == 0) {\n\t\t\t\tthis.indicatorBasedStrategy.flushBar(time);\n\t\t\t\tString signal = this.indicatorBasedStrategy.getSignal(time);\n\t\t\t\tif (signal != null) {\n\t\t\t\t\tTelegramService.sendMessage(signal + \" at \" + price);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (currentTime.equals(endTime)) {\n\t\t\tthis.indicatorBasedStrategy.flushBar(currentTime.getHour() + \"\" + currentTime.getMinute());\n\t\t}\n\t}", "public void setGBInterval_from(java.math.BigInteger param){\n localGBInterval_fromTracker = param != null;\n \n this.localGBInterval_from=param;\n \n\n }", "public boolean hasTimeBoltBBoltC() {\n return ((bitField0_ & 0x00800000) == 0x00800000);\n }", "@Override\n protected long getTimestampField(long time) {\n int year = Arrays.binarySearch(YEAR_BOUNDARIES, time);\n if(year >= 0) {\n /* 0 == 1902 etc */\n return MIN_YEAR + 1 + year;\n } else {\n /* -1 == 1901, -2 == 1902 */\n return MIN_YEAR - 1 - year;\n }\n }", "public abstract void isBargein(long ms, boolean success);", "public WeeklySchedule build(List bins) {\r\n\r\n /*\r\n * Iterate through bins and place into time slots.\r\n */\r\n\r\n Iterator i = bins.iterator();\r\n\r\n Schedule tempSchedule = null;\r\n\r\n HashMap kTimevTimeslotMap = new HashMap();\r\n\r\n while (i.hasNext()) {\r\n DailyBin currentBin = (DailyBin) i.next();\r\n\r\n /*\r\n * Build key\r\n */\r\n SimpleDate currentSimple = SimpleDate.factory.build(currentBin\r\n .getLowerBound());\r\n\r\n /*\r\n * Look up Schedule\r\n */\r\n WeeklyScheduleTimeSlot timeSlot = (WeeklyScheduleTimeSlot) kTimevTimeslotMap\r\n .get(getKey(currentSimple));\r\n /*\r\n * Create a new TimeSlot if we don't already have one.\r\n */\r\n if (timeSlot == null) {\r\n timeSlot = new WeeklyScheduleTimeSlot();\r\n\r\n kTimevTimeslotMap.put(getKey(currentSimple), timeSlot);\r\n }\r\n\r\n /*\r\n * Add bin to timeSlot.\r\n */\r\n timeSlot.addBin(currentBin);\r\n// timeSlot.setSettingsBroker(settingsBroker);\r\n }\r\n\r\n Collection timeslots = kTimevTimeslotMap.values();\r\n\r\n return new WeeklySchedule(timeslots);\r\n\r\n }", "public boolean hasTimeBoltBBoltC() {\n return ((bitField0_ & 0x00800000) == 0x00800000);\n }", "BitField getSubField(int from, int to);", "Between createBetween();", "public MutableBlock createMutableBlock(TimeParameter timeType, int start, int end) {\r\n String type = timeType.getTextField();\r\n ExpressionBuilder exp = new ExpressionBuilder();\r\n exp.value(type).greaterEquals().value(start).and().value(type).lessEquals().value(end);\r\n return createMutableBlock(exp);\r\n }", "public TimeBounds getTimeBounds() {\n\t\t// Only here to ensure it is being used correctly.\n\t\t// cbit.util.Assertion.assertNotNull(fieldTimeBounds);\n\t\treturn fieldTimeBounds;\n\t}", "protected static TimeExtent filterToTimeInfo(BinaryTemporalOperator temporalFilter)\n {\n TimeExtent time = new TimeExtent();\n \n if (temporalFilter != null)\n {\n TemporalPrimitive timePrimitive = (TemporalPrimitive) ((Literal)temporalFilter.getExpression2()).getValue();\n \n if (timePrimitive instanceof Instant)\n {\n time.setBaseTime(((Instant)timePrimitive).getPosition().getDate().getTime()/1000.0); \n }\n else if (timePrimitive instanceof Period)\n {\n time.setStartTime(((Period)timePrimitive).getBeginning().getPosition().getDate().getTime()/1000.0); \n time.setStopTime(((Period)timePrimitive).getEnding().getPosition().getDate().getTime()/1000.0); \n }\n }\n \n return time;\n }", "private Points getTransactions(long startTimestamp, long endTimestamp) {\n if (startTimestamp > endTimestamp) {\n long tmp = startTimestamp;\n startTimestamp = endTimestamp;\n endTimestamp = tmp;\n }\n int low = 0;\n int high = transactionList.size() - 1;\n int x = -1;\n int y = -1;\n while (low <= high) {\n int mid = (high + low) >> 1;\n if (transactionList.get(mid).transactionTimestamp >= startTimestamp) {\n x = mid;\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n }\n if (x == -1) {\n return new Points(-1, -1);\n }\n\n low = 0;\n high = transactionList.size() - 1;\n while (low <= high) {\n int mid = (high + low) >> 1;\n if (transactionList.get(mid).transactionTimestamp <= endTimestamp) {\n y = mid;\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n if (y == -1) {\n return new Points(-1, -1);\n }\n return new Points(x, y);\n }", "private void calculateBPRange() {\n\t\tbroadPhaseLength = 0.0f;\n\t\tfor (Vector2f p : points) {\n\t\t\tbroadPhaseLength = Math.max(broadPhaseLength, Math.abs(p.length()));\n\t\t}\n\t}", "public static int searchForIntervalBoundary(long time) {\n\n int intakeIndex = 1;\n\n for (int i = theirIntakes.size() - 1; i > 0; i--) {\n if (theirIntakes.get(i).getCreationTime() < time) {\n intakeIndex = i;\n break;\n }\n }\n\n return intakeIndex;\n\n }", "String isWithinRegularReportPeriod(Long transmissionid);", "public boolean hasTimeBoltCBoltD() {\n return ((bitField0_ & 0x01000000) == 0x01000000);\n }", "public interface ScheduleBlock\n{\n boolean isBlock();\n Long getStartLong();\n Long getEndLong();\n\n\n}", "long getTimeUntilNextSet(Coordinates coord, double horizon, long time) throws AstrometryException;", "public java.math.BigInteger getGBInterval_to(){\n return localGBInterval_to;\n }", "public abstract Self byteRange(byte min, byte max);", "public boolean hasTimeBoltCBoltD() {\n return ((bitField0_ & 0x01000000) == 0x01000000);\n }", "long getTimeBoltHBoltE();", "long getValidFrom();", "@Test\n\tpublic void testRomeTaxiRangeTupleBuilder2() throws ParseException {\n\t\tfinal TupleBuilder tupleBuilder = TupleBuilderFactory.getBuilderForFormat(\n\t\t\t\tTupleBuilderFactory.Name.ROME_TAXI_RANGE);\n\n\t\tfinal Tuple tuple1 = tupleBuilder.buildTuple(ROME_TAXI_2, \"1\");\n\t\tfinal Tuple tuple2 = tupleBuilder.buildTuple(ROME_TAXI_1, \"1\");\n\n\t\tAssert.assertNull(tuple1);\n\t\tAssert.assertNotNull(tuple2);\n\t\tAssert.assertEquals(Integer.toString(1), tuple2.getKey());\n\n\t\tfinal Hyperrectangle exptectedBox = new Hyperrectangle(1388790007028d, 1388790009028d,\n\t\t\t\t41.91924450823211, 41.92924450823211,\n\t\t\t\t12.5027184734508, 14.5527184734508);\n\n\t\tAssert.assertEquals(exptectedBox, tuple2.getBoundingBox());\n\t}", "private void drawBins (Graphics g) {\n double dTime = (endT - begT) / parent.numBins;\n int j = 0; statesDrawn = 0; highestCt = 0;\n \n Vector v = parent.stateDef.stateVector;\n \n for (int i = 0; i < parent.numBins; i++) {\n //Limits of a bin\n double startTime = begT + (i * dTime); \n double finishTime = begT + ((i + 1) * dTime);\n int ct = 0;\n \n Info currState;\n while (j < v.size () &&\n ((currState = (Info)v.elementAt (j)).lenT < finishTime ||\n (currState.lenT == finishTime && currState.lenT == endT))) {\n if (startTime <= currState.lenT) {\n ct++;\n statesDrawn ++;\n }\n j++;\n }\n if (highestCt < ct) highestCt = ct;\n \n //draw the bin\n if (ct > 0) drawBin (g, i, ct);\n }\n }", "@Test\n\tpublic void testRomeTaxiRangeTupleBuilder1() throws ParseException {\n\t\tfinal TupleBuilder tupleBuilder = TupleBuilderFactory.getBuilderForFormat(\n\t\t\t\tTupleBuilderFactory.Name.ROME_TAXI_RANGE);\n\n\t\tfinal Tuple tuple1 = tupleBuilder.buildTuple(ROME_TAXI_1, \"1\");\n\t\tfinal Tuple tuple2 = tupleBuilder.buildTuple(ROME_TAXI_2, \"1\");\n\n\t\tAssert.assertNull(tuple1);\n\t\tAssert.assertNotNull(tuple2);\n\t\tAssert.assertEquals(Integer.toString(1), tuple2.getKey());\n\n\t\tfinal Hyperrectangle exptectedBox = new Hyperrectangle(1388790007028d, 1388790009028d,\n\t\t\t\t41.91924450823211, 41.92924450823211,\n\t\t\t\t12.5027184734508, 14.5527184734508);\n\n\t\tAssert.assertEquals(exptectedBox, tuple2.getBoundingBox());\n\t}", "@Test\n\tpublic void testYellowTaxiRangeTupleBuilder() throws ParseException {\n\t\tfinal TupleBuilder tupleBuilder = TupleBuilderFactory.getBuilderForFormat(\n\t\t\t\tTupleBuilderFactory.Name.YELLOWTAXI_RANGE);\n\n\t\tfinal Tuple tuple = tupleBuilder.buildTuple(TAXI_TEST_LINE, \"1\");\n\n\t\tAssert.assertNotNull(tuple);\n\t\tAssert.assertEquals(Integer.toString(1), tuple.getKey());\n\n\t\tfinal SimpleDateFormat dateParser = new SimpleDateFormat(\"yyyy-mm-dd HH:mm:ss\");\n\t\tfinal Date dateLow = dateParser.parse(\"2016-01-01 00:00:00\");\n\t\tfinal Date dateHigh = dateParser.parse(\"2016-01-01 00:00:00\");\n\n\t\tfinal Hyperrectangle exptectedBox = new Hyperrectangle(-73.990371704101563, -73.981842041015625,\n\t\t\t\t40.732406616210937, 40.734695434570313,\n\t\t\t\t(double) dateLow.getTime(), (double) dateHigh.getTime());\n\n\t\tAssert.assertEquals(exptectedBox, tuple.getBoundingBox());\n\t}", "private void bcombo(Tlv tlv, int[] a){ \n //uint16 value (year)\n uint16(tlv, a == null ? 0x00 : a[0]);\n //uint16 - month\n uint16(tlv, a == null ? 0x00 : a[1]);\n //uint16 - day\n uint16(tlv, a == null ? 0x00 : a[2]);\n }", "@ParameterizedTest\n @CsvSource(value = {\"0,7\", \"8,15\", \"16,23\", \"24,31\", \"0,23\", \"13, 29\"})\n void sliceGetsCorrectSignals(int min, int max) {\n //create range obj with inputs\n IRange range = new SimpleRange(min, max);\n\n //create bus of width 64 with random values\n Random r = new Random();\n int busWidth = 32;\n ISignal[] sigs = new ISignal[busWidth];\n for (int i=0; i<busWidth; i++) {\n sigs[i] = new SimpleSignal(r.nextBoolean());\n }\n IBus busToSlice = new Bus(sigs);\n\n //sliceBus the bus\n IBus result = Util.sliceBus(range, busToSlice);\n\n //need to get values from sliceBus to test\n int rangeWidth = range.getMax() - range.getMin();\n assertEquals(collectValuesFromBus(range, busToSlice), collectValuesFromBus(new SimpleRange(0, rangeWidth), result));\n\n //sweep in 8-bit slices across the bus to see if we're getting the correct range from the sliceBus util\n int numBitsInSweep = 8;\n int numSweeps = busWidth/numBitsInSweep;\n for (int i=0; i<numSweeps; i++) {\n int start = i*numBitsInSweep;\n int end = start + numBitsInSweep - 1;\n IBus slice = Util.sliceBus(new SimpleRange(start, end), busToSlice);\n }\n }", "private TimeRange(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "public void testBandwith() {\n\t\t\n\t\tlong timeOffset = 0;\n\t\t\n\t\tTransInfo addressOfNode1 = this.node1.getTransLayer().getLocalTransInfo(this.node1.getPort());\n\t\tint messageSize = 1024 * 1024;\n\t\t\n\t\t//Nacheinander\n\t\tDummyMessage message1 = new DummyMessage(messageSize, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage message2 = new DummyMessage(messageSize, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage message3 = new DummyMessage(messageSize, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\t\n\t\tthis.node2.sendTestMessage(0 * Simulator.MINUTE_UNIT + timeOffset, message1, addressOfNode1);\n\t\tthis.node3.sendTestMessage(2 * Simulator.MINUTE_UNIT + timeOffset, message2, addressOfNode1);\n\t\tthis.node4.sendTestMessage(4 * Simulator.MINUTE_UNIT + timeOffset, message3, addressOfNode1);\n\t\t\n\t\ttimeOffset += Simulator.HOUR_UNIT;\n\t\t\n\t\t//Um 1 Tick verschoben:\n\t\tDummyMessage message4 = new DummyMessage(messageSize, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage message5 = new DummyMessage(messageSize, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage message6 = new DummyMessage(messageSize, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\t\n\t\tthis.node2.sendTestMessage(0 + timeOffset, message4, addressOfNode1);\n\t\tthis.node3.sendTestMessage(1 + timeOffset, message5, addressOfNode1);\n\t\tthis.node4.sendTestMessage(2 + timeOffset, message6, addressOfNode1);\n\t\t\n\t\ttimeOffset += Simulator.HOUR_UNIT;\n\t\t\n\t\t//Um 45 Sekunden verschoben:\n\t\tDummyMessage message7 = new DummyMessage(messageSize, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage message8 = new DummyMessage(messageSize, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage message9 = new DummyMessage(messageSize, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\t\n\t\tthis.node2.sendTestMessage( 0 * Simulator.SECOND_UNIT + timeOffset, message7, addressOfNode1);\n\t\tthis.node3.sendTestMessage(45 * Simulator.SECOND_UNIT + timeOffset, message8, addressOfNode1);\n\t\tthis.node4.sendTestMessage(90 * Simulator.SECOND_UNIT + timeOffset, message9, addressOfNode1);\n\t\t\n\t\ttimeOffset += Simulator.HOUR_UNIT;\n\t\t\n\t\tDummyMessage messageA = new DummyMessage(1024 * 1024 * 1024, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\tthis.node2.sendTestMessage(timeOffset, messageA, addressOfNode1);\n\t\t\n\t\ttimeOffset += (5 * 24 * Simulator.HOUR_UNIT);\n\t\t\n\t\tDummyMessage messageB = new DummyMessage(1024 * 1024, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage messageC = new DummyMessage( 100, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage messageD = new DummyMessage(1024 * 1024, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\t\n\t\tDummyMessage messageE = new DummyMessage(1024 * 1024, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage messageF = new DummyMessage( 1, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage messageG = new DummyMessage(1024 * 1024, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\t\n\t\tDummyMessage messageH = new DummyMessage(1024 * 1024, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage messageI = new DummyMessage( 0, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage messageJ = new DummyMessage(1024 * 1024, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\t\n\t\tDummyMessage messageK = new DummyMessage(1024 * 1024, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage messageL = new DummyMessage(1024 * 1024, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage messageM = new DummyMessage(1024 * 1024, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\t\n\t\tthis.node2.sendTestMessage(0 + timeOffset, messageB, addressOfNode1);\n\t\tthis.node2.sendTestMessage(1 + timeOffset, messageC, addressOfNode1);\n\t\tthis.node2.sendTestMessage(2 + timeOffset, messageD, addressOfNode1);\n\t\t\n\t\ttimeOffset += Simulator.HOUR_UNIT;\n\t\t\n\t\tthis.node2.sendTestMessage(0 + timeOffset, messageE, addressOfNode1);\n\t\tthis.node2.sendTestMessage(1 + timeOffset, messageF, addressOfNode1);\n\t\tthis.node2.sendTestMessage(2 + timeOffset, messageG, addressOfNode1);\n\t\t\n\t\ttimeOffset += Simulator.HOUR_UNIT;\n\t\t\n\t\tthis.node2.sendTestMessage(0 + timeOffset, messageH, addressOfNode1);\n\t\tthis.node2.sendTestMessage(1 + timeOffset, messageI, addressOfNode1);\n\t\tthis.node2.sendTestMessage(2 + timeOffset, messageJ, addressOfNode1);\n\t\t\n\t\ttimeOffset += Simulator.HOUR_UNIT;\n\t\t\n\t\tthis.node2.sendTestMessage(0 + timeOffset, messageK, addressOfNode1);\n\t\tthis.node2.sendTestMessage(1 + timeOffset, messageL, addressOfNode1);\n\t\tthis.node2.sendTestMessage(2 + timeOffset, messageM, addressOfNode1);\n\t\t\n\t\ttimeOffset += Simulator.HOUR_UNIT;\n\t\t\n\t\t\n\t\tDummyMessage messageN = new DummyMessage(1024 * 1024, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage messageO = new DummyMessage( 100, this.node3.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage messageP = new DummyMessage(1024 * 1024, this.node4.getOverlayID(), this.node1.getOverlayID());\n\t\t\n\t\tDummyMessage messageQ = new DummyMessage(1024 * 1024, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage messageR = new DummyMessage( 1, this.node3.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage messageS = new DummyMessage(1024 * 1024, this.node4.getOverlayID(), this.node1.getOverlayID());\n\t\t\n\t\tDummyMessage messageT = new DummyMessage(1024 * 1024, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage messageU = new DummyMessage( 0, this.node3.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage messageV = new DummyMessage(1024 * 1024, this.node4.getOverlayID(), this.node1.getOverlayID());\n\t\t\n\t\tDummyMessage messageW = new DummyMessage(1024 * 1024, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage messageX = new DummyMessage(1024 * 1024, this.node3.getOverlayID(), this.node1.getOverlayID());\n\t\tDummyMessage messageY = new DummyMessage(1024 * 1024, this.node4.getOverlayID(), this.node1.getOverlayID());\n\t\t\n\t\t\n\t\tthis.node2.sendTestMessage(0 + timeOffset, messageN, addressOfNode1);\n\t\tthis.node3.sendTestMessage(1 + timeOffset, messageO, addressOfNode1);\n\t\tthis.node4.sendTestMessage(2 + timeOffset, messageP, addressOfNode1);\n\t\t\n\t\ttimeOffset += Simulator.HOUR_UNIT;\n\t\t\n\t\tthis.node2.sendTestMessage(0 + timeOffset, messageQ, addressOfNode1);\n\t\tthis.node3.sendTestMessage(1 + timeOffset, messageR, addressOfNode1);\n\t\tthis.node4.sendTestMessage(2 + timeOffset, messageS, addressOfNode1);\n\t\t\n\t\ttimeOffset += Simulator.HOUR_UNIT;\n\t\t\n\t\tthis.node2.sendTestMessage(0 + timeOffset, messageT, addressOfNode1);\n\t\tthis.node3.sendTestMessage(1 + timeOffset, messageU, addressOfNode1);\n\t\tthis.node4.sendTestMessage(2 + timeOffset, messageV, addressOfNode1);\n\t\t\n\t\ttimeOffset += Simulator.HOUR_UNIT;\n\t\t\n\t\tthis.node2.sendTestMessage(0 + timeOffset, messageW, addressOfNode1);\n\t\tthis.node3.sendTestMessage(1 + timeOffset, messageX, addressOfNode1);\n\t\tthis.node4.sendTestMessage(2 + timeOffset, messageY, addressOfNode1);\n\t\t\n\t\ttimeOffset += Simulator.HOUR_UNIT;\n\t\t\n\t\t\n\t\tint numberOfMessages = 100;\n\t\tDummyMessage messages[] = new DummyMessage[numberOfMessages];\n\t\tfor (int i = 0; i < numberOfMessages; i++) {\n\t\t\tmessages[i] = new DummyMessage(1024 * 1024, this.node2.getOverlayID(), this.node1.getOverlayID());\n\t\t\tthis.node2.sendTestMessage(timeOffset + i, messages[i], addressOfNode1);\n\t\t}\n\t\t\n\t\ttimeOffset += numberOfMessages * Simulator.HOUR_UNIT;\n\t\t\n\t\trunSimulation(timeOffset);\n\t\t\n\t\tSystem.out.println(\"\\nBandbreite in Byte pro Sekunde: \" + bandwith);\n\t\t\n\t\tSystem.out.println(\"\\nNacheinander mit gen�gend Abstand:\");\n\t\tSystem.out.println(message1);\n\t\tSystem.out.println(message2);\n\t\tSystem.out.println(message3);\n\t\t\n\t\tSystem.out.println(\"\\nMit einem Tick Abstand:\");\n\t\tSystem.out.println(message4);\n\t\tSystem.out.println(message5);\n\t\tSystem.out.println(message6);\n\t\t\n\t\tSystem.out.println(\"\\nUm 1 Sekunde verschoben:\");\n\t\tSystem.out.println(message7);\n\t\tSystem.out.println(message8);\n\t\tSystem.out.println(message9);\n\t\t\n\t\tSystem.out.println('\\n');\n\t\tSystem.out.println(\"\\nEin Gigabyte:\");\n\t\tSystem.out.println(messageA);\n\t\t\n\t\tSystem.out.println('\\n');\n\t\tSystem.out.println(\"\\nVier mal drei Nachrichten, alle drei von Node2 nach Node1:\");\n\t\tSystem.out.println(\"\\nEin MiByte, 100 Byte, ein MiByte:\");\n\t\tSystem.out.println(messageB);\n\t\tSystem.out.println(messageC);\n\t\tSystem.out.println(messageD);\n\t\t\n\t\tSystem.out.println(\"\\nEin MiByte, 1 Byte, ein MiByte:\");\n\t\tSystem.out.println(messageE);\n\t\tSystem.out.println(messageF);\n\t\tSystem.out.println(messageG);\n\t\t\n\t\tSystem.out.println(\"\\nEin MiByte, 0 Byte, ein MiByte:\");\n\t\tSystem.out.println(messageH);\n\t\tSystem.out.println(messageI);\n\t\tSystem.out.println(messageJ);\n\t\t\n\t\tSystem.out.println(\"\\nEin MiByte, ein MiByte, ein MiByte:\");\n\t\tSystem.out.println(messageK);\n\t\tSystem.out.println(messageL);\n\t\tSystem.out.println(messageM);\n\t\t\n\t\tSystem.out.println('\\n');\n\t\tSystem.out.println(\"\\nVier mal drei Nachrichten, je eine von Node2, Node3 und Node4, alle zu Node1:\");\n\t\tSystem.out.println(\"\\nEin MiByte, 100 Byte, ein MiByte:\");\n\t\tSystem.out.println(messageN);\n\t\tSystem.out.println(messageO);\n\t\tSystem.out.println(messageP);\n\t\t\n\t\tSystem.out.println(\"\\nEin MiByte, 1 Byte, ein MiByte:\");\n\t\tSystem.out.println(messageQ);\n\t\tSystem.out.println(messageR);\n\t\tSystem.out.println(messageS);\n\t\t\n\t\tSystem.out.println(\"\\nEin MiByte, 0 Byte, ein MiByte:\");\n\t\tSystem.out.println(messageT);\n\t\tSystem.out.println(messageU);\n\t\tSystem.out.println(messageV);\n\t\t\n\t\tSystem.out.println(\"\\nEin MiByte, ein MiByte, ein MiByte:\");\n\t\tSystem.out.println(messageW);\n\t\tSystem.out.println(messageX);\n\t\tSystem.out.println(messageY);\n\t\t\n\t\t\n\t\tSystem.out.println('\\n');\n\t\tSystem.out.println(\"\\nMehrere Nachrichten sehr kurz hintereinander (1 Tick Abstand); alle von Node2 zu Node1:\");\n\t\tfor (int i = 0; i < numberOfMessages; i++) {\n\t\t\tSystem.out.println(messages[i]);\n\t\t}\n\t\t\n\t}", "public static void writeBinary(final ByteBuffer buf,\n final Bytes key,\n final long startTime,\n final long endTime) {\n buf.put(key.get());\n buf.putLong(endTime);\n buf.putLong(startTime);\n }", "public void setValidFrom (Timestamp ValidFrom);", "abstract int binSearch(int[] array, int num, int left, int right);", "float getBlackoutPeriod();", "private com.google.protobuf.SingleFieldBuilder<\n hr.client.appuser.CouponCenter.TimeRange, hr.client.appuser.CouponCenter.TimeRange.Builder, hr.client.appuser.CouponCenter.TimeRangeOrBuilder> \n getUseTimeFieldBuilder() {\n if (useTimeBuilder_ == null) {\n useTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n hr.client.appuser.CouponCenter.TimeRange, hr.client.appuser.CouponCenter.TimeRange.Builder, hr.client.appuser.CouponCenter.TimeRangeOrBuilder>(\n getUseTime(),\n getParentForChildren(),\n isClean());\n useTime_ = null;\n }\n return useTimeBuilder_;\n }", "private com.google.protobuf.SingleFieldBuilder<\n hr.client.appuser.CouponCenter.TimeRange, hr.client.appuser.CouponCenter.TimeRange.Builder, hr.client.appuser.CouponCenter.TimeRangeOrBuilder> \n getUseTimeFieldBuilder() {\n if (useTimeBuilder_ == null) {\n useTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n hr.client.appuser.CouponCenter.TimeRange, hr.client.appuser.CouponCenter.TimeRange.Builder, hr.client.appuser.CouponCenter.TimeRangeOrBuilder>(\n getUseTime(),\n getParentForChildren(),\n isClean());\n useTime_ = null;\n }\n return useTimeBuilder_;\n }", "Pair<DateTime, DateTime> getSegmentBounds(ReadableInstant instant) {\n LocalDate date = new DateTime(instant).toLocalDate(); // a day in the local time zone\n DateTime[] fenceposts = getSegmentFenceposts(date);\n for (int i = 0; i + 1 < fenceposts.length; i++) {\n if (!instant.isBefore(fenceposts[i]) && instant.isBefore(fenceposts[i + 1])) {\n return new Pair<>(fenceposts[i], fenceposts[i + 1]);\n }\n }\n return null; // should never get here because start <= instant < stop\n }", "long getTimeUntilNextTransit(Coordinates coord, long time) throws AstrometryException;", "public static ArrayList < ArrayList < Double >> binPack(double weight[], int n, double bin_cap) { \r\n int binCount = 0;\r\n int k = 0;\r\n double[] bin_space = new double[n];\r\n\r\n ArrayList < Integer > bin = new ArrayList < Integer > ();\r\n ArrayList < Double > val = new ArrayList < Double > ();\r\n ArrayList < ArrayList < Double >> binVal = new ArrayList < ArrayList < Double >> ();\r\n binVal.add(k, new ArrayList < Double > ());\r\n System.out.println(\".......Commencing Calculation...........\\n\");\r\n startTime = System.nanoTime();\r\n for (int i = 0; i < n; i++) {\r\n int j;\r\n for (j = 0; j < binCount; j++) {\r\n \r\n if (bin_space[j] >= weight[i]) {\r\n bin_space[j] = bin_space[j] - weight[i];\r\n //val.add(weight[i]);\r\n (binVal.get(j)).add((weight[i]));\r\n k=j+1;\r\n System.out.println(\"---Bin \" + j + \" took in weight \" + weight[i]);\r\n break;\r\n }\r\n \r\n }\r\n System.out.println(\"*Bad fit for next weight size \"+ weight[i]+ \r\n \"\\n\\n ***NEW BIN CREATED***\\n\");\r\n if (j == binCount) {\r\n \r\n bin_space[binCount] = bin_cap - weight[i];\r\n //val.add(weight[i]);\r\n binCount++;\r\n //k++;\r\n bin.add(j);\r\n binVal.add(j, new ArrayList < Double > ());\r\n (binVal.get(j)).add((weight[i]));\r\n k=j+1;\r\n System.out.println(\"---Bin \" + k + \" took in weight **\" + weight[i]);\r\n }\r\n } \r\n endTime = System.nanoTime();\r\n elapsedTime = (endTime- startTime);\r\n System.out.println(\"\\nBIN PACKING ALGORITHM COMPLETE\\n\");\r\n \r\n return binVal;\r\n }", "public static void compress(ByteBuffer bbInput, ByteBuffer bbOutput, StringBuilder information, long[] time) throws IOException\r\n {\r\n long startTime = System.currentTimeMillis(); \r\n \r\n Arithmetic arithmetic = new Arithmetic();\r\n \r\n while(bbInput.remaining() > 0)\r\n {\r\n byte b = bbInput.get();\r\n arithmetic.add(b);\r\n }\r\n \r\n TreeMap<Byte, Range> rangeTable = arithmetic.set();\r\n \r\n //System.out.println(rangeTable.size());\r\n \r\n bbOutput.putInt(rangeTable.size());\r\n for (Entry<Byte, Range> e : rangeTable.entrySet())\r\n {\r\n bbOutput.put(e.getKey().byteValue());\r\n bbOutput.putLong(e.getValue().count);\r\n //System.out.println((char) e.getKey().byteValue() + \":\" + e.getValue().count + \" \" + (int) e.getValue().high + \" \" + (int) e.getValue().low);\r\n }\r\n \r\n int rangeTableCount = bbInput.position();\r\n bbOutput.putInt(rangeTableCount);\r\n \r\n if (rangeTableCount > (Math.pow(2,16)))\r\n {\r\n information.append(\"FATAL ERROR: Cannot compress block larger than 2^16 - 1\");\r\n return;\r\n }\r\n \r\n bbInput.position(0);\r\n \r\n //System.out.println(rangeTableCount);\r\n\r\n char low = 0;\r\n char high = 0xFFFF;\r\n short underflow_bits = 0;\r\n\r\n BitWriter bitWriter = new BitWriter(bbOutput);\r\n\r\n //Range testRange = arithmetic.rangeTable.get((byte)'B');\r\n //System.out.println((char)'B' + \" \" + testRange.count + \" \" + (int) testRange.high + \" \" + (int) testRange.low);\r\n \r\n while(bbInput.remaining() > 0)\r\n {\r\n byte b = bbInput.get();\r\n Range range = rangeTable.get(b);\r\n \r\n long diff;\r\n diff = (long) (high - low) + 1;\r\n char temphigh = (char) ((diff * range.high) / rangeTableCount - 1);\r\n high = (char) (low + temphigh);\r\n char templow = (char) ((diff * range.low) / rangeTableCount);\r\n low = (char) (low + templow);\r\n \r\n boolean shiftingComplete = false;\r\n while (!shiftingComplete)\r\n {\r\n // TEST1: Test if most significant bit match, shift them out.\r\n if ((high & 0x8000) == (low & 0x8000))\r\n {\r\n bitWriter.put((high & 0x8000) != 0);//!=\r\n while (underflow_bits > 0)\r\n {\r\n bitWriter.put((~high & 0x8000) != 0);\r\n underflow_bits--;\r\n }\r\n low <<= 1;\r\n high <<= 1;\r\n high |= 1;\r\n }\r\n // TEST2: Test for potential underflow if most significant digits don't match and\r\n // second most significant digits are one apart.\r\n else if ((low & 0x4000) != 0 && (!((high & 0x4000) != 0)))\r\n {\r\n underflow_bits += 1;\r\n low &= 0x3fff;\r\n high |= 0x4000;\r\n \r\n low <<= 1;\r\n high <<= 1;\r\n high |= 1;\r\n }\r\n // ELSE: COMPLETE\r\n else\r\n {\r\n shiftingComplete = true;\r\n }\r\n }\r\n }\r\n \r\n bitWriter.put((low & 0x4000) != 0);\r\n underflow_bits++;\r\n while (underflow_bits-- > 0)\r\n {\r\n bitWriter.put((~low & 0x4000) != 0);\r\n }\r\n\r\n bitWriter.finish();\r\n \r\n long endTime = System.currentTimeMillis();\r\n time[0] += (endTime - startTime);\r\n }", "private static long BBT(int n, long[] strg) {\n\t\tif (n == 0 || n == 1)\n\t\t\treturn 1;\n\t\tif (strg[n] != 0)\n\t\t\treturn strg[n];\n\t\tstrg[n] = ((BBT(n - 1, strg) % mod) * (2 * (BBT(n - 2, strg) % mod + BBT(n - 1, strg) % mod) % mod)) % mod;\n\t\treturn strg[n];\n\n\t}", "public void setGBInterval_to(java.math.BigInteger param){\n localGBInterval_toTracker = param != null;\n \n this.localGBInterval_to=param;\n \n\n }", "protected Rectangle getGraphBoundaries(int fromSample, int toSample) {\r\n\t\tif (fromSample < section.getStart()) fromSample = section.getStart();\r\n\t\tif (toSample > section.getEnd()) toSample = section.getEnd();\r\n\t\tif (fromSample > toSample || fromSample > section.getEnd()\r\n\t\t\t\t|| toSample < section.getStart())\r\n\t\t\treturn new Rectangle(0, 0, 0, 0);\r\n\t\tint x1 = toPixelX(fromSample);\r\n\t\tint x2 = toPixelEndX(toSample);\r\n\t\treturn new Rectangle(getGraphLeft() + x1, getGraphTop(0), x2 - x1 + 1,\r\n\t\t\t\tgetGraphHeight() * getChannelCount());\r\n\t}", "private List<String> calculateCombinations(TimeBean obj) {\r\n\t\tList<String> listTimeComb = new ArrayList<String>();\r\n\r\n\t\twhile(obj.getStartHr() <= obj.getEndHr()) {\r\n\t\t\t//If Hr is not 2 digit then pass to next cycle till end time\r\n\t\t\tif(obj.getStartHr() < 10 && obj.getStartHr()!=0) {\r\n\t\t\t\tTimeUtil.incrementHr(obj);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// If both end time and start time is 00\r\n\t\t\tif(obj.getStartHr() == 0 && obj.getEndHr() == 0){\r\n\t\t\t\t\r\n\t\t\t\tif(obj.getStartMin()<10) {\r\n\t\t\t\t\tTimeUtil.incrementMin(obj);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(obj.getStartMin() < obj.getEndMin() ) {\r\n\t\t\t\t\tlistTimeComb.add(\"00:\"+obj.getStartMin()+\":\"+obj.getStartMin());\r\n\t\t\t\t\tTimeUtil.incrementMin(obj);\r\n\t\t\t\t}else if(obj.getStartMin() == obj.getEndMin() && obj.getEndMin() <= obj.getEndSec()) {\r\n\t\t\t\t\tlistTimeComb.add(\"00:\"+obj.getStartMin()+\":\"+obj.getStartMin());\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t //If start time is zero but end time is not zero\t\r\n\t\t\t}else if(obj.getStartHr() == 0 && obj.getEndHr()!= 0){\r\n\t\t\t\t\r\n\t\t\t\tif(obj.getStartMin()<10) {\r\n\t\t\t\t\tTimeUtil.incrementMin(obj);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(obj.getStartMin() >= obj.getStartSec()) {\r\n\t\t\t\t\tlistTimeComb.add(\"00:\"+obj.getStartMin()+\":\"+obj.getStartMin());\r\n\t\t\t\t\tTimeUtil.incrementMin(obj);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t//Both start Hr and end Hr is same. (Last condition check)\r\n\t\t\t}else if(obj.getStartHr()==obj.getEndHr()) {\r\n\t\t\t\tcheckCombinationWhenHrAreEqual(obj, listTimeComb);\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t//Check rest of the combination\t\r\n\t\t\t}else{\r\n\t\t\t\tcheckCombinationWhenHrNotEqual(obj, listTimeComb);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listTimeComb;\r\n\t}", "@Override\r\n public void extractIndexBetween(List<HistoricalIndexElement> index, long start, long end) {\n historicalBuffersLock.lock();\r\n try {\r\n for (Block block : historicalBlocks) {\r\n HistoricalIndexElement[] elements = block.index.toSortedElements();\r\n for (HistoricalIndexElement historicalIndexElement : elements) {\r\n long time = historicalIndexElement.getTime();\r\n if (time >= start && time < end) {\r\n index.add(historicalIndexElement);\r\n }\r\n }\r\n }\r\n } finally {\r\n historicalBuffersLock.unlock();\r\n }\r\n\r\n if (currentBlock != null) {\r\n // Now the current block\r\n HistoricalIndexElement[] elements = currentBlock.index.toSortedElements();\r\n for (HistoricalIndexElement historicalIndexElement : elements) {\r\n long time = historicalIndexElement.getTime();\r\n if (time >= start && time < end) {\r\n index.add(historicalIndexElement);\r\n }\r\n }\r\n }\r\n\r\n }", "boolean hasTimeBoltDBoltH();", "public static Integer getBas(String baselineid2, Date polltime) {\n\t\tString sql = \"select * from baseline where bid='$BASELINEID$' and pollTime='$POLLTIME$'\";\r\n\r\n\t\tString timestr = DateTool.toStringMm1(polltime);\r\n\t\tsql = sql.replace(\"$POLLTIME$\", timestr).replace(\"$BASELINEID$\", baselineid2);\r\n\t\tMap m = DBTool1.getFirst(DBTool1.runsql(sql));\r\n\t\tif (m == null) {\r\n\t\t\tString newsql = \"select * from baseline where bid='$BASELINEID$' and pollTime>DATE_SUB('$POLLTIME$',INTERVAL 5 MINUTE))\";\r\n\r\n\t\t\tnewsql = newsql.replace(\"$POLLTIME$\", timestr).replace(\"$BASELINEID$\", baselineid2);\r\n\t\t\tMap m1 = DBTool1.getFirst(DBTool1.runsql(sql));\r\n\t\t\tif (m1 == null) {\r\n\t\t\t\treturn 1;\r\n\t\t\t} else\r\n\t\t\t\treturn (Integer) m.get(\"bvalue\");\r\n\r\n\t\t} else\r\n\t\t\treturn (Integer) m.get(\"bvalue\");\r\n\r\n\t}", "public String getLabel(int binIndex) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(startDate);\n if (binIndex > 0) {\n cal.add(calendarField,binIndex*incr);\n }\n return formatter.format(cal.getTime());\n }", "public boolean timeInBufferRange(long time) {\n \tif (!storage.isEmpty()) {\n if(time > storage.firstKey() && time < storage.lastKey())\n \treturn true;\n }\n \treturn false;\n }", "public bty(bto parambto, oa paramoa, cug paramcug, boolean paramBoolean)\r\n/* 40: */ {\r\n/* 41: 55 */ this.g = paramoa;\r\n/* 42: 56 */ this.h = paramcug;\r\n/* 43: 57 */ this.k = paramBoolean;\r\n/* 44: */ \r\n/* 45: 59 */ paramcug.a(this.g);\r\n/* 46: 62 */ for (int i1 = 0; i1 < 32; i1++)\r\n/* 47: */ {\r\n/* 48: 63 */ int i2 = (i1 >> 3 & 0x1) * 85;\r\n/* 49: 64 */ int i3 = (i1 >> 2 & 0x1) * 170 + i2;\r\n/* 50: 65 */ int i4 = (i1 >> 1 & 0x1) * 170 + i2;\r\n/* 51: 66 */ int i5 = (i1 >> 0 & 0x1) * 170 + i2;\r\n/* 52: 68 */ if (i1 == 6) {\r\n/* 53: 69 */ i3 += 85;\r\n/* 54: */ }\r\n/* 55: 72 */ if (parambto.e)\r\n/* 56: */ {\r\n/* 57: 73 */ int i6 = (i3 * 30 + i4 * 59 + i5 * 11) / 100;\r\n/* 58: 74 */ int i7 = (i3 * 30 + i4 * 70) / 100;\r\n/* 59: 75 */ int i8 = (i3 * 30 + i5 * 70) / 100;\r\n/* 60: 76 */ i3 = i6;\r\n/* 61: 77 */ i4 = i7;\r\n/* 62: 78 */ i5 = i8;\r\n/* 63: */ }\r\n/* 64: 81 */ if (i1 >= 16)\r\n/* 65: */ {\r\n/* 66: 82 */ i3 /= 4;\r\n/* 67: 83 */ i4 /= 4;\r\n/* 68: 84 */ i5 /= 4;\r\n/* 69: */ }\r\n/* 70: 87 */ this.f[i1] = ((i3 & 0xFF) << 16 | (i4 & 0xFF) << 8 | i5 & 0xFF);\r\n/* 71: */ }\r\n/* 72: 90 */ d();\r\n/* 73: */ }", "public void setValidTo (Timestamp ValidTo);", "private int visitBin(SpatialTransmitVisitor visitor, RadioInfo srcInfo, Location srcLoc, Message msg, \r\n Long durationObj, double limit, int di, int dj)\r\n {\r\n if(di<0 || dj<0 || di>=bins.length || dj>=bins[0].length) return -1;\r\n LinearList bin = bins[di][dj];\r\n if(!srcLoc.inside(bin.bl, bin.tr) &&\r\n visitor.computeSignal(srcInfo, srcLoc, bin.getNearest(srcLoc))<limit) return -1;\r\n int visited = 0;\r\n if(bin.size>0)\r\n {\r\n visited = bin.visitTransmit(visitor, srcInfo, srcLoc, msg, durationObj, limit);\r\n }\r\n return visited;\r\n }", "public Builder clearTimeBoltABoltB() {\n bitField0_ = (bitField0_ & ~0x00400000);\n timeBoltABoltB_ = 0L;\n \n return this;\n }", "public long getTimeBoltABoltB() {\n return timeBoltABoltB_;\n }", "public long getTimeBoltABoltB() {\n return timeBoltABoltB_;\n }", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return patternId;\n case 1: return begDate;\n case 2: return endDate;\n case 3: return mondayTimeRanges;\n case 4: return tuesdayTimeRanges;\n case 5: return wednesdayTimeRanges;\n case 6: return thursdayTimeRanges;\n case 7: return fridayTimeRanges;\n case 8: return saturdayTimeRanges;\n case 9: return sundayTimeRanges;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "public static byte[] getExactTime(long timestamp) {\n DATA1++;\n return new String(String.valueOf(DATA1) + \" zac[1]!!!\").getBytes();\n }", "public float getBP(Transform t) {\n\t\treturn broadPhaseLength * Math.abs(Math.max(t.scale.x, t.scale.y));\n\t}", "@Test\n\tpublic void testTPCHLineitemRangeTupleBuilder() throws ParseException {\n\t\tfinal TupleBuilder tupleBuilder = TupleBuilderFactory.getBuilderForFormat(\n\t\t\t\tTupleBuilderFactory.Name.TPCH_LINEITEM_RANGE);\n\n\t\tfinal Tuple tuple = tupleBuilder.buildTuple(TPCH_LINEITEM_TEST_LINE, \"1\");\n\n\t\tAssert.assertNotNull(tuple);\n\t\tAssert.assertEquals(Integer.toString(1), tuple.getKey());\n\n\t\tfinal SimpleDateFormat dateParser = new SimpleDateFormat(\"yyyy-mm-dd\");\n\t\tfinal Date shipDateTime = dateParser.parse(\"1993-12-04\");\n\t\tfinal Date receiptDateTime = dateParser.parse(\"1994-01-01\");\n\n\t\tfinal double doubleShipDateTime = (double) shipDateTime.getTime();\n\t\tfinal double doublereceiptDateTime = (double) receiptDateTime.getTime();\n\n\t\tfinal Hyperrectangle exptectedBox = new Hyperrectangle(doubleShipDateTime, doublereceiptDateTime);\n\n\t\tAssert.assertEquals(exptectedBox, tuple.getBoundingBox());\n\t}", "private void findWaitingTime(int wt[]) {\n\t\tint rt[] = new int[n];\r\n\t\t\r\n\t\tfor(int i=0;i<n;i++) {\r\n\t\t\trt[i] = processList.get(i).getBurstTime();\r\n\t\t}\r\n\t\t\r\n\t\tint completed = 0,t=0,minm = Integer.MAX_VALUE;\r\n\t\tint shortest = 0, finish_time;\r\n\t\t\r\n\t\tboolean check = false;\r\n\t\t\r\n\t\twhile(completed!=n) {\r\n\t\t\t// find process with min rmaining time\r\n\t\t\tfor(int i=0; i<n ;i++) {\r\n\t\t\t\tif (processList.get(i).getArrivalTime()<=t && rt[i]<minm && rt[i]>0) {\r\n\t\t\t\t\tminm = rt[i];\r\n\t\t\t\t\tshortest = i;\r\n\t\t\t\t\tcheck = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(check == false) {\r\n\t\t\t\tt++;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\trt[shortest]--;\r\n\t\t\t\r\n\t\t\tif (minm == 0) {\r\n\t\t\t\tminm = Integer.MAX_VALUE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (rt[shortest]==0) {\r\n\t\t\t\tcompleted++;\r\n\t\t\t\tcheck=false;\r\n\t\t\t\t\r\n\t\t\t\tfinish_time = t+1;\r\n\t\t\t\t\r\n\t\t\t\twt[shortest] = finish_time - processList.get(shortest).getBurstTime() - processList.get(shortest).getArrivalTime();\r\n\t\t\t\t\r\n\t\t\t\tif (wt[shortest]<0) {\r\n\t\t\t\t\twt[shortest] = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tt++;\r\n\t\t}\r\n\t}", "static boolean checkbetween(int n) {\n if(n>9 && n<101){\n return true;\n }\n else {\n return false;\n }\n \n }", "Map<Date, Integer> getFullBounces(Step step) throws SQLException;", "public static int [] vibCalc(int hour, int minute){\r\n// Log.i(\"HOUR\",String.valueOf(hour));\r\n// Log.i(\"MINUTE\",String.valueOf(minute));\r\n\r\n int [] vibCount = new int [3];\r\n vibCount[0] = hour;\r\n\r\n //int hourNum = hour;\r\n int minuteLong = minute / 10;\r\n vibCount[1] = minuteLong;\r\n int minuteShort = minute % 10;\r\n vibCount[2] = minuteShort;\r\n\r\n return vibCount;\r\n }", "private TransmitInfo getTransmitInfoForRange(long recordingStartByte, long recordingEndByte, float rate)\n throws HNStreamingException, HNStreamingRangeException\n {\n try\n {\n RecordedService[] segments = getSegmentedRecordedService().getSegments();\n long recordingSize = 0L;\n for (int i = 0;i<segments.length;i++)\n {\n OcapRecordedServiceExt thisSegment = (OcapRecordedServiceExt) segments[i];\n HNStreamContentDescription thisDescription = recordingItem.getContentDescription(thisSegment);\n\n long thisRecordingSize = HNAPIImpl.nativeServerGetNetworkContentItemSize(contentLocationType, thisDescription,\n protocolInfo.getProfileId(), protocolInfo.getContentFormat(), request.getTransformation());\n final long combinedSize;\n if(thisRecordingSize > 0)\n {\n combinedSize = recordingSize + thisRecordingSize;\n }\n else\n {\n // If the size for this segment is -1, don't accumulate\n combinedSize = recordingSize;\n }\n if (combinedSize >= recordingStartByte)\n {\n //current segment contains needed start byte offset\n long thisStartByteOffset = recordingStartByte - recordingSize;\n if (log.isInfoEnabled())\n {\n log.info(\"getTransmitInfoForRange - recording start byte: \" + recordingStartByte + \", segment index to use: \" + i +\n \", byte offset in to segment: \" + thisStartByteOffset + \", recording end byte: \" + recordingEndByte + \", rate: \" + rate);\n }\n return new TransmitInfo(thisSegment, recordingSize + thisStartByteOffset, thisStartByteOffset,\n recordingEndByte, rate);\n }\n if(thisRecordingSize > 0)\n {\n recordingSize += thisRecordingSize;\n }\n }\n throw new HNStreamingRangeException(\"segment not found for bytes: \" + recordingStartByte + \", recording size: \" + recordingSize);\n }\n catch (MPEMediaError err)\n {\n throw new HNStreamingException(\"Failed to create TransmitInfo for range: \" + recordingStartByte + \" - \" + recordingEndByte + \", rate: \" + rate, err);\n }\n }", "static void check(int arr[],int sum)\r\n {\r\n boolean binmap[] = new boolean[max]; /* by default this is array of false as {false,false,false,false,......,false} */\r\n for(int i=0;i<arr.length;i++)\r\n {\r\n int temp=sum-arr[i];\r\n if(temp>0 && binmap[temp]){ /* in condition , we can use binmap[temp] which means binmap[temp]==true */\r\n System.out.println(\"two numbers in given array whose sum is equal to given sum are :\"+temp+ \" and \" +arr[i]);\r\n }\r\n binmap[arr[i]]=true;\r\n }\r\n }", "private Boolean TimeInRange(String time){\n \n String[] t = time.split(\":\");\n \n int hours = Integer.parseInt(t[0]);\n int minutes = Integer.parseInt(t[1]);\n int seconds = Integer.parseInt(t[2]);\n \n if(hours == 11 && minutes == 59 && (seconds >= 55)){\n return true;\n }\n \n return false;\n \n }", "private int getBinI(Location l)\r\n {\r\n return (int)((l.getX()-bl.getX())/di);\r\n }", "ButEnd getStart();", "byte[] convertTo8Bit(byte[] data, int from, int to)\n {\n // How big?\n int main = ((to - from) / 8) * 8;\n int remainder = (to - from) - main;\n int size = ((to - from) / 8) * 7 + (remainder - 1);\n \n byte[] newd = new byte[size];\n \n int j = 0;\n for(int i = from; i < to; i += 8)\n { \n for(int x = 0; x < 7; x++)\n {\n if (j + x < newd.length)\n newd[j + x] = (byte)(data[i + x + 1] | (byte)(((data[i] >>> x) & 0x1) << 7));\n }\n j += 7;\n }\n return newd;\n }", "private String calculateTimeInterval(long startTime, long endTime){\n\t\tTimeSpanItem ti = TimeSpanItem.creatTimeItem(startTime, endTime);\n\t\tint intervalHour=ti.getHour();\n\t\tint intervalMin=ti.getMinute();\n\t\tString hourString=\"\";\n\t\tif(intervalHour>=1){\n\t\t\tif(intervalHour==1){\n\t\t\t\thourString=intervalHour+mContext.getString(R.string.daily_info_time_hour);\n\t\t\t}\n\t\t\telse{\n\t\t\t\thourString=intervalHour+mContext.getString(R.string.daily_info_time_hours);\n\t\t\t}\n\t\t}\n\t\t\n\t\tString minString=\"\";\n if(intervalMin < 1){\n intervalMin = 1;\n }\n\t\tminString=intervalMin+mContext.getString(R.string.daily_info_time_minute);\n\t\tString timeString=hourString+\" \"+minString;\n\n\t\treturn timeString;\n\t}", "public final AstValidator.bin_expr_return bin_expr() throws RecognitionException {\n AstValidator.bin_expr_return retval = new AstValidator.bin_expr_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree BIN_EXPR268=null;\n AstValidator.cond_return cond269 =null;\n\n AstValidator.expr_return expr270 =null;\n\n AstValidator.expr_return expr271 =null;\n\n\n CommonTree BIN_EXPR268_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:458:10: ( ^( BIN_EXPR cond expr expr ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:458:12: ^( BIN_EXPR cond expr expr )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n BIN_EXPR268=(CommonTree)match(input,BIN_EXPR,FOLLOW_BIN_EXPR_in_bin_expr2295); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n BIN_EXPR268_tree = (CommonTree)adaptor.dupNode(BIN_EXPR268);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(BIN_EXPR268_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_cond_in_bin_expr2297);\n cond269=cond();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, cond269.getTree());\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_bin_expr2299);\n expr270=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, expr270.getTree());\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_bin_expr2301);\n expr271=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, expr271.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public static long taumBday(int b, int w, int bc, int wc, int z) {\n // Write your code here\n long minB = Math.min(bc, wc + z);\n long minW = Math.min(wc, bc + z);\n return b * minB + w * minW;\n }", "private int getPixelBin(int[] pixel) {\r\n\t\treturn (int) ((int) (pixel[0] / redValues) * (binsPerColour)\r\n\t\t\t\t* (binsPerColour) + (int) (pixel[1] / greenValues)\r\n\t\t\t\t* (binsPerColour) + (int) (pixel[2] / blueValues));\r\n\t}", "public static BB transformbBB(Transform t, BB bb) {\n\t\tVector2f center = bb.getCenter();\n\t\tfloat hw = (bb.r - bb.l) * 0.5f;\n\t\tfloat hh = (bb.t - bb.b) * 0.5f;\n\n\t\tfloat a = t.a * hw, b = t.c * hh, d = t.b * hw, e = t.d * hh;\n\t\tfloat hw_max = cpfmax(cpfabs(a + b), cpfabs(a - b));\n\t\tfloat hh_max = cpfmax(cpfabs(d + e), cpfabs(d - e));\n\t\treturn BB.forExtents(t.transformPoint(center), hw_max, hh_max);\n\t}", "@Test\n public void testTransplantListEndpointQueryBloodtype() {\n String lowerBound = \"1970-01-01\";\n String upperBound = \"2018-09-27\";\n ResponseEntity response = dataController.getTransplantWaitingListRange(\"AB+\",null,null,null,upperBound, lowerBound);\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }" ]
[ "0.54376554", "0.53201956", "0.5158189", "0.50616354", "0.50160706", "0.5002081", "0.4917764", "0.48939493", "0.48912534", "0.48790854", "0.48627922", "0.48439038", "0.4816689", "0.47597313", "0.47437724", "0.47434828", "0.47430557", "0.46794474", "0.46629468", "0.46575207", "0.4623559", "0.4614144", "0.4606019", "0.45797905", "0.45593637", "0.45459265", "0.45458263", "0.45438686", "0.4503406", "0.44977844", "0.4485529", "0.4484196", "0.447148", "0.44682544", "0.44637614", "0.44513115", "0.44411385", "0.44280118", "0.44249558", "0.44085497", "0.44031182", "0.43988582", "0.43932682", "0.4386817", "0.4383803", "0.43781185", "0.43758053", "0.43751708", "0.43746272", "0.43727738", "0.43702254", "0.43616974", "0.4358976", "0.4352365", "0.4351182", "0.43489015", "0.43384352", "0.43368548", "0.43366522", "0.4335255", "0.4335255", "0.43351167", "0.43140668", "0.4305089", "0.42926913", "0.4284198", "0.42720288", "0.42718774", "0.4263452", "0.42507407", "0.42470723", "0.42460138", "0.42452922", "0.42344263", "0.42295873", "0.42293936", "0.42268273", "0.42251936", "0.42178723", "0.4217745", "0.42110658", "0.42092058", "0.42065585", "0.42053303", "0.4202692", "0.42001018", "0.4190178", "0.41895643", "0.41850916", "0.41822", "0.41741797", "0.41627228", "0.4161419", "0.4158654", "0.41579375", "0.41563493", "0.41485727", "0.41456676", "0.41456392", "0.4143105" ]
0.68158025
0
/ Casts any one argument method reference to a Function type
static <T, R> Function<T, R> function(Function<T, R> function) { return function; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FunctionalInterface\npublic interface Convert<S,T> {\n T convert(S arg);\n}", "private void visitFunction(SoyFunction fn, FunctionNode node) {\n if (fn instanceof LengthFunction) {\n checkArgType(node.getChild(0), ListType.of(AnyType.getInstance()), node);\n } else if (fn instanceof ParseIntFunction) {\n checkArgType(node.getChild(0), StringType.getInstance(), node);\n } else if (fn instanceof ParseFloatFunction) {\n checkArgType(node.getChild(0), StringType.getInstance(), node);\n }\n }", "OpFunctionCast createOpFunctionCast();", "void visitOperandFunction(ArgumentFunction operand);", "public static <IN extends OUT, OUT> Function<IN, OUT> cast() {\n return new Function<IN, OUT>() {\n\n @Override\n public OUT apply(IN in) {\n return in;\n }\n\n };\n }", "void foo(java.util.function.Consumer<T> c) {}", "void apply(FnIntFloatToFloat lambda);", "@FunctionalInterface\ninterface ConverterInterface<F, T> {\n T convert(F from);\n}", "T getFunction(String functionName) throws IllegalArgumentException;", "OUT apply(IN argument);", "public Function getFunction();", "public interface BinaryFunction<T1, T2, R> {\n\n\t/**\n\t * Invoke the function.\n\t * @param arg1 The first argument.\n\t * @param arg2 The second argument.\n\t * @return The result of the function.\n\t */\n\tpublic R invoke(T1 arg1, T2 arg2);\n\t\n}", "public interface Function1<A,B> {\n\tB apply(A a);\n}", "public Function getFunctionAt(Address entryPoint);", "public void call(T arg);", "@FunctionalInterface\npublic interface ICorfuSMRUpcallTarget<R> {\n\n /** Do the upcall.\n * @param obj The upcall target.\n * @param args The arguments to the upcall.\n *\n * @return The return value of the upcall.\n */\n Object upcall(R obj, Object[] args);\n}", "public interface Func<T, R> {\n R call(T t);\n}", "@FunctionalInterface\npublic interface QuadFunction<P1, P2, P3, P4, R> extends MethodFinder {\n\n R apply(P1 p1, P2 p2, P3 p3, P4 p4);\n\n}", "public Object\n call() throws Exception { \n final ConstArray<?> argv;\n try {\n argv = deserialize(m,\n ConstArray.array(lambda.getGenericParameterTypes()));\n } catch (final BadSyntax e) {\n /*\n * strip out the parsing information to avoid leaking\n * information to the application layer\n */ \n throw (Exception)e.getCause();\n }\n \n // AUDIT: call to untrusted application code\n final Object r = Reflection.invoke(bubble(lambda), target,\n argv.toArray(new Object[argv.length()]));\n return Fulfilled.isInstance(r) ? ((Promise<?>)r).call() : r;\n }", "public static UnaryExpression convert_(Expression expression, Class type, Method method) { throw Extensions.todo(); }", "@FunctionalInterface\npublic interface MyFunc {\n\n public String getValue(String str);\n}", "FunctionArgument getRef();", "@FunctionalInterface\npublic interface ToFloatFunction<T> {\n\n /**\n * Applies this function to the given argument.\n *\n * @param value the function argument\n * @return the function result\n */\n float applyAsFloat(T value);\n\n}", "@FunctionalInterface\npublic interface Func<In, Out> extends Function<In, Out>{\n\n\tdefault Out apply(In in) {\n\t\treturn tryApply(in).get();\n\t}\n\n\tOut checkedApply(In in) throws Exception;\n\n\tdefault int arity(){\n\t\treturn 1;\n\t}\n\n\t@Override\n\tdefault <Last> Func<In, Last> andThen(Function<? super Out, ? extends Last> other) {\n\t\treturn in -> other.apply(apply(in));\n\t}\n\n\t@Override\n\tdefault <First> Func<First, Out> compose(Function<? super First, ? extends In> other) {\n\t\treturn first -> apply(other.apply(first));\n\t}\n\n\tdefault Try<Out> tryApply(In in) {\n\t\treturn Try.of(() -> checkedApply(in));\n\t}\n\n\n\tstatic <Out> Func0<Out> lift(Func0<Out> func) {\n\t\treturn func;\n\t}\n\n\tstatic <In, Out> Func1<In, Out> lift(Func1<In, Out> func) {\n\t\treturn func;\n\t}\n\n\tstatic <In1, In2, Out> Func2<In1, In2, Out> lift(Func2<In1, In2, Out> func) {\n\t\treturn func;\n\t}\n\n\tstatic <In1, In2, In3, Out> Func3<In1, In2, In3, Out> lift(Func3<In1, In2, In3, Out> func) {\n\t\treturn func;\n\t}\n\n\tstatic <In1, In2, In3, In4, Out> Func4<In1, In2, In3, In4, Out> lift(Func4<In1, In2, In3, In4, Out> func) {\n\t\treturn func;\n\t}\n\n\tstatic <In1, In2, In3, In4, In5, Out> Func5<In1, In2, In3, In4, In5, Out> lift(Func5<In1, In2, In3, In4, In5, Out> func) {\n\t\treturn func;\n\t}\n\n\tstatic <In> Consumer1<In> lift(Consumer1<In> func) {\n\t\treturn func;\n\t}\n\n\tstatic <In1, In2> Consumer2<In1, In2> lift(Consumer2<In1, In2> func) {\n\t\treturn func;\n\t}\n}", "default Function1<U, K> bind1(T newFirstArgument) {\n return u -> Function2.this.apply(newFirstArgument, u);\n }", "public interface Function<T, R> {\n\n /**\n * Applies this function to the given argument.\n *\n * @param t the function argument\n * @return the function result\n */\n R apply(T t);\n}", "static <T> Function<T,SibillaValue> apply(UnaryOperator<SibillaValue> op, Function<T,SibillaValue> f1) {\n return arg -> op.apply(f1.apply(arg));\n }", "public interface Function<IN, OUT> {\n\n /**\n * Compute the result of applying the function to the input argument\n *\n * @param in the input object\n * @return the function result\n */\n OUT apply( IN in );\n\n}", "int apply(MethodVisitor methodVisitor, Method method);", "public interface Function2<T, U, R> {\n R apply(T t, U u);\n\n /**\n * Method to create composition: after(this(x, y)).\n *\n * @param after function to apply after.\n * @param <V> return type of after.\n * @return composition of functions.\n */\n default <V> Function2<T, U, V> compose(Function1<? super R, ? extends V> after) {\n return (t, u) -> after.apply(this.apply(t, u));\n }\n\n /**\n * Method to bind 1st parameter of function.\n *\n * @param firstParameter value of 1st argument to bind.\n * @return function from 1 arguments that waits for the second argument.\n */\n default Function1<U, R> bind1(T firstParameter) {\n return (u) -> apply(firstParameter, u);\n }\n\n /**\n * Method to bind 2nd parameter of function.\n *\n * @param secondParameter value of 2nd argument to bind.\n * @return function from 1 arguments that waits for the first argument.\n */\n default Function1<T, R> bind2(U secondParameter) {\n return (t) -> apply(t, secondParameter);\n }\n\n /**\n * Method to curry function, second parameter will be bind.\n *\n * @param parameter parameter to set.\n * @return function from 1 argument(1st argument of Function2).\n */\n default Function1<T, R> curry(U parameter) {\n return bind2(parameter);\n }\n}", "public static Object invoke(Method arg0, Object arg1, Object[] arg2, Fiber ???)\n/* */ throws Pausable, IllegalAccessException, IllegalArgumentException, InvocationTargetException\n/* */ {\n/* 258 */ Object localObject1 = ???;Fiber f = ((Fiber)localObject1).task.fiber;", "static <A, B, R> Function<B, R> bind(BiFunction<A, B, R> f, A firstParam) {\n return secondParam -> f.apply(firstParam, secondParam);\n }", "FunCall createFunCall();", "public interface Function2<T, U, K> {\n\n /**\n * This method is a composition of two functions:\n * it acts as g(f(x, y))) where f is the Function2 class object\n * and g is a Function1 class object.\n * @param g one-argument function,\n * the outer function of the composition\n * @param <V> outer function range type parameter\n * @return function of one argument that represents g(f(x, y))\n */\n default <V> Function2<T, U, V> compose(@NotNull final Function1<? super K, ? extends V> g) {\n return (t, u) -> g.apply(Function2.this.apply(t, u));\n }\n\n /**\n * This method binds the first argument with a provided value.\n * @param newFirstArgument argument to be bound\n * @return new function object with a bound first argument\n */\n default Function1<U, K> bind1(T newFirstArgument) {\n return u -> Function2.this.apply(newFirstArgument, u);\n }\n\n /**\n * This method binds the second argument with a provided value.\n * @param newSecondArgument argument to be bound\n * @return new function object with a bound second argument\n */\n default Function1<T, K> bind2(U newSecondArgument) {\n return t -> Function2.this.apply(t, newSecondArgument);\n }\n\n /**\n * This method implements currying:\n * instead of a two-argument function we get\n * two one-argument functions.\n * @return function g such that g(x)(y) == f.apply(x, y)\n */\n default Function1<T, Function1<U, K>> curry() {\n return this::bind1;\n }\n\n /**\n * This method applies the function to provided arguments.\n * @param arg1 first argument\n * @param arg2 second argument\n * @return result of function application\n */\n K apply(T arg1, U arg2);\n}", "@FunctionalInterface\r\ninterface SingleMethod { // functional interface cant have more than one abstract method\r\n\tvoid method();\r\n\t\r\n}", "public interface Function {\n double f(double x);\n}", "public interface Function {\n double f(double x);\n}", "public interface FunctionProvider {\n\n <T, R> Function<T, R> get(URI identifier, Class<T> inputType, Class<R> returnType) throws FunctionResolutionException;\n\n <T, R> Function<T, R> get(String identifier, Class<T> inputType, Class<R> returnType) throws FunctionResolutionException;\n}", "public static void main(String[] args) {\n\n Function<String, String> function1 = (string) -> string +string;\n System.out.println(function1.apply(\"aaa\"));\n\n Function<String,String> function2 =s -> new String(s);\n System.out.println(function2.apply(function2.apply(\"sss\")));\n\n// Function<String, Emp> function = s -> new Emp(s);\n// System.out.println(function.apply(\"yy\"));\n\n Function<String, Emp> function3 = Emp::new;\n System.out.println(function3.apply(\"yy\"));\n }", "K invoke(Map<String, Method> methods, T object);", "public interface TransformFunc<FROM, TO>\r\n{\r\n TO transform(FROM source);\r\n}", "StackManipulation special(TypeDescription invocationTarget);", "public static UnaryExpression convertChecked_(Expression expression, Class type, Method method) { throw Extensions.todo(); }", "public interface Function<T, U> {\n static <X,Y,Z> Function<Y,Z> partialA(X i, Function<X,Function<Y,Z>> l) {\n return l.apply(i);\n }\n\n static <X,Y,Z> Function<X,Z> partialB(Y i, Function<X,Function<Y,Z>> l) {\n return x->l.apply(x).apply(i);\n }\n\n static <X,Y,Z> Function<X,Function<Y,Z>> curry(Function<Tuple<X,Y>,Z> l) {\n return x->y->l.apply(new Tuple<X,Y>(x,y));\n }\n\n static <X,Y,Z> Function<Tuple<X,Y>,Z> unCurry(Function<X,Function<Y,Z>> l) {\n return x->l.apply(x._1).apply(x._2);\n }\n\n static <X,Y,Z> Function<X,Function<Y,Z>> reverseParameter(Function<Y,Function<X,Z>> l) {\n return x->y->l.apply(y).apply(x);\n }\n\n static <U> Function<U,U> composeAll(List<Function<U,U>> list) {\n return list.foldLeft(Function.<U>identity(),x->y->Function.compose(x,y));\n }\n\n U apply(T arg);\n\n\t/**\n\t * It directly return a function which is trivial. It just return whatever input.\n\t * @param <T>\n\t * @return\n\t */\n\tstatic <T> Function<T, T> identity() {\n\t\treturn t -> t;\n\t}\n\n\t/**\n\t * Should be able to higherCompose two function into one function\n\t * @return\n\t */\n\tstatic <X, Y, Z> Function<Function<X, Y>,\n Function<Function<Y, Z>,\n Function<X, Z>>> higherAndThen() {\n return x -> y -> z -> y.apply(x.apply(z));\n }\n\n /**\n * It is similar to {@link #higherCompose}\n * @return\n */\n static <X, Y, Z> Function<Function<Y, Z>,\n Function<Function<X, Y>,\n Function<X, Z>>> higherCompose() {\n return x -> y -> z -> x.apply(y.apply(z));\n }\n\n static <X, Y, Z> Function<X, Z> composeAndThen(Function<X,Y> f1, Function<Y,Z> f2){\n return Function.<X,Y,Z>higherAndThen().apply(f1).apply(f2);\n }\n\n static <X, Y, Z> Function<X, Z> compose(Function<Y,Z> f1, Function<X,Y> f2){\n return Function.<X,Y,Z>higherCompose().apply(f1).apply(f2);\n }\n\n\n}", "public CALL(Exp f, ExpList a) {func=f; args=a;}", "static <A, B, C, R> Function<C, R> bind(TriFunction<A, B, C, R> f, A firstParam, B secondParam) {\n return thirdParam -> f.apply(firstParam, secondParam, thirdParam);\n }", "public T caseFunctionRef(FunctionRef object)\n {\n return null;\n }", "default Function1<U, R> bind1(T firstParameter) {\n return (u) -> apply(firstParameter, u);\n }", "@Ignore\n @Test\n public void untypedLambda2() {\n DependentLink A = param(\"A\", Universe(0));\n DependentLink params = params(A, param(\"B\", Pi(Reference(A), Universe(0))), param(\"a\", Reference(A)));\n Expression type = Pi(params, Apps(Reference(params.getNext()), Reference(params.getNext().getNext())));\n List<Binding> context = new ArrayList<>();\n context.add(new TypedBinding(\"f\", type));\n\n CheckTypeVisitor.Result result = typeCheckExpr(context, \"\\\\lam x1 x2 x3 => f x1 x2 x3\", null);\n assertEquals(type, result.type);\n }", "public interface TriFunction<Arg1, Arg2, Arg3, Result> {\n Result apply(Arg1 arg1, Arg2 arg2, Arg3 arg3);\n}", "@Override\n\tpublic void visit(Function arg0) {\n\t\t\n\t}", "public FunctionCall( Method method , Class< ? > returnType ) {\r\n this.method = method;\r\n this.returnType = returnType;\r\n }", "FunDef resolve(\n Exp[] args,\n Validator validator,\n List<Conversion> conversions);", "@Override\n\tpublic void visit(Function arg0) {\n\n\t}", "public interface Action1<T1> {\n // We can't use the @FunctionalInterface annotation because it's only\n // available on Android API Level 24 and above.\n void invoke(T1 param1);\n}", "Astro term(Astro functor, AstroArg args);", "public interface Function2<X1,X2,Y> {\n\tY apply(X1 x1, X2 x2);\n}", "@Override\n protected void visitFunctionNode(FunctionNode node) {\n // TODO(lukes): move this logic to run as part of ResolveExpressionsTypeVisitor (possibly\n // extracted into a helper class)\n SoyFunction function = node.getSoyFunction();\n if (function instanceof BuiltinFunction) {\n visitNonpluginFunction((BuiltinFunction) function, node);\n } else {\n visitFunction(function, node);\n }\n\n // Recurse to operands.\n visitChildren(node);\n }", "public static Class getFuncType(Class[] typeArgs) { throw Extensions.todo(); }", "@Test\n public void untypedLambda1() {\n DependentLink A = param(\"A\", Universe(0));\n Expression type = Pi(params(A, param(\"a\", Reference(A))), Nat());\n List<Binding> context = new ArrayList<>();\n context.add(new TypedBinding(\"f\", type));\n typeCheckExpr(context, \"\\\\lam x1 x2 => f x1 x2\", null);\n }", "public interface Functor1<T, F extends Functor1<?,?>> {\n <R> F map(Function<T,R> fn);\n}", "public abstract Object invoke(T target , Method method , Object[] args) throws Throwable;", "@Test\n public void test4() {\n Comparator<Integer> comparator = Integer::compare;\n }", "void mo12646a(C0722m mVar, Function1<? super C3456b, C13145v> function1);", "@FunctionalInterface\npublic interface BiIntFunction {\n int apply(int var1, int var2);\n}", "@SuppressWarnings(\"unchecked\") \n public Object invoke(Caster<?> caster, Object obj, Object args[]) throws Throwable {\n try {\n if (argConverters != null) {\n for (int i = 0, len = args.length; i < len; i++) {\n @SuppressWarnings(\"rawtypes\") // so we can pass Object as input to conversion\n Converter converter = argConverters[i];\n if (converter != null) {\n args[i] = converter.convert(args[i], caster);\n }\n }\n }\n if (varArgsConverter != null) {\n args = varArgsConverter.apply(args);\n }\n Object ret = method.invoke(obj, args);\n if (returnConverter != null) {\n @SuppressWarnings(\"rawtypes\") // so we can pass Object as input to conversion\n Converter converter = returnConverter;\n ret = converter.convert(ret, caster);\n }\n return ret;\n } catch (InvocationTargetException e) {\n throw e.getCause();\n }\n }", "static <T> Function<T,SibillaValue> apply(BinaryOperator<SibillaValue> op, Function<T,SibillaValue> f1, Function<T, SibillaValue> f2) {\n return arg -> op.apply(f1.apply(arg), f2.apply(arg));\n }", "interface MyFirstVoidFunctionalInterface {\n\n public void methodOne();\n\n}", "public interface CalculatorFunction {\r\n CalculatorNode calculate(CalculatorNode[] arguments);\r\n}", "public interface Myfunc {\n void invok(Integer arr);\n}", "static <A, B, C, R> BiFunction<B, C, R> bind(TriFunction<A, B, C, R> f, A firstParam) {\n return (secondParam, thirdParam) -> f.apply(firstParam, secondParam, thirdParam);\n }", "abstract /*package*/ Object executeRVMFunction(Function func, IValue[] posArgs, Map<String,IValue> kwArgs);", "@FunctionalInterface\npublic interface MyFunctionalInterface {\n\n // abstract method\n int addMethod(int val1, int val2);\n\n}", "public static <R, T1, T2> Function<R, T2> bind1(final Function2<R, ? super T1, T2> func, final T1 arg1) {\r\n return new Function<R, T2>() {\r\n @Override\r\n public R apply(T2 arg2) {\r\n return func.apply(arg1, arg2);\r\n }\r\n };\r\n }", "public interface IntFunc {\n int apply(int input);\n}", "R apply(T t);", "<T extends Formula> T replaceArgs(T f, List<Formula> args);", "static public interface FunctionHandler\r\n {\r\n public double evaluateFunction(String nam, ArgParser args) throws ArithmeticException;\r\n }", "public T caseFunctionArguments(FunctionArguments object)\n {\n return null;\n }", "public interface IFunction {\n\n @Nonnull\n String name();\n\n String process(@Nonnull final Map<String, String> args, @Nonnull final Context context);\n\n public boolean isApplicable(@Nonnull final String functionName,\n @Nonnull final Set<String> keys,\n @Nonnull final Collection<String> values,\n @Nonnull final String raw);\n}", "public static <T, U, R, A1 extends T> Function<U, R> bind1(BiFunction<T, U, R> function, A1 arg1) {\n return (arg2) -> function.apply(arg1, arg2);\n }", "public Function getFunctionContaining(Address addr);", "protected abstract Feature<T,?> convertArgument(Class<?> parameterType, Feature<T,?> originalArgument);", "private JValue invoke(\n\t\tIFuncValue func,\r\n\t\tJFunctionType funcType, \r\n\t\tExecutable exec, \r\n\t\tString funcName, \r\n\t\tArgument[] args, \r\n\t\tJParameter[] params){\t\t\r\n\t\t// 1) (For typed function) Check arguments' type\r\n\t\tboolean isTyped = funcType.isTyped();\r\n\t\tif(isTyped){\r\n\t\t\tcheckArgTypes(funcName, args, params);\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// 2) Execute\r\n\t\t\tResult result = exec.execute(rt, func, args);\r\n\t\t\t\r\n\t\t\t// 3) Get the returned value\r\n\t\t\tJValue val = result.getReturnedValue(false);\r\n\t\t\tJType typ = val.getType();\r\n\t\t\tif(typ == null){\r\n\t\t\t\t// We allow typ to be null only if it is a generic null value.\r\n\t\t\t\tif(val != RefValue.NULL && !RefValue.isGenericNull(val)){\r\n\t\t\t\t\tthrow new JSEError(\"A returned value has no type.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// 4) (For typed function) Check the type of returned value\r\n\t\t\tJType retTyp = null;\r\n\t\t\t// (Optional behavior: if we are using loose typing, and function returns \r\n\t\t\t// void, coerce the value to the default of declared type. For example, \r\n\t\t\t// return 0 if the declared return type is int; null if Object or untyped)\r\n\t\t\tboolean looseReturn = this.looseTyping && typ == VoidType.getInstance();\r\n\t\r\n\t\t\tif (isTyped && !funcType.getReturn().isUntyped() && typ != null){\r\n\t\t\t\tretTyp = funcType.getReturnType();\r\n\t\t\t\tif(typ == AnyType.getInstance()){\r\n\t\t\t\t\ttyp = UntypedValue.unwrap(val).getType();\r\n\t\t\t\t}\r\n\t\t\t\tConvertibility conv = typ.getConvertibilityTo(retTyp);\r\n\t\t\t\tswitch(conv){\r\n\t\t\t\tcase DEMOTED:\r\n\t\t\t\tcase PROMOTED:\r\n\t\t\t\t\t// If we return a value with different but somewhat compatible basic type, \r\n\t\t\t\t\t// we must replicate it in the original frame using the declared type. \r\n\t\t\t\t\tbreak;\n\t\t\t\tcase ORTHOGONAL:\n\t\t\t\t\tif (JArrayType.isArrayType(retTyp) && val.deref() instanceof HostedArrayValue) {\n\t\t\t\t\t\tJValue arrVal = HostedArrayValue.toBasicArrayValue(\n\t\t\t\t\t\t\trt.getHeap(), rt.getTypeTable(), (HostedArrayValue)val.deref(), (JArrayType)retTyp);\n\t\t\t\t\t\tif (arrVal != null) {\n\t\t\t\t\t\t\tval = arrVal;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Fall through\n\t\t\t\tcase CASTABLE:\n\t\t\t\t\tif (!looseReturn){\r\n\t\t\t\t\t\tthrow new TypeIncompatibleException(typ, retTyp, true);\r\n\t\t\t\t\t}\n\t\t\t\t\t// Fall through\r\n\t\t\t\tcase UNCONVERTIBLE:\r\n\t\t\t\tcase UNSAFE:\r\n\t\t\t\t\tif (!looseReturn){\r\n\t\t\t\t\t\tthrow new TypeIncompatibleException(typ, retTyp);\r\n\t\t\t\t\t}\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t// Reset this to null so that replicateValue() can derive its type from the actual value.\r\n\t\t\t\t\tretTyp = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// 5) Replicate the returned value in current frame\r\n\t\t\tif (typ != null && typ.getKind() != JTypeKind.VOID){\r\n\t\t\t\t// At this moment, if retTyp == null, the new value will use the type of the one passed in (val)\r\n\t\t\t\tval = ValueUtilities.replicateValue(val, retTyp, rt.getStackMemory().currentFrame());\r\n\t\t\t} else if (looseReturn){\r\n\t\t\t\t// If the declared function returns void, coerce it to a null of type Object\r\n\t\t\t\tretTyp = funcType.getReturnType();\r\n\t\t\t\tif (retTyp == VoidType.getInstance()){\r\n\t\t\t\t\tretTyp = JObjectType.getInstance();\r\n\t\t\t\t}\r\n\t\t\t\tval = ValueUtilities.makeDefaultValue(rt.getStackMemory().currentFrame(), retTyp, false);\r\n\t\t\t}\r\n\t\t\treturn val;\r\n\t\t} catch (JulianScriptException jse){\r\n\t\t\t// Capture JSE (step 2/2):\r\n\t\t\t// At this point we have method's name and parameter information, so we can add a stack trace into the exception.\r\n\t\t\tString fn = jse.getFileName();\r\n\t\t\tint lineNo = jse.getLineNumber();\n\t\t\tString name;\n\t\t\tString[] pnames;\n\t\t\tStackTraceKind stk = jse.resetTraceKind();\n\t\t\tif (stk == null || stk == StackTraceKind.CALL) {\n\t\t\t\t// Regular trace - a function call\n\t\t\t\tname = funcType.getFullFunctionName(false);\n\t\t\t\tpnames = JParameter.getParamNames(params);\n\t\t\t} else {\n\t\t\t\t// Special trace - usually related to incorporating another file\n\t\t\t\tname = stk.getTraceName();\n\t\t\t\tpnames = null;\n\t\t\t}\r\n\t\t\tjse.addStackTrace(rt.getTypeTable(), name, pnames, fn, lineNo);\r\n\t\t\tthrow jse;\r\n\t\t} catch (EngineInvocationError e) {\r\n\t\t\tthrow new JSEError(\"An error occurs while invoking \" + funcType.getName());\r\n\t\t}\r\n\t}", "@FunctionalInterface\n private interface TwoParameterFunction<T, U, R> {\n R apply(T t, U u);\n }", "void visitOperatorFunction(OperatorFunction operator);", "public boolean supportsCallee(SootMethod method);", "public interface DuelCallable<T, E> {\n\n\tvoid run(T one, E two);\n\n}", "@FunctionalInterface\npublic interface FuncInterface<T> {\n T m(T t);\n //重新定义Object中的toString方法\n String toString();\n}", "public Object convert(Object from, Class to) {\n \t\tif (from instanceof Function) {\n \t\t\tif (to == Callable.class)\n \t\t\t\treturn new RhinoCallable(engine, (Function) from);\n \t\t} else if (from instanceof Scriptable || from instanceof String) { // Let through string as well, for ArgumentReader\n \t\t\tif (Map.class.isAssignableFrom(to)) {\n \t\t\t\treturn toMap((Scriptable) from);\n \t\t\t} else {\n \t\t\t\t/* try constructing from this prototype first\n \t\t\t\ttry {\n \t\t\t\t\tScriptable scope = engine.getScope();\n \t\t\t\t\tExtendedJavaClass cls = ExtendedJavaClass.getClassWrapper(scope, to);\n \t\t\t\t\treturn cls.construct(Context.getCurrentContext(), scope, new Object[] { from });\n \t\t\t\t} catch(Throwable e) {\n \t\t\t\t\tint i = 0;\n \t\t\t\t}\n \t\t\t\t*/\n \t\t\t\tArgumentReader reader = null;\n \t\t\t\tif (ArgumentReader.canConvert(to) && (reader = getArgumentReader(from)) != null) {\n \t\t\t\t return ArgumentReader.convert(reader, unwrap(from), to);\n \t\t\t\t} else if (from instanceof NativeObject && getZeroArgumentConstructor(to) != null) {\n \t\t\t\t\t// Try constructing an object of class type, through\n \t\t\t\t\t// the JS ExtendedJavaClass constructor that takes \n \t\t\t\t\t// a last optional argument: A NativeObject of which\n \t\t\t\t\t// the fields define the fields to be set in the native type.\n \t\t\t\t\tScriptable scope = ((RhinoEngine) this.engine).getScope();\n \t\t\t\t\tExtendedJavaClass cls =\n \t\t\t\t\t\t\tExtendedJavaClass.getClassWrapper(scope, to);\n \t\t\t\t\tif (cls != null) {\n \t\t\t\t\t\tObject obj = cls.construct(Context.getCurrentContext(),\n \t\t\t\t\t\t\t\tscope, new Object[] { from });\n \t\t\t\t\t\tif (obj instanceof Wrapper)\n \t\t\t\t\t\t\tobj = ((Wrapper) obj).unwrap();\n \t\t\t\t\t\treturn obj;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t} else if (from == Undefined.instance) {\n \t\t\t// Convert undefined ot false if destination is boolean\n \t\t\tif (to == Boolean.TYPE)\n \t\t\t\treturn Boolean.FALSE;\n \t\t} else if (from instanceof Boolean) {\n \t\t\t// Convert false to null / undefined for non primitive destination classes.\n\t\t\tif (!((Boolean) from).booleanValue() && !to.isPrimitive())\n \t\t\t\treturn Undefined.instance;\n \t\t}\n \t\treturn null;\n \t}", "public static <T, R, A1 extends T> Supplier<R> bind1(Function<T, R> function, A1 arg1) {\n return () -> function.apply(arg1);\n }", "public abstract @Nullable Function getFunction(@NotNull String functionName);", "public interface Dispatch<A extends Action, S extends State> extends Function<A, S> {\n}", "public T caseFunction(Function object) {\n\t\treturn null;\n\t}", "public T caseFunction(Function object) {\n\t\treturn null;\n\t}", "public <O extends FighterOperation> O apply(O operation);", "public interface Function {\n /**\n * Get the name of this function.\n *\n * @return The name of the function.\n */\n String getName();\n\n /**\n * Execute this function.\n */\n void execute();\n}", "private static Object invoke(CompileResult compileResult, BIRNode.BIRFunction function, String functionName,\n Object[] args, Class<?>[] paramTypes) {\n assert args.length == paramTypes.length;\n\n Object[] jvmArgs = populateJvmArgumentArrays(args);\n\n Object jvmResult;\n PackageManifest packageManifest = compileResult.packageManifest();\n String funcClassName = JarResolver.getQualifiedClassName(packageManifest.org().toString(),\n packageManifest.name().toString(),\n packageManifest.version().toString(),\n getClassName(function.pos.lineRange().fileName()));\n\n try {\n Class<?> funcClass = compileResult.getClassLoader().loadClass(funcClassName);\n Method method = getMethod(functionName, funcClass);\n Function<Object[], Object> func = a -> {\n try {\n return method.invoke(null, a);\n } catch (IllegalAccessException e) {\n throw new RuntimeException(\"Error while invoking function '\" + functionName + \"'\", e);\n } catch (InvocationTargetException e) {\n Throwable t = e.getTargetException();\n if (t instanceof BLangTestException) {\n throw ErrorCreator.createError(StringUtils.fromString(t.getMessage()));\n }\n if (t instanceof io.ballerina.runtime.api.values.BError) {\n throw ErrorCreator.createError(StringUtils.fromString(\n \"error: \" + ((io.ballerina.runtime.api.values.BError) t).getPrintableStackTrace()));\n }\n if (t instanceof StackOverflowError) {\n throw ErrorCreator.createError(StringUtils.fromString(\"error: \" +\n \"{ballerina}StackOverflow {\\\"message\\\":\\\"stack overflow\\\"}\"));\n }\n throw ErrorCreator.createError(StringUtils.fromString(\"Error while invoking function '\" +\n functionName + \"'\"), e);\n }\n };\n\n Scheduler scheduler = new Scheduler(false);\n FutureValue futureValue = scheduler.schedule(jvmArgs, func, null, null, new HashMap<>(),\n PredefinedTypes.TYPE_ANY, \"test\",\n new StrandMetadata(ANON_ORG, DOT, DEFAULT_MAJOR_VERSION.value, functionName));\n scheduler.start();\n if (futureValue.panic instanceof RuntimeException) {\n throw new BLangTestException(futureValue.panic.getMessage(),\n futureValue.panic);\n }\n jvmResult = futureValue.result;\n } catch (ClassNotFoundException | NoSuchMethodException e) {\n throw new RuntimeException(\"Error while invoking function '\" + functionName + \"'\", e);\n }\n\n return jvmResult;\n }", "public void toSelf(RFunc1<T, T> func) {\n toSelf($(func));\n }", "public static void typeFunction(PegObject node) {\n\t\tSymbolTable gamma = node.getSymbolTable();\n\t\tif(node.typed != null) {\n\t\t\tPegObject params = node.get(1, null);\n\t\t\tPegObject block = node.get(3, null);\n\t\t\tUniArray<BunType> typeList = new UniArray<BunType>(new BunType[params.size()+1]);\n\t\t\tfor(int i = 0; i < params.size(); i++) {\n\t\t\t\tPegObject p = params.get(i);\n\t\t\t\tBunType ptype = p.typeAt(gamma, 1, null);\n\t\t\t\ttypeList.add(ptype);\n\t\t\t\tif(block != null) {\n\t\t\t\t\tblock.setName(p.get(0), ptype, null);\n\t\t\t\t}\n\t\t\t}\n\t\t\tBunType returnType = node.typeAt(gamma, 2, null);\n\t\t\ttypeList.add(returnType);\n\t\t\tnode.typed = BunType.newFuncType(typeList);\n\t\t\tif(block != null) {\n\t\t\t\tblock.setName(node.get(0), node.typed, node);\n\t\t\t\tblock.setName(\"return\", returnType, null);\n\t\t\t\t//block.gamma.tryMatch(block);\n\t\t\t}\n\t\t\tgamma.setFunctionName(node.textAt(0, \"f\"), node.typed, node);\n\t\t}\n\t}" ]
[ "0.6113485", "0.58296674", "0.5828075", "0.5820763", "0.57446563", "0.5708111", "0.57000595", "0.569828", "0.5672721", "0.5669309", "0.5645141", "0.5641719", "0.56388354", "0.56187576", "0.55844545", "0.55588776", "0.5513432", "0.55038244", "0.5497543", "0.54735404", "0.5455405", "0.5436182", "0.542165", "0.54062194", "0.53781176", "0.5338617", "0.53384435", "0.53324944", "0.53287923", "0.53165215", "0.531085", "0.5309531", "0.52995837", "0.5295396", "0.5284645", "0.52733606", "0.52733606", "0.5268848", "0.5267192", "0.5253757", "0.5243234", "0.5232475", "0.5223117", "0.51997036", "0.5189707", "0.5167609", "0.5150116", "0.51393557", "0.5136299", "0.5129709", "0.5129372", "0.51257944", "0.51193106", "0.5098103", "0.5096416", "0.50818634", "0.50728273", "0.507176", "0.50681245", "0.50662285", "0.5062936", "0.5062916", "0.50493085", "0.5043197", "0.5043119", "0.50412154", "0.5038298", "0.5037509", "0.50348896", "0.5028413", "0.50197804", "0.5015044", "0.49997196", "0.49900505", "0.49884063", "0.4984041", "0.49798816", "0.49757904", "0.496921", "0.4961928", "0.49387637", "0.49254403", "0.49246794", "0.49186", "0.49166945", "0.49099296", "0.49065527", "0.4894441", "0.48919275", "0.48860073", "0.48819172", "0.48789892", "0.48756152", "0.4870085", "0.4870085", "0.4866745", "0.48642704", "0.48604986", "0.48576263", "0.48475322" ]
0.5604479
14